@cntrl-site/components 1.0.27 → 1.0.28

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 +31 -22
  2. package/dist/index.mjs +2194 -2151
  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"),l=require("react"),Ye=require("classnames"),P=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Ni=require("react-dom");function al(e){return e.type==="object"&&e.version===1}const sl="ControlSlider-module__wrapper___sHEkd",ll="ControlSlider-module__hoverArrow___A-dOH",cl="ControlSlider-module__sliderItem___QQSkR",dl="ControlSlider-module__sliderImage___9hRl-",ul="ControlSlider-module__arrow___05ghY",pl="ControlSlider-module__arrowVertical___tBfVN",ml="ControlSlider-module__nextArrow___-30Yc",gl="ControlSlider-module__arrowInner___aEra3",hl="ControlSlider-module__arrowIcon___S4ztF",fl="ControlSlider-module__arrowImg___2dwJW",yl="ControlSlider-module__mirror___brd6U",vl="ControlSlider-module__pagination___bicLF",bl="ControlSlider-module__paginationInner___bT-P-",xl="ControlSlider-module__paginationVertical___zYqKw",wl="ControlSlider-module__paginationItem___nTRbk",Sl="ControlSlider-module__dot___p1Qun",$l="ControlSlider-module__activeDot___LHFaj",Cl="ControlSlider-module__paginationInsideBottom___R3FWn",Tl="ControlSlider-module__paginationInsideTop___V-qb-",Ll="ControlSlider-module__paginationOutsideBottom___14w8D",El="ControlSlider-module__paginationOutsideTop___SCLqB",Il="ControlSlider-module__paginationInsideLeft___yOBRZ",Pl="ControlSlider-module__paginationInsideRight___Rtt3o",Rl="ControlSlider-module__paginationOutsideLeft___lahaw",Al="ControlSlider-module__paginationOutsideRight___EtuQa",Ml="ControlSlider-module__imgWrapper___UjEgB",kl="ControlSlider-module__captionBlock___dJ6-j",_l="ControlSlider-module__captionTextWrapper___HFlpf",Wl="ControlSlider-module__captionText___uGBVc",Fl="ControlSlider-module__active___WZK4G",Nl="ControlSlider-module__withPointerEvents___t-18M",Hl="ControlSlider-module__topLeftAlignment___zjnGM",Ol="ControlSlider-module__topCenterAlignment___gD1xW",Bl="ControlSlider-module__topRightAlignment___NMapS",jl="ControlSlider-module__middleLeftAlignment___OnUrY",zl="ControlSlider-module__middleCenterAlignment___Tdkl0",Vl="ControlSlider-module__middleRightAlignment___wEbfX",Dl="ControlSlider-module__bottomLeftAlignment___cTP2-",ql="ControlSlider-module__bottomCenterAlignment___c54fB",Kl="ControlSlider-module__bottomRightAlignment___kEwrz",Gl="ControlSlider-module__clickOverlay___DZA28",Ul="ControlSlider-module__contain___pLyq7",Xl="ControlSlider-module__cover___KdDat",Le={wrapper:sl,hoverArrow:ll,sliderItem:cl,sliderImage:dl,arrow:ul,arrowVertical:pl,nextArrow:ml,arrowInner:gl,arrowIcon:hl,arrowImg:fl,mirror:yl,pagination:vl,paginationInner:bl,paginationVertical:xl,paginationItem:wl,dot:Sl,activeDot:$l,paginationInsideBottom:Cl,paginationInsideTop:Tl,paginationOutsideBottom:Ll,paginationOutsideTop:El,paginationInsideLeft:Il,paginationInsideRight:Pl,paginationOutsideLeft:Rl,paginationOutsideRight:Al,imgWrapper:Ml,captionBlock:kl,captionTextWrapper:_l,captionText:Wl,active:Fl,withPointerEvents:Nl,topLeftAlignment:Hl,topCenterAlignment:Ol,topRightAlignment:Bl,middleLeftAlignment:jl,middleCenterAlignment:zl,middleRightAlignment:Vl,bottomLeftAlignment:Dl,bottomCenterAlignment:ql,bottomRightAlignment:Kl,clickOverlay:Gl,contain:Ul,cover:Xl};function Yl(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 Jl(e,t,n){return t&&Yl(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var ra="(prefers-reduced-motion: reduce)",ri=1,Zl=2,li=3,fi=4,Hi=5,fo=6,Co=7,Ql={CREATED:ri,MOUNTED:Zl,IDLE:li,MOVING:fi,SCROLLING:Hi,DRAGGING:fo,DESTROYED:Co};function wn(e){e.length=0}function Mn(e,t,n){return Array.prototype.slice.call(e,t,n)}function ct(e){return e.bind.apply(e,[null].concat(Mn(arguments,1)))}var ss=setTimeout,fr=function(){};function aa(e){return requestAnimationFrame(e)}function Ao(e,t){return typeof t===e}function Ei(e){return!Pr(e)&&Ao("object",e)}var Ir=Array.isArray,ls=ct(Ao,"function"),Pn=ct(Ao,"string"),Oi=ct(Ao,"undefined");function Pr(e){return e===null}function cs(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Bi(e){return Ir(e)?e:[e]}function Yt(e,t){Bi(e).forEach(t)}function Rr(e,t){return e.indexOf(t)>-1}function yo(e,t){return e.push.apply(e,Bi(t)),e}function fn(e,t,n){e&&Yt(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function ln(e,t){fn(e,Pn(t)?t.split(" "):t,!0)}function ji(e,t){Yt(t,e.appendChild.bind(e))}function Ar(e,t){Yt(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Ii(e,t){return cs(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ds(e,t){var n=e?Mn(e.children):[];return t?n.filter(function(i){return Ii(i,t)}):n}function zi(e,t){return t?ds(e,t)[0]:e.firstElementChild}var Pi=Object.keys;function qn(e,t,n){return e&&(n?Pi(e).reverse():Pi(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Ri(e){return Mn(arguments,1).forEach(function(t){qn(t,function(n,i){e[i]=t[i]})}),e}function In(e){return Mn(arguments,1).forEach(function(t){qn(t,function(n,i){Ir(n)?e[i]=n.slice():Ei(n)?e[i]=In({},Ei(e[i])?e[i]:{},n):e[i]=n})}),e}function sa(e,t){Yt(t||Pi(e),function(n){delete e[n]})}function cn(e,t){Yt(e,function(n){Yt(t,function(i){n&&n.removeAttribute(i)})})}function He(e,t,n){Ei(t)?qn(t,function(i,o){He(e,o,i)}):Yt(e,function(i){Pr(n)||n===""?cn(i,t):i.setAttribute(t,String(n))})}function ai(e,t,n){var i=document.createElement(e);return t&&(Pn(t)?ln(i,t):He(i,t)),n&&ji(n,i),i}function en(e,t,n){if(Oi(n))return getComputedStyle(e)[t];Pr(n)||(e.style[t]=""+n)}function Ai(e,t){en(e,"display",t)}function us(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function tn(e,t){return e.getAttribute(t)}function la(e,t){return e&&e.classList.contains(t)}function Kt(e){return e.getBoundingClientRect()}function Kn(e){Yt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function ps(e){return zi(new DOMParser().parseFromString(e,"text/html").body)}function hn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function ms(e,t){return e&&e.querySelector(t)}function Mr(e,t){return t?Mn(e.querySelectorAll(t)):[]}function yn(e,t){fn(e,t,!1)}function yr(e){return e.timeStamp}function On(e){return Pn(e)?e:e?e+"px":""}var Vi="splide",kr="data-"+Vi;function Si(e,t){if(!e)throw new Error("["+Vi+"] "+(t||""))}var Rn=Math.min,To=Math.max,Lo=Math.floor,Mi=Math.ceil,Bt=Math.abs;function gs(e,t,n){return Bt(e-t)<n}function vo(e,t,n,i){var o=Rn(t,n),s=To(t,n);return i?o<e&&e<s:o<=e&&e<=s}function ni(e,t,n){var i=Rn(t,n),o=To(t,n);return Rn(To(i,e),o)}function vr(e){return+(e>0)-+(e<0)}function br(e,t){return Yt(t,function(n){e=e.replace("%s",""+n)}),e}function _r(e){return e<10?"0"+e:""+e}var ca={};function ec(e){return""+e+_r(ca[e]=(ca[e]||0)+1)}function hs(){var e=[];function t(a,u,c,m){o(a,u,function(p,R,b){var I="addEventListener"in p,g=I?p.removeEventListener.bind(p,R,c,m):p.removeListener.bind(p,c);I?p.addEventListener(R,c,m):p.addListener(c),e.push([p,R,b,c,g])})}function n(a,u,c){o(a,u,function(m,p,R){e=e.filter(function(b){return b[0]===m&&b[1]===p&&b[2]===R&&(!c||b[3]===c)?(b[4](),!1):!0})})}function i(a,u,c){var m,p=!0;return typeof CustomEvent=="function"?m=new CustomEvent(u,{bubbles:p,detail:c}):(m=document.createEvent("CustomEvent"),m.initCustomEvent(u,p,!1,c)),a.dispatchEvent(m),m}function o(a,u,c){Yt(a,function(m){m&&Yt(u,function(p){p.split(" ").forEach(function(R){var b=R.split(".");c(m,b[0],b[1])})})})}function s(){e.forEach(function(a){a[4]()}),wn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var kn="mounted",xr="ready",Sn="move",yi="moved",Wr="click",fs="active",ys="inactive",vs="visible",bs="hidden",Lt="refresh",Nt="updated",ci="resize",Mo="resized",xs="drag",ws="dragging",Ss="dragged",ko="scroll",Un="scrolled",tc="overflow",Fr="destroy",$s="arrows:mounted",Cs="arrows:updated",Ts="pagination:mounted",Ls="pagination:updated",Nr="navigation:mounted",Hr="autoplay:play",Es="autoplay:playing",Or="autoplay:pause",Br="lazyload:loaded",Is="sk",Ps="sh",Eo="ei";function gt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=hs();function i(s,a){n.bind(t,Bi(s).join(" "),function(u){a.apply(a,Ir(u.detail)?u.detail:[])})}function o(s){n.dispatch(t,s,Mn(arguments,1))}return e&&e.event.on(Fr,n.destroy),Ri(n,{bus:t,on:i,off:ct(n.unbind,t),emit:o})}function _o(e,t,n,i){var o=Date.now,s,a=0,u,c=!0,m=0;function p(){if(!c){if(a=e?Rn((o()-s)/e,1):1,n&&n(a),a>=1&&(t(),s=o(),i&&++m>=i))return b();u=aa(p)}}function R(w){w||g(),s=o()-(w?a*e:0),c=!1,u=aa(p)}function b(){c=!0}function I(){s=o(),a=0,n&&n(a)}function g(){u&&cancelAnimationFrame(u),a=0,u=0,c=!0}function v(w){e=w}function T(){return c}return{start:R,rewind:I,pause:b,cancel:g,set:v,isPaused:T}}function nc(e){var t=e;function n(o){t=o}function i(o){return Rr(Bi(o),t)}return{set:n,is:i}}function ic(e,t){var n=_o(0,e,null,1);return function(){n.isPaused()&&n.start()}}function oc(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},a=hs(),u=[];function c(){var g=n.mediaQuery==="min";Pi(o).sort(function(v,T){return g?+v-+T:+T-+v}).forEach(function(v){p(o[v],"("+(g?"min":"max")+"-width:"+v+"px)")}),p(s,ra),R()}function m(g){g&&a.destroy()}function p(g,v){var T=matchMedia(v);a.bind(T,"change",R),u.push([g,T])}function R(){var g=i.is(Co),v=n.direction,T=u.reduce(function(w,$){return In(w,$[1].matches?$[0]:{})},{});sa(n),I(T),n.destroy?e.destroy(n.destroy==="completely"):g?(m(!0),e.mount()):v!==n.direction&&e.refresh()}function b(g){matchMedia(ra).matches&&(g?In(n,s):sa(n,Pi(s)))}function I(g,v,T){In(n,g),v&&In(Object.getPrototypeOf(n),g),(T||!i.is(ri))&&e.emit(Nt,n)}return{setup:c,destroy:m,reduce:b,set:I}}var Wo="Arrow",Fo=Wo+"Left",No=Wo+"Right",Rs=Wo+"Up",As=Wo+"Down",da="rtl",Ho="ttb",Zo={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Rs,No],ArrowRight:[As,Fo]};function rc(e,t,n){function i(s,a,u){u=u||n.direction;var c=u===da&&!a?1:u===Ho?0:-1;return Zo[s]&&Zo[s][c]||s.replace(/width|left|right/i,function(m,p){var R=Zo[m.toLowerCase()][c]||m;return p>0?R.charAt(0).toUpperCase()+R.slice(1):R})}function o(s){return s*(n.direction===da?1:-1)}return{resolve:i,orient:o}}var vn="role",si="tabindex",ac="disabled",on="aria-",Di=on+"controls",Ms=on+"current",ua=on+"selected",Gt=on+"label",jr=on+"labelledby",ks=on+"hidden",zr=on+"orientation",ki=on+"roledescription",pa=on+"live",ma=on+"busy",ga=on+"atomic",Vr=[vn,si,ac,Di,Ms,Gt,jr,ks,zr,ki],dn=Vi+"__",_n="is-",Qo=Vi,ha=dn+"track",sc=dn+"list",Oo=dn+"slide",_s=Oo+"--clone",lc=Oo+"__container",Dr=dn+"arrows",Bo=dn+"arrow",Ws=Bo+"--prev",Fs=Bo+"--next",jo=dn+"pagination",Ns=jo+"__page",cc=dn+"progress",dc=cc+"__bar",uc=dn+"toggle",pc=dn+"spinner",mc=dn+"sr",gc=_n+"initialized",Gn=_n+"active",Hs=_n+"prev",Os=_n+"next",wr=_n+"visible",Sr=_n+"loading",Bs=_n+"focus-in",js=_n+"overflow",hc=[Gn,wr,Hs,Os,Sr,Bs,js],fc={slide:Oo,clone:_s,arrows:Dr,arrow:Bo,prev:Ws,next:Fs,pagination:jo,page:Ns,spinner:pc};function yc(e,t){if(ls(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Ii(n,t);)n=n.parentElement;return n}var vc=5,fa=200,zs="touchstart mousedown",er="touchmove mousemove",tr="touchend touchcancel mouseup click";function bc(e,t,n){var i=gt(e),o=i.on,s=i.bind,a=e.root,u=n.i18n,c={},m=[],p=[],R=[],b,I,g;function v(){S(),z(),$()}function T(){o(Lt,w),o(Lt,v),o(Nt,$),s(document,zs+" keydown",function(L){g=L.type==="keydown"},{capture:!0}),s(a,"focusin",function(){fn(a,Bs,!!g)})}function w(L){var C=Vr.concat("style");wn(m),yn(a,p),yn(b,R),cn([b,I],C),cn(a,L?C:["style",ki])}function $(){yn(a,p),yn(b,R),p=N(Qo),R=N(ha),ln(a,p),ln(b,R),He(a,Gt,n.label),He(a,jr,n.labelledby)}function S(){b=M("."+ha),I=zi(b,"."+sc),Si(b&&I,"A track/list element is missing."),yo(m,ds(I,"."+Oo+":not(."+_s+")")),qn({arrows:Dr,pagination:jo,prev:Ws,next:Fs,bar:dc,toggle:uc},function(L,C){c[C]=M("."+L)}),Ri(c,{root:a,track:b,list:I,slides:m})}function z(){var L=a.id||ec(Vi),C=n.role;a.id=L,b.id=b.id||L+"-track",I.id=I.id||L+"-list",!tn(a,vn)&&a.tagName!=="SECTION"&&C&&He(a,vn,C),He(a,ki,u.carousel),He(I,vn,"presentation")}function M(L){var C=ms(a,L);return C&&yc(C,"."+Qo)===a?C:void 0}function N(L){return[L+"--"+n.type,L+"--"+n.direction,n.drag&&L+"--draggable",n.isNavigation&&L+"--nav",L===Qo&&Gn]}return Ri(c,{setup:v,mount:T,destroy:w})}var di="slide",vi="loop",qi="fade";function xc(e,t,n,i){var o=gt(e),s=o.on,a=o.emit,u=o.bind,c=e.Components,m=e.root,p=e.options,R=p.isNavigation,b=p.updateOnMove,I=p.i18n,g=p.pagination,v=p.slideFocus,T=c.Direction.resolve,w=tn(i,"style"),$=tn(i,Gt),S=n>-1,z=zi(i,"."+lc),M;function N(){S||(i.id=m.id+"-slide"+_r(t+1),He(i,vn,g?"tabpanel":"group"),He(i,ki,I.slide),He(i,Gt,$||br(I.slideLabel,[t+1,e.length]))),L()}function L(){u(i,"click",ct(a,Wr,Q)),u(i,"keydown",ct(a,Is,Q)),s([yi,Ps,Un],k),s(Nr,J),b&&s(Sn,y)}function C(){M=!0,o.destroy(),yn(i,hc),cn(i,Vr),He(i,"style",w),He(i,Gt,$||"")}function J(){var Y=e.splides.map(function(O){var te=O.splide.Components.Slides.getAt(t);return te?te.slide.id:""}).join(" ");He(i,Gt,br(I.slideX,(S?n:t)+1)),He(i,Di,Y),He(i,vn,v?"button":""),v&&cn(i,ki)}function y(){M||k()}function k(){if(!M){var Y=e.index;_(),V(),fn(i,Hs,t===Y-1),fn(i,Os,t===Y+1)}}function _(){var Y=me();Y!==la(i,Gn)&&(fn(i,Gn,Y),He(i,Ms,R&&Y||""),a(Y?fs:ys,Q))}function V(){var Y=K(),O=!Y&&(!me()||S);if(e.state.is([fi,Hi])||He(i,ks,O||""),He(Mr(i,p.focusableNodes||""),si,O?-1:""),v&&He(i,si,O?-1:0),Y!==la(i,wr)&&(fn(i,wr,Y),a(Y?vs:bs,Q)),!Y&&document.activeElement===i){var te=c.Slides.getAt(e.index);te&&us(te.slide)}}function ne(Y,O,te){en(te&&z||i,Y,O)}function me(){var Y=e.index;return Y===t||p.cloneStatus&&Y===n}function K(){if(e.is(qi))return me();var Y=Kt(c.Elements.track),O=Kt(i),te=T("left",!0),ce=T("right",!0);return Lo(Y[te])<=Mi(O[te])&&Lo(O[ce])<=Mi(Y[ce])}function H(Y,O){var te=Bt(Y-t);return!S&&(p.rewind||e.is(vi))&&(te=Rn(te,e.length-te)),te<=O}var Q={index:t,slideIndex:n,slide:i,container:z,isClone:S,mount:N,destroy:C,update:k,style:ne,isWithin:H};return Q}function wc(e,t,n){var i=gt(e),o=i.on,s=i.emit,a=i.bind,u=t.Elements,c=u.slides,m=u.list,p=[];function R(){b(),o(Lt,I),o(Lt,b)}function b(){c.forEach(function(k,_){v(k,_,-1)})}function I(){M(function(k){k.destroy()}),wn(p)}function g(){M(function(k){k.update()})}function v(k,_,V){var ne=xc(e,_,V,k);ne.mount(),p.push(ne),p.sort(function(me,K){return me.index-K.index})}function T(k){return k?N(function(_){return!_.isClone}):p}function w(k){var _=t.Controller,V=_.toIndex(k),ne=_.hasFocus()?1:n.perPage;return N(function(me){return vo(me.index,V,V+ne-1)})}function $(k){return N(k)[0]}function S(k,_){Yt(k,function(V){if(Pn(V)&&(V=ps(V)),cs(V)){var ne=c[_];ne?Ar(V,ne):ji(m,V),ln(V,n.classes.slide),C(V,ct(s,ci))}}),s(Lt)}function z(k){Kn(N(k).map(function(_){return _.slide})),s(Lt)}function M(k,_){T(_).forEach(k)}function N(k){return p.filter(ls(k)?k:function(_){return Pn(k)?Ii(_.slide,k):Rr(Bi(k),_.index)})}function L(k,_,V){M(function(ne){ne.style(k,_,V)})}function C(k,_){var V=Mr(k,"img"),ne=V.length;ne?V.forEach(function(me){a(me,"load error",function(){--ne||_()})}):_()}function J(k){return k?c.length:p.length}function y(){return p.length>n.perPage}return{mount:R,destroy:I,update:g,register:v,get:T,getIn:w,getAt:$,add:S,remove:z,forEach:M,filter:N,style:L,getLength:J,isEnough:y}}function Sc(e,t,n){var i=gt(e),o=i.on,s=i.bind,a=i.emit,u=t.Slides,c=t.Direction.resolve,m=t.Elements,p=m.root,R=m.track,b=m.list,I=u.getAt,g=u.style,v,T,w;function $(){S(),s(window,"resize load",ic(ct(a,ci))),o([Nt,Lt],S),o(ci,z)}function S(){v=n.direction===Ho,en(p,"maxWidth",On(n.width)),en(R,c("paddingLeft"),M(!1)),en(R,c("paddingRight"),M(!0)),z(!0)}function z(Q){var Y=Kt(p);(Q||T.width!==Y.width||T.height!==Y.height)&&(en(R,"height",N()),g(c("marginRight"),On(n.gap)),g("width",C()),g("height",J(),!0),T=Y,a(Mo),w!==(w=H())&&(fn(p,js,w),a(tc,w)))}function M(Q){var Y=n.padding,O=c(Q?"right":"left");return Y&&On(Y[O]||(Ei(Y)?0:Y))||"0px"}function N(){var Q="";return v&&(Q=L(),Si(Q,"height or heightRatio is missing."),Q="calc("+Q+" - "+M(!1)+" - "+M(!0)+")"),Q}function L(){return On(n.height||Kt(b).width*n.heightRatio)}function C(){return n.autoWidth?null:On(n.fixedWidth)||(v?"":y())}function J(){return On(n.fixedHeight)||(v?n.autoHeight?null:y():L())}function y(){var Q=On(n.gap);return"calc((100%"+(Q&&" + "+Q)+")/"+(n.perPage||1)+(Q&&" - "+Q)+")"}function k(){return Kt(b)[c("width")]}function _(Q,Y){var O=I(Q||0);return O?Kt(O.slide)[c("width")]+(Y?0:me()):0}function V(Q,Y){var O=I(Q);if(O){var te=Kt(O.slide)[c("right")],ce=Kt(b)[c("left")];return Bt(te-ce)+(Y?0:me())}return 0}function ne(Q){return V(e.length-1)-V(0)+_(0,Q)}function me(){var Q=I(0);return Q&&parseFloat(en(Q.slide,c("marginRight")))||0}function K(Q){return parseFloat(en(R,c("padding"+(Q?"Right":"Left"))))||0}function H(){return e.is(qi)||ne(!0)>k()}return{mount:$,resize:z,listSize:k,slideSize:_,sliderSize:ne,totalSize:V,getPadding:K,isOverflow:H}}var $c=2;function Cc(e,t,n){var i=gt(e),o=i.on,s=t.Elements,a=t.Slides,u=t.Direction.resolve,c=[],m;function p(){o(Lt,R),o([Nt,ci],I),(m=T())&&(g(m),t.Layout.resize(!0))}function R(){b(),p()}function b(){Kn(c),wn(c),i.destroy()}function I(){var w=T();m!==w&&(m<w||!w)&&i.emit(Lt)}function g(w){var $=a.get().slice(),S=$.length;if(S){for(;$.length<w;)yo($,$);yo($.slice(-w),$.slice(0,w)).forEach(function(z,M){var N=M<w,L=v(z.slide,M);N?Ar(L,$[0].slide):ji(s.list,L),yo(c,L),a.register(L,M-w+(N?0:S),z.index)})}}function v(w,$){var S=w.cloneNode(!0);return ln(S,n.classes.clone),S.id=e.root.id+"-clone"+_r($+1),S}function T(){var w=n.clones;if(!e.is(vi))w=0;else if(Oi(w)){var $=n[u("fixedWidth")]&&t.Layout.slideSize(0),S=$&&Mi(Kt(s.track)[u("width")]/$);w=S||n[u("autoWidth")]&&e.length||n.perPage*$c}return w}return{mount:p,destroy:b}}function Tc(e,t,n){var i=gt(e),o=i.on,s=i.emit,a=e.state.set,u=t.Layout,c=u.slideSize,m=u.getPadding,p=u.totalSize,R=u.listSize,b=u.sliderSize,I=t.Direction,g=I.resolve,v=I.orient,T=t.Elements,w=T.list,$=T.track,S;function z(){S=t.Transition,o([kn,Mo,Nt,Lt],M)}function M(){t.Controller.isBusy()||(t.Scroll.cancel(),L(e.index),t.Slides.update())}function N(O,te,ce,oe){O!==te&&Q(O>ce)&&(k(),C(y(ne(),O>ce),!0)),a(fi),s(Sn,te,ce,O),S.start(te,function(){a(li),s(yi,te,ce,O),oe&&oe()})}function L(O){C(V(O,!0))}function C(O,te){if(!e.is(qi)){var ce=te?O:J(O);en(w,"transform","translate"+g("X")+"("+ce+"px)"),O!==ce&&s(Ps)}}function J(O){if(e.is(vi)){var te=_(O),ce=te>t.Controller.getEnd(),oe=te<0;(oe||ce)&&(O=y(O,ce))}return O}function y(O,te){var ce=O-H(te),oe=b();return O-=v(oe*(Mi(Bt(ce)/oe)||1))*(te?1:-1),O}function k(){C(ne(),!0),S.cancel()}function _(O){for(var te=t.Slides.get(),ce=0,oe=1/0,W=0;W<te.length;W++){var ue=te[W].index,h=Bt(V(ue,!0)-O);if(h<=oe)oe=h,ce=ue;else break}return ce}function V(O,te){var ce=v(p(O-1)-K(O));return te?me(ce):ce}function ne(){var O=g("left");return Kt(w)[O]-Kt($)[O]+v(m(!1))}function me(O){return n.trimSpace&&e.is(di)&&(O=ni(O,0,v(b(!0)-R()))),O}function K(O){var te=n.focus;return te==="center"?(R()-c(O,!0))/2:+te*c(O)||0}function H(O){return V(O?t.Controller.getEnd():0,!!n.trimSpace)}function Q(O){var te=v(y(ne(),O));return O?te>=0:te<=w[g("scrollWidth")]-Kt($)[g("width")]}function Y(O,te){te=Oi(te)?ne():te;var ce=O!==!0&&v(te)<v(H(!1)),oe=O!==!1&&v(te)>v(H(!0));return ce||oe}return{mount:z,move:N,jump:L,translate:C,shift:y,cancel:k,toIndex:_,toPosition:V,getPosition:ne,getLimit:H,exceededLimit:Y,reposition:M}}function Lc(e,t,n){var i=gt(e),o=i.on,s=i.emit,a=t.Move,u=a.getPosition,c=a.getLimit,m=a.toPosition,p=t.Slides,R=p.isEnough,b=p.getLength,I=n.omitEnd,g=e.is(vi),v=e.is(di),T=ct(ne,!1),w=ct(ne,!0),$=n.start||0,S,z=$,M,N,L;function C(){J(),o([Nt,Lt,Eo],J),o(Mo,y)}function J(){M=b(!0),N=n.perMove,L=n.perPage,S=Q();var h=ni($,0,I?S:M-1);h!==$&&($=h,a.reposition())}function y(){S!==Q()&&s(Eo)}function k(h,ae,be){if(!ue()){var ye=V(h),Ae=H(ye);Ae>-1&&(ae||Ae!==$)&&(ce(Ae),a.move(ye,Ae,z,be))}}function _(h,ae,be,ye){t.Scroll.scroll(h,ae,be,function(){var Ae=H(a.toIndex(u()));ce(I?Rn(Ae,S):Ae),ye&&ye()})}function V(h){var ae=$;if(Pn(h)){var be=h.match(/([+\-<>])(\d+)?/)||[],ye=be[1],Ae=be[2];ye==="+"||ye==="-"?ae=me($+ +(""+ye+(+Ae||1)),$):ye===">"?ae=Ae?Y(+Ae):T(!0):ye==="<"&&(ae=w(!0))}else ae=g?h:ni(h,0,S);return ae}function ne(h,ae){var be=N||(W()?1:L),ye=me($+be*(h?-1:1),$,!(N||W()));return ye===-1&&v&&!gs(u(),c(!h),1)?h?0:S:ae?ye:H(ye)}function me(h,ae,be){if(R()||W()){var ye=K(h);ye!==h&&(ae=h,h=ye,be=!1),h<0||h>S?!N&&(vo(0,h,ae,!0)||vo(S,ae,h,!0))?h=Y(O(h)):g?h=be?h<0?-(M%L||L):M:h:n.rewind?h=h<0?S:0:h=-1:be&&h!==ae&&(h=Y(O(ae)+(h<ae?-1:1)))}else h=-1;return h}function K(h){if(v&&n.trimSpace==="move"&&h!==$)for(var ae=u();ae===m(h,!0)&&vo(h,0,e.length-1,!n.rewind);)h<$?--h:++h;return h}function H(h){return g?(h+M)%M||0:h}function Q(){for(var h=M-(W()||g&&N?1:L);I&&h-- >0;)if(m(M-1,!0)!==m(h,!0)){h++;break}return ni(h,0,M-1)}function Y(h){return ni(W()?h:L*h,0,S)}function O(h){return W()?Rn(h,S):Lo((h>=S?M-1:h)/L)}function te(h){var ae=a.toIndex(h);return v?ni(ae,0,S):ae}function ce(h){h!==$&&(z=$,$=h)}function oe(h){return h?z:$}function W(){return!Oi(n.focus)||n.isNavigation}function ue(){return e.state.is([fi,Hi])&&!!n.waitForTransition}return{mount:C,go:k,scroll:_,getNext:T,getPrev:w,getAdjacent:ne,getEnd:Q,setIndex:ce,getIndex:oe,toIndex:Y,toPage:O,toDest:te,hasFocus:W,isBusy:ue}}var Ec="http://www.w3.org/2000/svg",Ic="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",eo=40;function Pc(e,t,n){var i=gt(e),o=i.on,s=i.bind,a=i.emit,u=n.classes,c=n.i18n,m=t.Elements,p=t.Controller,R=m.arrows,b=m.track,I=R,g=m.prev,v=m.next,T,w,$={};function S(){M(),o(Nt,z)}function z(){N(),S()}function M(){var _=n.arrows;_&&!(g&&v)&&J(),g&&v&&(Ri($,{prev:g,next:v}),Ai(I,_?"":"none"),ln(I,w=Dr+"--"+n.direction),_&&(L(),k(),He([g,v],Di,b.id),a($s,g,v)))}function N(){i.destroy(),yn(I,w),T?(Kn(R?[g,v]:I),g=v=null):cn([g,v],Vr)}function L(){o([kn,yi,Lt,Un,Eo],k),s(v,"click",ct(C,">")),s(g,"click",ct(C,"<"))}function C(_){p.go(_,!0)}function J(){I=R||ai("div",u.arrows),g=y(!0),v=y(!1),T=!0,ji(I,[g,v]),!R&&Ar(I,b)}function y(_){var V='<button class="'+u.arrow+" "+(_?u.prev:u.next)+'" type="button"><svg xmlns="'+Ec+'" viewBox="0 0 '+eo+" "+eo+'" width="'+eo+'" height="'+eo+'" focusable="false"><path d="'+(n.arrowPath||Ic)+'" />';return ps(V)}function k(){if(g&&v){var _=e.index,V=p.getPrev(),ne=p.getNext(),me=V>-1&&_<V?c.last:c.prev,K=ne>-1&&_>ne?c.first:c.next;g.disabled=V<0,v.disabled=ne<0,He(g,Gt,me),He(v,Gt,K),a(Cs,g,v,V,ne)}}return{arrows:$,mount:S,destroy:N,update:k}}var Rc=kr+"-interval";function Ac(e,t,n){var i=gt(e),o=i.on,s=i.bind,a=i.emit,u=_o(n.interval,e.go.bind(e,">"),L),c=u.isPaused,m=t.Elements,p=t.Elements,R=p.root,b=p.toggle,I=n.autoplay,g,v,T=I==="pause";function w(){I&&($(),b&&He(b,Di,m.track.id),T||S(),N())}function $(){n.pauseOnHover&&s(R,"mouseenter mouseleave",function(J){g=J.type==="mouseenter",M()}),n.pauseOnFocus&&s(R,"focusin focusout",function(J){v=J.type==="focusin",M()}),b&&s(b,"click",function(){T?S():z(!0)}),o([Sn,ko,Lt],u.rewind),o(Sn,C)}function S(){c()&&t.Slides.isEnough()&&(u.start(!n.resetProgress),v=g=T=!1,N(),a(Hr))}function z(J){J===void 0&&(J=!0),T=!!J,N(),c()||(u.pause(),a(Or))}function M(){T||(g||v?z(!1):S())}function N(){b&&(fn(b,Gn,!T),He(b,Gt,n.i18n[T?"play":"pause"]))}function L(J){var y=m.bar;y&&en(y,"width",J*100+"%"),a(Es,J)}function C(J){var y=t.Slides.getAt(J);u.set(y&&+tn(y.slide,Rc)||n.interval)}return{mount:w,destroy:u.cancel,play:S,pause:z,isPaused:c}}function Mc(e,t,n){var i=gt(e),o=i.on;function s(){n.cover&&(o(Br,ct(u,!0)),o([kn,Nt,Lt],ct(a,!0)))}function a(c){t.Slides.forEach(function(m){var p=zi(m.container||m.slide,"img");p&&p.src&&u(c,p,m)})}function u(c,m,p){p.style("background",c?'center/cover no-repeat url("'+m.src+'")':"",!0),Ai(m,c?"none":"")}return{mount:s,destroy:ct(a,!1)}}var kc=10,_c=600,Wc=.6,Fc=1.5,Nc=800;function Hc(e,t,n){var i=gt(e),o=i.on,s=i.emit,a=e.state.set,u=t.Move,c=u.getPosition,m=u.getLimit,p=u.exceededLimit,R=u.translate,b=e.is(di),I,g,v=1;function T(){o(Sn,z),o([Nt,Lt],M)}function w(L,C,J,y,k){var _=c();if(z(),J&&(!b||!p())){var V=t.Layout.sliderSize(),ne=vr(L)*V*Lo(Bt(L)/V)||0;L=u.toPosition(t.Controller.toDest(L%V))+ne}var me=gs(_,L,1);v=1,C=me?0:C||To(Bt(L-_)/Fc,Nc),g=y,I=_o(C,$,ct(S,_,L,k),1),a(Hi),s(ko),I.start()}function $(){a(li),g&&g(),s(Un)}function S(L,C,J,y){var k=c(),_=L+(C-L)*N(y),V=(_-k)*v;R(k+V),b&&!J&&p()&&(v*=Wc,Bt(V)<kc&&w(m(p(!0)),_c,!1,g,!0))}function z(){I&&I.cancel()}function M(){I&&!I.isPaused()&&(z(),$())}function N(L){var C=n.easingFunc;return C?C(L):1-Math.pow(1-L,4)}return{mount:T,destroy:z,scroll:w,cancel:M}}var ii={passive:!1,capture:!0};function Oc(e,t,n){var i=gt(e),o=i.on,s=i.emit,a=i.bind,u=i.unbind,c=e.state,m=t.Move,p=t.Scroll,R=t.Controller,b=t.Elements.track,I=t.Media.reduce,g=t.Direction,v=g.resolve,T=g.orient,w=m.getPosition,$=m.exceededLimit,S,z,M,N,L,C=!1,J,y,k;function _(){a(b,er,fr,ii),a(b,tr,fr,ii),a(b,zs,ne,ii),a(b,"click",H,{capture:!0}),a(b,"dragstart",hn),o([kn,Nt],V)}function V(){var U=n.drag;ge(!U),N=U==="free"}function ne(U){if(J=!1,!y){var X=Ae(U);ye(U.target)&&(X||!U.button)&&(R.isBusy()?hn(U,!0):(k=X?b:window,L=c.is([fi,Hi]),M=null,a(k,er,me,ii),a(k,tr,K,ii),m.cancel(),p.cancel(),Q(U)))}}function me(U){if(c.is(fo)||(c.set(fo),s(xs)),U.cancelable)if(L){m.translate(S+be(W(U)));var X=ue(U)>fa,B=C!==(C=$());(X||B)&&Q(U),J=!0,s(ws),hn(U)}else te(U)&&(L=O(U),hn(U))}function K(U){c.is(fo)&&(c.set(li),s(Ss)),L&&(Y(U),hn(U)),u(k,er,me),u(k,tr,K),L=!1}function H(U){!y&&J&&hn(U,!0)}function Q(U){M=z,z=U,S=w()}function Y(U){var X=ce(U),B=oe(X),se=n.rewind&&n.rewindByDrag;I(!1),N?R.scroll(B,0,n.snap):e.is(qi)?R.go(T(vr(X))<0?se?"<":"-":se?">":"+"):e.is(di)&&C&&se?R.go($(!0)?">":"<"):R.go(R.toDest(B),!0),I(!0)}function O(U){var X=n.dragMinThreshold,B=Ei(X),se=B&&X.mouse||0,Ee=(B?X.touch:+X)||10;return Bt(W(U))>(Ae(U)?Ee:se)}function te(U){return Bt(W(U))>Bt(W(U,!0))}function ce(U){if(e.is(vi)||!C){var X=ue(U);if(X&&X<fa)return W(U)/X}return 0}function oe(U){return w()+vr(U)*Rn(Bt(U)*(n.flickPower||600),N?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function W(U,X){return ae(U,X)-ae(h(U),X)}function ue(U){return yr(U)-yr(h(U))}function h(U){return z===U&&M||z}function ae(U,X){return(Ae(U)?U.changedTouches[0]:U)["page"+v(X?"Y":"X")]}function be(U){return U/(C&&e.is(di)?vc:1)}function ye(U){var X=n.noDrag;return!Ii(U,"."+Ns+", ."+Bo)&&(!X||!Ii(U,X))}function Ae(U){return typeof TouchEvent<"u"&&U instanceof TouchEvent}function Z(){return L}function ge(U){y=U}return{mount:_,disable:ge,isDragging:Z}}var Bc={Spacebar:" ",Right:No,Left:Fo,Up:Rs,Down:As};function qr(e){return e=Pn(e)?e:e.key,Bc[e]||e}var ya="keydown";function jc(e,t,n){var i=gt(e),o=i.on,s=i.bind,a=i.unbind,u=e.root,c=t.Direction.resolve,m,p;function R(){b(),o(Nt,I),o(Nt,b),o(Sn,v)}function b(){var w=n.keyboard;w&&(m=w==="global"?window:u,s(m,ya,T))}function I(){a(m,ya)}function g(w){p=w}function v(){var w=p;p=!0,ss(function(){p=w})}function T(w){if(!p){var $=qr(w);$===c(Fo)?e.go("<"):$===c(No)&&e.go(">")}}return{mount:R,destroy:I,disable:g}}var $i=kr+"-lazy",bo=$i+"-srcset",zc="["+$i+"], ["+bo+"]";function Vc(e,t,n){var i=gt(e),o=i.on,s=i.off,a=i.bind,u=i.emit,c=n.lazyLoad==="sequential",m=[yi,Un],p=[];function R(){n.lazyLoad&&(b(),o(Lt,b))}function b(){wn(p),I(),c?w():(s(m),o(m,g),g())}function I(){t.Slides.forEach(function($){Mr($.slide,zc).forEach(function(S){var z=tn(S,$i),M=tn(S,bo);if(z!==S.src||M!==S.srcset){var N=n.classes.spinner,L=S.parentElement,C=zi(L,"."+N)||ai("span",N,L);p.push([S,$,C]),S.src||Ai(S,"none")}})})}function g(){p=p.filter(function($){var S=n.perPage*((n.preloadPages||1)+1)-1;return $[1].isWithin(e.index,S)?v($):!0}),p.length||s(m)}function v($){var S=$[0];ln($[1].slide,Sr),a(S,"load error",ct(T,$)),He(S,"src",tn(S,$i)),He(S,"srcset",tn(S,bo)),cn(S,$i),cn(S,bo)}function T($,S){var z=$[0],M=$[1];yn(M.slide,Sr),S.type!=="error"&&(Kn($[2]),Ai(z,""),u(Br,z,M),u(ci)),c&&w()}function w(){p.length&&v(p.shift())}return{mount:R,destroy:ct(wn,p),check:g}}function Dc(e,t,n){var i=gt(e),o=i.on,s=i.emit,a=i.bind,u=t.Slides,c=t.Elements,m=t.Controller,p=m.hasFocus,R=m.getIndex,b=m.go,I=t.Direction.resolve,g=c.pagination,v=[],T,w;function $(){S(),o([Nt,Lt,Eo],$);var y=n.pagination;g&&Ai(g,y?"":"none"),y&&(o([Sn,ko,Un],J),z(),J(),s(Ts,{list:T,items:v},C(e.index)))}function S(){T&&(Kn(g?Mn(T.children):T),yn(T,w),wn(v),T=null),i.destroy()}function z(){var y=e.length,k=n.classes,_=n.i18n,V=n.perPage,ne=p()?m.getEnd()+1:Mi(y/V);T=g||ai("ul",k.pagination,c.track.parentElement),ln(T,w=jo+"--"+L()),He(T,vn,"tablist"),He(T,Gt,_.select),He(T,zr,L()===Ho?"vertical":"");for(var me=0;me<ne;me++){var K=ai("li",null,T),H=ai("button",{class:k.page,type:"button"},K),Q=u.getIn(me).map(function(O){return O.slide.id}),Y=!p()&&V>1?_.pageX:_.slideX;a(H,"click",ct(M,me)),n.paginationKeyboard&&a(H,"keydown",ct(N,me)),He(K,vn,"presentation"),He(H,vn,"tab"),He(H,Di,Q.join(" ")),He(H,Gt,br(Y,me+1)),He(H,si,-1),v.push({li:K,button:H,page:me})}}function M(y){b(">"+y,!0)}function N(y,k){var _=v.length,V=qr(k),ne=L(),me=-1;V===I(No,!1,ne)?me=++y%_:V===I(Fo,!1,ne)?me=(--y+_)%_:V==="Home"?me=0:V==="End"&&(me=_-1);var K=v[me];K&&(us(K.button),b(">"+me),hn(k,!0))}function L(){return n.paginationDirection||n.direction}function C(y){return v[m.toPage(y)]}function J(){var y=C(R(!0)),k=C(R());if(y){var _=y.button;yn(_,Gn),cn(_,ua),He(_,si,-1)}if(k){var V=k.button;ln(V,Gn),He(V,ua,!0),He(V,si,"")}s(Ls,{list:T,items:v},y,k)}return{items:v,mount:$,destroy:S,getAt:C,update:J}}var qc=[" ","Enter"];function Kc(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function a(){e.splides.forEach(function(g){g.isParent||(m(e,g.splide),m(g.splide,e))}),i&&p()}function u(){s.forEach(function(g){g.destroy()}),wn(s)}function c(){u(),a()}function m(g,v){var T=gt(g);T.on(Sn,function(w,$,S){v.go(v.is(vi)?S:w)}),s.push(T)}function p(){var g=gt(e),v=g.on;v(Wr,b),v(Is,I),v([kn,Nt],R),s.push(g),g.emit(Nr,e.splides)}function R(){He(t.Elements.list,zr,n.direction===Ho?"vertical":"")}function b(g){e.go(g.index)}function I(g,v){Rr(qc,qr(v))&&(b(g),hn(v))}return{setup:ct(t.Media.set,{slideFocus:Oi(o)?i:o},!0),mount:a,destroy:u,remount:c}}function Gc(e,t,n){var i=gt(e),o=i.bind,s=0;function a(){n.wheel&&o(t.Elements.track,"wheel",u,ii)}function u(m){if(m.cancelable){var p=m.deltaY,R=p<0,b=yr(m),I=n.wheelMinThreshold||0,g=n.wheelSleep||0;Bt(p)>I&&b-s>g&&(e.go(R?"<":">"),s=b),c(R)&&hn(m)}}function c(m){return!n.releaseWheel||e.state.is(fi)||t.Controller.getAdjacent(m)!==-1}return{mount:a}}var Uc=90;function Xc(e,t,n){var i=gt(e),o=i.on,s=t.Elements.track,a=n.live&&!n.isNavigation,u=ai("span",mc),c=_o(Uc,ct(p,!1));function m(){a&&(b(!t.Autoplay.isPaused()),He(s,ga,!0),u.textContent="…",o(Hr,ct(b,!0)),o(Or,ct(b,!1)),o([yi,Un],ct(p,!0)))}function p(I){He(s,ma,I),I?(ji(s,u),c.start()):(Kn(u),c.cancel())}function R(){cn(s,[pa,ga,ma]),Kn(u)}function b(I){a&&He(s,pa,I?"off":"polite")}return{mount:m,disable:b,destroy:R}}var Yc=Object.freeze({__proto__:null,Media:oc,Direction:rc,Elements:bc,Slides:wc,Layout:Sc,Clones:Cc,Move:Tc,Controller:Lc,Arrows:Pc,Autoplay:Ac,Cover:Mc,Scroll:Hc,Drag:Oc,Keyboard:jc,LazyLoad:Vc,Pagination:Dc,Sync:Kc,Wheel:Gc,Live:Xc}),Jc={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"},Zc={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:fc,i18n:Jc,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Qc(e,t,n){var i=t.Slides;function o(){gt(e).on([kn,Lt],s)}function s(){i.forEach(function(u){u.style("transform","translateX(-"+100*u.index+"%)")})}function a(u,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),ss(c)}return{mount:o,start:a,cancel:fr}}function ed(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,a=t.Elements.list,u=ct(en,a,"transition"),c;function m(){gt(e).bind(a,"transitionend",function(I){I.target===a&&c&&(R(),c())})}function p(I,g){var v=i.toPosition(I,!0),T=i.getPosition(),w=b(I);Bt(v-T)>=1&&w>=1?n.useScroll?s.scroll(v,w,!1,g):(u("transform "+w+"ms "+n.easing),i.translate(v,!0),c=g):(i.jump(I),g())}function R(){u(""),s.cancel()}function b(I){var g=n.rewindSpeed;if(e.is(di)&&g){var v=o.getIndex(!0),T=o.getEnd();if(v===0&&I>=T||v>=T&&I===0)return g}return n.speed}return{mount:m,start:p,cancel:R}}var td=(function(){function e(n,i){this.event=gt(),this.Components={},this.state=nc(ri),this.splides=[],this._o={},this._E={};var o=Pn(n)?ms(document,n):n;Si(o,o+" is invalid."),this.root=o,i=In({label:tn(o,Gt)||"",labelledby:tn(o,jr)||""},Zc,e.defaults,i||{});try{In(i,JSON.parse(tn(o,kr)))}catch{Si(!1,"Invalid JSON")}this._o=Object.create(In({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,a=this.state,u=this.Components;Si(a.is([ri,Co]),"Already mounted!"),a.set(ri),this._C=u,this._T=o||this._T||(this.is(qi)?Qc:ed),this._E=i||this._E;var c=Ri({},Yc,this._E,{Transition:this._T});return qn(c,function(m,p){var R=m(s,u,s._o);u[p]=R,R.setup&&R.setup()}),qn(u,function(m){m.mount&&m.mount()}),this.emit(kn),ln(this.root,gc),a.set(li),this.emit(xr),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(li)&&(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(Mn(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(Lt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(ri)?gt(this).on(xr,this.destroy.bind(this,i)):(qn(this._C,function(a){a.destroy&&a.destroy(i)},!0),o.emit(Fr),o.destroy(),i&&wn(this.splides),s.set(Co)),this},Jl(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})(),Kr=td;Kr.defaults={};Kr.STATES=Ql;var va=[[kn,"onMounted"],[xr,"onReady"],[Sn,"onMove"],[yi,"onMoved"],[Wr,"onClick"],[fs,"onActive"],[ys,"onInactive"],[vs,"onVisible"],[bs,"onHidden"],[Lt,"onRefresh"],[Nt,"onUpdated"],[ci,"onResize"],[Mo,"onResized"],[xs,"onDrag"],[ws,"onDragging"],[Ss,"onDragged"],[ko,"onScroll"],[Un,"onScrolled"],[Fr,"onDestroy"],[$s,"onArrowsMounted"],[Cs,"onArrowsUpdated"],[Ts,"onPaginationMounted"],[Ls,"onPaginationUpdated"],[Nr,"onNavigationMounted"],[Hr,"onAutoplayPlay"],[Es,"onAutoplayPlaying"],[Or,"onAutoplayPause"],[Br,"onLazyLoadLoaded"]];function Gr(...e){return e.filter(Boolean).join(" ")}function Io(e){return e!==null&&typeof e=="object"}function $r(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!$r(n,t[i]));if(Io(e)&&Io(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!$r(e[o],t[o]))}return e===t}function nd(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function id(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 Cr(e,t){const n=e;return id(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():Io(i)?n[o]=Cr(Io(n[o])?n[o]:{},i):n[o]=i}),n}var od=({children:e,className:t,...n})=>l.createElement("div",{className:Gr("splide__track",t),...n},l.createElement("ul",{className:"splide__list"},e)),Ur=class extends l.Component{constructor(){super(...arguments),this.splideRef=l.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Kr(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Cr({},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&&!$r(this.options,e)&&(this.splide.options=e,this.options=Cr({},e));const t=this.getSlides();nd(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){va.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return l.createElement(t,{className:Gr("splide",e),ref:this.splideRef,...this.omit(o,["options",...va.map(s=>s[1])])},n?l.createElement(od,null,i):i)}},Xr=({children:e,className:t,...n})=>l.createElement("li",{className:Gr("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),l=require("react"),Ye=require("classnames"),P=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Ni=require("react-dom");function al(e){return e.type==="object"&&e.version===1}const sl="ControlSlider-module__wrapper___sHEkd",ll="ControlSlider-module__hoverArrow___A-dOH",cl="ControlSlider-module__sliderItem___QQSkR",dl="ControlSlider-module__sliderImage___9hRl-",ul="ControlSlider-module__arrow___05ghY",pl="ControlSlider-module__arrowVertical___tBfVN",ml="ControlSlider-module__nextArrow___-30Yc",gl="ControlSlider-module__arrowInner___aEra3",hl="ControlSlider-module__arrowIcon___S4ztF",fl="ControlSlider-module__arrowImg___2dwJW",yl="ControlSlider-module__mirror___brd6U",vl="ControlSlider-module__pagination___bicLF",bl="ControlSlider-module__paginationInner___bT-P-",xl="ControlSlider-module__paginationVertical___zYqKw",wl="ControlSlider-module__paginationItem___nTRbk",Sl="ControlSlider-module__dot___p1Qun",$l="ControlSlider-module__activeDot___LHFaj",Cl="ControlSlider-module__paginationInsideBottom___R3FWn",Tl="ControlSlider-module__paginationInsideTop___V-qb-",Ll="ControlSlider-module__paginationOutsideBottom___14w8D",El="ControlSlider-module__paginationOutsideTop___SCLqB",Il="ControlSlider-module__paginationInsideLeft___yOBRZ",Pl="ControlSlider-module__paginationInsideRight___Rtt3o",Rl="ControlSlider-module__paginationOutsideLeft___lahaw",Al="ControlSlider-module__paginationOutsideRight___EtuQa",Ml="ControlSlider-module__imgWrapper___UjEgB",kl="ControlSlider-module__captionBlock___dJ6-j",_l="ControlSlider-module__captionTextWrapper___HFlpf",Wl="ControlSlider-module__captionText___uGBVc",Fl="ControlSlider-module__active___WZK4G",Nl="ControlSlider-module__withPointerEvents___t-18M",Hl="ControlSlider-module__topLeftAlignment___zjnGM",Ol="ControlSlider-module__topCenterAlignment___gD1xW",Bl="ControlSlider-module__topRightAlignment___NMapS",jl="ControlSlider-module__middleLeftAlignment___OnUrY",zl="ControlSlider-module__middleCenterAlignment___Tdkl0",Vl="ControlSlider-module__middleRightAlignment___wEbfX",Dl="ControlSlider-module__bottomLeftAlignment___cTP2-",ql="ControlSlider-module__bottomCenterAlignment___c54fB",Kl="ControlSlider-module__bottomRightAlignment___kEwrz",Gl="ControlSlider-module__clickOverlay___DZA28",Ul="ControlSlider-module__contain___pLyq7",Xl="ControlSlider-module__cover___KdDat",Le={wrapper:sl,hoverArrow:ll,sliderItem:cl,sliderImage:dl,arrow:ul,arrowVertical:pl,nextArrow:ml,arrowInner:gl,arrowIcon:hl,arrowImg:fl,mirror:yl,pagination:vl,paginationInner:bl,paginationVertical:xl,paginationItem:wl,dot:Sl,activeDot:$l,paginationInsideBottom:Cl,paginationInsideTop:Tl,paginationOutsideBottom:Ll,paginationOutsideTop:El,paginationInsideLeft:Il,paginationInsideRight:Pl,paginationOutsideLeft:Rl,paginationOutsideRight:Al,imgWrapper:Ml,captionBlock:kl,captionTextWrapper:_l,captionText:Wl,active:Fl,withPointerEvents:Nl,topLeftAlignment:Hl,topCenterAlignment:Ol,topRightAlignment:Bl,middleLeftAlignment:jl,middleCenterAlignment:zl,middleRightAlignment:Vl,bottomLeftAlignment:Dl,bottomCenterAlignment:ql,bottomRightAlignment:Kl,clickOverlay:Gl,contain:Ul,cover:Xl};function Yl(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 Jl(e,t,n){return t&&Yl(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var ra="(prefers-reduced-motion: reduce)",ri=1,Zl=2,li=3,fi=4,Hi=5,yo=6,To=7,Ql={CREATED:ri,MOUNTED:Zl,IDLE:li,MOVING:fi,SCROLLING:Hi,DRAGGING:yo,DESTROYED:To};function wn(e){e.length=0}function Mn(e,t,n){return Array.prototype.slice.call(e,t,n)}function dt(e){return e.bind.apply(e,[null].concat(Mn(arguments,1)))}var ss=setTimeout,fr=function(){};function aa(e){return requestAnimationFrame(e)}function Mo(e,t){return typeof t===e}function Ei(e){return!Pr(e)&&Mo("object",e)}var Ir=Array.isArray,ls=dt(Mo,"function"),Pn=dt(Mo,"string"),Oi=dt(Mo,"undefined");function Pr(e){return e===null}function cs(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Bi(e){return Ir(e)?e:[e]}function Yt(e,t){Bi(e).forEach(t)}function Rr(e,t){return e.indexOf(t)>-1}function vo(e,t){return e.push.apply(e,Bi(t)),e}function fn(e,t,n){e&&Yt(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function ln(e,t){fn(e,Pn(t)?t.split(" "):t,!0)}function ji(e,t){Yt(t,e.appendChild.bind(e))}function Ar(e,t){Yt(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Ii(e,t){return cs(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ds(e,t){var n=e?Mn(e.children):[];return t?n.filter(function(i){return Ii(i,t)}):n}function zi(e,t){return t?ds(e,t)[0]:e.firstElementChild}var Pi=Object.keys;function qn(e,t,n){return e&&(n?Pi(e).reverse():Pi(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Ri(e){return Mn(arguments,1).forEach(function(t){qn(t,function(n,i){e[i]=t[i]})}),e}function In(e){return Mn(arguments,1).forEach(function(t){qn(t,function(n,i){Ir(n)?e[i]=n.slice():Ei(n)?e[i]=In({},Ei(e[i])?e[i]:{},n):e[i]=n})}),e}function sa(e,t){Yt(t||Pi(e),function(n){delete e[n]})}function cn(e,t){Yt(e,function(n){Yt(t,function(i){n&&n.removeAttribute(i)})})}function He(e,t,n){Ei(t)?qn(t,function(i,o){He(e,o,i)}):Yt(e,function(i){Pr(n)||n===""?cn(i,t):i.setAttribute(t,String(n))})}function ai(e,t,n){var i=document.createElement(e);return t&&(Pn(t)?ln(i,t):He(i,t)),n&&ji(n,i),i}function en(e,t,n){if(Oi(n))return getComputedStyle(e)[t];Pr(n)||(e.style[t]=""+n)}function Ai(e,t){en(e,"display",t)}function us(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function tn(e,t){return e.getAttribute(t)}function la(e,t){return e&&e.classList.contains(t)}function Kt(e){return e.getBoundingClientRect()}function Kn(e){Yt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function ps(e){return zi(new DOMParser().parseFromString(e,"text/html").body)}function hn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function ms(e,t){return e&&e.querySelector(t)}function Mr(e,t){return t?Mn(e.querySelectorAll(t)):[]}function yn(e,t){fn(e,t,!1)}function yr(e){return e.timeStamp}function On(e){return Pn(e)?e:e?e+"px":""}var Vi="splide",kr="data-"+Vi;function Si(e,t){if(!e)throw new Error("["+Vi+"] "+(t||""))}var Rn=Math.min,Lo=Math.max,Eo=Math.floor,Mi=Math.ceil,Bt=Math.abs;function gs(e,t,n){return Bt(e-t)<n}function bo(e,t,n,i){var o=Rn(t,n),s=Lo(t,n);return i?o<e&&e<s:o<=e&&e<=s}function ni(e,t,n){var i=Rn(t,n),o=Lo(t,n);return Rn(Lo(i,e),o)}function vr(e){return+(e>0)-+(e<0)}function br(e,t){return Yt(t,function(n){e=e.replace("%s",""+n)}),e}function _r(e){return e<10?"0"+e:""+e}var ca={};function ec(e){return""+e+_r(ca[e]=(ca[e]||0)+1)}function hs(){var e=[];function t(a,u,c,m){o(a,u,function(p,R,x){var I="addEventListener"in p,g=I?p.removeEventListener.bind(p,R,c,m):p.removeListener.bind(p,c);I?p.addEventListener(R,c,m):p.addListener(c),e.push([p,R,x,c,g])})}function n(a,u,c){o(a,u,function(m,p,R){e=e.filter(function(x){return x[0]===m&&x[1]===p&&x[2]===R&&(!c||x[3]===c)?(x[4](),!1):!0})})}function i(a,u,c){var m,p=!0;return typeof CustomEvent=="function"?m=new CustomEvent(u,{bubbles:p,detail:c}):(m=document.createEvent("CustomEvent"),m.initCustomEvent(u,p,!1,c)),a.dispatchEvent(m),m}function o(a,u,c){Yt(a,function(m){m&&Yt(u,function(p){p.split(" ").forEach(function(R){var x=R.split(".");c(m,x[0],x[1])})})})}function s(){e.forEach(function(a){a[4]()}),wn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var kn="mounted",xr="ready",Sn="move",yi="moved",Wr="click",fs="active",ys="inactive",vs="visible",bs="hidden",Lt="refresh",Nt="updated",ci="resize",ko="resized",xs="drag",ws="dragging",Ss="dragged",_o="scroll",Un="scrolled",tc="overflow",Fr="destroy",$s="arrows:mounted",Cs="arrows:updated",Ts="pagination:mounted",Ls="pagination:updated",Nr="navigation:mounted",Hr="autoplay:play",Es="autoplay:playing",Or="autoplay:pause",Br="lazyload:loaded",Is="sk",Ps="sh",Io="ei";function gt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=hs();function i(s,a){n.bind(t,Bi(s).join(" "),function(u){a.apply(a,Ir(u.detail)?u.detail:[])})}function o(s){n.dispatch(t,s,Mn(arguments,1))}return e&&e.event.on(Fr,n.destroy),Ri(n,{bus:t,on:i,off:dt(n.unbind,t),emit:o})}function Wo(e,t,n,i){var o=Date.now,s,a=0,u,c=!0,m=0;function p(){if(!c){if(a=e?Rn((o()-s)/e,1):1,n&&n(a),a>=1&&(t(),s=o(),i&&++m>=i))return x();u=aa(p)}}function R(w){w||g(),s=o()-(w?a*e:0),c=!1,u=aa(p)}function x(){c=!0}function I(){s=o(),a=0,n&&n(a)}function g(){u&&cancelAnimationFrame(u),a=0,u=0,c=!0}function v(w){e=w}function T(){return c}return{start:R,rewind:I,pause:x,cancel:g,set:v,isPaused:T}}function nc(e){var t=e;function n(o){t=o}function i(o){return Rr(Bi(o),t)}return{set:n,is:i}}function ic(e,t){var n=Wo(0,e,null,1);return function(){n.isPaused()&&n.start()}}function oc(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},a=hs(),u=[];function c(){var g=n.mediaQuery==="min";Pi(o).sort(function(v,T){return g?+v-+T:+T-+v}).forEach(function(v){p(o[v],"("+(g?"min":"max")+"-width:"+v+"px)")}),p(s,ra),R()}function m(g){g&&a.destroy()}function p(g,v){var T=matchMedia(v);a.bind(T,"change",R),u.push([g,T])}function R(){var g=i.is(To),v=n.direction,T=u.reduce(function(w,$){return In(w,$[1].matches?$[0]:{})},{});sa(n),I(T),n.destroy?e.destroy(n.destroy==="completely"):g?(m(!0),e.mount()):v!==n.direction&&e.refresh()}function x(g){matchMedia(ra).matches&&(g?In(n,s):sa(n,Pi(s)))}function I(g,v,T){In(n,g),v&&In(Object.getPrototypeOf(n),g),(T||!i.is(ri))&&e.emit(Nt,n)}return{setup:c,destroy:m,reduce:x,set:I}}var Fo="Arrow",No=Fo+"Left",Ho=Fo+"Right",Rs=Fo+"Up",As=Fo+"Down",da="rtl",Oo="ttb",Qo={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Rs,Ho],ArrowRight:[As,No]};function rc(e,t,n){function i(s,a,u){u=u||n.direction;var c=u===da&&!a?1:u===Oo?0:-1;return Qo[s]&&Qo[s][c]||s.replace(/width|left|right/i,function(m,p){var R=Qo[m.toLowerCase()][c]||m;return p>0?R.charAt(0).toUpperCase()+R.slice(1):R})}function o(s){return s*(n.direction===da?1:-1)}return{resolve:i,orient:o}}var vn="role",si="tabindex",ac="disabled",on="aria-",Di=on+"controls",Ms=on+"current",ua=on+"selected",Gt=on+"label",jr=on+"labelledby",ks=on+"hidden",zr=on+"orientation",ki=on+"roledescription",pa=on+"live",ma=on+"busy",ga=on+"atomic",Vr=[vn,si,ac,Di,Ms,Gt,jr,ks,zr,ki],dn=Vi+"__",_n="is-",er=Vi,ha=dn+"track",sc=dn+"list",Bo=dn+"slide",_s=Bo+"--clone",lc=Bo+"__container",Dr=dn+"arrows",jo=dn+"arrow",Ws=jo+"--prev",Fs=jo+"--next",zo=dn+"pagination",Ns=zo+"__page",cc=dn+"progress",dc=cc+"__bar",uc=dn+"toggle",pc=dn+"spinner",mc=dn+"sr",gc=_n+"initialized",Gn=_n+"active",Hs=_n+"prev",Os=_n+"next",wr=_n+"visible",Sr=_n+"loading",Bs=_n+"focus-in",js=_n+"overflow",hc=[Gn,wr,Hs,Os,Sr,Bs,js],fc={slide:Bo,clone:_s,arrows:Dr,arrow:jo,prev:Ws,next:Fs,pagination:zo,page:Ns,spinner:pc};function yc(e,t){if(ls(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Ii(n,t);)n=n.parentElement;return n}var vc=5,fa=200,zs="touchstart mousedown",tr="touchmove mousemove",nr="touchend touchcancel mouseup click";function bc(e,t,n){var i=gt(e),o=i.on,s=i.bind,a=e.root,u=n.i18n,c={},m=[],p=[],R=[],x,I,g;function v(){S(),O(),$()}function T(){o(Lt,w),o(Lt,v),o(Nt,$),s(document,zs+" keydown",function(L){g=L.type==="keydown"},{capture:!0}),s(a,"focusin",function(){fn(a,Bs,!!g)})}function w(L){var C=Vr.concat("style");wn(m),yn(a,p),yn(x,R),cn([x,I],C),cn(a,L?C:["style",ki])}function $(){yn(a,p),yn(x,R),p=H(er),R=H(ha),ln(a,p),ln(x,R),He(a,Gt,n.label),He(a,jr,n.labelledby)}function S(){x=M("."+ha),I=zi(x,"."+sc),Si(x&&I,"A track/list element is missing."),vo(m,ds(I,"."+Bo+":not(."+_s+")")),qn({arrows:Dr,pagination:zo,prev:Ws,next:Fs,bar:dc,toggle:uc},function(L,C){c[C]=M("."+L)}),Ri(c,{root:a,track:x,list:I,slides:m})}function O(){var L=a.id||ec(Vi),C=n.role;a.id=L,x.id=x.id||L+"-track",I.id=I.id||L+"-list",!tn(a,vn)&&a.tagName!=="SECTION"&&C&&He(a,vn,C),He(a,ki,u.carousel),He(I,vn,"presentation")}function M(L){var C=ms(a,L);return C&&yc(C,"."+er)===a?C:void 0}function H(L){return[L+"--"+n.type,L+"--"+n.direction,n.drag&&L+"--draggable",n.isNavigation&&L+"--nav",L===er&&Gn]}return Ri(c,{setup:v,mount:T,destroy:w})}var di="slide",vi="loop",qi="fade";function xc(e,t,n,i){var o=gt(e),s=o.on,a=o.emit,u=o.bind,c=e.Components,m=e.root,p=e.options,R=p.isNavigation,x=p.updateOnMove,I=p.i18n,g=p.pagination,v=p.slideFocus,T=c.Direction.resolve,w=tn(i,"style"),$=tn(i,Gt),S=n>-1,O=zi(i,"."+lc),M;function H(){S||(i.id=m.id+"-slide"+_r(t+1),He(i,vn,g?"tabpanel":"group"),He(i,ki,I.slide),He(i,Gt,$||br(I.slideLabel,[t+1,e.length]))),L()}function L(){u(i,"click",dt(a,Wr,Q)),u(i,"keydown",dt(a,Is,Q)),s([yi,Ps,Un],k),s(Nr,J),x&&s(Sn,y)}function C(){M=!0,o.destroy(),yn(i,hc),cn(i,Vr),He(i,"style",w),He(i,Gt,$||"")}function J(){var Y=e.splides.map(function(B){var te=B.splide.Components.Slides.getAt(t);return te?te.slide.id:""}).join(" ");He(i,Gt,br(I.slideX,(S?n:t)+1)),He(i,Di,Y),He(i,vn,v?"button":""),v&&cn(i,ki)}function y(){M||k()}function k(){if(!M){var Y=e.index;_(),D(),fn(i,Hs,t===Y-1),fn(i,Os,t===Y+1)}}function _(){var Y=me();Y!==la(i,Gn)&&(fn(i,Gn,Y),He(i,Ms,R&&Y||""),a(Y?fs:ys,Q))}function D(){var Y=K(),B=!Y&&(!me()||S);if(e.state.is([fi,Hi])||He(i,ks,B||""),He(Mr(i,p.focusableNodes||""),si,B?-1:""),v&&He(i,si,B?-1:0),Y!==la(i,wr)&&(fn(i,wr,Y),a(Y?vs:bs,Q)),!Y&&document.activeElement===i){var te=c.Slides.getAt(e.index);te&&us(te.slide)}}function ne(Y,B,te){en(te&&O||i,Y,B)}function me(){var Y=e.index;return Y===t||p.cloneStatus&&Y===n}function K(){if(e.is(qi))return me();var Y=Kt(c.Elements.track),B=Kt(i),te=T("left",!0),de=T("right",!0);return Eo(Y[te])<=Mi(B[te])&&Eo(B[de])<=Mi(Y[de])}function F(Y,B){var te=Bt(Y-t);return!S&&(p.rewind||e.is(vi))&&(te=Rn(te,e.length-te)),te<=B}var Q={index:t,slideIndex:n,slide:i,container:O,isClone:S,mount:H,destroy:C,update:k,style:ne,isWithin:F};return Q}function wc(e,t,n){var i=gt(e),o=i.on,s=i.emit,a=i.bind,u=t.Elements,c=u.slides,m=u.list,p=[];function R(){x(),o(Lt,I),o(Lt,x)}function x(){c.forEach(function(k,_){v(k,_,-1)})}function I(){M(function(k){k.destroy()}),wn(p)}function g(){M(function(k){k.update()})}function v(k,_,D){var ne=xc(e,_,D,k);ne.mount(),p.push(ne),p.sort(function(me,K){return me.index-K.index})}function T(k){return k?H(function(_){return!_.isClone}):p}function w(k){var _=t.Controller,D=_.toIndex(k),ne=_.hasFocus()?1:n.perPage;return H(function(me){return bo(me.index,D,D+ne-1)})}function $(k){return H(k)[0]}function S(k,_){Yt(k,function(D){if(Pn(D)&&(D=ps(D)),cs(D)){var ne=c[_];ne?Ar(D,ne):ji(m,D),ln(D,n.classes.slide),C(D,dt(s,ci))}}),s(Lt)}function O(k){Kn(H(k).map(function(_){return _.slide})),s(Lt)}function M(k,_){T(_).forEach(k)}function H(k){return p.filter(ls(k)?k:function(_){return Pn(k)?Ii(_.slide,k):Rr(Bi(k),_.index)})}function L(k,_,D){M(function(ne){ne.style(k,_,D)})}function C(k,_){var D=Mr(k,"img"),ne=D.length;ne?D.forEach(function(me){a(me,"load error",function(){--ne||_()})}):_()}function J(k){return k?c.length:p.length}function y(){return p.length>n.perPage}return{mount:R,destroy:I,update:g,register:v,get:T,getIn:w,getAt:$,add:S,remove:O,forEach:M,filter:H,style:L,getLength:J,isEnough:y}}function Sc(e,t,n){var i=gt(e),o=i.on,s=i.bind,a=i.emit,u=t.Slides,c=t.Direction.resolve,m=t.Elements,p=m.root,R=m.track,x=m.list,I=u.getAt,g=u.style,v,T,w;function $(){S(),s(window,"resize load",ic(dt(a,ci))),o([Nt,Lt],S),o(ci,O)}function S(){v=n.direction===Oo,en(p,"maxWidth",On(n.width)),en(R,c("paddingLeft"),M(!1)),en(R,c("paddingRight"),M(!0)),O(!0)}function O(Q){var Y=Kt(p);(Q||T.width!==Y.width||T.height!==Y.height)&&(en(R,"height",H()),g(c("marginRight"),On(n.gap)),g("width",C()),g("height",J(),!0),T=Y,a(ko),w!==(w=F())&&(fn(p,js,w),a(tc,w)))}function M(Q){var Y=n.padding,B=c(Q?"right":"left");return Y&&On(Y[B]||(Ei(Y)?0:Y))||"0px"}function H(){var Q="";return v&&(Q=L(),Si(Q,"height or heightRatio is missing."),Q="calc("+Q+" - "+M(!1)+" - "+M(!0)+")"),Q}function L(){return On(n.height||Kt(x).width*n.heightRatio)}function C(){return n.autoWidth?null:On(n.fixedWidth)||(v?"":y())}function J(){return On(n.fixedHeight)||(v?n.autoHeight?null:y():L())}function y(){var Q=On(n.gap);return"calc((100%"+(Q&&" + "+Q)+")/"+(n.perPage||1)+(Q&&" - "+Q)+")"}function k(){return Kt(x)[c("width")]}function _(Q,Y){var B=I(Q||0);return B?Kt(B.slide)[c("width")]+(Y?0:me()):0}function D(Q,Y){var B=I(Q);if(B){var te=Kt(B.slide)[c("right")],de=Kt(x)[c("left")];return Bt(te-de)+(Y?0:me())}return 0}function ne(Q){return D(e.length-1)-D(0)+_(0,Q)}function me(){var Q=I(0);return Q&&parseFloat(en(Q.slide,c("marginRight")))||0}function K(Q){return parseFloat(en(R,c("padding"+(Q?"Right":"Left"))))||0}function F(){return e.is(qi)||ne(!0)>k()}return{mount:$,resize:O,listSize:k,slideSize:_,sliderSize:ne,totalSize:D,getPadding:K,isOverflow:F}}var $c=2;function Cc(e,t,n){var i=gt(e),o=i.on,s=t.Elements,a=t.Slides,u=t.Direction.resolve,c=[],m;function p(){o(Lt,R),o([Nt,ci],I),(m=T())&&(g(m),t.Layout.resize(!0))}function R(){x(),p()}function x(){Kn(c),wn(c),i.destroy()}function I(){var w=T();m!==w&&(m<w||!w)&&i.emit(Lt)}function g(w){var $=a.get().slice(),S=$.length;if(S){for(;$.length<w;)vo($,$);vo($.slice(-w),$.slice(0,w)).forEach(function(O,M){var H=M<w,L=v(O.slide,M);H?Ar(L,$[0].slide):ji(s.list,L),vo(c,L),a.register(L,M-w+(H?0:S),O.index)})}}function v(w,$){var S=w.cloneNode(!0);return ln(S,n.classes.clone),S.id=e.root.id+"-clone"+_r($+1),S}function T(){var w=n.clones;if(!e.is(vi))w=0;else if(Oi(w)){var $=n[u("fixedWidth")]&&t.Layout.slideSize(0),S=$&&Mi(Kt(s.track)[u("width")]/$);w=S||n[u("autoWidth")]&&e.length||n.perPage*$c}return w}return{mount:p,destroy:x}}function Tc(e,t,n){var i=gt(e),o=i.on,s=i.emit,a=e.state.set,u=t.Layout,c=u.slideSize,m=u.getPadding,p=u.totalSize,R=u.listSize,x=u.sliderSize,I=t.Direction,g=I.resolve,v=I.orient,T=t.Elements,w=T.list,$=T.track,S;function O(){S=t.Transition,o([kn,ko,Nt,Lt],M)}function M(){t.Controller.isBusy()||(t.Scroll.cancel(),L(e.index),t.Slides.update())}function H(B,te,de,re){B!==te&&Q(B>de)&&(k(),C(y(ne(),B>de),!0)),a(fi),s(Sn,te,de,B),S.start(te,function(){a(li),s(yi,te,de,B),re&&re()})}function L(B){C(D(B,!0))}function C(B,te){if(!e.is(qi)){var de=te?B:J(B);en(w,"transform","translate"+g("X")+"("+de+"px)"),B!==de&&s(Ps)}}function J(B){if(e.is(vi)){var te=_(B),de=te>t.Controller.getEnd(),re=te<0;(re||de)&&(B=y(B,de))}return B}function y(B,te){var de=B-F(te),re=x();return B-=v(re*(Mi(Bt(de)/re)||1))*(te?1:-1),B}function k(){C(ne(),!0),S.cancel()}function _(B){for(var te=t.Slides.get(),de=0,re=1/0,W=0;W<te.length;W++){var pe=te[W].index,h=Bt(D(pe,!0)-B);if(h<=re)re=h,de=pe;else break}return de}function D(B,te){var de=v(p(B-1)-K(B));return te?me(de):de}function ne(){var B=g("left");return Kt(w)[B]-Kt($)[B]+v(m(!1))}function me(B){return n.trimSpace&&e.is(di)&&(B=ni(B,0,v(x(!0)-R()))),B}function K(B){var te=n.focus;return te==="center"?(R()-c(B,!0))/2:+te*c(B)||0}function F(B){return D(B?t.Controller.getEnd():0,!!n.trimSpace)}function Q(B){var te=v(y(ne(),B));return B?te>=0:te<=w[g("scrollWidth")]-Kt($)[g("width")]}function Y(B,te){te=Oi(te)?ne():te;var de=B!==!0&&v(te)<v(F(!1)),re=B!==!1&&v(te)>v(F(!0));return de||re}return{mount:O,move:H,jump:L,translate:C,shift:y,cancel:k,toIndex:_,toPosition:D,getPosition:ne,getLimit:F,exceededLimit:Y,reposition:M}}function Lc(e,t,n){var i=gt(e),o=i.on,s=i.emit,a=t.Move,u=a.getPosition,c=a.getLimit,m=a.toPosition,p=t.Slides,R=p.isEnough,x=p.getLength,I=n.omitEnd,g=e.is(vi),v=e.is(di),T=dt(ne,!1),w=dt(ne,!0),$=n.start||0,S,O=$,M,H,L;function C(){J(),o([Nt,Lt,Io],J),o(ko,y)}function J(){M=x(!0),H=n.perMove,L=n.perPage,S=Q();var h=ni($,0,I?S:M-1);h!==$&&($=h,a.reposition())}function y(){S!==Q()&&s(Io)}function k(h,ae,be){if(!pe()){var ye=D(h),Ae=F(ye);Ae>-1&&(ae||Ae!==$)&&(de(Ae),a.move(ye,Ae,O,be))}}function _(h,ae,be,ye){t.Scroll.scroll(h,ae,be,function(){var Ae=F(a.toIndex(u()));de(I?Rn(Ae,S):Ae),ye&&ye()})}function D(h){var ae=$;if(Pn(h)){var be=h.match(/([+\-<>])(\d+)?/)||[],ye=be[1],Ae=be[2];ye==="+"||ye==="-"?ae=me($+ +(""+ye+(+Ae||1)),$):ye===">"?ae=Ae?Y(+Ae):T(!0):ye==="<"&&(ae=w(!0))}else ae=g?h:ni(h,0,S);return ae}function ne(h,ae){var be=H||(W()?1:L),ye=me($+be*(h?-1:1),$,!(H||W()));return ye===-1&&v&&!gs(u(),c(!h),1)?h?0:S:ae?ye:F(ye)}function me(h,ae,be){if(R()||W()){var ye=K(h);ye!==h&&(ae=h,h=ye,be=!1),h<0||h>S?!H&&(bo(0,h,ae,!0)||bo(S,ae,h,!0))?h=Y(B(h)):g?h=be?h<0?-(M%L||L):M:h:n.rewind?h=h<0?S:0:h=-1:be&&h!==ae&&(h=Y(B(ae)+(h<ae?-1:1)))}else h=-1;return h}function K(h){if(v&&n.trimSpace==="move"&&h!==$)for(var ae=u();ae===m(h,!0)&&bo(h,0,e.length-1,!n.rewind);)h<$?--h:++h;return h}function F(h){return g?(h+M)%M||0:h}function Q(){for(var h=M-(W()||g&&H?1:L);I&&h-- >0;)if(m(M-1,!0)!==m(h,!0)){h++;break}return ni(h,0,M-1)}function Y(h){return ni(W()?h:L*h,0,S)}function B(h){return W()?Rn(h,S):Eo((h>=S?M-1:h)/L)}function te(h){var ae=a.toIndex(h);return v?ni(ae,0,S):ae}function de(h){h!==$&&(O=$,$=h)}function re(h){return h?O:$}function W(){return!Oi(n.focus)||n.isNavigation}function pe(){return e.state.is([fi,Hi])&&!!n.waitForTransition}return{mount:C,go:k,scroll:_,getNext:T,getPrev:w,getAdjacent:ne,getEnd:Q,setIndex:de,getIndex:re,toIndex:Y,toPage:B,toDest:te,hasFocus:W,isBusy:pe}}var Ec="http://www.w3.org/2000/svg",Ic="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",eo=40;function Pc(e,t,n){var i=gt(e),o=i.on,s=i.bind,a=i.emit,u=n.classes,c=n.i18n,m=t.Elements,p=t.Controller,R=m.arrows,x=m.track,I=R,g=m.prev,v=m.next,T,w,$={};function S(){M(),o(Nt,O)}function O(){H(),S()}function M(){var _=n.arrows;_&&!(g&&v)&&J(),g&&v&&(Ri($,{prev:g,next:v}),Ai(I,_?"":"none"),ln(I,w=Dr+"--"+n.direction),_&&(L(),k(),He([g,v],Di,x.id),a($s,g,v)))}function H(){i.destroy(),yn(I,w),T?(Kn(R?[g,v]:I),g=v=null):cn([g,v],Vr)}function L(){o([kn,yi,Lt,Un,Io],k),s(v,"click",dt(C,">")),s(g,"click",dt(C,"<"))}function C(_){p.go(_,!0)}function J(){I=R||ai("div",u.arrows),g=y(!0),v=y(!1),T=!0,ji(I,[g,v]),!R&&Ar(I,x)}function y(_){var D='<button class="'+u.arrow+" "+(_?u.prev:u.next)+'" type="button"><svg xmlns="'+Ec+'" viewBox="0 0 '+eo+" "+eo+'" width="'+eo+'" height="'+eo+'" focusable="false"><path d="'+(n.arrowPath||Ic)+'" />';return ps(D)}function k(){if(g&&v){var _=e.index,D=p.getPrev(),ne=p.getNext(),me=D>-1&&_<D?c.last:c.prev,K=ne>-1&&_>ne?c.first:c.next;g.disabled=D<0,v.disabled=ne<0,He(g,Gt,me),He(v,Gt,K),a(Cs,g,v,D,ne)}}return{arrows:$,mount:S,destroy:H,update:k}}var Rc=kr+"-interval";function Ac(e,t,n){var i=gt(e),o=i.on,s=i.bind,a=i.emit,u=Wo(n.interval,e.go.bind(e,">"),L),c=u.isPaused,m=t.Elements,p=t.Elements,R=p.root,x=p.toggle,I=n.autoplay,g,v,T=I==="pause";function w(){I&&($(),x&&He(x,Di,m.track.id),T||S(),H())}function $(){n.pauseOnHover&&s(R,"mouseenter mouseleave",function(J){g=J.type==="mouseenter",M()}),n.pauseOnFocus&&s(R,"focusin focusout",function(J){v=J.type==="focusin",M()}),x&&s(x,"click",function(){T?S():O(!0)}),o([Sn,_o,Lt],u.rewind),o(Sn,C)}function S(){c()&&t.Slides.isEnough()&&(u.start(!n.resetProgress),v=g=T=!1,H(),a(Hr))}function O(J){J===void 0&&(J=!0),T=!!J,H(),c()||(u.pause(),a(Or))}function M(){T||(g||v?O(!1):S())}function H(){x&&(fn(x,Gn,!T),He(x,Gt,n.i18n[T?"play":"pause"]))}function L(J){var y=m.bar;y&&en(y,"width",J*100+"%"),a(Es,J)}function C(J){var y=t.Slides.getAt(J);u.set(y&&+tn(y.slide,Rc)||n.interval)}return{mount:w,destroy:u.cancel,play:S,pause:O,isPaused:c}}function Mc(e,t,n){var i=gt(e),o=i.on;function s(){n.cover&&(o(Br,dt(u,!0)),o([kn,Nt,Lt],dt(a,!0)))}function a(c){t.Slides.forEach(function(m){var p=zi(m.container||m.slide,"img");p&&p.src&&u(c,p,m)})}function u(c,m,p){p.style("background",c?'center/cover no-repeat url("'+m.src+'")':"",!0),Ai(m,c?"none":"")}return{mount:s,destroy:dt(a,!1)}}var kc=10,_c=600,Wc=.6,Fc=1.5,Nc=800;function Hc(e,t,n){var i=gt(e),o=i.on,s=i.emit,a=e.state.set,u=t.Move,c=u.getPosition,m=u.getLimit,p=u.exceededLimit,R=u.translate,x=e.is(di),I,g,v=1;function T(){o(Sn,O),o([Nt,Lt],M)}function w(L,C,J,y,k){var _=c();if(O(),J&&(!x||!p())){var D=t.Layout.sliderSize(),ne=vr(L)*D*Eo(Bt(L)/D)||0;L=u.toPosition(t.Controller.toDest(L%D))+ne}var me=gs(_,L,1);v=1,C=me?0:C||Lo(Bt(L-_)/Fc,Nc),g=y,I=Wo(C,$,dt(S,_,L,k),1),a(Hi),s(_o),I.start()}function $(){a(li),g&&g(),s(Un)}function S(L,C,J,y){var k=c(),_=L+(C-L)*H(y),D=(_-k)*v;R(k+D),x&&!J&&p()&&(v*=Wc,Bt(D)<kc&&w(m(p(!0)),_c,!1,g,!0))}function O(){I&&I.cancel()}function M(){I&&!I.isPaused()&&(O(),$())}function H(L){var C=n.easingFunc;return C?C(L):1-Math.pow(1-L,4)}return{mount:T,destroy:O,scroll:w,cancel:M}}var ii={passive:!1,capture:!0};function Oc(e,t,n){var i=gt(e),o=i.on,s=i.emit,a=i.bind,u=i.unbind,c=e.state,m=t.Move,p=t.Scroll,R=t.Controller,x=t.Elements.track,I=t.Media.reduce,g=t.Direction,v=g.resolve,T=g.orient,w=m.getPosition,$=m.exceededLimit,S,O,M,H,L,C=!1,J,y,k;function _(){a(x,tr,fr,ii),a(x,nr,fr,ii),a(x,zs,ne,ii),a(x,"click",F,{capture:!0}),a(x,"dragstart",hn),o([kn,Nt],D)}function D(){var X=n.drag;ge(!X),H=X==="free"}function ne(X){if(J=!1,!y){var U=Ae(X);ye(X.target)&&(U||!X.button)&&(R.isBusy()?hn(X,!0):(k=U?x:window,L=c.is([fi,Hi]),M=null,a(k,tr,me,ii),a(k,nr,K,ii),m.cancel(),p.cancel(),Q(X)))}}function me(X){if(c.is(yo)||(c.set(yo),s(xs)),X.cancelable)if(L){m.translate(S+be(W(X)));var U=pe(X)>fa,j=C!==(C=$());(U||j)&&Q(X),J=!0,s(ws),hn(X)}else te(X)&&(L=B(X),hn(X))}function K(X){c.is(yo)&&(c.set(li),s(Ss)),L&&(Y(X),hn(X)),u(k,tr,me),u(k,nr,K),L=!1}function F(X){!y&&J&&hn(X,!0)}function Q(X){M=O,O=X,S=w()}function Y(X){var U=de(X),j=re(U),se=n.rewind&&n.rewindByDrag;I(!1),H?R.scroll(j,0,n.snap):e.is(qi)?R.go(T(vr(U))<0?se?"<":"-":se?">":"+"):e.is(di)&&C&&se?R.go($(!0)?">":"<"):R.go(R.toDest(j),!0),I(!0)}function B(X){var U=n.dragMinThreshold,j=Ei(U),se=j&&U.mouse||0,Ee=(j?U.touch:+U)||10;return Bt(W(X))>(Ae(X)?Ee:se)}function te(X){return Bt(W(X))>Bt(W(X,!0))}function de(X){if(e.is(vi)||!C){var U=pe(X);if(U&&U<fa)return W(X)/U}return 0}function re(X){return w()+vr(X)*Rn(Bt(X)*(n.flickPower||600),H?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function W(X,U){return ae(X,U)-ae(h(X),U)}function pe(X){return yr(X)-yr(h(X))}function h(X){return O===X&&M||O}function ae(X,U){return(Ae(X)?X.changedTouches[0]:X)["page"+v(U?"Y":"X")]}function be(X){return X/(C&&e.is(di)?vc:1)}function ye(X){var U=n.noDrag;return!Ii(X,"."+Ns+", ."+jo)&&(!U||!Ii(X,U))}function Ae(X){return typeof TouchEvent<"u"&&X instanceof TouchEvent}function Z(){return L}function ge(X){y=X}return{mount:_,disable:ge,isDragging:Z}}var Bc={Spacebar:" ",Right:Ho,Left:No,Up:Rs,Down:As};function qr(e){return e=Pn(e)?e:e.key,Bc[e]||e}var ya="keydown";function jc(e,t,n){var i=gt(e),o=i.on,s=i.bind,a=i.unbind,u=e.root,c=t.Direction.resolve,m,p;function R(){x(),o(Nt,I),o(Nt,x),o(Sn,v)}function x(){var w=n.keyboard;w&&(m=w==="global"?window:u,s(m,ya,T))}function I(){a(m,ya)}function g(w){p=w}function v(){var w=p;p=!0,ss(function(){p=w})}function T(w){if(!p){var $=qr(w);$===c(No)?e.go("<"):$===c(Ho)&&e.go(">")}}return{mount:R,destroy:I,disable:g}}var $i=kr+"-lazy",xo=$i+"-srcset",zc="["+$i+"], ["+xo+"]";function Vc(e,t,n){var i=gt(e),o=i.on,s=i.off,a=i.bind,u=i.emit,c=n.lazyLoad==="sequential",m=[yi,Un],p=[];function R(){n.lazyLoad&&(x(),o(Lt,x))}function x(){wn(p),I(),c?w():(s(m),o(m,g),g())}function I(){t.Slides.forEach(function($){Mr($.slide,zc).forEach(function(S){var O=tn(S,$i),M=tn(S,xo);if(O!==S.src||M!==S.srcset){var H=n.classes.spinner,L=S.parentElement,C=zi(L,"."+H)||ai("span",H,L);p.push([S,$,C]),S.src||Ai(S,"none")}})})}function g(){p=p.filter(function($){var S=n.perPage*((n.preloadPages||1)+1)-1;return $[1].isWithin(e.index,S)?v($):!0}),p.length||s(m)}function v($){var S=$[0];ln($[1].slide,Sr),a(S,"load error",dt(T,$)),He(S,"src",tn(S,$i)),He(S,"srcset",tn(S,xo)),cn(S,$i),cn(S,xo)}function T($,S){var O=$[0],M=$[1];yn(M.slide,Sr),S.type!=="error"&&(Kn($[2]),Ai(O,""),u(Br,O,M),u(ci)),c&&w()}function w(){p.length&&v(p.shift())}return{mount:R,destroy:dt(wn,p),check:g}}function Dc(e,t,n){var i=gt(e),o=i.on,s=i.emit,a=i.bind,u=t.Slides,c=t.Elements,m=t.Controller,p=m.hasFocus,R=m.getIndex,x=m.go,I=t.Direction.resolve,g=c.pagination,v=[],T,w;function $(){S(),o([Nt,Lt,Io],$);var y=n.pagination;g&&Ai(g,y?"":"none"),y&&(o([Sn,_o,Un],J),O(),J(),s(Ts,{list:T,items:v},C(e.index)))}function S(){T&&(Kn(g?Mn(T.children):T),yn(T,w),wn(v),T=null),i.destroy()}function O(){var y=e.length,k=n.classes,_=n.i18n,D=n.perPage,ne=p()?m.getEnd()+1:Mi(y/D);T=g||ai("ul",k.pagination,c.track.parentElement),ln(T,w=zo+"--"+L()),He(T,vn,"tablist"),He(T,Gt,_.select),He(T,zr,L()===Oo?"vertical":"");for(var me=0;me<ne;me++){var K=ai("li",null,T),F=ai("button",{class:k.page,type:"button"},K),Q=u.getIn(me).map(function(B){return B.slide.id}),Y=!p()&&D>1?_.pageX:_.slideX;a(F,"click",dt(M,me)),n.paginationKeyboard&&a(F,"keydown",dt(H,me)),He(K,vn,"presentation"),He(F,vn,"tab"),He(F,Di,Q.join(" ")),He(F,Gt,br(Y,me+1)),He(F,si,-1),v.push({li:K,button:F,page:me})}}function M(y){x(">"+y,!0)}function H(y,k){var _=v.length,D=qr(k),ne=L(),me=-1;D===I(Ho,!1,ne)?me=++y%_:D===I(No,!1,ne)?me=(--y+_)%_:D==="Home"?me=0:D==="End"&&(me=_-1);var K=v[me];K&&(us(K.button),x(">"+me),hn(k,!0))}function L(){return n.paginationDirection||n.direction}function C(y){return v[m.toPage(y)]}function J(){var y=C(R(!0)),k=C(R());if(y){var _=y.button;yn(_,Gn),cn(_,ua),He(_,si,-1)}if(k){var D=k.button;ln(D,Gn),He(D,ua,!0),He(D,si,"")}s(Ls,{list:T,items:v},y,k)}return{items:v,mount:$,destroy:S,getAt:C,update:J}}var qc=[" ","Enter"];function Kc(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function a(){e.splides.forEach(function(g){g.isParent||(m(e,g.splide),m(g.splide,e))}),i&&p()}function u(){s.forEach(function(g){g.destroy()}),wn(s)}function c(){u(),a()}function m(g,v){var T=gt(g);T.on(Sn,function(w,$,S){v.go(v.is(vi)?S:w)}),s.push(T)}function p(){var g=gt(e),v=g.on;v(Wr,x),v(Is,I),v([kn,Nt],R),s.push(g),g.emit(Nr,e.splides)}function R(){He(t.Elements.list,zr,n.direction===Oo?"vertical":"")}function x(g){e.go(g.index)}function I(g,v){Rr(qc,qr(v))&&(x(g),hn(v))}return{setup:dt(t.Media.set,{slideFocus:Oi(o)?i:o},!0),mount:a,destroy:u,remount:c}}function Gc(e,t,n){var i=gt(e),o=i.bind,s=0;function a(){n.wheel&&o(t.Elements.track,"wheel",u,ii)}function u(m){if(m.cancelable){var p=m.deltaY,R=p<0,x=yr(m),I=n.wheelMinThreshold||0,g=n.wheelSleep||0;Bt(p)>I&&x-s>g&&(e.go(R?"<":">"),s=x),c(R)&&hn(m)}}function c(m){return!n.releaseWheel||e.state.is(fi)||t.Controller.getAdjacent(m)!==-1}return{mount:a}}var Uc=90;function Xc(e,t,n){var i=gt(e),o=i.on,s=t.Elements.track,a=n.live&&!n.isNavigation,u=ai("span",mc),c=Wo(Uc,dt(p,!1));function m(){a&&(x(!t.Autoplay.isPaused()),He(s,ga,!0),u.textContent="…",o(Hr,dt(x,!0)),o(Or,dt(x,!1)),o([yi,Un],dt(p,!0)))}function p(I){He(s,ma,I),I?(ji(s,u),c.start()):(Kn(u),c.cancel())}function R(){cn(s,[pa,ga,ma]),Kn(u)}function x(I){a&&He(s,pa,I?"off":"polite")}return{mount:m,disable:x,destroy:R}}var Yc=Object.freeze({__proto__:null,Media:oc,Direction:rc,Elements:bc,Slides:wc,Layout:Sc,Clones:Cc,Move:Tc,Controller:Lc,Arrows:Pc,Autoplay:Ac,Cover:Mc,Scroll:Hc,Drag:Oc,Keyboard:jc,LazyLoad:Vc,Pagination:Dc,Sync:Kc,Wheel:Gc,Live:Xc}),Jc={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"},Zc={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:fc,i18n:Jc,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Qc(e,t,n){var i=t.Slides;function o(){gt(e).on([kn,Lt],s)}function s(){i.forEach(function(u){u.style("transform","translateX(-"+100*u.index+"%)")})}function a(u,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),ss(c)}return{mount:o,start:a,cancel:fr}}function ed(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,a=t.Elements.list,u=dt(en,a,"transition"),c;function m(){gt(e).bind(a,"transitionend",function(I){I.target===a&&c&&(R(),c())})}function p(I,g){var v=i.toPosition(I,!0),T=i.getPosition(),w=x(I);Bt(v-T)>=1&&w>=1?n.useScroll?s.scroll(v,w,!1,g):(u("transform "+w+"ms "+n.easing),i.translate(v,!0),c=g):(i.jump(I),g())}function R(){u(""),s.cancel()}function x(I){var g=n.rewindSpeed;if(e.is(di)&&g){var v=o.getIndex(!0),T=o.getEnd();if(v===0&&I>=T||v>=T&&I===0)return g}return n.speed}return{mount:m,start:p,cancel:R}}var td=(function(){function e(n,i){this.event=gt(),this.Components={},this.state=nc(ri),this.splides=[],this._o={},this._E={};var o=Pn(n)?ms(document,n):n;Si(o,o+" is invalid."),this.root=o,i=In({label:tn(o,Gt)||"",labelledby:tn(o,jr)||""},Zc,e.defaults,i||{});try{In(i,JSON.parse(tn(o,kr)))}catch{Si(!1,"Invalid JSON")}this._o=Object.create(In({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,a=this.state,u=this.Components;Si(a.is([ri,To]),"Already mounted!"),a.set(ri),this._C=u,this._T=o||this._T||(this.is(qi)?Qc:ed),this._E=i||this._E;var c=Ri({},Yc,this._E,{Transition:this._T});return qn(c,function(m,p){var R=m(s,u,s._o);u[p]=R,R.setup&&R.setup()}),qn(u,function(m){m.mount&&m.mount()}),this.emit(kn),ln(this.root,gc),a.set(li),this.emit(xr),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(li)&&(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(Mn(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(Lt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(ri)?gt(this).on(xr,this.destroy.bind(this,i)):(qn(this._C,function(a){a.destroy&&a.destroy(i)},!0),o.emit(Fr),o.destroy(),i&&wn(this.splides),s.set(To)),this},Jl(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})(),Kr=td;Kr.defaults={};Kr.STATES=Ql;var va=[[kn,"onMounted"],[xr,"onReady"],[Sn,"onMove"],[yi,"onMoved"],[Wr,"onClick"],[fs,"onActive"],[ys,"onInactive"],[vs,"onVisible"],[bs,"onHidden"],[Lt,"onRefresh"],[Nt,"onUpdated"],[ci,"onResize"],[ko,"onResized"],[xs,"onDrag"],[ws,"onDragging"],[Ss,"onDragged"],[_o,"onScroll"],[Un,"onScrolled"],[Fr,"onDestroy"],[$s,"onArrowsMounted"],[Cs,"onArrowsUpdated"],[Ts,"onPaginationMounted"],[Ls,"onPaginationUpdated"],[Nr,"onNavigationMounted"],[Hr,"onAutoplayPlay"],[Es,"onAutoplayPlaying"],[Or,"onAutoplayPause"],[Br,"onLazyLoadLoaded"]];function Gr(...e){return e.filter(Boolean).join(" ")}function Po(e){return e!==null&&typeof e=="object"}function $r(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!$r(n,t[i]));if(Po(e)&&Po(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!$r(e[o],t[o]))}return e===t}function nd(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function id(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 Cr(e,t){const n=e;return id(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():Po(i)?n[o]=Cr(Po(n[o])?n[o]:{},i):n[o]=i}),n}var od=({children:e,className:t,...n})=>l.createElement("div",{className:Gr("splide__track",t),...n},l.createElement("ul",{className:"splide__list"},e)),Ur=class extends l.Component{constructor(){super(...arguments),this.splideRef=l.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Kr(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Cr({},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&&!$r(this.options,e)&&(this.splide.options=e,this.options=Cr({},e));const t=this.getSlides();nd(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){va.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return l.createElement(t,{className:Gr("splide",e),ref:this.splideRef,...this.omit(o,["options",...va.map(s=>s[1])])},n?l.createElement(od,null,i):i)}},Xr=({children:e,className:t,...n})=>l.createElement("li",{className:Gr("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 rd="RichTextRenderer-module__link___BWeZ2",ad={link:rd},sd=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))},zo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>sd(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function Ut(e){const{color:t,...n}=e;return n}function Rt(e,t){var o,s,a;const{fontSize:n,lineHeight:i}=e;return{fontFamily:zo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:P.scalingValue(e.letterSpacing,t),wordSpacing:P.scalingValue(e.wordSpacing,t),fontSize:P.scalingValue(n,t),lineHeight:i!==void 0?P.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(a=e.textAppearance)==null?void 0:a.fontVariant,textAlign:e.textAlign,color:e.color}}const ui=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:ad.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:ld(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 ld(e){return{...e.fontFamily&&{fontFamily:zo(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 cd="SvgImage-module__svg___q3xE-",dd="SvgImage-module__img___VsTm-",ba={svg:cd,img:dd},ud=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},pd=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,nn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,a]=l.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return l.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');a(u)}},[]),!ud(e)||!s?r.jsx("img",{src:e,alt:"",className:Ye(ba.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:Ye(ba.svg,i),style:{"--svg":pd(e),"--fill":t,"--hover-fill":n,...o??{}}})},md={"top-left":Le.topLeftAlignment,"top-center":Le.topCenterAlignment,"top-right":Le.topRightAlignment,"middle-left":Le.middleLeftAlignment,"middle-center":Le.middleCenterAlignment,"middle-right":Le.middleRightAlignment,"bottom-left":Le.bottomLeftAlignment,"bottom-center":Le.bottomCenterAlignment,"bottom-right":Le.bottomRightAlignment};function gd({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=l.useState(null),{widthSettings:a,fontSettings:u,letterSpacing:c,textAlign:m,wordSpacing:p,fontSizeLineHeight:R,textAppearance:b,color:I}=n.imageCaption??{},[g,v]=l.useState(void 0),[T,w]=l.useState(null),[$,S]=l.useState(0),[z,M]=l.useState(0),{direction:N,transition:L,controls:C,pagination:J,imageCaption:y,triggers:k}=e,_=l.useRef(L.type),{x:V,y:ne}=e.controls.offset,me=K=>{o&&o.go(K)};return l.useEffect(()=>{if(!T)return;const K=new ResizeObserver(H=>{if(!o)return;const[Q]=H;v({width:Math.round(Q.contentRect.width),height:Math.round(Q.contentRect.height)})});return K.observe(T),()=>K.unobserve(T)},[T]),l.useEffect(()=>{!o||_.current===L.type||(M(K=>K+1),_.current=L.type)},[L.type]),r.jsx("div",{className:Ye(Le.wrapper,{[Le.editor]:i}),ref:w,children:r.jsxs("div",{className:Le.sliderInner,style:{width:g?g.width:"100%",height:g?g.height:"100%",backgroundColor:L.backgroundColor&&L.type==="fade in"?L.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:Ye(Le.captionBlock),children:r.jsx("div",{className:Le.captionTextWrapper,children:t.map((K,H)=>r.jsx("div",{className:Ye(Le.captionText,md[y.alignment],{[Le.withPointerEvents]:H===$&&i,[Le.active]:H===$}),style:{fontFamily:zo(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:a.sizing==="auto"?"max-content":P.scalingValue(a.width,i),letterSpacing:P.scalingValue(c,i),wordSpacing:P.scalingValue(p,i),textAlign:m,fontSize:P.scalingValue(R.fontSize,i),lineHeight:P.scalingValue(R.lineHeight,i),textTransform:b.textTransform??"none",textDecoration:b.textDecoration??"none",fontVariant:b.fontVariant??"normal",color:I,transitionDuration:L.duration?`${Math.round(parseInt(L.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Le.captionTextInner,style:{"--link-hover-color":y.linkHoverColor,"--link-color":y.linkColor,position:"relative",top:P.scalingValue(y.offset.y,i),left:P.scalingValue(y.offset.x,i)},children:r.jsx(ui,{content:K.imageCaption})})},H))})}),r.jsx(Ur,{onMove:K=>{S(K.index)},ref:s,options:{arrows:!1,speed:L.duration?parseInt(L.duration):500,autoplay:k.autoPlay!==null,...k.autoPlay!==null&&{interval:parseInt(k.autoPlay)*1e3},direction:N==="horiz"||L.type==="fade in"?"ltr":"ttb",pagination:!1,drag:k.triggersList.drag,perPage:1,width:g?g.width:"100%",height:g?g.height:"100%",type:L.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((K,H)=>r.jsx(Xr,{children:r.jsx("div",{className:Le.sliderItem,children:r.jsx("div",{className:Le.imgWrapper,children:r.jsx("img",{className:Ye(Le.sliderImage,{[Le.contain]:K.image.objectFit==="contain",[Le.cover]:K.image.objectFit==="cover"}),src:K.image.url,alt:K.image.name??""})})})},H))},z),C.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ye(Le.arrow,{[Le.arrowVertical]:N==="vert",[Le.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:r.jsxs("button",{onClick:()=>{me("-1")},className:Le.arrowInner,style:{transform:`translate(${P.scalingValue(V,i)}, ${P.scalingValue(ne*(N==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&r.jsx(nn,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:Ye(Le.arrowImg,Le.mirror)}),!C.arrowsImgUrl&&r.jsx(xa,{color:C.color,className:Ye(Le.arrowIcon,Le.arrowImg,Le.mirror)})]})}),r.jsx("div",{className:Ye(Le.arrow,Le.nextArrow,{[Le.arrowVertical]:N==="vert",[Le.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:r.jsxs("button",{className:Le.arrowInner,onClick:()=>me("+1"),style:{transform:`translate(${P.scalingValue(V*(N==="horiz"?-1:1),i)}, ${P.scalingValue(ne,i)}) scale(${e.controls.scale/100}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&r.jsx(nn,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:Le.arrowImg}),!C.arrowsImgUrl&&r.jsx(xa,{color:C.color,className:Ye(Le.arrowIcon,Le.arrowImg)})]})})]}),k.triggersList.click&&r.jsx("div",{className:Le.clickOverlay,onClick:()=>{o&&o.go("+1")}}),J.isActive&&r.jsx("div",{className:Ye(Le.pagination,{[Le.paginationInsideBottom]:J.position==="inside-1"&&N==="horiz",[Le.paginationInsideTop]:J.position==="inside-2"&&N==="horiz",[Le.paginationOutsideBottom]:J.position==="outside-1"&&N==="horiz",[Le.paginationOutsideTop]:J.position==="outside-2"&&N==="horiz",[Le.paginationInsideLeft]:J.position==="inside-1"&&N==="vert",[Le.paginationInsideRight]:J.position==="inside-2"&&N==="vert",[Le.paginationOutsideLeft]:J.position==="outside-1"&&N==="vert",[Le.paginationOutsideRight]:J.position==="outside-2"&&N==="vert",[Le.paginationVertical]:N==="vert"}),children:r.jsx("div",{className:Le.paginationInner,style:{backgroundColor:J.colors[2],transform:`scale(${J.scale/100}) translate(${P.scalingValue(J.offset.x,i)}, ${P.scalingValue(J.offset.y,i)}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:t.map((K,H)=>r.jsx("button",{onClick:()=>{o&&o.go(H)},className:Ye(Le.paginationItem),children:r.jsx("div",{className:Ye(Le.dot,{[Le.activeDot]:H===$}),style:{backgroundColor:H===$?J.colors[0]:J.colors[1],"--pagination-hover-color":J.hover}})},H))})})]})})}function xa({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const hd={element:gd,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"]}},fd="ImageRevealSlider-module__imageRevealSlider___UE5Ob",yd="ImageRevealSlider-module__image___Qjt-e",vd="ImageRevealSlider-module__link___N-iLG",bd="ImageRevealSlider-module__cursor___2U03d",Qn={imageRevealSlider:fd,image:yd,link:vd,cursor:bd};function wa(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,a=o.naturalHeight/o.naturalWidth*s,u=s/2,c=a/2;if(e>=i.x-u&&e<=i.x+u&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function nr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function xd(e,t,n,i){let o,s;if(t==="custom"){o=n;const a=await nr(e);s=a.height/a.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const a=await nr(e);s=a.height/a.width*o}else{const a=await nr(e);o=a.width,s=a.height}return{width:o,height:s,finalWidth:`${o}px`}}function wd({settings:e,content:t,isEditor:n}){const[i,o]=l.useState(null),[s,a]=l.useState([]),[u,c]=l.useState(0),m=l.useRef(0),[p,R]=l.useState({x:0,y:0}),[b,I]=l.useState(1),[g,v]=l.useState("none"),T=l.useRef({x:0,y:0}),[w,$]=l.useState(!1),{sizeType:S,imageWidth:z,randomRangeImageWidth:M}=e.imageSize,{revealPosition:N,visible:L}=e.position,{cursorType:C,target:J,defaultCursorScale:y,defaultCursor:k,hoverCursorScale:_,hoverCursor:V}=e.cursor;l.useEffect(()=>{if(!i)return;const K=(Y,O)=>{const te=i.getBoundingClientRect(),ce=Y-te.left,oe=O-te.top;if(R({x:ce,y:oe}),C==="system"){v("none"),I(1);return}const W=ce,ue=oe,h=document.elementFromPoint(te.left+W,te.top+ue);if(h&&h.closest("a")){v("none"),I(1);return}const ae=wa(W,ue,s)||J==="area"?{img:V??"none",scale:_}:{img:k??"none",scale:y};v(ae.img),I(ae.scale)},H=Y=>{Y.stopPropagation(),T.current={x:Y.clientX,y:Y.clientY},K(Y.clientX,Y.clientY)},Q=()=>{w&&K(T.current.x,T.current.y)};return i.addEventListener("mousemove",H),window.addEventListener("scroll",Q,!0),()=>{i.removeEventListener("mousemove",H),window.removeEventListener("scroll",Q,!0)}},[i,w,p,C,J,V,k,_,y,s]),l.useEffect(()=>{w||(v("none"),I(0))},[w]);const ne=async(K,H,Q,Y={})=>{const{width:O,height:te,finalWidth:ce}=await xd(K.image.url,S,z,M);let oe=0,W=0;N==="same"?(oe=H/2,W=Q/2):(oe=Y.x??Math.random()*H,W=Y.y??Math.random()*Q);const ue=Math.min(Math.max(oe,O/2),H-O/2),h=Math.min(Math.max(W,te/2),Q-te/2);return{id:m.current++,url:K.image.url,link:K.link,name:K.image.name,x:ue,y:h,width:ce}};l.useEffect(()=>{if(!i||t.length===0)return;const K=i.getBoundingClientRect(),H=K.width,Q=K.height,Y=[];(async()=>{const te=t[0],ce=await ne(te,H,Q);Y.push(ce),a(Y),c(1)})()},[S,z,M,N,i]),l.useEffect(()=>{L==="last One"&&a(K=>K.length>0?[K[K.length-1]]:[])},[L]);const me=async K=>{if(!i)return;const H=i.getBoundingClientRect(),Q=K.clientX-H.left,Y=K.clientY-H.top;if(J==="image"&&!wa(Q,Y,s))return;let O=0,te=0;N==="on Click"?(O=Q,te=Y):N==="same"?(O=H.width/2,te=H.height/2):(O=Math.random()*H.width,te=Math.random()*H.height);const ce=t[u],oe=await ne(ce,H.width,H.height,{x:O,y:te});a(W=>L==="all"?[...W,oe]:[oe]),c(W=>W>=t.length-1?0:W+1)};return r.jsxs("div",{ref:o,onClick:me,onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),className:Qn.imageRevealSlider,style:{cursor:g==="none"?"default":"none"},children:[s.map(K=>r.jsx("div",{className:Qn.wrapper,style:{top:`${K.y}px`,left:`${K.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:K.width??"auto",height:"auto",cursor:g==="none"?"default":"none"},children:J==="area"&&K.link?r.jsx("a",{href:K.link,target:"_blank",className:Qn.link,children:r.jsx("img",{src:K.url,alt:K.name,className:Qn.image},K.id)}):r.jsx("img",{src:K.url,alt:K.name,className:Qn.image},K.id)},K.id)),w&&r.jsx("div",{className:Qn.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${b})`,backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Sd={element:wd,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:""}]}}}},$d="LightBox-module__hidden___9s-9x",Cd="LightBox-module__heroImage___sTxNF",Td="LightBox-module__background___rm9ml",Ld="LightBox-module__editor___4ACaY",Ed="LightBox-module__contentStyle___Bgnsq",Id="LightBox-module__imageStyle___tLIlB",Pd="LightBox-module__imgWrapper___LuFUp",Rd="LightBox-module__contain___8-yaS",Ad="LightBox-module__cover___hNvOG",Md="LightBox-module__caption___b6L2I",kd="LightBox-module__captionTextInner___rCGNH",_d="LightBox-module__lightboxSplide___XFuWC",Wd="LightBox-module__arrow___iz38X",Fd="LightBox-module__arrowVertical___Zfz81",Nd="LightBox-module__nextArrow___zkAQN",Hd="LightBox-module__arrowInner___p48sW",Od="LightBox-module__arrowIcon___3VaFf",Bd="LightBox-module__arrowImg___pNV88",jd="LightBox-module__mirror___pjeXc",zd="LightBox-module__thumbsWrapper___GB-nU",Vd="LightBox-module__thumbsContainerVertical___wttk5",Dd="LightBox-module__thumbsContainer___osSma",qd="LightBox-module__thumbsAlignStart___MO6tY",Kd="LightBox-module__thumbsAlignCenter___Q4sUx",Gd="LightBox-module__thumbsAlignEnd___p4y9R",Ud="LightBox-module__thumbItem___HvnF3",Xd="LightBox-module__closeButton___g2khP",Yd="LightBox-module__fadeIn___0m5GW",Jd="LightBox-module__slideInLeft___gPYwC",Zd="LightBox-module__slideInRight___S-pPp",Qd="LightBox-module__slideInTop___DFdAj",eu="LightBox-module__slideInBottom___m27kZ",tu="LightBox-module__fadeOut___55qBR",nu="LightBox-module__slideOutLeft___NvU7P",iu="LightBox-module__slideOutRight___SK7eC",ou="LightBox-module__slideOutTop___Vgg0z",ru="LightBox-module__slideOutBottom___nJ0Ef",au="LightBox-module__scaleSlide___vZriG",ve={hidden:$d,heroImage:Cd,background:Td,editor:Ld,contentStyle:Ed,imageStyle:Id,imgWrapper:Pd,contain:Rd,cover:Ad,caption:Md,captionTextInner:kd,lightboxSplide:_d,arrow:Wd,arrowVertical:Fd,nextArrow:Nd,arrowInner:Hd,arrowIcon:Od,arrowImg:Bd,mirror:jd,thumbsWrapper:zd,thumbsContainerVertical:Vd,thumbsContainer:Dd,thumbsAlignStart:qd,thumbsAlignCenter:Kd,thumbsAlignEnd:Gd,thumbItem:Ud,closeButton:Xd,fadeIn:Yd,slideInLeft:Jd,slideInRight:Zd,slideInTop:Qd,slideInBottom:eu,fadeOut:tu,slideOutLeft:nu,slideOutRight:iu,slideOutTop:ou,slideOutBottom:ru,scaleSlide:au},to=(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% + ${P.scalingValue(t.x,n)}), calc(-50% + ${P.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${P.scalingValue(t.x,n)}, calc(-50% + ${P.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${P.scalingValue(t.x,n)}), ${P.scalingValue(t.y,n)})`:i.transform=`translate(${P.scalingValue(t.x,n)}, ${P.scalingValue(t.y,n)})`,i};function Vs(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 Sa(e){const t=e.getBoundingClientRect(),n=Vs(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,a=e.naturalHeight,u=i/o,c=s/a;let m,p;c>u?(m=i,p=i/c):(p=o,m=o*c);const R=t.left+n.left,b=t.top+n.top,I=(i-m)/2+R,g=(o-p)/2+b;return{x:I,y:g,width:m,height:p}}function $a(e){const t=e.getBoundingClientRect(),n=Vs(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Ca(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 su(e,t){const n=(()=>{if(e==="fade in")return ve.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return ve.slideInLeft;case"right":return ve.slideInRight;case"top":return ve.slideInTop;case"bottom":return ve.slideInBottom;default:return ve.slideInRight}return ve.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return ve.fadeIn;if(e==="slide in")switch(t){case"left":return ve.slideInLeft;case"right":return ve.slideInRight;case"top":return ve.slideInTop;case"bottom":return ve.slideInBottom;default:return ve.slideInRight}return ve.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return ve.fadeOut;if(e==="slide in")switch(t){case"left":return ve.slideOutLeft;case"right":return ve.slideOutRight;case"top":return ve.slideOutTop;case"bottom":return ve.slideOutBottom;default:return ve.slideOutRight}return ve.fadeOut})(),s=(()=>{if(e==="fade in")return ve.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return ve.slideOutLeft;case"right":return ve.slideOutRight;case"top":return ve.slideOutTop;case"bottom":return ve.slideOutBottom;default:return ve.slideOutRight}return ve.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const lu=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:a})=>{const[u,c]=l.useState(!1),{url:m}=e.thumbnailBlock.cover;return l.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:m,alt:"Cover",className:ve.heroImage,onClick:()=>c(!0)}),r.jsx(cu,{isOpen:u,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},cu=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:a,metadata:u})=>{var _e;const{widthSettings:c,fontSettings:m,letterSpacing:p,textAlign:R,wordSpacing:b,fontSizeLineHeight:I,textAppearance:g,color:v}=i.imageCaption??{},[T,w]=l.useState(0),[$,S]=l.useState(0),[z,M]=l.useState(!1),[N,L]=l.useState(!1),[C,J]=l.useState({}),y=l.useRef(null),k=l.useRef(null),_=l.useRef(null),V=l.useRef(!1),ne=l.useRef(null),me=l.useRef(null),K=l.useRef(null),H=l.useRef(null),Q=l.useRef(!1),Y=l.useRef(null),[O,te]=l.useState(!1),{appear:ce,triggers:oe,slider:W,thumbnail:ue,controls:h,area:ae,caption:be,layout:ye}=o.lightboxBlock,{appearClass:Ae,backdropAppearClass:Z,backdropDisappearClass:ge,disappearClass:U}=su(ce.type,ce.direction),X=(u==null?void 0:u.itemId)??null;l.useEffect(()=>{const F=()=>{setTimeout(()=>{var E,j;(j=(E=y.current)==null?void 0:E.splide)==null||j.refresh()},16)},D=()=>{S(E=>E+1)};return window.addEventListener("ArticleEditor.Layout:change",F),window.addEventListener("ArticleEditor.ComponentContent:change",D),()=>{window.removeEventListener("ArticleEditor.Layout:change",F),window.removeEventListener("ArticleEditor.ComponentContent:change",D)}},[]),l.useEffect(()=>{if(!e||!ue.isActive){te(!1);return}const F=Y.current;if(!F)return;const D=()=>{W.direction==="horiz"?te(F.scrollWidth>F.clientWidth):te(F.scrollHeight>F.clientHeight)};D();const E=new ResizeObserver(D);return E.observe(F),()=>E.disconnect()},[e,ue.isActive,n.length,C,W.direction]);const B=l.useCallback(()=>{const F=window.matchMedia("(max-width: 768px)").matches,D=Ca(ae.color);F&&!a&&D>.9&&(document.body.style.backgroundColor=""),M(!0),V.current=!0;const E=j=>{j.target===ne.current&&j.animationName&&(ne.current&&me.current&&ne.current.removeEventListener("animationend",me.current),me.current=null,V.current&&(V.current=!1,t()),M(!1))};ne.current&&(me.current=E,ne.current.addEventListener("animationend",E))},[t,ae.color,a]),se=(F,D,E)=>{var j,G;if(F){if(oe.type==="click"&&oe.switch==="image")oe.repeat==="close"&&T===n.length-1?B():(j=y.current)==null||j.go("+1");else if(oe.type==="click"&&oe.switch==="50/50"){const ee=F.getBoundingClientRect(),ie=D-ee.left,he=E-ee.top,Se=ee.width,$e=ee.height;let fe;W.direction==="horiz"?fe=ie<Se/2?"-1":"+1":fe=he<$e/2?"-1":"+1",(G=y.current)==null||G.go(fe)}}},Ee=F=>{if(Q.current){Q.current=!1;return}const D=n[T],E=(D==null?void 0:D.image.objectFit)==="cover";let j,G;if("changedTouches"in F&&F.changedTouches.length>0)j=F.changedTouches[0].clientX,G=F.changedTouches[0].clientY;else if("clientX"in F)j=F.clientX,G=F.clientY;else return;let ee;if(E&&_.current){const ie=$a(_.current);ee=j>=ie.left&&j<=ie.right&&G>=ie.top&&G<=ie.bottom}else{const ie=_.current?Sa(_.current):null;if(!ie){F.target===F.currentTarget&&B();return}ee=j>=ie.x&&j<=ie.x+ie.width&&G>=ie.y&&G<=ie.y+ie.height}ee?se(_.current,j,G):B()},Fe=F=>{const D=F.target;(D.classList.contains(ve.thumbsWrapper)||D.classList.contains(ve.thumbsContainer))&&Ee(F)};l.useEffect(()=>{if(!e)return;const F=D=>{var E,j;if(D.key==="Escape"){B();return}if(D.key==="ArrowRight"){w(G=>(G+1)%Math.max(n.length,1)),(E=y.current)==null||E.go("+1");return}D.key==="ArrowLeft"&&(w(G=>(G-1+Math.max(n.length,1))%Math.max(n.length,1)),(j=y.current)==null||j.go("-1"))};return window.addEventListener("keydown",F),()=>{window.removeEventListener("keydown",F)}},[e,B,n.length]),l.useEffect(()=>{if(e){if(w(0),S(D=>D+1),V.current=!1,M(!1),L(!1),J({}),!X)return;const F=new CustomEvent("page-overlay",{detail:{itemId:X}});window.dispatchEvent(F)}return()=>{ne.current&&me.current&&(ne.current.removeEventListener("animationend",me.current),me.current=null),L(!1)}},[e,X]),l.useEffect(()=>{k.current!==null&&k.current!==W.type&&S(F=>F+1),k.current=W.type},[W.type]),l.useEffect(()=>{if(!e)return;const F=document.body.style.overflow,D=window.matchMedia("(max-width: 768px)").matches,E=Ca(ae.color);document.body.style.overflow="hidden",L(!1);const j=ee=>{ee.target===ne.current&&!V.current&&ee.animationName&&(D&&!a&&E>.9&&(document.body.style.backgroundColor=ae.color),L(!0),ne.current&&K.current&&ne.current.removeEventListener("animationend",K.current),K.current=null)};ne.current&&(K.current=j,ne.current.addEventListener("animationend",j));const G=ee=>{const ie=ee.target;ie&&(ie.closest(`.${ve.thumbsWrapper}`)||ie.closest(`.${ve.thumbsContainer}`))||W.type!=="slide"&&ee.preventDefault()};return document.addEventListener("touchmove",G,{passive:!1}),()=>{document.body.style.overflow=F,document.removeEventListener("touchmove",G),ne.current&&K.current&&(ne.current.removeEventListener("animationend",K.current),K.current=null),L(!1)}},[e,a,ae.color,W.type]),l.useEffect(()=>{if(!e)return;const F=D=>{var j,G;if(V.current){D.stopPropagation();return}if(Q.current){Q.current=!1;return}const E=D.target;if(!(E&&(E.closest(`.${ve.thumbsContainer}`)||E.closest(`.${ve.thumbItem}`)||E.closest(`.${ve.arrow}`)||E.closest(`.${ve.closeButton}`)||E.closest(`.${ve.caption}`)))){if(W.type==="slide"&&oe.type==="drag"&&((G=(j=y.current)==null?void 0:j.splide)!=null&&G.root)){const ee=y.current.splide.root;if(E&&(ee.contains(E)||ee===E))return}if(D.touches.length===0&&D.changedTouches.length>0){const ee=n[T],ie=(ee==null?void 0:ee.image.objectFit)==="cover",he=D.changedTouches[0];let Se;if(ie&&_.current){const $e=$a(_.current);Se=he.clientX>=$e.left&&he.clientX<=$e.right&&he.clientY>=$e.top&&he.clientY<=$e.bottom}else{const $e=_.current?Sa(_.current):null;if(!$e)return;Se=he.clientX>=$e.x&&he.clientX<=$e.x+$e.width&&he.clientY>=$e.y&&he.clientY<=$e.y+$e.height}if(!Se){D.stopPropagation(),V.current=!0;const $e=fe=>{fe.stopPropagation(),fe.preventDefault(),document.removeEventListener("click",$e,!0)};document.addEventListener("click",$e,!0),B()}}}};return document.addEventListener("touchend",F,{passive:!0}),()=>{document.removeEventListener("touchend",F)}},[e,B,T,n]);const Re=(W.type==="scale"||W.type==="fade")&&W.direction==="vert"&&oe.type==="drag";l.useEffect(()=>{var fe,Ge;if(!e||!Re||!((Ge=(fe=y.current)==null?void 0:fe.splide)!=null&&Ge.root))return;const F=y.current.splide.root,D=30,E=(de,Me)=>{if(H.current){const je=Math.abs(de-H.current.x),Ve=Math.abs(Me-H.current.y);(je>0||Ve>0)&&(Q.current=!0)}},j=de=>{H.current&&(de.preventDefault(),E(de.clientX,de.clientY))},G=de=>{H.current&&de.touches.length>0&&(de.preventDefault(),E(de.touches[0].clientX,de.touches[0].clientY))},ee=(de,Me)=>{if(!H.current||!y.current){H.current=null;return}const je=Math.abs(de-H.current.x),Ve=Math.abs(Me-H.current.y);Ve>D&&Ve>je&&y.current.go(Me<H.current.y?"+1":"-1"),H.current=null},ie=de=>{H.current&&ee(de.clientX,de.clientY),document.removeEventListener("pointerup",ie),document.removeEventListener("pointercancel",ie),document.removeEventListener("pointermove",j)},he=de=>{if(H.current){if(de.changedTouches.length>0){const Me=de.changedTouches[0];ee(Me.clientX,Me.clientY)}document.removeEventListener("touchend",he),document.removeEventListener("touchcancel",he),document.removeEventListener("touchmove",G)}},Se=de=>{H.current={x:de.clientX,y:de.clientY},Q.current=!1,document.addEventListener("pointermove",j,{passive:!1}),document.addEventListener("pointerup",ie),document.addEventListener("pointercancel",ie)},$e=de=>{de.touches.length>0&&(H.current={x:de.touches[0].clientX,y:de.touches[0].clientY},Q.current=!1,document.addEventListener("touchmove",G,{passive:!1}),document.addEventListener("touchend",he),document.addEventListener("touchcancel",he))};return F.addEventListener("pointerdown",Se),F.addEventListener("touchstart",$e),()=>{F.removeEventListener("pointerdown",Se),F.removeEventListener("touchstart",$e),document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",ie),document.removeEventListener("pointercancel",ie),document.removeEventListener("touchmove",G),document.removeEventListener("touchend",he),document.removeEventListener("touchcancel",he),H.current=null,Q.current=!1}},[e,Re,$]);const Ie={backgroundColor:ae.color,backdropFilter:`blur(${ae.blur}px)`,animationDuration:`${parseInt(ce.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Ni.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:a?null:ne,className:Ye(ve.background,z?ge:Z,{[ve.editor]:a},{[ve.hidden]:!e}),style:{...Ie,...N&&!a&&!z?{position:"absolute"}:{}}}),r.jsxs("div",{ref:a?ne:null,className:Ye(ve.contentStyle,z?U:Ae,{[ve.editor]:a},{[ve.hidden]:!e}),style:{animationDuration:`${parseInt(ce.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Ur,{onMove:F=>w(F.index),ref:y,className:ve.lightboxSplide,options:{arrows:!1,speed:W.duration?parseInt(W.duration):500,direction:W.direction==="horiz"||W.type==="fade"||W.type==="scale"?"ltr":"ttb",pagination:!1,drag:oe.type==="drag"&&!Re,perPage:1,width:"100%",height:"100%",type:W.type==="fade"||W.type==="scale"?"fade":"loop",padding:0,rewind:oe.repeat!=="close",start:0},style:{"--splide-speed":W.duration},children:n.map((F,D)=>{const E=to(ye.position,ye.offset,a),j=`${P.scalingValue(ye.padding.top,a)} ${P.scalingValue(ye.padding.right,a)} ${P.scalingValue(ye.padding.bottom,a)} ${P.scalingValue(ye.padding.left,a)}`,G=W.type==="scale"?(()=>{const{transform:ee,...ie}=E;return{...ie,position:"absolute",padding:j,boxSizing:"border-box","--position-transform":ee||"none"}})():{...E,position:"absolute",padding:j,boxSizing:"border-box"};return r.jsx(Xr,{children:r.jsx("div",{className:ve.imgWrapper,onClick:Ee,children:r.jsx("img",{ref:D===T?_:null,className:Ye(ve.imageStyle,{[ve.contain]:F.image.objectFit==="contain",[ve.cover]:F.image.objectFit==="cover",[ve.scaleSlide]:W.type==="scale"}),src:F.image.url,alt:F.image.name??"",style:{...G,pointerEvents:F.image.objectFit==="contain"?"none":"auto"}})})},D)})},$),h.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ye(ve.arrow,{[ve.arrowVertical]:W.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:ve.arrowInner,style:{transform:`translate(${P.scalingValue(h.offset.x,a)}, ${P.scalingValue(h.offset.y*(W.direction==="horiz"?1:-1),a)}) scale(${h.scale}) rotate(${W.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var F;return(F=y.current)==null?void 0:F.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&r.jsx(nn,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:Ye(ve.arrowImg,ve.mirror)}),!h.arrowsImgUrl&&r.jsx(Ta,{color:h.color,className:Ye(ve.arrowIcon,ve.arrowImg,ve.mirror)})]})}),r.jsx("div",{className:Ye(ve.arrow,ve.nextArrow,{[ve.arrowVertical]:W.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:ve.arrowInner,style:{transform:`translate(${P.scalingValue(h.offset.x*(W.direction==="horiz"?-1:1),a)}, ${P.scalingValue(h.offset.y,a)}) scale(${h.scale}) rotate(${W.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var F;return(F=y.current)==null?void 0:F.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&r.jsx(nn,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:ve.arrowImg}),!h.arrowsImgUrl&&r.jsx(Ta,{color:h.color,className:Ye(ve.arrowIcon,ve.arrowImg)})]})})]}),ae.closeIconUrl&&(()=>{const F=to(ae.closeIconAlign,ae.closeIconOffset,a),D=`scale(${ae.closeIconScale})`,E=F.transform?`${F.transform} ${D}`:D;return r.jsx("button",{className:ve.closeButton,style:{...F,transform:E},onClick:B,"aria-label":"Close lightbox",children:r.jsx(nn,{url:ae.closeIconUrl,fill:ae.closeIconColor??"#000000",hoverFill:ae.closeIconHover??"#cccccc"})})})(),be&&be.isActive&&i.imageCaption&&((_e=n[T])==null?void 0:_e.imageCaption)&&r.jsx("div",{className:ve.caption,style:{...to(be.alignment,be.offset,a),fontFamily:zo(m.fontFamily),fontWeight:m.fontWeight,fontStyle:m.fontStyle,width:c.sizing==="auto"?"max-content":P.scalingValue(c.width,a),letterSpacing:P.scalingValue(p,a),wordSpacing:P.scalingValue(b,a),textAlign:R,fontSize:P.scalingValue(I.fontSize,a),lineHeight:P.scalingValue(I.lineHeight,a),textTransform:g.textTransform??"none",textDecoration:g.textDecoration??"none",fontVariant:g.fontVariant??"normal",color:v},onClick:F=>F.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:ve.captionTextInner,style:{"--link-color":be.linkColor,"--link-hover-color":be.linkHoverColor},children:r.jsx(ui,{content:n[T].imageCaption})})}),ue.isActive&&(()=>{const[F,D]=ue.position.split("-"),E=W.direction==="horiz"?`${F}-left`:ue.position,j=to(E,ue.offset,a),G=()=>{if(W.direction==="horiz"){if(D==="left")return"flex-start";if(D==="center")return"center";if(D==="right")return"flex-end"}else{if(F==="top")return"flex-start";if(F==="middle")return"center";if(F==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:Y,className:ve.thumbsWrapper,onClick:ee=>Fe(ee),style:{position:a?"absolute":"fixed",...j,...W.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:Ye(ve.thumbsContainer,{[ve.thumbsContainerVertical]:W.direction==="vert",[ve.thumbsAlignStart]:ue.align==="start",[ve.thumbsAlignCenter]:ue.align==="center",[ve.thumbsAlignEnd]:ue.align==="end"}),style:{gap:P.scalingValue(ue.grid.gap,a),justifyContent:O?"flex-start":G()},children:n.map((ee,ie)=>{const he=ie===T,Se=C[ie],fe=ue.grid.size*(he?ue.activeState.scale:1),Ge=()=>{if(ue.fit!=="fit")return{};if(!Se)return W.direction==="horiz"?{height:P.scalingValue(fe,a)}:{width:P.scalingValue(fe,a)};const de=Se.width/Se.height;if(W.direction==="horiz"){const Me=fe,je=Me*de;return{width:P.scalingValue(je,a),height:P.scalingValue(Me,a)}}else{const Me=fe,je=Me/de;return{width:P.scalingValue(Me,a),height:P.scalingValue(je,a)}}};return r.jsx("button",{className:ve.thumbItem,style:{...W.direction==="horiz"&&ue.fit!=="fit"?{height:P.scalingValue(fe,a)}:{},...W.direction==="vert"&&ue.fit!=="fit"?{width:P.scalingValue(fe,a)}:{},...ue.fit==="cover"?{width:P.scalingValue(fe,a),height:P.scalingValue(fe,a)}:{},...Ge(),transition:he?"all 0.25s ease-out":"none",opacity:he?ue.activeState.opacity/100:ue.opacity/100,"--thumb-hover":ue.activeState.opacity/100},onClick:de=>{var Me;de.stopPropagation(),w(ie),(Me=y.current)==null||Me.go(ie)},onMouseEnter:()=>{var de;ue.triggers==="hov"&&((de=y.current)==null||de.go(ie))},children:r.jsx("img",{src:ee.image.url,alt:ee.image.name??"",onLoad:de=>{const Me=de.currentTarget;Me.naturalWidth&&Me.naturalHeight&&J(je=>({...je,[ie]:{width:Me.naturalWidth,height:Me.naturalHeight}}))},style:{objectFit:ue.fit==="cover"?"cover":"contain",...ue.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ue.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ee.image.name}-${ie}`)})})})})()]})]}),document.getElementById(s))};function Ta({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 du={element:lu,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 no(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function uu(e){return`
6
+ */const rd="RichTextRenderer-module__link___BWeZ2",ad={link:rd},sd=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))},Vo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>sd(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function Ut(e){const{color:t,...n}=e;return n}function Rt(e,t){var o,s,a;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Vo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:P.scalingValue(e.letterSpacing,t),wordSpacing:P.scalingValue(e.wordSpacing,t),fontSize:P.scalingValue(n,t),lineHeight:i!==void 0?P.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(a=e.textAppearance)==null?void 0:a.fontVariant,textAlign:e.textAlign,color:e.color}}const ui=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:ad.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:ld(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 ld(e){return{...e.fontFamily&&{fontFamily:Vo(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 cd="SvgImage-module__svg___q3xE-",dd="SvgImage-module__img___VsTm-",ba={svg:cd,img:dd},ud=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},pd=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,nn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,a]=l.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return l.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');a(u)}},[]),!ud(e)||!s?r.jsx("img",{src:e,alt:"",className:Ye(ba.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:Ye(ba.svg,i),style:{"--svg":pd(e),"--fill":t,"--hover-fill":n,...o??{}}})},md={"top-left":Le.topLeftAlignment,"top-center":Le.topCenterAlignment,"top-right":Le.topRightAlignment,"middle-left":Le.middleLeftAlignment,"middle-center":Le.middleCenterAlignment,"middle-right":Le.middleRightAlignment,"bottom-left":Le.bottomLeftAlignment,"bottom-center":Le.bottomCenterAlignment,"bottom-right":Le.bottomRightAlignment};function gd({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=l.useState(null),{widthSettings:a,fontSettings:u,letterSpacing:c,textAlign:m,wordSpacing:p,fontSizeLineHeight:R,textAppearance:x,color:I}=n.imageCaption??{},[g,v]=l.useState(void 0),[T,w]=l.useState(null),[$,S]=l.useState(0),[O,M]=l.useState(0),{direction:H,transition:L,controls:C,pagination:J,imageCaption:y,triggers:k}=e,_=l.useRef(L.type),{x:D,y:ne}=e.controls.offset,me=K=>{o&&o.go(K)};return l.useEffect(()=>{if(!T)return;const K=new ResizeObserver(F=>{if(!o)return;const[Q]=F;v({width:Math.round(Q.contentRect.width),height:Math.round(Q.contentRect.height)})});return K.observe(T),()=>K.unobserve(T)},[T]),l.useEffect(()=>{!o||_.current===L.type||(M(K=>K+1),_.current=L.type)},[L.type]),r.jsx("div",{className:Ye(Le.wrapper,{[Le.editor]:i}),ref:w,children:r.jsxs("div",{className:Le.sliderInner,style:{width:g?g.width:"100%",height:g?g.height:"100%",backgroundColor:L.backgroundColor&&L.type==="fade in"?L.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:Ye(Le.captionBlock),children:r.jsx("div",{className:Le.captionTextWrapper,children:t.map((K,F)=>r.jsx("div",{className:Ye(Le.captionText,md[y.alignment],{[Le.withPointerEvents]:F===$&&i,[Le.active]:F===$}),style:{fontFamily:Vo(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:a.sizing==="auto"?"max-content":P.scalingValue(a.width,i),letterSpacing:P.scalingValue(c,i),wordSpacing:P.scalingValue(p,i),textAlign:m,fontSize:P.scalingValue(R.fontSize,i),lineHeight:P.scalingValue(R.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:I,transitionDuration:L.duration?`${Math.round(parseInt(L.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Le.captionTextInner,style:{"--link-hover-color":y.linkHoverColor,"--link-color":y.linkColor,position:"relative",top:P.scalingValue(y.offset.y,i),left:P.scalingValue(y.offset.x,i)},children:r.jsx(ui,{content:K.imageCaption})})},F))})}),r.jsx(Ur,{onMove:K=>{S(K.index)},ref:s,options:{arrows:!1,speed:L.duration?parseInt(L.duration):500,autoplay:k.autoPlay!==null,...k.autoPlay!==null&&{interval:parseInt(k.autoPlay)*1e3},direction:H==="horiz"||L.type==="fade in"?"ltr":"ttb",pagination:!1,drag:k.triggersList.drag,perPage:1,width:g?g.width:"100%",height:g?g.height:"100%",type:L.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((K,F)=>r.jsx(Xr,{children:r.jsx("div",{className:Le.sliderItem,children:r.jsx("div",{className:Le.imgWrapper,children:r.jsx("img",{className:Ye(Le.sliderImage,{[Le.contain]:K.image.objectFit==="contain",[Le.cover]:K.image.objectFit==="cover"}),src:K.image.url,alt:K.image.name??""})})})},F))},O),C.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ye(Le.arrow,{[Le.arrowVertical]:H==="vert",[Le.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:r.jsxs("button",{onClick:()=>{me("-1")},className:Le.arrowInner,style:{transform:`translate(${P.scalingValue(D,i)}, ${P.scalingValue(ne*(H==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${H==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&r.jsx(nn,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:Ye(Le.arrowImg,Le.mirror)}),!C.arrowsImgUrl&&r.jsx(xa,{color:C.color,className:Ye(Le.arrowIcon,Le.arrowImg,Le.mirror)})]})}),r.jsx("div",{className:Ye(Le.arrow,Le.nextArrow,{[Le.arrowVertical]:H==="vert",[Le.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:r.jsxs("button",{className:Le.arrowInner,onClick:()=>me("+1"),style:{transform:`translate(${P.scalingValue(D*(H==="horiz"?-1:1),i)}, ${P.scalingValue(ne,i)}) scale(${e.controls.scale/100}) rotate(${H==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&r.jsx(nn,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:Le.arrowImg}),!C.arrowsImgUrl&&r.jsx(xa,{color:C.color,className:Ye(Le.arrowIcon,Le.arrowImg)})]})})]}),k.triggersList.click&&r.jsx("div",{className:Le.clickOverlay,onClick:()=>{o&&o.go("+1")}}),J.isActive&&r.jsx("div",{className:Ye(Le.pagination,{[Le.paginationInsideBottom]:J.position==="inside-1"&&H==="horiz",[Le.paginationInsideTop]:J.position==="inside-2"&&H==="horiz",[Le.paginationOutsideBottom]:J.position==="outside-1"&&H==="horiz",[Le.paginationOutsideTop]:J.position==="outside-2"&&H==="horiz",[Le.paginationInsideLeft]:J.position==="inside-1"&&H==="vert",[Le.paginationInsideRight]:J.position==="inside-2"&&H==="vert",[Le.paginationOutsideLeft]:J.position==="outside-1"&&H==="vert",[Le.paginationOutsideRight]:J.position==="outside-2"&&H==="vert",[Le.paginationVertical]:H==="vert"}),children:r.jsx("div",{className:Le.paginationInner,style:{backgroundColor:J.colors[2],transform:`scale(${J.scale/100}) translate(${P.scalingValue(J.offset.x,i)}, ${P.scalingValue(J.offset.y,i)}) rotate(${H==="horiz"?"0deg":"90deg"})`},children:t.map((K,F)=>r.jsx("button",{onClick:()=>{o&&o.go(F)},className:Ye(Le.paginationItem),children:r.jsx("div",{className:Ye(Le.dot,{[Le.activeDot]:F===$}),style:{backgroundColor:F===$?J.colors[0]:J.colors[1],"--pagination-hover-color":J.hover}})},F))})})]})})}function xa({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const hd={element:gd,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"]}},fd="ImageRevealSlider-module__imageRevealSlider___UE5Ob",yd="ImageRevealSlider-module__image___Qjt-e",vd="ImageRevealSlider-module__link___N-iLG",bd="ImageRevealSlider-module__cursor___2U03d",Qn={imageRevealSlider:fd,image:yd,link:vd,cursor:bd};function wa(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,a=o.naturalHeight/o.naturalWidth*s,u=s/2,c=a/2;if(e>=i.x-u&&e<=i.x+u&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function ir(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function xd(e,t,n,i){let o,s;if(t==="custom"){o=n;const a=await ir(e);s=a.height/a.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const a=await ir(e);s=a.height/a.width*o}else{const a=await ir(e);o=a.width,s=a.height}return{width:o,height:s,finalWidth:`${o}px`}}function wd({settings:e,content:t,isEditor:n}){const[i,o]=l.useState(null),[s,a]=l.useState([]),[u,c]=l.useState(0),m=l.useRef(0),[p,R]=l.useState({x:0,y:0}),[x,I]=l.useState(1),[g,v]=l.useState("none"),T=l.useRef({x:0,y:0}),[w,$]=l.useState(!1),{sizeType:S,imageWidth:O,randomRangeImageWidth:M}=e.imageSize,{revealPosition:H,visible:L}=e.position,{cursorType:C,target:J,defaultCursorScale:y,defaultCursor:k,hoverCursorScale:_,hoverCursor:D}=e.cursor;l.useEffect(()=>{if(!i)return;const K=(Y,B)=>{const te=i.getBoundingClientRect(),de=Y-te.left,re=B-te.top;if(R({x:de,y:re}),C==="system"){v("none"),I(1);return}const W=de,pe=re,h=document.elementFromPoint(te.left+W,te.top+pe);if(h&&h.closest("a")){v("none"),I(1);return}const ae=wa(W,pe,s)||J==="area"?{img:D??"none",scale:_}:{img:k??"none",scale:y};v(ae.img),I(ae.scale)},F=Y=>{Y.stopPropagation(),T.current={x:Y.clientX,y:Y.clientY},K(Y.clientX,Y.clientY)},Q=()=>{w&&K(T.current.x,T.current.y)};return i.addEventListener("mousemove",F),window.addEventListener("scroll",Q,!0),()=>{i.removeEventListener("mousemove",F),window.removeEventListener("scroll",Q,!0)}},[i,w,p,C,J,D,k,_,y,s]),l.useEffect(()=>{w||(v("none"),I(0))},[w]);const ne=async(K,F,Q,Y={})=>{const{width:B,height:te,finalWidth:de}=await xd(K.image.url,S,O,M);let re=0,W=0;H==="same"?(re=F/2,W=Q/2):(re=Y.x??Math.random()*F,W=Y.y??Math.random()*Q);const pe=Math.min(Math.max(re,B/2),F-B/2),h=Math.min(Math.max(W,te/2),Q-te/2);return{id:m.current++,url:K.image.url,link:K.link,name:K.image.name,x:pe,y:h,width:de}};l.useEffect(()=>{if(!i||t.length===0)return;const K=i.getBoundingClientRect(),F=K.width,Q=K.height,Y=[];(async()=>{const te=t[0],de=await ne(te,F,Q);Y.push(de),a(Y),c(1)})()},[S,O,M,H,i]),l.useEffect(()=>{L==="last One"&&a(K=>K.length>0?[K[K.length-1]]:[])},[L]);const me=async K=>{if(!i)return;const F=i.getBoundingClientRect(),Q=K.clientX-F.left,Y=K.clientY-F.top;if(J==="image"&&!wa(Q,Y,s))return;let B=0,te=0;H==="on Click"?(B=Q,te=Y):H==="same"?(B=F.width/2,te=F.height/2):(B=Math.random()*F.width,te=Math.random()*F.height);const de=t[u],re=await ne(de,F.width,F.height,{x:B,y:te});a(W=>L==="all"?[...W,re]:[re]),c(W=>W>=t.length-1?0:W+1)};return r.jsxs("div",{ref:o,onClick:me,onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),className:Qn.imageRevealSlider,style:{cursor:g==="none"?"default":"none"},children:[s.map(K=>r.jsx("div",{className:Qn.wrapper,style:{top:`${K.y}px`,left:`${K.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:K.width??"auto",height:"auto",cursor:g==="none"?"default":"none"},children:J==="area"&&K.link?r.jsx("a",{href:K.link,target:"_blank",className:Qn.link,children:r.jsx("img",{src:K.url,alt:K.name,className:Qn.image},K.id)}):r.jsx("img",{src:K.url,alt:K.name,className:Qn.image},K.id)},K.id)),w&&r.jsx("div",{className:Qn.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Sd={element:wd,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:""}]}}}},$d="LightBox-module__hidden___9s-9x",Cd="LightBox-module__heroImage___sTxNF",Td="LightBox-module__background___rm9ml",Ld="LightBox-module__editor___4ACaY",Ed="LightBox-module__contentStyle___Bgnsq",Id="LightBox-module__imageStyle___tLIlB",Pd="LightBox-module__imgWrapper___LuFUp",Rd="LightBox-module__contain___8-yaS",Ad="LightBox-module__cover___hNvOG",Md="LightBox-module__caption___b6L2I",kd="LightBox-module__captionTextInner___rCGNH",_d="LightBox-module__lightboxSplide___XFuWC",Wd="LightBox-module__arrow___iz38X",Fd="LightBox-module__arrowVertical___Zfz81",Nd="LightBox-module__nextArrow___zkAQN",Hd="LightBox-module__arrowInner___p48sW",Od="LightBox-module__arrowIcon___3VaFf",Bd="LightBox-module__arrowImg___pNV88",jd="LightBox-module__mirror___pjeXc",zd="LightBox-module__thumbsWrapper___GB-nU",Vd="LightBox-module__thumbsContainerVertical___wttk5",Dd="LightBox-module__thumbsContainer___osSma",qd="LightBox-module__thumbsAlignStart___MO6tY",Kd="LightBox-module__thumbsAlignCenter___Q4sUx",Gd="LightBox-module__thumbsAlignEnd___p4y9R",Ud="LightBox-module__thumbItem___HvnF3",Xd="LightBox-module__closeButton___g2khP",Yd="LightBox-module__fadeIn___0m5GW",Jd="LightBox-module__slideInLeft___gPYwC",Zd="LightBox-module__slideInRight___S-pPp",Qd="LightBox-module__slideInTop___DFdAj",eu="LightBox-module__slideInBottom___m27kZ",tu="LightBox-module__fadeOut___55qBR",nu="LightBox-module__slideOutLeft___NvU7P",iu="LightBox-module__slideOutRight___SK7eC",ou="LightBox-module__slideOutTop___Vgg0z",ru="LightBox-module__slideOutBottom___nJ0Ef",au="LightBox-module__scaleSlide___vZriG",ve={hidden:$d,heroImage:Cd,background:Td,editor:Ld,contentStyle:Ed,imageStyle:Id,imgWrapper:Pd,contain:Rd,cover:Ad,caption:Md,captionTextInner:kd,lightboxSplide:_d,arrow:Wd,arrowVertical:Fd,nextArrow:Nd,arrowInner:Hd,arrowIcon:Od,arrowImg:Bd,mirror:jd,thumbsWrapper:zd,thumbsContainerVertical:Vd,thumbsContainer:Dd,thumbsAlignStart:qd,thumbsAlignCenter:Kd,thumbsAlignEnd:Gd,thumbItem:Ud,closeButton:Xd,fadeIn:Yd,slideInLeft:Jd,slideInRight:Zd,slideInTop:Qd,slideInBottom:eu,fadeOut:tu,slideOutLeft:nu,slideOutRight:iu,slideOutTop:ou,slideOutBottom:ru,scaleSlide:au},to=(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% + ${P.scalingValue(t.x,n)}), calc(-50% + ${P.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${P.scalingValue(t.x,n)}, calc(-50% + ${P.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${P.scalingValue(t.x,n)}), ${P.scalingValue(t.y,n)})`:i.transform=`translate(${P.scalingValue(t.x,n)}, ${P.scalingValue(t.y,n)})`,i};function Vs(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 Sa(e){const t=e.getBoundingClientRect(),n=Vs(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,a=e.naturalHeight,u=i/o,c=s/a;let m,p;c>u?(m=i,p=i/c):(p=o,m=o*c);const R=t.left+n.left,x=t.top+n.top,I=(i-m)/2+R,g=(o-p)/2+x;return{x:I,y:g,width:m,height:p}}function $a(e){const t=e.getBoundingClientRect(),n=Vs(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Ca(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 su(e,t){const n=(()=>{if(e==="fade in")return ve.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return ve.slideInLeft;case"right":return ve.slideInRight;case"top":return ve.slideInTop;case"bottom":return ve.slideInBottom;default:return ve.slideInRight}return ve.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return ve.fadeIn;if(e==="slide in")switch(t){case"left":return ve.slideInLeft;case"right":return ve.slideInRight;case"top":return ve.slideInTop;case"bottom":return ve.slideInBottom;default:return ve.slideInRight}return ve.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return ve.fadeOut;if(e==="slide in")switch(t){case"left":return ve.slideOutLeft;case"right":return ve.slideOutRight;case"top":return ve.slideOutTop;case"bottom":return ve.slideOutBottom;default:return ve.slideOutRight}return ve.fadeOut})(),s=(()=>{if(e==="fade in")return ve.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return ve.slideOutLeft;case"right":return ve.slideOutRight;case"top":return ve.slideOutTop;case"bottom":return ve.slideOutBottom;default:return ve.slideOutRight}return ve.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const lu=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:a})=>{const[u,c]=l.useState(!1),{url:m}=e.thumbnailBlock.cover;return l.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:m,alt:"Cover",className:ve.heroImage,onClick:()=>c(!0)}),r.jsx(cu,{isOpen:u,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},cu=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:a,metadata:u})=>{var _e;const{widthSettings:c,fontSettings:m,letterSpacing:p,textAlign:R,wordSpacing:x,fontSizeLineHeight:I,textAppearance:g,color:v}=i.imageCaption??{},[T,w]=l.useState(0),[$,S]=l.useState(0),[O,M]=l.useState(!1),[H,L]=l.useState(!1),[C,J]=l.useState({}),y=l.useRef(null),k=l.useRef(null),_=l.useRef(null),D=l.useRef(!1),ne=l.useRef(null),me=l.useRef(null),K=l.useRef(null),F=l.useRef(null),Q=l.useRef(!1),Y=l.useRef(null),[B,te]=l.useState(!1),{appear:de,triggers:re,slider:W,thumbnail:pe,controls:h,area:ae,caption:be,layout:ye}=o.lightboxBlock,{appearClass:Ae,backdropAppearClass:Z,backdropDisappearClass:ge,disappearClass:X}=su(de.type,de.direction),U=(u==null?void 0:u.itemId)??null;l.useEffect(()=>{const N=()=>{setTimeout(()=>{var E,z;(z=(E=y.current)==null?void 0:E.splide)==null||z.refresh()},16)},q=()=>{S(E=>E+1)};return window.addEventListener("ArticleEditor.Layout:change",N),window.addEventListener("ArticleEditor.ComponentContent:change",q),()=>{window.removeEventListener("ArticleEditor.Layout:change",N),window.removeEventListener("ArticleEditor.ComponentContent:change",q)}},[]),l.useEffect(()=>{if(!e||!pe.isActive){te(!1);return}const N=Y.current;if(!N)return;const q=()=>{W.direction==="horiz"?te(N.scrollWidth>N.clientWidth):te(N.scrollHeight>N.clientHeight)};q();const E=new ResizeObserver(q);return E.observe(N),()=>E.disconnect()},[e,pe.isActive,n.length,C,W.direction]);const j=l.useCallback(()=>{const N=window.matchMedia("(max-width: 768px)").matches,q=Ca(ae.color);N&&!a&&q>.9&&(document.body.style.backgroundColor=""),M(!0),D.current=!0;const E=z=>{z.target===ne.current&&z.animationName&&(ne.current&&me.current&&ne.current.removeEventListener("animationend",me.current),me.current=null,D.current&&(D.current=!1,t()),M(!1))};ne.current&&(me.current=E,ne.current.addEventListener("animationend",E))},[t,ae.color,a]),se=(N,q,E)=>{var z,G;if(N){if(re.type==="click"&&re.switch==="image")re.repeat==="close"&&T===n.length-1?j():(z=y.current)==null||z.go("+1");else if(re.type==="click"&&re.switch==="50/50"){const ee=N.getBoundingClientRect(),ie=q-ee.left,he=E-ee.top,Se=ee.width,$e=ee.height;let fe;W.direction==="horiz"?fe=ie<Se/2?"-1":"+1":fe=he<$e/2?"-1":"+1",(G=y.current)==null||G.go(fe)}}},Ee=N=>{if(Q.current){Q.current=!1;return}const q=n[T],E=(q==null?void 0:q.image.objectFit)==="cover";let z,G;if("changedTouches"in N&&N.changedTouches.length>0)z=N.changedTouches[0].clientX,G=N.changedTouches[0].clientY;else if("clientX"in N)z=N.clientX,G=N.clientY;else return;let ee;if(E&&_.current){const ie=$a(_.current);ee=z>=ie.left&&z<=ie.right&&G>=ie.top&&G<=ie.bottom}else{const ie=_.current?Sa(_.current):null;if(!ie){N.target===N.currentTarget&&j();return}ee=z>=ie.x&&z<=ie.x+ie.width&&G>=ie.y&&G<=ie.y+ie.height}ee?se(_.current,z,G):j()},Fe=N=>{const q=N.target;(q.classList.contains(ve.thumbsWrapper)||q.classList.contains(ve.thumbsContainer))&&Ee(N)};l.useEffect(()=>{if(!e)return;const N=q=>{var E,z;if(q.key==="Escape"){j();return}if(q.key==="ArrowRight"){w(G=>(G+1)%Math.max(n.length,1)),(E=y.current)==null||E.go("+1");return}q.key==="ArrowLeft"&&(w(G=>(G-1+Math.max(n.length,1))%Math.max(n.length,1)),(z=y.current)==null||z.go("-1"))};return window.addEventListener("keydown",N),()=>{window.removeEventListener("keydown",N)}},[e,j,n.length]),l.useEffect(()=>{if(e){if(w(0),S(q=>q+1),D.current=!1,M(!1),L(!1),J({}),!U)return;const N=new CustomEvent("page-overlay",{detail:{itemId:U}});window.dispatchEvent(N)}return()=>{ne.current&&me.current&&(ne.current.removeEventListener("animationend",me.current),me.current=null),L(!1)}},[e,U]),l.useEffect(()=>{k.current!==null&&k.current!==W.type&&S(N=>N+1),k.current=W.type},[W.type]),l.useEffect(()=>{if(!e)return;const N=document.body.style.overflow,q=window.matchMedia("(max-width: 768px)").matches,E=Ca(ae.color);document.body.style.overflow="hidden",L(!1);const z=ee=>{ee.target===ne.current&&!D.current&&ee.animationName&&(q&&!a&&E>.9&&(document.body.style.backgroundColor=ae.color),L(!0),ne.current&&K.current&&ne.current.removeEventListener("animationend",K.current),K.current=null)};ne.current&&(K.current=z,ne.current.addEventListener("animationend",z));const G=ee=>{const ie=ee.target;ie&&(ie.closest(`.${ve.thumbsWrapper}`)||ie.closest(`.${ve.thumbsContainer}`))||W.type!=="slide"&&ee.preventDefault()};return document.addEventListener("touchmove",G,{passive:!1}),()=>{document.body.style.overflow=N,document.removeEventListener("touchmove",G),ne.current&&K.current&&(ne.current.removeEventListener("animationend",K.current),K.current=null),L(!1)}},[e,a,ae.color,W.type]),l.useEffect(()=>{if(!e)return;const N=q=>{var z,G;if(D.current){q.stopPropagation();return}if(Q.current){Q.current=!1;return}const E=q.target;if(!(E&&(E.closest(`.${ve.thumbsContainer}`)||E.closest(`.${ve.thumbItem}`)||E.closest(`.${ve.arrow}`)||E.closest(`.${ve.closeButton}`)||E.closest(`.${ve.caption}`)))){if(W.type==="slide"&&re.type==="drag"&&((G=(z=y.current)==null?void 0:z.splide)!=null&&G.root)){const ee=y.current.splide.root;if(E&&(ee.contains(E)||ee===E))return}if(q.touches.length===0&&q.changedTouches.length>0){const ee=n[T],ie=(ee==null?void 0:ee.image.objectFit)==="cover",he=q.changedTouches[0];let Se;if(ie&&_.current){const $e=$a(_.current);Se=he.clientX>=$e.left&&he.clientX<=$e.right&&he.clientY>=$e.top&&he.clientY<=$e.bottom}else{const $e=_.current?Sa(_.current):null;if(!$e)return;Se=he.clientX>=$e.x&&he.clientX<=$e.x+$e.width&&he.clientY>=$e.y&&he.clientY<=$e.y+$e.height}if(!Se){q.stopPropagation(),D.current=!0;const $e=fe=>{fe.stopPropagation(),fe.preventDefault(),document.removeEventListener("click",$e,!0)};document.addEventListener("click",$e,!0),j()}}}};return document.addEventListener("touchend",N,{passive:!0}),()=>{document.removeEventListener("touchend",N)}},[e,j,T,n]);const Re=(W.type==="scale"||W.type==="fade")&&W.direction==="vert"&&re.type==="drag";l.useEffect(()=>{var fe,Ge;if(!e||!Re||!((Ge=(fe=y.current)==null?void 0:fe.splide)!=null&&Ge.root))return;const N=y.current.splide.root,q=30,E=(ue,Me)=>{if(F.current){const ze=Math.abs(ue-F.current.x),De=Math.abs(Me-F.current.y);(ze>0||De>0)&&(Q.current=!0)}},z=ue=>{F.current&&(ue.preventDefault(),E(ue.clientX,ue.clientY))},G=ue=>{F.current&&ue.touches.length>0&&(ue.preventDefault(),E(ue.touches[0].clientX,ue.touches[0].clientY))},ee=(ue,Me)=>{if(!F.current||!y.current){F.current=null;return}const ze=Math.abs(ue-F.current.x),De=Math.abs(Me-F.current.y);De>q&&De>ze&&y.current.go(Me<F.current.y?"+1":"-1"),F.current=null},ie=ue=>{F.current&&ee(ue.clientX,ue.clientY),document.removeEventListener("pointerup",ie),document.removeEventListener("pointercancel",ie),document.removeEventListener("pointermove",z)},he=ue=>{if(F.current){if(ue.changedTouches.length>0){const Me=ue.changedTouches[0];ee(Me.clientX,Me.clientY)}document.removeEventListener("touchend",he),document.removeEventListener("touchcancel",he),document.removeEventListener("touchmove",G)}},Se=ue=>{F.current={x:ue.clientX,y:ue.clientY},Q.current=!1,document.addEventListener("pointermove",z,{passive:!1}),document.addEventListener("pointerup",ie),document.addEventListener("pointercancel",ie)},$e=ue=>{ue.touches.length>0&&(F.current={x:ue.touches[0].clientX,y:ue.touches[0].clientY},Q.current=!1,document.addEventListener("touchmove",G,{passive:!1}),document.addEventListener("touchend",he),document.addEventListener("touchcancel",he))};return N.addEventListener("pointerdown",Se),N.addEventListener("touchstart",$e),()=>{N.removeEventListener("pointerdown",Se),N.removeEventListener("touchstart",$e),document.removeEventListener("pointermove",z),document.removeEventListener("pointerup",ie),document.removeEventListener("pointercancel",ie),document.removeEventListener("touchmove",G),document.removeEventListener("touchend",he),document.removeEventListener("touchcancel",he),F.current=null,Q.current=!1}},[e,Re,$]);const Ie={backgroundColor:ae.color,backdropFilter:`blur(${ae.blur}px)`,animationDuration:`${parseInt(de.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Ni.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:a?null:ne,className:Ye(ve.background,O?ge:Z,{[ve.editor]:a},{[ve.hidden]:!e}),style:{...Ie,...H&&!a&&!O?{position:"absolute"}:{}}}),r.jsxs("div",{ref:a?ne:null,className:Ye(ve.contentStyle,O?X:Ae,{[ve.editor]:a},{[ve.hidden]:!e}),style:{animationDuration:`${parseInt(de.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Ur,{onMove:N=>w(N.index),ref:y,className:ve.lightboxSplide,options:{arrows:!1,speed:W.duration?parseInt(W.duration):500,direction:W.direction==="horiz"||W.type==="fade"||W.type==="scale"?"ltr":"ttb",pagination:!1,drag:re.type==="drag"&&!Re,perPage:1,width:"100%",height:"100%",type:W.type==="fade"||W.type==="scale"?"fade":"loop",padding:0,rewind:re.repeat!=="close",start:0},style:{"--splide-speed":W.duration},children:n.map((N,q)=>{const E=to(ye.position,ye.offset,a),z=`${P.scalingValue(ye.padding.top,a)} ${P.scalingValue(ye.padding.right,a)} ${P.scalingValue(ye.padding.bottom,a)} ${P.scalingValue(ye.padding.left,a)}`,G=W.type==="scale"?(()=>{const{transform:ee,...ie}=E;return{...ie,position:"absolute",padding:z,boxSizing:"border-box","--position-transform":ee||"none"}})():{...E,position:"absolute",padding:z,boxSizing:"border-box"};return r.jsx(Xr,{children:r.jsx("div",{className:ve.imgWrapper,onClick:Ee,children:r.jsx("img",{ref:q===T?_:null,className:Ye(ve.imageStyle,{[ve.contain]:N.image.objectFit==="contain",[ve.cover]:N.image.objectFit==="cover",[ve.scaleSlide]:W.type==="scale"}),src:N.image.url,alt:N.image.name??"",style:{...G,pointerEvents:N.image.objectFit==="contain"?"none":"auto"}})})},q)})},$),h.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ye(ve.arrow,{[ve.arrowVertical]:W.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:ve.arrowInner,style:{transform:`translate(${P.scalingValue(h.offset.x,a)}, ${P.scalingValue(h.offset.y*(W.direction==="horiz"?1:-1),a)}) scale(${h.scale}) rotate(${W.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var N;return(N=y.current)==null?void 0:N.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&r.jsx(nn,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:Ye(ve.arrowImg,ve.mirror)}),!h.arrowsImgUrl&&r.jsx(Ta,{color:h.color,className:Ye(ve.arrowIcon,ve.arrowImg,ve.mirror)})]})}),r.jsx("div",{className:Ye(ve.arrow,ve.nextArrow,{[ve.arrowVertical]:W.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:ve.arrowInner,style:{transform:`translate(${P.scalingValue(h.offset.x*(W.direction==="horiz"?-1:1),a)}, ${P.scalingValue(h.offset.y,a)}) scale(${h.scale}) rotate(${W.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var N;return(N=y.current)==null?void 0:N.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&r.jsx(nn,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:ve.arrowImg}),!h.arrowsImgUrl&&r.jsx(Ta,{color:h.color,className:Ye(ve.arrowIcon,ve.arrowImg)})]})})]}),ae.closeIconUrl&&(()=>{const N=to(ae.closeIconAlign,ae.closeIconOffset,a),q=`scale(${ae.closeIconScale})`,E=N.transform?`${N.transform} ${q}`:q;return r.jsx("button",{className:ve.closeButton,style:{...N,transform:E},onClick:j,"aria-label":"Close lightbox",children:r.jsx(nn,{url:ae.closeIconUrl,fill:ae.closeIconColor??"#000000",hoverFill:ae.closeIconHover??"#cccccc"})})})(),be&&be.isActive&&i.imageCaption&&((_e=n[T])==null?void 0:_e.imageCaption)&&r.jsx("div",{className:ve.caption,style:{...to(be.alignment,be.offset,a),fontFamily:Vo(m.fontFamily),fontWeight:m.fontWeight,fontStyle:m.fontStyle,width:c.sizing==="auto"?"max-content":P.scalingValue(c.width,a),letterSpacing:P.scalingValue(p,a),wordSpacing:P.scalingValue(x,a),textAlign:R,fontSize:P.scalingValue(I.fontSize,a),lineHeight:P.scalingValue(I.lineHeight,a),textTransform:g.textTransform??"none",textDecoration:g.textDecoration??"none",fontVariant:g.fontVariant??"normal",color:v},onClick:N=>N.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:ve.captionTextInner,style:{"--link-color":be.linkColor,"--link-hover-color":be.linkHoverColor},children:r.jsx(ui,{content:n[T].imageCaption})})}),pe.isActive&&(()=>{const[N,q]=pe.position.split("-"),E=W.direction==="horiz"?`${N}-left`:pe.position,z=to(E,pe.offset,a),G=()=>{if(W.direction==="horiz"){if(q==="left")return"flex-start";if(q==="center")return"center";if(q==="right")return"flex-end"}else{if(N==="top")return"flex-start";if(N==="middle")return"center";if(N==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:Y,className:ve.thumbsWrapper,onClick:ee=>Fe(ee),style:{position:a?"absolute":"fixed",...z,...W.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:Ye(ve.thumbsContainer,{[ve.thumbsContainerVertical]:W.direction==="vert",[ve.thumbsAlignStart]:pe.align==="start",[ve.thumbsAlignCenter]:pe.align==="center",[ve.thumbsAlignEnd]:pe.align==="end"}),style:{gap:P.scalingValue(pe.grid.gap,a),justifyContent:B?"flex-start":G()},children:n.map((ee,ie)=>{const he=ie===T,Se=C[ie],fe=pe.grid.size*(he?pe.activeState.scale:1),Ge=()=>{if(pe.fit!=="fit")return{};if(!Se)return W.direction==="horiz"?{height:P.scalingValue(fe,a)}:{width:P.scalingValue(fe,a)};const ue=Se.width/Se.height;if(W.direction==="horiz"){const Me=fe,ze=Me*ue;return{width:P.scalingValue(ze,a),height:P.scalingValue(Me,a)}}else{const Me=fe,ze=Me/ue;return{width:P.scalingValue(Me,a),height:P.scalingValue(ze,a)}}};return r.jsx("button",{className:ve.thumbItem,style:{...W.direction==="horiz"&&pe.fit!=="fit"?{height:P.scalingValue(fe,a)}:{},...W.direction==="vert"&&pe.fit!=="fit"?{width:P.scalingValue(fe,a)}:{},...pe.fit==="cover"?{width:P.scalingValue(fe,a),height:P.scalingValue(fe,a)}:{},...Ge(),transition:he?"all 0.25s ease-out":"none",opacity:he?pe.activeState.opacity/100:pe.opacity/100,"--thumb-hover":pe.activeState.opacity/100},onClick:ue=>{var Me;ue.stopPropagation(),w(ie),(Me=y.current)==null||Me.go(ie)},onMouseEnter:()=>{var ue;pe.triggers==="hov"&&((ue=y.current)==null||ue.go(ie))},children:r.jsx("img",{src:ee.image.url,alt:ee.image.name??"",onLoad:ue=>{const Me=ue.currentTarget;Me.naturalWidth&&Me.naturalHeight&&J(ze=>({...ze,[ie]:{width:Me.naturalWidth,height:Me.naturalHeight}}))},style:{objectFit:pe.fit==="cover"?"cover":"contain",...pe.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...pe.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ee.image.name}-${ie}`)})})})})()]})]}),document.getElementById(s))};function Ta({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 du={element:lu,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 no(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function uu(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 pu({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const a=!!n,u=i&&t||!t,{prefix:c}=P.useScopedStyles(),{type:m="A",fieldsToShow:p=2,fields:R=[],buttonLabel:b,gap:I,fieldsGap:g,buttonCorners:v,buttonStroke:T,buttonPadding:w,isButtonFullWidth:$,inputCorners:S,inputStroke:z,inputPadding:M,inputColor:N,inputTextColor:L,inputBorderColor:C,placeholderColor:J,buttonColor:y,buttonTextColor:k,buttonBorderColor:_,labelTextColor:V,successColor:ne,errorColor:me,fontFamily:K,inputFontSettings:H,inputFontSize:Q,inputLineHeight:Y,inputLetterSpacing:O,inputWordSpacing:te,inputTextAppearance:ce,buttonFontSettings:oe,buttonFontSize:W,buttonLineHeight:ue,buttonLetterSpacing:h,buttonWordSpacing:ae,buttonTextAppearance:be,labelFontSettings:ye,labelFontSize:Ae,labelLineHeight:Z,labelLetterSpacing:ge,labelWordSpacing:U,labelTextAppearance:X,statusFontSettings:B,statusFontSize:se,statusLineHeight:Ee,statusLetterSpacing:Fe,statusWordSpacing:Re,statusTextAppearance:Ie,successMessage:_e,errorMessage:F,stateOverrides:D}=e,E=m==="B",j=R.slice(0,Math.min(p,R.length)),G={fontSettings:{fontFamily:K,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:Q??.01,lineHeight:Y,letterSpacing:O??0,wordSpacing:te??0,textAppearance:ce,color:L},ee=Ut(Rt(G,t)),ie=P.scalingValue(z??0,t),he=P.scalingValue((Y??Q??.01)+((M==null?void 0:M.top)??0)+((M==null?void 0:M.bottom)??0)+(m==="C"?z??0:(z??0)*2),t),Se={...ee,borderStyle:"solid",borderRadius:m==="C"?0:P.scalingValue(S??0,t),...m==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ie,borderLeftWidth:0}:{borderWidth:ie},paddingTop:P.scalingValue((M==null?void 0:M.top)??0,t),paddingRight:P.scalingValue((M==null?void 0:M.right)??0,t),paddingBottom:P.scalingValue((M==null?void 0:M.bottom)??0,t),paddingLeft:P.scalingValue((M==null?void 0:M.left)??0,t),height:he,minHeight:he},$e={fontSettings:{fontFamily:K,fontWeight:(oe==null?void 0:oe.fontWeight)??400,fontStyle:(oe==null?void 0:oe.fontStyle)??"normal"},fontSize:W??.01,lineHeight:ue,letterSpacing:h??0,wordSpacing:ae??0,textAppearance:be,color:k},fe=Ut(Rt($e,t)),Ge=P.scalingValue(T??0,t),de={fontSettings:{fontFamily:K,fontWeight:(ye==null?void 0:ye.fontWeight)??400,fontStyle:(ye==null?void 0:ye.fontStyle)??"normal"},fontSize:Ae??.01,lineHeight:Z,letterSpacing:ge??0,wordSpacing:U??0,textAppearance:X,color:V},Me=Rt(de,t),je={fontSettings:{fontFamily:K,fontWeight:(B==null?void 0:B.fontWeight)??400,fontStyle:(B==null?void 0:B.fontStyle)??"normal"},fontSize:se??.01,lineHeight:Ee,letterSpacing:Fe??0,wordSpacing:Re??0,textAppearance:Ie,color:ne},Ve=Ut(Rt(je,t)),at=P.buildColorVars(c,{inputColor:N,inputTextColor:L,inputBorderColor:C,placeholderColor:J!=null&&J.trim()?J:"#cccccc",buttonColor:y,buttonTextColor:k,buttonBorderColor:_,labelTextColor:V,successColor:ne,errorColor:me},mu,gu,D),[ht,Et]=l.useState(()=>Object.fromEntries(j.map(We=>[We.name,""]))),[mt,ft]=l.useState("idle"),[Ft,It]=l.useState(null),Ue=s==="success"?"success":s==="error"?"error":mt,Ce=s==="error"?F:Ft,qe=s==="filled",Je=l.useMemo(()=>{if(!qe)return ht;let We=null;for(const yt of j)(ht[yt.name]??"").trim().length>0||(We=We??{...ht},We[yt.name]="Filled");return We??ht},[ht,qe,j]),Oe=Ue==="error"?P.getFormFieldValidationError(j,Je):null,At=`${s&&s!=="default"?`${c}-state-${s}`:""}`.trim(),Ze=o==null?void 0:o.submitUrl,Mt=(We,yt)=>{Et(et=>({...et,[We]:yt}))},Ht=async We=>{if(We.preventDefault(),!u)return;const yt=Object.fromEntries(j.map(Xe=>{var ot;return[Xe.name,((ot=ht[Xe.name])==null?void 0:ot.trim())??""]}).filter(([,Xe])=>Xe));if(!Ze){ft("error"),It("No integrations were found for this form.");return}if(Object.keys(yt).length===0)return;const et=P.getFormFieldValidationError(j,ht);if(et){ft("error"),It(et);return}ft("submitting"),It(null);try{const Xe=await fetch(Ze,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(yt)});if(!Xe.ok){const ot=await Xe.text();throw new Error(ot||`Request failed: ${Xe.status}`)}ft("success"),Et(Object.fromEntries(j.map(ot=>[ot.name,""])))}catch(Xe){ft("error"),It(Xe instanceof Error?Xe.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${m} ${At}`.trim(),style:at,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:uu(c)}}),r.jsxs("form",{onSubmit:Ht,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:j.map((We,yt)=>r.jsxs(l.Fragment,{children:[yt>0&&r.jsx("div",{"data-controls":a?"fieldsGap":void 0,className:a?`${c}-control`:void 0,style:{height:P.scalingValue(g??0,t)}}),r.jsxs("div",{className:`${c}-field-group${E?` ${c}-labeled`:""}`,children:[E&&r.jsx("span",{className:`${c}-field-label`,style:Me?{...Me,lineHeight:Me.fontSize}:void 0,children:We.label||We.name}),We.type==="textarea"?r.jsx("textarea",{name:We.name,autoComplete:"off",value:Je[We.name]??"",onChange:et=>Mt(We.name,et.target.value),placeholder:We.placeholder,className:`${c}-input`,style:Se,rows:1,"data-filled":qe||(Je[We.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:We.type==="phone"?"tel":We.type==="email"?"email":"text",name:We.name,autoComplete:"off",value:Je[We.name]??"",onChange:et=>Mt(We.name,et.target.value),placeholder:We.placeholder,required:We.isRequired??We.type==="email",className:`${c}-input`,style:Se,"data-filled":qe||(Je[We.name]??"").trim().length>0})]})]},yt))}),r.jsx("div",{"data-controls":a?"gap":void 0,className:a?`${c}-control`:void 0,style:{height:P.scalingValue(I??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:u?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:P.scalingValue(v??0,t),borderWidth:Ge,paddingTop:P.scalingValue((w==null?void 0:w.top)??0,t),paddingRight:P.scalingValue((w==null?void 0:w.right)??0,t),paddingBottom:P.scalingValue((w==null?void 0:w.bottom)??0,t),paddingLeft:P.scalingValue((w==null?void 0:w.left)??0,t),pointerEvents:u?"auto":void 0,...fe,...$?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:$?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:mt==="submitting"?"...":b})})})]}),Ue==="success"&&r.jsx("p",{className:`${c}-success`,style:{...Ve},children:_e}),Ue==="error"&&r.jsx("p",{className:`${c}-error`,style:{...Ve},role:"alert",children:Oe??Ce??F})]})}const mu={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"},gu=["hover","focus","filled","success","error"],hu=`import React, { useMemo, useState } from 'react';
158
+ `}function pu({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const a=!!n,u=i&&t||!t,{prefix:c}=P.useScopedStyles(),{type:m="A",fieldsToShow:p=2,fields:R=[],buttonLabel:x,gap:I,fieldsGap:g,buttonCorners:v,buttonStroke:T,buttonPadding:w,isButtonFullWidth:$,inputCorners:S,inputStroke:O,inputPadding:M,inputColor:H,inputTextColor:L,inputBorderColor:C,placeholderColor:J,buttonColor:y,buttonTextColor:k,buttonBorderColor:_,labelTextColor:D,successColor:ne,errorColor:me,fontFamily:K,inputFontSettings:F,inputFontSize:Q,inputLineHeight:Y,inputLetterSpacing:B,inputWordSpacing:te,inputTextAppearance:de,buttonFontSettings:re,buttonFontSize:W,buttonLineHeight:pe,buttonLetterSpacing:h,buttonWordSpacing:ae,buttonTextAppearance:be,labelFontSettings:ye,labelFontSize:Ae,labelLineHeight:Z,labelLetterSpacing:ge,labelWordSpacing:X,labelTextAppearance:U,statusFontSettings:j,statusFontSize:se,statusLineHeight:Ee,statusLetterSpacing:Fe,statusWordSpacing:Re,statusTextAppearance:Ie,successMessage:_e,errorMessage:N,stateOverrides:q}=e,E=m==="B",z=R.slice(0,Math.min(p,R.length)),G={fontSettings:{fontFamily:K,fontWeight:(F==null?void 0:F.fontWeight)??400,fontStyle:(F==null?void 0:F.fontStyle)??"normal"},fontSize:Q??.01,lineHeight:Y,letterSpacing:B??0,wordSpacing:te??0,textAppearance:de,color:L},ee=Ut(Rt(G,t)),ie=P.scalingValue(O??0,t),he=P.scalingValue((Y??Q??.01)+((M==null?void 0:M.top)??0)+((M==null?void 0:M.bottom)??0)+(m==="C"?O??0:(O??0)*2),t),Se={...ee,borderStyle:"solid",borderRadius:m==="C"?0:P.scalingValue(S??0,t),...m==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ie,borderLeftWidth:0}:{borderWidth:ie},paddingTop:P.scalingValue((M==null?void 0:M.top)??0,t),paddingRight:P.scalingValue((M==null?void 0:M.right)??0,t),paddingBottom:P.scalingValue((M==null?void 0:M.bottom)??0,t),paddingLeft:P.scalingValue((M==null?void 0:M.left)??0,t),height:he,minHeight:he},$e={fontSettings:{fontFamily:K,fontWeight:(re==null?void 0:re.fontWeight)??400,fontStyle:(re==null?void 0:re.fontStyle)??"normal"},fontSize:W??.01,lineHeight:pe,letterSpacing:h??0,wordSpacing:ae??0,textAppearance:be,color:k},fe=Ut(Rt($e,t)),Ge=P.scalingValue(T??0,t),ue={fontSettings:{fontFamily:K,fontWeight:(ye==null?void 0:ye.fontWeight)??400,fontStyle:(ye==null?void 0:ye.fontStyle)??"normal"},fontSize:Ae??.01,lineHeight:Z,letterSpacing:ge??0,wordSpacing:X??0,textAppearance:U,color:D},Me=Rt(ue,t),ze={fontSettings:{fontFamily:K,fontWeight:(j==null?void 0:j.fontWeight)??400,fontStyle:(j==null?void 0:j.fontStyle)??"normal"},fontSize:se??.01,lineHeight:Ee,letterSpacing:Fe??0,wordSpacing:Re??0,textAppearance:Ie,color:ne},De=Ut(Rt(ze,t)),at=P.buildColorVars(c,{inputColor:H,inputTextColor:L,inputBorderColor:C,placeholderColor:J!=null&&J.trim()?J:"#cccccc",buttonColor:y,buttonTextColor:k,buttonBorderColor:_,labelTextColor:D,successColor:ne,errorColor:me},mu,gu,q),[ht,Et]=l.useState(()=>Object.fromEntries(z.map(We=>[We.name,""]))),[mt,ft]=l.useState("idle"),[Ft,It]=l.useState(null),Ue=s==="success"?"success":s==="error"?"error":mt,Te=s==="error"?N:Ft,qe=s==="filled",Je=l.useMemo(()=>{if(!qe)return ht;let We=null;for(const yt of z)(ht[yt.name]??"").trim().length>0||(We=We??{...ht},We[yt.name]="Filled");return We??ht},[ht,qe,z]),Oe=Ue==="error"?P.getFormFieldValidationError(z,Je):null,At=`${s&&s!=="default"?`${c}-state-${s}`:""}`.trim(),Ze=o==null?void 0:o.submitUrl,Mt=(We,yt)=>{Et(et=>({...et,[We]:yt}))},Ht=async We=>{if(We.preventDefault(),!u)return;const yt=Object.fromEntries(z.map(Xe=>{var ot;return[Xe.name,((ot=ht[Xe.name])==null?void 0:ot.trim())??""]}).filter(([,Xe])=>Xe));if(!Ze){ft("error"),It("No integrations were found for this form.");return}if(Object.keys(yt).length===0)return;const et=P.getFormFieldValidationError(z,ht);if(et){ft("error"),It(et);return}ft("submitting"),It(null);try{const Xe=await fetch(Ze,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(yt)});if(!Xe.ok){const ot=await Xe.text();throw new Error(ot||`Request failed: ${Xe.status}`)}ft("success"),Et(Object.fromEntries(z.map(ot=>[ot.name,""])))}catch(Xe){ft("error"),It(Xe instanceof Error?Xe.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${m} ${At}`.trim(),style:at,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:uu(c)}}),r.jsxs("form",{onSubmit:Ht,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:z.map((We,yt)=>r.jsxs(l.Fragment,{children:[yt>0&&r.jsx("div",{"data-controls":a?"fieldsGap":void 0,className:a?`${c}-control`:void 0,style:{height:P.scalingValue(g??0,t)}}),r.jsxs("div",{className:`${c}-field-group${E?` ${c}-labeled`:""}`,children:[E&&r.jsx("span",{className:`${c}-field-label`,style:Me?{...Me,lineHeight:Me.fontSize}:void 0,children:We.label||We.name}),We.type==="textarea"?r.jsx("textarea",{name:We.name,autoComplete:"off",value:Je[We.name]??"",onChange:et=>Mt(We.name,et.target.value),placeholder:We.placeholder,className:`${c}-input`,style:Se,rows:1,"data-filled":qe||(Je[We.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:We.type==="phone"?"tel":We.type==="email"?"email":"text",name:We.name,autoComplete:"off",value:Je[We.name]??"",onChange:et=>Mt(We.name,et.target.value),placeholder:We.placeholder,required:We.isRequired??We.type==="email",className:`${c}-input`,style:Se,"data-filled":qe||(Je[We.name]??"").trim().length>0})]})]},yt))}),r.jsx("div",{"data-controls":a?"gap":void 0,className:a?`${c}-control`:void 0,style:{height:P.scalingValue(I??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:u?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:P.scalingValue(v??0,t),borderWidth:Ge,paddingTop:P.scalingValue((w==null?void 0:w.top)??0,t),paddingRight:P.scalingValue((w==null?void 0:w.right)??0,t),paddingBottom:P.scalingValue((w==null?void 0:w.bottom)??0,t),paddingLeft:P.scalingValue((w==null?void 0:w.left)??0,t),pointerEvents:u?"auto":void 0,...fe,...$?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:$?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:mt==="submitting"?"...":x})})})]}),Ue==="success"&&r.jsx("p",{className:`${c}-success`,style:{...De},children:_e}),Ue==="error"&&r.jsx("p",{className:`${c}-error`,style:{...De},role:"alert",children:Oe??Te??N})]})}const mu={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"},gu=["hover","focus","filled","success","error"],hu=`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: ${oo(14)};
981
981
  color: var(--${e}-error-error-color, var(--${e}-error-color));
982
982
  }
983
- `}const wu=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=P.useScopedStyles(),a=n&&t||!t,{fields:u=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:m,fieldsToShow:p=1,fontFamily:R,inputFontSettings:b,inputFontSize:I,inputLineHeight:g,inputLetterSpacing:v,inputWordSpacing:T,inputTextAppearance:w,buttonFontSettings:$,buttonFontSize:S,buttonLineHeight:z,buttonLetterSpacing:M,buttonWordSpacing:N,buttonTextAppearance:L,statusFontSettings:C,statusFontSize:J,statusLineHeight:y,statusLetterSpacing:k,statusWordSpacing:_,statusTextAppearance:V,iconMaxWidth:ne,minHeight:me,corners:K,stroke:H,stateOverrides:Q,inputPadding:Y,buttonPadding:O,successMessage:te="Thanks for subscribing!",errorMessage:ce="Please, fill all required fields."}=e,oe=u.slice(0,Math.min(p,u.length)),[W,ue]=l.useState(()=>Object.fromEntries(oe.map(de=>[de.name,""]))),[h,ae]=l.useState("idle"),[be,ye]=l.useState(null),Ae=o==="success"?"success":o==="error"?"error":h,Z=o==="error"?ce:be,ge=o==="filled",U=l.useMemo(()=>{if(!ge)return W;let de=null;for(const Me of oe)(W[Me.name]??"").trim().length>0||(de=de??{...W},de[Me.name]="Filled");return de??W},[ge,W,oe]),X=Ae==="error"?P.getFormFieldValidationError(oe,U):null,B=o&&o!=="default"?`${s}-state-${o}`:"",se=oe.some(de=>(U[de.name]??"").trim().length>0),Ee=B!==`${s}-state-filled`&&se?`${s}-state-filled`:"",Fe=`${B} ${Ee}`.trim(),Re=i==null?void 0:i.submitUrl,Ie=m??"",_e=(c==null?void 0:c.icon)??"",F=(c==null?void 0:c.mode)==="On",D=Ie||"Submit",E={fontSettings:{fontFamily:R,fontWeight:(b==null?void 0:b.fontWeight)??400,fontStyle:(b==null?void 0:b.fontStyle)??"normal"},fontSize:I??.01,lineHeight:g,letterSpacing:v??0,wordSpacing:T??0,textAppearance:w,color:e.inputTextColor??"#111111"},j={fontSettings:{fontFamily:R,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:S??.01,lineHeight:z,letterSpacing:M??0,wordSpacing:N??0,textAppearance:L,color:e.buttonTextColor??"#ffffff"},G={fontSettings:{fontFamily:R,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:J??.01,lineHeight:y,letterSpacing:k??0,wordSpacing:_??0,textAppearance:V,color:e.successColor??"#22c55e"},ee=Ut(Rt(E,t)),ie=Ut(Rt(j,t)),he=Ut(Rt(G,t)),Se=P.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(E==null?void 0:E.color)??"#111111",buttonTextColor:e.buttonTextColor??(j==null?void 0:j.color)??"#ffffff"},Su,$u,Q),$e={borderRadius:P.scalingValue(K,t),borderWidth:P.scalingValue(H,t),borderStyle:"solid"},fe={borderLeftWidth:P.scalingValue(H,t)},Ge=async de=>{if(de.preventDefault(),!a)return;const Me=Object.fromEntries(oe.map(Ve=>{var at;return[Ve.name,((at=W[Ve.name])==null?void 0:at.trim())??""]}).filter(([,Ve])=>Ve));if(!Re){ae("error"),ye("No integrations were found for this form.");return}if(Object.keys(Me).length===0)return;const je=P.getFormFieldValidationError(oe,W);if(je){ae("error"),ye(je);return}ae("submitting"),ye(null);try{const Ve=await fetch(Re,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Me)});if(!Ve.ok){const at=await Ve.text();throw new Error(at||`Request failed: ${Ve.status}`)}ae("success"),ue(Object.fromEntries(oe.map(at=>[at.name,""])))}catch(Ve){ae("error"),ye(Ve instanceof Error?Ve.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${Fe}`.trim(),style:Se,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:xu(s)}}),r.jsxs("form",{onSubmit:Ge,className:`${s}-form`,style:{...$e,height:P.scalingValue(me,t),minHeight:P.scalingValue(me,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:oe.map(de=>r.jsx("input",{type:de.type==="email"?"email":de.type==="phone"?"tel":"text",name:de.name,autoComplete:"off",value:U[de.name]??"",onChange:Me=>ue(je=>({...je,[de.name]:Me.target.value})),placeholder:de.placeholder,required:de.isRequired??de.type==="email",className:`${s}-input`,style:{...ee,paddingRight:P.scalingValue(Y.right,t),paddingLeft:P.scalingValue(Y.left,t),paddingTop:P.scalingValue(Y.top,t),paddingBottom:P.scalingValue(Y.bottom,t)}},de.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:a?"submit":"button",className:`${s}-submitBtn`,"aria-label":D,style:{...ie,...fe,paddingRight:P.scalingValue(O.right,t),paddingLeft:P.scalingValue(O.left,t),paddingTop:P.scalingValue(O.top,t),paddingBottom:P.scalingValue(O.bottom,t),pointerEvents:a?"auto":void 0},children:h==="submitting"?"...":F?_e&&r.jsx(nn,{url:_e,className:`${s}-submitBtnIcon`,style:{maxWidth:P.scalingValue(ne??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):Ie})})]}),Ae==="success"&&r.jsx("p",{className:`${s}-success`,style:{...he},children:te}),Ae==="error"&&r.jsx("p",{className:`${s}-error`,style:{...he},role:"alert",children:X??Z??ce})]})},Su={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"},$u=["hover","focus","filled","success","error"],Cu=`import React, { useMemo, useState } from 'react';
983
+ `}const wu=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=P.useScopedStyles(),a=n&&t||!t,{fields:u=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:m,fieldsToShow:p=1,fontFamily:R,inputFontSettings:x,inputFontSize:I,inputLineHeight:g,inputLetterSpacing:v,inputWordSpacing:T,inputTextAppearance:w,buttonFontSettings:$,buttonFontSize:S,buttonLineHeight:O,buttonLetterSpacing:M,buttonWordSpacing:H,buttonTextAppearance:L,statusFontSettings:C,statusFontSize:J,statusLineHeight:y,statusLetterSpacing:k,statusWordSpacing:_,statusTextAppearance:D,iconMaxWidth:ne,minHeight:me,corners:K,stroke:F,stateOverrides:Q,inputPadding:Y,buttonPadding:B,successMessage:te="Thanks for subscribing!",errorMessage:de="Please, fill all required fields."}=e,re=u.slice(0,Math.min(p,u.length)),[W,pe]=l.useState(()=>Object.fromEntries(re.map(ue=>[ue.name,""]))),[h,ae]=l.useState("idle"),[be,ye]=l.useState(null),Ae=o==="success"?"success":o==="error"?"error":h,Z=o==="error"?de:be,ge=o==="filled",X=l.useMemo(()=>{if(!ge)return W;let ue=null;for(const Me of re)(W[Me.name]??"").trim().length>0||(ue=ue??{...W},ue[Me.name]="Filled");return ue??W},[ge,W,re]),U=Ae==="error"?P.getFormFieldValidationError(re,X):null,j=o&&o!=="default"?`${s}-state-${o}`:"",se=re.some(ue=>(X[ue.name]??"").trim().length>0),Ee=j!==`${s}-state-filled`&&se?`${s}-state-filled`:"",Fe=`${j} ${Ee}`.trim(),Re=i==null?void 0:i.submitUrl,Ie=m??"",_e=(c==null?void 0:c.icon)??"",N=(c==null?void 0:c.mode)==="On",q=Ie||"Submit",E={fontSettings:{fontFamily:R,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:I??.01,lineHeight:g,letterSpacing:v??0,wordSpacing:T??0,textAppearance:w,color:e.inputTextColor??"#111111"},z={fontSettings:{fontFamily:R,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:S??.01,lineHeight:O,letterSpacing:M??0,wordSpacing:H??0,textAppearance:L,color:e.buttonTextColor??"#ffffff"},G={fontSettings:{fontFamily:R,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:J??.01,lineHeight:y,letterSpacing:k??0,wordSpacing:_??0,textAppearance:D,color:e.successColor??"#22c55e"},ee=Ut(Rt(E,t)),ie=Ut(Rt(z,t)),he=Ut(Rt(G,t)),Se=P.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(E==null?void 0:E.color)??"#111111",buttonTextColor:e.buttonTextColor??(z==null?void 0:z.color)??"#ffffff"},Su,$u,Q),$e={borderRadius:P.scalingValue(K,t),borderWidth:P.scalingValue(F,t),borderStyle:"solid"},fe={borderLeftWidth:P.scalingValue(F,t)},Ge=async ue=>{if(ue.preventDefault(),!a)return;const Me=Object.fromEntries(re.map(De=>{var at;return[De.name,((at=W[De.name])==null?void 0:at.trim())??""]}).filter(([,De])=>De));if(!Re){ae("error"),ye("No integrations were found for this form.");return}if(Object.keys(Me).length===0)return;const ze=P.getFormFieldValidationError(re,W);if(ze){ae("error"),ye(ze);return}ae("submitting"),ye(null);try{const De=await fetch(Re,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Me)});if(!De.ok){const at=await De.text();throw new Error(at||`Request failed: ${De.status}`)}ae("success"),pe(Object.fromEntries(re.map(at=>[at.name,""])))}catch(De){ae("error"),ye(De instanceof Error?De.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${Fe}`.trim(),style:Se,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:xu(s)}}),r.jsxs("form",{onSubmit:Ge,className:`${s}-form`,style:{...$e,height:P.scalingValue(me,t),minHeight:P.scalingValue(me,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:re.map(ue=>r.jsx("input",{type:ue.type==="email"?"email":ue.type==="phone"?"tel":"text",name:ue.name,autoComplete:"off",value:X[ue.name]??"",onChange:Me=>pe(ze=>({...ze,[ue.name]:Me.target.value})),placeholder:ue.placeholder,required:ue.isRequired??ue.type==="email",className:`${s}-input`,style:{...ee,paddingRight:P.scalingValue(Y.right,t),paddingLeft:P.scalingValue(Y.left,t),paddingTop:P.scalingValue(Y.top,t),paddingBottom:P.scalingValue(Y.bottom,t)}},ue.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:a?"submit":"button",className:`${s}-submitBtn`,"aria-label":q,style:{...ie,...fe,paddingRight:P.scalingValue(B.right,t),paddingLeft:P.scalingValue(B.left,t),paddingTop:P.scalingValue(B.top,t),paddingBottom:P.scalingValue(B.bottom,t),pointerEvents:a?"auto":void 0},children:h==="submitting"?"...":N?_e&&r.jsx(nn,{url:_e,className:`${s}-submitBtnIcon`,style:{maxWidth:P.scalingValue(ne??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):Ie})})]}),Ae==="success"&&r.jsx("p",{className:`${s}-success`,style:{...he},children:te}),Ae==="error"&&r.jsx("p",{className:`${s}-error`,style:{...he},role:"alert",children:U??Z??de})]})},Su={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"},$u=["hover","focus","filled","success","error"],Cu=`import React, { useMemo, useState } from 'react';
984
984
  import { CommonComponentProps } from '../props';
985
985
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
986
986
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -1557,7 +1557,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
1557
1557
  };
1558
1558
 
1559
1559
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1560
- `,Tu="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),Lu=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],ir={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Eu=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Iu={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...ir.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...ir.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...ir.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:Lu,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Tu},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["fieldsToShow","minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Eu],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Pu={element:wu,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Iu,sourceCode:Cu};function Ru(e){return`
1560
+ `,Tu="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),Lu=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],or={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Eu=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Iu={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...or.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...or.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...or.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:Lu,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Tu},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["fieldsToShow","minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Eu],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Pu={element:wu,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Iu,sourceCode:Cu};function Ru(e){return`
1561
1561
  .${e}-marquee-wrapper {
1562
1562
  overflow: hidden;
1563
1563
  width: 100%;
@@ -1689,7 +1689,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1689
1689
  .${e}-image-hover-grayscale:hover img {
1690
1690
  filter: grayscale(100%);
1691
1691
  }
1692
- `}const Au=30,Mu=20,or=3,ku=3,_u=(e,t)=>Array.from({length:t},()=>e).flat(),Wu=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Fu=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Wu(i,e))},Nu=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,imageHoverClass:s,isFirstSet:a,scaled:u,onFirstSetImageDone:c})=>{var L,C,J;const m=l.useRef(null);l.useLayoutEffect(()=>{if(!a)return;const y=m.current;y!=null&&y.complete&&(c==null||c())},[a,(L=e.image)==null?void 0:L.url,c]);const p=n.display==="cover",R=n.ratioValue??"1:1",b=n.reversed??!1,[I,g]=R.split(":").map(Number),w=(b?g:I)/(b?I:g);let $=i,S=$/w;S>o&&(S=o,$=S*w);const z=u($),M=u(S),N=((C=e.image)==null?void 0:C.url)&&r.jsx("img",{ref:m,src:e.image.url,alt:((J=e.image)==null?void 0:J.name)??"",style:p?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:u(i),objectFit:"contain"},onLoad:a?c:void 0,onError:a?c:void 0});return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...p?{width:z}:{width:"fit-content",maxWidth:u(i),minWidth:0}},children:r.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...p?{width:z,height:M,overflow:"hidden"}:{width:"fit-content",maxWidth:u(i),height:u(o)}},children:N&&e.link?r.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Ye(`${t}-marquee-link`,!p&&`${t}-marquee-link-contain`),children:N}):N})})},Hu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=P.useScopedStyles(),a=l.useMemo(()=>Ru(s),[s]),{speed:u,direction:c,pauseOnHover:m,gap:p,imageMaxWidth:R,imageMaxHeight:b,imageFit:I,hoverEffect:g}=e,v=!!o,T=!n||!!i,w=T&&g!=="off"&&g!=="randomize"?`${s}-image-hover-${g}`:void 0,$=n?!!i:!0,z=((t==null?void 0:t.length)??0)>0&&($||!!n),M=Math.max(0,u)*Au,N=X=>P.scalingValue(X,n??!1),L=l.useRef(null),C=l.useRef(null),J=l.useRef(null),[y,k]=l.useState(0),[_,V]=l.useState(0),ne=$&&m==="on",[me,K]=l.useState(!1),[H,Q]=l.useState({}),Y=l.useRef(H);Y.current=H;const O=l.useRef(null),te=l.useRef(0),ce=l.useRef(null),oe=l.useMemo(()=>(t??[]).map(X=>{var B;return((B=X.image)==null?void 0:B.url)??""}).join("\0"),[t]),[W,ue]=l.useState(or),h=l.useMemo(()=>{const X=t??[];return!$||X.length===0?X:_u(X,W)},[t,$,W]),ae=l.useMemo(()=>h.filter(X=>{var B;return!!((B=X.image)!=null&&B.url)}).length,[h]),be=z?ku:1;l.useLayoutEffect(()=>{te.current=0,Q({}),O.current=null,ue(or),k(0)},[oe]),l.useEffect(()=>{if(!T||g!=="randomize")return;const X=L.current;if(!X)return;const B=Re=>{Q(Ie=>{let _e=null;for(const F of Re)F in Ie&&(Fu(X,F)||(_e||(_e={...Ie}),delete _e[F]));return _e??Ie})},se=new IntersectionObserver(Re=>{const Ie=new Set;for(const _e of Re){const F=_e.target.dataset.marqueeItemIndex,D=F!==void 0?Number(F):NaN;Number.isNaN(D)||Ie.add(D)}Ie.size>0&&B(Ie)},{root:X,threshold:0});Object.keys(H).forEach(Re=>{const Ie=Number(Re);X.querySelectorAll(`[data-marquee-item-index="${Ie}"]`).forEach(_e=>se.observe(_e))});let Ee=0;const Fe=()=>{const Re=Object.keys(Y.current);Re.length!==0&&(B(Re.map(Number)),Ee=requestAnimationFrame(Fe))};return Object.keys(Y.current).length>0&&(Ee=requestAnimationFrame(Fe)),()=>{cancelAnimationFrame(Ee),se.disconnect()}},[g,H,T]),l.useLayoutEffect(()=>{if(!z)return;const X=L.current,B=J.current;if(!X||!B)return;let se=0;const Ee=()=>{const Ie=X.getBoundingClientRect().width,_e=B.getBoundingClientRect().width,F=O.current,D=typeof F=="number"&&Math.abs(F-_e)<=.25;if(O.current=_e,$&&_e>0&&W>0){const E=_e/W;if(E>0&&Ie>0){const j=Math.max(or,Math.ceil(Ie/E)+1);if(j!==W){ue(j);return}}}if(_e>0&&y<=0){k(_e);return}D&&_e!==y?k(_e):!D&&y<=0&&(cancelAnimationFrame(se),se=requestAnimationFrame(Ee))},Fe=()=>{cancelAnimationFrame(se),se=requestAnimationFrame(Ee)};ce.current=Fe,Fe();const Re=new ResizeObserver(Fe);return Re.observe(X),Re.observe(B),()=>{ce.current=null,cancelAnimationFrame(se),Re.disconnect()}},[$,z,y,oe,W]),l.useLayoutEffect(()=>{const X=C.current;if(!z||!X)return;const B=y>0?y:0,se=B>0&&M>0?B/M*1e3:0,Ee=`${Math.max(0,se)/1e3}s`;X.style.setProperty("--marquee-distance",`${B}px`),X.style.setProperty("--marquee-duration",Ee)},[$,z,M,y]),l.useLayoutEffect(()=>{if(!z){V(0);return}if(y<=0){V(0);return}const X=C.current;if(!X)return;const B=()=>{const Ee=X.getBoundingClientRect().height;V(Ee>0?Ee:0)};B();const se=new ResizeObserver(B);return se.observe(X),()=>se.disconnect()},[z,be,h,n,p,R,b,y,I,H]);const ye=()=>{ne&&K(!0)},Ae=()=>{ne&&K(!1)},Z=l.useCallback(()=>{var X;te.current=Math.min(ae,te.current+1),(X=ce.current)==null||X.call(ce)},[ae]),ge=l.useCallback((X,B)=>{Q(se=>{const Ee=se[X]??B,Fe=(t??[]).filter(Ie=>Ie!==Ee);if(Fe.length===0)return se;const Re=Fe[Math.floor(Math.random()*Fe.length)];return{...se,[X]:Re}})},[t]),U=(X,B,se,Ee)=>{const Fe=T&&g==="randomize"&&I.display==="cover"?H[se]??X:X,Re=`max(${N(p)}, ${Mu}px)`,Ie=`calc(-0.5 * (${Re} + ${N(p)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":se,onMouseEnter:T&&g==="randomize"&&I.display==="cover"?()=>ge(se,X):void 0,children:[r.jsx(Nu,{item:Fe,prefix:s,imageFit:I,imageMaxWidth:R,imageMaxHeight:b,imageHoverClass:w,isEditor:n,isFirstSet:Ee,scaled:N,onFirstSetImageDone:Z}),v&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:Ie,width:Re,height:"100%"}})]},`${B}-${se}`)};if(z){const X=$?ne&&me?"paused":"running":"paused";return r.jsxs("div",{ref:L,className:Ye(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:y>0&&_>0?{height:_}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:a}}),r.jsx("div",{ref:C,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:ye,onMouseLeave:Ae,style:{"--marquee-play-state":X},children:Array.from({length:be},(B,se)=>r.jsx("div",{ref:se===0?J:void 0,className:Ye(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:N(p),paddingRight:N(p)},"aria-hidden":se>0,children:h.map((Ee,Fe)=>U(Ee,se,Fe,se===0))},`set-${se}`))},"marquee-track")]})}return r.jsxs("div",{ref:L,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:a}}),r.jsx("div",{className:Ye(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:N(p),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((X,B)=>U(X,0,B))},"marquee-static")]})},Ou=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1692
+ `}const Au=30,Mu=20,rr=3,ku=3,_u=(e,t)=>Array.from({length:t},()=>e).flat(),Wu=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Fu=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Wu(i,e))},Nu=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,imageHoverClass:s,isFirstSet:a,scaled:u,onFirstSetImageDone:c})=>{var L,C,J;const m=l.useRef(null);l.useLayoutEffect(()=>{if(!a)return;const y=m.current;y!=null&&y.complete&&(c==null||c())},[a,(L=e.image)==null?void 0:L.url,c]);const p=n.display==="cover",R=n.ratioValue??"1:1",x=n.reversed??!1,[I,g]=R.split(":").map(Number),w=(x?g:I)/(x?I:g);let $=i,S=$/w;S>o&&(S=o,$=S*w);const O=u($),M=u(S),H=((C=e.image)==null?void 0:C.url)&&r.jsx("img",{ref:m,src:e.image.url,alt:((J=e.image)==null?void 0:J.name)??"",style:p?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:u(i),objectFit:"contain"},onLoad:a?c:void 0,onError:a?c:void 0});return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...p?{width:O}:{width:"fit-content",maxWidth:u(i),minWidth:0}},children:r.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...p?{width:O,height:M,overflow:"hidden"}:{width:"fit-content",maxWidth:u(i),height:u(o)}},children:H&&e.link?r.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Ye(`${t}-marquee-link`,!p&&`${t}-marquee-link-contain`),children:H}):H})})},Hu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=P.useScopedStyles(),a=l.useMemo(()=>Ru(s),[s]),{speed:u,direction:c,pauseOnHover:m,gap:p,imageMaxWidth:R,imageMaxHeight:x,imageFit:I,hoverEffect:g}=e,v=!!o,T=!n||!!i,w=T&&g!=="off"&&g!=="randomize"?`${s}-image-hover-${g}`:void 0,$=n?!!i:!0,O=((t==null?void 0:t.length)??0)>0&&($||!!n),M=Math.max(0,u)*Au,H=U=>P.scalingValue(U,n??!1),L=l.useRef(null),C=l.useRef(null),J=l.useRef(null),[y,k]=l.useState(0),[_,D]=l.useState(0),ne=$&&m==="on",[me,K]=l.useState(!1),[F,Q]=l.useState({}),Y=l.useRef(F);Y.current=F;const B=l.useRef(null),te=l.useRef(0),de=l.useRef(null),re=l.useMemo(()=>(t??[]).map(U=>{var j;return((j=U.image)==null?void 0:j.url)??""}).join("\0"),[t]),[W,pe]=l.useState(rr),h=l.useMemo(()=>{const U=t??[];return!$||U.length===0?U:_u(U,W)},[t,$,W]),ae=l.useMemo(()=>h.filter(U=>{var j;return!!((j=U.image)!=null&&j.url)}).length,[h]),be=O?ku:1;l.useLayoutEffect(()=>{te.current=0,Q({}),B.current=null,pe(rr),k(0)},[re]),l.useEffect(()=>{if(!T||g!=="randomize")return;const U=L.current;if(!U)return;const j=Re=>{Q(Ie=>{let _e=null;for(const N of Re)N in Ie&&(Fu(U,N)||(_e||(_e={...Ie}),delete _e[N]));return _e??Ie})},se=new IntersectionObserver(Re=>{const Ie=new Set;for(const _e of Re){const N=_e.target.dataset.marqueeItemIndex,q=N!==void 0?Number(N):NaN;Number.isNaN(q)||Ie.add(q)}Ie.size>0&&j(Ie)},{root:U,threshold:0});Object.keys(F).forEach(Re=>{const Ie=Number(Re);U.querySelectorAll(`[data-marquee-item-index="${Ie}"]`).forEach(_e=>se.observe(_e))});let Ee=0;const Fe=()=>{const Re=Object.keys(Y.current);Re.length!==0&&(j(Re.map(Number)),Ee=requestAnimationFrame(Fe))};return Object.keys(Y.current).length>0&&(Ee=requestAnimationFrame(Fe)),()=>{cancelAnimationFrame(Ee),se.disconnect()}},[g,F,T]),l.useLayoutEffect(()=>{if(!O)return;const U=L.current,j=J.current;if(!U||!j)return;let se=0;const Ee=()=>{const Ie=U.getBoundingClientRect().width,_e=j.getBoundingClientRect().width,N=B.current,q=typeof N=="number"&&Math.abs(N-_e)<=.25;if(B.current=_e,$&&_e>0&&W>0){const E=_e/W;if(E>0&&Ie>0){const z=Math.max(rr,Math.ceil(Ie/E)+1);if(z!==W){pe(z);return}}}if(_e>0&&y<=0){k(_e);return}q&&_e!==y?k(_e):!q&&y<=0&&(cancelAnimationFrame(se),se=requestAnimationFrame(Ee))},Fe=()=>{cancelAnimationFrame(se),se=requestAnimationFrame(Ee)};de.current=Fe,Fe();const Re=new ResizeObserver(Fe);return Re.observe(U),Re.observe(j),()=>{de.current=null,cancelAnimationFrame(se),Re.disconnect()}},[$,O,y,re,W]),l.useLayoutEffect(()=>{const U=C.current;if(!O||!U)return;const j=y>0?y:0,se=j>0&&M>0?j/M*1e3:0,Ee=`${Math.max(0,se)/1e3}s`;U.style.setProperty("--marquee-distance",`${j}px`),U.style.setProperty("--marquee-duration",Ee)},[$,O,M,y]),l.useLayoutEffect(()=>{if(!O){D(0);return}if(y<=0){D(0);return}const U=C.current;if(!U)return;const j=()=>{const Ee=U.getBoundingClientRect().height;D(Ee>0?Ee:0)};j();const se=new ResizeObserver(j);return se.observe(U),()=>se.disconnect()},[O,be,h,n,p,R,x,y,I,F]),l.useLayoutEffect(()=>{if(!n||!v||!O||typeof window>"u")return;const U=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(U)},[n,v,O,c,y,_,p,h]);const ye=()=>{ne&&K(!0)},Ae=()=>{ne&&K(!1)},Z=l.useCallback(()=>{var U;te.current=Math.min(ae,te.current+1),(U=de.current)==null||U.call(de)},[ae]),ge=l.useCallback((U,j)=>{Q(se=>{const Ee=se[U]??j,Fe=(t??[]).filter(Ie=>Ie!==Ee);if(Fe.length===0)return se;const Re=Fe[Math.floor(Math.random()*Fe.length)];return{...se,[U]:Re}})},[t]),X=(U,j,se,Ee)=>{const Fe=T&&g==="randomize"&&I.display==="cover"?F[se]??U:U,Re=`max(${H(p)}, ${Mu}px)`,Ie=`calc(-0.5 * (${Re} + ${H(p)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":se,onMouseEnter:T&&g==="randomize"&&I.display==="cover"?()=>ge(se,U):void 0,children:[r.jsx(Nu,{item:Fe,prefix:s,imageFit:I,imageMaxWidth:R,imageMaxHeight:x,imageHoverClass:w,isEditor:n,isFirstSet:Ee,scaled:H,onFirstSetImageDone:Z}),v&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:Ie,width:Re,height:"100%"}})]},`${j}-${se}`)};if(O){const U=$?ne&&me?"paused":"running":"paused";return r.jsxs("div",{ref:L,className:Ye(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:y>0&&_>0?{height:_}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:a}}),r.jsx("div",{ref:C,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:ye,onMouseLeave:Ae,style:{"--marquee-play-state":U},children:Array.from({length:be},(j,se)=>r.jsx("div",{ref:se===0?J:void 0,className:Ye(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:H(p),paddingRight:H(p)},"aria-hidden":se>0,children:h.map((Ee,Fe)=>X(Ee,se,Fe,se===0))},`set-${se}`))},"marquee-track")]})}return r.jsxs("div",{ref:L,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:a}}),r.jsx("div",{className:Ye(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:H(p),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((U,j)=>X(U,0,j))},"marquee-static")]})},Ou=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1693
1693
  import cn from 'classnames';
1694
1694
  import { CommonComponentProps } from '../props';
1695
1695
  import { scalingValue } from '../utils/scalingValue';
@@ -2160,6 +2160,15 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode, isEditMode
2160
2160
  return () => ro.disconnect();
2161
2161
  }, [useMarqueeTrack, copies, setContent, isEditor, gap, imageMaxWidth, imageMaxHeight, setWidth, imageFit, swappedSlots]);
2162
2162
 
2163
+ useLayoutEffect(() => {
2164
+ if (!isEditor || !showControls || !useMarqueeTrack) return;
2165
+ if (typeof window === 'undefined') return;
2166
+ const raf = requestAnimationFrame(() => {
2167
+ window.dispatchEvent(new Event('scroll'));
2168
+ });
2169
+ return () => cancelAnimationFrame(raf);
2170
+ }, [isEditor, showControls, useMarqueeTrack, direction, setWidth, trackHeight, gap, setContent]);
2171
+
2163
2172
  const onTrackEnter = () => {
2164
2173
  if (!hoverPauseEnabled) return;
2165
2174
  setIsHovering(true);
@@ -2407,7 +2416,7 @@ type MarqueeProps = {
2407
2416
  pointer-events: auto;
2408
2417
  z-index: 10;
2409
2418
  }
2410
- `}const zu=30,Ea=2,Vu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=P.useScopedStyles(),{align:a,speed:u,direction:c,pauseOnHover:m,gap:p,cardWidth:R,corners:b,stroke:I,strokeColor:g,bgColor:v,padding:T,logoMarginTop:w,logoWidth:$,logoHeight:S,captionMarginTop:z}=e,M=!!o,N=((t==null?void 0:t.length)??0)>0,L=u>0&&(!n||i),C=N&&(L||n),J=Math.max(0,u)*zu,y=E=>P.scalingValue(E,n??!1),k=l.useRef(null),_=l.useRef(null),V=l.useRef(null),[ne,me]=l.useState(0),[K,H]=l.useState(0),[Q,Y]=l.useState(0),O=L&&m==="on",[te,ce]=l.useState(!1),oe=l.useRef(null),[W,ue]=l.useState(0),[h,ae]=l.useState(0),be=l.useRef(null),ye=E=>{var G,ee,ie,he,Se;return{fontSettings:{fontFamily:(e==null?void 0:e[`${E}FontFamily`])??"Arial",fontWeight:((G=e==null?void 0:e[`${E}FontSettings`])==null?void 0:G.fontWeight)??400,fontStyle:((ee=e==null?void 0:e[`${E}FontSettings`])==null?void 0:ee.fontStyle)??"normal"},textAppearance:{textTransform:((ie=e==null?void 0:e[`${E}TextAppearance`])==null?void 0:ie.textTransform)??"none",textDecoration:((he=e==null?void 0:e[`${E}TextAppearance`])==null?void 0:he.textDecoration)??"none",fontVariant:((Se=e==null?void 0:e[`${E}TextAppearance`])==null?void 0:Se.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${E}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${E}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${E}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${E}LineHeight`])??.01,color:(e==null?void 0:e[`${E}Color`])??"#000000"}},Ae=ye("text"),Z=ye("caption"),ge=l.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(E=>{var j,G;return(((j=E.text)==null?void 0:j.length)??0)>0||(((G=E.caption)==null?void 0:G.length)??0)>0}),[t]),U=l.useMemo(()=>!C||(t==null?void 0:t.length)===0?1:K<=0||ne<=0?Ea:Math.max(Ea,Math.ceil(ne/K)+1),[C,t==null?void 0:t.length,K,ne]);l.useLayoutEffect(()=>{if(!C)return;const E=k.current,j=V.current;if(!E||!j)return;let G=0;const ee=()=>{const Se=E.getBoundingClientRect().width,$e=j.getBoundingClientRect().width,fe=be.current,Ge=typeof fe=="number"&&Math.abs(fe-$e)<=.25;if(be.current=$e,me(Se),typeof $e=="number"&&$e>0&&K<=0){H($e);return}Ge&&$e!==K?H($e):!Ge&&K<=0&&(cancelAnimationFrame(G),G=requestAnimationFrame(ee))},ie=()=>{cancelAnimationFrame(G),G=requestAnimationFrame(ee)};ie();const he=new ResizeObserver(ie);return he.observe(E),he.observe(j),()=>{cancelAnimationFrame(G),he.disconnect()}},[L,C,K]),l.useLayoutEffect(()=>{const E=_.current;if(!C||!E)return;const j=K>0?K:0,G=j>0&&J>0?j/J*1e3:0,ee=`${Math.max(0,G)/1e3}s`;E.style.setProperty("--marquee-distance",`${j}px`),E.style.setProperty("--marquee-duration",ee)},[L,C,J,K]),l.useLayoutEffect(()=>{if(!C){Y(0);return}const E=V.current,j=_.current;if(!E||!j)return;const G=()=>{let ie=0;for(let he=0;he<E.children.length;he++){const $e=E.children[he].firstElementChild;$e&&(ie=Math.max(ie,$e.offsetHeight))}ie<=0&&(ie=j.offsetHeight),Y(ie>0?ie:0)};G();const ee=new ResizeObserver(G);return ee.observe(E),ee.observe(j),()=>{ee.disconnect()}},[C,U,t,n,p,R,T,I,b,$,S,W,h]);const X=()=>{O&&ce(!0)},B=()=>{O&&ce(!1)},se=l.useMemo(()=>{switch(a){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[a]),Ee=l.useMemo(()=>{switch(a){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[a]),Fe=l.useCallback((E,j,G,ee)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[r.jsx("div",{"data-controls":M?ee==null?void 0:ee.controlsName:void 0,"data-controls-axis":M?"y":void 0,className:M?`${s}-control`:void 0,style:{height:y((ee==null?void 0:ee.marginTop)??0)}}),r.jsx("div",{...ee!=null&&ee.dataMeasureKind?{"data-testimonial-measure":ee.dataMeasureKind}:{},style:{...Rt(E,n),textAlign:Ee,pointerEvents:"auto",...typeof(ee==null?void 0:ee.minHeightPx)=="number"&&ee.minHeightPx>0?{minHeight:ee.minHeightPx}:{}},children:r.jsx(ui,{content:j})})]},G),[se,Ee,n,M,s,y]),Re=l.useCallback((E,j,G)=>{var ee,ie,he;return r.jsxs("div",{style:{padding:`${y(T.top)} ${y(T.right)} ${y(T.bottom)} ${y(T.left)}`,width:y(R+I*2),height:"100%",borderRadius:y(b),border:`${y(I)} solid ${g}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:v}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:se,textAlign:Ee},children:[E.text&&Fe(Ae,E.text,"text",G!=null&&G.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(G==null?void 0:G.textMinHeightPx)=="number"&&G.textMinHeightPx>0?{minHeightPx:G.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[r.jsx("div",{"data-controls":M&&!(G!=null&&G.dataMeasureAttrs)?"logoMarginTop":void 0,className:M&&!(G!=null&&G.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:y(w)}}),r.jsx("div",{style:{width:y($),height:y(S)},children:((ee=E.logo)==null?void 0:ee.url)&&r.jsx("img",{src:E.logo.url,alt:((ie=E.logo)==null?void 0:ie.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((he=E.logo)==null?void 0:he.objectFit)||"contain"}})})]}),E.caption&&Fe(Z,E.caption,"caption",{...G!=null&&G.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:z,...G!=null&&G.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(G==null?void 0:G.captionMinHeightPx)=="number"&&G.captionMinHeightPx>0?{minHeightPx:G.captionMinHeightPx}:{}})]})]},j)},[v,z,Z,R,b,S,w,$,se,Ee,T.bottom,T.left,T.right,T.top,Fe,I,g,Ae,n,M,s]),Ie=l.useCallback(E=>{ue(E.maxTextPx),ae(E.maxCaptionPx)},[]);l.useLayoutEffect(()=>{if(!ge){Ie({maxTextPx:0,maxCaptionPx:0});return}const E=oe.current;if(!E)return;const j=()=>{P.readTestimonialTextMeasure(E,Ie)};j();const G=new ResizeObserver(j);return G.observe(E),()=>{G.disconnect()}},[ge,Ie,t,Re]);const _e=ge?{textMinHeightPx:W,captionMinHeightPx:h}:void 0,F=ge?r.jsx("div",{ref:oe,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((E,j)=>Re(E,`measure-${j}`,{dataMeasureAttrs:!0}))}):null,D=(E,j)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Re(E,`card-${j}`,_e),M&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${y(p)})`,width:y(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},j);if(C){const E=L?O&&te?"paused":"running":"paused";return r.jsxs("div",{ref:k,className:Ye(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...Q>0?{height:Q}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:La(s)}}),F,r.jsx("div",{ref:_,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:X,onMouseLeave:B,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":E},children:Array.from({length:U},(j,G)=>r.jsx("div",{ref:G===0?V:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:y(p),paddingRight:y(p)},"aria-hidden":G>0,children:t==null?void 0:t.map((ee,ie)=>D(ee,`${G}-${ie}`))},`set-${G}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:La(s)}}),F,r.jsx("div",{style:{gap:y(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((E,j)=>D(E,j))})]})},Du=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2419
+ `}const zu=30,Ea=2,Vu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=P.useScopedStyles(),{align:a,speed:u,direction:c,pauseOnHover:m,gap:p,cardWidth:R,corners:x,stroke:I,strokeColor:g,bgColor:v,padding:T,logoMarginTop:w,logoWidth:$,logoHeight:S,captionMarginTop:O}=e,M=!!o,H=((t==null?void 0:t.length)??0)>0,L=u>0&&(!n||i),C=H&&(L||n),J=Math.max(0,u)*zu,y=E=>P.scalingValue(E,n??!1),k=l.useRef(null),_=l.useRef(null),D=l.useRef(null),[ne,me]=l.useState(0),[K,F]=l.useState(0),[Q,Y]=l.useState(0),B=L&&m==="on",[te,de]=l.useState(!1),re=l.useRef(null),[W,pe]=l.useState(0),[h,ae]=l.useState(0),be=l.useRef(null),ye=E=>{var G,ee,ie,he,Se;return{fontSettings:{fontFamily:(e==null?void 0:e[`${E}FontFamily`])??"Arial",fontWeight:((G=e==null?void 0:e[`${E}FontSettings`])==null?void 0:G.fontWeight)??400,fontStyle:((ee=e==null?void 0:e[`${E}FontSettings`])==null?void 0:ee.fontStyle)??"normal"},textAppearance:{textTransform:((ie=e==null?void 0:e[`${E}TextAppearance`])==null?void 0:ie.textTransform)??"none",textDecoration:((he=e==null?void 0:e[`${E}TextAppearance`])==null?void 0:he.textDecoration)??"none",fontVariant:((Se=e==null?void 0:e[`${E}TextAppearance`])==null?void 0:Se.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${E}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${E}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${E}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${E}LineHeight`])??.01,color:(e==null?void 0:e[`${E}Color`])??"#000000"}},Ae=ye("text"),Z=ye("caption"),ge=l.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(E=>{var z,G;return(((z=E.text)==null?void 0:z.length)??0)>0||(((G=E.caption)==null?void 0:G.length)??0)>0}),[t]),X=l.useMemo(()=>!C||(t==null?void 0:t.length)===0?1:K<=0||ne<=0?Ea:Math.max(Ea,Math.ceil(ne/K)+1),[C,t==null?void 0:t.length,K,ne]);l.useLayoutEffect(()=>{if(!C)return;const E=k.current,z=D.current;if(!E||!z)return;let G=0;const ee=()=>{const Se=E.getBoundingClientRect().width,$e=z.getBoundingClientRect().width,fe=be.current,Ge=typeof fe=="number"&&Math.abs(fe-$e)<=.25;if(be.current=$e,me(Se),typeof $e=="number"&&$e>0&&K<=0){F($e);return}Ge&&$e!==K?F($e):!Ge&&K<=0&&(cancelAnimationFrame(G),G=requestAnimationFrame(ee))},ie=()=>{cancelAnimationFrame(G),G=requestAnimationFrame(ee)};ie();const he=new ResizeObserver(ie);return he.observe(E),he.observe(z),()=>{cancelAnimationFrame(G),he.disconnect()}},[L,C,K]),l.useLayoutEffect(()=>{const E=_.current;if(!C||!E)return;const z=K>0?K:0,G=z>0&&J>0?z/J*1e3:0,ee=`${Math.max(0,G)/1e3}s`;E.style.setProperty("--marquee-distance",`${z}px`),E.style.setProperty("--marquee-duration",ee)},[L,C,J,K]),l.useLayoutEffect(()=>{if(!C){Y(0);return}const E=D.current,z=_.current;if(!E||!z)return;const G=()=>{let ie=0;for(let he=0;he<E.children.length;he++){const $e=E.children[he].firstElementChild;$e&&(ie=Math.max(ie,$e.offsetHeight))}ie<=0&&(ie=z.offsetHeight),Y(ie>0?ie:0)};G();const ee=new ResizeObserver(G);return ee.observe(E),ee.observe(z),()=>{ee.disconnect()}},[C,X,t,n,p,R,T,I,x,$,S,W,h]);const U=()=>{B&&de(!0)},j=()=>{B&&de(!1)},se=l.useMemo(()=>{switch(a){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[a]),Ee=l.useMemo(()=>{switch(a){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[a]),Fe=l.useCallback((E,z,G,ee)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[r.jsx("div",{"data-controls":M?ee==null?void 0:ee.controlsName:void 0,"data-controls-axis":M?"y":void 0,className:M?`${s}-control`:void 0,style:{height:y((ee==null?void 0:ee.marginTop)??0)}}),r.jsx("div",{...ee!=null&&ee.dataMeasureKind?{"data-testimonial-measure":ee.dataMeasureKind}:{},style:{...Rt(E,n),textAlign:Ee,pointerEvents:"auto",...typeof(ee==null?void 0:ee.minHeightPx)=="number"&&ee.minHeightPx>0?{minHeight:ee.minHeightPx}:{}},children:r.jsx(ui,{content:z})})]},G),[se,Ee,n,M,s,y]),Re=l.useCallback((E,z,G)=>{var ee,ie,he;return r.jsxs("div",{style:{padding:`${y(T.top)} ${y(T.right)} ${y(T.bottom)} ${y(T.left)}`,width:y(R+I*2),height:"100%",borderRadius:y(x),border:`${y(I)} solid ${g}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:v}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:se,textAlign:Ee},children:[E.text&&Fe(Ae,E.text,"text",G!=null&&G.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(G==null?void 0:G.textMinHeightPx)=="number"&&G.textMinHeightPx>0?{minHeightPx:G.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[r.jsx("div",{"data-controls":M&&!(G!=null&&G.dataMeasureAttrs)?"logoMarginTop":void 0,className:M&&!(G!=null&&G.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:y(w)}}),r.jsx("div",{style:{width:y($),height:y(S)},children:((ee=E.logo)==null?void 0:ee.url)&&r.jsx("img",{src:E.logo.url,alt:((ie=E.logo)==null?void 0:ie.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((he=E.logo)==null?void 0:he.objectFit)||"contain"}})})]}),E.caption&&Fe(Z,E.caption,"caption",{...G!=null&&G.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:O,...G!=null&&G.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(G==null?void 0:G.captionMinHeightPx)=="number"&&G.captionMinHeightPx>0?{minHeightPx:G.captionMinHeightPx}:{}})]})]},z)},[v,O,Z,R,x,S,w,$,se,Ee,T.bottom,T.left,T.right,T.top,Fe,I,g,Ae,n,M,s]),Ie=l.useCallback(E=>{pe(E.maxTextPx),ae(E.maxCaptionPx)},[]);l.useLayoutEffect(()=>{if(!ge){Ie({maxTextPx:0,maxCaptionPx:0});return}const E=re.current;if(!E)return;const z=()=>{P.readTestimonialTextMeasure(E,Ie)};z();const G=new ResizeObserver(z);return G.observe(E),()=>{G.disconnect()}},[ge,Ie,t,Re]);const _e=ge?{textMinHeightPx:W,captionMinHeightPx:h}:void 0,N=ge?r.jsx("div",{ref:re,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((E,z)=>Re(E,`measure-${z}`,{dataMeasureAttrs:!0}))}):null,q=(E,z)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Re(E,`card-${z}`,_e),M&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${y(p)})`,width:y(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},z);if(C){const E=L?B&&te?"paused":"running":"paused";return r.jsxs("div",{ref:k,className:Ye(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...Q>0?{height:Q}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:La(s)}}),N,r.jsx("div",{ref:_,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:U,onMouseLeave:j,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":E},children:Array.from({length:X},(z,G)=>r.jsx("div",{ref:G===0?D:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:y(p),paddingRight:y(p)},"aria-hidden":G>0,children:t==null?void 0:t.map((ee,ie)=>q(ee,`${G}-${ie}`))},`set-${G}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:La(s)}}),N,r.jsx("div",{style:{gap:y(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((E,z)=>q(E,z))})]})},Du=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2411
2420
  import cn from 'classnames';
2412
2421
  import { CommonComponentProps } from '../props';
2413
2422
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3146,7 +3155,7 @@ type TestimonialsSettings = {
3146
3155
  width: 100%;
3147
3156
  height: 100%;
3148
3157
  }
3149
- `}const Uu=3e3,Xu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=P.useScopedStyles(),a=t||[],{speed:u,align:c,width:m,imageMarginTop:p,textMarginTop:R,captionMarginTop:b,imageWidth:I,imageHeight:g,controlsWidth:v,controlsColor:T,controlsHoverColor:w}=e,$=u>0&&(!n||!!i),[S,z]=l.useState(0),[M,N]=l.useState(null),[L,C]=l.useState(!1),J=l.useRef(null),y=l.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),k=l.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);l.useEffect(()=>{z(0),N(null),C(!1)},[a.length]);const _=a[S],V=M===null?null:a[M],ne=Z=>{var U,X,B,se,Ee;return{fontSettings:{fontFamily:(e==null?void 0:e[`${Z}FontFamily`])??"Arial",fontWeight:((U=e==null?void 0:e[`${Z}FontSettings`])==null?void 0:U.fontWeight)??400,fontStyle:((X=e==null?void 0:e[`${Z}FontSettings`])==null?void 0:X.fontStyle)??"normal"},textAppearance:{textTransform:((B=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:B.textTransform)??"none",textDecoration:((se=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:se.textDecoration)??"none",fontVariant:((Ee=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:Ee.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${Z}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${Z}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${Z}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${Z}WordSpacing`])??0,color:(e==null?void 0:e[`${Z}Color`])??"#000000"}},me=ne("text"),K=ne("caption"),H=a.length>1&&a.some(Z=>{var ge,U;return(((ge=Z.text)==null?void 0:ge.length)??0)>0||(((U=Z.caption)==null?void 0:U.length)??0)>0}),Q=l.useRef(null),[Y,O]=l.useState(0),[te,ce]=l.useState(0),oe=e.controls??{mode:"Off",icon:null},W=a.length>1,ue=l.useCallback((Z,ge)=>!W||ge===Z?Z:(J.current&&window.clearTimeout(J.current),N(Z),C(!0),J.current=window.setTimeout(()=>{N(null),C(!1),J.current=null},300),ge),[W]),h=l.useCallback(()=>{W&&z(Z=>ue(Z,(Z-1+a.length)%a.length))},[W,ue,a.length]),ae=l.useCallback(()=>{W&&z(Z=>ue(Z,(Z+1)%a.length))},[W,ue,a.length]);l.useEffect(()=>{if(!$||!W)return;const Z=Math.max(300,Uu/u),ge=window.setInterval(()=>{z(U=>ue(U,(U+1)%a.length))},Z);return()=>{window.clearInterval(ge)}},[$,W,ue,a.length,u]),l.useEffect(()=>()=>{J.current&&window.clearTimeout(J.current)},[]);const be=(Z,ge)=>{var Ee,Fe,Re,Ie;const U=ge==null?void 0:ge.textMinHeightPx,X=ge==null?void 0:ge.captionMinHeightPx,B=ge==null?void 0:ge.dataMeasureAttrs,se=o&&!(ge!=null&&ge.dataMeasureAttrs)&&!(ge!=null&&ge.hideControls);return r.jsxs(r.Fragment,{children:[Z.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:y,width:"100%"},children:[r.jsx("div",{"data-controls":se?"textMarginTop":void 0,className:se?`${s}-control`:void 0,style:{height:P.scalingValue(R??0,n??!1)}}),r.jsx("div",{...B&&{"data-testimonial-measure":"text"},style:{...Rt(me,n),...U&&U>0?{minHeight:U}:{},textAlign:k,pointerEvents:"auto"},children:r.jsx(ui,{content:Z.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:y,width:"100%"},children:[r.jsx("div",{"data-controls":se?"imageMarginTop":void 0,className:se?`${s}-control`:void 0,style:{height:P.scalingValue(p??0,n??!1)}}),r.jsx("div",{style:{width:P.scalingValue(I??0,n??!1),height:P.scalingValue(g??0,n??!1)},children:((Ee=Z.image)==null?void 0:Ee.url)&&r.jsx("img",{src:(Fe=Z.image)==null?void 0:Fe.url,alt:((Re=Z.image)==null?void 0:Re.name)??"",className:`${s}-icon`,style:{objectFit:((Ie=Z.image)==null?void 0:Ie.objectFit)||"contain"}})})]}),Z.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:y,width:"100%"},children:[r.jsx("div",{"data-controls":se?"captionMarginTop":void 0,className:se?`${s}-control`:void 0,style:{height:P.scalingValue(b??0,n??!1)}}),r.jsx("div",{...B?{"data-testimonial-measure":"caption"}:{},style:{...Rt(K,n),...X&&X>0?{minHeight:X}:{},textAlign:k,pointerEvents:"auto"},children:r.jsx(ui,{content:Z.caption})})]})]})},ye=l.useCallback(Z=>{O(Z.maxTextPx),ce(Z.maxCaptionPx)},[]);if(l.useLayoutEffect(()=>{if(!H){ye({maxTextPx:0,maxCaptionPx:0});return}const Z=Q.current;if(!Z)return;const ge=()=>{P.readTestimonialTextMeasure(Z,ye)};ge();const U=new ResizeObserver(ge);return U.observe(Z),()=>{U.disconnect()}},[H,ye,t]),!_)return r.jsx(r.Fragment,{});const Ae=H?{textMinHeightPx:Y,captionMinHeightPx:te}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Gu(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:P.scalingValue(m??0,n??!1),alignItems:y},children:[H&&r.jsx("div",{ref:Q,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:a.map((Z,ge)=>r.jsx("div",{style:{width:"100%"},children:be(Z,{dataMeasureAttrs:!0})},ge))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[V&&L&&r.jsx("div",{className:Ye(`${s}-fade-item-prev`,`${s}-fade-out`),children:be(V,{...Ae,hideControls:!0})}),r.jsx("div",{className:Ye(`${s}-fade-item-current`,L?`${s}-fade-in`:void 0),children:be(_,Ae)})]})]}),oe.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:P.scalingValue(v??.02,n??!1),height:P.scalingValue(v??.02,n??!1),"--arrow-hover-color":w},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:h,disabled:!W,"aria-label":"Previous testimonial",children:oe.icon&&r.jsx(nn,{url:oe.icon,fill:T,hoverFill:w,className:Ye(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:Ye(`${s}-arrow`,`${s}-next-arrow`),style:{width:P.scalingValue(v??.02,n??!1),height:P.scalingValue(v??.02,n??!1),"--arrow-hover-color":w},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:ae,disabled:!W,"aria-label":"Next testimonial",children:oe.icon&&r.jsx(nn,{url:oe.icon,fill:T,hoverFill:w,className:`${s}-arrow-img`})})})]})]})})},Yu=`import cn from 'classnames';
3158
+ `}const Uu=3e3,Xu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=P.useScopedStyles(),a=t||[],{speed:u,align:c,width:m,imageMarginTop:p,textMarginTop:R,captionMarginTop:x,imageWidth:I,imageHeight:g,controlsWidth:v,controlsColor:T,controlsHoverColor:w}=e,$=u>0&&(!n||!!i),[S,O]=l.useState(0),[M,H]=l.useState(null),[L,C]=l.useState(!1),J=l.useRef(null),y=l.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),k=l.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);l.useEffect(()=>{O(0),H(null),C(!1)},[a.length]);const _=a[S],D=M===null?null:a[M],ne=Z=>{var X,U,j,se,Ee;return{fontSettings:{fontFamily:(e==null?void 0:e[`${Z}FontFamily`])??"Arial",fontWeight:((X=e==null?void 0:e[`${Z}FontSettings`])==null?void 0:X.fontWeight)??400,fontStyle:((U=e==null?void 0:e[`${Z}FontSettings`])==null?void 0:U.fontStyle)??"normal"},textAppearance:{textTransform:((j=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:j.textTransform)??"none",textDecoration:((se=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:se.textDecoration)??"none",fontVariant:((Ee=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:Ee.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${Z}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${Z}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${Z}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${Z}WordSpacing`])??0,color:(e==null?void 0:e[`${Z}Color`])??"#000000"}},me=ne("text"),K=ne("caption"),F=a.length>1&&a.some(Z=>{var ge,X;return(((ge=Z.text)==null?void 0:ge.length)??0)>0||(((X=Z.caption)==null?void 0:X.length)??0)>0}),Q=l.useRef(null),[Y,B]=l.useState(0),[te,de]=l.useState(0),re=e.controls??{mode:"Off",icon:null},W=a.length>1,pe=l.useCallback((Z,ge)=>!W||ge===Z?Z:(J.current&&window.clearTimeout(J.current),H(Z),C(!0),J.current=window.setTimeout(()=>{H(null),C(!1),J.current=null},300),ge),[W]),h=l.useCallback(()=>{W&&O(Z=>pe(Z,(Z-1+a.length)%a.length))},[W,pe,a.length]),ae=l.useCallback(()=>{W&&O(Z=>pe(Z,(Z+1)%a.length))},[W,pe,a.length]);l.useEffect(()=>{if(!$||!W)return;const Z=Math.max(300,Uu/u),ge=window.setInterval(()=>{O(X=>pe(X,(X+1)%a.length))},Z);return()=>{window.clearInterval(ge)}},[$,W,pe,a.length,u]),l.useEffect(()=>()=>{J.current&&window.clearTimeout(J.current)},[]);const be=(Z,ge)=>{var Ee,Fe,Re,Ie;const X=ge==null?void 0:ge.textMinHeightPx,U=ge==null?void 0:ge.captionMinHeightPx,j=ge==null?void 0:ge.dataMeasureAttrs,se=o&&!(ge!=null&&ge.dataMeasureAttrs)&&!(ge!=null&&ge.hideControls);return r.jsxs(r.Fragment,{children:[Z.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:y,width:"100%"},children:[r.jsx("div",{"data-controls":se?"textMarginTop":void 0,className:se?`${s}-control`:void 0,style:{height:P.scalingValue(R??0,n??!1)}}),r.jsx("div",{...j&&{"data-testimonial-measure":"text"},style:{...Rt(me,n),...X&&X>0?{minHeight:X}:{},textAlign:k,pointerEvents:"auto"},children:r.jsx(ui,{content:Z.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:y,width:"100%"},children:[r.jsx("div",{"data-controls":se?"imageMarginTop":void 0,className:se?`${s}-control`:void 0,style:{height:P.scalingValue(p??0,n??!1)}}),r.jsx("div",{style:{width:P.scalingValue(I??0,n??!1),height:P.scalingValue(g??0,n??!1)},children:((Ee=Z.image)==null?void 0:Ee.url)&&r.jsx("img",{src:(Fe=Z.image)==null?void 0:Fe.url,alt:((Re=Z.image)==null?void 0:Re.name)??"",className:`${s}-icon`,style:{objectFit:((Ie=Z.image)==null?void 0:Ie.objectFit)||"contain"}})})]}),Z.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:y,width:"100%"},children:[r.jsx("div",{"data-controls":se?"captionMarginTop":void 0,className:se?`${s}-control`:void 0,style:{height:P.scalingValue(x??0,n??!1)}}),r.jsx("div",{...j?{"data-testimonial-measure":"caption"}:{},style:{...Rt(K,n),...U&&U>0?{minHeight:U}:{},textAlign:k,pointerEvents:"auto"},children:r.jsx(ui,{content:Z.caption})})]})]})},ye=l.useCallback(Z=>{B(Z.maxTextPx),de(Z.maxCaptionPx)},[]);if(l.useLayoutEffect(()=>{if(!F){ye({maxTextPx:0,maxCaptionPx:0});return}const Z=Q.current;if(!Z)return;const ge=()=>{P.readTestimonialTextMeasure(Z,ye)};ge();const X=new ResizeObserver(ge);return X.observe(Z),()=>{X.disconnect()}},[F,ye,t]),!_)return r.jsx(r.Fragment,{});const Ae=F?{textMinHeightPx:Y,captionMinHeightPx:te}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Gu(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:P.scalingValue(m??0,n??!1),alignItems:y},children:[F&&r.jsx("div",{ref:Q,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:a.map((Z,ge)=>r.jsx("div",{style:{width:"100%"},children:be(Z,{dataMeasureAttrs:!0})},ge))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[D&&L&&r.jsx("div",{className:Ye(`${s}-fade-item-prev`,`${s}-fade-out`),children:be(D,{...Ae,hideControls:!0})}),r.jsx("div",{className:Ye(`${s}-fade-item-current`,L?`${s}-fade-in`:void 0),children:be(_,Ae)})]})]}),re.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:P.scalingValue(v??.02,n??!1),height:P.scalingValue(v??.02,n??!1),"--arrow-hover-color":w},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:h,disabled:!W,"aria-label":"Previous testimonial",children:re.icon&&r.jsx(nn,{url:re.icon,fill:T,hoverFill:w,className:Ye(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:Ye(`${s}-arrow`,`${s}-next-arrow`),style:{width:P.scalingValue(v??.02,n??!1),height:P.scalingValue(v??.02,n??!1),"--arrow-hover-color":w},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:ae,disabled:!W,"aria-label":"Next testimonial",children:re.icon&&r.jsx(nn,{url:re.icon,fill:T,hoverFill:w,className:`${s}-arrow-img`})})})]})]})})},Yu=`import cn from 'classnames';
3150
3159
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
3151
3160
  import { CommonComponentProps } from '../props';
3152
3161
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3642,7 +3651,7 @@ type TestimonialsSettings = {
3642
3651
  icon?: string | null;
3643
3652
  };
3644
3653
  };
3645
- `,Ju="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" d="M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),Pa={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Zu={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Pa.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Pa.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{controls:{mode:"On",icon:Ju},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Qu={element:Xu,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:Zu,sourceCode:Yu,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function ep(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ra(e){return((e==null?void 0:e.trim().length)??0)>0}function rr(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function ar(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:P.scalingValue((o-t)/2,i)}}function tp(e){return`
3654
+ `,Ju="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" d="M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),Pa={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Zu={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Pa.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Pa.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{controls:{mode:"On",icon:Ju},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Qu={element:Xu,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:Zu,sourceCode:Yu,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function ep(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ra(e){return((e==null?void 0:e.trim().length)??0)>0}function ar(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function sr(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:P.scalingValue((o-t)/2,i)}}function tp(e){return`
3646
3655
  .${e}-wrapper {
3647
3656
  display: grid;
3648
3657
  align-items: start;
@@ -3845,7 +3854,7 @@ type TestimonialsSettings = {
3845
3854
  pointer-events: auto;
3846
3855
  z-index: 10;
3847
3856
  }
3848
- `}const zt=500,np=750,Qt="cubic-bezier(0.22, 1, 0.36, 1)",ip=72,op=50;function rp(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 ap(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function sp(e){const[t]=e.media;return t!=null&&t.url?t:null}function lp(e){return!Array.isArray(e)||e.length===0?[]:rp(e)?e.flatMap(t=>{const n=ap(t);if(!n)return[];const i=sp(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 Ci(e){return e.type==="video"}function cp(e){e.pause(),e.removeAttribute("src"),e.load()}function Aa({media:e,className:t,style:n,onMediaClick:i}){return Ci(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 ro(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function dp(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function up({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:a,onTransitionEnd:u}){return l.useEffect(()=>{const c=n.current;if(c)return()=>{cp(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:a,onTransitionEnd:u,style:i})}function pp({items:e,index:t,imageDisplay:n,originRect:i,reverseClose:o,onClose:s,onPrev:a,onNext:u,counterClassName:c,counterStyle:m}){const p=n==="cover",R=l.useRef(null),b=l.useRef(null),I=l.useRef(null),g=l.useRef(null),v=l.useRef(0),T=l.useRef(0),w=l.useRef("none"),$=l.useRef(!1),S=l.useRef(!1),z=l.useRef(!1),M=l.useRef(null),[N,L]=l.useState(null),[C,J]=l.useState(i?"opening":"open"),[y,k]=l.useState(!0),[_,V]=l.useState(0),[ne,me]=l.useState(0),[K,H]=l.useState(!1),[Q,Y]=l.useState(!1),[O,te]=l.useState(!1),ce=l.useRef(t),oe=e[t],W=oe?Ci(oe):!1,ue=ne!==0||K,h=l.useCallback(D=>{z.current=D,H(D)},[]),ae=l.useCallback(()=>{M.current!==null&&(window.clearTimeout(M.current),M.current=null)},[]),be=l.useCallback(()=>{ae(),M.current=window.setTimeout(()=>{ae(),h(!1)},zt+32)},[ae,h]),ye=l.useCallback(()=>{const D=b.current,E=I.current;if(!D)return;const j=D.getBoundingClientRect(),G=j.width,ee=j.height;if(!G||!ee)return;if(n==="cover"){L({width:G,height:ee,left:j.left,top:j.top});return}if(!E){L(ro(D));return}const{width:ie,height:he}=dp(E);if(!ie||!he){L(ro(D));return}const Se=ie/he,$e=G/ee;if(Se>$e){const fe=G/Se;L({width:G,height:fe,left:j.left,top:j.top+(ee-fe)/2})}else{const fe=ee*Se;L({width:fe,height:ee,left:j.left+(G-fe)/2,top:j.top})}},[n]);l.useEffect(()=>{ye();const D=b.current;if(!D)return;const E=new ResizeObserver(()=>ye());return E.observe(D),()=>E.disconnect()},[ye,t]),l.useEffect(()=>{C==="opening"&&N&&J("open")},[C,N]),l.useEffect(()=>{if(C!=="closing")return;const D=setTimeout(()=>s(),zt);return()=>clearTimeout(D)},[C,s]),l.useEffect(()=>()=>{ae()},[ae]),l.useLayoutEffect(()=>{if(ce.current===t)return;ae(),k(!1),V(0),me(0),h(!1),te(!1),Y(!1),v.current=0,T.current=0,w.current="none",$.current=!1,g.current=null,S.current=!1;const D=b.current;D&&L(ro(D)),ce.current=t},[t,h,ae]),l.useEffect(()=>{if(C!=="open")return;const D=()=>{const he=Se=>{Se.stopPropagation(),Se.preventDefault(),document.removeEventListener("click",he,!0)};document.addEventListener("click",he,!0)},E=he=>{ae(),z.current=!1,H(!1),me(0),Y(!1),$.current=!1,T.current=0,w.current="none",k(!1);const Se=b.current;Se&&L(ro(Se)),he<0?u():a()},j=he=>{if(Math.abs(he)>op&&e.length>1){E(he);return}h(!0),me(0),be()},G=he=>{if(he.touches.length!==1||z.current)return;const Se=he.touches[0];S.current=!0,g.current={x:Se.clientX,y:Se.clientY},w.current="none",T.current=0,$.current=!1},ee=he=>{if(!g.current||he.touches.length!==1||z.current)return;const Se=he.touches[0],$e=Se.clientX-g.current.x,fe=Se.clientY-g.current.y;if(w.current==="none"){if(Math.abs($e)<10&&Math.abs(fe)<10)return;if(Math.abs($e)>Math.abs(fe)){if(e.length<=1)return;w.current="horizontal"}else if(fe>0)w.current="vertical";else return}if(w.current==="horizontal"){$.current=!0,Y(!0),T.current=$e,me($e),he.preventDefault();return}w.current==="vertical"&&($.current=!0,Y(!0),v.current=fe,V(fe),he.preventDefault())},ie=()=>{if(!g.current)return;const he=w.current,Se=$.current;if(Se&&he==="horizontal")j(T.current),D();else if(Se&&he==="vertical"){if(v.current>ip){const fe=window.innerHeight;v.current=fe,te(!0),V(fe),J("closing")}else v.current=0,V(0);D()}else he==="horizontal"&&Math.abs(T.current)>0&&(j(T.current),D());g.current=null,w.current="none",T.current=0,$.current=!1,Y(!1)};return document.addEventListener("touchstart",G,{passive:!0}),document.addEventListener("touchmove",ee,{passive:!1}),document.addEventListener("touchend",ie),document.addEventListener("touchcancel",ie),()=>{document.removeEventListener("touchstart",G),document.removeEventListener("touchmove",ee),document.removeEventListener("touchend",ie),document.removeEventListener("touchcancel",ie)}},[C,e.length,u,a,h,be]),l.useEffect(()=>{const D=E=>{E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),C!=="closing"&&J("closing"))};return window.addEventListener("keydown",D,!0),()=>window.removeEventListener("keydown",D,!0)},[C]);const Ae=()=>{C!=="closing"&&J("closing")},Z=C==="open",ge=C==="closing",U=ge&&o&&!!i&&!O,X=_>0?Math.max(0,1-_/500):1,B=_>0?Math.max(.35,1-_/500):1,se=C==="opening"?i??N:U?i:N,Ee=D=>{if(D.stopPropagation(),S.current){S.current=!1;return}if(e.length<=1)return;const E=D.currentTarget.getBoundingClientRect(),j=D.clientY-E.top,G=Math.min(52,E.height*.2);if(!(j>E.height-G)){if(D.clientX-E.left<E.width/2){a();return}u()}},Fe=D=>{if(e.length<=1)return;const E=D.currentTarget.getBoundingClientRect(),j=D.clientX-E.left,G=D.clientY-E.top,ee=Math.min(52,E.height*.2);if(G>E.height-ee){D.currentTarget.style.cursor="default";return}D.currentTarget.style.cursor=j<E.width/2?"w-resize":"e-resize"},Re=l.useCallback(D=>{D.propertyName!=="transform"||!z.current||(ae(),h(!1))},[ae,h]),Ie=ue?`translateX(${ne}px)`:_>0?`translateY(${_}px)`:void 0,_e={position:"fixed",top:se==null?void 0:se.top,left:se==null?void 0:se.left,width:se==null?void 0:se.width,height:se==null?void 0:se.height,objectFit:n==="cover"?"cover":"contain",transform:Ie,opacity:_>0?B:ge&&!U?0:1,transition:Q&&!K?"none":K?`transform ${zt}ms ${Qt}`:O?`transform ${zt}ms ${Qt}, opacity ${zt}ms ${Qt}`:ge&&!U?`opacity ${zt}ms ${Qt}`:U||y?`top ${zt}ms ${Qt}, left ${zt}ms ${Qt}, width ${zt}ms ${Qt}, height ${zt}ms ${Qt}`:"none",pointerEvents:W&&Z&&!ue?"auto":"none",touchAction:W&&Z?"none":void 0,zIndex:9998},F=N?{position:"fixed",top:N.top,height:N.height,width:N.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:R,style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997,touchAction:C==="open"?"none":void 0},onClick:Ae,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:Z?X:0,transition:Q?"none":`opacity ${zt}ms ${Qt}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:b,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Z?1:0,transition:`opacity ${zt}ms ${Qt}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:c,style:m,children:[t+1," / ",e.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:b,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Z?1:0,transition:`opacity ${zt}ms ${Qt}`},children:e.length>1&&r.jsxs("p",{className:c,style:m,children:[t+1," / ",e.length]})})]})}),se&&oe&&(W?r.jsx(up,{src:oe.url,phase:C,mediaRef:I,mediaStyle:_e,onLoadedMetadata:ye,onClick:Ee,onMouseMove:Fe,onTransitionEnd:Re},`${t}-${oe.url}`):r.jsx("img",{ref:I,src:oe.url,alt:oe.name,onLoad:ye,onTransitionEnd:Re,style:_e},`${t}-${oe.url}`)),Z&&F&&e.length>1&&!W&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...F,left:N.left,cursor:"w-resize",pointerEvents:ue?"none":"auto"},onClick:D=>{if(S.current){S.current=!1;return}D.stopPropagation(),a()}}),r.jsx("div",{style:{...F,left:N.left+N.width/2,cursor:"e-resize",pointerEvents:ue?"none":"auto"},onClick:D=>{if(S.current){S.current=!1;return}D.stopPropagation(),u()}})]})]})}function mp(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function gp({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:a,layoutId:u}){const{prefix:c}=P.useScopedStyles(),{type:m="a",gridLayout:p,textBoxWidth:R=100,verticalGap:b,entriesCount:I,lightbox:g,imageDisplay:v,lightboxImageDisplay:T,slider:w,sliderTiming:$,direction:S,transition:z,titleMarginTop:M,subtitleMarginTop:N,titleColor:L,subtitleColor:C,lightboxCounterColor:J,titleFontFamily:y,titleFontSettings:k,titleFontSize:_,titleLineHeight:V,titleLetterSpacing:ne,titleWordSpacing:me,titleTextAppearance:K,subtitleFontFamily:H,subtitleFontSettings:Q,subtitleFontSize:Y,subtitleLineHeight:O,subtitleLetterSpacing:te,subtitleWordSpacing:ce,subtitleTextAppearance:oe,lightboxCounterFontFamily:W,lightboxCounterFontSettings:ue,lightboxCounterFontSize:h,lightboxCounterLineHeight:ae,lightboxCounterLetterSpacing:be,lightboxCounterWordSpacing:ye,lightboxCounterTextAppearance:Ae,showText:Z="always",alignEntries:ge="off"}=e,U={fontSettings:{fontFamily:y,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:_??.01,lineHeight:V,letterSpacing:ne??0,wordSpacing:me??0,textAppearance:K,color:L},B={...Ut(Rt(U,n))},se={fontSettings:{fontFamily:H,fontWeight:(Q==null?void 0:Q.fontWeight)??400,fontStyle:(Q==null?void 0:Q.fontStyle)??"normal"},fontSize:Y??.01,lineHeight:O,letterSpacing:te??0,wordSpacing:ce??0,textAppearance:oe,color:C},Fe={...Ut(Rt(se,n))},Re={fontSettings:{fontFamily:W,fontWeight:(ue==null?void 0:ue.fontWeight)??400,fontStyle:(ue==null?void 0:ue.fontStyle)??"normal"},fontSize:h??.01,lineHeight:ae,letterSpacing:be??0,wordSpacing:ye??0,textAppearance:Ae,color:J},_e={...Ut(Rt(Re,n)),...ar(h,ae,c,n)},F=rr(_,V,`${c}-item-title`,`${c}-text-tight-leading`),D=rr(Y,O,`${c}-item-subtitle`,`${c}-text-tight-leading`),E=ar(_,V,c,n),j=ar(Y,O,c,n),G=rr(h,ae,`${c}-lightbox-counter`,`${c}-text-tight-leading`),ee=P.buildColorVars(c,{titleColor:L,subtitleColor:C,lightboxCounterColor:J},hp,fp),Se=`${a&&a!=="default"?`${c}-state-${a}`:""}${Z==="on hover"&&(!n||i)?` ${c}-show-text-hover`:""}`.trim(),$e=I===0?1/0:I,fe=(t??[]).slice(0,$e),Ge=p.entryWidth??.2,de=(v==null?void 0:v.display)==="cover",Me=(v==null?void 0:v.ratioValue)??"1:1",je=(v==null?void 0:v.reversed)??!1,[Ve,at]=Me.split(":").map(Number),mt=`${je?at:Ve} / ${je?Ve:at}`,ft=P.scalingValue(Ge??0,n),Ft=!de&&w!=="off",It={width:ft,...de?{aspectRatio:mt,height:"auto",overflow:"hidden"}:{height:"auto"}},Ue=`${c}-item-image-wrapper${Ft?` ${c}-item-image-wrapper-fit-slider`:""}`.trim(),Ce=m==="c",qe=Ce&&ge==="on",Je=`calc(${P.scalingValue(Ge??0,n)} * (${R} / 100))`,Oe=P.scalingValue(Ge*R/100,n),$t=de?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[At,Ze]=l.useState("ltr"),[Mt,Ht]=l.useState(0),We=l.useRef(null);l.useEffect(()=>{const ze=We.current;if(!ze)return;const vt=new ResizeObserver(le=>{Ht(Math.round(le[0].contentRect.width))});return vt.observe(ze),()=>vt.disconnect()},[]);const yt=(()=>{const ze={...ee},vt=We.current?getComputedStyle(We.current).getPropertyValue("--cntrl-article-width").trim():"";return vt&&(ze["--cntrl-article-width"]=vt),ze})(),[et,Xe]=l.useState(!1),[ot,ut]=l.useState([]),[un,rn]=l.useState(0),[Wn,nt]=l.useState(null),an=g==="on"&&(!n||i),Vt=(ze,vt,le)=>{if(n&&!i||g==="off")return;const xe=ze.currentTarget.getBoundingClientRect();nt({top:xe.top,left:xe.left,width:xe.width,height:xe.height}),ut(vt),rn(le),Xe(!0)};l.useEffect(()=>{if(!et||g!=="on"||typeof document>"u")return;const ze=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ze}},[et,g]),l.useEffect(()=>{!n||i||(Xe(!1),nt(null))},[n,i]);const jt=l.useMemo(()=>tp(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:jt}}),r.jsx("div",{style:ee,children:r.jsx("div",{ref:We,className:`${c}-wrapper ${c}-type-${m}${qe?` ${c}-align-entries`:""} ${Se}`.trim(),style:{gridTemplateColumns:`repeat(${p.columnsCount}, minmax(0, 1fr))`,rowGap:qe?0:P.scalingValue(b??0,n),columnGap:P.scalingValue(p.horizontalGap??0,n),width:P.scalingValue(p.wrapperWidth??0,n),...qe?{[`--${c}-align-entries-row-gap`]:P.scalingValue(b??0,n)}:{}},children:fe.map((ze,vt)=>{var St;const le=Ra(ze.title),xe=Ra(ze.subtitle),Pe=(((St=ze.link)==null?void 0:St.length)??0)>0&&g==="off"?ze.link:void 0,Ne=Math.floor(vt/p.columnsCount)===Math.ceil(fe.length/p.columnsCount)-1,tt=Ce?r.jsxs("div",{className:`${c}-item-text-block`,children:[le&&r.jsx("p",{className:F,style:{width:Je,...B,...E},children:ze.title}),le&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:P.scalingValue(M??0,n),width:Oe}}),xe&&r.jsx("p",{className:D,style:{width:Je,...Fe,...j},children:ze.subtitle}),xe&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:P.scalingValue(N??0,n),width:Oe}})]}):null,bt=Ce?r.jsxs("div",{className:`${c}-item-title-row`,children:[le&&r.jsx("p",{className:F,style:{width:Je,...B,...E},children:ze.title}),le&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:P.scalingValue(M??0,n),width:Oe}})]}):null,Te=Ce?r.jsxs("div",{className:`${c}-item-subtitle-row`,children:[xe&&r.jsx("p",{className:D,style:{width:Je,...Fe,...j},children:ze.subtitle}),xe&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:P.scalingValue(N??0,n),width:Oe}})]}):null,it=Pe?r.jsxs("a",{href:Pe,target:"_blank",className:`${c}-item-text-link`,children:[bt,Te]}):r.jsxs(r.Fragment,{children:[bt,Te]}),De=lp(ze.gallery),rt=De.filter(Be=>Be.lightboxMedia).map(Be=>Be.lightboxMedia),pt=r.jsx("div",{className:Ue,style:It,children:De.length===0?null:w==="off"?(()=>{const{displayMedia:Be,lightboxMedia:xt}=De[0],Ct=xt?rt.findIndex(wt=>wt.url===xt.url):-1;return r.jsx(Aa,{media:Be,className:`${c}-item-${Ci(Be)?"video":"image"}`.trim(),style:$t,onMediaClick:an&&Ct>=0?wt=>Vt(wt,rt,Ct):void 0})})():r.jsxs(r.Fragment,{children:[Ft&&r.jsx("div",{className:`${c}-item-image-wrapper-sizer`,"aria-hidden":"true",children:De.map(({displayMedia:Be})=>Ci(Be)?r.jsx("video",{src:Be.url,muted:!0,playsInline:!0},`sizer-${Be.url}`):r.jsx("img",{src:Be.url,alt:""},`sizer-${Be.url}`))}),r.jsx(Ur,{className:`${c}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:$*1e3,width:"100%",height:"100%",speed:np,type:z==="fade"?"fade":"loop",rewind:z==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:z==="fade"?"ltr":S!=="random"?S==="horizontal"?"ltr":"ttb":At},onMoved:Be=>{if(S!=="random"||z==="fade")return;const xt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Ze(xt),setTimeout(()=>{Be.refresh()},0)},children:De.map(({displayMedia:Be,lightboxMedia:xt},Ct)=>{const wt=xt?rt.findIndex(Dt=>Dt.url===xt.url):-1;return r.jsx(Xr,{children:r.jsx(Aa,{media:Be,className:`${c}-item-${Ci(Be)?"video":"image"}`.trim(),style:$t,onMediaClick:an&&wt>=0?Dt=>Vt(Dt,rt,wt):void 0})},Ct)})},`${z}-${Ge}-${S}-${$}-${Mt}-${u}`)]})}),kt=Ce?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&le?"titleMarginTop":void 0,className:o&&le?`${c}-control`:void 0,style:{height:le?P.scalingValue(M??0,n):0,width:Oe}}),r.jsx("p",{className:F,style:{width:Je,...B,...E},children:ze.title}),r.jsx("div",{"data-controls":o&&xe?"subtitleMarginTop":void 0,className:o&&xe?`${c}-control`:void 0,style:{height:xe?P.scalingValue(N??0,n):0,width:Oe}}),r.jsx("p",{className:D,style:{width:Je,...Fe,...j},children:ze.subtitle})]});return r.jsx("div",{className:`${c}-item`.trim(),children:r.jsx("div",{className:`${o?`${c}-item-inner`:`${c}-item-inner-hidden`}${qe&&Ne?` ${c}-item-inner-last-row`:""}`.trim(),style:{width:(R??0)>100?`calc(${P.scalingValue(Ge??0,n)} * (${R} / 100))`:P.scalingValue(Ge??0,n)},children:qe?r.jsxs(r.Fragment,{children:[it,r.jsx("a",{href:Pe,target:"_blank",className:`${c}-item-image-link`,children:pt})]}):r.jsxs("a",{href:Pe,target:"_blank",className:`${c}-item-image-link`,children:[tt,pt,kt]})})},vt)})})}),(!n||i)&&et&&typeof document<"u"&&g==="on"&&Ni.createPortal(r.jsx("div",{style:yt,"data-selection":"none",children:r.jsx(pp,{items:ot,index:un,imageDisplay:mp(T),originRect:Wn,reverseClose:w==="off",onClose:()=>Xe(!1),onPrev:()=>rn(ze=>(ze-1+ot.length)%ot.length),onNext:()=>rn(ze=>(ze+1)%ot.length),counterClassName:G,counterStyle:_e})}),document.body)]})}const hp={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},fp=["hover","focus","filled","success","error"],yp=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3857
+ `}const zt=500,np=750,Qt="cubic-bezier(0.22, 1, 0.36, 1)",ip=72,op=50;function rp(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 ap(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function sp(e){const[t]=e.media;return t!=null&&t.url?t:null}function lp(e){return!Array.isArray(e)||e.length===0?[]:rp(e)?e.flatMap(t=>{const n=ap(t);if(!n)return[];const i=sp(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 Ci(e){return e.type==="video"}function cp(e){e.pause(),e.removeAttribute("src"),e.load()}function Aa({media:e,className:t,style:n,onMediaClick:i}){return Ci(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 ro(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function dp(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function up({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:a,onTransitionEnd:u}){return l.useEffect(()=>{const c=n.current;if(c)return()=>{cp(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:a,onTransitionEnd:u,style:i})}function pp({items:e,index:t,imageDisplay:n,originRect:i,reverseClose:o,onClose:s,onPrev:a,onNext:u,counterClassName:c,counterStyle:m}){const p=n==="cover",R=l.useRef(null),x=l.useRef(null),I=l.useRef(null),g=l.useRef(null),v=l.useRef(0),T=l.useRef(0),w=l.useRef("none"),$=l.useRef(!1),S=l.useRef(!1),O=l.useRef(!1),M=l.useRef(null),[H,L]=l.useState(null),[C,J]=l.useState(i?"opening":"open"),[y,k]=l.useState(!0),[_,D]=l.useState(0),[ne,me]=l.useState(0),[K,F]=l.useState(!1),[Q,Y]=l.useState(!1),[B,te]=l.useState(!1),de=l.useRef(t),re=e[t],W=re?Ci(re):!1,pe=ne!==0||K,h=l.useCallback(q=>{O.current=q,F(q)},[]),ae=l.useCallback(()=>{M.current!==null&&(window.clearTimeout(M.current),M.current=null)},[]),be=l.useCallback(()=>{ae(),M.current=window.setTimeout(()=>{ae(),h(!1)},zt+32)},[ae,h]),ye=l.useCallback(()=>{const q=x.current,E=I.current;if(!q)return;const z=q.getBoundingClientRect(),G=z.width,ee=z.height;if(!G||!ee)return;if(n==="cover"){L({width:G,height:ee,left:z.left,top:z.top});return}if(!E){L(ro(q));return}const{width:ie,height:he}=dp(E);if(!ie||!he){L(ro(q));return}const Se=ie/he,$e=G/ee;if(Se>$e){const fe=G/Se;L({width:G,height:fe,left:z.left,top:z.top+(ee-fe)/2})}else{const fe=ee*Se;L({width:fe,height:ee,left:z.left+(G-fe)/2,top:z.top})}},[n]);l.useEffect(()=>{ye();const q=x.current;if(!q)return;const E=new ResizeObserver(()=>ye());return E.observe(q),()=>E.disconnect()},[ye,t]),l.useEffect(()=>{C==="opening"&&H&&J("open")},[C,H]),l.useEffect(()=>{if(C!=="closing")return;const q=setTimeout(()=>s(),zt);return()=>clearTimeout(q)},[C,s]),l.useEffect(()=>()=>{ae()},[ae]),l.useLayoutEffect(()=>{if(de.current===t)return;ae(),k(!1),D(0),me(0),h(!1),te(!1),Y(!1),v.current=0,T.current=0,w.current="none",$.current=!1,g.current=null,S.current=!1;const q=x.current;q&&L(ro(q)),de.current=t},[t,h,ae]),l.useEffect(()=>{if(C!=="open")return;const q=()=>{const he=Se=>{Se.stopPropagation(),Se.preventDefault(),document.removeEventListener("click",he,!0)};document.addEventListener("click",he,!0)},E=he=>{ae(),O.current=!1,F(!1),me(0),Y(!1),$.current=!1,T.current=0,w.current="none",k(!1);const Se=x.current;Se&&L(ro(Se)),he<0?u():a()},z=he=>{if(Math.abs(he)>op&&e.length>1){E(he);return}h(!0),me(0),be()},G=he=>{if(he.touches.length!==1||O.current)return;const Se=he.touches[0];S.current=!0,g.current={x:Se.clientX,y:Se.clientY},w.current="none",T.current=0,$.current=!1},ee=he=>{if(!g.current||he.touches.length!==1||O.current)return;const Se=he.touches[0],$e=Se.clientX-g.current.x,fe=Se.clientY-g.current.y;if(w.current==="none"){if(Math.abs($e)<10&&Math.abs(fe)<10)return;if(Math.abs($e)>Math.abs(fe)){if(e.length<=1)return;w.current="horizontal"}else if(fe>0)w.current="vertical";else return}if(w.current==="horizontal"){$.current=!0,Y(!0),T.current=$e,me($e),he.preventDefault();return}w.current==="vertical"&&($.current=!0,Y(!0),v.current=fe,D(fe),he.preventDefault())},ie=()=>{if(!g.current)return;const he=w.current,Se=$.current;if(Se&&he==="horizontal")z(T.current),q();else if(Se&&he==="vertical"){if(v.current>ip){const fe=window.innerHeight;v.current=fe,te(!0),D(fe),J("closing")}else v.current=0,D(0);q()}else he==="horizontal"&&Math.abs(T.current)>0&&(z(T.current),q());g.current=null,w.current="none",T.current=0,$.current=!1,Y(!1)};return document.addEventListener("touchstart",G,{passive:!0}),document.addEventListener("touchmove",ee,{passive:!1}),document.addEventListener("touchend",ie),document.addEventListener("touchcancel",ie),()=>{document.removeEventListener("touchstart",G),document.removeEventListener("touchmove",ee),document.removeEventListener("touchend",ie),document.removeEventListener("touchcancel",ie)}},[C,e.length,u,a,h,be]),l.useEffect(()=>{const q=E=>{E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),C!=="closing"&&J("closing"))};return window.addEventListener("keydown",q,!0),()=>window.removeEventListener("keydown",q,!0)},[C]);const Ae=()=>{C!=="closing"&&J("closing")},Z=C==="open",ge=C==="closing",X=ge&&o&&!!i&&!B,U=_>0?Math.max(0,1-_/500):1,j=_>0?Math.max(.35,1-_/500):1,se=C==="opening"?i??H:X?i:H,Ee=q=>{if(q.stopPropagation(),S.current){S.current=!1;return}if(e.length<=1)return;const E=q.currentTarget.getBoundingClientRect(),z=q.clientY-E.top,G=Math.min(52,E.height*.2);if(!(z>E.height-G)){if(q.clientX-E.left<E.width/2){a();return}u()}},Fe=q=>{if(e.length<=1)return;const E=q.currentTarget.getBoundingClientRect(),z=q.clientX-E.left,G=q.clientY-E.top,ee=Math.min(52,E.height*.2);if(G>E.height-ee){q.currentTarget.style.cursor="default";return}q.currentTarget.style.cursor=z<E.width/2?"w-resize":"e-resize"},Re=l.useCallback(q=>{q.propertyName!=="transform"||!O.current||(ae(),h(!1))},[ae,h]),Ie=pe?`translateX(${ne}px)`:_>0?`translateY(${_}px)`:void 0,_e={position:"fixed",top:se==null?void 0:se.top,left:se==null?void 0:se.left,width:se==null?void 0:se.width,height:se==null?void 0:se.height,objectFit:n==="cover"?"cover":"contain",transform:Ie,opacity:_>0?j:ge&&!X?0:1,transition:Q&&!K?"none":K?`transform ${zt}ms ${Qt}`:B?`transform ${zt}ms ${Qt}, opacity ${zt}ms ${Qt}`:ge&&!X?`opacity ${zt}ms ${Qt}`:X||y?`top ${zt}ms ${Qt}, left ${zt}ms ${Qt}, width ${zt}ms ${Qt}, height ${zt}ms ${Qt}`:"none",pointerEvents:W&&Z&&!pe?"auto":"none",touchAction:W&&Z?"none":void 0,zIndex:9998},N=H?{position:"fixed",top:H.top,height:H.height,width:H.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:R,style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997,touchAction:C==="open"?"none":void 0},onClick:Ae,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:Z?U:0,transition:Q?"none":`opacity ${zt}ms ${Qt}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:x,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Z?1:0,transition:`opacity ${zt}ms ${Qt}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:c,style:m,children:[t+1," / ",e.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:x,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Z?1:0,transition:`opacity ${zt}ms ${Qt}`},children:e.length>1&&r.jsxs("p",{className:c,style:m,children:[t+1," / ",e.length]})})]})}),se&&re&&(W?r.jsx(up,{src:re.url,phase:C,mediaRef:I,mediaStyle:_e,onLoadedMetadata:ye,onClick:Ee,onMouseMove:Fe,onTransitionEnd:Re},`${t}-${re.url}`):r.jsx("img",{ref:I,src:re.url,alt:re.name,onLoad:ye,onTransitionEnd:Re,style:_e},`${t}-${re.url}`)),Z&&N&&e.length>1&&!W&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...N,left:H.left,cursor:"w-resize",pointerEvents:pe?"none":"auto"},onClick:q=>{if(S.current){S.current=!1;return}q.stopPropagation(),a()}}),r.jsx("div",{style:{...N,left:H.left+H.width/2,cursor:"e-resize",pointerEvents:pe?"none":"auto"},onClick:q=>{if(S.current){S.current=!1;return}q.stopPropagation(),u()}})]})]})}function mp(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function gp({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:a,layoutId:u}){const{prefix:c}=P.useScopedStyles(),{type:m="a",gridLayout:p,textBoxWidth:R=100,verticalGap:x,entriesCount:I,lightbox:g,imageDisplay:v,lightboxImageDisplay:T,slider:w,sliderTiming:$,direction:S,transition:O,titleMarginTop:M,subtitleMarginTop:H,titleColor:L,subtitleColor:C,lightboxCounterColor:J,titleFontFamily:y,titleFontSettings:k,titleFontSize:_,titleLineHeight:D,titleLetterSpacing:ne,titleWordSpacing:me,titleTextAppearance:K,subtitleFontFamily:F,subtitleFontSettings:Q,subtitleFontSize:Y,subtitleLineHeight:B,subtitleLetterSpacing:te,subtitleWordSpacing:de,subtitleTextAppearance:re,lightboxCounterFontFamily:W,lightboxCounterFontSettings:pe,lightboxCounterFontSize:h,lightboxCounterLineHeight:ae,lightboxCounterLetterSpacing:be,lightboxCounterWordSpacing:ye,lightboxCounterTextAppearance:Ae,showText:Z="always",alignEntries:ge="off"}=e,X={fontSettings:{fontFamily:y,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:_??.01,lineHeight:D,letterSpacing:ne??0,wordSpacing:me??0,textAppearance:K,color:L},j={...Ut(Rt(X,n))},se={fontSettings:{fontFamily:F,fontWeight:(Q==null?void 0:Q.fontWeight)??400,fontStyle:(Q==null?void 0:Q.fontStyle)??"normal"},fontSize:Y??.01,lineHeight:B,letterSpacing:te??0,wordSpacing:de??0,textAppearance:re,color:C},Fe={...Ut(Rt(se,n))},Re={fontSettings:{fontFamily:W,fontWeight:(pe==null?void 0:pe.fontWeight)??400,fontStyle:(pe==null?void 0:pe.fontStyle)??"normal"},fontSize:h??.01,lineHeight:ae,letterSpacing:be??0,wordSpacing:ye??0,textAppearance:Ae,color:J},_e={...Ut(Rt(Re,n)),...sr(h,ae,c,n)},N=ar(_,D,`${c}-item-title`,`${c}-text-tight-leading`),q=ar(Y,B,`${c}-item-subtitle`,`${c}-text-tight-leading`),E=sr(_,D,c,n),z=sr(Y,B,c,n),G=ar(h,ae,`${c}-lightbox-counter`,`${c}-text-tight-leading`),ee=P.buildColorVars(c,{titleColor:L,subtitleColor:C,lightboxCounterColor:J},hp,fp),Se=`${a&&a!=="default"?`${c}-state-${a}`:""}${Z==="on hover"&&(!n||i)?` ${c}-show-text-hover`:""}`.trim(),$e=I===0?1/0:I,fe=(t??[]).slice(0,$e),Ge=p.entryWidth??.2,ue=(v==null?void 0:v.display)==="cover",Me=(v==null?void 0:v.ratioValue)??"1:1",ze=(v==null?void 0:v.reversed)??!1,[De,at]=Me.split(":").map(Number),mt=`${ze?at:De} / ${ze?De:at}`,ft=P.scalingValue(Ge??0,n),Ft=!ue&&w!=="off",It={width:ft,...ue?{aspectRatio:mt,height:"auto",overflow:"hidden"}:{height:"auto"}},Ue=`${c}-item-image-wrapper${Ft?` ${c}-item-image-wrapper-fit-slider`:""}`.trim(),Te=m==="c",qe=Te&&ge==="on",Je=`calc(${P.scalingValue(Ge??0,n)} * (${R} / 100))`,Oe=P.scalingValue(Ge*R/100,n),$t=ue?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[At,Ze]=l.useState("ltr"),[Mt,Ht]=l.useState(0),We=l.useRef(null);l.useEffect(()=>{const Ve=We.current;if(!Ve)return;const vt=new ResizeObserver(le=>{Ht(Math.round(le[0].contentRect.width))});return vt.observe(Ve),()=>vt.disconnect()},[]);const yt=(()=>{const Ve={...ee},vt=We.current?getComputedStyle(We.current).getPropertyValue("--cntrl-article-width").trim():"";return vt&&(Ve["--cntrl-article-width"]=vt),Ve})(),[et,Xe]=l.useState(!1),[ot,pt]=l.useState([]),[un,rn]=l.useState(0),[Wn,nt]=l.useState(null),an=g==="on"&&(!n||i),Vt=(Ve,vt,le)=>{if(n&&!i||g==="off")return;const we=Ve.currentTarget.getBoundingClientRect();nt({top:we.top,left:we.left,width:we.width,height:we.height}),pt(vt),rn(le),Xe(!0)};l.useEffect(()=>{if(!et||g!=="on"||typeof document>"u")return;const Ve=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ve}},[et,g]),l.useEffect(()=>{!n||i||(Xe(!1),nt(null))},[n,i]);const jt=l.useMemo(()=>tp(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:jt}}),r.jsx("div",{style:ee,children:r.jsx("div",{ref:We,className:`${c}-wrapper ${c}-type-${m}${qe?` ${c}-align-entries`:""} ${Se}`.trim(),style:{gridTemplateColumns:`repeat(${p.columnsCount}, minmax(0, 1fr))`,rowGap:qe?0:P.scalingValue(x??0,n),columnGap:P.scalingValue(p.horizontalGap??0,n),width:P.scalingValue(p.wrapperWidth??0,n),...qe?{[`--${c}-align-entries-row-gap`]:P.scalingValue(x??0,n)}:{}},children:fe.map((Ve,vt)=>{var St;const le=Ra(Ve.title),we=Ra(Ve.subtitle),Pe=(((St=Ve.link)==null?void 0:St.length)??0)>0&&g==="off"?Ve.link:void 0,Ne=Math.floor(vt/p.columnsCount)===Math.ceil(fe.length/p.columnsCount)-1,tt=Te?r.jsxs("div",{className:`${c}-item-text-block`,children:[le&&r.jsx("p",{className:N,style:{width:Je,...j,...E},children:Ve.title}),le&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:P.scalingValue(M??0,n),width:Oe}}),we&&r.jsx("p",{className:q,style:{width:Je,...Fe,...z},children:Ve.subtitle}),we&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:P.scalingValue(H??0,n),width:Oe}})]}):null,bt=Te?r.jsxs("div",{className:`${c}-item-title-row`,children:[le&&r.jsx("p",{className:N,style:{width:Je,...j,...E},children:Ve.title}),le&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:P.scalingValue(M??0,n),width:Oe}})]}):null,Ce=Te?r.jsxs("div",{className:`${c}-item-subtitle-row`,children:[we&&r.jsx("p",{className:q,style:{width:Je,...Fe,...z},children:Ve.subtitle}),we&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:P.scalingValue(H??0,n),width:Oe}})]}):null,it=Pe?r.jsxs("a",{href:Pe,target:"_blank",className:`${c}-item-text-link`,children:[bt,Ce]}):r.jsxs(r.Fragment,{children:[bt,Ce]}),Be=lp(Ve.gallery),rt=Be.filter(je=>je.lightboxMedia).map(je=>je.lightboxMedia),st=r.jsx("div",{className:Ue,style:It,children:Be.length===0?null:w==="off"?(()=>{const{displayMedia:je,lightboxMedia:xt}=Be[0],Ct=xt?rt.findIndex(wt=>wt.url===xt.url):-1;return r.jsx(Aa,{media:je,className:`${c}-item-${Ci(je)?"video":"image"}`.trim(),style:$t,onMediaClick:an&&Ct>=0?wt=>Vt(wt,rt,Ct):void 0})})():r.jsxs(r.Fragment,{children:[Ft&&r.jsx("div",{className:`${c}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Be.map(({displayMedia:je})=>Ci(je)?r.jsx("video",{src:je.url,muted:!0,playsInline:!0},`sizer-${je.url}`):r.jsx("img",{src:je.url,alt:""},`sizer-${je.url}`))}),r.jsx(Ur,{className:`${c}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:$*1e3,width:"100%",height:"100%",speed:np,type:O==="fade"?"fade":"loop",rewind:O==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:O==="fade"?"ltr":S!=="random"?S==="horizontal"?"ltr":"ttb":At},onMoved:je=>{if(S!=="random"||O==="fade")return;const xt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Ze(xt),setTimeout(()=>{je.refresh()},0)},children:Be.map(({displayMedia:je,lightboxMedia:xt},Ct)=>{const wt=xt?rt.findIndex(Dt=>Dt.url===xt.url):-1;return r.jsx(Xr,{children:r.jsx(Aa,{media:je,className:`${c}-item-${Ci(je)?"video":"image"}`.trim(),style:$t,onMediaClick:an&&wt>=0?Dt=>Vt(Dt,rt,wt):void 0})},Ct)})},`${O}-${Ge}-${S}-${$}-${Mt}-${u}`)]})}),kt=Te?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&le?"titleMarginTop":void 0,className:o&&le?`${c}-control`:void 0,style:{height:le?P.scalingValue(M??0,n):0,width:Oe}}),r.jsx("p",{className:N,style:{width:Je,...j,...E},children:Ve.title}),r.jsx("div",{"data-controls":o&&we?"subtitleMarginTop":void 0,className:o&&we?`${c}-control`:void 0,style:{height:we?P.scalingValue(H??0,n):0,width:Oe}}),r.jsx("p",{className:q,style:{width:Je,...Fe,...z},children:Ve.subtitle})]});return r.jsx("div",{className:`${c}-item`.trim(),children:r.jsx("div",{className:`${o?`${c}-item-inner`:`${c}-item-inner-hidden`}${qe&&Ne?` ${c}-item-inner-last-row`:""}`.trim(),style:{width:(R??0)>100?`calc(${P.scalingValue(Ge??0,n)} * (${R} / 100))`:P.scalingValue(Ge??0,n)},children:qe?r.jsxs(r.Fragment,{children:[it,r.jsx("a",{href:Pe,target:"_blank",className:`${c}-item-image-link`,children:st})]}):r.jsxs("a",{href:Pe,target:"_blank",className:`${c}-item-image-link`,children:[tt,st,kt]})})},vt)})})}),(!n||i)&&et&&typeof document<"u"&&g==="on"&&Ni.createPortal(r.jsx("div",{style:yt,"data-selection":"none",children:r.jsx(pp,{items:ot,index:un,imageDisplay:mp(T),originRect:Wn,reverseClose:w==="off",onClose:()=>Xe(!1),onPrev:()=>rn(Ve=>(Ve-1+ot.length)%ot.length),onNext:()=>rn(Ve=>(Ve+1)%ot.length),counterClassName:G,counterStyle:_e})}),document.body)]})}const hp={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},fp=["hover","focus","filled","success","error"],yp=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3849
3858
  import '@splidejs/react-splide/css/core';
3850
3859
  import { CommonComponentProps } from '../props';
3851
3860
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
@@ -5459,11 +5468,11 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
5459
5468
  };
5460
5469
 
5461
5470
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
5462
- `,sr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},vp=["titleColor","subtitleColor","lightboxCounterColor"],bp={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...sr.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:{...sr.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:{...sr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"a",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignEntries.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.alignEntries.display.visible",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap","showText"]},{type:"row",title:"",items:["alignEntries"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...vp],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},xp={element:gp,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},schema:bp,sourceCode:yp},Ma=12;function wp(e,t="50%"){const n={position:"absolute",width:Ma,height:Ma,pointerEvents:"none"};return e==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:e==="center-x"?{...n,left:"50%",top:t,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function _t({className:e,areaStyle:t,hitPlacement:n,centerXHitTop:i,...o}){return r.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...o,children:r.jsx("div",{style:wp(n,i)})})}function Sp(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 $p({media:e,className:t,style:n}){const i=l.useRef(null);return l.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const s=o.play();s&&s.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function xo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cp(e){return String(e??"").trim().length>0}function ka(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 _a(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 Wa(e,t,n,i,o,s,a){const u=P.scalingValue(s,a),c=P.scalingValue(0,a),m=e===0,p=e===t-1&&!o;return{borderTopWidth:m&&n?u:c,borderBottomWidth:!p||i?u:c}}function Tp(e,t,n){const i=P.scalingValue(t,n),o=P.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Fa=10;function Lp(e){return`
5471
+ `,lr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},vp=["titleColor","subtitleColor","lightboxCounterColor"],bp={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...lr.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:{...lr.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:{...lr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"a",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignEntries.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.alignEntries.display.visible",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap","showText"]},{type:"row",title:"",items:["alignEntries"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...vp],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},xp={element:gp,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},schema:bp,sourceCode:yp},Ma=12;function wp(e,t="50%"){const n={position:"absolute",width:Ma,height:Ma,pointerEvents:"none"};return e==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:e==="center-x"?{...n,left:"50%",top:t,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function _t({className:e,areaStyle:t,hitPlacement:n,centerXHitTop:i,...o}){return r.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...o,children:r.jsx("div",{style:wp(n,i)})})}function Sp(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 $p({media:e,className:t,style:n}){const i=l.useRef(null);return l.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const s=o.play();s&&s.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function wo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cp(e){return String(e??"").trim().length>0}function ka(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 _a(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 Wa(e,t,n,i,o,s,a){const u=P.scalingValue(s,a),c=P.scalingValue(0,a),m=e===0,p=e===t-1&&!o;return{borderTopWidth:m&&n?u:c,borderBottomWidth:!p||i?u:c}}function Tp(e,t,n){const i=P.scalingValue(t,n),o=P.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Fa=10;function Lp(e){return`
5463
5472
  .${e}-wrapper {
5464
5473
  display: grid;
5465
5474
  align-items: start;
5466
- min-height: ${xo(48)};
5475
+ min-height: ${wo(48)};
5467
5476
  position: relative;
5468
5477
  overflow: visible;
5469
5478
  box-sizing: border-box;
@@ -5585,7 +5594,7 @@ a.${e}-list-item {
5585
5594
  flex-shrink: 0;
5586
5595
  overflow: visible;
5587
5596
  box-sizing: border-box;
5588
- min-width: ${xo(50)};
5597
+ min-width: ${wo(50)};
5589
5598
  position: relative;
5590
5599
  display: flex;
5591
5600
  align-items: flex-start;
@@ -5593,7 +5602,7 @@ a.${e}-list-item {
5593
5602
 
5594
5603
  .${e}-list-col-last {
5595
5604
  flex: 1 1 auto;
5596
- min-width: ${xo(50)};
5605
+ min-width: ${wo(50)};
5597
5606
  }
5598
5607
 
5599
5608
  .${e}-list-col-title {
@@ -5890,7 +5899,7 @@ a.${e}-list-item {
5890
5899
  overflow-wrap: anywhere;
5891
5900
  word-break: break-word;
5892
5901
  }
5893
- `}const An=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Yr=["AColumn","BColumn","CColumn","DColumn","EColumn"],bn="cutLabel",Jr=[...Yr,bn],Vo=["A","B","C","D","E"];function Ds(e){return`${e}ColumnVerticalAlign`}const Tr=["Top","Center","Bottom"];function Zr(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Vo.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Ep(e){const t=Zr(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Ip(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Vo.includes(n)?n:null}function qs(e,t,n){const i=Ip(e);return i?i===t?!1:Ep(n[Ds(i)]):!0}function _i(e){const t=Zr(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Vo.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Pp(e,t,n){if(Ks(e,t,n))return _i(e);const i=_i(e);return i.kind==="baseline"?{kind:"top"}:i}function Rp(e){const t=_i(e);return t.kind==="baseline"?{kind:"top"}:t}function Ks(e,t,n){return qs(e,n,t)?_i(e).kind==="baseline":!1}function Ap(e){const t={};let n=!1;for(const i of Vo){const o=Ds(i),s=e[o];if(e.type==="b"){const a=String(s??"Top").trim();a!=="Top"&&a!=="Center"&&a!=="Bottom"&&(t[o]="Top",n=!0);continue}qs(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function Mp(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function kp(e){const t=_i(e).kind;return t==="baseline"?"center":t}function _p(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Na(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Wp(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 lr(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const a=Wp(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+a;const u=s.getBoundingClientRect(),c=o.getBoundingClientRect().height;let m=0;return e.kind==="center"?m=(u.height-c)/2:e.kind==="bottom"&&(m=u.height-c),u.top-t+m+a}function Fp(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 Np(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Hp={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Qe(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Op={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Bp(e){return[Qe(e,"textFontFamily"),Qe(e,"textFontSettings"),{type:"row",items:[Qe(e,"textFontSize"),Qe(e,"textLineHeight"),Qe(e,"textLetterSpacing"),Qe(e,"textWordSpacing")]},Qe(e,"textTextAlign"),Qe(e,"textTextAppearance"),`${e}VerticalAlign`]}function jp(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Jr.map(e=>[Op[e],Bp(e)]))}}function Po(e,t){const n=i=>{const o=Qe(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===bn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Ha(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 Ut(Rt(n,t))}function Oa(e,t,n,i){const o=Po(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a!==void 0&&a<s?`${n} ${i}`:n}function Ba(e,t,n,i){const o=Po(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a===void 0||a>=s?{}:{[`--${n}-title-leading-gap`]:P.scalingValue((s-a)/2,i)}}const Xt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],pi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],mi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],gi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],zp={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Vp=["hover","focus","filled","success","error"],ja=.004,oi=.004,cr=oi,Qr=50,Wi=1440,Fi=Qr/Wi;function Gs(e){const t=typeof e=="number"&&e>0?e:Wi;return Qr/t}function Dp(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 Wi}const Us={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Ti(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function qp(e,t=1){const n=t/e;return Object.fromEntries(Xt.map(i=>[i,n]))}function Kp(){return Object.fromEntries([...pi.map(e=>[e,0]),...mi.map(e=>[e,0])])}function Gp(){return Object.fromEntries(gi.map(e=>[e,0]))}function ao(e){return Object.fromEntries(Xt.map(t=>[t,typeof e[t]=="number"?e[t]:Us[t]]))}function Xs(e,t,n){const i=e-Fi,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 wo(e,t,n){const i=ea(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,a)=>s+a,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Up(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=pi[o],a=mi[o],u=typeof n[s]=="number"?n[s]:0,c=typeof n[a]=="number"?n[a]:0,m=Xs(t[o]??0,u,c);m.paddingLeft!==u&&(i[s]=m.paddingLeft),m.paddingRight!==c&&(i[a]=m.paddingRight)}return i}function ea(e,t,n){if(e<=0)return[];const i=Xt.slice(0,e).map(m=>n[m]);if(e===1)return i;const o=i.slice(0,e-1),a=o.reduce((m,p)=>m+p,0)+Fi;if(t>=a)return i;const u=[...o];let c=a-t;for(let m=u.length-1;m>=0&&c>0;m-=1){const p=u[m]-Fi;if(p<=0)continue;const R=Math.min(c,p);u[m]-=R,c-=R}return[...u,i[e-1]]}function Xp(e,t,n){if(e<=1)return{};const i=ea(e,t,n),o={};for(let s=0;s<e-1;s+=1){const a=Xt[s];i[s]!==n[a]&&(o[a]=i[s])}return o}function za(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...An]}function Yp(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Jp(e,t,n,i){const o=Math.min(i,e.length,Xt.length),s={};for(let a=0;a<o;a+=1){const u=e[a],c=t.indexOf(u);if(c===-1)continue;const m=Xt[c],p=pi[c],R=mi[c],b=gi[c],I=Xt[a],g=pi[a],v=mi[a],T=gi[a],w=n[m],$=n[p],S=n[R],z=n[b];typeof w=="number"&&(s[I]=w),typeof $=="number"&&(s[g]=$),typeof S=="number"&&(s[v]=S),typeof z=="number"&&(s[T]=z)}return s}function Ys(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 Zp(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Ti(e),s=e.type==="b"||e.type===void 0&&t.type==="b",a={...e,...qp(n,o),...Kp()};if(s)for(const u of gi)typeof t[u]=="number"&&(a[u]=t[u]);else Object.assign(a,Gp());return Ys(e,a)?a:e}function Qp(e,t,n){const i=Ap(e);i&&(e={...e,...i});const o=Gs(n==null?void 0:n.designWidth),s=e.columns,a=t.columns,u=Ti(e),c=Ti(t),m=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof s=="number"?s:typeof a=="number"?a:An.length,R=S=>{if(m)return S;const z=ao({...t,...S}),M=Ti(S),N=wo(p,M,z),L=Up(p,N,{...t,...S});return Object.keys(L).length===0?S:{...S,...L}};if(typeof s=="number"&&s!==a)return e;const b=za(e),I=za(t);if(!Yp(b,I))return R({...e,...Jp(b,I,t,p)});if(u<c&&typeof p=="number"&&!m){const S=ao({...t,...e});return R({...e,...Xp(p,u,S)})}if(m){const S=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,z=Math.max(0,(u-o)/2);return S>z?{...e,textPaddingLR:z}:e}const g=ao({...t,...e}),v=wo(p,c,ao(t)),w=wo(p,u,g).some((S,z)=>S<(v[z]??S)),$=Xt.some(S=>{const z=e[S],M=t[S];return typeof z=="number"&&typeof M=="number"&&z!==M});return w||$?R(e):e}function em(e,t,n,i){const o=t.slice(0,e).reduce((a,u)=>a+u,0),s=n.slice(e+1,t.length-1).reduce((a,u)=>a+u,0);return Math.max(Fi,i-o-s-Fi)}function tm(e,t){return Math.random()*(t-e)+e}function nm(e){return Object.fromEntries(Xt.map(t=>[t,typeof e[t]=="number"?e[t]:Us[t]]))}function dr(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function im(e,t,n,i,o,s){return e.slice(0,t).map((a,u)=>{const c=pi[u],m=mi[u],p=gi[u];return{key:a,textPrefix:Hp[a],widthKey:Xt[u],width:n[Xt[u]],paddingLeftKey:c,paddingRightKey:m,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[m],paddingBottom:s[p]}})}function om({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:a,onUpdateSettings:u}){const{prefix:c}=P.useScopedStyles(),m=!!o,{columns:p,type:R,wrapperWidth:b,entriesCount:I,cellMinHeight:g,dividerWidth:v,showVisibility:T,cut:w,showCut:$,cutCellMinHeight:S,cutLabel:z,imageSize:M,imageOnHover:N,entryHoverEffect:L,entryHoverShowOption:C,rowPaddingTop:J,rowPaddingBottom:y,rowPaddingTopB:k,columnsOrder:_,textPaddingLR:V,textColor:ne,backgroundColor:me,dividerColor:K,textHoverColor:H,backgroundHoverColor:Q,dividerHoverColor:Y}=e,[O,te]=l.useState(void 0),[ce,oe]=l.useState(null),W=N==="on"&&(!n||i),ue=(w??0)>0,h=R==="b",ae=l.useRef(null),be=l.useRef(null),[ye,Ae]=l.useState(null),[Z,ge]=l.useState(Wi),U=Gs(Z),X=Math.max(0,((b??0)-U)/2),B=Math.min(V??0,X),se=Math.max(B,oi),Ee=((b??0)+U)/2;l.useLayoutEffect(()=>{if(!n){ge(Wi);return}const le=()=>{ge(Dp(ae.current))};le();const xe=ae.current;if(!xe)return;const Pe=new ResizeObserver(le);Pe.observe(xe);let Ne=xe;for(;Ne&&!Ne.style.getPropertyValue("--cntrl-article-width");)Ne=Ne.parentElement;return Ne&&Pe.observe(Ne),()=>Pe.disconnect()},[n,a]),l.useEffect(()=>{te(void 0)},[w,$,t,I]),l.useEffect(()=>{n&&!i&&te(void 0)},[n,i]);const Fe=P.buildColorVars(c,{textColor:ne,backgroundColor:me,dividerColor:K,textHoverColor:H,backgroundHoverColor:Q,dividerHoverColor:Y},zp,Vp),Re=s&&s!=="default"?`${c}-state-${s}`:"",_e=`${!n||i?L==="default"?`${c}-entry-hover-default`:L==="blinds"?`${c}-entry-hover-blinds`:L==="reveal"?`${c}-entry-hover-reveal`:"":""} ${Re}`.trim(),F=L==="reveal"&&(!n||i),D=(T==null?void 0:T[0])??!1,E=(T==null?void 0:T[1])??!1,j=l.useRef(e),G=l.useRef(a);l.useEffect(()=>{if(!u||!n){j.current=e,G.current=a;return}if(G.current!==a){j.current=e,G.current=a;return}const le=j.current;if(!(le!==e))return;if(typeof le.columns=="number"&&typeof e.columns=="number"&&le.columns!==e.columns){j.current=e;return}const Pe=Qp(e,le,{designWidth:Z});j.current=e,Ys(e,Pe)&&u(Pe)},[e,u,n,a,Z]);const ee=l.useMemo(()=>nm(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ie=l.useMemo(()=>dr(e,pi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),he=l.useMemo(()=>dr(e,mi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Se=l.useMemo(()=>dr(e,gi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),$e=l.useMemo(()=>Array.isArray(_)&&_.length>0?_:[...An],[_]),fe=l.useMemo(()=>im($e,p,ee,ie,he,Se),[$e,p,ee,ie,he,Se]),Ge=Ti(e),de=l.useMemo(()=>Xt.slice(0,p).map(le=>ee[le]),[p,ee]),Me=l.useMemo(()=>ea(p,Ge,ee),[p,Ge,ee]),je=l.useMemo(()=>wo(p,Ge,ee),[p,Ge,ee]),Ve=l.useMemo(()=>fe.map((le,xe)=>Xs(je[xe]??0,le.paddingLeft,le.paddingRight)),[fe,je]),at=l.useMemo(()=>{const le=I===0?1/0:I;return(t??[]).slice(0,le).map((Pe,Ne)=>({id:Ne,cells:Object.fromEntries(An.map(tt=>[tt,Pe[tt]??""])),image:Pe.image,link:Pe.link}))},[t,I]),ht=ue?O??w:at.length,Et=l.useMemo(()=>ue?at.slice(0,ht):at,[at,ue,ht]),mt=ue&&ht<at.length,ft=Et.length>1||mt,Ft=[D?`${c}-divider-top`:"",E||ft?`${c}-divider-bottom`:""].filter(Boolean).join(" "),It=!n||i,Ue=()=>{if(!It)return;const le=O??w;if(!$){te(at.length);return}te(Math.min(le+$,at.length))},Ce=le=>P.scalingValue(le,n??!1),qe=h?k??0:J??0,Je=y??0,Oe=g??0,$t=qe+Oe/2,At=Math.max(Je,cr),Ze=Wa(0,Et.length,D,E,mt,v??0,n??!1).borderTopWidth,Mt=ye!=null?`${ye}px`:`calc(${Ze} + ${Ce($t)})`,Ht=h?"rowPaddingTopB":"rowPaddingTop",We=fe[0],yt=fe[fe.length-1],et=Ve[0],Xe=Ve[Ve.length-1],ot=We&&et?Math.max(et.paddingLeft,oi):0,ut=yt&&Xe?Math.max(Xe.paddingRight,oi):0,un=Ge,rn=le=>{const xe=ae.current;if(!xe)return{x:0,y:0};const Pe=xe.getBoundingClientRect();return{x:le.clientX-Pe.left+Fa,y:le.clientY-Pe.top+Fa}},Wn=(le,xe)=>{if(!W)return;const Pe=le.image;if(!(Pe!=null&&Pe.url)){oe(null);return}const{x:Ne,y:tt}=rn(xe),bt=(M==null?void 0:M.min)??80,Te=(M==null?void 0:M.max)??320,it=(ce==null?void 0:ce.rowId)===le.id?ce.widthPx:tm(bt,Te);oe({rowId:le.id,url:Pe.url,objectFit:"contain",isVideo:Sp(Pe),widthPx:it,x:Ne,y:tt})},nt=le=>{if(!W||!ce)return;const{x:xe,y:Pe}=rn(le);oe(Ne=>!Ne||Ne.x===xe&&Ne.y===Pe?Ne:{...Ne,x:xe,y:Pe})},an=()=>{oe(null)},Vt=le=>{F&&ka(le,c),W&&oe(null)},jt=le=>{F&&_a(le,c)};l.useLayoutEffect(()=>{if(!m||h){Ae(null);return}const le=be.current,xe=le==null?void 0:le.parentElement;if(!le||!xe){Ae(null);return}const Pe=()=>{const tt=le.querySelector("[data-list-row]");if(!tt){Ae(null);return}const bt=xe.getBoundingClientRect(),Te=tt.getBoundingClientRect();Ae(Te.top-bt.top+Te.height/2)};Pe();const Ne=new ResizeObserver(Pe);return Ne.observe(le),Ne.observe(xe),()=>Ne.disconnect()},[m,h,Et,qe,Je,Oe,t,e,fe,je,Z,v,D,E,mt]);const ze=l.useMemo(()=>!h&&Yr.some(le=>{const xe=le.charAt(0),Pe=e[`${le}VerticalAlign`];return Ks(Pe,e,xe)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);l.useLayoutEffect(()=>{var it;const le=ae.current;if(!le)return;const xe=()=>{le.querySelectorAll("[data-list-col]").forEach(De=>{De.style.transform="";const rt=De.querySelector(`.${c}-list-col`);rt&&(rt.style.minHeight="",rt.style.height="");const pt=De.querySelector(`.${c}-list-col-title`);pt&&(pt.style.transform="")})};if(h||!ze){xe();return}const Pe=()=>{const De=Array.from(le.querySelectorAll("[data-list-row]")),rt=`${c}-list-col`,pt=`${c}-baseline-probe`;De.forEach(kt=>{kt.querySelectorAll("[data-list-col]").forEach(St=>{St.style.transform="";const Be=St.querySelector(`.${rt}`);Be&&(Be.style.minHeight="",Be.style.height="");const xt=St.querySelector(`.${c}-list-col-title`);xt&&(xt.style.transform="")})}),De.forEach(kt=>{const St=Array.from(kt.querySelectorAll("[data-list-col]"));Fp(kt,St,rt)}),le.offsetHeight,De.forEach(kt=>{const St=Array.from(kt.querySelectorAll("[data-list-col]")),Be=kt.getBoundingClientRect().top,xt=new Map,Ct=St.map(dt=>{const Ot=dt.querySelector(`.${c}-list-col-title`),Wt={el:dt,titleEl:Ot,letter:dt.getAttribute("data-col-letter")??"",kind:dt.getAttribute("data-valign")??"top",anchor:dt.getAttribute("data-valign-anchor")};return xt.set(Wt.letter,Wt),Wt}),wt=new Map,Dt=(dt,Ot)=>{const Wt=wt.get(dt.letter);if(Wt!==void 0)return Wt;const pn=dt.anchor?xt.get(dt.anchor):void 0;if(dt.kind!=="baseline"||!pn||Ot.has(dt.letter)){const Xn=lr(dt,Be,rt,pt);return wt.set(dt.letter,Xn),Xn}Ot.add(dt.letter);const $n=Dt(pn,Ot);Ot.delete(dt.letter);const mn=lr(dt,Be,rt,pt),qt=$n-mn;Np(dt.titleEl,qt);const Cn=lr(dt,Be,rt,pt);return wt.set(dt.letter,Cn),Cn};Ct.forEach(dt=>Dt(dt,new Set))})};let Ne=null;const tt=()=>{Ne===null&&(Ne=requestAnimationFrame(()=>{Ne=null,Pe()}))};Pe();const bt=new ResizeObserver(()=>tt());bt.observe(le);let Te=!1;return typeof document<"u"&&((it=document.fonts)!=null&&it.ready)&&document.fonts.ready.then(()=>{Te||tt()}),()=>{Te=!0,Ne!==null&&(cancelAnimationFrame(Ne),Ne=null),bt.disconnect(),xe()}},[ze,h,e,t,Z,Et,je]);const vt=l.useMemo(()=>Lp(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:vt}}),r.jsx("div",{style:Fe,children:r.jsxs("div",{ref:ae,className:`${c}-wrapper ${_e}${Ft?` ${Ft}`:""}${h?` ${c}-type-b`:""}`.trim(),style:{width:P.scalingValue(b??0,n),...!h&&m?{[`--${c}-first-entry-handle-top`]:Mt}:{}},onMouseMove:W?nt:void 0,onMouseLeave:W?an:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[Et.map((le,xe)=>{var bt;const Pe=(((bt=le.link)==null?void 0:bt.length)??0)>0,Ne=Pe&&(!n||i)?"a":"div",tt=Wa(xe,Et.length,D,E,mt,v??0,n??!1);return r.jsxs(Ne,{ref:xe===0?Te=>{be.current=Te}:void 0,className:`${c}-list-item${Pe||C==="always"?` ${c}-list-item-has-link`:""}`,...Pe?{href:le.link,target:"_blank"}:{},style:tt,onMouseEnter:Te=>{F&&(Pe||C==="always")&&ka(Te,c),W&&Wn(le,Te)},onMouseLeave:Te=>{F&&(Pe||C==="always")&&_a(Te,c)},children:[qe>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ce(qe)}}),r.jsxs("div",{className:`${c}-list-cols-row${h?"":` ${c}-list-cols-row-h`}${m&&xe===0&&h?` ${c}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:Ce(Oe)},children:[fe.map((Te,it)=>{const De=it===fe.length-1,rt=Ve[it],pt=Te.paddingBottom,kt=Cp(le.cells[Te.key]),St=h&&kt&&pt>0,Be=h?{minHeight:Ce(Oe)}:{width:Ce(je[it])},xt=h?{paddingLeft:Ce(B),paddingRight:Ce(B)}:{paddingLeft:Ce(rt.paddingLeft),paddingRight:Ce(rt.paddingRight)},Ct=Te.textPrefix.charAt(0),wt=h?Rp(e[`${Te.textPrefix}VerticalAlign`]):Pp(e[`${Te.textPrefix}VerticalAlign`],e,Ct),Dt=h&&kt&&m&&xe===0;return r.jsxs("div",{className:h?`${c}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":Ct,"data-valign":wt.kind,...wt.kind==="baseline"?{"data-valign-anchor":wt.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${De?` ${c}-list-col-last`:""}`,style:{...xt,...Be,...h?{justifyContent:Na(wt.kind)}:{}},"data-test":Te.width,children:r.jsx("span",{className:Oa(e,Te.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...Ha(Po(e,Te.textPrefix),n),...Ba(e,Te.textPrefix,c,n),...h?{}:Mp(wt.kind)},children:le.cells[Te.key]??null})}),St&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ce(pt)}}),Dt&&r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Te.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Ce(Math.max(pt,cr))}})]},Te.key)}),m&&xe===0&&h&&r.jsxs(r.Fragment,{children:[r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ee),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:Ce(se),height:"100%"}}),r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ee),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:Ce(Math.max(se,Ge-se)),width:Ce(se),height:"100%"}})]})]}),!h&&Je>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ce(Je)}}),m&&xe===0&&!h&&r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Ce(At)}})]},le.id)}),m&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ht,"data-controls-static-handle":"",...h?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:h?"center":"left-y",areaStyle:{position:"absolute",top:Ze,left:0,width:"100%",height:Ce(Math.max(qe,cr))}})},"row-padding-handles"),m&&!h&&We&&yt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":We.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(je[0]-((et==null?void 0:et.paddingRight)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:Ce(ot),height:"100%"}}),r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":yt.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(je[fe.length-1]-((Xe==null?void 0:Xe.paddingLeft)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ce(un-ut),width:Ce(ut),height:"100%"}})]},"column-edge-padding-handles"),m&&!h&&fe.slice(0,-1).map((le,xe)=>{const Pe=fe[xe+1],Ne=Me.slice(0,xe+1).reduce((De,rt)=>De+rt,0),tt=Ve[xe],bt=Ve[xe+1],Te=Math.max(tt.paddingRight,oi),it=Math.max(bt.paddingLeft,oi);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":le.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(je[xe]-tt.paddingLeft),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ce(Ne-Te),width:Ce(Te),height:"100%"}}),r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Pe.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(je[xe+1]-bt.paddingRight),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ce(Ne),width:Ce(it),height:"100%"}})]},`${le.paddingRightKey}-padding`)}),m&&!h&&fe.slice(0,-1).map((le,xe)=>{const Pe=em(xe,Me,de,Ge),tt=Me.slice(0,xe+1).reduce((bt,Te)=>bt+Te,0)-ja/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":le.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(Qr),"data-controls-max-fraction":String(Pe),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ce(tt),width:Ce(ja),height:"calc(100%)",pointerEvents:"auto"}})},`${le.widthKey}-junction`)})]}),mt&&(()=>{const le=Po(e,bn),xe=kp(e.cutLabelVerticalAlign),Pe=le.textTextAlign==="justify"||h;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ce(S??0),cursor:It?"pointer":"default",...Tp(E,v??0,n??!1)},onClick:It?Ue:void 0,onMouseEnter:F||W?Vt:void 0,onMouseLeave:F?jt:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...h?{paddingLeft:Ce(B),paddingRight:Ce(B)}:{},justifyContent:_p(le.textTextAlign),alignItems:Na(xe)},children:r.jsx("span",{className:Oa(e,bn,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...Ha(le,n),...Ba(e,bn,c,n),...Pe?{width:"100%"}:{}},children:z})})})})(),W&&ce&&(()=>{const le=xo(ce.widthPx),xe={width:le,height:"auto",maxHeight:le,objectFit:"contain",left:ce.x,top:ce.y,position:"absolute"};return r.jsx($p,{media:ce,className:ce.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:xe},`${ce.rowId}-${ce.url}`)})()]})})]})}const rm=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
5902
+ `}const An=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Yr=["AColumn","BColumn","CColumn","DColumn","EColumn"],bn="cutLabel",Jr=[...Yr,bn],Do=["A","B","C","D","E"];function Ds(e){return`${e}ColumnVerticalAlign`}const Tr=["Top","Center","Bottom"];function Zr(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Do.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Ep(e){const t=Zr(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Ip(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Do.includes(n)?n:null}function qs(e,t,n){const i=Ip(e);return i?i===t?!1:Ep(n[Ds(i)]):!0}function _i(e){const t=Zr(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Do.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Pp(e,t,n){if(Ks(e,t,n))return _i(e);const i=_i(e);return i.kind==="baseline"?{kind:"top"}:i}function Rp(e){const t=_i(e);return t.kind==="baseline"?{kind:"top"}:t}function Ks(e,t,n){return qs(e,n,t)?_i(e).kind==="baseline":!1}function Ap(e){const t={};let n=!1;for(const i of Do){const o=Ds(i),s=e[o];if(e.type==="b"){const a=String(s??"Top").trim();a!=="Top"&&a!=="Center"&&a!=="Bottom"&&(t[o]="Top",n=!0);continue}qs(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function Mp(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function kp(e){const t=_i(e).kind;return t==="baseline"?"center":t}function _p(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Na(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Wp(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 cr(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const a=Wp(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+a;const u=s.getBoundingClientRect(),c=o.getBoundingClientRect().height;let m=0;return e.kind==="center"?m=(u.height-c)/2:e.kind==="bottom"&&(m=u.height-c),u.top-t+m+a}function Fp(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 Np(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Hp={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Qe(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Op={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Bp(e){return[Qe(e,"textFontFamily"),Qe(e,"textFontSettings"),{type:"row",items:[Qe(e,"textFontSize"),Qe(e,"textLineHeight"),Qe(e,"textLetterSpacing"),Qe(e,"textWordSpacing")]},Qe(e,"textTextAlign"),Qe(e,"textTextAppearance"),`${e}VerticalAlign`]}function jp(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Jr.map(e=>[Op[e],Bp(e)]))}}function Ro(e,t){const n=i=>{const o=Qe(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===bn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Ha(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 Ut(Rt(n,t))}function Oa(e,t,n,i){const o=Ro(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a!==void 0&&a<s?`${n} ${i}`:n}function Ba(e,t,n,i){const o=Ro(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a===void 0||a>=s?{}:{[`--${n}-title-leading-gap`]:P.scalingValue((s-a)/2,i)}}const Xt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],pi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],mi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],gi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],zp={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Vp=["hover","focus","filled","success","error"],ja=.004,oi=.004,dr=oi,Qr=50,Wi=1440,Fi=Qr/Wi;function Gs(e){const t=typeof e=="number"&&e>0?e:Wi;return Qr/t}function Dp(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 Wi}const Us={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Ti(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function qp(e,t=1){const n=t/e;return Object.fromEntries(Xt.map(i=>[i,n]))}function Kp(){return Object.fromEntries([...pi.map(e=>[e,0]),...mi.map(e=>[e,0])])}function Gp(){return Object.fromEntries(gi.map(e=>[e,0]))}function ao(e){return Object.fromEntries(Xt.map(t=>[t,typeof e[t]=="number"?e[t]:Us[t]]))}function Xs(e,t,n){const i=e-Fi,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 So(e,t,n){const i=ea(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,a)=>s+a,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Up(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=pi[o],a=mi[o],u=typeof n[s]=="number"?n[s]:0,c=typeof n[a]=="number"?n[a]:0,m=Xs(t[o]??0,u,c);m.paddingLeft!==u&&(i[s]=m.paddingLeft),m.paddingRight!==c&&(i[a]=m.paddingRight)}return i}function ea(e,t,n){if(e<=0)return[];const i=Xt.slice(0,e).map(m=>n[m]);if(e===1)return i;const o=i.slice(0,e-1),a=o.reduce((m,p)=>m+p,0)+Fi;if(t>=a)return i;const u=[...o];let c=a-t;for(let m=u.length-1;m>=0&&c>0;m-=1){const p=u[m]-Fi;if(p<=0)continue;const R=Math.min(c,p);u[m]-=R,c-=R}return[...u,i[e-1]]}function Xp(e,t,n){if(e<=1)return{};const i=ea(e,t,n),o={};for(let s=0;s<e-1;s+=1){const a=Xt[s];i[s]!==n[a]&&(o[a]=i[s])}return o}function za(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...An]}function Yp(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Jp(e,t,n,i){const o=Math.min(i,e.length,Xt.length),s={};for(let a=0;a<o;a+=1){const u=e[a],c=t.indexOf(u);if(c===-1)continue;const m=Xt[c],p=pi[c],R=mi[c],x=gi[c],I=Xt[a],g=pi[a],v=mi[a],T=gi[a],w=n[m],$=n[p],S=n[R],O=n[x];typeof w=="number"&&(s[I]=w),typeof $=="number"&&(s[g]=$),typeof S=="number"&&(s[v]=S),typeof O=="number"&&(s[T]=O)}return s}function Ys(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 Zp(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Ti(e),s=e.type==="b"||e.type===void 0&&t.type==="b",a={...e,...qp(n,o),...Kp()};if(s)for(const u of gi)typeof t[u]=="number"&&(a[u]=t[u]);else Object.assign(a,Gp());return Ys(e,a)?a:e}function Qp(e,t,n){const i=Ap(e);i&&(e={...e,...i});const o=Gs(n==null?void 0:n.designWidth),s=e.columns,a=t.columns,u=Ti(e),c=Ti(t),m=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof s=="number"?s:typeof a=="number"?a:An.length,R=S=>{if(m)return S;const O=ao({...t,...S}),M=Ti(S),H=So(p,M,O),L=Up(p,H,{...t,...S});return Object.keys(L).length===0?S:{...S,...L}};if(typeof s=="number"&&s!==a)return e;const x=za(e),I=za(t);if(!Yp(x,I))return R({...e,...Jp(x,I,t,p)});if(u<c&&typeof p=="number"&&!m){const S=ao({...t,...e});return R({...e,...Xp(p,u,S)})}if(m){const S=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,O=Math.max(0,(u-o)/2);return S>O?{...e,textPaddingLR:O}:e}const g=ao({...t,...e}),v=So(p,c,ao(t)),w=So(p,u,g).some((S,O)=>S<(v[O]??S)),$=Xt.some(S=>{const O=e[S],M=t[S];return typeof O=="number"&&typeof M=="number"&&O!==M});return w||$?R(e):e}function em(e,t,n,i){const o=t.slice(0,e).reduce((a,u)=>a+u,0),s=n.slice(e+1,t.length-1).reduce((a,u)=>a+u,0);return Math.max(Fi,i-o-s-Fi)}function tm(e,t){return Math.random()*(t-e)+e}function nm(e){return Object.fromEntries(Xt.map(t=>[t,typeof e[t]=="number"?e[t]:Us[t]]))}function ur(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function im(e,t,n,i,o,s){return e.slice(0,t).map((a,u)=>{const c=pi[u],m=mi[u],p=gi[u];return{key:a,textPrefix:Hp[a],widthKey:Xt[u],width:n[Xt[u]],paddingLeftKey:c,paddingRightKey:m,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[m],paddingBottom:s[p]}})}function om({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:a,onUpdateSettings:u}){const{prefix:c}=P.useScopedStyles(),m=!!o,{columns:p,type:R,wrapperWidth:x,entriesCount:I,cellMinHeight:g,dividerWidth:v,showVisibility:T,cut:w,showCut:$,cutCellMinHeight:S,cutLabel:O,imageSize:M,imageOnHover:H,entryHoverEffect:L,entryHoverShowOption:C,rowPaddingTop:J,rowPaddingBottom:y,rowPaddingTopB:k,columnsOrder:_,textPaddingLR:D,textColor:ne,backgroundColor:me,dividerColor:K,textHoverColor:F,backgroundHoverColor:Q,dividerHoverColor:Y}=e,[B,te]=l.useState(void 0),[de,re]=l.useState(null),W=H==="on"&&(!n||i),pe=(w??0)>0,h=R==="b",ae=l.useRef(null),be=l.useRef(null),[ye,Ae]=l.useState(null),[Z,ge]=l.useState(Wi),X=Gs(Z),U=Math.max(0,((x??0)-X)/2),j=Math.min(D??0,U),se=Math.max(j,oi),Ee=((x??0)+X)/2;l.useLayoutEffect(()=>{if(!n){ge(Wi);return}const le=()=>{ge(Dp(ae.current))};le();const we=ae.current;if(!we)return;const Pe=new ResizeObserver(le);Pe.observe(we);let Ne=we;for(;Ne&&!Ne.style.getPropertyValue("--cntrl-article-width");)Ne=Ne.parentElement;return Ne&&Pe.observe(Ne),()=>Pe.disconnect()},[n,a]),l.useEffect(()=>{te(void 0)},[w,$,t,I]),l.useEffect(()=>{n&&!i&&te(void 0)},[n,i]);const Fe=P.buildColorVars(c,{textColor:ne,backgroundColor:me,dividerColor:K,textHoverColor:F,backgroundHoverColor:Q,dividerHoverColor:Y},zp,Vp),Re=s&&s!=="default"?`${c}-state-${s}`:"",_e=`${!n||i?L==="default"?`${c}-entry-hover-default`:L==="blinds"?`${c}-entry-hover-blinds`:L==="reveal"?`${c}-entry-hover-reveal`:"":""} ${Re}`.trim(),N=L==="reveal"&&(!n||i),q=(T==null?void 0:T[0])??!1,E=(T==null?void 0:T[1])??!1,z=l.useRef(e),G=l.useRef(a);l.useEffect(()=>{if(!u||!n){z.current=e,G.current=a;return}if(G.current!==a){z.current=e,G.current=a;return}const le=z.current;if(!(le!==e))return;if(typeof le.columns=="number"&&typeof e.columns=="number"&&le.columns!==e.columns){z.current=e;return}const Pe=Qp(e,le,{designWidth:Z});z.current=e,Ys(e,Pe)&&u(Pe)},[e,u,n,a,Z]);const ee=l.useMemo(()=>nm(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ie=l.useMemo(()=>ur(e,pi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),he=l.useMemo(()=>ur(e,mi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Se=l.useMemo(()=>ur(e,gi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),$e=l.useMemo(()=>Array.isArray(_)&&_.length>0?_:[...An],[_]),fe=l.useMemo(()=>im($e,p,ee,ie,he,Se),[$e,p,ee,ie,he,Se]),Ge=Ti(e),ue=l.useMemo(()=>Xt.slice(0,p).map(le=>ee[le]),[p,ee]),Me=l.useMemo(()=>ea(p,Ge,ee),[p,Ge,ee]),ze=l.useMemo(()=>So(p,Ge,ee),[p,Ge,ee]),De=l.useMemo(()=>fe.map((le,we)=>Xs(ze[we]??0,le.paddingLeft,le.paddingRight)),[fe,ze]),at=l.useMemo(()=>{const le=I===0?1/0:I;return(t??[]).slice(0,le).map((Pe,Ne)=>({id:Ne,cells:Object.fromEntries(An.map(tt=>[tt,Pe[tt]??""])),image:Pe.image,link:Pe.link}))},[t,I]),ht=pe?B??w:at.length,Et=l.useMemo(()=>pe?at.slice(0,ht):at,[at,pe,ht]),mt=pe&&ht<at.length,ft=Et.length>1||mt,Ft=[q?`${c}-divider-top`:"",E||ft?`${c}-divider-bottom`:""].filter(Boolean).join(" "),It=!n||i,Ue=()=>{if(!It)return;const le=B??w;if(!$){te(at.length);return}te(Math.min(le+$,at.length))},Te=le=>P.scalingValue(le,n??!1),qe=h?k??0:J??0,Je=y??0,Oe=g??0,$t=qe+Oe/2,At=Math.max(Je,dr),Ze=Wa(0,Et.length,q,E,mt,v??0,n??!1).borderTopWidth,Mt=ye!=null?`${ye}px`:`calc(${Ze} + ${Te($t)})`,Ht=h?"rowPaddingTopB":"rowPaddingTop",We=fe[0],yt=fe[fe.length-1],et=De[0],Xe=De[De.length-1],ot=We&&et?Math.max(et.paddingLeft,oi):0,pt=yt&&Xe?Math.max(Xe.paddingRight,oi):0,un=Ge,rn=le=>{const we=ae.current;if(!we)return{x:0,y:0};const Pe=we.getBoundingClientRect();return{x:le.clientX-Pe.left+Fa,y:le.clientY-Pe.top+Fa}},Wn=(le,we)=>{if(!W)return;const Pe=le.image;if(!(Pe!=null&&Pe.url)){re(null);return}const{x:Ne,y:tt}=rn(we),bt=(M==null?void 0:M.min)??80,Ce=(M==null?void 0:M.max)??320,it=(de==null?void 0:de.rowId)===le.id?de.widthPx:tm(bt,Ce);re({rowId:le.id,url:Pe.url,objectFit:"contain",isVideo:Sp(Pe),widthPx:it,x:Ne,y:tt})},nt=le=>{if(!W||!de)return;const{x:we,y:Pe}=rn(le);re(Ne=>!Ne||Ne.x===we&&Ne.y===Pe?Ne:{...Ne,x:we,y:Pe})},an=()=>{re(null)},Vt=le=>{N&&ka(le,c),W&&re(null)},jt=le=>{N&&_a(le,c)};l.useLayoutEffect(()=>{if(!m||h){Ae(null);return}const le=be.current,we=le==null?void 0:le.parentElement;if(!le||!we){Ae(null);return}const Pe=()=>{const tt=le.querySelector("[data-list-row]");if(!tt){Ae(null);return}const bt=we.getBoundingClientRect(),Ce=tt.getBoundingClientRect();Ae(Ce.top-bt.top+Ce.height/2)};Pe();const Ne=new ResizeObserver(Pe);return Ne.observe(le),Ne.observe(we),()=>Ne.disconnect()},[m,h,Et,qe,Je,Oe,t,e,fe,ze,Z,v,q,E,mt]);const Ve=l.useMemo(()=>!h&&Yr.some(le=>{const we=le.charAt(0),Pe=e[`${le}VerticalAlign`];return Ks(Pe,e,we)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);l.useLayoutEffect(()=>{var it;const le=ae.current;if(!le)return;const we=()=>{le.querySelectorAll("[data-list-col]").forEach(Be=>{Be.style.transform="";const rt=Be.querySelector(`.${c}-list-col`);rt&&(rt.style.minHeight="",rt.style.height="");const st=Be.querySelector(`.${c}-list-col-title`);st&&(st.style.transform="")})};if(h||!Ve){we();return}const Pe=()=>{const Be=Array.from(le.querySelectorAll("[data-list-row]")),rt=`${c}-list-col`,st=`${c}-baseline-probe`;Be.forEach(kt=>{kt.querySelectorAll("[data-list-col]").forEach(St=>{St.style.transform="";const je=St.querySelector(`.${rt}`);je&&(je.style.minHeight="",je.style.height="");const xt=St.querySelector(`.${c}-list-col-title`);xt&&(xt.style.transform="")})}),Be.forEach(kt=>{const St=Array.from(kt.querySelectorAll("[data-list-col]"));Fp(kt,St,rt)}),le.offsetHeight,Be.forEach(kt=>{const St=Array.from(kt.querySelectorAll("[data-list-col]")),je=kt.getBoundingClientRect().top,xt=new Map,Ct=St.map(ut=>{const Ot=ut.querySelector(`.${c}-list-col-title`),Wt={el:ut,titleEl:Ot,letter:ut.getAttribute("data-col-letter")??"",kind:ut.getAttribute("data-valign")??"top",anchor:ut.getAttribute("data-valign-anchor")};return xt.set(Wt.letter,Wt),Wt}),wt=new Map,Dt=(ut,Ot)=>{const Wt=wt.get(ut.letter);if(Wt!==void 0)return Wt;const pn=ut.anchor?xt.get(ut.anchor):void 0;if(ut.kind!=="baseline"||!pn||Ot.has(ut.letter)){const Xn=cr(ut,je,rt,st);return wt.set(ut.letter,Xn),Xn}Ot.add(ut.letter);const $n=Dt(pn,Ot);Ot.delete(ut.letter);const mn=cr(ut,je,rt,st),qt=$n-mn;Np(ut.titleEl,qt);const Cn=cr(ut,je,rt,st);return wt.set(ut.letter,Cn),Cn};Ct.forEach(ut=>Dt(ut,new Set))})};let Ne=null;const tt=()=>{Ne===null&&(Ne=requestAnimationFrame(()=>{Ne=null,Pe()}))};Pe();const bt=new ResizeObserver(()=>tt());bt.observe(le);let Ce=!1;return typeof document<"u"&&((it=document.fonts)!=null&&it.ready)&&document.fonts.ready.then(()=>{Ce||tt()}),()=>{Ce=!0,Ne!==null&&(cancelAnimationFrame(Ne),Ne=null),bt.disconnect(),we()}},[Ve,h,e,t,Z,Et,ze]);const vt=l.useMemo(()=>Lp(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:vt}}),r.jsx("div",{style:Fe,children:r.jsxs("div",{ref:ae,className:`${c}-wrapper ${_e}${Ft?` ${Ft}`:""}${h?` ${c}-type-b`:""}`.trim(),style:{width:P.scalingValue(x??0,n),...!h&&m?{[`--${c}-first-entry-handle-top`]:Mt}:{}},onMouseMove:W?nt:void 0,onMouseLeave:W?an:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[Et.map((le,we)=>{var bt;const Pe=(((bt=le.link)==null?void 0:bt.length)??0)>0,Ne=Pe&&(!n||i)?"a":"div",tt=Wa(we,Et.length,q,E,mt,v??0,n??!1);return r.jsxs(Ne,{ref:we===0?Ce=>{be.current=Ce}:void 0,className:`${c}-list-item${Pe||C==="always"?` ${c}-list-item-has-link`:""}`,...Pe?{href:le.link,target:"_blank"}:{},style:tt,onMouseEnter:Ce=>{N&&(Pe||C==="always")&&ka(Ce,c),W&&Wn(le,Ce)},onMouseLeave:Ce=>{N&&(Pe||C==="always")&&_a(Ce,c)},children:[qe>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Te(qe)}}),r.jsxs("div",{className:`${c}-list-cols-row${h?"":` ${c}-list-cols-row-h`}${m&&we===0&&h?` ${c}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:Te(Oe)},children:[fe.map((Ce,it)=>{const Be=it===fe.length-1,rt=De[it],st=Ce.paddingBottom,kt=Cp(le.cells[Ce.key]),St=h&&kt&&st>0,je=h?{minHeight:Te(Oe)}:{width:Te(ze[it])},xt=h?{paddingLeft:Te(j),paddingRight:Te(j)}:{paddingLeft:Te(rt.paddingLeft),paddingRight:Te(rt.paddingRight)},Ct=Ce.textPrefix.charAt(0),wt=h?Rp(e[`${Ce.textPrefix}VerticalAlign`]):Pp(e[`${Ce.textPrefix}VerticalAlign`],e,Ct),Dt=h&&kt&&m&&we===0;return r.jsxs("div",{className:h?`${c}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":Ct,"data-valign":wt.kind,...wt.kind==="baseline"?{"data-valign-anchor":wt.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${Be?` ${c}-list-col-last`:""}`,style:{...xt,...je,...h?{justifyContent:Na(wt.kind)}:{}},"data-test":Ce.width,children:r.jsx("span",{className:Oa(e,Ce.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...Ha(Ro(e,Ce.textPrefix),n),...Ba(e,Ce.textPrefix,c,n),...h?{}:Mp(wt.kind)},children:le.cells[Ce.key]??null})}),St&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Te(st)}}),Dt&&r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ce.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Te(Math.max(st,dr))}})]},Ce.key)}),m&&we===0&&h&&r.jsxs(r.Fragment,{children:[r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ee),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:Te(se),height:"100%"}}),r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ee),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:Te(Math.max(se,Ge-se)),width:Te(se),height:"100%"}})]})]}),!h&&Je>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Te(Je)}}),m&&we===0&&!h&&r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Te(At)}})]},le.id)}),m&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ht,"data-controls-static-handle":"",...h?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:h?"center":"left-y",areaStyle:{position:"absolute",top:Ze,left:0,width:"100%",height:Te(Math.max(qe,dr))}})},"row-padding-handles"),m&&!h&&We&&yt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":We.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[0]-((et==null?void 0:et.paddingRight)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:Te(ot),height:"100%"}}),r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":yt.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[fe.length-1]-((Xe==null?void 0:Xe.paddingLeft)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Te(un-pt),width:Te(pt),height:"100%"}})]},"column-edge-padding-handles"),m&&!h&&fe.slice(0,-1).map((le,we)=>{const Pe=fe[we+1],Ne=Me.slice(0,we+1).reduce((Be,rt)=>Be+rt,0),tt=De[we],bt=De[we+1],Ce=Math.max(tt.paddingRight,oi),it=Math.max(bt.paddingLeft,oi);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":le.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[we]-tt.paddingLeft),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Te(Ne-Ce),width:Te(Ce),height:"100%"}}),r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Pe.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[we+1]-bt.paddingRight),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Te(Ne),width:Te(it),height:"100%"}})]},`${le.paddingRightKey}-padding`)}),m&&!h&&fe.slice(0,-1).map((le,we)=>{const Pe=em(we,Me,ue,Ge),tt=Me.slice(0,we+1).reduce((bt,Ce)=>bt+Ce,0)-ja/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":le.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(Qr),"data-controls-max-fraction":String(Pe),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Te(tt),width:Te(ja),height:"calc(100%)",pointerEvents:"auto"}})},`${le.widthKey}-junction`)})]}),mt&&(()=>{const le=Ro(e,bn),we=kp(e.cutLabelVerticalAlign),Pe=le.textTextAlign==="justify"||h;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Te(S??0),cursor:It?"pointer":"default",...Tp(E,v??0,n??!1)},onClick:It?Ue:void 0,onMouseEnter:N||W?Vt:void 0,onMouseLeave:N?jt:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...h?{paddingLeft:Te(j),paddingRight:Te(j)}:{},justifyContent:_p(le.textTextAlign),alignItems:Na(we)},children:r.jsx("span",{className:Oa(e,bn,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...Ha(le,n),...Ba(e,bn,c,n),...Pe?{width:"100%"}:{}},children:O})})})})(),W&&de&&(()=>{const le=wo(de.widthPx),we={width:le,height:"auto",maxHeight:le,objectFit:"contain",left:de.x,top:de.y,position:"absolute"};return r.jsx($p,{media:de,className:de.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:we},`${de.rowId}-${de.url}`)})()]})})]})}const rm=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
5894
5903
  import { CommonComponentProps } from '../props';
5895
5904
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
5896
5905
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -8847,7 +8856,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8847
8856
  </>
8848
8857
  );
8849
8858
  }
8850
- `,bi=["A","B","C","D","E"],Va=[...Tr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Bn={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 am(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function so(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function sm(){return Object.fromEntries(bi.map((e,t)=>{const n=An[t],i=`${e} column`;return[n,am(i)]}))}function lm(){const e={};for(const t of bi)e[`${t}ColumnWidth`]=so(`${t} column width`),e[`${t}ColumnPaddingLeft`]=so(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=so(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=so(`${t} column padding bottom`);return e}function Da(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...An]};for(const s of bi)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 cm(e){const t={};if(e===bn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Tr]},enum:[...Tr]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Va],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Va]}}return t[Qe(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Qe(e,"textFontSettings")]={...Bn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Qe(e,"textFontSize")]={...Bn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Qe(e,"textLineHeight")]={...Bn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Qe(e,"textLetterSpacing")]={...Bn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Qe(e,"textWordSpacing")]={...Bn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Qe(e,"textTextAlign")]={...Bn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Qe(e,"textTextAppearance")]={...Bn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const dm=Jr.reduce((e,t)=>({...e,...cm(t)}),{});function um(e){return{verticalAlign:e===bn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===bn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function pm(e,t={}){var n;return{...um(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const qa=new Set(["textFontFamily","textFontSettings"]);function mm(e,t,n){const i=s=>n===void 0?!0:n==="common"?qa.has(s):!qa.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Zr(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Qe(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Qe(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Qe(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Qe(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Qe(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Qe(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Qe(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Qe(e,"textTextAppearance")]=t.textTextAppearance),o}function So(e={},t){return Jr.reduce((n,i)=>({...n,...mm(i,pm(i,e),t)}),{})}const gm=So(),hm=jp();function Js(e){return[Qe(e,"textFontFamily"),Qe(e,"textFontSettings"),Qe(e,"textFontSize"),Qe(e,"textLineHeight"),Qe(e,"textLetterSpacing"),Qe(e,"textWordSpacing"),Qe(e,"textTextAlign"),Qe(e,"textTextAppearance"),`${e}VerticalAlign`]}function fm(){const e=[];return Yr.forEach((t,n)=>{const i=An[n],o=Js(t);for(let s=1;s<An.length;s+=1){const a=[{name:"columns",value:s},...Array.from({length:s},(u,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(u=>{e.push({if:a,then:{name:`properties.${u}.display.visible`,value:!1}})})}}),e}const ym=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Js(bn);const vm=[...bi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],jn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],bm=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:jn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:jn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:jn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:jn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:jn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:jn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:jn[6],link:""}],xm=[...bi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],wm={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...sm(),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:bm},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"}},...lm(),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"}},...dm,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",...gm,...So({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Da({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},...So({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Da({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},...So({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...fm(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...vm.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}},...bi.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",...xm]},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__",hm]}],paletteBookmark:{items:[...ym],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Sm={element:om,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Zp(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:wm,sourceCode:rm},Ka=300,Ln=.004,$m={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"},Cm=["hover","focus","filled","success","error"];function Tm(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ga(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Ua(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:P.scalingValue((o-t)/2,i)}}function Lm(e){return`
8859
+ `,bi=["A","B","C","D","E"],Va=[...Tr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Bn={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 am(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function so(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function sm(){return Object.fromEntries(bi.map((e,t)=>{const n=An[t],i=`${e} column`;return[n,am(i)]}))}function lm(){const e={};for(const t of bi)e[`${t}ColumnWidth`]=so(`${t} column width`),e[`${t}ColumnPaddingLeft`]=so(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=so(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=so(`${t} column padding bottom`);return e}function Da(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...An]};for(const s of bi)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 cm(e){const t={};if(e===bn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Tr]},enum:[...Tr]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Va],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Va]}}return t[Qe(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Qe(e,"textFontSettings")]={...Bn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Qe(e,"textFontSize")]={...Bn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Qe(e,"textLineHeight")]={...Bn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Qe(e,"textLetterSpacing")]={...Bn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Qe(e,"textWordSpacing")]={...Bn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Qe(e,"textTextAlign")]={...Bn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Qe(e,"textTextAppearance")]={...Bn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const dm=Jr.reduce((e,t)=>({...e,...cm(t)}),{});function um(e){return{verticalAlign:e===bn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===bn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function pm(e,t={}){var n;return{...um(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const qa=new Set(["textFontFamily","textFontSettings"]);function mm(e,t,n){const i=s=>n===void 0?!0:n==="common"?qa.has(s):!qa.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Zr(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Qe(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Qe(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Qe(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Qe(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Qe(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Qe(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Qe(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Qe(e,"textTextAppearance")]=t.textTextAppearance),o}function $o(e={},t){return Jr.reduce((n,i)=>({...n,...mm(i,pm(i,e),t)}),{})}const gm=$o(),hm=jp();function Js(e){return[Qe(e,"textFontFamily"),Qe(e,"textFontSettings"),Qe(e,"textFontSize"),Qe(e,"textLineHeight"),Qe(e,"textLetterSpacing"),Qe(e,"textWordSpacing"),Qe(e,"textTextAlign"),Qe(e,"textTextAppearance"),`${e}VerticalAlign`]}function fm(){const e=[];return Yr.forEach((t,n)=>{const i=An[n],o=Js(t);for(let s=1;s<An.length;s+=1){const a=[{name:"columns",value:s},...Array.from({length:s},(u,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(u=>{e.push({if:a,then:{name:`properties.${u}.display.visible`,value:!1}})})}}),e}const ym=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Js(bn);const vm=[...bi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],jn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],bm=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:jn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:jn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:jn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:jn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:jn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:jn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:jn[6],link:""}],xm=[...bi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],wm={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...sm(),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:bm},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"}},...lm(),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"}},...dm,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",...gm,...$o({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Da({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},...$o({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Da({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},...$o({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...fm(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...vm.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}},...bi.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",...xm]},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__",hm]}],paletteBookmark:{items:[...ym],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Sm={element:om,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Zp(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:wm,sourceCode:rm},Ka=300,Ln=.004,$m={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"},Cm=["hover","focus","filled","success","error"];function Tm(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ga(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Ua(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:P.scalingValue((o-t)/2,i)}}function Lm(e){return`
8851
8860
  .${e}-wrapper {
8852
8861
  box-sizing: border-box;
8853
8862
  display: flex;
@@ -9040,7 +9049,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
9040
9049
  left: 20px;
9041
9050
  transform: translateY(-50%);
9042
9051
  }
9043
- `}function Xa(e,t,n,i,o,s,a,u){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:s??0,textAppearance:a,color:u??"#000000"}}function Em({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:a}=P.useScopedStyles(),u=o??!1,{wrapperWidth:c=1,cellMinHeight:m=0,dividerWidth:p=694e-6,dividerStyle:R="solid",entryHoverEffect:b="default",autoclose:I="off",icon:g,iconMaxWidth:v=.00833,iconPaddingRight:T=0,iconAnimation:w="rotate 45",questionColor:$="#000000",answerColor:S="#000000",dividerColor:z="#0000001F",iconColor:M="#000000",questionHoverColor:N="#666666",iconHoverColor:L="#666666",iconActiveColor:C="#000000",dividerHoverColor:J="#000000",questionFontFamily:y,questionFontSettings:k,questionFontSize:_,questionLineHeight:V,questionLetterSpacing:ne,questionWordSpacing:me,questionTextAppearance:K,answerFontFamily:H,answerFontSettings:Q,answerFontSize:Y,answerLineHeight:O,answerLetterSpacing:te,answerWordSpacing:ce,answerTextAppearance:oe,questionPaddingLeft:W=0,questionPaddingTop:ue=0,questionPaddingBottom:h=0,answerPaddingLeft:ae=0,answerPaddingRight:be=0,answerPaddingTop:ye=0,answerPaddingBottom:Ae=0}=e,Z=t??[],[ge,U]=l.useState(()=>new Set),X=!n||i;l.useEffect(()=>{U(new Set)},[I]),l.useEffect(()=>{n&&!o&&!i&&U(new Set)},[n,o,i]);const B=Ce=>P.scalingValue(Ce,n??!1),se=Math.max(W,Ln),Ee=Math.max(ue,Ln),Fe=Math.max(h,Ln),Re=Math.max(ae,Ln),Ie=Math.max(be,Ln),_e=Math.max(ye,Ln),F=Math.max(Ae,Ln),D=Math.max(0,(c??1)-T-v),E=Math.max(0,(c??1)-be),j=Math.max(0,(c??1)-ae),G=Math.max(T,Ln),ee=Math.max(0,(c??1)-W-v),ie=l.useMemo(()=>ge.size===0?0:Math.min(...ge),[ge]),he=l.useCallback(Ce=>ge.has(Ce),[ge]),Se=X&&b==="default"?`${a}-entry-hover-default`:"",$e=g??"",fe=$e!=="",Ge=w.replace(/^rotate /,""),de=`${a}-icon-anim-${Ge}`,Me=Ut(Rt(Xa(y,k,_,V,ne,me,K,$),n)),je=Ut(Rt(Xa(H,Q,Y,O,te,ce,oe,S),n)),Ve=Ga(_,V,`${a}-question`,`${a}-text-tight-leading`),at=Ga(Y,O,`${a}-answer-text`,`${a}-text-tight-leading`),ht=Ua(_,V,a,n),Et=Ua(Y,O,a,n),mt=P.buildColorVars(a,{questionColor:$,answerColor:S,dividerColor:z,iconColor:M,questionHoverColor:N,iconHoverColor:L,iconActiveColor:C,dividerHoverColor:J},$m,Cm),ft=s&&s!=="default"?`${a}-state-${s}`:"",Ft=l.useCallback(Ce=>{X&&U(qe=>{if(qe.has(Ce)){const Oe=new Set(qe);return Oe.delete(Ce),Oe}if(I==="on")return new Set([Ce]);const Je=new Set(qe);return Je.add(Ce),Je})},[X,I]),It=l.useMemo(()=>Lm(a),[a]),Ue={[`--${a}-divider-width`]:P.scalingValue(p,n??!1),[`--${a}-divider-style`]:R,[`--${a}-icon-max-width`]:P.scalingValue(v,n??!1),...m>0?{[`--${a}-question-min-height`]:P.scalingValue(m,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:It}}),r.jsx("div",{style:mt,children:r.jsx("div",{className:Ye(`${a}-wrapper`,n&&!i&&`${a}-editor`,Se,ft),style:{width:P.scalingValue(c,n??!1),maxWidth:"100%",...Ue},children:Z.map((Ce,qe)=>{var Mt;const Je=he(qe),Oe=((Mt=Ce.question)==null?void 0:Mt.trim())??"",$t=Ce.answer,At=(($t==null?void 0:$t.length)??0)>0,Ze=u&&qe===ie;return r.jsxs("div",{className:Ye(`${a}-item`,Je&&`${a}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${a}-question-controls`,children:[Ze&&r.jsxs(r.Fragment,{children:[r.jsx(_t,{"data-controls":"questionPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:B(Ee),zIndex:2}}),r.jsx(_t,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(D),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:B(se),height:"100%",zIndex:2}}),r.jsx(_t,{"data-controls":"iconPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ee),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:B(G),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${a}-question-button`,"aria-expanded":Je,style:{...Me,...ht,paddingLeft:B(W),paddingRight:B(T)},onClick:()=>Ft(qe),children:[ue>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:B(ue)},"aria-hidden":"true"}),r.jsxs("span",{className:`${a}-question-row`,children:[r.jsx("span",{className:Ve,children:Oe}),At&&(fe?r.jsx("span",{className:`${a}-icon ${a}-icon-custom ${de}`,"aria-hidden":"true",children:r.jsx(nn,{url:$e,fill:M,hoverFill:L,className:`${a}-icon-image`})}):r.jsx("span",{className:`${a}-icon ${a}-icon-default ${de}`,"aria-hidden":"true"}))]}),h>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:B(h)},"aria-hidden":"true"})]}),Ze&&r.jsx(_t,{"data-controls":"questionPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:B(Fe),zIndex:2}})]}),At&&$t&&r.jsx("div",{className:`${a}-panel`,"aria-hidden":!Je,children:r.jsx("div",{className:`${a}-panel-inner`,children:r.jsxs("div",{className:`${a}-answer-controls`,children:[Ze&&Je&&r.jsxs(r.Fragment,{children:[r.jsx(_t,{"data-controls":"answerPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:B(_e),zIndex:2}}),r.jsx(_t,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(E),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:B(Re),height:"100%",zIndex:2}}),r.jsx(_t,{"data-controls":"answerPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(j),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:B(Ie),height:"100%",zIndex:2}})]}),ye>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:B(ye)}}),r.jsx("div",{className:`${a}-answer`,style:{...je,...Et,paddingLeft:B(ae),paddingRight:B(be)},children:r.jsx("div",{className:at,children:r.jsx(ui,{content:$t})})}),Ae>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:B(Ae)}}),Ze&&Je&&r.jsx(_t,{"data-controls":"answerPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:B(F),zIndex:2}})]})})})]},qe)})})})]})}const Im=`import { useCallback, useEffect, useMemo, useState } from 'react';
9052
+ `}function Xa(e,t,n,i,o,s,a,u){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:s??0,textAppearance:a,color:u??"#000000"}}function Em({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:a}=P.useScopedStyles(),u=o??!1,{wrapperWidth:c=1,cellMinHeight:m=0,dividerWidth:p=694e-6,dividerStyle:R="solid",entryHoverEffect:x="default",autoclose:I="off",icon:g,iconMaxWidth:v=.00833,iconPaddingRight:T=0,iconAnimation:w="rotate 45",questionColor:$="#000000",answerColor:S="#000000",dividerColor:O="#0000001F",iconColor:M="#000000",questionHoverColor:H="#666666",iconHoverColor:L="#666666",iconActiveColor:C="#000000",dividerHoverColor:J="#000000",questionFontFamily:y,questionFontSettings:k,questionFontSize:_,questionLineHeight:D,questionLetterSpacing:ne,questionWordSpacing:me,questionTextAppearance:K,answerFontFamily:F,answerFontSettings:Q,answerFontSize:Y,answerLineHeight:B,answerLetterSpacing:te,answerWordSpacing:de,answerTextAppearance:re,questionPaddingLeft:W=0,questionPaddingTop:pe=0,questionPaddingBottom:h=0,answerPaddingLeft:ae=0,answerPaddingRight:be=0,answerPaddingTop:ye=0,answerPaddingBottom:Ae=0}=e,Z=t??[],[ge,X]=l.useState(()=>new Set),U=!n||i;l.useEffect(()=>{X(new Set)},[I]),l.useEffect(()=>{n&&!o&&!i&&X(new Set)},[n,o,i]);const j=Te=>P.scalingValue(Te,n??!1),se=Math.max(W,Ln),Ee=Math.max(pe,Ln),Fe=Math.max(h,Ln),Re=Math.max(ae,Ln),Ie=Math.max(be,Ln),_e=Math.max(ye,Ln),N=Math.max(Ae,Ln),q=Math.max(0,(c??1)-T-v),E=Math.max(0,(c??1)-be),z=Math.max(0,(c??1)-ae),G=Math.max(T,Ln),ee=Math.max(0,(c??1)-W-v),ie=l.useMemo(()=>ge.size===0?0:Math.min(...ge),[ge]),he=l.useCallback(Te=>ge.has(Te),[ge]),Se=U&&x==="default"?`${a}-entry-hover-default`:"",$e=g??"",fe=$e!=="",Ge=w.replace(/^rotate /,""),ue=`${a}-icon-anim-${Ge}`,Me=Ut(Rt(Xa(y,k,_,D,ne,me,K,$),n)),ze=Ut(Rt(Xa(F,Q,Y,B,te,de,re,S),n)),De=Ga(_,D,`${a}-question`,`${a}-text-tight-leading`),at=Ga(Y,B,`${a}-answer-text`,`${a}-text-tight-leading`),ht=Ua(_,D,a,n),Et=Ua(Y,B,a,n),mt=P.buildColorVars(a,{questionColor:$,answerColor:S,dividerColor:O,iconColor:M,questionHoverColor:H,iconHoverColor:L,iconActiveColor:C,dividerHoverColor:J},$m,Cm),ft=s&&s!=="default"?`${a}-state-${s}`:"",Ft=l.useCallback(Te=>{U&&X(qe=>{if(qe.has(Te)){const Oe=new Set(qe);return Oe.delete(Te),Oe}if(I==="on")return new Set([Te]);const Je=new Set(qe);return Je.add(Te),Je})},[U,I]),It=l.useMemo(()=>Lm(a),[a]),Ue={[`--${a}-divider-width`]:P.scalingValue(p,n??!1),[`--${a}-divider-style`]:R,[`--${a}-icon-max-width`]:P.scalingValue(v,n??!1),...m>0?{[`--${a}-question-min-height`]:P.scalingValue(m,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:It}}),r.jsx("div",{style:mt,children:r.jsx("div",{className:Ye(`${a}-wrapper`,n&&!i&&`${a}-editor`,Se,ft),style:{width:P.scalingValue(c,n??!1),maxWidth:"100%",...Ue},children:Z.map((Te,qe)=>{var Mt;const Je=he(qe),Oe=((Mt=Te.question)==null?void 0:Mt.trim())??"",$t=Te.answer,At=(($t==null?void 0:$t.length)??0)>0,Ze=u&&qe===ie;return r.jsxs("div",{className:Ye(`${a}-item`,Je&&`${a}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${a}-question-controls`,children:[Ze&&r.jsxs(r.Fragment,{children:[r.jsx(_t,{"data-controls":"questionPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:j(Ee),zIndex:2}}),r.jsx(_t,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(q),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:j(se),height:"100%",zIndex:2}}),r.jsx(_t,{"data-controls":"iconPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ee),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:j(G),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${a}-question-button`,"aria-expanded":Je,style:{...Me,...ht,paddingLeft:j(W),paddingRight:j(T)},onClick:()=>Ft(qe),children:[pe>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:j(pe)},"aria-hidden":"true"}),r.jsxs("span",{className:`${a}-question-row`,children:[r.jsx("span",{className:De,children:Oe}),At&&(fe?r.jsx("span",{className:`${a}-icon ${a}-icon-custom ${ue}`,"aria-hidden":"true",children:r.jsx(nn,{url:$e,fill:M,hoverFill:L,className:`${a}-icon-image`})}):r.jsx("span",{className:`${a}-icon ${a}-icon-default ${ue}`,"aria-hidden":"true"}))]}),h>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:j(h)},"aria-hidden":"true"})]}),Ze&&r.jsx(_t,{"data-controls":"questionPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:j(Fe),zIndex:2}})]}),At&&$t&&r.jsx("div",{className:`${a}-panel`,"aria-hidden":!Je,children:r.jsx("div",{className:`${a}-panel-inner`,children:r.jsxs("div",{className:`${a}-answer-controls`,children:[Ze&&Je&&r.jsxs(r.Fragment,{children:[r.jsx(_t,{"data-controls":"answerPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:j(_e),zIndex:2}}),r.jsx(_t,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(E),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:j(Re),height:"100%",zIndex:2}}),r.jsx(_t,{"data-controls":"answerPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(z),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:j(Ie),height:"100%",zIndex:2}})]}),ye>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:j(ye)}}),r.jsx("div",{className:`${a}-answer`,style:{...ze,...Et,paddingLeft:j(ae),paddingRight:j(be)},children:r.jsx("div",{className:at,children:r.jsx(ui,{content:$t})})}),Ae>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:j(Ae)}}),Ze&&Je&&r.jsx(_t,{"data-controls":"answerPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:j(N),zIndex:2}})]})})})]},qe)})})})]})}const Im=`import { useCallback, useEffect, useMemo, useState } from 'react';
9044
9053
  import cn from 'classnames';
9045
9054
  import { CommonComponentProps } from '../props';
9046
9055
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -9837,7 +9846,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
9837
9846
  </>
9838
9847
  );
9839
9848
  }
9840
- `;function En(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ya={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Pm=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Rm={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:En("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:{...Ya.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:{...Ya.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:En("Question Padding Left"),questionPaddingTop:En("Question Padding Top"),questionPaddingBottom:En("Question Padding Bottom"),answerPaddingLeft:En("Answer Padding Left"),answerPaddingRight:En("Answer Padding Right"),answerPaddingTop:En("Answer Padding Top"),answerPaddingBottom:En("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:[...Pm],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Am={element:Em,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},schema:Rm,sourceCode:Im},xn=e=>e.display==="cover",Do=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Ja=100,Mm=.2,Za=8,Zs=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=l.useState(0),[a,u]=l.useState(!1),c=l.useRef(null),m=l.useRef(0);m.current=o;const p=l.useMemo(()=>typeof window>"u"?Ja:Math.max(Ja,window.innerHeight*Mm),[]),R=l.useCallback(y=>Math.max(0,1-y/(p*1.5)),[p]),b=l.useCallback(y=>Math.max(0,1-y/(p*.45)),[p]),I=l.useCallback(y=>{const k=typeof window<"u"?window.innerHeight:800,_=Math.max(.88,1-y/k*.12);return`translateY(${y}px) scale(${_})`},[]),g=l.useCallback(()=>{c.current=null},[]),v=l.useCallback(()=>{u(!0),s(0),window.setTimeout(()=>u(!1),n),g()},[n,g]),T=l.useCallback(()=>{const y=typeof window<"u"?window.innerHeight:800;u(!0),s(y),window.setTimeout(()=>{t(),g(),u(!1)},Math.min(n,200))},[n,t,g]),w=l.useCallback(y=>{!e||a||y.pointerType==="touch"&&(i!=null&&i(y.target)||(c.current={startX:y.clientX,startY:y.clientY,isLocked:null,pointerId:y.pointerId}))},[e,a,i]),$=l.useCallback(y=>{const k=c.current;if(!e||!k||y.pointerType!=="touch"||k.pointerId!==y.pointerId)return;const _=y.clientX-k.startX,V=y.clientY-k.startY;if(k.isLocked===null){if(Math.abs(_)<Za&&Math.abs(V)<Za)return;if(V>0&&V>Math.abs(_))k.isLocked=!0,y.currentTarget.setPointerCapture(y.pointerId);else{k.isLocked=!1,g();return}}if(!k.isLocked)return;y.preventDefault();const ne=Math.max(0,V);m.current=ne,s(ne)},[e,g]),S=l.useCallback(y=>{const k=c.current;if(!e||!k||y.pointerType!=="touch"||k.pointerId!==y.pointerId)return;const _=k.isLocked===!0;if(y.currentTarget.hasPointerCapture(y.pointerId)&&y.currentTarget.releasePointerCapture(y.pointerId),!_){g();return}y.clientY-k.startY>=p?T():v()},[p,T,e,g,v]),z=l.useCallback(y=>{S(y)},[S]),M=l.useCallback(y=>{S(y)},[S]),N=o>0,L=a?`transform ${n}ms ease`:"none",C=a?`opacity ${n}ms ease`:"none",J=o>0||a;return{isSwipeDragging:N,backdropStyle:{opacity:R(o),transition:C},mediaAreaStyle:{transform:I(o),transition:L,touchAction:N?"none":void 0,willChange:N?"transform":void 0},overlayContentStyle:J?{opacity:b(o),transition:C}:void 0,swipeHandlers:e?{onPointerDown:w,onPointerMove:$,onPointerUp:z,onPointerCancel:M}:{},dismissAreaStyle:e?{touchAction:N?"none":"pan-x"}:void 0}},km="[data-lightbox-scrollable]",Qs=()=>{l.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const a=u=>{const c=u.target;c instanceof Element&&c.closest(km)||u.preventDefault()};return document.addEventListener("touchmove",a,{passive:!1}),()=>{document.removeEventListener("touchmove",a),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo(0,e)}},[])},_m=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Wm=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Fm=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Nm=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const a=e.scrollLeft,u=n-a,c=a-n,m=(g,v)=>{Wm(t),e.scrollLeft=g,v&&(s==null||s())};if(Math.abs(u)<.5)return m(n,!0),()=>{};let p=!1,R=0;const b=()=>{t.removeEventListener("transitionend",I),clearTimeout(R)},I=g=>{g.target!==t||g.propertyName!=="transform"||p||(p=!0,b(),m(n,!0))};return t.addEventListener("transitionend",I),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)`,R=window.setTimeout(()=>{p||(p=!0,b(),m(n,!0))},i+64),()=>{p||(p=!0,b(),m(a-Fm(t),!1))}},Li=300,Hm=900,Om=1500,Bm="cubic-bezier(0.16, 1, 0.3, 1)",jm=3e3,zm=2,Vm=16,Dm=.05,qm=1,lo=.3,Km=50,Gm=20,ei=.004,Ki=["title1","title2","title3"],Um={title1:"1",title2:"2",title3:"3"},Xm={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Ym={title1:.02,title2:.02,title3:.02},co=e=>`max(${e}, ${Gm}px)`,Jm=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]}},Zm=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=Jm(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},st=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Qm=e=>[st(e,"fontFamily"),st(e,"fontSettings"),{type:"row",items:[st(e,"fontSize"),st(e,"lineHeight"),st(e,"letterSpacing"),st(e,"wordSpacing")]},st(e,"textAlign"),st(e,"textAppearance")],eg=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ki.map(e=>[Um[e],Qm(e)]))}),ta=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},u)=>{if(s<=0||u<=0)return{overflow:s,widths:[u,...a]};const c=Math.min(s,u);return{overflow:s-c,widths:[u-c,...a]}},{overflow:i-1,widths:[]});return o},el=(e,t)=>ta(e,t),uo=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Qa=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:ta(e.length,n),effective:el(e.length,n)}},tg=(e,t,n,i,o,s,a)=>{const u=[];return t&&u.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&u.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&u.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:a,text:i}),u},ur=(e,t)=>{const n=i=>{const o=st(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[Xm[t]]}},ng=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),pr=(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??Ym[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Rt(i,n)},ig=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:a})=>{const{backgroundColor:u,thumbnailSize:c,thumbnailGap:m,thumbnailMarginBottom:p,imageGap:R,closeIcon:b,closeIconMaxWidth:I,closeIconColor:g,closeIconHoverColor:v,thumbnailTrigger:T,thumbnailVisibility:w,thumbnailObjectFit:$,thumbnailActive:S,thumbnailActiveColor:z,title1Width:M,title2Width:N,title3Width:L,title1MarginLeft:C=0,title2MarginLeft:J=0,title3MarginLeft:y=0,titleRowMarginBottom:k=0,titleHeaderLayout:_="desktop",contentMarginTop:V,iconMarginLeft:ne}=n,me=d=>P.scalingValue(d,i??!1),K=c??n.thumnailSize??.03,H=me(K),Q=me(m),Y=me(p??.02),O=me(R??0),te=me(V??0),ce=co(te),oe=me(ne??0),[W,ue]=l.useState(0),h=l.useRef(W);h.current=W;const ae=t[W],{title1:be,title2:ye,title3:Ae}=Zm(ae),Z=pr("title1",ur(n,"title1"),i),ge=pr("title2",ur(n,"title2"),i),U=pr("title3",ur(n,"title3"),i),X=_==="mobile",B=!o&&(!i||s),se=B,Ee=B,Fe=B,Re=xn($),Ie=Re?{"--image-aspect-ratio":Do($)}:void 0,_e=!!(be||ye||Ae),F=l.useMemo(()=>tg(e,be,ye,Ae,Z,ge,U),[e,W,be,ye,Ae,Z,ge,U]),D=l.useMemo(()=>({title1Width:M,title2Width:N,title3Width:L}),[M,N,L]),E=l.useMemo(()=>F.map(d=>D[d.widthKey]),[F,D]),j=l.useMemo(()=>ta(F.length,E),[F.length,E]),G=l.useMemo(()=>el(F.length,E),[F.length,E]),ee=l.useMemo(()=>F.filter(d=>d.prefix==="title1"),[F]),ie=l.useMemo(()=>F.filter(d=>d.prefix==="title2"||d.prefix==="title3"),[F]),he=l.useMemo(()=>Qa(ee,D),[ee,D]),Se=l.useMemo(()=>Qa(ie,D),[ie,D]),$e=l.useCallback((d,f)=>{const x=F.indexOf(d);if(!X||f==="single-row")return{effectiveWidth:G[x]??0,resolvedWidth:j[x]??0,maxWidth:uo(x,j)};if(f==="two-row-top"){const re=ee.indexOf(d);return{effectiveWidth:he.effective[re]??0,resolvedWidth:he.resolved[re]??0,maxWidth:uo(re,he.resolved)}}const q=ie.indexOf(d);return{effectiveWidth:Se.effective[q]??0,resolvedWidth:Se.resolved[q]??0,maxWidth:uo(q,Se.resolved)}},[ie,Se,G,j,F,ee,he,X]),fe=l.useCallback(d=>P.scalingValue(d,i??!1),[i]),Ge=fe(k??0),de=l.useMemo(()=>({title1MarginLeft:C,title2MarginLeft:J,title3MarginLeft:y}),[C,J,y]),Me=l.useCallback(d=>F.slice(0,d+1).reduce((f,x,q)=>f+(x!=null&&x.marginLeftKey?de[x.marginLeftKey]??0:0)+(j[q]??0),0)+(X?0:C??0),[F,de,j,X,C]),je=l.useCallback(()=>X?0:C??0,[X,C]),Ve=l.useCallback(d=>ie.slice(0,d).reduce((f,x,q)=>f+(x.marginLeftKey?de[x.marginLeftKey]??0:0)+(Se.resolved[q]??0),0),[ie,Se.resolved,de]),at=l.useCallback(d=>{const f=ie[d];return Ve(d)+(f.marginLeftKey?de[f.marginLeftKey]??0:0)+(Se.resolved[d]??0)},[ie,Se.resolved,Ve,de]),ht=(d,f)=>{const x=d.marginLeftKey?de[d.marginLeftKey]??0:0,{effectiveWidth:q,resolvedWidth:re,maxWidth:we}=$e(d,f),ke=o&&f==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":d.prefix,style:{...f==="single-row"?{gridArea:d.prefix}:{},width:fe(q),...x>0?{marginLeft:fe(x)}:{}},children:[r.jsx("p",{className:d.className,style:d.style,children:d.text}),ke&&d.marginLeftKey&&r.jsx("div",{"data-controls":d.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re),style:{position:"absolute",top:0,left:fe(-x),width:`max(${fe(x)}, 10px)`,height:"100%",pointerEvents:"auto"}}),ke&&r.jsx("div",{"data-controls":d.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:fe(-ei/2),width:fe(ei),height:"100%",pointerEvents:"auto"}})]},d.className)},Et=()=>{const d=X?-1:F.findIndex(q=>q.prefix==="title1"),f=!X&&(o||(C??0)>0)?(()=>{const q=C??0,re=d>=0?j[d]:M??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(${fe(q)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,x=F.flatMap((q,re)=>{if(!q.marginLeftKey)return[];const we=de[q.marginLeftKey]??0,ke=ng(F,j,de,re)+je();return r.jsx("div",{"data-controls":q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(j[re]),style:{position:"absolute",top:0,left:fe(ke),width:`max(${fe(we)}, 10px)`,height:"100%",pointerEvents:"auto"}},q.marginLeftKey)});return f?[f,...x]:x},mt=()=>F.map((d,f)=>{const x=uo(f,j),re=Me(f)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":d.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(x),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:fe(re),width:fe(ei),height:"100%",pointerEvents:"auto"}})},`${d.widthKey}-junction`)}),ft=()=>ie.flatMap((d,f)=>{if(!d.marginLeftKey)return[];const x=de[d.marginLeftKey]??0,q=Ve(f),{resolvedWidth:re}=$e(d,"two-row-bottom");return r.jsx("div",{"data-controls":d.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re),style:{position:"absolute",top:0,left:fe(q),width:`max(${fe(x)}, 10px)`,height:"100%",pointerEvents:"auto"}},d.marginLeftKey)}),Ft=()=>ie.map((d,f)=>{const{maxWidth:x}=$e(d,"two-row-bottom"),re=at(f)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":d.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(x),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:fe(re),width:fe(ei),height:"100%",pointerEvents:"auto"}})},`${d.widthKey}-junction`)}),It=l.useRef(null),Ue=l.useRef(null),Ce=l.useRef(null),qe=l.useRef(null),Je=l.useRef([]),Oe=l.useRef([]),$t=l.useRef(0),At=l.useRef(null),Ze=l.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Mt=l.useRef(null),Ht=l.useRef(null),We=l.useRef(0),yt=l.useRef("forward"),et=l.useRef(0),Xe=l.useRef(null),ot=l.useRef(!1),ut=t.length>1&&(!o||!!s),un=ut?3:1,rn=l.useMemo(()=>Array.from({length:un},()=>t).flat(),[t,un]),[Wn,nt]=l.useState(!1),[an,Vt]=l.useState(!1),[jt,ze]=l.useState(!0),vt=l.useRef(null),le=l.useRef(null),xe=l.useRef(!1),Pe=l.useRef(!1),Ne=l.useRef(null),tt=l.useRef(null),bt=se&&!jt,Te=l.useCallback(()=>{se&&(ze(!0),tt.current&&clearTimeout(tt.current),tt.current=setTimeout(()=>{Ze.current.isActive||ze(!1)},jm))},[se]),it=l.useCallback(()=>{o||Pe.current||(Pe.current=!0,Vt(!1),Ne.current=setTimeout(()=>{a()},Li))},[o,a]),De=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":bt?"true":"false",style:{width:P.scalingValue(I??0,i),height:P.scalingValue(I??0,i),marginRight:oe,"--close-icon-hover-color":v},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:it,"aria-label":"Close",children:r.jsx(nn,{url:b,fill:g,hoverFill:i&&!s?g:v,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:oe,height:"100%",pointerEvents:"auto"}})]}),rt=(d="two-row")=>r.jsx("div",{...d==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:fe(C??0),flexShrink:0,...d==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...d==="two-row"&&o?{pointerEvents:"auto"}:{}}}),pt=()=>{const d=F.find(q=>q.prefix==="title1"),f=F.filter(q=>q.prefix==="title2"||q.prefix==="title3"),x=f.length>0||o||(k??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(C??0)>0||o?rt():null,d&&ht(d,"two-row-top"),b&&De()]}),x?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[f.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[f.map(q=>ht(q,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[ft(),Ft()]})]}):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:Ge,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},kt=()=>r.jsxs(r.Fragment,{children:[(C??0)>0||o?rt("single-row"):null,F.map(d=>ht(d,"single-row")),o?r.jsxs(r.Fragment,{children:[Et(),mt()]}):null,b?De():null]}),St=l.useCallback(d=>!!(d.closest("[data-controls]")||d.closest(`.${e}-thumbnails`)||d.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Be,backdropStyle:xt,mediaAreaStyle:Ct,overlayContentStyle:wt,swipeHandlers:Dt,dismissAreaStyle:dt}=Zs({enabled:B??!1,onClose:it,animMs:Li,isBlockedTarget:St}),Ot=()=>{if(!ut||t.length===0)return $t.current=0,0;const d=Oe.current[0],f=Oe.current[t.length];if(!d||!f)return $t.current;const x=f.offsetLeft-d.offsetLeft;return x>0&&($t.current=x),$t.current},Wt=(d=!1)=>{if(!ut)return;const f=Ue.current,x=Ot();!f||x<=0||x<f.clientWidth*.25||(f.scrollLeft<=0?(f.scrollLeft+=x,d&&(Ze.current.scrollLeft+=x),ot.current&&(et.current+=x)):f.scrollLeft>=x*2&&(f.scrollLeft-=x,d&&(Ze.current.scrollLeft-=x),ot.current&&(et.current-=x)))},pn=(d,f=(x=>(x=Ue.current)==null?void 0:x.scrollLeft)()??0)=>{if(!ut)return d;let q=t.length+d,re=1/0;for(let we=0;we<un;we++){const ke=we*t.length+d,Ke=Oe.current[ke];if(!Ke)continue;const Pt=Math.abs(Ke.offsetLeft-f);Pt<re&&(re=Pt,q=ke)}return q},$n=d=>{const f=Ue.current;return!d||!f?!1:d.offsetWidth>f.clientWidth+1},mn=d=>{const f=Ue.current;if(!d||!f||!$n(d))return!1;const x=d.offsetLeft,q=x+d.offsetWidth;return f.scrollLeft>=x-1&&f.scrollLeft+f.clientWidth<=q+1},qt=(d=(f=>(f=Ue.current)==null?void 0:f.scrollLeft)()??0)=>{for(let q=0;q<Oe.current.length;q+=1){const re=Oe.current[q];if(re&&mn(re))return q}let x={flatIndex:0,distance:1/0};return Oe.current.forEach((q,re)=>{if(!q)return;const we=Math.abs(q.offsetLeft-d);we<x.distance&&(x={flatIndex:re,distance:we})}),x.flatIndex},Cn=d=>{Ue.current&&Oe.current.forEach(f=>{f&&(f.style.scrollSnapAlign=$n(f)&&d==="backward"?"end":"start")})},Xn=(d,f,x)=>{const q=d-f,re=qt(f),we=Oe.current[re];if(mn(we))return qt(d)%t.length;const ke=Oe.current[re+1],Ke=we?ke?ke.offsetLeft-we.offsetLeft:we.offsetWidth:0,Pt=Ke>0?q>Ke*lo?1:q<-Ke*lo?-1:0:0;return Pt===0?x:ut?(x+Pt+t.length)%t.length:Math.max(0,Math.min(t.length-1,x+Pt))},Yn=l.useCallback((d=!1)=>{if(w!=="on"||o)return;const f=qe.current,x=h.current,q=Je.current[x];if(!f||!q||f.scrollWidth<=f.clientWidth)return;const re=f.scrollLeft,we=re+f.clientWidth,ke=q.offsetLeft,Ke=ke+q.offsetWidth;if(ke>=re&&Ke<=we)return;const Pt=f.scrollWidth-f.clientWidth;let Tt=re;if(!d&&vt.current===null){const Zn=Je.current[x-1],wi=Je.current[x+1],Qi=Zn?q.offsetLeft-Zn.offsetLeft:wi?wi.offsetLeft-q.offsetLeft:q.offsetWidth;Ke>we?Tt+=Qi:ke<re&&(Tt-=Qi)}else Ke>we?Tt=Ke-f.clientWidth:Tt=ke;f.scrollLeft=Math.max(0,Math.min(Pt,Tt))},[o,w]),xi=l.useCallback((d=!1)=>{d&&(xe.current=!0),le.current===null&&(le.current=requestAnimationFrame(()=>{le.current=null;const f=xe.current;xe.current=!1,Yn(f)}))},[Yn]),Go=l.useCallback(d=>{if(d===h.current)return;const f=h.current;h.current=d;const x=Math.abs(d-f)>1,q=ut&&t.length>1&&(f===t.length-1&&d===0||f===0&&d===t.length-1);ue(d),xi(x||q)},[t.length,ut,xi]),Jt=()=>{if(!Ue.current||t.length===0||vt.current!==null||Ze.current.isActive&&Ze.current.hasMoved)return;const d=Ue.current.scrollLeft,f=qt(d)%t.length;f!==h.current&&Go(f)},Ui=()=>{vt.current=null},Zt=d=>{const f=Ue.current;f&&(f.style.scrollSnapType=d?"":"none")},gn=()=>{var d;(d=Ht.current)==null||d.call(Ht),Ht.current=null},Tn=()=>{Xe.current!==null&&(cancelAnimationFrame(Xe.current),Xe.current=null),ot.current=!1},Fn=()=>{const d=Ue.current;if(!d){Xe.current=null,ot.current=!1;return}const f=et.current-d.scrollLeft;if(Math.abs(f)<.5){d.scrollLeft=et.current,Wt(),Jt(),Xe.current=null,ot.current=!1;return}d.scrollLeft+=f*Dm,Wt(),Jt(),Te(),Xe.current=requestAnimationFrame(Fn)},Nn=()=>{const d=Ce.current;d&&(d.style.transition="",d.style.transform="",d.style.willChange="")},Xi=(d,f,x,q)=>{Nn(),d.scrollLeft=f,We.current=d.scrollLeft,Wt(),x!==void 0?(h.current=x,ue(x)):Jt(),Zt(!0),q==null||q()},Yi=(d,{behavior:f="smooth",activeIndex:x,onComplete:q}={})=>{const re=Ue.current,we=Ce.current;if(!re||!we)return;if(Tn(),gn(),Zt(!1),f==="auto"){Xi(re,d,x,q);return}const ke=Math.abs(d-re.scrollLeft),Ke=_m(ke,Hm,Om,re.clientWidth*.55);Ht.current=Nm(re,we,d,{duration:Ke,easing:Bm,onComplete:()=>{Ht.current=null,Xi(re,d,x,q)}})},Uo=(d="smooth")=>{const f=Ue.current;if(!f||t.length===0)return;const x=qt()%t.length,q=pn(x,f.scrollLeft),re=Oe.current[q];re&&Yi(re.offsetLeft,{behavior:d,activeIndex:x})},Xo=(d,f="smooth",x,q)=>{const re=Ue.current;if(!re||t.length===0)return;const we=(q??re.scrollLeft)-d,ke=qt(d),Ke=Oe.current[ke];if(mn(Ke)){Zt(!0),Jt();return}const Pt=Oe.current[ke+1],Tt=Ke?Pt?Pt.offsetLeft-Ke.offsetLeft:Ke.offsetWidth:0;if((Tt>0?we>Tt*lo?1:we<-Tt*lo?-1:0:0)!==0){const ol=x??ke%t.length,rl=Xn(q??re.scrollLeft,d,ol);sn(rl,f);return}const wi=q??re.scrollLeft,Qi=qt(wi),oa=Oe.current[Qi];if(oa&&Math.abs(oa.offsetLeft-wi)<1){Zt(!0),Jt();return}Uo("auto")},sn=(d,f="smooth")=>{const x=Ue.current;if(!x||t.length===0)return;const q=pn(d,x.scrollLeft),re=Oe.current[q];re&&(f==="smooth"?vt.current=d:vt.current=null,h.current=d,ue(d),xi(!0),Yi(re.offsetLeft,{behavior:f,activeIndex:d,onComplete:f==="smooth"?Ui:void 0}))},Jn=()=>{Mt.current&&(window.removeEventListener("pointerup",Mt.current),window.removeEventListener("pointercancel",Mt.current),Mt.current=null)},Ji=(d,f,x,q,re)=>{const we=x-d,ke=q-f,Ke=Math.abs(we),Pt=Math.abs(ke);if(Ke<Km||Ke<=Pt)return!1;const Tt=we<0?1:-1,Zn=ut?(re+Tt+t.length)%t.length:Math.max(0,Math.min(t.length-1,re+Tt));return Zn===re?!1:(sn(Zn),!0)},Hn=d=>{if(!Ze.current.isActive)return;Jn();const f=Ue.current;if(!f)return;const{scrollLeft:x,startActiveIndex:q,hasMoved:re}=Ze.current,we=f.scrollLeft;Wt(!0),Ze.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},nt(!1),d!==void 0&&f.hasPointerCapture(d)&&f.releasePointerCapture(d),re?Xo(x,"smooth",q,we):(Zt(!0),Jt()),Te()},Zi=(d,f)=>{const x=At.current;At.current=null,x&&(Ji(x.startX,x.startY,d,f,x.startActiveIndex),Te())},Yo=d=>{if(!Ee)return;if(d.pointerType==="touch"){if(Tn(),Zt(!0),St(d.target))return;At.current={startX:d.clientX,startY:d.clientY,startActiveIndex:h.current};return}if(d.pointerType!=="mouse"||d.button!==0||St(d.target))return;const f=Ue.current;if(!f)return;Tn(),gn(),Nn(),vt.current=null,Ze.current={isActive:!0,startX:d.clientX,scrollLeft:f.scrollLeft,startActiveIndex:h.current,hasMoved:!1},Zt(!1),Te(),f.setPointerCapture(d.pointerId),Jn();const x=q=>{q.pointerType==="mouse"&&Hn(q.pointerId)};Mt.current=x,window.addEventListener("pointerup",x),window.addEventListener("pointercancel",x)},Jo=d=>{if(!Ee||d.pointerType!=="mouse")return;const f=Ue.current;if(!f||!Ze.current.isActive)return;if(d.buttons===0){Hn(d.pointerId);return}const x=d.clientX-Ze.current.startX;Math.abs(x)>qm&&(Ze.current.hasMoved=!0,nt(!0)),Ze.current.hasMoved&&(d.preventDefault(),f.scrollLeft=Ze.current.scrollLeft-x,Wt(!0),Jt(),Te())},A=d=>{if(Ee){if(d.pointerType==="touch"){d.type==="pointerup"?Zi(d.clientX,d.clientY):At.current=null;return}d.pointerType==="mouse"&&Hn(d.pointerId)}},pe=d=>{!Ee||d.pointerType!=="mouse"||Hn(d.pointerId)};return Qs(),l.useEffect(()=>{const d=requestAnimationFrame(()=>Vt(!0));return()=>{cancelAnimationFrame(d),gn(),Jn(),le.current!==null&&(cancelAnimationFrame(le.current),le.current=null),Ne.current&&clearTimeout(Ne.current),tt.current&&clearTimeout(tt.current)}},[]),l.useEffect(()=>{if(!se){ze(!0);return}Te();const d=It.current;if(!d)return;const f=()=>Te();return d.addEventListener("pointermove",f),d.addEventListener("pointerdown",f),()=>{d.removeEventListener("pointermove",f),d.removeEventListener("pointerdown",f),tt.current&&clearTimeout(tt.current)}},[se,Te]),l.useEffect(()=>{const d=f=>{f.key==="Escape"&&it()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[it]),l.useLayoutEffect(()=>{Ot()},[O,t.length,ut]),l.useLayoutEffect(()=>{o||sn(h.current,"auto")},[O,o]),l.useLayoutEffect(()=>{sn(0,"auto")},[t.length,ut]),l.useEffect(()=>{const d=Ue.current;if(!d||o||!B)return;const f=x=>{if(x.preventDefault(),Math.abs(x.deltaY)<=Math.abs(x.deltaX))return;const q=x.deltaMode===1?Vm:x.deltaMode===2?d.clientHeight:1,re=x.deltaY*q*zm;if(re!==0){if(gn(),ot.current||(ot.current=!0,et.current=d.scrollLeft,vt.current=null,Zt(!1)),et.current+=re,!ut){const we=d.scrollWidth-d.clientWidth;et.current=Math.max(0,Math.min(we,et.current))}Te(),Xe.current===null&&(Xe.current=requestAnimationFrame(Fn))}};return d.addEventListener("wheel",f,{passive:!1}),()=>{d.removeEventListener("wheel",f),Tn()}},[o,B,ut]),l.useEffect(()=>{const d=Ue.current;if(!d)return;const f=()=>{Wt(Ze.current.isActive);const q=d.scrollLeft,re=q-We.current;We.current=q;const we=$t.current>0?$t.current*.5:1/0;if(re!==0&&Math.abs(re)<we){const ke=re>0?"forward":"backward";ke!==yt.current&&(yt.current=ke,Cn(ke))}Ze.current.isActive&&Ze.current.hasMoved||Jt()};d.addEventListener("scroll",f,{passive:!0});const x=new ResizeObserver(()=>{Ot(),Wt(Ze.current.isActive),Cn(yt.current),Jt()});return x.observe(d),()=>{gn(),d.removeEventListener("scroll",f),x.disconnect()}},[t.length,ut]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Be||it()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:an?1:0,transition:`opacity ${Li}ms ease`,pointerEvents:an?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:u,...xt}}),r.jsxs("div",{ref:It,className:`${e}-lightbox-dismiss-area`,style:dt,...Dt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Ct,onClick:d=>d.stopPropagation(),children:r.jsx("div",{ref:Ue,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":Ee&&t.length>0?"true":"false","data-mouse-dragging":Wn?"true":"false",onPointerDown:Yo,onPointerMove:Jo,onPointerUp:A,onPointerCancel:A,onLostPointerCapture:pe,children:r.jsx("div",{ref:Ce,className:`${e}-lightbox-strip-track`,style:{gap:O},children:rn.map((d,f)=>{const x=d.image.objectFit??"contain",q=f%t.length,re=Math.floor(f/t.length),we=co(O),ke=`calc(-0.5 * (${we} + ${O}))`;return r.jsxs("div",{ref:Ke=>Oe.current[f]=Ke,className:`${e}-strip-item`,style:{height:_==="mobile"?"75vh":"100%"},children:[r.jsx("img",{src:d.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:x}}),o&&q<t.length-1&&re===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:ke,width:we,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${re}-${d.image.url}-${q}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":bt?"true":"false",style:wt,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:te,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:ce,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${X?` ${e}-lightbox-content-area-stacked`:""}`,children:(_e||b)&&r.jsx("div",{className:`${e}-header ${X?`${e}-header-two-row`:`${e}-header-single-row`}`,children:X?pt():_e||b?kt():null})})})]}),t.length>1&&w==="on"&&(()=>{const d=co(Y),f=`calc(-0.5 * (${Y} + ${d}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:Y},children:r.jsx("div",{ref:qe,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:x=>x.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":S,style:{gap:Q,"--thumbnail-active-color":z},children:[t.map((x,q)=>{const re=co(Q),we=`calc(-0.5 * (${re} + ${Q}))`;return r.jsxs("div",{ref:ke=>{Je.current[q]=ke},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":W===q?"true":"false",onClick:()=>B&&T==="click"&&sn(q),onMouseEnter:()=>Fe&&T==="hover"&&sn(q),"aria-label":x.image.name?`View ${x.image.name}`:`View image ${q+1}`,"aria-current":W===q?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${Re?` ${e}-thumb-image-cover`:""}`,src:x.image.url,alt:"",draggable:!1,style:{...Ie,maxWidth:H,maxHeight:H,width:$.display==="cover"?"auto":"100%",height:"auto",objectFit:$.display==="cover"?"cover":"contain"}})}),o&&q<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:we,width:re,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${x.image.url}-${q}`)}),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:f,height:d,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function og(e){return`
9849
+ `;function En(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ya={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Pm=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Rm={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:En("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:{...Ya.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:{...Ya.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:En("Question Padding Left"),questionPaddingTop:En("Question Padding Top"),questionPaddingBottom:En("Question Padding Bottom"),answerPaddingLeft:En("Answer Padding Left"),answerPaddingRight:En("Answer Padding Right"),answerPaddingTop:En("Answer Padding Top"),answerPaddingBottom:En("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:[...Pm],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Am={element:Em,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},schema:Rm,sourceCode:Im},xn=e=>e.display==="cover",qo=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Ja=100,Mm=.2,Za=8,Zs=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=l.useState(0),[a,u]=l.useState(!1),c=l.useRef(null),m=l.useRef(0);m.current=o;const p=l.useMemo(()=>typeof window>"u"?Ja:Math.max(Ja,window.innerHeight*Mm),[]),R=l.useCallback(y=>Math.max(0,1-y/(p*1.5)),[p]),x=l.useCallback(y=>Math.max(0,1-y/(p*.45)),[p]),I=l.useCallback(y=>{const k=typeof window<"u"?window.innerHeight:800,_=Math.max(.88,1-y/k*.12);return`translateY(${y}px) scale(${_})`},[]),g=l.useCallback(()=>{c.current=null},[]),v=l.useCallback(()=>{u(!0),s(0),window.setTimeout(()=>u(!1),n),g()},[n,g]),T=l.useCallback(()=>{const y=typeof window<"u"?window.innerHeight:800;u(!0),s(y),window.setTimeout(()=>{t(),g(),u(!1)},Math.min(n,200))},[n,t,g]),w=l.useCallback(y=>{!e||a||y.pointerType==="touch"&&(i!=null&&i(y.target)||(c.current={startX:y.clientX,startY:y.clientY,isLocked:null,pointerId:y.pointerId}))},[e,a,i]),$=l.useCallback(y=>{const k=c.current;if(!e||!k||y.pointerType!=="touch"||k.pointerId!==y.pointerId)return;const _=y.clientX-k.startX,D=y.clientY-k.startY;if(k.isLocked===null){if(Math.abs(_)<Za&&Math.abs(D)<Za)return;if(D>0&&D>Math.abs(_))k.isLocked=!0,y.currentTarget.setPointerCapture(y.pointerId);else{k.isLocked=!1,g();return}}if(!k.isLocked)return;y.preventDefault();const ne=Math.max(0,D);m.current=ne,s(ne)},[e,g]),S=l.useCallback(y=>{const k=c.current;if(!e||!k||y.pointerType!=="touch"||k.pointerId!==y.pointerId)return;const _=k.isLocked===!0;if(y.currentTarget.hasPointerCapture(y.pointerId)&&y.currentTarget.releasePointerCapture(y.pointerId),!_){g();return}y.clientY-k.startY>=p?T():v()},[p,T,e,g,v]),O=l.useCallback(y=>{S(y)},[S]),M=l.useCallback(y=>{S(y)},[S]),H=o>0,L=a?`transform ${n}ms ease`:"none",C=a?`opacity ${n}ms ease`:"none",J=o>0||a;return{isSwipeDragging:H,backdropStyle:{opacity:R(o),transition:C},mediaAreaStyle:{transform:I(o),transition:L,touchAction:H?"none":void 0,willChange:H?"transform":void 0},overlayContentStyle:J?{opacity:x(o),transition:C}:void 0,swipeHandlers:e?{onPointerDown:w,onPointerMove:$,onPointerUp:O,onPointerCancel:M}:{},dismissAreaStyle:e?{touchAction:H?"none":"pan-x"}:void 0}},km="[data-lightbox-scrollable]",Qs=()=>{l.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const a=u=>{const c=u.target;c instanceof Element&&c.closest(km)||u.preventDefault()};return document.addEventListener("touchmove",a,{passive:!1}),()=>{document.removeEventListener("touchmove",a),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo(0,e)}},[])},_m=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Wm=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Fm=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Nm=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const a=e.scrollLeft,u=n-a,c=a-n,m=(g,v)=>{Wm(t),e.scrollLeft=g,v&&(s==null||s())};if(Math.abs(u)<.5)return m(n,!0),()=>{};let p=!1,R=0;const x=()=>{t.removeEventListener("transitionend",I),clearTimeout(R)},I=g=>{g.target!==t||g.propertyName!=="transform"||p||(p=!0,x(),m(n,!0))};return t.addEventListener("transitionend",I),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)`,R=window.setTimeout(()=>{p||(p=!0,x(),m(n,!0))},i+64),()=>{p||(p=!0,x(),m(a-Fm(t),!1))}},Li=300,Hm=900,Om=1500,Bm="cubic-bezier(0.16, 1, 0.3, 1)",jm=3e3,zm=2,Vm=16,Dm=.05,qm=1,lo=.3,Km=50,Gm=20,ei=.004,Ki=["title1","title2","title3"],Um={title1:"1",title2:"2",title3:"3"},Xm={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Ym={title1:.02,title2:.02,title3:.02},co=e=>`max(${e}, ${Gm}px)`,Jm=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]}},Zm=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=Jm(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},lt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Qm=e=>[lt(e,"fontFamily"),lt(e,"fontSettings"),{type:"row",items:[lt(e,"fontSize"),lt(e,"lineHeight"),lt(e,"letterSpacing"),lt(e,"wordSpacing")]},lt(e,"textAlign"),lt(e,"textAppearance")],eg=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ki.map(e=>[Um[e],Qm(e)]))}),ta=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},u)=>{if(s<=0||u<=0)return{overflow:s,widths:[u,...a]};const c=Math.min(s,u);return{overflow:s-c,widths:[u-c,...a]}},{overflow:i-1,widths:[]});return o},el=(e,t)=>ta(e,t),uo=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Qa=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:ta(e.length,n),effective:el(e.length,n)}},tg=(e,t,n,i,o,s,a)=>{const u=[];return t&&u.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&u.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&u.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:a,text:i}),u},pr=(e,t)=>{const n=i=>{const o=lt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Xm[t]]}},ng=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),mr=(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??Ym[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Rt(i,n)},ig=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:a})=>{const{backgroundColor:u,thumbnailSize:c,thumbnailGap:m,thumbnailMarginBottom:p,imageGap:R,closeIcon:x,closeIconMaxWidth:I,closeIconColor:g,closeIconHoverColor:v,thumbnailTrigger:T,thumbnailVisibility:w,thumbnailObjectFit:$,thumbnailActive:S,thumbnailActiveColor:O,title1Width:M,title2Width:H,title3Width:L,title1MarginLeft:C=0,title2MarginLeft:J=0,title3MarginLeft:y=0,titleRowMarginBottom:k=0,titleHeaderLayout:_="desktop",contentMarginTop:D,iconMarginLeft:ne}=n,me=d=>P.scalingValue(d,i??!1),K=c??n.thumnailSize??.03,F=me(K),Q=me(m),Y=me(p??.02),B=me(R??0),te=me(D??0),de=co(te),re=me(ne??0),[W,pe]=l.useState(0),h=l.useRef(W);h.current=W;const ae=t[W],{title1:be,title2:ye,title3:Ae}=Zm(ae),Z=mr("title1",pr(n,"title1"),i),ge=mr("title2",pr(n,"title2"),i),X=mr("title3",pr(n,"title3"),i),U=_==="mobile",j=!o&&(!i||s),se=j,Ee=j,Fe=j,Re=xn($),Ie=Re?{"--image-aspect-ratio":qo($)}:void 0,_e=!!(be||ye||Ae),N=l.useMemo(()=>tg(e,be,ye,Ae,Z,ge,X),[e,W,be,ye,Ae,Z,ge,X]),q=l.useMemo(()=>({title1Width:M,title2Width:H,title3Width:L}),[M,H,L]),E=l.useMemo(()=>N.map(d=>q[d.widthKey]),[N,q]),z=l.useMemo(()=>ta(N.length,E),[N.length,E]),G=l.useMemo(()=>el(N.length,E),[N.length,E]),ee=l.useMemo(()=>N.filter(d=>d.prefix==="title1"),[N]),ie=l.useMemo(()=>N.filter(d=>d.prefix==="title2"||d.prefix==="title3"),[N]),he=l.useMemo(()=>Qa(ee,q),[ee,q]),Se=l.useMemo(()=>Qa(ie,q),[ie,q]),$e=l.useCallback((d,f)=>{const b=N.indexOf(d);if(!U||f==="single-row")return{effectiveWidth:G[b]??0,resolvedWidth:z[b]??0,maxWidth:uo(b,z)};if(f==="two-row-top"){const oe=ee.indexOf(d);return{effectiveWidth:he.effective[oe]??0,resolvedWidth:he.resolved[oe]??0,maxWidth:uo(oe,he.resolved)}}const V=ie.indexOf(d);return{effectiveWidth:Se.effective[V]??0,resolvedWidth:Se.resolved[V]??0,maxWidth:uo(V,Se.resolved)}},[ie,Se,G,z,N,ee,he,U]),fe=l.useCallback(d=>P.scalingValue(d,i??!1),[i]),Ge=fe(k??0),ue=l.useMemo(()=>({title1MarginLeft:C,title2MarginLeft:J,title3MarginLeft:y}),[C,J,y]),Me=l.useCallback(d=>N.slice(0,d+1).reduce((f,b,V)=>f+(b!=null&&b.marginLeftKey?ue[b.marginLeftKey]??0:0)+(z[V]??0),0)+(U?0:C??0),[N,ue,z,U,C]),ze=l.useCallback(()=>U?0:C??0,[U,C]),De=l.useCallback(d=>ie.slice(0,d).reduce((f,b,V)=>f+(b.marginLeftKey?ue[b.marginLeftKey]??0:0)+(Se.resolved[V]??0),0),[ie,Se.resolved,ue]),at=l.useCallback(d=>{const f=ie[d];return De(d)+(f.marginLeftKey?ue[f.marginLeftKey]??0:0)+(Se.resolved[d]??0)},[ie,Se.resolved,De,ue]),ht=(d,f)=>{const b=d.marginLeftKey?ue[d.marginLeftKey]??0:0,{effectiveWidth:V,resolvedWidth:oe,maxWidth:xe}=$e(d,f),ke=o&&f==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":d.prefix,style:{...f==="single-row"?{gridArea:d.prefix}:{},width:fe(V),...b>0?{marginLeft:fe(b)}:{}},children:[r.jsx("p",{className:d.className,style:d.style,children:d.text}),ke&&d.marginLeftKey&&r.jsx("div",{"data-controls":d.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(oe),style:{position:"absolute",top:0,left:fe(-b),width:`max(${fe(b)}, 10px)`,height:"100%",pointerEvents:"auto"}}),ke&&r.jsx("div",{"data-controls":d.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(xe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:fe(-ei/2),width:fe(ei),height:"100%",pointerEvents:"auto"}})]},d.className)},Et=()=>{const d=U?-1:N.findIndex(V=>V.prefix==="title1"),f=!U&&(o||(C??0)>0)?(()=>{const V=C??0,oe=d>=0?z[d]:M??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(oe),style:{position:"absolute",top:0,left:0,width:`max(${fe(V)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,b=N.flatMap((V,oe)=>{if(!V.marginLeftKey)return[];const xe=ue[V.marginLeftKey]??0,ke=ng(N,z,ue,oe)+ze();return r.jsx("div",{"data-controls":V.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(z[oe]),style:{position:"absolute",top:0,left:fe(ke),width:`max(${fe(xe)}, 10px)`,height:"100%",pointerEvents:"auto"}},V.marginLeftKey)});return f?[f,...b]:b},mt=()=>N.map((d,f)=>{const b=uo(f,z),oe=Me(f)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":d.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:fe(oe),width:fe(ei),height:"100%",pointerEvents:"auto"}})},`${d.widthKey}-junction`)}),ft=()=>ie.flatMap((d,f)=>{if(!d.marginLeftKey)return[];const b=ue[d.marginLeftKey]??0,V=De(f),{resolvedWidth:oe}=$e(d,"two-row-bottom");return r.jsx("div",{"data-controls":d.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(oe),style:{position:"absolute",top:0,left:fe(V),width:`max(${fe(b)}, 10px)`,height:"100%",pointerEvents:"auto"}},d.marginLeftKey)}),Ft=()=>ie.map((d,f)=>{const{maxWidth:b}=$e(d,"two-row-bottom"),oe=at(f)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":d.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:fe(oe),width:fe(ei),height:"100%",pointerEvents:"auto"}})},`${d.widthKey}-junction`)}),It=l.useRef(null),Ue=l.useRef(null),Te=l.useRef(null),qe=l.useRef(null),Je=l.useRef([]),Oe=l.useRef([]),$t=l.useRef(0),At=l.useRef(null),Ze=l.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Mt=l.useRef(null),Ht=l.useRef(null),We=l.useRef(0),yt=l.useRef("forward"),et=l.useRef(0),Xe=l.useRef(null),ot=l.useRef(!1),pt=t.length>1&&(!o||!!s),un=pt?3:1,rn=l.useMemo(()=>Array.from({length:un},()=>t).flat(),[t,un]),[Wn,nt]=l.useState(!1),[an,Vt]=l.useState(!1),[jt,Ve]=l.useState(!0),vt=l.useRef(null),le=l.useRef(null),we=l.useRef(!1),Pe=l.useRef(!1),Ne=l.useRef(null),tt=l.useRef(null),bt=se&&!jt,Ce=l.useCallback(()=>{se&&(Ve(!0),tt.current&&clearTimeout(tt.current),tt.current=setTimeout(()=>{Ze.current.isActive||Ve(!1)},jm))},[se]),it=l.useCallback(()=>{o||Pe.current||(Pe.current=!0,Vt(!1),Ne.current=setTimeout(()=>{a()},Li))},[o,a]),Be=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":bt?"true":"false",style:{width:P.scalingValue(I??0,i),height:P.scalingValue(I??0,i),marginRight:re,"--close-icon-hover-color":v},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:it,"aria-label":"Close",children:r.jsx(nn,{url:x,fill:g,hoverFill:i&&!s?g:v,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:re,height:"100%",pointerEvents:"auto"}})]}),rt=(d="two-row")=>r.jsx("div",{...d==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:fe(C??0),flexShrink:0,...d==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...d==="two-row"&&o?{pointerEvents:"auto"}:{}}}),st=()=>{const d=N.find(V=>V.prefix==="title1"),f=N.filter(V=>V.prefix==="title2"||V.prefix==="title3"),b=f.length>0||o||(k??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(C??0)>0||o?rt():null,d&&ht(d,"two-row-top"),x&&Be()]}),b?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[f.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[f.map(V=>ht(V,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[ft(),Ft()]})]}):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:Ge,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},kt=()=>r.jsxs(r.Fragment,{children:[(C??0)>0||o?rt("single-row"):null,N.map(d=>ht(d,"single-row")),o?r.jsxs(r.Fragment,{children:[Et(),mt()]}):null,x?Be():null]}),St=l.useCallback(d=>!!(d.closest("[data-controls]")||d.closest(`.${e}-thumbnails`)||d.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:je,backdropStyle:xt,mediaAreaStyle:Ct,overlayContentStyle:wt,swipeHandlers:Dt,dismissAreaStyle:ut}=Zs({enabled:j??!1,onClose:it,animMs:Li,isBlockedTarget:St}),Ot=()=>{if(!pt||t.length===0)return $t.current=0,0;const d=Oe.current[0],f=Oe.current[t.length];if(!d||!f)return $t.current;const b=f.offsetLeft-d.offsetLeft;return b>0&&($t.current=b),$t.current},Wt=(d=!1)=>{if(!pt)return;const f=Ue.current,b=Ot();!f||b<=0||b<f.clientWidth*.25||(f.scrollLeft<=0?(f.scrollLeft+=b,d&&(Ze.current.scrollLeft+=b),ot.current&&(et.current+=b)):f.scrollLeft>=b*2&&(f.scrollLeft-=b,d&&(Ze.current.scrollLeft-=b),ot.current&&(et.current-=b)))},pn=(d,f=(b=>(b=Ue.current)==null?void 0:b.scrollLeft)()??0)=>{if(!pt)return d;let V=t.length+d,oe=1/0;for(let xe=0;xe<un;xe++){const ke=xe*t.length+d,Ke=Oe.current[ke];if(!Ke)continue;const Pt=Math.abs(Ke.offsetLeft-f);Pt<oe&&(oe=Pt,V=ke)}return V},$n=d=>{const f=Ue.current;return!d||!f?!1:d.offsetWidth>f.clientWidth+1},mn=d=>{const f=Ue.current;if(!d||!f||!$n(d))return!1;const b=d.offsetLeft,V=b+d.offsetWidth;return f.scrollLeft>=b-1&&f.scrollLeft+f.clientWidth<=V+1},qt=(d=(f=>(f=Ue.current)==null?void 0:f.scrollLeft)()??0)=>{for(let V=0;V<Oe.current.length;V+=1){const oe=Oe.current[V];if(oe&&mn(oe))return V}let b={flatIndex:0,distance:1/0};return Oe.current.forEach((V,oe)=>{if(!V)return;const xe=Math.abs(V.offsetLeft-d);xe<b.distance&&(b={flatIndex:oe,distance:xe})}),b.flatIndex},Cn=d=>{Ue.current&&Oe.current.forEach(f=>{f&&(f.style.scrollSnapAlign=$n(f)&&d==="backward"?"end":"start")})},Xn=(d,f,b)=>{const V=d-f,oe=qt(f),xe=Oe.current[oe];if(mn(xe))return qt(d)%t.length;const ke=Oe.current[oe+1],Ke=xe?ke?ke.offsetLeft-xe.offsetLeft:xe.offsetWidth:0,Pt=Ke>0?V>Ke*lo?1:V<-Ke*lo?-1:0:0;return Pt===0?b:pt?(b+Pt+t.length)%t.length:Math.max(0,Math.min(t.length-1,b+Pt))},Yn=l.useCallback((d=!1)=>{if(w!=="on"||o)return;const f=qe.current,b=h.current,V=Je.current[b];if(!f||!V||f.scrollWidth<=f.clientWidth)return;const oe=f.scrollLeft,xe=oe+f.clientWidth,ke=V.offsetLeft,Ke=ke+V.offsetWidth;if(ke>=oe&&Ke<=xe)return;const Pt=f.scrollWidth-f.clientWidth;let Tt=oe;if(!d&&vt.current===null){const Zn=Je.current[b-1],wi=Je.current[b+1],Qi=Zn?V.offsetLeft-Zn.offsetLeft:wi?wi.offsetLeft-V.offsetLeft:V.offsetWidth;Ke>xe?Tt+=Qi:ke<oe&&(Tt-=Qi)}else Ke>xe?Tt=Ke-f.clientWidth:Tt=ke;f.scrollLeft=Math.max(0,Math.min(Pt,Tt))},[o,w]),xi=l.useCallback((d=!1)=>{d&&(we.current=!0),le.current===null&&(le.current=requestAnimationFrame(()=>{le.current=null;const f=we.current;we.current=!1,Yn(f)}))},[Yn]),Uo=l.useCallback(d=>{if(d===h.current)return;const f=h.current;h.current=d;const b=Math.abs(d-f)>1,V=pt&&t.length>1&&(f===t.length-1&&d===0||f===0&&d===t.length-1);pe(d),xi(b||V)},[t.length,pt,xi]),Jt=()=>{if(!Ue.current||t.length===0||vt.current!==null||Ze.current.isActive&&Ze.current.hasMoved)return;const d=Ue.current.scrollLeft,f=qt(d)%t.length;f!==h.current&&Uo(f)},Ui=()=>{vt.current=null},Zt=d=>{const f=Ue.current;f&&(f.style.scrollSnapType=d?"":"none")},gn=()=>{var d;(d=Ht.current)==null||d.call(Ht),Ht.current=null},Tn=()=>{Xe.current!==null&&(cancelAnimationFrame(Xe.current),Xe.current=null),ot.current=!1},Fn=()=>{const d=Ue.current;if(!d){Xe.current=null,ot.current=!1;return}const f=et.current-d.scrollLeft;if(Math.abs(f)<.5){d.scrollLeft=et.current,Wt(),Jt(),Xe.current=null,ot.current=!1;return}d.scrollLeft+=f*Dm,Wt(),Jt(),Ce(),Xe.current=requestAnimationFrame(Fn)},Nn=()=>{const d=Te.current;d&&(d.style.transition="",d.style.transform="",d.style.willChange="")},Xi=(d,f,b,V)=>{Nn(),d.scrollLeft=f,We.current=d.scrollLeft,Wt(),b!==void 0?(h.current=b,pe(b)):Jt(),Zt(!0),V==null||V()},Yi=(d,{behavior:f="smooth",activeIndex:b,onComplete:V}={})=>{const oe=Ue.current,xe=Te.current;if(!oe||!xe)return;if(Tn(),gn(),Zt(!1),f==="auto"){Xi(oe,d,b,V);return}const ke=Math.abs(d-oe.scrollLeft),Ke=_m(ke,Hm,Om,oe.clientWidth*.55);Ht.current=Nm(oe,xe,d,{duration:Ke,easing:Bm,onComplete:()=>{Ht.current=null,Xi(oe,d,b,V)}})},Xo=(d="smooth")=>{const f=Ue.current;if(!f||t.length===0)return;const b=qt()%t.length,V=pn(b,f.scrollLeft),oe=Oe.current[V];oe&&Yi(oe.offsetLeft,{behavior:d,activeIndex:b})},Yo=(d,f="smooth",b,V)=>{const oe=Ue.current;if(!oe||t.length===0)return;const xe=(V??oe.scrollLeft)-d,ke=qt(d),Ke=Oe.current[ke];if(mn(Ke)){Zt(!0),Jt();return}const Pt=Oe.current[ke+1],Tt=Ke?Pt?Pt.offsetLeft-Ke.offsetLeft:Ke.offsetWidth:0;if((Tt>0?xe>Tt*lo?1:xe<-Tt*lo?-1:0:0)!==0){const ol=b??ke%t.length,rl=Xn(V??oe.scrollLeft,d,ol);sn(rl,f);return}const wi=V??oe.scrollLeft,Qi=qt(wi),oa=Oe.current[Qi];if(oa&&Math.abs(oa.offsetLeft-wi)<1){Zt(!0),Jt();return}Xo("auto")},sn=(d,f="smooth")=>{const b=Ue.current;if(!b||t.length===0)return;const V=pn(d,b.scrollLeft),oe=Oe.current[V];oe&&(f==="smooth"?vt.current=d:vt.current=null,h.current=d,pe(d),xi(!0),Yi(oe.offsetLeft,{behavior:f,activeIndex:d,onComplete:f==="smooth"?Ui:void 0}))},Jn=()=>{Mt.current&&(window.removeEventListener("pointerup",Mt.current),window.removeEventListener("pointercancel",Mt.current),Mt.current=null)},Ji=(d,f,b,V,oe)=>{const xe=b-d,ke=V-f,Ke=Math.abs(xe),Pt=Math.abs(ke);if(Ke<Km||Ke<=Pt)return!1;const Tt=xe<0?1:-1,Zn=pt?(oe+Tt+t.length)%t.length:Math.max(0,Math.min(t.length-1,oe+Tt));return Zn===oe?!1:(sn(Zn),!0)},Hn=d=>{if(!Ze.current.isActive)return;Jn();const f=Ue.current;if(!f)return;const{scrollLeft:b,startActiveIndex:V,hasMoved:oe}=Ze.current,xe=f.scrollLeft;Wt(!0),Ze.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},nt(!1),d!==void 0&&f.hasPointerCapture(d)&&f.releasePointerCapture(d),oe?Yo(b,"smooth",V,xe):(Zt(!0),Jt()),Ce()},Zi=(d,f)=>{const b=At.current;At.current=null,b&&(Ji(b.startX,b.startY,d,f,b.startActiveIndex),Ce())},Jo=d=>{if(!Ee)return;if(d.pointerType==="touch"){if(Tn(),Zt(!0),St(d.target))return;At.current={startX:d.clientX,startY:d.clientY,startActiveIndex:h.current};return}if(d.pointerType!=="mouse"||d.button!==0||St(d.target))return;const f=Ue.current;if(!f)return;Tn(),gn(),Nn(),vt.current=null,Ze.current={isActive:!0,startX:d.clientX,scrollLeft:f.scrollLeft,startActiveIndex:h.current,hasMoved:!1},Zt(!1),Ce(),f.setPointerCapture(d.pointerId),Jn();const b=V=>{V.pointerType==="mouse"&&Hn(V.pointerId)};Mt.current=b,window.addEventListener("pointerup",b),window.addEventListener("pointercancel",b)},Zo=d=>{if(!Ee||d.pointerType!=="mouse")return;const f=Ue.current;if(!f||!Ze.current.isActive)return;if(d.buttons===0){Hn(d.pointerId);return}const b=d.clientX-Ze.current.startX;Math.abs(b)>qm&&(Ze.current.hasMoved=!0,nt(!0)),Ze.current.hasMoved&&(d.preventDefault(),f.scrollLeft=Ze.current.scrollLeft-b,Wt(!0),Jt(),Ce())},A=d=>{if(Ee){if(d.pointerType==="touch"){d.type==="pointerup"?Zi(d.clientX,d.clientY):At.current=null;return}d.pointerType==="mouse"&&Hn(d.pointerId)}},ce=d=>{!Ee||d.pointerType!=="mouse"||Hn(d.pointerId)};return Qs(),l.useEffect(()=>{const d=requestAnimationFrame(()=>Vt(!0));return()=>{cancelAnimationFrame(d),gn(),Jn(),le.current!==null&&(cancelAnimationFrame(le.current),le.current=null),Ne.current&&clearTimeout(Ne.current),tt.current&&clearTimeout(tt.current)}},[]),l.useEffect(()=>{if(!se){Ve(!0);return}Ce();const d=It.current;if(!d)return;const f=()=>Ce();return d.addEventListener("pointermove",f),d.addEventListener("pointerdown",f),()=>{d.removeEventListener("pointermove",f),d.removeEventListener("pointerdown",f),tt.current&&clearTimeout(tt.current)}},[se,Ce]),l.useEffect(()=>{const d=f=>{f.key==="Escape"&&it()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[it]),l.useLayoutEffect(()=>{Ot()},[B,t.length,pt]),l.useLayoutEffect(()=>{o||sn(h.current,"auto")},[B,o]),l.useLayoutEffect(()=>{sn(0,"auto")},[t.length,pt]),l.useEffect(()=>{const d=Ue.current;if(!d||o||!j)return;const f=b=>{if(b.preventDefault(),Math.abs(b.deltaY)<=Math.abs(b.deltaX))return;const V=b.deltaMode===1?Vm:b.deltaMode===2?d.clientHeight:1,oe=b.deltaY*V*zm;if(oe!==0){if(gn(),ot.current||(ot.current=!0,et.current=d.scrollLeft,vt.current=null,Zt(!1)),et.current+=oe,!pt){const xe=d.scrollWidth-d.clientWidth;et.current=Math.max(0,Math.min(xe,et.current))}Ce(),Xe.current===null&&(Xe.current=requestAnimationFrame(Fn))}};return d.addEventListener("wheel",f,{passive:!1}),()=>{d.removeEventListener("wheel",f),Tn()}},[o,j,pt]),l.useEffect(()=>{const d=Ue.current;if(!d)return;const f=()=>{Wt(Ze.current.isActive);const V=d.scrollLeft,oe=V-We.current;We.current=V;const xe=$t.current>0?$t.current*.5:1/0;if(oe!==0&&Math.abs(oe)<xe){const ke=oe>0?"forward":"backward";ke!==yt.current&&(yt.current=ke,Cn(ke))}Ze.current.isActive&&Ze.current.hasMoved||Jt()};d.addEventListener("scroll",f,{passive:!0});const b=new ResizeObserver(()=>{Ot(),Wt(Ze.current.isActive),Cn(yt.current),Jt()});return b.observe(d),()=>{gn(),d.removeEventListener("scroll",f),b.disconnect()}},[t.length,pt]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{je||it()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:an?1:0,transition:`opacity ${Li}ms ease`,pointerEvents:an?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:u,...xt}}),r.jsxs("div",{ref:It,className:`${e}-lightbox-dismiss-area`,style:ut,...Dt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Ct,onClick:d=>d.stopPropagation(),children:r.jsx("div",{ref:Ue,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":Ee&&t.length>0?"true":"false","data-mouse-dragging":Wn?"true":"false",onPointerDown:Jo,onPointerMove:Zo,onPointerUp:A,onPointerCancel:A,onLostPointerCapture:ce,children:r.jsx("div",{ref:Te,className:`${e}-lightbox-strip-track`,style:{gap:B},children:rn.map((d,f)=>{const b=d.image.objectFit??"contain",V=f%t.length,oe=Math.floor(f/t.length),xe=co(B),ke=`calc(-0.5 * (${xe} + ${B}))`;return r.jsxs("div",{ref:Ke=>Oe.current[f]=Ke,className:`${e}-strip-item`,style:{height:_==="mobile"?"75vh":"100%"},children:[r.jsx("img",{src:d.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:b}}),o&&V<t.length-1&&oe===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:ke,width:xe,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${oe}-${d.image.url}-${V}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":bt?"true":"false",style:wt,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:te,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:de,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${U?` ${e}-lightbox-content-area-stacked`:""}`,children:(_e||x)&&r.jsx("div",{className:`${e}-header ${U?`${e}-header-two-row`:`${e}-header-single-row`}`,children:U?st():_e||x?kt():null})})})]}),t.length>1&&w==="on"&&(()=>{const d=co(Y),f=`calc(-0.5 * (${Y} + ${d}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:Y},children:r.jsx("div",{ref:qe,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:b=>b.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":S,style:{gap:Q,"--thumbnail-active-color":O},children:[t.map((b,V)=>{const oe=co(Q),xe=`calc(-0.5 * (${oe} + ${Q}))`;return r.jsxs("div",{ref:ke=>{Je.current[V]=ke},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":W===V?"true":"false",onClick:()=>j&&T==="click"&&sn(V),onMouseEnter:()=>Fe&&T==="hover"&&sn(V),"aria-label":b.image.name?`View ${b.image.name}`:`View image ${V+1}`,"aria-current":W===V?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${Re?` ${e}-thumb-image-cover`:""}`,src:b.image.url,alt:"",draggable:!1,style:{...Ie,maxWidth:F,maxHeight:F,width:$.display==="cover"?"auto":"100%",height:"auto",objectFit:$.display==="cover"?"cover":"contain"}})}),o&&V<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:xe,width:oe,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${b.image.url}-${V}`)}),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:f,height:d,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function og(e){return`
9841
9850
  .${e}-wrapper {
9842
9851
  position: relative;
9843
9852
  width: 100%;
@@ -10229,7 +10238,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
10229
10238
  pointer-events: auto;
10230
10239
  z-index: 10;
10231
10240
  }
10232
- `}const rg=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s})=>{const{prefix:a}=P.useScopedStyles(),{cover:u,coverFit:c}=e,m=l.useRef(null),[p,R]=l.useState(!1),b=t??[],I=p&&b.length>0,g=()=>{b.length!==0&&R(!0)};return l.useEffect(()=>{!n||i||o||R(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:m,className:`${a}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:og(a)}}),u&&r.jsx("div",{className:`${a}-cover ${xn(c)?`${a}-ratio-wrapper-cover`:`${a}-ratio-wrapper-fit`}`,onClick:()=>g(),style:{...xn(c)?{"--image-aspect-ratio":Do(c)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${a}-cover-image ${xn(c)?`${a}-cover-image-cover`:`${a}-cover-image-fit`}`,src:u,alt:"cover"})})]}),I&&typeof document<"u"&&(()=>{const v=(s?document.getElementById(s):null)??document.body;return Ni.createPortal(r.jsx(ig,{prefix:a,images:b,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>R(!1)}),v)})()]})},ag=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
10241
+ `}const rg=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s})=>{const{prefix:a}=P.useScopedStyles(),{cover:u,coverFit:c}=e,m=l.useRef(null),[p,R]=l.useState(!1),x=t??[],I=p&&x.length>0,g=()=>{x.length!==0&&R(!0)};return l.useEffect(()=>{!n||i||o||R(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:m,className:`${a}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:og(a)}}),u&&r.jsx("div",{className:`${a}-cover ${xn(c)?`${a}-ratio-wrapper-cover`:`${a}-ratio-wrapper-fit`}`,onClick:()=>g(),style:{...xn(c)?{"--image-aspect-ratio":qo(c)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${a}-cover-image ${xn(c)?`${a}-cover-image-cover`:`${a}-cover-image-fit`}`,src:u,alt:"cover"})})]}),I&&typeof document<"u"&&(()=>{const v=(s?document.getElementById(s):null)??document.body;return Ni.createPortal(r.jsx(ig,{prefix:a,images:x,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>R(!1)}),v)})()]})},ag=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
10233
10242
  import { createPortal } from 'react-dom';
10234
10243
  import { CommonComponentProps } from '../props';
10235
10244
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -10783,7 +10792,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
10783
10792
  </>
10784
10793
  );
10785
10794
  };
10786
- `,sg="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>'),zn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",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 lg(e){const t={};return t[st(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[st(e,"fontSettings")]={...zn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[st(e,"fontSize")]={...zn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[st(e,"lineHeight")]={...zn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[st(e,"letterSpacing")]={...zn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[st(e,"wordSpacing")]={...zn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[st(e,"textAlign")]={...zn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[st(e,"textAppearance")]={...zn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const cg=Ki.reduce((e,t)=>({...e,...lg(t)}),{}),dg=Ki.reduce((e,t)=>({...e,[st(t,"fontFamily")]:"Goudy Bookletter 1911",[st(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[st(t,"letterSpacing")]:0,[st(t,"wordSpacing")]:0,[st(t,"textAlign")]:"left",[st(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function es(e){return Ki.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[st(n,"fontSize")]=i),o!==void 0&&(t[st(n,"lineHeight")]=o),t},{})}const ug=eg(),pg={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:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up"]}},thumbnailActiveColor:{type:"string",scope:"common",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},...cg,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/lightbox_strip_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:sg,closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",...dg},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"#FFFFFF",contentMarginTop:.08,iconMarginLeft:.02,...es({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"#FFFFFF",contentMarginTop:.015,iconMarginLeft:.02,...es({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:[ug]}],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/lightbox_strip_2.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_3.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_4.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_5.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_6.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_7.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"}]}},mg={element:rg,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:pg,sourceCode:ag,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Ki.map(e=>({path:`styles.${st(e,"fontSettings")}`}))}},gg=50,ts=10,na="cntrl-lightbox-journal",qo=na,Lr=`${na}-`,Ko=e=>`${na}-${e}`,ia=e=>e===qo||e.startsWith(Lr),ns=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},is=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=ns(t.get(Ko(e)));if(i)return i}const n=ns(t.get(qo));if(n)return n;for(const[i]of t){if(!i.startsWith(Lr))continue;const o=i.slice(Lr.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},os=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},tl=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(a=>{ia(a)&&i.searchParams.delete(a)}),t?i.searchParams.set(Ko(t),String(e)):i.searchParams.set(qo,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},hg=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Ko(e)||i===qo:ia(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)}},nl=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Ko(e)):[...t.keys()].some(n=>ia(n))},fg=(e,t)=>{if(nl(t)){if(e){window.history.back();return}hg(t)}},yg=20,vg=2,mr=e=>`max(${e}, ${yg}px)`,hi=e=>((e==null?void 0:e.image)??[]).slice(0,vg),il=e=>e.reduce((t,n)=>t+hi(n).length,0),bg=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+hi(s).length,1),i=hi(e[t]).length;return{start:n,end:n+i-1}},xg=(e,t)=>{const n=il(e),{start:i,end:o}=bg(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},$o=(e,t)=>t==="B"?e.flatMap((n,i)=>hi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:hi(n)})),wg=(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 xg(i,o)},rs=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Sg=(e,t,n)=>e==="B"?t.length>1:il(n)>1,ti=.004,gr=.004,hr={title1Width:.13,title2Width:.13,title3Width:.14},po=(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},Ro=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},u)=>{if(s<=0||u<=0)return{overflow:s,widths:[u,...a]};const c=Math.min(s,u);return{overflow:s-c,widths:[u-c,...a]}},{overflow:i-1,widths:[]});return o},Er=(e,t)=>Ro(e,t),Vn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},mo=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ro(e.length,n),effective:Er(e.length,n)}},$g=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Cg=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Gi=["title1","title2","title3","count"],lt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Tg={title1:"1",title2:"2",title3:"3",count:"Count"},Lg=e=>[lt(e,"fontFamily"),lt(e,"fontSettings"),{type:"row",items:[lt(e,"fontSize"),lt(e,"lineHeight"),lt(e,"letterSpacing"),lt(e,"wordSpacing")]},lt(e,"textAlign"),lt(e,"textAppearance")],Eg=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Gi.map(e=>[Tg[e],Lg(e)]))}),Ig={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Pg={title1:.02,title2:.02,title3:.02,count:.017},go=(e,t)=>{const n=i=>{const o=lt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Ig[t]]}},ho=(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??Pg[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Rt(i,n)},Rg=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:a=0,enableUrlSync:u=!1,journalItemId:c=null,onBeforeClose:m,onClose:p})=>{const{type:R,coverFit:b,backgroundColor:I,imageGap:g,maxWidth:v,maxHeight:T,textTransition:w,title1Width:$,title2Width:S,title3Width:z,title1MarginLeft:M=0,title2MarginLeft:N=0,title3MarginLeft:L=0,titleRowMarginBottom:C=0,titleHeaderLayout:J="single-row",countCloseGap:y=0,closeIcon:k,closeIconMaxWidth:_,closeIconColor:V,closeIconHoverColor:ne,contentMarginTop:me=0,iconMarginRight:K=0}=n,H=l.useCallback(A=>P.scalingValue(A,i??!1),[i]),Q=H(g??0),Y=`${v}%`,O=`${T}%`,te=H(y),ce=H(me),oe=H(K),W=ho("title1",go(n,"title1"),i),ue=ho("title2",go(n,"title2"),i),h=ho("title3",go(n,"title3"),i),ae=ho("count",go(n,"count"),i),be=J==="mobile",ye=!i||!!s,Ae=!o&&(!i||!!s),Z=l.useMemo(()=>$o(t,R),[t,R]),[ge,U]=l.useState(a),X=Z[ge],B=X==null?void 0:X.entry,[se,Ee]=l.useState(!1),[Fe,Re]=l.useState(null),[Ie,_e]=l.useState(!1),[F,D]=l.useState(null),[E,j]=l.useState(!1),[G,ee]=l.useState(0),[ie,he]=l.useState(),[Se,$e]=l.useState(),[fe,Ge]=l.useState(null),de=l.useRef(null),Me=l.useRef(0),je=l.useRef(0),Ve=l.useRef(0),at=l.useRef(!1),ht=l.useRef(null),Et=l.useRef(null),mt=l.useRef(null),ft=l.useRef(null),Ft=l.useRef(null),It=l.useRef(null),Ue=l.useRef(null),Ce=l.useCallback(()=>{const A=Et.current;if(!A)return;const pe=A.closest(`.${e}-lightbox-content-area`);if(!pe)return A.getBoundingClientRect().width;const d=Array.from(pe.children).reduce((f,x)=>!(x instanceof HTMLElement)||x.contains(A)?f:f+x.getBoundingClientRect().width,0);return pe.getBoundingClientRect().width-d},[e]),qe=l.useCallback(()=>{de.current&&(clearTimeout(de.current),de.current=null)},[]),Je=l.useCallback(A=>{A===Me.current&&(D(null),j(!1))},[]),Oe=l.useCallback(()=>{o||at.current||(at.current=!0,m==null||m(),Ee(!1),ht.current=setTimeout(()=>{p()},300))},[o,m,p]),$t=l.useCallback(A=>!!(A.closest("[data-controls]")||A.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:At,backdropStyle:Ze,mediaAreaStyle:Mt,overlayContentStyle:Ht,swipeHandlers:We,dismissAreaStyle:yt}=Zs({enabled:Ae,onClose:Oe,animMs:300,isBlockedTarget:$t}),et=l.useCallback(A=>{u&&tl(A+1,c,!0)},[u,c]),Xe=l.useCallback(A=>{if(A)return A.getBoundingClientRect().height},[]),ot=l.useCallback(A=>{if(Z.length===0)return;const pe=(A%Z.length+Z.length)%Z.length;if(pe===ge)return;const d=Z[ge],f=Z[pe];Me.current+=1;const x=Me.current,q=w==="fade"&&rs(d==null?void 0:d.entry)!==rs(f==null?void 0:f.entry),re=Xe(mt.current),we=q?(()=>{const Ke=Ce();Ni.flushSync(()=>{Ge(f.entry)}),mt.current&&Ke&&(mt.current.style.width=`${Ke}px`);const Pt=Xe(mt.current);return mt.current&&(mt.current.style.width=""),{measuredIncomingTitlesHeight:Pt,incomingTitlesMeasureWidth:Ke}})():void 0,ke=Math.max(re??0,(we==null?void 0:we.measuredIncomingTitlesHeight)??0)||void 0;ee(x),D(ge),j(!0),U(pe),et(pe),Ve.current=pe,q?(qe(),ke&&he(ke),we!=null&&we.incomingTitlesMeasureWidth&&$e(we.incomingTitlesMeasureWidth),Re((d==null?void 0:d.entryIndex)??null),_e(!0),je.current=f.entryIndex,de.current=setTimeout(()=>{Re(null),_e(!1),he(void 0),$e(void 0),Ge(null),de.current=null},400)):(qe(),Re(null),_e(!1),he(void 0),$e(void 0),Ge(null),je.current=f.entryIndex)},[ge,qe,Ce,Xe,Z,et,w]),ut=l.useCallback(()=>{Ue.current=null},[]),un=l.useCallback(A=>{!ye||Z.length<=1||A.pointerType==="mouse"&&A.button!==0||A.target.closest("[data-controls]")||(Ue.current={startX:A.clientX,startY:A.clientY,pointerId:A.pointerId})},[ye,Z.length]),rn=l.useCallback(A=>{var Ke;if(!ye||Z.length<=1||A.pointerType==="mouse"&&A.button!==0)return;if(At){ut();return}const pe=Ue.current;if(!pe||pe.pointerId!==A.pointerId||(ut(),A.target.closest("[data-controls]")))return;const f=A.clientX-pe.startX,x=A.clientY-pe.startY,q=Math.abs(f),re=Math.abs(x);if(q>=gg&&q>re){ot(f>0?ge-1:ge+1);return}if(q>ts||re>ts)return;const we=(Ke=ft.current)==null?void 0:Ke.getBoundingClientRect(),ke=we?we.left+we.width/2:window.innerWidth/2;ot(A.clientX<ke?ge-1:ge+1)},[ge,ye,ot,At,ut,Z.length]),Wn=l.useCallback(A=>{const pe=Ue.current;(pe==null?void 0:pe.pointerId)===A.pointerId&&ut()},[ut]);Qs(),l.useEffect(()=>{It.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const A=requestAnimationFrame(()=>{Ee(!0),requestAnimationFrame(()=>{Ft.current?Ft.current.focus():ft.current&&ft.current.focus()})});return()=>{cancelAnimationFrame(A),ht.current&&clearTimeout(ht.current),de.current&&clearTimeout(de.current);const pe=It.current;pe&&document.contains(pe)&&pe.focus()}},[]),l.useEffect(()=>{var A;w!=="fade"&&(je.current=((A=Z[ge])==null?void 0:A.entryIndex)??0,qe(),Re(null),_e(!1),he(void 0),$e(void 0))},[ge,qe,Z,w]),l.useEffect(()=>{const A=pe=>{if(pe.key==="Escape"){Oe();return}if(pe.key==="ArrowLeft"&&Z.length>1){ot(ge-1);return}if(pe.key==="ArrowRight"&&Z.length>1){ot(ge+1);return}if(pe.key==="Tab"&&ft.current){const d=ft.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),f=Array.from(d).filter(we=>!we.closest('[aria-hidden="true"]'));if(f.length===0)return;const x=f[0],q=f[f.length-1],re=document.activeElement;pe.shiftKey?(re===x||!ft.current.contains(re))&&(pe.preventDefault(),q.focus()):(re===q||!ft.current.contains(re))&&(pe.preventDefault(),x.focus())}};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[ot,Oe,ge,Z.length]),l.useLayoutEffect(()=>{qe(),Me.current=0,ee(0),D(null),j(!1),Re(null),_e(!1),he(void 0),$e(void 0),Ge(null),U(A=>{const pe=Math.max(0,Z.length-1);return Math.min(A,pe)})},[qe,t.length,R,Z.length]),l.useLayoutEffect(()=>{var d;const A=Math.max(0,Z.length-1),pe=Math.min(Math.max(0,a),A);Ve.current=pe,je.current=((d=Z[pe])==null?void 0:d.entryIndex)??0,U(pe)},[a]);const nt=Fe!==null?t[Fe]:null,an=F!==null?Z[F]:null,Vt=(B==null?void 0:B.title1)||(B==null?void 0:B.title2)||(B==null?void 0:B.title3)||(nt==null?void 0:nt.title1)||(nt==null?void 0:nt.title2)||(nt==null?void 0:nt.title3),jt=Sg(R,Z,t),ze=k!==null,vt=Vt||jt||ze,le=jt&&ze?{gap:te}:void 0,xe=`${e}-titles-stack${be?` ${e}-titles-stack-stacked`:""}`,Pe=`${e}-titles-layer-out${be?` ${e}-titles-layer-out-stacked`:""}`,Ne=`${e}-titles-layer-out`,tt=(M??0)>0||o,bt=H(C),Te=l.useMemo(()=>({title1Width:$??hr.title1Width,title2Width:S??hr.title2Width,title3Width:z??hr.title3Width}),[$,S,z]),it=l.useMemo(()=>({title2MarginLeft:N,title3MarginLeft:L}),[N,L]),De=l.useMemo(()=>B?po(e,B,W,ue,h):[],[e,B,W,ue,h]),rt=l.useMemo(()=>De.map(A=>Te[A.widthKey]),[De,Te]),pt=l.useMemo(()=>Ro(De.length,rt),[De.length,rt]),kt=l.useMemo(()=>Er(De.length,rt),[De.length,rt]),St=l.useMemo(()=>De.filter(A=>A.prefix==="title1"),[De]),Be=l.useMemo(()=>De.filter(A=>A.prefix==="title2"||A.prefix==="title3"),[De]),xt=l.useMemo(()=>mo(St,Te),[St,Te]),Ct=l.useMemo(()=>mo(Be,Te),[Be,Te]),wt=l.useCallback((A,pe)=>{const d=De.findIndex(x=>x.prefix===A.prefix);if(!be||pe==="single-row")return{effectiveWidth:kt[d]??0,resolvedWidth:pt[d]??0,maxWidth:Vn(d,pt)};if(pe==="two-row-top"){const x=St.findIndex(q=>q.prefix===A.prefix);return{effectiveWidth:xt.effective[x]??0,resolvedWidth:xt.resolved[x]??0,maxWidth:Vn(x,xt.resolved)}}const f=Be.findIndex(x=>x.prefix===A.prefix);return{effectiveWidth:Ct.effective[f]??0,resolvedWidth:Ct.resolved[f]??0,maxWidth:Vn(f,Ct.resolved)}},[De,Be,Ct,kt,pt,St,xt,be]),Dt=l.useCallback(A=>Cg(De,pt,it,A)+(be?0:M??0),[De,pt,it,be,M]),dt=l.useCallback(()=>be?0:M??0,[be,M]),Ot=l.useCallback(A=>Be.slice(0,A).reduce((pe,d,f)=>pe+(d.marginLeftKey?it[d.marginLeftKey]??0:0)+(Ct.resolved[f]??0),0),[Be,Ct.resolved,it]),Wt=l.useCallback(A=>{const pe=Be[A];return Ot(A)+(pe.marginLeftKey?it[pe.marginLeftKey]??0:0)+(Ct.resolved[A]??0)},[Be,Ct.resolved,Ot,it]),pn=l.useCallback((A,pe,d)=>{if(!be||d==="single-row"){const we=A.findIndex(Tt=>Tt.prefix===pe.prefix),ke=A.map(Tt=>Te[Tt.widthKey]),Ke=Ro(A.length,ke);return{effectiveWidth:Er(A.length,ke)[we]??0,resolvedWidth:Ke[we]??0,maxWidth:Vn(we,Ke)}}if(d==="two-row-top"){const we=A.filter(Tt=>Tt.prefix==="title1"),ke=we.findIndex(Tt=>Tt.prefix===pe.prefix),{resolved:Ke,effective:Pt}=mo(we,Te);return{effectiveWidth:Pt[ke]??0,resolvedWidth:Ke[ke]??0,maxWidth:Vn(ke,Ke)}}const f=A.filter(we=>we.prefix==="title2"||we.prefix==="title3"),x=f.findIndex(we=>we.prefix===pe.prefix),{resolved:q,effective:re}=mo(f,Te);return{effectiveWidth:re[x]??0,resolvedWidth:q[x]??0,maxWidth:Vn(x,q)}},[Te,be]),$n=(A,pe,d)=>{const f=A.marginLeftKey?it[A.marginLeftKey]??0:0,{effectiveWidth:x,resolvedWidth:q,maxWidth:re}=d??wt(A,pe),we=Math.max(f,gr),ke=o&&pe==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":A.prefix,style:{width:H(x),...f>0?{marginLeft:H(f)}:{}},children:[r.jsx("p",{className:A.className,style:A.style,children:A.text}),ke&&A.marginLeftKey?r.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(q),style:{position:"absolute",top:0,left:H(-f),width:H(we),height:"100%",pointerEvents:"auto"}}):null,ke?r.jsx("div",{"data-controls":A.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:H(-ti/2),width:H(ti),height:"100%",pointerEvents:"auto"}}):null]},A.className)},mn=()=>r.jsx("div",{...o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:H(M??0),flexShrink:0,alignSelf:"stretch",...o?{pointerEvents:"auto"}:{}}}),qt=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:W,"aria-hidden":"true",children:" "}),Cn=()=>r.jsx("span",{className:`${e}-entry-counter`,style:ae,"aria-live":"polite","aria-atomic":"true",children:wg(Z,ge,R,t)}),Xn=()=>jt?o&&ze?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Cn(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${mr(te)} + ${te}))`,width:mr(te),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Cn():null,Yn=()=>!jt&&!ze?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:le,children:[Xn(),ze?Jt():null]}),xi=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[jt||Vt?qt():null,tt?mn():null,Zt(B),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Yn(),sn()]}),Go=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%"},children:[jt||Vt?qt():null,tt?mn():null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:Ie&&ie?{minHeight:ie}:void 0,children:[r.jsx("div",{ref:mt,className:xe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Nn(fe||B)}),r.jsxs("div",{ref:Et,className:xe,style:{position:Ie?"absolute":"relative",inset:Ie?0:void 0,width:"100%",...Ie&&Se?{width:Se,maxWidth:"100%"}:void 0},children:[nt&&Ie?r.jsx("div",{className:`${Pe} ${e}-titles-fade-out`,children:Nn(nt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Ie?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Nn(B)})]}),sn()]}),Yn()]}),Jt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:P.scalingValue(_??0,i),height:P.scalingValue(_??0,i),marginRight:oe,"--close-icon-hover-color":ne},children:[r.jsx("button",{ref:Ft,type:"button",className:`${e}-close-icon-inner`,onClick:Oe,"aria-label":"Close",children:r.jsx(nn,{url:k??"",fill:V,hoverFill:i&&!s?V:ne,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:oe,height:"100%",pointerEvents:"auto"}})]}),Ui=(A,pe)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[jt||Vt?qt():null,tt?mn():null,pe!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:pe},children:A}):r.jsxs(r.Fragment,{children:[A,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Yn()]}),Zt=A=>{if(!A)return null;const pe=po(e,A,W,ue,h);return r.jsx(r.Fragment,{children:pe.map(d=>$n(d,"single-row",pn(pe,d,"single-row")))})},gn=A=>{if(!A)return null;const pe=po(e,A,W,ue,h),d=pe.find(f=>f.prefix==="title1");return d?$n(d,"two-row-top",pn(pe,d,"two-row-top")):null},Tn=(A,pe=!1)=>{const d=A?po(e,A,W,ue,h):[],f=d.filter(re=>re.prefix==="title2"||re.prefix==="title3"),x=o&&pe;return f.length>0||x||(C??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[f.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[f.map(re=>$n(re,"two-row-bottom",pn(d,re,"two-row-bottom"))),pe&&o?r.jsxs(r.Fragment,{children:[Uo(),Xo()]}):null]}):null,(C??0)>0||x?r.jsx("div",{"data-controls":x?"titleRowMarginBottom":void 0,"data-controls-axis":x?"y":void 0,"data-controls-reverse":x?"":void 0,className:x?`${e}-control`:void 0,style:{height:bt,width:"100%",flexShrink:0,pointerEvents:x?"auto":"none"}}):null]}):null},Fn=(A,pe=!1)=>r.jsxs(r.Fragment,{children:[Ui(gn(A)),Tn(A,pe)]}),Nn=A=>be?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Fn(A)}):A?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Zt(A)}):null,Xi=()=>De.flatMap((A,pe)=>{if(!A.marginLeftKey)return[];const d=it[A.marginLeftKey]??0,f=$g(De,pt,it,pe)+dt(),x=Math.max(d,gr);return r.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(pt[pe]),style:{position:"absolute",top:0,left:H(f),width:H(x),height:"100%",pointerEvents:"auto"}},A.marginLeftKey)}),Yi=()=>De.map((A,pe)=>{const d=Vn(pe,pt),x=Dt(pe)-ti/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(d),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:H(x),width:H(ti),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),Uo=()=>Be.flatMap((A,pe)=>{if(!A.marginLeftKey)return[];const d=it[A.marginLeftKey]??0,f=Ot(pe),x=Math.max(d,gr),{resolvedWidth:q}=wt(A,"two-row-bottom");return r.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(q),style:{position:"absolute",top:0,left:H(f),width:H(x),height:"100%",pointerEvents:"auto"}},A.marginLeftKey)}),Xo=()=>Be.map((A,pe)=>{const{maxWidth:d}=wt(A,"two-row-bottom"),x=Wt(pe)-ti/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(d),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:H(x),width:H(ti),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),sn=()=>!o||be?null:r.jsxs(r.Fragment,{children:[Xi(),Yi()]}),Jn=A=>{const pe=!A.objectFit&&xn(b);return{className:`${e}-slide-image-cell${pe?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:Y,maxHeight:O,...pe?{"--image-aspect-ratio":Do(b)}:{}}}},Ji=A=>A.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":A.objectFit}}:xn(b)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Hn=A=>{if(A.length===0)return null;const pe=A.length>1,d=mr(Q),f=`calc(-0.5 * (${d} + ${Q}))`;if(A.length===1){const x=A[0];return r.jsx("div",{...Jn(x),children:r.jsx("img",{...Ji(x),src:x.url,alt:x.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:pe?{gap:Q}:void 0,children:A.map((x,q)=>r.jsxs("div",{...Jn(x),children:[r.jsx("img",{...Ji(x),src:x.url,alt:x.name??"",draggable:!1}),o&&pe&&q<A.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:f,width:d,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${x.url}-${q}`))})},Zi=!!(B!=null&&B.title2||B!=null&&B.title3||nt!=null&&nt.title2||nt!=null&&nt.title3||(C??0)>0||o),Yo=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:mt,className:xe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Fn(fe||B)}),r.jsxs("div",{ref:Et,className:`${e}-titles-row-two-row`,style:{...Ie&&ie?{minHeight:ie}:void 0,...Ie&&Se?{width:Se,maxWidth:"100%"}:void 0},children:[Ui(r.jsxs("div",{className:xe,style:{position:Ie?"absolute":"relative",inset:Ie?0:void 0,width:"100%"},children:[nt&&Ie?r.jsx("div",{className:`${Ne} ${e}-titles-fade-out`,children:gn(nt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Ie?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:gn(B)})]}),Ie&&ie?ie:void 0),Zi?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[nt&&Ie?r.jsx("div",{className:`${Pe} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:Tn(nt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Ie?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${be?` ${e}-titles-layer-in-stacked`:""}`,children:Tn(B,!0)})]}):null]})]}),Jo=()=>{const A=Zi;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...A?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:A?void 0:{flex:"0 0 auto",height:"auto"},children:Fn(B,!0)}),sn()]})};return r.jsxs("div",{ref:ft,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{At||Oe()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ze?void 0:-1,style:{opacity:se?1:0,transition:"opacity 300ms ease",pointerEvents:se?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:I,...Ze}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:yt,...We,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Mt,onClick:A=>A.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":ye&&Z.length>1?"true":"false",onPointerDown:ye?un:void 0,onPointerUp:ye?rn:void 0,onPointerCancel:ye?Wn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[an&&E?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:A=>{A.target===A.currentTarget&&Je(G)},children:r.jsx("div",{className:`${e}-slide-area`,children:Hn(an.images)})},`slide-out-${G}`):null,r.jsx("div",{className:`${e}-slide-layer-in${E?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:X?Hn(X.images):null})},`slide-in-${G}-${ge}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Ht,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ce,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...be?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${be?` ${e}-lightbox-content-area-stacked`:""}`,children:vt&&r.jsx("div",{className:`${e}-text-bar-cell${be?` ${e}-text-bar-cell-stacked`:""}`,style:be?void 0:{flex:1,minWidth:0,width:"100%"},children:be?w==="fade"?Yo():Jo():w==="fade"?Go():xi()})})})]})]})]})};function Ag(e){return`
10795
+ `,sg="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>'),zn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",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 lg(e){const t={};return t[lt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[lt(e,"fontSettings")]={...zn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[lt(e,"fontSize")]={...zn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[lt(e,"lineHeight")]={...zn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[lt(e,"letterSpacing")]={...zn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[lt(e,"wordSpacing")]={...zn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[lt(e,"textAlign")]={...zn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[lt(e,"textAppearance")]={...zn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const cg=Ki.reduce((e,t)=>({...e,...lg(t)}),{}),dg=Ki.reduce((e,t)=>({...e,[lt(t,"fontFamily")]:"Goudy Bookletter 1911",[lt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[lt(t,"letterSpacing")]:0,[lt(t,"wordSpacing")]:0,[lt(t,"textAlign")]:"left",[lt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function es(e){return Ki.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[lt(n,"fontSize")]=i),o!==void 0&&(t[lt(n,"lineHeight")]=o),t},{})}const ug=eg(),pg={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:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up"]}},thumbnailActiveColor:{type:"string",scope:"common",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},...cg,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/lightbox_strip_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:sg,closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",...dg},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"#FFFFFF",contentMarginTop:.08,iconMarginLeft:.02,...es({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"#FFFFFF",contentMarginTop:.015,iconMarginLeft:.02,...es({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:[ug]}],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/lightbox_strip_2.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_3.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_4.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_5.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_6.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_7.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"}]}},mg={element:rg,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:pg,sourceCode:ag,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Ki.map(e=>({path:`styles.${lt(e,"fontSettings")}`}))}},gg=50,ts=10,na="cntrl-lightbox-journal",Ko=na,Lr=`${na}-`,Go=e=>`${na}-${e}`,ia=e=>e===Ko||e.startsWith(Lr),ns=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},is=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=ns(t.get(Go(e)));if(i)return i}const n=ns(t.get(Ko));if(n)return n;for(const[i]of t){if(!i.startsWith(Lr))continue;const o=i.slice(Lr.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},os=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},tl=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(a=>{ia(a)&&i.searchParams.delete(a)}),t?i.searchParams.set(Go(t),String(e)):i.searchParams.set(Ko,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},hg=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Go(e)||i===Ko:ia(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)}},nl=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Go(e)):[...t.keys()].some(n=>ia(n))},fg=(e,t)=>{if(nl(t)){if(e){window.history.back();return}hg(t)}},yg=20,vg=2,gr=e=>`max(${e}, ${yg}px)`,hi=e=>((e==null?void 0:e.image)??[]).slice(0,vg),il=e=>e.reduce((t,n)=>t+hi(n).length,0),bg=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+hi(s).length,1),i=hi(e[t]).length;return{start:n,end:n+i-1}},xg=(e,t)=>{const n=il(e),{start:i,end:o}=bg(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Co=(e,t)=>t==="B"?e.flatMap((n,i)=>hi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:hi(n)})),wg=(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 xg(i,o)},rs=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Sg=(e,t,n)=>e==="B"?t.length>1:il(n)>1,ti=.004,po=.004,hr={title1Width:.13,title2Width:.13,title3Width:.14},mo=(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},Ao=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},u)=>{if(s<=0||u<=0)return{overflow:s,widths:[u,...a]};const c=Math.min(s,u);return{overflow:s-c,widths:[u-c,...a]}},{overflow:i-1,widths:[]});return o},Er=(e,t)=>Ao(e,t),Vn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},go=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ao(e.length,n),effective:Er(e.length,n)}},$g=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Cg=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Gi=["title1","title2","title3","count"],ct=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Tg={title1:"1",title2:"2",title3:"3",count:"Count"},Lg=e=>[ct(e,"fontFamily"),ct(e,"fontSettings"),{type:"row",items:[ct(e,"fontSize"),ct(e,"lineHeight"),ct(e,"letterSpacing"),ct(e,"wordSpacing")]},ct(e,"textAlign"),ct(e,"textAppearance")],Eg=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Gi.map(e=>[Tg[e],Lg(e)]))}),Ig={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Pg={title1:.02,title2:.02,title3:.02,count:.017},ho=(e,t)=>{const n=i=>{const o=ct(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Ig[t]]}},fo=(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??Pg[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Rt(i,n)},Rg=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:a=0,enableUrlSync:u=!1,journalItemId:c=null,onBeforeClose:m,onClose:p})=>{const{type:R,coverFit:x,backgroundColor:I,imageGap:g,maxWidth:v,maxHeight:T,textTransition:w,title1Width:$,title2Width:S,title3Width:O,title1MarginLeft:M=0,title2MarginLeft:H=0,title3MarginLeft:L=0,titleRowMarginBottom:C=0,titleHeaderLayout:J="single-row",countCloseGap:y=0,closeIcon:k,closeIconMaxWidth:_,closeIconColor:D,closeIconHoverColor:ne,contentMarginTop:me=0,iconMarginRight:K=0}=n,F=l.useCallback(A=>P.scalingValue(A,i??!1),[i]),Q=F(g??0),Y=`${v}%`,B=`${T}%`,te=F(y),de=F(me),re=F(K),W=fo("title1",ho(n,"title1"),i),pe=fo("title2",ho(n,"title2"),i),h=fo("title3",ho(n,"title3"),i),ae=fo("count",ho(n,"count"),i),be=J==="mobile",ye=!i||!!s,Ae=!o&&(!i||!!s),Z=l.useMemo(()=>Co(t,R),[t,R]),[ge,X]=l.useState(a),U=Z[ge],j=U==null?void 0:U.entry,[se,Ee]=l.useState(!1),[Fe,Re]=l.useState(null),[Ie,_e]=l.useState(!1),[N,q]=l.useState(null),[E,z]=l.useState(!1),[G,ee]=l.useState(0),[ie,he]=l.useState(),[Se,$e]=l.useState(),[fe,Ge]=l.useState(null),ue=l.useRef(null),Me=l.useRef(0),ze=l.useRef(0),De=l.useRef(0),at=l.useRef(!1),ht=l.useRef(null),Et=l.useRef(null),mt=l.useRef(null),ft=l.useRef(null),Ft=l.useRef(null),It=l.useRef(null),Ue=l.useRef(null),Te=l.useCallback(()=>{const A=Et.current;if(!A)return;const ce=A.closest(`.${e}-lightbox-content-area`);if(!ce)return A.getBoundingClientRect().width;const d=Array.from(ce.children).reduce((f,b)=>!(b instanceof HTMLElement)||b.contains(A)?f:f+b.getBoundingClientRect().width,0);return ce.getBoundingClientRect().width-d},[e]),qe=l.useCallback(()=>{ue.current&&(clearTimeout(ue.current),ue.current=null)},[]),Je=l.useCallback(A=>{A===Me.current&&(q(null),z(!1))},[]),Oe=l.useCallback(()=>{o||at.current||(at.current=!0,m==null||m(),Ee(!1),ht.current=setTimeout(()=>{p()},300))},[o,m,p]),$t=l.useCallback(A=>!!(A.closest("[data-controls]")||A.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:At,backdropStyle:Ze,mediaAreaStyle:Mt,overlayContentStyle:Ht,swipeHandlers:We,dismissAreaStyle:yt}=Zs({enabled:Ae,onClose:Oe,animMs:300,isBlockedTarget:$t}),et=l.useCallback(A=>{u&&tl(A+1,c,!0)},[u,c]),Xe=l.useCallback(A=>{if(A)return A.getBoundingClientRect().height},[]),ot=l.useCallback(A=>{if(Z.length===0)return;const ce=(A%Z.length+Z.length)%Z.length;if(ce===ge)return;const d=Z[ge],f=Z[ce];Me.current+=1;const b=Me.current,V=w==="fade"&&rs(d==null?void 0:d.entry)!==rs(f==null?void 0:f.entry),oe=Xe(mt.current),xe=V?(()=>{const Ke=Te();Ni.flushSync(()=>{Ge(f.entry)}),mt.current&&Ke&&(mt.current.style.width=`${Ke}px`);const Pt=Xe(mt.current);return mt.current&&(mt.current.style.width=""),{measuredIncomingTitlesHeight:Pt,incomingTitlesMeasureWidth:Ke}})():void 0,ke=Math.max(oe??0,(xe==null?void 0:xe.measuredIncomingTitlesHeight)??0)||void 0;ee(b),q(ge),z(!0),X(ce),et(ce),De.current=ce,V?(qe(),ke&&he(ke),xe!=null&&xe.incomingTitlesMeasureWidth&&$e(xe.incomingTitlesMeasureWidth),Re((d==null?void 0:d.entryIndex)??null),_e(!0),ze.current=f.entryIndex,ue.current=setTimeout(()=>{Re(null),_e(!1),he(void 0),$e(void 0),Ge(null),ue.current=null},400)):(qe(),Re(null),_e(!1),he(void 0),$e(void 0),Ge(null),ze.current=f.entryIndex)},[ge,qe,Te,Xe,Z,et,w]),pt=l.useCallback(()=>{Ue.current=null},[]),un=l.useCallback(A=>{!ye||Z.length<=1||A.pointerType==="mouse"&&A.button!==0||A.target.closest("[data-controls]")||(Ue.current={startX:A.clientX,startY:A.clientY,pointerId:A.pointerId})},[ye,Z.length]),rn=l.useCallback(A=>{var Ke;if(!ye||Z.length<=1||A.pointerType==="mouse"&&A.button!==0)return;if(At){pt();return}const ce=Ue.current;if(!ce||ce.pointerId!==A.pointerId||(pt(),A.target.closest("[data-controls]")))return;const f=A.clientX-ce.startX,b=A.clientY-ce.startY,V=Math.abs(f),oe=Math.abs(b);if(V>=gg&&V>oe){ot(f>0?ge-1:ge+1);return}if(V>ts||oe>ts)return;const xe=(Ke=ft.current)==null?void 0:Ke.getBoundingClientRect(),ke=xe?xe.left+xe.width/2:window.innerWidth/2;ot(A.clientX<ke?ge-1:ge+1)},[ge,ye,ot,At,pt,Z.length]),Wn=l.useCallback(A=>{const ce=Ue.current;(ce==null?void 0:ce.pointerId)===A.pointerId&&pt()},[pt]);Qs(),l.useEffect(()=>{It.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const A=requestAnimationFrame(()=>{Ee(!0),requestAnimationFrame(()=>{Ft.current?Ft.current.focus():ft.current&&ft.current.focus()})});return()=>{cancelAnimationFrame(A),ht.current&&clearTimeout(ht.current),ue.current&&clearTimeout(ue.current);const ce=It.current;ce&&document.contains(ce)&&ce.focus()}},[]),l.useEffect(()=>{var A;w!=="fade"&&(ze.current=((A=Z[ge])==null?void 0:A.entryIndex)??0,qe(),Re(null),_e(!1),he(void 0),$e(void 0))},[ge,qe,Z,w]),l.useEffect(()=>{const A=ce=>{if(ce.key==="Escape"){Oe();return}if(ce.key==="ArrowLeft"&&Z.length>1){ot(ge-1);return}if(ce.key==="ArrowRight"&&Z.length>1){ot(ge+1);return}if(ce.key==="Tab"&&ft.current){const d=ft.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),f=Array.from(d).filter(xe=>!xe.closest('[aria-hidden="true"]'));if(f.length===0)return;const b=f[0],V=f[f.length-1],oe=document.activeElement;ce.shiftKey?(oe===b||!ft.current.contains(oe))&&(ce.preventDefault(),V.focus()):(oe===V||!ft.current.contains(oe))&&(ce.preventDefault(),b.focus())}};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[ot,Oe,ge,Z.length]),l.useLayoutEffect(()=>{qe(),Me.current=0,ee(0),q(null),z(!1),Re(null),_e(!1),he(void 0),$e(void 0),Ge(null),X(A=>{const ce=Math.max(0,Z.length-1);return Math.min(A,ce)})},[qe,t.length,R,Z.length]),l.useLayoutEffect(()=>{var d;const A=Math.max(0,Z.length-1),ce=Math.min(Math.max(0,a),A);De.current=ce,ze.current=((d=Z[ce])==null?void 0:d.entryIndex)??0,X(ce)},[a]);const nt=Fe!==null?t[Fe]:null,an=N!==null?Z[N]:null,Vt=(j==null?void 0:j.title1)||(j==null?void 0:j.title2)||(j==null?void 0:j.title3)||(nt==null?void 0:nt.title1)||(nt==null?void 0:nt.title2)||(nt==null?void 0:nt.title3),jt=Sg(R,Z,t),Ve=k!==null,vt=Vt||jt||Ve,le=jt&&Ve?{gap:te}:void 0,we=`${e}-titles-stack${be?` ${e}-titles-stack-stacked`:""}`,Pe=`${e}-titles-layer-out${be?` ${e}-titles-layer-out-stacked`:""}`,Ne=`${e}-titles-layer-out`,tt=(M??0)>0||o,bt=F(C),Ce=l.useMemo(()=>({title1Width:$??hr.title1Width,title2Width:S??hr.title2Width,title3Width:O??hr.title3Width}),[$,S,O]),it=l.useMemo(()=>({title2MarginLeft:H,title3MarginLeft:L}),[H,L]),Be=l.useMemo(()=>j?mo(e,j,W,pe,h):[],[e,j,W,pe,h]),rt=l.useMemo(()=>Be.map(A=>Ce[A.widthKey]),[Be,Ce]),st=l.useMemo(()=>Ao(Be.length,rt),[Be.length,rt]),kt=l.useMemo(()=>Er(Be.length,rt),[Be.length,rt]),St=l.useMemo(()=>Be.filter(A=>A.prefix==="title1"),[Be]),je=l.useMemo(()=>Be.filter(A=>A.prefix==="title2"||A.prefix==="title3"),[Be]),xt=l.useMemo(()=>go(St,Ce),[St,Ce]),Ct=l.useMemo(()=>go(je,Ce),[je,Ce]),wt=l.useCallback((A,ce)=>{const d=Be.findIndex(b=>b.prefix===A.prefix);if(!be||ce==="single-row")return{effectiveWidth:kt[d]??0,resolvedWidth:st[d]??0,maxWidth:Vn(d,st)};if(ce==="two-row-top"){const b=St.findIndex(V=>V.prefix===A.prefix);return{effectiveWidth:xt.effective[b]??0,resolvedWidth:xt.resolved[b]??0,maxWidth:Vn(b,xt.resolved)}}const f=je.findIndex(b=>b.prefix===A.prefix);return{effectiveWidth:Ct.effective[f]??0,resolvedWidth:Ct.resolved[f]??0,maxWidth:Vn(f,Ct.resolved)}},[Be,je,Ct,kt,st,St,xt,be]),Dt=l.useCallback(A=>Cg(Be,st,it,A)+(be?0:M??0),[Be,st,it,be,M]),ut=l.useCallback(()=>be?0:M??0,[be,M]),Ot=l.useCallback(A=>je.slice(0,A).reduce((ce,d,f)=>ce+(d.marginLeftKey?it[d.marginLeftKey]??0:0)+(Ct.resolved[f]??0),0),[je,Ct.resolved,it]),Wt=l.useCallback(A=>{const ce=je[A];return Ot(A)+(ce.marginLeftKey?it[ce.marginLeftKey]??0:0)+(Ct.resolved[A]??0)},[je,Ct.resolved,Ot,it]),pn=l.useCallback((A,ce,d)=>{if(!be||d==="single-row"){const xe=A.findIndex(Tt=>Tt.prefix===ce.prefix),ke=A.map(Tt=>Ce[Tt.widthKey]),Ke=Ao(A.length,ke);return{effectiveWidth:Er(A.length,ke)[xe]??0,resolvedWidth:Ke[xe]??0,maxWidth:Vn(xe,Ke)}}if(d==="two-row-top"){const xe=A.filter(Tt=>Tt.prefix==="title1"),ke=xe.findIndex(Tt=>Tt.prefix===ce.prefix),{resolved:Ke,effective:Pt}=go(xe,Ce);return{effectiveWidth:Pt[ke]??0,resolvedWidth:Ke[ke]??0,maxWidth:Vn(ke,Ke)}}const f=A.filter(xe=>xe.prefix==="title2"||xe.prefix==="title3"),b=f.findIndex(xe=>xe.prefix===ce.prefix),{resolved:V,effective:oe}=go(f,Ce);return{effectiveWidth:oe[b]??0,resolvedWidth:V[b]??0,maxWidth:Vn(b,V)}},[Ce,be]),$n=(A,ce,d)=>{const f=A.marginLeftKey?it[A.marginLeftKey]??0:0,{effectiveWidth:b,resolvedWidth:V,maxWidth:oe}=d??wt(A,ce),xe=Math.max(f,po),ke=o&&ce==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":A.prefix,style:{width:F(b),...f>0?{marginLeft:F(f)}:{}},children:[r.jsx("p",{className:A.className,style:A.style,children:A.text}),ke&&A.marginLeftKey?r.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(V),style:{position:"absolute",top:0,left:F(-f),width:F(xe),height:"100%",pointerEvents:"auto"}}):null,ke?r.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(oe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:F(-ti/2),width:F(ti),height:"100%",pointerEvents:"auto"}}):null]},A.className)},mn=(A="two-row")=>{const ce=Be.findIndex(b=>b.prefix==="title1"),d=ce>=0?st[ce]:Ce.title1Width,f=A==="two-row"&&o;return r.jsx("div",{...f?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(d)}:{},style:{width:F(M??0),flexShrink:0,alignSelf:"stretch",...f?{pointerEvents:"auto"}:{}}})},qt=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:W,"aria-hidden":"true",children:" "}),Cn=()=>r.jsx("span",{className:`${e}-entry-counter`,style:ae,"aria-live":"polite","aria-atomic":"true",children:wg(Z,ge,R,t)}),Xn=()=>jt?o&&Ve?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Cn(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${gr(te)} + ${te}))`,width:gr(te),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Cn():null,Yn=()=>!jt&&!Ve?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:le,children:[Xn(),Ve?Jt():null]}),xi=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[jt||Vt?qt():null,tt?mn("single-row"):null,Zt(j),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Yn(),sn()]}),Uo=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[jt||Vt?qt():null,tt?mn("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:Ie&&ie?{minHeight:ie}:void 0,children:[r.jsx("div",{ref:mt,className:we,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Nn(fe||j)}),r.jsxs("div",{ref:Et,className:we,style:{position:Ie?"absolute":"relative",inset:Ie?0:void 0,width:"100%",...Ie&&Se?{width:Se,maxWidth:"100%"}:void 0},children:[nt&&Ie?r.jsx("div",{className:`${Pe} ${e}-titles-fade-out`,children:Nn(nt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Ie?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Nn(j)})]})]}),Yn(),sn()]}),Jt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:P.scalingValue(_??0,i),height:P.scalingValue(_??0,i),marginRight:re,"--close-icon-hover-color":ne},children:[r.jsx("button",{ref:Ft,type:"button",className:`${e}-close-icon-inner`,onClick:Oe,"aria-label":"Close",children:r.jsx(nn,{url:k??"",fill:D,hoverFill:i&&!s?D:ne,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:re,height:"100%",pointerEvents:"auto"}})]}),Ui=(A,ce)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[jt||Vt?qt():null,tt?mn("two-row"):null,ce!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:ce},children:A}):r.jsxs(r.Fragment,{children:[A,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Yn()]}),Zt=A=>{if(!A)return null;const ce=mo(e,A,W,pe,h);return r.jsx(r.Fragment,{children:ce.map(d=>$n(d,"single-row",pn(ce,d,"single-row")))})},gn=A=>{if(!A)return null;const ce=mo(e,A,W,pe,h),d=ce.find(f=>f.prefix==="title1");return d?$n(d,"two-row-top",pn(ce,d,"two-row-top")):null},Tn=(A,ce=!1)=>{const d=A?mo(e,A,W,pe,h):[],f=d.filter(oe=>oe.prefix==="title2"||oe.prefix==="title3"),b=o&&ce;return f.length>0||b||(C??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[f.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[f.map(oe=>$n(oe,"two-row-bottom",pn(d,oe,"two-row-bottom"))),ce&&o?r.jsxs(r.Fragment,{children:[Xo(),Yo()]}):null]}):null,(C??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:bt,width:"100%",flexShrink:0,pointerEvents:b?"auto":"none"}}):null]}):null},Fn=(A,ce=!1)=>r.jsxs(r.Fragment,{children:[Ui(gn(A)),Tn(A,ce)]}),Nn=A=>be?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Fn(A)}):A?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Zt(A)}):null,Xi=()=>{const A=be?-1:Be.findIndex(f=>f.prefix==="title1"),ce=!be&&(o||(M??0)>0)?(()=>{const f=M??0,b=A>=0?st[A]:Ce.title1Width,V=Math.max(f,po);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:F(V),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,d=Be.flatMap((f,b)=>{if(!f.marginLeftKey)return[];const V=it[f.marginLeftKey]??0,oe=$g(Be,st,it,b)+ut(),xe=Math.max(V,po);return r.jsx("div",{"data-controls":f.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(st[b]),style:{position:"absolute",top:0,left:F(oe),width:F(xe),height:"100%",pointerEvents:"auto"}},f.marginLeftKey)});return ce?[ce,...d]:d},Yi=()=>Be.map((A,ce)=>{const d=Vn(ce,st),b=Dt(ce)-ti/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(d),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:F(b),width:F(ti),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),Xo=()=>je.flatMap((A,ce)=>{if(!A.marginLeftKey)return[];const d=it[A.marginLeftKey]??0,f=Ot(ce),b=Math.max(d,po),{resolvedWidth:V}=wt(A,"two-row-bottom");return r.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(V),style:{position:"absolute",top:0,left:F(f),width:F(b),height:"100%",pointerEvents:"auto"}},A.marginLeftKey)}),Yo=()=>je.map((A,ce)=>{const{maxWidth:d}=wt(A,"two-row-bottom"),b=Wt(ce)-ti/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(d),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:F(b),width:F(ti),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),sn=()=>!o||be?null:r.jsxs(r.Fragment,{children:[Xi(),Yi()]}),Jn=A=>{const ce=!A.objectFit&&xn(x);return{className:`${e}-slide-image-cell${ce?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:Y,maxHeight:B,...ce?{"--image-aspect-ratio":qo(x)}:{}}}},Ji=A=>A.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":A.objectFit}}:xn(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Hn=A=>{if(A.length===0)return null;const ce=A.length>1,d=gr(Q),f=`calc(-0.5 * (${d} + ${Q}))`;if(A.length===1){const b=A[0];return r.jsx("div",{...Jn(b),children:r.jsx("img",{...Ji(b),src:b.url,alt:b.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:ce?{gap:Q}:void 0,children:A.map((b,V)=>r.jsxs("div",{...Jn(b),children:[r.jsx("img",{...Ji(b),src:b.url,alt:b.name??"",draggable:!1}),o&&ce&&V<A.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:f,width:d,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${b.url}-${V}`))})},Zi=!!(j!=null&&j.title2||j!=null&&j.title3||nt!=null&&nt.title2||nt!=null&&nt.title3||(C??0)>0||o),Jo=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:mt,className:we,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Fn(fe||j)}),r.jsxs("div",{ref:Et,className:`${e}-titles-row-two-row`,style:{...Ie&&ie?{minHeight:ie}:void 0,...Ie&&Se?{width:Se,maxWidth:"100%"}:void 0},children:[Ui(r.jsxs("div",{className:we,style:{position:Ie?"absolute":"relative",inset:Ie?0:void 0,width:"100%"},children:[nt&&Ie?r.jsx("div",{className:`${Ne} ${e}-titles-fade-out`,children:gn(nt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Ie?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:gn(j)})]}),Ie&&ie?ie:void 0),Zi?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[nt&&Ie?r.jsx("div",{className:`${Pe} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:Tn(nt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Ie?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${be?` ${e}-titles-layer-in-stacked`:""}`,children:Tn(j,!0)})]}):null]})]}),Zo=()=>{const A=Zi;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...A?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:A?void 0:{flex:"0 0 auto",height:"auto"},children:Fn(j,!0)}),sn()]})};return r.jsxs("div",{ref:ft,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{At||Oe()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:Ve?void 0:-1,style:{opacity:se?1:0,transition:"opacity 300ms ease",pointerEvents:se?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:I,...Ze}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:yt,...We,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Mt,onClick:A=>A.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":ye&&Z.length>1?"true":"false",onPointerDown:ye?un:void 0,onPointerUp:ye?rn:void 0,onPointerCancel:ye?Wn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[an&&E?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:A=>{A.target===A.currentTarget&&Je(G)},children:r.jsx("div",{className:`${e}-slide-area`,children:Hn(an.images)})},`slide-out-${G}`):null,r.jsx("div",{className:`${e}-slide-layer-in${E?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:U?Hn(U.images):null})},`slide-in-${G}-${ge}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Ht,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:de,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...be?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${be?` ${e}-lightbox-content-area-stacked`:""}`,children:vt&&r.jsx("div",{className:`${e}-text-bar-cell${be?` ${e}-text-bar-cell-stacked`:""}`,style:be?void 0:{flex:1,minWidth:0,width:"100%"},children:be?w==="fade"?Jo():Zo():w==="fade"?Uo():xi()})})})]})]})]})};function Ag(e){return`
10787
10796
  .${e}-wrapper {
10788
10797
  position: relative;
10789
10798
  width: 100%;
@@ -11317,7 +11326,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11317
11326
  pointer-events: auto;
11318
11327
  z-index: 10;
11319
11328
  }
11320
- `}const Mg=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:a})=>{const{prefix:u}=P.useScopedStyles(),c=(a==null?void 0:a.itemId)??null,{cover:m,coverFit:p,type:R}=e,b=l.useRef(null),[I,g]=l.useState(!1),[v,T]=l.useState(0),w=l.useRef(!1),$=l.useRef(!1),S=l.useRef(!1),z=l.useMemo(()=>(t??[]).filter(y=>hi(y).length>0),[t]),M=I&&z.length>0,N=!n,L=l.useCallback(()=>{N&&(S.current=!0,fg($.current,c),$.current=!1)},[N,c]),C=(y=0)=>{if(z.length===0||n&&!i&&!o)return;const k=$o(z,R),_=Math.max(0,Math.min(y,k.length-1));if(T(_),N){const V=nl();tl(_+1,c,V),$.current=!V}g(!0)},J=l.useCallback(()=>{g(!1),S.current=!1},[]);return l.useEffect(()=>{!n||i||o||g(!1)},[n,i,o]),l.useEffect(()=>{if(!N||w.current)return;w.current=!0;const y=is(c);if(!y)return;const k=os(y,$o(z,R).length);k<0||(T(k),g(!0))},[z,c,N,R]),l.useEffect(()=>{if(!N)return;const y=()=>{if(S.current){S.current=!1,g(!1);return}const k=is(c);if(!k){g(!1);return}const _=os(k,$o(z,R).length);if(_<0){g(!1);return}$.current=!1,T(_),g(!0)};return window.addEventListener("popstate",y),()=>window.removeEventListener("popstate",y)},[z,c,N,R]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:b,className:`${u}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ag(u)}}),m?r.jsx("button",{type:"button",className:`${u}-cover ${xn(p)?`${u}-ratio-wrapper-cover`:`${u}-ratio-wrapper-fit`}`,onClick:()=>C(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...xn(p)?{"--image-aspect-ratio":Do(p)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${u}-cover-image ${xn(p)?`${u}-cover-image-cover`:`${u}-cover-image-fit`}`,src:m,alt:"cover"})}):null]}),M&&typeof document<"u"&&(()=>{const y=(s?document.getElementById(s):null)??document.body;return Ni.createPortal(r.jsx(Rg,{prefix:u,entries:z,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:v,enableUrlSync:N,journalItemId:c,onBeforeClose:L,onClose:J}),y)})()]})},kg=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
11329
+ `}const Mg=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:a})=>{const{prefix:u}=P.useScopedStyles(),c=(a==null?void 0:a.itemId)??null,{cover:m,coverFit:p,type:R}=e,x=l.useRef(null),[I,g]=l.useState(!1),[v,T]=l.useState(0),w=l.useRef(!1),$=l.useRef(!1),S=l.useRef(!1),O=l.useMemo(()=>(t??[]).filter(y=>hi(y).length>0),[t]),M=I&&O.length>0,H=!n,L=l.useCallback(()=>{H&&(S.current=!0,fg($.current,c),$.current=!1)},[H,c]),C=(y=0)=>{if(O.length===0||n&&!i&&!o)return;const k=Co(O,R),_=Math.max(0,Math.min(y,k.length-1));if(T(_),H){const D=nl();tl(_+1,c,D),$.current=!D}g(!0)},J=l.useCallback(()=>{g(!1),S.current=!1},[]);return l.useEffect(()=>{!n||i||o||g(!1)},[n,i,o]),l.useEffect(()=>{if(!H||w.current)return;w.current=!0;const y=is(c);if(!y)return;const k=os(y,Co(O,R).length);k<0||(T(k),g(!0))},[O,c,H,R]),l.useEffect(()=>{if(!H)return;const y=()=>{if(S.current){S.current=!1,g(!1);return}const k=is(c);if(!k){g(!1);return}const _=os(k,Co(O,R).length);if(_<0){g(!1);return}$.current=!1,T(_),g(!0)};return window.addEventListener("popstate",y),()=>window.removeEventListener("popstate",y)},[O,c,H,R]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:x,className:`${u}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ag(u)}}),m?r.jsx("button",{type:"button",className:`${u}-cover ${xn(p)?`${u}-ratio-wrapper-cover`:`${u}-ratio-wrapper-fit`}`,onClick:()=>C(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...xn(p)?{"--image-aspect-ratio":qo(p)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${u}-cover-image ${xn(p)?`${u}-cover-image-cover`:`${u}-cover-image-fit`}`,src:m,alt:"cover"})}):null]}),M&&typeof document<"u"&&(()=>{const y=(s?document.getElementById(s):null)??document.body;return Ni.createPortal(r.jsx(Rg,{prefix:u,entries:O,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:v,enableUrlSync:H,journalItemId:c,onBeforeClose:L,onClose:J}),y)})()]})},kg=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
11321
11330
  import { createPortal } from 'react-dom';
11322
11331
  import { CommonComponentProps } from '../props';
11323
11332
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -12085,4 +12094,4 @@ export type LightboxJournalSettings = {
12085
12094
  closeIconColor: string;
12086
12095
  closeIconHoverColor: string;
12087
12096
  };
12088
- `,_g="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Dn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Wg(e){const t={};return t[lt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[lt(e,"fontSettings")]={...Dn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[lt(e,"fontSize")]={...Dn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[lt(e,"lineHeight")]={...Dn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[lt(e,"letterSpacing")]={...Dn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[lt(e,"wordSpacing")]={...Dn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[lt(e,"textAlign")]={...Dn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[lt(e,"textAppearance")]={...Dn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Fg=Gi.reduce((e,t)=>({...e,...Wg(t)}),{}),Ng=Gi.reduce((e,t)=>({...e,[lt(t,"fontFamily")]:"Goudy Bookletter 1911",[lt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[lt(t,"letterSpacing")]:0,[lt(t,"wordSpacing")]:0,[lt(t,"textAlign")]:"left",[lt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function as(e){return Gi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[lt(n,"fontSize")]=i),o!==void 0&&(t[lt(n,"lineHeight")]=o),t},{})}const Hg=Eg(),Og={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"}},...Fg,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/journal_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:_g,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...Ng,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.05,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.005,...as({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...as({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:[Hg]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"Dorothy Manners & Julanne Johnston",title2:"by Evans Studio",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/journal_3.jpg",name:"",objectFit:"contain"}]},{title1:"Inez Nadeau",title2:"Melbourne Spurr",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_4.jpg",name:"",objectFit:"contain"}]},{title1:"Colleen Moore",title2:"Clarence S. Bull",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_5.jpg",name:"",objectFit:"contain"}]},{title1:"Gloria Swanson",title2:"Donald Biddle Keyes",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_6.jpg",name:"",objectFit:"contain"}]}]}},Bg={element:Mg,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:Og,sourceCode:kg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Gi.map(e=>({path:`styles.${lt(e,"fontSettings")}`}))}},jg=[hd,Sd,du,bu,Pu,ju,Ku,Qu,xp,Sm,Am,mg,Bg];exports.components=jg;exports.isSchemaV1=al;
12097
+ `,_g="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Dn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Wg(e){const t={};return t[ct(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSettings")]={...Dn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSize")]={...Dn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ct(e,"lineHeight")]={...Dn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ct(e,"letterSpacing")]={...Dn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ct(e,"wordSpacing")]={...Dn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ct(e,"textAlign")]={...Dn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ct(e,"textAppearance")]={...Dn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Fg=Gi.reduce((e,t)=>({...e,...Wg(t)}),{}),Ng=Gi.reduce((e,t)=>({...e,[ct(t,"fontFamily")]:"Goudy Bookletter 1911",[ct(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ct(t,"letterSpacing")]:0,[ct(t,"wordSpacing")]:0,[ct(t,"textAlign")]:"left",[ct(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function as(e){return Gi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ct(n,"fontSize")]=i),o!==void 0&&(t[ct(n,"lineHeight")]=o),t},{})}const Hg=Eg(),Og={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"}},...Fg,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/journal_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:_g,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...Ng,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.05,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.005,...as({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...as({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:[Hg]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"Dorothy Manners & Julanne Johnston",title2:"by Evans Studio",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/journal_3.jpg",name:"",objectFit:"contain"}]},{title1:"Inez Nadeau",title2:"Melbourne Spurr",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_4.jpg",name:"",objectFit:"contain"}]},{title1:"Colleen Moore",title2:"Clarence S. Bull",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_5.jpg",name:"",objectFit:"contain"}]},{title1:"Gloria Swanson",title2:"Donald Biddle Keyes",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_6.jpg",name:"",objectFit:"contain"}]}]}},Bg={element:Mg,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:Og,sourceCode:kg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Gi.map(e=>({path:`styles.${ct(e,"fontSettings")}`}))}},jg=[hd,Sd,du,bu,Pu,ju,Ku,Qu,xp,Sm,Am,mg,Bg];exports.components=jg;exports.isSchemaV1=al;