@cntrl-site/components 1.0.55 → 1.0.56-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +115 -45
  2. package/dist/index.mjs +3825 -3720
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),at=require("classnames"),y=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),mi=require("react-dom");function Tc(e){return e.type==="object"&&e.version===1}const Lc="ControlSlider-module__wrapper___sHEkd",Ic="ControlSlider-module__hoverArrow___A-dOH",Rc="ControlSlider-module__sliderItem___QQSkR",Ec="ControlSlider-module__sliderImage___9hRl-",Mc="ControlSlider-module__arrow___05ghY",kc="ControlSlider-module__arrowVertical___tBfVN",Pc="ControlSlider-module__nextArrow___-30Yc",Ac="ControlSlider-module__arrowInner___aEra3",Fc="ControlSlider-module__arrowIcon___S4ztF",Wc="ControlSlider-module__arrowImg___2dwJW",_c="ControlSlider-module__mirror___brd6U",Hc="ControlSlider-module__pagination___bicLF",Nc="ControlSlider-module__paginationInner___bT-P-",Oc="ControlSlider-module__paginationVertical___zYqKw",jc="ControlSlider-module__paginationItem___nTRbk",zc="ControlSlider-module__dot___p1Qun",Bc="ControlSlider-module__activeDot___LHFaj",Dc="ControlSlider-module__paginationInsideBottom___R3FWn",Vc="ControlSlider-module__paginationInsideTop___V-qb-",Gc="ControlSlider-module__paginationOutsideBottom___14w8D",qc="ControlSlider-module__paginationOutsideTop___SCLqB",Kc="ControlSlider-module__paginationInsideLeft___yOBRZ",Uc="ControlSlider-module__paginationInsideRight___Rtt3o",Xc="ControlSlider-module__paginationOutsideLeft___lahaw",Yc="ControlSlider-module__paginationOutsideRight___EtuQa",Zc="ControlSlider-module__imgWrapper___UjEgB",Jc="ControlSlider-module__captionBlock___dJ6-j",Qc="ControlSlider-module__captionTextWrapper___HFlpf",ed="ControlSlider-module__captionText___uGBVc",td="ControlSlider-module__active___WZK4G",nd="ControlSlider-module__withPointerEvents___t-18M",id="ControlSlider-module__topLeftAlignment___zjnGM",od="ControlSlider-module__topCenterAlignment___gD1xW",rd="ControlSlider-module__topRightAlignment___NMapS",ad="ControlSlider-module__middleLeftAlignment___OnUrY",sd="ControlSlider-module__middleCenterAlignment___Tdkl0",ld="ControlSlider-module__middleRightAlignment___wEbfX",cd="ControlSlider-module__bottomLeftAlignment___cTP2-",dd="ControlSlider-module__bottomCenterAlignment___c54fB",ud="ControlSlider-module__bottomRightAlignment___kEwrz",pd="ControlSlider-module__clickOverlay___DZA28",md="ControlSlider-module__contain___pLyq7",gd="ControlSlider-module__cover___KdDat",tt={wrapper:Lc,hoverArrow:Ic,sliderItem:Rc,sliderImage:Ec,arrow:Mc,arrowVertical:kc,nextArrow:Pc,arrowInner:Ac,arrowIcon:Fc,arrowImg:Wc,mirror:_c,pagination:Hc,paginationInner:Nc,paginationVertical:Oc,paginationItem:jc,dot:zc,activeDot:Bc,paginationInsideBottom:Dc,paginationInsideTop:Vc,paginationOutsideBottom:Gc,paginationOutsideTop:qc,paginationInsideLeft:Kc,paginationInsideRight:Uc,paginationOutsideLeft:Xc,paginationOutsideRight:Yc,imgWrapper:Zc,captionBlock:Jc,captionTextWrapper:Qc,captionText:ed,active:td,withPointerEvents:nd,topLeftAlignment:id,topCenterAlignment:od,topRightAlignment:rd,middleLeftAlignment:ad,middleCenterAlignment:sd,middleRightAlignment:ld,bottomLeftAlignment:cd,bottomCenterAlignment:dd,bottomRightAlignment:ud,clickOverlay:pd,contain:md,cover:gd};function hd(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 fd(e,t,n){return t&&hd(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Za="(prefers-reduced-motion: reduce)",Ci=1,yd=2,Mi=3,Di=4,bo=5,Ko=6,er=7,vd={CREATED:Ci,MOUNTED:yd,IDLE:Mi,MOVING:Di,SCROLLING:bo,DRAGGING:Ko,DESTROYED:er};function Fn(e){e.length=0}function Xn(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ht(e){return e.bind.apply(e,[null].concat(Xn(arguments,1)))}var dl=setTimeout,ia=function(){};function Ja(e){return requestAnimationFrame(e)}function dr(e,t){return typeof t===e}function ao(e){return!va(e)&&dr("object",e)}var ya=Array.isArray,ul=Ht(dr,"function"),Gn=Ht(dr,"string"),xo=Ht(dr,"undefined");function va(e){return e===null}function pl(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function wo(e){return ya(e)?e:[e]}function yn(e,t){wo(e).forEach(t)}function ba(e,t){return e.indexOf(t)>-1}function Uo(e,t){return e.push.apply(e,wo(t)),e}function En(e,t,n){e&&yn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Tn(e,t){En(e,Gn(t)?t.split(" "):t,!0)}function So(e,t){yn(t,e.appendChild.bind(e))}function xa(e,t){yn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function so(e,t){return pl(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ml(e,t){var n=e?Xn(e.children):[];return t?n.filter(function(i){return so(i,t)}):n}function $o(e,t){return t?ml(e,t)[0]:e.firstElementChild}var lo=Object.keys;function ci(e,t,n){return e&&(n?lo(e).reverse():lo(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function co(e){return Xn(arguments,1).forEach(function(t){ci(t,function(n,i){e[i]=t[i]})}),e}function zn(e){return Xn(arguments,1).forEach(function(t){ci(t,function(n,i){ya(n)?e[i]=n.slice():ao(n)?e[i]=zn({},ao(e[i])?e[i]:{},n):e[i]=n})}),e}function Qa(e,t){yn(t||lo(e),function(n){delete e[n]})}function Ln(e,t){yn(e,function(n){yn(t,function(i){n&&n.removeAttribute(i)})})}function ft(e,t,n){ao(t)?ci(t,function(i,o){ft(e,o,i)}):yn(e,function(i){va(n)||n===""?Ln(i,t):i.setAttribute(t,String(n))})}function Ti(e,t,n){var i=document.createElement(e);return t&&(Gn(t)?Tn(i,t):ft(i,t)),n&&So(n,i),i}function vn(e,t,n){if(xo(n))return getComputedStyle(e)[t];va(n)||(e.style[t]=""+n)}function uo(e,t){vn(e,"display",t)}function gl(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function bn(e,t){return e.getAttribute(t)}function es(e,t){return e&&e.classList.contains(t)}function mn(e){return e.getBoundingClientRect()}function di(e){yn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function hl(e){return $o(new DOMParser().parseFromString(e,"text/html").body)}function Rn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function fl(e,t){return e&&e.querySelector(t)}function wa(e,t){return t?Xn(e.querySelectorAll(t)):[]}function Mn(e,t){En(e,t,!1)}function oa(e){return e.timeStamp}function ti(e){return Gn(e)?e:e?e+"px":""}var Co="splide",Sa="data-"+Co;function to(e,t){if(!e)throw new Error("["+Co+"] "+(t||""))}var qn=Math.min,tr=Math.max,nr=Math.floor,po=Math.ceil,an=Math.abs;function yl(e,t,n){return an(e-t)<n}function Xo(e,t,n,i){var o=qn(t,n),s=tr(t,n);return i?o<e&&e<s:o<=e&&e<=s}function wi(e,t,n){var i=qn(t,n),o=tr(t,n);return qn(tr(i,e),o)}function ra(e){return+(e>0)-+(e<0)}function aa(e,t){return yn(t,function(n){e=e.replace("%s",""+n)}),e}function $a(e){return e<10?"0"+e:""+e}var ts={};function bd(e){return""+e+$a(ts[e]=(ts[e]||0)+1)}function vl(){var e=[];function t(l,d,c,u){o(l,d,function(m,w,S){var T="addEventListener"in m,v=T?m.removeEventListener.bind(m,w,c,u):m.removeListener.bind(m,c);T?m.addEventListener(w,c,u):m.addListener(c),e.push([m,w,S,c,v])})}function n(l,d,c){o(l,d,function(u,m,w){e=e.filter(function(S){return S[0]===u&&S[1]===m&&S[2]===w&&(!c||S[3]===c)?(S[4](),!1):!0})})}function i(l,d,c){var u,m=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:m,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,m,!1,c)),l.dispatchEvent(u),u}function o(l,d,c){yn(l,function(u){u&&yn(d,function(m){m.split(" ").forEach(function(w){var S=w.split(".");c(u,S[0],S[1])})})})}function s(){e.forEach(function(l){l[4]()}),Fn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Yn="mounted",sa="ready",Wn="move",Vi="moved",Ca="click",bl="active",xl="inactive",wl="visible",Sl="hidden",Qt="refresh",on="updated",ki="resize",ur="resized",$l="drag",Cl="dragging",Tl="dragged",pr="scroll",gi="scrolled",xd="overflow",Ta="destroy",Ll="arrows:mounted",Il="arrows:updated",Rl="pagination:mounted",El="pagination:updated",La="navigation:mounted",Ia="autoplay:play",Ml="autoplay:playing",Ra="autoplay:pause",Ea="lazyload:loaded",kl="sk",Pl="sh",ir="ei";function Bt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=vl();function i(s,l){n.bind(t,wo(s).join(" "),function(d){l.apply(l,ya(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Xn(arguments,1))}return e&&e.event.on(Ta,n.destroy),co(n,{bus:t,on:i,off:Ht(n.unbind,t),emit:o})}function mr(e,t,n,i){var o=Date.now,s,l=0,d,c=!0,u=0;function m(){if(!c){if(l=e?qn((o()-s)/e,1):1,n&&n(l),l>=1&&(t(),s=o(),i&&++u>=i))return S();d=Ja(m)}}function w(M){M||v(),s=o()-(M?l*e:0),c=!1,d=Ja(m)}function S(){c=!0}function T(){s=o(),l=0,n&&n(l)}function v(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function C(M){e=M}function x(){return c}return{start:w,rewind:T,pause:S,cancel:v,set:C,isPaused:x}}function wd(e){var t=e;function n(o){t=o}function i(o){return ba(wo(o),t)}return{set:n,is:i}}function Sd(e,t){var n=mr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function $d(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},l=vl(),d=[];function c(){var v=n.mediaQuery==="min";lo(o).sort(function(C,x){return v?+C-+x:+x-+C}).forEach(function(C){m(o[C],"("+(v?"min":"max")+"-width:"+C+"px)")}),m(s,Za),w()}function u(v){v&&l.destroy()}function m(v,C){var x=matchMedia(C);l.bind(x,"change",w),d.push([v,x])}function w(){var v=i.is(er),C=n.direction,x=d.reduce(function(M,L){return zn(M,L[1].matches?L[0]:{})},{});Qa(n),T(x),n.destroy?e.destroy(n.destroy==="completely"):v?(u(!0),e.mount()):C!==n.direction&&e.refresh()}function S(v){matchMedia(Za).matches&&(v?zn(n,s):Qa(n,lo(s)))}function T(v,C,x){zn(n,v),C&&zn(Object.getPrototypeOf(n),v),(x||!i.is(Ci))&&e.emit(on,n)}return{setup:c,destroy:u,reduce:S,set:T}}var gr="Arrow",hr=gr+"Left",fr=gr+"Right",Al=gr+"Up",Fl=gr+"Down",ns="rtl",yr="ttb",kr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Al,fr],ArrowRight:[Fl,hr]};function Cd(e,t,n){function i(s,l,d){d=d||n.direction;var c=d===ns&&!l?1:d===yr?0:-1;return kr[s]&&kr[s][c]||s.replace(/width|left|right/i,function(u,m){var w=kr[u.toLowerCase()][c]||u;return m>0?w.charAt(0).toUpperCase()+w.slice(1):w})}function o(s){return s*(n.direction===ns?1:-1)}return{resolve:i,orient:o}}var kn="role",Li="tabindex",Td="disabled",xn="aria-",To=xn+"controls",Wl=xn+"current",is=xn+"selected",hn=xn+"label",Ma=xn+"labelledby",_l=xn+"hidden",ka=xn+"orientation",mo=xn+"roledescription",os=xn+"live",rs=xn+"busy",as=xn+"atomic",Pa=[kn,Li,Td,To,Wl,hn,Ma,_l,ka,mo],In=Co+"__",Zn="is-",Pr=Co,ss=In+"track",Ld=In+"list",vr=In+"slide",Hl=vr+"--clone",Id=vr+"__container",Aa=In+"arrows",br=In+"arrow",Nl=br+"--prev",Ol=br+"--next",xr=In+"pagination",jl=xr+"__page",Rd=In+"progress",Ed=Rd+"__bar",Md=In+"toggle",kd=In+"spinner",Pd=In+"sr",Ad=Zn+"initialized",ui=Zn+"active",zl=Zn+"prev",Bl=Zn+"next",la=Zn+"visible",ca=Zn+"loading",Dl=Zn+"focus-in",Vl=Zn+"overflow",Fd=[ui,la,zl,Bl,ca,Dl,Vl],Wd={slide:vr,clone:Hl,arrows:Aa,arrow:br,prev:Nl,next:Ol,pagination:xr,page:jl,spinner:kd};function _d(e,t){if(ul(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!so(n,t);)n=n.parentElement;return n}var Hd=5,ls=200,Gl="touchstart mousedown",Ar="touchmove mousemove",Fr="touchend touchcancel mouseup click";function Nd(e,t,n){var i=Bt(e),o=i.on,s=i.bind,l=e.root,d=n.i18n,c={},u=[],m=[],w=[],S,T,v;function C(){R(),J(),L()}function x(){o(Qt,M),o(Qt,C),o(on,L),s(document,Gl+" keydown",function(E){v=E.type==="keydown"},{capture:!0}),s(l,"focusin",function(){En(l,Dl,!!v)})}function M(E){var I=Pa.concat("style");Fn(u),Mn(l,m),Mn(S,w),Ln([S,T],I),Ln(l,E?I:["style",mo])}function L(){Mn(l,m),Mn(S,w),m=ee(Pr),w=ee(ss),Tn(l,m),Tn(S,w),ft(l,hn,n.label),ft(l,Ma,n.labelledby)}function R(){S=A("."+ss),T=$o(S,"."+Ld),to(S&&T,"A track/list element is missing."),Uo(u,ml(T,"."+vr+":not(."+Hl+")")),ci({arrows:Aa,pagination:xr,prev:Nl,next:Ol,bar:Ed,toggle:Md},function(E,I){c[I]=A("."+E)}),co(c,{root:l,track:S,list:T,slides:u})}function J(){var E=l.id||bd(Co),I=n.role;l.id=E,S.id=S.id||E+"-track",T.id=T.id||E+"-list",!bn(l,kn)&&l.tagName!=="SECTION"&&I&&ft(l,kn,I),ft(l,mo,d.carousel),ft(T,kn,"presentation")}function A(E){var I=fl(l,E);return I&&_d(I,"."+Pr)===l?I:void 0}function ee(E){return[E+"--"+n.type,E+"--"+n.direction,n.drag&&E+"--draggable",n.isNavigation&&E+"--nav",E===Pr&&ui]}return co(c,{setup:C,mount:x,destroy:M})}var Pi="slide",Gi="loop",Lo="fade";function Od(e,t,n,i){var o=Bt(e),s=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,m=e.options,w=m.isNavigation,S=m.updateOnMove,T=m.i18n,v=m.pagination,C=m.slideFocus,x=c.Direction.resolve,M=bn(i,"style"),L=bn(i,hn),R=n>-1,J=$o(i,"."+Id),A;function ee(){R||(i.id=u.id+"-slide"+$a(t+1),ft(i,kn,v?"tabpanel":"group"),ft(i,mo,T.slide),ft(i,hn,L||aa(T.slideLabel,[t+1,e.length]))),E()}function E(){d(i,"click",Ht(l,Ca,N)),d(i,"keydown",Ht(l,kl,N)),s([Vi,Pl,gi],b),s(La,F),S&&s(Wn,f)}function I(){A=!0,o.destroy(),Mn(i,Fd),Ln(i,Pa),ft(i,"style",M),ft(i,hn,L||"")}function F(){var _=e.splides.map(function($){var U=$.splide.Components.Slides.getAt(t);return U?U.slide.id:""}).join(" ");ft(i,hn,aa(T.slideX,(R?n:t)+1)),ft(i,To,_),ft(i,kn,C?"button":""),C&&Ln(i,mo)}function f(){A||b()}function b(){if(!A){var _=e.index;W(),O(),En(i,zl,t===_-1),En(i,Bl,t===_+1)}}function W(){var _=G();_!==es(i,ui)&&(En(i,ui,_),ft(i,Wl,w&&_||""),l(_?bl:xl,N))}function O(){var _=Q(),$=!_&&(!G()||R);if(e.state.is([Di,bo])||ft(i,_l,$||""),ft(wa(i,m.focusableNodes||""),Li,$?-1:""),C&&ft(i,Li,$?-1:0),_!==es(i,la)&&(En(i,la,_),l(_?wl:Sl,N)),!_&&document.activeElement===i){var U=c.Slides.getAt(e.index);U&&gl(U.slide)}}function K(_,$,U){vn(U&&J||i,_,$)}function G(){var _=e.index;return _===t||m.cloneStatus&&_===n}function Q(){if(e.is(Lo))return G();var _=mn(c.Elements.track),$=mn(i),U=x("left",!0),X=x("right",!0);return nr(_[U])<=po($[U])&&nr($[X])<=po(_[X])}function V(_,$){var U=an(_-t);return!R&&(m.rewind||e.is(Gi))&&(U=qn(U,e.length-U)),U<=$}var N={index:t,slideIndex:n,slide:i,container:J,isClone:R,mount:ee,destroy:I,update:b,style:K,isWithin:V};return N}function jd(e,t,n){var i=Bt(e),o=i.on,s=i.emit,l=i.bind,d=t.Elements,c=d.slides,u=d.list,m=[];function w(){S(),o(Qt,T),o(Qt,S)}function S(){c.forEach(function(b,W){C(b,W,-1)})}function T(){A(function(b){b.destroy()}),Fn(m)}function v(){A(function(b){b.update()})}function C(b,W,O){var K=Od(e,W,O,b);K.mount(),m.push(K),m.sort(function(G,Q){return G.index-Q.index})}function x(b){return b?ee(function(W){return!W.isClone}):m}function M(b){var W=t.Controller,O=W.toIndex(b),K=W.hasFocus()?1:n.perPage;return ee(function(G){return Xo(G.index,O,O+K-1)})}function L(b){return ee(b)[0]}function R(b,W){yn(b,function(O){if(Gn(O)&&(O=hl(O)),pl(O)){var K=c[W];K?xa(O,K):So(u,O),Tn(O,n.classes.slide),I(O,Ht(s,ki))}}),s(Qt)}function J(b){di(ee(b).map(function(W){return W.slide})),s(Qt)}function A(b,W){x(W).forEach(b)}function ee(b){return m.filter(ul(b)?b:function(W){return Gn(b)?so(W.slide,b):ba(wo(b),W.index)})}function E(b,W,O){A(function(K){K.style(b,W,O)})}function I(b,W){var O=wa(b,"img"),K=O.length;K?O.forEach(function(G){l(G,"load error",function(){--K||W()})}):W()}function F(b){return b?c.length:m.length}function f(){return m.length>n.perPage}return{mount:w,destroy:T,update:v,register:C,get:x,getIn:M,getAt:L,add:R,remove:J,forEach:A,filter:ee,style:E,getLength:F,isEnough:f}}function zd(e,t,n){var i=Bt(e),o=i.on,s=i.bind,l=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,m=u.root,w=u.track,S=u.list,T=d.getAt,v=d.style,C,x,M;function L(){R(),s(window,"resize load",Sd(Ht(l,ki))),o([on,Qt],R),o(ki,J)}function R(){C=n.direction===yr,vn(m,"maxWidth",ti(n.width)),vn(w,c("paddingLeft"),A(!1)),vn(w,c("paddingRight"),A(!0)),J(!0)}function J(N){var _=mn(m);(N||x.width!==_.width||x.height!==_.height)&&(vn(w,"height",ee()),v(c("marginRight"),ti(n.gap)),v("width",I()),v("height",F(),!0),x=_,l(ur),M!==(M=V())&&(En(m,Vl,M),l(xd,M)))}function A(N){var _=n.padding,$=c(N?"right":"left");return _&&ti(_[$]||(ao(_)?0:_))||"0px"}function ee(){var N="";return C&&(N=E(),to(N,"height or heightRatio is missing."),N="calc("+N+" - "+A(!1)+" - "+A(!0)+")"),N}function E(){return ti(n.height||mn(S).width*n.heightRatio)}function I(){return n.autoWidth?null:ti(n.fixedWidth)||(C?"":f())}function F(){return ti(n.fixedHeight)||(C?n.autoHeight?null:f():E())}function f(){var N=ti(n.gap);return"calc((100%"+(N&&" + "+N)+")/"+(n.perPage||1)+(N&&" - "+N)+")"}function b(){return mn(S)[c("width")]}function W(N,_){var $=T(N||0);return $?mn($.slide)[c("width")]+(_?0:G()):0}function O(N,_){var $=T(N);if($){var U=mn($.slide)[c("right")],X=mn(S)[c("left")];return an(U-X)+(_?0:G())}return 0}function K(N){return O(e.length-1)-O(0)+W(0,N)}function G(){var N=T(0);return N&&parseFloat(vn(N.slide,c("marginRight")))||0}function Q(N){return parseFloat(vn(w,c("padding"+(N?"Right":"Left"))))||0}function V(){return e.is(Lo)||K(!0)>b()}return{mount:L,resize:J,listSize:b,slideSize:W,sliderSize:K,totalSize:O,getPadding:Q,isOverflow:V}}var Bd=2;function Dd(e,t,n){var i=Bt(e),o=i.on,s=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function m(){o(Qt,w),o([on,ki],T),(u=x())&&(v(u),t.Layout.resize(!0))}function w(){S(),m()}function S(){di(c),Fn(c),i.destroy()}function T(){var M=x();u!==M&&(u<M||!M)&&i.emit(Qt)}function v(M){var L=l.get().slice(),R=L.length;if(R){for(;L.length<M;)Uo(L,L);Uo(L.slice(-M),L.slice(0,M)).forEach(function(J,A){var ee=A<M,E=C(J.slide,A);ee?xa(E,L[0].slide):So(s.list,E),Uo(c,E),l.register(E,A-M+(ee?0:R),J.index)})}}function C(M,L){var R=M.cloneNode(!0);return Tn(R,n.classes.clone),R.id=e.root.id+"-clone"+$a(L+1),R}function x(){var M=n.clones;if(!e.is(Gi))M=0;else if(xo(M)){var L=n[d("fixedWidth")]&&t.Layout.slideSize(0),R=L&&po(mn(s.track)[d("width")]/L);M=R||n[d("autoWidth")]&&e.length||n.perPage*Bd}return M}return{mount:m,destroy:S}}function Vd(e,t,n){var i=Bt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,m=d.totalSize,w=d.listSize,S=d.sliderSize,T=t.Direction,v=T.resolve,C=T.orient,x=t.Elements,M=x.list,L=x.track,R;function J(){R=t.Transition,o([Yn,ur,on,Qt],A)}function A(){t.Controller.isBusy()||(t.Scroll.cancel(),E(e.index),t.Slides.update())}function ee($,U,X,ce){$!==U&&N($>X)&&(b(),I(f(K(),$>X),!0)),l(Di),s(Wn,U,X,$),R.start(U,function(){l(Mi),s(Vi,U,X,$),ce&&ce()})}function E($){I(O($,!0))}function I($,U){if(!e.is(Lo)){var X=U?$:F($);vn(M,"transform","translate"+v("X")+"("+X+"px)"),$!==X&&s(Pl)}}function F($){if(e.is(Gi)){var U=W($),X=U>t.Controller.getEnd(),ce=U<0;(ce||X)&&($=f($,X))}return $}function f($,U){var X=$-V(U),ce=S();return $-=C(ce*(po(an(X)/ce)||1))*(U?1:-1),$}function b(){I(K(),!0),R.cancel()}function W($){for(var U=t.Slides.get(),X=0,ce=1/0,j=0;j<U.length;j++){var ge=U[j].index,h=an(O(ge,!0)-$);if(h<=ce)ce=h,X=ge;else break}return X}function O($,U){var X=C(m($-1)-Q($));return U?G(X):X}function K(){var $=v("left");return mn(M)[$]-mn(L)[$]+C(u(!1))}function G($){return n.trimSpace&&e.is(Pi)&&($=wi($,0,C(S(!0)-w()))),$}function Q($){var U=n.focus;return U==="center"?(w()-c($,!0))/2:+U*c($)||0}function V($){return O($?t.Controller.getEnd():0,!!n.trimSpace)}function N($){var U=C(f(K(),$));return $?U>=0:U<=M[v("scrollWidth")]-mn(L)[v("width")]}function _($,U){U=xo(U)?K():U;var X=$!==!0&&C(U)<C(V(!1)),ce=$!==!1&&C(U)>C(V(!0));return X||ce}return{mount:J,move:ee,jump:E,translate:I,shift:f,cancel:b,toIndex:W,toPosition:O,getPosition:K,getLimit:V,exceededLimit:_,reposition:A}}function Gd(e,t,n){var i=Bt(e),o=i.on,s=i.emit,l=t.Move,d=l.getPosition,c=l.getLimit,u=l.toPosition,m=t.Slides,w=m.isEnough,S=m.getLength,T=n.omitEnd,v=e.is(Gi),C=e.is(Pi),x=Ht(K,!1),M=Ht(K,!0),L=n.start||0,R,J=L,A,ee,E;function I(){F(),o([on,Qt,ir],F),o(ur,f)}function F(){A=S(!0),ee=n.perMove,E=n.perPage,R=N();var h=wi(L,0,T?R:A-1);h!==L&&(L=h,l.reposition())}function f(){R!==N()&&s(ir)}function b(h,he,Y){if(!ge()){var be=O(h),Ce=V(be);Ce>-1&&(he||Ce!==L)&&(X(Ce),l.move(be,Ce,J,Y))}}function W(h,he,Y,be){t.Scroll.scroll(h,he,Y,function(){var Ce=V(l.toIndex(d()));X(T?qn(Ce,R):Ce),be&&be()})}function O(h){var he=L;if(Gn(h)){var Y=h.match(/([+\-<>])(\d+)?/)||[],be=Y[1],Ce=Y[2];be==="+"||be==="-"?he=G(L+ +(""+be+(+Ce||1)),L):be===">"?he=Ce?_(+Ce):x(!0):be==="<"&&(he=M(!0))}else he=v?h:wi(h,0,R);return he}function K(h,he){var Y=ee||(j()?1:E),be=G(L+Y*(h?-1:1),L,!(ee||j()));return be===-1&&C&&!yl(d(),c(!h),1)?h?0:R:he?be:V(be)}function G(h,he,Y){if(w()||j()){var be=Q(h);be!==h&&(he=h,h=be,Y=!1),h<0||h>R?!ee&&(Xo(0,h,he,!0)||Xo(R,he,h,!0))?h=_($(h)):v?h=Y?h<0?-(A%E||E):A:h:n.rewind?h=h<0?R:0:h=-1:Y&&h!==he&&(h=_($(he)+(h<he?-1:1)))}else h=-1;return h}function Q(h){if(C&&n.trimSpace==="move"&&h!==L)for(var he=d();he===u(h,!0)&&Xo(h,0,e.length-1,!n.rewind);)h<L?--h:++h;return h}function V(h){return v?(h+A)%A||0:h}function N(){for(var h=A-(j()||v&&ee?1:E);T&&h-- >0;)if(u(A-1,!0)!==u(h,!0)){h++;break}return wi(h,0,A-1)}function _(h){return wi(j()?h:E*h,0,R)}function $(h){return j()?qn(h,R):nr((h>=R?A-1:h)/E)}function U(h){var he=l.toIndex(h);return C?wi(he,0,R):he}function X(h){h!==L&&(J=L,L=h)}function ce(h){return h?J:L}function j(){return!xo(n.focus)||n.isNavigation}function ge(){return e.state.is([Di,bo])&&!!n.waitForTransition}return{mount:I,go:b,scroll:W,getNext:x,getPrev:M,getAdjacent:K,getEnd:N,setIndex:X,getIndex:ce,toIndex:_,toPage:$,toDest:U,hasFocus:j,isBusy:ge}}var qd="http://www.w3.org/2000/svg",Kd="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",Po=40;function Ud(e,t,n){var i=Bt(e),o=i.on,s=i.bind,l=i.emit,d=n.classes,c=n.i18n,u=t.Elements,m=t.Controller,w=u.arrows,S=u.track,T=w,v=u.prev,C=u.next,x,M,L={};function R(){A(),o(on,J)}function J(){ee(),R()}function A(){var W=n.arrows;W&&!(v&&C)&&F(),v&&C&&(co(L,{prev:v,next:C}),uo(T,W?"":"none"),Tn(T,M=Aa+"--"+n.direction),W&&(E(),b(),ft([v,C],To,S.id),l(Ll,v,C)))}function ee(){i.destroy(),Mn(T,M),x?(di(w?[v,C]:T),v=C=null):Ln([v,C],Pa)}function E(){o([Yn,Vi,Qt,gi,ir],b),s(C,"click",Ht(I,">")),s(v,"click",Ht(I,"<"))}function I(W){m.go(W,!0)}function F(){T=w||Ti("div",d.arrows),v=f(!0),C=f(!1),x=!0,So(T,[v,C]),!w&&xa(T,S)}function f(W){var O='<button class="'+d.arrow+" "+(W?d.prev:d.next)+'" type="button"><svg xmlns="'+qd+'" viewBox="0 0 '+Po+" "+Po+'" width="'+Po+'" height="'+Po+'" focusable="false"><path d="'+(n.arrowPath||Kd)+'" />';return hl(O)}function b(){if(v&&C){var W=e.index,O=m.getPrev(),K=m.getNext(),G=O>-1&&W<O?c.last:c.prev,Q=K>-1&&W>K?c.first:c.next;v.disabled=O<0,C.disabled=K<0,ft(v,hn,G),ft(C,hn,Q),l(Il,v,C,O,K)}}return{arrows:L,mount:R,destroy:ee,update:b}}var Xd=Sa+"-interval";function Yd(e,t,n){var i=Bt(e),o=i.on,s=i.bind,l=i.emit,d=mr(n.interval,e.go.bind(e,">"),E),c=d.isPaused,u=t.Elements,m=t.Elements,w=m.root,S=m.toggle,T=n.autoplay,v,C,x=T==="pause";function M(){T&&(L(),S&&ft(S,To,u.track.id),x||R(),ee())}function L(){n.pauseOnHover&&s(w,"mouseenter mouseleave",function(F){v=F.type==="mouseenter",A()}),n.pauseOnFocus&&s(w,"focusin focusout",function(F){C=F.type==="focusin",A()}),S&&s(S,"click",function(){x?R():J(!0)}),o([Wn,pr,Qt],d.rewind),o(Wn,I)}function R(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),C=v=x=!1,ee(),l(Ia))}function J(F){F===void 0&&(F=!0),x=!!F,ee(),c()||(d.pause(),l(Ra))}function A(){x||(v||C?J(!1):R())}function ee(){S&&(En(S,ui,!x),ft(S,hn,n.i18n[x?"play":"pause"]))}function E(F){var f=u.bar;f&&vn(f,"width",F*100+"%"),l(Ml,F)}function I(F){var f=t.Slides.getAt(F);d.set(f&&+bn(f.slide,Xd)||n.interval)}return{mount:M,destroy:d.cancel,play:R,pause:J,isPaused:c}}function Zd(e,t,n){var i=Bt(e),o=i.on;function s(){n.cover&&(o(Ea,Ht(d,!0)),o([Yn,on,Qt],Ht(l,!0)))}function l(c){t.Slides.forEach(function(u){var m=$o(u.container||u.slide,"img");m&&m.src&&d(c,m,u)})}function d(c,u,m){m.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),uo(u,c?"none":"")}return{mount:s,destroy:Ht(l,!1)}}var Jd=10,Qd=600,eu=.6,tu=1.5,nu=800;function iu(e,t,n){var i=Bt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,m=d.exceededLimit,w=d.translate,S=e.is(Pi),T,v,C=1;function x(){o(Wn,J),o([on,Qt],A)}function M(E,I,F,f,b){var W=c();if(J(),F&&(!S||!m())){var O=t.Layout.sliderSize(),K=ra(E)*O*nr(an(E)/O)||0;E=d.toPosition(t.Controller.toDest(E%O))+K}var G=yl(W,E,1);C=1,I=G?0:I||tr(an(E-W)/tu,nu),v=f,T=mr(I,L,Ht(R,W,E,b),1),l(bo),s(pr),T.start()}function L(){l(Mi),v&&v(),s(gi)}function R(E,I,F,f){var b=c(),W=E+(I-E)*ee(f),O=(W-b)*C;w(b+O),S&&!F&&m()&&(C*=eu,an(O)<Jd&&M(u(m(!0)),Qd,!1,v,!0))}function J(){T&&T.cancel()}function A(){T&&!T.isPaused()&&(J(),L())}function ee(E){var I=n.easingFunc;return I?I(E):1-Math.pow(1-E,4)}return{mount:x,destroy:J,scroll:M,cancel:A}}var Si={passive:!1,capture:!0};function ou(e,t,n){var i=Bt(e),o=i.on,s=i.emit,l=i.bind,d=i.unbind,c=e.state,u=t.Move,m=t.Scroll,w=t.Controller,S=t.Elements.track,T=t.Media.reduce,v=t.Direction,C=v.resolve,x=v.orient,M=u.getPosition,L=u.exceededLimit,R,J,A,ee,E,I=!1,F,f,b;function W(){l(S,Ar,ia,Si),l(S,Fr,ia,Si),l(S,Gl,K,Si),l(S,"click",V,{capture:!0}),l(S,"dragstart",Rn),o([Yn,on],O)}function O(){var D=n.drag;re(!D),ee=D==="free"}function K(D){if(F=!1,!f){var se=Ce(D);be(D.target)&&(se||!D.button)&&(w.isBusy()?Rn(D,!0):(b=se?S:window,E=c.is([Di,bo]),A=null,l(b,Ar,G,Si),l(b,Fr,Q,Si),u.cancel(),m.cancel(),N(D)))}}function G(D){if(c.is(Ko)||(c.set(Ko),s($l)),D.cancelable)if(E){u.translate(R+Y(j(D)));var se=ge(D)>ls,ue=I!==(I=L());(se||ue)&&N(D),F=!0,s(Cl),Rn(D)}else U(D)&&(E=$(D),Rn(D))}function Q(D){c.is(Ko)&&(c.set(Mi),s(Tl)),E&&(_(D),Rn(D)),d(b,Ar,G),d(b,Fr,Q),E=!1}function V(D){!f&&F&&Rn(D,!0)}function N(D){A=J,J=D,R=M()}function _(D){var se=X(D),ue=ce(se),_e=n.rewind&&n.rewindByDrag;T(!1),ee?w.scroll(ue,0,n.snap):e.is(Lo)?w.go(x(ra(se))<0?_e?"<":"-":_e?">":"+"):e.is(Pi)&&I&&_e?w.go(L(!0)?">":"<"):w.go(w.toDest(ue),!0),T(!0)}function $(D){var se=n.dragMinThreshold,ue=ao(se),_e=ue&&se.mouse||0,xe=(ue?se.touch:+se)||10;return an(j(D))>(Ce(D)?xe:_e)}function U(D){return an(j(D))>an(j(D,!0))}function X(D){if(e.is(Gi)||!I){var se=ge(D);if(se&&se<ls)return j(D)/se}return 0}function ce(D){return M()+ra(D)*qn(an(D)*(n.flickPower||600),ee?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function j(D,se){return he(D,se)-he(h(D),se)}function ge(D){return oa(D)-oa(h(D))}function h(D){return J===D&&A||J}function he(D,se){return(Ce(D)?D.changedTouches[0]:D)["page"+C(se?"Y":"X")]}function Y(D){return D/(I&&e.is(Pi)?Hd:1)}function be(D){var se=n.noDrag;return!so(D,"."+jl+", ."+br)&&(!se||!so(D,se))}function Ce(D){return typeof TouchEvent<"u"&&D instanceof TouchEvent}function le(){return E}function re(D){f=D}return{mount:W,disable:re,isDragging:le}}var ru={Spacebar:" ",Right:fr,Left:hr,Up:Al,Down:Fl};function Fa(e){return e=Gn(e)?e:e.key,ru[e]||e}var cs="keydown";function au(e,t,n){var i=Bt(e),o=i.on,s=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,m;function w(){S(),o(on,T),o(on,S),o(Wn,C)}function S(){var M=n.keyboard;M&&(u=M==="global"?window:d,s(u,cs,x))}function T(){l(u,cs)}function v(M){m=M}function C(){var M=m;m=!0,dl(function(){m=M})}function x(M){if(!m){var L=Fa(M);L===c(hr)?e.go("<"):L===c(fr)&&e.go(">")}}return{mount:w,destroy:T,disable:v}}var no=Sa+"-lazy",Yo=no+"-srcset",su="["+no+"], ["+Yo+"]";function lu(e,t,n){var i=Bt(e),o=i.on,s=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[Vi,gi],m=[];function w(){n.lazyLoad&&(S(),o(Qt,S))}function S(){Fn(m),T(),c?M():(s(u),o(u,v),v())}function T(){t.Slides.forEach(function(L){wa(L.slide,su).forEach(function(R){var J=bn(R,no),A=bn(R,Yo);if(J!==R.src||A!==R.srcset){var ee=n.classes.spinner,E=R.parentElement,I=$o(E,"."+ee)||Ti("span",ee,E);m.push([R,L,I]),R.src||uo(R,"none")}})})}function v(){m=m.filter(function(L){var R=n.perPage*((n.preloadPages||1)+1)-1;return L[1].isWithin(e.index,R)?C(L):!0}),m.length||s(u)}function C(L){var R=L[0];Tn(L[1].slide,ca),l(R,"load error",Ht(x,L)),ft(R,"src",bn(R,no)),ft(R,"srcset",bn(R,Yo)),Ln(R,no),Ln(R,Yo)}function x(L,R){var J=L[0],A=L[1];Mn(A.slide,ca),R.type!=="error"&&(di(L[2]),uo(J,""),d(Ea,J,A),d(ki)),c&&M()}function M(){m.length&&C(m.shift())}return{mount:w,destroy:Ht(Fn,m),check:v}}function cu(e,t,n){var i=Bt(e),o=i.on,s=i.emit,l=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,m=u.hasFocus,w=u.getIndex,S=u.go,T=t.Direction.resolve,v=c.pagination,C=[],x,M;function L(){R(),o([on,Qt,ir],L);var f=n.pagination;v&&uo(v,f?"":"none"),f&&(o([Wn,pr,gi],F),J(),F(),s(Rl,{list:x,items:C},I(e.index)))}function R(){x&&(di(v?Xn(x.children):x),Mn(x,M),Fn(C),x=null),i.destroy()}function J(){var f=e.length,b=n.classes,W=n.i18n,O=n.perPage,K=m()?u.getEnd()+1:po(f/O);x=v||Ti("ul",b.pagination,c.track.parentElement),Tn(x,M=xr+"--"+E()),ft(x,kn,"tablist"),ft(x,hn,W.select),ft(x,ka,E()===yr?"vertical":"");for(var G=0;G<K;G++){var Q=Ti("li",null,x),V=Ti("button",{class:b.page,type:"button"},Q),N=d.getIn(G).map(function($){return $.slide.id}),_=!m()&&O>1?W.pageX:W.slideX;l(V,"click",Ht(A,G)),n.paginationKeyboard&&l(V,"keydown",Ht(ee,G)),ft(Q,kn,"presentation"),ft(V,kn,"tab"),ft(V,To,N.join(" ")),ft(V,hn,aa(_,G+1)),ft(V,Li,-1),C.push({li:Q,button:V,page:G})}}function A(f){S(">"+f,!0)}function ee(f,b){var W=C.length,O=Fa(b),K=E(),G=-1;O===T(fr,!1,K)?G=++f%W:O===T(hr,!1,K)?G=(--f+W)%W:O==="Home"?G=0:O==="End"&&(G=W-1);var Q=C[G];Q&&(gl(Q.button),S(">"+G),Rn(b,!0))}function E(){return n.paginationDirection||n.direction}function I(f){return C[u.toPage(f)]}function F(){var f=I(w(!0)),b=I(w());if(f){var W=f.button;Mn(W,ui),Ln(W,is),ft(W,Li,-1)}if(b){var O=b.button;Tn(O,ui),ft(O,is,!0),ft(O,Li,"")}s(El,{list:x,items:C},f,b)}return{items:C,mount:L,destroy:R,getAt:I,update:F}}var du=[" ","Enter"];function uu(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function l(){e.splides.forEach(function(v){v.isParent||(u(e,v.splide),u(v.splide,e))}),i&&m()}function d(){s.forEach(function(v){v.destroy()}),Fn(s)}function c(){d(),l()}function u(v,C){var x=Bt(v);x.on(Wn,function(M,L,R){C.go(C.is(Gi)?R:M)}),s.push(x)}function m(){var v=Bt(e),C=v.on;C(Ca,S),C(kl,T),C([Yn,on],w),s.push(v),v.emit(La,e.splides)}function w(){ft(t.Elements.list,ka,n.direction===yr?"vertical":"")}function S(v){e.go(v.index)}function T(v,C){ba(du,Fa(C))&&(S(v),Rn(C))}return{setup:Ht(t.Media.set,{slideFocus:xo(o)?i:o},!0),mount:l,destroy:d,remount:c}}function pu(e,t,n){var i=Bt(e),o=i.bind,s=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,Si)}function d(u){if(u.cancelable){var m=u.deltaY,w=m<0,S=oa(u),T=n.wheelMinThreshold||0,v=n.wheelSleep||0;an(m)>T&&S-s>v&&(e.go(w?"<":">"),s=S),c(w)&&Rn(u)}}function c(u){return!n.releaseWheel||e.state.is(Di)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var mu=90;function gu(e,t,n){var i=Bt(e),o=i.on,s=t.Elements.track,l=n.live&&!n.isNavigation,d=Ti("span",Pd),c=mr(mu,Ht(m,!1));function u(){l&&(S(!t.Autoplay.isPaused()),ft(s,as,!0),d.textContent="…",o(Ia,Ht(S,!0)),o(Ra,Ht(S,!1)),o([Vi,gi],Ht(m,!0)))}function m(T){ft(s,rs,T),T?(So(s,d),c.start()):(di(d),c.cancel())}function w(){Ln(s,[os,as,rs]),di(d)}function S(T){l&&ft(s,os,T?"off":"polite")}return{mount:u,disable:S,destroy:w}}var hu=Object.freeze({__proto__:null,Media:$d,Direction:Cd,Elements:Nd,Slides:jd,Layout:zd,Clones:Dd,Move:Vd,Controller:Gd,Arrows:Ud,Autoplay:Yd,Cover:Zd,Scroll:iu,Drag:ou,Keyboard:au,LazyLoad:lu,Pagination:cu,Sync:uu,Wheel:pu,Live:gu}),fu={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"},yu={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:Wd,i18n:fu,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function vu(e,t,n){var i=t.Slides;function o(){Bt(e).on([Yn,Qt],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function l(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),dl(c)}return{mount:o,start:l,cancel:ia}}function bu(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,l=t.Elements.list,d=Ht(vn,l,"transition"),c;function u(){Bt(e).bind(l,"transitionend",function(T){T.target===l&&c&&(w(),c())})}function m(T,v){var C=i.toPosition(T,!0),x=i.getPosition(),M=S(T);an(C-x)>=1&&M>=1?n.useScroll?s.scroll(C,M,!1,v):(d("transform "+M+"ms "+n.easing),i.translate(C,!0),c=v):(i.jump(T),v())}function w(){d(""),s.cancel()}function S(T){var v=n.rewindSpeed;if(e.is(Pi)&&v){var C=o.getIndex(!0),x=o.getEnd();if(C===0&&T>=x||C>=x&&T===0)return v}return n.speed}return{mount:u,start:m,cancel:w}}var xu=(function(){function e(n,i){this.event=Bt(),this.Components={},this.state=wd(Ci),this.splides=[],this._o={},this._E={};var o=Gn(n)?fl(document,n):n;to(o,o+" is invalid."),this.root=o,i=zn({label:bn(o,hn)||"",labelledby:bn(o,Ma)||""},yu,e.defaults,i||{});try{zn(i,JSON.parse(bn(o,Sa)))}catch{to(!1,"Invalid JSON")}this._o=Object.create(zn({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,l=this.state,d=this.Components;to(l.is([Ci,er]),"Already mounted!"),l.set(Ci),this._C=d,this._T=o||this._T||(this.is(Lo)?vu:bu),this._E=i||this._E;var c=co({},hu,this._E,{Transition:this._T});return ci(c,function(u,m){var w=u(s,d,s._o);d[m]=w,w.setup&&w.setup()}),ci(d,function(u){u.mount&&u.mount()}),this.emit(Yn),Tn(this.root,Ad),l.set(Mi),this.emit(sa),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Mi)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(Xn(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(Qt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(Ci)?Bt(this).on(sa,this.destroy.bind(this,i)):(ci(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(Ta),o.destroy(),i&&Fn(this.splides),s.set(er)),this},fd(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})(),Wa=xu;Wa.defaults={};Wa.STATES=vd;var ds=[[Yn,"onMounted"],[sa,"onReady"],[Wn,"onMove"],[Vi,"onMoved"],[Ca,"onClick"],[bl,"onActive"],[xl,"onInactive"],[wl,"onVisible"],[Sl,"onHidden"],[Qt,"onRefresh"],[on,"onUpdated"],[ki,"onResize"],[ur,"onResized"],[$l,"onDrag"],[Cl,"onDragging"],[Tl,"onDragged"],[pr,"onScroll"],[gi,"onScrolled"],[Ta,"onDestroy"],[Ll,"onArrowsMounted"],[Il,"onArrowsUpdated"],[Rl,"onPaginationMounted"],[El,"onPaginationUpdated"],[La,"onNavigationMounted"],[Ia,"onAutoplayPlay"],[Ml,"onAutoplayPlaying"],[Ra,"onAutoplayPause"],[Ea,"onLazyLoadLoaded"]];function _a(...e){return e.filter(Boolean).join(" ")}function or(e){return e!==null&&typeof e=="object"}function da(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!da(n,t[i]));if(or(e)&&or(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!da(e[o],t[o]))}return e===t}function wu(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function Su(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 ua(e,t){const n=e;return Su(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():or(i)?n[o]=ua(or(n[o])?n[o]:{},i):n[o]=i}),n}var $u=({children:e,className:t,...n})=>a.createElement("div",{className:_a("splide__track",t),...n},a.createElement("ul",{className:"splide__list"},e)),Ha=class extends a.Component{constructor(){super(...arguments),this.splideRef=a.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Wa(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=ua({},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&&!da(this.options,e)&&(this.splide.options=e,this.options=ua({},e));const t=this.getSlides();wu(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){ds.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return a.createElement(t,{className:_a("splide",e),ref:this.splideRef,...this.omit(o,["options",...ds.map(s=>s[1])])},n?a.createElement($u,null,i):i)}},Na=({children:e,className:t,...n})=>a.createElement("li",{className:_a("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),ct=require("classnames"),y=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),mi=require("react-dom");function Tc(e){return e.type==="object"&&e.version===1}const Lc="ControlSlider-module__wrapper___sHEkd",Ic="ControlSlider-module__hoverArrow___A-dOH",Rc="ControlSlider-module__sliderItem___QQSkR",Ec="ControlSlider-module__sliderImage___9hRl-",Mc="ControlSlider-module__arrow___05ghY",kc="ControlSlider-module__arrowVertical___tBfVN",Pc="ControlSlider-module__nextArrow___-30Yc",Ac="ControlSlider-module__arrowInner___aEra3",Fc="ControlSlider-module__arrowIcon___S4ztF",Wc="ControlSlider-module__arrowImg___2dwJW",_c="ControlSlider-module__mirror___brd6U",Hc="ControlSlider-module__pagination___bicLF",Nc="ControlSlider-module__paginationInner___bT-P-",Oc="ControlSlider-module__paginationVertical___zYqKw",jc="ControlSlider-module__paginationItem___nTRbk",zc="ControlSlider-module__dot___p1Qun",Bc="ControlSlider-module__activeDot___LHFaj",Dc="ControlSlider-module__paginationInsideBottom___R3FWn",Vc="ControlSlider-module__paginationInsideTop___V-qb-",Gc="ControlSlider-module__paginationOutsideBottom___14w8D",qc="ControlSlider-module__paginationOutsideTop___SCLqB",Kc="ControlSlider-module__paginationInsideLeft___yOBRZ",Uc="ControlSlider-module__paginationInsideRight___Rtt3o",Xc="ControlSlider-module__paginationOutsideLeft___lahaw",Yc="ControlSlider-module__paginationOutsideRight___EtuQa",Zc="ControlSlider-module__imgWrapper___UjEgB",Jc="ControlSlider-module__captionBlock___dJ6-j",Qc="ControlSlider-module__captionTextWrapper___HFlpf",ed="ControlSlider-module__captionText___uGBVc",td="ControlSlider-module__active___WZK4G",nd="ControlSlider-module__withPointerEvents___t-18M",id="ControlSlider-module__topLeftAlignment___zjnGM",od="ControlSlider-module__topCenterAlignment___gD1xW",rd="ControlSlider-module__topRightAlignment___NMapS",ad="ControlSlider-module__middleLeftAlignment___OnUrY",sd="ControlSlider-module__middleCenterAlignment___Tdkl0",ld="ControlSlider-module__middleRightAlignment___wEbfX",cd="ControlSlider-module__bottomLeftAlignment___cTP2-",dd="ControlSlider-module__bottomCenterAlignment___c54fB",ud="ControlSlider-module__bottomRightAlignment___kEwrz",pd="ControlSlider-module__clickOverlay___DZA28",md="ControlSlider-module__contain___pLyq7",gd="ControlSlider-module__cover___KdDat",ot={wrapper:Lc,hoverArrow:Ic,sliderItem:Rc,sliderImage:Ec,arrow:Mc,arrowVertical:kc,nextArrow:Pc,arrowInner:Ac,arrowIcon:Fc,arrowImg:Wc,mirror:_c,pagination:Hc,paginationInner:Nc,paginationVertical:Oc,paginationItem:jc,dot:zc,activeDot:Bc,paginationInsideBottom:Dc,paginationInsideTop:Vc,paginationOutsideBottom:Gc,paginationOutsideTop:qc,paginationInsideLeft:Kc,paginationInsideRight:Uc,paginationOutsideLeft:Xc,paginationOutsideRight:Yc,imgWrapper:Zc,captionBlock:Jc,captionTextWrapper:Qc,captionText:ed,active:td,withPointerEvents:nd,topLeftAlignment:id,topCenterAlignment:od,topRightAlignment:rd,middleLeftAlignment:ad,middleCenterAlignment:sd,middleRightAlignment:ld,bottomLeftAlignment:cd,bottomCenterAlignment:dd,bottomRightAlignment:ud,clickOverlay:pd,contain:md,cover:gd};function hd(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 fd(e,t,n){return t&&hd(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Za="(prefers-reduced-motion: reduce)",Ci=1,yd=2,Mi=3,Di=4,bo=5,Ko=6,er=7,vd={CREATED:Ci,MOUNTED:yd,IDLE:Mi,MOVING:Di,SCROLLING:bo,DRAGGING:Ko,DESTROYED:er};function Fn(e){e.length=0}function Xn(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ht(e){return e.bind.apply(e,[null].concat(Xn(arguments,1)))}var dl=setTimeout,ia=function(){};function Ja(e){return requestAnimationFrame(e)}function dr(e,t){return typeof t===e}function ao(e){return!va(e)&&dr("object",e)}var ya=Array.isArray,ul=Ht(dr,"function"),Gn=Ht(dr,"string"),xo=Ht(dr,"undefined");function va(e){return e===null}function pl(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function wo(e){return ya(e)?e:[e]}function yn(e,t){wo(e).forEach(t)}function ba(e,t){return e.indexOf(t)>-1}function Uo(e,t){return e.push.apply(e,wo(t)),e}function En(e,t,n){e&&yn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Tn(e,t){En(e,Gn(t)?t.split(" "):t,!0)}function So(e,t){yn(t,e.appendChild.bind(e))}function xa(e,t){yn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function so(e,t){return pl(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ml(e,t){var n=e?Xn(e.children):[];return t?n.filter(function(i){return so(i,t)}):n}function $o(e,t){return t?ml(e,t)[0]:e.firstElementChild}var lo=Object.keys;function ci(e,t,n){return e&&(n?lo(e).reverse():lo(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function co(e){return Xn(arguments,1).forEach(function(t){ci(t,function(n,i){e[i]=t[i]})}),e}function zn(e){return Xn(arguments,1).forEach(function(t){ci(t,function(n,i){ya(n)?e[i]=n.slice():ao(n)?e[i]=zn({},ao(e[i])?e[i]:{},n):e[i]=n})}),e}function Qa(e,t){yn(t||lo(e),function(n){delete e[n]})}function Ln(e,t){yn(e,function(n){yn(t,function(i){n&&n.removeAttribute(i)})})}function yt(e,t,n){ao(t)?ci(t,function(i,o){yt(e,o,i)}):yn(e,function(i){va(n)||n===""?Ln(i,t):i.setAttribute(t,String(n))})}function Ti(e,t,n){var i=document.createElement(e);return t&&(Gn(t)?Tn(i,t):yt(i,t)),n&&So(n,i),i}function vn(e,t,n){if(xo(n))return getComputedStyle(e)[t];va(n)||(e.style[t]=""+n)}function uo(e,t){vn(e,"display",t)}function gl(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function bn(e,t){return e.getAttribute(t)}function es(e,t){return e&&e.classList.contains(t)}function mn(e){return e.getBoundingClientRect()}function di(e){yn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function hl(e){return $o(new DOMParser().parseFromString(e,"text/html").body)}function Rn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function fl(e,t){return e&&e.querySelector(t)}function wa(e,t){return t?Xn(e.querySelectorAll(t)):[]}function Mn(e,t){En(e,t,!1)}function oa(e){return e.timeStamp}function ti(e){return Gn(e)?e:e?e+"px":""}var Co="splide",Sa="data-"+Co;function no(e,t){if(!e)throw new Error("["+Co+"] "+(t||""))}var qn=Math.min,tr=Math.max,nr=Math.floor,po=Math.ceil,an=Math.abs;function yl(e,t,n){return an(e-t)<n}function Xo(e,t,n,i){var o=qn(t,n),s=tr(t,n);return i?o<e&&e<s:o<=e&&e<=s}function wi(e,t,n){var i=qn(t,n),o=tr(t,n);return qn(tr(i,e),o)}function ra(e){return+(e>0)-+(e<0)}function aa(e,t){return yn(t,function(n){e=e.replace("%s",""+n)}),e}function $a(e){return e<10?"0"+e:""+e}var ts={};function bd(e){return""+e+$a(ts[e]=(ts[e]||0)+1)}function vl(){var e=[];function t(l,d,c,u){o(l,d,function(m,w,S){var T="addEventListener"in m,v=T?m.removeEventListener.bind(m,w,c,u):m.removeListener.bind(m,c);T?m.addEventListener(w,c,u):m.addListener(c),e.push([m,w,S,c,v])})}function n(l,d,c){o(l,d,function(u,m,w){e=e.filter(function(S){return S[0]===u&&S[1]===m&&S[2]===w&&(!c||S[3]===c)?(S[4](),!1):!0})})}function i(l,d,c){var u,m=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:m,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,m,!1,c)),l.dispatchEvent(u),u}function o(l,d,c){yn(l,function(u){u&&yn(d,function(m){m.split(" ").forEach(function(w){var S=w.split(".");c(u,S[0],S[1])})})})}function s(){e.forEach(function(l){l[4]()}),Fn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Yn="mounted",sa="ready",Wn="move",Vi="moved",Ca="click",bl="active",xl="inactive",wl="visible",Sl="hidden",Qt="refresh",on="updated",ki="resize",ur="resized",$l="drag",Cl="dragging",Tl="dragged",pr="scroll",gi="scrolled",xd="overflow",Ta="destroy",Ll="arrows:mounted",Il="arrows:updated",Rl="pagination:mounted",El="pagination:updated",La="navigation:mounted",Ia="autoplay:play",Ml="autoplay:playing",Ra="autoplay:pause",Ea="lazyload:loaded",kl="sk",Pl="sh",ir="ei";function Bt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=vl();function i(s,l){n.bind(t,wo(s).join(" "),function(d){l.apply(l,ya(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Xn(arguments,1))}return e&&e.event.on(Ta,n.destroy),co(n,{bus:t,on:i,off:Ht(n.unbind,t),emit:o})}function mr(e,t,n,i){var o=Date.now,s,l=0,d,c=!0,u=0;function m(){if(!c){if(l=e?qn((o()-s)/e,1):1,n&&n(l),l>=1&&(t(),s=o(),i&&++u>=i))return S();d=Ja(m)}}function w(M){M||v(),s=o()-(M?l*e:0),c=!1,d=Ja(m)}function S(){c=!0}function T(){s=o(),l=0,n&&n(l)}function v(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function C(M){e=M}function x(){return c}return{start:w,rewind:T,pause:S,cancel:v,set:C,isPaused:x}}function wd(e){var t=e;function n(o){t=o}function i(o){return ba(wo(o),t)}return{set:n,is:i}}function Sd(e,t){var n=mr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function $d(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},l=vl(),d=[];function c(){var v=n.mediaQuery==="min";lo(o).sort(function(C,x){return v?+C-+x:+x-+C}).forEach(function(C){m(o[C],"("+(v?"min":"max")+"-width:"+C+"px)")}),m(s,Za),w()}function u(v){v&&l.destroy()}function m(v,C){var x=matchMedia(C);l.bind(x,"change",w),d.push([v,x])}function w(){var v=i.is(er),C=n.direction,x=d.reduce(function(M,L){return zn(M,L[1].matches?L[0]:{})},{});Qa(n),T(x),n.destroy?e.destroy(n.destroy==="completely"):v?(u(!0),e.mount()):C!==n.direction&&e.refresh()}function S(v){matchMedia(Za).matches&&(v?zn(n,s):Qa(n,lo(s)))}function T(v,C,x){zn(n,v),C&&zn(Object.getPrototypeOf(n),v),(x||!i.is(Ci))&&e.emit(on,n)}return{setup:c,destroy:u,reduce:S,set:T}}var gr="Arrow",hr=gr+"Left",fr=gr+"Right",Al=gr+"Up",Fl=gr+"Down",ns="rtl",yr="ttb",kr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Al,fr],ArrowRight:[Fl,hr]};function Cd(e,t,n){function i(s,l,d){d=d||n.direction;var c=d===ns&&!l?1:d===yr?0:-1;return kr[s]&&kr[s][c]||s.replace(/width|left|right/i,function(u,m){var w=kr[u.toLowerCase()][c]||u;return m>0?w.charAt(0).toUpperCase()+w.slice(1):w})}function o(s){return s*(n.direction===ns?1:-1)}return{resolve:i,orient:o}}var kn="role",Li="tabindex",Td="disabled",xn="aria-",To=xn+"controls",Wl=xn+"current",is=xn+"selected",hn=xn+"label",Ma=xn+"labelledby",_l=xn+"hidden",ka=xn+"orientation",mo=xn+"roledescription",os=xn+"live",rs=xn+"busy",as=xn+"atomic",Pa=[kn,Li,Td,To,Wl,hn,Ma,_l,ka,mo],In=Co+"__",Zn="is-",Pr=Co,ss=In+"track",Ld=In+"list",vr=In+"slide",Hl=vr+"--clone",Id=vr+"__container",Aa=In+"arrows",br=In+"arrow",Nl=br+"--prev",Ol=br+"--next",xr=In+"pagination",jl=xr+"__page",Rd=In+"progress",Ed=Rd+"__bar",Md=In+"toggle",kd=In+"spinner",Pd=In+"sr",Ad=Zn+"initialized",ui=Zn+"active",zl=Zn+"prev",Bl=Zn+"next",la=Zn+"visible",ca=Zn+"loading",Dl=Zn+"focus-in",Vl=Zn+"overflow",Fd=[ui,la,zl,Bl,ca,Dl,Vl],Wd={slide:vr,clone:Hl,arrows:Aa,arrow:br,prev:Nl,next:Ol,pagination:xr,page:jl,spinner:kd};function _d(e,t){if(ul(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!so(n,t);)n=n.parentElement;return n}var Hd=5,ls=200,Gl="touchstart mousedown",Ar="touchmove mousemove",Fr="touchend touchcancel mouseup click";function Nd(e,t,n){var i=Bt(e),o=i.on,s=i.bind,l=e.root,d=n.i18n,c={},u=[],m=[],w=[],S,T,v;function C(){R(),Z(),L()}function x(){o(Qt,M),o(Qt,C),o(on,L),s(document,Gl+" keydown",function(E){v=E.type==="keydown"},{capture:!0}),s(l,"focusin",function(){En(l,Dl,!!v)})}function M(E){var I=Pa.concat("style");Fn(u),Mn(l,m),Mn(S,w),Ln([S,T],I),Ln(l,E?I:["style",mo])}function L(){Mn(l,m),Mn(S,w),m=Q(Pr),w=Q(ss),Tn(l,m),Tn(S,w),yt(l,hn,n.label),yt(l,Ma,n.labelledby)}function R(){S=P("."+ss),T=$o(S,"."+Ld),no(S&&T,"A track/list element is missing."),Uo(u,ml(T,"."+vr+":not(."+Hl+")")),ci({arrows:Aa,pagination:xr,prev:Nl,next:Ol,bar:Ed,toggle:Md},function(E,I){c[I]=P("."+E)}),co(c,{root:l,track:S,list:T,slides:u})}function Z(){var E=l.id||bd(Co),I=n.role;l.id=E,S.id=S.id||E+"-track",T.id=T.id||E+"-list",!bn(l,kn)&&l.tagName!=="SECTION"&&I&&yt(l,kn,I),yt(l,mo,d.carousel),yt(T,kn,"presentation")}function P(E){var I=fl(l,E);return I&&_d(I,"."+Pr)===l?I:void 0}function Q(E){return[E+"--"+n.type,E+"--"+n.direction,n.drag&&E+"--draggable",n.isNavigation&&E+"--nav",E===Pr&&ui]}return co(c,{setup:C,mount:x,destroy:M})}var Pi="slide",Gi="loop",Lo="fade";function Od(e,t,n,i){var o=Bt(e),s=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,m=e.options,w=m.isNavigation,S=m.updateOnMove,T=m.i18n,v=m.pagination,C=m.slideFocus,x=c.Direction.resolve,M=bn(i,"style"),L=bn(i,hn),R=n>-1,Z=$o(i,"."+Id),P;function Q(){R||(i.id=u.id+"-slide"+$a(t+1),yt(i,kn,v?"tabpanel":"group"),yt(i,mo,T.slide),yt(i,hn,L||aa(T.slideLabel,[t+1,e.length]))),E()}function E(){d(i,"click",Ht(l,Ca,N)),d(i,"keydown",Ht(l,kl,N)),s([Vi,Pl,gi],b),s(La,W),S&&s(Wn,f)}function I(){P=!0,o.destroy(),Mn(i,Fd),Ln(i,Pa),yt(i,"style",M),yt(i,hn,L||"")}function W(){var H=e.splides.map(function($){var U=$.splide.Components.Slides.getAt(t);return U?U.slide.id:""}).join(" ");yt(i,hn,aa(T.slideX,(R?n:t)+1)),yt(i,To,H),yt(i,kn,C?"button":""),C&&Ln(i,mo)}function f(){P||b()}function b(){if(!P){var H=e.index;_(),O(),En(i,zl,t===H-1),En(i,Bl,t===H+1)}}function _(){var H=G();H!==es(i,ui)&&(En(i,ui,H),yt(i,Wl,w&&H||""),l(H?bl:xl,N))}function O(){var H=J(),$=!H&&(!G()||R);if(e.state.is([Di,bo])||yt(i,_l,$||""),yt(wa(i,m.focusableNodes||""),Li,$?-1:""),C&&yt(i,Li,$?-1:0),H!==es(i,la)&&(En(i,la,H),l(H?wl:Sl,N)),!H&&document.activeElement===i){var U=c.Slides.getAt(e.index);U&&gl(U.slide)}}function K(H,$,U){vn(U&&Z||i,H,$)}function G(){var H=e.index;return H===t||m.cloneStatus&&H===n}function J(){if(e.is(Lo))return G();var H=mn(c.Elements.track),$=mn(i),U=x("left",!0),Y=x("right",!0);return nr(H[U])<=po($[U])&&nr($[Y])<=po(H[Y])}function V(H,$){var U=an(H-t);return!R&&(m.rewind||e.is(Gi))&&(U=qn(U,e.length-U)),U<=$}var N={index:t,slideIndex:n,slide:i,container:Z,isClone:R,mount:Q,destroy:I,update:b,style:K,isWithin:V};return N}function jd(e,t,n){var i=Bt(e),o=i.on,s=i.emit,l=i.bind,d=t.Elements,c=d.slides,u=d.list,m=[];function w(){S(),o(Qt,T),o(Qt,S)}function S(){c.forEach(function(b,_){C(b,_,-1)})}function T(){P(function(b){b.destroy()}),Fn(m)}function v(){P(function(b){b.update()})}function C(b,_,O){var K=Od(e,_,O,b);K.mount(),m.push(K),m.sort(function(G,J){return G.index-J.index})}function x(b){return b?Q(function(_){return!_.isClone}):m}function M(b){var _=t.Controller,O=_.toIndex(b),K=_.hasFocus()?1:n.perPage;return Q(function(G){return Xo(G.index,O,O+K-1)})}function L(b){return Q(b)[0]}function R(b,_){yn(b,function(O){if(Gn(O)&&(O=hl(O)),pl(O)){var K=c[_];K?xa(O,K):So(u,O),Tn(O,n.classes.slide),I(O,Ht(s,ki))}}),s(Qt)}function Z(b){di(Q(b).map(function(_){return _.slide})),s(Qt)}function P(b,_){x(_).forEach(b)}function Q(b){return m.filter(ul(b)?b:function(_){return Gn(b)?so(_.slide,b):ba(wo(b),_.index)})}function E(b,_,O){P(function(K){K.style(b,_,O)})}function I(b,_){var O=wa(b,"img"),K=O.length;K?O.forEach(function(G){l(G,"load error",function(){--K||_()})}):_()}function W(b){return b?c.length:m.length}function f(){return m.length>n.perPage}return{mount:w,destroy:T,update:v,register:C,get:x,getIn:M,getAt:L,add:R,remove:Z,forEach:P,filter:Q,style:E,getLength:W,isEnough:f}}function zd(e,t,n){var i=Bt(e),o=i.on,s=i.bind,l=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,m=u.root,w=u.track,S=u.list,T=d.getAt,v=d.style,C,x,M;function L(){R(),s(window,"resize load",Sd(Ht(l,ki))),o([on,Qt],R),o(ki,Z)}function R(){C=n.direction===yr,vn(m,"maxWidth",ti(n.width)),vn(w,c("paddingLeft"),P(!1)),vn(w,c("paddingRight"),P(!0)),Z(!0)}function Z(N){var H=mn(m);(N||x.width!==H.width||x.height!==H.height)&&(vn(w,"height",Q()),v(c("marginRight"),ti(n.gap)),v("width",I()),v("height",W(),!0),x=H,l(ur),M!==(M=V())&&(En(m,Vl,M),l(xd,M)))}function P(N){var H=n.padding,$=c(N?"right":"left");return H&&ti(H[$]||(ao(H)?0:H))||"0px"}function Q(){var N="";return C&&(N=E(),no(N,"height or heightRatio is missing."),N="calc("+N+" - "+P(!1)+" - "+P(!0)+")"),N}function E(){return ti(n.height||mn(S).width*n.heightRatio)}function I(){return n.autoWidth?null:ti(n.fixedWidth)||(C?"":f())}function W(){return ti(n.fixedHeight)||(C?n.autoHeight?null:f():E())}function f(){var N=ti(n.gap);return"calc((100%"+(N&&" + "+N)+")/"+(n.perPage||1)+(N&&" - "+N)+")"}function b(){return mn(S)[c("width")]}function _(N,H){var $=T(N||0);return $?mn($.slide)[c("width")]+(H?0:G()):0}function O(N,H){var $=T(N);if($){var U=mn($.slide)[c("right")],Y=mn(S)[c("left")];return an(U-Y)+(H?0:G())}return 0}function K(N){return O(e.length-1)-O(0)+_(0,N)}function G(){var N=T(0);return N&&parseFloat(vn(N.slide,c("marginRight")))||0}function J(N){return parseFloat(vn(w,c("padding"+(N?"Right":"Left"))))||0}function V(){return e.is(Lo)||K(!0)>b()}return{mount:L,resize:Z,listSize:b,slideSize:_,sliderSize:K,totalSize:O,getPadding:J,isOverflow:V}}var Bd=2;function Dd(e,t,n){var i=Bt(e),o=i.on,s=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function m(){o(Qt,w),o([on,ki],T),(u=x())&&(v(u),t.Layout.resize(!0))}function w(){S(),m()}function S(){di(c),Fn(c),i.destroy()}function T(){var M=x();u!==M&&(u<M||!M)&&i.emit(Qt)}function v(M){var L=l.get().slice(),R=L.length;if(R){for(;L.length<M;)Uo(L,L);Uo(L.slice(-M),L.slice(0,M)).forEach(function(Z,P){var Q=P<M,E=C(Z.slide,P);Q?xa(E,L[0].slide):So(s.list,E),Uo(c,E),l.register(E,P-M+(Q?0:R),Z.index)})}}function C(M,L){var R=M.cloneNode(!0);return Tn(R,n.classes.clone),R.id=e.root.id+"-clone"+$a(L+1),R}function x(){var M=n.clones;if(!e.is(Gi))M=0;else if(xo(M)){var L=n[d("fixedWidth")]&&t.Layout.slideSize(0),R=L&&po(mn(s.track)[d("width")]/L);M=R||n[d("autoWidth")]&&e.length||n.perPage*Bd}return M}return{mount:m,destroy:S}}function Vd(e,t,n){var i=Bt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,m=d.totalSize,w=d.listSize,S=d.sliderSize,T=t.Direction,v=T.resolve,C=T.orient,x=t.Elements,M=x.list,L=x.track,R;function Z(){R=t.Transition,o([Yn,ur,on,Qt],P)}function P(){t.Controller.isBusy()||(t.Scroll.cancel(),E(e.index),t.Slides.update())}function Q($,U,Y,se){$!==U&&N($>Y)&&(b(),I(f(K(),$>Y),!0)),l(Di),s(Wn,U,Y,$),R.start(U,function(){l(Mi),s(Vi,U,Y,$),se&&se()})}function E($){I(O($,!0))}function I($,U){if(!e.is(Lo)){var Y=U?$:W($);vn(M,"transform","translate"+v("X")+"("+Y+"px)"),$!==Y&&s(Pl)}}function W($){if(e.is(Gi)){var U=_($),Y=U>t.Controller.getEnd(),se=U<0;(se||Y)&&($=f($,Y))}return $}function f($,U){var Y=$-V(U),se=S();return $-=C(se*(po(an(Y)/se)||1))*(U?1:-1),$}function b(){I(K(),!0),R.cancel()}function _($){for(var U=t.Slides.get(),Y=0,se=1/0,j=0;j<U.length;j++){var ge=U[j].index,h=an(O(ge,!0)-$);if(h<=se)se=h,Y=ge;else break}return Y}function O($,U){var Y=C(m($-1)-J($));return U?G(Y):Y}function K(){var $=v("left");return mn(M)[$]-mn(L)[$]+C(u(!1))}function G($){return n.trimSpace&&e.is(Pi)&&($=wi($,0,C(S(!0)-w()))),$}function J($){var U=n.focus;return U==="center"?(w()-c($,!0))/2:+U*c($)||0}function V($){return O($?t.Controller.getEnd():0,!!n.trimSpace)}function N($){var U=C(f(K(),$));return $?U>=0:U<=M[v("scrollWidth")]-mn(L)[v("width")]}function H($,U){U=xo(U)?K():U;var Y=$!==!0&&C(U)<C(V(!1)),se=$!==!1&&C(U)>C(V(!0));return Y||se}return{mount:Z,move:Q,jump:E,translate:I,shift:f,cancel:b,toIndex:_,toPosition:O,getPosition:K,getLimit:V,exceededLimit:H,reposition:P}}function Gd(e,t,n){var i=Bt(e),o=i.on,s=i.emit,l=t.Move,d=l.getPosition,c=l.getLimit,u=l.toPosition,m=t.Slides,w=m.isEnough,S=m.getLength,T=n.omitEnd,v=e.is(Gi),C=e.is(Pi),x=Ht(K,!1),M=Ht(K,!0),L=n.start||0,R,Z=L,P,Q,E;function I(){W(),o([on,Qt,ir],W),o(ur,f)}function W(){P=S(!0),Q=n.perMove,E=n.perPage,R=N();var h=wi(L,0,T?R:P-1);h!==L&&(L=h,l.reposition())}function f(){R!==N()&&s(ir)}function b(h,ue,X){if(!ge()){var ve=O(h),$e=V(ve);$e>-1&&(ue||$e!==L)&&(Y($e),l.move(ve,$e,Z,X))}}function _(h,ue,X,ve){t.Scroll.scroll(h,ue,X,function(){var $e=V(l.toIndex(d()));Y(T?qn($e,R):$e),ve&&ve()})}function O(h){var ue=L;if(Gn(h)){var X=h.match(/([+\-<>])(\d+)?/)||[],ve=X[1],$e=X[2];ve==="+"||ve==="-"?ue=G(L+ +(""+ve+(+$e||1)),L):ve===">"?ue=$e?H(+$e):x(!0):ve==="<"&&(ue=M(!0))}else ue=v?h:wi(h,0,R);return ue}function K(h,ue){var X=Q||(j()?1:E),ve=G(L+X*(h?-1:1),L,!(Q||j()));return ve===-1&&C&&!yl(d(),c(!h),1)?h?0:R:ue?ve:V(ve)}function G(h,ue,X){if(w()||j()){var ve=J(h);ve!==h&&(ue=h,h=ve,X=!1),h<0||h>R?!Q&&(Xo(0,h,ue,!0)||Xo(R,ue,h,!0))?h=H($(h)):v?h=X?h<0?-(P%E||E):P:h:n.rewind?h=h<0?R:0:h=-1:X&&h!==ue&&(h=H($(ue)+(h<ue?-1:1)))}else h=-1;return h}function J(h){if(C&&n.trimSpace==="move"&&h!==L)for(var ue=d();ue===u(h,!0)&&Xo(h,0,e.length-1,!n.rewind);)h<L?--h:++h;return h}function V(h){return v?(h+P)%P||0:h}function N(){for(var h=P-(j()||v&&Q?1:E);T&&h-- >0;)if(u(P-1,!0)!==u(h,!0)){h++;break}return wi(h,0,P-1)}function H(h){return wi(j()?h:E*h,0,R)}function $(h){return j()?qn(h,R):nr((h>=R?P-1:h)/E)}function U(h){var ue=l.toIndex(h);return C?wi(ue,0,R):ue}function Y(h){h!==L&&(Z=L,L=h)}function se(h){return h?Z:L}function j(){return!xo(n.focus)||n.isNavigation}function ge(){return e.state.is([Di,bo])&&!!n.waitForTransition}return{mount:I,go:b,scroll:_,getNext:x,getPrev:M,getAdjacent:K,getEnd:N,setIndex:Y,getIndex:se,toIndex:H,toPage:$,toDest:U,hasFocus:j,isBusy:ge}}var qd="http://www.w3.org/2000/svg",Kd="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",Po=40;function Ud(e,t,n){var i=Bt(e),o=i.on,s=i.bind,l=i.emit,d=n.classes,c=n.i18n,u=t.Elements,m=t.Controller,w=u.arrows,S=u.track,T=w,v=u.prev,C=u.next,x,M,L={};function R(){P(),o(on,Z)}function Z(){Q(),R()}function P(){var _=n.arrows;_&&!(v&&C)&&W(),v&&C&&(co(L,{prev:v,next:C}),uo(T,_?"":"none"),Tn(T,M=Aa+"--"+n.direction),_&&(E(),b(),yt([v,C],To,S.id),l(Ll,v,C)))}function Q(){i.destroy(),Mn(T,M),x?(di(w?[v,C]:T),v=C=null):Ln([v,C],Pa)}function E(){o([Yn,Vi,Qt,gi,ir],b),s(C,"click",Ht(I,">")),s(v,"click",Ht(I,"<"))}function I(_){m.go(_,!0)}function W(){T=w||Ti("div",d.arrows),v=f(!0),C=f(!1),x=!0,So(T,[v,C]),!w&&xa(T,S)}function f(_){var O='<button class="'+d.arrow+" "+(_?d.prev:d.next)+'" type="button"><svg xmlns="'+qd+'" viewBox="0 0 '+Po+" "+Po+'" width="'+Po+'" height="'+Po+'" focusable="false"><path d="'+(n.arrowPath||Kd)+'" />';return hl(O)}function b(){if(v&&C){var _=e.index,O=m.getPrev(),K=m.getNext(),G=O>-1&&_<O?c.last:c.prev,J=K>-1&&_>K?c.first:c.next;v.disabled=O<0,C.disabled=K<0,yt(v,hn,G),yt(C,hn,J),l(Il,v,C,O,K)}}return{arrows:L,mount:R,destroy:Q,update:b}}var Xd=Sa+"-interval";function Yd(e,t,n){var i=Bt(e),o=i.on,s=i.bind,l=i.emit,d=mr(n.interval,e.go.bind(e,">"),E),c=d.isPaused,u=t.Elements,m=t.Elements,w=m.root,S=m.toggle,T=n.autoplay,v,C,x=T==="pause";function M(){T&&(L(),S&&yt(S,To,u.track.id),x||R(),Q())}function L(){n.pauseOnHover&&s(w,"mouseenter mouseleave",function(W){v=W.type==="mouseenter",P()}),n.pauseOnFocus&&s(w,"focusin focusout",function(W){C=W.type==="focusin",P()}),S&&s(S,"click",function(){x?R():Z(!0)}),o([Wn,pr,Qt],d.rewind),o(Wn,I)}function R(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),C=v=x=!1,Q(),l(Ia))}function Z(W){W===void 0&&(W=!0),x=!!W,Q(),c()||(d.pause(),l(Ra))}function P(){x||(v||C?Z(!1):R())}function Q(){S&&(En(S,ui,!x),yt(S,hn,n.i18n[x?"play":"pause"]))}function E(W){var f=u.bar;f&&vn(f,"width",W*100+"%"),l(Ml,W)}function I(W){var f=t.Slides.getAt(W);d.set(f&&+bn(f.slide,Xd)||n.interval)}return{mount:M,destroy:d.cancel,play:R,pause:Z,isPaused:c}}function Zd(e,t,n){var i=Bt(e),o=i.on;function s(){n.cover&&(o(Ea,Ht(d,!0)),o([Yn,on,Qt],Ht(l,!0)))}function l(c){t.Slides.forEach(function(u){var m=$o(u.container||u.slide,"img");m&&m.src&&d(c,m,u)})}function d(c,u,m){m.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),uo(u,c?"none":"")}return{mount:s,destroy:Ht(l,!1)}}var Jd=10,Qd=600,eu=.6,tu=1.5,nu=800;function iu(e,t,n){var i=Bt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,m=d.exceededLimit,w=d.translate,S=e.is(Pi),T,v,C=1;function x(){o(Wn,Z),o([on,Qt],P)}function M(E,I,W,f,b){var _=c();if(Z(),W&&(!S||!m())){var O=t.Layout.sliderSize(),K=ra(E)*O*nr(an(E)/O)||0;E=d.toPosition(t.Controller.toDest(E%O))+K}var G=yl(_,E,1);C=1,I=G?0:I||tr(an(E-_)/tu,nu),v=f,T=mr(I,L,Ht(R,_,E,b),1),l(bo),s(pr),T.start()}function L(){l(Mi),v&&v(),s(gi)}function R(E,I,W,f){var b=c(),_=E+(I-E)*Q(f),O=(_-b)*C;w(b+O),S&&!W&&m()&&(C*=eu,an(O)<Jd&&M(u(m(!0)),Qd,!1,v,!0))}function Z(){T&&T.cancel()}function P(){T&&!T.isPaused()&&(Z(),L())}function Q(E){var I=n.easingFunc;return I?I(E):1-Math.pow(1-E,4)}return{mount:x,destroy:Z,scroll:M,cancel:P}}var Si={passive:!1,capture:!0};function ou(e,t,n){var i=Bt(e),o=i.on,s=i.emit,l=i.bind,d=i.unbind,c=e.state,u=t.Move,m=t.Scroll,w=t.Controller,S=t.Elements.track,T=t.Media.reduce,v=t.Direction,C=v.resolve,x=v.orient,M=u.getPosition,L=u.exceededLimit,R,Z,P,Q,E,I=!1,W,f,b;function _(){l(S,Ar,ia,Si),l(S,Fr,ia,Si),l(S,Gl,K,Si),l(S,"click",V,{capture:!0}),l(S,"dragstart",Rn),o([Yn,on],O)}function O(){var D=n.drag;re(!D),Q=D==="free"}function K(D){if(W=!1,!f){var ne=$e(D);ve(D.target)&&(ne||!D.button)&&(w.isBusy()?Rn(D,!0):(b=ne?S:window,E=c.is([Di,bo]),P=null,l(b,Ar,G,Si),l(b,Fr,J,Si),u.cancel(),m.cancel(),N(D)))}}function G(D){if(c.is(Ko)||(c.set(Ko),s($l)),D.cancelable)if(E){u.translate(R+X(j(D)));var ne=ge(D)>ls,ce=I!==(I=L());(ne||ce)&&N(D),W=!0,s(Cl),Rn(D)}else U(D)&&(E=$(D),Rn(D))}function J(D){c.is(Ko)&&(c.set(Mi),s(Tl)),E&&(H(D),Rn(D)),d(b,Ar,G),d(b,Fr,J),E=!1}function V(D){!f&&W&&Rn(D,!0)}function N(D){P=Z,Z=D,R=M()}function H(D){var ne=Y(D),ce=se(ne),Ne=n.rewind&&n.rewindByDrag;T(!1),Q?w.scroll(ce,0,n.snap):e.is(Lo)?w.go(x(ra(ne))<0?Ne?"<":"-":Ne?">":"+"):e.is(Pi)&&I&&Ne?w.go(L(!0)?">":"<"):w.go(w.toDest(ce),!0),T(!0)}function $(D){var ne=n.dragMinThreshold,ce=ao(ne),Ne=ce&&ne.mouse||0,be=(ce?ne.touch:+ne)||10;return an(j(D))>($e(D)?be:Ne)}function U(D){return an(j(D))>an(j(D,!0))}function Y(D){if(e.is(Gi)||!I){var ne=ge(D);if(ne&&ne<ls)return j(D)/ne}return 0}function se(D){return M()+ra(D)*qn(an(D)*(n.flickPower||600),Q?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function j(D,ne){return ue(D,ne)-ue(h(D),ne)}function ge(D){return oa(D)-oa(h(D))}function h(D){return Z===D&&P||Z}function ue(D,ne){return($e(D)?D.changedTouches[0]:D)["page"+C(ne?"Y":"X")]}function X(D){return D/(I&&e.is(Pi)?Hd:1)}function ve(D){var ne=n.noDrag;return!so(D,"."+jl+", ."+br)&&(!ne||!so(D,ne))}function $e(D){return typeof TouchEvent<"u"&&D instanceof TouchEvent}function ae(){return E}function re(D){f=D}return{mount:_,disable:re,isDragging:ae}}var ru={Spacebar:" ",Right:fr,Left:hr,Up:Al,Down:Fl};function Fa(e){return e=Gn(e)?e:e.key,ru[e]||e}var cs="keydown";function au(e,t,n){var i=Bt(e),o=i.on,s=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,m;function w(){S(),o(on,T),o(on,S),o(Wn,C)}function S(){var M=n.keyboard;M&&(u=M==="global"?window:d,s(u,cs,x))}function T(){l(u,cs)}function v(M){m=M}function C(){var M=m;m=!0,dl(function(){m=M})}function x(M){if(!m){var L=Fa(M);L===c(hr)?e.go("<"):L===c(fr)&&e.go(">")}}return{mount:w,destroy:T,disable:v}}var io=Sa+"-lazy",Yo=io+"-srcset",su="["+io+"], ["+Yo+"]";function lu(e,t,n){var i=Bt(e),o=i.on,s=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[Vi,gi],m=[];function w(){n.lazyLoad&&(S(),o(Qt,S))}function S(){Fn(m),T(),c?M():(s(u),o(u,v),v())}function T(){t.Slides.forEach(function(L){wa(L.slide,su).forEach(function(R){var Z=bn(R,io),P=bn(R,Yo);if(Z!==R.src||P!==R.srcset){var Q=n.classes.spinner,E=R.parentElement,I=$o(E,"."+Q)||Ti("span",Q,E);m.push([R,L,I]),R.src||uo(R,"none")}})})}function v(){m=m.filter(function(L){var R=n.perPage*((n.preloadPages||1)+1)-1;return L[1].isWithin(e.index,R)?C(L):!0}),m.length||s(u)}function C(L){var R=L[0];Tn(L[1].slide,ca),l(R,"load error",Ht(x,L)),yt(R,"src",bn(R,io)),yt(R,"srcset",bn(R,Yo)),Ln(R,io),Ln(R,Yo)}function x(L,R){var Z=L[0],P=L[1];Mn(P.slide,ca),R.type!=="error"&&(di(L[2]),uo(Z,""),d(Ea,Z,P),d(ki)),c&&M()}function M(){m.length&&C(m.shift())}return{mount:w,destroy:Ht(Fn,m),check:v}}function cu(e,t,n){var i=Bt(e),o=i.on,s=i.emit,l=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,m=u.hasFocus,w=u.getIndex,S=u.go,T=t.Direction.resolve,v=c.pagination,C=[],x,M;function L(){R(),o([on,Qt,ir],L);var f=n.pagination;v&&uo(v,f?"":"none"),f&&(o([Wn,pr,gi],W),Z(),W(),s(Rl,{list:x,items:C},I(e.index)))}function R(){x&&(di(v?Xn(x.children):x),Mn(x,M),Fn(C),x=null),i.destroy()}function Z(){var f=e.length,b=n.classes,_=n.i18n,O=n.perPage,K=m()?u.getEnd()+1:po(f/O);x=v||Ti("ul",b.pagination,c.track.parentElement),Tn(x,M=xr+"--"+E()),yt(x,kn,"tablist"),yt(x,hn,_.select),yt(x,ka,E()===yr?"vertical":"");for(var G=0;G<K;G++){var J=Ti("li",null,x),V=Ti("button",{class:b.page,type:"button"},J),N=d.getIn(G).map(function($){return $.slide.id}),H=!m()&&O>1?_.pageX:_.slideX;l(V,"click",Ht(P,G)),n.paginationKeyboard&&l(V,"keydown",Ht(Q,G)),yt(J,kn,"presentation"),yt(V,kn,"tab"),yt(V,To,N.join(" ")),yt(V,hn,aa(H,G+1)),yt(V,Li,-1),C.push({li:J,button:V,page:G})}}function P(f){S(">"+f,!0)}function Q(f,b){var _=C.length,O=Fa(b),K=E(),G=-1;O===T(fr,!1,K)?G=++f%_:O===T(hr,!1,K)?G=(--f+_)%_:O==="Home"?G=0:O==="End"&&(G=_-1);var J=C[G];J&&(gl(J.button),S(">"+G),Rn(b,!0))}function E(){return n.paginationDirection||n.direction}function I(f){return C[u.toPage(f)]}function W(){var f=I(w(!0)),b=I(w());if(f){var _=f.button;Mn(_,ui),Ln(_,is),yt(_,Li,-1)}if(b){var O=b.button;Tn(O,ui),yt(O,is,!0),yt(O,Li,"")}s(El,{list:x,items:C},f,b)}return{items:C,mount:L,destroy:R,getAt:I,update:W}}var du=[" ","Enter"];function uu(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function l(){e.splides.forEach(function(v){v.isParent||(u(e,v.splide),u(v.splide,e))}),i&&m()}function d(){s.forEach(function(v){v.destroy()}),Fn(s)}function c(){d(),l()}function u(v,C){var x=Bt(v);x.on(Wn,function(M,L,R){C.go(C.is(Gi)?R:M)}),s.push(x)}function m(){var v=Bt(e),C=v.on;C(Ca,S),C(kl,T),C([Yn,on],w),s.push(v),v.emit(La,e.splides)}function w(){yt(t.Elements.list,ka,n.direction===yr?"vertical":"")}function S(v){e.go(v.index)}function T(v,C){ba(du,Fa(C))&&(S(v),Rn(C))}return{setup:Ht(t.Media.set,{slideFocus:xo(o)?i:o},!0),mount:l,destroy:d,remount:c}}function pu(e,t,n){var i=Bt(e),o=i.bind,s=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,Si)}function d(u){if(u.cancelable){var m=u.deltaY,w=m<0,S=oa(u),T=n.wheelMinThreshold||0,v=n.wheelSleep||0;an(m)>T&&S-s>v&&(e.go(w?"<":">"),s=S),c(w)&&Rn(u)}}function c(u){return!n.releaseWheel||e.state.is(Di)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var mu=90;function gu(e,t,n){var i=Bt(e),o=i.on,s=t.Elements.track,l=n.live&&!n.isNavigation,d=Ti("span",Pd),c=mr(mu,Ht(m,!1));function u(){l&&(S(!t.Autoplay.isPaused()),yt(s,as,!0),d.textContent="…",o(Ia,Ht(S,!0)),o(Ra,Ht(S,!1)),o([Vi,gi],Ht(m,!0)))}function m(T){yt(s,rs,T),T?(So(s,d),c.start()):(di(d),c.cancel())}function w(){Ln(s,[os,as,rs]),di(d)}function S(T){l&&yt(s,os,T?"off":"polite")}return{mount:u,disable:S,destroy:w}}var hu=Object.freeze({__proto__:null,Media:$d,Direction:Cd,Elements:Nd,Slides:jd,Layout:zd,Clones:Dd,Move:Vd,Controller:Gd,Arrows:Ud,Autoplay:Yd,Cover:Zd,Scroll:iu,Drag:ou,Keyboard:au,LazyLoad:lu,Pagination:cu,Sync:uu,Wheel:pu,Live:gu}),fu={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"},yu={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:Wd,i18n:fu,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function vu(e,t,n){var i=t.Slides;function o(){Bt(e).on([Yn,Qt],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function l(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),dl(c)}return{mount:o,start:l,cancel:ia}}function bu(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,l=t.Elements.list,d=Ht(vn,l,"transition"),c;function u(){Bt(e).bind(l,"transitionend",function(T){T.target===l&&c&&(w(),c())})}function m(T,v){var C=i.toPosition(T,!0),x=i.getPosition(),M=S(T);an(C-x)>=1&&M>=1?n.useScroll?s.scroll(C,M,!1,v):(d("transform "+M+"ms "+n.easing),i.translate(C,!0),c=v):(i.jump(T),v())}function w(){d(""),s.cancel()}function S(T){var v=n.rewindSpeed;if(e.is(Pi)&&v){var C=o.getIndex(!0),x=o.getEnd();if(C===0&&T>=x||C>=x&&T===0)return v}return n.speed}return{mount:u,start:m,cancel:w}}var xu=(function(){function e(n,i){this.event=Bt(),this.Components={},this.state=wd(Ci),this.splides=[],this._o={},this._E={};var o=Gn(n)?fl(document,n):n;no(o,o+" is invalid."),this.root=o,i=zn({label:bn(o,hn)||"",labelledby:bn(o,Ma)||""},yu,e.defaults,i||{});try{zn(i,JSON.parse(bn(o,Sa)))}catch{no(!1,"Invalid JSON")}this._o=Object.create(zn({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,l=this.state,d=this.Components;no(l.is([Ci,er]),"Already mounted!"),l.set(Ci),this._C=d,this._T=o||this._T||(this.is(Lo)?vu:bu),this._E=i||this._E;var c=co({},hu,this._E,{Transition:this._T});return ci(c,function(u,m){var w=u(s,d,s._o);d[m]=w,w.setup&&w.setup()}),ci(d,function(u){u.mount&&u.mount()}),this.emit(Yn),Tn(this.root,Ad),l.set(Mi),this.emit(sa),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Mi)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(Xn(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(Qt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(Ci)?Bt(this).on(sa,this.destroy.bind(this,i)):(ci(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(Ta),o.destroy(),i&&Fn(this.splides),s.set(er)),this},fd(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})(),Wa=xu;Wa.defaults={};Wa.STATES=vd;var ds=[[Yn,"onMounted"],[sa,"onReady"],[Wn,"onMove"],[Vi,"onMoved"],[Ca,"onClick"],[bl,"onActive"],[xl,"onInactive"],[wl,"onVisible"],[Sl,"onHidden"],[Qt,"onRefresh"],[on,"onUpdated"],[ki,"onResize"],[ur,"onResized"],[$l,"onDrag"],[Cl,"onDragging"],[Tl,"onDragged"],[pr,"onScroll"],[gi,"onScrolled"],[Ta,"onDestroy"],[Ll,"onArrowsMounted"],[Il,"onArrowsUpdated"],[Rl,"onPaginationMounted"],[El,"onPaginationUpdated"],[La,"onNavigationMounted"],[Ia,"onAutoplayPlay"],[Ml,"onAutoplayPlaying"],[Ra,"onAutoplayPause"],[Ea,"onLazyLoadLoaded"]];function _a(...e){return e.filter(Boolean).join(" ")}function or(e){return e!==null&&typeof e=="object"}function da(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!da(n,t[i]));if(or(e)&&or(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!da(e[o],t[o]))}return e===t}function wu(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function Su(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 ua(e,t){const n=e;return Su(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():or(i)?n[o]=ua(or(n[o])?n[o]:{},i):n[o]=i}),n}var $u=({children:e,className:t,...n})=>a.createElement("div",{className:_a("splide__track",t),...n},a.createElement("ul",{className:"splide__list"},e)),Ha=class extends a.Component{constructor(){super(...arguments),this.splideRef=a.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Wa(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=ua({},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&&!da(this.options,e)&&(this.splide.options=e,this.options=ua({},e));const t=this.getSlides();wu(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){ds.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return a.createElement(t,{className:_a("splide",e),ref:this.splideRef,...this.omit(o,["options",...ds.map(s=>s[1])])},n?a.createElement($u,null,i):i)}},Na=({children:e,className:t,...n})=>a.createElement("li",{className:_a("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 Cu="RichTextRenderer-module__link___BWeZ2",Tu={link:Cu},Lu=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))},wr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Lu(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function cn(e){const{color:t,...n}=e;return n}function Xt(e,t){var o,s,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:wr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:y.scalingValue(e.letterSpacing,t),wordSpacing:y.scalingValue(e.wordSpacing,t),fontSize:y.scalingValue(n,t),lineHeight:i!==void 0?y.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}const pi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:Tu.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:Iu(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 Iu(e){return{...e.fontFamily&&{fontFamily:wr(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 Ru="SvgImage-module__svg___q3xE-",Eu="SvgImage-module__img___VsTm-",us={svg:Ru,img:Eu},Mu=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},ku=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,nn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,l]=a.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return a.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(d)}},[]),!Mu(e)||!s?r.jsx("img",{src:e,alt:"",className:at(us.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:at(us.svg,i),style:{"--svg":ku(e),"--fill":t,"--hover-fill":n,...o??{}}})},Pu={"top-left":tt.topLeftAlignment,"top-center":tt.topCenterAlignment,"top-right":tt.topRightAlignment,"middle-left":tt.middleLeftAlignment,"middle-center":tt.middleCenterAlignment,"middle-right":tt.middleRightAlignment,"bottom-left":tt.bottomLeftAlignment,"bottom-center":tt.bottomCenterAlignment,"bottom-right":tt.bottomRightAlignment};function Au({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=a.useState(null),{widthSettings:l,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:m,fontSizeLineHeight:w,textAppearance:S,color:T}=n.imageCaption??{},[v,C]=a.useState(void 0),[x,M]=a.useState(null),[L,R]=a.useState(0),[J,A]=a.useState(0),{direction:ee,transition:E,controls:I,pagination:F,imageCaption:f,triggers:b}=e,W=a.useRef(E.type),{x:O,y:K}=e.controls.offset,G=Q=>{o&&o.go(Q)};return a.useEffect(()=>{if(!x)return;const Q=new ResizeObserver(V=>{if(!o)return;const[N]=V;C({width:Math.round(N.contentRect.width),height:Math.round(N.contentRect.height)})});return Q.observe(x),()=>Q.unobserve(x)},[x]),a.useEffect(()=>{!o||W.current===E.type||(A(Q=>Q+1),W.current=E.type)},[E.type]),r.jsx("div",{className:at(tt.wrapper,{[tt.editor]:i}),ref:M,children:r.jsxs("div",{className:tt.sliderInner,style:{width:v?v.width:"100%",height:v?v.height:"100%",backgroundColor:E.backgroundColor&&E.type==="fade in"?E.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:at(tt.captionBlock),children:r.jsx("div",{className:tt.captionTextWrapper,children:t.map((Q,V)=>r.jsx("div",{className:at(tt.captionText,Pu[f.alignment],{[tt.withPointerEvents]:V===L&&i,[tt.active]:V===L}),style:{fontFamily:wr(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":y.scalingValue(l.width,i),letterSpacing:y.scalingValue(c,i),wordSpacing:y.scalingValue(m,i),textAlign:u,fontSize:y.scalingValue(w.fontSize,i),lineHeight:y.scalingValue(w.lineHeight,i),textTransform:S.textTransform??"none",textDecoration:S.textDecoration??"none",fontVariant:S.fontVariant??"normal",color:T,transitionDuration:E.duration?`${Math.round(parseInt(E.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:tt.captionTextInner,style:{"--link-hover-color":f.linkHoverColor,"--link-color":f.linkColor,position:"relative",top:y.scalingValue(f.offset.y,i),left:y.scalingValue(f.offset.x,i)},children:r.jsx(pi,{content:Q.imageCaption})})},V))})}),r.jsx(Ha,{onMove:Q=>{R(Q.index)},ref:s,options:{arrows:!1,speed:E.duration?parseInt(E.duration):500,autoplay:b.autoPlay!==null,...b.autoPlay!==null&&{interval:parseInt(b.autoPlay)*1e3},direction:ee==="horiz"||E.type==="fade in"?"ltr":"ttb",pagination:!1,drag:b.triggersList.drag,perPage:1,width:v?v.width:"100%",height:v?v.height:"100%",type:E.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((Q,V)=>r.jsx(Na,{children:r.jsx("div",{className:tt.sliderItem,children:r.jsx("div",{className:tt.imgWrapper,children:r.jsx("img",{className:at(tt.sliderImage,{[tt.contain]:Q.image.objectFit==="contain",[tt.cover]:Q.image.objectFit==="cover"}),src:Q.image.url,alt:Q.image.name??""})})})},V))},J),I.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:at(tt.arrow,{[tt.arrowVertical]:ee==="vert",[tt.hoverArrow]:I.show==="on hover"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:r.jsxs("button",{onClick:()=>{G("-1")},className:tt.arrowInner,style:{transform:`translate(${y.scalingValue(O,i)}, ${y.scalingValue(K*(ee==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${ee==="horiz"?"0deg":"90deg"})`},children:[I.arrowsImgUrl&&r.jsx(nn,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:at(tt.arrowImg,tt.mirror)}),!I.arrowsImgUrl&&r.jsx(ps,{color:I.color,className:at(tt.arrowIcon,tt.arrowImg,tt.mirror)})]})}),r.jsx("div",{className:at(tt.arrow,tt.nextArrow,{[tt.arrowVertical]:ee==="vert",[tt.hoverArrow]:I.show==="on hover"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:r.jsxs("button",{className:tt.arrowInner,onClick:()=>G("+1"),style:{transform:`translate(${y.scalingValue(O*(ee==="horiz"?-1:1),i)}, ${y.scalingValue(K,i)}) scale(${e.controls.scale/100}) rotate(${ee==="horiz"?"0deg":"90deg"})`},children:[I.arrowsImgUrl&&r.jsx(nn,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:tt.arrowImg}),!I.arrowsImgUrl&&r.jsx(ps,{color:I.color,className:at(tt.arrowIcon,tt.arrowImg)})]})})]}),b.triggersList.click&&r.jsx("div",{className:tt.clickOverlay,onClick:()=>{o&&o.go("+1")}}),F.isActive&&r.jsx("div",{className:at(tt.pagination,{[tt.paginationInsideBottom]:F.position==="inside-1"&&ee==="horiz",[tt.paginationInsideTop]:F.position==="inside-2"&&ee==="horiz",[tt.paginationOutsideBottom]:F.position==="outside-1"&&ee==="horiz",[tt.paginationOutsideTop]:F.position==="outside-2"&&ee==="horiz",[tt.paginationInsideLeft]:F.position==="inside-1"&&ee==="vert",[tt.paginationInsideRight]:F.position==="inside-2"&&ee==="vert",[tt.paginationOutsideLeft]:F.position==="outside-1"&&ee==="vert",[tt.paginationOutsideRight]:F.position==="outside-2"&&ee==="vert",[tt.paginationVertical]:ee==="vert"}),children:r.jsx("div",{className:tt.paginationInner,style:{backgroundColor:F.colors[2],transform:`scale(${F.scale/100}) translate(${y.scalingValue(F.offset.x,i)}, ${y.scalingValue(F.offset.y,i)}) rotate(${ee==="horiz"?"0deg":"90deg"})`},children:t.map((Q,V)=>r.jsx("button",{onClick:()=>{o&&o.go(V)},className:at(tt.paginationItem),children:r.jsx("div",{className:at(tt.dot,{[tt.activeDot]:V===L}),style:{backgroundColor:V===L?F.colors[0]:F.colors[1],"--pagination-hover-color":F.hover}})},V))})})]})})}function ps({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 Fu={element:Au,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"]}},Wu="ImageRevealSlider-module__imageRevealSlider___UE5Ob",_u="ImageRevealSlider-module__image___Qjt-e",Hu="ImageRevealSlider-module__link___N-iLG",Nu="ImageRevealSlider-module__cursor___2U03d",yi={imageRevealSlider:Wu,image:_u,link:Hu,cursor:Nu};function ms(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*s,d=s/2,c=l/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function Wr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ou(e,t,n,i){let o,s;if(t==="custom"){o=n;const l=await Wr(e);s=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Wr(e);s=l.height/l.width*o}else{const l=await Wr(e);o=l.width,s=l.height}return{width:o,height:s,finalWidth:`${o}px`}}function ju({settings:e,content:t,isEditor:n}){const[i,o]=a.useState(null),[s,l]=a.useState([]),[d,c]=a.useState(0),u=a.useRef(0),[m,w]=a.useState({x:0,y:0}),[S,T]=a.useState(1),[v,C]=a.useState("none"),x=a.useRef({x:0,y:0}),[M,L]=a.useState(!1),{sizeType:R,imageWidth:J,randomRangeImageWidth:A}=e.imageSize,{revealPosition:ee,visible:E}=e.position,{cursorType:I,target:F,defaultCursorScale:f,defaultCursor:b,hoverCursorScale:W,hoverCursor:O}=e.cursor;a.useEffect(()=>{if(!i)return;const Q=(_,$)=>{const U=i.getBoundingClientRect(),X=_-U.left,ce=$-U.top;if(w({x:X,y:ce}),I==="system"){C("none"),T(1);return}const j=X,ge=ce,h=document.elementFromPoint(U.left+j,U.top+ge);if(h&&h.closest("a")){C("none"),T(1);return}const he=ms(j,ge,s)||F==="area"?{img:O??"none",scale:W}:{img:b??"none",scale:f};C(he.img),T(he.scale)},V=_=>{_.stopPropagation(),x.current={x:_.clientX,y:_.clientY},Q(_.clientX,_.clientY)},N=()=>{M&&Q(x.current.x,x.current.y)};return i.addEventListener("mousemove",V),window.addEventListener("scroll",N,!0),()=>{i.removeEventListener("mousemove",V),window.removeEventListener("scroll",N,!0)}},[i,M,m,I,F,O,b,W,f,s]),a.useEffect(()=>{M||(C("none"),T(0))},[M]);const K=async(Q,V,N,_={})=>{const{width:$,height:U,finalWidth:X}=await Ou(Q.image.url,R,J,A);let ce=0,j=0;ee==="same"?(ce=V/2,j=N/2):(ce=_.x??Math.random()*V,j=_.y??Math.random()*N);const ge=Math.min(Math.max(ce,$/2),V-$/2),h=Math.min(Math.max(j,U/2),N-U/2);return{id:u.current++,url:Q.image.url,link:Q.link,name:Q.image.name,x:ge,y:h,width:X}};a.useEffect(()=>{if(!i||t.length===0)return;const Q=i.getBoundingClientRect(),V=Q.width,N=Q.height,_=[];(async()=>{const U=t[0],X=await K(U,V,N);_.push(X),l(_),c(1)})()},[R,J,A,ee,i]),a.useEffect(()=>{E==="last One"&&l(Q=>Q.length>0?[Q[Q.length-1]]:[])},[E]);const G=async Q=>{if(!i)return;const V=i.getBoundingClientRect(),N=Q.clientX-V.left,_=Q.clientY-V.top;if(F==="image"&&!ms(N,_,s))return;let $=0,U=0;ee==="on Click"?($=N,U=_):ee==="same"?($=V.width/2,U=V.height/2):($=Math.random()*V.width,U=Math.random()*V.height);const X=t[d],ce=await K(X,V.width,V.height,{x:$,y:U});l(j=>E==="all"?[...j,ce]:[ce]),c(j=>j>=t.length-1?0:j+1)};return r.jsxs("div",{ref:o,onClick:G,onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),className:yi.imageRevealSlider,style:{cursor:v==="none"?"default":"none"},children:[s.map(Q=>r.jsx("div",{className:yi.wrapper,style:{top:`${Q.y}px`,left:`${Q.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:Q.width??"auto",height:"auto",cursor:v==="none"?"default":"none"},children:F==="area"&&Q.link?r.jsx("a",{href:Q.link,target:"_blank",className:yi.link,children:r.jsx("img",{src:Q.url,alt:Q.name,className:yi.image},Q.id)}):r.jsx("img",{src:Q.url,alt:Q.name,className:yi.image},Q.id)},Q.id)),M&&r.jsx("div",{className:yi.cursor,style:{left:`${m.x}px`,top:`${m.y}px`,transform:`translate(-50%, -50%) scale(${S})`,backgroundImage:`url('${v}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const zu={element:ju,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:""}]}}}},Bu="LightBox-module__hidden___9s-9x",Du="LightBox-module__heroImage___sTxNF",Vu="LightBox-module__background___rm9ml",Gu="LightBox-module__editor___4ACaY",qu="LightBox-module__contentStyle___Bgnsq",Ku="LightBox-module__imageStyle___tLIlB",Uu="LightBox-module__imgWrapper___LuFUp",Xu="LightBox-module__contain___8-yaS",Yu="LightBox-module__cover___hNvOG",Zu="LightBox-module__caption___b6L2I",Ju="LightBox-module__captionTextInner___rCGNH",Qu="LightBox-module__lightboxSplide___XFuWC",ep="LightBox-module__arrow___iz38X",tp="LightBox-module__arrowVertical___Zfz81",np="LightBox-module__nextArrow___zkAQN",ip="LightBox-module__arrowInner___p48sW",op="LightBox-module__arrowIcon___3VaFf",rp="LightBox-module__arrowImg___pNV88",ap="LightBox-module__mirror___pjeXc",sp="LightBox-module__thumbsWrapper___GB-nU",lp="LightBox-module__thumbsContainerVertical___wttk5",cp="LightBox-module__thumbsContainer___osSma",dp="LightBox-module__thumbsAlignStart___MO6tY",up="LightBox-module__thumbsAlignCenter___Q4sUx",pp="LightBox-module__thumbsAlignEnd___p4y9R",mp="LightBox-module__thumbItem___HvnF3",gp="LightBox-module__closeButton___g2khP",hp="LightBox-module__fadeIn___0m5GW",fp="LightBox-module__slideInLeft___gPYwC",yp="LightBox-module__slideInRight___S-pPp",vp="LightBox-module__slideInTop___DFdAj",bp="LightBox-module__slideInBottom___m27kZ",xp="LightBox-module__fadeOut___55qBR",wp="LightBox-module__slideOutLeft___NvU7P",Sp="LightBox-module__slideOutRight___SK7eC",$p="LightBox-module__slideOutTop___Vgg0z",Cp="LightBox-module__slideOutBottom___nJ0Ef",Tp="LightBox-module__scaleSlide___vZriG",je={hidden:Bu,heroImage:Du,background:Vu,editor:Gu,contentStyle:qu,imageStyle:Ku,imgWrapper:Uu,contain:Xu,cover:Yu,caption:Zu,captionTextInner:Ju,lightboxSplide:Qu,arrow:ep,arrowVertical:tp,nextArrow:np,arrowInner:ip,arrowIcon:op,arrowImg:rp,mirror:ap,thumbsWrapper:sp,thumbsContainerVertical:lp,thumbsContainer:cp,thumbsAlignStart:dp,thumbsAlignCenter:up,thumbsAlignEnd:pp,thumbItem:mp,closeButton:gp,fadeIn:hp,slideInLeft:fp,slideInRight:yp,slideInTop:vp,slideInBottom:bp,fadeOut:xp,slideOutLeft:wp,slideOutRight:Sp,slideOutTop:$p,slideOutBottom:Cp,scaleSlide:Tp},Ao=(e,t,n)=>{const i={},[o,s]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),s==="left"?(i.left="0",i.right="auto"):s==="center"?(i.left="50%",i.right="auto"):s==="right"&&(i.left="auto",i.right="0"),o==="middle"&&s==="center"?i.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), calc(-50% + ${y.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${y.scalingValue(t.x,n)}, calc(-50% + ${y.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), ${y.scalingValue(t.y,n)})`:i.transform=`translate(${y.scalingValue(t.x,n)}, ${y.scalingValue(t.y,n)})`,i};function ql(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 Lp(e){const t=e.trim().split(/\s+/),n=i=>{if(i.endsWith("%"))return parseFloat(i)/100;switch(i){case"left":case"top":return 0;case"right":case"bottom":return 1;case"center":return .5;default:return .5}};if(t.length===1){const i=t[0];return i==="center"?{x:.5,y:.5}:i==="top"||i==="bottom"?{x:.5,y:n(i)}:i==="left"||i==="right"?{x:n(i),y:.5}:{x:n(i),y:.5}}return{x:n(t[0]),y:n(t[1])}}function Kl(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,s=n/i;if(s>o){const d=e;return{renderedW:d,renderedH:d/s}}const l=t;return{renderedW:l*s,renderedH:l}}function Ip(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,s=n/i;if(s>o){const d=t;return{renderedW:d*s,renderedH:d}}const l=e;return{renderedW:l,renderedH:l/s}}function Ul(e,t,n,i,o){const{x:s,y:l}=Lp(o);return{offsetX:s*(e-n),offsetY:l*(t-i)}}function Rp(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,s=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:d}=window.getComputedStyle(e),c=l==="cover"?Ip:Kl,{renderedW:u,renderedH:m}=c(n,i,o,s),{offsetX:w,offsetY:S}=Ul(n,i,u,m,d),T=(w+u/2)/n*100,v=(S+m/2)/i*100;return`${T}% ${v}%`}function Ep(e){return Rp(e)}function rr(e){const t=e.getBoundingClientRect(),n=ql(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,l=e.naturalHeight,{renderedW:d,renderedH:c}=Kl(i,o,s,l),u=window.getComputedStyle(e).objectPosition,{offsetX:m,offsetY:w}=Ul(i,o,d,c,u),S=t.left+n.left,T=t.top+n.top;return{x:m+S,y:w+T,width:d,height:c}}function gs(e){const t=e.getBoundingClientRect(),n=ql(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function hs(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 Mp(e,t){const n=(()=>{if(e==="fade in")return je.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return je.slideInLeft;case"right":return je.slideInRight;case"top":return je.slideInTop;case"bottom":return je.slideInBottom;default:return je.slideInRight}return je.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return je.fadeIn;if(e==="slide in")switch(t){case"left":return je.slideInLeft;case"right":return je.slideInRight;case"top":return je.slideInTop;case"bottom":return je.slideInBottom;default:return je.slideInRight}return je.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return je.fadeOut;if(e==="slide in")switch(t){case"left":return je.slideOutLeft;case"right":return je.slideOutRight;case"top":return je.slideOutTop;case"bottom":return je.slideOutBottom;default:return je.slideOutRight}return je.fadeOut})(),s=(()=>{if(e==="fade in")return je.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return je.slideOutLeft;case"right":return je.slideOutRight;case"top":return je.slideOutTop;case"bottom":return je.slideOutBottom;default:return je.slideOutRight}return je.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const kp=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:l})=>{const[d,c]=a.useState(!1),{url:u}=e.thumbnailBlock.cover;return a.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:u,alt:"Cover",className:je.heroImage,onClick:()=>c(!0)}),r.jsx(Pp,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},Pp=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:l,metadata:d})=>{var Se;const{widthSettings:c,fontSettings:u,letterSpacing:m,textAlign:w,wordSpacing:S,fontSizeLineHeight:T,textAppearance:v,color:C}=i.imageCaption??{},[x,M]=a.useState(0),[L,R]=a.useState(0),[J,A]=a.useState(!1),[ee,E]=a.useState(!1),[I,F]=a.useState({}),f=a.useRef(null),b=a.useRef(null),W=a.useRef(null),O=a.useRef(!1),K=a.useRef(null),G=a.useRef(null),Q=a.useRef(null),V=a.useRef(null),N=a.useRef(!1),_=a.useRef(null),[$,U]=a.useState(!1),{appear:X,triggers:ce,slider:j,thumbnail:ge,controls:h,area:he,caption:Y,layout:be}=o.lightboxBlock,{appearClass:Ce,backdropAppearClass:le,backdropDisappearClass:re,disappearClass:D}=Mp(X.type,X.direction),se=(d==null?void 0:d.itemId)??null;a.useEffect(()=>{const q=()=>{setTimeout(()=>{var ve,pe;(pe=(ve=f.current)==null?void 0:ve.splide)==null||pe.refresh()},16)},me=()=>{R(ve=>ve+1)};return window.addEventListener("ArticleEditor.Layout:change",q),window.addEventListener("ArticleEditor.ComponentContent:change",me),()=>{window.removeEventListener("ArticleEditor.Layout:change",q),window.removeEventListener("ArticleEditor.ComponentContent:change",me)}},[]),a.useEffect(()=>{if(!e||!ge.isActive){U(!1);return}const q=_.current;if(!q)return;const me=()=>{j.direction==="horiz"?U(q.scrollWidth>q.clientWidth):U(q.scrollHeight>q.clientHeight)};me();const ve=new ResizeObserver(me);return ve.observe(q),()=>ve.disconnect()},[e,ge.isActive,n.length,I,j.direction]);const ue=a.useCallback(()=>{const q=window.matchMedia("(max-width: 768px)").matches,me=hs(he.color);q&&!l&&me>.9&&(document.body.style.backgroundColor=""),A(!0),O.current=!0;const ve=pe=>{pe.target===K.current&&pe.animationName&&(K.current&&G.current&&K.current.removeEventListener("animationend",G.current),G.current=null,O.current&&(O.current=!1,t()),A(!1))};K.current&&(G.current=ve,K.current.addEventListener("animationend",ve))},[t,he.color,l]),_e=(q,me,ve)=>{var pe,Ae;if(q){if(ce.type==="click"&&ce.switch==="image")ce.repeat==="close"&&x===n.length-1?ue():(pe=f.current)==null||pe.go("+1");else if(ce.type==="click"&&ce.switch==="50/50"){const $e=q.getBoundingClientRect(),z=me-$e.left,de=ve-$e.top,ae=$e.width,H=$e.height;let ie;j.direction==="horiz"?ie=z<ae/2?"-1":"+1":ie=de<H/2?"-1":"+1",(Ae=f.current)==null||Ae.go(ie)}}},xe=q=>{if(N.current){N.current=!1;return}const me=n[x],ve=(me==null?void 0:me.image.objectFit)==="cover";let pe,Ae;if("changedTouches"in q&&q.changedTouches.length>0)pe=q.changedTouches[0].clientX,Ae=q.changedTouches[0].clientY;else if("clientX"in q)pe=q.clientX,Ae=q.clientY;else return;let $e;if(ve&&W.current){const z=gs(W.current);$e=pe>=z.left&&pe<=z.right&&Ae>=z.top&&Ae<=z.bottom}else{const z=W.current?rr(W.current):null;if(!z){q.target===q.currentTarget&&ue();return}$e=pe>=z.x&&pe<=z.x+z.width&&Ae>=z.y&&Ae<=z.y+z.height}$e?_e(W.current,pe,Ae):ue()},Pe=q=>{const me=q.target;(me.classList.contains(je.thumbsWrapper)||me.classList.contains(je.thumbsContainer))&&xe(q)};a.useEffect(()=>{if(!e)return;const q=me=>{var ve,pe;if(me.key==="Escape"){ue();return}if(me.key==="ArrowRight"){M(Ae=>(Ae+1)%Math.max(n.length,1)),(ve=f.current)==null||ve.go("+1");return}me.key==="ArrowLeft"&&(M(Ae=>(Ae-1+Math.max(n.length,1))%Math.max(n.length,1)),(pe=f.current)==null||pe.go("-1"))};return window.addEventListener("keydown",q),()=>{window.removeEventListener("keydown",q)}},[e,ue,n.length]),a.useEffect(()=>{if(e){if(M(0),R(me=>me+1),O.current=!1,A(!1),E(!1),F({}),!se)return;const q=new CustomEvent("page-overlay",{detail:{itemId:se}});window.dispatchEvent(q)}return()=>{K.current&&G.current&&(K.current.removeEventListener("animationend",G.current),G.current=null),E(!1)}},[e,se]),a.useEffect(()=>{b.current!==null&&b.current!==j.type&&R(q=>q+1),b.current=j.type},[j.type]),a.useEffect(()=>{if(!e)return;const q=document.body.style.overflow,me=window.matchMedia("(max-width: 768px)").matches,ve=hs(he.color);document.body.style.overflow="hidden",E(!1);const pe=$e=>{$e.target===K.current&&!O.current&&$e.animationName&&(me&&!l&&ve>.9&&(document.body.style.backgroundColor=he.color),E(!0),K.current&&Q.current&&K.current.removeEventListener("animationend",Q.current),Q.current=null)};K.current&&(Q.current=pe,K.current.addEventListener("animationend",pe));const Ae=$e=>{const z=$e.target;z&&(z.closest(`.${je.thumbsWrapper}`)||z.closest(`.${je.thumbsContainer}`))||j.type!=="slide"&&$e.preventDefault()};return document.addEventListener("touchmove",Ae,{passive:!1}),()=>{document.body.style.overflow=q,document.removeEventListener("touchmove",Ae),K.current&&Q.current&&(K.current.removeEventListener("animationend",Q.current),Q.current=null),E(!1)}},[e,l,he.color,j.type]),a.useEffect(()=>{if(!e)return;const q=me=>{var pe,Ae;if(O.current){me.stopPropagation();return}if(N.current){N.current=!1;return}const ve=me.target;if(!(ve&&(ve.closest(`.${je.thumbsContainer}`)||ve.closest(`.${je.thumbItem}`)||ve.closest(`.${je.arrow}`)||ve.closest(`.${je.closeButton}`)||ve.closest(`.${je.caption}`)))){if(j.type==="slide"&&ce.type==="drag"&&((Ae=(pe=f.current)==null?void 0:pe.splide)!=null&&Ae.root)){const $e=f.current.splide.root;if(ve&&($e.contains(ve)||$e===ve))return}if(me.touches.length===0&&me.changedTouches.length>0){const $e=n[x],z=($e==null?void 0:$e.image.objectFit)==="cover",de=me.changedTouches[0];let ae;if(z&&W.current){const H=gs(W.current);ae=de.clientX>=H.left&&de.clientX<=H.right&&de.clientY>=H.top&&de.clientY<=H.bottom}else{const H=W.current?rr(W.current):null;if(!H)return;ae=de.clientX>=H.x&&de.clientX<=H.x+H.width&&de.clientY>=H.y&&de.clientY<=H.y+H.height}if(!ae){me.stopPropagation(),O.current=!0;const H=ie=>{ie.stopPropagation(),ie.preventDefault(),document.removeEventListener("click",H,!0)};document.addEventListener("click",H,!0),ue()}}}};return document.addEventListener("touchend",q,{passive:!0}),()=>{document.removeEventListener("touchend",q)}},[e,ue,x,n]);const Fe=(j.type==="scale"||j.type==="fade")&&j.direction==="vert"&&ce.type==="drag";a.useEffect(()=>{var ie,Ie;if(!e||!Fe||!((Ie=(ie=f.current)==null?void 0:ie.splide)!=null&&Ie.root))return;const q=f.current.splide.root,me=30,ve=(oe,P)=>{if(V.current){const He=Math.abs(oe-V.current.x),We=Math.abs(P-V.current.y);(He>0||We>0)&&(N.current=!0)}},pe=oe=>{V.current&&(oe.preventDefault(),ve(oe.clientX,oe.clientY))},Ae=oe=>{V.current&&oe.touches.length>0&&(oe.preventDefault(),ve(oe.touches[0].clientX,oe.touches[0].clientY))},$e=(oe,P)=>{if(!V.current||!f.current){V.current=null;return}const He=Math.abs(oe-V.current.x),We=Math.abs(P-V.current.y);We>me&&We>He&&f.current.go(P<V.current.y?"+1":"-1"),V.current=null},z=oe=>{V.current&&$e(oe.clientX,oe.clientY),document.removeEventListener("pointerup",z),document.removeEventListener("pointercancel",z),document.removeEventListener("pointermove",pe)},de=oe=>{if(V.current){if(oe.changedTouches.length>0){const P=oe.changedTouches[0];$e(P.clientX,P.clientY)}document.removeEventListener("touchend",de),document.removeEventListener("touchcancel",de),document.removeEventListener("touchmove",Ae)}},ae=oe=>{V.current={x:oe.clientX,y:oe.clientY},N.current=!1,document.addEventListener("pointermove",pe,{passive:!1}),document.addEventListener("pointerup",z),document.addEventListener("pointercancel",z)},H=oe=>{oe.touches.length>0&&(V.current={x:oe.touches[0].clientX,y:oe.touches[0].clientY},N.current=!1,document.addEventListener("touchmove",Ae,{passive:!1}),document.addEventListener("touchend",de),document.addEventListener("touchcancel",de))};return q.addEventListener("pointerdown",ae),q.addEventListener("touchstart",H),()=>{q.removeEventListener("pointerdown",ae),q.removeEventListener("touchstart",H),document.removeEventListener("pointermove",pe),document.removeEventListener("pointerup",z),document.removeEventListener("pointercancel",z),document.removeEventListener("touchmove",Ae),document.removeEventListener("touchend",de),document.removeEventListener("touchcancel",de),V.current=null,N.current=!1}},[e,Fe,L]);const Te={backgroundColor:he.color,backdropFilter:`blur(${he.blur}px)`,animationDuration:`${parseInt(X.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:mi.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:l?null:K,className:at(je.background,J?re:le,{[je.editor]:l},{[je.hidden]:!e}),style:{...Te,...ee&&!l&&!J?{position:"absolute"}:{}}}),r.jsxs("div",{ref:l?K:null,className:at(je.contentStyle,J?D:Ce,{[je.editor]:l},{[je.hidden]:!e}),style:{animationDuration:`${parseInt(X.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Ha,{onMove:q=>M(q.index),ref:f,className:je.lightboxSplide,options:{arrows:!1,speed:j.duration?parseInt(j.duration):500,direction:j.direction==="horiz"||j.type==="fade"||j.type==="scale"?"ltr":"ttb",pagination:!1,drag:ce.type==="drag"&&!Fe,perPage:1,width:"100%",height:"100%",type:j.type==="fade"||j.type==="scale"?"fade":"loop",padding:0,rewind:ce.repeat!=="close",start:0},style:{"--splide-speed":j.duration},children:n.map((q,me)=>{const ve=Ao(be.position,be.offset,l),pe=`${y.scalingValue(be.padding.top,l)} ${y.scalingValue(be.padding.right,l)} ${y.scalingValue(be.padding.bottom,l)} ${y.scalingValue(be.padding.left,l)}`,Ae=j.type==="scale"?(()=>{const{transform:$e,...z}=ve;return{...z,position:"absolute",padding:pe,boxSizing:"border-box","--position-transform":$e||"none"}})():{...ve,position:"absolute",padding:pe,boxSizing:"border-box"};return r.jsx(Na,{children:r.jsx("div",{className:je.imgWrapper,onClick:xe,children:r.jsx("img",{ref:me===x?W:null,className:at(je.imageStyle,{[je.contain]:q.image.objectFit==="contain",[je.cover]:q.image.objectFit==="cover",[je.scaleSlide]:j.type==="scale"}),src:q.image.url,alt:q.image.name??"",style:{...Ae,pointerEvents:q.image.objectFit==="contain"?"none":"auto"}})})},me)})},L),h.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:at(je.arrow,{[je.arrowVertical]:j.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:je.arrowInner,style:{transform:`translate(${y.scalingValue(h.offset.x,l)}, ${y.scalingValue(h.offset.y*(j.direction==="horiz"?1:-1),l)}) scale(${h.scale}) rotate(${j.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var q;return(q=f.current)==null?void 0:q.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&r.jsx(nn,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:at(je.arrowImg,je.mirror)}),!h.arrowsImgUrl&&r.jsx(fs,{color:h.color,className:at(je.arrowIcon,je.arrowImg,je.mirror)})]})}),r.jsx("div",{className:at(je.arrow,je.nextArrow,{[je.arrowVertical]:j.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:je.arrowInner,style:{transform:`translate(${y.scalingValue(h.offset.x*(j.direction==="horiz"?-1:1),l)}, ${y.scalingValue(h.offset.y,l)}) scale(${h.scale}) rotate(${j.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var q;return(q=f.current)==null?void 0:q.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&r.jsx(nn,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:je.arrowImg}),!h.arrowsImgUrl&&r.jsx(fs,{color:h.color,className:at(je.arrowIcon,je.arrowImg)})]})})]}),he.closeIconUrl&&(()=>{const q=Ao(he.closeIconAlign,he.closeIconOffset,l),me=`scale(${he.closeIconScale})`,ve=q.transform?`${q.transform} ${me}`:me;return r.jsx("button",{className:je.closeButton,style:{...q,transform:ve},onClick:ue,"aria-label":"Close lightbox",children:r.jsx(nn,{url:he.closeIconUrl,fill:he.closeIconColor??"#000000",hoverFill:he.closeIconHover??"#cccccc"})})})(),Y&&Y.isActive&&i.imageCaption&&((Se=n[x])==null?void 0:Se.imageCaption)&&r.jsx("div",{className:je.caption,style:{...Ao(Y.alignment,Y.offset,l),fontFamily:wr(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":y.scalingValue(c.width,l),letterSpacing:y.scalingValue(m,l),wordSpacing:y.scalingValue(S,l),textAlign:w,fontSize:y.scalingValue(T.fontSize,l),lineHeight:y.scalingValue(T.lineHeight,l),textTransform:v.textTransform??"none",textDecoration:v.textDecoration??"none",fontVariant:v.fontVariant??"normal",color:C},onClick:q=>q.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:je.captionTextInner,style:{"--link-color":Y.linkColor,"--link-hover-color":Y.linkHoverColor},children:r.jsx(pi,{content:n[x].imageCaption})})}),ge.isActive&&(()=>{const[q,me]=ge.position.split("-"),ve=j.direction==="horiz"?`${q}-left`:ge.position,pe=Ao(ve,ge.offset,l),Ae=()=>{if(j.direction==="horiz"){if(me==="left")return"flex-start";if(me==="center")return"center";if(me==="right")return"flex-end"}else{if(q==="top")return"flex-start";if(q==="middle")return"center";if(q==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:_,className:je.thumbsWrapper,onClick:$e=>Pe($e),style:{position:l?"absolute":"fixed",...pe,...j.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:at(je.thumbsContainer,{[je.thumbsContainerVertical]:j.direction==="vert",[je.thumbsAlignStart]:ge.align==="start",[je.thumbsAlignCenter]:ge.align==="center",[je.thumbsAlignEnd]:ge.align==="end"}),style:{gap:y.scalingValue(ge.grid.gap,l),justifyContent:$?"flex-start":Ae()},children:n.map(($e,z)=>{const de=z===x,ae=I[z],ie=ge.grid.size*(de?ge.activeState.scale:1),Ie=()=>{if(ge.fit!=="fit")return{};if(!ae)return j.direction==="horiz"?{height:y.scalingValue(ie,l)}:{width:y.scalingValue(ie,l)};const oe=ae.width/ae.height;if(j.direction==="horiz"){const P=ie,He=P*oe;return{width:y.scalingValue(He,l),height:y.scalingValue(P,l)}}else{const P=ie,He=P/oe;return{width:y.scalingValue(P,l),height:y.scalingValue(He,l)}}};return r.jsx("button",{className:je.thumbItem,style:{...j.direction==="horiz"&&ge.fit!=="fit"?{height:y.scalingValue(ie,l)}:{},...j.direction==="vert"&&ge.fit!=="fit"?{width:y.scalingValue(ie,l)}:{},...ge.fit==="cover"?{width:y.scalingValue(ie,l),height:y.scalingValue(ie,l)}:{},...Ie(),transition:de?"all 0.25s ease-out":"none",opacity:de?ge.activeState.opacity/100:ge.opacity/100,"--thumb-hover":ge.activeState.opacity/100},onClick:oe=>{var P;oe.stopPropagation(),M(z),(P=f.current)==null||P.go(z)},onMouseEnter:()=>{var oe;ge.triggers==="hov"&&((oe=f.current)==null||oe.go(z))},children:r.jsx("img",{src:$e.image.url,alt:$e.image.name??"",onLoad:oe=>{const P=oe.currentTarget;P.naturalWidth&&P.naturalHeight&&F(He=>({...He,[z]:{width:P.naturalWidth,height:P.naturalHeight}}))},style:{objectFit:ge.fit==="cover"?"cover":"contain",...ge.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ge.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${$e.image.name}-${z}`)})})})})()]})]}),document.getElementById(s))};function fs({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 Ap={element:kp,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 Fo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Fp(e){return`
6
+ */const Cu="RichTextRenderer-module__link___BWeZ2",Tu={link:Cu},Lu=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))},wr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Lu(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function cn(e){const{color:t,...n}=e;return n}function Xt(e,t){var o,s,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:wr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:y.scalingValue(e.letterSpacing,t),wordSpacing:y.scalingValue(e.wordSpacing,t),fontSize:y.scalingValue(n,t),lineHeight:i!==void 0?y.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}const pi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:Tu.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:Iu(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 Iu(e){return{...e.fontFamily&&{fontFamily:wr(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 Ru="SvgImage-module__svg___q3xE-",Eu="SvgImage-module__img___VsTm-",us={svg:Ru,img:Eu},Mu=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},ku=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,nn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,l]=a.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return a.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(d)}},[]),!Mu(e)||!s?r.jsx("img",{src:e,alt:"",className:ct(us.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:ct(us.svg,i),style:{"--svg":ku(e),"--fill":t,"--hover-fill":n,...o??{}}})},Pu={"top-left":ot.topLeftAlignment,"top-center":ot.topCenterAlignment,"top-right":ot.topRightAlignment,"middle-left":ot.middleLeftAlignment,"middle-center":ot.middleCenterAlignment,"middle-right":ot.middleRightAlignment,"bottom-left":ot.bottomLeftAlignment,"bottom-center":ot.bottomCenterAlignment,"bottom-right":ot.bottomRightAlignment};function Au({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=a.useState(null),{widthSettings:l,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:m,fontSizeLineHeight:w,textAppearance:S,color:T}=n.imageCaption??{},[v,C]=a.useState(void 0),[x,M]=a.useState(null),[L,R]=a.useState(0),[Z,P]=a.useState(0),{direction:Q,transition:E,controls:I,pagination:W,imageCaption:f,triggers:b}=e,_=a.useRef(E.type),{x:O,y:K}=e.controls.offset,G=J=>{o&&o.go(J)};return a.useEffect(()=>{if(!x)return;const J=new ResizeObserver(V=>{if(!o)return;const[N]=V;C({width:Math.round(N.contentRect.width),height:Math.round(N.contentRect.height)})});return J.observe(x),()=>J.unobserve(x)},[x]),a.useEffect(()=>{!o||_.current===E.type||(P(J=>J+1),_.current=E.type)},[E.type]),r.jsx("div",{className:ct(ot.wrapper,{[ot.editor]:i}),ref:M,children:r.jsxs("div",{className:ot.sliderInner,style:{width:v?v.width:"100%",height:v?v.height:"100%",backgroundColor:E.backgroundColor&&E.type==="fade in"?E.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:ct(ot.captionBlock),children:r.jsx("div",{className:ot.captionTextWrapper,children:t.map((J,V)=>r.jsx("div",{className:ct(ot.captionText,Pu[f.alignment],{[ot.withPointerEvents]:V===L&&i,[ot.active]:V===L}),style:{fontFamily:wr(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":y.scalingValue(l.width,i),letterSpacing:y.scalingValue(c,i),wordSpacing:y.scalingValue(m,i),textAlign:u,fontSize:y.scalingValue(w.fontSize,i),lineHeight:y.scalingValue(w.lineHeight,i),textTransform:S.textTransform??"none",textDecoration:S.textDecoration??"none",fontVariant:S.fontVariant??"normal",color:T,transitionDuration:E.duration?`${Math.round(parseInt(E.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:ot.captionTextInner,style:{"--link-hover-color":f.linkHoverColor,"--link-color":f.linkColor,position:"relative",top:y.scalingValue(f.offset.y,i),left:y.scalingValue(f.offset.x,i)},children:r.jsx(pi,{content:J.imageCaption})})},V))})}),r.jsx(Ha,{onMove:J=>{R(J.index)},ref:s,options:{arrows:!1,speed:E.duration?parseInt(E.duration):500,autoplay:b.autoPlay!==null,...b.autoPlay!==null&&{interval:parseInt(b.autoPlay)*1e3},direction:Q==="horiz"||E.type==="fade in"?"ltr":"ttb",pagination:!1,drag:b.triggersList.drag,perPage:1,width:v?v.width:"100%",height:v?v.height:"100%",type:E.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((J,V)=>r.jsx(Na,{children:r.jsx("div",{className:ot.sliderItem,children:r.jsx("div",{className:ot.imgWrapper,children:r.jsx("img",{className:ct(ot.sliderImage,{[ot.contain]:J.image.objectFit==="contain",[ot.cover]:J.image.objectFit==="cover"}),src:J.image.url,alt:J.image.name??""})})})},V))},Z),I.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:ct(ot.arrow,{[ot.arrowVertical]:Q==="vert",[ot.hoverArrow]:I.show==="on hover"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:r.jsxs("button",{onClick:()=>{G("-1")},className:ot.arrowInner,style:{transform:`translate(${y.scalingValue(O,i)}, ${y.scalingValue(K*(Q==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${Q==="horiz"?"0deg":"90deg"})`},children:[I.arrowsImgUrl&&r.jsx(nn,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:ct(ot.arrowImg,ot.mirror)}),!I.arrowsImgUrl&&r.jsx(ps,{color:I.color,className:ct(ot.arrowIcon,ot.arrowImg,ot.mirror)})]})}),r.jsx("div",{className:ct(ot.arrow,ot.nextArrow,{[ot.arrowVertical]:Q==="vert",[ot.hoverArrow]:I.show==="on hover"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:r.jsxs("button",{className:ot.arrowInner,onClick:()=>G("+1"),style:{transform:`translate(${y.scalingValue(O*(Q==="horiz"?-1:1),i)}, ${y.scalingValue(K,i)}) scale(${e.controls.scale/100}) rotate(${Q==="horiz"?"0deg":"90deg"})`},children:[I.arrowsImgUrl&&r.jsx(nn,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:ot.arrowImg}),!I.arrowsImgUrl&&r.jsx(ps,{color:I.color,className:ct(ot.arrowIcon,ot.arrowImg)})]})})]}),b.triggersList.click&&r.jsx("div",{className:ot.clickOverlay,onClick:()=>{o&&o.go("+1")}}),W.isActive&&r.jsx("div",{className:ct(ot.pagination,{[ot.paginationInsideBottom]:W.position==="inside-1"&&Q==="horiz",[ot.paginationInsideTop]:W.position==="inside-2"&&Q==="horiz",[ot.paginationOutsideBottom]:W.position==="outside-1"&&Q==="horiz",[ot.paginationOutsideTop]:W.position==="outside-2"&&Q==="horiz",[ot.paginationInsideLeft]:W.position==="inside-1"&&Q==="vert",[ot.paginationInsideRight]:W.position==="inside-2"&&Q==="vert",[ot.paginationOutsideLeft]:W.position==="outside-1"&&Q==="vert",[ot.paginationOutsideRight]:W.position==="outside-2"&&Q==="vert",[ot.paginationVertical]:Q==="vert"}),children:r.jsx("div",{className:ot.paginationInner,style:{backgroundColor:W.colors[2],transform:`scale(${W.scale/100}) translate(${y.scalingValue(W.offset.x,i)}, ${y.scalingValue(W.offset.y,i)}) rotate(${Q==="horiz"?"0deg":"90deg"})`},children:t.map((J,V)=>r.jsx("button",{onClick:()=>{o&&o.go(V)},className:ct(ot.paginationItem),children:r.jsx("div",{className:ct(ot.dot,{[ot.activeDot]:V===L}),style:{backgroundColor:V===L?W.colors[0]:W.colors[1],"--pagination-hover-color":W.hover}})},V))})})]})})}function ps({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 Fu={element:Au,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"]}},Wu="ImageRevealSlider-module__imageRevealSlider___UE5Ob",_u="ImageRevealSlider-module__image___Qjt-e",Hu="ImageRevealSlider-module__link___N-iLG",Nu="ImageRevealSlider-module__cursor___2U03d",yi={imageRevealSlider:Wu,image:_u,link:Hu,cursor:Nu};function ms(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*s,d=s/2,c=l/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function Wr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ou(e,t,n,i){let o,s;if(t==="custom"){o=n;const l=await Wr(e);s=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Wr(e);s=l.height/l.width*o}else{const l=await Wr(e);o=l.width,s=l.height}return{width:o,height:s,finalWidth:`${o}px`}}function ju({settings:e,content:t,isEditor:n}){const[i,o]=a.useState(null),[s,l]=a.useState([]),[d,c]=a.useState(0),u=a.useRef(0),[m,w]=a.useState({x:0,y:0}),[S,T]=a.useState(1),[v,C]=a.useState("none"),x=a.useRef({x:0,y:0}),[M,L]=a.useState(!1),{sizeType:R,imageWidth:Z,randomRangeImageWidth:P}=e.imageSize,{revealPosition:Q,visible:E}=e.position,{cursorType:I,target:W,defaultCursorScale:f,defaultCursor:b,hoverCursorScale:_,hoverCursor:O}=e.cursor;a.useEffect(()=>{if(!i)return;const J=(H,$)=>{const U=i.getBoundingClientRect(),Y=H-U.left,se=$-U.top;if(w({x:Y,y:se}),I==="system"){C("none"),T(1);return}const j=Y,ge=se,h=document.elementFromPoint(U.left+j,U.top+ge);if(h&&h.closest("a")){C("none"),T(1);return}const ue=ms(j,ge,s)||W==="area"?{img:O??"none",scale:_}:{img:b??"none",scale:f};C(ue.img),T(ue.scale)},V=H=>{H.stopPropagation(),x.current={x:H.clientX,y:H.clientY},J(H.clientX,H.clientY)},N=()=>{M&&J(x.current.x,x.current.y)};return i.addEventListener("mousemove",V),window.addEventListener("scroll",N,!0),()=>{i.removeEventListener("mousemove",V),window.removeEventListener("scroll",N,!0)}},[i,M,m,I,W,O,b,_,f,s]),a.useEffect(()=>{M||(C("none"),T(0))},[M]);const K=async(J,V,N,H={})=>{const{width:$,height:U,finalWidth:Y}=await Ou(J.image.url,R,Z,P);let se=0,j=0;Q==="same"?(se=V/2,j=N/2):(se=H.x??Math.random()*V,j=H.y??Math.random()*N);const ge=Math.min(Math.max(se,$/2),V-$/2),h=Math.min(Math.max(j,U/2),N-U/2);return{id:u.current++,url:J.image.url,link:J.link,name:J.image.name,x:ge,y:h,width:Y}};a.useEffect(()=>{if(!i||t.length===0)return;const J=i.getBoundingClientRect(),V=J.width,N=J.height,H=[];(async()=>{const U=t[0],Y=await K(U,V,N);H.push(Y),l(H),c(1)})()},[R,Z,P,Q,i]),a.useEffect(()=>{E==="last One"&&l(J=>J.length>0?[J[J.length-1]]:[])},[E]);const G=async J=>{if(!i)return;const V=i.getBoundingClientRect(),N=J.clientX-V.left,H=J.clientY-V.top;if(W==="image"&&!ms(N,H,s))return;let $=0,U=0;Q==="on Click"?($=N,U=H):Q==="same"?($=V.width/2,U=V.height/2):($=Math.random()*V.width,U=Math.random()*V.height);const Y=t[d],se=await K(Y,V.width,V.height,{x:$,y:U});l(j=>E==="all"?[...j,se]:[se]),c(j=>j>=t.length-1?0:j+1)};return r.jsxs("div",{ref:o,onClick:G,onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),className:yi.imageRevealSlider,style:{cursor:v==="none"?"default":"none"},children:[s.map(J=>r.jsx("div",{className:yi.wrapper,style:{top:`${J.y}px`,left:`${J.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:J.width??"auto",height:"auto",cursor:v==="none"?"default":"none"},children:W==="area"&&J.link?r.jsx("a",{href:J.link,target:"_blank",className:yi.link,children:r.jsx("img",{src:J.url,alt:J.name,className:yi.image},J.id)}):r.jsx("img",{src:J.url,alt:J.name,className:yi.image},J.id)},J.id)),M&&r.jsx("div",{className:yi.cursor,style:{left:`${m.x}px`,top:`${m.y}px`,transform:`translate(-50%, -50%) scale(${S})`,backgroundImage:`url('${v}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const zu={element:ju,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:""}]}}}},Bu="LightBox-module__hidden___9s-9x",Du="LightBox-module__heroImage___sTxNF",Vu="LightBox-module__background___rm9ml",Gu="LightBox-module__editor___4ACaY",qu="LightBox-module__contentStyle___Bgnsq",Ku="LightBox-module__imageStyle___tLIlB",Uu="LightBox-module__imgWrapper___LuFUp",Xu="LightBox-module__contain___8-yaS",Yu="LightBox-module__cover___hNvOG",Zu="LightBox-module__caption___b6L2I",Ju="LightBox-module__captionTextInner___rCGNH",Qu="LightBox-module__lightboxSplide___XFuWC",ep="LightBox-module__arrow___iz38X",tp="LightBox-module__arrowVertical___Zfz81",np="LightBox-module__nextArrow___zkAQN",ip="LightBox-module__arrowInner___p48sW",op="LightBox-module__arrowIcon___3VaFf",rp="LightBox-module__arrowImg___pNV88",ap="LightBox-module__mirror___pjeXc",sp="LightBox-module__thumbsWrapper___GB-nU",lp="LightBox-module__thumbsContainerVertical___wttk5",cp="LightBox-module__thumbsContainer___osSma",dp="LightBox-module__thumbsAlignStart___MO6tY",up="LightBox-module__thumbsAlignCenter___Q4sUx",pp="LightBox-module__thumbsAlignEnd___p4y9R",mp="LightBox-module__thumbItem___HvnF3",gp="LightBox-module__closeButton___g2khP",hp="LightBox-module__fadeIn___0m5GW",fp="LightBox-module__slideInLeft___gPYwC",yp="LightBox-module__slideInRight___S-pPp",vp="LightBox-module__slideInTop___DFdAj",bp="LightBox-module__slideInBottom___m27kZ",xp="LightBox-module__fadeOut___55qBR",wp="LightBox-module__slideOutLeft___NvU7P",Sp="LightBox-module__slideOutRight___SK7eC",$p="LightBox-module__slideOutTop___Vgg0z",Cp="LightBox-module__slideOutBottom___nJ0Ef",Tp="LightBox-module__scaleSlide___vZriG",Be={hidden:Bu,heroImage:Du,background:Vu,editor:Gu,contentStyle:qu,imageStyle:Ku,imgWrapper:Uu,contain:Xu,cover:Yu,caption:Zu,captionTextInner:Ju,lightboxSplide:Qu,arrow:ep,arrowVertical:tp,nextArrow:np,arrowInner:ip,arrowIcon:op,arrowImg:rp,mirror:ap,thumbsWrapper:sp,thumbsContainerVertical:lp,thumbsContainer:cp,thumbsAlignStart:dp,thumbsAlignCenter:up,thumbsAlignEnd:pp,thumbItem:mp,closeButton:gp,fadeIn:hp,slideInLeft:fp,slideInRight:yp,slideInTop:vp,slideInBottom:bp,fadeOut:xp,slideOutLeft:wp,slideOutRight:Sp,slideOutTop:$p,slideOutBottom:Cp,scaleSlide:Tp},Ao=(e,t,n)=>{const i={},[o,s]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),s==="left"?(i.left="0",i.right="auto"):s==="center"?(i.left="50%",i.right="auto"):s==="right"&&(i.left="auto",i.right="0"),o==="middle"&&s==="center"?i.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), calc(-50% + ${y.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${y.scalingValue(t.x,n)}, calc(-50% + ${y.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), ${y.scalingValue(t.y,n)})`:i.transform=`translate(${y.scalingValue(t.x,n)}, ${y.scalingValue(t.y,n)})`,i};function ql(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 Lp(e){const t=e.trim().split(/\s+/),n=i=>{if(i.endsWith("%"))return parseFloat(i)/100;switch(i){case"left":case"top":return 0;case"right":case"bottom":return 1;case"center":return .5;default:return .5}};if(t.length===1){const i=t[0];return i==="center"?{x:.5,y:.5}:i==="top"||i==="bottom"?{x:.5,y:n(i)}:i==="left"||i==="right"?{x:n(i),y:.5}:{x:n(i),y:.5}}return{x:n(t[0]),y:n(t[1])}}function Kl(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,s=n/i;if(s>o){const d=e;return{renderedW:d,renderedH:d/s}}const l=t;return{renderedW:l*s,renderedH:l}}function Ip(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,s=n/i;if(s>o){const d=t;return{renderedW:d*s,renderedH:d}}const l=e;return{renderedW:l,renderedH:l/s}}function Ul(e,t,n,i,o){const{x:s,y:l}=Lp(o);return{offsetX:s*(e-n),offsetY:l*(t-i)}}function Rp(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,s=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:d}=window.getComputedStyle(e),c=l==="cover"?Ip:Kl,{renderedW:u,renderedH:m}=c(n,i,o,s),{offsetX:w,offsetY:S}=Ul(n,i,u,m,d),T=(w+u/2)/n*100,v=(S+m/2)/i*100;return`${T}% ${v}%`}function Ep(e){return Rp(e)}function rr(e){const t=e.getBoundingClientRect(),n=ql(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,l=e.naturalHeight,{renderedW:d,renderedH:c}=Kl(i,o,s,l),u=window.getComputedStyle(e).objectPosition,{offsetX:m,offsetY:w}=Ul(i,o,d,c,u),S=t.left+n.left,T=t.top+n.top;return{x:m+S,y:w+T,width:d,height:c}}function gs(e){const t=e.getBoundingClientRect(),n=ql(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function hs(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 Mp(e,t){const n=(()=>{if(e==="fade in")return Be.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Be.slideInLeft;case"right":return Be.slideInRight;case"top":return Be.slideInTop;case"bottom":return Be.slideInBottom;default:return Be.slideInRight}return Be.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Be.fadeIn;if(e==="slide in")switch(t){case"left":return Be.slideInLeft;case"right":return Be.slideInRight;case"top":return Be.slideInTop;case"bottom":return Be.slideInBottom;default:return Be.slideInRight}return Be.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return Be.fadeOut;if(e==="slide in")switch(t){case"left":return Be.slideOutLeft;case"right":return Be.slideOutRight;case"top":return Be.slideOutTop;case"bottom":return Be.slideOutBottom;default:return Be.slideOutRight}return Be.fadeOut})(),s=(()=>{if(e==="fade in")return Be.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Be.slideOutLeft;case"right":return Be.slideOutRight;case"top":return Be.slideOutTop;case"bottom":return Be.slideOutBottom;default:return Be.slideOutRight}return Be.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const kp=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:l})=>{const[d,c]=a.useState(!1),{url:u}=e.thumbnailBlock.cover;return a.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:u,alt:"Cover",className:Be.heroImage,onClick:()=>c(!0)}),r.jsx(Pp,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},Pp=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:l,metadata:d})=>{var we;const{widthSettings:c,fontSettings:u,letterSpacing:m,textAlign:w,wordSpacing:S,fontSizeLineHeight:T,textAppearance:v,color:C}=i.imageCaption??{},[x,M]=a.useState(0),[L,R]=a.useState(0),[Z,P]=a.useState(!1),[Q,E]=a.useState(!1),[I,W]=a.useState({}),f=a.useRef(null),b=a.useRef(null),_=a.useRef(null),O=a.useRef(!1),K=a.useRef(null),G=a.useRef(null),J=a.useRef(null),V=a.useRef(null),N=a.useRef(!1),H=a.useRef(null),[$,U]=a.useState(!1),{appear:Y,triggers:se,slider:j,thumbnail:ge,controls:h,area:ue,caption:X,layout:ve}=o.lightboxBlock,{appearClass:$e,backdropAppearClass:ae,backdropDisappearClass:re,disappearClass:D}=Mp(Y.type,Y.direction),ne=(d==null?void 0:d.itemId)??null;a.useEffect(()=>{const q=()=>{setTimeout(()=>{var fe,le;(le=(fe=f.current)==null?void 0:fe.splide)==null||le.refresh()},16)},pe=()=>{R(fe=>fe+1)};return window.addEventListener("ArticleEditor.Layout:change",q),window.addEventListener("ArticleEditor.ComponentContent:change",pe),()=>{window.removeEventListener("ArticleEditor.Layout:change",q),window.removeEventListener("ArticleEditor.ComponentContent:change",pe)}},[]),a.useEffect(()=>{if(!e||!ge.isActive){U(!1);return}const q=H.current;if(!q)return;const pe=()=>{j.direction==="horiz"?U(q.scrollWidth>q.clientWidth):U(q.scrollHeight>q.clientHeight)};pe();const fe=new ResizeObserver(pe);return fe.observe(q),()=>fe.disconnect()},[e,ge.isActive,n.length,I,j.direction]);const ce=a.useCallback(()=>{const q=window.matchMedia("(max-width: 768px)").matches,pe=hs(ue.color);q&&!l&&pe>.9&&(document.body.style.backgroundColor=""),P(!0),O.current=!0;const fe=le=>{le.target===K.current&&le.animationName&&(K.current&&G.current&&K.current.removeEventListener("animationend",G.current),G.current=null,O.current&&(O.current=!1,t()),P(!1))};K.current&&(G.current=fe,K.current.addEventListener("animationend",fe))},[t,ue.color,l]),Ne=(q,pe,fe)=>{var le,Pe;if(q){if(se.type==="click"&&se.switch==="image")se.repeat==="close"&&x===n.length-1?ce():(le=f.current)==null||le.go("+1");else if(se.type==="click"&&se.switch==="50/50"){const Le=q.getBoundingClientRect(),z=pe-Le.left,de=fe-Le.top,ie=Le.width,F=Le.height;let ee;j.direction==="horiz"?ee=z<ie/2?"-1":"+1":ee=de<F/2?"-1":"+1",(Pe=f.current)==null||Pe.go(ee)}}},be=q=>{if(N.current){N.current=!1;return}const pe=n[x],fe=(pe==null?void 0:pe.image.objectFit)==="cover";let le,Pe;if("changedTouches"in q&&q.changedTouches.length>0)le=q.changedTouches[0].clientX,Pe=q.changedTouches[0].clientY;else if("clientX"in q)le=q.clientX,Pe=q.clientY;else return;let Le;if(fe&&_.current){const z=gs(_.current);Le=le>=z.left&&le<=z.right&&Pe>=z.top&&Pe<=z.bottom}else{const z=_.current?rr(_.current):null;if(!z){q.target===q.currentTarget&&ce();return}Le=le>=z.x&&le<=z.x+z.width&&Pe>=z.y&&Pe<=z.y+z.height}Le?Ne(_.current,le,Pe):ce()},We=q=>{const pe=q.target;(pe.classList.contains(Be.thumbsWrapper)||pe.classList.contains(Be.thumbsContainer))&&be(q)};a.useEffect(()=>{if(!e)return;const q=pe=>{var fe,le;if(pe.key==="Escape"){ce();return}if(pe.key==="ArrowRight"){M(Pe=>(Pe+1)%Math.max(n.length,1)),(fe=f.current)==null||fe.go("+1");return}pe.key==="ArrowLeft"&&(M(Pe=>(Pe-1+Math.max(n.length,1))%Math.max(n.length,1)),(le=f.current)==null||le.go("-1"))};return window.addEventListener("keydown",q),()=>{window.removeEventListener("keydown",q)}},[e,ce,n.length]),a.useEffect(()=>{if(e){if(M(0),R(pe=>pe+1),O.current=!1,P(!1),E(!1),W({}),!ne)return;const q=new CustomEvent("page-overlay",{detail:{itemId:ne}});window.dispatchEvent(q)}return()=>{K.current&&G.current&&(K.current.removeEventListener("animationend",G.current),G.current=null),E(!1)}},[e,ne]),a.useEffect(()=>{b.current!==null&&b.current!==j.type&&R(q=>q+1),b.current=j.type},[j.type]),a.useEffect(()=>{if(!e)return;const q=document.body.style.overflow,pe=window.matchMedia("(max-width: 768px)").matches,fe=hs(ue.color);document.body.style.overflow="hidden",E(!1);const le=Le=>{Le.target===K.current&&!O.current&&Le.animationName&&(pe&&!l&&fe>.9&&(document.body.style.backgroundColor=ue.color),E(!0),K.current&&J.current&&K.current.removeEventListener("animationend",J.current),J.current=null)};K.current&&(J.current=le,K.current.addEventListener("animationend",le));const Pe=Le=>{const z=Le.target;z&&(z.closest(`.${Be.thumbsWrapper}`)||z.closest(`.${Be.thumbsContainer}`))||j.type!=="slide"&&Le.preventDefault()};return document.addEventListener("touchmove",Pe,{passive:!1}),()=>{document.body.style.overflow=q,document.removeEventListener("touchmove",Pe),K.current&&J.current&&(K.current.removeEventListener("animationend",J.current),J.current=null),E(!1)}},[e,l,ue.color,j.type]),a.useEffect(()=>{if(!e)return;const q=pe=>{var le,Pe;if(O.current){pe.stopPropagation();return}if(N.current){N.current=!1;return}const fe=pe.target;if(!(fe&&(fe.closest(`.${Be.thumbsContainer}`)||fe.closest(`.${Be.thumbItem}`)||fe.closest(`.${Be.arrow}`)||fe.closest(`.${Be.closeButton}`)||fe.closest(`.${Be.caption}`)))){if(j.type==="slide"&&se.type==="drag"&&((Pe=(le=f.current)==null?void 0:le.splide)!=null&&Pe.root)){const Le=f.current.splide.root;if(fe&&(Le.contains(fe)||Le===fe))return}if(pe.touches.length===0&&pe.changedTouches.length>0){const Le=n[x],z=(Le==null?void 0:Le.image.objectFit)==="cover",de=pe.changedTouches[0];let ie;if(z&&_.current){const F=gs(_.current);ie=de.clientX>=F.left&&de.clientX<=F.right&&de.clientY>=F.top&&de.clientY<=F.bottom}else{const F=_.current?rr(_.current):null;if(!F)return;ie=de.clientX>=F.x&&de.clientX<=F.x+F.width&&de.clientY>=F.y&&de.clientY<=F.y+F.height}if(!ie){pe.stopPropagation(),O.current=!0;const F=ee=>{ee.stopPropagation(),ee.preventDefault(),document.removeEventListener("click",F,!0)};document.addEventListener("click",F,!0),ce()}}}};return document.addEventListener("touchend",q,{passive:!0}),()=>{document.removeEventListener("touchend",q)}},[e,ce,x,n]);const _e=(j.type==="scale"||j.type==="fade")&&j.direction==="vert"&&se.type==="drag";a.useEffect(()=>{var ee,Ie;if(!e||!_e||!((Ie=(ee=f.current)==null?void 0:ee.splide)!=null&&Ie.root))return;const q=f.current.splide.root,pe=30,fe=(oe,A)=>{if(V.current){const Oe=Math.abs(oe-V.current.x),Ae=Math.abs(A-V.current.y);(Oe>0||Ae>0)&&(N.current=!0)}},le=oe=>{V.current&&(oe.preventDefault(),fe(oe.clientX,oe.clientY))},Pe=oe=>{V.current&&oe.touches.length>0&&(oe.preventDefault(),fe(oe.touches[0].clientX,oe.touches[0].clientY))},Le=(oe,A)=>{if(!V.current||!f.current){V.current=null;return}const Oe=Math.abs(oe-V.current.x),Ae=Math.abs(A-V.current.y);Ae>pe&&Ae>Oe&&f.current.go(A<V.current.y?"+1":"-1"),V.current=null},z=oe=>{V.current&&Le(oe.clientX,oe.clientY),document.removeEventListener("pointerup",z),document.removeEventListener("pointercancel",z),document.removeEventListener("pointermove",le)},de=oe=>{if(V.current){if(oe.changedTouches.length>0){const A=oe.changedTouches[0];Le(A.clientX,A.clientY)}document.removeEventListener("touchend",de),document.removeEventListener("touchcancel",de),document.removeEventListener("touchmove",Pe)}},ie=oe=>{V.current={x:oe.clientX,y:oe.clientY},N.current=!1,document.addEventListener("pointermove",le,{passive:!1}),document.addEventListener("pointerup",z),document.addEventListener("pointercancel",z)},F=oe=>{oe.touches.length>0&&(V.current={x:oe.touches[0].clientX,y:oe.touches[0].clientY},N.current=!1,document.addEventListener("touchmove",Pe,{passive:!1}),document.addEventListener("touchend",de),document.addEventListener("touchcancel",de))};return q.addEventListener("pointerdown",ie),q.addEventListener("touchstart",F),()=>{q.removeEventListener("pointerdown",ie),q.removeEventListener("touchstart",F),document.removeEventListener("pointermove",le),document.removeEventListener("pointerup",z),document.removeEventListener("pointercancel",z),document.removeEventListener("touchmove",Pe),document.removeEventListener("touchend",de),document.removeEventListener("touchcancel",de),V.current=null,N.current=!1}},[e,_e,L]);const Te={backgroundColor:ue.color,backdropFilter:`blur(${ue.blur}px)`,animationDuration:`${parseInt(Y.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:mi.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:l?null:K,className:ct(Be.background,Z?re:ae,{[Be.editor]:l},{[Be.hidden]:!e}),style:{...Te,...Q&&!l&&!Z?{position:"absolute"}:{}}}),r.jsxs("div",{ref:l?K:null,className:ct(Be.contentStyle,Z?D:$e,{[Be.editor]:l},{[Be.hidden]:!e}),style:{animationDuration:`${parseInt(Y.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Ha,{onMove:q=>M(q.index),ref:f,className:Be.lightboxSplide,options:{arrows:!1,speed:j.duration?parseInt(j.duration):500,direction:j.direction==="horiz"||j.type==="fade"||j.type==="scale"?"ltr":"ttb",pagination:!1,drag:se.type==="drag"&&!_e,perPage:1,width:"100%",height:"100%",type:j.type==="fade"||j.type==="scale"?"fade":"loop",padding:0,rewind:se.repeat!=="close",start:0},style:{"--splide-speed":j.duration},children:n.map((q,pe)=>{const fe=Ao(ve.position,ve.offset,l),le=`${y.scalingValue(ve.padding.top,l)} ${y.scalingValue(ve.padding.right,l)} ${y.scalingValue(ve.padding.bottom,l)} ${y.scalingValue(ve.padding.left,l)}`,Pe=j.type==="scale"?(()=>{const{transform:Le,...z}=fe;return{...z,position:"absolute",padding:le,boxSizing:"border-box","--position-transform":Le||"none"}})():{...fe,position:"absolute",padding:le,boxSizing:"border-box"};return r.jsx(Na,{children:r.jsx("div",{className:Be.imgWrapper,onClick:be,children:r.jsx("img",{ref:pe===x?_:null,className:ct(Be.imageStyle,{[Be.contain]:q.image.objectFit==="contain",[Be.cover]:q.image.objectFit==="cover",[Be.scaleSlide]:j.type==="scale"}),src:q.image.url,alt:q.image.name??"",style:{...Pe,pointerEvents:q.image.objectFit==="contain"?"none":"auto"}})})},pe)})},L),h.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:ct(Be.arrow,{[Be.arrowVertical]:j.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:Be.arrowInner,style:{transform:`translate(${y.scalingValue(h.offset.x,l)}, ${y.scalingValue(h.offset.y*(j.direction==="horiz"?1:-1),l)}) scale(${h.scale}) rotate(${j.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var q;return(q=f.current)==null?void 0:q.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&r.jsx(nn,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:ct(Be.arrowImg,Be.mirror)}),!h.arrowsImgUrl&&r.jsx(fs,{color:h.color,className:ct(Be.arrowIcon,Be.arrowImg,Be.mirror)})]})}),r.jsx("div",{className:ct(Be.arrow,Be.nextArrow,{[Be.arrowVertical]:j.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:Be.arrowInner,style:{transform:`translate(${y.scalingValue(h.offset.x*(j.direction==="horiz"?-1:1),l)}, ${y.scalingValue(h.offset.y,l)}) scale(${h.scale}) rotate(${j.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var q;return(q=f.current)==null?void 0:q.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&r.jsx(nn,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:Be.arrowImg}),!h.arrowsImgUrl&&r.jsx(fs,{color:h.color,className:ct(Be.arrowIcon,Be.arrowImg)})]})})]}),ue.closeIconUrl&&(()=>{const q=Ao(ue.closeIconAlign,ue.closeIconOffset,l),pe=`scale(${ue.closeIconScale})`,fe=q.transform?`${q.transform} ${pe}`:pe;return r.jsx("button",{className:Be.closeButton,style:{...q,transform:fe},onClick:ce,"aria-label":"Close lightbox",children:r.jsx(nn,{url:ue.closeIconUrl,fill:ue.closeIconColor??"#000000",hoverFill:ue.closeIconHover??"#cccccc"})})})(),X&&X.isActive&&i.imageCaption&&((we=n[x])==null?void 0:we.imageCaption)&&r.jsx("div",{className:Be.caption,style:{...Ao(X.alignment,X.offset,l),fontFamily:wr(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":y.scalingValue(c.width,l),letterSpacing:y.scalingValue(m,l),wordSpacing:y.scalingValue(S,l),textAlign:w,fontSize:y.scalingValue(T.fontSize,l),lineHeight:y.scalingValue(T.lineHeight,l),textTransform:v.textTransform??"none",textDecoration:v.textDecoration??"none",fontVariant:v.fontVariant??"normal",color:C},onClick:q=>q.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:Be.captionTextInner,style:{"--link-color":X.linkColor,"--link-hover-color":X.linkHoverColor},children:r.jsx(pi,{content:n[x].imageCaption})})}),ge.isActive&&(()=>{const[q,pe]=ge.position.split("-"),fe=j.direction==="horiz"?`${q}-left`:ge.position,le=Ao(fe,ge.offset,l),Pe=()=>{if(j.direction==="horiz"){if(pe==="left")return"flex-start";if(pe==="center")return"center";if(pe==="right")return"flex-end"}else{if(q==="top")return"flex-start";if(q==="middle")return"center";if(q==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:H,className:Be.thumbsWrapper,onClick:Le=>We(Le),style:{position:l?"absolute":"fixed",...le,...j.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:ct(Be.thumbsContainer,{[Be.thumbsContainerVertical]:j.direction==="vert",[Be.thumbsAlignStart]:ge.align==="start",[Be.thumbsAlignCenter]:ge.align==="center",[Be.thumbsAlignEnd]:ge.align==="end"}),style:{gap:y.scalingValue(ge.grid.gap,l),justifyContent:$?"flex-start":Pe()},children:n.map((Le,z)=>{const de=z===x,ie=I[z],ee=ge.grid.size*(de?ge.activeState.scale:1),Ie=()=>{if(ge.fit!=="fit")return{};if(!ie)return j.direction==="horiz"?{height:y.scalingValue(ee,l)}:{width:y.scalingValue(ee,l)};const oe=ie.width/ie.height;if(j.direction==="horiz"){const A=ee,Oe=A*oe;return{width:y.scalingValue(Oe,l),height:y.scalingValue(A,l)}}else{const A=ee,Oe=A/oe;return{width:y.scalingValue(A,l),height:y.scalingValue(Oe,l)}}};return r.jsx("button",{className:Be.thumbItem,style:{...j.direction==="horiz"&&ge.fit!=="fit"?{height:y.scalingValue(ee,l)}:{},...j.direction==="vert"&&ge.fit!=="fit"?{width:y.scalingValue(ee,l)}:{},...ge.fit==="cover"?{width:y.scalingValue(ee,l),height:y.scalingValue(ee,l)}:{},...Ie(),transition:de?"all 0.25s ease-out":"none",opacity:de?ge.activeState.opacity/100:ge.opacity/100,"--thumb-hover":ge.activeState.opacity/100},onClick:oe=>{var A;oe.stopPropagation(),M(z),(A=f.current)==null||A.go(z)},onMouseEnter:()=>{var oe;ge.triggers==="hov"&&((oe=f.current)==null||oe.go(z))},children:r.jsx("img",{src:Le.image.url,alt:Le.image.name??"",onLoad:oe=>{const A=oe.currentTarget;A.naturalWidth&&A.naturalHeight&&W(Oe=>({...Oe,[z]:{width:A.naturalWidth,height:A.naturalHeight}}))},style:{objectFit:ge.fit==="cover"?"cover":"contain",...ge.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ge.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Le.image.name}-${z}`)})})})})()]})]}),document.getElementById(s))};function fs({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 Ap={element:kp,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 Fo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Fp(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 Wp({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const l=!!n,d=i&&t||!t,{prefix:c}=y.useScopedStyles(),{type:u="A",fieldsToShow:m=2,fields:w=[],buttonLabel:S,gap:T,fieldsGap:v,buttonCorners:C,buttonStroke:x,buttonPadding:M,isButtonFullWidth:L,inputCorners:R,inputStroke:J,inputPadding:A,inputColor:ee,inputTextColor:E,inputBorderColor:I,placeholderColor:F,buttonColor:f,buttonTextColor:b,buttonBorderColor:W,labelTextColor:O,successColor:K,errorColor:G,fontFamily:Q,inputFontSettings:V,inputFontSize:N,inputLineHeight:_,inputLetterSpacing:$,inputWordSpacing:U,inputTextAppearance:X,buttonFontSettings:ce,buttonFontSize:j,buttonLineHeight:ge,buttonLetterSpacing:h,buttonWordSpacing:he,buttonTextAppearance:Y,labelFontSettings:be,labelFontSize:Ce,labelLineHeight:le,labelLetterSpacing:re,labelWordSpacing:D,labelTextAppearance:se,statusFontSettings:ue,statusFontSize:_e,statusLineHeight:xe,statusLetterSpacing:Pe,statusWordSpacing:Fe,statusTextAppearance:Te,successMessage:Se,errorMessage:q,stateOverrides:me}=e,ve=u==="B",pe=w.slice(0,Math.min(m,w.length)),Ae={fontSettings:{fontFamily:Q,fontWeight:(V==null?void 0:V.fontWeight)??400,fontStyle:(V==null?void 0:V.fontStyle)??"normal"},fontSize:N??.01,lineHeight:_,letterSpacing:$??0,wordSpacing:U??0,textAppearance:X,color:E},$e=cn(Xt(Ae,t)),z=y.scalingValue(J??0,t),de=y.scalingValue((_??N??.01)+((A==null?void 0:A.top)??0)+((A==null?void 0:A.bottom)??0)+(u==="C"?J??0:(J??0)*2),t),ae={...$e,borderStyle:"solid",borderRadius:u==="C"?0:y.scalingValue(R??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:z,borderLeftWidth:0}:{borderWidth:z},paddingTop:y.scalingValue((A==null?void 0:A.top)??0,t),paddingRight:y.scalingValue((A==null?void 0:A.right)??0,t),paddingBottom:y.scalingValue((A==null?void 0:A.bottom)??0,t),paddingLeft:y.scalingValue((A==null?void 0:A.left)??0,t),height:de,minHeight:de},H={fontSettings:{fontFamily:Q,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:j??.01,lineHeight:ge,letterSpacing:h??0,wordSpacing:he??0,textAppearance:Y,color:b},ie=cn(Xt(H,t)),Ie=y.scalingValue(x??0,t),oe={fontSettings:{fontFamily:Q,fontWeight:(be==null?void 0:be.fontWeight)??400,fontStyle:(be==null?void 0:be.fontStyle)??"normal"},fontSize:Ce??.01,lineHeight:le,letterSpacing:re??0,wordSpacing:D??0,textAppearance:se,color:O},P=Xt(oe,t),He={fontSettings:{fontFamily:Q,fontWeight:(ue==null?void 0:ue.fontWeight)??400,fontStyle:(ue==null?void 0:ue.fontStyle)??"normal"},fontSize:_e??.01,lineHeight:xe,letterSpacing:Pe??0,wordSpacing:Fe??0,textAppearance:Te,color:K},We=cn(Xt(He,t)),et=y.buildColorVars(c,{inputColor:ee,inputTextColor:E,inputBorderColor:I,placeholderColor:F!=null&&F.trim()?F:"#cccccc",buttonColor:f,buttonTextColor:b,buttonBorderColor:W,labelTextColor:O,successColor:K,errorColor:G},_p,Hp,me),[Je,Le]=a.useState(()=>Object.fromEntries(pe.map(st=>[st.name,""]))),[Z,ne]=a.useState("idle"),[Ne,lt]=a.useState(null),De=s==="success"?"success":s==="error"?"error":Z,Oe=s==="error"?q:Ne,Ue=s==="filled",ot=a.useMemo(()=>{if(!Ue)return Je;let st=null;for(const qe of pe)(Je[qe.name]??"").trim().length>0||(st=st??{...Je},st[qe.name]="Filled");return st??Je},[Je,Ue,pe]),ct=De==="error"?y.getFormFieldValidationError(pe,ot):null,Et=`${s&&s!=="default"?`${c}-state-${s}`:""}`.trim(),ut=o==null?void 0:o.submitUrl,bt=(st,qe)=>{Le(ze=>({...ze,[st]:qe}))},Wt=async st=>{if(st.preventDefault(),!d)return;const qe=Object.fromEntries(pe.map(yt=>{var xt;return[yt.name,((xt=Je[yt.name])==null?void 0:xt.trim())??""]}).filter(([,yt])=>yt));if(!ut){ne("error"),lt("No integrations were found for this form.");return}if(Object.keys(qe).length===0)return;const ze=y.getFormFieldValidationError(pe,Je);if(ze){ne("error"),lt(ze);return}ne("submitting"),lt(null);try{const yt=await fetch(ut,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(qe)});if(!yt.ok){const xt=await yt.text();throw new Error(xt||`Request failed: ${yt.status}`)}ne("success"),Le(Object.fromEntries(pe.map(xt=>[xt.name,""])))}catch(yt){ne("error"),lt(yt instanceof Error?yt.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${Et}`.trim(),style:et,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Fp(c)}}),r.jsxs("form",{onSubmit:Wt,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:pe.map((st,qe)=>r.jsxs(a.Fragment,{children:[qe>0&&r.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${c}-control`:void 0,style:{height:y.scalingValue(v??0,t)}}),r.jsxs("div",{className:`${c}-field-group${ve?` ${c}-labeled`:""}`,children:[ve&&r.jsx("span",{className:`${c}-field-label`,style:P?{...P,lineHeight:P.fontSize}:void 0,children:st.label||st.name}),st.type==="textarea"?r.jsx("textarea",{name:st.name,autoComplete:"off",value:ot[st.name]??"",onChange:ze=>bt(st.name,ze.target.value),placeholder:st.placeholder,className:`${c}-input`,style:ae,rows:1,"data-filled":Ue||(ot[st.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:st.type==="phone"?"tel":st.type==="email"?"email":"text",name:st.name,autoComplete:"off",value:ot[st.name]??"",onChange:ze=>bt(st.name,ze.target.value),placeholder:st.placeholder,required:st.isRequired??st.type==="email",className:`${c}-input`,style:ae,"data-filled":Ue||(ot[st.name]??"").trim().length>0})]})]},qe))}),r.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${c}-control`:void 0,style:{height:y.scalingValue(T??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:y.scalingValue(C??0,t),borderWidth:Ie,paddingTop:y.scalingValue((M==null?void 0:M.top)??0,t),paddingRight:y.scalingValue((M==null?void 0:M.right)??0,t),paddingBottom:y.scalingValue((M==null?void 0:M.bottom)??0,t),paddingLeft:y.scalingValue((M==null?void 0:M.left)??0,t),pointerEvents:d?"auto":void 0,...ie,...L?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:L?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Z==="submitting"?"...":S})})})]}),De==="success"&&r.jsx("p",{className:`${c}-success`,style:{...We},children:Se}),De==="error"&&r.jsx("p",{className:`${c}-error`,style:{...We},role:"alert",children:ct??Oe??q})]})}const _p={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"},Hp=["hover","focus","filled","success","error"],Np=`import React, { useMemo, useState } from 'react';
158
+ `}function Wp({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const l=!!n,d=i&&t||!t,{prefix:c}=y.useScopedStyles(),{type:u="A",fieldsToShow:m=2,fields:w=[],buttonLabel:S,gap:T,fieldsGap:v,buttonCorners:C,buttonStroke:x,buttonPadding:M,isButtonFullWidth:L,inputCorners:R,inputStroke:Z,inputPadding:P,inputColor:Q,inputTextColor:E,inputBorderColor:I,placeholderColor:W,buttonColor:f,buttonTextColor:b,buttonBorderColor:_,labelTextColor:O,successColor:K,errorColor:G,fontFamily:J,inputFontSettings:V,inputFontSize:N,inputLineHeight:H,inputLetterSpacing:$,inputWordSpacing:U,inputTextAppearance:Y,buttonFontSettings:se,buttonFontSize:j,buttonLineHeight:ge,buttonLetterSpacing:h,buttonWordSpacing:ue,buttonTextAppearance:X,labelFontSettings:ve,labelFontSize:$e,labelLineHeight:ae,labelLetterSpacing:re,labelWordSpacing:D,labelTextAppearance:ne,statusFontSettings:ce,statusFontSize:Ne,statusLineHeight:be,statusLetterSpacing:We,statusWordSpacing:_e,statusTextAppearance:Te,successMessage:we,errorMessage:q,stateOverrides:pe}=e,fe=u==="B",le=w.slice(0,Math.min(m,w.length)),Pe={fontSettings:{fontFamily:J,fontWeight:(V==null?void 0:V.fontWeight)??400,fontStyle:(V==null?void 0:V.fontStyle)??"normal"},fontSize:N??.01,lineHeight:H,letterSpacing:$??0,wordSpacing:U??0,textAppearance:Y,color:E},Le=cn(Xt(Pe,t)),z=y.scalingValue(Z??0,t),de=y.scalingValue((H??N??.01)+((P==null?void 0:P.top)??0)+((P==null?void 0:P.bottom)??0)+(u==="C"?Z??0:(Z??0)*2),t),ie={...Le,borderStyle:"solid",borderRadius:u==="C"?0:y.scalingValue(R??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:z,borderLeftWidth:0}:{borderWidth:z},paddingTop:y.scalingValue((P==null?void 0:P.top)??0,t),paddingRight:y.scalingValue((P==null?void 0:P.right)??0,t),paddingBottom:y.scalingValue((P==null?void 0:P.bottom)??0,t),paddingLeft:y.scalingValue((P==null?void 0:P.left)??0,t),height:de,minHeight:de},F={fontSettings:{fontFamily:J,fontWeight:(se==null?void 0:se.fontWeight)??400,fontStyle:(se==null?void 0:se.fontStyle)??"normal"},fontSize:j??.01,lineHeight:ge,letterSpacing:h??0,wordSpacing:ue??0,textAppearance:X,color:b},ee=cn(Xt(F,t)),Ie=y.scalingValue(x??0,t),oe={fontSettings:{fontFamily:J,fontWeight:(ve==null?void 0:ve.fontWeight)??400,fontStyle:(ve==null?void 0:ve.fontStyle)??"normal"},fontSize:$e??.01,lineHeight:ae,letterSpacing:re??0,wordSpacing:D??0,textAppearance:ne,color:O},A=Xt(oe,t),Oe={fontSettings:{fontFamily:J,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:Ne??.01,lineHeight:be,letterSpacing:We??0,wordSpacing:_e??0,textAppearance:Te,color:K},Ae=cn(Xt(Oe,t)),rt=y.buildColorVars(c,{inputColor:Q,inputTextColor:E,inputBorderColor:I,placeholderColor:W!=null&&W.trim()?W:"#cccccc",buttonColor:f,buttonTextColor:b,buttonBorderColor:_,labelTextColor:O,successColor:K,errorColor:G},_p,Hp,pe),[et,Ce]=a.useState(()=>Object.fromEntries(le.map(dt=>[dt.name,""]))),[He,ze]=a.useState("idle"),[me,Se]=a.useState(null),je=s==="success"?"success":s==="error"?"error":He,Me=s==="error"?q:me,Ge=s==="filled",tt=a.useMemo(()=>{if(!Ge)return et;let dt=null;for(const Xe of le)(et[Xe.name]??"").trim().length>0||(dt=dt??{...et},dt[Xe.name]="Filled");return dt??et},[et,Ge,le]),Ke=je==="error"?y.getFormFieldValidationError(le,tt):null,ht=`${s&&s!=="default"?`${c}-state-${s}`:""}`.trim(),it=o==null?void 0:o.submitUrl,xt=(dt,Xe)=>{Ce(De=>({...De,[dt]:Xe}))},Wt=async dt=>{if(dt.preventDefault(),!d)return;const Xe=Object.fromEntries(le.map(vt=>{var wt;return[vt.name,((wt=et[vt.name])==null?void 0:wt.trim())??""]}).filter(([,vt])=>vt));if(!it){ze("error"),Se("No integrations were found for this form.");return}if(Object.keys(Xe).length===0)return;const De=y.getFormFieldValidationError(le,et);if(De){ze("error"),Se(De);return}ze("submitting"),Se(null);try{const vt=await fetch(it,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Xe)});if(!vt.ok){const wt=await vt.text();throw new Error(wt||`Request failed: ${vt.status}`)}ze("success"),Ce(Object.fromEntries(le.map(wt=>[wt.name,""])))}catch(vt){ze("error"),Se(vt instanceof Error?vt.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${ht}`.trim(),style:rt,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Fp(c)}}),r.jsxs("form",{onSubmit:Wt,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:le.map((dt,Xe)=>r.jsxs(a.Fragment,{children:[Xe>0&&r.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${c}-control`:void 0,style:{height:y.scalingValue(v??0,t)}}),r.jsxs("div",{className:`${c}-field-group${fe?` ${c}-labeled`:""}`,children:[fe&&r.jsx("span",{className:`${c}-field-label`,style:A?{...A,lineHeight:A.fontSize}:void 0,children:dt.label||dt.name}),dt.type==="textarea"?r.jsx("textarea",{name:dt.name,autoComplete:"off",value:tt[dt.name]??"",onChange:De=>xt(dt.name,De.target.value),placeholder:dt.placeholder,className:`${c}-input`,style:ie,rows:1,"data-filled":Ge||(tt[dt.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:dt.type==="phone"?"tel":dt.type==="email"?"email":"text",name:dt.name,autoComplete:"off",value:tt[dt.name]??"",onChange:De=>xt(dt.name,De.target.value),placeholder:dt.placeholder,required:dt.isRequired??dt.type==="email",className:`${c}-input`,style:ie,"data-filled":Ge||(tt[dt.name]??"").trim().length>0})]})]},Xe))}),r.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${c}-control`:void 0,style:{height:y.scalingValue(T??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:y.scalingValue(C??0,t),borderWidth:Ie,paddingTop:y.scalingValue((M==null?void 0:M.top)??0,t),paddingRight:y.scalingValue((M==null?void 0:M.right)??0,t),paddingBottom:y.scalingValue((M==null?void 0:M.bottom)??0,t),paddingLeft:y.scalingValue((M==null?void 0:M.left)??0,t),pointerEvents:d?"auto":void 0,...ee,...L?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:L?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:He==="submitting"?"...":S})})})]}),je==="success"&&r.jsx("p",{className:`${c}-success`,style:{...Ae},children:we}),je==="error"&&r.jsx("p",{className:`${c}-error`,style:{...Ae},role:"alert",children:Ke??Me??q})]})}const _p={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"},Hp=["hover","focus","filled","success","error"],Np=`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: ${_o(14)};
981
981
  color: var(--${e}-error-error-color, var(--${e}-error-color));
982
982
  }
983
- `}const Vp=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=y.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:m=1,fontFamily:w,inputFontSettings:S,inputFontSize:T,inputLineHeight:v,inputLetterSpacing:C,inputWordSpacing:x,inputTextAppearance:M,buttonFontSettings:L,buttonFontSize:R,buttonLineHeight:J,buttonLetterSpacing:A,buttonWordSpacing:ee,buttonTextAppearance:E,statusFontSettings:I,statusFontSize:F,statusLineHeight:f,statusLetterSpacing:b,statusWordSpacing:W,statusTextAppearance:O,iconMaxWidth:K,minHeight:G,corners:Q,stroke:V,stateOverrides:N,inputPadding:_,buttonPadding:$,successMessage:U="Thanks for subscribing!",errorMessage:X="Please, fill all required fields."}=e,ce=d.slice(0,Math.min(m,d.length)),[j,ge]=a.useState(()=>Object.fromEntries(ce.map(oe=>[oe.name,""]))),[h,he]=a.useState("idle"),[Y,be]=a.useState(null),Ce=o==="success"?"success":o==="error"?"error":h,le=o==="error"?X:Y,re=o==="filled",D=a.useMemo(()=>{if(!re)return j;let oe=null;for(const P of ce)(j[P.name]??"").trim().length>0||(oe=oe??{...j},oe[P.name]="Filled");return oe??j},[re,j,ce]),se=Ce==="error"?y.getFormFieldValidationError(ce,D):null,ue=o&&o!=="default"?`${s}-state-${o}`:"",_e=ce.some(oe=>(D[oe.name]??"").trim().length>0),xe=ue!==`${s}-state-filled`&&_e?`${s}-state-filled`:"",Pe=`${ue} ${xe}`.trim(),Fe=i==null?void 0:i.submitUrl,Te=u??"",Se=(c==null?void 0:c.icon)??"",q=(c==null?void 0:c.mode)==="On",me=Te||"Submit",ve={fontSettings:{fontFamily:w,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:T??.01,lineHeight:v,letterSpacing:C??0,wordSpacing:x??0,textAppearance:M,color:e.inputTextColor??"#111111"},pe={fontSettings:{fontFamily:w,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:R??.01,lineHeight:J,letterSpacing:A??0,wordSpacing:ee??0,textAppearance:E,color:e.buttonTextColor??"#ffffff"},Ae={fontSettings:{fontFamily:w,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:F??.01,lineHeight:f,letterSpacing:b??0,wordSpacing:W??0,textAppearance:O,color:e.successColor??"#22c55e"},$e=cn(Xt(ve,t)),z=cn(Xt(pe,t)),de=cn(Xt(Ae,t)),ae=y.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(ve==null?void 0:ve.color)??"#111111",buttonTextColor:e.buttonTextColor??(pe==null?void 0:pe.color)??"#ffffff"},Gp,qp,N),H={borderRadius:y.scalingValue(Q,t),borderWidth:y.scalingValue(V,t),borderStyle:"solid"},ie={borderLeftWidth:y.scalingValue(V,t)},Ie=async oe=>{if(oe.preventDefault(),!l)return;const P=Object.fromEntries(ce.map(We=>{var et;return[We.name,((et=j[We.name])==null?void 0:et.trim())??""]}).filter(([,We])=>We));if(!Fe){he("error"),be("No integrations were found for this form.");return}if(Object.keys(P).length===0)return;const He=y.getFormFieldValidationError(ce,j);if(He){he("error"),be(He);return}he("submitting"),be(null);try{const We=await fetch(Fe,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(P)});if(!We.ok){const et=await We.text();throw new Error(et||`Request failed: ${We.status}`)}he("success"),ge(Object.fromEntries(ce.map(et=>[et.name,""])))}catch(We){he("error"),be(We instanceof Error?We.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${Pe}`.trim(),style:ae,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Dp(s)}}),r.jsxs("form",{onSubmit:Ie,className:`${s}-form`,style:{...H,height:y.scalingValue(G,t),minHeight:y.scalingValue(G,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:ce.map(oe=>r.jsx("input",{type:oe.type==="email"?"email":oe.type==="phone"?"tel":"text",name:oe.name,autoComplete:"off",value:D[oe.name]??"",onChange:P=>ge(He=>({...He,[oe.name]:P.target.value})),placeholder:oe.placeholder,required:oe.isRequired??oe.type==="email",className:`${s}-input`,style:{...$e,paddingRight:y.scalingValue(_.right,t),paddingLeft:y.scalingValue(_.left,t),paddingTop:y.scalingValue(_.top,t),paddingBottom:y.scalingValue(_.bottom,t)}},oe.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:l?"submit":"button",className:`${s}-submitBtn`,"aria-label":me,style:{...z,...ie,paddingRight:y.scalingValue($.right,t),paddingLeft:y.scalingValue($.left,t),paddingTop:y.scalingValue($.top,t),paddingBottom:y.scalingValue($.bottom,t),pointerEvents:l?"auto":void 0},children:h==="submitting"?"...":q?Se&&r.jsx(nn,{url:Se,className:`${s}-submitBtnIcon`,style:{maxWidth:y.scalingValue(K??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):Te})})]}),Ce==="success"&&r.jsx("p",{className:`${s}-success`,style:{...de},children:U}),Ce==="error"&&r.jsx("p",{className:`${s}-error`,style:{...de},role:"alert",children:se??le??X})]})},Gp={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"},qp=["hover","focus","filled","success","error"],Kp=`import React, { useMemo, useState } from 'react';
983
+ `}const Vp=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=y.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:m=1,fontFamily:w,inputFontSettings:S,inputFontSize:T,inputLineHeight:v,inputLetterSpacing:C,inputWordSpacing:x,inputTextAppearance:M,buttonFontSettings:L,buttonFontSize:R,buttonLineHeight:Z,buttonLetterSpacing:P,buttonWordSpacing:Q,buttonTextAppearance:E,statusFontSettings:I,statusFontSize:W,statusLineHeight:f,statusLetterSpacing:b,statusWordSpacing:_,statusTextAppearance:O,iconMaxWidth:K,minHeight:G,corners:J,stroke:V,stateOverrides:N,inputPadding:H,buttonPadding:$,successMessage:U="Thanks for subscribing!",errorMessage:Y="Please, fill all required fields."}=e,se=d.slice(0,Math.min(m,d.length)),[j,ge]=a.useState(()=>Object.fromEntries(se.map(oe=>[oe.name,""]))),[h,ue]=a.useState("idle"),[X,ve]=a.useState(null),$e=o==="success"?"success":o==="error"?"error":h,ae=o==="error"?Y:X,re=o==="filled",D=a.useMemo(()=>{if(!re)return j;let oe=null;for(const A of se)(j[A.name]??"").trim().length>0||(oe=oe??{...j},oe[A.name]="Filled");return oe??j},[re,j,se]),ne=$e==="error"?y.getFormFieldValidationError(se,D):null,ce=o&&o!=="default"?`${s}-state-${o}`:"",Ne=se.some(oe=>(D[oe.name]??"").trim().length>0),be=ce!==`${s}-state-filled`&&Ne?`${s}-state-filled`:"",We=`${ce} ${be}`.trim(),_e=i==null?void 0:i.submitUrl,Te=u??"",we=(c==null?void 0:c.icon)??"",q=(c==null?void 0:c.mode)==="On",pe=Te||"Submit",fe={fontSettings:{fontFamily:w,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:T??.01,lineHeight:v,letterSpacing:C??0,wordSpacing:x??0,textAppearance:M,color:e.inputTextColor??"#111111"},le={fontSettings:{fontFamily:w,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:R??.01,lineHeight:Z,letterSpacing:P??0,wordSpacing:Q??0,textAppearance:E,color:e.buttonTextColor??"#ffffff"},Pe={fontSettings:{fontFamily:w,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:W??.01,lineHeight:f,letterSpacing:b??0,wordSpacing:_??0,textAppearance:O,color:e.successColor??"#22c55e"},Le=cn(Xt(fe,t)),z=cn(Xt(le,t)),de=cn(Xt(Pe,t)),ie=y.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(fe==null?void 0:fe.color)??"#111111",buttonTextColor:e.buttonTextColor??(le==null?void 0:le.color)??"#ffffff"},Gp,qp,N),F={borderRadius:y.scalingValue(J,t),borderWidth:y.scalingValue(V,t),borderStyle:"solid"},ee={borderLeftWidth:y.scalingValue(V,t)},Ie=async oe=>{if(oe.preventDefault(),!l)return;const A=Object.fromEntries(se.map(Ae=>{var rt;return[Ae.name,((rt=j[Ae.name])==null?void 0:rt.trim())??""]}).filter(([,Ae])=>Ae));if(!_e){ue("error"),ve("No integrations were found for this form.");return}if(Object.keys(A).length===0)return;const Oe=y.getFormFieldValidationError(se,j);if(Oe){ue("error"),ve(Oe);return}ue("submitting"),ve(null);try{const Ae=await fetch(_e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)});if(!Ae.ok){const rt=await Ae.text();throw new Error(rt||`Request failed: ${Ae.status}`)}ue("success"),ge(Object.fromEntries(se.map(rt=>[rt.name,""])))}catch(Ae){ue("error"),ve(Ae instanceof Error?Ae.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${We}`.trim(),style:ie,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Dp(s)}}),r.jsxs("form",{onSubmit:Ie,className:`${s}-form`,style:{...F,height:y.scalingValue(G,t),minHeight:y.scalingValue(G,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:se.map(oe=>r.jsx("input",{type:oe.type==="email"?"email":oe.type==="phone"?"tel":"text",name:oe.name,autoComplete:"off",value:D[oe.name]??"",onChange:A=>ge(Oe=>({...Oe,[oe.name]:A.target.value})),placeholder:oe.placeholder,required:oe.isRequired??oe.type==="email",className:`${s}-input`,style:{...Le,paddingRight:y.scalingValue(H.right,t),paddingLeft:y.scalingValue(H.left,t),paddingTop:y.scalingValue(H.top,t),paddingBottom:y.scalingValue(H.bottom,t)}},oe.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:l?"submit":"button",className:`${s}-submitBtn`,"aria-label":pe,style:{...z,...ee,paddingRight:y.scalingValue($.right,t),paddingLeft:y.scalingValue($.left,t),paddingTop:y.scalingValue($.top,t),paddingBottom:y.scalingValue($.bottom,t),pointerEvents:l?"auto":void 0},children:h==="submitting"?"...":q?we&&r.jsx(nn,{url:we,className:`${s}-submitBtnIcon`,style:{maxWidth:y.scalingValue(K??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):Te})})]}),$e==="success"&&r.jsx("p",{className:`${s}-success`,style:{...de},children:U}),$e==="error"&&r.jsx("p",{className:`${s}-error`,style:{...de},role:"alert",children:ne??ae??Y})]})},Gp={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"},qp=["hover","focus","filled","success","error"],Kp=`import React, { useMemo, useState } from 'react';
984
984
  import { CommonComponentProps } from '../props';
985
985
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
986
986
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -1689,7 +1689,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1689
1689
  .${e}-image-hover-grayscale:hover video {
1690
1690
  filter: grayscale(100%);
1691
1691
  }
1692
- `}const em=30,tm=20,Hr=3,nm=12,im=32,om=3,rm=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},am=(e,t)=>Array.from({length:t},()=>e).flat(),sm=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},Xl=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),ys=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const d=Array.from({length:t},(u,m)=>e.children[m]),c=Xl(d);return c<=0?0:c+s*Math.max(0,t-1)},lm=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Xl(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+s*Math.max(0,e.children.length-1)+l},cm=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},dm=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>cm(i,e))},um=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??"")},pm=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,mm=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:s,imageHoverClass:l,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var W,O,K,G;const m=a.useRef(null),w=!!((W=e.image)!=null&&W.url&&um(e.image));a.useLayoutEffect(()=>{d&&pm(m.current)&&(u==null||u())},[d,(O=e.image)==null?void 0:O.url,u]);const S=n.display==="cover",T=n.ratioValue??"1:1",v=n.reversed??!1,[C,x]=T.split(":").map(Number),R=(v?x:C)/(v?C:x),J=i/R,A=J>o?o:J,ee=J>o?o*R:i,E=c(ee),I=c(A),F={borderRadius:c(s)},f=S?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...F}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",...F},b=((K=e.image)==null?void 0:K.url)&&(w?r.jsx("video",{ref:Q=>{m.current=Q},src:e.image.url,style:f,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:d?u:void 0,onError:d?u:void 0}):r.jsx("img",{ref:Q=>{m.current=Q},src:e.image.url,alt:((G=e.image)==null?void 0:G.name)??"",style:f,onLoad:d?u:void 0,onError:d?u:void 0}));return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...S?{width:E}:{width:"max-content",maxWidth:c(i),minWidth:0}},children:r.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...S?{width:E,height:I,overflow:"hidden",...F}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:b&&e.link?r.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:at(`${t}-marquee-link`,!S&&`${t}-marquee-link-contain`),children:b}):b})})},gm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=y.useScopedStyles(),[l,d]=a.useState(0),c=l>0?Math.round(l):0,u=a.useMemo(()=>Qp(s,c),[s,c]),{speed:m,direction:w,pauseOnHover:S,gap:T,imageMaxWidth:v,imageMaxHeight:C,hoverEffect:x,cornerRadius:M=0}=e,L=a.useMemo(()=>sm(e.imageFit),[e.imageFit]),R=(t==null?void 0:t.length)??0,J=!!o,A=!n||!!i,ee=A&&x!=="off"&&x!=="randomize"?`${s}-image-hover-${x}`:void 0,E=n?!!i:!0,F=((t==null?void 0:t.length)??0)>0&&(E||!!n),f=Math.max(0,m)*em,b=xe=>y.scalingValue(xe,n??!1),W=a.useRef(null),O=a.useRef(null),K=a.useRef(null),[G,Q]=a.useState(0),V=E&&S==="on",[N,_]=a.useState(!1),[$,U]=a.useState({}),X=a.useRef($);X.current=$;const ce=a.useRef(null),j=a.useRef(0),ge=a.useRef(null),h=a.useMemo(()=>(t??[]).map(xe=>{var Pe;return((Pe=xe.image)==null?void 0:Pe.url)??""}).join("\0"),[t]),[he,Y]=a.useState(Hr),be=a.useMemo(()=>{const xe=t??[];return xe.length===0||!(E||!!n)?xe:am(xe,he)},[t,E,he,n]),Ce=a.useMemo(()=>(t??[]).filter(xe=>{var Pe;return!!((Pe=xe.image)!=null&&Pe.url)}).length,[t]),le=F?om:1;a.useLayoutEffect(()=>{j.current=0,U({}),ce.current=null,Y(Hr),d(0)},[h]),a.useEffect(()=>{if(!A||x!=="randomize")return;const xe=W.current;if(!xe)return;const Pe=q=>{U(me=>{const ve=Array.from(q).filter(Ae=>Ae in me&&!dm(xe,Ae));if(ve.length===0)return me;const pe={...me};return ve.forEach(Ae=>{delete pe[Ae]}),pe})},Fe=new IntersectionObserver(q=>{const me=new Set;for(const ve of q){const pe=ve.target.dataset.marqueeItemIndex,Ae=pe!==void 0?Number(pe):NaN;Number.isNaN(Ae)||me.add(Ae)}me.size>0&&Pe(me)},{root:xe,threshold:0});Object.keys($).forEach(q=>{const me=Number(q);xe.querySelectorAll(`[data-marquee-item-index="${me}"]`).forEach(ve=>Fe.observe(ve))});const Te={current:0},Se=()=>{const q=Object.keys(X.current);q.length!==0&&(Pe(q.map(Number)),Te.current=requestAnimationFrame(Se))};return Object.keys(X.current).length>0&&(Te.current=requestAnimationFrame(Se)),()=>{cancelAnimationFrame(Te.current),Fe.disconnect()}},[x,$,A]),a.useLayoutEffect(()=>{if(!F)return;const xe=W.current,Pe=K.current;if(!xe||!Pe)return;const Fe={current:0},Te=()=>{const me=xe.getBoundingClientRect().width||xe.offsetWidth,ve=lm(Pe),pe=ce.current,Ae=typeof pe=="number"&&Math.abs(pe-ve)<=.25;ce.current=ve;let $e=he,z=0;if((E||n)&&R>0&&me>0){const H=ys(Pe,R);if(H>=im){z=H;const ie=Math.min(nm,Math.max(Hr,Math.ceil(me/H)+1));$e=ie,ie!==he&&Y(ie)}}const ae=$e!==he&&z>0?z*$e:ve>0?ve:z>0?z*$e:(()=>{const H=ys(Pe,R);return H>0?H*$e:0})();ae>0?d(H=>H<=0?ae:!Ae||Math.round(H)===Math.round(ae)?H:ae):!Ae&&l<=0&&(cancelAnimationFrame(Fe.current),Fe.current=requestAnimationFrame(Te))},Se=()=>{cancelAnimationFrame(Fe.current),Fe.current=requestAnimationFrame(Te)};ge.current=Se,Se();const q=new ResizeObserver(Se);return q.observe(xe),q.observe(Pe),()=>{ge.current=null,cancelAnimationFrame(Fe.current),q.disconnect()}},[E,F,l,h,he,R,n]),a.useLayoutEffect(()=>{if(!F||c<=0)return;const xe=O.current;xe&&rm(xe)},[F,c,w,f]),a.useLayoutEffect(()=>{if(!F||l<=0){Q(0);return}const xe=O.current,Pe=K.current;if(!xe||!Pe)return;const Fe=()=>{const Se=xe.offsetHeight||xe.getBoundingClientRect().height,q=Array.from(Pe.children).reduce((ve,pe)=>Math.max(ve,pe.offsetHeight||pe.getBoundingClientRect().height),0),me=Se>0?Se:q;Q(me>0?me:0)};Fe();const Te=new ResizeObserver(Fe);return Te.observe(xe),Te.observe(Pe),()=>Te.disconnect()},[F,le,be,n,T,v,C,l,L,$]),a.useLayoutEffect(()=>{if(!n||!J||!F||typeof window>"u")return;const xe=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(xe)},[n,J,F,w,l,G,T,be]);const re=()=>{V&&_(!0)},D=()=>{V&&_(!1)},se=a.useCallback(()=>{var xe;j.current=Math.min(Ce,j.current+1),(xe=ge.current)==null||xe.call(ge)},[Ce]),ue=a.useCallback((xe,Pe)=>{U(Fe=>{const Te=Fe[xe]??Pe,Se=(t??[]).filter(me=>me!==Te);if(Se.length===0)return Fe;const q=Se[Math.floor(Math.random()*Se.length)];return{...Fe,[xe]:q}})},[t]),_e=(xe,Pe,Fe,Te)=>{const Se=A&&x==="randomize"&&L.display==="cover"?$[Fe]??xe:xe,q=`max(${b(T)}, ${tm}px)`,me=`calc(-0.5 * (${q} + ${b(T)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":Fe,onMouseEnter:A&&x==="randomize"&&L.display==="cover"?()=>ue(Fe,xe):void 0,children:[r.jsx(mm,{item:Se,prefix:s,imageFit:L,imageMaxWidth:v,imageMaxHeight:C,cornerRadius:M,imageHoverClass:ee,isEditor:n,isFirstSet:Te,scaled:b,onFirstSetImageDone:se}),J&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:me,width:q,height:"100%"}})]},`${Pe}-${Fe}`)};if(F){const xe=E?V&&N?"paused":"running":"paused",Pe=c>0&&f>0?c/f*1e3:0,Fe=`${Math.max(0,Pe)/1e3}s`;return r.jsxs("div",{ref:W,className:at(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:G>0?{height:G}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{ref:O,className:`${s}-marquee-track`,"data-direction":w,onMouseEnter:re,onMouseLeave:D,style:{WebkitAnimationDuration:Fe,animationDuration:Fe,WebkitAnimationPlayState:xe,animationPlayState:xe},children:Array.from({length:le},(Te,Se)=>r.jsx("div",{ref:Se===0?K:void 0,className:at(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:b(T),paddingRight:b(T)},"aria-hidden":Se>0,children:be.map((q,me)=>_e(q,Se,me,Se===0&&me<R))},`set-${Se}`))})]})}return r.jsxs("div",{ref:W,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{className:at(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:b(T),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((xe,Pe)=>_e(xe,0,Pe))},"marquee-static")]})},hm=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1692
+ `}const em=30,tm=20,Hr=3,nm=12,im=32,om=3,rm=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},am=(e,t)=>Array.from({length:t},()=>e).flat(),sm=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},Xl=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),ys=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const d=Array.from({length:t},(u,m)=>e.children[m]),c=Xl(d);return c<=0?0:c+s*Math.max(0,t-1)},lm=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Xl(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+s*Math.max(0,e.children.length-1)+l},cm=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},dm=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>cm(i,e))},um=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??"")},pm=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,mm=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:s,imageHoverClass:l,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var _,O,K,G;const m=a.useRef(null),w=!!((_=e.image)!=null&&_.url&&um(e.image));a.useLayoutEffect(()=>{d&&pm(m.current)&&(u==null||u())},[d,(O=e.image)==null?void 0:O.url,u]);const S=n.display==="cover",T=n.ratioValue??"1:1",v=n.reversed??!1,[C,x]=T.split(":").map(Number),R=(v?x:C)/(v?C:x),Z=i/R,P=Z>o?o:Z,Q=Z>o?o*R:i,E=c(Q),I=c(P),W={borderRadius:c(s)},f=S?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...W}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",...W},b=((K=e.image)==null?void 0:K.url)&&(w?r.jsx("video",{ref:J=>{m.current=J},src:e.image.url,style:f,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:d?u:void 0,onError:d?u:void 0}):r.jsx("img",{ref:J=>{m.current=J},src:e.image.url,alt:((G=e.image)==null?void 0:G.name)??"",style:f,onLoad:d?u:void 0,onError:d?u:void 0}));return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...S?{width:E}:{width:"max-content",maxWidth:c(i),minWidth:0}},children:r.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...S?{width:E,height:I,overflow:"hidden",...W}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:b&&e.link?r.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:ct(`${t}-marquee-link`,!S&&`${t}-marquee-link-contain`),children:b}):b})})},gm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=y.useScopedStyles(),[l,d]=a.useState(0),c=l>0?Math.round(l):0,u=a.useMemo(()=>Qp(s,c),[s,c]),{speed:m,direction:w,pauseOnHover:S,gap:T,imageMaxWidth:v,imageMaxHeight:C,hoverEffect:x,cornerRadius:M=0}=e,L=a.useMemo(()=>sm(e.imageFit),[e.imageFit]),R=(t==null?void 0:t.length)??0,Z=!!o,P=!n||!!i,Q=P&&x!=="off"&&x!=="randomize"?`${s}-image-hover-${x}`:void 0,E=n?!!i:!0,W=((t==null?void 0:t.length)??0)>0&&(E||!!n),f=Math.max(0,m)*em,b=be=>y.scalingValue(be,n??!1),_=a.useRef(null),O=a.useRef(null),K=a.useRef(null),[G,J]=a.useState(0),V=E&&S==="on",[N,H]=a.useState(!1),[$,U]=a.useState({}),Y=a.useRef($);Y.current=$;const se=a.useRef(null),j=a.useRef(0),ge=a.useRef(null),h=a.useMemo(()=>(t??[]).map(be=>{var We;return((We=be.image)==null?void 0:We.url)??""}).join("\0"),[t]),[ue,X]=a.useState(Hr),ve=a.useMemo(()=>{const be=t??[];return be.length===0||!(E||!!n)?be:am(be,ue)},[t,E,ue,n]),$e=a.useMemo(()=>(t??[]).filter(be=>{var We;return!!((We=be.image)!=null&&We.url)}).length,[t]),ae=W?om:1;a.useLayoutEffect(()=>{j.current=0,U({}),se.current=null,X(Hr),d(0)},[h]),a.useEffect(()=>{if(!P||x!=="randomize")return;const be=_.current;if(!be)return;const We=q=>{U(pe=>{const fe=Array.from(q).filter(Pe=>Pe in pe&&!dm(be,Pe));if(fe.length===0)return pe;const le={...pe};return fe.forEach(Pe=>{delete le[Pe]}),le})},_e=new IntersectionObserver(q=>{const pe=new Set;for(const fe of q){const le=fe.target.dataset.marqueeItemIndex,Pe=le!==void 0?Number(le):NaN;Number.isNaN(Pe)||pe.add(Pe)}pe.size>0&&We(pe)},{root:be,threshold:0});Object.keys($).forEach(q=>{const pe=Number(q);be.querySelectorAll(`[data-marquee-item-index="${pe}"]`).forEach(fe=>_e.observe(fe))});const Te={current:0},we=()=>{const q=Object.keys(Y.current);q.length!==0&&(We(q.map(Number)),Te.current=requestAnimationFrame(we))};return Object.keys(Y.current).length>0&&(Te.current=requestAnimationFrame(we)),()=>{cancelAnimationFrame(Te.current),_e.disconnect()}},[x,$,P]),a.useLayoutEffect(()=>{if(!W)return;const be=_.current,We=K.current;if(!be||!We)return;const _e={current:0},Te=()=>{const pe=be.getBoundingClientRect().width||be.offsetWidth,fe=lm(We),le=se.current,Pe=typeof le=="number"&&Math.abs(le-fe)<=.25;se.current=fe;let Le=ue,z=0;if((E||n)&&R>0&&pe>0){const F=ys(We,R);if(F>=im){z=F;const ee=Math.min(nm,Math.max(Hr,Math.ceil(pe/F)+1));Le=ee,ee!==ue&&X(ee)}}const ie=Le!==ue&&z>0?z*Le:fe>0?fe:z>0?z*Le:(()=>{const F=ys(We,R);return F>0?F*Le:0})();ie>0?d(F=>F<=0?ie:!Pe||Math.round(F)===Math.round(ie)?F:ie):!Pe&&l<=0&&(cancelAnimationFrame(_e.current),_e.current=requestAnimationFrame(Te))},we=()=>{cancelAnimationFrame(_e.current),_e.current=requestAnimationFrame(Te)};ge.current=we,we();const q=new ResizeObserver(we);return q.observe(be),q.observe(We),()=>{ge.current=null,cancelAnimationFrame(_e.current),q.disconnect()}},[E,W,l,h,ue,R,n]),a.useLayoutEffect(()=>{if(!W||c<=0)return;const be=O.current;be&&rm(be)},[W,c,w,f]),a.useLayoutEffect(()=>{if(!W||l<=0){J(0);return}const be=O.current,We=K.current;if(!be||!We)return;const _e=()=>{const we=be.offsetHeight||be.getBoundingClientRect().height,q=Array.from(We.children).reduce((fe,le)=>Math.max(fe,le.offsetHeight||le.getBoundingClientRect().height),0),pe=we>0?we:q;J(pe>0?pe:0)};_e();const Te=new ResizeObserver(_e);return Te.observe(be),Te.observe(We),()=>Te.disconnect()},[W,ae,ve,n,T,v,C,l,L,$]),a.useLayoutEffect(()=>{if(!n||!Z||!W||typeof window>"u")return;const be=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(be)},[n,Z,W,w,l,G,T,ve]);const re=()=>{V&&H(!0)},D=()=>{V&&H(!1)},ne=a.useCallback(()=>{var be;j.current=Math.min($e,j.current+1),(be=ge.current)==null||be.call(ge)},[$e]),ce=a.useCallback((be,We)=>{U(_e=>{const Te=_e[be]??We,we=(t??[]).filter(pe=>pe!==Te);if(we.length===0)return _e;const q=we[Math.floor(Math.random()*we.length)];return{..._e,[be]:q}})},[t]),Ne=(be,We,_e,Te)=>{const we=P&&x==="randomize"&&L.display==="cover"?$[_e]??be:be,q=`max(${b(T)}, ${tm}px)`,pe=`calc(-0.5 * (${q} + ${b(T)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":_e,onMouseEnter:P&&x==="randomize"&&L.display==="cover"?()=>ce(_e,be):void 0,children:[r.jsx(mm,{item:we,prefix:s,imageFit:L,imageMaxWidth:v,imageMaxHeight:C,cornerRadius:M,imageHoverClass:Q,isEditor:n,isFirstSet:Te,scaled:b,onFirstSetImageDone:ne}),Z&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:pe,width:q,height:"100%"}})]},`${We}-${_e}`)};if(W){const be=E?V&&N?"paused":"running":"paused",We=c>0&&f>0?c/f*1e3:0,_e=`${Math.max(0,We)/1e3}s`;return r.jsxs("div",{ref:_,className:ct(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:G>0?{height:G}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{ref:O,className:`${s}-marquee-track`,"data-direction":w,onMouseEnter:re,onMouseLeave:D,style:{WebkitAnimationDuration:_e,animationDuration:_e,WebkitAnimationPlayState:be,animationPlayState:be},children:Array.from({length:ae},(Te,we)=>r.jsx("div",{ref:we===0?K:void 0,className:ct(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:b(T),paddingRight:b(T)},"aria-hidden":we>0,children:ve.map((q,pe)=>Ne(q,we,pe,we===0&&pe<R))},`set-${we}`))})]})}return r.jsxs("div",{ref:_,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{className:ct(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:b(T),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((be,We)=>Ne(be,0,We))},"marquee-static")]})},hm=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1693
1693
  import cn from 'classnames';
1694
1694
  import { CommonComponentProps } from '../props';
1695
1695
  import { scalingValue } from '../utils/scalingValue';
@@ -2561,7 +2561,7 @@ type MarqueeProps = {
2561
2561
  pointer-events: auto;
2562
2562
  z-index: 10;
2563
2563
  }
2564
- `}const bm=30,vs=2,xm=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},wm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=y.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:m,cardWidth:w,corners:S,stroke:T,strokeColor:v,bgColor:C,padding:x,logoMarginTop:M,logoWidth:L,logoHeight:R,captionMarginTop:J}=e,A=!!o,ee=((t==null?void 0:t.length)??0)>0,E=d>0&&(!n||i),I=ee&&(E||n),F=Math.max(0,d)*bm,f=z=>y.scalingValue(z,n??!1),b=a.useRef(null),W=a.useRef(null),O=a.useRef(null),[K,G]=a.useState(0),[Q,V]=a.useState(0),N=Q>0?Q:0,_=a.useMemo(()=>vm(s,N),[s,N]),[$,U]=a.useState(0),X=E&&u==="on",[ce,j]=a.useState(!1),ge=a.useRef(null),[h,he]=a.useState(0),[Y,be]=a.useState(0),Ce=a.useRef(null),le=z=>{var ae,H,ie,Ie,oe;return{fontSettings:{fontFamily:(e==null?void 0:e[`${z}FontFamily`])??"Arial",fontWeight:((ae=e==null?void 0:e[`${z}FontSettings`])==null?void 0:ae.fontWeight)??400,fontStyle:((H=e==null?void 0:e[`${z}FontSettings`])==null?void 0:H.fontStyle)??"normal"},textAppearance:{textTransform:((ie=e==null?void 0:e[`${z}TextAppearance`])==null?void 0:ie.textTransform)??"none",textDecoration:((Ie=e==null?void 0:e[`${z}TextAppearance`])==null?void 0:Ie.textDecoration)??"none",fontVariant:((oe=e==null?void 0:e[`${z}TextAppearance`])==null?void 0:oe.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${z}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${z}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${z}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${z}LineHeight`])??.01,color:(e==null?void 0:e[`${z}Color`])??"#000000"}},re=le("text"),D=le("caption"),se=a.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(z=>{var de,ae;return(((de=z.text)==null?void 0:de.length)??0)>0||(((ae=z.caption)==null?void 0:ae.length)??0)>0}),[t]),ue=a.useMemo(()=>!I||(t==null?void 0:t.length)===0?1:Q<=0||K<=0?vs:Math.max(vs,Math.ceil(K/Q)+1),[I,t==null?void 0:t.length,Q,K]);a.useLayoutEffect(()=>{if(!I)return;const z=b.current,de=O.current;if(!z||!de)return;let ae=0;const H=()=>{const oe=z.getBoundingClientRect().width,P=de.getBoundingClientRect().width,He=Ce.current,We=typeof He=="number"&&Math.abs(He-P)<=.25;if(Ce.current=P,G(oe),typeof P=="number"&&P>0&&Q<=0){V(P);return}We&&P!==Q?V(P):!We&&Q<=0&&(cancelAnimationFrame(ae),ae=requestAnimationFrame(H))},ie=()=>{cancelAnimationFrame(ae),ae=requestAnimationFrame(H)};ie();const Ie=new ResizeObserver(ie);return Ie.observe(z),Ie.observe(de),()=>{cancelAnimationFrame(ae),Ie.disconnect()}},[E,I,Q]);const _e=N>0&&F>0?N/F*1e3:0,xe=`${Math.max(0,_e)/1e3}s`;a.useLayoutEffect(()=>{if(!I||N<=0)return;const z=W.current;z&&xm(z)},[I,N,c]),a.useLayoutEffect(()=>{if(!I){U(0);return}const z=O.current,de=W.current;if(!z||!de)return;const ae=()=>{let ie=0;for(let Ie=0;Ie<z.children.length;Ie++){const P=z.children[Ie].firstElementChild;P&&(ie=Math.max(ie,P.offsetHeight))}ie<=0&&(ie=de.offsetHeight),U(ie>0?ie:0)};ae();const H=new ResizeObserver(ae);return H.observe(z),H.observe(de),()=>{H.disconnect()}},[I,ue,t,n,m,w,x,T,S,L,R,h,Y]);const Pe=()=>{X&&j(!0)},Fe=()=>{X&&j(!1)},Te=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),Se=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),q=a.useCallback((z,de,ae,H)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Te,width:"100%"},children:[r.jsx("div",{"data-controls":A?H==null?void 0:H.controlsName:void 0,"data-controls-axis":A?"y":void 0,className:A?`${s}-control`:void 0,style:{height:f((H==null?void 0:H.marginTop)??0)}}),r.jsx("div",{...H!=null&&H.dataMeasureKind?{"data-testimonial-measure":H.dataMeasureKind}:{},style:{...Xt(z,n),textAlign:Se,pointerEvents:"auto",...typeof(H==null?void 0:H.minHeightPx)=="number"&&H.minHeightPx>0?{minHeight:H.minHeightPx}:{}},children:r.jsx(pi,{content:de})})]},ae),[Te,Se,n,A,s,f]),me=a.useCallback((z,de,ae)=>{var H,ie,Ie;return r.jsxs("div",{style:{padding:`${f(x.top)} ${f(x.right)} ${f(x.bottom)} ${f(x.left)}`,width:f(w+T*2),height:"100%",borderRadius:f(S),border:`${f(T)} solid ${v}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:C}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:Te,textAlign:Se},children:[z.text&&q(re,z.text,"text",ae!=null&&ae.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(ae==null?void 0:ae.textMinHeightPx)=="number"&&ae.textMinHeightPx>0?{minHeightPx:ae.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Te,width:"100%"},children:[r.jsx("div",{"data-controls":A&&!(ae!=null&&ae.dataMeasureAttrs)?"logoMarginTop":void 0,className:A&&!(ae!=null&&ae.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:f(M)}}),r.jsx("div",{style:{width:f(L),height:f(R)},children:((H=z.logo)==null?void 0:H.url)&&r.jsx("img",{src:z.logo.url,alt:((ie=z.logo)==null?void 0:ie.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Ie=z.logo)==null?void 0:Ie.objectFit)||"contain"}})})]}),z.caption&&q(D,z.caption,"caption",{...ae!=null&&ae.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:J,...ae!=null&&ae.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(ae==null?void 0:ae.captionMinHeightPx)=="number"&&ae.captionMinHeightPx>0?{minHeightPx:ae.captionMinHeightPx}:{}})]})]},de)},[C,J,D,w,S,R,M,L,Te,Se,x.bottom,x.left,x.right,x.top,q,T,v,re,n,A,s]),ve=a.useCallback(z=>{he(z.maxTextPx),be(z.maxCaptionPx)},[]);a.useLayoutEffect(()=>{if(!se){ve({maxTextPx:0,maxCaptionPx:0});return}const z=ge.current;if(!z)return;const de=()=>{y.readTestimonialTextMeasure(z,ve)};de();const ae=new ResizeObserver(de);return ae.observe(z),()=>{ae.disconnect()}},[se,ve,t,me]);const pe=se?{textMinHeightPx:h,captionMinHeightPx:Y}:void 0,Ae=se?r.jsx("div",{ref:ge,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((z,de)=>me(z,`measure-${de}`,{dataMeasureAttrs:!0}))}):null,$e=(z,de)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[me(z,`card-${de}`,pe),A&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${f(m)})`,width:f(m),height:"100%",pointerEvents:"auto",zIndex:2}})]},de);if(I){const z=E?X&&ce?"paused":"running":"paused";return r.jsxs("div",{ref:b,className:at(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...$>0?{height:$}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:_}}),Ae,r.jsx("div",{ref:W,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:Pe,onMouseLeave:Fe,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",animationDuration:xe,WebkitAnimationDuration:xe,animationPlayState:z,WebkitAnimationPlayState:z},children:Array.from({length:ue},(de,ae)=>r.jsx("div",{ref:ae===0?O:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:f(m),paddingRight:f(m)},"aria-hidden":ae>0,children:t==null?void 0:t.map((H,ie)=>$e(H,`${ae}-${ie}`))},`set-${ae}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:_}}),Ae,r.jsx("div",{style:{gap:f(m),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((z,de)=>$e(z,de))})]})},Sm=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2564
+ `}const bm=30,vs=2,xm=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},wm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=y.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:m,cardWidth:w,corners:S,stroke:T,strokeColor:v,bgColor:C,padding:x,logoMarginTop:M,logoWidth:L,logoHeight:R,captionMarginTop:Z}=e,P=!!o,Q=((t==null?void 0:t.length)??0)>0,E=d>0&&(!n||i),I=Q&&(E||n),W=Math.max(0,d)*bm,f=z=>y.scalingValue(z,n??!1),b=a.useRef(null),_=a.useRef(null),O=a.useRef(null),[K,G]=a.useState(0),[J,V]=a.useState(0),N=J>0?J:0,H=a.useMemo(()=>vm(s,N),[s,N]),[$,U]=a.useState(0),Y=E&&u==="on",[se,j]=a.useState(!1),ge=a.useRef(null),[h,ue]=a.useState(0),[X,ve]=a.useState(0),$e=a.useRef(null),ae=z=>{var ie,F,ee,Ie,oe;return{fontSettings:{fontFamily:(e==null?void 0:e[`${z}FontFamily`])??"Arial",fontWeight:((ie=e==null?void 0:e[`${z}FontSettings`])==null?void 0:ie.fontWeight)??400,fontStyle:((F=e==null?void 0:e[`${z}FontSettings`])==null?void 0:F.fontStyle)??"normal"},textAppearance:{textTransform:((ee=e==null?void 0:e[`${z}TextAppearance`])==null?void 0:ee.textTransform)??"none",textDecoration:((Ie=e==null?void 0:e[`${z}TextAppearance`])==null?void 0:Ie.textDecoration)??"none",fontVariant:((oe=e==null?void 0:e[`${z}TextAppearance`])==null?void 0:oe.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${z}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${z}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${z}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${z}LineHeight`])??.01,color:(e==null?void 0:e[`${z}Color`])??"#000000"}},re=ae("text"),D=ae("caption"),ne=a.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(z=>{var de,ie;return(((de=z.text)==null?void 0:de.length)??0)>0||(((ie=z.caption)==null?void 0:ie.length)??0)>0}),[t]),ce=a.useMemo(()=>!I||(t==null?void 0:t.length)===0?1:J<=0||K<=0?vs:Math.max(vs,Math.ceil(K/J)+1),[I,t==null?void 0:t.length,J,K]);a.useLayoutEffect(()=>{if(!I)return;const z=b.current,de=O.current;if(!z||!de)return;let ie=0;const F=()=>{const oe=z.getBoundingClientRect().width,A=de.getBoundingClientRect().width,Oe=$e.current,Ae=typeof Oe=="number"&&Math.abs(Oe-A)<=.25;if($e.current=A,G(oe),typeof A=="number"&&A>0&&J<=0){V(A);return}Ae&&A!==J?V(A):!Ae&&J<=0&&(cancelAnimationFrame(ie),ie=requestAnimationFrame(F))},ee=()=>{cancelAnimationFrame(ie),ie=requestAnimationFrame(F)};ee();const Ie=new ResizeObserver(ee);return Ie.observe(z),Ie.observe(de),()=>{cancelAnimationFrame(ie),Ie.disconnect()}},[E,I,J]);const Ne=N>0&&W>0?N/W*1e3:0,be=`${Math.max(0,Ne)/1e3}s`;a.useLayoutEffect(()=>{if(!I||N<=0)return;const z=_.current;z&&xm(z)},[I,N,c]),a.useLayoutEffect(()=>{if(!I){U(0);return}const z=O.current,de=_.current;if(!z||!de)return;const ie=()=>{let ee=0;for(let Ie=0;Ie<z.children.length;Ie++){const A=z.children[Ie].firstElementChild;A&&(ee=Math.max(ee,A.offsetHeight))}ee<=0&&(ee=de.offsetHeight),U(ee>0?ee:0)};ie();const F=new ResizeObserver(ie);return F.observe(z),F.observe(de),()=>{F.disconnect()}},[I,ce,t,n,m,w,x,T,S,L,R,h,X]);const We=()=>{Y&&j(!0)},_e=()=>{Y&&j(!1)},Te=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),we=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),q=a.useCallback((z,de,ie,F)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Te,width:"100%"},children:[r.jsx("div",{"data-controls":P?F==null?void 0:F.controlsName:void 0,"data-controls-axis":P?"y":void 0,className:P?`${s}-control`:void 0,style:{height:f((F==null?void 0:F.marginTop)??0)}}),r.jsx("div",{...F!=null&&F.dataMeasureKind?{"data-testimonial-measure":F.dataMeasureKind}:{},style:{...Xt(z,n),textAlign:we,pointerEvents:"auto",...typeof(F==null?void 0:F.minHeightPx)=="number"&&F.minHeightPx>0?{minHeight:F.minHeightPx}:{}},children:r.jsx(pi,{content:de})})]},ie),[Te,we,n,P,s,f]),pe=a.useCallback((z,de,ie)=>{var F,ee,Ie;return r.jsxs("div",{style:{padding:`${f(x.top)} ${f(x.right)} ${f(x.bottom)} ${f(x.left)}`,width:f(w+T*2),height:"100%",borderRadius:f(S),border:`${f(T)} solid ${v}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:C}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:Te,textAlign:we},children:[z.text&&q(re,z.text,"text",ie!=null&&ie.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(ie==null?void 0:ie.textMinHeightPx)=="number"&&ie.textMinHeightPx>0?{minHeightPx:ie.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Te,width:"100%"},children:[r.jsx("div",{"data-controls":P&&!(ie!=null&&ie.dataMeasureAttrs)?"logoMarginTop":void 0,className:P&&!(ie!=null&&ie.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:f(M)}}),r.jsx("div",{style:{width:f(L),height:f(R)},children:((F=z.logo)==null?void 0:F.url)&&r.jsx("img",{src:z.logo.url,alt:((ee=z.logo)==null?void 0:ee.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Ie=z.logo)==null?void 0:Ie.objectFit)||"contain"}})})]}),z.caption&&q(D,z.caption,"caption",{...ie!=null&&ie.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:Z,...ie!=null&&ie.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(ie==null?void 0:ie.captionMinHeightPx)=="number"&&ie.captionMinHeightPx>0?{minHeightPx:ie.captionMinHeightPx}:{}})]})]},de)},[C,Z,D,w,S,R,M,L,Te,we,x.bottom,x.left,x.right,x.top,q,T,v,re,n,P,s]),fe=a.useCallback(z=>{ue(z.maxTextPx),ve(z.maxCaptionPx)},[]);a.useLayoutEffect(()=>{if(!ne){fe({maxTextPx:0,maxCaptionPx:0});return}const z=ge.current;if(!z)return;const de=()=>{y.readTestimonialTextMeasure(z,fe)};de();const ie=new ResizeObserver(de);return ie.observe(z),()=>{ie.disconnect()}},[ne,fe,t,pe]);const le=ne?{textMinHeightPx:h,captionMinHeightPx:X}:void 0,Pe=ne?r.jsx("div",{ref:ge,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((z,de)=>pe(z,`measure-${de}`,{dataMeasureAttrs:!0}))}):null,Le=(z,de)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[pe(z,`card-${de}`,le),P&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${f(m)})`,width:f(m),height:"100%",pointerEvents:"auto",zIndex:2}})]},de);if(I){const z=E?Y&&se?"paused":"running":"paused";return r.jsxs("div",{ref:b,className:ct(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...$>0?{height:$}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:H}}),Pe,r.jsx("div",{ref:_,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:We,onMouseLeave:_e,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",animationDuration:be,WebkitAnimationDuration:be,animationPlayState:z,WebkitAnimationPlayState:z},children:Array.from({length:ce},(de,ie)=>r.jsx("div",{ref:ie===0?O:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:f(m),paddingRight:f(m)},"aria-hidden":ie>0,children:t==null?void 0:t.map((F,ee)=>Le(F,`${ie}-${ee}`))},`set-${ie}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:H}}),Pe,r.jsx("div",{style:{gap:f(m),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((z,de)=>Le(z,de))})]})},Sm=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2565
2565
  import cn from 'classnames';
2566
2566
  import { CommonComponentProps } from '../props';
2567
2567
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3316,7 +3316,7 @@ type TestimonialsSettings = {
3316
3316
  width: 100%;
3317
3317
  height: 100%;
3318
3318
  }
3319
- `}const Lm=3e3,Im=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=y.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:m,textMarginTop:w,captionMarginTop:S,imageWidth:T,imageHeight:v,controlsWidth:C,controlsColor:x,controlsHoverColor:M}=e,L=d>0&&(!n||!!i),[R,J]=a.useState(0),[A,ee]=a.useState(null),[E,I]=a.useState(!1),F=a.useRef(null),f=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),b=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);a.useEffect(()=>{J(0),ee(null),I(!1)},[l.length]);const W=l[R],O=A===null?null:l[A],K=le=>{var D,se,ue,_e,xe;return{fontSettings:{fontFamily:(e==null?void 0:e[`${le}FontFamily`])??"Arial",fontWeight:((D=e==null?void 0:e[`${le}FontSettings`])==null?void 0:D.fontWeight)??400,fontStyle:((se=e==null?void 0:e[`${le}FontSettings`])==null?void 0:se.fontStyle)??"normal"},textAppearance:{textTransform:((ue=e==null?void 0:e[`${le}TextAppearance`])==null?void 0:ue.textTransform)??"none",textDecoration:((_e=e==null?void 0:e[`${le}TextAppearance`])==null?void 0:_e.textDecoration)??"none",fontVariant:((xe=e==null?void 0:e[`${le}TextAppearance`])==null?void 0:xe.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${le}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${le}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${le}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${le}WordSpacing`])??0,color:(e==null?void 0:e[`${le}Color`])??"#000000"}},G=K("text"),Q=K("caption"),V=l.length>1&&l.some(le=>{var re,D;return(((re=le.text)==null?void 0:re.length)??0)>0||(((D=le.caption)==null?void 0:D.length)??0)>0}),N=a.useRef(null),[_,$]=a.useState(0),[U,X]=a.useState(0),ce=e.controls??{mode:"Off",icon:null},j=l.length>1,ge=a.useCallback((le,re)=>!j||re===le?le:(F.current&&window.clearTimeout(F.current),ee(le),I(!0),F.current=window.setTimeout(()=>{ee(null),I(!1),F.current=null},300),re),[j]),h=a.useCallback(()=>{j&&J(le=>ge(le,(le-1+l.length)%l.length))},[j,ge,l.length]),he=a.useCallback(()=>{j&&J(le=>ge(le,(le+1)%l.length))},[j,ge,l.length]);a.useEffect(()=>{if(!L||!j)return;const le=Math.max(300,Lm/d),re=window.setInterval(()=>{J(D=>ge(D,(D+1)%l.length))},le);return()=>{window.clearInterval(re)}},[L,j,ge,l.length,d]),a.useEffect(()=>()=>{F.current&&window.clearTimeout(F.current)},[]);const Y=(le,re)=>{var xe,Pe,Fe,Te;const D=re==null?void 0:re.textMinHeightPx,se=re==null?void 0:re.captionMinHeightPx,ue=re==null?void 0:re.dataMeasureAttrs,_e=o&&!(re!=null&&re.dataMeasureAttrs)&&!(re!=null&&re.hideControls);return r.jsxs(r.Fragment,{children:[le.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":_e?"textMarginTop":void 0,className:_e?`${s}-control`:void 0,style:{height:y.scalingValue(w??0,n??!1)}}),r.jsx("div",{...ue&&{"data-testimonial-measure":"text"},style:{...Xt(G,n),...D&&D>0?{minHeight:D}:{},textAlign:b,pointerEvents:"auto"},children:r.jsx(pi,{content:le.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":_e?"imageMarginTop":void 0,className:_e?`${s}-control`:void 0,style:{height:y.scalingValue(m??0,n??!1)}}),r.jsx("div",{style:{width:y.scalingValue(T??0,n??!1),height:y.scalingValue(v??0,n??!1)},children:((xe=le.image)==null?void 0:xe.url)&&r.jsx("img",{src:(Pe=le.image)==null?void 0:Pe.url,alt:((Fe=le.image)==null?void 0:Fe.name)??"",className:`${s}-icon`,style:{objectFit:((Te=le.image)==null?void 0:Te.objectFit)||"contain"}})})]}),le.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":_e?"captionMarginTop":void 0,className:_e?`${s}-control`:void 0,style:{height:y.scalingValue(S??0,n??!1)}}),r.jsx("div",{...ue?{"data-testimonial-measure":"caption"}:{},style:{...Xt(Q,n),...se&&se>0?{minHeight:se}:{},textAlign:b,pointerEvents:"auto"},children:r.jsx(pi,{content:le.caption})})]})]})},be=a.useCallback(le=>{$(le.maxTextPx),X(le.maxCaptionPx)},[]);if(a.useLayoutEffect(()=>{if(!V){be({maxTextPx:0,maxCaptionPx:0});return}const le=N.current;if(!le)return;const re=()=>{y.readTestimonialTextMeasure(le,be)};re();const D=new ResizeObserver(re);return D.observe(le),()=>{D.disconnect()}},[V,be,t]),!W)return r.jsx(r.Fragment,{});const Ce=V?{textMinHeightPx:_,captionMinHeightPx:U}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Tm(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:y.scalingValue(u??0,n??!1),alignItems:f},children:[V&&r.jsx("div",{ref:N,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((le,re)=>r.jsx("div",{style:{width:"100%"},children:Y(le,{dataMeasureAttrs:!0})},re))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[O&&E&&r.jsx("div",{className:at(`${s}-fade-item-prev`,`${s}-fade-out`),children:Y(O,{...Ce,hideControls:!0})}),r.jsx("div",{className:at(`${s}-fade-item-current`,E?`${s}-fade-in`:void 0),children:Y(W,Ce)})]})]}),ce.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:y.scalingValue(C??.02,n??!1),height:y.scalingValue(C??.02,n??!1),"--arrow-hover-color":M},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:h,disabled:!j,"aria-label":"Previous testimonial",children:ce.icon&&r.jsx(nn,{url:ce.icon,fill:x,hoverFill:M,className:at(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:at(`${s}-arrow`,`${s}-next-arrow`),style:{width:y.scalingValue(C??.02,n??!1),height:y.scalingValue(C??.02,n??!1),"--arrow-hover-color":M},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:he,disabled:!j,"aria-label":"Next testimonial",children:ce.icon&&r.jsx(nn,{url:ce.icon,fill:x,hoverFill:M,className:`${s}-arrow-img`})})})]})]})})},Rm=`import cn from 'classnames';
3319
+ `}const Lm=3e3,Im=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=y.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:m,textMarginTop:w,captionMarginTop:S,imageWidth:T,imageHeight:v,controlsWidth:C,controlsColor:x,controlsHoverColor:M}=e,L=d>0&&(!n||!!i),[R,Z]=a.useState(0),[P,Q]=a.useState(null),[E,I]=a.useState(!1),W=a.useRef(null),f=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),b=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);a.useEffect(()=>{Z(0),Q(null),I(!1)},[l.length]);const _=l[R],O=P===null?null:l[P],K=ae=>{var D,ne,ce,Ne,be;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ae}FontFamily`])??"Arial",fontWeight:((D=e==null?void 0:e[`${ae}FontSettings`])==null?void 0:D.fontWeight)??400,fontStyle:((ne=e==null?void 0:e[`${ae}FontSettings`])==null?void 0:ne.fontStyle)??"normal"},textAppearance:{textTransform:((ce=e==null?void 0:e[`${ae}TextAppearance`])==null?void 0:ce.textTransform)??"none",textDecoration:((Ne=e==null?void 0:e[`${ae}TextAppearance`])==null?void 0:Ne.textDecoration)??"none",fontVariant:((be=e==null?void 0:e[`${ae}TextAppearance`])==null?void 0:be.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ae}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ae}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ae}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ae}WordSpacing`])??0,color:(e==null?void 0:e[`${ae}Color`])??"#000000"}},G=K("text"),J=K("caption"),V=l.length>1&&l.some(ae=>{var re,D;return(((re=ae.text)==null?void 0:re.length)??0)>0||(((D=ae.caption)==null?void 0:D.length)??0)>0}),N=a.useRef(null),[H,$]=a.useState(0),[U,Y]=a.useState(0),se=e.controls??{mode:"Off",icon:null},j=l.length>1,ge=a.useCallback((ae,re)=>!j||re===ae?ae:(W.current&&window.clearTimeout(W.current),Q(ae),I(!0),W.current=window.setTimeout(()=>{Q(null),I(!1),W.current=null},300),re),[j]),h=a.useCallback(()=>{j&&Z(ae=>ge(ae,(ae-1+l.length)%l.length))},[j,ge,l.length]),ue=a.useCallback(()=>{j&&Z(ae=>ge(ae,(ae+1)%l.length))},[j,ge,l.length]);a.useEffect(()=>{if(!L||!j)return;const ae=Math.max(300,Lm/d),re=window.setInterval(()=>{Z(D=>ge(D,(D+1)%l.length))},ae);return()=>{window.clearInterval(re)}},[L,j,ge,l.length,d]),a.useEffect(()=>()=>{W.current&&window.clearTimeout(W.current)},[]);const X=(ae,re)=>{var be,We,_e,Te;const D=re==null?void 0:re.textMinHeightPx,ne=re==null?void 0:re.captionMinHeightPx,ce=re==null?void 0:re.dataMeasureAttrs,Ne=o&&!(re!=null&&re.dataMeasureAttrs)&&!(re!=null&&re.hideControls);return r.jsxs(r.Fragment,{children:[ae.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":Ne?"textMarginTop":void 0,className:Ne?`${s}-control`:void 0,style:{height:y.scalingValue(w??0,n??!1)}}),r.jsx("div",{...ce&&{"data-testimonial-measure":"text"},style:{...Xt(G,n),...D&&D>0?{minHeight:D}:{},textAlign:b,pointerEvents:"auto"},children:r.jsx(pi,{content:ae.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":Ne?"imageMarginTop":void 0,className:Ne?`${s}-control`:void 0,style:{height:y.scalingValue(m??0,n??!1)}}),r.jsx("div",{style:{width:y.scalingValue(T??0,n??!1),height:y.scalingValue(v??0,n??!1)},children:((be=ae.image)==null?void 0:be.url)&&r.jsx("img",{src:(We=ae.image)==null?void 0:We.url,alt:((_e=ae.image)==null?void 0:_e.name)??"",className:`${s}-icon`,style:{objectFit:((Te=ae.image)==null?void 0:Te.objectFit)||"contain"}})})]}),ae.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[r.jsx("div",{"data-controls":Ne?"captionMarginTop":void 0,className:Ne?`${s}-control`:void 0,style:{height:y.scalingValue(S??0,n??!1)}}),r.jsx("div",{...ce?{"data-testimonial-measure":"caption"}:{},style:{...Xt(J,n),...ne&&ne>0?{minHeight:ne}:{},textAlign:b,pointerEvents:"auto"},children:r.jsx(pi,{content:ae.caption})})]})]})},ve=a.useCallback(ae=>{$(ae.maxTextPx),Y(ae.maxCaptionPx)},[]);if(a.useLayoutEffect(()=>{if(!V){ve({maxTextPx:0,maxCaptionPx:0});return}const ae=N.current;if(!ae)return;const re=()=>{y.readTestimonialTextMeasure(ae,ve)};re();const D=new ResizeObserver(re);return D.observe(ae),()=>{D.disconnect()}},[V,ve,t]),!_)return r.jsx(r.Fragment,{});const $e=V?{textMinHeightPx:H,captionMinHeightPx:U}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Tm(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:y.scalingValue(u??0,n??!1),alignItems:f},children:[V&&r.jsx("div",{ref:N,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((ae,re)=>r.jsx("div",{style:{width:"100%"},children:X(ae,{dataMeasureAttrs:!0})},re))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[O&&E&&r.jsx("div",{className:ct(`${s}-fade-item-prev`,`${s}-fade-out`),children:X(O,{...$e,hideControls:!0})}),r.jsx("div",{className:ct(`${s}-fade-item-current`,E?`${s}-fade-in`:void 0),children:X(_,$e)})]})]}),se.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:y.scalingValue(C??.02,n??!1),height:y.scalingValue(C??.02,n??!1),"--arrow-hover-color":M},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:h,disabled:!j,"aria-label":"Previous testimonial",children:se.icon&&r.jsx(nn,{url:se.icon,fill:x,hoverFill:M,className:ct(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:ct(`${s}-arrow`,`${s}-next-arrow`),style:{width:y.scalingValue(C??.02,n??!1),height:y.scalingValue(C??.02,n??!1),"--arrow-hover-color":M},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:ue,disabled:!j,"aria-label":"Next testimonial",children:se.icon&&r.jsx(nn,{url:se.icon,fill:x,hoverFill:M,className:`${s}-arrow-img`})})})]})]})})},Rm=`import cn from 'classnames';
3320
3320
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
3321
3321
  import { CommonComponentProps } from '../props';
3322
3322
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4155,7 +4155,7 @@ type TestimonialsSettings = {
4155
4155
  z-index: 2;
4156
4156
  width: 100%;
4157
4157
  }
4158
- `}const Sn=500,Fm=750,_n="cubic-bezier(0.22, 1, 0.36, 1)",Wm=72,_m=50;function Hm(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 Nm(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Om(e){const[t]=e.media;return t!=null&&t.url?t:null}function jm(e){return!Array.isArray(e)||e.length===0?[]:Hm(e)?e.flatMap(t=>{const n=Nm(t);if(!n)return[];const i=Om(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 Ii(e){return e.type==="video"}function zm(e){e.pause(),e.removeAttribute("src"),e.load()}function Ss({media:e,className:t,style:n,onMediaClick:i}){return Ii(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 $s(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Bm(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const s=e.width/n;return{width:e.width,height:s,left:e.left,top:e.top+(e.height-s)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function Dm({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:l}){return a.useEffect(()=>{const d=n.current;if(d)return()=>{zm(d)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:l,style:i})}function Vm({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:s,onPrev:l,onNext:d,counterClassName:c,counterStyle:u}){const m=i==="cover",w=a.useRef(null),S=a.useRef(null),T=a.useRef(null),v=a.useRef(null),C=a.useRef(0),x=a.useRef(0),M=a.useRef("none"),L=a.useRef(!1),R=a.useRef(!1),J=a.useRef(null),A=a.useRef(0),ee=a.useRef(null),E=a.useRef(!1),I=a.useRef(null),[F,f]=a.useState(null),[b,W]=a.useState(null),[O,K]=a.useState("opening"),[G,Q]=a.useState(0),[V,N]=a.useState(0),[_,$]=a.useState(null),[U,X]=a.useState(!1),[ce,j]=a.useState(!1),[ge,h]=a.useState(!1),[he,Y]=a.useState(null),be=a.useRef(n),Ce=t[n],le=Ce?Ii(Ce):!1,re=_!==null,D=a.useCallback(Le=>{const Z=Le.currentTarget,ne=Z instanceof HTMLVideoElement?{width:Z.videoWidth,height:Z.videoHeight}:{width:Z.naturalWidth,height:Z.naturalHeight};!ne.width||!ne.height||Y(ne)},[]);a.useEffect(()=>{J.current=b},[b]),a.useEffect(()=>{const Le=w.current;if(!Le)return;const Z=()=>W($s(Le));Z();const ne=new ResizeObserver(Z);return ne.observe(Le),()=>ne.disconnect()},[]);const se=a.useCallback(()=>{I.current!==null&&(window.clearTimeout(I.current),I.current=null)},[]),ue=a.useCallback(()=>{se(),A.current=0,ee.current=null,E.current=!1,N(0),$(null),X(!1)},[se]),_e=a.useCallback(Le=>{ue(),Le===1?d():l()},[d,l,ue]),xe=a.useCallback((Le,Z)=>{var lt;const ne=((lt=J.current)==null?void 0:lt.width)??0;se(),ee.current=Le,$(Le),E.current=!0,X(!0);const Ne=Z?-Le*ne:0;A.current=Ne,N(Ne),I.current=window.setTimeout(()=>{I.current=null,Z?_e(Le):ue()},Sn+32)},[se,_e,ue]),Pe=a.useCallback(Le=>{E.current||t.length<=1||(ee.current=Le,$(Le),E.current=!1,X(!1),A.current=0,N(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{xe(Le,!0)})}))},[t.length,xe]),Fe=a.useCallback(()=>{const Le=S.current;if(!Le)return;const Z=$s(Le);!Z.width||!Z.height||f(Z)},[]);a.useEffect(()=>{Fe();const Le=S.current;if(!Le)return;const Z=new ResizeObserver(()=>Fe());return Z.observe(Le),()=>Z.disconnect()},[Fe]),a.useEffect(()=>{O==="opening"&&F&&K("open")},[O,F]),a.useEffect(()=>{if(O!=="closing")return;const Le=setTimeout(()=>s(),Sn);return()=>clearTimeout(Le)},[O,s]),a.useEffect(()=>()=>{se()},[se]),a.useLayoutEffect(()=>{be.current!==n&&(ue(),Q(0),h(!1),j(!1),Y(null),C.current=0,x.current=0,M.current="none",L.current=!1,v.current=null,R.current=!1,be.current=n)},[n,ue]),a.useEffect(()=>{if(O!=="open")return;let Le=null;const Z=()=>{Le&&(document.removeEventListener("click",Le,!0),Le=null)},ne=()=>{Z(),Le=Ue=>{Ue.stopPropagation(),Ue.preventDefault(),Z()},document.addEventListener("click",Le,!0)},Ne=Ue=>{const ot=Ue<0?1:-1;if(Math.abs(Ue)>_m&&t.length>1){xe(ot,!0);return}xe(ot,!1)},lt=Ue=>{if(Ue.touches.length!==1||E.current)return;const ot=Ue.touches[0];R.current=!0,v.current={x:ot.clientX,y:ot.clientY},M.current="none",x.current=0,L.current=!1},De=Ue=>{if(!v.current||Ue.touches.length!==1||E.current)return;const ot=Ue.touches[0],ct=ot.clientX-v.current.x,gt=ot.clientY-v.current.y;if(M.current==="none"){if(Math.abs(ct)<10&&Math.abs(gt)<10)return;if(Math.abs(ct)>Math.abs(gt)){if(t.length<=1)return;M.current="horizontal"}else if(gt>0)M.current="vertical";else return}if(M.current==="horizontal"){L.current=!0,j(!0),x.current=ct;const Et=ct<0?1:-1;ee.current!==Et&&(ee.current=Et,$(Et)),A.current=ct,N(ct),Ue.preventDefault();return}M.current==="vertical"&&(L.current=!0,j(!0),C.current=gt,Q(gt),Ue.preventDefault())},Oe=()=>{if(!v.current)return;const Ue=M.current,ot=L.current;if(ot&&Ue==="horizontal")Ne(x.current),ne();else if(ot&&Ue==="vertical")if(C.current>Wm){const gt=window.innerHeight;C.current=gt,h(!0),Q(gt),K("closing")}else C.current=0,Q(0),ne();else Ue==="horizontal"&&Math.abs(x.current)>0&&(Ne(x.current),ne());v.current=null,M.current="none",x.current=0,L.current=!1,j(!1)};return document.addEventListener("touchstart",lt,{passive:!0}),document.addEventListener("touchmove",De,{passive:!1}),document.addEventListener("touchend",Oe),document.addEventListener("touchcancel",Oe),()=>{document.removeEventListener("touchstart",lt),document.removeEventListener("touchmove",De),document.removeEventListener("touchend",Oe),document.removeEventListener("touchcancel",Oe),Z()}},[O,t.length,xe]),a.useEffect(()=>{const Le=Z=>{Z.key==="Escape"&&(Z.preventDefault(),Z.stopPropagation(),O!=="closing"&&K("closing"))};return window.addEventListener("keydown",Le,!0),()=>window.removeEventListener("keydown",Le,!0)},[O]);const Te=()=>{O!=="closing"&&K("closing")},Se=O==="open",q=O==="closing",me=G>0?Math.max(0,1-G/500):1,ve=G>0?Math.max(.35,1-G/500):1,pe=F?m?F:Bm(F,he):null,Ae=Le=>{if(Le.stopPropagation(),R.current){R.current=!1;return}if(t.length<=1)return;const Z=pe??Le.currentTarget.getBoundingClientRect(),ne=Le.clientY-Z.top,Ne=Math.min(52,Z.height*.2);if(!(ne>Z.height-Ne)){if(Le.clientX-Z.left<Z.width/2){Pe(-1);return}Pe(1)}},$e=Le=>{if(t.length<=1)return;const Z=pe??Le.currentTarget.getBoundingClientRect(),ne=Le.clientX-Z.left,Ne=Le.clientY-Z.top,lt=Math.min(52,Z.height*.2);if(Ne>Z.height-lt){Le.currentTarget.style.cursor="default";return}Le.currentTarget.style.cursor=ne<Z.width/2?"w-resize":"e-resize"},z={position:"fixed",top:b==null?void 0:b.top,left:b==null?void 0:b.left,width:b==null?void 0:b.width,height:b==null?void 0:b.height,zIndex:9998},de=m?"cover":"contain",ae=V!==0||G>0?`translate(${V}px, ${G}px)`:void 0,H=ce&&!U?"none":U?`transform ${Sn}ms ${_n}`:ge?`transform ${Sn}ms ${_n}, opacity ${Sn}ms ${_n}`:O==="opening"||q?`opacity ${Sn}ms ${_n}`:"none",ie={...z,transform:ae,opacity:G>0?ve:O==="opening"||q?0:1,transition:H,pointerEvents:"none"},Ie={position:"absolute",top:((pe==null?void 0:pe.top)??0)-((b==null?void 0:b.top)??0),left:((pe==null?void 0:pe.left)??0)-((b==null?void 0:b.left)??0),width:pe==null?void 0:pe.width,height:pe==null?void 0:pe.height,objectFit:de,pointerEvents:le&&Se&&!re?"auto":"none",touchAction:le&&Se?"none":void 0},oe=(b==null?void 0:b.width)??0,P=re?(n+_+t.length)%t.length:null,He=P!==null?t[P]:null,We={...z,transform:re?`translateX(${_*oe+V}px)`:void 0,opacity:1,transition:U?`transform ${Sn}ms ${_n}`:"none",pointerEvents:"none"},et={position:"absolute",top:((F==null?void 0:F.top)??0)-((b==null?void 0:b.top)??0),left:((F==null?void 0:F.left)??0)-((b==null?void 0:b.left)??0),width:F==null?void 0:F.width,height:F==null?void 0:F.height,objectFit:de,pointerEvents:"none"},Je=pe?{position:"fixed",top:pe.top,height:pe.height,width:pe.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:w,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:O==="open"?"none":void 0},onClick:Te,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:Se?me:0,transition:ce?"none":`opacity ${Sn}ms ${_n}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:m?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:S,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:Se?1:0,transition:`opacity ${Sn}ms ${_n}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:S,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Se?1:0,transition:`opacity ${Sn}ms ${_n}`},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),F&&b&&He&&r.jsx("div",{style:We,children:Ii(He)?r.jsx("video",{src:He.url,muted:!0,playsInline:!0,preload:"auto",style:et},`neighbor-${P}-${He.url}`):r.jsx("img",{src:He.url,alt:He.name,style:et},`neighbor-${P}-${He.url}`)}),F&&b&&Ce&&r.jsx("div",{style:ie,children:le?r.jsx(Dm,{src:Ce.url,phase:O,mediaRef:T,mediaStyle:Ie,onLoadedMetadata:D,onClick:Ae,onMouseMove:$e},`${n}-${Ce.url}`):r.jsx("img",{ref:T,src:Ce.url,alt:Ce.name,onLoad:D,style:Ie},`${n}-${Ce.url}`)}),Se&&Je&&t.length>1&&!le&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...Je,left:pe.left,cursor:"w-resize",pointerEvents:re?"none":"auto"},onClick:Le=>{if(R.current){R.current=!1;return}Le.stopPropagation(),Pe(-1)}}),r.jsx("div",{style:{...Je,left:pe.left+pe.width/2,cursor:"e-resize",pointerEvents:re?"none":"auto"},onClick:Le=>{if(R.current){R.current=!1;return}Le.stopPropagation(),Pe(1)}})]})]})}function Gm(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function qm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=y.useScopedStyles(),{type:m="a",gridLayout:w,textBoxWidth:S=100,verticalGap:T,entriesCount:v,lightbox:C,imageDisplay:x,imageCorners:M,lightboxImageDisplay:L,slider:R,sliderTiming:J,direction:A,transition:ee,titleMarginTop:E,subtitleMarginTop:I,titleColor:F,subtitleColor:f,lightboxCounterColor:b,titleFontFamily:W,titleFontSettings:O,titleFontSize:K,titleLineHeight:G,titleLetterSpacing:Q,titleWordSpacing:V,titleTextAppearance:N,subtitleFontFamily:_,subtitleFontSettings:$,subtitleFontSize:U,subtitleLineHeight:X,subtitleLetterSpacing:ce,subtitleWordSpacing:j,subtitleTextAppearance:ge,lightboxCounterFontFamily:h,lightboxCounterFontSettings:he,lightboxCounterFontSize:Y,lightboxCounterLineHeight:be,lightboxCounterLetterSpacing:Ce,lightboxCounterWordSpacing:le,lightboxCounterTextAppearance:re,showText:D="always",alignEntries:se="off",align:ue="top"}=e,_e={fontSettings:{fontFamily:W,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:K??.01,lineHeight:G,letterSpacing:Q??0,wordSpacing:V??0,textAppearance:N,color:F},Pe={...cn(Xt(_e,n))},Fe={fontSettings:{fontFamily:_,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:U??.01,lineHeight:X,letterSpacing:ce??0,wordSpacing:j??0,textAppearance:ge,color:f},Se={...cn(Xt(Fe,n))},q={fontSettings:{fontFamily:h,fontWeight:(he==null?void 0:he.fontWeight)??400,fontStyle:(he==null?void 0:he.fontStyle)??"normal"},fontSize:Y??.01,lineHeight:be,letterSpacing:Ce??0,wordSpacing:le??0,textAppearance:re,color:b},ve={...cn(Xt(q,n)),...Or(Y,be,u,n)},pe=Nr(K,G,`${u}-item-title`,`${u}-text-tight-leading`),Ae=Nr(U,X,`${u}-item-subtitle`,`${u}-text-tight-leading`),$e=Or(K,G,u,n),z=Or(U,X,u,n),de=Nr(Y,be,`${u}-lightbox-counter`,`${u}-text-tight-leading`),ae=y.buildColorVars(u,{titleColor:F,subtitleColor:f,lightboxCounterColor:b},Km,Um),Ie=`${l&&l!=="default"?`${u}-state-${l}`:""}${D==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),oe=v===0?1/0:v,P=(t??[]).slice(0,oe),He=w.entryWidth??.2,We=(x==null?void 0:x.display)==="cover",et=(x==null?void 0:x.ratioValue)??"1:1",Je=(x==null?void 0:x.reversed)??!1,[Le,Z]=et.split(":").map(Number),lt=`${Je?Z:Le} / ${Je?Le:Z}`,De=w.columnsCount,Oe=y.scalingValue(He??0,n),Ue=Oe,ot=!We&&R!=="off",ct=P.length%De||De,gt=ct<De&&P.length>0,Et=P.length-ct,ut=gt?Math.floor((De-ct)/2)+1:1,bt=M?y.scalingValue(M,n):void 0,Wt={width:Ue,...We?{aspectRatio:lt,height:"auto",overflow:"hidden"}:{height:"auto"},...bt?{borderRadius:bt,overflow:"hidden"}:{}},st=`${u}-item-image-wrapper${ot?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),qe=m==="d"||m==="e"||m==="f",ze=se==="on",yt=`calc(${y.scalingValue(He??0,n)} * (${S} / 100))`,xt=y.scalingValue(He*S/100,n),kt=We?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...bt?{borderRadius:bt}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...bt?{borderRadius:bt}:{}},[jt,tn]=a.useState("ltr"),[sn,Ct]=a.useState(0),Mt=a.useRef(null);a.useEffect(()=>{const Xe=Mt.current;if(!Xe)return;const Ye=new ResizeObserver(nt=>{Ct(Math.round(nt[0].contentRect.width))});return Ye.observe(Xe),()=>Ye.disconnect()},[]);const Yt=(()=>{const Xe={...ae},Ye=Mt.current?getComputedStyle(Mt.current).getPropertyValue("--cntrl-article-width").trim():"";return Ye&&(Xe["--cntrl-article-width"]=Ye),Xe})(),[Gt,we]=a.useState(!1),[Ve,Ge]=a.useState([]),[rt,It]=a.useState(0),dt=C==="on"&&(!n||i),Qe=(Xe,Ye)=>{n&&!i||C!=="off"&&(Ge(Xe),It(Ye),we(!0))};a.useEffect(()=>{if(!Gt||C!=="on"||typeof document>"u")return;const Xe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Xe}},[Gt,C]),a.useEffect(()=>{!n||i||we(!1)},[n,i]);const qt=a.useMemo(()=>Am(u),[u]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:qt}}),r.jsx("div",{style:ae,children:r.jsx("div",{ref:Mt,className:`${u}-wrapper ${u}-type-${m}${ze?` ${u}-align-entries`:""} ${u}-image-align-${ue} ${Ie}`.trim(),style:{gridTemplateColumns:`repeat(${De}, ${Oe})`,rowGap:ze?0:y.scalingValue(T??0,n),columnGap:y.scalingValue(w.horizontalGap??0,n),width:y.scalingValue(w.wrapperWidth??0,n),...ze?{[`--${u}-align-entries-row-gap`]:y.scalingValue(T??0,n)}:{}},children:P.map((Xe,Ye)=>{var zt;const nt=ws(Xe.title),Tt=ws(Xe.subtitle),Lt=(((zt=Xe.link)==null?void 0:zt.length)??0)>0&&C==="off"?Xe.link:void 0,ht=Math.floor(Ye/De)===Math.ceil(P.length/De)-1,At=gt&&Ye>=Et?`${ut+(Ye-Et)}`:void 0,Ot=qe?r.jsxs("div",{className:`${u}-item-text-block`,children:[nt&&r.jsx("p",{className:pe,style:{width:yt,...Pe,...$e},children:Xe.title}),nt&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(E??0,n),width:xt}}),Tt&&r.jsx("p",{className:Ae,style:{width:yt,...Se,...z},children:Xe.subtitle}),Tt&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(I??0,n),width:xt}})]}):null,Nt=ze?r.jsxs("div",{className:`${u}-item-title-row`,children:[!qe&&r.jsx("div",{"data-controls":o&&nt?"titleMarginTop":void 0,className:o&&nt?`${u}-control`:void 0,style:{height:nt?y.scalingValue(E??0,n):0,width:xt}}),nt&&r.jsx("p",{className:pe,style:{width:yt,...Pe,...$e},children:Xe.title}),qe&&nt&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(E??0,n),width:xt}})]}):null,Dt=ze?r.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!qe&&r.jsx("div",{"data-controls":o&&Tt?"subtitleMarginTop":void 0,className:o&&Tt?`${u}-control`:void 0,style:{height:Tt?y.scalingValue(I??0,n):0,width:xt}}),Tt&&r.jsx("p",{className:Ae,style:{width:yt,...Se,...z},children:Xe.subtitle}),qe&&Tt&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(I??0,n),width:xt}})]}):null,vt=Lt?r.jsxs("a",{href:Lt,target:"_blank",className:`${u}-item-text-link`,children:[Nt,Dt]}):r.jsxs(r.Fragment,{children:[Nt,Dt]}),Vt=jm(Xe.gallery),Kt=Vt.filter(wt=>wt.lightboxMedia).map(wt=>wt.lightboxMedia),Ut=r.jsx("div",{className:st,style:Wt,children:Vt.length===0?null:R==="off"?(()=>{const{displayMedia:wt,lightboxMedia:g}=Vt[0],fe=g?Kt.findIndex(Ee=>Ee.url===g.url):-1;return r.jsx(Ss,{media:wt,className:`${u}-item-${Ii(wt)?"video":"image"}`.trim(),style:kt,onMediaClick:dt&&fe>=0?()=>Qe(Kt,fe):void 0})})():r.jsxs(r.Fragment,{children:[ot&&ze&&r.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Vt.map(({displayMedia:wt})=>Ii(wt)?r.jsx("video",{src:wt.url,muted:!0,playsInline:!0},`sizer-${wt.url}`):r.jsx("img",{src:wt.url,alt:""},`sizer-${wt.url}`))}),r.jsx(Ha,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:J*1e3,width:"100%",height:"100%",speed:Fm,type:ee==="fade"?"fade":"loop",rewind:ee==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:ee==="fade"?"ltr":A!=="random"?A==="horizontal"?"ltr":"ttb":jt},onMoved:wt=>{if(A!=="random"||ee==="fade")return;const g=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";tn(g),setTimeout(()=>{wt.refresh()},0)},children:Vt.map(({displayMedia:wt,lightboxMedia:g},fe)=>{const Ee=g?Kt.findIndex(Me=>Me.url===g.url):-1;return r.jsx(Na,{children:r.jsx(Ss,{media:wt,className:`${u}-item-${Ii(wt)?"video":"image"}`.trim(),style:kt,onMediaClick:dt&&Ee>=0?()=>Qe(Kt,Ee):void 0})},fe)})},`${ee}-${He}-${A}-${J}-${sn}-${d}`)]})}),Zt=qe?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&nt?"titleMarginTop":void 0,className:o&&nt?`${u}-control`:void 0,style:{height:nt?y.scalingValue(E??0,n):0,width:xt}}),r.jsx("p",{className:pe,style:{width:yt,...Pe,...$e},children:Xe.title}),r.jsx("div",{"data-controls":o&&Tt?"subtitleMarginTop":void 0,className:o&&Tt?`${u}-control`:void 0,style:{height:Tt?y.scalingValue(I??0,n):0,width:xt}}),r.jsx("p",{className:Ae,style:{width:yt,...Se,...z},children:Xe.subtitle})]});return r.jsx("div",{className:`${u}-item`.trim(),style:At&&!ze?{gridColumn:At}:void 0,children:r.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${ze&&ht?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(S??0)>100?`calc(${Oe} * (${S} / 100))`:Oe,...At&&ze?{gridColumn:At}:{}},children:ze?r.jsx(r.Fragment,{children:qe?r.jsxs(r.Fragment,{children:[vt,r.jsx("a",{href:Lt,target:"_blank",className:`${u}-item-image-link`,children:Ut})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:Lt,target:"_blank",className:`${u}-item-image-link`,children:Ut}),vt]})}):Lt?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:Lt,target:"_blank",className:`${u}-item-image-link`,children:[Ot,Ut]}),!qe&&r.jsx("a",{href:Lt,target:"_blank",className:`${u}-item-text-link`,children:Zt})]}):r.jsxs(r.Fragment,{children:[Ot,Ut,Zt]})})},Ye)})})}),(!n||i)&&Gt&&typeof document<"u"&&C==="on"&&(()=>{const Xe=(c?document.getElementById(c):null)??document.body;return mi.createPortal(r.jsx("div",{style:Yt,"data-selection":"none",children:r.jsx(Vm,{prefix:u,items:Ve,index:rt,imageDisplay:Gm(L),isEditor:n,onClose:()=>we(!1),onPrev:()=>It(Ye=>(Ye-1+Ve.length)%Ve.length),onNext:()=>It(Ye=>(Ye+1)%Ve.length),counterClassName:de,counterStyle:ve})}),Xe)})()]})}const Km={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Um=["hover","focus","filled","success","error"],Xm=`import { Splide, SplideSlide } from '@splidejs/react-splide';
4158
+ `}const Sn=500,Fm=750,_n="cubic-bezier(0.22, 1, 0.36, 1)",Wm=72,_m=50;function Hm(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 Nm(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Om(e){const[t]=e.media;return t!=null&&t.url?t:null}function jm(e){return!Array.isArray(e)||e.length===0?[]:Hm(e)?e.flatMap(t=>{const n=Nm(t);if(!n)return[];const i=Om(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 Ii(e){return e.type==="video"}function zm(e){e.pause(),e.removeAttribute("src"),e.load()}function Ss({media:e,className:t,style:n,onMediaClick:i}){return Ii(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 $s(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Bm(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const s=e.width/n;return{width:e.width,height:s,left:e.left,top:e.top+(e.height-s)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function Dm({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:l}){return a.useEffect(()=>{const d=n.current;if(d)return()=>{zm(d)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:l,style:i})}function Vm({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:s,onPrev:l,onNext:d,counterClassName:c,counterStyle:u}){const m=i==="cover",w=a.useRef(null),S=a.useRef(null),T=a.useRef(null),v=a.useRef(null),C=a.useRef(0),x=a.useRef(0),M=a.useRef("none"),L=a.useRef(!1),R=a.useRef(!1),Z=a.useRef(null),P=a.useRef(0),Q=a.useRef(null),E=a.useRef(!1),I=a.useRef(null),[W,f]=a.useState(null),[b,_]=a.useState(null),[O,K]=a.useState("opening"),[G,J]=a.useState(0),[V,N]=a.useState(0),[H,$]=a.useState(null),[U,Y]=a.useState(!1),[se,j]=a.useState(!1),[ge,h]=a.useState(!1),[ue,X]=a.useState(null),ve=a.useRef(n),$e=t[n],ae=$e?Ii($e):!1,re=H!==null,D=a.useCallback(Ce=>{const He=Ce.currentTarget,ze=He instanceof HTMLVideoElement?{width:He.videoWidth,height:He.videoHeight}:{width:He.naturalWidth,height:He.naturalHeight};!ze.width||!ze.height||X(ze)},[]);a.useEffect(()=>{Z.current=b},[b]),a.useEffect(()=>{const Ce=w.current;if(!Ce)return;const He=()=>_($s(Ce));He();const ze=new ResizeObserver(He);return ze.observe(Ce),()=>ze.disconnect()},[]);const ne=a.useCallback(()=>{I.current!==null&&(window.clearTimeout(I.current),I.current=null)},[]),ce=a.useCallback(()=>{ne(),P.current=0,Q.current=null,E.current=!1,N(0),$(null),Y(!1)},[ne]),Ne=a.useCallback(Ce=>{ce(),Ce===1?d():l()},[d,l,ce]),be=a.useCallback((Ce,He)=>{var Se;const ze=((Se=Z.current)==null?void 0:Se.width)??0;ne(),Q.current=Ce,$(Ce),E.current=!0,Y(!0);const me=He?-Ce*ze:0;P.current=me,N(me),I.current=window.setTimeout(()=>{I.current=null,He?Ne(Ce):ce()},Sn+32)},[ne,Ne,ce]),We=a.useCallback(Ce=>{E.current||t.length<=1||(Q.current=Ce,$(Ce),E.current=!1,Y(!1),P.current=0,N(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{be(Ce,!0)})}))},[t.length,be]),_e=a.useCallback(()=>{const Ce=S.current;if(!Ce)return;const He=$s(Ce);!He.width||!He.height||f(He)},[]);a.useEffect(()=>{_e();const Ce=S.current;if(!Ce)return;const He=new ResizeObserver(()=>_e());return He.observe(Ce),()=>He.disconnect()},[_e]),a.useEffect(()=>{O==="opening"&&W&&K("open")},[O,W]),a.useEffect(()=>{if(O!=="closing")return;const Ce=setTimeout(()=>s(),Sn);return()=>clearTimeout(Ce)},[O,s]),a.useEffect(()=>()=>{ne()},[ne]),a.useLayoutEffect(()=>{ve.current!==n&&(ce(),J(0),h(!1),j(!1),X(null),C.current=0,x.current=0,M.current="none",L.current=!1,v.current=null,R.current=!1,ve.current=n)},[n,ce]),a.useEffect(()=>{if(O!=="open")return;let Ce=null;const He=()=>{Ce&&(document.removeEventListener("click",Ce,!0),Ce=null)},ze=()=>{He(),Ce=Ge=>{Ge.stopPropagation(),Ge.preventDefault(),He()},document.addEventListener("click",Ce,!0)},me=Ge=>{const tt=Ge<0?1:-1;if(Math.abs(Ge)>_m&&t.length>1){be(tt,!0);return}be(tt,!1)},Se=Ge=>{if(Ge.touches.length!==1||E.current)return;const tt=Ge.touches[0];R.current=!0,v.current={x:tt.clientX,y:tt.clientY},M.current="none",x.current=0,L.current=!1},je=Ge=>{if(!v.current||Ge.touches.length!==1||E.current)return;const tt=Ge.touches[0],Ke=tt.clientX-v.current.x,ut=tt.clientY-v.current.y;if(M.current==="none"){if(Math.abs(Ke)<10&&Math.abs(ut)<10)return;if(Math.abs(Ke)>Math.abs(ut)){if(t.length<=1)return;M.current="horizontal"}else if(ut>0)M.current="vertical";else return}if(M.current==="horizontal"){L.current=!0,j(!0),x.current=Ke;const ht=Ke<0?1:-1;Q.current!==ht&&(Q.current=ht,$(ht)),P.current=Ke,N(Ke),Ge.preventDefault();return}M.current==="vertical"&&(L.current=!0,j(!0),C.current=ut,J(ut),Ge.preventDefault())},Me=()=>{if(!v.current)return;const Ge=M.current,tt=L.current;if(tt&&Ge==="horizontal")me(x.current),ze();else if(tt&&Ge==="vertical")if(C.current>Wm){const ut=window.innerHeight;C.current=ut,h(!0),J(ut),K("closing")}else C.current=0,J(0),ze();else Ge==="horizontal"&&Math.abs(x.current)>0&&(me(x.current),ze());v.current=null,M.current="none",x.current=0,L.current=!1,j(!1)};return document.addEventListener("touchstart",Se,{passive:!0}),document.addEventListener("touchmove",je,{passive:!1}),document.addEventListener("touchend",Me),document.addEventListener("touchcancel",Me),()=>{document.removeEventListener("touchstart",Se),document.removeEventListener("touchmove",je),document.removeEventListener("touchend",Me),document.removeEventListener("touchcancel",Me),He()}},[O,t.length,be]),a.useEffect(()=>{const Ce=He=>{He.key==="Escape"&&(He.preventDefault(),He.stopPropagation(),O!=="closing"&&K("closing"))};return window.addEventListener("keydown",Ce,!0),()=>window.removeEventListener("keydown",Ce,!0)},[O]);const Te=()=>{O!=="closing"&&K("closing")},we=O==="open",q=O==="closing",pe=G>0?Math.max(0,1-G/500):1,fe=G>0?Math.max(.35,1-G/500):1,le=W?m?W:Bm(W,ue):null,Pe=Ce=>{if(Ce.stopPropagation(),R.current){R.current=!1;return}if(t.length<=1)return;const He=le??Ce.currentTarget.getBoundingClientRect(),ze=Ce.clientY-He.top,me=Math.min(52,He.height*.2);if(!(ze>He.height-me)){if(Ce.clientX-He.left<He.width/2){We(-1);return}We(1)}},Le=Ce=>{if(t.length<=1)return;const He=le??Ce.currentTarget.getBoundingClientRect(),ze=Ce.clientX-He.left,me=Ce.clientY-He.top,Se=Math.min(52,He.height*.2);if(me>He.height-Se){Ce.currentTarget.style.cursor="default";return}Ce.currentTarget.style.cursor=ze<He.width/2?"w-resize":"e-resize"},z={position:"fixed",top:b==null?void 0:b.top,left:b==null?void 0:b.left,width:b==null?void 0:b.width,height:b==null?void 0:b.height,zIndex:9998},de=m?"cover":"contain",ie=V!==0||G>0?`translate(${V}px, ${G}px)`:void 0,F=se&&!U?"none":U?`transform ${Sn}ms ${_n}`:ge?`transform ${Sn}ms ${_n}, opacity ${Sn}ms ${_n}`:O==="opening"||q?`opacity ${Sn}ms ${_n}`:"none",ee={...z,transform:ie,opacity:G>0?fe:O==="opening"||q?0:1,transition:F,pointerEvents:"none"},Ie={position:"absolute",top:((le==null?void 0:le.top)??0)-((b==null?void 0:b.top)??0),left:((le==null?void 0:le.left)??0)-((b==null?void 0:b.left)??0),width:le==null?void 0:le.width,height:le==null?void 0:le.height,objectFit:de,pointerEvents:ae&&we&&!re?"auto":"none",touchAction:ae&&we?"none":void 0},oe=(b==null?void 0:b.width)??0,A=re?(n+H+t.length)%t.length:null,Oe=A!==null?t[A]:null,Ae={...z,transform:re?`translateX(${H*oe+V}px)`:void 0,opacity:1,transition:U?`transform ${Sn}ms ${_n}`:"none",pointerEvents:"none"},rt={position:"absolute",top:((W==null?void 0:W.top)??0)-((b==null?void 0:b.top)??0),left:((W==null?void 0:W.left)??0)-((b==null?void 0:b.left)??0),width:W==null?void 0:W.width,height:W==null?void 0:W.height,objectFit:de,pointerEvents:"none"},et=le?{position:"fixed",top:le.top,height:le.height,width:le.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:w,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:O==="open"?"none":void 0},onClick:Te,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:we?pe:0,transition:se?"none":`opacity ${Sn}ms ${_n}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:m?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:S,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:we?1:0,transition:`opacity ${Sn}ms ${_n}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:S,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:we?1:0,transition:`opacity ${Sn}ms ${_n}`},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),W&&b&&Oe&&r.jsx("div",{style:Ae,children:Ii(Oe)?r.jsx("video",{src:Oe.url,muted:!0,playsInline:!0,preload:"auto",style:rt},`neighbor-${A}-${Oe.url}`):r.jsx("img",{src:Oe.url,alt:Oe.name,style:rt},`neighbor-${A}-${Oe.url}`)}),W&&b&&$e&&r.jsx("div",{style:ee,children:ae?r.jsx(Dm,{src:$e.url,phase:O,mediaRef:T,mediaStyle:Ie,onLoadedMetadata:D,onClick:Pe,onMouseMove:Le},`${n}-${$e.url}`):r.jsx("img",{ref:T,src:$e.url,alt:$e.name,onLoad:D,style:Ie},`${n}-${$e.url}`)}),we&&et&&t.length>1&&!ae&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...et,left:le.left,cursor:"w-resize",pointerEvents:re?"none":"auto"},onClick:Ce=>{if(R.current){R.current=!1;return}Ce.stopPropagation(),We(-1)}}),r.jsx("div",{style:{...et,left:le.left+le.width/2,cursor:"e-resize",pointerEvents:re?"none":"auto"},onClick:Ce=>{if(R.current){R.current=!1;return}Ce.stopPropagation(),We(1)}})]})]})}function Gm(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function qm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=y.useScopedStyles(),{type:m="a",gridLayout:w,textBoxWidth:S=100,verticalGap:T,entriesCount:v,lightbox:C,imageDisplay:x,imageCorners:M,lightboxImageDisplay:L,slider:R,sliderTiming:Z,direction:P,transition:Q,titleMarginTop:E,subtitleMarginTop:I,titleColor:W,subtitleColor:f,lightboxCounterColor:b,titleFontFamily:_,titleFontSettings:O,titleFontSize:K,titleLineHeight:G,titleLetterSpacing:J,titleWordSpacing:V,titleTextAppearance:N,subtitleFontFamily:H,subtitleFontSettings:$,subtitleFontSize:U,subtitleLineHeight:Y,subtitleLetterSpacing:se,subtitleWordSpacing:j,subtitleTextAppearance:ge,lightboxCounterFontFamily:h,lightboxCounterFontSettings:ue,lightboxCounterFontSize:X,lightboxCounterLineHeight:ve,lightboxCounterLetterSpacing:$e,lightboxCounterWordSpacing:ae,lightboxCounterTextAppearance:re,showText:D="always",alignEntries:ne="off",align:ce="top"}=e,Ne={fontSettings:{fontFamily:_,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:K??.01,lineHeight:G,letterSpacing:J??0,wordSpacing:V??0,textAppearance:N,color:W},We={...cn(Xt(Ne,n))},_e={fontSettings:{fontFamily:H,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:U??.01,lineHeight:Y,letterSpacing:se??0,wordSpacing:j??0,textAppearance:ge,color:f},we={...cn(Xt(_e,n))},q={fontSettings:{fontFamily:h,fontWeight:(ue==null?void 0:ue.fontWeight)??400,fontStyle:(ue==null?void 0:ue.fontStyle)??"normal"},fontSize:X??.01,lineHeight:ve,letterSpacing:$e??0,wordSpacing:ae??0,textAppearance:re,color:b},fe={...cn(Xt(q,n)),...Or(X,ve,u,n)},le=Nr(K,G,`${u}-item-title`,`${u}-text-tight-leading`),Pe=Nr(U,Y,`${u}-item-subtitle`,`${u}-text-tight-leading`),Le=Or(K,G,u,n),z=Or(U,Y,u,n),de=Nr(X,ve,`${u}-lightbox-counter`,`${u}-text-tight-leading`),ie=y.buildColorVars(u,{titleColor:W,subtitleColor:f,lightboxCounterColor:b},Km,Um),Ie=`${l&&l!=="default"?`${u}-state-${l}`:""}${D==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),oe=v===0?1/0:v,A=(t??[]).slice(0,oe),Oe=w.entryWidth??.2,Ae=(x==null?void 0:x.display)==="cover",rt=(x==null?void 0:x.ratioValue)??"1:1",et=(x==null?void 0:x.reversed)??!1,[Ce,He]=rt.split(":").map(Number),Se=`${et?He:Ce} / ${et?Ce:He}`,je=w.columnsCount,Me=y.scalingValue(Oe??0,n),Ge=Me,tt=!Ae&&R!=="off",Ke=A.length%je||je,ut=Ke<je&&A.length>0,ht=A.length-Ke,it=ut?Math.floor((je-Ke)/2)+1:1,xt=M?y.scalingValue(M,n):void 0,Wt={width:Ge,...Ae?{aspectRatio:Se,height:"auto",overflow:"hidden"}:{height:"auto"},...xt?{borderRadius:xt,overflow:"hidden"}:{}},dt=`${u}-item-image-wrapper${tt?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),Xe=m==="d"||m==="e"||m==="f",De=ne==="on",vt=`calc(${y.scalingValue(Oe??0,n)} * (${S} / 100))`,wt=y.scalingValue(Oe*S/100,n),kt=Ae?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...xt?{borderRadius:xt}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...xt?{borderRadius:xt}:{}},[jt,tn]=a.useState("ltr"),[sn,Tt]=a.useState(0),Mt=a.useRef(null);a.useEffect(()=>{const Ze=Mt.current;if(!Ze)return;const Je=new ResizeObserver(at=>{Tt(Math.round(at[0].contentRect.width))});return Je.observe(Ze),()=>Je.disconnect()},[]);const Yt=(()=>{const Ze={...ie},Je=Mt.current?getComputedStyle(Mt.current).getPropertyValue("--cntrl-article-width").trim():"";return Je&&(Ze["--cntrl-article-width"]=Je),Ze})(),[Gt,xe]=a.useState(!1),[qe,Ue]=a.useState([]),[lt,Rt]=a.useState(0),pt=C==="on"&&(!n||i),nt=(Ze,Je)=>{n&&!i||C!=="off"&&(Ue(Ze),Rt(Je),xe(!0))};a.useEffect(()=>{if(!Gt||C!=="on"||typeof document>"u")return;const Ze=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ze}},[Gt,C]),a.useEffect(()=>{!n||i||xe(!1)},[n,i]);const qt=a.useMemo(()=>Am(u),[u]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:qt}}),r.jsx("div",{style:ie,children:r.jsx("div",{ref:Mt,className:`${u}-wrapper ${u}-type-${m}${De?` ${u}-align-entries`:""} ${u}-image-align-${ce} ${Ie}`.trim(),style:{gridTemplateColumns:`repeat(${je}, ${Me})`,rowGap:De?0:y.scalingValue(T??0,n),columnGap:y.scalingValue(w.horizontalGap??0,n),width:y.scalingValue(w.wrapperWidth??0,n),...De?{[`--${u}-align-entries-row-gap`]:y.scalingValue(T??0,n)}:{}},children:A.map((Ze,Je)=>{var zt;const at=ws(Ze.title),Lt=ws(Ze.subtitle),It=(((zt=Ze.link)==null?void 0:zt.length)??0)>0&&C==="off"?Ze.link:void 0,ft=Math.floor(Je/je)===Math.ceil(A.length/je)-1,At=ut&&Je>=ht?`${it+(Je-ht)}`:void 0,Ot=Xe?r.jsxs("div",{className:`${u}-item-text-block`,children:[at&&r.jsx("p",{className:le,style:{width:vt,...We,...Le},children:Ze.title}),at&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(E??0,n),width:wt}}),Lt&&r.jsx("p",{className:Pe,style:{width:vt,...we,...z},children:Ze.subtitle}),Lt&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(I??0,n),width:wt}})]}):null,Nt=De?r.jsxs("div",{className:`${u}-item-title-row`,children:[!Xe&&r.jsx("div",{"data-controls":o&&at?"titleMarginTop":void 0,className:o&&at?`${u}-control`:void 0,style:{height:at?y.scalingValue(E??0,n):0,width:wt}}),at&&r.jsx("p",{className:le,style:{width:vt,...We,...Le},children:Ze.title}),Xe&&at&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(E??0,n),width:wt}})]}):null,Dt=De?r.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!Xe&&r.jsx("div",{"data-controls":o&&Lt?"subtitleMarginTop":void 0,className:o&&Lt?`${u}-control`:void 0,style:{height:Lt?y.scalingValue(I??0,n):0,width:wt}}),Lt&&r.jsx("p",{className:Pe,style:{width:vt,...we,...z},children:Ze.subtitle}),Xe&&Lt&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(I??0,n),width:wt}})]}):null,bt=It?r.jsxs("a",{href:It,target:"_blank",className:`${u}-item-text-link`,children:[Nt,Dt]}):r.jsxs(r.Fragment,{children:[Nt,Dt]}),Vt=jm(Ze.gallery),Kt=Vt.filter(St=>St.lightboxMedia).map(St=>St.lightboxMedia),Ut=r.jsx("div",{className:dt,style:Wt,children:Vt.length===0?null:R==="off"?(()=>{const{displayMedia:St,lightboxMedia:g}=Vt[0],he=g?Kt.findIndex(Ee=>Ee.url===g.url):-1;return r.jsx(Ss,{media:St,className:`${u}-item-${Ii(St)?"video":"image"}`.trim(),style:kt,onMediaClick:pt&&he>=0?()=>nt(Kt,he):void 0})})():r.jsxs(r.Fragment,{children:[tt&&De&&r.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Vt.map(({displayMedia:St})=>Ii(St)?r.jsx("video",{src:St.url,muted:!0,playsInline:!0},`sizer-${St.url}`):r.jsx("img",{src:St.url,alt:""},`sizer-${St.url}`))}),r.jsx(Ha,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:Z*1e3,width:"100%",height:"100%",speed:Fm,type:Q==="fade"?"fade":"loop",rewind:Q==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:Q==="fade"?"ltr":P!=="random"?P==="horizontal"?"ltr":"ttb":jt},onMoved:St=>{if(P!=="random"||Q==="fade")return;const g=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";tn(g),setTimeout(()=>{St.refresh()},0)},children:Vt.map(({displayMedia:St,lightboxMedia:g},he)=>{const Ee=g?Kt.findIndex(ke=>ke.url===g.url):-1;return r.jsx(Na,{children:r.jsx(Ss,{media:St,className:`${u}-item-${Ii(St)?"video":"image"}`.trim(),style:kt,onMediaClick:pt&&Ee>=0?()=>nt(Kt,Ee):void 0})},he)})},`${Q}-${Oe}-${P}-${Z}-${sn}-${d}`)]})}),Zt=Xe?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&at?"titleMarginTop":void 0,className:o&&at?`${u}-control`:void 0,style:{height:at?y.scalingValue(E??0,n):0,width:wt}}),r.jsx("p",{className:le,style:{width:vt,...We,...Le},children:Ze.title}),r.jsx("div",{"data-controls":o&&Lt?"subtitleMarginTop":void 0,className:o&&Lt?`${u}-control`:void 0,style:{height:Lt?y.scalingValue(I??0,n):0,width:wt}}),r.jsx("p",{className:Pe,style:{width:vt,...we,...z},children:Ze.subtitle})]});return r.jsx("div",{className:`${u}-item`.trim(),style:At&&!De?{gridColumn:At}:void 0,children:r.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${De&&ft?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(S??0)>100?`calc(${Me} * (${S} / 100))`:Me,...At&&De?{gridColumn:At}:{}},children:De?r.jsx(r.Fragment,{children:Xe?r.jsxs(r.Fragment,{children:[bt,r.jsx("a",{href:It,target:"_blank",className:`${u}-item-image-link`,children:Ut})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:It,target:"_blank",className:`${u}-item-image-link`,children:Ut}),bt]})}):It?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:It,target:"_blank",className:`${u}-item-image-link`,children:[Ot,Ut]}),!Xe&&r.jsx("a",{href:It,target:"_blank",className:`${u}-item-text-link`,children:Zt})]}):r.jsxs(r.Fragment,{children:[Ot,Ut,Zt]})})},Je)})})}),(!n||i)&&Gt&&typeof document<"u"&&C==="on"&&(()=>{const Ze=(c?document.getElementById(c):null)??document.body;return mi.createPortal(r.jsx("div",{style:Yt,"data-selection":"none",children:r.jsx(Vm,{prefix:u,items:qe,index:lt,imageDisplay:Gm(L),isEditor:n,onClose:()=>xe(!1),onPrev:()=>Rt(Je=>(Je-1+qe.length)%qe.length),onNext:()=>Rt(Je=>(Je+1)%qe.length),counterClassName:de,counterStyle:fe})}),Ze)})()]})}const Km={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Um=["hover","focus","filled","success","error"],Xm=`import { Splide, SplideSlide } from '@splidejs/react-splide';
4159
4159
  import '@splidejs/react-splide/css/core';
4160
4160
  import { CommonComponentProps } from '../props';
4161
4161
  import {
@@ -6047,7 +6047,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
6047
6047
  };
6048
6048
 
6049
6049
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
6050
- `,jr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ym=["titleColor","subtitleColor","lightboxCounterColor"],Zm={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},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:{...jr.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:{...jr.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:{...jr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"b",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,imageCorners:0,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","imageCorners","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay","imageCorners"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...Ym],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Jm={element:qm,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:Zm,sourceCode:Xm},Qm=50,Cs=10,Oa="cntrl-lightbox-journal",Sr=Oa,pa=`${Oa}-`,$r=e=>`${Oa}-${e}`,ja=e=>e===Sr||e.startsWith(pa),Ts=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Ls=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Ts(t.get($r(e)));if(i)return i}const n=Ts(t.get(Sr));if(n)return n;for(const[i]of t){if(!i.startsWith(pa))continue;const o=i.slice(pa.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},Is=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Yl=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{ja(l)&&i.searchParams.delete(l)}),t?i.searchParams.set($r(t),String(e)):i.searchParams.set(Sr,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},eg=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===$r(e)||i===Sr:ja(i));if(n.forEach(i=>t.searchParams.delete(i)),n.length>0){const i=`${t.pathname}${t.search}${t.hash}`;window.history.replaceState(window.history.state,"",i)}},Zl=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has($r(e)):[...t.keys()].some(n=>ja(n))},tg=(e,t)=>{if(Zl(t)){if(e){window.history.back();return}eg(t)}},ng=20,ig=2,zr=e=>`max(${e}, ${ng}px)`,Ai=e=>((e==null?void 0:e.image)??[]).slice(0,ig),Jl=e=>e.reduce((t,n)=>t+Ai(n).length,0),og=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+Ai(s).length,1),i=Ai(e[t]).length;return{start:n,end:n+i-1}},rg=(e,t)=>{const n=Jl(e),{start:i,end:o}=og(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Zo=(e,t)=>t==="B"?e.flatMap((n,i)=>Ai(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Ai(n)})),ag=(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 rg(i,o)},Rs=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",sg=(e,t,n)=>e==="B"?t.length>1:Jl(n)>1,gn=.004,Bn=.004,Ri={title1Width:.13,title2Width:.13,title3Width:.14},Dn=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},Fi=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},go=(e,t)=>Fi(e,t),rn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Vn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Fi(e.length,n),effective:go(e.length,n)}},Ql=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),ec=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Kn=["title1","title2","title3","count"],Ke=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,za={title1:"1",title2:"2",title3:"3",count:"Count"},Ba=e=>[Ke(e,"fontFamily"),Ke(e,"fontSettings"),{type:"row",items:[Ke(e,"fontSize"),Ke(e,"lineHeight"),Ke(e,"letterSpacing"),Ke(e,"wordSpacing")]},Ke(e,"textAlign"),Ke(e,"textAppearance")],lg=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Kn.map(e=>[za[e],Ba(e)]))}),cg={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},dg={title1:.02,title2:.02,title3:.02,count:.017},si=(e,t)=>{const n=i=>{const o=Ke(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[cg[t]]}},li=(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??dg[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)};function tc({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:m=0,title2MarginLeft:w=0,title3MarginLeft:S=0,titleRowMarginBottom:T=0,titleHeaderLayout:v="desktop",contentMarginTop:C=0,iconMarginRight:x=0,closeIcon:M=null,closeIconMaxWidth:L=0,closeIconColor:R="#000000",closeIconHoverColor:J="#cccccc"}=n,A=y.scalingValue(C,i),ee=y.scalingValue(x,i),E=y.scalingValue(T,i),I=v==="mobile",F=li("title1",si(n,"title1"),i),f=li("title2",si(n,"title2"),i),b=li("title3",si(n,"title3"),i),W=a.useMemo(()=>({title1Width:d??Ri.title1Width,title2Width:c??Ri.title2Width,title3Width:u??Ri.title3Width}),[d,c,u]),O=a.useMemo(()=>({title2MarginLeft:w,title3MarginLeft:S}),[w,S]),K=a.useMemo(()=>Dn(e,t,F,f,b),[e,t,F,f,b]),G=a.useMemo(()=>K.map(H=>W[H.widthKey]),[K,W]),Q=a.useMemo(()=>Fi(K.length,G),[K.length,G]),V=a.useMemo(()=>go(K.length,G),[K.length,G]),N=a.useMemo(()=>K.filter(H=>H.prefix==="title1"),[K]),_=a.useMemo(()=>K.filter(H=>H.prefix==="title2"||H.prefix==="title3"),[K]),$=a.useMemo(()=>Vn(N,W),[N,W]),U=a.useMemo(()=>Vn(_,W),[_,W]),X=!!(t.title1||t.title2||t.title3),ce=M!==null;if(!(X||ce))return null;const ge=(m??0)>0||o,h=(H,ie)=>{const Ie=K.findIndex(P=>P.prefix===H.prefix);if(!I||ie==="single-row")return{effectiveWidth:V[Ie]??0,resolvedWidth:Q[Ie]??0,maxWidth:rn(Ie,Q)};if(ie==="two-row-top"){const P=N.findIndex(He=>He.prefix===H.prefix);return{effectiveWidth:$.effective[P]??0,resolvedWidth:$.resolved[P]??0,maxWidth:rn(P,$.resolved)}}const oe=_.findIndex(P=>P.prefix===H.prefix);return{effectiveWidth:U.effective[oe]??0,resolvedWidth:U.resolved[oe]??0,maxWidth:rn(oe,U.resolved)}},he=(H,ie,Ie)=>{if(!I||Ie==="single-row"){const et=H.findIndex(ne=>ne.prefix===ie.prefix),Je=H.map(ne=>W[ne.widthKey]),Le=Fi(H.length,Je);return{effectiveWidth:go(H.length,Je)[et]??0,resolvedWidth:Le[et]??0,maxWidth:rn(et,Le)}}if(Ie==="two-row-top"){const et=H.filter(ne=>ne.prefix==="title1"),Je=et.findIndex(ne=>ne.prefix===ie.prefix),{resolved:Le,effective:Z}=Vn(et,W);return{effectiveWidth:Z[Je]??0,resolvedWidth:Le[Je]??0,maxWidth:rn(Je,Le)}}const oe=H.filter(et=>et.prefix==="title2"||et.prefix==="title3"),P=oe.findIndex(et=>et.prefix===ie.prefix),{resolved:He,effective:We}=Vn(oe,W);return{effectiveWidth:We[P]??0,resolvedWidth:He[P]??0,maxWidth:rn(P,He)}},Y=H=>ec(K,Q,O,H)+(I?0:m??0),be=()=>I?0:m??0,Ce=H=>_.slice(0,H).reduce((ie,Ie,oe)=>ie+(Ie.marginLeftKey?O[Ie.marginLeftKey]??0:0)+(U.resolved[oe]??0),0),le=H=>{const ie=_[H];return Ce(H)+(ie.marginLeftKey?O[ie.marginLeftKey]??0:0)+(U.resolved[H]??0)},re=(H,ie,Ie)=>{const oe=H.marginLeftKey?O[H.marginLeftKey]??0:0,{effectiveWidth:P,resolvedWidth:He,maxWidth:We}=Ie??h(H,ie),et=Math.max(oe,Bn),Je=o&&ie==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":H.prefix,style:{width:y.scalingValue(P,i),...oe>0?{marginLeft:y.scalingValue(oe,i)}:{}},children:[r.jsx("p",{className:H.className,style:H.style,children:H.text}),Je&&H.marginLeftKey?r.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(He),style:{position:"absolute",top:0,left:y.scalingValue(-oe,i),width:y.scalingValue(et,i),height:"100%",pointerEvents:"auto"}}):null,Je?r.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(We),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:y.scalingValue(-gn/2,i),width:y.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}}):null]},H.className)},D=(H="two-row")=>{const ie=K.findIndex(P=>P.prefix==="title1"),Ie=ie>=0?Q[ie]:W.title1Width,oe=H==="two-row"&&o;return r.jsx("div",{...oe?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ie)}:{},style:{width:y.scalingValue(m??0,i),flexShrink:0,alignSelf:"stretch",...oe?{pointerEvents:"auto"}:{}}})},se=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:F,"aria-hidden":"true",children:" "}),ue=H=>{const ie=Dn(e,H,F,f,b);return r.jsx(r.Fragment,{children:ie.map(Ie=>re(Ie,"single-row",he(ie,Ie,"single-row")))})},_e=H=>{const ie=Dn(e,H,F,f,b),Ie=ie.find(oe=>oe.prefix==="title1");return Ie?re(Ie,"two-row-top",he(ie,Ie,"two-row-top")):null},xe=(H,ie=!1)=>{const Ie=Dn(e,H,F,f,b),oe=Ie.filter(We=>We.prefix==="title2"||We.prefix==="title3"),P=o&&ie;return oe.length>0||P||(T??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[oe.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[r.jsx("div",{className:`${e}-titles-stack`,children:oe.map(We=>re(We,"two-row-bottom",he(Ie,We,"two-row-bottom")))}),ie&&o?r.jsxs(r.Fragment,{children:[pe(),Ae()]}):null]}):null,(T??0)>0||P?r.jsx("div",{"data-controls":P?"titleRowMarginBottom":void 0,"data-controls-axis":P?"y":void 0,"data-controls-reverse":P?"":void 0,className:P?`${e}-control`:void 0,style:{height:E,width:"100%",flexShrink:0,pointerEvents:P?"auto":"none"}}):null]}):null},Pe=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:y.scalingValue(L??0,i),height:y.scalingValue(L??0,i),marginRight:ee,"--close-icon-hover-color":J},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:H=>{H.stopPropagation(),l==null||l()},"aria-label":"Close",children:r.jsx(nn,{url:M??"",fill:R,hoverFill:i&&!s?R:J,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:ee,height:"100%",pointerEvents:"auto"}})]}),Fe=()=>ce?r.jsx("div",{className:`${e}-titles-row-header-controls`,children:Pe()}):null,Te=H=>r.jsx("div",{className:`${e}-titles-row-titles`,children:r.jsx("div",{className:`${e}-titles-stack`,children:H})}),Se=H=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[ce||X?se():null,ge?D("two-row"):null,Te(H),Fe()]}),q=(H,ie=!1)=>r.jsxs(r.Fragment,{children:[Se(_e(H)),xe(H,ie)]}),me=()=>{const H=I?-1:K.findIndex(oe=>oe.prefix==="title1"),ie=!I&&(o||(m??0)>0)?(()=>{const oe=m??0,P=H>=0?Q[H]:W.title1Width,He=Math.max(oe,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(P),style:{position:"absolute",top:0,left:0,width:y.scalingValue(He,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Ie=K.flatMap((oe,P)=>{if(!oe.marginLeftKey)return[];const He=O[oe.marginLeftKey]??0,We=Ql(K,Q,O,P)+be(),et=Math.max(He,Bn);return r.jsx("div",{"data-controls":oe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Q[P]),style:{position:"absolute",top:0,left:y.scalingValue(We,i),width:y.scalingValue(et,i),height:"100%",pointerEvents:"auto"}},oe.marginLeftKey)});return ie?[ie,...Ie]:Ie},ve=()=>K.map((H,ie)=>{const Ie=rn(ie,Q),P=Y(ie)-gn/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(Ie),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:y.scalingValue(P,i),width:y.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),pe=()=>_.flatMap((H,ie)=>{if(!H.marginLeftKey)return[];const Ie=O[H.marginLeftKey]??0,oe=Ce(ie),P=Math.max(Ie,Bn),{resolvedWidth:He}=h(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(He),style:{position:"absolute",top:0,left:y.scalingValue(oe,i),width:y.scalingValue(P,i),height:"100%",pointerEvents:"auto"}},H.marginLeftKey)}),Ae=()=>_.map((H,ie)=>{const{maxWidth:Ie}=h(H,"two-row-bottom"),P=le(ie)-gn/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(Ie),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:y.scalingValue(P,i),width:y.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),$e=()=>!o||I?null:r.jsxs(r.Fragment,{children:[me(),ve()]}),z=!!(t.title2||t.title3||(T??0)>0||o),de=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[ce||X?se():null,ge?D("single-row"):null,X?Te(ue(t)):r.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),Fe(),$e()]}),ae=()=>r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...z?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:z?void 0:{flex:"0 0 auto",height:"auto"},children:q(t,!0)}),$e()]});return r.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:A,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...I?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${I?` ${e}-lightbox-content-area-stacked`:""}`,children:r.jsx("div",{className:`${e}-text-bar-cell${I?` ${e}-text-bar-cell-stacked`:""}`,style:I?void 0:{flex:1,minWidth:0,width:"100%"},children:I?ae():de()})})})]})}function ug(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function pg(e){return`
6050
+ `,jr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ym=["titleColor","subtitleColor","lightboxCounterColor"],Zm={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},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:{...jr.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:{...jr.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:{...jr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"b",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,imageCorners:0,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","imageCorners","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay","imageCorners"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...Ym],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Jm={element:qm,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:Zm,sourceCode:Xm},Qm=50,Cs=10,Oa="cntrl-lightbox-journal",Sr=Oa,pa=`${Oa}-`,$r=e=>`${Oa}-${e}`,ja=e=>e===Sr||e.startsWith(pa),Ts=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Ls=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Ts(t.get($r(e)));if(i)return i}const n=Ts(t.get(Sr));if(n)return n;for(const[i]of t){if(!i.startsWith(pa))continue;const o=i.slice(pa.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},Is=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Yl=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{ja(l)&&i.searchParams.delete(l)}),t?i.searchParams.set($r(t),String(e)):i.searchParams.set(Sr,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},eg=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===$r(e)||i===Sr:ja(i));if(n.forEach(i=>t.searchParams.delete(i)),n.length>0){const i=`${t.pathname}${t.search}${t.hash}`;window.history.replaceState(window.history.state,"",i)}},Zl=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has($r(e)):[...t.keys()].some(n=>ja(n))},tg=(e,t)=>{if(Zl(t)){if(e){window.history.back();return}eg(t)}},ng=20,ig=2,zr=e=>`max(${e}, ${ng}px)`,Ai=e=>((e==null?void 0:e.image)??[]).slice(0,ig),Jl=e=>e.reduce((t,n)=>t+Ai(n).length,0),og=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+Ai(s).length,1),i=Ai(e[t]).length;return{start:n,end:n+i-1}},rg=(e,t)=>{const n=Jl(e),{start:i,end:o}=og(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Zo=(e,t)=>t==="B"?e.flatMap((n,i)=>Ai(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Ai(n)})),ag=(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 rg(i,o)},Rs=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",sg=(e,t,n)=>e==="B"?t.length>1:Jl(n)>1,gn=.004,Bn=.004,Ri={title1Width:.13,title2Width:.13,title3Width:.14},Dn=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},Fi=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},go=(e,t)=>Fi(e,t),rn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Vn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Fi(e.length,n),effective:go(e.length,n)}},Ql=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),ec=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Kn=["title1","title2","title3","count"],Ye=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,za={title1:"1",title2:"2",title3:"3",count:"Count"},Ba=e=>[Ye(e,"fontFamily"),Ye(e,"fontSettings"),{type:"row",items:[Ye(e,"fontSize"),Ye(e,"lineHeight"),Ye(e,"letterSpacing"),Ye(e,"wordSpacing")]},Ye(e,"textAlign"),Ye(e,"textAppearance")],lg=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Kn.map(e=>[za[e],Ba(e)]))}),cg={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},dg={title1:.02,title2:.02,title3:.02,count:.017},si=(e,t)=>{const n=i=>{const o=Ye(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[cg[t]]}},li=(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??dg[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)};function tc({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:m=0,title2MarginLeft:w=0,title3MarginLeft:S=0,titleRowMarginBottom:T=0,titleHeaderLayout:v="desktop",contentMarginTop:C=0,iconMarginRight:x=0,closeIcon:M=null,closeIconMaxWidth:L=0,closeIconColor:R="#000000",closeIconHoverColor:Z="#cccccc"}=n,P=y.scalingValue(C,i),Q=y.scalingValue(x,i),E=y.scalingValue(T,i),I=v==="mobile",W=li("title1",si(n,"title1"),i),f=li("title2",si(n,"title2"),i),b=li("title3",si(n,"title3"),i),_=a.useMemo(()=>({title1Width:d??Ri.title1Width,title2Width:c??Ri.title2Width,title3Width:u??Ri.title3Width}),[d,c,u]),O=a.useMemo(()=>({title2MarginLeft:w,title3MarginLeft:S}),[w,S]),K=a.useMemo(()=>Dn(e,t,W,f,b),[e,t,W,f,b]),G=a.useMemo(()=>K.map(F=>_[F.widthKey]),[K,_]),J=a.useMemo(()=>Fi(K.length,G),[K.length,G]),V=a.useMemo(()=>go(K.length,G),[K.length,G]),N=a.useMemo(()=>K.filter(F=>F.prefix==="title1"),[K]),H=a.useMemo(()=>K.filter(F=>F.prefix==="title2"||F.prefix==="title3"),[K]),$=a.useMemo(()=>Vn(N,_),[N,_]),U=a.useMemo(()=>Vn(H,_),[H,_]),Y=!!(t.title1||t.title2||t.title3),se=M!==null;if(!(Y||se))return null;const ge=(m??0)>0||o,h=(F,ee)=>{const Ie=K.findIndex(A=>A.prefix===F.prefix);if(!I||ee==="single-row")return{effectiveWidth:V[Ie]??0,resolvedWidth:J[Ie]??0,maxWidth:rn(Ie,J)};if(ee==="two-row-top"){const A=N.findIndex(Oe=>Oe.prefix===F.prefix);return{effectiveWidth:$.effective[A]??0,resolvedWidth:$.resolved[A]??0,maxWidth:rn(A,$.resolved)}}const oe=H.findIndex(A=>A.prefix===F.prefix);return{effectiveWidth:U.effective[oe]??0,resolvedWidth:U.resolved[oe]??0,maxWidth:rn(oe,U.resolved)}},ue=(F,ee,Ie)=>{if(!I||Ie==="single-row"){const rt=F.findIndex(ze=>ze.prefix===ee.prefix),et=F.map(ze=>_[ze.widthKey]),Ce=Fi(F.length,et);return{effectiveWidth:go(F.length,et)[rt]??0,resolvedWidth:Ce[rt]??0,maxWidth:rn(rt,Ce)}}if(Ie==="two-row-top"){const rt=F.filter(ze=>ze.prefix==="title1"),et=rt.findIndex(ze=>ze.prefix===ee.prefix),{resolved:Ce,effective:He}=Vn(rt,_);return{effectiveWidth:He[et]??0,resolvedWidth:Ce[et]??0,maxWidth:rn(et,Ce)}}const oe=F.filter(rt=>rt.prefix==="title2"||rt.prefix==="title3"),A=oe.findIndex(rt=>rt.prefix===ee.prefix),{resolved:Oe,effective:Ae}=Vn(oe,_);return{effectiveWidth:Ae[A]??0,resolvedWidth:Oe[A]??0,maxWidth:rn(A,Oe)}},X=F=>ec(K,J,O,F)+(I?0:m??0),ve=()=>I?0:m??0,$e=F=>H.slice(0,F).reduce((ee,Ie,oe)=>ee+(Ie.marginLeftKey?O[Ie.marginLeftKey]??0:0)+(U.resolved[oe]??0),0),ae=F=>{const ee=H[F];return $e(F)+(ee.marginLeftKey?O[ee.marginLeftKey]??0:0)+(U.resolved[F]??0)},re=(F,ee,Ie)=>{const oe=F.marginLeftKey?O[F.marginLeftKey]??0:0,{effectiveWidth:A,resolvedWidth:Oe,maxWidth:Ae}=Ie??h(F,ee),rt=Math.max(oe,Bn),et=o&&ee==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":F.prefix,style:{width:y.scalingValue(A,i),...oe>0?{marginLeft:y.scalingValue(oe,i)}:{}},children:[r.jsx("p",{className:F.className,style:F.style,children:F.text}),et&&F.marginLeftKey?r.jsx("div",{"data-controls":F.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Oe),style:{position:"absolute",top:0,left:y.scalingValue(-oe,i),width:y.scalingValue(rt,i),height:"100%",pointerEvents:"auto"}}):null,et?r.jsx("div",{"data-controls":F.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:y.scalingValue(-gn/2,i),width:y.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}}):null]},F.className)},D=(F="two-row")=>{const ee=K.findIndex(A=>A.prefix==="title1"),Ie=ee>=0?J[ee]:_.title1Width,oe=F==="two-row"&&o;return r.jsx("div",{...oe?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ie)}:{},style:{width:y.scalingValue(m??0,i),flexShrink:0,alignSelf:"stretch",...oe?{pointerEvents:"auto"}:{}}})},ne=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:W,"aria-hidden":"true",children:" "}),ce=F=>{const ee=Dn(e,F,W,f,b);return r.jsx(r.Fragment,{children:ee.map(Ie=>re(Ie,"single-row",ue(ee,Ie,"single-row")))})},Ne=F=>{const ee=Dn(e,F,W,f,b),Ie=ee.find(oe=>oe.prefix==="title1");return Ie?re(Ie,"two-row-top",ue(ee,Ie,"two-row-top")):null},be=(F,ee=!1)=>{const Ie=Dn(e,F,W,f,b),oe=Ie.filter(Ae=>Ae.prefix==="title2"||Ae.prefix==="title3"),A=o&&ee;return oe.length>0||A||(T??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[oe.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[r.jsx("div",{className:`${e}-titles-stack`,children:oe.map(Ae=>re(Ae,"two-row-bottom",ue(Ie,Ae,"two-row-bottom")))}),ee&&o?r.jsxs(r.Fragment,{children:[le(),Pe()]}):null]}):null,(T??0)>0||A?r.jsx("div",{"data-controls":A?"titleRowMarginBottom":void 0,"data-controls-axis":A?"y":void 0,"data-controls-reverse":A?"":void 0,className:A?`${e}-control`:void 0,style:{height:E,width:"100%",flexShrink:0,pointerEvents:A?"auto":"none"}}):null]}):null},We=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:y.scalingValue(L??0,i),height:y.scalingValue(L??0,i),marginRight:Q,"--close-icon-hover-color":Z},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:F=>{F.stopPropagation(),l==null||l()},"aria-label":"Close",children:r.jsx(nn,{url:M??"",fill:R,hoverFill:i&&!s?R: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:Q,height:"100%",pointerEvents:"auto"}})]}),_e=()=>se?r.jsx("div",{className:`${e}-titles-row-header-controls`,children:We()}):null,Te=F=>r.jsx("div",{className:`${e}-titles-row-titles`,children:r.jsx("div",{className:`${e}-titles-stack`,children:F})}),we=F=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[se||Y?ne():null,ge?D("two-row"):null,Te(F),_e()]}),q=(F,ee=!1)=>r.jsxs(r.Fragment,{children:[we(Ne(F)),be(F,ee)]}),pe=()=>{const F=I?-1:K.findIndex(oe=>oe.prefix==="title1"),ee=!I&&(o||(m??0)>0)?(()=>{const oe=m??0,A=F>=0?J[F]:_.title1Width,Oe=Math.max(oe,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(A),style:{position:"absolute",top:0,left:0,width:y.scalingValue(Oe,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Ie=K.flatMap((oe,A)=>{if(!oe.marginLeftKey)return[];const Oe=O[oe.marginLeftKey]??0,Ae=Ql(K,J,O,A)+ve(),rt=Math.max(Oe,Bn);return r.jsx("div",{"data-controls":oe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(J[A]),style:{position:"absolute",top:0,left:y.scalingValue(Ae,i),width:y.scalingValue(rt,i),height:"100%",pointerEvents:"auto"}},oe.marginLeftKey)});return ee?[ee,...Ie]:Ie},fe=()=>K.map((F,ee)=>{const Ie=rn(ee,J),A=X(ee)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":F.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ie),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:y.scalingValue(A,i),width:y.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}})},`${F.widthKey}-junction`)}),le=()=>H.flatMap((F,ee)=>{if(!F.marginLeftKey)return[];const Ie=O[F.marginLeftKey]??0,oe=$e(ee),A=Math.max(Ie,Bn),{resolvedWidth:Oe}=h(F,"two-row-bottom");return r.jsx("div",{"data-controls":F.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Oe),style:{position:"absolute",top:0,left:y.scalingValue(oe,i),width:y.scalingValue(A,i),height:"100%",pointerEvents:"auto"}},F.marginLeftKey)}),Pe=()=>H.map((F,ee)=>{const{maxWidth:Ie}=h(F,"two-row-bottom"),A=ae(ee)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":F.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ie),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:y.scalingValue(A,i),width:y.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}})},`${F.widthKey}-junction`)}),Le=()=>!o||I?null:r.jsxs(r.Fragment,{children:[pe(),fe()]}),z=!!(t.title2||t.title3||(T??0)>0||o),de=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[se||Y?ne():null,ge?D("single-row"):null,Y?Te(ce(t)):r.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),_e(),Le()]}),ie=()=>r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...z?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:z?void 0:{flex:"0 0 auto",height:"auto"},children:q(t,!0)}),Le()]});return r.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:P,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...I?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${I?` ${e}-lightbox-content-area-stacked`:""}`,children:r.jsx("div",{className:`${e}-text-bar-cell${I?` ${e}-text-bar-cell-stacked`:""}`,style:I?void 0:{flex:1,minWidth:0,width:"100%"},children:I?ie():de()})})})]})}function ug(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function pg(e){return`
6051
6051
  .${e}-wrapper {
6052
6052
  display: grid;
6053
6053
  align-items: start;
@@ -6367,7 +6367,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
6367
6367
  pointer-events: auto;
6368
6368
  flex-shrink: 0;
6369
6369
  }
6370
- `}const Es={url:"",name:"",objectFit:"cover"},$n=500,Xi=650,un="cubic-bezier(0.22, 1, 0.36, 1)",mg=72,gg=50,hg=1e4,fg=650,yg=500;function vg(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function nc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=rr(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function bg(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?nc(i,n):null}function xg(e){return e.reduce((t,n,i)=>{const o=Da(n.gallery),l=Va(o).filter(d=>d.lightboxMedia).map(d=>d.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function Qi(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function Ms(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Qi(e,i,n)}const wg=.03;function ic(e){return e.width*wg}const Br={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Ho(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function ks(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Sg(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function ma(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function $g(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:ma(e,t.width,t.height)}function Cg(e,t){if(qi(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function Tg(e){const t=new Set,n=[];for(const i of e){const o=Da(i.gallery),s=Va(o);for(const l of s)for(const d of[l.displayMedia,l.lightboxMedia])d!=null&&d.url&&!t.has(d.url)&&(t.add(d.url),n.push(d))}return n}function Lg({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>qi(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function Wi(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=ic(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function ar(e,t,n){const i=Wi(e,t,n);return{...i,left:2*i.left-e.left}}function Ig(e,t,n){const{left:i,width:o}=n,s=ic(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function oc(e,t,n,i){const o=Wi(e,"left",i),s=Wi(e,"right",i),l=ar(e,"left",i),d=ar(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Rg(e,t,n,i){const{start:o,end:s}=oc(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function Eg(e,t,n){const i=Wi(e,t,n),o=ar(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function rc(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 Da(e){if(!e)return;if(rc(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.url?t:void 0,o=n!=null&&n.url?n:void 0;if(!(!i&&!o))return[{media:[o??i??Es,i??o??Es]}]}function Mg(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function kg(e){const[t]=e.media;return t!=null&&t.url?t:null}function Va(e){if(!Array.isArray(e)||e.length===0)return[];if(rc(e)){const t=[];for(const n of e){const i=Mg(n);if(!i)continue;const o=kg(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function qi(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Pg({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return qi(e)?r.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):r.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Ag({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function No({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return qi(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function Fg({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:m,layoutId:w,sourceRect:S,resolveCloseSourceRect:T,onClose:v,onPrev:C,onNext:x}){const M=a.useRef(null),L=a.useRef(null),R=a.useRef(null),J=a.useRef(new Map),[A,ee]=a.useState(0),E=a.useRef(null),I=a.useRef(0),F=a.useRef(0),f=a.useRef("none"),b=a.useRef(!1),W=a.useRef(!1),O=a.useRef(!1),K=a.useRef(null),G=a.useRef(null),Q=a.useRef(null),V=a.useRef(()=>{}),N=a.useRef(null),_=a.useRef(null),$=a.useRef(null),U=a.useRef(!1),[X,ce]=a.useState(null),[j,ge]=a.useState(Br),[h,he]=a.useState(0),[Y,be]=a.useState("opening"),[Ce,le]=a.useState(0),[re,D]=a.useState(0),[se,ue]=a.useState(!1),[_e,xe]=a.useState(null),[Pe,Fe]=a.useState(null),[Te,Se]=a.useState(null),[q,me]=a.useState(!1),[ve,pe]=a.useState(null),[Ae,$e]=a.useState(!1),z=a.useRef(!1),[de,ae]=a.useState(!1),[H,ie]=a.useState(!1),Ie=a.useRef(n),oe=a.useRef(void 0),P=t[n],He=P?qi(P):!1,We=re!==0||se,et=!l&&(!s||!!d),Je=c&&!l,Le=u.length>1,Z=a.useCallback((g,fe)=>t.length<=1?null:t[(g+fe+t.length)%t.length]??null,[t]),ne=Le?Qi(u,m,-1):Z(n,-1),Ne=Le?Qi(u,m,1):Z(n,1),lt=_e===-1&&We?Le&&Pe!==null?Qi(u,Pe,-1):Te!==null?Z(Te,-1):null:null,De=_e===1&&We?Le&&Pe!==null?Qi(u,Pe,1):Te!==null?Z(Te,1):null:null,Oe=lt&&lt.url!==(ne==null?void 0:ne.url)?lt:null,Ue=De&&De.url!==(Ne==null?void 0:Ne.url)?De:null,ot=ne&&Je?(()=>{const g=Le?Ms(u,m,-1):t.length>2?Z((n-1+t.length)%t.length,-1):null;return g&&g.url!==ne.url?g:null})():null,ct=Ne&&Je?(()=>{const g=Le?Ms(u,m,1):t.length>2?Z((n+1)%t.length,1):null;return g&&g.url!==Ne.url?g:null})():null,gt=Oe??ot,Et=Ue??ct,ut=a.useCallback((g,fe,Ee)=>{if(!g||!fe||!Ee)return;const Me=J.current,it=Me.get(g);(it==null?void 0:it.width)===fe&&(it==null?void 0:it.height)===Ee||(Me.set(g,{width:fe,height:Ee}),ee(Pt=>Pt+1))},[]),bt=a.useCallback(g=>{if(!(g!=null&&g.url))return null;const fe=J.current.get(g.url);return $g(L.current,fe)},[A,h]),Wt=a.useCallback(()=>{if(!P)return;const g=bt(P);if(g){ce(g);return}const fe=L.current;fe&&ce(ks(fe))},[P,bt]),st=a.useCallback(g=>{if(Le){const fe=u.length;Fe((m+g+fe)%fe),Se(null);return}t.length>1&&(Se((n+g+t.length)%t.length),Fe(null))},[Le,u.length,m,t.length,n]),qe=a.useCallback(g=>{O.current=g,ue(g)},[]),ze=a.useCallback(()=>{K.current!==null&&(window.clearTimeout(K.current),K.current=null)},[]),yt=a.useCallback(()=>{ze(),K.current=window.setTimeout(()=>{ze(),qe(!1)},Xi+32)},[ze,qe]),xt=a.useCallback(()=>{const g=M.current;if(!g){ge({left:0,top:0,width:typeof window<"u"?window.innerWidth:Br.width,height:typeof window<"u"?window.innerHeight:Br.height});return}const fe=g.getBoundingClientRect();ge({left:fe.left,top:fe.top,width:fe.width,height:fe.height})},[]),kt=a.useCallback((g,fe)=>{if(We){if(de&&!se)return`translate(${re}px, 0px)`;if(se&&_e!==null){const Ee=bt(g);if(!Ee)return;const{x:Me,y:it}=Rg(Ee,fe,_e,j);return`translate(${Me}px, ${it}px)`}if(se)return"translate(0px, 0px)"}},[We,de,se,re,_e,j,bt]),jt=a.useCallback(()=>{const g=G.current;G.current=null,ze(),qe(!1),xe(null),Fe(null),Se(null),D(0),ae(!1),b.current=!1,F.current=0,f.current="none",g===-1?C():g===1&&x()},[ze,qe,C,x]),tn=a.useCallback(()=>{ze(),K.current=window.setTimeout(()=>{G.current!==null&&jt()},Xi+32)},[ze,jt]),sn=a.useCallback(()=>{ze(),G.current=null,qe(!1),xe(null),Fe(null),Se(null),D(0),ae(!1),b.current=!1,F.current=0,f.current="none"},[ze,qe]),Ct=a.useCallback(g=>{if(!(!Je||!X)){if(O.current){if(G.current===g){Q.current=g,jt();return}sn()}ze(),st(g),G.current=g,xe(g),qe(!0),tn()}},[Je,X,jt,sn,ze,st,qe,tn]);V.current=Ct;const Mt=a.useCallback(()=>{N.current=null,U.current=!1,_.current!==null&&(window.clearInterval(_.current),_.current=null),$.current!==null&&(window.clearTimeout($.current),$.current=null)},[]),Yt=a.useCallback(g=>{_.current!==null&&window.clearInterval(_.current);const fe=U.current?yg:fg;_.current=window.setInterval(()=>{V.current(g)},fe)},[]),Gt=a.useCallback(g=>{N.current!==g&&(Mt(),N.current=g,U.current=!1,V.current(g),Yt(g),$.current=window.setTimeout(()=>{$.current=null,N.current===g&&(U.current=!0,Yt(g))},hg))},[Mt,Yt]),we=a.useCallback(()=>{const g=L.current;if(!g)return;const fe=P==null?void 0:P.url,Ee=fe?J.current.get(fe):void 0;if(Ee!=null&&Ee.width&&(Ee!=null&&Ee.height)){ce(ma(g,Ee.width,Ee.height));return}const Me=R.current;if(Me&&fe&&(Me.src===fe||Me.currentSrc===fe)){const{width:Pt,height:Ze}=Sg(Me);if(Pt&&Ze){ut(fe,Pt,Ze),ce(ma(g,Pt,Ze));return}}const it=ks(g);!it.width||!it.height||ce(it)},[P==null?void 0:P.url,ut]),Ve=a.useCallback(g=>{if(R.current=g,!!g){if(g instanceof HTMLVideoElement){g.readyState>=1&&g.videoWidth>0&&we();return}g.complete&&g.naturalWidth>0&&we()}},[we]),Ge=a.useCallback(()=>{xt(),we(),he(g=>g+1)},[xt,we]);a.useEffect(()=>{Ge();const g=L.current,fe=M.current,Ee=new ResizeObserver(()=>Ge());return g&&Ee.observe(g),fe&&Ee.observe(fe),window.addEventListener("resize",Ge),()=>{Ee.disconnect(),window.removeEventListener("resize",Ge)}},[Ge,n,w]),a.useLayoutEffect(()=>{if(!P)return;const g=R.current;if(g){if(g instanceof HTMLImageElement&&g.complete&&g.naturalWidth>0){we();return}g instanceof HTMLVideoElement&&g.readyState>=1&&g.videoWidth>0&&we()}},[P==null?void 0:P.url,n,we]),a.useEffect(()=>{Wt()},[Wt,A]),a.useEffect(()=>{const g=new Set,fe=[],Ee=Me=>{!(Me!=null&&Me.url)||g.has(Me.url)||(g.add(Me.url),fe.push(Me))};t.forEach(Ee),u.forEach(Me=>Me.items.forEach(Ee)),fe.forEach(Me=>{J.current.has(Me.url)||Cg(Me,ut)})},[t,u,ut]),a.useEffect(()=>{if(Y!=="opening"||!X)return;if(!S){be("open");return}me(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{me(!0),be("open")})});return()=>cancelAnimationFrame(g)},[Y,X,S]),a.useEffect(()=>{if(Y!=="closing")return;const g=setTimeout(()=>v(),$n);return()=>clearTimeout(g)},[Y,v]),a.useEffect(()=>()=>{ze()},[ze]),a.useLayoutEffect(()=>{Ie.current===n&&oe.current===(P==null?void 0:P.url)||(ze(),G.current=null,xe(null),Fe(null),Se(null),le(0),D(0),qe(!1),ie(!1),ae(!1),I.current=0,F.current=0,f.current="none",b.current=!1,E.current=null,W.current=!1,R.current=null,Wt(),Ie.current=n,oe.current=P==null?void 0:P.url)},[n,P==null?void 0:P.url,qe,ze,Wt]),a.useLayoutEffect(()=>{const g=Q.current;g!==null&&(Q.current=null,requestAnimationFrame(()=>{V.current(g)}))},[n,m,P==null?void 0:P.url]),a.useLayoutEffect(()=>{if(Y==="opening"){z.current=!1,$e(!1);return}if(Y!=="open"||z.current)return;if(!ne&&!Ne){z.current=!0;return}$e(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{$e(!0),z.current=!0})});return()=>cancelAnimationFrame(g)},[Y,ne==null?void 0:ne.url,Ne==null?void 0:Ne.url]),a.useEffect(()=>{if(Y!=="open")return;const g=()=>{const Ze=pt=>{pt.stopPropagation(),pt.preventDefault(),document.removeEventListener("click",Ze,!0)};document.addEventListener("click",Ze,!0)},fe=Ze=>{const pt=Ze<0?1:-1;ze(),st(pt),G.current=pt,xe(pt),qe(!0),tn()},Ee=Ze=>{if(Math.abs(Ze)>gg&&Je){fe(Ze);return}G.current=null,xe(null),Fe(null),Se(null),qe(!0),D(0),yt()},Me=Ze=>{if(Ze.touches.length!==1||O.current)return;const pt=Ze.touches[0];W.current=!0,E.current={x:pt.clientX,y:pt.clientY},f.current="none",F.current=0,b.current=!1},it=Ze=>{if(!E.current||Ze.touches.length!==1||O.current)return;const pt=Ze.touches[0],_t=pt.clientX-E.current.x,Rt=pt.clientY-E.current.y;if(f.current==="none"){if(Math.abs(_t)<10&&Math.abs(Rt)<10)return;if(Math.abs(_t)>Math.abs(Rt)){if(!Je)return;f.current="horizontal"}else if(Rt>0){if(!et)return;f.current="vertical"}else return}if(f.current==="horizontal"){b.current=!0,ae(!0),F.current=_t,D(_t),Ze.preventDefault();return}f.current==="vertical"&&(b.current=!0,ae(!0),I.current=Rt,le(Rt),Ze.preventDefault())},Pt=()=>{if(!E.current)return;const Ze=f.current,pt=b.current;if(pt&&Ze==="horizontal")Ee(F.current),g();else if(pt&&Ze==="vertical"){const _t=I.current;if(et&&_t>mg){const Rt=window.innerHeight;I.current=Rt,ie(!0),le(Rt),be("closing")}else I.current=0,le(0);g()}else Ze==="horizontal"&&Math.abs(F.current)>0&&(Ee(F.current),g());E.current=null,f.current="none",F.current=0,b.current=!1,ae(!1)};return document.addEventListener("touchstart",Me,{passive:!0}),document.addEventListener("touchmove",it,{passive:!1}),document.addEventListener("touchend",Pt),document.addEventListener("touchcancel",Pt),()=>{document.removeEventListener("touchstart",Me),document.removeEventListener("touchmove",it),document.removeEventListener("touchend",Pt),document.removeEventListener("touchcancel",Pt)}},[Y,Je,qe,yt,ze,et,tn,st]);const rt=a.useCallback(()=>{const g=(T==null?void 0:T())??S??null;g&&X&&(pe(g),me(!0)),be("closing")},[T,S,X]);a.useEffect(()=>{const g=Me=>{if(Me.key==="Escape"){if(s&&d||Y==="closing")return;Mt(),rt();return}if(Me.key!=="ArrowLeft"&&Me.key!=="ArrowRight"||Y!=="open"||!Je)return;Me.preventDefault();const it=Me.key==="ArrowLeft"?-1:1;Me.repeat&&N.current===it||Gt(it)},fe=Me=>{if(Me.key!=="ArrowLeft"&&Me.key!=="ArrowRight")return;const it=Me.key==="ArrowLeft"?-1:1;N.current===it&&Mt()},Ee=()=>{Mt()};return window.addEventListener("keydown",g),window.addEventListener("keyup",fe),window.addEventListener("blur",Ee),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",fe),window.removeEventListener("blur",Ee),Mt()}},[Y,s,d,rt,Je,Gt,Mt]),a.useEffect(()=>{Y!=="open"&&Mt()},[Y,Mt]);const It=()=>{Y==="closing"||l||rt()},dt=Y==="open",Qe=Y==="closing",qt=Ce>0?Math.max(0,1-Ce/500):1,Xe=Ce>0?Math.max(.35,1-Ce/500):1,Ye=a.useCallback(g=>{if(!(g.propertyName!=="transform"||!O.current)){if(G.current!==null){jt();return}ze(),qe(!1)}},[ze,qe,jt]),nt=Y==="closing"?ve??S:S,Tt=nt&&X&&(Y==="opening"||Qe)?vg(nt,X):void 0,Lt=We&&P?kt(P,"center"):Ce>0?`translateY(${Ce}px)`:Tt,ht=X?Ho(X,j):null,At=!!(nt&&X),Ot=At&&(Y==="closing"||Y==="open"&&q),Nt={position:"absolute",top:ht==null?void 0:ht.top,left:ht==null?void 0:ht.left,width:ht==null?void 0:ht.width,height:ht==null?void 0:ht.height,objectFit:"contain",transformOrigin:"top left",transform:Lt,opacity:Ce>0?Xe:At?1:Y==="opening"||Qe?0:1,transition:de&&!se?"none":se?`transform ${Xi}ms ${un}`:H?`transform ${$n}ms ${un}, opacity ${$n}ms ${un}`:Ot?`transform ${$n}ms ${un}`:Y==="opening"||Qe?`opacity ${$n}ms ${un}`:"none",pointerEvents:He&&dt&&!We?"auto":"none",touchAction:He&&dt?"none":void 0,zIndex:1,overflow:He?"hidden":void 0},Dt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:dt&&!We?"auto":"none"},vt=(g,fe,Ee="adjacent")=>{const Me=bt(g);if(!Me)return{display:"none"};const it=Ee==="far"?fe==="left"?"far-left":"far-right":fe==="left"?"left-adjacent":"right-adjacent",{start:Pt}=_e!==null?oc(Me,it,_e,j):{start:Ee==="far"?ar(Me,fe,j):Wi(Me,fe,j)},Ze=Ho(Pt,j),pt=kt(g,it),_t=!We&&Ee==="adjacent"&&dt&&!Ae?Eg(Me,fe,j):null,Rt=Ee==="far"&&We&&_e===(fe==="left"?-1:1),ln=de&&!se?!1:se,dn=Ee==="adjacent"&&dt&&Ae&&!We;return{position:"absolute",top:Ze.top,left:Ze.left,width:Ze.width,height:Ze.height,objectFit:"contain",transform:pt??(_t?`translate(${_t.x}px, ${_t.y}px)`:void 0),opacity:Ee==="far"?dt&&Rt?1:0:dt?1:0,transition:ln?Ee==="far"?`transform ${Xi}ms ${un}`:`transform ${Xi}ms ${un}, opacity ${$n}ms ${un}`:dn?`transform ${$n}ms ${un}`:Y==="opening"||Qe?`opacity ${$n}ms ${un}`:"none",pointerEvents:"none",zIndex:1}},Vt=(g,fe)=>{const Ee=bt(g);return Ee?Ig(Wi(Ee,fe,j),fe,j):null},Kt=g=>fe=>{if(!l){if(W.current){W.current=!1;return}fe.stopPropagation(),Ct(g)}},Ut=ne?Vt(ne,"left"):null,Zt=Ne?Vt(Ne,"right"):null,zt=Ut?Ho(Ut,j):null,wt=Zt?Ho(Zt,j):null;return r.jsxs("div",{ref:M,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:Y==="open"?"none":void 0},onClick:It,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:dt?qt:0,transition:de?"none":`opacity ${$n}ms ${un}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:L,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:dt?1:0,transition:de?"none":`opacity ${$n}ms ${un}`,pointerEvents:"none"},children:r.jsx(tc,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:It})})]}),dt&&gt&&r.jsx(No,{media:gt,style:vt(gt,"left","far"),onMeasure:ut,onTransitionEnd:Ye},`far-prev-${gt.url}`),dt&&ne&&r.jsxs(r.Fragment,{children:[r.jsx(No,{media:ne,style:vt(ne,"left"),onMeasure:ut,onTransitionEnd:Ye},`prev-${ne.url}`),zt&&r.jsx("div",{style:{position:"absolute",top:zt.top,left:zt.left,width:zt.width,height:zt.height,cursor:l||de?"default":"pointer",pointerEvents:l||de?"none":"auto",zIndex:3},onClick:Kt(-1)})]}),dt&&Ne&&r.jsxs(r.Fragment,{children:[r.jsx(No,{media:Ne,style:vt(Ne,"right"),onMeasure:ut,onTransitionEnd:Ye},`next-${Ne.url}`),wt&&r.jsx("div",{style:{position:"absolute",top:wt.top,left:wt.left,width:wt.width,height:wt.height,cursor:l||de?"default":"pointer",pointerEvents:l||de?"none":"auto",zIndex:3},onClick:Kt(1)})]}),dt&&Et&&r.jsx(No,{media:Et,style:vt(Et,"right","far"),onMeasure:ut,onTransitionEnd:Ye},`far-next-${Et.url}`),X&&P&&(He?r.jsx(Ag,{src:P.url,phase:Y,onMediaElement:Ve,wrapperStyle:Nt,videoStyle:Dt,onLoadedMetadata:we,onTransitionEnd:Ye},`${n}-${P.url}`):r.jsx("img",{ref:Ve,src:P.url,alt:P.name,onLoad:we,onTransitionEnd:Ye,style:Nt},`${n}-${P.url}`))]})}function Wg({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=y.useScopedStyles(),{gridLayout:c,verticalGap:u,align:m="top",imageDisplay:w}=e,S=(w==null?void 0:w.display)==="cover",T=(w==null?void 0:w.ratioValue)??"1:1",v=(w==null?void 0:w.reversed)??!1,[C,x]=T.split(":").map(Number),R=`${v?x:C} / ${v?C:x}`,J=c.entryWidth??.2,A=c.columnsCount,ee=y.scalingValue(J,n),E=y.scalingValue(c.horizontalGap??0,n),I=ee,F=ee,f={width:I,...S?{aspectRatio:R,height:"auto",overflow:"hidden"}:{height:"auto"}},b=S?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},W=a.useRef(null),[O,K]=a.useState(!1),[G,Q]=a.useState([]),[V,N]=a.useState(0),[_,$]=a.useState(0),[U,X]=a.useState(null),[ce,j]=a.useState({title1:"",title2:"",title3:""}),ge=(()=>{const Te={},Se=W.current?getComputedStyle(W.current).getPropertyValue("--cntrl-article-width").trim():"";return Se&&(Te["--cntrl-article-width"]=Se),Te})(),h=!n||i||o,he=a.useMemo(()=>pg(d),[d]),Y=t??[],be=Y.length%A||A,Ce=be<A&&Y.length>0,le=Y.length-be,re=Ce?Math.floor((A-be)/2)+1:1,D=a.useMemo(()=>xg(Y),[Y]),se=a.useMemo(()=>Tg(Y),[Y]),ue=(Te,Se,q)=>{if(n&&!o&&!i)return;const me=D.findIndex(pe=>pe.gridIndex===Te);if(me<0)return;const ve=D[me];$(me),Q(ve.items),N(Se),j(ve.entry),X(q??null),K(!0)},_e=a.useCallback(()=>{K(!1),X(null)},[]),xe=a.useCallback(()=>{const Te=D[_];return!Te||!W.current?U:bg(W.current,Te.gridIndex,S?"cover":"contain")??U},[D,_,U,S]),Pe=a.useCallback(Te=>{if(D.length>1){const Se=D.length,q=(_+Te+Se)%Se,me=D[q],ve=Math.min(V,me.items.length-1);$(q),Q(me.items),N(ve),j(me.entry);return}N(Se=>(Se+Te+G.length)%G.length)},[D,_,V,G.length]),Fe=D.length>1||G.length>1;return a.useEffect(()=>{if(!O||typeof document>"u")return;const Te=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Te}},[O]),a.useEffect(()=>{!n||o||i||K(!1)},[n,o,i]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:he}}),r.jsx(Lg,{mediaList:se}),r.jsx("div",{ref:W,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${m}`.trim(),style:{gridTemplateColumns:`repeat(${A}, ${ee})`,rowGap:0,columnGap:E,width:y.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:y.scalingValue(u??0,n)},children:Y.map((Te,Se)=>{const q=Da(Te.gallery),me=Va(q),ve=me.filter(ae=>ae.lightboxMedia).map(ae=>ae.lightboxMedia),pe=Math.floor(Se/A)===Math.ceil(Y.length/A)-1,Ae=Ce&&Se>=le?`${re+(Se-le)}`:void 0,$e=me[0],z=$e!=null&&$e.lightboxMedia?ve.findIndex(ae=>ae.url===$e.lightboxMedia.url):-1,de=r.jsx("div",{className:`${d}-item-image-wrapper`,style:f,children:me.length>0&&r.jsx(Pg,{media:$e.displayMedia,gridIndex:Se,className:`${d}-item-${qi($e.displayMedia)?"video":"image"}`.trim(),style:b,onMediaClick:h&&z>=0?ae=>ue(Se,z,nc(ae.currentTarget,S?"cover":"contain")):void 0})});return r.jsx("div",{className:`${d}-item`,children:r.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,pe?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:ee,...Ae?{gridColumn:Ae}:{}},children:[r.jsx("div",{className:`${d}-item-title-row`,children:r.jsx("div",{style:{height:0,width:F}})}),r.jsx("a",{className:`${d}-item-image-link`,children:de}),r.jsx("div",{className:`${d}-item-subtitle-row`,children:r.jsx("div",{style:{height:0,width:F}})})]})},Se)})}),O&&typeof document<"u"&&(()=>{const Te=(l?document.getElementById(l):null)??document.body;return mi.createPortal(r.jsx("div",{style:ge,"data-selection":"none",children:r.jsx(Fg,{prefix:d,items:G,index:V,entry:ce,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:Fe,lightboxEntries:D,entryIdx:_,layoutId:s,sourceRect:U,resolveCloseSourceRect:xe,onClose:_e,onPrev:()=>Pe(-1),onNext:()=>Pe(1)})}),Te)})()]})}const _g=`import { CommonComponentProps } from '../props';
6370
+ `}const Es={url:"",name:"",objectFit:"cover"},$n=500,Xi=650,un="cubic-bezier(0.22, 1, 0.36, 1)",mg=72,gg=50,hg=1e4,fg=650,yg=500;function vg(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function nc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=rr(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function bg(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?nc(i,n):null}function xg(e){return e.reduce((t,n,i)=>{const o=Da(n.gallery),l=Va(o).filter(d=>d.lightboxMedia).map(d=>d.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function Qi(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function Ms(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Qi(e,i,n)}const wg=.03;function ic(e){return e.width*wg}const Br={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Ho(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function ks(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Sg(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function ma(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function $g(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:ma(e,t.width,t.height)}function Cg(e,t){if(qi(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function Tg(e){const t=new Set,n=[];for(const i of e){const o=Da(i.gallery),s=Va(o);for(const l of s)for(const d of[l.displayMedia,l.lightboxMedia])d!=null&&d.url&&!t.has(d.url)&&(t.add(d.url),n.push(d))}return n}function Lg({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>qi(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function Wi(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=ic(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function ar(e,t,n){const i=Wi(e,t,n);return{...i,left:2*i.left-e.left}}function Ig(e,t,n){const{left:i,width:o}=n,s=ic(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function oc(e,t,n,i){const o=Wi(e,"left",i),s=Wi(e,"right",i),l=ar(e,"left",i),d=ar(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Rg(e,t,n,i){const{start:o,end:s}=oc(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function Eg(e,t,n){const i=Wi(e,t,n),o=ar(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function rc(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 Da(e){if(!e)return;if(rc(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.url?t:void 0,o=n!=null&&n.url?n:void 0;if(!(!i&&!o))return[{media:[o??i??Es,i??o??Es]}]}function Mg(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function kg(e){const[t]=e.media;return t!=null&&t.url?t:null}function Va(e){if(!Array.isArray(e)||e.length===0)return[];if(rc(e)){const t=[];for(const n of e){const i=Mg(n);if(!i)continue;const o=kg(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function qi(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Pg({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return qi(e)?r.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):r.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Ag({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function No({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return qi(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function Fg({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:m,layoutId:w,sourceRect:S,resolveCloseSourceRect:T,onClose:v,onPrev:C,onNext:x}){const M=a.useRef(null),L=a.useRef(null),R=a.useRef(null),Z=a.useRef(new Map),[P,Q]=a.useState(0),E=a.useRef(null),I=a.useRef(0),W=a.useRef(0),f=a.useRef("none"),b=a.useRef(!1),_=a.useRef(!1),O=a.useRef(!1),K=a.useRef(null),G=a.useRef(null),J=a.useRef(null),V=a.useRef(()=>{}),N=a.useRef(null),H=a.useRef(null),$=a.useRef(null),U=a.useRef(!1),[Y,se]=a.useState(null),[j,ge]=a.useState(Br),[h,ue]=a.useState(0),[X,ve]=a.useState("opening"),[$e,ae]=a.useState(0),[re,D]=a.useState(0),[ne,ce]=a.useState(!1),[Ne,be]=a.useState(null),[We,_e]=a.useState(null),[Te,we]=a.useState(null),[q,pe]=a.useState(!1),[fe,le]=a.useState(null),[Pe,Le]=a.useState(!1),z=a.useRef(!1),[de,ie]=a.useState(!1),[F,ee]=a.useState(!1),Ie=a.useRef(n),oe=a.useRef(void 0),A=t[n],Oe=A?qi(A):!1,Ae=re!==0||ne,rt=!l&&(!s||!!d),et=c&&!l,Ce=u.length>1,He=a.useCallback((g,he)=>t.length<=1?null:t[(g+he+t.length)%t.length]??null,[t]),ze=Ce?Qi(u,m,-1):He(n,-1),me=Ce?Qi(u,m,1):He(n,1),Se=Ne===-1&&Ae?Ce&&We!==null?Qi(u,We,-1):Te!==null?He(Te,-1):null:null,je=Ne===1&&Ae?Ce&&We!==null?Qi(u,We,1):Te!==null?He(Te,1):null:null,Me=Se&&Se.url!==(ze==null?void 0:ze.url)?Se:null,Ge=je&&je.url!==(me==null?void 0:me.url)?je:null,tt=ze&&et?(()=>{const g=Ce?Ms(u,m,-1):t.length>2?He((n-1+t.length)%t.length,-1):null;return g&&g.url!==ze.url?g:null})():null,Ke=me&&et?(()=>{const g=Ce?Ms(u,m,1):t.length>2?He((n+1)%t.length,1):null;return g&&g.url!==me.url?g:null})():null,ut=Me??tt,ht=Ge??Ke,it=a.useCallback((g,he,Ee)=>{if(!g||!he||!Ee)return;const ke=Z.current,st=ke.get(g);(st==null?void 0:st.width)===he&&(st==null?void 0:st.height)===Ee||(ke.set(g,{width:he,height:Ee}),Q(Pt=>Pt+1))},[]),xt=a.useCallback(g=>{if(!(g!=null&&g.url))return null;const he=Z.current.get(g.url);return $g(L.current,he)},[P,h]),Wt=a.useCallback(()=>{if(!A)return;const g=xt(A);if(g){se(g);return}const he=L.current;he&&se(ks(he))},[A,xt]),dt=a.useCallback(g=>{if(Ce){const he=u.length;_e((m+g+he)%he),we(null);return}t.length>1&&(we((n+g+t.length)%t.length),_e(null))},[Ce,u.length,m,t.length,n]),Xe=a.useCallback(g=>{O.current=g,ce(g)},[]),De=a.useCallback(()=>{K.current!==null&&(window.clearTimeout(K.current),K.current=null)},[]),vt=a.useCallback(()=>{De(),K.current=window.setTimeout(()=>{De(),Xe(!1)},Xi+32)},[De,Xe]),wt=a.useCallback(()=>{const g=M.current;if(!g){ge({left:0,top:0,width:typeof window<"u"?window.innerWidth:Br.width,height:typeof window<"u"?window.innerHeight:Br.height});return}const he=g.getBoundingClientRect();ge({left:he.left,top:he.top,width:he.width,height:he.height})},[]),kt=a.useCallback((g,he)=>{if(Ae){if(de&&!ne)return`translate(${re}px, 0px)`;if(ne&&Ne!==null){const Ee=xt(g);if(!Ee)return;const{x:ke,y:st}=Rg(Ee,he,Ne,j);return`translate(${ke}px, ${st}px)`}if(ne)return"translate(0px, 0px)"}},[Ae,de,ne,re,Ne,j,xt]),jt=a.useCallback(()=>{const g=G.current;G.current=null,De(),Xe(!1),be(null),_e(null),we(null),D(0),ie(!1),b.current=!1,W.current=0,f.current="none",g===-1?C():g===1&&x()},[De,Xe,C,x]),tn=a.useCallback(()=>{De(),K.current=window.setTimeout(()=>{G.current!==null&&jt()},Xi+32)},[De,jt]),sn=a.useCallback(()=>{De(),G.current=null,Xe(!1),be(null),_e(null),we(null),D(0),ie(!1),b.current=!1,W.current=0,f.current="none"},[De,Xe]),Tt=a.useCallback(g=>{if(!(!et||!Y)){if(O.current){if(G.current===g){J.current=g,jt();return}sn()}De(),dt(g),G.current=g,be(g),Xe(!0),tn()}},[et,Y,jt,sn,De,dt,Xe,tn]);V.current=Tt;const Mt=a.useCallback(()=>{N.current=null,U.current=!1,H.current!==null&&(window.clearInterval(H.current),H.current=null),$.current!==null&&(window.clearTimeout($.current),$.current=null)},[]),Yt=a.useCallback(g=>{H.current!==null&&window.clearInterval(H.current);const he=U.current?yg:fg;H.current=window.setInterval(()=>{V.current(g)},he)},[]),Gt=a.useCallback(g=>{N.current!==g&&(Mt(),N.current=g,U.current=!1,V.current(g),Yt(g),$.current=window.setTimeout(()=>{$.current=null,N.current===g&&(U.current=!0,Yt(g))},hg))},[Mt,Yt]),xe=a.useCallback(()=>{const g=L.current;if(!g)return;const he=A==null?void 0:A.url,Ee=he?Z.current.get(he):void 0;if(Ee!=null&&Ee.width&&(Ee!=null&&Ee.height)){se(ma(g,Ee.width,Ee.height));return}const ke=R.current;if(ke&&he&&(ke.src===he||ke.currentSrc===he)){const{width:Pt,height:Qe}=Sg(ke);if(Pt&&Qe){it(he,Pt,Qe),se(ma(g,Pt,Qe));return}}const st=ks(g);!st.width||!st.height||se(st)},[A==null?void 0:A.url,it]),qe=a.useCallback(g=>{if(R.current=g,!!g){if(g instanceof HTMLVideoElement){g.readyState>=1&&g.videoWidth>0&&xe();return}g.complete&&g.naturalWidth>0&&xe()}},[xe]),Ue=a.useCallback(()=>{wt(),xe(),ue(g=>g+1)},[wt,xe]);a.useEffect(()=>{Ue();const g=L.current,he=M.current,Ee=new ResizeObserver(()=>Ue());return g&&Ee.observe(g),he&&Ee.observe(he),window.addEventListener("resize",Ue),()=>{Ee.disconnect(),window.removeEventListener("resize",Ue)}},[Ue,n,w]),a.useLayoutEffect(()=>{if(!A)return;const g=R.current;if(g){if(g instanceof HTMLImageElement&&g.complete&&g.naturalWidth>0){xe();return}g instanceof HTMLVideoElement&&g.readyState>=1&&g.videoWidth>0&&xe()}},[A==null?void 0:A.url,n,xe]),a.useEffect(()=>{Wt()},[Wt,P]),a.useEffect(()=>{const g=new Set,he=[],Ee=ke=>{!(ke!=null&&ke.url)||g.has(ke.url)||(g.add(ke.url),he.push(ke))};t.forEach(Ee),u.forEach(ke=>ke.items.forEach(Ee)),he.forEach(ke=>{Z.current.has(ke.url)||Cg(ke,it)})},[t,u,it]),a.useEffect(()=>{if(X!=="opening"||!Y)return;if(!S){ve("open");return}pe(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{pe(!0),ve("open")})});return()=>cancelAnimationFrame(g)},[X,Y,S]),a.useEffect(()=>{if(X!=="closing")return;const g=setTimeout(()=>v(),$n);return()=>clearTimeout(g)},[X,v]),a.useEffect(()=>()=>{De()},[De]),a.useLayoutEffect(()=>{Ie.current===n&&oe.current===(A==null?void 0:A.url)||(De(),G.current=null,be(null),_e(null),we(null),ae(0),D(0),Xe(!1),ee(!1),ie(!1),I.current=0,W.current=0,f.current="none",b.current=!1,E.current=null,_.current=!1,R.current=null,Wt(),Ie.current=n,oe.current=A==null?void 0:A.url)},[n,A==null?void 0:A.url,Xe,De,Wt]),a.useLayoutEffect(()=>{const g=J.current;g!==null&&(J.current=null,requestAnimationFrame(()=>{V.current(g)}))},[n,m,A==null?void 0:A.url]),a.useLayoutEffect(()=>{if(X==="opening"){z.current=!1,Le(!1);return}if(X!=="open"||z.current)return;if(!ze&&!me){z.current=!0;return}Le(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Le(!0),z.current=!0})});return()=>cancelAnimationFrame(g)},[X,ze==null?void 0:ze.url,me==null?void 0:me.url]),a.useEffect(()=>{if(X!=="open")return;const g=()=>{const Qe=mt=>{mt.stopPropagation(),mt.preventDefault(),document.removeEventListener("click",Qe,!0)};document.addEventListener("click",Qe,!0)},he=Qe=>{const mt=Qe<0?1:-1;De(),dt(mt),G.current=mt,be(mt),Xe(!0),tn()},Ee=Qe=>{if(Math.abs(Qe)>gg&&et){he(Qe);return}G.current=null,be(null),_e(null),we(null),Xe(!0),D(0),vt()},ke=Qe=>{if(Qe.touches.length!==1||O.current)return;const mt=Qe.touches[0];_.current=!0,E.current={x:mt.clientX,y:mt.clientY},f.current="none",W.current=0,b.current=!1},st=Qe=>{if(!E.current||Qe.touches.length!==1||O.current)return;const mt=Qe.touches[0],_t=mt.clientX-E.current.x,Et=mt.clientY-E.current.y;if(f.current==="none"){if(Math.abs(_t)<10&&Math.abs(Et)<10)return;if(Math.abs(_t)>Math.abs(Et)){if(!et)return;f.current="horizontal"}else if(Et>0){if(!rt)return;f.current="vertical"}else return}if(f.current==="horizontal"){b.current=!0,ie(!0),W.current=_t,D(_t),Qe.preventDefault();return}f.current==="vertical"&&(b.current=!0,ie(!0),I.current=Et,ae(Et),Qe.preventDefault())},Pt=()=>{if(!E.current)return;const Qe=f.current,mt=b.current;if(mt&&Qe==="horizontal")Ee(W.current),g();else if(mt&&Qe==="vertical"){const _t=I.current;if(rt&&_t>mg){const Et=window.innerHeight;I.current=Et,ee(!0),ae(Et),ve("closing")}else I.current=0,ae(0);g()}else Qe==="horizontal"&&Math.abs(W.current)>0&&(Ee(W.current),g());E.current=null,f.current="none",W.current=0,b.current=!1,ie(!1)};return document.addEventListener("touchstart",ke,{passive:!0}),document.addEventListener("touchmove",st,{passive:!1}),document.addEventListener("touchend",Pt),document.addEventListener("touchcancel",Pt),()=>{document.removeEventListener("touchstart",ke),document.removeEventListener("touchmove",st),document.removeEventListener("touchend",Pt),document.removeEventListener("touchcancel",Pt)}},[X,et,Xe,vt,De,rt,tn,dt]);const lt=a.useCallback(()=>{const g=(T==null?void 0:T())??S??null;g&&Y&&(le(g),pe(!0)),ve("closing")},[T,S,Y]);a.useEffect(()=>{const g=ke=>{if(ke.key==="Escape"){if(s&&d||X==="closing")return;Mt(),lt();return}if(ke.key!=="ArrowLeft"&&ke.key!=="ArrowRight"||X!=="open"||!et)return;ke.preventDefault();const st=ke.key==="ArrowLeft"?-1:1;ke.repeat&&N.current===st||Gt(st)},he=ke=>{if(ke.key!=="ArrowLeft"&&ke.key!=="ArrowRight")return;const st=ke.key==="ArrowLeft"?-1:1;N.current===st&&Mt()},Ee=()=>{Mt()};return window.addEventListener("keydown",g),window.addEventListener("keyup",he),window.addEventListener("blur",Ee),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",he),window.removeEventListener("blur",Ee),Mt()}},[X,s,d,lt,et,Gt,Mt]),a.useEffect(()=>{X!=="open"&&Mt()},[X,Mt]);const Rt=()=>{X==="closing"||l||lt()},pt=X==="open",nt=X==="closing",qt=$e>0?Math.max(0,1-$e/500):1,Ze=$e>0?Math.max(.35,1-$e/500):1,Je=a.useCallback(g=>{if(!(g.propertyName!=="transform"||!O.current)){if(G.current!==null){jt();return}De(),Xe(!1)}},[De,Xe,jt]),at=X==="closing"?fe??S:S,Lt=at&&Y&&(X==="opening"||nt)?vg(at,Y):void 0,It=Ae&&A?kt(A,"center"):$e>0?`translateY(${$e}px)`:Lt,ft=Y?Ho(Y,j):null,At=!!(at&&Y),Ot=At&&(X==="closing"||X==="open"&&q),Nt={position:"absolute",top:ft==null?void 0:ft.top,left:ft==null?void 0:ft.left,width:ft==null?void 0:ft.width,height:ft==null?void 0:ft.height,objectFit:"contain",transformOrigin:"top left",transform:It,opacity:$e>0?Ze:At?1:X==="opening"||nt?0:1,transition:de&&!ne?"none":ne?`transform ${Xi}ms ${un}`:F?`transform ${$n}ms ${un}, opacity ${$n}ms ${un}`:Ot?`transform ${$n}ms ${un}`:X==="opening"||nt?`opacity ${$n}ms ${un}`:"none",pointerEvents:Oe&&pt&&!Ae?"auto":"none",touchAction:Oe&&pt?"none":void 0,zIndex:1,overflow:Oe?"hidden":void 0},Dt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:pt&&!Ae?"auto":"none"},bt=(g,he,Ee="adjacent")=>{const ke=xt(g);if(!ke)return{display:"none"};const st=Ee==="far"?he==="left"?"far-left":"far-right":he==="left"?"left-adjacent":"right-adjacent",{start:Pt}=Ne!==null?oc(ke,st,Ne,j):{start:Ee==="far"?ar(ke,he,j):Wi(ke,he,j)},Qe=Ho(Pt,j),mt=kt(g,st),_t=!Ae&&Ee==="adjacent"&&pt&&!Pe?Eg(ke,he,j):null,Et=Ee==="far"&&Ae&&Ne===(he==="left"?-1:1),ln=de&&!ne?!1:ne,dn=Ee==="adjacent"&&pt&&Pe&&!Ae;return{position:"absolute",top:Qe.top,left:Qe.left,width:Qe.width,height:Qe.height,objectFit:"contain",transform:mt??(_t?`translate(${_t.x}px, ${_t.y}px)`:void 0),opacity:Ee==="far"?pt&&Et?1:0:pt?1:0,transition:ln?Ee==="far"?`transform ${Xi}ms ${un}`:`transform ${Xi}ms ${un}, opacity ${$n}ms ${un}`:dn?`transform ${$n}ms ${un}`:X==="opening"||nt?`opacity ${$n}ms ${un}`:"none",pointerEvents:"none",zIndex:1}},Vt=(g,he)=>{const Ee=xt(g);return Ee?Ig(Wi(Ee,he,j),he,j):null},Kt=g=>he=>{if(!l){if(_.current){_.current=!1;return}he.stopPropagation(),Tt(g)}},Ut=ze?Vt(ze,"left"):null,Zt=me?Vt(me,"right"):null,zt=Ut?Ho(Ut,j):null,St=Zt?Ho(Zt,j):null;return r.jsxs("div",{ref:M,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:X==="open"?"none":void 0},onClick:Rt,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:pt?qt:0,transition:de?"none":`opacity ${$n}ms ${un}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:L,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:pt?1:0,transition:de?"none":`opacity ${$n}ms ${un}`,pointerEvents:"none"},children:r.jsx(tc,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:Rt})})]}),pt&&ut&&r.jsx(No,{media:ut,style:bt(ut,"left","far"),onMeasure:it,onTransitionEnd:Je},`far-prev-${ut.url}`),pt&&ze&&r.jsxs(r.Fragment,{children:[r.jsx(No,{media:ze,style:bt(ze,"left"),onMeasure:it,onTransitionEnd:Je},`prev-${ze.url}`),zt&&r.jsx("div",{style:{position:"absolute",top:zt.top,left:zt.left,width:zt.width,height:zt.height,cursor:l||de?"default":"pointer",pointerEvents:l||de?"none":"auto",zIndex:3},onClick:Kt(-1)})]}),pt&&me&&r.jsxs(r.Fragment,{children:[r.jsx(No,{media:me,style:bt(me,"right"),onMeasure:it,onTransitionEnd:Je},`next-${me.url}`),St&&r.jsx("div",{style:{position:"absolute",top:St.top,left:St.left,width:St.width,height:St.height,cursor:l||de?"default":"pointer",pointerEvents:l||de?"none":"auto",zIndex:3},onClick:Kt(1)})]}),pt&&ht&&r.jsx(No,{media:ht,style:bt(ht,"right","far"),onMeasure:it,onTransitionEnd:Je},`far-next-${ht.url}`),Y&&A&&(Oe?r.jsx(Ag,{src:A.url,phase:X,onMediaElement:qe,wrapperStyle:Nt,videoStyle:Dt,onLoadedMetadata:xe,onTransitionEnd:Je},`${n}-${A.url}`):r.jsx("img",{ref:qe,src:A.url,alt:A.name,onLoad:xe,onTransitionEnd:Je,style:Nt},`${n}-${A.url}`))]})}function Wg({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=y.useScopedStyles(),{gridLayout:c,verticalGap:u,align:m="top",imageDisplay:w}=e,S=(w==null?void 0:w.display)==="cover",T=(w==null?void 0:w.ratioValue)??"1:1",v=(w==null?void 0:w.reversed)??!1,[C,x]=T.split(":").map(Number),R=`${v?x:C} / ${v?C:x}`,Z=c.entryWidth??.2,P=c.columnsCount,Q=y.scalingValue(Z,n),E=y.scalingValue(c.horizontalGap??0,n),I=Q,W=Q,f={width:I,...S?{aspectRatio:R,height:"auto",overflow:"hidden"}:{height:"auto"}},b=S?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},_=a.useRef(null),[O,K]=a.useState(!1),[G,J]=a.useState([]),[V,N]=a.useState(0),[H,$]=a.useState(0),[U,Y]=a.useState(null),[se,j]=a.useState({title1:"",title2:"",title3:""}),ge=(()=>{const Te={},we=_.current?getComputedStyle(_.current).getPropertyValue("--cntrl-article-width").trim():"";return we&&(Te["--cntrl-article-width"]=we),Te})(),h=!n||i||o,ue=a.useMemo(()=>pg(d),[d]),X=t??[],ve=X.length%P||P,$e=ve<P&&X.length>0,ae=X.length-ve,re=$e?Math.floor((P-ve)/2)+1:1,D=a.useMemo(()=>xg(X),[X]),ne=a.useMemo(()=>Tg(X),[X]),ce=(Te,we,q)=>{if(n&&!o&&!i)return;const pe=D.findIndex(le=>le.gridIndex===Te);if(pe<0)return;const fe=D[pe];$(pe),J(fe.items),N(we),j(fe.entry),Y(q??null),K(!0)},Ne=a.useCallback(()=>{K(!1),Y(null)},[]),be=a.useCallback(()=>{const Te=D[H];return!Te||!_.current?U:bg(_.current,Te.gridIndex,S?"cover":"contain")??U},[D,H,U,S]),We=a.useCallback(Te=>{if(D.length>1){const we=D.length,q=(H+Te+we)%we,pe=D[q],fe=Math.min(V,pe.items.length-1);$(q),J(pe.items),N(fe),j(pe.entry);return}N(we=>(we+Te+G.length)%G.length)},[D,H,V,G.length]),_e=D.length>1||G.length>1;return a.useEffect(()=>{if(!O||typeof document>"u")return;const Te=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Te}},[O]),a.useEffect(()=>{!n||o||i||K(!1)},[n,o,i]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ue}}),r.jsx(Lg,{mediaList:ne}),r.jsx("div",{ref:_,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${m}`.trim(),style:{gridTemplateColumns:`repeat(${P}, ${Q})`,rowGap:0,columnGap:E,width:y.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:y.scalingValue(u??0,n)},children:X.map((Te,we)=>{const q=Da(Te.gallery),pe=Va(q),fe=pe.filter(ie=>ie.lightboxMedia).map(ie=>ie.lightboxMedia),le=Math.floor(we/P)===Math.ceil(X.length/P)-1,Pe=$e&&we>=ae?`${re+(we-ae)}`:void 0,Le=pe[0],z=Le!=null&&Le.lightboxMedia?fe.findIndex(ie=>ie.url===Le.lightboxMedia.url):-1,de=r.jsx("div",{className:`${d}-item-image-wrapper`,style:f,children:pe.length>0&&r.jsx(Pg,{media:Le.displayMedia,gridIndex:we,className:`${d}-item-${qi(Le.displayMedia)?"video":"image"}`.trim(),style:b,onMediaClick:h&&z>=0?ie=>ce(we,z,nc(ie.currentTarget,S?"cover":"contain")):void 0})});return r.jsx("div",{className:`${d}-item`,children:r.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,le?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:Q,...Pe?{gridColumn:Pe}:{}},children:[r.jsx("div",{className:`${d}-item-title-row`,children:r.jsx("div",{style:{height:0,width:W}})}),r.jsx("a",{className:`${d}-item-image-link`,children:de}),r.jsx("div",{className:`${d}-item-subtitle-row`,children:r.jsx("div",{style:{height:0,width:W}})})]})},we)})}),O&&typeof document<"u"&&(()=>{const Te=(l?document.getElementById(l):null)??document.body;return mi.createPortal(r.jsx("div",{style:ge,"data-selection":"none",children:r.jsx(Fg,{prefix:d,items:G,index:V,entry:se,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:_e,lightboxEntries:D,entryIdx:H,layoutId:s,sourceRect:U,resolveCloseSourceRect:be,onClose:Ne,onPrev:()=>We(-1),onNext:()=>We(1)})}),Te)})()]})}const _g=`import { CommonComponentProps } from '../props';
6371
6371
  import { scalingValue, useScopedStyles } from '../utils/index';
6372
6372
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
6373
6373
  import { createPortal } from 'react-dom';
@@ -8710,7 +8710,7 @@ export function Hive({
8710
8710
  </>
8711
8711
  );
8712
8712
  }
8713
- `,Hg="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>'),ni={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[Ke(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ke(e,"fontSettings")]={...ni.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ke(e,"fontSize")]={...ni.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ke(e,"lineHeight")]={...ni.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ke(e,"letterSpacing")]={...ni.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ke(e,"wordSpacing")]={...ni.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ke(e,"textAlign")]={...ni.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ke(e,"textAppearance")]={...ni.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const _i=Kn.filter(e=>e!=="count"),Og=_i.reduce((e,t)=>({...e,...Ng(t)}),{}),jg=_i.reduce((e,t)=>({...e,[Ke(t,"fontFamily")]:"Arial",[Ke(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ke(t,"letterSpacing")]:0,[Ke(t,"wordSpacing")]:0,[Ke(t,"textAlign")]:"left",[Ke(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Dr(e){return _i.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ke(n,"fontSize")]=i),o!==void 0&&(t[Ke(n,"lineHeight")]=o),t},{})}const zg={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(_i.map(e=>[za[e],Ba(e)]))},Bg={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},Dg=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...Bg,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),Vg={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:Dg},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...Og},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Hg,closeIconColor:"#000000",closeIconHoverColor:"#999999",...jg},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...Dr({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...Dr({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...Dr({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[zg]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},Gg={element:Wg,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[..._i.map(e=>({path:`${Ke(e,"fontFamily")}`}))]},fontRelations:{..._i.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ke(t,"fontFamily")}`}),{})},schema:Vg,sourceCode:_g};function qg(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 Kg({media:e,className:t,style:n}){const i=a.useRef(null);return a.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const s=o.play();s&&s.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function Vr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ug(e){return String(e??"").trim().length>0}function Ps(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function As(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Fs(e,t,n,i,o,s,l){const d=y.scalingValue(s,l),c=y.scalingValue(0,l),u=e===0,m=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!m||i?d:c}}function Xg(e,t,n){const i=y.scalingValue(t,n),o=y.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Ws=10;function Yg(e){return`
8713
+ `,Hg="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>'),ni={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[Ye(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ye(e,"fontSettings")]={...ni.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ye(e,"fontSize")]={...ni.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ye(e,"lineHeight")]={...ni.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ye(e,"letterSpacing")]={...ni.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ye(e,"wordSpacing")]={...ni.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ye(e,"textAlign")]={...ni.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ye(e,"textAppearance")]={...ni.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const _i=Kn.filter(e=>e!=="count"),Og=_i.reduce((e,t)=>({...e,...Ng(t)}),{}),jg=_i.reduce((e,t)=>({...e,[Ye(t,"fontFamily")]:"Arial",[Ye(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ye(t,"letterSpacing")]:0,[Ye(t,"wordSpacing")]:0,[Ye(t,"textAlign")]:"left",[Ye(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Dr(e){return _i.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ye(n,"fontSize")]=i),o!==void 0&&(t[Ye(n,"lineHeight")]=o),t},{})}const zg={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(_i.map(e=>[za[e],Ba(e)]))},Bg={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},Dg=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...Bg,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),Vg={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:Dg},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...Og},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Hg,closeIconColor:"#000000",closeIconHoverColor:"#999999",...jg},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...Dr({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...Dr({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...Dr({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[zg]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},Gg={element:Wg,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[..._i.map(e=>({path:`${Ye(e,"fontFamily")}`}))]},fontRelations:{..._i.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ye(t,"fontFamily")}`}),{})},schema:Vg,sourceCode:_g};function qg(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 Kg({media:e,className:t,style:n}){const i=a.useRef(null);return a.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const s=o.play();s&&s.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function Vr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ug(e){return String(e??"").trim().length>0}function Ps(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function As(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Fs(e,t,n,i,o,s,l){const d=y.scalingValue(s,l),c=y.scalingValue(0,l),u=e===0,m=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!m||i?d:c}}function Xg(e,t,n){const i=y.scalingValue(t,n),o=y.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Ws=10;function Yg(e){return`
8714
8714
  .${e}-wrapper {
8715
8715
  display: grid;
8716
8716
  align-items: start;
@@ -9079,7 +9079,7 @@ a.${e}-list-item {
9079
9079
  overflow-wrap: anywhere;
9080
9080
  word-break: break-word;
9081
9081
  }
9082
- `}const Un=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ga=["AColumn","BColumn","CColumn","DColumn","EColumn"],Pn="cutLabel",ho=[...Ga,Pn],Cr=["A","B","C","D","E"];function ac(e){return`${e}ColumnVerticalAlign`}const ga=["Top","Center","Bottom"];function qa(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Cr.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Zg(e){const t=qa(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Jg(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Cr.includes(n)?n:null}function sc(e,t,n){const i=Jg(e);return i?i===t?!1:Zg(n[ac(i)]):!0}function fo(e){const t=qa(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Cr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Qg(e,t,n){if(lc(e,t,n))return fo(e);const i=fo(e);return i.kind==="baseline"?{kind:"top"}:i}function eh(e){const t=fo(e);return t.kind==="baseline"?{kind:"top"}:t}function lc(e,t,n){return sc(e,n,t)?fo(e).kind==="baseline":!1}function th(e){const t={};let n=!1;for(const i of Cr){const o=ac(i),s=e[o];if(e.type==="b"){const l=String(s??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}sc(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function nh(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function ih(e){const t=fo(e).kind;return t==="baseline"?"center":t}function oh(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function _s(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function rh(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 Gr(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const l=rh(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const d=s.getBoundingClientRect(),c=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(d.height-c)/2:e.kind==="bottom"&&(u=d.height-c),d.top-t+u+l}function ah(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 sh(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const lh={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function $t(e,t){return`${e}${t.replace(/^text/,"Text")}`}const ch={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function dh(e){return[$t(e,"textFontFamily"),$t(e,"textFontSettings"),{type:"row",items:[$t(e,"textFontSize"),$t(e,"textLineHeight"),$t(e,"textLetterSpacing"),$t(e,"textWordSpacing")]},$t(e,"textTextAlign"),$t(e,"textTextAppearance"),`${e}VerticalAlign`]}function uh(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(ho.map(e=>[ch[e],dh(e)]))}}function sr(e,t){const n=i=>{const o=$t(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===Pn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Hs(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 cn(Xt(n,t))}function Ns(e,t,n,i){const o=sr(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<s?`${n} ${i}`:n}function Os(e,t,n,i){const o=sr(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=s?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((s-l)/2,i)}}const fn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Hi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Ni=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Oi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],ph={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},mh=["hover","focus","filled","success","error"],js=.004,$i=.004,qr=$i,Ka=50,yo=1440,vo=Ka/yo;function cc(e){const t=typeof e=="number"&&e>0?e:yo;return Ka/t}function gh(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 yo}const dc={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function io(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function hh(e,t=1){const n=t/e;return Object.fromEntries(fn.map(i=>[i,n]))}function fh(){return Object.fromEntries([...Hi.map(e=>[e,0]),...Ni.map(e=>[e,0])])}function yh(){return Object.fromEntries(Oi.map(e=>[e,0]))}function Oo(e){return Object.fromEntries(fn.map(t=>[t,typeof e[t]=="number"?e[t]:dc[t]]))}function uc(e,t,n){const i=e-vo,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 Jo(e,t,n){const i=Ua(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,l)=>s+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function vh(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=Hi[o],l=Ni[o],d=typeof n[s]=="number"?n[s]:0,c=typeof n[l]=="number"?n[l]:0,u=uc(t[o]??0,d,c);u.paddingLeft!==d&&(i[s]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function Ua(e,t,n){if(e<=0)return[];const i=fn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,m)=>u+m,0)+vo;if(t>=l)return i;const d=[...o];let c=l-t;for(let u=d.length-1;u>=0&&c>0;u-=1){const m=d[u]-vo;if(m<=0)continue;const w=Math.min(c,m);d[u]-=w,c-=w}return[...d,i[e-1]]}function bh(e,t,n){if(e<=1)return{};const i=Ua(e,t,n),o={};for(let s=0;s<e-1;s+=1){const l=fn[s];i[s]!==n[l]&&(o[l]=i[s])}return o}function zs(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Un]}function xh(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function wh(e,t,n,i){const o=Math.min(i,e.length,fn.length),s={};for(let l=0;l<o;l+=1){const d=e[l],c=t.indexOf(d);if(c===-1)continue;const u=fn[c],m=Hi[c],w=Ni[c],S=Oi[c],T=fn[l],v=Hi[l],C=Ni[l],x=Oi[l],M=n[u],L=n[m],R=n[w],J=n[S];typeof M=="number"&&(s[T]=M),typeof L=="number"&&(s[v]=L),typeof R=="number"&&(s[C]=R),typeof J=="number"&&(s[x]=J)}return s}function pc(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 Sh(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=io(e),s=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...hh(n,o),...fh()};if(s)for(const d of Oi)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,yh());return pc(e,l)?l:e}function $h(e,t,n){const i=th(e);i&&(e={...e,...i});const o=cc(n==null?void 0:n.designWidth),s=e.columns,l=t.columns,d=io(e),c=io(t),u=e.type==="b"||e.type===void 0&&t.type==="b",m=typeof s=="number"?s:typeof l=="number"?l:Un.length,w=R=>{if(u)return R;const J=Oo({...t,...R}),A=io(R),ee=Jo(m,A,J),E=vh(m,ee,{...t,...R});return Object.keys(E).length===0?R:{...R,...E}};if(typeof s=="number"&&s!==l)return e;const S=zs(e),T=zs(t);if(!xh(S,T))return w({...e,...wh(S,T,t,m)});if(d<c&&typeof m=="number"&&!u){const R=Oo({...t,...e});return w({...e,...bh(m,d,R)})}if(u){const R=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,J=Math.max(0,(d-o)/2);return R>J?{...e,textPaddingLR:J}:e}const v=Oo({...t,...e}),C=Jo(m,c,Oo(t)),M=Jo(m,d,v).some((R,J)=>R<(C[J]??R)),L=fn.some(R=>{const J=e[R],A=t[R];return typeof J=="number"&&typeof A=="number"&&J!==A});return M||L?w(e):e}function Ch(e,t,n,i){const o=t.slice(0,e).reduce((l,d)=>l+d,0),s=n.slice(e+1,t.length-1).reduce((l,d)=>l+d,0);return Math.max(vo,i-o-s-vo)}function Th(e,t){return Math.random()*(t-e)+e}function Lh(e){return Object.fromEntries(fn.map(t=>[t,typeof e[t]=="number"?e[t]:dc[t]]))}function Kr(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Ih(e,t,n,i,o,s){return e.slice(0,t).map((l,d)=>{const c=Hi[d],u=Ni[d],m=Oi[d];return{key:l,textPrefix:lh[l],widthKey:fn[d],width:n[fn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:m,paddingLeft:i[c],paddingRight:o[u],paddingBottom:s[m]}})}function Rh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:l,onUpdateSettings:d}){const{prefix:c}=y.useScopedStyles(),u=!!o,{columns:m,type:w,wrapperWidth:S,entriesCount:T,cellMinHeight:v,dividerWidth:C,showVisibility:x,cut:M,showCut:L,cutCellMinHeight:R,cutLabel:J,imageSize:A,imageOnHover:ee,entryHoverEffect:E,entryHoverShowOption:I,rowPaddingTop:F,rowPaddingBottom:f,rowPaddingTopB:b,columnsOrder:W,textPaddingLR:O,textColor:K,backgroundColor:G,dividerColor:Q,textHoverColor:V,backgroundHoverColor:N,dividerHoverColor:_}=e,[$,U]=a.useState(void 0),[X,ce]=a.useState(null),j=ee==="on"&&(!n||i),ge=(M??0)>0,h=w==="b",he=a.useRef(null),Y=a.useRef(null),[be,Ce]=a.useState(null),[le,re]=a.useState(yo),D=cc(le),se=Math.max(0,((S??0)-D)/2),ue=Math.min(O??0,se),_e=Math.max(ue,$i),xe=((S??0)+D)/2;a.useLayoutEffect(()=>{if(!n){re(yo);return}const we=()=>{re(gh(he.current))};we();const Ve=he.current;if(!Ve)return;const Ge=new ResizeObserver(we);Ge.observe(Ve);let rt=Ve;for(;rt&&!rt.style.getPropertyValue("--cntrl-article-width");)rt=rt.parentElement;return rt&&Ge.observe(rt),()=>Ge.disconnect()},[n,l]),a.useEffect(()=>{U(void 0)},[M,L,t,T]),a.useEffect(()=>{n&&!i&&U(void 0)},[n,i]);const Pe=y.buildColorVars(c,{textColor:K,backgroundColor:G,dividerColor:Q,textHoverColor:V,backgroundHoverColor:N,dividerHoverColor:_},ph,mh),Fe=s&&s!=="default"?`${c}-state-${s}`:"",Se=`${!n||i?E==="default"?`${c}-entry-hover-default`:E==="blinds"?`${c}-entry-hover-blinds`:E==="reveal"?`${c}-entry-hover-reveal`:"":""} ${Fe}`.trim(),q=E==="reveal"&&(!n||i),me=(x==null?void 0:x[0])??!1,ve=(x==null?void 0:x[1])??!1,pe=a.useRef(e),Ae=a.useRef(l);a.useEffect(()=>{if(!d||!n){pe.current=e,Ae.current=l;return}if(Ae.current!==l){pe.current=e,Ae.current=l;return}const we=pe.current;if(!(we!==e))return;if(typeof we.columns=="number"&&typeof e.columns=="number"&&we.columns!==e.columns){pe.current=e;return}const Ge=$h(e,we,{designWidth:le});pe.current=e,pc(e,Ge)&&d(Ge)},[e,d,n,l,le]);const $e=a.useMemo(()=>Lh(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),z=a.useMemo(()=>Kr(e,Hi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),de=a.useMemo(()=>Kr(e,Ni),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),ae=a.useMemo(()=>Kr(e,Oi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),H=a.useMemo(()=>Array.isArray(W)&&W.length>0?W:[...Un],[W]),ie=a.useMemo(()=>Ih(H,m,$e,z,de,ae),[H,m,$e,z,de,ae]),Ie=io(e),oe=a.useMemo(()=>fn.slice(0,m).map(we=>$e[we]),[m,$e]),P=a.useMemo(()=>Ua(m,Ie,$e),[m,Ie,$e]),He=a.useMemo(()=>Jo(m,Ie,$e),[m,Ie,$e]),We=a.useMemo(()=>ie.map((we,Ve)=>uc(He[Ve]??0,we.paddingLeft,we.paddingRight)),[ie,He]),et=a.useMemo(()=>{const we=T===0?1/0:T;return(t??[]).slice(0,we).map((Ge,rt)=>({id:rt,cells:Object.fromEntries(Un.map(It=>[It,Ge[It]??""])),image:Ge.image,link:Ge.link}))},[t,T]),Je=ge?$??M:et.length,Le=a.useMemo(()=>ge?et.slice(0,Je):et,[et,ge,Je]),Z=ge&&Je<et.length,ne=Le.length>1||Z,Ne=[me?`${c}-divider-top`:"",ve||ne?`${c}-divider-bottom`:""].filter(Boolean).join(" "),lt=!n||i,De=()=>{if(!lt)return;const we=$??M;if(!L){U(et.length);return}U(Math.min(we+L,et.length))},Oe=we=>y.scalingValue(we,n??!1),Ue=h?b??0:F??0,ot=f??0,ct=v??0,gt=Math.max(ot,qr),Et=Fs(0,Le.length,me,ve,Z,C??0,n??!1).borderTopWidth,ut=h?"rowPaddingTopB":"rowPaddingTop",bt=ie[0],Wt=ie[ie.length-1],st=We[0],qe=We[We.length-1],ze=bt&&st?Math.max(st.paddingLeft,$i):0,yt=Wt&&qe?Math.max(qe.paddingRight,$i):0,xt=Ie,kt=we=>{const Ve=he.current;if(!Ve)return{x:0,y:0};const Ge=Ve.getBoundingClientRect();return{x:we.clientX-Ge.left+Ws,y:we.clientY-Ge.top+Ws}},jt=(we,Ve)=>{if(!j)return;const Ge=we.image;if(!(Ge!=null&&Ge.url)){ce(null);return}const{x:rt,y:It}=kt(Ve),dt=(A==null?void 0:A.min)??80,Qe=(A==null?void 0:A.max)??320,qt=(X==null?void 0:X.rowId)===we.id?X.widthPx:Th(dt,Qe);ce({rowId:we.id,url:Ge.url,objectFit:"contain",isVideo:qg(Ge),widthPx:qt,x:rt,y:It})},tn=we=>{if(!j||!X)return;const{x:Ve,y:Ge}=kt(we);ce(rt=>!rt||rt.x===Ve&&rt.y===Ge?rt:{...rt,x:Ve,y:Ge})},sn=()=>{ce(null)},Ct=we=>{q&&Ps(we,c),j&&ce(null)},Mt=we=>{q&&As(we,c)};a.useLayoutEffect(()=>{if(!u||h){Ce(null);return}const we=Y.current,Ve=we==null?void 0:we.parentElement;if(!we||!Ve){Ce(null);return}const Ge=()=>{const It=we.querySelector("[data-list-row]");if(!It){Ce(null);return}const dt=Ve.getBoundingClientRect(),Qe=It.getBoundingClientRect();Ce(Qe.top-dt.top+Qe.height/2)};Ge();const rt=new ResizeObserver(Ge);return rt.observe(we),rt.observe(Ve),()=>rt.disconnect()},[u,h,Le,Ue,ot,ct,t,e,ie,He,le,C,me,ve,Z]);const Yt=a.useMemo(()=>!h&&Ga.some(we=>{const Ve=we.charAt(0),Ge=e[`${we}VerticalAlign`];return lc(Ge,e,Ve)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);a.useLayoutEffect(()=>{var qt;const we=he.current;if(!we)return;const Ve=()=>{we.querySelectorAll("[data-list-col]").forEach(Xe=>{Xe.style.transform="";const Ye=Xe.querySelector(`.${c}-list-col`);Ye&&(Ye.style.minHeight="",Ye.style.height="");const nt=Xe.querySelector(`.${c}-list-col-title`);nt&&(nt.style.transform="")})};if(h||!Yt){Ve();return}const Ge=()=>{const Xe=Array.from(we.querySelectorAll("[data-list-row]")),Ye=`${c}-list-col`,nt=`${c}-baseline-probe`;Xe.forEach(Tt=>{Tt.querySelectorAll("[data-list-col]").forEach(Lt=>{Lt.style.transform="";const ht=Lt.querySelector(`.${Ye}`);ht&&(ht.style.minHeight="",ht.style.height="");const At=Lt.querySelector(`.${c}-list-col-title`);At&&(At.style.transform="")})}),Xe.forEach(Tt=>{const Lt=Array.from(Tt.querySelectorAll("[data-list-col]"));ah(Tt,Lt,Ye)}),we.offsetHeight,Xe.forEach(Tt=>{const Lt=Array.from(Tt.querySelectorAll("[data-list-col]")),ht=Tt.getBoundingClientRect().top,At=new Map,Ot=Lt.map(vt=>{const Vt=vt.querySelector(`.${c}-list-col-title`),Kt={el:vt,titleEl:Vt,letter:vt.getAttribute("data-col-letter")??"",kind:vt.getAttribute("data-valign")??"top",anchor:vt.getAttribute("data-valign-anchor")};return At.set(Kt.letter,Kt),Kt}),Nt=new Map,Dt=(vt,Vt)=>{const Kt=Nt.get(vt.letter);if(Kt!==void 0)return Kt;const Ut=vt.anchor?At.get(vt.anchor):void 0;if(vt.kind!=="baseline"||!Ut||Vt.has(vt.letter)){const fe=Gr(vt,ht,Ye,nt);return Nt.set(vt.letter,fe),fe}Vt.add(vt.letter);const Zt=Dt(Ut,Vt);Vt.delete(vt.letter);const zt=Gr(vt,ht,Ye,nt),wt=Zt-zt;sh(vt.titleEl,wt);const g=Gr(vt,ht,Ye,nt);return Nt.set(vt.letter,g),g};Ot.forEach(vt=>Dt(vt,new Set))})};let rt=null;const It=()=>{rt===null&&(rt=requestAnimationFrame(()=>{rt=null,Ge()}))};Ge();const dt=new ResizeObserver(()=>It());dt.observe(we);let Qe=!1;return typeof document<"u"&&((qt=document.fonts)!=null&&qt.ready)&&document.fonts.ready.then(()=>{Qe||It()}),()=>{Qe=!0,rt!==null&&(cancelAnimationFrame(rt),rt=null),dt.disconnect(),Ve()}},[Yt,h,e,t,le,Le,He]);const Gt=a.useMemo(()=>Yg(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Gt}}),r.jsx("div",{style:Pe,children:r.jsxs("div",{ref:he,className:`${c}-wrapper ${Se}${Ne?` ${Ne}`:""}${h?` ${c}-type-b`:""}`.trim(),style:{width:y.scalingValue(S??0,n)},onMouseMove:j?tn:void 0,onMouseLeave:j?sn:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[Le.map((we,Ve)=>{var dt;const Ge=(((dt=we.link)==null?void 0:dt.length)??0)>0,rt=Ge&&(!n||i)?"a":"div",It=Fs(Ve,Le.length,me,ve,Z,C??0,n??!1);return r.jsxs(rt,{ref:Ve===0?Qe=>{Y.current=Qe}:void 0,className:`${c}-list-item${Ge||I==="always"?` ${c}-list-item-has-link`:""}${Z&&Ve===Le.length-1?` ${c}-list-item-before-cut`:""}`,...Ge?{href:we.link,target:"_blank"}:{},style:It,onMouseEnter:Qe=>{q&&(Ge||I==="always")&&Ps(Qe,c),j&&jt(we,Qe)},onMouseLeave:Qe=>{q&&(Ge||I==="always")&&As(Qe,c)},children:[Ue>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Oe(Ue)}}),r.jsxs("div",{className:`${c}-list-cols-row${h?"":` ${c}-list-cols-row-h`}${u&&Ve===0&&h?` ${c}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:Oe(ct)},children:[ie.map((Qe,qt)=>{const Xe=qt===ie.length-1,Ye=We[qt],nt=Qe.paddingBottom,Tt=Ug(we.cells[Qe.key]),Lt=h&&Tt&&nt>0,ht=h?{minHeight:Oe(ct)}:{width:Oe(He[qt])},At=h?{paddingLeft:Oe(ue),paddingRight:Oe(ue)}:{paddingLeft:Oe(Ye.paddingLeft),paddingRight:Oe(Ye.paddingRight)},Ot=Qe.textPrefix.charAt(0),Nt=h?eh(e[`${Qe.textPrefix}VerticalAlign`]):Qg(e[`${Qe.textPrefix}VerticalAlign`],e,Ot),Dt=h&&Tt&&u&&Ve===0;return h&&!Tt?null:r.jsxs("div",{className:h?`${c}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":Ot,"data-valign":Nt.kind,...Nt.kind==="baseline"?{"data-valign-anchor":Nt.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${Xe?` ${c}-list-col-last`:""}`,style:{...At,...ht,...h?{justifyContent:_s(Nt.kind)}:{}},"data-test":Qe.width,children:r.jsx("span",{className:Ns(e,Qe.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...Hs(sr(e,Qe.textPrefix),n),...Os(e,Qe.textPrefix,c,n),...h?{}:nh(Nt.kind)},children:we.cells[Qe.key]??null})}),Lt&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Oe(nt)}}),Dt&&r.jsx("div",{"data-controls":Qe.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Oe(Math.max(nt,qr))}})]},Qe.key)}),u&&Ve===0&&h&&r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(xe),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:0,width:Oe(_e),height:"100%"}}),r.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(xe),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:Oe(Math.max(_e,Ie-_e)),width:Oe(_e),height:"100%"}})]})]}),!h&&ot>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Oe(ot)}}),u&&Ve===0&&!h&&r.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Oe(gt)}})]},we.id)}),u&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ut,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":h?"center":"left-y",className:`${c}-control-anchor`,style:{top:Et,left:0,width:"100%",height:Oe(Math.max(Ue,qr))}})},"row-padding-handles"),u&&!h&&bt&&Wt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx("div",{"data-controls":bt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(He[0]-((st==null?void 0:st.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":be??void 0,className:`${c}-control-anchor`,style:{top:0,left:0,width:Oe(ze),height:"100%"}}),r.jsx("div",{"data-controls":Wt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(He[ie.length-1]-((qe==null?void 0:qe.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":be??void 0,className:`${c}-control-anchor`,style:{top:0,left:Oe(xt-yt),width:Oe(yt),height:"100%"}})]},"column-edge-padding-handles"),u&&!h&&ie.slice(0,-1).map((we,Ve)=>{const Ge=ie[Ve+1],rt=P.slice(0,Ve+1).reduce((Xe,Ye)=>Xe+Ye,0),It=We[Ve],dt=We[Ve+1],Qe=Math.max(It.paddingRight,$i),qt=Math.max(dt.paddingLeft,$i);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx("div",{"data-controls":we.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(He[Ve]-It.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":be??void 0,className:`${c}-control-anchor`,style:{top:0,left:Oe(rt-Qe),width:Oe(Qe),height:"100%"}}),r.jsx("div",{"data-controls":Ge.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(He[Ve+1]-dt.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":be??void 0,className:`${c}-control-anchor`,style:{top:0,left:Oe(rt),width:Oe(qt),height:"100%"}})]},`${we.paddingRightKey}-padding`)}),u&&!h&&ie.slice(0,-1).map((we,Ve)=>{const Ge=Ch(Ve,P,oe,Ie),It=P.slice(0,Ve+1).reduce((dt,Qe)=>dt+Qe,0)-js/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-min":String(Ka),"data-controls-max-fraction":String(Ge),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Oe(It),width:Oe(js),height:"calc(100%)",pointerEvents:"auto"}})},`${we.widthKey}-junction`)})]}),Z&&(()=>{const we=sr(e,Pn),Ve=ih(e.cutLabelVerticalAlign),Ge=we.textTextAlign==="justify"||h;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Oe(R??0),cursor:lt?"pointer":"default",...Xg(ve,C??0,n??!1)},onClick:lt?De:void 0,onMouseEnter:q||j?Ct:void 0,onMouseLeave:q?Mt:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...h?{paddingLeft:Oe(ue),paddingRight:Oe(ue)}:{},justifyContent:oh(we.textTextAlign),alignItems:_s(Ve)},children:r.jsx("span",{className:Ns(e,Pn,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...Hs(we,n),...Os(e,Pn,c,n),...Ge?{width:"100%"}:{}},children:J})})})})(),j&&X&&(()=>{const we=`${X.widthPx}px`,Ve={width:we,height:"auto",maxHeight:we,objectFit:"contain",left:X.x,top:X.y,position:"absolute"};return r.jsx(Kg,{media:X,className:X.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:Ve},`${X.rowId}-${X.url}`)})()]})})]})}const Eh=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
9082
+ `}const Un=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ga=["AColumn","BColumn","CColumn","DColumn","EColumn"],Pn="cutLabel",ho=[...Ga,Pn],Cr=["A","B","C","D","E"];function ac(e){return`${e}ColumnVerticalAlign`}const ga=["Top","Center","Bottom"];function qa(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Cr.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Zg(e){const t=qa(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Jg(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Cr.includes(n)?n:null}function sc(e,t,n){const i=Jg(e);return i?i===t?!1:Zg(n[ac(i)]):!0}function fo(e){const t=qa(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Cr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Qg(e,t,n){if(lc(e,t,n))return fo(e);const i=fo(e);return i.kind==="baseline"?{kind:"top"}:i}function eh(e){const t=fo(e);return t.kind==="baseline"?{kind:"top"}:t}function lc(e,t,n){return sc(e,n,t)?fo(e).kind==="baseline":!1}function th(e){const t={};let n=!1;for(const i of Cr){const o=ac(i),s=e[o];if(e.type==="b"){const l=String(s??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}sc(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function nh(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function ih(e){const t=fo(e).kind;return t==="baseline"?"center":t}function oh(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function _s(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function rh(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 Gr(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const l=rh(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const d=s.getBoundingClientRect(),c=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(d.height-c)/2:e.kind==="bottom"&&(u=d.height-c),d.top-t+u+l}function ah(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 sh(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const lh={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Ct(e,t){return`${e}${t.replace(/^text/,"Text")}`}const ch={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function dh(e){return[Ct(e,"textFontFamily"),Ct(e,"textFontSettings"),{type:"row",items:[Ct(e,"textFontSize"),Ct(e,"textLineHeight"),Ct(e,"textLetterSpacing"),Ct(e,"textWordSpacing")]},Ct(e,"textTextAlign"),Ct(e,"textTextAppearance"),`${e}VerticalAlign`]}function uh(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(ho.map(e=>[ch[e],dh(e)]))}}function sr(e,t){const n=i=>{const o=Ct(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===Pn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Hs(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 cn(Xt(n,t))}function Ns(e,t,n,i){const o=sr(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<s?`${n} ${i}`:n}function Os(e,t,n,i){const o=sr(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=s?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((s-l)/2,i)}}const fn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Hi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Ni=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Oi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],ph={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},mh=["hover","focus","filled","success","error"],js=.004,$i=.004,qr=$i,Ka=50,yo=1440,vo=Ka/yo;function cc(e){const t=typeof e=="number"&&e>0?e:yo;return Ka/t}function gh(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 yo}const dc={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function oo(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function hh(e,t=1){const n=t/e;return Object.fromEntries(fn.map(i=>[i,n]))}function fh(){return Object.fromEntries([...Hi.map(e=>[e,0]),...Ni.map(e=>[e,0])])}function yh(){return Object.fromEntries(Oi.map(e=>[e,0]))}function Oo(e){return Object.fromEntries(fn.map(t=>[t,typeof e[t]=="number"?e[t]:dc[t]]))}function uc(e,t,n){const i=e-vo,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 Jo(e,t,n){const i=Ua(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,l)=>s+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function vh(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=Hi[o],l=Ni[o],d=typeof n[s]=="number"?n[s]:0,c=typeof n[l]=="number"?n[l]:0,u=uc(t[o]??0,d,c);u.paddingLeft!==d&&(i[s]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function Ua(e,t,n){if(e<=0)return[];const i=fn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,m)=>u+m,0)+vo;if(t>=l)return i;const d=[...o];let c=l-t;for(let u=d.length-1;u>=0&&c>0;u-=1){const m=d[u]-vo;if(m<=0)continue;const w=Math.min(c,m);d[u]-=w,c-=w}return[...d,i[e-1]]}function bh(e,t,n){if(e<=1)return{};const i=Ua(e,t,n),o={};for(let s=0;s<e-1;s+=1){const l=fn[s];i[s]!==n[l]&&(o[l]=i[s])}return o}function zs(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Un]}function xh(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function wh(e,t,n,i){const o=Math.min(i,e.length,fn.length),s={};for(let l=0;l<o;l+=1){const d=e[l],c=t.indexOf(d);if(c===-1)continue;const u=fn[c],m=Hi[c],w=Ni[c],S=Oi[c],T=fn[l],v=Hi[l],C=Ni[l],x=Oi[l],M=n[u],L=n[m],R=n[w],Z=n[S];typeof M=="number"&&(s[T]=M),typeof L=="number"&&(s[v]=L),typeof R=="number"&&(s[C]=R),typeof Z=="number"&&(s[x]=Z)}return s}function pc(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 Sh(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=oo(e),s=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...hh(n,o),...fh()};if(s)for(const d of Oi)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,yh());return pc(e,l)?l:e}function $h(e,t,n){const i=th(e);i&&(e={...e,...i});const o=cc(n==null?void 0:n.designWidth),s=e.columns,l=t.columns,d=oo(e),c=oo(t),u=e.type==="b"||e.type===void 0&&t.type==="b",m=typeof s=="number"?s:typeof l=="number"?l:Un.length,w=R=>{if(u)return R;const Z=Oo({...t,...R}),P=oo(R),Q=Jo(m,P,Z),E=vh(m,Q,{...t,...R});return Object.keys(E).length===0?R:{...R,...E}};if(typeof s=="number"&&s!==l)return e;const S=zs(e),T=zs(t);if(!xh(S,T))return w({...e,...wh(S,T,t,m)});if(d<c&&typeof m=="number"&&!u){const R=Oo({...t,...e});return w({...e,...bh(m,d,R)})}if(u){const R=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,Z=Math.max(0,(d-o)/2);return R>Z?{...e,textPaddingLR:Z}:e}const v=Oo({...t,...e}),C=Jo(m,c,Oo(t)),M=Jo(m,d,v).some((R,Z)=>R<(C[Z]??R)),L=fn.some(R=>{const Z=e[R],P=t[R];return typeof Z=="number"&&typeof P=="number"&&Z!==P});return M||L?w(e):e}function Ch(e,t,n,i){const o=t.slice(0,e).reduce((l,d)=>l+d,0),s=n.slice(e+1,t.length-1).reduce((l,d)=>l+d,0);return Math.max(vo,i-o-s-vo)}function Th(e,t){return Math.random()*(t-e)+e}function Lh(e){return Object.fromEntries(fn.map(t=>[t,typeof e[t]=="number"?e[t]:dc[t]]))}function Kr(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Ih(e,t,n,i,o,s){return e.slice(0,t).map((l,d)=>{const c=Hi[d],u=Ni[d],m=Oi[d];return{key:l,textPrefix:lh[l],widthKey:fn[d],width:n[fn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:m,paddingLeft:i[c],paddingRight:o[u],paddingBottom:s[m]}})}function Rh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:l,onUpdateSettings:d}){const{prefix:c}=y.useScopedStyles(),u=!!o,{columns:m,type:w,wrapperWidth:S,entriesCount:T,cellMinHeight:v,dividerWidth:C,showVisibility:x,cut:M,showCut:L,cutCellMinHeight:R,cutLabel:Z,imageSize:P,imageOnHover:Q,entryHoverEffect:E,entryHoverShowOption:I,rowPaddingTop:W,rowPaddingBottom:f,rowPaddingTopB:b,columnsOrder:_,textPaddingLR:O,textColor:K,backgroundColor:G,dividerColor:J,textHoverColor:V,backgroundHoverColor:N,dividerHoverColor:H}=e,[$,U]=a.useState(void 0),[Y,se]=a.useState(null),j=Q==="on"&&(!n||i),ge=(M??0)>0,h=w==="b",ue=a.useRef(null),X=a.useRef(null),[ve,$e]=a.useState(null),[ae,re]=a.useState(yo),D=cc(ae),ne=Math.max(0,((S??0)-D)/2),ce=Math.min(O??0,ne),Ne=Math.max(ce,$i),be=((S??0)+D)/2;a.useLayoutEffect(()=>{if(!n){re(yo);return}const xe=()=>{re(gh(ue.current))};xe();const qe=ue.current;if(!qe)return;const Ue=new ResizeObserver(xe);Ue.observe(qe);let lt=qe;for(;lt&&!lt.style.getPropertyValue("--cntrl-article-width");)lt=lt.parentElement;return lt&&Ue.observe(lt),()=>Ue.disconnect()},[n,l]),a.useEffect(()=>{U(void 0)},[M,L,t,T]),a.useEffect(()=>{n&&!i&&U(void 0)},[n,i]);const We=y.buildColorVars(c,{textColor:K,backgroundColor:G,dividerColor:J,textHoverColor:V,backgroundHoverColor:N,dividerHoverColor:H},ph,mh),_e=s&&s!=="default"?`${c}-state-${s}`:"",we=`${!n||i?E==="default"?`${c}-entry-hover-default`:E==="blinds"?`${c}-entry-hover-blinds`:E==="reveal"?`${c}-entry-hover-reveal`:"":""} ${_e}`.trim(),q=E==="reveal"&&(!n||i),pe=(x==null?void 0:x[0])??!1,fe=(x==null?void 0:x[1])??!1,le=a.useRef(e),Pe=a.useRef(l);a.useEffect(()=>{if(!d||!n){le.current=e,Pe.current=l;return}if(Pe.current!==l){le.current=e,Pe.current=l;return}const xe=le.current;if(!(xe!==e))return;if(typeof xe.columns=="number"&&typeof e.columns=="number"&&xe.columns!==e.columns){le.current=e;return}const Ue=$h(e,xe,{designWidth:ae});le.current=e,pc(e,Ue)&&d(Ue)},[e,d,n,l,ae]);const Le=a.useMemo(()=>Lh(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),z=a.useMemo(()=>Kr(e,Hi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),de=a.useMemo(()=>Kr(e,Ni),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),ie=a.useMemo(()=>Kr(e,Oi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),F=a.useMemo(()=>Array.isArray(_)&&_.length>0?_:[...Un],[_]),ee=a.useMemo(()=>Ih(F,m,Le,z,de,ie),[F,m,Le,z,de,ie]),Ie=oo(e),oe=a.useMemo(()=>fn.slice(0,m).map(xe=>Le[xe]),[m,Le]),A=a.useMemo(()=>Ua(m,Ie,Le),[m,Ie,Le]),Oe=a.useMemo(()=>Jo(m,Ie,Le),[m,Ie,Le]),Ae=a.useMemo(()=>ee.map((xe,qe)=>uc(Oe[qe]??0,xe.paddingLeft,xe.paddingRight)),[ee,Oe]),rt=a.useMemo(()=>{const xe=T===0?1/0:T;return(t??[]).slice(0,xe).map((Ue,lt)=>({id:lt,cells:Object.fromEntries(Un.map(Rt=>[Rt,Ue[Rt]??""])),image:Ue.image,link:Ue.link}))},[t,T]),et=ge?$??M:rt.length,Ce=a.useMemo(()=>ge?rt.slice(0,et):rt,[rt,ge,et]),He=ge&&et<rt.length,ze=Ce.length>1||He,me=[pe?`${c}-divider-top`:"",fe||ze?`${c}-divider-bottom`:""].filter(Boolean).join(" "),Se=!n||i,je=()=>{if(!Se)return;const xe=$??M;if(!L){U(rt.length);return}U(Math.min(xe+L,rt.length))},Me=xe=>y.scalingValue(xe,n??!1),Ge=h?b??0:W??0,tt=f??0,Ke=v??0,ut=Math.max(tt,qr),ht=Fs(0,Ce.length,pe,fe,He,C??0,n??!1).borderTopWidth,it=h?"rowPaddingTopB":"rowPaddingTop",xt=ee[0],Wt=ee[ee.length-1],dt=Ae[0],Xe=Ae[Ae.length-1],De=xt&&dt?Math.max(dt.paddingLeft,$i):0,vt=Wt&&Xe?Math.max(Xe.paddingRight,$i):0,wt=Ie,kt=xe=>{const qe=ue.current;if(!qe)return{x:0,y:0};const Ue=qe.getBoundingClientRect();return{x:xe.clientX-Ue.left+Ws,y:xe.clientY-Ue.top+Ws}},jt=(xe,qe)=>{if(!j)return;const Ue=xe.image;if(!(Ue!=null&&Ue.url)){se(null);return}const{x:lt,y:Rt}=kt(qe),pt=(P==null?void 0:P.min)??80,nt=(P==null?void 0:P.max)??320,qt=(Y==null?void 0:Y.rowId)===xe.id?Y.widthPx:Th(pt,nt);se({rowId:xe.id,url:Ue.url,objectFit:"contain",isVideo:qg(Ue),widthPx:qt,x:lt,y:Rt})},tn=xe=>{if(!j||!Y)return;const{x:qe,y:Ue}=kt(xe);se(lt=>!lt||lt.x===qe&&lt.y===Ue?lt:{...lt,x:qe,y:Ue})},sn=()=>{se(null)},Tt=xe=>{q&&Ps(xe,c),j&&se(null)},Mt=xe=>{q&&As(xe,c)};a.useLayoutEffect(()=>{if(!u||h){$e(null);return}const xe=X.current,qe=xe==null?void 0:xe.parentElement;if(!xe||!qe){$e(null);return}const Ue=()=>{const Rt=xe.querySelector("[data-list-row]");if(!Rt){$e(null);return}const pt=qe.getBoundingClientRect(),nt=Rt.getBoundingClientRect();$e(nt.top-pt.top+nt.height/2)};Ue();const lt=new ResizeObserver(Ue);return lt.observe(xe),lt.observe(qe),()=>lt.disconnect()},[u,h,Ce,Ge,tt,Ke,t,e,ee,Oe,ae,C,pe,fe,He]);const Yt=a.useMemo(()=>!h&&Ga.some(xe=>{const qe=xe.charAt(0),Ue=e[`${xe}VerticalAlign`];return lc(Ue,e,qe)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);a.useLayoutEffect(()=>{var qt;const xe=ue.current;if(!xe)return;const qe=()=>{xe.querySelectorAll("[data-list-col]").forEach(Ze=>{Ze.style.transform="";const Je=Ze.querySelector(`.${c}-list-col`);Je&&(Je.style.minHeight="",Je.style.height="");const at=Ze.querySelector(`.${c}-list-col-title`);at&&(at.style.transform="")})};if(h||!Yt){qe();return}const Ue=()=>{const Ze=Array.from(xe.querySelectorAll("[data-list-row]")),Je=`${c}-list-col`,at=`${c}-baseline-probe`;Ze.forEach(Lt=>{Lt.querySelectorAll("[data-list-col]").forEach(It=>{It.style.transform="";const ft=It.querySelector(`.${Je}`);ft&&(ft.style.minHeight="",ft.style.height="");const At=It.querySelector(`.${c}-list-col-title`);At&&(At.style.transform="")})}),Ze.forEach(Lt=>{const It=Array.from(Lt.querySelectorAll("[data-list-col]"));ah(Lt,It,Je)}),xe.offsetHeight,Ze.forEach(Lt=>{const It=Array.from(Lt.querySelectorAll("[data-list-col]")),ft=Lt.getBoundingClientRect().top,At=new Map,Ot=It.map(bt=>{const Vt=bt.querySelector(`.${c}-list-col-title`),Kt={el:bt,titleEl:Vt,letter:bt.getAttribute("data-col-letter")??"",kind:bt.getAttribute("data-valign")??"top",anchor:bt.getAttribute("data-valign-anchor")};return At.set(Kt.letter,Kt),Kt}),Nt=new Map,Dt=(bt,Vt)=>{const Kt=Nt.get(bt.letter);if(Kt!==void 0)return Kt;const Ut=bt.anchor?At.get(bt.anchor):void 0;if(bt.kind!=="baseline"||!Ut||Vt.has(bt.letter)){const he=Gr(bt,ft,Je,at);return Nt.set(bt.letter,he),he}Vt.add(bt.letter);const Zt=Dt(Ut,Vt);Vt.delete(bt.letter);const zt=Gr(bt,ft,Je,at),St=Zt-zt;sh(bt.titleEl,St);const g=Gr(bt,ft,Je,at);return Nt.set(bt.letter,g),g};Ot.forEach(bt=>Dt(bt,new Set))})};let lt=null;const Rt=()=>{lt===null&&(lt=requestAnimationFrame(()=>{lt=null,Ue()}))};Ue();const pt=new ResizeObserver(()=>Rt());pt.observe(xe);let nt=!1;return typeof document<"u"&&((qt=document.fonts)!=null&&qt.ready)&&document.fonts.ready.then(()=>{nt||Rt()}),()=>{nt=!0,lt!==null&&(cancelAnimationFrame(lt),lt=null),pt.disconnect(),qe()}},[Yt,h,e,t,ae,Ce,Oe]);const Gt=a.useMemo(()=>Yg(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Gt}}),r.jsx("div",{style:We,children:r.jsxs("div",{ref:ue,className:`${c}-wrapper ${we}${me?` ${me}`:""}${h?` ${c}-type-b`:""}`.trim(),style:{width:y.scalingValue(S??0,n)},onMouseMove:j?tn:void 0,onMouseLeave:j?sn:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ce.map((xe,qe)=>{var pt;const Ue=(((pt=xe.link)==null?void 0:pt.length)??0)>0,lt=Ue&&(!n||i)?"a":"div",Rt=Fs(qe,Ce.length,pe,fe,He,C??0,n??!1);return r.jsxs(lt,{ref:qe===0?nt=>{X.current=nt}:void 0,className:`${c}-list-item${Ue||I==="always"?` ${c}-list-item-has-link`:""}${He&&qe===Ce.length-1?` ${c}-list-item-before-cut`:""}`,...Ue?{href:xe.link,target:"_blank"}:{},style:Rt,onMouseEnter:nt=>{q&&(Ue||I==="always")&&Ps(nt,c),j&&jt(xe,nt)},onMouseLeave:nt=>{q&&(Ue||I==="always")&&As(nt,c)},children:[Ge>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Me(Ge)}}),r.jsxs("div",{className:`${c}-list-cols-row${h?"":` ${c}-list-cols-row-h`}${u&&qe===0&&h?` ${c}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:Me(Ke)},children:[ee.map((nt,qt)=>{const Ze=qt===ee.length-1,Je=Ae[qt],at=nt.paddingBottom,Lt=Ug(xe.cells[nt.key]),It=h&&Lt&&at>0,ft=h?{minHeight:Me(Ke)}:{width:Me(Oe[qt])},At=h?{paddingLeft:Me(ce),paddingRight:Me(ce)}:{paddingLeft:Me(Je.paddingLeft),paddingRight:Me(Je.paddingRight)},Ot=nt.textPrefix.charAt(0),Nt=h?eh(e[`${nt.textPrefix}VerticalAlign`]):Qg(e[`${nt.textPrefix}VerticalAlign`],e,Ot),Dt=h&&Lt&&u&&qe===0;return h&&!Lt?null:r.jsxs("div",{className:h?`${c}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":Ot,"data-valign":Nt.kind,...Nt.kind==="baseline"?{"data-valign-anchor":Nt.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${Ze?` ${c}-list-col-last`:""}`,style:{...At,...ft,...h?{justifyContent:_s(Nt.kind)}:{}},"data-test":nt.width,children:r.jsx("span",{className:Ns(e,nt.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...Hs(sr(e,nt.textPrefix),n),...Os(e,nt.textPrefix,c,n),...h?{}:nh(Nt.kind)},children:xe.cells[nt.key]??null})}),It&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Me(at)}}),Dt&&r.jsx("div",{"data-controls":nt.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Me(Math.max(at,qr))}})]},nt.key)}),u&&qe===0&&h&&r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(be),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:0,width:Me(Ne),height:"100%"}}),r.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(be),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:Me(Math.max(Ne,Ie-Ne)),width:Me(Ne),height:"100%"}})]})]}),!h&&tt>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Me(tt)}}),u&&qe===0&&!h&&r.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Me(ut)}})]},xe.id)}),u&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":it,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":h?"center":"left-y",className:`${c}-control-anchor`,style:{top:ht,left:0,width:"100%",height:Me(Math.max(Ge,qr))}})},"row-padding-handles"),u&&!h&&xt&&Wt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx("div",{"data-controls":xt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Oe[0]-((dt==null?void 0:dt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ve??void 0,className:`${c}-control-anchor`,style:{top:0,left:0,width:Me(De),height:"100%"}}),r.jsx("div",{"data-controls":Wt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Oe[ee.length-1]-((Xe==null?void 0:Xe.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ve??void 0,className:`${c}-control-anchor`,style:{top:0,left:Me(wt-vt),width:Me(vt),height:"100%"}})]},"column-edge-padding-handles"),u&&!h&&ee.slice(0,-1).map((xe,qe)=>{const Ue=ee[qe+1],lt=A.slice(0,qe+1).reduce((Ze,Je)=>Ze+Je,0),Rt=Ae[qe],pt=Ae[qe+1],nt=Math.max(Rt.paddingRight,$i),qt=Math.max(pt.paddingLeft,$i);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx("div",{"data-controls":xe.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Oe[qe]-Rt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ve??void 0,className:`${c}-control-anchor`,style:{top:0,left:Me(lt-nt),width:Me(nt),height:"100%"}}),r.jsx("div",{"data-controls":Ue.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Oe[qe+1]-pt.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ve??void 0,className:`${c}-control-anchor`,style:{top:0,left:Me(lt),width:Me(qt),height:"100%"}})]},`${xe.paddingRightKey}-padding`)}),u&&!h&&ee.slice(0,-1).map((xe,qe)=>{const Ue=Ch(qe,A,oe,Ie),Rt=A.slice(0,qe+1).reduce((pt,nt)=>pt+nt,0)-js/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":xe.widthKey,"data-controls-axis":"x","data-controls-min":String(Ka),"data-controls-max-fraction":String(Ue),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Me(Rt),width:Me(js),height:"calc(100%)",pointerEvents:"auto"}})},`${xe.widthKey}-junction`)})]}),He&&(()=>{const xe=sr(e,Pn),qe=ih(e.cutLabelVerticalAlign),Ue=xe.textTextAlign==="justify"||h;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Me(R??0),cursor:Se?"pointer":"default",...Xg(fe,C??0,n??!1)},onClick:Se?je:void 0,onMouseEnter:q||j?Tt:void 0,onMouseLeave:q?Mt:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...h?{paddingLeft:Me(ce),paddingRight:Me(ce)}:{},justifyContent:oh(xe.textTextAlign),alignItems:_s(qe)},children:r.jsx("span",{className:Ns(e,Pn,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...Hs(xe,n),...Os(e,Pn,c,n),...Ue?{width:"100%"}:{}},children:Z})})})})(),j&&Y&&(()=>{const xe=`${Y.widthPx}px`,qe={width:xe,height:"auto",maxHeight:xe,objectFit:"contain",left:Y.x,top:Y.y,position:"absolute"};return r.jsx(Kg,{media:Y,className:Y.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:qe},`${Y.rowId}-${Y.url}`)})()]})})]})}const Eh=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
9083
9083
  import { CommonComponentProps } from '../props';
9084
9084
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
9085
9085
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -11953,7 +11953,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
11953
11953
  </>
11954
11954
  );
11955
11955
  }
11956
- `,Ki=["A","B","C","D","E"],Bs=[...ga,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],ii={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Mh(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function jo(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function kh(){return Object.fromEntries(Ki.map((e,t)=>{const n=Un[t],i=`${e} column`;return[n,Mh(i)]}))}function Ph(){const e={};for(const t of Ki)e[`${t}ColumnWidth`]=jo(`${t} column width`),e[`${t}ColumnPaddingLeft`]=jo(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=jo(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=jo(`${t} column padding bottom`);return e}function Ds(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Un]};for(const s of Ki)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 Ah(e){const t={};if(e===Pn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...ga]},enum:[...ga]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Bs],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Bs]}}return t[$t(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[$t(e,"textFontSettings")]={...ii.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[$t(e,"textFontSize")]={...ii.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[$t(e,"textLineHeight")]={...ii.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[$t(e,"textLetterSpacing")]={...ii.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[$t(e,"textWordSpacing")]={...ii.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[$t(e,"textTextAlign")]={...ii.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[$t(e,"textTextAppearance")]={...ii.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Fh=ho.reduce((e,t)=>({...e,...Ah(t)}),{});function Wh(e){return{verticalAlign:e===Pn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Pn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function _h(e,t={}){var n;return{...Wh(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Vs=new Set(["textFontFamily","textFontSettings"]);function Hh(e,t,n){const i=s=>n===void 0?!0:n==="common"?Vs.has(s):!Vs.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=qa(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[$t(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[$t(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[$t(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[$t(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[$t(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[$t(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[$t(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[$t(e,"textTextAppearance")]=t.textTextAppearance),o}function Qo(e={},t){return ho.reduce((n,i)=>({...n,...Hh(i,_h(i,e),t)}),{})}const Nh=Qo(),Oh=uh();function mc(e){return[$t(e,"textFontFamily"),$t(e,"textFontSettings"),$t(e,"textFontSize"),$t(e,"textLineHeight"),$t(e,"textLetterSpacing"),$t(e,"textWordSpacing"),$t(e,"textTextAlign"),$t(e,"textTextAppearance"),`${e}VerticalAlign`]}function jh(){const e=[];return Ga.forEach((t,n)=>{const i=Un[n],o=mc(t);for(let s=1;s<Un.length;s+=1){const l=[{name:"columns",value:s},...Array.from({length:s},(d,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:l,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const zh=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];mc(Pn);const Bh=[...Ki.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],oi=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg"}],Dh=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:oi[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:oi[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:oi[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:oi[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:oi[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:oi[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:oi[6],link:""}],Vh=[...Ki.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Gh={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...kh(),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:Dh},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"}},...Ph(),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"}},...Fh,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",...Nh,...Qo({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Ds({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...Qo({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Ds({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...Qo({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...jh(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Bh.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}},...Ki.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",...Vh]},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__",Oh]}],paletteBookmark:{items:[...zh],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},qh={element:Rh,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Sh(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...ho.map(e=>({path:`${$t(e,"textFontFamily")}`}))]},fontRelations:{...ho.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${$t(t,"textFontFamily")}`}),{})},schema:Gh,sourceCode:Eh},Gs=300,Hn=.004,Kh={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"},Uh=["hover","focus","filled","success","error"];function Xh(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function qs(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Ks(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:y.scalingValue((o-t)/2,i)}}function Yh(e){return`
11956
+ `,Ki=["A","B","C","D","E"],Bs=[...ga,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],ii={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Mh(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function jo(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function kh(){return Object.fromEntries(Ki.map((e,t)=>{const n=Un[t],i=`${e} column`;return[n,Mh(i)]}))}function Ph(){const e={};for(const t of Ki)e[`${t}ColumnWidth`]=jo(`${t} column width`),e[`${t}ColumnPaddingLeft`]=jo(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=jo(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=jo(`${t} column padding bottom`);return e}function Ds(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Un]};for(const s of Ki)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 Ah(e){const t={};if(e===Pn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...ga]},enum:[...ga]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Bs],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Bs]}}return t[Ct(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Ct(e,"textFontSettings")]={...ii.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Ct(e,"textFontSize")]={...ii.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ct(e,"textLineHeight")]={...ii.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ct(e,"textLetterSpacing")]={...ii.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ct(e,"textWordSpacing")]={...ii.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ct(e,"textTextAlign")]={...ii.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ct(e,"textTextAppearance")]={...ii.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Fh=ho.reduce((e,t)=>({...e,...Ah(t)}),{});function Wh(e){return{verticalAlign:e===Pn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Pn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function _h(e,t={}){var n;return{...Wh(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Vs=new Set(["textFontFamily","textFontSettings"]);function Hh(e,t,n){const i=s=>n===void 0?!0:n==="common"?Vs.has(s):!Vs.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=qa(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Ct(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Ct(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Ct(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Ct(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Ct(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Ct(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Ct(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Ct(e,"textTextAppearance")]=t.textTextAppearance),o}function Qo(e={},t){return ho.reduce((n,i)=>({...n,...Hh(i,_h(i,e),t)}),{})}const Nh=Qo(),Oh=uh();function mc(e){return[Ct(e,"textFontFamily"),Ct(e,"textFontSettings"),Ct(e,"textFontSize"),Ct(e,"textLineHeight"),Ct(e,"textLetterSpacing"),Ct(e,"textWordSpacing"),Ct(e,"textTextAlign"),Ct(e,"textTextAppearance"),`${e}VerticalAlign`]}function jh(){const e=[];return Ga.forEach((t,n)=>{const i=Un[n],o=mc(t);for(let s=1;s<Un.length;s+=1){const l=[{name:"columns",value:s},...Array.from({length:s},(d,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:l,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const zh=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];mc(Pn);const Bh=[...Ki.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],oi=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg"}],Dh=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:oi[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:oi[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:oi[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:oi[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:oi[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:oi[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:oi[6],link:""}],Vh=[...Ki.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Gh={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...kh(),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:Dh},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"}},...Ph(),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"}},...Fh,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",...Nh,...Qo({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Ds({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...Qo({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Ds({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...Qo({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...jh(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Bh.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}},...Ki.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",...Vh]},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__",Oh]}],paletteBookmark:{items:[...zh],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},qh={element:Rh,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Sh(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...ho.map(e=>({path:`${Ct(e,"textFontFamily")}`}))]},fontRelations:{...ho.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Ct(t,"textFontFamily")}`}),{})},schema:Gh,sourceCode:Eh},Gs=300,Hn=.004,Kh={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"},Uh=["hover","focus","filled","success","error"];function Xh(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function qs(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Ks(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:y.scalingValue((o-t)/2,i)}}function Yh(e){return`
11957
11957
  .${e}-wrapper {
11958
11958
  box-sizing: border-box;
11959
11959
  display: flex;
@@ -12116,7 +12116,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12116
12116
  pointer-events: none;
12117
12117
  z-index: 2;
12118
12118
  }
12119
- `}function Us(e,t,n,i,o,s,l,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:s??0,textAppearance:l,color:d??"#000000"}}function Zh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:l}=y.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:m=694e-6,dividerStyle:w="solid",entryHoverEffect:S="default",autoclose:T="off",icon:v,iconMaxWidth:C=.00833,iconPaddingRight:x=0,iconAnimation:M="rotate 45",questionColor:L="#000000",answerColor:R="#000000",dividerColor:J="#0000001F",iconColor:A="#000000",questionHoverColor:ee="#666666",iconHoverColor:E="#666666",iconActiveColor:I="#000000",dividerHoverColor:F="#000000",questionFontFamily:f,questionFontSettings:b,questionFontSize:W,questionLineHeight:O,questionLetterSpacing:K,questionWordSpacing:G,questionTextAppearance:Q,answerFontFamily:V,answerFontSettings:N,answerFontSize:_,answerLineHeight:$,answerLetterSpacing:U,answerWordSpacing:X,answerTextAppearance:ce,questionPaddingLeft:j=0,questionPaddingTop:ge=0,questionPaddingBottom:h=0,answerPaddingLeft:he=0,answerPaddingRight:Y=0,answerPaddingTop:be=0,answerPaddingBottom:Ce=0}=e,le=t??[],[re,D]=a.useState(()=>new Set),se=!n||i;a.useEffect(()=>{D(new Set)},[T]),a.useEffect(()=>{n&&!o&&!i&&D(new Set)},[n,o,i]);const ue=Oe=>y.scalingValue(Oe,n??!1),_e=Math.max(j,Hn),xe=Math.max(ge,Hn),Pe=Math.max(h,Hn),Fe=Math.max(he,Hn),Te=Math.max(Y,Hn),Se=Math.max(be,Hn),q=Math.max(Ce,Hn),me=Math.max(0,(c??1)-x-C),ve=Math.max(0,(c??1)-Y),pe=Math.max(0,(c??1)-he),Ae=Math.max(x,Hn),$e=Math.max(0,(c??1)-j-C),z=a.useMemo(()=>re.size===0?0:Math.min(...re),[re]),de=a.useCallback(Oe=>re.has(Oe),[re]),ae=se&&S==="default"?`${l}-entry-hover-default`:"",H=v??"",ie=H!=="",Ie=M.replace(/^rotate /,""),oe=`${l}-icon-anim-${Ie}`,P=cn(Xt(Us(f,b,W,O,K,G,Q,L),n)),He=cn(Xt(Us(V,N,_,$,U,X,ce,R),n)),We=qs(W,O,`${l}-question`,`${l}-text-tight-leading`),et=qs(_,$,`${l}-answer-text`,`${l}-text-tight-leading`),Je=Ks(W,O,l,n),Le=Ks(_,$,l,n),Z=y.buildColorVars(l,{questionColor:L,answerColor:R,dividerColor:J,iconColor:A,questionHoverColor:ee,iconHoverColor:E,iconActiveColor:I,dividerHoverColor:F},Kh,Uh),ne=s&&s!=="default"?`${l}-state-${s}`:"",Ne=a.useCallback(Oe=>{se&&D(Ue=>{if(Ue.has(Oe)){const ct=new Set(Ue);return ct.delete(Oe),ct}if(T==="on")return new Set([Oe]);const ot=new Set(Ue);return ot.add(Oe),ot})},[se,T]),lt=a.useMemo(()=>Yh(l),[l]),De={[`--${l}-divider-width`]:y.scalingValue(m,n??!1),[`--${l}-divider-style`]:w,[`--${l}-icon-max-width`]:y.scalingValue(C,n??!1),...u>0?{[`--${l}-question-min-height`]:y.scalingValue(u,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:lt}}),r.jsx("div",{style:Z,children:r.jsx("div",{className:at(`${l}-wrapper`,n&&!i&&`${l}-editor`,ae,ne),style:{width:y.scalingValue(c,n??!1),maxWidth:"100%",...De},children:le.map((Oe,Ue)=>{var bt;const ot=de(Ue),ct=((bt=Oe.question)==null?void 0:bt.trim())??"",gt=Oe.answer,Et=((gt==null?void 0:gt.length)??0)>0,ut=d&&Ue===z;return r.jsxs("div",{className:at(`${l}-item`,ot&&`${l}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${l}-question-controls`,children:[ut&&r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":"questionPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:ue(xe)}}),r.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(me),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:ue(_e),height:"100%"}}),r.jsx("div",{"data-controls":"iconPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String($e),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:ue(Ae),height:"100%"}})]}),r.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":ot,style:{...P,...Je,paddingLeft:ue(j),paddingRight:ue(x)},onClick:()=>Ne(Ue),children:[ge>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:ue(ge)},"aria-hidden":"true"}),r.jsxs("span",{className:`${l}-question-row`,children:[r.jsx("span",{className:We,children:ct}),Et&&(ie?r.jsx("span",{className:`${l}-icon ${l}-icon-custom ${oe}`,"aria-hidden":"true",children:r.jsx(nn,{url:H,fill:A,hoverFill:E,className:`${l}-icon-image`})}):r.jsx("span",{className:`${l}-icon ${l}-icon-default ${oe}`,"aria-hidden":"true"}))]}),h>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:ue(h)},"aria-hidden":"true"})]}),ut&&r.jsx("div",{"data-controls":"questionPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:ue(Pe)}})]}),Et&&gt&&r.jsx("div",{className:`${l}-panel`,"aria-hidden":!ot,children:r.jsx("div",{className:`${l}-panel-inner`,children:r.jsxs("div",{className:`${l}-answer-controls`,children:[ut&&ot&&r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":"answerPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:ue(Se)}}),r.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ve),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:ue(Fe),height:"100%"}}),r.jsx("div",{"data-controls":"answerPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(pe),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:ue(Te),height:"100%"}})]}),be>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:ue(be)}}),r.jsx("div",{className:`${l}-answer`,style:{...He,...Le,paddingLeft:ue(he),paddingRight:ue(Y)},children:r.jsx("div",{className:et,children:r.jsx(pi,{content:gt})})}),Ce>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:ue(Ce)}}),ut&&ot&&r.jsx("div",{"data-controls":"answerPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:ue(q)}})]})})})]},Ue)})})})]})}const Jh=`import { useCallback, useEffect, useMemo, useState } from 'react';
12119
+ `}function Us(e,t,n,i,o,s,l,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:s??0,textAppearance:l,color:d??"#000000"}}function Zh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:l}=y.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:m=694e-6,dividerStyle:w="solid",entryHoverEffect:S="default",autoclose:T="off",icon:v,iconMaxWidth:C=.00833,iconPaddingRight:x=0,iconAnimation:M="rotate 45",questionColor:L="#000000",answerColor:R="#000000",dividerColor:Z="#0000001F",iconColor:P="#000000",questionHoverColor:Q="#666666",iconHoverColor:E="#666666",iconActiveColor:I="#000000",dividerHoverColor:W="#000000",questionFontFamily:f,questionFontSettings:b,questionFontSize:_,questionLineHeight:O,questionLetterSpacing:K,questionWordSpacing:G,questionTextAppearance:J,answerFontFamily:V,answerFontSettings:N,answerFontSize:H,answerLineHeight:$,answerLetterSpacing:U,answerWordSpacing:Y,answerTextAppearance:se,questionPaddingLeft:j=0,questionPaddingTop:ge=0,questionPaddingBottom:h=0,answerPaddingLeft:ue=0,answerPaddingRight:X=0,answerPaddingTop:ve=0,answerPaddingBottom:$e=0}=e,ae=t??[],[re,D]=a.useState(()=>new Set),ne=!n||i;a.useEffect(()=>{D(new Set)},[T]),a.useEffect(()=>{n&&!o&&!i&&D(new Set)},[n,o,i]);const ce=Me=>y.scalingValue(Me,n??!1),Ne=Math.max(j,Hn),be=Math.max(ge,Hn),We=Math.max(h,Hn),_e=Math.max(ue,Hn),Te=Math.max(X,Hn),we=Math.max(ve,Hn),q=Math.max($e,Hn),pe=Math.max(0,(c??1)-x-C),fe=Math.max(0,(c??1)-X),le=Math.max(0,(c??1)-ue),Pe=Math.max(x,Hn),Le=Math.max(0,(c??1)-j-C),z=a.useMemo(()=>re.size===0?0:Math.min(...re),[re]),de=a.useCallback(Me=>re.has(Me),[re]),ie=ne&&S==="default"?`${l}-entry-hover-default`:"",F=v??"",ee=F!=="",Ie=M.replace(/^rotate /,""),oe=`${l}-icon-anim-${Ie}`,A=cn(Xt(Us(f,b,_,O,K,G,J,L),n)),Oe=cn(Xt(Us(V,N,H,$,U,Y,se,R),n)),Ae=qs(_,O,`${l}-question`,`${l}-text-tight-leading`),rt=qs(H,$,`${l}-answer-text`,`${l}-text-tight-leading`),et=Ks(_,O,l,n),Ce=Ks(H,$,l,n),He=y.buildColorVars(l,{questionColor:L,answerColor:R,dividerColor:Z,iconColor:P,questionHoverColor:Q,iconHoverColor:E,iconActiveColor:I,dividerHoverColor:W},Kh,Uh),ze=s&&s!=="default"?`${l}-state-${s}`:"",me=a.useCallback(Me=>{ne&&D(Ge=>{if(Ge.has(Me)){const Ke=new Set(Ge);return Ke.delete(Me),Ke}if(T==="on")return new Set([Me]);const tt=new Set(Ge);return tt.add(Me),tt})},[ne,T]),Se=a.useMemo(()=>Yh(l),[l]),je={[`--${l}-divider-width`]:y.scalingValue(m,n??!1),[`--${l}-divider-style`]:w,[`--${l}-icon-max-width`]:y.scalingValue(C,n??!1),...u>0?{[`--${l}-question-min-height`]:y.scalingValue(u,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Se}}),r.jsx("div",{style:He,children:r.jsx("div",{className:ct(`${l}-wrapper`,n&&!i&&`${l}-editor`,ie,ze),style:{width:y.scalingValue(c,n??!1),maxWidth:"100%",...je},children:ae.map((Me,Ge)=>{var xt;const tt=de(Ge),Ke=((xt=Me.question)==null?void 0:xt.trim())??"",ut=Me.answer,ht=((ut==null?void 0:ut.length)??0)>0,it=d&&Ge===z;return r.jsxs("div",{className:ct(`${l}-item`,tt&&`${l}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${l}-question-controls`,children:[it&&r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":"questionPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:ce(be)}}),r.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(pe),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:ce(Ne),height:"100%"}}),r.jsx("div",{"data-controls":"iconPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Le),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:ce(Pe),height:"100%"}})]}),r.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":tt,style:{...A,...et,paddingLeft:ce(j),paddingRight:ce(x)},onClick:()=>me(Ge),children:[ge>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:ce(ge)},"aria-hidden":"true"}),r.jsxs("span",{className:`${l}-question-row`,children:[r.jsx("span",{className:Ae,children:Ke}),ht&&(ee?r.jsx("span",{className:`${l}-icon ${l}-icon-custom ${oe}`,"aria-hidden":"true",children:r.jsx(nn,{url:F,fill:P,hoverFill:E,className:`${l}-icon-image`})}):r.jsx("span",{className:`${l}-icon ${l}-icon-default ${oe}`,"aria-hidden":"true"}))]}),h>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:ce(h)},"aria-hidden":"true"})]}),it&&r.jsx("div",{"data-controls":"questionPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:ce(We)}})]}),ht&&ut&&r.jsx("div",{className:`${l}-panel`,"aria-hidden":!tt,children:r.jsx("div",{className:`${l}-panel-inner`,children:r.jsxs("div",{className:`${l}-answer-controls`,children:[it&&tt&&r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":"answerPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:ce(we)}}),r.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(fe),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:ce(_e),height:"100%"}}),r.jsx("div",{"data-controls":"answerPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(le),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:ce(Te),height:"100%"}})]}),ve>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:ce(ve)}}),r.jsx("div",{className:`${l}-answer`,style:{...Oe,...Ce,paddingLeft:ce(ue),paddingRight:ce(X)},children:r.jsx("div",{className:rt,children:r.jsx(pi,{content:ut})})}),$e>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:ce($e)}}),it&&tt&&r.jsx("div",{"data-controls":"answerPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:ce(q)}})]})})})]},Ge)})})})]})}const Jh=`import { useCallback, useEffect, useMemo, useState } from 'react';
12120
12120
  import cn from 'classnames';
12121
12121
  import { CommonComponentProps } from '../props';
12122
12122
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -12862,7 +12862,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
12862
12862
  </>
12863
12863
  );
12864
12864
  }
12865
- `;function Nn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Xs={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Qh=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],ef={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:Nn("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...Xs.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...Xs.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:Nn("Question Padding Left"),questionPaddingTop:Nn("Question Padding Top"),questionPaddingBottom:Nn("Question Padding Bottom"),answerPaddingLeft:Nn("Answer Padding Left"),answerPaddingRight:Nn("Answer Padding Right"),answerPaddingTop:Nn("Answer Padding Top"),answerPaddingBottom:Nn("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...Qh],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},tf={element:Zh,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"questionFontFamily"},{path:"answerFontFamily"}]},fontRelations:{questionFontSettings:"questionFontFamily",answerFontSettings:"answerFontFamily"},schema:ef,sourceCode:Jh},An=e=>e.display==="cover",Tr=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Ys=100,nf=.2,Zs=8,gc=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=a.useState(0),[l,d]=a.useState(!1),c=a.useRef(null),u=a.useRef(0);u.current=o;const m=a.useMemo(()=>typeof window>"u"?Ys:Math.max(Ys,window.innerHeight*nf),[]),w=a.useCallback(f=>Math.max(0,1-f/(m*1.5)),[m]),S=a.useCallback(f=>Math.max(0,1-f/(m*.45)),[m]),T=a.useCallback(f=>{const b=typeof window<"u"?window.innerHeight:800,W=Math.max(.88,1-f/b*.12);return`translateY(${f}px) scale(${W})`},[]),v=a.useCallback(()=>{c.current=null},[]),C=a.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),v()},[n,v]),x=a.useCallback(()=>{const f=typeof window<"u"?window.innerHeight:800;d(!0),s(f),window.setTimeout(()=>{t(),v(),d(!1)},Math.min(n,200))},[n,t,v]),M=a.useCallback(f=>{!e||l||f.pointerType==="touch"&&(i!=null&&i(f.target)||(c.current={startX:f.clientX,startY:f.clientY,isLocked:null,pointerId:f.pointerId}))},[e,l,i]),L=a.useCallback(f=>{const b=c.current;if(!e||!b||f.pointerType!=="touch"||b.pointerId!==f.pointerId)return;const W=f.clientX-b.startX,O=f.clientY-b.startY;if(b.isLocked===null){if(Math.abs(W)<Zs&&Math.abs(O)<Zs)return;if(O>0&&O>Math.abs(W))b.isLocked=!0,f.currentTarget.setPointerCapture(f.pointerId);else{b.isLocked=!1,v();return}}if(!b.isLocked)return;f.preventDefault();const K=Math.max(0,O);u.current=K,s(K)},[e,v]),R=a.useCallback(f=>{const b=c.current;if(!e||!b||f.pointerType!=="touch"||b.pointerId!==f.pointerId)return;const W=b.isLocked===!0;if(f.currentTarget.hasPointerCapture(f.pointerId)&&f.currentTarget.releasePointerCapture(f.pointerId),!W){v();return}f.clientY-b.startY>=m?x():C()},[m,x,e,v,C]),J=a.useCallback(f=>{R(f)},[R]),A=a.useCallback(f=>{R(f)},[R]),ee=o>0,E=l?`transform ${n}ms ease`:"none",I=l?`opacity ${n}ms ease`:"none",F=o>0||l;return{isSwipeDragging:ee,backdropStyle:{opacity:w(o),transition:I},mediaAreaStyle:{transform:T(o),transition:E,touchAction:ee?"none":void 0,willChange:ee?"transform":void 0},overlayContentStyle:F?{opacity:S(o),transition:I}:void 0,swipeHandlers:e?{onPointerDown:M,onPointerMove:L,onPointerUp:J,onPointerCancel:A}:{},dismissAreaStyle:e?{touchAction:ee?"none":"pan-x"}:void 0}},of="[data-lightbox-scrollable]",hc=()=>{a.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const l=d=>{const c=d.target;c instanceof Element&&c.closest(of)||d.preventDefault()};return document.addEventListener("touchmove",l,{passive:!1}),()=>{document.removeEventListener("touchmove",l),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo({top:e,left:0,behavior:"instant"})}},[])},rf=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},af=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},sf=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},lf=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(v,C)=>{af(t),e.scrollLeft=v,C&&(s==null||s())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let m=!1,w=0;const S=()=>{t.removeEventListener("transitionend",T),clearTimeout(w)},T=v=>{v.target!==t||v.propertyName!=="transform"||m||(m=!0,S(),u(n,!0))};return t.addEventListener("transitionend",T),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${c}px, 0, 0)`,w=window.setTimeout(()=>{m||(m=!0,S(),u(n,!0))},i+64),()=>{m||(m=!0,S(),u(l-sf(t),!1))}},oo=300,cf=900,df=1500,uf="cubic-bezier(0.16, 1, 0.3, 1)",pf=3e3,mf=2,gf=16,hf=.05,ff=1,zo=.3,yf=50,vf=20,vi=.004,ji=["title1","title2","title3"],bf={title1:"1",title2:"2",title3:"3"},xf={title1:"title1Color",title2:"title2Color",title3:"title3Color"},wf={title1:.02,title2:.02,title3:.02},Bo=e=>`max(${e}, ${vf}px)`,Sf=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]}},$f=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=Sf(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Ft=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Cf=e=>[Ft(e,"fontFamily"),Ft(e,"fontSettings"),{type:"row",items:[Ft(e,"fontSize"),Ft(e,"lineHeight"),Ft(e,"letterSpacing"),Ft(e,"wordSpacing")]},Ft(e,"textAlign"),Ft(e,"textAppearance")],Tf=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(ji.map(e=>[bf[e],Cf(e)]))}),Xa=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},fc=(e,t)=>Xa(e,t),Do=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Js=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Xa(e.length,n),effective:fc(e.length,n)}},Lf=(e,t,n,i,o,s,l)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),d},Ur=(e,t)=>{const n=i=>{const o=Ft(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[xf[t]]}},If=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Xr=(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??wf[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)},Rf=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:m,imageGap:w,closeIcon:S,closeIconMaxWidth:T,closeIconColor:v,closeIconHoverColor:C,thumbnailTrigger:x,thumbnailVisibility:M,thumbnailObjectFit:L,thumbnailActive:R,thumbnailActiveColor:J,title1Width:A,title2Width:ee,title3Width:E,title1MarginLeft:I=0,title2MarginLeft:F=0,title3MarginLeft:f=0,titleRowMarginBottom:b=0,titleHeaderLayout:W="desktop",contentMarginTop:O,iconMarginLeft:K}=n,G=p=>y.scalingValue(p,i??!1),Q=c??n.thumnailSize??.03,V=G(Q),N=G(u),_=G(m??.02),$=G(w??0),U=G(O??0),X=Bo(U),ce=G(K??0),[j,ge]=a.useState(0),h=a.useRef(j);h.current=j;const he=t[j],{title1:Y,title2:be,title3:Ce}=$f(he),le=Xr("title1",Ur(n,"title1"),i),re=Xr("title2",Ur(n,"title2"),i),D=Xr("title3",Ur(n,"title3"),i),se=W==="mobile",ue=!o&&(!i||s),_e=ue,xe=ue,Pe=ue,Fe=An(L),Te=Fe?{"--image-aspect-ratio":Tr(L)}:void 0,Se=!!(Y||be||Ce),q=a.useMemo(()=>Lf(e,Y,be,Ce,le,re,D),[e,j,Y,be,Ce,le,re,D]),me=a.useMemo(()=>({title1Width:A,title2Width:ee,title3Width:E}),[A,ee,E]),ve=a.useMemo(()=>q.map(p=>me[p.widthKey]),[q,me]),pe=a.useMemo(()=>Xa(q.length,ve),[q.length,ve]),Ae=a.useMemo(()=>fc(q.length,ve),[q.length,ve]),$e=a.useMemo(()=>q.filter(p=>p.prefix==="title1"),[q]),z=a.useMemo(()=>q.filter(p=>p.prefix==="title2"||p.prefix==="title3"),[q]),de=a.useMemo(()=>Js($e,me),[$e,me]),ae=a.useMemo(()=>Js(z,me),[z,me]),H=a.useCallback((p,k)=>{const B=q.indexOf(p);if(!se||k==="single-row")return{effectiveWidth:Ae[B]??0,resolvedWidth:pe[B]??0,maxWidth:Do(B,pe)};if(k==="two-row-top"){const Re=$e.indexOf(p);return{effectiveWidth:de.effective[Re]??0,resolvedWidth:de.resolved[Re]??0,maxWidth:Do(Re,de.resolved)}}const ye=z.indexOf(p);return{effectiveWidth:ae.effective[ye]??0,resolvedWidth:ae.resolved[ye]??0,maxWidth:Do(ye,ae.resolved)}},[z,ae,Ae,pe,q,$e,de,se]),ie=a.useCallback(p=>y.scalingValue(p,i??!1),[i]),Ie=ie(b??0),oe=a.useMemo(()=>({title1MarginLeft:I,title2MarginLeft:F,title3MarginLeft:f}),[I,F,f]),P=a.useCallback(p=>q.slice(0,p+1).reduce((k,B,ye)=>k+(B!=null&&B.marginLeftKey?oe[B.marginLeftKey]??0:0)+(pe[ye]??0),0)+(se?0:I??0),[q,oe,pe,se,I]),He=a.useCallback(()=>se?0:I??0,[se,I]),We=a.useCallback(p=>z.slice(0,p).reduce((k,B,ye)=>k+(B.marginLeftKey?oe[B.marginLeftKey]??0:0)+(ae.resolved[ye]??0),0),[z,ae.resolved,oe]),et=a.useCallback(p=>{const k=z[p];return We(p)+(k.marginLeftKey?oe[k.marginLeftKey]??0:0)+(ae.resolved[p]??0)},[z,ae.resolved,We,oe]),Je=(p,k)=>{const B=p.marginLeftKey?oe[p.marginLeftKey]??0:0,{effectiveWidth:ye,resolvedWidth:Re,maxWidth:Be}=H(p,k),mt=o&&k==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":p.prefix,style:{...k==="single-row"?{gridArea:p.prefix}:{},width:ie(ye),...B>0?{marginLeft:ie(B)}:{}},children:[r.jsx("p",{className:p.className,style:p.style,children:p.text}),mt&&p.marginLeftKey&&r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Re),style:{position:"absolute",top:0,left:ie(-B),width:`max(${ie(B)}, 10px)`,height:"100%",pointerEvents:"auto"}}),mt&&r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Be),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:ie(-vi/2),width:ie(vi),height:"100%",pointerEvents:"auto"}})]},p.className)},Le=()=>{const p=se?-1:q.findIndex(ye=>ye.prefix==="title1"),k=!se&&(o||(I??0)>0)?(()=>{const ye=I??0,Re=p>=0?pe[p]:A??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Re),style:{position:"absolute",top:0,left:0,width:`max(${ie(ye)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,B=q.flatMap((ye,Re)=>{if(!ye.marginLeftKey)return[];const Be=oe[ye.marginLeftKey]??0,mt=If(q,pe,oe,Re)+He();return r.jsx("div",{"data-controls":ye.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(pe[Re]),style:{position:"absolute",top:0,left:ie(mt),width:`max(${ie(Be)}, 10px)`,height:"100%",pointerEvents:"auto"}},ye.marginLeftKey)});return k?[k,...B]:B},Z=()=>q.map((p,k)=>{const B=Do(k,pe),Re=P(k)-vi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(B),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:ie(Re),width:ie(vi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),ne=()=>z.flatMap((p,k)=>{if(!p.marginLeftKey)return[];const B=oe[p.marginLeftKey]??0,ye=We(k),{resolvedWidth:Re}=H(p,"two-row-bottom");return r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Re),style:{position:"absolute",top:0,left:ie(ye),width:`max(${ie(B)}, 10px)`,height:"100%",pointerEvents:"auto"}},p.marginLeftKey)}),Ne=()=>z.map((p,k)=>{const{maxWidth:B}=H(p,"two-row-bottom"),Re=et(k)-vi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(B),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:ie(Re),width:ie(vi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),lt=a.useRef(null),De=a.useRef(null),Oe=a.useRef(null),Ue=a.useRef(null),ot=a.useRef([]),ct=a.useRef([]),gt=a.useRef(0),Et=a.useRef(null),ut=a.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),bt=a.useRef(null),Wt=a.useRef(null),st=a.useRef(0),qe=a.useRef("forward"),ze=a.useRef(0),yt=a.useRef(null),xt=a.useRef(!1),kt=t.length>1&&(!o||!!s),jt=kt?3:1,tn=a.useMemo(()=>Array.from({length:jt},()=>t).flat(),[t,jt]),[sn,Ct]=a.useState(!1),[Mt,Yt]=a.useState(!1),[Gt,we]=a.useState(!0),Ve=a.useRef(null),Ge=a.useRef(null),rt=a.useRef(!1),It=a.useRef(!1),dt=a.useRef(null),Qe=a.useRef(null),qt=_e&&!Gt,Xe=a.useCallback(()=>{_e&&(we(!0),Qe.current&&clearTimeout(Qe.current),Qe.current=setTimeout(()=>{ut.current.isActive||we(!1)},pf))},[_e]),Ye=a.useCallback(()=>{o||It.current||(It.current=!0,Yt(!1),dt.current=setTimeout(()=>{l()},oo))},[o,l]),nt=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":qt?"true":"false",style:{width:y.scalingValue(T??0,i),height:y.scalingValue(T??0,i),marginRight:ce,"--close-icon-hover-color":C},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Ye,"aria-label":"Close",children:r.jsx(nn,{url:S,fill:v,hoverFill:i&&!s?v:C,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:ce,height:"100%",pointerEvents:"auto"}})]}),Tt=(p="two-row")=>r.jsx("div",{...p==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:ie(I??0),flexShrink:0,...p==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...p==="two-row"&&o?{pointerEvents:"auto"}:{}}}),Lt=()=>{const p=q.find(ye=>ye.prefix==="title1"),k=q.filter(ye=>ye.prefix==="title2"||ye.prefix==="title3"),B=k.length>0||o||(b??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(I??0)>0||o?Tt():null,p&&Je(p,"two-row-top"),S&&nt()]}),B?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[k.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[k.map(ye=>Je(ye,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[ne(),Ne()]})]}):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:Ie,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},ht=()=>r.jsxs(r.Fragment,{children:[(I??0)>0||o?Tt("single-row"):null,q.map(p=>Je(p,"single-row")),o?r.jsxs(r.Fragment,{children:[Le(),Z()]}):null,S?nt():null]}),At=a.useCallback(p=>!!(p.closest("[data-controls]")||p.closest(`.${e}-thumbnails`)||p.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ot,backdropStyle:Nt,mediaAreaStyle:Dt,overlayContentStyle:vt,swipeHandlers:Vt,dismissAreaStyle:Kt}=gc({enabled:ue??!1,onClose:Ye,animMs:oo,isBlockedTarget:At}),Ut=()=>{if(!kt||t.length===0)return gt.current=0,0;const p=ct.current[0],k=ct.current[t.length];if(!p||!k)return gt.current;const B=k.offsetLeft-p.offsetLeft;return B>0&&(gt.current=B),gt.current},Zt=(p=!1)=>{if(!kt)return;const k=De.current,B=Ut();!k||B<=0||B<k.clientWidth*.25||(k.scrollLeft<=0?(k.scrollLeft+=B,p&&(ut.current.scrollLeft+=B),xt.current&&(ze.current+=B)):k.scrollLeft>=B*2&&(k.scrollLeft-=B,p&&(ut.current.scrollLeft-=B),xt.current&&(ze.current-=B)))},zt=(p,k=(B=>(B=De.current)==null?void 0:B.scrollLeft)()??0)=>{if(!kt)return p;let ye=t.length+p,Re=1/0;for(let Be=0;Be<jt;Be++){const mt=Be*t.length+p,St=ct.current[mt];if(!St)continue;const en=Math.abs(St.offsetLeft-k);en<Re&&(Re=en,ye=mt)}return ye},wt=p=>{const k=De.current;return!p||!k?!1:p.offsetWidth>k.clientWidth+1},g=p=>{const k=De.current;if(!p||!k||!wt(p))return!1;const B=p.offsetLeft,ye=B+p.offsetWidth;return k.scrollLeft>=B-1&&k.scrollLeft+k.clientWidth<=ye+1},fe=(p=(k=>(k=De.current)==null?void 0:k.scrollLeft)()??0)=>{for(let ye=0;ye<ct.current.length;ye+=1){const Re=ct.current[ye];if(Re&&g(Re))return ye}let B={flatIndex:0,distance:1/0};return ct.current.forEach((ye,Re)=>{if(!ye)return;const Be=Math.abs(ye.offsetLeft-p);Be<B.distance&&(B={flatIndex:Re,distance:Be})}),B.flatIndex},Ee=p=>{De.current&&ct.current.forEach(k=>{k&&(k.style.scrollSnapAlign=wt(k)&&p==="backward"?"end":"start")})},Me=(p,k,B)=>{const ye=p-k,Re=fe(k),Be=ct.current[Re];if(g(Be))return fe(p)%t.length;const mt=ct.current[Re+1],St=Be?mt?mt.offsetLeft-Be.offsetLeft:Be.offsetWidth:0,en=St>0?ye>St*zo?1:ye<-St*zo?-1:0:0;return en===0?B:kt?(B+en+t.length)%t.length:Math.max(0,Math.min(t.length-1,B+en))},it=a.useCallback((p=!1)=>{if(M!=="on"||o)return;const k=Ue.current,B=h.current,ye=ot.current[B];if(!k||!ye||k.scrollWidth<=k.clientWidth)return;const Re=k.scrollLeft,Be=Re+k.clientWidth,mt=ye.offsetLeft,St=mt+ye.offsetWidth;if(mt>=Re&&St<=Be)return;const en=k.scrollWidth-k.clientWidth;let Jt=Re;if(!p&&Ve.current===null){const fi=ot.current[B-1],Ui=ot.current[B+1],ko=fi?ye.offsetLeft-fi.offsetLeft:Ui?Ui.offsetLeft-ye.offsetLeft:ye.offsetWidth;St>Be?Jt+=ko:mt<Re&&(Jt-=ko)}else St>Be?Jt=St-k.clientWidth:Jt=mt;k.scrollLeft=Math.max(0,Math.min(en,Jt))},[o,M]),Pt=a.useCallback((p=!1)=>{p&&(rt.current=!0),Ge.current===null&&(Ge.current=requestAnimationFrame(()=>{Ge.current=null;const k=rt.current;rt.current=!1,it(k)}))},[it]),Ze=a.useCallback(p=>{if(p===h.current)return;const k=h.current;h.current=p;const B=Math.abs(p-k)>1,ye=kt&&t.length>1&&(k===t.length-1&&p===0||k===0&&p===t.length-1);ge(p),Pt(B||ye)},[t.length,kt,Pt]),pt=()=>{if(!De.current||t.length===0||Ve.current!==null||ut.current.isActive&&ut.current.hasMoved)return;const p=De.current.scrollLeft,k=fe(p)%t.length;k!==h.current&&Ze(k)},_t=()=>{Ve.current=null},Rt=p=>{const k=De.current;k&&(k.style.scrollSnapType=p?"":"none")},ln=()=>{var p;(p=Wt.current)==null||p.call(Wt),Wt.current=null},dn=()=>{yt.current!==null&&(cancelAnimationFrame(yt.current),yt.current=null),xt.current=!1},Jn=()=>{const p=De.current;if(!p){yt.current=null,xt.current=!1;return}const k=ze.current-p.scrollLeft;if(Math.abs(k)<.5){p.scrollLeft=ze.current,Zt(),pt(),yt.current=null,xt.current=!1;return}p.scrollLeft+=k*hf,Zt(),pt(),Xe(),yt.current=requestAnimationFrame(Jn)},Qn=()=>{const p=Oe.current;p&&(p.style.transition="",p.style.transform="",p.style.willChange="")},Io=(p,k,B,ye)=>{Qn(),p.scrollLeft=k,st.current=p.scrollLeft,Zt(),B!==void 0?(h.current=B,ge(B)):pt(),Rt(!0),ye==null||ye()},Ro=(p,{behavior:k="smooth",activeIndex:B,onComplete:ye}={})=>{const Re=De.current,Be=Oe.current;if(!Re||!Be)return;if(dn(),ln(),Rt(!1),k==="auto"){Io(Re,p,B,ye);return}const mt=Math.abs(p-Re.scrollLeft),St=rf(mt,cf,df,Re.clientWidth*.55);Wt.current=lf(Re,Be,p,{duration:St,easing:uf,onComplete:()=>{Wt.current=null,Io(Re,p,B,ye)}})},Ir=(p="smooth")=>{const k=De.current;if(!k||t.length===0)return;const B=fe()%t.length,ye=zt(B,k.scrollLeft),Re=ct.current[ye];Re&&Ro(Re.offsetLeft,{behavior:p,activeIndex:B})},Rr=(p,k="smooth",B,ye)=>{const Re=De.current;if(!Re||t.length===0)return;const Be=(ye??Re.scrollLeft)-p,mt=fe(p),St=ct.current[mt];if(g(St)){Rt(!0),pt();return}const en=ct.current[mt+1],Jt=St?en?en.offsetLeft-St.offsetLeft:St.offsetWidth:0;if((Jt>0?Be>Jt*zo?1:Be<-Jt*zo?-1:0:0)!==0){const $c=B??mt%t.length,Cc=Me(ye??Re.scrollLeft,p,$c);wn(Cc,k);return}const Ui=ye??Re.scrollLeft,ko=fe(Ui),Ya=ct.current[ko];if(Ya&&Math.abs(Ya.offsetLeft-Ui)<1){Rt(!0),pt();return}Ir("auto")},wn=(p,k="smooth")=>{const B=De.current;if(!B||t.length===0)return;const ye=zt(p,B.scrollLeft),Re=ct.current[ye];Re&&(k==="smooth"?Ve.current=p:Ve.current=null,h.current=p,ge(p),Pt(!0),Ro(Re.offsetLeft,{behavior:k,activeIndex:p,onComplete:k==="smooth"?_t:void 0}))},hi=()=>{bt.current&&(window.removeEventListener("pointerup",bt.current),window.removeEventListener("pointercancel",bt.current),bt.current=null)},Eo=(p,k,B,ye,Re)=>{const Be=B-p,mt=ye-k,St=Math.abs(Be),en=Math.abs(mt);if(St<yf||St<=en)return!1;const Jt=Be<0?1:-1,fi=kt?(Re+Jt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Re+Jt));return fi===Re?!1:(wn(fi),!0)},ei=p=>{if(!ut.current.isActive)return;hi();const k=De.current;if(!k)return;const{scrollLeft:B,startActiveIndex:ye,hasMoved:Re}=ut.current,Be=k.scrollLeft;Zt(!0),ut.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},Ct(!1),p!==void 0&&k.hasPointerCapture(p)&&k.releasePointerCapture(p),Re?Rr(B,"smooth",ye,Be):(Rt(!0),pt()),Xe()},Mo=(p,k)=>{const B=Et.current;Et.current=null,B&&(Eo(B.startX,B.startY,p,k,B.startActiveIndex),Xe())},Er=p=>{if(!xe)return;if(p.pointerType==="touch"){if(dn(),Rt(!0),At(p.target))return;Et.current={startX:p.clientX,startY:p.clientY,startActiveIndex:h.current};return}if(p.pointerType!=="mouse"||p.button!==0||At(p.target))return;const k=De.current;if(!k)return;dn(),ln(),Qn(),Ve.current=null,ut.current={isActive:!0,startX:p.clientX,scrollLeft:k.scrollLeft,startActiveIndex:h.current,hasMoved:!1},Rt(!1),Xe(),k.setPointerCapture(p.pointerId),hi();const B=ye=>{ye.pointerType==="mouse"&&ei(ye.pointerId)};bt.current=B,window.addEventListener("pointerup",B),window.addEventListener("pointercancel",B)},Mr=p=>{if(!xe||p.pointerType!=="mouse")return;const k=De.current;if(!k||!ut.current.isActive)return;if(p.buttons===0){ei(p.pointerId);return}const B=p.clientX-ut.current.startX;Math.abs(B)>ff&&(ut.current.hasMoved=!0,Ct(!0)),ut.current.hasMoved&&(p.preventDefault(),k.scrollLeft=ut.current.scrollLeft-B,Zt(!0),pt(),Xe())},te=p=>{if(xe){if(p.pointerType==="touch"){p.type==="pointerup"?Mo(p.clientX,p.clientY):Et.current=null;return}p.pointerType==="mouse"&&ei(p.pointerId)}},ke=p=>{!xe||p.pointerType!=="mouse"||ei(p.pointerId)};return hc(),a.useEffect(()=>{const p=requestAnimationFrame(()=>Yt(!0));return()=>{cancelAnimationFrame(p),ln(),hi(),Ge.current!==null&&(cancelAnimationFrame(Ge.current),Ge.current=null),dt.current&&clearTimeout(dt.current),Qe.current&&clearTimeout(Qe.current)}},[]),a.useEffect(()=>{if(!_e){we(!0);return}Xe();const p=lt.current;if(!p)return;const k=()=>Xe();return p.addEventListener("pointermove",k),p.addEventListener("pointerdown",k),()=>{p.removeEventListener("pointermove",k),p.removeEventListener("pointerdown",k),Qe.current&&clearTimeout(Qe.current)}},[_e,Xe]),a.useEffect(()=>{const p=k=>{k.key==="Escape"&&Ye()};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[Ye]),a.useLayoutEffect(()=>{Ut()},[$,t.length,kt]),a.useLayoutEffect(()=>{o||wn(h.current,"auto")},[$,o]),a.useLayoutEffect(()=>{wn(0,"auto")},[t.length,kt]),a.useEffect(()=>{const p=De.current;if(!p||o||!ue)return;const k=B=>{if(B.preventDefault(),Math.abs(B.deltaY)<=Math.abs(B.deltaX))return;const ye=B.deltaMode===1?gf:B.deltaMode===2?p.clientHeight:1,Re=B.deltaY*ye*mf;if(Re!==0){if(ln(),xt.current||(xt.current=!0,ze.current=p.scrollLeft,Ve.current=null,Rt(!1)),ze.current+=Re,!kt){const Be=p.scrollWidth-p.clientWidth;ze.current=Math.max(0,Math.min(Be,ze.current))}Xe(),yt.current===null&&(yt.current=requestAnimationFrame(Jn))}};return p.addEventListener("wheel",k,{passive:!1}),()=>{p.removeEventListener("wheel",k),dn()}},[o,ue,kt]),a.useEffect(()=>{const p=De.current;if(!p)return;const k=()=>{Zt(ut.current.isActive);const ye=p.scrollLeft,Re=ye-st.current;st.current=ye;const Be=gt.current>0?gt.current*.5:1/0;if(Re!==0&&Math.abs(Re)<Be){const mt=Re>0?"forward":"backward";mt!==qe.current&&(qe.current=mt,Ee(mt))}ut.current.isActive&&ut.current.hasMoved||pt()};p.addEventListener("scroll",k,{passive:!0});const B=new ResizeObserver(()=>{Ut(),Zt(ut.current.isActive),Ee(qe.current),pt()});return B.observe(p),()=>{ln(),p.removeEventListener("scroll",k),B.disconnect()}},[t.length,kt]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ot||Ye()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Mt?1:0,transition:`opacity ${oo}ms ease`,pointerEvents:Mt?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Nt}}),r.jsxs("div",{ref:lt,className:`${e}-lightbox-dismiss-area`,style:Kt,...Vt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Dt,onClick:p=>p.stopPropagation(),children:r.jsx("div",{ref:De,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":xe&&t.length>0?"true":"false","data-mouse-dragging":sn?"true":"false",onPointerDown:Er,onPointerMove:Mr,onPointerUp:te,onPointerCancel:te,onLostPointerCapture:ke,children:r.jsx("div",{ref:Oe,className:`${e}-lightbox-strip-track`,style:{gap:$},children:tn.map((p,k)=>{const B=p.image.objectFit??"contain",ye=k%t.length,Re=Math.floor(k/t.length),Be=Bo($),mt=`calc(-0.5 * (${Be} + ${$}))`;return r.jsxs("div",{ref:St=>ct.current[k]=St,className:`${e}-strip-item`,style:{height:W==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[r.jsx("img",{src:p.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:B}}),o&&ye<t.length-1&&Re===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:mt,width:Be,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Re}-${p.image.url}-${ye}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":qt?"true":"false",style:vt,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:U,flexShrink:0,pointerEvents:"none"},children:o&&r.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:X,pointerEvents:"auto",zIndex:3}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${se?` ${e}-lightbox-content-area-stacked`:""}`,children:(Se||S)&&r.jsx("div",{className:`${e}-header ${se?`${e}-header-two-row`:`${e}-header-single-row`}`,children:se?Lt():Se||S?ht():null})})})]}),t.length>1&&M==="on"&&(()=>{const p=Bo(_),k=`calc(-0.5 * (${_} + ${p}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:_},children:r.jsx("div",{ref:Ue,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:B=>B.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":R,style:{gap:N,"--thumbnail-active-color":J},children:[t.map((B,ye)=>{const Re=Bo(N),Be=`calc(-0.5 * (${Re} + ${N}))`;return r.jsxs("div",{ref:mt=>{ot.current[ye]=mt},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":j===ye?"true":"false",onClick:()=>ue&&x==="click"&&wn(ye),onMouseEnter:()=>Pe&&x==="hover"&&wn(ye),"aria-label":B.image.name?`View ${B.image.name}`:`View image ${ye+1}`,"aria-current":j===ye?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${Fe?` ${e}-thumb-image-cover`:""}`,src:B.image.url,alt:"",draggable:!1,style:{...Te,maxWidth:V,maxHeight:V,width:L.display==="cover"?"auto":"100%",height:"auto",objectFit:L.display==="cover"?"cover":"contain"}})}),o&&ye<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Be,width:Re,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${B.image.url}-${ye}`)}),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:k,height:p,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Ef(e){return`
12865
+ `;function Nn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Xs={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Qh=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],ef={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:Nn("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...Xs.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...Xs.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:Nn("Question Padding Left"),questionPaddingTop:Nn("Question Padding Top"),questionPaddingBottom:Nn("Question Padding Bottom"),answerPaddingLeft:Nn("Answer Padding Left"),answerPaddingRight:Nn("Answer Padding Right"),answerPaddingTop:Nn("Answer Padding Top"),answerPaddingBottom:Nn("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...Qh],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},tf={element:Zh,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"questionFontFamily"},{path:"answerFontFamily"}]},fontRelations:{questionFontSettings:"questionFontFamily",answerFontSettings:"answerFontFamily"},schema:ef,sourceCode:Jh},An=e=>e.display==="cover",Tr=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Ys=100,nf=.2,Zs=8,gc=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=a.useState(0),[l,d]=a.useState(!1),c=a.useRef(null),u=a.useRef(0);u.current=o;const m=a.useMemo(()=>typeof window>"u"?Ys:Math.max(Ys,window.innerHeight*nf),[]),w=a.useCallback(f=>Math.max(0,1-f/(m*1.5)),[m]),S=a.useCallback(f=>Math.max(0,1-f/(m*.45)),[m]),T=a.useCallback(f=>{const b=typeof window<"u"?window.innerHeight:800,_=Math.max(.88,1-f/b*.12);return`translateY(${f}px) scale(${_})`},[]),v=a.useCallback(()=>{c.current=null},[]),C=a.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),v()},[n,v]),x=a.useCallback(()=>{const f=typeof window<"u"?window.innerHeight:800;d(!0),s(f),window.setTimeout(()=>{t(),v(),d(!1)},Math.min(n,200))},[n,t,v]),M=a.useCallback(f=>{!e||l||f.pointerType==="touch"&&(i!=null&&i(f.target)||(c.current={startX:f.clientX,startY:f.clientY,isLocked:null,pointerId:f.pointerId}))},[e,l,i]),L=a.useCallback(f=>{const b=c.current;if(!e||!b||f.pointerType!=="touch"||b.pointerId!==f.pointerId)return;const _=f.clientX-b.startX,O=f.clientY-b.startY;if(b.isLocked===null){if(Math.abs(_)<Zs&&Math.abs(O)<Zs)return;if(O>0&&O>Math.abs(_))b.isLocked=!0,f.currentTarget.setPointerCapture(f.pointerId);else{b.isLocked=!1,v();return}}if(!b.isLocked)return;f.preventDefault();const K=Math.max(0,O);u.current=K,s(K)},[e,v]),R=a.useCallback(f=>{const b=c.current;if(!e||!b||f.pointerType!=="touch"||b.pointerId!==f.pointerId)return;const _=b.isLocked===!0;if(f.currentTarget.hasPointerCapture(f.pointerId)&&f.currentTarget.releasePointerCapture(f.pointerId),!_){v();return}f.clientY-b.startY>=m?x():C()},[m,x,e,v,C]),Z=a.useCallback(f=>{R(f)},[R]),P=a.useCallback(f=>{R(f)},[R]),Q=o>0,E=l?`transform ${n}ms ease`:"none",I=l?`opacity ${n}ms ease`:"none",W=o>0||l;return{isSwipeDragging:Q,backdropStyle:{opacity:w(o),transition:I},mediaAreaStyle:{transform:T(o),transition:E,touchAction:Q?"none":void 0,willChange:Q?"transform":void 0},overlayContentStyle:W?{opacity:S(o),transition:I}:void 0,swipeHandlers:e?{onPointerDown:M,onPointerMove:L,onPointerUp:Z,onPointerCancel:P}:{},dismissAreaStyle:e?{touchAction:Q?"none":"pan-x"}:void 0}},of="[data-lightbox-scrollable]",hc=()=>{a.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const l=d=>{const c=d.target;c instanceof Element&&c.closest(of)||d.preventDefault()};return document.addEventListener("touchmove",l,{passive:!1}),()=>{document.removeEventListener("touchmove",l),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo({top:e,left:0,behavior:"instant"})}},[])},rf=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},af=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},sf=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},lf=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(v,C)=>{af(t),e.scrollLeft=v,C&&(s==null||s())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let m=!1,w=0;const S=()=>{t.removeEventListener("transitionend",T),clearTimeout(w)},T=v=>{v.target!==t||v.propertyName!=="transform"||m||(m=!0,S(),u(n,!0))};return t.addEventListener("transitionend",T),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${c}px, 0, 0)`,w=window.setTimeout(()=>{m||(m=!0,S(),u(n,!0))},i+64),()=>{m||(m=!0,S(),u(l-sf(t),!1))}},ro=300,cf=900,df=1500,uf="cubic-bezier(0.16, 1, 0.3, 1)",pf=3e3,mf=2,gf=16,hf=.05,ff=1,zo=.3,yf=50,vf=20,vi=.004,ji=["title1","title2","title3"],bf={title1:"1",title2:"2",title3:"3"},xf={title1:"title1Color",title2:"title2Color",title3:"title3Color"},wf={title1:.02,title2:.02,title3:.02},Bo=e=>`max(${e}, ${vf}px)`,Sf=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]}},$f=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=Sf(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Ft=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Cf=e=>[Ft(e,"fontFamily"),Ft(e,"fontSettings"),{type:"row",items:[Ft(e,"fontSize"),Ft(e,"lineHeight"),Ft(e,"letterSpacing"),Ft(e,"wordSpacing")]},Ft(e,"textAlign"),Ft(e,"textAppearance")],Tf=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(ji.map(e=>[bf[e],Cf(e)]))}),Xa=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},fc=(e,t)=>Xa(e,t),Do=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Js=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Xa(e.length,n),effective:fc(e.length,n)}},Lf=(e,t,n,i,o,s,l)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),d},Ur=(e,t)=>{const n=i=>{const o=Ft(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[xf[t]]}},If=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Xr=(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??wf[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)},Rf=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:m,imageGap:w,closeIcon:S,closeIconMaxWidth:T,closeIconColor:v,closeIconHoverColor:C,thumbnailTrigger:x,thumbnailVisibility:M,thumbnailObjectFit:L,thumbnailActive:R,thumbnailActiveColor:Z,title1Width:P,title2Width:Q,title3Width:E,title1MarginLeft:I=0,title2MarginLeft:W=0,title3MarginLeft:f=0,titleRowMarginBottom:b=0,titleHeaderLayout:_="desktop",contentMarginTop:O,iconMarginLeft:K}=n,G=p=>y.scalingValue(p,i??!1),J=c??n.thumnailSize??.03,V=G(J),N=G(u),H=G(m??.02),$=G(w??0),U=G(O??0),Y=Bo(U),se=G(K??0),[j,ge]=a.useState(0),h=a.useRef(j);h.current=j;const ue=t[j],{title1:X,title2:ve,title3:$e}=$f(ue),ae=Xr("title1",Ur(n,"title1"),i),re=Xr("title2",Ur(n,"title2"),i),D=Xr("title3",Ur(n,"title3"),i),ne=_==="mobile",ce=!o&&(!i||s),Ne=ce,be=ce,We=ce,_e=An(L),Te=_e?{"--image-aspect-ratio":Tr(L)}:void 0,we=!!(X||ve||$e),q=a.useMemo(()=>Lf(e,X,ve,$e,ae,re,D),[e,j,X,ve,$e,ae,re,D]),pe=a.useMemo(()=>({title1Width:P,title2Width:Q,title3Width:E}),[P,Q,E]),fe=a.useMemo(()=>q.map(p=>pe[p.widthKey]),[q,pe]),le=a.useMemo(()=>Xa(q.length,fe),[q.length,fe]),Pe=a.useMemo(()=>fc(q.length,fe),[q.length,fe]),Le=a.useMemo(()=>q.filter(p=>p.prefix==="title1"),[q]),z=a.useMemo(()=>q.filter(p=>p.prefix==="title2"||p.prefix==="title3"),[q]),de=a.useMemo(()=>Js(Le,pe),[Le,pe]),ie=a.useMemo(()=>Js(z,pe),[z,pe]),F=a.useCallback((p,k)=>{const B=q.indexOf(p);if(!ne||k==="single-row")return{effectiveWidth:Pe[B]??0,resolvedWidth:le[B]??0,maxWidth:Do(B,le)};if(k==="two-row-top"){const Re=Le.indexOf(p);return{effectiveWidth:de.effective[Re]??0,resolvedWidth:de.resolved[Re]??0,maxWidth:Do(Re,de.resolved)}}const ye=z.indexOf(p);return{effectiveWidth:ie.effective[ye]??0,resolvedWidth:ie.resolved[ye]??0,maxWidth:Do(ye,ie.resolved)}},[z,ie,Pe,le,q,Le,de,ne]),ee=a.useCallback(p=>y.scalingValue(p,i??!1),[i]),Ie=ee(b??0),oe=a.useMemo(()=>({title1MarginLeft:I,title2MarginLeft:W,title3MarginLeft:f}),[I,W,f]),A=a.useCallback(p=>q.slice(0,p+1).reduce((k,B,ye)=>k+(B!=null&&B.marginLeftKey?oe[B.marginLeftKey]??0:0)+(le[ye]??0),0)+(ne?0:I??0),[q,oe,le,ne,I]),Oe=a.useCallback(()=>ne?0:I??0,[ne,I]),Ae=a.useCallback(p=>z.slice(0,p).reduce((k,B,ye)=>k+(B.marginLeftKey?oe[B.marginLeftKey]??0:0)+(ie.resolved[ye]??0),0),[z,ie.resolved,oe]),rt=a.useCallback(p=>{const k=z[p];return Ae(p)+(k.marginLeftKey?oe[k.marginLeftKey]??0:0)+(ie.resolved[p]??0)},[z,ie.resolved,Ae,oe]),et=(p,k)=>{const B=p.marginLeftKey?oe[p.marginLeftKey]??0:0,{effectiveWidth:ye,resolvedWidth:Re,maxWidth:Ve}=F(p,k),gt=o&&k==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":p.prefix,style:{...k==="single-row"?{gridArea:p.prefix}:{},width:ee(ye),...B>0?{marginLeft:ee(B)}:{}},children:[r.jsx("p",{className:p.className,style:p.style,children:p.text}),gt&&p.marginLeftKey&&r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Re),style:{position:"absolute",top:0,left:ee(-B),width:`max(${ee(B)}, 10px)`,height:"100%",pointerEvents:"auto"}}),gt&&r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ve),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:ee(-vi/2),width:ee(vi),height:"100%",pointerEvents:"auto"}})]},p.className)},Ce=()=>{const p=ne?-1:q.findIndex(ye=>ye.prefix==="title1"),k=!ne&&(o||(I??0)>0)?(()=>{const ye=I??0,Re=p>=0?le[p]:P??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Re),style:{position:"absolute",top:0,left:0,width:`max(${ee(ye)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,B=q.flatMap((ye,Re)=>{if(!ye.marginLeftKey)return[];const Ve=oe[ye.marginLeftKey]??0,gt=If(q,le,oe,Re)+Oe();return r.jsx("div",{"data-controls":ye.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(le[Re]),style:{position:"absolute",top:0,left:ee(gt),width:`max(${ee(Ve)}, 10px)`,height:"100%",pointerEvents:"auto"}},ye.marginLeftKey)});return k?[k,...B]:B},He=()=>q.map((p,k)=>{const B=Do(k,le),Re=A(k)-vi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(B),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:ee(Re),width:ee(vi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),ze=()=>z.flatMap((p,k)=>{if(!p.marginLeftKey)return[];const B=oe[p.marginLeftKey]??0,ye=Ae(k),{resolvedWidth:Re}=F(p,"two-row-bottom");return r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Re),style:{position:"absolute",top:0,left:ee(ye),width:`max(${ee(B)}, 10px)`,height:"100%",pointerEvents:"auto"}},p.marginLeftKey)}),me=()=>z.map((p,k)=>{const{maxWidth:B}=F(p,"two-row-bottom"),Re=rt(k)-vi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(B),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:ee(Re),width:ee(vi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),Se=a.useRef(null),je=a.useRef(null),Me=a.useRef(null),Ge=a.useRef(null),tt=a.useRef([]),Ke=a.useRef([]),ut=a.useRef(0),ht=a.useRef(null),it=a.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),xt=a.useRef(null),Wt=a.useRef(null),dt=a.useRef(0),Xe=a.useRef("forward"),De=a.useRef(0),vt=a.useRef(null),wt=a.useRef(!1),kt=t.length>1&&(!o||!!s),jt=kt?3:1,tn=a.useMemo(()=>Array.from({length:jt},()=>t).flat(),[t,jt]),[sn,Tt]=a.useState(!1),[Mt,Yt]=a.useState(!1),[Gt,xe]=a.useState(!0),qe=a.useRef(null),Ue=a.useRef(null),lt=a.useRef(!1),Rt=a.useRef(!1),pt=a.useRef(null),nt=a.useRef(null),qt=Ne&&!Gt,Ze=a.useCallback(()=>{Ne&&(xe(!0),nt.current&&clearTimeout(nt.current),nt.current=setTimeout(()=>{it.current.isActive||xe(!1)},pf))},[Ne]),Je=a.useCallback(()=>{o||Rt.current||(Rt.current=!0,Yt(!1),pt.current=setTimeout(()=>{l()},ro))},[o,l]),at=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":qt?"true":"false",style:{width:y.scalingValue(T??0,i),height:y.scalingValue(T??0,i),marginRight:se,"--close-icon-hover-color":C},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Je,"aria-label":"Close",children:r.jsx(nn,{url:S,fill:v,hoverFill:i&&!s?v:C,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:se,height:"100%",pointerEvents:"auto"}})]}),Lt=(p="two-row")=>r.jsx("div",{...p==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:ee(I??0),flexShrink:0,...p==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...p==="two-row"&&o?{pointerEvents:"auto"}:{}}}),It=()=>{const p=q.find(ye=>ye.prefix==="title1"),k=q.filter(ye=>ye.prefix==="title2"||ye.prefix==="title3"),B=k.length>0||o||(b??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(I??0)>0||o?Lt():null,p&&et(p,"two-row-top"),S&&at()]}),B?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[k.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[k.map(ye=>et(ye,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[ze(),me()]})]}):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:Ie,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},ft=()=>r.jsxs(r.Fragment,{children:[(I??0)>0||o?Lt("single-row"):null,q.map(p=>et(p,"single-row")),o?r.jsxs(r.Fragment,{children:[Ce(),He()]}):null,S?at():null]}),At=a.useCallback(p=>!!(p.closest("[data-controls]")||p.closest(`.${e}-thumbnails`)||p.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ot,backdropStyle:Nt,mediaAreaStyle:Dt,overlayContentStyle:bt,swipeHandlers:Vt,dismissAreaStyle:Kt}=gc({enabled:ce??!1,onClose:Je,animMs:ro,isBlockedTarget:At}),Ut=()=>{if(!kt||t.length===0)return ut.current=0,0;const p=Ke.current[0],k=Ke.current[t.length];if(!p||!k)return ut.current;const B=k.offsetLeft-p.offsetLeft;return B>0&&(ut.current=B),ut.current},Zt=(p=!1)=>{if(!kt)return;const k=je.current,B=Ut();!k||B<=0||B<k.clientWidth*.25||(k.scrollLeft<=0?(k.scrollLeft+=B,p&&(it.current.scrollLeft+=B),wt.current&&(De.current+=B)):k.scrollLeft>=B*2&&(k.scrollLeft-=B,p&&(it.current.scrollLeft-=B),wt.current&&(De.current-=B)))},zt=(p,k=(B=>(B=je.current)==null?void 0:B.scrollLeft)()??0)=>{if(!kt)return p;let ye=t.length+p,Re=1/0;for(let Ve=0;Ve<jt;Ve++){const gt=Ve*t.length+p,$t=Ke.current[gt];if(!$t)continue;const en=Math.abs($t.offsetLeft-k);en<Re&&(Re=en,ye=gt)}return ye},St=p=>{const k=je.current;return!p||!k?!1:p.offsetWidth>k.clientWidth+1},g=p=>{const k=je.current;if(!p||!k||!St(p))return!1;const B=p.offsetLeft,ye=B+p.offsetWidth;return k.scrollLeft>=B-1&&k.scrollLeft+k.clientWidth<=ye+1},he=(p=(k=>(k=je.current)==null?void 0:k.scrollLeft)()??0)=>{for(let ye=0;ye<Ke.current.length;ye+=1){const Re=Ke.current[ye];if(Re&&g(Re))return ye}let B={flatIndex:0,distance:1/0};return Ke.current.forEach((ye,Re)=>{if(!ye)return;const Ve=Math.abs(ye.offsetLeft-p);Ve<B.distance&&(B={flatIndex:Re,distance:Ve})}),B.flatIndex},Ee=p=>{je.current&&Ke.current.forEach(k=>{k&&(k.style.scrollSnapAlign=St(k)&&p==="backward"?"end":"start")})},ke=(p,k,B)=>{const ye=p-k,Re=he(k),Ve=Ke.current[Re];if(g(Ve))return he(p)%t.length;const gt=Ke.current[Re+1],$t=Ve?gt?gt.offsetLeft-Ve.offsetLeft:Ve.offsetWidth:0,en=$t>0?ye>$t*zo?1:ye<-$t*zo?-1:0:0;return en===0?B:kt?(B+en+t.length)%t.length:Math.max(0,Math.min(t.length-1,B+en))},st=a.useCallback((p=!1)=>{if(M!=="on"||o)return;const k=Ge.current,B=h.current,ye=tt.current[B];if(!k||!ye||k.scrollWidth<=k.clientWidth)return;const Re=k.scrollLeft,Ve=Re+k.clientWidth,gt=ye.offsetLeft,$t=gt+ye.offsetWidth;if(gt>=Re&&$t<=Ve)return;const en=k.scrollWidth-k.clientWidth;let Jt=Re;if(!p&&qe.current===null){const fi=tt.current[B-1],Ui=tt.current[B+1],ko=fi?ye.offsetLeft-fi.offsetLeft:Ui?Ui.offsetLeft-ye.offsetLeft:ye.offsetWidth;$t>Ve?Jt+=ko:gt<Re&&(Jt-=ko)}else $t>Ve?Jt=$t-k.clientWidth:Jt=gt;k.scrollLeft=Math.max(0,Math.min(en,Jt))},[o,M]),Pt=a.useCallback((p=!1)=>{p&&(lt.current=!0),Ue.current===null&&(Ue.current=requestAnimationFrame(()=>{Ue.current=null;const k=lt.current;lt.current=!1,st(k)}))},[st]),Qe=a.useCallback(p=>{if(p===h.current)return;const k=h.current;h.current=p;const B=Math.abs(p-k)>1,ye=kt&&t.length>1&&(k===t.length-1&&p===0||k===0&&p===t.length-1);ge(p),Pt(B||ye)},[t.length,kt,Pt]),mt=()=>{if(!je.current||t.length===0||qe.current!==null||it.current.isActive&&it.current.hasMoved)return;const p=je.current.scrollLeft,k=he(p)%t.length;k!==h.current&&Qe(k)},_t=()=>{qe.current=null},Et=p=>{const k=je.current;k&&(k.style.scrollSnapType=p?"":"none")},ln=()=>{var p;(p=Wt.current)==null||p.call(Wt),Wt.current=null},dn=()=>{vt.current!==null&&(cancelAnimationFrame(vt.current),vt.current=null),wt.current=!1},Jn=()=>{const p=je.current;if(!p){vt.current=null,wt.current=!1;return}const k=De.current-p.scrollLeft;if(Math.abs(k)<.5){p.scrollLeft=De.current,Zt(),mt(),vt.current=null,wt.current=!1;return}p.scrollLeft+=k*hf,Zt(),mt(),Ze(),vt.current=requestAnimationFrame(Jn)},Qn=()=>{const p=Me.current;p&&(p.style.transition="",p.style.transform="",p.style.willChange="")},Io=(p,k,B,ye)=>{Qn(),p.scrollLeft=k,dt.current=p.scrollLeft,Zt(),B!==void 0?(h.current=B,ge(B)):mt(),Et(!0),ye==null||ye()},Ro=(p,{behavior:k="smooth",activeIndex:B,onComplete:ye}={})=>{const Re=je.current,Ve=Me.current;if(!Re||!Ve)return;if(dn(),ln(),Et(!1),k==="auto"){Io(Re,p,B,ye);return}const gt=Math.abs(p-Re.scrollLeft),$t=rf(gt,cf,df,Re.clientWidth*.55);Wt.current=lf(Re,Ve,p,{duration:$t,easing:uf,onComplete:()=>{Wt.current=null,Io(Re,p,B,ye)}})},Ir=(p="smooth")=>{const k=je.current;if(!k||t.length===0)return;const B=he()%t.length,ye=zt(B,k.scrollLeft),Re=Ke.current[ye];Re&&Ro(Re.offsetLeft,{behavior:p,activeIndex:B})},Rr=(p,k="smooth",B,ye)=>{const Re=je.current;if(!Re||t.length===0)return;const Ve=(ye??Re.scrollLeft)-p,gt=he(p),$t=Ke.current[gt];if(g($t)){Et(!0),mt();return}const en=Ke.current[gt+1],Jt=$t?en?en.offsetLeft-$t.offsetLeft:$t.offsetWidth:0;if((Jt>0?Ve>Jt*zo?1:Ve<-Jt*zo?-1:0:0)!==0){const $c=B??gt%t.length,Cc=ke(ye??Re.scrollLeft,p,$c);wn(Cc,k);return}const Ui=ye??Re.scrollLeft,ko=he(Ui),Ya=Ke.current[ko];if(Ya&&Math.abs(Ya.offsetLeft-Ui)<1){Et(!0),mt();return}Ir("auto")},wn=(p,k="smooth")=>{const B=je.current;if(!B||t.length===0)return;const ye=zt(p,B.scrollLeft),Re=Ke.current[ye];Re&&(k==="smooth"?qe.current=p:qe.current=null,h.current=p,ge(p),Pt(!0),Ro(Re.offsetLeft,{behavior:k,activeIndex:p,onComplete:k==="smooth"?_t:void 0}))},hi=()=>{xt.current&&(window.removeEventListener("pointerup",xt.current),window.removeEventListener("pointercancel",xt.current),xt.current=null)},Eo=(p,k,B,ye,Re)=>{const Ve=B-p,gt=ye-k,$t=Math.abs(Ve),en=Math.abs(gt);if($t<yf||$t<=en)return!1;const Jt=Ve<0?1:-1,fi=kt?(Re+Jt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Re+Jt));return fi===Re?!1:(wn(fi),!0)},ei=p=>{if(!it.current.isActive)return;hi();const k=je.current;if(!k)return;const{scrollLeft:B,startActiveIndex:ye,hasMoved:Re}=it.current,Ve=k.scrollLeft;Zt(!0),it.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},Tt(!1),p!==void 0&&k.hasPointerCapture(p)&&k.releasePointerCapture(p),Re?Rr(B,"smooth",ye,Ve):(Et(!0),mt()),Ze()},Mo=(p,k)=>{const B=ht.current;ht.current=null,B&&(Eo(B.startX,B.startY,p,k,B.startActiveIndex),Ze())},Er=p=>{if(!be)return;if(p.pointerType==="touch"){if(dn(),Et(!0),At(p.target))return;ht.current={startX:p.clientX,startY:p.clientY,startActiveIndex:h.current};return}if(p.pointerType!=="mouse"||p.button!==0||At(p.target))return;const k=je.current;if(!k)return;dn(),ln(),Qn(),qe.current=null,it.current={isActive:!0,startX:p.clientX,scrollLeft:k.scrollLeft,startActiveIndex:h.current,hasMoved:!1},Et(!1),Ze(),k.setPointerCapture(p.pointerId),hi();const B=ye=>{ye.pointerType==="mouse"&&ei(ye.pointerId)};xt.current=B,window.addEventListener("pointerup",B),window.addEventListener("pointercancel",B)},Mr=p=>{if(!be||p.pointerType!=="mouse")return;const k=je.current;if(!k||!it.current.isActive)return;if(p.buttons===0){ei(p.pointerId);return}const B=p.clientX-it.current.startX;Math.abs(B)>ff&&(it.current.hasMoved=!0,Tt(!0)),it.current.hasMoved&&(p.preventDefault(),k.scrollLeft=it.current.scrollLeft-B,Zt(!0),mt(),Ze())},te=p=>{if(be){if(p.pointerType==="touch"){p.type==="pointerup"?Mo(p.clientX,p.clientY):ht.current=null;return}p.pointerType==="mouse"&&ei(p.pointerId)}},Fe=p=>{!be||p.pointerType!=="mouse"||ei(p.pointerId)};return hc(),a.useEffect(()=>{const p=requestAnimationFrame(()=>Yt(!0));return()=>{cancelAnimationFrame(p),ln(),hi(),Ue.current!==null&&(cancelAnimationFrame(Ue.current),Ue.current=null),pt.current&&clearTimeout(pt.current),nt.current&&clearTimeout(nt.current)}},[]),a.useEffect(()=>{if(!Ne){xe(!0);return}Ze();const p=Se.current;if(!p)return;const k=()=>Ze();return p.addEventListener("pointermove",k),p.addEventListener("pointerdown",k),()=>{p.removeEventListener("pointermove",k),p.removeEventListener("pointerdown",k),nt.current&&clearTimeout(nt.current)}},[Ne,Ze]),a.useEffect(()=>{const p=k=>{k.key==="Escape"&&Je()};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[Je]),a.useLayoutEffect(()=>{Ut()},[$,t.length,kt]),a.useLayoutEffect(()=>{o||wn(h.current,"auto")},[$,o]),a.useLayoutEffect(()=>{wn(0,"auto")},[t.length,kt]),a.useEffect(()=>{const p=je.current;if(!p||o||!ce)return;const k=B=>{if(B.preventDefault(),Math.abs(B.deltaY)<=Math.abs(B.deltaX))return;const ye=B.deltaMode===1?gf:B.deltaMode===2?p.clientHeight:1,Re=B.deltaY*ye*mf;if(Re!==0){if(ln(),wt.current||(wt.current=!0,De.current=p.scrollLeft,qe.current=null,Et(!1)),De.current+=Re,!kt){const Ve=p.scrollWidth-p.clientWidth;De.current=Math.max(0,Math.min(Ve,De.current))}Ze(),vt.current===null&&(vt.current=requestAnimationFrame(Jn))}};return p.addEventListener("wheel",k,{passive:!1}),()=>{p.removeEventListener("wheel",k),dn()}},[o,ce,kt]),a.useEffect(()=>{const p=je.current;if(!p)return;const k=()=>{Zt(it.current.isActive);const ye=p.scrollLeft,Re=ye-dt.current;dt.current=ye;const Ve=ut.current>0?ut.current*.5:1/0;if(Re!==0&&Math.abs(Re)<Ve){const gt=Re>0?"forward":"backward";gt!==Xe.current&&(Xe.current=gt,Ee(gt))}it.current.isActive&&it.current.hasMoved||mt()};p.addEventListener("scroll",k,{passive:!0});const B=new ResizeObserver(()=>{Ut(),Zt(it.current.isActive),Ee(Xe.current),mt()});return B.observe(p),()=>{ln(),p.removeEventListener("scroll",k),B.disconnect()}},[t.length,kt]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ot||Je()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Mt?1:0,transition:`opacity ${ro}ms ease`,pointerEvents:Mt?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Nt}}),r.jsxs("div",{ref:Se,className:`${e}-lightbox-dismiss-area`,style:Kt,...Vt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Dt,onClick:p=>p.stopPropagation(),children:r.jsx("div",{ref:je,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":be&&t.length>0?"true":"false","data-mouse-dragging":sn?"true":"false",onPointerDown:Er,onPointerMove:Mr,onPointerUp:te,onPointerCancel:te,onLostPointerCapture:Fe,children:r.jsx("div",{ref:Me,className:`${e}-lightbox-strip-track`,style:{gap:$},children:tn.map((p,k)=>{const B=p.image.objectFit??"contain",ye=k%t.length,Re=Math.floor(k/t.length),Ve=Bo($),gt=`calc(-0.5 * (${Ve} + ${$}))`;return r.jsxs("div",{ref:$t=>Ke.current[k]=$t,className:`${e}-strip-item`,style:{height:_==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[r.jsx("img",{src:p.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:B}}),o&&ye<t.length-1&&Re===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:gt,width:Ve,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Re}-${p.image.url}-${ye}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":qt?"true":"false",style:bt,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:U,flexShrink:0,pointerEvents:"none"},children:o&&r.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:Y,pointerEvents:"auto",zIndex:3}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${ne?` ${e}-lightbox-content-area-stacked`:""}`,children:(we||S)&&r.jsx("div",{className:`${e}-header ${ne?`${e}-header-two-row`:`${e}-header-single-row`}`,children:ne?It():we||S?ft():null})})})]}),t.length>1&&M==="on"&&(()=>{const p=Bo(H),k=`calc(-0.5 * (${H} + ${p}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:H},children:r.jsx("div",{ref:Ge,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:B=>B.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":R,style:{gap:N,"--thumbnail-active-color":Z},children:[t.map((B,ye)=>{const Re=Bo(N),Ve=`calc(-0.5 * (${Re} + ${N}))`;return r.jsxs("div",{ref:gt=>{tt.current[ye]=gt},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":j===ye?"true":"false",onClick:()=>ce&&x==="click"&&wn(ye),onMouseEnter:()=>We&&x==="hover"&&wn(ye),"aria-label":B.image.name?`View ${B.image.name}`:`View image ${ye+1}`,"aria-current":j===ye?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${_e?` ${e}-thumb-image-cover`:""}`,src:B.image.url,alt:"",draggable:!1,style:{...Te,maxWidth:V,maxHeight:V,width:L.display==="cover"?"auto":"100%",height:"auto",objectFit:L.display==="cover"?"cover":"contain"}})}),o&&ye<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ve,width:Re,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${B.image.url}-${ye}`)}),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:k,height:p,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Ef(e){return`
12866
12866
  .${e}-wrapper {
12867
12867
  position: relative;
12868
12868
  width: 100%;
@@ -13093,7 +13093,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
13093
13093
  background-color: transparent;
13094
13094
  padding: 0;
13095
13095
  opacity: 1;
13096
- transition: opacity ${oo}ms ease;
13096
+ transition: opacity ${ro}ms ease;
13097
13097
  }
13098
13098
 
13099
13099
  .${e}-close-icon[data-overlay-content-hidden="true"] {
@@ -13206,7 +13206,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
13206
13206
  display: flex;
13207
13207
  flex-direction: column;
13208
13208
  opacity: 1;
13209
- transition: opacity ${oo}ms ease;
13209
+ transition: opacity ${ro}ms ease;
13210
13210
  }
13211
13211
 
13212
13212
  .${e}-lightbox-content-inner[data-overlay-content-hidden="true"] {
@@ -13793,7 +13793,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
13793
13793
  </>
13794
13794
  );
13795
13795
  };
13796
- `,Pf="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>'),ri={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 Af(e){const t={};return t[Ft(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ft(e,"fontSettings")]={...ri.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ft(e,"fontSize")]={...ri.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ft(e,"lineHeight")]={...ri.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ft(e,"letterSpacing")]={...ri.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ft(e,"wordSpacing")]={...ri.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ft(e,"textAlign")]={...ri.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ft(e,"textAppearance")]={...ri.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Ff=ji.reduce((e,t)=>({...e,...Af(t)}),{}),Wf=ji.reduce((e,t)=>({...e,[Ft(t,"fontFamily")]:"Goudy Bookletter 1911",[Ft(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ft(t,"letterSpacing")]:0,[Ft(t,"wordSpacing")]:0,[Ft(t,"textAlign")]:"left",[Ft(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Yr(e){return ji.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ft(n,"fontSize")]=i),o!==void 0&&(t[Ft(n,"lineHeight")]=o),t},{})}const _f=Tf(),Hf={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"layout",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"layout",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up","none"]}},thumbnailActiveColor:{type:"string",scope:"layout",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"layout",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"layout",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"layout",title:"Caption Default",display:{type:"palette-color-picker"}},...Ff,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Pf,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Wf},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...Yr({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...Yr({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...Yr({title1FontSize:.011,title1LineHeight:.02,title2FontSize:.011,title2LineHeight:.02,title3FontSize:.011,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[_f]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},Nf={element:Mf,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:Hf,sourceCode:kf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...ji.map(e=>({path:`${Ft(e,"fontFamily")}`}))]},fontRelations:{...ji.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ft(t,"fontFamily")}`}),{})}},Of=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:l=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:m})=>{const{type:w,coverFit:S,backgroundColor:T,imageGap:v,maxWidth:C,maxHeight:x,textTransition:M,title1Width:L,title2Width:R,title3Width:J,title1MarginLeft:A=0,title2MarginLeft:ee=0,title3MarginLeft:E=0,titleRowMarginBottom:I=0,titleHeaderLayout:F="single-row",countCloseGap:f=0,closeIcon:b,closeIconMaxWidth:W,closeIconColor:O,closeIconHoverColor:K,contentMarginTop:G=0,iconMarginRight:Q=0}=n,V=a.useCallback(te=>y.scalingValue(te,i??!1),[i]),N=V(v??0),_=`${C}%`,$=`${x}%`,U=V(f),X=V(G),ce=V(Q),j=li("title1",si(n,"title1"),i),ge=li("title2",si(n,"title2"),i),h=li("title3",si(n,"title3"),i),he=li("count",si(n,"count"),i),Y=F==="mobile",be=!i||!!s,Ce=!o&&(!i||!!s),le=a.useMemo(()=>Zo(t,w),[t,w]),[re,D]=a.useState(l),se=le[re],ue=se==null?void 0:se.entry,[_e,xe]=a.useState(!1),[Pe,Fe]=a.useState(null),[Te,Se]=a.useState(!1),[q,me]=a.useState(null),[ve,pe]=a.useState(!1),[Ae,$e]=a.useState(0),[z,de]=a.useState(),[ae,H]=a.useState(),[ie,Ie]=a.useState(null),oe=a.useRef(null),P=a.useRef(0),He=a.useRef(0),We=a.useRef(0),et=a.useRef(!1),Je=a.useRef(null),Le=a.useRef(null),Z=a.useRef(null),ne=a.useRef(null),Ne=a.useRef(null),lt=a.useRef(null),De=a.useRef(null),Oe=a.useCallback(()=>{const te=Le.current;if(!te)return;const ke=te.closest(`.${e}-lightbox-content-area`);if(!ke)return te.getBoundingClientRect().width;const p=Array.from(ke.children).reduce((k,B)=>!(B instanceof HTMLElement)||B.contains(te)?k:k+B.getBoundingClientRect().width,0);return ke.getBoundingClientRect().width-p},[e]),Ue=a.useCallback(()=>{oe.current&&(clearTimeout(oe.current),oe.current=null)},[]),ot=a.useCallback(te=>{te===P.current&&(me(null),pe(!1))},[]),ct=a.useCallback(()=>{o||et.current||(et.current=!0,u==null||u(),xe(!1),Je.current=setTimeout(()=>{m()},300))},[o,u,m]),gt=a.useCallback(te=>!!(te.closest("[data-controls]")||te.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Et,backdropStyle:ut,mediaAreaStyle:bt,overlayContentStyle:Wt,swipeHandlers:st,dismissAreaStyle:qe}=gc({enabled:Ce,onClose:ct,animMs:300,isBlockedTarget:gt}),ze=a.useCallback(te=>{d&&Yl(te+1,c,!0)},[d,c]),yt=a.useCallback(te=>{if(te)return te.getBoundingClientRect().height},[]),xt=a.useCallback(te=>{if(le.length===0)return;const ke=(te%le.length+le.length)%le.length;if(ke===re)return;const p=le[re],k=le[ke];P.current+=1;const B=P.current,ye=M==="fade"&&Rs(p==null?void 0:p.entry)!==Rs(k==null?void 0:k.entry),Re=yt(Z.current),Be=ye?(()=>{const St=Oe();mi.flushSync(()=>{Ie(k.entry)}),Z.current&&St&&(Z.current.style.width=`${St}px`);const en=yt(Z.current);return Z.current&&(Z.current.style.width=""),{measuredIncomingTitlesHeight:en,incomingTitlesMeasureWidth:St}})():void 0,mt=Math.max(Re??0,(Be==null?void 0:Be.measuredIncomingTitlesHeight)??0)||void 0;$e(B),me(re),pe(!0),D(ke),ze(ke),We.current=ke,ye?(Ue(),mt&&de(mt),Be!=null&&Be.incomingTitlesMeasureWidth&&H(Be.incomingTitlesMeasureWidth),Fe((p==null?void 0:p.entryIndex)??null),Se(!0),He.current=k.entryIndex,oe.current=setTimeout(()=>{Fe(null),Se(!1),de(void 0),H(void 0),Ie(null),oe.current=null},400)):(Ue(),Fe(null),Se(!1),de(void 0),H(void 0),Ie(null),He.current=k.entryIndex)},[re,Ue,Oe,yt,le,ze,M]),kt=a.useCallback(()=>{De.current=null},[]),jt=a.useCallback(te=>{!be||le.length<=1||te.pointerType==="mouse"&&te.button!==0||te.target.closest("[data-controls]")||(De.current={startX:te.clientX,startY:te.clientY,pointerId:te.pointerId})},[be,le.length]),tn=a.useCallback(te=>{var St;if(!be||le.length<=1||te.pointerType==="mouse"&&te.button!==0)return;if(Et){kt();return}const ke=De.current;if(!ke||ke.pointerId!==te.pointerId||(kt(),te.target.closest("[data-controls]")))return;const k=te.clientX-ke.startX,B=te.clientY-ke.startY,ye=Math.abs(k),Re=Math.abs(B);if(ye>=Qm&&ye>Re){xt(k>0?re-1:re+1);return}if(ye>Cs||Re>Cs)return;const Be=(St=ne.current)==null?void 0:St.getBoundingClientRect(),mt=Be?Be.left+Be.width/2:window.innerWidth/2;xt(te.clientX<mt?re-1:re+1)},[re,be,xt,Et,kt,le.length]),sn=a.useCallback(te=>{const ke=De.current;(ke==null?void 0:ke.pointerId)===te.pointerId&&kt()},[kt]);hc(),a.useEffect(()=>{lt.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const te=requestAnimationFrame(()=>{xe(!0),requestAnimationFrame(()=>{Ne.current?Ne.current.focus():ne.current&&ne.current.focus()})});return()=>{cancelAnimationFrame(te),Je.current&&clearTimeout(Je.current),oe.current&&clearTimeout(oe.current);const ke=lt.current;ke&&document.contains(ke)&&ke.focus({preventScroll:!0})}},[]),a.useEffect(()=>{var te;M!=="fade"&&(He.current=((te=le[re])==null?void 0:te.entryIndex)??0,Ue(),Fe(null),Se(!1),de(void 0),H(void 0))},[re,Ue,le,M]),a.useEffect(()=>{const te=ke=>{if(ke.key==="Escape"){ct();return}if(ke.key==="ArrowLeft"&&le.length>1){xt(re-1);return}if(ke.key==="ArrowRight"&&le.length>1){xt(re+1);return}if(ke.key==="Tab"&&ne.current){const p=ne.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),k=Array.from(p).filter(Be=>!Be.closest('[aria-hidden="true"]'));if(k.length===0)return;const B=k[0],ye=k[k.length-1],Re=document.activeElement;ke.shiftKey?(Re===B||!ne.current.contains(Re))&&(ke.preventDefault(),ye.focus()):(Re===ye||!ne.current.contains(Re))&&(ke.preventDefault(),B.focus())}};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[xt,ct,re,le.length]),a.useLayoutEffect(()=>{Ue(),P.current=0,$e(0),me(null),pe(!1),Fe(null),Se(!1),de(void 0),H(void 0),Ie(null),D(te=>{const ke=Math.max(0,le.length-1);return Math.min(te,ke)})},[Ue,t.length,w,le.length]),a.useLayoutEffect(()=>{var p;const te=Math.max(0,le.length-1),ke=Math.min(Math.max(0,l),te);We.current=ke,He.current=((p=le[ke])==null?void 0:p.entryIndex)??0,D(ke)},[l]);const Ct=Pe!==null?t[Pe]:null,Mt=q!==null?le[q]:null,Yt=(ue==null?void 0:ue.title1)||(ue==null?void 0:ue.title2)||(ue==null?void 0:ue.title3)||(Ct==null?void 0:Ct.title1)||(Ct==null?void 0:Ct.title2)||(Ct==null?void 0:Ct.title3),Gt=sg(w,le,t),we=b!==null,Ve=Yt||Gt||we,Ge=Gt&&we?{gap:U}:void 0,rt=`${e}-titles-stack${Y?` ${e}-titles-stack-stacked`:""}`,It=`${e}-titles-layer-out${Y?` ${e}-titles-layer-out-stacked`:""}`,dt=`${e}-titles-layer-out`,Qe=(A??0)>0||o,qt=V(I),Xe=a.useMemo(()=>({title1Width:L??Ri.title1Width,title2Width:R??Ri.title2Width,title3Width:J??Ri.title3Width}),[L,R,J]),Ye=a.useMemo(()=>({title2MarginLeft:ee,title3MarginLeft:E}),[ee,E]),nt=a.useMemo(()=>ue?Dn(e,ue,j,ge,h):[],[e,ue,j,ge,h]),Tt=a.useMemo(()=>nt.map(te=>Xe[te.widthKey]),[nt,Xe]),Lt=a.useMemo(()=>Fi(nt.length,Tt),[nt.length,Tt]),ht=a.useMemo(()=>go(nt.length,Tt),[nt.length,Tt]),At=a.useMemo(()=>nt.filter(te=>te.prefix==="title1"),[nt]),Ot=a.useMemo(()=>nt.filter(te=>te.prefix==="title2"||te.prefix==="title3"),[nt]),Nt=a.useMemo(()=>Vn(At,Xe),[At,Xe]),Dt=a.useMemo(()=>Vn(Ot,Xe),[Ot,Xe]),vt=a.useCallback((te,ke)=>{const p=nt.findIndex(B=>B.prefix===te.prefix);if(!Y||ke==="single-row")return{effectiveWidth:ht[p]??0,resolvedWidth:Lt[p]??0,maxWidth:rn(p,Lt)};if(ke==="two-row-top"){const B=At.findIndex(ye=>ye.prefix===te.prefix);return{effectiveWidth:Nt.effective[B]??0,resolvedWidth:Nt.resolved[B]??0,maxWidth:rn(B,Nt.resolved)}}const k=Ot.findIndex(B=>B.prefix===te.prefix);return{effectiveWidth:Dt.effective[k]??0,resolvedWidth:Dt.resolved[k]??0,maxWidth:rn(k,Dt.resolved)}},[nt,Ot,Dt,ht,Lt,At,Nt,Y]),Vt=a.useCallback(te=>ec(nt,Lt,Ye,te)+(Y?0:A??0),[nt,Lt,Ye,Y,A]),Kt=a.useCallback(()=>Y?0:A??0,[Y,A]),Ut=a.useCallback(te=>Ot.slice(0,te).reduce((ke,p,k)=>ke+(p.marginLeftKey?Ye[p.marginLeftKey]??0:0)+(Dt.resolved[k]??0),0),[Ot,Dt.resolved,Ye]),Zt=a.useCallback(te=>{const ke=Ot[te];return Ut(te)+(ke.marginLeftKey?Ye[ke.marginLeftKey]??0:0)+(Dt.resolved[te]??0)},[Ot,Dt.resolved,Ut,Ye]),zt=a.useCallback((te,ke,p)=>{if(!Y||p==="single-row"){const Be=te.findIndex(Jt=>Jt.prefix===ke.prefix),mt=te.map(Jt=>Xe[Jt.widthKey]),St=Fi(te.length,mt);return{effectiveWidth:go(te.length,mt)[Be]??0,resolvedWidth:St[Be]??0,maxWidth:rn(Be,St)}}if(p==="two-row-top"){const Be=te.filter(Jt=>Jt.prefix==="title1"),mt=Be.findIndex(Jt=>Jt.prefix===ke.prefix),{resolved:St,effective:en}=Vn(Be,Xe);return{effectiveWidth:en[mt]??0,resolvedWidth:St[mt]??0,maxWidth:rn(mt,St)}}const k=te.filter(Be=>Be.prefix==="title2"||Be.prefix==="title3"),B=k.findIndex(Be=>Be.prefix===ke.prefix),{resolved:ye,effective:Re}=Vn(k,Xe);return{effectiveWidth:Re[B]??0,resolvedWidth:ye[B]??0,maxWidth:rn(B,ye)}},[Xe,Y]),wt=(te,ke,p)=>{const k=te.marginLeftKey?Ye[te.marginLeftKey]??0:0,{effectiveWidth:B,resolvedWidth:ye,maxWidth:Re}=p??vt(te,ke),Be=Math.max(k,Bn),mt=o&&ke==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":te.prefix,style:{width:V(B),...k>0?{marginLeft:V(k)}:{}},children:[r.jsx("p",{className:te.className,style:te.style,children:te.text}),mt&&te.marginLeftKey?r.jsx("div",{"data-controls":te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:V(-k),width:V(Be),height:"100%",pointerEvents:"auto"}}):null,mt?r.jsx("div",{"data-controls":te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Re),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:V(-gn/2),width:V(gn),height:"100%",pointerEvents:"auto"}}):null]},te.className)},g=(te="two-row")=>{const ke=nt.findIndex(B=>B.prefix==="title1"),p=ke>=0?Lt[ke]:Xe.title1Width,k=te==="two-row"&&o;return r.jsx("div",{...k?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(p)}:{},style:{width:V(A??0),flexShrink:0,alignSelf:"stretch",...k?{pointerEvents:"auto"}:{}}})},fe=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:j,"aria-hidden":"true",children:" "}),Ee=()=>r.jsx("span",{className:`${e}-entry-counter`,style:he,"aria-live":"polite","aria-atomic":"true",children:ag(le,re,w,t)}),Me=()=>Gt?o&&we?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Ee(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${zr(U)} + ${U}))`,width:zr(U),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Ee():null,it=()=>!Gt&&!we?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Ge,children:[Me(),we?pt():null]}),Pt=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Gt||Yt?fe():null,Qe?g("single-row"):null,Rt(ue),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),it(),wn()]}),Ze=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Gt||Yt?fe():null,Qe?g("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:Te&&z?{minHeight:z}:void 0,children:[r.jsx("div",{ref:Z,className:rt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Qn(ie||ue)}),r.jsxs("div",{ref:Le,className:rt,style:{position:Te?"absolute":"relative",inset:Te?0:void 0,width:"100%",...Te&&ae?{width:ae,maxWidth:"100%"}:void 0},children:[Ct&&Te?r.jsx("div",{className:`${It} ${e}-titles-fade-out`,children:Qn(Ct)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Qn(ue)})]})]}),it(),wn()]}),pt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:y.scalingValue(W??0,i),height:y.scalingValue(W??0,i),marginRight:ce,"--close-icon-hover-color":K},children:[r.jsx("button",{ref:Ne,type:"button",className:`${e}-close-icon-inner`,onClick:ct,"aria-label":"Close",children:r.jsx(nn,{url:b??"",fill:O,hoverFill:i&&!s?O:K,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:ce,height:"100%",pointerEvents:"auto"}})]}),_t=(te,ke)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Gt||Yt?fe():null,Qe?g("two-row"):null,ke!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:ke},children:te}):r.jsxs(r.Fragment,{children:[te,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),it()]}),Rt=te=>{if(!te)return null;const ke=Dn(e,te,j,ge,h);return r.jsx(r.Fragment,{children:ke.map(p=>wt(p,"single-row",zt(ke,p,"single-row")))})},ln=te=>{if(!te)return null;const ke=Dn(e,te,j,ge,h),p=ke.find(k=>k.prefix==="title1");return p?wt(p,"two-row-top",zt(ke,p,"two-row-top")):null},dn=(te,ke=!1)=>{const p=te?Dn(e,te,j,ge,h):[],k=p.filter(Re=>Re.prefix==="title2"||Re.prefix==="title3"),B=o&&ke;return k.length>0||B||(I??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[k.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[k.map(Re=>wt(Re,"two-row-bottom",zt(p,Re,"two-row-bottom"))),ke&&o?r.jsxs(r.Fragment,{children:[Ir(),Rr()]}):null]}):null,(I??0)>0||B?r.jsx("div",{"data-controls":B?"titleRowMarginBottom":void 0,"data-controls-axis":B?"y":void 0,"data-controls-reverse":B?"":void 0,className:B?`${e}-control`:void 0,style:{height:qt,width:"100%",flexShrink:0,pointerEvents:B?"auto":"none"}}):null]}):null},Jn=(te,ke=!1)=>r.jsxs(r.Fragment,{children:[_t(ln(te)),dn(te,ke)]}),Qn=te=>Y?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Jn(te)}):te?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Rt(te)}):null,Io=()=>{const te=Y?-1:nt.findIndex(k=>k.prefix==="title1"),ke=!Y&&(o||(A??0)>0)?(()=>{const k=A??0,B=te>=0?Lt[te]:Xe.title1Width,ye=Math.max(k,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(B),style:{position:"absolute",top:0,left:0,width:V(ye),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,p=nt.flatMap((k,B)=>{if(!k.marginLeftKey)return[];const ye=Ye[k.marginLeftKey]??0,Re=Ql(nt,Lt,Ye,B)+Kt(),Be=Math.max(ye,Bn);return r.jsx("div",{"data-controls":k.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Lt[B]),style:{position:"absolute",top:0,left:V(Re),width:V(Be),height:"100%",pointerEvents:"auto"}},k.marginLeftKey)});return ke?[ke,...p]:p},Ro=()=>nt.map((te,ke)=>{const p=rn(ke,Lt),B=Vt(ke)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:V(B),width:V(gn),height:"100%",pointerEvents:"auto"}})},`${te.widthKey}-junction`)}),Ir=()=>Ot.flatMap((te,ke)=>{if(!te.marginLeftKey)return[];const p=Ye[te.marginLeftKey]??0,k=Ut(ke),B=Math.max(p,Bn),{resolvedWidth:ye}=vt(te,"two-row-bottom");return r.jsx("div",{"data-controls":te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:V(k),width:V(B),height:"100%",pointerEvents:"auto"}},te.marginLeftKey)}),Rr=()=>Ot.map((te,ke)=>{const{maxWidth:p}=vt(te,"two-row-bottom"),B=Zt(ke)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:V(B),width:V(gn),height:"100%",pointerEvents:"auto"}})},`${te.widthKey}-junction`)}),wn=()=>!o||Y?null:r.jsxs(r.Fragment,{children:[Io(),Ro()]}),hi=te=>{const ke=!te.objectFit&&An(S);return{className:`${e}-slide-image-cell${ke?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:_,maxHeight:$,...ke?{"--image-aspect-ratio":Tr(S)}:{}}}},Eo=te=>te.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":te.objectFit}}:An(S)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},ei=te=>{if(te.length===0)return null;const ke=te.length>1,p=zr(N),k=`calc(-0.5 * (${p} + ${N}))`;if(te.length===1){const B=te[0];return r.jsx("div",{...hi(B),children:r.jsx("img",{...Eo(B),src:B.url,alt:B.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:ke?{gap:N}:void 0,children:te.map((B,ye)=>r.jsxs("div",{...hi(B),children:[r.jsx("img",{...Eo(B),src:B.url,alt:B.name??"",draggable:!1}),o&&ke&&ye<te.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:k,width:p,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${B.url}-${ye}`))})},Mo=!!(ue!=null&&ue.title2||ue!=null&&ue.title3||Ct!=null&&Ct.title2||Ct!=null&&Ct.title3||(I??0)>0||o),Er=()=>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:Z,className:rt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Jn(ie||ue)}),r.jsxs("div",{ref:Le,className:`${e}-titles-row-two-row`,style:{...Te&&z?{minHeight:z}:void 0,...Te&&ae?{width:ae,maxWidth:"100%"}:void 0},children:[_t(r.jsxs("div",{className:rt,style:{position:Te?"absolute":"relative",inset:Te?0:void 0,width:"100%"},children:[Ct&&Te?r.jsx("div",{className:`${dt} ${e}-titles-fade-out`,children:ln(Ct)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:ln(ue)})]}),Te&&z?z:void 0),Mo?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[Ct&&Te?r.jsx("div",{className:`${It} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:dn(Ct)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${Y?` ${e}-titles-layer-in-stacked`:""}`,children:dn(ue,!0)})]}):null]})]}),Mr=()=>{const te=Mo;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...te?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:te?void 0:{flex:"0 0 auto",height:"auto"},children:Jn(ue,!0)}),wn()]})};return r.jsxs("div",{ref:ne,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Et||ct()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:we?void 0:-1,style:{opacity:_e?1:0,transition:"opacity 300ms ease",pointerEvents:_e?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:T,...ut}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:qe,...st,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:bt,onClick:te=>te.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":be&&le.length>1?"true":"false",onPointerDown:be?jt:void 0,onPointerUp:be?tn:void 0,onPointerCancel:be?sn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[Mt&&ve?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:te=>{te.target===te.currentTarget&&ot(Ae)},children:r.jsx("div",{className:`${e}-slide-area`,children:ei(Mt.images)})},`slide-out-${Ae}`):null,r.jsx("div",{className:`${e}-slide-layer-in${ve?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:se?ei(se.images):null})},`slide-in-${Ae}-${re}`)]})})}),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:X,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...Y?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${Y?` ${e}-lightbox-content-area-stacked`:""}`,children:Ve&&r.jsx("div",{className:`${e}-text-bar-cell${Y?` ${e}-text-bar-cell-stacked`:""}`,style:Y?void 0:{flex:1,minWidth:0,width:"100%"},children:Y?M==="fade"?Er():Mr():M==="fade"?Ze():Pt()})})})]})]})]})};function jf(e){return`
13796
+ `,Pf="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>'),ri={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 Af(e){const t={};return t[Ft(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ft(e,"fontSettings")]={...ri.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ft(e,"fontSize")]={...ri.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ft(e,"lineHeight")]={...ri.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ft(e,"letterSpacing")]={...ri.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ft(e,"wordSpacing")]={...ri.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ft(e,"textAlign")]={...ri.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ft(e,"textAppearance")]={...ri.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Ff=ji.reduce((e,t)=>({...e,...Af(t)}),{}),Wf=ji.reduce((e,t)=>({...e,[Ft(t,"fontFamily")]:"Goudy Bookletter 1911",[Ft(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ft(t,"letterSpacing")]:0,[Ft(t,"wordSpacing")]:0,[Ft(t,"textAlign")]:"left",[Ft(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Yr(e){return ji.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ft(n,"fontSize")]=i),o!==void 0&&(t[Ft(n,"lineHeight")]=o),t},{})}const _f=Tf(),Hf={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"layout",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"layout",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up","none"]}},thumbnailActiveColor:{type:"string",scope:"layout",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"layout",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"layout",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"layout",title:"Caption Default",display:{type:"palette-color-picker"}},...Ff,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Pf,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Wf},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...Yr({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...Yr({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...Yr({title1FontSize:.011,title1LineHeight:.02,title2FontSize:.011,title2LineHeight:.02,title3FontSize:.011,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[_f]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},Nf={element:Mf,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:Hf,sourceCode:kf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...ji.map(e=>({path:`${Ft(e,"fontFamily")}`}))]},fontRelations:{...ji.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ft(t,"fontFamily")}`}),{})}},Of=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:l=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:m})=>{const{type:w,coverFit:S,backgroundColor:T,imageGap:v,maxWidth:C,maxHeight:x,textTransition:M,title1Width:L,title2Width:R,title3Width:Z,title1MarginLeft:P=0,title2MarginLeft:Q=0,title3MarginLeft:E=0,titleRowMarginBottom:I=0,titleHeaderLayout:W="single-row",countCloseGap:f=0,closeIcon:b,closeIconMaxWidth:_,closeIconColor:O,closeIconHoverColor:K,contentMarginTop:G=0,iconMarginRight:J=0}=n,V=a.useCallback(te=>y.scalingValue(te,i??!1),[i]),N=V(v??0),H=`${C}%`,$=`${x}%`,U=V(f),Y=V(G),se=V(J),j=li("title1",si(n,"title1"),i),ge=li("title2",si(n,"title2"),i),h=li("title3",si(n,"title3"),i),ue=li("count",si(n,"count"),i),X=W==="mobile",ve=!i||!!s,$e=!o&&(!i||!!s),ae=a.useMemo(()=>Zo(t,w),[t,w]),[re,D]=a.useState(l),ne=ae[re],ce=ne==null?void 0:ne.entry,[Ne,be]=a.useState(!1),[We,_e]=a.useState(null),[Te,we]=a.useState(!1),[q,pe]=a.useState(null),[fe,le]=a.useState(!1),[Pe,Le]=a.useState(0),[z,de]=a.useState(),[ie,F]=a.useState(),[ee,Ie]=a.useState(null),oe=a.useRef(null),A=a.useRef(0),Oe=a.useRef(0),Ae=a.useRef(0),rt=a.useRef(!1),et=a.useRef(null),Ce=a.useRef(null),He=a.useRef(null),ze=a.useRef(null),me=a.useRef(null),Se=a.useRef(null),je=a.useRef(null),Me=a.useCallback(()=>{const te=Ce.current;if(!te)return;const Fe=te.closest(`.${e}-lightbox-content-area`);if(!Fe)return te.getBoundingClientRect().width;const p=Array.from(Fe.children).reduce((k,B)=>!(B instanceof HTMLElement)||B.contains(te)?k:k+B.getBoundingClientRect().width,0);return Fe.getBoundingClientRect().width-p},[e]),Ge=a.useCallback(()=>{oe.current&&(clearTimeout(oe.current),oe.current=null)},[]),tt=a.useCallback(te=>{te===A.current&&(pe(null),le(!1))},[]),Ke=a.useCallback(()=>{o||rt.current||(rt.current=!0,u==null||u(),be(!1),et.current=setTimeout(()=>{m()},300))},[o,u,m]),ut=a.useCallback(te=>!!(te.closest("[data-controls]")||te.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:ht,backdropStyle:it,mediaAreaStyle:xt,overlayContentStyle:Wt,swipeHandlers:dt,dismissAreaStyle:Xe}=gc({enabled:$e,onClose:Ke,animMs:300,isBlockedTarget:ut}),De=a.useCallback(te=>{d&&Yl(te+1,c,!0)},[d,c]),vt=a.useCallback(te=>{if(te)return te.getBoundingClientRect().height},[]),wt=a.useCallback(te=>{if(ae.length===0)return;const Fe=(te%ae.length+ae.length)%ae.length;if(Fe===re)return;const p=ae[re],k=ae[Fe];A.current+=1;const B=A.current,ye=M==="fade"&&Rs(p==null?void 0:p.entry)!==Rs(k==null?void 0:k.entry),Re=vt(He.current),Ve=ye?(()=>{const $t=Me();mi.flushSync(()=>{Ie(k.entry)}),He.current&&$t&&(He.current.style.width=`${$t}px`);const en=vt(He.current);return He.current&&(He.current.style.width=""),{measuredIncomingTitlesHeight:en,incomingTitlesMeasureWidth:$t}})():void 0,gt=Math.max(Re??0,(Ve==null?void 0:Ve.measuredIncomingTitlesHeight)??0)||void 0;Le(B),pe(re),le(!0),D(Fe),De(Fe),Ae.current=Fe,ye?(Ge(),gt&&de(gt),Ve!=null&&Ve.incomingTitlesMeasureWidth&&F(Ve.incomingTitlesMeasureWidth),_e((p==null?void 0:p.entryIndex)??null),we(!0),Oe.current=k.entryIndex,oe.current=setTimeout(()=>{_e(null),we(!1),de(void 0),F(void 0),Ie(null),oe.current=null},400)):(Ge(),_e(null),we(!1),de(void 0),F(void 0),Ie(null),Oe.current=k.entryIndex)},[re,Ge,Me,vt,ae,De,M]),kt=a.useCallback(()=>{je.current=null},[]),jt=a.useCallback(te=>{!ve||ae.length<=1||te.pointerType==="mouse"&&te.button!==0||te.target.closest("[data-controls]")||(je.current={startX:te.clientX,startY:te.clientY,pointerId:te.pointerId})},[ve,ae.length]),tn=a.useCallback(te=>{var $t;if(!ve||ae.length<=1||te.pointerType==="mouse"&&te.button!==0)return;if(ht){kt();return}const Fe=je.current;if(!Fe||Fe.pointerId!==te.pointerId||(kt(),te.target.closest("[data-controls]")))return;const k=te.clientX-Fe.startX,B=te.clientY-Fe.startY,ye=Math.abs(k),Re=Math.abs(B);if(ye>=Qm&&ye>Re){wt(k>0?re-1:re+1);return}if(ye>Cs||Re>Cs)return;const Ve=($t=ze.current)==null?void 0:$t.getBoundingClientRect(),gt=Ve?Ve.left+Ve.width/2:window.innerWidth/2;wt(te.clientX<gt?re-1:re+1)},[re,ve,wt,ht,kt,ae.length]),sn=a.useCallback(te=>{const Fe=je.current;(Fe==null?void 0:Fe.pointerId)===te.pointerId&&kt()},[kt]);hc(),a.useEffect(()=>{Se.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const te=requestAnimationFrame(()=>{be(!0),requestAnimationFrame(()=>{me.current?me.current.focus():ze.current&&ze.current.focus()})});return()=>{cancelAnimationFrame(te),et.current&&clearTimeout(et.current),oe.current&&clearTimeout(oe.current);const Fe=Se.current;Fe&&document.contains(Fe)&&Fe.focus({preventScroll:!0})}},[]),a.useEffect(()=>{var te;M!=="fade"&&(Oe.current=((te=ae[re])==null?void 0:te.entryIndex)??0,Ge(),_e(null),we(!1),de(void 0),F(void 0))},[re,Ge,ae,M]),a.useEffect(()=>{const te=Fe=>{if(Fe.key==="Escape"){Ke();return}if(Fe.key==="ArrowLeft"&&ae.length>1){wt(re-1);return}if(Fe.key==="ArrowRight"&&ae.length>1){wt(re+1);return}if(Fe.key==="Tab"&&ze.current){const p=ze.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),k=Array.from(p).filter(Ve=>!Ve.closest('[aria-hidden="true"]'));if(k.length===0)return;const B=k[0],ye=k[k.length-1],Re=document.activeElement;Fe.shiftKey?(Re===B||!ze.current.contains(Re))&&(Fe.preventDefault(),ye.focus()):(Re===ye||!ze.current.contains(Re))&&(Fe.preventDefault(),B.focus())}};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[wt,Ke,re,ae.length]),a.useLayoutEffect(()=>{Ge(),A.current=0,Le(0),pe(null),le(!1),_e(null),we(!1),de(void 0),F(void 0),Ie(null),D(te=>{const Fe=Math.max(0,ae.length-1);return Math.min(te,Fe)})},[Ge,t.length,w,ae.length]),a.useLayoutEffect(()=>{var p;const te=Math.max(0,ae.length-1),Fe=Math.min(Math.max(0,l),te);Ae.current=Fe,Oe.current=((p=ae[Fe])==null?void 0:p.entryIndex)??0,D(Fe)},[l]);const Tt=We!==null?t[We]:null,Mt=q!==null?ae[q]:null,Yt=(ce==null?void 0:ce.title1)||(ce==null?void 0:ce.title2)||(ce==null?void 0:ce.title3)||(Tt==null?void 0:Tt.title1)||(Tt==null?void 0:Tt.title2)||(Tt==null?void 0:Tt.title3),Gt=sg(w,ae,t),xe=b!==null,qe=Yt||Gt||xe,Ue=Gt&&xe?{gap:U}:void 0,lt=`${e}-titles-stack${X?` ${e}-titles-stack-stacked`:""}`,Rt=`${e}-titles-layer-out${X?` ${e}-titles-layer-out-stacked`:""}`,pt=`${e}-titles-layer-out`,nt=(P??0)>0||o,qt=V(I),Ze=a.useMemo(()=>({title1Width:L??Ri.title1Width,title2Width:R??Ri.title2Width,title3Width:Z??Ri.title3Width}),[L,R,Z]),Je=a.useMemo(()=>({title2MarginLeft:Q,title3MarginLeft:E}),[Q,E]),at=a.useMemo(()=>ce?Dn(e,ce,j,ge,h):[],[e,ce,j,ge,h]),Lt=a.useMemo(()=>at.map(te=>Ze[te.widthKey]),[at,Ze]),It=a.useMemo(()=>Fi(at.length,Lt),[at.length,Lt]),ft=a.useMemo(()=>go(at.length,Lt),[at.length,Lt]),At=a.useMemo(()=>at.filter(te=>te.prefix==="title1"),[at]),Ot=a.useMemo(()=>at.filter(te=>te.prefix==="title2"||te.prefix==="title3"),[at]),Nt=a.useMemo(()=>Vn(At,Ze),[At,Ze]),Dt=a.useMemo(()=>Vn(Ot,Ze),[Ot,Ze]),bt=a.useCallback((te,Fe)=>{const p=at.findIndex(B=>B.prefix===te.prefix);if(!X||Fe==="single-row")return{effectiveWidth:ft[p]??0,resolvedWidth:It[p]??0,maxWidth:rn(p,It)};if(Fe==="two-row-top"){const B=At.findIndex(ye=>ye.prefix===te.prefix);return{effectiveWidth:Nt.effective[B]??0,resolvedWidth:Nt.resolved[B]??0,maxWidth:rn(B,Nt.resolved)}}const k=Ot.findIndex(B=>B.prefix===te.prefix);return{effectiveWidth:Dt.effective[k]??0,resolvedWidth:Dt.resolved[k]??0,maxWidth:rn(k,Dt.resolved)}},[at,Ot,Dt,ft,It,At,Nt,X]),Vt=a.useCallback(te=>ec(at,It,Je,te)+(X?0:P??0),[at,It,Je,X,P]),Kt=a.useCallback(()=>X?0:P??0,[X,P]),Ut=a.useCallback(te=>Ot.slice(0,te).reduce((Fe,p,k)=>Fe+(p.marginLeftKey?Je[p.marginLeftKey]??0:0)+(Dt.resolved[k]??0),0),[Ot,Dt.resolved,Je]),Zt=a.useCallback(te=>{const Fe=Ot[te];return Ut(te)+(Fe.marginLeftKey?Je[Fe.marginLeftKey]??0:0)+(Dt.resolved[te]??0)},[Ot,Dt.resolved,Ut,Je]),zt=a.useCallback((te,Fe,p)=>{if(!X||p==="single-row"){const Ve=te.findIndex(Jt=>Jt.prefix===Fe.prefix),gt=te.map(Jt=>Ze[Jt.widthKey]),$t=Fi(te.length,gt);return{effectiveWidth:go(te.length,gt)[Ve]??0,resolvedWidth:$t[Ve]??0,maxWidth:rn(Ve,$t)}}if(p==="two-row-top"){const Ve=te.filter(Jt=>Jt.prefix==="title1"),gt=Ve.findIndex(Jt=>Jt.prefix===Fe.prefix),{resolved:$t,effective:en}=Vn(Ve,Ze);return{effectiveWidth:en[gt]??0,resolvedWidth:$t[gt]??0,maxWidth:rn(gt,$t)}}const k=te.filter(Ve=>Ve.prefix==="title2"||Ve.prefix==="title3"),B=k.findIndex(Ve=>Ve.prefix===Fe.prefix),{resolved:ye,effective:Re}=Vn(k,Ze);return{effectiveWidth:Re[B]??0,resolvedWidth:ye[B]??0,maxWidth:rn(B,ye)}},[Ze,X]),St=(te,Fe,p)=>{const k=te.marginLeftKey?Je[te.marginLeftKey]??0:0,{effectiveWidth:B,resolvedWidth:ye,maxWidth:Re}=p??bt(te,Fe),Ve=Math.max(k,Bn),gt=o&&Fe==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":te.prefix,style:{width:V(B),...k>0?{marginLeft:V(k)}:{}},children:[r.jsx("p",{className:te.className,style:te.style,children:te.text}),gt&&te.marginLeftKey?r.jsx("div",{"data-controls":te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:V(-k),width:V(Ve),height:"100%",pointerEvents:"auto"}}):null,gt?r.jsx("div",{"data-controls":te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Re),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:V(-gn/2),width:V(gn),height:"100%",pointerEvents:"auto"}}):null]},te.className)},g=(te="two-row")=>{const Fe=at.findIndex(B=>B.prefix==="title1"),p=Fe>=0?It[Fe]:Ze.title1Width,k=te==="two-row"&&o;return r.jsx("div",{...k?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(p)}:{},style:{width:V(P??0),flexShrink:0,alignSelf:"stretch",...k?{pointerEvents:"auto"}:{}}})},he=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:j,"aria-hidden":"true",children:" "}),Ee=()=>r.jsx("span",{className:`${e}-entry-counter`,style:ue,"aria-live":"polite","aria-atomic":"true",children:ag(ae,re,w,t)}),ke=()=>Gt?o&&xe?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Ee(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${zr(U)} + ${U}))`,width:zr(U),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Ee():null,st=()=>!Gt&&!xe?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Ue,children:[ke(),xe?mt():null]}),Pt=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Gt||Yt?he():null,nt?g("single-row"):null,Et(ce),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),st(),wn()]}),Qe=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Gt||Yt?he():null,nt?g("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:Te&&z?{minHeight:z}:void 0,children:[r.jsx("div",{ref:He,className:lt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Qn(ee||ce)}),r.jsxs("div",{ref:Ce,className:lt,style:{position:Te?"absolute":"relative",inset:Te?0:void 0,width:"100%",...Te&&ie?{width:ie,maxWidth:"100%"}:void 0},children:[Tt&&Te?r.jsx("div",{className:`${Rt} ${e}-titles-fade-out`,children:Qn(Tt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Qn(ce)})]})]}),st(),wn()]}),mt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:y.scalingValue(_??0,i),height:y.scalingValue(_??0,i),marginRight:se,"--close-icon-hover-color":K},children:[r.jsx("button",{ref:me,type:"button",className:`${e}-close-icon-inner`,onClick:Ke,"aria-label":"Close",children:r.jsx(nn,{url:b??"",fill:O,hoverFill:i&&!s?O:K,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:se,height:"100%",pointerEvents:"auto"}})]}),_t=(te,Fe)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Gt||Yt?he():null,nt?g("two-row"):null,Fe!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Fe},children:te}):r.jsxs(r.Fragment,{children:[te,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),st()]}),Et=te=>{if(!te)return null;const Fe=Dn(e,te,j,ge,h);return r.jsx(r.Fragment,{children:Fe.map(p=>St(p,"single-row",zt(Fe,p,"single-row")))})},ln=te=>{if(!te)return null;const Fe=Dn(e,te,j,ge,h),p=Fe.find(k=>k.prefix==="title1");return p?St(p,"two-row-top",zt(Fe,p,"two-row-top")):null},dn=(te,Fe=!1)=>{const p=te?Dn(e,te,j,ge,h):[],k=p.filter(Re=>Re.prefix==="title2"||Re.prefix==="title3"),B=o&&Fe;return k.length>0||B||(I??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[k.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[k.map(Re=>St(Re,"two-row-bottom",zt(p,Re,"two-row-bottom"))),Fe&&o?r.jsxs(r.Fragment,{children:[Ir(),Rr()]}):null]}):null,(I??0)>0||B?r.jsx("div",{"data-controls":B?"titleRowMarginBottom":void 0,"data-controls-axis":B?"y":void 0,"data-controls-reverse":B?"":void 0,className:B?`${e}-control`:void 0,style:{height:qt,width:"100%",flexShrink:0,pointerEvents:B?"auto":"none"}}):null]}):null},Jn=(te,Fe=!1)=>r.jsxs(r.Fragment,{children:[_t(ln(te)),dn(te,Fe)]}),Qn=te=>X?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Jn(te)}):te?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Et(te)}):null,Io=()=>{const te=X?-1:at.findIndex(k=>k.prefix==="title1"),Fe=!X&&(o||(P??0)>0)?(()=>{const k=P??0,B=te>=0?It[te]:Ze.title1Width,ye=Math.max(k,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(B),style:{position:"absolute",top:0,left:0,width:V(ye),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,p=at.flatMap((k,B)=>{if(!k.marginLeftKey)return[];const ye=Je[k.marginLeftKey]??0,Re=Ql(at,It,Je,B)+Kt(),Ve=Math.max(ye,Bn);return r.jsx("div",{"data-controls":k.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(It[B]),style:{position:"absolute",top:0,left:V(Re),width:V(Ve),height:"100%",pointerEvents:"auto"}},k.marginLeftKey)});return Fe?[Fe,...p]:p},Ro=()=>at.map((te,Fe)=>{const p=rn(Fe,It),B=Vt(Fe)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:V(B),width:V(gn),height:"100%",pointerEvents:"auto"}})},`${te.widthKey}-junction`)}),Ir=()=>Ot.flatMap((te,Fe)=>{if(!te.marginLeftKey)return[];const p=Je[te.marginLeftKey]??0,k=Ut(Fe),B=Math.max(p,Bn),{resolvedWidth:ye}=bt(te,"two-row-bottom");return r.jsx("div",{"data-controls":te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:V(k),width:V(B),height:"100%",pointerEvents:"auto"}},te.marginLeftKey)}),Rr=()=>Ot.map((te,Fe)=>{const{maxWidth:p}=bt(te,"two-row-bottom"),B=Zt(Fe)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:V(B),width:V(gn),height:"100%",pointerEvents:"auto"}})},`${te.widthKey}-junction`)}),wn=()=>!o||X?null:r.jsxs(r.Fragment,{children:[Io(),Ro()]}),hi=te=>{const Fe=!te.objectFit&&An(S);return{className:`${e}-slide-image-cell${Fe?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:H,maxHeight:$,...Fe?{"--image-aspect-ratio":Tr(S)}:{}}}},Eo=te=>te.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":te.objectFit}}:An(S)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},ei=te=>{if(te.length===0)return null;const Fe=te.length>1,p=zr(N),k=`calc(-0.5 * (${p} + ${N}))`;if(te.length===1){const B=te[0];return r.jsx("div",{...hi(B),children:r.jsx("img",{...Eo(B),src:B.url,alt:B.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:Fe?{gap:N}:void 0,children:te.map((B,ye)=>r.jsxs("div",{...hi(B),children:[r.jsx("img",{...Eo(B),src:B.url,alt:B.name??"",draggable:!1}),o&&Fe&&ye<te.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:k,width:p,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${B.url}-${ye}`))})},Mo=!!(ce!=null&&ce.title2||ce!=null&&ce.title3||Tt!=null&&Tt.title2||Tt!=null&&Tt.title3||(I??0)>0||o),Er=()=>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:He,className:lt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Jn(ee||ce)}),r.jsxs("div",{ref:Ce,className:`${e}-titles-row-two-row`,style:{...Te&&z?{minHeight:z}:void 0,...Te&&ie?{width:ie,maxWidth:"100%"}:void 0},children:[_t(r.jsxs("div",{className:lt,style:{position:Te?"absolute":"relative",inset:Te?0:void 0,width:"100%"},children:[Tt&&Te?r.jsx("div",{className:`${pt} ${e}-titles-fade-out`,children:ln(Tt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:ln(ce)})]}),Te&&z?z:void 0),Mo?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[Tt&&Te?r.jsx("div",{className:`${Rt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:dn(Tt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${X?` ${e}-titles-layer-in-stacked`:""}`,children:dn(ce,!0)})]}):null]})]}),Mr=()=>{const te=Mo;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...te?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:te?void 0:{flex:"0 0 auto",height:"auto"},children:Jn(ce,!0)}),wn()]})};return r.jsxs("div",{ref:ze,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{ht||Ke()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:xe?void 0:-1,style:{opacity:Ne?1:0,transition:"opacity 300ms ease",pointerEvents:Ne?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:T,...it}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Xe,...dt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:xt,onClick:te=>te.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":ve&&ae.length>1?"true":"false",onPointerDown:ve?jt:void 0,onPointerUp:ve?tn:void 0,onPointerCancel:ve?sn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[Mt&&fe?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:te=>{te.target===te.currentTarget&&tt(Pe)},children:r.jsx("div",{className:`${e}-slide-area`,children:ei(Mt.images)})},`slide-out-${Pe}`):null,r.jsx("div",{className:`${e}-slide-layer-in${fe?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:ne?ei(ne.images):null})},`slide-in-${Pe}-${re}`)]})})}),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:Y,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...X?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${X?` ${e}-lightbox-content-area-stacked`:""}`,children:qe&&r.jsx("div",{className:`${e}-text-bar-cell${X?` ${e}-text-bar-cell-stacked`:""}`,style:X?void 0:{flex:1,minWidth:0,width:"100%"},children:X?M==="fade"?Er():Mr():M==="fade"?Qe():Pt()})})})]})]})]})};function jf(e){return`
13797
13797
  .${e}-wrapper {
13798
13798
  position: relative;
13799
13799
  width: 100%;
@@ -14315,7 +14315,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
14315
14315
  pointer-events: auto;
14316
14316
  z-index: 10;
14317
14317
  }
14318
- `}const zf=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:l})=>{const{prefix:d}=y.useScopedStyles(),c=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:m,type:w}=e,S=a.useRef(null),[T,v]=a.useState(!1),[C,x]=a.useState(0),M=a.useRef(!1),L=a.useRef(!1),R=a.useRef(!1),J=a.useMemo(()=>(t??[]).filter(f=>Ai(f).length>0),[t]),A=T&&J.length>0,ee=!n,E=a.useCallback(()=>{ee&&(R.current=!0,tg(L.current,c),L.current=!1)},[ee,c]),I=(f=0)=>{if(J.length===0||n&&!i&&!o)return;const b=Zo(J,w),W=Math.max(0,Math.min(f,b.length-1));if(x(W),ee){const O=Zl();Yl(W+1,c,O),L.current=!O}v(!0)},F=a.useCallback(()=>{v(!1),R.current=!1},[]);return a.useEffect(()=>{!n||i||o||v(!1)},[n,i,o]),a.useEffect(()=>{if(!ee||M.current)return;M.current=!0;const f=Ls(c);if(!f)return;const b=Is(f,Zo(J,w).length);b<0||(x(b),v(!0))},[J,c,ee,w]),a.useEffect(()=>{if(!ee)return;const f=()=>{if(R.current){R.current=!1,v(!1);return}const b=Ls(c);if(!b){v(!1);return}const W=Is(b,Zo(J,w).length);if(W<0){v(!1);return}L.current=!1,x(W),v(!0)};return window.addEventListener("popstate",f),()=>window.removeEventListener("popstate",f)},[J,c,ee,w]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:S,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:jf(d)}}),u?r.jsx("button",{type:"button",className:`${d}-cover ${An(m)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>I(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...An(m)?{"--image-aspect-ratio":Tr(m)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${An(m)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),A&&typeof document<"u"&&(()=>{const f=(s?document.getElementById(s):null)??document.body;return mi.createPortal(r.jsx(Of,{prefix:d,entries:J,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:C,enableUrlSync:ee,journalItemId:c,onBeforeClose:E,onClose:F}),f)})()]})},Bf=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
14318
+ `}const zf=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:l})=>{const{prefix:d}=y.useScopedStyles(),c=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:m,type:w}=e,S=a.useRef(null),[T,v]=a.useState(!1),[C,x]=a.useState(0),M=a.useRef(!1),L=a.useRef(!1),R=a.useRef(!1),Z=a.useMemo(()=>(t??[]).filter(f=>Ai(f).length>0),[t]),P=T&&Z.length>0,Q=!n,E=a.useCallback(()=>{Q&&(R.current=!0,tg(L.current,c),L.current=!1)},[Q,c]),I=(f=0)=>{if(Z.length===0||n&&!i&&!o)return;const b=Zo(Z,w),_=Math.max(0,Math.min(f,b.length-1));if(x(_),Q){const O=Zl();Yl(_+1,c,O),L.current=!O}v(!0)},W=a.useCallback(()=>{v(!1),R.current=!1},[]);return a.useEffect(()=>{!n||i||o||v(!1)},[n,i,o]),a.useEffect(()=>{if(!Q||M.current)return;M.current=!0;const f=Ls(c);if(!f)return;const b=Is(f,Zo(Z,w).length);b<0||(x(b),v(!0))},[Z,c,Q,w]),a.useEffect(()=>{if(!Q)return;const f=()=>{if(R.current){R.current=!1,v(!1);return}const b=Ls(c);if(!b){v(!1);return}const _=Is(b,Zo(Z,w).length);if(_<0){v(!1);return}L.current=!1,x(_),v(!0)};return window.addEventListener("popstate",f),()=>window.removeEventListener("popstate",f)},[Z,c,Q,w]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:S,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:jf(d)}}),u?r.jsx("button",{type:"button",className:`${d}-cover ${An(m)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>I(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...An(m)?{"--image-aspect-ratio":Tr(m)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${An(m)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),P&&typeof document<"u"&&(()=>{const f=(s?document.getElementById(s):null)??document.body;return mi.createPortal(r.jsx(Of,{prefix:d,entries:Z,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:C,enableUrlSync:Q,journalItemId:c,onBeforeClose:E,onClose:W}),f)})()]})},Bf=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
14319
14319
  import { createPortal } from 'react-dom';
14320
14320
  import { CommonComponentProps } from '../props';
14321
14321
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -15071,7 +15071,7 @@ export type LightboxJournalSettings = {
15071
15071
  closeIconColor: string;
15072
15072
  closeIconHoverColor: string;
15073
15073
  };
15074
- `,Df="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),ai={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Vf(e){const t={};return t[Ke(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ke(e,"fontSettings")]={...ai.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ke(e,"fontSize")]={...ai.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ke(e,"lineHeight")]={...ai.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ke(e,"letterSpacing")]={...ai.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ke(e,"wordSpacing")]={...ai.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ke(e,"textAlign")]={...ai.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ke(e,"textAppearance")]={...ai.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Gf=Kn.reduce((e,t)=>({...e,...Vf(t)}),{}),qf=Kn.reduce((e,t)=>({...e,[Ke(t,"fontFamily")]:"Goudy Bookletter 1911",[Ke(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ke(t,"letterSpacing")]:0,[Ke(t,"wordSpacing")]:0,[Ke(t,"textAlign")]:"left",[Ke(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Zr(e){return Kn.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ke(n,"fontSize")]=i),o!==void 0&&(t[Ke(n,"lineHeight")]=o),t},{})}const Kf=lg(),Uf={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"}},...Gf,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Df,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...qf,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.04,...Zr({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...Zr({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...Zr({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:[Kf]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"}]}]}},Xf={element:zf,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:Uf,sourceCode:Bf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Kn.map(e=>({path:`${Ke(e,"fontFamily")}`}))]},fontRelations:{...Kn.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ke(t,"fontFamily")}`}),{})}},Yf={sizeType:"custom",value:700,min:400,max:700};function lr(e,t){return{widthPx:e,heightPx:e*t}}function ha(e,t,n,i,o,s){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,s/2),i-s/2)}}function Qs(e,t,n,i){const{heightPx:o}=lr(n,i);return ha(e/2,t/2,e,t,n,o)}function yc(e,t,n){for(const i of n){const{heightPx:o}=lr(i.widthPx,i.aspectRatio),s=i.widthPx/2,l=o/2;if(e>=i.x-s&&e<=i.x+s&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function Zf(e,t,n,i,o,s,l,d){if(o==="system")return"none";const c=i.getBoundingClientRect(),u=document.elementFromPoint(c.left+e,c.top+t);return u&&u.closest("a")?"none":yc(e,t,n)||s==="area"?l??"none":d??"none"}function el(e,t,n){var d;const{sizeType:i,value:o,min:s,max:l}=t;return i==="custom"?o:i==="as is"?((d=n.get(e))==null?void 0:d.naturalWidth)??o:Math.round(Math.random()*(l-s)+s)}function Jf(e){return`
15074
+ `,Df="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),ai={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Vf(e){const t={};return t[Ye(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ye(e,"fontSettings")]={...ai.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ye(e,"fontSize")]={...ai.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ye(e,"lineHeight")]={...ai.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ye(e,"letterSpacing")]={...ai.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ye(e,"wordSpacing")]={...ai.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ye(e,"textAlign")]={...ai.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ye(e,"textAppearance")]={...ai.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Gf=Kn.reduce((e,t)=>({...e,...Vf(t)}),{}),qf=Kn.reduce((e,t)=>({...e,[Ye(t,"fontFamily")]:"Goudy Bookletter 1911",[Ye(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ye(t,"letterSpacing")]:0,[Ye(t,"wordSpacing")]:0,[Ye(t,"textAlign")]:"left",[Ye(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Zr(e){return Kn.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ye(n,"fontSize")]=i),o!==void 0&&(t[Ye(n,"lineHeight")]=o),t},{})}const Kf=lg(),Uf={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"}},...Gf,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Df,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...qf,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.04,...Zr({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...Zr({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...Zr({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:[Kf]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"}]}]}},Xf={element:zf,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:Uf,sourceCode:Bf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Kn.map(e=>({path:`${Ye(e,"fontFamily")}`}))]},fontRelations:{...Kn.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ye(t,"fontFamily")}`}),{})}},Yf={sizeType:"custom",value:700,min:400,max:700};function lr(e,t){return{widthPx:e,heightPx:e*t}}function ha(e,t,n,i,o,s){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,s/2),i-s/2)}}function Qs(e,t,n,i){const{heightPx:o}=lr(n,i);return ha(e/2,t/2,e,t,n,o)}function yc(e,t,n){for(const i of n){const{heightPx:o}=lr(i.widthPx,i.aspectRatio),s=i.widthPx/2,l=o/2;if(e>=i.x-s&&e<=i.x+s&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function Zf(e,t,n,i,o,s,l,d){if(o==="system")return"none";const c=i.getBoundingClientRect(),u=document.elementFromPoint(c.left+e,c.top+t);return u&&u.closest("a")?"none":yc(e,t,n)||s==="area"?l??"none":d??"none"}function el(e,t,n){var d;const{sizeType:i,value:o,min:s,max:l}=t;return i==="custom"?o:i==="as is"?((d=n.get(e))==null?void 0:d.naturalWidth)??o:Math.round(Math.random()*(l-s)+s)}function Jf(e){return`
15075
15075
  .${e}-root {
15076
15076
  position: absolute;
15077
15077
  top: 0;
@@ -15106,7 +15106,7 @@ export type LightboxJournalSettings = {
15106
15106
  width: 32px;
15107
15107
  height: 32px;
15108
15108
  }
15109
- `}function Qf(e){return new Promise(t=>{const n=new Image;n.onload=()=>{t({aspectRatio:n.naturalHeight/n.naturalWidth,naturalWidth:n.naturalWidth})},n.onerror=()=>{t({aspectRatio:1,naturalWidth:700})},n.src=e})}async function ey(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await Qf(i)]));return new Map(n)}function ty({settings:e,content:t=[],isEditor:n}){const{prefix:i}=y.useScopedStyles(),[o,s]=a.useState(null),[l,d]=a.useState([]),[c,u]=a.useState(0),m=a.useRef(0),[w,S]=a.useState({x:0,y:0}),[T,v]=a.useState("none"),C=a.useRef({x:0,y:0}),[x,M]=a.useState(!1),[L,R]=a.useState(!1),J=a.useRef(new Map),{imageSize:A=Yf,cursor:ee="system",target:E="area",position:I="random",visible:F="all",defaultCursor:f=null,hoverCursor:b=null}=e,W=a.useMemo(()=>Jf(i),[i]),O=a.useCallback((N,_,$=l)=>{if(!o)return;const U=o.getBoundingClientRect(),X=N-U.left,ce=_-U.top;S({x:X,y:ce}),v(Zf(X,ce,$,o,ee,E,b,f))},[o,l,ee,E,b,f]);a.useEffect(()=>{const N=[...t.map($=>$.image.url),f,b].filter($=>!!$);if(N.length===0){J.current=new Map,R(!0);return}let _=!1;return R(!1),ey(N).then($=>{_||(J.current=$,R(!0))}),()=>{_=!0}},[t,f,b]),a.useEffect(()=>{if(!o)return;const N=$=>{$.stopPropagation(),C.current={x:$.clientX,y:$.clientY},O($.clientX,$.clientY)},_=()=>{x&&O(C.current.x,C.current.y)};return o.addEventListener("mousemove",N),window.addEventListener("scroll",_,!0),()=>{o.removeEventListener("mousemove",N),window.removeEventListener("scroll",_,!0)}},[o,x,O]),a.useEffect(()=>{!o||!x||O(C.current.x,C.current.y)},[l,o,x,O]),a.useEffect(()=>{x||v("none")},[x]);const K=(N,_,$,U={})=>{var he;const X=((he=J.current.get(N.image.url))==null?void 0:he.aspectRatio)??1,ce=el(N.image.url,A,J.current),{heightPx:j}=lr(ce,X);let ge=0,h=0;return I==="same"?{x:ge,y:h}=Qs(_,$,ce,X):(ge=U.x??Math.random()*_,h=U.y??Math.random()*$,{x:ge,y:h}=ha(ge,h,_,$,ce,j)),{id:m.current++,url:N.image.url,link:N.link,name:N.image.name,x:ge,y:h,xRatio:ge/_,yRatio:h/$,aspectRatio:X,widthPx:ce}},G=()=>{if(!o)return;const N=o.getBoundingClientRect(),_=N.width,$=N.height;_===0||$===0||d(U=>U.length===0?U:U.map(X=>{const ce=A.sizeType==="random"?X.widthPx:el(X.url,A,J.current),{heightPx:j}=lr(ce,X.aspectRatio);if(I==="same"){const{x:he,y:Y}=Qs(_,$,ce,X.aspectRatio);return{...X,x:he,y:Y,widthPx:ce}}const{x:ge,y:h}=ha(X.xRatio*_,X.yRatio*$,_,$,ce,j);return{...X,x:ge,y:h,widthPx:ce}}))};a.useEffect(()=>{if(!o||t.length===0||!L)return;const N=o.getBoundingClientRect(),_=N.width,$=N.height,U=K(t[0],_,$);d([U]),u(1)},[A,I,o,t,L]),a.useEffect(()=>{if(!o)return;G();const N=new ResizeObserver(G);return N.observe(o),window.addEventListener("resize",G),()=>{N.disconnect(),window.removeEventListener("resize",G)}},[o,I,A,l.length]),a.useEffect(()=>{F==="last One"&&d(N=>N.length>0?[N[N.length-1]]:[])},[F]);const Q=N=>{if(!o||t.length===0||!L)return;const _=o.getBoundingClientRect(),$=N.clientX-_.left,U=N.clientY-_.top;if(E==="image"&&!yc($,U,l))return;let X=0,ce=0;I==="on Click"?(X=$,ce=U):I==="same"?(X=_.width/2,ce=_.height/2):(X=Math.random()*_.width,ce=Math.random()*_.height);const j=t[c],ge=K(j,_.width,_.height,{x:X,y:ce}),h=F==="all"?[...l,ge]:[ge];d(h),u(he=>he>=t.length-1?0:he+1),O(N.clientX,N.clientY,h)},V=ee==="custom"&&T!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:W}}),r.jsxs("div",{ref:s,onClick:Q,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),className:`${i}-root`,style:{cursor:V?"none":"default"},children:[l.map(N=>r.jsx("div",{className:`${i}-wrapper`,style:{top:`${N.y}px`,left:`${N.x}px`,width:`${N.widthPx}px`,cursor:V?"none":"default"},children:E==="area"&&N.link?r.jsx("a",{href:N.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:r.jsx("img",{src:N.url,alt:N.name,className:`${i}-image`})}):r.jsx("img",{src:N.url,alt:N.name,className:`${i}-image`})},N.id)),x&&V&&r.jsx("div",{className:`${i}-cursor`,style:{left:`${w.x}px`,top:`${w.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${T}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const ny=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15109
+ `}function Qf(e){return new Promise(t=>{const n=new Image;n.onload=()=>{t({aspectRatio:n.naturalHeight/n.naturalWidth,naturalWidth:n.naturalWidth})},n.onerror=()=>{t({aspectRatio:1,naturalWidth:700})},n.src=e})}async function ey(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await Qf(i)]));return new Map(n)}function ty({settings:e,content:t=[],isEditor:n}){const{prefix:i}=y.useScopedStyles(),[o,s]=a.useState(null),[l,d]=a.useState([]),[c,u]=a.useState(0),m=a.useRef(0),[w,S]=a.useState({x:0,y:0}),[T,v]=a.useState("none"),C=a.useRef({x:0,y:0}),[x,M]=a.useState(!1),[L,R]=a.useState(!1),Z=a.useRef(new Map),{imageSize:P=Yf,cursor:Q="system",target:E="area",position:I="random",visible:W="all",defaultCursor:f=null,hoverCursor:b=null}=e,_=a.useMemo(()=>Jf(i),[i]),O=a.useCallback((N,H,$=l)=>{if(!o)return;const U=o.getBoundingClientRect(),Y=N-U.left,se=H-U.top;S({x:Y,y:se}),v(Zf(Y,se,$,o,Q,E,b,f))},[o,l,Q,E,b,f]);a.useEffect(()=>{const N=[...t.map($=>$.image.url),f,b].filter($=>!!$);if(N.length===0){Z.current=new Map,R(!0);return}let H=!1;return R(!1),ey(N).then($=>{H||(Z.current=$,R(!0))}),()=>{H=!0}},[t,f,b]),a.useEffect(()=>{if(!o)return;const N=$=>{$.stopPropagation(),C.current={x:$.clientX,y:$.clientY},O($.clientX,$.clientY)},H=()=>{x&&O(C.current.x,C.current.y)};return o.addEventListener("mousemove",N),window.addEventListener("scroll",H,!0),()=>{o.removeEventListener("mousemove",N),window.removeEventListener("scroll",H,!0)}},[o,x,O]),a.useEffect(()=>{!o||!x||O(C.current.x,C.current.y)},[l,o,x,O]),a.useEffect(()=>{x||v("none")},[x]);const K=(N,H,$,U={})=>{var ue;const Y=((ue=Z.current.get(N.image.url))==null?void 0:ue.aspectRatio)??1,se=el(N.image.url,P,Z.current),{heightPx:j}=lr(se,Y);let ge=0,h=0;return I==="same"?{x:ge,y:h}=Qs(H,$,se,Y):(ge=U.x??Math.random()*H,h=U.y??Math.random()*$,{x:ge,y:h}=ha(ge,h,H,$,se,j)),{id:m.current++,url:N.image.url,link:N.link,name:N.image.name,x:ge,y:h,xRatio:ge/H,yRatio:h/$,aspectRatio:Y,widthPx:se}},G=()=>{if(!o)return;const N=o.getBoundingClientRect(),H=N.width,$=N.height;H===0||$===0||d(U=>U.length===0?U:U.map(Y=>{const se=P.sizeType==="random"?Y.widthPx:el(Y.url,P,Z.current),{heightPx:j}=lr(se,Y.aspectRatio);if(I==="same"){const{x:ue,y:X}=Qs(H,$,se,Y.aspectRatio);return{...Y,x:ue,y:X,widthPx:se}}const{x:ge,y:h}=ha(Y.xRatio*H,Y.yRatio*$,H,$,se,j);return{...Y,x:ge,y:h,widthPx:se}}))};a.useEffect(()=>{if(!o||t.length===0||!L)return;const N=o.getBoundingClientRect(),H=N.width,$=N.height,U=K(t[0],H,$);d([U]),u(1)},[P,I,o,t,L]),a.useEffect(()=>{if(!o)return;G();const N=new ResizeObserver(G);return N.observe(o),window.addEventListener("resize",G),()=>{N.disconnect(),window.removeEventListener("resize",G)}},[o,I,P,l.length]),a.useEffect(()=>{W==="last One"&&d(N=>N.length>0?[N[N.length-1]]:[])},[W]);const J=N=>{if(!o||t.length===0||!L)return;const H=o.getBoundingClientRect(),$=N.clientX-H.left,U=N.clientY-H.top;if(E==="image"&&!yc($,U,l))return;let Y=0,se=0;I==="on Click"?(Y=$,se=U):I==="same"?(Y=H.width/2,se=H.height/2):(Y=Math.random()*H.width,se=Math.random()*H.height);const j=t[c],ge=K(j,H.width,H.height,{x:Y,y:se}),h=W==="all"?[...l,ge]:[ge];d(h),u(ue=>ue>=t.length-1?0:ue+1),O(N.clientX,N.clientY,h)},V=Q==="custom"&&T!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:_}}),r.jsxs("div",{ref:s,onClick:J,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),className:`${i}-root`,style:{cursor:V?"none":"default"},children:[l.map(N=>r.jsx("div",{className:`${i}-wrapper`,style:{top:`${N.y}px`,left:`${N.x}px`,width:`${N.widthPx}px`,cursor:V?"none":"default"},children:E==="area"&&N.link?r.jsx("a",{href:N.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:r.jsx("img",{src:N.url,alt:N.name,className:`${i}-image`})}):r.jsx("img",{src:N.url,alt:N.name,className:`${i}-image`})},N.id)),x&&V&&r.jsx("div",{className:`${i}-cursor`,style:{left:`${w.x}px`,top:`${w.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${T}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const ny=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15110
15110
  import { CommonComponentProps } from '../props';
15111
15111
  import { useScopedStyles } from '../utils/index';
15112
15112
 
@@ -15737,7 +15737,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
15737
15737
  display: block;
15738
15738
  pointer-events: none;
15739
15739
  }
15740
- `}function ly(e){return e==="blur"?ay:e==="greyscale"?ry:0}function Yi(e,t=1,n=1){const i=ly(e)*Math.max(0,Math.min(1,t));if(e==="greyscale")return`grayscale(${i}%)`;if(e==="blur"){const o=i/4;return o<=0?"none":`blur(${o/Math.max(n,1)}px)`}return"none"}function tl(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function cy(e,t){return t<=1?0:(e-1+t)%t}function dy(e,t=1){return!e||e.height===0?t:e.width/e.height}function uy(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const s=e*i/100,l=t*o/100;let d=s,c=d/n;return c>l&&(c=l,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function nl(e,t,n){if(e<=0||t<=0)return 1;const i=e*n.widthPercent/100,o=t*n.heightPercent/100;return i<=0||o<=0?1:Math.max(e/i,t/o)}function vc(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function il(e,t,n){return{...vc(e),[`--${n}-stage-scale`]:t}}function py(e,t){[...new Set(e.filter(Boolean))].forEach(i=>{const o=new Image;o.onload=()=>{o.naturalWidth>0&&o.naturalHeight>0&&t(i,{width:o.naturalWidth,height:o.naturalHeight})},o.src=i})}function my({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Se,q,me,ve,pe,Ae,$e;const{prefix:o}=y.useScopedStyles(),s=a.useMemo(()=>sy(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:m="greyscale"}=e,w=t??[],S=tl(w.length),[T,v]=a.useState(S.activeIndex),[C,x]=a.useState(S.backgroundIndex),[M,L]=a.useState(!1),[R,J]=a.useState(!1),[A,ee]=a.useState(null),[E,I]=a.useState(null),[F,f]=a.useState(0),[b,W]=a.useState(1),[O,K]=a.useState("none"),[G,Q]=a.useState("next"),[V,N]=a.useState({}),[_,$]=a.useState({width:0,height:0}),U=a.useRef(null),X=a.useRef(null),ce=!n||!!i,j=l??60,ge=Math.max(10,Math.min(100,d??j)),h=Math.max(10,Math.min(100,c??j)),he=Math.max(100,u),Y=Yi(m),be=a.useCallback(z=>{const de=dy(z?V[z]:void 0);return uy(_.width,_.height,de,ge,h)},[_.height,_.width,V,h,ge]);a.useEffect(()=>{const z=X.current;if(!z)return;const de=new ResizeObserver(([ae])=>{const{width:H,height:ie}=ae.contentRect;$({width:H,height:ie})});return de.observe(z),()=>de.disconnect()},[]),a.useEffect(()=>{const z=(t??[]).map(de=>{var ae;return(ae=de.image)==null?void 0:ae.url}).filter(de=>!!de);py(z,(de,ae)=>{N(H=>{var ie,Ie;return((ie=H[de])==null?void 0:ie.width)===ae.width&&((Ie=H[de])==null?void 0:Ie.height)===ae.height?H:{...H,[de]:ae}})})},[t]),a.useEffect(()=>{const{backgroundIndex:z,activeIndex:de}=tl(w.length);v(de),x(z),L(!1),J(!1),ee(null),I(null),f(0),W(1),K("none"),Q("next")},[w.length,t]),a.useEffect(()=>()=>{U.current&&clearTimeout(U.current)},[]);const Ce=a.useCallback(z=>{var oe,P,He,We;if(!ce||M||w.length<=1)return;const de=z==="next"?(T+1)%w.length:(T-1+w.length)%w.length,ae=be((P=(oe=w[T])==null?void 0:oe.image)==null?void 0:P.url),H=be((We=(He=w[de])==null?void 0:He.image)==null?void 0:We.url),ie=nl(_.width,_.height,ae),Ie=nl(_.width,_.height,H);U.current&&clearTimeout(U.current),Q(z),J(!0),L(!0),z==="next"?(ee(T),I(de),f(0),W(1),K(Yi(m,0,1))):(x(cy(de,w.length)),ee(de),I(T),f(1),W(Ie),K(Yi(m,1,Ie))),requestAnimationFrame(()=>{J(!1),requestAnimationFrame(()=>{z==="next"?(f(1),W(ie),K(Yi(m,1,ie))):(f(0),W(1),K(Yi(m,0,1)))})}),U.current=setTimeout(()=>{z==="next"&&x(T),v(de),ee(null),I(null),L(!1)},he)},[T,m,_.height,_.width,be,M,ce,w,he]),le=w[T],re=C!==null?w[C]:null,D=A!==null?w[A]:null,se=E!==null?w[E]:null,ue=w.length<=1?0:(T-1+w.length)%w.length,_e=w.length<=1?0:(T+1)%w.length,xe=be((Se=le==null?void 0:le.image)==null?void 0:Se.url),Pe=be((q=D==null?void 0:D.image)==null?void 0:q.url),Fe=be((me=se==null?void 0:se.image)==null?void 0:me.url),Te={[`--${o}-transition-ms`]:`${he}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),r.jsxs("div",{ref:X,className:at(`${o}-wrapper`,R&&`${o}-snap`,n&&!i&&`${o}-editor`),style:Te,"aria-label":"Zoom gallery",children:[((ve=re==null?void 0:re.image)==null?void 0:ve.url)&&r.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:re.image.url,alt:"",style:{filter:Y}})}),M&&((pe=D==null?void 0:D.image)==null?void 0:pe.url)&&r.jsx("div",{className:at(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${G}`),style:il(Pe,b,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:D.image.url,alt:"",style:{filter:O}})}),M&&((Ae=se==null?void 0:se.image)==null?void 0:Ae.url)&&r.jsx("div",{className:at(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${G}`),style:il(Fe,F,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:se.image.url,alt:""})}),!M&&(($e=le==null?void 0:le.image)==null?void 0:$e.url)&&r.jsx("div",{className:at(`${o}-stage`,`${o}-foreground`),style:vc(xe),children:r.jsx("img",{className:`${o}-image`,src:le.image.url,alt:le.image.name??""})}),ce&&w.length>1&&!M&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:at(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Ce("prev"),"aria-label":`Show previous image (${ue+1} of ${w.length})`}),r.jsx("button",{type:"button",className:at(`${o}-nav`,`${o}-nav-next`),onClick:()=>Ce("next"),"aria-label":`Show next image (${_e+1} of ${w.length})`})]})]})]})}const gy=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15740
+ `}function ly(e){return e==="blur"?ay:e==="greyscale"?ry:0}function Yi(e,t=1,n=1){const i=ly(e)*Math.max(0,Math.min(1,t));if(e==="greyscale")return`grayscale(${i}%)`;if(e==="blur"){const o=i/4;return o<=0?"none":`blur(${o/Math.max(n,1)}px)`}return"none"}function tl(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function cy(e,t){return t<=1?0:(e-1+t)%t}function dy(e,t=1){return!e||e.height===0?t:e.width/e.height}function uy(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const s=e*i/100,l=t*o/100;let d=s,c=d/n;return c>l&&(c=l,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function nl(e,t,n){if(e<=0||t<=0)return 1;const i=e*n.widthPercent/100,o=t*n.heightPercent/100;return i<=0||o<=0?1:Math.max(e/i,t/o)}function vc(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function il(e,t,n){return{...vc(e),[`--${n}-stage-scale`]:t}}function py(e,t){[...new Set(e.filter(Boolean))].forEach(i=>{const o=new Image;o.onload=()=>{o.naturalWidth>0&&o.naturalHeight>0&&t(i,{width:o.naturalWidth,height:o.naturalHeight})},o.src=i})}function my({settings:e,content:t,isEditor:n,isPreviewMode:i}){var we,q,pe,fe,le,Pe,Le;const{prefix:o}=y.useScopedStyles(),s=a.useMemo(()=>sy(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:m="greyscale"}=e,w=t??[],S=tl(w.length),[T,v]=a.useState(S.activeIndex),[C,x]=a.useState(S.backgroundIndex),[M,L]=a.useState(!1),[R,Z]=a.useState(!1),[P,Q]=a.useState(null),[E,I]=a.useState(null),[W,f]=a.useState(0),[b,_]=a.useState(1),[O,K]=a.useState("none"),[G,J]=a.useState("next"),[V,N]=a.useState({}),[H,$]=a.useState({width:0,height:0}),U=a.useRef(null),Y=a.useRef(null),se=!n||!!i,j=l??60,ge=Math.max(10,Math.min(100,d??j)),h=Math.max(10,Math.min(100,c??j)),ue=Math.max(100,u),X=Yi(m),ve=a.useCallback(z=>{const de=dy(z?V[z]:void 0);return uy(H.width,H.height,de,ge,h)},[H.height,H.width,V,h,ge]);a.useEffect(()=>{const z=Y.current;if(!z)return;const de=new ResizeObserver(([ie])=>{const{width:F,height:ee}=ie.contentRect;$({width:F,height:ee})});return de.observe(z),()=>de.disconnect()},[]),a.useEffect(()=>{const z=(t??[]).map(de=>{var ie;return(ie=de.image)==null?void 0:ie.url}).filter(de=>!!de);py(z,(de,ie)=>{N(F=>{var ee,Ie;return((ee=F[de])==null?void 0:ee.width)===ie.width&&((Ie=F[de])==null?void 0:Ie.height)===ie.height?F:{...F,[de]:ie}})})},[t]),a.useEffect(()=>{const{backgroundIndex:z,activeIndex:de}=tl(w.length);v(de),x(z),L(!1),Z(!1),Q(null),I(null),f(0),_(1),K("none"),J("next")},[w.length,t]),a.useEffect(()=>()=>{U.current&&clearTimeout(U.current)},[]);const $e=a.useCallback(z=>{var oe,A,Oe,Ae;if(!se||M||w.length<=1)return;const de=z==="next"?(T+1)%w.length:(T-1+w.length)%w.length,ie=ve((A=(oe=w[T])==null?void 0:oe.image)==null?void 0:A.url),F=ve((Ae=(Oe=w[de])==null?void 0:Oe.image)==null?void 0:Ae.url),ee=nl(H.width,H.height,ie),Ie=nl(H.width,H.height,F);U.current&&clearTimeout(U.current),J(z),Z(!0),L(!0),z==="next"?(Q(T),I(de),f(0),_(1),K(Yi(m,0,1))):(x(cy(de,w.length)),Q(de),I(T),f(1),_(Ie),K(Yi(m,1,Ie))),requestAnimationFrame(()=>{Z(!1),requestAnimationFrame(()=>{z==="next"?(f(1),_(ee),K(Yi(m,1,ee))):(f(0),_(1),K(Yi(m,0,1)))})}),U.current=setTimeout(()=>{z==="next"&&x(T),v(de),Q(null),I(null),L(!1)},ue)},[T,m,H.height,H.width,ve,M,se,w,ue]),ae=w[T],re=C!==null?w[C]:null,D=P!==null?w[P]:null,ne=E!==null?w[E]:null,ce=w.length<=1?0:(T-1+w.length)%w.length,Ne=w.length<=1?0:(T+1)%w.length,be=ve((we=ae==null?void 0:ae.image)==null?void 0:we.url),We=ve((q=D==null?void 0:D.image)==null?void 0:q.url),_e=ve((pe=ne==null?void 0:ne.image)==null?void 0:pe.url),Te={[`--${o}-transition-ms`]:`${ue}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),r.jsxs("div",{ref:Y,className:ct(`${o}-wrapper`,R&&`${o}-snap`,n&&!i&&`${o}-editor`),style:Te,"aria-label":"Zoom gallery",children:[((fe=re==null?void 0:re.image)==null?void 0:fe.url)&&r.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:re.image.url,alt:"",style:{filter:X}})}),M&&((le=D==null?void 0:D.image)==null?void 0:le.url)&&r.jsx("div",{className:ct(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${G}`),style:il(We,b,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:D.image.url,alt:"",style:{filter:O}})}),M&&((Pe=ne==null?void 0:ne.image)==null?void 0:Pe.url)&&r.jsx("div",{className:ct(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${G}`),style:il(_e,W,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:ne.image.url,alt:""})}),!M&&((Le=ae==null?void 0:ae.image)==null?void 0:Le.url)&&r.jsx("div",{className:ct(`${o}-stage`,`${o}-foreground`),style:vc(be),children:r.jsx("img",{className:`${o}-image`,src:ae.image.url,alt:ae.image.name??""})}),se&&w.length>1&&!M&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:ct(`${o}-nav`,`${o}-nav-prev`),onClick:()=>$e("prev"),"aria-label":`Show previous image (${ce+1} of ${w.length})`}),r.jsx("button",{type:"button",className:ct(`${o}-nav`,`${o}-nav-next`),onClick:()=>$e("next"),"aria-label":`Show next image (${Ne+1} of ${w.length})`})]})]})]})}const gy=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15741
15741
  import cn from 'classnames';
15742
15742
  import { CommonComponentProps } from '../props';
15743
15743
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -16496,7 +16496,7 @@ a:active .${e}-button .${e}-icon-image,
16496
16496
  height: calc(1em * var(--${e}-icon-scale, 1));
16497
16497
  width: calc(1em * var(--${e}-icon-scale, 1));
16498
16498
  }
16499
- `}function Qr(e,t,n="",i,o){const s=t();return r.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[r.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:s}),r.jsxs("span",{className:`${e}-content-roll-viewport`,children:[r.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),r.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function ol(e,t,n="fill",i=100,o=0,s){if(!t)return null;const l=r.jsx(nn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return r.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const d=y.scalingValue(o,s);return r.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:l})}return r.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function Sy({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:s}=y.useScopedStyles(),l=a.useMemo(()=>wy(s),[s]),{type:d="a",label:c="Button",icon:u,alignment:m="center",alignA:w,order:S="text-icon",gap:T=0,iconSize:v=0,iconWidthC:C=0,dimensions:x=!1,padding:M={top:0,right:0,bottom:0,left:0},cornerRadius:L=0,boxShadow:R={top:0,left:0,right:0,bottom:0},boxShadowColor:J="rgba(0, 0, 0, 0)",innerBoxShadow:A={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:ee="rgba(0, 0, 0, 0)",stroke:E=0,backgroundColor:I="#000000",textColor:F="#ffffff",borderColor:f="#ffffff",iconColor:b="#ffffff",hoverEffect:W="none",fontFamily:O,fontSettings:K,fontSize:G,lineHeight:Q,letterSpacing:V=0,wordSpacing:N=0,textAppearance:_,stateOverrides:$,minWidth:U=0,minHeight:X=0,width:ce=0,height:j=0}=e,ge=y.buildColorVars(s,{backgroundColor:I,textColor:F,borderColor:f,iconColor:b,boxShadowColor:J,innerBoxShadowColor:ee},yy,vy,$),h=i&&i!=="default"?`${s}-state-${i}`:"",he=t&&!n?`${s}-editing`:"",Y=W!=="none"&&(!t||n||i==="hover")?`${s}-hover-effect-${W}`:"",be=W==="reveal"||W==="swipe",Ce=W==="content-roll",le=W==="reveal"&&(!t||n),re=x===!0,se=d==="a"?w??m:m,ue=d==="c",_e=d!=="b",xe={fontSettings:{fontFamily:O,fontWeight:(K==null?void 0:K.fontWeight)??400,fontStyle:(K==null?void 0:K.fontStyle)??"normal"},fontSize:G??.01,lineHeight:Q,letterSpacing:V,wordSpacing:N,textAppearance:_,color:F},Fe={..._e?cn(Xt(xe,t)):{},[`--${s}-box-shadow-x`]:y.scalingValue(R.left,t),[`--${s}-box-shadow-y`]:y.scalingValue(R.top,t),[`--${s}-box-shadow-blur`]:y.scalingValue(R.right,t),[`--${s}-box-shadow-spread`]:y.scalingValue(R.bottom,t),[`--${s}-inner-box-shadow-x`]:y.scalingValue(A.left,t),[`--${s}-inner-box-shadow-y`]:y.scalingValue(A.top,t),[`--${s}-inner-box-shadow-blur`]:y.scalingValue(A.right,t),[`--${s}-inner-box-shadow-spread`]:y.scalingValue(A.bottom,t),paddingTop:y.scalingValue(M.top,t),paddingRight:y.scalingValue(M.right,t),paddingBottom:y.scalingValue(M.bottom,t),paddingLeft:y.scalingValue(M.left,t),borderRadius:y.scalingValue(L,t),borderWidth:y.scalingValue(E,t),...ue?{}:{justifyContent:Jr[se],textAlign:se},...ue&&!Ce?{gap:y.scalingValue(T,t)}:{},...re?{width:y.scalingValue(ce,t),height:y.scalingValue(j,t)}:{minWidth:y.scalingValue(U,t),minHeight:y.scalingValue(X,t),...ue?{width:"100%"}:{}}};let Te;const Se={display:"inline-flex",alignItems:"center",justifyContent:ue?Jr[se]:Jr[d==="a"?se:"center"],gap:ue?y.scalingValue(T,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:se}:{}};if(d==="b"){const ve=()=>ol(s,u,v>0?"fixed":"fill",100,v,t);Te=Ce?Qr(s,ve,`${s}-icon-roll`,void 0,Se):ve()}else if(d==="c"){const ve=()=>{const pe=r.jsx("span",{className:`${s}-text`,style:{textAlign:se},children:c}),Ae=ol(s,u,C>0?"fixed":"fill",100,C,t);return S==="icon-text"?r.jsxs(r.Fragment,{children:[Ae,pe]}):r.jsxs(r.Fragment,{children:[pe,Ae]})};Te=Ce?Qr(s,ve,`${s}-icon-text-roll`,void 0,Se):ve()}else Te=Ce?Qr(s,()=>c,`${s}-label-roll`,void 0,Se):be?r.jsx("span",{className:`${s}-button-inner`,children:c}):c;const q=le?ve=>by(ve,s):void 0,me=le?ve=>xy(ve,s):void 0;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),r.jsx("div",{className:`${s}-root`,style:ge,children:r.jsx("div",{className:`${s}-wrapper ${h} ${he}`.trim(),children:r.jsx("div",{className:`${s}-button ${Y}`.trim(),style:Fe,onMouseEnter:q,onMouseLeave:me,role:"button",tabIndex:o||t&&!n?void 0:0,children:Te})})})]})}const $y=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
16499
+ `}function Qr(e,t,n="",i,o){const s=t();return r.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[r.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:s}),r.jsxs("span",{className:`${e}-content-roll-viewport`,children:[r.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),r.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function ol(e,t,n="fill",i=100,o=0,s){if(!t)return null;const l=r.jsx(nn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return r.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const d=y.scalingValue(o,s);return r.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:l})}return r.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function Sy({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:s}=y.useScopedStyles(),l=a.useMemo(()=>wy(s),[s]),{type:d="a",label:c="Button",icon:u,alignment:m="center",alignA:w,order:S="text-icon",gap:T=0,iconSize:v=0,iconWidthC:C=0,dimensions:x=!1,padding:M={top:0,right:0,bottom:0,left:0},cornerRadius:L=0,boxShadow:R={top:0,left:0,right:0,bottom:0},boxShadowColor:Z="rgba(0, 0, 0, 0)",innerBoxShadow:P={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:Q="rgba(0, 0, 0, 0)",stroke:E=0,backgroundColor:I="#000000",textColor:W="#ffffff",borderColor:f="#ffffff",iconColor:b="#ffffff",hoverEffect:_="none",fontFamily:O,fontSettings:K,fontSize:G,lineHeight:J,letterSpacing:V=0,wordSpacing:N=0,textAppearance:H,stateOverrides:$,minWidth:U=0,minHeight:Y=0,width:se=0,height:j=0}=e,ge=y.buildColorVars(s,{backgroundColor:I,textColor:W,borderColor:f,iconColor:b,boxShadowColor:Z,innerBoxShadowColor:Q},yy,vy,$),h=i&&i!=="default"?`${s}-state-${i}`:"",ue=t&&!n?`${s}-editing`:"",X=_!=="none"&&(!t||n||i==="hover")?`${s}-hover-effect-${_}`:"",ve=_==="reveal"||_==="swipe",$e=_==="content-roll",ae=_==="reveal"&&(!t||n),re=x===!0,ne=d==="a"?w??m:m,ce=d==="c",Ne=d!=="b",be={fontSettings:{fontFamily:O,fontWeight:(K==null?void 0:K.fontWeight)??400,fontStyle:(K==null?void 0:K.fontStyle)??"normal"},fontSize:G??.01,lineHeight:J,letterSpacing:V,wordSpacing:N,textAppearance:H,color:W},_e={...Ne?cn(Xt(be,t)):{},[`--${s}-box-shadow-x`]:y.scalingValue(R.left,t),[`--${s}-box-shadow-y`]:y.scalingValue(R.top,t),[`--${s}-box-shadow-blur`]:y.scalingValue(R.right,t),[`--${s}-box-shadow-spread`]:y.scalingValue(R.bottom,t),[`--${s}-inner-box-shadow-x`]:y.scalingValue(P.left,t),[`--${s}-inner-box-shadow-y`]:y.scalingValue(P.top,t),[`--${s}-inner-box-shadow-blur`]:y.scalingValue(P.right,t),[`--${s}-inner-box-shadow-spread`]:y.scalingValue(P.bottom,t),paddingTop:y.scalingValue(M.top,t),paddingRight:y.scalingValue(M.right,t),paddingBottom:y.scalingValue(M.bottom,t),paddingLeft:y.scalingValue(M.left,t),borderRadius:y.scalingValue(L,t),borderWidth:y.scalingValue(E,t),...ce?{}:{justifyContent:Jr[ne],textAlign:ne},...ce&&!$e?{gap:y.scalingValue(T,t)}:{},...re?{width:y.scalingValue(se,t),height:y.scalingValue(j,t)}:{minWidth:y.scalingValue(U,t),minHeight:y.scalingValue(Y,t),...ce?{width:"100%"}:{}}};let Te;const we={display:"inline-flex",alignItems:"center",justifyContent:ce?Jr[ne]:Jr[d==="a"?ne:"center"],gap:ce?y.scalingValue(T,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:ne}:{}};if(d==="b"){const fe=()=>ol(s,u,v>0?"fixed":"fill",100,v,t);Te=$e?Qr(s,fe,`${s}-icon-roll`,void 0,we):fe()}else if(d==="c"){const fe=()=>{const le=r.jsx("span",{className:`${s}-text`,style:{textAlign:ne},children:c}),Pe=ol(s,u,C>0?"fixed":"fill",100,C,t);return S==="icon-text"?r.jsxs(r.Fragment,{children:[Pe,le]}):r.jsxs(r.Fragment,{children:[le,Pe]})};Te=$e?Qr(s,fe,`${s}-icon-text-roll`,void 0,we):fe()}else Te=$e?Qr(s,()=>c,`${s}-label-roll`,void 0,we):ve?r.jsx("span",{className:`${s}-button-inner`,children:c}):c;const q=ae?fe=>by(fe,s):void 0,pe=ae?fe=>xy(fe,s):void 0;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),r.jsx("div",{className:`${s}-root`,style:ge,children:r.jsx("div",{className:`${s}-wrapper ${h} ${ue}`.trim(),children:r.jsx("div",{className:`${s}-button ${X}`.trim(),style:_e,onMouseEnter:q,onMouseLeave:pe,role:"button",tabIndex:o||t&&!n?void 0:0,children:Te})})})]})}const $y=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
16500
16500
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
16501
16501
  import { CommonComponentProps } from '../props';
16502
16502
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
@@ -17321,7 +17321,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
17321
17321
  pointer-events: auto;
17322
17322
  flex-shrink: 0;
17323
17323
  }
17324
- `}const Cn=500,Zi=650,pn="cubic-bezier(0.22, 1, 0.36, 1)",Ey=72,My=50,ky=1e4,Py=650,Ay=500;function Fy(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function bc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=rr(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function Wy(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?bc(i,n):null}function _y(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.url&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function eo(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function rl(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return eo(e,i,n)}const Hy=.03;function xc(e){return e.width*Hy}const ea={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Vo(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function al(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Ny(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function fa(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function Oy(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:fa(e,t.width,t.height)}function jy(e,t){if(Lr(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function zy(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.url)||t.has(o.url)||(t.add(o.url),n.push(o))}return n}function By({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Lr(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function zi(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=xc(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function cr(e,t,n){const i=zi(e,t,n);return{...i,left:2*i.left-e.left}}function Dy(e,t,n){const{left:i,width:o}=n,s=xc(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function wc(e,t,n,i){const o=zi(e,"left",i),s=zi(e,"right",i),l=cr(e,"left",i),d=cr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Vy(e,t,n,i){const{start:o,end:s}=wc(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function Gy(e,t,n){const i=zi(e,t,n),o=cr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Lr(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function qy({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function Go({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Lr(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function Ky({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:m,layoutId:w,sourceRect:S,resolveCloseSourceRect:T,onClose:v,onPrev:C,onNext:x}){const M=a.useRef(null),L=a.useRef(null),R=a.useRef(null),J=a.useRef(new Map),[A,ee]=a.useState(0),E=a.useRef(null),I=a.useRef(0),F=a.useRef(0),f=a.useRef("none"),b=a.useRef(!1),W=a.useRef(!1),O=a.useRef(!1),K=a.useRef(null),G=a.useRef(null),Q=a.useRef(null),V=a.useRef(()=>{}),N=a.useRef(null),_=a.useRef(null),$=a.useRef(null),U=a.useRef(!1),[X,ce]=a.useState(null),[j,ge]=a.useState(ea),[h,he]=a.useState(0),[Y,be]=a.useState("opening"),[Ce,le]=a.useState(0),[re,D]=a.useState(0),[se,ue]=a.useState(!1),[_e,xe]=a.useState(null),[Pe,Fe]=a.useState(null),[Te,Se]=a.useState(null),[q,me]=a.useState(!1),[ve,pe]=a.useState(null),[Ae,$e]=a.useState(!1),z=a.useRef(!1),[de,ae]=a.useState(!1),[H,ie]=a.useState(!1),Ie=a.useRef(n),oe=a.useRef(void 0),P=t[n],He=P?Lr(P):!1,We=re!==0||se,et=!l&&(!s||!!d),Je=c&&!l,Le=u.length>1,Z=a.useCallback((g,fe)=>t.length<=1?null:t[(g+fe+t.length)%t.length]??null,[t]),ne=Le?eo(u,m,-1):Z(n,-1),Ne=Le?eo(u,m,1):Z(n,1),lt=_e===-1&&We?Le&&Pe!==null?eo(u,Pe,-1):Te!==null?Z(Te,-1):null:null,De=_e===1&&We?Le&&Pe!==null?eo(u,Pe,1):Te!==null?Z(Te,1):null:null,Oe=lt&&lt.url!==(ne==null?void 0:ne.url)?lt:null,Ue=De&&De.url!==(Ne==null?void 0:Ne.url)?De:null,ot=ne&&Je?(()=>{const g=Le?rl(u,m,-1):t.length>2?Z((n-1+t.length)%t.length,-1):null;return g&&g.url!==ne.url?g:null})():null,ct=Ne&&Je?(()=>{const g=Le?rl(u,m,1):t.length>2?Z((n+1)%t.length,1):null;return g&&g.url!==Ne.url?g:null})():null,gt=Oe??ot,Et=Ue??ct,ut=a.useCallback((g,fe,Ee)=>{if(!g||!fe||!Ee)return;const Me=J.current,it=Me.get(g);(it==null?void 0:it.width)===fe&&(it==null?void 0:it.height)===Ee||(Me.set(g,{width:fe,height:Ee}),ee(Pt=>Pt+1))},[]),bt=a.useCallback(g=>{if(!(g!=null&&g.url))return null;const fe=J.current.get(g.url);return Oy(L.current,fe)},[A,h]),Wt=a.useCallback(()=>{if(!P)return;const g=bt(P);if(g){ce(g);return}const fe=L.current;fe&&ce(al(fe))},[P,bt]),st=a.useCallback(g=>{if(Le){const fe=u.length;Fe((m+g+fe)%fe),Se(null);return}t.length>1&&(Se((n+g+t.length)%t.length),Fe(null))},[Le,u.length,m,t.length,n]),qe=a.useCallback(g=>{O.current=g,ue(g)},[]),ze=a.useCallback(()=>{K.current!==null&&(window.clearTimeout(K.current),K.current=null)},[]),yt=a.useCallback(()=>{ze(),K.current=window.setTimeout(()=>{ze(),qe(!1)},Zi+32)},[ze,qe]),xt=a.useCallback(()=>{const g=M.current;if(!g){ge({left:0,top:0,width:typeof window<"u"?window.innerWidth:ea.width,height:typeof window<"u"?window.innerHeight:ea.height});return}const fe=g.getBoundingClientRect();ge({left:fe.left,top:fe.top,width:fe.width,height:fe.height})},[]),kt=a.useCallback((g,fe)=>{if(We){if(de&&!se)return`translate(${re}px, 0px)`;if(se&&_e!==null){const Ee=bt(g);if(!Ee)return;const{x:Me,y:it}=Vy(Ee,fe,_e,j);return`translate(${Me}px, ${it}px)`}if(se)return"translate(0px, 0px)"}},[We,de,se,re,_e,j,bt]),jt=a.useCallback(()=>{const g=G.current;G.current=null,ze(),qe(!1),xe(null),Fe(null),Se(null),D(0),ae(!1),b.current=!1,F.current=0,f.current="none",g===-1?C():g===1&&x()},[ze,qe,C,x]),tn=a.useCallback(()=>{ze(),K.current=window.setTimeout(()=>{G.current!==null&&jt()},Zi+32)},[ze,jt]),sn=a.useCallback(()=>{ze(),G.current=null,qe(!1),xe(null),Fe(null),Se(null),D(0),ae(!1),b.current=!1,F.current=0,f.current="none"},[ze,qe]),Ct=a.useCallback(g=>{if(!(!Je||!X)){if(O.current){if(G.current===g){Q.current=g,jt();return}sn()}ze(),st(g),G.current=g,xe(g),qe(!0),tn()}},[Je,X,jt,sn,ze,st,qe,tn]);V.current=Ct;const Mt=a.useCallback(()=>{N.current=null,U.current=!1,_.current!==null&&(window.clearInterval(_.current),_.current=null),$.current!==null&&(window.clearTimeout($.current),$.current=null)},[]),Yt=a.useCallback(g=>{_.current!==null&&window.clearInterval(_.current);const fe=U.current?Ay:Py;_.current=window.setInterval(()=>{V.current(g)},fe)},[]),Gt=a.useCallback(g=>{N.current!==g&&(Mt(),N.current=g,U.current=!1,V.current(g),Yt(g),$.current=window.setTimeout(()=>{$.current=null,N.current===g&&(U.current=!0,Yt(g))},ky))},[Mt,Yt]),we=a.useCallback(()=>{const g=L.current;if(!g)return;const fe=P==null?void 0:P.url,Ee=fe?J.current.get(fe):void 0;if(Ee!=null&&Ee.width&&(Ee!=null&&Ee.height)){ce(fa(g,Ee.width,Ee.height));return}const Me=R.current;if(Me&&fe&&(Me.src===fe||Me.currentSrc===fe)){const{width:Pt,height:Ze}=Ny(Me);if(Pt&&Ze){ut(fe,Pt,Ze),ce(fa(g,Pt,Ze));return}}const it=al(g);!it.width||!it.height||ce(it)},[P==null?void 0:P.url,ut]),Ve=a.useCallback(g=>{if(R.current=g,!!g){if(g instanceof HTMLVideoElement){g.readyState>=1&&g.videoWidth>0&&we();return}g.complete&&g.naturalWidth>0&&we()}},[we]),Ge=a.useCallback(()=>{xt(),we(),he(g=>g+1)},[xt,we]);a.useEffect(()=>{Ge();const g=L.current,fe=M.current,Ee=new ResizeObserver(()=>Ge());return g&&Ee.observe(g),fe&&Ee.observe(fe),window.addEventListener("resize",Ge),()=>{Ee.disconnect(),window.removeEventListener("resize",Ge)}},[Ge,n,w]),a.useLayoutEffect(()=>{if(!P)return;const g=R.current;if(g){if(g instanceof HTMLImageElement&&g.complete&&g.naturalWidth>0){we();return}g instanceof HTMLVideoElement&&g.readyState>=1&&g.videoWidth>0&&we()}},[P==null?void 0:P.url,n,we]),a.useEffect(()=>{Wt()},[Wt,A]),a.useEffect(()=>{const g=new Set,fe=[],Ee=Me=>{!(Me!=null&&Me.url)||g.has(Me.url)||(g.add(Me.url),fe.push(Me))};t.forEach(Ee),u.forEach(Me=>Me.items.forEach(Ee)),fe.forEach(Me=>{J.current.has(Me.url)||jy(Me,ut)})},[t,u,ut]),a.useEffect(()=>{if(Y!=="opening"||!X)return;if(!S){be("open");return}me(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{me(!0),be("open")})});return()=>cancelAnimationFrame(g)},[Y,X,S]),a.useEffect(()=>{if(Y!=="closing")return;const g=setTimeout(()=>v(),Cn);return()=>clearTimeout(g)},[Y,v]),a.useEffect(()=>()=>{ze()},[ze]),a.useLayoutEffect(()=>{Ie.current===n&&oe.current===(P==null?void 0:P.url)||(ze(),G.current=null,xe(null),Fe(null),Se(null),le(0),D(0),qe(!1),ie(!1),ae(!1),I.current=0,F.current=0,f.current="none",b.current=!1,E.current=null,W.current=!1,R.current=null,Wt(),Ie.current=n,oe.current=P==null?void 0:P.url)},[n,P==null?void 0:P.url,qe,ze,Wt]),a.useLayoutEffect(()=>{const g=Q.current;g!==null&&(Q.current=null,requestAnimationFrame(()=>{V.current(g)}))},[n,m,P==null?void 0:P.url]),a.useLayoutEffect(()=>{if(Y==="opening"){z.current=!1,$e(!1);return}if(Y!=="open"||z.current)return;if(!ne&&!Ne){z.current=!0;return}$e(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{$e(!0),z.current=!0})});return()=>cancelAnimationFrame(g)},[Y,ne==null?void 0:ne.url,Ne==null?void 0:Ne.url]),a.useEffect(()=>{if(Y!=="open")return;const g=()=>{const Ze=pt=>{pt.stopPropagation(),pt.preventDefault(),document.removeEventListener("click",Ze,!0)};document.addEventListener("click",Ze,!0)},fe=Ze=>{const pt=Ze<0?1:-1;ze(),st(pt),G.current=pt,xe(pt),qe(!0),tn()},Ee=Ze=>{if(Math.abs(Ze)>My&&Je){fe(Ze);return}G.current=null,xe(null),Fe(null),Se(null),qe(!0),D(0),yt()},Me=Ze=>{if(Ze.touches.length!==1||O.current)return;const pt=Ze.touches[0];W.current=!0,E.current={x:pt.clientX,y:pt.clientY},f.current="none",F.current=0,b.current=!1},it=Ze=>{if(!E.current||Ze.touches.length!==1||O.current)return;const pt=Ze.touches[0],_t=pt.clientX-E.current.x,Rt=pt.clientY-E.current.y;if(f.current==="none"){if(Math.abs(_t)<10&&Math.abs(Rt)<10)return;if(Math.abs(_t)>Math.abs(Rt)){if(!Je)return;f.current="horizontal"}else if(Rt>0){if(!et)return;f.current="vertical"}else return}if(f.current==="horizontal"){b.current=!0,ae(!0),F.current=_t,D(_t),Ze.preventDefault();return}f.current==="vertical"&&(b.current=!0,ae(!0),I.current=Rt,le(Rt),Ze.preventDefault())},Pt=()=>{if(!E.current)return;const Ze=f.current,pt=b.current;if(pt&&Ze==="horizontal")Ee(F.current),g();else if(pt&&Ze==="vertical"){const _t=I.current;if(et&&_t>Ey){const Rt=window.innerHeight;I.current=Rt,ie(!0),le(Rt),be("closing")}else I.current=0,le(0);g()}else Ze==="horizontal"&&Math.abs(F.current)>0&&(Ee(F.current),g());E.current=null,f.current="none",F.current=0,b.current=!1,ae(!1)};return document.addEventListener("touchstart",Me,{passive:!0}),document.addEventListener("touchmove",it,{passive:!1}),document.addEventListener("touchend",Pt),document.addEventListener("touchcancel",Pt),()=>{document.removeEventListener("touchstart",Me),document.removeEventListener("touchmove",it),document.removeEventListener("touchend",Pt),document.removeEventListener("touchcancel",Pt)}},[Y,Je,qe,yt,ze,et,tn,st]);const rt=a.useCallback(()=>{const g=(T==null?void 0:T())??S??null;g&&X&&(pe(g),me(!0)),be("closing")},[T,S,X]);a.useEffect(()=>{const g=Me=>{if(Me.key==="Escape"){if(s&&d||Y==="closing")return;Mt(),rt();return}if(Me.key!=="ArrowLeft"&&Me.key!=="ArrowRight"||Y!=="open"||!Je)return;Me.preventDefault();const it=Me.key==="ArrowLeft"?-1:1;Me.repeat&&N.current===it||Gt(it)},fe=Me=>{if(Me.key!=="ArrowLeft"&&Me.key!=="ArrowRight")return;const it=Me.key==="ArrowLeft"?-1:1;N.current===it&&Mt()},Ee=()=>{Mt()};return window.addEventListener("keydown",g),window.addEventListener("keyup",fe),window.addEventListener("blur",Ee),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",fe),window.removeEventListener("blur",Ee),Mt()}},[Y,s,d,rt,Je,Gt,Mt]),a.useEffect(()=>{Y!=="open"&&Mt()},[Y,Mt]);const It=()=>{Y==="closing"||l||rt()},dt=Y==="open",Qe=Y==="closing",qt=Ce>0?Math.max(0,1-Ce/500):1,Xe=Ce>0?Math.max(.35,1-Ce/500):1,Ye=a.useCallback(g=>{if(!(g.propertyName!=="transform"||!O.current)){if(G.current!==null){jt();return}ze(),qe(!1)}},[ze,qe,jt]),nt=Y==="closing"?ve??S:S,Tt=nt&&X&&(Y==="opening"||Qe)?Fy(nt,X):void 0,Lt=We&&P?kt(P,"center"):Ce>0?`translateY(${Ce}px)`:Tt,ht=X?Vo(X,j):null,At=!!(nt&&X),Ot=At&&(Y==="closing"||Y==="open"&&q),Nt={position:"absolute",top:ht==null?void 0:ht.top,left:ht==null?void 0:ht.left,width:ht==null?void 0:ht.width,height:ht==null?void 0:ht.height,objectFit:"contain",transformOrigin:"top left",transform:Lt,opacity:Ce>0?Xe:At?1:Y==="opening"||Qe?0:1,transition:de&&!se?"none":se?`transform ${Zi}ms ${pn}`:H?`transform ${Cn}ms ${pn}, opacity ${Cn}ms ${pn}`:Ot?`transform ${Cn}ms ${pn}`:Y==="opening"||Qe?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:He&&dt&&!We?"auto":"none",touchAction:He&&dt?"none":void 0,zIndex:1,overflow:He?"hidden":void 0},Dt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:dt&&!We?"auto":"none"},vt=(g,fe,Ee="adjacent")=>{const Me=bt(g);if(!Me)return{display:"none"};const it=Ee==="far"?fe==="left"?"far-left":"far-right":fe==="left"?"left-adjacent":"right-adjacent",{start:Pt}=_e!==null?wc(Me,it,_e,j):{start:Ee==="far"?cr(Me,fe,j):zi(Me,fe,j)},Ze=Vo(Pt,j),pt=kt(g,it),_t=!We&&Ee==="adjacent"&&dt&&!Ae?Gy(Me,fe,j):null,Rt=Ee==="far"&&We&&_e===(fe==="left"?-1:1),ln=de&&!se?!1:se,dn=Ee==="adjacent"&&dt&&Ae&&!We;return{position:"absolute",top:Ze.top,left:Ze.left,width:Ze.width,height:Ze.height,objectFit:"contain",transform:pt??(_t?`translate(${_t.x}px, ${_t.y}px)`:void 0),opacity:Ee==="far"?dt&&Rt?1:0:dt?1:0,transition:ln?Ee==="far"?`transform ${Zi}ms ${pn}`:`transform ${Zi}ms ${pn}, opacity ${Cn}ms ${pn}`:dn?`transform ${Cn}ms ${pn}`:Y==="opening"||Qe?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:"none",zIndex:1}},Vt=(g,fe)=>{const Ee=bt(g);return Ee?Dy(zi(Ee,fe,j),fe,j):null},Kt=g=>fe=>{if(!l){if(W.current){W.current=!1;return}fe.stopPropagation(),Ct(g)}},Ut=ne?Vt(ne,"left"):null,Zt=Ne?Vt(Ne,"right"):null,zt=Ut?Vo(Ut,j):null,wt=Zt?Vo(Zt,j):null;return r.jsxs("div",{ref:M,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:Y==="open"?"none":void 0},onClick:It,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:dt?qt:0,transition:de?"none":`opacity ${Cn}ms ${pn}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:L,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:dt?1:0,transition:de?"none":`opacity ${Cn}ms ${pn}`,pointerEvents:"none"},children:r.jsx(tc,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:It})})]}),dt&&gt&&r.jsx(Go,{media:gt,style:vt(gt,"left","far"),onMeasure:ut,onTransitionEnd:Ye},`far-prev-${gt.url}`),dt&&ne&&r.jsxs(r.Fragment,{children:[r.jsx(Go,{media:ne,style:vt(ne,"left"),onMeasure:ut,onTransitionEnd:Ye},`prev-${ne.url}`),zt&&r.jsx("div",{style:{position:"absolute",top:zt.top,left:zt.left,width:zt.width,height:zt.height,cursor:l||de?"default":"pointer",pointerEvents:l||de?"none":"auto",zIndex:3},onClick:Kt(-1)})]}),dt&&Ne&&r.jsxs(r.Fragment,{children:[r.jsx(Go,{media:Ne,style:vt(Ne,"right"),onMeasure:ut,onTransitionEnd:Ye},`next-${Ne.url}`),wt&&r.jsx("div",{style:{position:"absolute",top:wt.top,left:wt.left,width:wt.width,height:wt.height,cursor:l||de?"default":"pointer",pointerEvents:l||de?"none":"auto",zIndex:3},onClick:Kt(1)})]}),dt&&Et&&r.jsx(Go,{media:Et,style:vt(Et,"right","far"),onMeasure:ut,onTransitionEnd:Ye},`far-next-${Et.url}`),X&&P&&(He?r.jsx(qy,{src:P.url,phase:Y,onMediaElement:Ve,wrapperStyle:Nt,videoStyle:Dt,onLoadedMetadata:we,onTransitionEnd:Ye},`${n}-${P.url}`):r.jsx("img",{ref:Ve,src:P.url,alt:P.name,onLoad:we,onTransitionEnd:Ye,style:Nt},`${n}-${P.url}`))]})}const Uy=20,Xy=.18;function Yy(e){return`
17324
+ `}const Cn=500,Zi=650,pn="cubic-bezier(0.22, 1, 0.36, 1)",Ey=72,My=50,ky=1e4,Py=650,Ay=500;function Fy(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function bc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=rr(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function Wy(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?bc(i,n):null}function _y(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.url&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function eo(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function rl(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return eo(e,i,n)}const Hy=.03;function xc(e){return e.width*Hy}const ea={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Vo(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function al(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Ny(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function fa(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function Oy(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:fa(e,t.width,t.height)}function jy(e,t){if(Lr(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function zy(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.url)||t.has(o.url)||(t.add(o.url),n.push(o))}return n}function By({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Lr(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function zi(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=xc(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function cr(e,t,n){const i=zi(e,t,n);return{...i,left:2*i.left-e.left}}function Dy(e,t,n){const{left:i,width:o}=n,s=xc(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function wc(e,t,n,i){const o=zi(e,"left",i),s=zi(e,"right",i),l=cr(e,"left",i),d=cr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Vy(e,t,n,i){const{start:o,end:s}=wc(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function Gy(e,t,n){const i=zi(e,t,n),o=cr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Lr(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function qy({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function Go({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Lr(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function Ky({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:m,layoutId:w,sourceRect:S,resolveCloseSourceRect:T,onClose:v,onPrev:C,onNext:x}){const M=a.useRef(null),L=a.useRef(null),R=a.useRef(null),Z=a.useRef(new Map),[P,Q]=a.useState(0),E=a.useRef(null),I=a.useRef(0),W=a.useRef(0),f=a.useRef("none"),b=a.useRef(!1),_=a.useRef(!1),O=a.useRef(!1),K=a.useRef(null),G=a.useRef(null),J=a.useRef(null),V=a.useRef(()=>{}),N=a.useRef(null),H=a.useRef(null),$=a.useRef(null),U=a.useRef(!1),[Y,se]=a.useState(null),[j,ge]=a.useState(ea),[h,ue]=a.useState(0),[X,ve]=a.useState("opening"),[$e,ae]=a.useState(0),[re,D]=a.useState(0),[ne,ce]=a.useState(!1),[Ne,be]=a.useState(null),[We,_e]=a.useState(null),[Te,we]=a.useState(null),[q,pe]=a.useState(!1),[fe,le]=a.useState(null),[Pe,Le]=a.useState(!1),z=a.useRef(!1),[de,ie]=a.useState(!1),[F,ee]=a.useState(!1),Ie=a.useRef(n),oe=a.useRef(void 0),A=t[n],Oe=A?Lr(A):!1,Ae=re!==0||ne,rt=!l&&(!s||!!d),et=c&&!l,Ce=u.length>1,He=a.useCallback((g,he)=>t.length<=1?null:t[(g+he+t.length)%t.length]??null,[t]),ze=Ce?eo(u,m,-1):He(n,-1),me=Ce?eo(u,m,1):He(n,1),Se=Ne===-1&&Ae?Ce&&We!==null?eo(u,We,-1):Te!==null?He(Te,-1):null:null,je=Ne===1&&Ae?Ce&&We!==null?eo(u,We,1):Te!==null?He(Te,1):null:null,Me=Se&&Se.url!==(ze==null?void 0:ze.url)?Se:null,Ge=je&&je.url!==(me==null?void 0:me.url)?je:null,tt=ze&&et?(()=>{const g=Ce?rl(u,m,-1):t.length>2?He((n-1+t.length)%t.length,-1):null;return g&&g.url!==ze.url?g:null})():null,Ke=me&&et?(()=>{const g=Ce?rl(u,m,1):t.length>2?He((n+1)%t.length,1):null;return g&&g.url!==me.url?g:null})():null,ut=Me??tt,ht=Ge??Ke,it=a.useCallback((g,he,Ee)=>{if(!g||!he||!Ee)return;const ke=Z.current,st=ke.get(g);(st==null?void 0:st.width)===he&&(st==null?void 0:st.height)===Ee||(ke.set(g,{width:he,height:Ee}),Q(Pt=>Pt+1))},[]),xt=a.useCallback(g=>{if(!(g!=null&&g.url))return null;const he=Z.current.get(g.url);return Oy(L.current,he)},[P,h]),Wt=a.useCallback(()=>{if(!A)return;const g=xt(A);if(g){se(g);return}const he=L.current;he&&se(al(he))},[A,xt]),dt=a.useCallback(g=>{if(Ce){const he=u.length;_e((m+g+he)%he),we(null);return}t.length>1&&(we((n+g+t.length)%t.length),_e(null))},[Ce,u.length,m,t.length,n]),Xe=a.useCallback(g=>{O.current=g,ce(g)},[]),De=a.useCallback(()=>{K.current!==null&&(window.clearTimeout(K.current),K.current=null)},[]),vt=a.useCallback(()=>{De(),K.current=window.setTimeout(()=>{De(),Xe(!1)},Zi+32)},[De,Xe]),wt=a.useCallback(()=>{const g=M.current;if(!g){ge({left:0,top:0,width:typeof window<"u"?window.innerWidth:ea.width,height:typeof window<"u"?window.innerHeight:ea.height});return}const he=g.getBoundingClientRect();ge({left:he.left,top:he.top,width:he.width,height:he.height})},[]),kt=a.useCallback((g,he)=>{if(Ae){if(de&&!ne)return`translate(${re}px, 0px)`;if(ne&&Ne!==null){const Ee=xt(g);if(!Ee)return;const{x:ke,y:st}=Vy(Ee,he,Ne,j);return`translate(${ke}px, ${st}px)`}if(ne)return"translate(0px, 0px)"}},[Ae,de,ne,re,Ne,j,xt]),jt=a.useCallback(()=>{const g=G.current;G.current=null,De(),Xe(!1),be(null),_e(null),we(null),D(0),ie(!1),b.current=!1,W.current=0,f.current="none",g===-1?C():g===1&&x()},[De,Xe,C,x]),tn=a.useCallback(()=>{De(),K.current=window.setTimeout(()=>{G.current!==null&&jt()},Zi+32)},[De,jt]),sn=a.useCallback(()=>{De(),G.current=null,Xe(!1),be(null),_e(null),we(null),D(0),ie(!1),b.current=!1,W.current=0,f.current="none"},[De,Xe]),Tt=a.useCallback(g=>{if(!(!et||!Y)){if(O.current){if(G.current===g){J.current=g,jt();return}sn()}De(),dt(g),G.current=g,be(g),Xe(!0),tn()}},[et,Y,jt,sn,De,dt,Xe,tn]);V.current=Tt;const Mt=a.useCallback(()=>{N.current=null,U.current=!1,H.current!==null&&(window.clearInterval(H.current),H.current=null),$.current!==null&&(window.clearTimeout($.current),$.current=null)},[]),Yt=a.useCallback(g=>{H.current!==null&&window.clearInterval(H.current);const he=U.current?Ay:Py;H.current=window.setInterval(()=>{V.current(g)},he)},[]),Gt=a.useCallback(g=>{N.current!==g&&(Mt(),N.current=g,U.current=!1,V.current(g),Yt(g),$.current=window.setTimeout(()=>{$.current=null,N.current===g&&(U.current=!0,Yt(g))},ky))},[Mt,Yt]),xe=a.useCallback(()=>{const g=L.current;if(!g)return;const he=A==null?void 0:A.url,Ee=he?Z.current.get(he):void 0;if(Ee!=null&&Ee.width&&(Ee!=null&&Ee.height)){se(fa(g,Ee.width,Ee.height));return}const ke=R.current;if(ke&&he&&(ke.src===he||ke.currentSrc===he)){const{width:Pt,height:Qe}=Ny(ke);if(Pt&&Qe){it(he,Pt,Qe),se(fa(g,Pt,Qe));return}}const st=al(g);!st.width||!st.height||se(st)},[A==null?void 0:A.url,it]),qe=a.useCallback(g=>{if(R.current=g,!!g){if(g instanceof HTMLVideoElement){g.readyState>=1&&g.videoWidth>0&&xe();return}g.complete&&g.naturalWidth>0&&xe()}},[xe]),Ue=a.useCallback(()=>{wt(),xe(),ue(g=>g+1)},[wt,xe]);a.useEffect(()=>{Ue();const g=L.current,he=M.current,Ee=new ResizeObserver(()=>Ue());return g&&Ee.observe(g),he&&Ee.observe(he),window.addEventListener("resize",Ue),()=>{Ee.disconnect(),window.removeEventListener("resize",Ue)}},[Ue,n,w]),a.useLayoutEffect(()=>{if(!A)return;const g=R.current;if(g){if(g instanceof HTMLImageElement&&g.complete&&g.naturalWidth>0){xe();return}g instanceof HTMLVideoElement&&g.readyState>=1&&g.videoWidth>0&&xe()}},[A==null?void 0:A.url,n,xe]),a.useEffect(()=>{Wt()},[Wt,P]),a.useEffect(()=>{const g=new Set,he=[],Ee=ke=>{!(ke!=null&&ke.url)||g.has(ke.url)||(g.add(ke.url),he.push(ke))};t.forEach(Ee),u.forEach(ke=>ke.items.forEach(Ee)),he.forEach(ke=>{Z.current.has(ke.url)||jy(ke,it)})},[t,u,it]),a.useEffect(()=>{if(X!=="opening"||!Y)return;if(!S){ve("open");return}pe(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{pe(!0),ve("open")})});return()=>cancelAnimationFrame(g)},[X,Y,S]),a.useEffect(()=>{if(X!=="closing")return;const g=setTimeout(()=>v(),Cn);return()=>clearTimeout(g)},[X,v]),a.useEffect(()=>()=>{De()},[De]),a.useLayoutEffect(()=>{Ie.current===n&&oe.current===(A==null?void 0:A.url)||(De(),G.current=null,be(null),_e(null),we(null),ae(0),D(0),Xe(!1),ee(!1),ie(!1),I.current=0,W.current=0,f.current="none",b.current=!1,E.current=null,_.current=!1,R.current=null,Wt(),Ie.current=n,oe.current=A==null?void 0:A.url)},[n,A==null?void 0:A.url,Xe,De,Wt]),a.useLayoutEffect(()=>{const g=J.current;g!==null&&(J.current=null,requestAnimationFrame(()=>{V.current(g)}))},[n,m,A==null?void 0:A.url]),a.useLayoutEffect(()=>{if(X==="opening"){z.current=!1,Le(!1);return}if(X!=="open"||z.current)return;if(!ze&&!me){z.current=!0;return}Le(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Le(!0),z.current=!0})});return()=>cancelAnimationFrame(g)},[X,ze==null?void 0:ze.url,me==null?void 0:me.url]),a.useEffect(()=>{if(X!=="open")return;const g=()=>{const Qe=mt=>{mt.stopPropagation(),mt.preventDefault(),document.removeEventListener("click",Qe,!0)};document.addEventListener("click",Qe,!0)},he=Qe=>{const mt=Qe<0?1:-1;De(),dt(mt),G.current=mt,be(mt),Xe(!0),tn()},Ee=Qe=>{if(Math.abs(Qe)>My&&et){he(Qe);return}G.current=null,be(null),_e(null),we(null),Xe(!0),D(0),vt()},ke=Qe=>{if(Qe.touches.length!==1||O.current)return;const mt=Qe.touches[0];_.current=!0,E.current={x:mt.clientX,y:mt.clientY},f.current="none",W.current=0,b.current=!1},st=Qe=>{if(!E.current||Qe.touches.length!==1||O.current)return;const mt=Qe.touches[0],_t=mt.clientX-E.current.x,Et=mt.clientY-E.current.y;if(f.current==="none"){if(Math.abs(_t)<10&&Math.abs(Et)<10)return;if(Math.abs(_t)>Math.abs(Et)){if(!et)return;f.current="horizontal"}else if(Et>0){if(!rt)return;f.current="vertical"}else return}if(f.current==="horizontal"){b.current=!0,ie(!0),W.current=_t,D(_t),Qe.preventDefault();return}f.current==="vertical"&&(b.current=!0,ie(!0),I.current=Et,ae(Et),Qe.preventDefault())},Pt=()=>{if(!E.current)return;const Qe=f.current,mt=b.current;if(mt&&Qe==="horizontal")Ee(W.current),g();else if(mt&&Qe==="vertical"){const _t=I.current;if(rt&&_t>Ey){const Et=window.innerHeight;I.current=Et,ee(!0),ae(Et),ve("closing")}else I.current=0,ae(0);g()}else Qe==="horizontal"&&Math.abs(W.current)>0&&(Ee(W.current),g());E.current=null,f.current="none",W.current=0,b.current=!1,ie(!1)};return document.addEventListener("touchstart",ke,{passive:!0}),document.addEventListener("touchmove",st,{passive:!1}),document.addEventListener("touchend",Pt),document.addEventListener("touchcancel",Pt),()=>{document.removeEventListener("touchstart",ke),document.removeEventListener("touchmove",st),document.removeEventListener("touchend",Pt),document.removeEventListener("touchcancel",Pt)}},[X,et,Xe,vt,De,rt,tn,dt]);const lt=a.useCallback(()=>{const g=(T==null?void 0:T())??S??null;g&&Y&&(le(g),pe(!0)),ve("closing")},[T,S,Y]);a.useEffect(()=>{const g=ke=>{if(ke.key==="Escape"){if(s&&d||X==="closing")return;Mt(),lt();return}if(ke.key!=="ArrowLeft"&&ke.key!=="ArrowRight"||X!=="open"||!et)return;ke.preventDefault();const st=ke.key==="ArrowLeft"?-1:1;ke.repeat&&N.current===st||Gt(st)},he=ke=>{if(ke.key!=="ArrowLeft"&&ke.key!=="ArrowRight")return;const st=ke.key==="ArrowLeft"?-1:1;N.current===st&&Mt()},Ee=()=>{Mt()};return window.addEventListener("keydown",g),window.addEventListener("keyup",he),window.addEventListener("blur",Ee),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",he),window.removeEventListener("blur",Ee),Mt()}},[X,s,d,lt,et,Gt,Mt]),a.useEffect(()=>{X!=="open"&&Mt()},[X,Mt]);const Rt=()=>{X==="closing"||l||lt()},pt=X==="open",nt=X==="closing",qt=$e>0?Math.max(0,1-$e/500):1,Ze=$e>0?Math.max(.35,1-$e/500):1,Je=a.useCallback(g=>{if(!(g.propertyName!=="transform"||!O.current)){if(G.current!==null){jt();return}De(),Xe(!1)}},[De,Xe,jt]),at=X==="closing"?fe??S:S,Lt=at&&Y&&(X==="opening"||nt)?Fy(at,Y):void 0,It=Ae&&A?kt(A,"center"):$e>0?`translateY(${$e}px)`:Lt,ft=Y?Vo(Y,j):null,At=!!(at&&Y),Ot=At&&(X==="closing"||X==="open"&&q),Nt={position:"absolute",top:ft==null?void 0:ft.top,left:ft==null?void 0:ft.left,width:ft==null?void 0:ft.width,height:ft==null?void 0:ft.height,objectFit:"contain",transformOrigin:"top left",transform:It,opacity:$e>0?Ze:At?1:X==="opening"||nt?0:1,transition:de&&!ne?"none":ne?`transform ${Zi}ms ${pn}`:F?`transform ${Cn}ms ${pn}, opacity ${Cn}ms ${pn}`:Ot?`transform ${Cn}ms ${pn}`:X==="opening"||nt?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:Oe&&pt&&!Ae?"auto":"none",touchAction:Oe&&pt?"none":void 0,zIndex:1,overflow:Oe?"hidden":void 0},Dt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:pt&&!Ae?"auto":"none"},bt=(g,he,Ee="adjacent")=>{const ke=xt(g);if(!ke)return{display:"none"};const st=Ee==="far"?he==="left"?"far-left":"far-right":he==="left"?"left-adjacent":"right-adjacent",{start:Pt}=Ne!==null?wc(ke,st,Ne,j):{start:Ee==="far"?cr(ke,he,j):zi(ke,he,j)},Qe=Vo(Pt,j),mt=kt(g,st),_t=!Ae&&Ee==="adjacent"&&pt&&!Pe?Gy(ke,he,j):null,Et=Ee==="far"&&Ae&&Ne===(he==="left"?-1:1),ln=de&&!ne?!1:ne,dn=Ee==="adjacent"&&pt&&Pe&&!Ae;return{position:"absolute",top:Qe.top,left:Qe.left,width:Qe.width,height:Qe.height,objectFit:"contain",transform:mt??(_t?`translate(${_t.x}px, ${_t.y}px)`:void 0),opacity:Ee==="far"?pt&&Et?1:0:pt?1:0,transition:ln?Ee==="far"?`transform ${Zi}ms ${pn}`:`transform ${Zi}ms ${pn}, opacity ${Cn}ms ${pn}`:dn?`transform ${Cn}ms ${pn}`:X==="opening"||nt?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:"none",zIndex:1}},Vt=(g,he)=>{const Ee=xt(g);return Ee?Dy(zi(Ee,he,j),he,j):null},Kt=g=>he=>{if(!l){if(_.current){_.current=!1;return}he.stopPropagation(),Tt(g)}},Ut=ze?Vt(ze,"left"):null,Zt=me?Vt(me,"right"):null,zt=Ut?Vo(Ut,j):null,St=Zt?Vo(Zt,j):null;return r.jsxs("div",{ref:M,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:X==="open"?"none":void 0},onClick:Rt,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:pt?qt:0,transition:de?"none":`opacity ${Cn}ms ${pn}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:L,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:pt?1:0,transition:de?"none":`opacity ${Cn}ms ${pn}`,pointerEvents:"none"},children:r.jsx(tc,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:Rt})})]}),pt&&ut&&r.jsx(Go,{media:ut,style:bt(ut,"left","far"),onMeasure:it,onTransitionEnd:Je},`far-prev-${ut.url}`),pt&&ze&&r.jsxs(r.Fragment,{children:[r.jsx(Go,{media:ze,style:bt(ze,"left"),onMeasure:it,onTransitionEnd:Je},`prev-${ze.url}`),zt&&r.jsx("div",{style:{position:"absolute",top:zt.top,left:zt.left,width:zt.width,height:zt.height,cursor:l||de?"default":"pointer",pointerEvents:l||de?"none":"auto",zIndex:3},onClick:Kt(-1)})]}),pt&&me&&r.jsxs(r.Fragment,{children:[r.jsx(Go,{media:me,style:bt(me,"right"),onMeasure:it,onTransitionEnd:Je},`next-${me.url}`),St&&r.jsx("div",{style:{position:"absolute",top:St.top,left:St.left,width:St.width,height:St.height,cursor:l||de?"default":"pointer",pointerEvents:l||de?"none":"auto",zIndex:3},onClick:Kt(1)})]}),pt&&ht&&r.jsx(Go,{media:ht,style:bt(ht,"right","far"),onMeasure:it,onTransitionEnd:Je},`far-next-${ht.url}`),Y&&A&&(Oe?r.jsx(qy,{src:A.url,phase:X,onMediaElement:qe,wrapperStyle:Nt,videoStyle:Dt,onLoadedMetadata:xe,onTransitionEnd:Je},`${n}-${A.url}`):r.jsx("img",{ref:qe,src:A.url,alt:A.name,onLoad:xe,onTransitionEnd:Je,style:Nt},`${n}-${A.url}`))]})}const Uy=20,Xy=.18;function Yy(e){return`
17325
17325
  .${e}-wrapper {
17326
17326
  box-sizing: border-box;
17327
17327
  max-width: 100%;
@@ -17409,7 +17409,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
17409
17409
  pointer-events: auto;
17410
17410
  }
17411
17411
  ${Ry(e)}
17412
- `}function Zy(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,s]=n.split(":").map(Number),l=i?s:o,d=i?o:s;return d>0?l/d:1}function Jy(e){const t=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,n=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight;return!t||!n?null:t/n}function Qy(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:y.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:y.scalingValue(i*Xy,n??!1),[`--${t}-image-aspect`]:Zy(e)}}function ev(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.07,lineHeight:e==null?void 0:e.titleLineHeight,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,color:(e==null?void 0:e.titleColor)??"#000000"};return Xt(n,t)}function tv(e){var o;const t=((o=e==null?void 0:e.imageDisplay)==null?void 0:o.display)==="cover",n=((e==null?void 0:e.lightbox)??"on")==="on",i={objectFit:t?"cover":"contain",pointerEvents:"auto",...n?{cursor:"pointer"}:null};return{objectFitMode:t?"cover":"contain",imageStyle:i}}function nv(e,t,n,i,o,s){if(!(!e||!t))return l=>{var c;const d=((c=l.currentTarget.closest(`.${i}-item`))==null?void 0:c.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);s(n,d?bc(d,o):void 0)}}function iv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=y.useScopedStyles(),c=a.useMemo(()=>Yy(d),[d]),u=t??[],m=(e==null?void 0:e.type)??"a",w=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,S=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,T=y.scalingValue(S,n??!1),v=`max(${T}, ${Uy}px)`,{objectFitMode:C,imageStyle:x}=tv(e),M=ev(e,n),L=a.useRef(null),[R,J]=a.useState(!1),[A,ee]=a.useState([]),[E,I]=a.useState(0),[F,f]=a.useState(0),[b,W]=a.useState(null),[O,K]=a.useState({title1:"",title2:"",title3:""}),G=(!n||i)&&!R,Q=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},V=Q.sizeType??"none",N=G&&V!=="none"?`${d}-item-image-hover-${V}`:void 0,_=(Q.value??120)/100,$=a.useCallback(re=>{!re||V!=="scale"||(re.style.transformOrigin=Ep(re))},[V]),U=a.useCallback(re=>{if(re){if(C==="contain"){const D=Jy(re);if(D){const se=re.closest(`.${d}-item-image`);se instanceof HTMLElement&&se.style.setProperty(`--${d}-item-media-aspect`,String(D))}}$(re)}},[d,$,C]),X={width:y.scalingValue(w,n??!1),...M,...Qy(e,d,n),[`--${d}-image-hover-scale`]:String(_)},ce=(()=>{const re={},D=L.current?getComputedStyle(L.current).getPropertyValue("--cntrl-article-width").trim():"";return D&&(re["--cntrl-article-width"]=D),re})(),j=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),ge=a.useMemo(()=>_y(u),[u]),h=a.useMemo(()=>zy(u),[u]),he=(re,D)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const se=ge.findIndex(_e=>_e.gridIndex===re);if(se<0)return;const ue=ge[se];f(se),ee(ue.items),I(0),K(ue.entry),W(D??null),J(!0)},Y=a.useCallback(()=>{J(!1),W(null)},[]),be=a.useCallback(()=>{const re=ge[F];return!re||!L.current?b:Wy(L.current,re.gridIndex,C)??b},[ge,F,b,C]),Ce=a.useCallback(re=>{if(ge.length>1){const D=ge.length,se=(F+re+D)%D,ue=ge[se];f(se),ee(ue.items),I(0),K(ue.entry);return}I(D=>(D+re+A.length)%A.length)},[ge,F,A.length]),le=ge.length>1||A.length>1;return a.useEffect(()=>{if(!R||typeof document>"u")return;const re=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=re}},[R]),a.useEffect(()=>{!n||o||i||J(!1)},[n,o,i]),a.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&J(!1)},[e==null?void 0:e.lightbox]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),r.jsx(By,{mediaList:h}),r.jsx("div",{ref:L,className:`${d}-wrapper ${d}-type-${m}`,style:X,children:u.map((re,D)=>{var _e,xe;const se=!!((_e=re.image)!=null&&_e.url),ue=nv(!!j,se,D,d,C,he);return r.jsxs("div",{className:`${d}-item`,children:[re.title?r.jsx("span",{className:`${d}-item-title`,onClick:ue,style:ue?{cursor:"pointer"}:void 0,children:re.title}):null,(xe=re.image)!=null&&xe.url?r.jsx("span",{className:[`${d}-item-image`,C==="contain"?`${d}-item-image-fit`:void 0,N].filter(Boolean).join(" "),children:re.image.type==="video"?r.jsx("video",{ref:U,src:re.image.url,"data-waterfall-index":D,style:x,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:ue,onLoadedData:Pe=>U(Pe.currentTarget)}):r.jsx("img",{ref:U,src:re.image.url,alt:re.image.name??"","data-waterfall-index":D,style:x,onClick:ue,onLoad:Pe=>U(Pe.currentTarget)})}):null,D<u.length-1&&r.jsx("div",{className:`${d}-item-gap-host`,style:{width:T},children:o&&!R&&r.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${d}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:v,height:"100%"}})})]},D)})}),R&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const re=(l?document.getElementById(l):null)??document.body;return mi.createPortal(r.jsx("div",{style:ce,"data-selection":"none",children:r.jsx(Ky,{prefix:d,items:A,index:E,entry:O,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:le,lightboxEntries:ge,entryIdx:F,layoutId:s,sourceRect:b,resolveCloseSourceRect:be,onClose:Y,onPrev:()=>Ce(-1),onNext:()=>Ce(1)})}),re)})()]})}const ov=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17412
+ `}function Zy(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,s]=n.split(":").map(Number),l=i?s:o,d=i?o:s;return d>0?l/d:1}function Jy(e){const t=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,n=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight;return!t||!n?null:t/n}function Qy(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:y.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:y.scalingValue(i*Xy,n??!1),[`--${t}-image-aspect`]:Zy(e)}}function ev(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.07,lineHeight:e==null?void 0:e.titleLineHeight,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,color:(e==null?void 0:e.titleColor)??"#000000"};return Xt(n,t)}function tv(e){var o;const t=((o=e==null?void 0:e.imageDisplay)==null?void 0:o.display)==="cover",n=((e==null?void 0:e.lightbox)??"on")==="on",i={objectFit:t?"cover":"contain",pointerEvents:"auto",...n?{cursor:"pointer"}:null};return{objectFitMode:t?"cover":"contain",imageStyle:i}}function nv(e,t,n,i,o,s){if(!(!e||!t))return l=>{var c;const d=((c=l.currentTarget.closest(`.${i}-item`))==null?void 0:c.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);s(n,d?bc(d,o):void 0)}}function iv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=y.useScopedStyles(),c=a.useMemo(()=>Yy(d),[d]),u=t??[],m=(e==null?void 0:e.type)??"a",w=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,S=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,T=y.scalingValue(S,n??!1),v=`max(${T}, ${Uy}px)`,{objectFitMode:C,imageStyle:x}=tv(e),M=ev(e,n),L=a.useRef(null),[R,Z]=a.useState(!1),[P,Q]=a.useState([]),[E,I]=a.useState(0),[W,f]=a.useState(0),[b,_]=a.useState(null),[O,K]=a.useState({title1:"",title2:"",title3:""}),G=(!n||i)&&!R,J=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},V=J.sizeType??"none",N=G&&V!=="none"?`${d}-item-image-hover-${V}`:void 0,H=(J.value??120)/100,$=a.useCallback(re=>{!re||V!=="scale"||(re.style.transformOrigin=Ep(re))},[V]),U=a.useCallback(re=>{if(re){if(C==="contain"){const D=Jy(re);if(D){const ne=re.closest(`.${d}-item-image`);ne instanceof HTMLElement&&ne.style.setProperty(`--${d}-item-media-aspect`,String(D))}}$(re)}},[d,$,C]),Y={width:y.scalingValue(w,n??!1),...M,...Qy(e,d,n),[`--${d}-image-hover-scale`]:String(H)},se=(()=>{const re={},D=L.current?getComputedStyle(L.current).getPropertyValue("--cntrl-article-width").trim():"";return D&&(re["--cntrl-article-width"]=D),re})(),j=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),ge=a.useMemo(()=>_y(u),[u]),h=a.useMemo(()=>zy(u),[u]),ue=(re,D)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const ne=ge.findIndex(Ne=>Ne.gridIndex===re);if(ne<0)return;const ce=ge[ne];f(ne),Q(ce.items),I(0),K(ce.entry),_(D??null),Z(!0)},X=a.useCallback(()=>{Z(!1),_(null)},[]),ve=a.useCallback(()=>{const re=ge[W];return!re||!L.current?b:Wy(L.current,re.gridIndex,C)??b},[ge,W,b,C]),$e=a.useCallback(re=>{if(ge.length>1){const D=ge.length,ne=(W+re+D)%D,ce=ge[ne];f(ne),Q(ce.items),I(0),K(ce.entry);return}I(D=>(D+re+P.length)%P.length)},[ge,W,P.length]),ae=ge.length>1||P.length>1;return a.useEffect(()=>{if(!R||typeof document>"u")return;const re=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=re}},[R]),a.useEffect(()=>{!n||o||i||Z(!1)},[n,o,i]),a.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&Z(!1)},[e==null?void 0:e.lightbox]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),r.jsx(By,{mediaList:h}),r.jsx("div",{ref:L,className:`${d}-wrapper ${d}-type-${m}`,style:Y,children:u.map((re,D)=>{var Ne,be;const ne=!!((Ne=re.image)!=null&&Ne.url),ce=nv(!!j,ne,D,d,C,ue);return r.jsxs("div",{className:`${d}-item`,children:[re.title?r.jsx("span",{className:`${d}-item-title`,onClick:ce,style:ce?{cursor:"pointer"}:void 0,children:re.title}):null,(be=re.image)!=null&&be.url?r.jsx("span",{className:[`${d}-item-image`,C==="contain"?`${d}-item-image-fit`:void 0,N].filter(Boolean).join(" "),children:re.image.type==="video"?r.jsx("video",{ref:U,src:re.image.url,"data-waterfall-index":D,style:x,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:ce,onLoadedData:We=>U(We.currentTarget)}):r.jsx("img",{ref:U,src:re.image.url,alt:re.image.name??"","data-waterfall-index":D,style:x,onClick:ce,onLoad:We=>U(We.currentTarget)})}):null,D<u.length-1&&r.jsx("div",{className:`${d}-item-gap-host`,style:{width:T},children:o&&!R&&r.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${d}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:v,height:"100%"}})})]},D)})}),R&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const re=(l?document.getElementById(l):null)??document.body;return mi.createPortal(r.jsx("div",{style:se,"data-selection":"none",children:r.jsx(Ky,{prefix:d,items:P,index:E,entry:O,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ae,lightboxEntries:ge,entryIdx:W,layoutId:s,sourceRect:b,resolveCloseSourceRect:ve,onClose:X,onPrev:()=>$e(-1),onNext:()=>$e(1)})}),re)})()]})}const ov=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17413
17413
  import type React from 'react';
17414
17414
  import { createPortal } from 'react-dom';
17415
17415
  import { CommonComponentProps } from '../props';
@@ -17923,7 +17923,7 @@ export function Waterfall({
17923
17923
  </>
17924
17924
  );
17925
17925
  }
17926
- `,rv="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>'),jn={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 av(e){const t={};return t[Ke(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ke(e,"fontSettings")]={...jn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ke(e,"fontSize")]={...jn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ke(e,"lineHeight")]={...jn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ke(e,"letterSpacing")]={...jn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ke(e,"wordSpacing")]={...jn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ke(e,"textAlign")]={...jn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ke(e,"textAppearance")]={...jn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Bi=Kn.filter(e=>e!=="count"),sv=Bi.reduce((e,t)=>({...e,...av(t)}),{}),lv=Bi.reduce((e,t)=>({...e,[Ke(t,"fontFamily")]:"Arial",[Ke(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ke(t,"letterSpacing")]:0,[Ke(t,"wordSpacing")]:0,[Ke(t,"textAlign")]:"left",[Ke(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ta(e){return Bi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ke(n,"fontSize")]=i),o!==void 0&&(t[Ke(n,"lineHeight")]=o),t},{})}const cv={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Bi.map(e=>[za[e],Ba(e)]))},qo={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},dv=[{title:"Salton Sea from Above",...qo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...qo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...qo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...qo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],uv={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}},required:["image"]},default:dv},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageHoverEffect:{type:"object",scope:"common",title:"Hover",display:{type:"toggle-cycle-numeric-input",enum:["none","scale","saturate"],inputs:{none:"none",scale:"single",saturate:"none"},defaultValue:120,showDash:!1},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},horizontalGap:{type:"number",scope:"layout",title:"Gutter",min:0,display:{type:"range-control"}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title1Color:{type:"string",scope:"common",title:"Title Lightbox",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Lightbox",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Lightbox",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...jn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},...sv},defaults:{type:"a",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightbox:"on",imageHoverEffect:{sizeType:"none",value:120,min:100,max:200},titleColor:"#000000",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:rv,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...lv},layoutDefaults:{d:{wrapperWidth:1,horizontalGap:.006944,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,titleFontSize:.0625,titleLineHeight:.05555,titleLetterSpacing:-34722e-8,...ta({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})},m:{wrapperWidth:1,horizontalGap:.026666,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,titleFontSize:.16,titleLineHeight:.13333,...ta({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{wrapperWidth:1,horizontalGap:.01302,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026,titleFontSize:.07,titleLineHeight:.07,...ta({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","type","wrapperWidth","imageDisplay","lightbox","imageHoverEffect","horizontalGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["wrapperWidth","lightbox"]},{type:"row",title:"Image",items:["imageDisplay","imageHoverEffect"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Lightbox",items:[cv]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},pv={element:iv,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},...Bi.map(e=>({path:`${Ke(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...Bi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ke(t,"fontFamily")}`}),{})},schema:uv,sourceCode:ov},Ei=500,Sc="cubic-bezier(0.25, 1, 0.5, 1)",mv=300,gv=5,hv=.15,fv=.4,yv=100,bi=100,sl={color:"#000000",hover:"#cccccc"},Ji={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},vv={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},na={offset:{x:0,y:0},linkColor:"#cccccc"},ll={sizeType:"drag",value:3},bv="left";function xv(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:bv,color:(e==null?void 0:e.titleColor)??"#000000"};return Xt(n,t)}function xi(e,t,n){return`${e}: ${y.scalingValue(t/1440,n)};`}function ro(e,t){return t<=0?0:(e%t+t)%t}function wv(e,t,n,i){if(!i)return{position:ro(e+t,n),skipTransition:!1};const o=e+t;return o>=0&&o<=n+1?{position:o,skipTransition:!1}:{position:ro(e-1+t,n)+1,skipTransition:!0}}function Sv(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function $v(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(m,w)=>{n.style.transform=`translate(${m}px, ${w}px)`;const S=n.getBoundingClientRect();return{x:S.left,y:S.top}},o=i(0,0),s=i(bi,0),l=i(0,bi);e.removeChild(n);const d={x:(s.x-o.x)/bi,y:(s.y-o.y)/bi},c={x:(l.x-o.x)/bi,y:(l.y-o.y)/bi},u=d.x*c.y-c.x*d.y;return{ex:d,ey:c,det:u}}function Cv(e,t,n){const{ex:i,ey:o,det:s}=e;return{x:(t*o.y-n*o.x)/s,y:(i.x*n-i.y*t)/s}}function Tv(e,t){return`
17926
+ `,rv="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>'),jn={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 av(e){const t={};return t[Ye(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ye(e,"fontSettings")]={...jn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ye(e,"fontSize")]={...jn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ye(e,"lineHeight")]={...jn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ye(e,"letterSpacing")]={...jn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ye(e,"wordSpacing")]={...jn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ye(e,"textAlign")]={...jn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ye(e,"textAppearance")]={...jn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Bi=Kn.filter(e=>e!=="count"),sv=Bi.reduce((e,t)=>({...e,...av(t)}),{}),lv=Bi.reduce((e,t)=>({...e,[Ye(t,"fontFamily")]:"Arial",[Ye(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ye(t,"letterSpacing")]:0,[Ye(t,"wordSpacing")]:0,[Ye(t,"textAlign")]:"left",[Ye(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ta(e){return Bi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ye(n,"fontSize")]=i),o!==void 0&&(t[Ye(n,"lineHeight")]=o),t},{})}const cv={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Bi.map(e=>[za[e],Ba(e)]))},qo={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},dv=[{title:"Salton Sea from Above",...qo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...qo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...qo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...qo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],uv={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}},required:["image"]},default:dv},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageHoverEffect:{type:"object",scope:"common",title:"Hover",display:{type:"toggle-cycle-numeric-input",enum:["none","scale","saturate"],inputs:{none:"none",scale:"single",saturate:"none"},defaultValue:120,showDash:!1},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},horizontalGap:{type:"number",scope:"layout",title:"Gutter",min:0,display:{type:"range-control"}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title1Color:{type:"string",scope:"common",title:"Title Lightbox",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Lightbox",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Lightbox",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...jn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},...sv},defaults:{type:"a",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightbox:"on",imageHoverEffect:{sizeType:"none",value:120,min:100,max:200},titleColor:"#000000",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:rv,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...lv},layoutDefaults:{d:{wrapperWidth:1,horizontalGap:.006944,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,titleFontSize:.0625,titleLineHeight:.05555,titleLetterSpacing:-34722e-8,...ta({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})},m:{wrapperWidth:1,horizontalGap:.026666,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,titleFontSize:.16,titleLineHeight:.13333,...ta({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{wrapperWidth:1,horizontalGap:.01302,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026,titleFontSize:.07,titleLineHeight:.07,...ta({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","type","wrapperWidth","imageDisplay","lightbox","imageHoverEffect","horizontalGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["wrapperWidth","lightbox"]},{type:"row",title:"Image",items:["imageDisplay","imageHoverEffect"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Lightbox",items:[cv]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},pv={element:iv,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},...Bi.map(e=>({path:`${Ye(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...Bi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ye(t,"fontFamily")}`}),{})},schema:uv,sourceCode:ov},Ei=500,Sc="cubic-bezier(0.25, 1, 0.5, 1)",mv=300,gv=5,hv=.15,fv=.4,yv=100,bi=100,sl={color:"#000000",hover:"#cccccc"},Ji={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},vv={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},na={offset:{x:0,y:0},linkColor:"#cccccc"},ll={sizeType:"drag",value:3},bv="left";function xv(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:bv,color:(e==null?void 0:e.titleColor)??"#000000"};return Xt(n,t)}function xi(e,t,n){return`${e}: ${y.scalingValue(t/1440,n)};`}function to(e,t){return t<=0?0:(e%t+t)%t}function wv(e,t,n,i){if(!i)return{position:to(e+t,n),hitBoundary:!1};const o=e+t;return o>=0&&o<=n+1?{position:o,hitBoundary:!1}:{position:t>0?n+1:0,hitBoundary:!0}}function Sv(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function $v(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(m,w)=>{n.style.transform=`translate(${m}px, ${w}px)`;const S=n.getBoundingClientRect();return{x:S.left,y:S.top}},o=i(0,0),s=i(bi,0),l=i(0,bi);e.removeChild(n);const d={x:(s.x-o.x)/bi,y:(s.y-o.y)/bi},c={x:(l.x-o.x)/bi,y:(l.y-o.y)/bi},u=d.x*c.y-c.x*d.y;return{ex:d,ey:c,det:u}}function Cv(e,t,n){const{ex:i,ey:o,det:s}=e;return{x:(t*o.y-n*o.x)/s,y:(i.x*n-i.y*t)/s}}function Tv(e,t){return`
17927
17927
  .${e}-wrapper {
17928
17928
  position: relative;
17929
17929
  width: 100%;
@@ -18193,7 +18193,7 @@ export function Waterfall({
18193
18193
  from { clip-path: inset(100% 0 0 0); }
18194
18194
  to { clip-path: inset(0 0 0 0); }
18195
18195
  }
18196
- `}function Lv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:s}=y.useScopedStyles(),l=xv(e,n),d=t??[],c=d.length,u=(e==null?void 0:e.trigger)??ll,m=u.sizeType??"drag",w=u.value??ll.value,S=(e==null?void 0:e.direction)??"horizontal",T=(e==null?void 0:e.transition)??"slide",v=(e==null?void 0:e.nav)??"classic",C=(e==null?void 0:e.navSize)??"m",x=vv[C],M=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,L=Z=>y.scalingValue(Z*M,n),R=(e==null?void 0:e.show)??"always",J=(e==null?void 0:e.controls)??null,A=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,ee=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,E=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,I=(e==null?void 0:e.controlsColor)??sl.color,F=(e==null?void 0:e.controlsHoverColor)??sl.hover,f=(e==null?void 0:e.navColor)??Ji.colors.inactive,b=(e==null?void 0:e.navPaginationColor)??Ji.colors.pagination,W=(e==null?void 0:e.navBackgroundColor)??Ji.colors.background,O=(e==null?void 0:e.linkColor)??na.linkColor,K=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,G=S==="horizontal",Q=m==="click",V=m==="drag",N=m==="auto"&&(!n||!!i),_=!n,$=T==="slide",U=v==="classic",X=R!=="never",ce=R==="on hover",j=y.scalingValue(A,n),ge={width:j,height:j,maxWidth:j},h=$&&c>1,[he,Y]=a.useState(0),[be,Ce]=a.useState(h?1:0),[le,re]=a.useState(!1),[D,se]=a.useState(!1),[ue,_e]=a.useState(!1),[xe,Pe]=a.useState(0),[Fe,Te]=a.useState(!1),[Se,q]=a.useState(!1),me=a.useRef(!1),ve=a.useRef(be);ve.current=be;const pe=a.useRef(null),Ae=a.useRef(null),$e=a.useRef(null),z=a.useRef(null),de=a.useCallback(Z=>{me.current=Z,re(Z)},[]),ae=a.useCallback(Z=>{if(c<2||Z===0)return;const ne=Z>0?1:-1,Ne=Math.abs(Z);if(Te(!0),de(!0),Y(Oe=>ro(Oe+Z,c)),!$)return;let lt=ve.current,De=!1;for(let Oe=0;Oe<Ne;Oe++){const Ue=wv(lt,ne,c,h);lt=Ue.position,De||(De=Ue.skipTransition)}ve.current=lt,De&&se(!0),Ce(lt)},[c,h,$,de]),H=a.useCallback(Z=>{ae(Z)},[ae]),ie=a.useCallback(Z=>{if(c<2)return;const ne=ro(Z,c);if(!(ne===he&&!me.current)&&(Te(!0),de(!0),Y(ne),$)){const Ne=ne+(h?1:0);ve.current=Ne,Ce(Ne)}},[he,c,h,$,de]);a.useEffect(()=>{if(!le)return;const Z=window.setTimeout(()=>{if(h&&(be===0||be===c+1)){se(!0),Ce(he+1);return}de(!1)},Ei);return()=>window.clearTimeout(Z)},[he,c,h,le,de,be]),a.useEffect(()=>{if(!D)return;let Z=0;const ne=requestAnimationFrame(()=>{Z=requestAnimationFrame(()=>{se(!1),de(!1)})});return()=>{cancelAnimationFrame(ne),cancelAnimationFrame(Z)}},[de,D]);const Ie=`${h}:${c}`,oe=a.useRef(Ie);a.useEffect(()=>{if(oe.current===Ie)return;oe.current=Ie;const Z=c>0?Math.min(he,c-1):0;$e.current=null,z.current=null,_e(!1),Pe(0),Y(Z),se(!0),Ce(Z+(h?1:0))},[he,c,h,Ie]),a.useEffect(()=>{if(!Fe)return;const Z=window.setTimeout(()=>Te(!1),mv);return()=>window.clearTimeout(Z)},[Fe,he]),a.useEffect(()=>{if(!N||c<2)return;const Z=Math.max(w,.1)*1e3,ne=window.setInterval(()=>{_&&Se||H(1)},Z);return()=>window.clearInterval(ne)},[w,c,H,N,Se,_]);const P=a.useCallback(Z=>{const ne=$e.current;if(!ne||ne.pointerId!==Z.pointerId)return;$e.current=null,z.current=null;const Ne=pe.current;if(Ne!=null&&Ne.hasPointerCapture(Z.pointerId)&&Ne.releasePointerCapture(Z.pointerId),!ne.isActive){$&&Pe(0);return}_e(!1),Pe(0);const De=!(Z.timeStamp-ne.lastTime>yv)&&Math.abs(ne.velocity)>fv,Oe=ne.size>0&&Math.abs(ne.offset-ne.baseOffset)>ne.size*hv;if(!De&&!Oe)return;const Ue=Oe?ne.offset-ne.baseOffset:ne.velocity;let ot=1;Oe&&ne.size>0&&(ot=Math.max(1,Math.round(Math.abs(Ue)/ne.size))),ae(Ue<0?ot:-ot)},[ae,$]);a.useEffect(()=>{const Z=ne=>{z.current===null||ne.pointerId!==z.current||P(ne)};return window.addEventListener("pointerup",Z),window.addEventListener("pointercancel",Z),()=>{window.removeEventListener("pointerup",Z),window.removeEventListener("pointercancel",Z)}},[P]);const He=Z=>{const ne=pe.current;if(!V||c<2||!ne||Z.pointerType==="mouse"&&Z.button!==0)return;me.current&&de(!1);let Ne=0;const lt=Ae.current;if($&&lt){const De=G?lt.offsetWidth:lt.offsetHeight;De>0&&(Ne=Sv(lt,G)+ve.current*De,Pe(Ne))}ne.setPointerCapture(Z.pointerId),z.current=Z.pointerId,$e.current={pointerId:Z.pointerId,startClientX:Z.clientX,startClientY:Z.clientY,axes:$v(ne,`${s}-axis-probe`),size:G?ne.offsetWidth:ne.offsetHeight,isActive:!1,baseOffset:Ne,offset:Ne,lastTime:Z.timeStamp,velocity:0}},We=Z=>{const ne=$e.current;if(!ne||ne.pointerId!==Z.pointerId)return;if(Z.pointerType==="mouse"&&Z.buttons===0){P(Z);return}const Ne=Z.clientX-ne.startClientX,lt=Z.clientY-ne.startClientY,De=ne.axes?Cv(ne.axes,Ne,lt):{x:Ne,y:lt},Oe=G?De.x:De.y,Ue=G?De.y:De.x,ot=ne.baseOffset+Oe;if(!ne.isActive){if(Math.max(Math.abs(Oe),Math.abs(Ue))<gv)return;if(Math.abs(Ue)>Math.abs(Oe)){const gt=pe.current;gt!=null&&gt.hasPointerCapture(ne.pointerId)&&gt.releasePointerCapture(ne.pointerId),$e.current=null,z.current=null,$&&Pe(0);return}ne.isActive=!0,_e(!0)}const ct=Z.timeStamp-ne.lastTime;ct>0&&(ne.velocity=(ot-ne.offset)/ct,ne.lastTime=Z.timeStamp),ne.offset=ot,$&&Pe(ot)},et=Z=>{P(Z)},Je=G?`translate3d(calc(${-be*100}% + ${xe}px), 0, 0)`:`translate3d(0, calc(${-be*100}% + ${xe}px), 0)`,Le=h?[d[c-1],...d,d[0]]:d;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Tv(s,n)}}),r.jsxs("div",{className:at(`${s}-wrapper`,{[`${s}-transition-reveal`]:T==="reveal",[`${s}-transition-reveal-vertical`]:T==="reveal"&&!G}),onMouseEnter:()=>q(!0),onMouseLeave:()=>q(!1),children:[r.jsxs("div",{className:`${s}-slider-inner`,style:{backgroundColor:"transparent"},children:[r.jsx("div",{ref:pe,className:at(`${s}-track`,{[`${s}-track-draggable`]:V,[`${s}-track-draggable-vertical`]:V&&!G}),onPointerDown:He,onPointerMove:We,onPointerUp:et,onPointerCancel:et,onLostPointerCapture:Z=>{z.current===Z.pointerId&&P(Z)},children:r.jsx("div",{ref:Ae,className:at(`${s}-list`,{[`${s}-list-slide`]:$,[`${s}-list-slide-vertical`]:$&&!G,[`${s}-list-fade`]:!$}),style:$?{transform:Je,transition:ue||D?"none":`transform ${Ei}ms ${Sc}`}:void 0,children:Le.map((Z,ne)=>{const Ne=h?ro(ne-1,c):ne,De=h&&(ne===0||ne===c+1)?`clone-${ne===0?"start":"end"}`:`slide-${Ne}`;return r.jsx("div",{className:at(`${s}-slide`,{[`${s}-is-active`]:!$&&Ne===he}),children:r.jsx("div",{className:`${s}-slider-item`,children:r.jsx("div",{className:`${s}-img-wrapper`,children:r.jsx("img",{className:at(`${s}-slider-image`,{[`${s}-contain`]:Z.image.objectFit==="contain",[`${s}-cover`]:Z.image.objectFit==="cover"}),src:Z.image.url,alt:Z.image.name??"",draggable:!1})})})},De)})})}),X&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:at(`${s}-arrow`,{[`${s}-arrow-prev`]:G,[`${s}-arrow-prev-vertical`]:!G,[`${s}-hover-arrow`]:ce}),style:{color:I,"--arrow-hover-color":F,...ge},children:r.jsxs("button",{onClick:Z=>{Z.stopPropagation(),H(-1)},className:`${s}-arrow-inner`,style:{transform:`translate(${y.scalingValue(ee,n)}, ${y.scalingValue(E*(G?1:-1),n)}) rotate(${G?"0deg":"90deg"})`},children:[J&&r.jsx(nn,{url:J,fill:I,hoverFill:F,className:at(`${s}-arrow-img`,`${s}-mirror`),style:ge}),!J&&r.jsx(cl,{color:I,className:at(`${s}-arrow-icon`,`${s}-arrow-img`,`${s}-mirror`)})]})}),r.jsx("div",{className:at(`${s}-arrow`,{[`${s}-arrow-next`]:G,[`${s}-arrow-next-vertical`]:!G,[`${s}-hover-arrow`]:ce}),style:{color:I,"--arrow-hover-color":F,...ge},children:r.jsxs("button",{className:`${s}-arrow-inner`,onClick:Z=>{Z.stopPropagation(),H(1)},style:{transform:`translate(${y.scalingValue(ee*(G?-1:1),n)}, ${y.scalingValue(E,n)}) rotate(${G?"0deg":"90deg"})`},children:[J&&r.jsx(nn,{url:J,fill:I,hoverFill:F,className:`${s}-arrow-img`,style:ge}),!J&&r.jsx(cl,{color:I,className:at(`${s}-arrow-icon`,`${s}-arrow-img`)})]})})]}),Q&&r.jsx("div",{className:`${s}-click-overlay`,onClick:()=>H(1)}),U&&r.jsx("div",{className:at(`${s}-pagination`,{[`${s}-pagination-inside-bottom`]:G,[`${s}-pagination-inside-left`]:!G}),style:G?{bottom:L(x.inset)}:{left:L(x.inset)},children:r.jsx("div",{className:at(`${s}-pagination-inner`,{[`${s}-pagination-vertical`]:!G,[`${s}-animate-dots`]:Fe}),style:{backgroundColor:W,gap:L(x.gapInactive-x.activeDot+x.dot),...G?{height:L(x.activeDot+x.paddingY*2),paddingTop:L(x.paddingY),paddingBottom:L(x.paddingY),paddingLeft:L(x.paddingActive),paddingRight:L(x.paddingActive)}:{width:L(x.activeDot+x.paddingY*2),paddingLeft:L(x.paddingY),paddingRight:L(x.paddingY),paddingTop:L(x.paddingActive),paddingBottom:L(x.paddingActive)},borderRadius:L(x.borderRadius),transform:`translate(${y.scalingValue(Ji.offset.x,n)}, ${y.scalingValue(Ji.offset.y,n)})`},children:d.map((Z,ne)=>{const Ne=ne===he,lt=Ne?x.activeDot:x.dot;return r.jsx("button",{onClick:()=>ie(ne),className:`${s}-pagination-item`,style:{width:L(x.activeDot)},children:r.jsx("div",{className:`${s}-dot`,style:{backgroundColor:Ne?b:f,width:L(lt)}})},ne)})},`${C}-${S}`)})]}),r.jsxs("div",{className:`${s}-caption-block`,children:[r.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:y.scalingValue(K,n)}}),r.jsx("div",{className:`${s}-caption-text-wrapper`,children:d.map((Z,ne)=>r.jsx("div",{className:at(`${s}-caption-text`,{[`${s}-with-pointer-events`]:ne===he&&n,[`${s}-active`]:ne===he}),style:{...l,width:"max-content",transitionDuration:`${Math.round(Ei/2)}ms`},children:r.jsx("div",{className:`${s}-caption-text-inner`,style:{"--link-color":O,"--link-hover-color":O,position:"relative",top:y.scalingValue(na.offset.y,n),left:y.scalingValue(na.offset.x,n)},children:r.jsx(pi,{content:Z.imageCaption})})},ne))})]})]})]})}function cl({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 Iv=`import React, { useCallback, useEffect, useRef, useState } from 'react';
18196
+ `}function Lv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:s}=y.useScopedStyles(),l=xv(e,n),d=t??[],c=d.length,u=(e==null?void 0:e.trigger)??ll,m=u.sizeType??"drag",w=u.value??ll.value,S=(e==null?void 0:e.direction)??"horizontal",T=(e==null?void 0:e.transition)??"slide",v=(e==null?void 0:e.nav)??"classic",C=(e==null?void 0:e.navSize)??"m",x=vv[C],M=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,L=me=>y.scalingValue(me*M,n),R=(e==null?void 0:e.show)??"always",Z=(e==null?void 0:e.controls)??null,P=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,Q=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,E=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,I=(e==null?void 0:e.controlsColor)??sl.color,W=(e==null?void 0:e.controlsHoverColor)??sl.hover,f=(e==null?void 0:e.navColor)??Ji.colors.inactive,b=(e==null?void 0:e.navPaginationColor)??Ji.colors.pagination,_=(e==null?void 0:e.navBackgroundColor)??Ji.colors.background,O=(e==null?void 0:e.linkColor)??na.linkColor,K=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,G=S==="horizontal",J=m==="click",V=m==="drag",N=m==="auto"&&(!n||!!i),H=!n,$=T==="slide",U=v==="classic",Y=R!=="never",se=R==="on hover",j=y.scalingValue(P,n),ge={width:j,height:j,maxWidth:j},h=$&&c>1,[ue,X]=a.useState(0),[ve,$e]=a.useState(h?1:0),[ae,re]=a.useState(!1),[D,ne]=a.useState(!1),[ce,Ne]=a.useState(!1),[be,We]=a.useState(0),[_e,Te]=a.useState(!1),[we,q]=a.useState(!1),pe=a.useRef(!1),fe=a.useRef(ve);fe.current=ve;const le=a.useRef(null),Pe=a.useRef(0),Le=a.useRef(null),z=a.useRef(null),de=a.useRef(null),ie=a.useRef(null),F=a.useCallback(me=>{pe.current=me,re(me)},[]),ee=a.useCallback(me=>{if(c<2||me===0)return;const Se=me>0?1:-1,je=Math.abs(me);if(Te(!0),F(!0),!$){X(ht=>to(ht+me,c));return}let Me=fe.current;const Ge=h&&(Me===0||Me===c+1),tt=Ge?ue+1:null;Ge&&(Me=ue+1);let Ke=je;for(;Ke>0;){const ht=wv(Me,Se,c,h);if(Me=ht.position,Ke-=1,ht.hitBoundary){Pe.current=Ke*Se;break}}const ut=je-Ke;if(ut>0&&X(ht=>to(ht+ut*Se,c)),fe.current=Me,tt!==null){if(fe.current=tt,Me===tt){ne(!0),$e(Me);return}le.current=Me,ne(!0),$e(tt);return}ne(!1),$e(Me)},[ue,c,h,$,F]),Ie=a.useCallback(me=>{ee(me)},[ee]),oe=a.useCallback(me=>{if(c<2)return;const Se=to(me,c);if(!(Se===ue&&!pe.current)&&(Te(!0),F(!0),X(Se),$)){const je=Se+(h?1:0);le.current=null,Pe.current=0,fe.current=je,ne(!1),$e(je)}},[ue,c,h,$,F]);a.useEffect(()=>{if(!ae)return;const me=window.setTimeout(()=>{if(h&&(ve===0||ve===c+1)){le.current=null,ne(!0),$e(ue+1);return}F(!1)},Ei);return()=>window.clearTimeout(me)},[ue,c,h,ae,F,ve]),a.useEffect(()=>{if(!D)return;let me=0;const Se=requestAnimationFrame(()=>{me=requestAnimationFrame(()=>{const je=le.current;le.current=null;const Me=Pe.current;if(Pe.current=0,ne(!1),je!==null){fe.current=je,$e(je);return}if(Me!==0){ee(Me);return}F(!1)})});return()=>{cancelAnimationFrame(Se),cancelAnimationFrame(me)}},[ee,F,D]);const A=`${h}:${c}`,Oe=a.useRef(A);a.useEffect(()=>{if(Oe.current===A)return;Oe.current=A;const me=c>0?Math.min(ue,c-1):0;de.current=null,ie.current=null,Ne(!1),We(0),X(me),ne(!0),$e(me+(h?1:0))},[ue,c,h,A]),a.useEffect(()=>{if(!_e)return;const me=window.setTimeout(()=>Te(!1),mv);return()=>window.clearTimeout(me)},[_e,ue]),a.useEffect(()=>{if(!N||c<2)return;const me=Math.max(w,.1)*1e3,Se=window.setInterval(()=>{H&&we||Ie(1)},me);return()=>window.clearInterval(Se)},[w,c,Ie,N,we,H]);const Ae=a.useCallback(me=>{const Se=de.current;if(!Se||Se.pointerId!==me.pointerId)return;de.current=null,ie.current=null;const je=Le.current;if(je!=null&&je.hasPointerCapture(me.pointerId)&&je.releasePointerCapture(me.pointerId),!Se.isActive){$&&We(0);return}const Ge=!(me.timeStamp-Se.lastTime>yv)&&Math.abs(Se.velocity)>fv,tt=Se.size>0&&Math.abs(Se.offset-Se.baseOffset)>Se.size*hv;if(Ne(!1),!Ge&&!tt){We(0);return}const Ke=tt?Se.offset-Se.baseOffset:Se.velocity;let ut=1;tt&&Se.size>0&&(ut=Math.max(1,Math.round(Math.abs(Ke)/Se.size))),We(0),ee(Ke<0?ut:-ut)},[ee,$]);a.useEffect(()=>{const me=Se=>{ie.current===null||Se.pointerId!==ie.current||Ae(Se)};return window.addEventListener("pointerup",me),window.addEventListener("pointercancel",me),()=>{window.removeEventListener("pointerup",me),window.removeEventListener("pointercancel",me)}},[Ae]);const rt=me=>{const Se=Le.current;if(!V||c<2||!Se||me.pointerType==="mouse"&&me.button!==0)return;le.current=null,Pe.current=0,pe.current&&F(!1);let je=0;const Me=z.current;if($&&Me){const Ge=G?Me.offsetWidth:Me.offsetHeight;if(Ge>0){const tt=Sv(Me,G);let Ke=fe.current;h&&(Ke===0||Ke===c+1)?(Ke=ue+1,fe.current=Ke,ne(!0),$e(Ke),je=0):je=tt+Ke*Ge,We(je)}}Se.setPointerCapture(me.pointerId),ie.current=me.pointerId,de.current={pointerId:me.pointerId,startClientX:me.clientX,startClientY:me.clientY,axes:$v(Se,`${s}-axis-probe`),size:G?Se.offsetWidth:Se.offsetHeight,isActive:!1,baseOffset:je,offset:je,lastTime:me.timeStamp,velocity:0}},et=me=>{const Se=de.current;if(!Se||Se.pointerId!==me.pointerId)return;if(me.pointerType==="mouse"&&me.buttons===0){Ae(me);return}const je=me.clientX-Se.startClientX,Me=me.clientY-Se.startClientY,Ge=Se.axes?Cv(Se.axes,je,Me):{x:je,y:Me},tt=G?Ge.x:Ge.y,Ke=G?Ge.y:Ge.x,ut=Se.baseOffset+tt;if(!Se.isActive){if(Math.max(Math.abs(tt),Math.abs(Ke))<gv)return;if(Math.abs(Ke)>Math.abs(tt)){const it=Le.current;it!=null&&it.hasPointerCapture(Se.pointerId)&&it.releasePointerCapture(Se.pointerId),de.current=null,ie.current=null,$&&We(0);return}Se.isActive=!0,Ne(!0)}const ht=me.timeStamp-Se.lastTime;ht>0&&(Se.velocity=(ut-Se.offset)/ht,Se.lastTime=me.timeStamp),Se.offset=ut,$&&We(ut)},Ce=me=>{Ae(me)},He=G?`translate3d(calc(${-ve*100}% + ${be}px), 0, 0)`:`translate3d(0, calc(${-ve*100}% + ${be}px), 0)`,ze=h?[d[c-1],...d,d[0]]:d;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Tv(s,n)}}),r.jsxs("div",{className:ct(`${s}-wrapper`,{[`${s}-transition-reveal`]:T==="reveal",[`${s}-transition-reveal-vertical`]:T==="reveal"&&!G}),onMouseEnter:()=>q(!0),onMouseLeave:()=>q(!1),children:[r.jsxs("div",{className:`${s}-slider-inner`,style:{backgroundColor:"transparent"},children:[r.jsx("div",{ref:Le,className:ct(`${s}-track`,{[`${s}-track-draggable`]:V,[`${s}-track-draggable-vertical`]:V&&!G}),onPointerDown:rt,onPointerMove:et,onPointerUp:Ce,onPointerCancel:Ce,onLostPointerCapture:me=>{ie.current===me.pointerId&&Ae(me)},children:r.jsx("div",{ref:z,className:ct(`${s}-list`,{[`${s}-list-slide`]:$,[`${s}-list-slide-vertical`]:$&&!G,[`${s}-list-fade`]:!$}),style:$?{transform:He,transition:ce||D?"none":`transform ${Ei}ms ${Sc}`}:void 0,children:ze.map((me,Se)=>{const je=h?to(Se-1,c):Se,Ge=h&&(Se===0||Se===c+1)?`clone-${Se===0?"start":"end"}`:`slide-${je}`;return r.jsx("div",{className:ct(`${s}-slide`,{[`${s}-is-active`]:!$&&je===ue}),children:r.jsx("div",{className:`${s}-slider-item`,children:r.jsx("div",{className:`${s}-img-wrapper`,children:r.jsx("img",{className:ct(`${s}-slider-image`,{[`${s}-contain`]:me.image.objectFit==="contain",[`${s}-cover`]:me.image.objectFit==="cover"}),src:me.image.url,alt:me.image.name??"",draggable:!1})})})},Ge)})})}),Y&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:ct(`${s}-arrow`,{[`${s}-arrow-prev`]:G,[`${s}-arrow-prev-vertical`]:!G,[`${s}-hover-arrow`]:se}),style:{color:I,"--arrow-hover-color":W,...ge},children:r.jsxs("button",{onClick:me=>{me.stopPropagation(),Ie(-1)},className:`${s}-arrow-inner`,style:{transform:`translate(${y.scalingValue(Q,n)}, ${y.scalingValue(E*(G?1:-1),n)}) rotate(${G?"0deg":"90deg"})`},children:[Z&&r.jsx(nn,{url:Z,fill:I,hoverFill:W,className:ct(`${s}-arrow-img`,`${s}-mirror`),style:ge}),!Z&&r.jsx(cl,{color:I,className:ct(`${s}-arrow-icon`,`${s}-arrow-img`,`${s}-mirror`)})]})}),r.jsx("div",{className:ct(`${s}-arrow`,{[`${s}-arrow-next`]:G,[`${s}-arrow-next-vertical`]:!G,[`${s}-hover-arrow`]:se}),style:{color:I,"--arrow-hover-color":W,...ge},children:r.jsxs("button",{className:`${s}-arrow-inner`,onClick:me=>{me.stopPropagation(),Ie(1)},style:{transform:`translate(${y.scalingValue(Q*(G?-1:1),n)}, ${y.scalingValue(E,n)}) rotate(${G?"0deg":"90deg"})`},children:[Z&&r.jsx(nn,{url:Z,fill:I,hoverFill:W,className:`${s}-arrow-img`,style:ge}),!Z&&r.jsx(cl,{color:I,className:ct(`${s}-arrow-icon`,`${s}-arrow-img`)})]})})]}),J&&r.jsx("div",{className:`${s}-click-overlay`,onClick:()=>Ie(1)}),U&&r.jsx("div",{className:ct(`${s}-pagination`,{[`${s}-pagination-inside-bottom`]:G,[`${s}-pagination-inside-left`]:!G}),style:G?{bottom:L(x.inset)}:{left:L(x.inset)},children:r.jsx("div",{className:ct(`${s}-pagination-inner`,{[`${s}-pagination-vertical`]:!G,[`${s}-animate-dots`]:_e}),style:{backgroundColor:_,gap:L(x.gapInactive-x.activeDot+x.dot),...G?{height:L(x.activeDot+x.paddingY*2),paddingTop:L(x.paddingY),paddingBottom:L(x.paddingY),paddingLeft:L(x.paddingActive),paddingRight:L(x.paddingActive)}:{width:L(x.activeDot+x.paddingY*2),paddingLeft:L(x.paddingY),paddingRight:L(x.paddingY),paddingTop:L(x.paddingActive),paddingBottom:L(x.paddingActive)},borderRadius:L(x.borderRadius),transform:`translate(${y.scalingValue(Ji.offset.x,n)}, ${y.scalingValue(Ji.offset.y,n)})`},children:d.map((me,Se)=>{const je=Se===ue,Me=je?x.activeDot:x.dot;return r.jsx("button",{onClick:()=>oe(Se),className:`${s}-pagination-item`,style:{width:L(x.activeDot)},children:r.jsx("div",{className:`${s}-dot`,style:{backgroundColor:je?b:f,width:L(Me)}})},Se)})},`${C}-${S}`)})]}),r.jsxs("div",{className:`${s}-caption-block`,children:[r.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:y.scalingValue(K,n)}}),r.jsx("div",{className:`${s}-caption-text-wrapper`,children:d.map((me,Se)=>r.jsx("div",{className:ct(`${s}-caption-text`,{[`${s}-with-pointer-events`]:Se===ue&&n,[`${s}-active`]:Se===ue}),style:{...l,width:"max-content",transitionDuration:`${Math.round(Ei/2)}ms`},children:r.jsx("div",{className:`${s}-caption-text-inner`,style:{"--link-color":O,"--link-hover-color":O,position:"relative",top:y.scalingValue(na.offset.y,n),left:y.scalingValue(na.offset.x,n)},children:r.jsx(pi,{content:me.imageCaption})})},Se))})]})]})]})}function cl({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 Iv=`import React, { useCallback, useEffect, useRef, useState } from 'react';
18197
18197
  import cn from 'classnames';
18198
18198
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
18199
18199
  import { scalingValue } from '../utils/scalingValue';
@@ -18395,17 +18395,17 @@ function advanceTrackPosition(
18395
18395
  step: 1 | -1,
18396
18396
  count: number,
18397
18397
  hasClones: boolean,
18398
- ): { position: number; skipTransition: boolean } {
18398
+ ): { position: number; hitBoundary: boolean } {
18399
18399
  if (!hasClones) {
18400
- return { position: wrapIndex(prev + step, count), skipTransition: false };
18400
+ return { position: wrapIndex(prev + step, count), hitBoundary: false };
18401
18401
  }
18402
18402
  const next = prev + step;
18403
18403
  if (next >= 0 && next <= count + 1) {
18404
- return { position: next, skipTransition: false };
18404
+ return { position: next, hitBoundary: false };
18405
18405
  }
18406
18406
  return {
18407
- position: wrapIndex(prev - 1 + step, count) + 1,
18408
- skipTransition: true,
18407
+ position: step > 0 ? count + 1 : 0,
18408
+ hitBoundary: true,
18409
18409
  };
18410
18410
  }
18411
18411
 
@@ -18777,6 +18777,8 @@ export function Slider20({ settings, content, isEditor, isPreviewMode, isEditMod
18777
18777
  const isMovingRef = useRef(false);
18778
18778
  const trackPositionRef = useRef(trackPosition);
18779
18779
  trackPositionRef.current = trackPosition;
18780
+ const pendingAnimatedPositionRef = useRef<number | null>(null);
18781
+ const pendingStepsRef = useRef(0);
18780
18782
  const trackRef = useRef<HTMLDivElement | null>(null);
18781
18783
  const listRef = useRef<HTMLDivElement | null>(null);
18782
18784
  const dragRef = useRef<DragState | null>(null);
@@ -18793,20 +18795,53 @@ export function Slider20({ settings, content, isEditor, isPreviewMode, isEditMod
18793
18795
  const total = Math.abs(steps);
18794
18796
  setAnimateDots(true);
18795
18797
  setMoving(true);
18796
- setActiveIndex((prev) => wrapIndex(prev + steps, count));
18797
- if (!isSlideTransition) return;
18798
+ if (!isSlideTransition) {
18799
+ setActiveIndex((prev) => wrapIndex(prev + steps, count));
18800
+ return;
18801
+ }
18798
18802
 
18799
18803
  let position = trackPositionRef.current;
18800
- let shouldSkipTransition = false;
18801
- for (let i = 0; i < total; i++) {
18804
+ const isOnClone = hasClones && (position === 0 || position === count + 1);
18805
+ const cloneSnapPosition = isOnClone ? activeIndex + 1 : null;
18806
+
18807
+ if (isOnClone) {
18808
+ position = activeIndex + 1;
18809
+ }
18810
+
18811
+ let remaining = total;
18812
+ while (remaining > 0) {
18802
18813
  const result = advanceTrackPosition(position, direction, count, hasClones);
18803
18814
  position = result.position;
18804
- shouldSkipTransition ||= result.skipTransition;
18815
+ remaining -= 1;
18816
+ if (result.hitBoundary) {
18817
+ pendingStepsRef.current = remaining * direction;
18818
+ break;
18819
+ }
18820
+ }
18821
+
18822
+ const appliedSteps = total - remaining;
18823
+ if (appliedSteps > 0) {
18824
+ setActiveIndex((prev) => wrapIndex(prev + appliedSteps * direction, count));
18805
18825
  }
18826
+
18806
18827
  trackPositionRef.current = position;
18807
- if (shouldSkipTransition) setSkipTransition(true);
18828
+
18829
+ if (cloneSnapPosition !== null) {
18830
+ trackPositionRef.current = cloneSnapPosition;
18831
+ if (position === cloneSnapPosition) {
18832
+ setSkipTransition(true);
18833
+ setTrackPosition(position);
18834
+ return;
18835
+ }
18836
+ pendingAnimatedPositionRef.current = position;
18837
+ setSkipTransition(true);
18838
+ setTrackPosition(cloneSnapPosition);
18839
+ return;
18840
+ }
18841
+
18842
+ setSkipTransition(false);
18808
18843
  setTrackPosition(position);
18809
- }, [count, hasClones, isSlideTransition, setMoving]);
18844
+ }, [activeIndex, count, hasClones, isSlideTransition, setMoving]);
18810
18845
 
18811
18846
  const goBy = useCallback((step: 1 | -1) => {
18812
18847
  goBySteps(step);
@@ -18821,7 +18856,10 @@ export function Slider20({ settings, content, isEditor, isPreviewMode, isEditMod
18821
18856
  setActiveIndex(target);
18822
18857
  if (isSlideTransition) {
18823
18858
  const position = target + (hasClones ? 1 : 0);
18859
+ pendingAnimatedPositionRef.current = null;
18860
+ pendingStepsRef.current = 0;
18824
18861
  trackPositionRef.current = position;
18862
+ setSkipTransition(false);
18825
18863
  setTrackPosition(position);
18826
18864
  }
18827
18865
  }, [activeIndex, count, hasClones, isSlideTransition, setMoving]);
@@ -18830,6 +18868,7 @@ export function Slider20({ settings, content, isEditor, isPreviewMode, isEditMod
18830
18868
  if (!isMoving) return;
18831
18869
  const timeoutId = window.setTimeout(() => {
18832
18870
  if (hasClones && (trackPosition === 0 || trackPosition === count + 1)) {
18871
+ pendingAnimatedPositionRef.current = null;
18833
18872
  setSkipTransition(true);
18834
18873
  setTrackPosition(activeIndex + 1);
18835
18874
  return;
@@ -18844,7 +18883,20 @@ export function Slider20({ settings, content, isEditor, isPreviewMode, isEditMod
18844
18883
  let innerId = 0;
18845
18884
  const outerId = requestAnimationFrame(() => {
18846
18885
  innerId = requestAnimationFrame(() => {
18886
+ const pendingPosition = pendingAnimatedPositionRef.current;
18887
+ pendingAnimatedPositionRef.current = null;
18888
+ const pendingSteps = pendingStepsRef.current;
18889
+ pendingStepsRef.current = 0;
18847
18890
  setSkipTransition(false);
18891
+ if (pendingPosition !== null) {
18892
+ trackPositionRef.current = pendingPosition;
18893
+ setTrackPosition(pendingPosition);
18894
+ return;
18895
+ }
18896
+ if (pendingSteps !== 0) {
18897
+ goBySteps(pendingSteps);
18898
+ return;
18899
+ }
18848
18900
  setMoving(false);
18849
18901
  });
18850
18902
  });
@@ -18852,7 +18904,7 @@ export function Slider20({ settings, content, isEditor, isPreviewMode, isEditMod
18852
18904
  cancelAnimationFrame(outerId);
18853
18905
  cancelAnimationFrame(innerId);
18854
18906
  };
18855
- }, [setMoving, skipTransition]);
18907
+ }, [goBySteps, setMoving, skipTransition]);
18856
18908
 
18857
18909
  const structureKey = \`\${hasClones}:\${count}\`;
18858
18910
  const prevStructureKeyRef = useRef(structureKey);
@@ -18904,21 +18956,25 @@ export function Slider20({ settings, content, isEditor, isPreviewMode, isEditMod
18904
18956
  return;
18905
18957
  }
18906
18958
 
18907
- setIsDragging(false);
18908
- setDragOffset(0);
18909
-
18910
18959
  const isIdle = event.timeStamp - state.lastTime > DRAG_FLICK_MAX_IDLE_MS;
18911
18960
  const hasFlicked = !isIdle && Math.abs(state.velocity) > DRAG_FLICK_VELOCITY;
18912
18961
  const hasPassedDistance = state.size > 0
18913
18962
  && Math.abs(state.offset - state.baseOffset) > state.size * DRAG_DISTANCE_RATIO;
18914
18963
 
18915
- if (!hasFlicked && !hasPassedDistance) return;
18964
+ setIsDragging(false);
18965
+
18966
+ if (!hasFlicked && !hasPassedDistance) {
18967
+ setDragOffset(0);
18968
+ return;
18969
+ }
18916
18970
 
18917
18971
  const reference = hasPassedDistance ? state.offset - state.baseOffset : state.velocity;
18918
18972
  let steps = 1;
18919
18973
  if (hasPassedDistance && state.size > 0) {
18920
18974
  steps = Math.max(1, Math.round(Math.abs(reference) / state.size));
18921
18975
  }
18976
+
18977
+ setDragOffset(0);
18922
18978
  goBySteps(reference < 0 ? steps : -steps);
18923
18979
  }, [goBySteps, isSlideTransition]);
18924
18980
 
@@ -18941,6 +18997,9 @@ export function Slider20({ settings, content, isEditor, isPreviewMode, isEditMod
18941
18997
  if (!isDragTrigger || count < 2 || !track) return;
18942
18998
  if (event.pointerType === 'mouse' && event.button !== 0) return;
18943
18999
 
19000
+ pendingAnimatedPositionRef.current = null;
19001
+ pendingStepsRef.current = 0;
19002
+
18944
19003
  if (isMovingRef.current) {
18945
19004
  setMoving(false);
18946
19005
  }
@@ -18951,7 +19010,18 @@ export function Slider20({ settings, content, isEditor, isPreviewMode, isEditMod
18951
19010
  const size = isHorizontal ? list.offsetWidth : list.offsetHeight;
18952
19011
  if (size > 0) {
18953
19012
  const currentPx = readTrackTranslatePx(list, isHorizontal);
18954
- baseOffset = currentPx + trackPositionRef.current * size;
19013
+ let syncedPosition = trackPositionRef.current;
19014
+ const isOnClone = hasClones && (syncedPosition === 0 || syncedPosition === count + 1);
19015
+
19016
+ if (isOnClone) {
19017
+ syncedPosition = activeIndex + 1;
19018
+ trackPositionRef.current = syncedPosition;
19019
+ setSkipTransition(true);
19020
+ setTrackPosition(syncedPosition);
19021
+ baseOffset = 0;
19022
+ } else {
19023
+ baseOffset = currentPx + syncedPosition * size;
19024
+ }
18955
19025
  setDragOffset(baseOffset);
18956
19026
  }
18957
19027
  }