@cntrl-site/components 1.0.7-alpha.11 → 1.0.7-alpha.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),C=require("react"),ge=require("classnames"),$=require("./useTestimonialTextMeasure-CNYd-juE.js"),yr=require("react-dom");function vr(e){return e.type==="object"&&e.version===1}const br="ControlSlider-module__wrapper___sHEkd",xr="ControlSlider-module__hoverArrow___A-dOH",Sr="ControlSlider-module__sliderItem___QQSkR",Cr="ControlSlider-module__sliderImage___9hRl-",$r="ControlSlider-module__arrow___05ghY",wr="ControlSlider-module__arrowVertical___tBfVN",Tr="ControlSlider-module__nextArrow___-30Yc",_r="ControlSlider-module__arrowInner___aEra3",Ar="ControlSlider-module__arrowIcon___S4ztF",Er="ControlSlider-module__arrowImg___2dwJW",Lr="ControlSlider-module__mirror___brd6U",Ir="ControlSlider-module__pagination___bicLF",kr="ControlSlider-module__paginationInner___bT-P-",Fr="ControlSlider-module__paginationVertical___zYqKw",Pr="ControlSlider-module__paginationItem___nTRbk",Rr="ControlSlider-module__dot___p1Qun",Mr="ControlSlider-module__activeDot___LHFaj",Wr="ControlSlider-module__paginationInsideBottom___R3FWn",Nr="ControlSlider-module__paginationInsideTop___V-qb-",Hr="ControlSlider-module__paginationOutsideBottom___14w8D",Vr="ControlSlider-module__paginationOutsideTop___SCLqB",jr="ControlSlider-module__paginationInsideLeft___yOBRZ",Or="ControlSlider-module__paginationInsideRight___Rtt3o",zr="ControlSlider-module__paginationOutsideLeft___lahaw",Br="ControlSlider-module__paginationOutsideRight___EtuQa",Dr="ControlSlider-module__imgWrapper___UjEgB",Ur="ControlSlider-module__captionBlock___dJ6-j",qr="ControlSlider-module__captionTextWrapper___HFlpf",Gr="ControlSlider-module__captionText___uGBVc",Yr="ControlSlider-module__active___WZK4G",Xr="ControlSlider-module__withPointerEvents___t-18M",Kr="ControlSlider-module__topLeftAlignment___zjnGM",Zr="ControlSlider-module__topCenterAlignment___gD1xW",Jr="ControlSlider-module__topRightAlignment___NMapS",Qr="ControlSlider-module__middleLeftAlignment___OnUrY",ei="ControlSlider-module__middleCenterAlignment___Tdkl0",ti="ControlSlider-module__middleRightAlignment___wEbfX",ni="ControlSlider-module__bottomLeftAlignment___cTP2-",oi="ControlSlider-module__bottomCenterAlignment___c54fB",ri="ControlSlider-module__bottomRightAlignment___kEwrz",ii="ControlSlider-module__clickOverlay___DZA28",ai="ControlSlider-module__contain___pLyq7",li="ControlSlider-module__cover___KdDat",J={wrapper:br,hoverArrow:xr,sliderItem:Sr,sliderImage:Cr,arrow:$r,arrowVertical:wr,nextArrow:Tr,arrowInner:_r,arrowIcon:Ar,arrowImg:Er,mirror:Lr,pagination:Ir,paginationInner:kr,paginationVertical:Fr,paginationItem:Pr,dot:Rr,activeDot:Mr,paginationInsideBottom:Wr,paginationInsideTop:Nr,paginationOutsideBottom:Hr,paginationOutsideTop:Vr,paginationInsideLeft:jr,paginationInsideRight:Or,paginationOutsideLeft:zr,paginationOutsideRight:Br,imgWrapper:Dr,captionBlock:Ur,captionTextWrapper:qr,captionText:Gr,active:Yr,withPointerEvents:Xr,topLeftAlignment:Kr,topCenterAlignment:Zr,topRightAlignment:Jr,middleLeftAlignment:Qr,middleCenterAlignment:ei,middleRightAlignment:ti,bottomLeftAlignment:ni,bottomCenterAlignment:oi,bottomRightAlignment:ri,clickOverlay:ii,contain:ai,cover:li};function si(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ci(e,t,n){return t&&si(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var no="(prefers-reduced-motion: reduce)",pt=1,ui=2,ft=3,vt=4,Rt=5,Xt=6,Qt=7,pi={CREATED:pt,MOUNTED:ui,IDLE:ft,MOVING:vt,SCROLLING:Rt,DRAGGING:Xt,DESTROYED:Qt};function Ue(e){e.length=0}function Je(e,t,n){return Array.prototype.slice.call(e,t,n)}function ye(e){return e.bind.apply(e,[null].concat(Je(arguments,1)))}var Ao=setTimeout,wn=function(){};function oo(e){return requestAnimationFrame(e)}function rn(e,t){return typeof t===e}function _t(e){return!Rn(e)&&rn("object",e)}var Pn=Array.isArray,Eo=ye(rn,"function"),Ke=ye(rn,"string"),Mt=ye(rn,"undefined");function Rn(e){return e===null}function Lo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Wt(e){return Pn(e)?e:[e]}function Ee(e,t){Wt(e).forEach(t)}function Mn(e,t){return e.indexOf(t)>-1}function Kt(e,t){return e.push.apply(e,Wt(t)),e}function ze(e,t,n){e&&Ee(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function Me(e,t){ze(e,Ke(t)?t.split(" "):t,!0)}function Nt(e,t){Ee(t,e.appendChild.bind(e))}function Wn(e,t){Ee(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function At(e,t){return Lo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Io(e,t){var n=e?Je(e.children):[];return t?n.filter(function(o){return At(o,t)}):n}function Ht(e,t){return t?Io(e,t)[0]:e.firstElementChild}var Et=Object.keys;function ot(e,t,n){return e&&(n?Et(e).reverse():Et(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function Lt(e){return Je(arguments,1).forEach(function(t){ot(t,function(n,o){e[o]=t[o]})}),e}function Ye(e){return Je(arguments,1).forEach(function(t){ot(t,function(n,o){Pn(n)?e[o]=n.slice():_t(n)?e[o]=Ye({},_t(e[o])?e[o]:{},n):e[o]=n})}),e}function ro(e,t){Ee(t||Et(e),function(n){delete e[n]})}function We(e,t){Ee(e,function(n){Ee(t,function(o){n&&n.removeAttribute(o)})})}function le(e,t,n){_t(t)?ot(t,function(o,r){le(e,r,o)}):Ee(e,function(o){Rn(n)||n===""?We(o,t):o.setAttribute(t,String(n))})}function dt(e,t,n){var o=document.createElement(e);return t&&(Ke(t)?Me(o,t):le(o,t)),n&&Nt(n,o),o}function Ie(e,t,n){if(Mt(n))return getComputedStyle(e)[t];Rn(n)||(e.style[t]=""+n)}function It(e,t){Ie(e,"display",t)}function ko(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function ke(e,t){return e.getAttribute(t)}function io(e,t){return e&&e.classList.contains(t)}function _e(e){return e.getBoundingClientRect()}function rt(e){Ee(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Fo(e){return Ht(new DOMParser().parseFromString(e,"text/html").body)}function Oe(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Po(e,t){return e&&e.querySelector(t)}function Nn(e,t){return t?Je(e.querySelectorAll(t)):[]}function Be(e,t){ze(e,t,!1)}function Tn(e){return e.timeStamp}function nt(e){return Ke(e)?e:e?e+"px":""}var Vt="splide",Hn="data-"+Vt;function wt(e,t){if(!e)throw new Error("["+Vt+"] "+(t||""))}var Ze=Math.min,en=Math.max,tn=Math.floor,kt=Math.ceil,$e=Math.abs;function Ro(e,t,n){return $e(e-t)<n}function Zt(e,t,n,o){var r=Ze(t,n),a=en(t,n);return o?r<e&&e<a:r<=e&&e<=a}function ct(e,t,n){var o=Ze(t,n),r=en(t,n);return Ze(en(o,e),r)}function _n(e){return+(e>0)-+(e<0)}function An(e,t){return Ee(t,function(n){e=e.replace("%s",""+n)}),e}function Vn(e){return e<10?"0"+e:""+e}var ao={};function di(e){return""+e+Vn(ao[e]=(ao[e]||0)+1)}function Mo(){var e=[];function t(i,u,s,g){r(i,u,function(c,A,x){var f="addEventListener"in c,p=f?c.removeEventListener.bind(c,A,s,g):c.removeListener.bind(c,s);f?c.addEventListener(A,s,g):c.addListener(s),e.push([c,A,x,s,p])})}function n(i,u,s){r(i,u,function(g,c,A){e=e.filter(function(x){return x[0]===g&&x[1]===c&&x[2]===A&&(!s||x[3]===s)?(x[4](),!1):!0})})}function o(i,u,s){var g,c=!0;return typeof CustomEvent=="function"?g=new CustomEvent(u,{bubbles:c,detail:s}):(g=document.createEvent("CustomEvent"),g.initCustomEvent(u,c,!1,s)),i.dispatchEvent(g),g}function r(i,u,s){Ee(i,function(g){g&&Ee(u,function(c){c.split(" ").forEach(function(A){var x=A.split(".");s(g,x[0],x[1])})})})}function a(){e.forEach(function(i){i[4]()}),Ue(e)}return{bind:t,unbind:n,dispatch:o,destroy:a}}var Qe="mounted",En="ready",qe="move",bt="moved",jn="click",Wo="active",No="inactive",Ho="visible",Vo="hidden",xe="refresh",Ce="updated",ht="resize",an="resized",jo="drag",Oo="dragging",zo="dragged",ln="scroll",at="scrolled",gi="overflow",On="destroy",Bo="arrows:mounted",Do="arrows:updated",Uo="pagination:mounted",qo="pagination:updated",zn="navigation:mounted",Bn="autoplay:play",Go="autoplay:playing",Dn="autoplay:pause",Un="lazyload:loaded",Yo="sk",Xo="sh",nn="ei";function ve(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Mo();function o(a,i){n.bind(t,Wt(a).join(" "),function(u){i.apply(i,Pn(u.detail)?u.detail:[])})}function r(a){n.dispatch(t,a,Je(arguments,1))}return e&&e.event.on(On,n.destroy),Lt(n,{bus:t,on:o,off:ye(n.unbind,t),emit:r})}function sn(e,t,n,o){var r=Date.now,a,i=0,u,s=!0,g=0;function c(){if(!s){if(i=e?Ze((r()-a)/e,1):1,n&&n(i),i>=1&&(t(),a=r(),o&&++g>=o))return x();u=oo(c)}}function A(y){y||p(),a=r()-(y?i*e:0),s=!1,u=oo(c)}function x(){s=!0}function f(){a=r(),i=0,n&&n(i)}function p(){u&&cancelAnimationFrame(u),i=0,u=0,s=!0}function d(y){e=y}function S(){return s}return{start:A,rewind:f,pause:x,cancel:p,set:d,isPaused:S}}function mi(e){var t=e;function n(r){t=r}function o(r){return Mn(Wt(r),t)}return{set:n,is:o}}function fi(e,t){var n=sn(0,e,null,1);return function(){n.isPaused()&&n.start()}}function hi(e,t,n){var o=e.state,r=n.breakpoints||{},a=n.reducedMotion||{},i=Mo(),u=[];function s(){var p=n.mediaQuery==="min";Et(r).sort(function(d,S){return p?+d-+S:+S-+d}).forEach(function(d){c(r[d],"("+(p?"min":"max")+"-width:"+d+"px)")}),c(a,no),A()}function g(p){p&&i.destroy()}function c(p,d){var S=matchMedia(d);i.bind(S,"change",A),u.push([p,S])}function A(){var p=o.is(Qt),d=n.direction,S=u.reduce(function(y,v){return Ye(y,v[1].matches?v[0]:{})},{});ro(n),f(S),n.destroy?e.destroy(n.destroy==="completely"):p?(g(!0),e.mount()):d!==n.direction&&e.refresh()}function x(p){matchMedia(no).matches&&(p?Ye(n,a):ro(n,Et(a)))}function f(p,d,S){Ye(n,p),d&&Ye(Object.getPrototypeOf(n),p),(S||!o.is(pt))&&e.emit(Ce,n)}return{setup:s,destroy:g,reduce:x,set:f}}var cn="Arrow",un=cn+"Left",pn=cn+"Right",Ko=cn+"Up",Zo=cn+"Down",lo="rtl",dn="ttb",vn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Ko,pn],ArrowRight:[Zo,un]};function yi(e,t,n){function o(a,i,u){u=u||n.direction;var s=u===lo&&!i?1:u===dn?0:-1;return vn[a]&&vn[a][s]||a.replace(/width|left|right/i,function(g,c){var A=vn[g.toLowerCase()][s]||g;return c>0?A.charAt(0).toUpperCase()+A.slice(1):A})}function r(a){return a*(n.direction===lo?1:-1)}return{resolve:o,orient:r}}var De="role",gt="tabindex",vi="disabled",Fe="aria-",jt=Fe+"controls",Jo=Fe+"current",so=Fe+"selected",Ae=Fe+"label",qn=Fe+"labelledby",Qo=Fe+"hidden",Gn=Fe+"orientation",Ft=Fe+"roledescription",co=Fe+"live",uo=Fe+"busy",po=Fe+"atomic",Yn=[De,gt,vi,jt,Jo,Ae,qn,Qo,Gn,Ft],Ne=Vt+"__",et="is-",bn=Vt,go=Ne+"track",bi=Ne+"list",gn=Ne+"slide",er=gn+"--clone",xi=gn+"__container",Xn=Ne+"arrows",mn=Ne+"arrow",tr=mn+"--prev",nr=mn+"--next",fn=Ne+"pagination",or=fn+"__page",Si=Ne+"progress",Ci=Si+"__bar",$i=Ne+"toggle",wi=Ne+"spinner",Ti=Ne+"sr",_i=et+"initialized",it=et+"active",rr=et+"prev",ir=et+"next",Ln=et+"visible",In=et+"loading",ar=et+"focus-in",lr=et+"overflow",Ai=[it,Ln,rr,ir,In,ar,lr],Ei={slide:gn,clone:er,arrows:Xn,arrow:mn,prev:tr,next:nr,pagination:fn,page:or,spinner:wi};function Li(e,t){if(Eo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!At(n,t);)n=n.parentElement;return n}var Ii=5,mo=200,sr="touchstart mousedown",xn="touchmove mousemove",Sn="touchend touchcancel mouseup click";function ki(e,t,n){var o=ve(e),r=o.on,a=o.bind,i=e.root,u=n.i18n,s={},g=[],c=[],A=[],x,f,p;function d(){_(),D(),v()}function S(){r(xe,y),r(xe,d),r(Ce,v),a(document,sr+" keydown",function(m){p=m.type==="keydown"},{capture:!0}),a(i,"focusin",function(){ze(i,ar,!!p)})}function y(m){var k=Yn.concat("style");Ue(g),Be(i,c),Be(x,A),We([x,f],k),We(i,m?k:["style",Ft])}function v(){Be(i,c),Be(x,A),c=T(bn),A=T(go),Me(i,c),Me(x,A),le(i,Ae,n.label),le(i,qn,n.labelledby)}function _(){x=V("."+go),f=Ht(x,"."+bi),wt(x&&f,"A track/list element is missing."),Kt(g,Io(f,"."+gn+":not(."+er+")")),ot({arrows:Xn,pagination:fn,prev:tr,next:nr,bar:Ci,toggle:$i},function(m,k){s[k]=V("."+m)}),Lt(s,{root:i,track:x,list:f,slides:g})}function D(){var m=i.id||di(Vt),k=n.role;i.id=m,x.id=x.id||m+"-track",f.id=f.id||m+"-list",!ke(i,De)&&i.tagName!=="SECTION"&&k&&le(i,De,k),le(i,Ft,u.carousel),le(f,De,"presentation")}function V(m){var k=Po(i,m);return k&&Li(k,"."+bn)===i?k:void 0}function T(m){return[m+"--"+n.type,m+"--"+n.direction,n.drag&&m+"--draggable",n.isNavigation&&m+"--nav",m===bn&&it]}return Lt(s,{setup:d,mount:S,destroy:y})}var yt="slide",xt="loop",Ot="fade";function Fi(e,t,n,o){var r=ve(e),a=r.on,i=r.emit,u=r.bind,s=e.Components,g=e.root,c=e.options,A=c.isNavigation,x=c.updateOnMove,f=c.i18n,p=c.pagination,d=c.slideFocus,S=s.Direction.resolve,y=ke(o,"style"),v=ke(o,Ae),_=n>-1,D=Ht(o,"."+xi),V;function T(){_||(o.id=g.id+"-slide"+Vn(t+1),le(o,De,p?"tabpanel":"group"),le(o,Ft,f.slide),le(o,Ae,v||An(f.slideLabel,[t+1,e.length]))),m()}function m(){u(o,"click",ye(i,jn,I)),u(o,"keydown",ye(i,Yo,I)),a([bt,Xo,at],F),a(zn,R),x&&a(qe,O)}function k(){V=!0,r.destroy(),Be(o,Ai),We(o,Yn),le(o,"style",y),le(o,Ae,v||"")}function R(){var L=e.splides.map(function(w){var N=w.splide.Components.Slides.getAt(t);return N?N.slide.id:""}).join(" ");le(o,Ae,An(f.slideX,(_?n:t)+1)),le(o,jt,L),le(o,De,d?"button":""),d&&We(o,Ft)}function O(){V||F()}function F(){if(!V){var L=e.index;H(),M(),ze(o,rr,t===L-1),ze(o,ir,t===L+1)}}function H(){var L=G();L!==io(o,it)&&(ze(o,it,L),le(o,Jo,A&&L||""),i(L?Wo:No,I))}function M(){var L=h(),w=!L&&(!G()||_);if(e.state.is([vt,Rt])||le(o,Qo,w||""),le(Nn(o,c.focusableNodes||""),gt,w?-1:""),d&&le(o,gt,w?-1:0),L!==io(o,Ln)&&(ze(o,Ln,L),i(L?Ho:Vo,I)),!L&&document.activeElement===o){var N=s.Slides.getAt(e.index);N&&ko(N.slide)}}function X(L,w,N){Ie(N&&D||o,L,w)}function G(){var L=e.index;return L===t||c.cloneStatus&&L===n}function h(){if(e.is(Ot))return G();var L=_e(s.Elements.track),w=_e(o),N=S("left",!0),K=S("right",!0);return tn(L[N])<=kt(w[N])&&tn(w[K])<=kt(L[K])}function E(L,w){var N=$e(L-t);return!_&&(c.rewind||e.is(xt))&&(N=Ze(N,e.length-N)),N<=w}var I={index:t,slideIndex:n,slide:o,container:D,isClone:_,mount:T,destroy:k,update:F,style:X,isWithin:E};return I}function Pi(e,t,n){var o=ve(e),r=o.on,a=o.emit,i=o.bind,u=t.Elements,s=u.slides,g=u.list,c=[];function A(){x(),r(xe,f),r(xe,x)}function x(){s.forEach(function(F,H){d(F,H,-1)})}function f(){V(function(F){F.destroy()}),Ue(c)}function p(){V(function(F){F.update()})}function d(F,H,M){var X=Fi(e,H,M,F);X.mount(),c.push(X),c.sort(function(G,h){return G.index-h.index})}function S(F){return F?T(function(H){return!H.isClone}):c}function y(F){var H=t.Controller,M=H.toIndex(F),X=H.hasFocus()?1:n.perPage;return T(function(G){return Zt(G.index,M,M+X-1)})}function v(F){return T(F)[0]}function _(F,H){Ee(F,function(M){if(Ke(M)&&(M=Fo(M)),Lo(M)){var X=s[H];X?Wn(M,X):Nt(g,M),Me(M,n.classes.slide),k(M,ye(a,ht))}}),a(xe)}function D(F){rt(T(F).map(function(H){return H.slide})),a(xe)}function V(F,H){S(H).forEach(F)}function T(F){return c.filter(Eo(F)?F:function(H){return Ke(F)?At(H.slide,F):Mn(Wt(F),H.index)})}function m(F,H,M){V(function(X){X.style(F,H,M)})}function k(F,H){var M=Nn(F,"img"),X=M.length;X?M.forEach(function(G){i(G,"load error",function(){--X||H()})}):H()}function R(F){return F?s.length:c.length}function O(){return c.length>n.perPage}return{mount:A,destroy:f,update:p,register:d,get:S,getIn:y,getAt:v,add:_,remove:D,forEach:V,filter:T,style:m,getLength:R,isEnough:O}}function Ri(e,t,n){var o=ve(e),r=o.on,a=o.bind,i=o.emit,u=t.Slides,s=t.Direction.resolve,g=t.Elements,c=g.root,A=g.track,x=g.list,f=u.getAt,p=u.style,d,S,y;function v(){_(),a(window,"resize load",fi(ye(i,ht))),r([Ce,xe],_),r(ht,D)}function _(){d=n.direction===dn,Ie(c,"maxWidth",nt(n.width)),Ie(A,s("paddingLeft"),V(!1)),Ie(A,s("paddingRight"),V(!0)),D(!0)}function D(I){var L=_e(c);(I||S.width!==L.width||S.height!==L.height)&&(Ie(A,"height",T()),p(s("marginRight"),nt(n.gap)),p("width",k()),p("height",R(),!0),S=L,i(an),y!==(y=E())&&(ze(c,lr,y),i(gi,y)))}function V(I){var L=n.padding,w=s(I?"right":"left");return L&&nt(L[w]||(_t(L)?0:L))||"0px"}function T(){var I="";return d&&(I=m(),wt(I,"height or heightRatio is missing."),I="calc("+I+" - "+V(!1)+" - "+V(!0)+")"),I}function m(){return nt(n.height||_e(x).width*n.heightRatio)}function k(){return n.autoWidth?null:nt(n.fixedWidth)||(d?"":O())}function R(){return nt(n.fixedHeight)||(d?n.autoHeight?null:O():m())}function O(){var I=nt(n.gap);return"calc((100%"+(I&&" + "+I)+")/"+(n.perPage||1)+(I&&" - "+I)+")"}function F(){return _e(x)[s("width")]}function H(I,L){var w=f(I||0);return w?_e(w.slide)[s("width")]+(L?0:G()):0}function M(I,L){var w=f(I);if(w){var N=_e(w.slide)[s("right")],K=_e(x)[s("left")];return $e(N-K)+(L?0:G())}return 0}function X(I){return M(e.length-1)-M(0)+H(0,I)}function G(){var I=f(0);return I&&parseFloat(Ie(I.slide,s("marginRight")))||0}function h(I){return parseFloat(Ie(A,s("padding"+(I?"Right":"Left"))))||0}function E(){return e.is(Ot)||X(!0)>F()}return{mount:v,resize:D,listSize:F,slideSize:H,sliderSize:X,totalSize:M,getPadding:h,isOverflow:E}}var Mi=2;function Wi(e,t,n){var o=ve(e),r=o.on,a=t.Elements,i=t.Slides,u=t.Direction.resolve,s=[],g;function c(){r(xe,A),r([Ce,ht],f),(g=S())&&(p(g),t.Layout.resize(!0))}function A(){x(),c()}function x(){rt(s),Ue(s),o.destroy()}function f(){var y=S();g!==y&&(g<y||!y)&&o.emit(xe)}function p(y){var v=i.get().slice(),_=v.length;if(_){for(;v.length<y;)Kt(v,v);Kt(v.slice(-y),v.slice(0,y)).forEach(function(D,V){var T=V<y,m=d(D.slide,V);T?Wn(m,v[0].slide):Nt(a.list,m),Kt(s,m),i.register(m,V-y+(T?0:_),D.index)})}}function d(y,v){var _=y.cloneNode(!0);return Me(_,n.classes.clone),_.id=e.root.id+"-clone"+Vn(v+1),_}function S(){var y=n.clones;if(!e.is(xt))y=0;else if(Mt(y)){var v=n[u("fixedWidth")]&&t.Layout.slideSize(0),_=v&&kt(_e(a.track)[u("width")]/v);y=_||n[u("autoWidth")]&&e.length||n.perPage*Mi}return y}return{mount:c,destroy:x}}function Ni(e,t,n){var o=ve(e),r=o.on,a=o.emit,i=e.state.set,u=t.Layout,s=u.slideSize,g=u.getPadding,c=u.totalSize,A=u.listSize,x=u.sliderSize,f=t.Direction,p=f.resolve,d=f.orient,S=t.Elements,y=S.list,v=S.track,_;function D(){_=t.Transition,r([Qe,an,Ce,xe],V)}function V(){t.Controller.isBusy()||(t.Scroll.cancel(),m(e.index),t.Slides.update())}function T(w,N,K,ie){w!==N&&I(w>K)&&(F(),k(O(X(),w>K),!0)),i(vt),a(qe,N,K,w),_.start(N,function(){i(ft),a(bt,N,K,w),ie&&ie()})}function m(w){k(M(w,!0))}function k(w,N){if(!e.is(Ot)){var K=N?w:R(w);Ie(y,"transform","translate"+p("X")+"("+K+"px)"),w!==K&&a(Xo)}}function R(w){if(e.is(xt)){var N=H(w),K=N>t.Controller.getEnd(),ie=N<0;(ie||K)&&(w=O(w,K))}return w}function O(w,N){var K=w-E(N),ie=x();return w-=d(ie*(kt($e(K)/ie)||1))*(N?1:-1),w}function F(){k(X(),!0),_.cancel()}function H(w){for(var N=t.Slides.get(),K=0,ie=1/0,ne=0;ne<N.length;ne++){var ce=N[ne].index,P=$e(M(ce,!0)-w);if(P<=ie)ie=P,K=ce;else break}return K}function M(w,N){var K=d(c(w-1)-h(w));return N?G(K):K}function X(){var w=p("left");return _e(y)[w]-_e(v)[w]+d(g(!1))}function G(w){return n.trimSpace&&e.is(yt)&&(w=ct(w,0,d(x(!0)-A()))),w}function h(w){var N=n.focus;return N==="center"?(A()-s(w,!0))/2:+N*s(w)||0}function E(w){return M(w?t.Controller.getEnd():0,!!n.trimSpace)}function I(w){var N=d(O(X(),w));return w?N>=0:N<=y[p("scrollWidth")]-_e(v)[p("width")]}function L(w,N){N=Mt(N)?X():N;var K=w!==!0&&d(N)<d(E(!1)),ie=w!==!1&&d(N)>d(E(!0));return K||ie}return{mount:D,move:T,jump:m,translate:k,shift:O,cancel:F,toIndex:H,toPosition:M,getPosition:X,getLimit:E,exceededLimit:L,reposition:V}}function Hi(e,t,n){var o=ve(e),r=o.on,a=o.emit,i=t.Move,u=i.getPosition,s=i.getLimit,g=i.toPosition,c=t.Slides,A=c.isEnough,x=c.getLength,f=n.omitEnd,p=e.is(xt),d=e.is(yt),S=ye(X,!1),y=ye(X,!0),v=n.start||0,_,D=v,V,T,m;function k(){R(),r([Ce,xe,nn],R),r(an,O)}function R(){V=x(!0),T=n.perMove,m=n.perPage,_=I();var P=ct(v,0,f?_:V-1);P!==v&&(v=P,i.reposition())}function O(){_!==I()&&a(nn)}function F(P,Q,de){if(!ce()){var pe=M(P),Y=E(pe);Y>-1&&(Q||Y!==v)&&(K(Y),i.move(pe,Y,D,de))}}function H(P,Q,de,pe){t.Scroll.scroll(P,Q,de,function(){var Y=E(i.toIndex(u()));K(f?Ze(Y,_):Y),pe&&pe()})}function M(P){var Q=v;if(Ke(P)){var de=P.match(/([+\-<>])(\d+)?/)||[],pe=de[1],Y=de[2];pe==="+"||pe==="-"?Q=G(v+ +(""+pe+(+Y||1)),v):pe===">"?Q=Y?L(+Y):S(!0):pe==="<"&&(Q=y(!0))}else Q=p?P:ct(P,0,_);return Q}function X(P,Q){var de=T||(ne()?1:m),pe=G(v+de*(P?-1:1),v,!(T||ne()));return pe===-1&&d&&!Ro(u(),s(!P),1)?P?0:_:Q?pe:E(pe)}function G(P,Q,de){if(A()||ne()){var pe=h(P);pe!==P&&(Q=P,P=pe,de=!1),P<0||P>_?!T&&(Zt(0,P,Q,!0)||Zt(_,Q,P,!0))?P=L(w(P)):p?P=de?P<0?-(V%m||m):V:P:n.rewind?P=P<0?_:0:P=-1:de&&P!==Q&&(P=L(w(Q)+(P<Q?-1:1)))}else P=-1;return P}function h(P){if(d&&n.trimSpace==="move"&&P!==v)for(var Q=u();Q===g(P,!0)&&Zt(P,0,e.length-1,!n.rewind);)P<v?--P:++P;return P}function E(P){return p?(P+V)%V||0:P}function I(){for(var P=V-(ne()||p&&T?1:m);f&&P-- >0;)if(g(V-1,!0)!==g(P,!0)){P++;break}return ct(P,0,V-1)}function L(P){return ct(ne()?P:m*P,0,_)}function w(P){return ne()?Ze(P,_):tn((P>=_?V-1:P)/m)}function N(P){var Q=i.toIndex(P);return d?ct(Q,0,_):Q}function K(P){P!==v&&(D=v,v=P)}function ie(P){return P?D:v}function ne(){return!Mt(n.focus)||n.isNavigation}function ce(){return e.state.is([vt,Rt])&&!!n.waitForTransition}return{mount:k,go:F,scroll:H,getNext:S,getPrev:y,getAdjacent:X,getEnd:I,setIndex:K,getIndex:ie,toIndex:L,toPage:w,toDest:N,hasFocus:ne,isBusy:ce}}var Vi="http://www.w3.org/2000/svg",ji="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",Dt=40;function Oi(e,t,n){var o=ve(e),r=o.on,a=o.bind,i=o.emit,u=n.classes,s=n.i18n,g=t.Elements,c=t.Controller,A=g.arrows,x=g.track,f=A,p=g.prev,d=g.next,S,y,v={};function _(){V(),r(Ce,D)}function D(){T(),_()}function V(){var H=n.arrows;H&&!(p&&d)&&R(),p&&d&&(Lt(v,{prev:p,next:d}),It(f,H?"":"none"),Me(f,y=Xn+"--"+n.direction),H&&(m(),F(),le([p,d],jt,x.id),i(Bo,p,d)))}function T(){o.destroy(),Be(f,y),S?(rt(A?[p,d]:f),p=d=null):We([p,d],Yn)}function m(){r([Qe,bt,xe,at,nn],F),a(d,"click",ye(k,">")),a(p,"click",ye(k,"<"))}function k(H){c.go(H,!0)}function R(){f=A||dt("div",u.arrows),p=O(!0),d=O(!1),S=!0,Nt(f,[p,d]),!A&&Wn(f,x)}function O(H){var M='<button class="'+u.arrow+" "+(H?u.prev:u.next)+'" type="button"><svg xmlns="'+Vi+'" viewBox="0 0 '+Dt+" "+Dt+'" width="'+Dt+'" height="'+Dt+'" focusable="false"><path d="'+(n.arrowPath||ji)+'" />';return Fo(M)}function F(){if(p&&d){var H=e.index,M=c.getPrev(),X=c.getNext(),G=M>-1&&H<M?s.last:s.prev,h=X>-1&&H>X?s.first:s.next;p.disabled=M<0,d.disabled=X<0,le(p,Ae,G),le(d,Ae,h),i(Do,p,d,M,X)}}return{arrows:v,mount:_,destroy:T,update:F}}var zi=Hn+"-interval";function Bi(e,t,n){var o=ve(e),r=o.on,a=o.bind,i=o.emit,u=sn(n.interval,e.go.bind(e,">"),m),s=u.isPaused,g=t.Elements,c=t.Elements,A=c.root,x=c.toggle,f=n.autoplay,p,d,S=f==="pause";function y(){f&&(v(),x&&le(x,jt,g.track.id),S||_(),T())}function v(){n.pauseOnHover&&a(A,"mouseenter mouseleave",function(R){p=R.type==="mouseenter",V()}),n.pauseOnFocus&&a(A,"focusin focusout",function(R){d=R.type==="focusin",V()}),x&&a(x,"click",function(){S?_():D(!0)}),r([qe,ln,xe],u.rewind),r(qe,k)}function _(){s()&&t.Slides.isEnough()&&(u.start(!n.resetProgress),d=p=S=!1,T(),i(Bn))}function D(R){R===void 0&&(R=!0),S=!!R,T(),s()||(u.pause(),i(Dn))}function V(){S||(p||d?D(!1):_())}function T(){x&&(ze(x,it,!S),le(x,Ae,n.i18n[S?"play":"pause"]))}function m(R){var O=g.bar;O&&Ie(O,"width",R*100+"%"),i(Go,R)}function k(R){var O=t.Slides.getAt(R);u.set(O&&+ke(O.slide,zi)||n.interval)}return{mount:y,destroy:u.cancel,play:_,pause:D,isPaused:s}}function Di(e,t,n){var o=ve(e),r=o.on;function a(){n.cover&&(r(Un,ye(u,!0)),r([Qe,Ce,xe],ye(i,!0)))}function i(s){t.Slides.forEach(function(g){var c=Ht(g.container||g.slide,"img");c&&c.src&&u(s,c,g)})}function u(s,g,c){c.style("background",s?'center/cover no-repeat url("'+g.src+'")':"",!0),It(g,s?"none":"")}return{mount:a,destroy:ye(i,!1)}}var Ui=10,qi=600,Gi=.6,Yi=1.5,Xi=800;function Ki(e,t,n){var o=ve(e),r=o.on,a=o.emit,i=e.state.set,u=t.Move,s=u.getPosition,g=u.getLimit,c=u.exceededLimit,A=u.translate,x=e.is(yt),f,p,d=1;function S(){r(qe,D),r([Ce,xe],V)}function y(m,k,R,O,F){var H=s();if(D(),R&&(!x||!c())){var M=t.Layout.sliderSize(),X=_n(m)*M*tn($e(m)/M)||0;m=u.toPosition(t.Controller.toDest(m%M))+X}var G=Ro(H,m,1);d=1,k=G?0:k||en($e(m-H)/Yi,Xi),p=O,f=sn(k,v,ye(_,H,m,F),1),i(Rt),a(ln),f.start()}function v(){i(ft),p&&p(),a(at)}function _(m,k,R,O){var F=s(),H=m+(k-m)*T(O),M=(H-F)*d;A(F+M),x&&!R&&c()&&(d*=Gi,$e(M)<Ui&&y(g(c(!0)),qi,!1,p,!0))}function D(){f&&f.cancel()}function V(){f&&!f.isPaused()&&(D(),v())}function T(m){var k=n.easingFunc;return k?k(m):1-Math.pow(1-m,4)}return{mount:S,destroy:D,scroll:y,cancel:V}}var ut={passive:!1,capture:!0};function Zi(e,t,n){var o=ve(e),r=o.on,a=o.emit,i=o.bind,u=o.unbind,s=e.state,g=t.Move,c=t.Scroll,A=t.Controller,x=t.Elements.track,f=t.Media.reduce,p=t.Direction,d=p.resolve,S=p.orient,y=g.getPosition,v=g.exceededLimit,_,D,V,T,m,k=!1,R,O,F;function H(){i(x,xn,wn,ut),i(x,Sn,wn,ut),i(x,sr,X,ut),i(x,"click",E,{capture:!0}),i(x,"dragstart",Oe),r([Qe,Ce],M)}function M(){var j=n.drag;fe(!j),T=j==="free"}function X(j){if(R=!1,!O){var b=Y(j);pe(j.target)&&(b||!j.button)&&(A.isBusy()?Oe(j,!0):(F=b?x:window,m=s.is([vt,Rt]),V=null,i(F,xn,G,ut),i(F,Sn,h,ut),g.cancel(),c.cancel(),I(j)))}}function G(j){if(s.is(Xt)||(s.set(Xt),a(jo)),j.cancelable)if(m){g.translate(_+de(ne(j)));var b=ce(j)>mo,U=k!==(k=v());(b||U)&&I(j),R=!0,a(Oo),Oe(j)}else N(j)&&(m=w(j),Oe(j))}function h(j){s.is(Xt)&&(s.set(ft),a(zo)),m&&(L(j),Oe(j)),u(F,xn,G),u(F,Sn,h),m=!1}function E(j){!O&&R&&Oe(j,!0)}function I(j){V=D,D=j,_=y()}function L(j){var b=K(j),U=ie(b),Z=n.rewind&&n.rewindByDrag;f(!1),T?A.scroll(U,0,n.snap):e.is(Ot)?A.go(S(_n(b))<0?Z?"<":"-":Z?">":"+"):e.is(yt)&&k&&Z?A.go(v(!0)?">":"<"):A.go(A.toDest(U),!0),f(!0)}function w(j){var b=n.dragMinThreshold,U=_t(b),Z=U&&b.mouse||0,te=(U?b.touch:+b)||10;return $e(ne(j))>(Y(j)?te:Z)}function N(j){return $e(ne(j))>$e(ne(j,!0))}function K(j){if(e.is(xt)||!k){var b=ce(j);if(b&&b<mo)return ne(j)/b}return 0}function ie(j){return y()+_n(j)*Ze($e(j)*(n.flickPower||600),T?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function ne(j,b){return Q(j,b)-Q(P(j),b)}function ce(j){return Tn(j)-Tn(P(j))}function P(j){return D===j&&V||D}function Q(j,b){return(Y(j)?j.changedTouches[0]:j)["page"+d(b?"Y":"X")]}function de(j){return j/(k&&e.is(yt)?Ii:1)}function pe(j){var b=n.noDrag;return!At(j,"."+or+", ."+mn)&&(!b||!At(j,b))}function Y(j){return typeof TouchEvent<"u"&&j instanceof TouchEvent}function ae(){return m}function fe(j){O=j}return{mount:H,disable:fe,isDragging:ae}}var Ji={Spacebar:" ",Right:pn,Left:un,Up:Ko,Down:Zo};function Kn(e){return e=Ke(e)?e:e.key,Ji[e]||e}var fo="keydown";function Qi(e,t,n){var o=ve(e),r=o.on,a=o.bind,i=o.unbind,u=e.root,s=t.Direction.resolve,g,c;function A(){x(),r(Ce,f),r(Ce,x),r(qe,d)}function x(){var y=n.keyboard;y&&(g=y==="global"?window:u,a(g,fo,S))}function f(){i(g,fo)}function p(y){c=y}function d(){var y=c;c=!0,Ao(function(){c=y})}function S(y){if(!c){var v=Kn(y);v===s(un)?e.go("<"):v===s(pn)&&e.go(">")}}return{mount:A,destroy:f,disable:p}}var Tt=Hn+"-lazy",Jt=Tt+"-srcset",ea="["+Tt+"], ["+Jt+"]";function ta(e,t,n){var o=ve(e),r=o.on,a=o.off,i=o.bind,u=o.emit,s=n.lazyLoad==="sequential",g=[bt,at],c=[];function A(){n.lazyLoad&&(x(),r(xe,x))}function x(){Ue(c),f(),s?y():(a(g),r(g,p),p())}function f(){t.Slides.forEach(function(v){Nn(v.slide,ea).forEach(function(_){var D=ke(_,Tt),V=ke(_,Jt);if(D!==_.src||V!==_.srcset){var T=n.classes.spinner,m=_.parentElement,k=Ht(m,"."+T)||dt("span",T,m);c.push([_,v,k]),_.src||It(_,"none")}})})}function p(){c=c.filter(function(v){var _=n.perPage*((n.preloadPages||1)+1)-1;return v[1].isWithin(e.index,_)?d(v):!0}),c.length||a(g)}function d(v){var _=v[0];Me(v[1].slide,In),i(_,"load error",ye(S,v)),le(_,"src",ke(_,Tt)),le(_,"srcset",ke(_,Jt)),We(_,Tt),We(_,Jt)}function S(v,_){var D=v[0],V=v[1];Be(V.slide,In),_.type!=="error"&&(rt(v[2]),It(D,""),u(Un,D,V),u(ht)),s&&y()}function y(){c.length&&d(c.shift())}return{mount:A,destroy:ye(Ue,c),check:p}}function na(e,t,n){var o=ve(e),r=o.on,a=o.emit,i=o.bind,u=t.Slides,s=t.Elements,g=t.Controller,c=g.hasFocus,A=g.getIndex,x=g.go,f=t.Direction.resolve,p=s.pagination,d=[],S,y;function v(){_(),r([Ce,xe,nn],v);var O=n.pagination;p&&It(p,O?"":"none"),O&&(r([qe,ln,at],R),D(),R(),a(Uo,{list:S,items:d},k(e.index)))}function _(){S&&(rt(p?Je(S.children):S),Be(S,y),Ue(d),S=null),o.destroy()}function D(){var O=e.length,F=n.classes,H=n.i18n,M=n.perPage,X=c()?g.getEnd()+1:kt(O/M);S=p||dt("ul",F.pagination,s.track.parentElement),Me(S,y=fn+"--"+m()),le(S,De,"tablist"),le(S,Ae,H.select),le(S,Gn,m()===dn?"vertical":"");for(var G=0;G<X;G++){var h=dt("li",null,S),E=dt("button",{class:F.page,type:"button"},h),I=u.getIn(G).map(function(w){return w.slide.id}),L=!c()&&M>1?H.pageX:H.slideX;i(E,"click",ye(V,G)),n.paginationKeyboard&&i(E,"keydown",ye(T,G)),le(h,De,"presentation"),le(E,De,"tab"),le(E,jt,I.join(" ")),le(E,Ae,An(L,G+1)),le(E,gt,-1),d.push({li:h,button:E,page:G})}}function V(O){x(">"+O,!0)}function T(O,F){var H=d.length,M=Kn(F),X=m(),G=-1;M===f(pn,!1,X)?G=++O%H:M===f(un,!1,X)?G=(--O+H)%H:M==="Home"?G=0:M==="End"&&(G=H-1);var h=d[G];h&&(ko(h.button),x(">"+G),Oe(F,!0))}function m(){return n.paginationDirection||n.direction}function k(O){return d[g.toPage(O)]}function R(){var O=k(A(!0)),F=k(A());if(O){var H=O.button;Be(H,it),We(H,so),le(H,gt,-1)}if(F){var M=F.button;Me(M,it),le(M,so,!0),le(M,gt,"")}a(qo,{list:S,items:d},O,F)}return{items:d,mount:v,destroy:_,getAt:k,update:R}}var oa=[" ","Enter"];function ra(e,t,n){var o=n.isNavigation,r=n.slideFocus,a=[];function i(){e.splides.forEach(function(p){p.isParent||(g(e,p.splide),g(p.splide,e))}),o&&c()}function u(){a.forEach(function(p){p.destroy()}),Ue(a)}function s(){u(),i()}function g(p,d){var S=ve(p);S.on(qe,function(y,v,_){d.go(d.is(xt)?_:y)}),a.push(S)}function c(){var p=ve(e),d=p.on;d(jn,x),d(Yo,f),d([Qe,Ce],A),a.push(p),p.emit(zn,e.splides)}function A(){le(t.Elements.list,Gn,n.direction===dn?"vertical":"")}function x(p){e.go(p.index)}function f(p,d){Mn(oa,Kn(d))&&(x(p),Oe(d))}return{setup:ye(t.Media.set,{slideFocus:Mt(r)?o:r},!0),mount:i,destroy:u,remount:s}}function ia(e,t,n){var o=ve(e),r=o.bind,a=0;function i(){n.wheel&&r(t.Elements.track,"wheel",u,ut)}function u(g){if(g.cancelable){var c=g.deltaY,A=c<0,x=Tn(g),f=n.wheelMinThreshold||0,p=n.wheelSleep||0;$e(c)>f&&x-a>p&&(e.go(A?"<":">"),a=x),s(A)&&Oe(g)}}function s(g){return!n.releaseWheel||e.state.is(vt)||t.Controller.getAdjacent(g)!==-1}return{mount:i}}var aa=90;function la(e,t,n){var o=ve(e),r=o.on,a=t.Elements.track,i=n.live&&!n.isNavigation,u=dt("span",Ti),s=sn(aa,ye(c,!1));function g(){i&&(x(!t.Autoplay.isPaused()),le(a,po,!0),u.textContent="…",r(Bn,ye(x,!0)),r(Dn,ye(x,!1)),r([bt,at],ye(c,!0)))}function c(f){le(a,uo,f),f?(Nt(a,u),s.start()):(rt(u),s.cancel())}function A(){We(a,[co,po,uo]),rt(u)}function x(f){i&&le(a,co,f?"off":"polite")}return{mount:g,disable:x,destroy:A}}var sa=Object.freeze({__proto__:null,Media:hi,Direction:yi,Elements:ki,Slides:Pi,Layout:Ri,Clones:Wi,Move:Ni,Controller:Hi,Arrows:Oi,Autoplay:Bi,Cover:Di,Scroll:Ki,Drag:Zi,Keyboard:Qi,LazyLoad:ta,Pagination:na,Sync:ra,Wheel:ia,Live:la}),ca={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"},ua={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:Ei,i18n:ca,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function pa(e,t,n){var o=t.Slides;function r(){ve(e).on([Qe,xe],a)}function a(){o.forEach(function(u){u.style("transform","translateX(-"+100*u.index+"%)")})}function i(u,s){o.style("transition","opacity "+n.speed+"ms "+n.easing),Ao(s)}return{mount:r,start:i,cancel:wn}}function da(e,t,n){var o=t.Move,r=t.Controller,a=t.Scroll,i=t.Elements.list,u=ye(Ie,i,"transition"),s;function g(){ve(e).bind(i,"transitionend",function(f){f.target===i&&s&&(A(),s())})}function c(f,p){var d=o.toPosition(f,!0),S=o.getPosition(),y=x(f);$e(d-S)>=1&&y>=1?n.useScroll?a.scroll(d,y,!1,p):(u("transform "+y+"ms "+n.easing),o.translate(d,!0),s=p):(o.jump(f),p())}function A(){u(""),a.cancel()}function x(f){var p=n.rewindSpeed;if(e.is(yt)&&p){var d=r.getIndex(!0),S=r.getEnd();if(d===0&&f>=S||d>=S&&f===0)return p}return n.speed}return{mount:g,start:c,cancel:A}}var ga=(function(){function e(n,o){this.event=ve(),this.Components={},this.state=mi(pt),this.splides=[],this._o={},this._E={};var r=Ke(n)?Po(document,n):n;wt(r,r+" is invalid."),this.root=r,o=Ye({label:ke(r,Ae)||"",labelledby:ke(r,qn)||""},ua,e.defaults,o||{});try{Ye(o,JSON.parse(ke(r,Hn)))}catch{wt(!1,"Invalid JSON")}this._o=Object.create(Ye({},o))}var t=e.prototype;return t.mount=function(o,r){var a=this,i=this.state,u=this.Components;wt(i.is([pt,Qt]),"Already mounted!"),i.set(pt),this._C=u,this._T=r||this._T||(this.is(Ot)?pa:da),this._E=o||this._E;var s=Lt({},sa,this._E,{Transition:this._T});return ot(s,function(g,c){var A=g(a,u,a._o);u[c]=A,A.setup&&A.setup()}),ot(u,function(g){g.mount&&g.mount()}),this.emit(Qe),Me(this.root,_i),i.set(ft),this.emit(En),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(ft)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},t.go=function(o){return this._C.Controller.go(o),this},t.on=function(o,r){return this.event.on(o,r),this},t.off=function(o){return this.event.off(o),this},t.emit=function(o){var r;return(r=this.event).emit.apply(r,[o].concat(Je(arguments,1))),this},t.add=function(o,r){return this._C.Slides.add(o,r),this},t.remove=function(o){return this._C.Slides.remove(o),this},t.is=function(o){return this._o.type===o},t.refresh=function(){return this.emit(xe),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,a=this.state;return a.is(pt)?ve(this).on(En,this.destroy.bind(this,o)):(ot(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(On),r.destroy(),o&&Ue(this.splides),a.set(Qt)),this},ci(e,[{key:"options",get:function(){return this._o},set:function(o){this._C.Media.set(o,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Zn=ga;Zn.defaults={};Zn.STATES=pi;var ho=[[Qe,"onMounted"],[En,"onReady"],[qe,"onMove"],[bt,"onMoved"],[jn,"onClick"],[Wo,"onActive"],[No,"onInactive"],[Ho,"onVisible"],[Vo,"onHidden"],[xe,"onRefresh"],[Ce,"onUpdated"],[ht,"onResize"],[an,"onResized"],[jo,"onDrag"],[Oo,"onDragging"],[zo,"onDragged"],[ln,"onScroll"],[at,"onScrolled"],[On,"onDestroy"],[Bo,"onArrowsMounted"],[Do,"onArrowsUpdated"],[Uo,"onPaginationMounted"],[qo,"onPaginationUpdated"],[zn,"onNavigationMounted"],[Bn,"onAutoplayPlay"],[Go,"onAutoplayPlaying"],[Dn,"onAutoplayPause"],[Un,"onLazyLoadLoaded"]];function Jn(...e){return e.filter(Boolean).join(" ")}function on(e){return e!==null&&typeof e=="object"}function kn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!kn(n,t[o]));if(on(e)&&on(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!kn(e[r],t[r]))}return e===t}function ma(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function fa(e,t){if(e){const n=Object.keys(e);for(let o=0;o<n.length;o++){const r=n[o];if(r!=="__proto__"&&t(e[r],r)===!1)break}}return e}function Fn(e,t){const n=e;return fa(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():on(o)?n[r]=Fn(on(n[r])?n[r]:{},o):n[r]=o}),n}var ha=({children:e,className:t,...n})=>C.createElement("div",{className:Jn("splide__track",t),...n},C.createElement("ul",{className:"splide__list"},e)),cr=class extends C.Component{constructor(){super(...arguments),this.splideRef=C.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new Zn(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Fn({},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&&!kn(this.options,e)&&(this.splide.options=e,this.options=Fn({},e));const t=this.getSlides();ma(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){ho.forEach(([t,n])=>{const o=this.props[n];typeof o=="function"&&e.on(t,(...r)=>{o(e,...r)})})}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:o,...r}=this.props;return C.createElement(t,{className:Jn("splide",e),ref:this.splideRef,...this.omit(r,["options",...ho.map(a=>a[1])])},n?C.createElement(ha,null,o):o)}},ur=({children:e,className:t,...n})=>C.createElement("li",{className:Jn("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),$=require("react"),ge=require("classnames"),w=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),yr=require("react-dom");function vr(e){return e.type==="object"&&e.version===1}const br="ControlSlider-module__wrapper___sHEkd",xr="ControlSlider-module__hoverArrow___A-dOH",Sr="ControlSlider-module__sliderItem___QQSkR",Cr="ControlSlider-module__sliderImage___9hRl-",$r="ControlSlider-module__arrow___05ghY",wr="ControlSlider-module__arrowVertical___tBfVN",Tr="ControlSlider-module__nextArrow___-30Yc",_r="ControlSlider-module__arrowInner___aEra3",Er="ControlSlider-module__arrowIcon___S4ztF",Ar="ControlSlider-module__arrowImg___2dwJW",Lr="ControlSlider-module__mirror___brd6U",Ir="ControlSlider-module__pagination___bicLF",kr="ControlSlider-module__paginationInner___bT-P-",Fr="ControlSlider-module__paginationVertical___zYqKw",Pr="ControlSlider-module__paginationItem___nTRbk",Mr="ControlSlider-module__dot___p1Qun",Rr="ControlSlider-module__activeDot___LHFaj",Wr="ControlSlider-module__paginationInsideBottom___R3FWn",Nr="ControlSlider-module__paginationInsideTop___V-qb-",Vr="ControlSlider-module__paginationOutsideBottom___14w8D",Hr="ControlSlider-module__paginationOutsideTop___SCLqB",jr="ControlSlider-module__paginationInsideLeft___yOBRZ",Or="ControlSlider-module__paginationInsideRight___Rtt3o",zr="ControlSlider-module__paginationOutsideLeft___lahaw",Br="ControlSlider-module__paginationOutsideRight___EtuQa",Dr="ControlSlider-module__imgWrapper___UjEgB",qr="ControlSlider-module__captionBlock___dJ6-j",Ur="ControlSlider-module__captionTextWrapper___HFlpf",Gr="ControlSlider-module__captionText___uGBVc",Yr="ControlSlider-module__active___WZK4G",Xr="ControlSlider-module__withPointerEvents___t-18M",Kr="ControlSlider-module__topLeftAlignment___zjnGM",Zr="ControlSlider-module__topCenterAlignment___gD1xW",Jr="ControlSlider-module__topRightAlignment___NMapS",Qr="ControlSlider-module__middleLeftAlignment___OnUrY",ei="ControlSlider-module__middleCenterAlignment___Tdkl0",ti="ControlSlider-module__middleRightAlignment___wEbfX",ni="ControlSlider-module__bottomLeftAlignment___cTP2-",oi="ControlSlider-module__bottomCenterAlignment___c54fB",ri="ControlSlider-module__bottomRightAlignment___kEwrz",ii="ControlSlider-module__clickOverlay___DZA28",ai="ControlSlider-module__contain___pLyq7",si="ControlSlider-module__cover___KdDat",Q={wrapper:br,hoverArrow:xr,sliderItem:Sr,sliderImage:Cr,arrow:$r,arrowVertical:wr,nextArrow:Tr,arrowInner:_r,arrowIcon:Er,arrowImg:Ar,mirror:Lr,pagination:Ir,paginationInner:kr,paginationVertical:Fr,paginationItem:Pr,dot:Mr,activeDot:Rr,paginationInsideBottom:Wr,paginationInsideTop:Nr,paginationOutsideBottom:Vr,paginationOutsideTop:Hr,paginationInsideLeft:jr,paginationInsideRight:Or,paginationOutsideLeft:zr,paginationOutsideRight:Br,imgWrapper:Dr,captionBlock:qr,captionTextWrapper:Ur,captionText:Gr,active:Yr,withPointerEvents:Xr,topLeftAlignment:Kr,topCenterAlignment:Zr,topRightAlignment:Jr,middleLeftAlignment:Qr,middleCenterAlignment:ei,middleRightAlignment:ti,bottomLeftAlignment:ni,bottomCenterAlignment:oi,bottomRightAlignment:ri,clickOverlay:ii,contain:ai,cover:si};function li(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ci(e,t,n){return t&&li(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var no="(prefers-reduced-motion: reduce)",pt=1,ui=2,ft=3,vt=4,Mt=5,Xt=6,Qt=7,pi={CREATED:pt,MOUNTED:ui,IDLE:ft,MOVING:vt,SCROLLING:Mt,DRAGGING:Xt,DESTROYED:Qt};function Ue(e){e.length=0}function Je(e,t,n){return Array.prototype.slice.call(e,t,n)}function ye(e){return e.bind.apply(e,[null].concat(Je(arguments,1)))}var Eo=setTimeout,wn=function(){};function oo(e){return requestAnimationFrame(e)}function rn(e,t){return typeof t===e}function _t(e){return!Mn(e)&&rn("object",e)}var Pn=Array.isArray,Ao=ye(rn,"function"),Ke=ye(rn,"string"),Rt=ye(rn,"undefined");function Mn(e){return e===null}function Lo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Wt(e){return Pn(e)?e:[e]}function Ae(e,t){Wt(e).forEach(t)}function Rn(e,t){return e.indexOf(t)>-1}function Kt(e,t){return e.push.apply(e,Wt(t)),e}function Be(e,t,n){e&&Ae(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function We(e,t){Be(e,Ke(t)?t.split(" "):t,!0)}function Nt(e,t){Ae(t,e.appendChild.bind(e))}function Wn(e,t){Ae(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function Et(e,t){return Lo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Io(e,t){var n=e?Je(e.children):[];return t?n.filter(function(o){return Et(o,t)}):n}function Vt(e,t){return t?Io(e,t)[0]:e.firstElementChild}var At=Object.keys;function ot(e,t,n){return e&&(n?At(e).reverse():At(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function Lt(e){return Je(arguments,1).forEach(function(t){ot(t,function(n,o){e[o]=t[o]})}),e}function Ye(e){return Je(arguments,1).forEach(function(t){ot(t,function(n,o){Pn(n)?e[o]=n.slice():_t(n)?e[o]=Ye({},_t(e[o])?e[o]:{},n):e[o]=n})}),e}function ro(e,t){Ae(t||At(e),function(n){delete e[n]})}function Ne(e,t){Ae(e,function(n){Ae(t,function(o){n&&n.removeAttribute(o)})})}function se(e,t,n){_t(t)?ot(t,function(o,r){se(e,r,o)}):Ae(e,function(o){Mn(n)||n===""?Ne(o,t):o.setAttribute(t,String(n))})}function dt(e,t,n){var o=document.createElement(e);return t&&(Ke(t)?We(o,t):se(o,t)),n&&Nt(n,o),o}function ke(e,t,n){if(Rt(n))return getComputedStyle(e)[t];Mn(n)||(e.style[t]=""+n)}function It(e,t){ke(e,"display",t)}function ko(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Fe(e,t){return e.getAttribute(t)}function io(e,t){return e&&e.classList.contains(t)}function _e(e){return e.getBoundingClientRect()}function rt(e){Ae(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Fo(e){return Vt(new DOMParser().parseFromString(e,"text/html").body)}function ze(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Po(e,t){return e&&e.querySelector(t)}function Nn(e,t){return t?Je(e.querySelectorAll(t)):[]}function De(e,t){Be(e,t,!1)}function Tn(e){return e.timeStamp}function nt(e){return Ke(e)?e:e?e+"px":""}var Ht="splide",Vn="data-"+Ht;function wt(e,t){if(!e)throw new Error("["+Ht+"] "+(t||""))}var Ze=Math.min,en=Math.max,tn=Math.floor,kt=Math.ceil,Te=Math.abs;function Mo(e,t,n){return Te(e-t)<n}function Zt(e,t,n,o){var r=Ze(t,n),a=en(t,n);return o?r<e&&e<a:r<=e&&e<=a}function ct(e,t,n){var o=Ze(t,n),r=en(t,n);return Ze(en(o,e),r)}function _n(e){return+(e>0)-+(e<0)}function En(e,t){return Ae(t,function(n){e=e.replace("%s",""+n)}),e}function Hn(e){return e<10?"0"+e:""+e}var ao={};function di(e){return""+e+Hn(ao[e]=(ao[e]||0)+1)}function Ro(){var e=[];function t(i,u,l,m){r(i,u,function(c,L,S){var g="addEventListener"in c,p=g?c.removeEventListener.bind(c,L,l,m):c.removeListener.bind(c,l);g?c.addEventListener(L,l,m):c.addListener(l),e.push([c,L,S,l,p])})}function n(i,u,l){r(i,u,function(m,c,L){e=e.filter(function(S){return S[0]===m&&S[1]===c&&S[2]===L&&(!l||S[3]===l)?(S[4](),!1):!0})})}function o(i,u,l){var m,c=!0;return typeof CustomEvent=="function"?m=new CustomEvent(u,{bubbles:c,detail:l}):(m=document.createEvent("CustomEvent"),m.initCustomEvent(u,c,!1,l)),i.dispatchEvent(m),m}function r(i,u,l){Ae(i,function(m){m&&Ae(u,function(c){c.split(" ").forEach(function(L){var S=L.split(".");l(m,S[0],S[1])})})})}function a(){e.forEach(function(i){i[4]()}),Ue(e)}return{bind:t,unbind:n,dispatch:o,destroy:a}}var Qe="mounted",An="ready",Ge="move",bt="moved",jn="click",Wo="active",No="inactive",Vo="visible",Ho="hidden",xe="refresh",we="updated",ht="resize",an="resized",jo="drag",Oo="dragging",zo="dragged",sn="scroll",at="scrolled",mi="overflow",On="destroy",Bo="arrows:mounted",Do="arrows:updated",qo="pagination:mounted",Uo="pagination:updated",zn="navigation:mounted",Bn="autoplay:play",Go="autoplay:playing",Dn="autoplay:pause",qn="lazyload:loaded",Yo="sk",Xo="sh",nn="ei";function ve(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Ro();function o(a,i){n.bind(t,Wt(a).join(" "),function(u){i.apply(i,Pn(u.detail)?u.detail:[])})}function r(a){n.dispatch(t,a,Je(arguments,1))}return e&&e.event.on(On,n.destroy),Lt(n,{bus:t,on:o,off:ye(n.unbind,t),emit:r})}function ln(e,t,n,o){var r=Date.now,a,i=0,u,l=!0,m=0;function c(){if(!l){if(i=e?Ze((r()-a)/e,1):1,n&&n(i),i>=1&&(t(),a=r(),o&&++m>=o))return S();u=oo(c)}}function L(h){h||p(),a=r()-(h?i*e:0),l=!1,u=oo(c)}function S(){l=!0}function g(){a=r(),i=0,n&&n(i)}function p(){u&&cancelAnimationFrame(u),i=0,u=0,l=!0}function d(h){e=h}function x(){return l}return{start:L,rewind:g,pause:S,cancel:p,set:d,isPaused:x}}function gi(e){var t=e;function n(r){t=r}function o(r){return Rn(Wt(r),t)}return{set:n,is:o}}function fi(e,t){var n=ln(0,e,null,1);return function(){n.isPaused()&&n.start()}}function hi(e,t,n){var o=e.state,r=n.breakpoints||{},a=n.reducedMotion||{},i=Ro(),u=[];function l(){var p=n.mediaQuery==="min";At(r).sort(function(d,x){return p?+d-+x:+x-+d}).forEach(function(d){c(r[d],"("+(p?"min":"max")+"-width:"+d+"px)")}),c(a,no),L()}function m(p){p&&i.destroy()}function c(p,d){var x=matchMedia(d);i.bind(x,"change",L),u.push([p,x])}function L(){var p=o.is(Qt),d=n.direction,x=u.reduce(function(h,y){return Ye(h,y[1].matches?y[0]:{})},{});ro(n),g(x),n.destroy?e.destroy(n.destroy==="completely"):p?(m(!0),e.mount()):d!==n.direction&&e.refresh()}function S(p){matchMedia(no).matches&&(p?Ye(n,a):ro(n,At(a)))}function g(p,d,x){Ye(n,p),d&&Ye(Object.getPrototypeOf(n),p),(x||!o.is(pt))&&e.emit(we,n)}return{setup:l,destroy:m,reduce:S,set:g}}var cn="Arrow",un=cn+"Left",pn=cn+"Right",Ko=cn+"Up",Zo=cn+"Down",so="rtl",dn="ttb",vn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Ko,pn],ArrowRight:[Zo,un]};function yi(e,t,n){function o(a,i,u){u=u||n.direction;var l=u===so&&!i?1:u===dn?0:-1;return vn[a]&&vn[a][l]||a.replace(/width|left|right/i,function(m,c){var L=vn[m.toLowerCase()][l]||m;return c>0?L.charAt(0).toUpperCase()+L.slice(1):L})}function r(a){return a*(n.direction===so?1:-1)}return{resolve:o,orient:r}}var qe="role",mt="tabindex",vi="disabled",Pe="aria-",jt=Pe+"controls",Jo=Pe+"current",lo=Pe+"selected",Ee=Pe+"label",Un=Pe+"labelledby",Qo=Pe+"hidden",Gn=Pe+"orientation",Ft=Pe+"roledescription",co=Pe+"live",uo=Pe+"busy",po=Pe+"atomic",Yn=[qe,mt,vi,jt,Jo,Ee,Un,Qo,Gn,Ft],Ve=Ht+"__",et="is-",bn=Ht,mo=Ve+"track",bi=Ve+"list",mn=Ve+"slide",er=mn+"--clone",xi=mn+"__container",Xn=Ve+"arrows",gn=Ve+"arrow",tr=gn+"--prev",nr=gn+"--next",fn=Ve+"pagination",or=fn+"__page",Si=Ve+"progress",Ci=Si+"__bar",$i=Ve+"toggle",wi=Ve+"spinner",Ti=Ve+"sr",_i=et+"initialized",it=et+"active",rr=et+"prev",ir=et+"next",Ln=et+"visible",In=et+"loading",ar=et+"focus-in",sr=et+"overflow",Ei=[it,Ln,rr,ir,In,ar,sr],Ai={slide:mn,clone:er,arrows:Xn,arrow:gn,prev:tr,next:nr,pagination:fn,page:or,spinner:wi};function Li(e,t){if(Ao(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Et(n,t);)n=n.parentElement;return n}var Ii=5,go=200,lr="touchstart mousedown",xn="touchmove mousemove",Sn="touchend touchcancel mouseup click";function ki(e,t,n){var o=ve(e),r=o.on,a=o.bind,i=e.root,u=n.i18n,l={},m=[],c=[],L=[],S,g,p;function d(){E(),D(),y()}function x(){r(xe,h),r(xe,d),r(we,y),a(document,lr+" keydown",function(b){p=b.type==="keydown"},{capture:!0}),a(i,"focusin",function(){Be(i,ar,!!p)})}function h(b){var C=Yn.concat("style");Ue(m),De(i,c),De(S,L),Ne([S,g],C),Ne(i,b?C:["style",Ft])}function y(){De(i,c),De(S,L),c=_(bn),L=_(mo),We(i,c),We(S,L),se(i,Ee,n.label),se(i,Un,n.labelledby)}function E(){S=H("."+mo),g=Vt(S,"."+bi),wt(S&&g,"A track/list element is missing."),Kt(m,Io(g,"."+mn+":not(."+er+")")),ot({arrows:Xn,pagination:fn,prev:tr,next:nr,bar:Ci,toggle:$i},function(b,C){l[C]=H("."+b)}),Lt(l,{root:i,track:S,list:g,slides:m})}function D(){var b=i.id||di(Ht),C=n.role;i.id=b,S.id=S.id||b+"-track",g.id=g.id||b+"-list",!Fe(i,qe)&&i.tagName!=="SECTION"&&C&&se(i,qe,C),se(i,Ft,u.carousel),se(g,qe,"presentation")}function H(b){var C=Po(i,b);return C&&Li(C,"."+bn)===i?C:void 0}function _(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===bn&&it]}return Lt(l,{setup:d,mount:x,destroy:h})}var yt="slide",xt="loop",Ot="fade";function Fi(e,t,n,o){var r=ve(e),a=r.on,i=r.emit,u=r.bind,l=e.Components,m=e.root,c=e.options,L=c.isNavigation,S=c.updateOnMove,g=c.i18n,p=c.pagination,d=c.slideFocus,x=l.Direction.resolve,h=Fe(o,"style"),y=Fe(o,Ee),E=n>-1,D=Vt(o,"."+xi),H;function _(){E||(o.id=m.id+"-slide"+Hn(t+1),se(o,qe,p?"tabpanel":"group"),se(o,Ft,g.slide),se(o,Ee,y||En(g.slideLabel,[t+1,e.length]))),b()}function b(){u(o,"click",ye(i,jn,k)),u(o,"keydown",ye(i,Yo,k)),a([bt,Xo,at],R),a(zn,P),S&&a(Ge,O)}function C(){H=!0,r.destroy(),De(o,Ei),Ne(o,Yn),se(o,"style",h),se(o,Ee,y||"")}function P(){var I=e.splides.map(function(T){var W=T.splide.Components.Slides.getAt(t);return W?W.slide.id:""}).join(" ");se(o,Ee,En(g.slideX,(E?n:t)+1)),se(o,jt,I),se(o,qe,d?"button":""),d&&Ne(o,Ft)}function O(){H||R()}function R(){if(!H){var I=e.index;V(),j(),Be(o,rr,t===I-1),Be(o,ir,t===I+1)}}function V(){var I=U();I!==io(o,it)&&(Be(o,it,I),se(o,Jo,L&&I||""),i(I?Wo:No,k))}function j(){var I=f(),T=!I&&(!U()||E);if(e.state.is([vt,Mt])||se(o,Qo,T||""),se(Nn(o,c.focusableNodes||""),mt,T?-1:""),d&&se(o,mt,T?-1:0),I!==io(o,Ln)&&(Be(o,Ln,I),i(I?Vo:Ho,k)),!I&&document.activeElement===o){var W=l.Slides.getAt(e.index);W&&ko(W.slide)}}function B(I,T,W){ke(W&&D||o,I,T)}function U(){var I=e.index;return I===t||c.cloneStatus&&I===n}function f(){if(e.is(Ot))return U();var I=_e(l.Elements.track),T=_e(o),W=x("left",!0),J=x("right",!0);return tn(I[W])<=kt(T[W])&&tn(T[J])<=kt(I[J])}function F(I,T){var W=Te(I-t);return!E&&(c.rewind||e.is(xt))&&(W=Ze(W,e.length-W)),W<=T}var k={index:t,slideIndex:n,slide:o,container:D,isClone:E,mount:_,destroy:C,update:R,style:B,isWithin:F};return k}function Pi(e,t,n){var o=ve(e),r=o.on,a=o.emit,i=o.bind,u=t.Elements,l=u.slides,m=u.list,c=[];function L(){S(),r(xe,g),r(xe,S)}function S(){l.forEach(function(R,V){d(R,V,-1)})}function g(){H(function(R){R.destroy()}),Ue(c)}function p(){H(function(R){R.update()})}function d(R,V,j){var B=Fi(e,V,j,R);B.mount(),c.push(B),c.sort(function(U,f){return U.index-f.index})}function x(R){return R?_(function(V){return!V.isClone}):c}function h(R){var V=t.Controller,j=V.toIndex(R),B=V.hasFocus()?1:n.perPage;return _(function(U){return Zt(U.index,j,j+B-1)})}function y(R){return _(R)[0]}function E(R,V){Ae(R,function(j){if(Ke(j)&&(j=Fo(j)),Lo(j)){var B=l[V];B?Wn(j,B):Nt(m,j),We(j,n.classes.slide),C(j,ye(a,ht))}}),a(xe)}function D(R){rt(_(R).map(function(V){return V.slide})),a(xe)}function H(R,V){x(V).forEach(R)}function _(R){return c.filter(Ao(R)?R:function(V){return Ke(R)?Et(V.slide,R):Rn(Wt(R),V.index)})}function b(R,V,j){H(function(B){B.style(R,V,j)})}function C(R,V){var j=Nn(R,"img"),B=j.length;B?j.forEach(function(U){i(U,"load error",function(){--B||V()})}):V()}function P(R){return R?l.length:c.length}function O(){return c.length>n.perPage}return{mount:L,destroy:g,update:p,register:d,get:x,getIn:h,getAt:y,add:E,remove:D,forEach:H,filter:_,style:b,getLength:P,isEnough:O}}function Mi(e,t,n){var o=ve(e),r=o.on,a=o.bind,i=o.emit,u=t.Slides,l=t.Direction.resolve,m=t.Elements,c=m.root,L=m.track,S=m.list,g=u.getAt,p=u.style,d,x,h;function y(){E(),a(window,"resize load",fi(ye(i,ht))),r([we,xe],E),r(ht,D)}function E(){d=n.direction===dn,ke(c,"maxWidth",nt(n.width)),ke(L,l("paddingLeft"),H(!1)),ke(L,l("paddingRight"),H(!0)),D(!0)}function D(k){var I=_e(c);(k||x.width!==I.width||x.height!==I.height)&&(ke(L,"height",_()),p(l("marginRight"),nt(n.gap)),p("width",C()),p("height",P(),!0),x=I,i(an),h!==(h=F())&&(Be(c,sr,h),i(mi,h)))}function H(k){var I=n.padding,T=l(k?"right":"left");return I&&nt(I[T]||(_t(I)?0:I))||"0px"}function _(){var k="";return d&&(k=b(),wt(k,"height or heightRatio is missing."),k="calc("+k+" - "+H(!1)+" - "+H(!0)+")"),k}function b(){return nt(n.height||_e(S).width*n.heightRatio)}function C(){return n.autoWidth?null:nt(n.fixedWidth)||(d?"":O())}function P(){return nt(n.fixedHeight)||(d?n.autoHeight?null:O():b())}function O(){var k=nt(n.gap);return"calc((100%"+(k&&" + "+k)+")/"+(n.perPage||1)+(k&&" - "+k)+")"}function R(){return _e(S)[l("width")]}function V(k,I){var T=g(k||0);return T?_e(T.slide)[l("width")]+(I?0:U()):0}function j(k,I){var T=g(k);if(T){var W=_e(T.slide)[l("right")],J=_e(S)[l("left")];return Te(W-J)+(I?0:U())}return 0}function B(k){return j(e.length-1)-j(0)+V(0,k)}function U(){var k=g(0);return k&&parseFloat(ke(k.slide,l("marginRight")))||0}function f(k){return parseFloat(ke(L,l("padding"+(k?"Right":"Left"))))||0}function F(){return e.is(Ot)||B(!0)>R()}return{mount:y,resize:D,listSize:R,slideSize:V,sliderSize:B,totalSize:j,getPadding:f,isOverflow:F}}var Ri=2;function Wi(e,t,n){var o=ve(e),r=o.on,a=t.Elements,i=t.Slides,u=t.Direction.resolve,l=[],m;function c(){r(xe,L),r([we,ht],g),(m=x())&&(p(m),t.Layout.resize(!0))}function L(){S(),c()}function S(){rt(l),Ue(l),o.destroy()}function g(){var h=x();m!==h&&(m<h||!h)&&o.emit(xe)}function p(h){var y=i.get().slice(),E=y.length;if(E){for(;y.length<h;)Kt(y,y);Kt(y.slice(-h),y.slice(0,h)).forEach(function(D,H){var _=H<h,b=d(D.slide,H);_?Wn(b,y[0].slide):Nt(a.list,b),Kt(l,b),i.register(b,H-h+(_?0:E),D.index)})}}function d(h,y){var E=h.cloneNode(!0);return We(E,n.classes.clone),E.id=e.root.id+"-clone"+Hn(y+1),E}function x(){var h=n.clones;if(!e.is(xt))h=0;else if(Rt(h)){var y=n[u("fixedWidth")]&&t.Layout.slideSize(0),E=y&&kt(_e(a.track)[u("width")]/y);h=E||n[u("autoWidth")]&&e.length||n.perPage*Ri}return h}return{mount:c,destroy:S}}function Ni(e,t,n){var o=ve(e),r=o.on,a=o.emit,i=e.state.set,u=t.Layout,l=u.slideSize,m=u.getPadding,c=u.totalSize,L=u.listSize,S=u.sliderSize,g=t.Direction,p=g.resolve,d=g.orient,x=t.Elements,h=x.list,y=x.track,E;function D(){E=t.Transition,r([Qe,an,we,xe],H)}function H(){t.Controller.isBusy()||(t.Scroll.cancel(),b(e.index),t.Slides.update())}function _(T,W,J,ae){T!==W&&k(T>J)&&(R(),C(O(B(),T>J),!0)),i(vt),a(Ge,W,J,T),E.start(W,function(){i(ft),a(bt,W,J,T),ae&&ae()})}function b(T){C(j(T,!0))}function C(T,W){if(!e.is(Ot)){var J=W?T:P(T);ke(h,"transform","translate"+p("X")+"("+J+"px)"),T!==J&&a(Xo)}}function P(T){if(e.is(xt)){var W=V(T),J=W>t.Controller.getEnd(),ae=W<0;(ae||J)&&(T=O(T,J))}return T}function O(T,W){var J=T-F(W),ae=S();return T-=d(ae*(kt(Te(J)/ae)||1))*(W?1:-1),T}function R(){C(B(),!0),E.cancel()}function V(T){for(var W=t.Slides.get(),J=0,ae=1/0,te=0;te<W.length;te++){var le=W[te].index,M=Te(j(le,!0)-T);if(M<=ae)ae=M,J=le;else break}return J}function j(T,W){var J=d(c(T-1)-f(T));return W?U(J):J}function B(){var T=p("left");return _e(h)[T]-_e(y)[T]+d(m(!1))}function U(T){return n.trimSpace&&e.is(yt)&&(T=ct(T,0,d(S(!0)-L()))),T}function f(T){var W=n.focus;return W==="center"?(L()-l(T,!0))/2:+W*l(T)||0}function F(T){return j(T?t.Controller.getEnd():0,!!n.trimSpace)}function k(T){var W=d(O(B(),T));return T?W>=0:W<=h[p("scrollWidth")]-_e(y)[p("width")]}function I(T,W){W=Rt(W)?B():W;var J=T!==!0&&d(W)<d(F(!1)),ae=T!==!1&&d(W)>d(F(!0));return J||ae}return{mount:D,move:_,jump:b,translate:C,shift:O,cancel:R,toIndex:V,toPosition:j,getPosition:B,getLimit:F,exceededLimit:I,reposition:H}}function Vi(e,t,n){var o=ve(e),r=o.on,a=o.emit,i=t.Move,u=i.getPosition,l=i.getLimit,m=i.toPosition,c=t.Slides,L=c.isEnough,S=c.getLength,g=n.omitEnd,p=e.is(xt),d=e.is(yt),x=ye(B,!1),h=ye(B,!0),y=n.start||0,E,D=y,H,_,b;function C(){P(),r([we,xe,nn],P),r(an,O)}function P(){H=S(!0),_=n.perMove,b=n.perPage,E=k();var M=ct(y,0,g?E:H-1);M!==y&&(y=M,i.reposition())}function O(){E!==k()&&a(nn)}function R(M,ne,me){if(!le()){var pe=j(M),he=F(pe);he>-1&&(ne||he!==y)&&(J(he),i.move(pe,he,D,me))}}function V(M,ne,me,pe){t.Scroll.scroll(M,ne,me,function(){var he=F(i.toIndex(u()));J(g?Ze(he,E):he),pe&&pe()})}function j(M){var ne=y;if(Ke(M)){var me=M.match(/([+\-<>])(\d+)?/)||[],pe=me[1],he=me[2];pe==="+"||pe==="-"?ne=U(y+ +(""+pe+(+he||1)),y):pe===">"?ne=he?I(+he):x(!0):pe==="<"&&(ne=h(!0))}else ne=p?M:ct(M,0,E);return ne}function B(M,ne){var me=_||(te()?1:b),pe=U(y+me*(M?-1:1),y,!(_||te()));return pe===-1&&d&&!Mo(u(),l(!M),1)?M?0:E:ne?pe:F(pe)}function U(M,ne,me){if(L()||te()){var pe=f(M);pe!==M&&(ne=M,M=pe,me=!1),M<0||M>E?!_&&(Zt(0,M,ne,!0)||Zt(E,ne,M,!0))?M=I(T(M)):p?M=me?M<0?-(H%b||b):H:M:n.rewind?M=M<0?E:0:M=-1:me&&M!==ne&&(M=I(T(ne)+(M<ne?-1:1)))}else M=-1;return M}function f(M){if(d&&n.trimSpace==="move"&&M!==y)for(var ne=u();ne===m(M,!0)&&Zt(M,0,e.length-1,!n.rewind);)M<y?--M:++M;return M}function F(M){return p?(M+H)%H||0:M}function k(){for(var M=H-(te()||p&&_?1:b);g&&M-- >0;)if(m(H-1,!0)!==m(M,!0)){M++;break}return ct(M,0,H-1)}function I(M){return ct(te()?M:b*M,0,E)}function T(M){return te()?Ze(M,E):tn((M>=E?H-1:M)/b)}function W(M){var ne=i.toIndex(M);return d?ct(ne,0,E):ne}function J(M){M!==y&&(D=y,y=M)}function ae(M){return M?D:y}function te(){return!Rt(n.focus)||n.isNavigation}function le(){return e.state.is([vt,Mt])&&!!n.waitForTransition}return{mount:C,go:R,scroll:V,getNext:x,getPrev:h,getAdjacent:B,getEnd:k,setIndex:J,getIndex:ae,toIndex:I,toPage:T,toDest:W,hasFocus:te,isBusy:le}}var Hi="http://www.w3.org/2000/svg",ji="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",Dt=40;function Oi(e,t,n){var o=ve(e),r=o.on,a=o.bind,i=o.emit,u=n.classes,l=n.i18n,m=t.Elements,c=t.Controller,L=m.arrows,S=m.track,g=L,p=m.prev,d=m.next,x,h,y={};function E(){H(),r(we,D)}function D(){_(),E()}function H(){var V=n.arrows;V&&!(p&&d)&&P(),p&&d&&(Lt(y,{prev:p,next:d}),It(g,V?"":"none"),We(g,h=Xn+"--"+n.direction),V&&(b(),R(),se([p,d],jt,S.id),i(Bo,p,d)))}function _(){o.destroy(),De(g,h),x?(rt(L?[p,d]:g),p=d=null):Ne([p,d],Yn)}function b(){r([Qe,bt,xe,at,nn],R),a(d,"click",ye(C,">")),a(p,"click",ye(C,"<"))}function C(V){c.go(V,!0)}function P(){g=L||dt("div",u.arrows),p=O(!0),d=O(!1),x=!0,Nt(g,[p,d]),!L&&Wn(g,S)}function O(V){var j='<button class="'+u.arrow+" "+(V?u.prev:u.next)+'" type="button"><svg xmlns="'+Hi+'" viewBox="0 0 '+Dt+" "+Dt+'" width="'+Dt+'" height="'+Dt+'" focusable="false"><path d="'+(n.arrowPath||ji)+'" />';return Fo(j)}function R(){if(p&&d){var V=e.index,j=c.getPrev(),B=c.getNext(),U=j>-1&&V<j?l.last:l.prev,f=B>-1&&V>B?l.first:l.next;p.disabled=j<0,d.disabled=B<0,se(p,Ee,U),se(d,Ee,f),i(Do,p,d,j,B)}}return{arrows:y,mount:E,destroy:_,update:R}}var zi=Vn+"-interval";function Bi(e,t,n){var o=ve(e),r=o.on,a=o.bind,i=o.emit,u=ln(n.interval,e.go.bind(e,">"),b),l=u.isPaused,m=t.Elements,c=t.Elements,L=c.root,S=c.toggle,g=n.autoplay,p,d,x=g==="pause";function h(){g&&(y(),S&&se(S,jt,m.track.id),x||E(),_())}function y(){n.pauseOnHover&&a(L,"mouseenter mouseleave",function(P){p=P.type==="mouseenter",H()}),n.pauseOnFocus&&a(L,"focusin focusout",function(P){d=P.type==="focusin",H()}),S&&a(S,"click",function(){x?E():D(!0)}),r([Ge,sn,xe],u.rewind),r(Ge,C)}function E(){l()&&t.Slides.isEnough()&&(u.start(!n.resetProgress),d=p=x=!1,_(),i(Bn))}function D(P){P===void 0&&(P=!0),x=!!P,_(),l()||(u.pause(),i(Dn))}function H(){x||(p||d?D(!1):E())}function _(){S&&(Be(S,it,!x),se(S,Ee,n.i18n[x?"play":"pause"]))}function b(P){var O=m.bar;O&&ke(O,"width",P*100+"%"),i(Go,P)}function C(P){var O=t.Slides.getAt(P);u.set(O&&+Fe(O.slide,zi)||n.interval)}return{mount:h,destroy:u.cancel,play:E,pause:D,isPaused:l}}function Di(e,t,n){var o=ve(e),r=o.on;function a(){n.cover&&(r(qn,ye(u,!0)),r([Qe,we,xe],ye(i,!0)))}function i(l){t.Slides.forEach(function(m){var c=Vt(m.container||m.slide,"img");c&&c.src&&u(l,c,m)})}function u(l,m,c){c.style("background",l?'center/cover no-repeat url("'+m.src+'")':"",!0),It(m,l?"none":"")}return{mount:a,destroy:ye(i,!1)}}var qi=10,Ui=600,Gi=.6,Yi=1.5,Xi=800;function Ki(e,t,n){var o=ve(e),r=o.on,a=o.emit,i=e.state.set,u=t.Move,l=u.getPosition,m=u.getLimit,c=u.exceededLimit,L=u.translate,S=e.is(yt),g,p,d=1;function x(){r(Ge,D),r([we,xe],H)}function h(b,C,P,O,R){var V=l();if(D(),P&&(!S||!c())){var j=t.Layout.sliderSize(),B=_n(b)*j*tn(Te(b)/j)||0;b=u.toPosition(t.Controller.toDest(b%j))+B}var U=Mo(V,b,1);d=1,C=U?0:C||en(Te(b-V)/Yi,Xi),p=O,g=ln(C,y,ye(E,V,b,R),1),i(Mt),a(sn),g.start()}function y(){i(ft),p&&p(),a(at)}function E(b,C,P,O){var R=l(),V=b+(C-b)*_(O),j=(V-R)*d;L(R+j),S&&!P&&c()&&(d*=Gi,Te(j)<qi&&h(m(c(!0)),Ui,!1,p,!0))}function D(){g&&g.cancel()}function H(){g&&!g.isPaused()&&(D(),y())}function _(b){var C=n.easingFunc;return C?C(b):1-Math.pow(1-b,4)}return{mount:x,destroy:D,scroll:h,cancel:H}}var ut={passive:!1,capture:!0};function Zi(e,t,n){var o=ve(e),r=o.on,a=o.emit,i=o.bind,u=o.unbind,l=e.state,m=t.Move,c=t.Scroll,L=t.Controller,S=t.Elements.track,g=t.Media.reduce,p=t.Direction,d=p.resolve,x=p.orient,h=m.getPosition,y=m.exceededLimit,E,D,H,_,b,C=!1,P,O,R;function V(){i(S,xn,wn,ut),i(S,Sn,wn,ut),i(S,lr,B,ut),i(S,"click",F,{capture:!0}),i(S,"dragstart",ze),r([Qe,we],j)}function j(){var N=n.drag;ce(!N),_=N==="free"}function B(N){if(P=!1,!O){var v=he(N);pe(N.target)&&(v||!N.button)&&(L.isBusy()?ze(N,!0):(R=v?S:window,b=l.is([vt,Mt]),H=null,i(R,xn,U,ut),i(R,Sn,f,ut),m.cancel(),c.cancel(),k(N)))}}function U(N){if(l.is(Xt)||(l.set(Xt),a(jo)),N.cancelable)if(b){m.translate(E+me(te(N)));var v=le(N)>go,q=C!==(C=y());(v||q)&&k(N),P=!0,a(Oo),ze(N)}else W(N)&&(b=T(N),ze(N))}function f(N){l.is(Xt)&&(l.set(ft),a(zo)),b&&(I(N),ze(N)),u(R,xn,U),u(R,Sn,f),b=!1}function F(N){!O&&P&&ze(N,!0)}function k(N){H=D,D=N,E=h()}function I(N){var v=J(N),q=ae(v),K=n.rewind&&n.rewindByDrag;g(!1),_?L.scroll(q,0,n.snap):e.is(Ot)?L.go(x(_n(v))<0?K?"<":"-":K?">":"+"):e.is(yt)&&C&&K?L.go(y(!0)?">":"<"):L.go(L.toDest(q),!0),g(!0)}function T(N){var v=n.dragMinThreshold,q=_t(v),K=q&&v.mouse||0,ee=(q?v.touch:+v)||10;return Te(te(N))>(he(N)?ee:K)}function W(N){return Te(te(N))>Te(te(N,!0))}function J(N){if(e.is(xt)||!C){var v=le(N);if(v&&v<go)return te(N)/v}return 0}function ae(N){return h()+_n(N)*Ze(Te(N)*(n.flickPower||600),_?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function te(N,v){return ne(N,v)-ne(M(N),v)}function le(N){return Tn(N)-Tn(M(N))}function M(N){return D===N&&H||D}function ne(N,v){return(he(N)?N.changedTouches[0]:N)["page"+d(v?"Y":"X")]}function me(N){return N/(C&&e.is(yt)?Ii:1)}function pe(N){var v=n.noDrag;return!Et(N,"."+or+", ."+gn)&&(!v||!Et(N,v))}function he(N){return typeof TouchEvent<"u"&&N instanceof TouchEvent}function Y(){return b}function ce(N){O=N}return{mount:V,disable:ce,isDragging:Y}}var Ji={Spacebar:" ",Right:pn,Left:un,Up:Ko,Down:Zo};function Kn(e){return e=Ke(e)?e:e.key,Ji[e]||e}var fo="keydown";function Qi(e,t,n){var o=ve(e),r=o.on,a=o.bind,i=o.unbind,u=e.root,l=t.Direction.resolve,m,c;function L(){S(),r(we,g),r(we,S),r(Ge,d)}function S(){var h=n.keyboard;h&&(m=h==="global"?window:u,a(m,fo,x))}function g(){i(m,fo)}function p(h){c=h}function d(){var h=c;c=!0,Eo(function(){c=h})}function x(h){if(!c){var y=Kn(h);y===l(un)?e.go("<"):y===l(pn)&&e.go(">")}}return{mount:L,destroy:g,disable:p}}var Tt=Vn+"-lazy",Jt=Tt+"-srcset",ea="["+Tt+"], ["+Jt+"]";function ta(e,t,n){var o=ve(e),r=o.on,a=o.off,i=o.bind,u=o.emit,l=n.lazyLoad==="sequential",m=[bt,at],c=[];function L(){n.lazyLoad&&(S(),r(xe,S))}function S(){Ue(c),g(),l?h():(a(m),r(m,p),p())}function g(){t.Slides.forEach(function(y){Nn(y.slide,ea).forEach(function(E){var D=Fe(E,Tt),H=Fe(E,Jt);if(D!==E.src||H!==E.srcset){var _=n.classes.spinner,b=E.parentElement,C=Vt(b,"."+_)||dt("span",_,b);c.push([E,y,C]),E.src||It(E,"none")}})})}function p(){c=c.filter(function(y){var E=n.perPage*((n.preloadPages||1)+1)-1;return y[1].isWithin(e.index,E)?d(y):!0}),c.length||a(m)}function d(y){var E=y[0];We(y[1].slide,In),i(E,"load error",ye(x,y)),se(E,"src",Fe(E,Tt)),se(E,"srcset",Fe(E,Jt)),Ne(E,Tt),Ne(E,Jt)}function x(y,E){var D=y[0],H=y[1];De(H.slide,In),E.type!=="error"&&(rt(y[2]),It(D,""),u(qn,D,H),u(ht)),l&&h()}function h(){c.length&&d(c.shift())}return{mount:L,destroy:ye(Ue,c),check:p}}function na(e,t,n){var o=ve(e),r=o.on,a=o.emit,i=o.bind,u=t.Slides,l=t.Elements,m=t.Controller,c=m.hasFocus,L=m.getIndex,S=m.go,g=t.Direction.resolve,p=l.pagination,d=[],x,h;function y(){E(),r([we,xe,nn],y);var O=n.pagination;p&&It(p,O?"":"none"),O&&(r([Ge,sn,at],P),D(),P(),a(qo,{list:x,items:d},C(e.index)))}function E(){x&&(rt(p?Je(x.children):x),De(x,h),Ue(d),x=null),o.destroy()}function D(){var O=e.length,R=n.classes,V=n.i18n,j=n.perPage,B=c()?m.getEnd()+1:kt(O/j);x=p||dt("ul",R.pagination,l.track.parentElement),We(x,h=fn+"--"+b()),se(x,qe,"tablist"),se(x,Ee,V.select),se(x,Gn,b()===dn?"vertical":"");for(var U=0;U<B;U++){var f=dt("li",null,x),F=dt("button",{class:R.page,type:"button"},f),k=u.getIn(U).map(function(T){return T.slide.id}),I=!c()&&j>1?V.pageX:V.slideX;i(F,"click",ye(H,U)),n.paginationKeyboard&&i(F,"keydown",ye(_,U)),se(f,qe,"presentation"),se(F,qe,"tab"),se(F,jt,k.join(" ")),se(F,Ee,En(I,U+1)),se(F,mt,-1),d.push({li:f,button:F,page:U})}}function H(O){S(">"+O,!0)}function _(O,R){var V=d.length,j=Kn(R),B=b(),U=-1;j===g(pn,!1,B)?U=++O%V:j===g(un,!1,B)?U=(--O+V)%V:j==="Home"?U=0:j==="End"&&(U=V-1);var f=d[U];f&&(ko(f.button),S(">"+U),ze(R,!0))}function b(){return n.paginationDirection||n.direction}function C(O){return d[m.toPage(O)]}function P(){var O=C(L(!0)),R=C(L());if(O){var V=O.button;De(V,it),Ne(V,lo),se(V,mt,-1)}if(R){var j=R.button;We(j,it),se(j,lo,!0),se(j,mt,"")}a(Uo,{list:x,items:d},O,R)}return{items:d,mount:y,destroy:E,getAt:C,update:P}}var oa=[" ","Enter"];function ra(e,t,n){var o=n.isNavigation,r=n.slideFocus,a=[];function i(){e.splides.forEach(function(p){p.isParent||(m(e,p.splide),m(p.splide,e))}),o&&c()}function u(){a.forEach(function(p){p.destroy()}),Ue(a)}function l(){u(),i()}function m(p,d){var x=ve(p);x.on(Ge,function(h,y,E){d.go(d.is(xt)?E:h)}),a.push(x)}function c(){var p=ve(e),d=p.on;d(jn,S),d(Yo,g),d([Qe,we],L),a.push(p),p.emit(zn,e.splides)}function L(){se(t.Elements.list,Gn,n.direction===dn?"vertical":"")}function S(p){e.go(p.index)}function g(p,d){Rn(oa,Kn(d))&&(S(p),ze(d))}return{setup:ye(t.Media.set,{slideFocus:Rt(r)?o:r},!0),mount:i,destroy:u,remount:l}}function ia(e,t,n){var o=ve(e),r=o.bind,a=0;function i(){n.wheel&&r(t.Elements.track,"wheel",u,ut)}function u(m){if(m.cancelable){var c=m.deltaY,L=c<0,S=Tn(m),g=n.wheelMinThreshold||0,p=n.wheelSleep||0;Te(c)>g&&S-a>p&&(e.go(L?"<":">"),a=S),l(L)&&ze(m)}}function l(m){return!n.releaseWheel||e.state.is(vt)||t.Controller.getAdjacent(m)!==-1}return{mount:i}}var aa=90;function sa(e,t,n){var o=ve(e),r=o.on,a=t.Elements.track,i=n.live&&!n.isNavigation,u=dt("span",Ti),l=ln(aa,ye(c,!1));function m(){i&&(S(!t.Autoplay.isPaused()),se(a,po,!0),u.textContent="…",r(Bn,ye(S,!0)),r(Dn,ye(S,!1)),r([bt,at],ye(c,!0)))}function c(g){se(a,uo,g),g?(Nt(a,u),l.start()):(rt(u),l.cancel())}function L(){Ne(a,[co,po,uo]),rt(u)}function S(g){i&&se(a,co,g?"off":"polite")}return{mount:m,disable:S,destroy:L}}var la=Object.freeze({__proto__:null,Media:hi,Direction:yi,Elements:ki,Slides:Pi,Layout:Mi,Clones:Wi,Move:Ni,Controller:Vi,Arrows:Oi,Autoplay:Bi,Cover:Di,Scroll:Ki,Drag:Zi,Keyboard:Qi,LazyLoad:ta,Pagination:na,Sync:ra,Wheel:ia,Live:sa}),ca={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"},ua={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:Ai,i18n:ca,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function pa(e,t,n){var o=t.Slides;function r(){ve(e).on([Qe,xe],a)}function a(){o.forEach(function(u){u.style("transform","translateX(-"+100*u.index+"%)")})}function i(u,l){o.style("transition","opacity "+n.speed+"ms "+n.easing),Eo(l)}return{mount:r,start:i,cancel:wn}}function da(e,t,n){var o=t.Move,r=t.Controller,a=t.Scroll,i=t.Elements.list,u=ye(ke,i,"transition"),l;function m(){ve(e).bind(i,"transitionend",function(g){g.target===i&&l&&(L(),l())})}function c(g,p){var d=o.toPosition(g,!0),x=o.getPosition(),h=S(g);Te(d-x)>=1&&h>=1?n.useScroll?a.scroll(d,h,!1,p):(u("transform "+h+"ms "+n.easing),o.translate(d,!0),l=p):(o.jump(g),p())}function L(){u(""),a.cancel()}function S(g){var p=n.rewindSpeed;if(e.is(yt)&&p){var d=r.getIndex(!0),x=r.getEnd();if(d===0&&g>=x||d>=x&&g===0)return p}return n.speed}return{mount:m,start:c,cancel:L}}var ma=(function(){function e(n,o){this.event=ve(),this.Components={},this.state=gi(pt),this.splides=[],this._o={},this._E={};var r=Ke(n)?Po(document,n):n;wt(r,r+" is invalid."),this.root=r,o=Ye({label:Fe(r,Ee)||"",labelledby:Fe(r,Un)||""},ua,e.defaults,o||{});try{Ye(o,JSON.parse(Fe(r,Vn)))}catch{wt(!1,"Invalid JSON")}this._o=Object.create(Ye({},o))}var t=e.prototype;return t.mount=function(o,r){var a=this,i=this.state,u=this.Components;wt(i.is([pt,Qt]),"Already mounted!"),i.set(pt),this._C=u,this._T=r||this._T||(this.is(Ot)?pa:da),this._E=o||this._E;var l=Lt({},la,this._E,{Transition:this._T});return ot(l,function(m,c){var L=m(a,u,a._o);u[c]=L,L.setup&&L.setup()}),ot(u,function(m){m.mount&&m.mount()}),this.emit(Qe),We(this.root,_i),i.set(ft),this.emit(An),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(ft)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},t.go=function(o){return this._C.Controller.go(o),this},t.on=function(o,r){return this.event.on(o,r),this},t.off=function(o){return this.event.off(o),this},t.emit=function(o){var r;return(r=this.event).emit.apply(r,[o].concat(Je(arguments,1))),this},t.add=function(o,r){return this._C.Slides.add(o,r),this},t.remove=function(o){return this._C.Slides.remove(o),this},t.is=function(o){return this._o.type===o},t.refresh=function(){return this.emit(xe),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,a=this.state;return a.is(pt)?ve(this).on(An,this.destroy.bind(this,o)):(ot(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(On),r.destroy(),o&&Ue(this.splides),a.set(Qt)),this},ci(e,[{key:"options",get:function(){return this._o},set:function(o){this._C.Media.set(o,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Zn=ma;Zn.defaults={};Zn.STATES=pi;var ho=[[Qe,"onMounted"],[An,"onReady"],[Ge,"onMove"],[bt,"onMoved"],[jn,"onClick"],[Wo,"onActive"],[No,"onInactive"],[Vo,"onVisible"],[Ho,"onHidden"],[xe,"onRefresh"],[we,"onUpdated"],[ht,"onResize"],[an,"onResized"],[jo,"onDrag"],[Oo,"onDragging"],[zo,"onDragged"],[sn,"onScroll"],[at,"onScrolled"],[On,"onDestroy"],[Bo,"onArrowsMounted"],[Do,"onArrowsUpdated"],[qo,"onPaginationMounted"],[Uo,"onPaginationUpdated"],[zn,"onNavigationMounted"],[Bn,"onAutoplayPlay"],[Go,"onAutoplayPlaying"],[Dn,"onAutoplayPause"],[qn,"onLazyLoadLoaded"]];function Jn(...e){return e.filter(Boolean).join(" ")}function on(e){return e!==null&&typeof e=="object"}function kn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!kn(n,t[o]));if(on(e)&&on(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!kn(e[r],t[r]))}return e===t}function ga(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function fa(e,t){if(e){const n=Object.keys(e);for(let o=0;o<n.length;o++){const r=n[o];if(r!=="__proto__"&&t(e[r],r)===!1)break}}return e}function Fn(e,t){const n=e;return fa(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():on(o)?n[r]=Fn(on(n[r])?n[r]:{},o):n[r]=o}),n}var ha=({children:e,className:t,...n})=>$.createElement("div",{className:Jn("splide__track",t),...n},$.createElement("ul",{className:"splide__list"},e)),cr=class extends $.Component{constructor(){super(...arguments),this.splideRef=$.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new Zn(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Fn({},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&&!kn(this.options,e)&&(this.splide.options=e,this.options=Fn({},e));const t=this.getSlides();ga(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){ho.forEach(([t,n])=>{const o=this.props[n];typeof o=="function"&&e.on(t,(...r)=>{o(e,...r)})})}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:o,...r}=this.props;return $.createElement(t,{className:Jn("splide",e),ref:this.splideRef,...this.omit(r,["options",...ho.map(a=>a[1])])},n?$.createElement(ha,null,o):o)}},ur=({children:e,className:t,...n})=>$.createElement("li",{className:Jn("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 ya="RichTextRenderer-module__link___BWeZ2",va={link:ya},Pt=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?l.jsx("a",{className:va.link,href:o.value,target:o.target,children:t(o.children)},r):l.jsx("span",{style:ba(o),children:o.text},r));return l.jsx(l.Fragment,{children:e.map((n,o)=>{const r=n.children;return l.jsx("div",{children:t(r)},o)})})};function ba(e){return{...e.fontFamily&&{fontFamily: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 xa="SvgImage-module__svg___q3xE-",Sa="SvgImage-module__img___VsTm-",yo={svg:xa,img:Sa},Ca=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},$a=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Xe=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[a,i]=C.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return C.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(u)}},[]),!Ca(e)||!a?l.jsx("img",{src:e,alt:"",className:ge(yo.img,o),style:r}):l.jsx("span",{"data-supports-mask":a,className:ge(yo.svg,o),style:{"--svg":$a(e),"--fill":t,"--hover-fill":n,...r??{}}})},wa={"top-left":J.topLeftAlignment,"top-center":J.topCenterAlignment,"top-right":J.topRightAlignment,"middle-left":J.middleLeftAlignment,"middle-center":J.middleCenterAlignment,"middle-right":J.middleRightAlignment,"bottom-left":J.bottomLeftAlignment,"bottom-center":J.bottomCenterAlignment,"bottom-right":J.bottomRightAlignment};function Ta({settings:e,content:t,styles:n,isEditor:o}){const[r,a]=C.useState(null),{widthSettings:i,fontSettings:u,letterSpacing:s,textAlign:g,wordSpacing:c,fontSizeLineHeight:A,textAppearance:x,color:f}=n.imageCaption,[p,d]=C.useState(void 0),[S,y]=C.useState(null),[v,_]=C.useState(0),[D,V]=C.useState(0),{direction:T,transition:m,controls:k,pagination:R,imageCaption:O,triggers:F}=e,H=C.useRef(m.type),{x:M,y:X}=e.controls.offset,G=h=>{r&&r.go(h)};return C.useEffect(()=>{if(!S)return;const h=new ResizeObserver(E=>{if(!r)return;const[I]=E;d({width:Math.round(I.contentRect.width),height:Math.round(I.contentRect.height)})});return h.observe(S),()=>h.unobserve(S)},[S]),C.useEffect(()=>{!r||H.current===m.type||(V(h=>h+1),H.current=m.type)},[m.type]),l.jsx("div",{className:ge(J.wrapper,{[J.editor]:o}),ref:y,children:l.jsxs("div",{className:J.sliderInner,style:{width:p?p.width:"100%",height:p?p.height:"100%",backgroundColor:m.backgroundColor&&m.type==="fade in"?m.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:ge(J.captionBlock),children:l.jsx("div",{className:J.captionTextWrapper,children:t.map((h,E)=>l.jsx("div",{className:ge(J.captionText,wa[O.alignment],{[J.withPointerEvents]:E===v&&o,[J.active]:E===v}),style:{fontFamily:u.fontFamily,fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:i.sizing==="auto"?"max-content":$.scalingValue(i.width,o),letterSpacing:$.scalingValue(s,o),wordSpacing:$.scalingValue(c,o),textAlign:g,fontSize:$.scalingValue(A.fontSize,o),lineHeight:$.scalingValue(A.lineHeight,o),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:f,transitionDuration:m.duration?`${Math.round(parseInt(m.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:J.captionTextInner,style:{"--link-hover-color":O.linkHoverColor,"--link-color":O.linkColor,position:"relative",top:$.scalingValue(O.offset.y,o),left:$.scalingValue(O.offset.x,o)},children:l.jsx(Pt,{content:h.imageCaption})})},E))})}),l.jsx(cr,{onMove:h=>{_(h.index)},ref:a,options:{arrows:!1,speed:m.duration?parseInt(m.duration):500,autoplay:F.autoPlay!==null,...F.autoPlay!==null&&{interval:parseInt(F.autoPlay)*1e3},direction:T==="horiz"||m.type==="fade in"?"ltr":"ttb",pagination:!1,drag:F.triggersList.drag,perPage:1,width:p?p.width:"100%",height:p?p.height:"100%",type:m.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((h,E)=>l.jsx(ur,{children:l.jsx("div",{className:J.sliderItem,children:l.jsx("div",{className:J.imgWrapper,children:l.jsx("img",{className:ge(J.sliderImage,{[J.contain]:h.image.objectFit==="contain",[J.cover]:h.image.objectFit==="cover"}),src:h.image.url,alt:h.image.name??""})})})},E))},D),k.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:ge(J.arrow,{[J.arrowVertical]:T==="vert",[J.hoverArrow]:k.show==="on hover"}),style:{color:k.color,"--arrow-hover-color":k.hover},children:l.jsxs("button",{onClick:()=>{G("-1")},className:J.arrowInner,style:{transform:`translate(${$.scalingValue(M,o)}, ${$.scalingValue(X*(T==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:[k.arrowsImgUrl&&l.jsx(Xe,{url:k.arrowsImgUrl,fill:k.color,hoverFill:k.hover,className:ge(J.arrowImg,J.mirror)}),!k.arrowsImgUrl&&l.jsx(vo,{color:k.color,className:ge(J.arrowIcon,J.arrowImg,J.mirror)})]})}),l.jsx("div",{className:ge(J.arrow,J.nextArrow,{[J.arrowVertical]:T==="vert",[J.hoverArrow]:k.show==="on hover"}),style:{color:k.color,"--arrow-hover-color":k.hover},children:l.jsxs("button",{className:J.arrowInner,onClick:()=>G("+1"),style:{transform:`translate(${$.scalingValue(M*(T==="horiz"?-1:1),o)}, ${$.scalingValue(X,o)}) scale(${e.controls.scale/100}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:[k.arrowsImgUrl&&l.jsx(Xe,{url:k.arrowsImgUrl,fill:k.color,hoverFill:k.hover,className:J.arrowImg}),!k.arrowsImgUrl&&l.jsx(vo,{color:k.color,className:ge(J.arrowIcon,J.arrowImg)})]})})]}),F.triggersList.click&&l.jsx("div",{className:J.clickOverlay,onClick:()=>{r&&r.go("+1")}}),R.isActive&&l.jsx("div",{className:ge(J.pagination,{[J.paginationInsideBottom]:R.position==="inside-1"&&T==="horiz",[J.paginationInsideTop]:R.position==="inside-2"&&T==="horiz",[J.paginationOutsideBottom]:R.position==="outside-1"&&T==="horiz",[J.paginationOutsideTop]:R.position==="outside-2"&&T==="horiz",[J.paginationInsideLeft]:R.position==="inside-1"&&T==="vert",[J.paginationInsideRight]:R.position==="inside-2"&&T==="vert",[J.paginationOutsideLeft]:R.position==="outside-1"&&T==="vert",[J.paginationOutsideRight]:R.position==="outside-2"&&T==="vert",[J.paginationVertical]:T==="vert"}),children:l.jsx("div",{className:J.paginationInner,style:{backgroundColor:R.colors[2],transform:`scale(${R.scale/100}) translate(${$.scalingValue(R.offset.x,o)}, ${$.scalingValue(R.offset.y,o)}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:t.map((h,E)=>l.jsx("button",{onClick:()=>{r&&r.go(E)},className:ge(J.paginationItem),children:l.jsx("div",{className:ge(J.dot,{[J.activeDot]:E===v}),style:{backgroundColor:E===v?R.colors[0]:R.colors[1],"--pagination-hover-color":R.hover}})},E))})})]})})}function vo({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.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 _a={element:Ta,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},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:"outside-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"]}},Aa="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Ea="ImageRevealSlider-module__image___Qjt-e",La="ImageRevealSlider-module__link___N-iLG",Ia="ImageRevealSlider-module__cursor___2U03d",st={imageRevealSlider:Aa,image:Ea,link:La,cursor:Ia};function bo(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const a=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*a,u=a/2,s=i/2;if(e>=o.x-u&&e<=o.x+u&&t>=o.y-s&&t<=o.y+s)return!0}return!1}function Cn(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function ka(e,t,n,o){let r,a;if(t==="custom"){r=n;const i=await Cn(e);a=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await Cn(e);a=i.height/i.width*r}else{const i=await Cn(e);r=i.width,a=i.height}return{width:r,height:a,finalWidth:`${r}px`}}function Fa({settings:e,content:t,isEditor:n}){const[o,r]=C.useState(null),[a,i]=C.useState([]),[u,s]=C.useState(0),g=C.useRef(0),[c,A]=C.useState({x:0,y:0}),[x,f]=C.useState(1),[p,d]=C.useState("none"),S=C.useRef({x:0,y:0}),[y,v]=C.useState(!1),{sizeType:_,imageWidth:D,randomRangeImageWidth:V}=e.imageSize,{revealPosition:T,visible:m}=e.position,{cursorType:k,target:R,defaultCursorScale:O,defaultCursor:F,hoverCursorScale:H,hoverCursor:M}=e.cursor;C.useEffect(()=>{if(!o)return;const h=(L,w)=>{const N=o.getBoundingClientRect(),K=L-N.left,ie=w-N.top;if(A({x:K,y:ie}),k==="system"){d("none"),f(1);return}const ne=K,ce=ie,P=document.elementFromPoint(N.left+ne,N.top+ce);if(P&&P.closest("a")){d("none"),f(1);return}const Q=bo(ne,ce,a)||R==="area"?{img:M??"none",scale:H}:{img:F??"none",scale:O};d(Q.img),f(Q.scale)},E=L=>{L.stopPropagation(),S.current={x:L.clientX,y:L.clientY},h(L.clientX,L.clientY)},I=()=>{y&&h(S.current.x,S.current.y)};return o.addEventListener("mousemove",E),window.addEventListener("scroll",I,!0),()=>{o.removeEventListener("mousemove",E),window.removeEventListener("scroll",I,!0)}},[o,y,c,k,R,M,F,H,O,a]),C.useEffect(()=>{y||(d("none"),f(0))},[y]);const X=async(h,E,I,L={})=>{const{width:w,height:N,finalWidth:K}=await ka(h.image.url,_,D,V);let ie=0,ne=0;T==="same"?(ie=E/2,ne=I/2):(ie=L.x??Math.random()*E,ne=L.y??Math.random()*I);const ce=Math.min(Math.max(ie,w/2),E-w/2),P=Math.min(Math.max(ne,N/2),I-N/2);return{id:g.current++,url:h.image.url,link:h.link,name:h.image.name,x:ce,y:P,width:K}};C.useEffect(()=>{if(!o||t.length===0)return;const h=o.getBoundingClientRect(),E=h.width,I=h.height,L=[];(async()=>{const N=t[0],K=await X(N,E,I);L.push(K),i(L),s(1)})()},[_,D,V,T,o]),C.useEffect(()=>{m==="last One"&&i(h=>h.length>0?[h[h.length-1]]:[])},[m]);const G=async h=>{if(!o)return;const E=o.getBoundingClientRect(),I=h.clientX-E.left,L=h.clientY-E.top;if(R==="image"&&!bo(I,L,a))return;let w=0,N=0;T==="on Click"?(w=I,N=L):T==="same"?(w=E.width/2,N=E.height/2):(w=Math.random()*E.width,N=Math.random()*E.height);const K=t[u],ie=await X(K,E.width,E.height,{x:w,y:N});i(ne=>m==="all"?[...ne,ie]:[ie]),s(ne=>ne>=t.length-1?0:ne+1)};return l.jsxs("div",{ref:r,onClick:G,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),className:st.imageRevealSlider,style:{cursor:p==="none"?"default":"none"},children:[a.map(h=>l.jsx("div",{className:st.wrapper,style:{top:`${h.y}px`,left:`${h.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:h.width??"auto",height:"auto",cursor:p==="none"?"default":"none"},children:R==="area"&&h.link?l.jsx("a",{href:h.link,target:"_blank",className:st.link,children:l.jsx("img",{src:h.url,alt:h.name,className:st.image},h.id)}):l.jsx("img",{src:h.url,alt:h.name,className:st.image},h.id)},h.id)),y&&l.jsx("div",{className:st.cursor,style:{left:`${c.x}px`,top:`${c.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${p}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Pa={element:Fa,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{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:""}]}}}},Ra="LightBox-module__hidden___9s-9x",Ma="LightBox-module__heroImage___sTxNF",Wa="LightBox-module__background___rm9ml",Na="LightBox-module__editor___4ACaY",Ha="LightBox-module__contentStyle___Bgnsq",Va="LightBox-module__imageStyle___tLIlB",ja="LightBox-module__imgWrapper___LuFUp",Oa="LightBox-module__contain___8-yaS",za="LightBox-module__cover___hNvOG",Ba="LightBox-module__caption___b6L2I",Da="LightBox-module__captionTextInner___rCGNH",Ua="LightBox-module__lightboxSplide___XFuWC",qa="LightBox-module__arrow___iz38X",Ga="LightBox-module__arrowVertical___Zfz81",Ya="LightBox-module__nextArrow___zkAQN",Xa="LightBox-module__arrowInner___p48sW",Ka="LightBox-module__arrowIcon___3VaFf",Za="LightBox-module__arrowImg___pNV88",Ja="LightBox-module__mirror___pjeXc",Qa="LightBox-module__thumbsWrapper___GB-nU",el="LightBox-module__thumbsContainerVertical___wttk5",tl="LightBox-module__thumbsContainer___osSma",nl="LightBox-module__thumbsAlignStart___MO6tY",ol="LightBox-module__thumbsAlignCenter___Q4sUx",rl="LightBox-module__thumbsAlignEnd___p4y9R",il="LightBox-module__thumbItem___HvnF3",al="LightBox-module__closeButton___g2khP",ll="LightBox-module__fadeIn___0m5GW",sl="LightBox-module__slideInLeft___gPYwC",cl="LightBox-module__slideInRight___S-pPp",ul="LightBox-module__slideInTop___DFdAj",pl="LightBox-module__slideInBottom___m27kZ",dl="LightBox-module__fadeOut___55qBR",gl="LightBox-module__slideOutLeft___NvU7P",ml="LightBox-module__slideOutRight___SK7eC",fl="LightBox-module__slideOutTop___Vgg0z",hl="LightBox-module__slideOutBottom___nJ0Ef",yl="LightBox-module__scaleSlide___vZriG",B={hidden:Ra,heroImage:Ma,background:Wa,editor:Na,contentStyle:Ha,imageStyle:Va,imgWrapper:ja,contain:Oa,cover:za,caption:Ba,captionTextInner:Da,lightboxSplide:Ua,arrow:qa,arrowVertical:Ga,nextArrow:Ya,arrowInner:Xa,arrowIcon:Ka,arrowImg:Za,mirror:Ja,thumbsWrapper:Qa,thumbsContainerVertical:el,thumbsContainer:tl,thumbsAlignStart:nl,thumbsAlignCenter:ol,thumbsAlignEnd:rl,thumbItem:il,closeButton:al,fadeIn:ll,slideInLeft:sl,slideInRight:cl,slideInTop:ul,slideInBottom:pl,fadeOut:dl,slideOutLeft:gl,slideOutRight:ml,slideOutTop:fl,slideOutBottom:hl,scaleSlide:yl},Ut=(e,t,n)=>{const o={},[r,a]=e.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),a==="left"?(o.left="0",o.right="auto"):a==="center"?(o.left="50%",o.right="auto"):a==="right"&&(o.left="auto",o.right="0"),r==="middle"&&a==="center"?o.transform=`translate(calc(-50% + ${$.scalingValue(t.x,n)}), calc(-50% + ${$.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${$.scalingValue(t.x,n)}, calc(-50% + ${$.scalingValue(t.y,n)}))`:a==="center"?o.transform=`translate(calc(-50% + ${$.scalingValue(t.x,n)}), ${$.scalingValue(t.y,n)})`:o.transform=`translate(${$.scalingValue(t.x,n)}, ${$.scalingValue(t.y,n)})`,o};function pr(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 xo(e){const t=e.getBoundingClientRect(),n=pr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,i=e.naturalHeight,u=o/r,s=a/i;let g,c;s>u?(g=o,c=o/s):(c=r,g=r*s);const A=t.left+n.left,x=t.top+n.top,f=(o-g)/2+A,p=(r-c)/2+x;return{x:f,y:p,width:g,height:c}}function So(e){const t=e.getBoundingClientRect(),n=pr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Co(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const o=t[1].split(",").map(r=>parseFloat(r.trim()));return o.length===4?o[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const o=n[1].substring(6,8);return parseInt(o,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function vl(e,t){const n=(()=>{if(e==="fade in")return B.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return B.slideInLeft;case"right":return B.slideInRight;case"top":return B.slideInTop;case"bottom":return B.slideInBottom;default:return B.slideInRight}return B.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return B.fadeIn;if(e==="slide in")switch(t){case"left":return B.slideInLeft;case"right":return B.slideInRight;case"top":return B.slideInTop;case"bottom":return B.slideInBottom;default:return B.slideInRight}return B.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return B.fadeOut;if(e==="slide in")switch(t){case"left":return B.slideOutLeft;case"right":return B.slideOutRight;case"top":return B.slideOutTop;case"bottom":return B.slideOutBottom;default:return B.slideOutRight}return B.fadeOut})(),a=(()=>{if(e==="fade in")return B.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return B.slideOutLeft;case"right":return B.slideOutRight;case"top":return B.slideOutTop;case"bottom":return B.slideOutBottom;default:return B.slideOutRight}return B.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:a}}const bl=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:a})=>{const[i,u]=C.useState(!1),{url:s}=e.thumbnailBlock.cover;return C.useEffect(()=>{r==="close"&&u(!1),r==="open"&&u(!0)},[r]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:s,alt:"Cover",className:B.heroImage,onClick:()=>u(!0)}),l.jsx(xl,{isOpen:i,onClose:()=>u(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:a})]})},xl=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:a,isEditor:i,metadata:u})=>{var j;const[s,g]=C.useState(0),[c,A]=C.useState(0),[x,f]=C.useState(!1),[p,d]=C.useState(!1),[S,y]=C.useState({}),v=C.useRef(null),_=C.useRef(null),D=C.useRef(null),V=C.useRef(!1),T=C.useRef(null),m=C.useRef(null),k=C.useRef(null),R=C.useRef(null),O=C.useRef(!1),F=C.useRef(null),[H,M]=C.useState(!1),{appear:X,triggers:G,slider:h,thumbnail:E,controls:I,area:L,caption:w,layout:N}=r.lightboxBlock,{appearClass:K,backdropAppearClass:ie,backdropDisappearClass:ne,disappearClass:ce}=vl(X.type,X.direction),P=(u==null?void 0:u.itemId)??null;C.useEffect(()=>{const b=()=>{setTimeout(()=>{var Z,te;(te=(Z=v.current)==null?void 0:Z.splide)==null||te.refresh()},16)},U=()=>{A(Z=>Z+1)};return window.addEventListener("ArticleEditor.Layout:change",b),window.addEventListener("ArticleEditor.ComponentContent:change",U),()=>{window.removeEventListener("ArticleEditor.Layout:change",b),window.removeEventListener("ArticleEditor.ComponentContent:change",U)}},[]),C.useEffect(()=>{if(!e||!E.isActive){M(!1);return}const b=F.current;if(!b)return;const U=()=>{h.direction==="horiz"?M(b.scrollWidth>b.clientWidth):M(b.scrollHeight>b.clientHeight)};U();const Z=new ResizeObserver(U);return Z.observe(b),()=>Z.disconnect()},[e,E.isActive,n.length,S,h.direction]);const Q=C.useCallback(()=>{const b=window.matchMedia("(max-width: 768px)").matches,U=Co(L.color);b&&!i&&U>.9&&(document.body.style.backgroundColor=""),f(!0),V.current=!0;const Z=te=>{te.target===T.current&&te.animationName&&(T.current&&m.current&&T.current.removeEventListener("animationend",m.current),m.current=null,V.current&&(V.current=!1,t()),f(!1))};T.current&&(m.current=Z,T.current.addEventListener("animationend",Z))},[t,L.color,i]),de=(b,U,Z)=>{var te,re;if(b){if(G.type==="click"&&G.switch==="image")G.repeat==="close"&&s===n.length-1?Q():(te=v.current)==null||te.go("+1");else if(G.type==="click"&&G.switch==="50/50"){const W=b.getBoundingClientRect(),z=U-W.left,q=Z-W.top,ee=W.width,oe=W.height;let ue;h.direction==="horiz"?ue=z<ee/2?"-1":"+1":ue=q<oe/2?"-1":"+1",(re=v.current)==null||re.go(ue)}}},pe=b=>{if(O.current){O.current=!1;return}const U=n[s],Z=(U==null?void 0:U.image.objectFit)==="cover";let te,re;if("changedTouches"in b&&b.changedTouches.length>0)te=b.changedTouches[0].clientX,re=b.changedTouches[0].clientY;else if("clientX"in b)te=b.clientX,re=b.clientY;else return;let W;if(Z&&D.current){const z=So(D.current);W=te>=z.left&&te<=z.right&&re>=z.top&&re<=z.bottom}else{const z=D.current?xo(D.current):null;if(!z){b.target===b.currentTarget&&Q();return}W=te>=z.x&&te<=z.x+z.width&&re>=z.y&&re<=z.y+z.height}W?de(D.current,te,re):Q()},Y=b=>{const U=b.target;(U.classList.contains(B.thumbsWrapper)||U.classList.contains(B.thumbsContainer))&&pe(b)};C.useEffect(()=>{if(!e)return;const b=U=>{var Z,te;if(U.key==="Escape"){Q();return}if(U.key==="ArrowRight"){g(re=>(re+1)%Math.max(n.length,1)),(Z=v.current)==null||Z.go("+1");return}U.key==="ArrowLeft"&&(g(re=>(re-1+Math.max(n.length,1))%Math.max(n.length,1)),(te=v.current)==null||te.go("-1"))};return window.addEventListener("keydown",b),()=>{window.removeEventListener("keydown",b)}},[e,Q,n.length]),C.useEffect(()=>{if(e){if(g(0),A(U=>U+1),V.current=!1,f(!1),d(!1),y({}),!P)return;const b=new CustomEvent("page-overlay",{detail:{itemId:P}});window.dispatchEvent(b)}return()=>{T.current&&m.current&&(T.current.removeEventListener("animationend",m.current),m.current=null),d(!1)}},[e,P]),C.useEffect(()=>{_.current!==null&&_.current!==h.type&&A(b=>b+1),_.current=h.type},[h.type]),C.useEffect(()=>{if(!e)return;const b=document.body.style.overflow,U=window.matchMedia("(max-width: 768px)").matches,Z=Co(L.color);document.body.style.overflow="hidden",d(!1);const te=W=>{W.target===T.current&&!V.current&&W.animationName&&(U&&!i&&Z>.9&&(document.body.style.backgroundColor=L.color),d(!0),T.current&&k.current&&T.current.removeEventListener("animationend",k.current),k.current=null)};T.current&&(k.current=te,T.current.addEventListener("animationend",te));const re=W=>{const z=W.target;z&&(z.closest(`.${B.thumbsWrapper}`)||z.closest(`.${B.thumbsContainer}`))||h.type!=="slide"&&W.preventDefault()};return document.addEventListener("touchmove",re,{passive:!1}),()=>{document.body.style.overflow=b,document.removeEventListener("touchmove",re),T.current&&k.current&&(T.current.removeEventListener("animationend",k.current),k.current=null),d(!1)}},[e,i,L.color,h.type]),C.useEffect(()=>{if(!e)return;const b=U=>{var te,re;if(V.current){U.stopPropagation();return}if(O.current){O.current=!1;return}const Z=U.target;if(!(Z&&(Z.closest(`.${B.thumbsContainer}`)||Z.closest(`.${B.thumbItem}`)))){if(h.type==="slide"&&G.type==="drag"&&((re=(te=v.current)==null?void 0:te.splide)!=null&&re.root)){const W=v.current.splide.root;if(Z&&(W.contains(Z)||W===Z))return}if(U.touches.length===0&&U.changedTouches.length>0){const W=n[s],z=(W==null?void 0:W.image.objectFit)==="cover",q=U.changedTouches[0];let ee;if(z&&D.current){const oe=So(D.current);ee=q.clientX>=oe.left&&q.clientX<=oe.right&&q.clientY>=oe.top&&q.clientY<=oe.bottom}else{const oe=D.current?xo(D.current):null;if(!oe)return;ee=q.clientX>=oe.x&&q.clientX<=oe.x+oe.width&&q.clientY>=oe.y&&q.clientY<=oe.y+oe.height}if(!ee){U.stopPropagation(),V.current=!0;const oe=ue=>{ue.stopPropagation(),ue.preventDefault(),document.removeEventListener("click",oe,!0)};document.addEventListener("click",oe,!0),Q()}}}};return document.addEventListener("touchend",b,{passive:!0}),()=>{document.removeEventListener("touchend",b)}},[e,Q,s,n]);const ae=(h.type==="scale"||h.type==="fade")&&h.direction==="vert"&&G.type==="drag";C.useEffect(()=>{var ue,Te;if(!e||!ae||!((Te=(ue=v.current)==null?void 0:ue.splide)!=null&&Te.root))return;const b=v.current.splide.root,U=30,Z=(se,he)=>{if(R.current){const we=Math.abs(se-R.current.x),Ge=Math.abs(he-R.current.y);(we>0||Ge>0)&&(O.current=!0)}},te=se=>{R.current&&(se.preventDefault(),Z(se.clientX,se.clientY))},re=se=>{R.current&&se.touches.length>0&&(se.preventDefault(),Z(se.touches[0].clientX,se.touches[0].clientY))},W=(se,he)=>{if(!R.current||!v.current){R.current=null;return}const we=Math.abs(se-R.current.x),Ge=Math.abs(he-R.current.y);Ge>U&&Ge>we&&v.current.go(he<R.current.y?"+1":"-1"),R.current=null},z=se=>{R.current&&W(se.clientX,se.clientY),document.removeEventListener("pointerup",z),document.removeEventListener("pointercancel",z),document.removeEventListener("pointermove",te)},q=se=>{if(R.current){if(se.changedTouches.length>0){const he=se.changedTouches[0];W(he.clientX,he.clientY)}document.removeEventListener("touchend",q),document.removeEventListener("touchcancel",q),document.removeEventListener("touchmove",re)}},ee=se=>{R.current={x:se.clientX,y:se.clientY},O.current=!1,document.addEventListener("pointermove",te,{passive:!1}),document.addEventListener("pointerup",z),document.addEventListener("pointercancel",z)},oe=se=>{se.touches.length>0&&(R.current={x:se.touches[0].clientX,y:se.touches[0].clientY},O.current=!1,document.addEventListener("touchmove",re,{passive:!1}),document.addEventListener("touchend",q),document.addEventListener("touchcancel",q))};return b.addEventListener("pointerdown",ee),b.addEventListener("touchstart",oe),()=>{b.removeEventListener("pointerdown",ee),b.removeEventListener("touchstart",oe),document.removeEventListener("pointermove",te),document.removeEventListener("pointerup",z),document.removeEventListener("pointercancel",z),document.removeEventListener("touchmove",re),document.removeEventListener("touchend",q),document.removeEventListener("touchcancel",q),R.current=null,O.current=!1}},[e,ae,c]);const fe={backgroundColor:L.color,backdropFilter:`blur(${L.blur}px)`,animationDuration:`${parseInt(X.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:yr.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:i?null:T,className:ge(B.background,x?ne:ie,{[B.editor]:i},{[B.hidden]:!e}),style:{...fe,...p&&!i&&!x?{position:"absolute"}:{}}}),l.jsxs("div",{ref:i?T:null,className:ge(B.contentStyle,x?ce:K,{[B.editor]:i},{[B.hidden]:!e}),style:{animationDuration:`${parseInt(X.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(cr,{onMove:b=>g(b.index),ref:v,className:B.lightboxSplide,options:{arrows:!1,speed:h.duration?parseInt(h.duration):500,direction:h.direction==="horiz"||h.type==="fade"||h.type==="scale"?"ltr":"ttb",pagination:!1,drag:G.type==="drag"&&!ae,perPage:1,width:"100%",height:"100%",type:h.type==="fade"||h.type==="scale"?"fade":"loop",padding:0,rewind:G.repeat!=="close",start:0},style:{"--splide-speed":h.duration},children:n.map((b,U)=>{const Z=Ut(N.position,N.offset,i),te=`${$.scalingValue(N.padding.top,i)} ${$.scalingValue(N.padding.right,i)} ${$.scalingValue(N.padding.bottom,i)} ${$.scalingValue(N.padding.left,i)}`,re=h.type==="scale"?(()=>{const{transform:W,...z}=Z;return{...z,position:"absolute",padding:te,boxSizing:"border-box","--position-transform":W||"none"}})():{...Z,position:"absolute",padding:te,boxSizing:"border-box"};return l.jsx(ur,{children:l.jsx("div",{className:B.imgWrapper,onClick:pe,children:l.jsx("img",{ref:U===s?D:null,className:ge(B.imageStyle,{[B.contain]:b.image.objectFit==="contain",[B.cover]:b.image.objectFit==="cover",[B.scaleSlide]:h.type==="scale"}),src:b.image.url,alt:b.image.name??"",style:{...re,pointerEvents:b.image.objectFit==="contain"?"none":"auto"}})})},U)})},c),I.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:ge(B.arrow,{[B.arrowVertical]:h.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:l.jsxs("button",{className:B.arrowInner,style:{transform:`translate(${$.scalingValue(I.offset.x,i)}, ${$.scalingValue(I.offset.y*(h.direction==="horiz"?1:-1),i)}) scale(${I.scale}) rotate(${h.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var b;return(b=v.current)==null?void 0:b.go("-1")},"aria-label":"Previous",children:[I.arrowsImgUrl&&l.jsx(Xe,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:ge(B.arrowImg,B.mirror)}),!I.arrowsImgUrl&&l.jsx($o,{color:I.color,className:ge(B.arrowIcon,B.arrowImg,B.mirror)})]})}),l.jsx("div",{className:ge(B.arrow,B.nextArrow,{[B.arrowVertical]:h.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:l.jsxs("button",{className:B.arrowInner,style:{transform:`translate(${$.scalingValue(I.offset.x*(h.direction==="horiz"?-1:1),i)}, ${$.scalingValue(I.offset.y,i)}) scale(${I.scale}) rotate(${h.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var b;return(b=v.current)==null?void 0:b.go("+1")},"aria-label":"Next",children:[I.arrowsImgUrl&&l.jsx(Xe,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:B.arrowImg}),!I.arrowsImgUrl&&l.jsx($o,{color:I.color,className:ge(B.arrowIcon,B.arrowImg)})]})})]}),L.closeIconUrl&&(()=>{const b=Ut(L.closeIconAlign,L.closeIconOffset,i),U=`scale(${L.closeIconScale})`,Z=b.transform?`${b.transform} ${U}`:U;return l.jsx("button",{className:B.closeButton,style:{...b,transform:Z},onClick:Q,"aria-label":"Close lightbox",children:l.jsx(Xe,{url:L.closeIconUrl,fill:L.closeIconColor??"#000000",hoverFill:L.closeIconHover??"#cccccc"})})})(),w&&w.isActive&&o.imageCaption&&((j=n[s])==null?void 0:j.imageCaption)&&(()=>{const{widthSettings:b,fontSettings:U,letterSpacing:Z,textAlign:te,wordSpacing:re,fontSizeLineHeight:W,textAppearance:z,color:q}=o.imageCaption;return l.jsx("div",{className:B.caption,style:{...Ut(w.alignment,w.offset,i),fontFamily:U.fontFamily,fontWeight:U.fontWeight,fontStyle:U.fontStyle,width:b.sizing==="auto"?"max-content":$.scalingValue(b.width,i),letterSpacing:$.scalingValue(Z,i),wordSpacing:$.scalingValue(re,i),textAlign:te,fontSize:$.scalingValue(W.fontSize,i),lineHeight:$.scalingValue(W.lineHeight,i),textTransform:z.textTransform??"none",textDecoration:z.textDecoration??"none",fontVariant:z.fontVariant??"normal",color:q},onClick:ee=>ee.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:B.captionTextInner,style:{"--link-color":w.linkColor,"--link-hover-color":w.linkHoverColor},children:l.jsx(Pt,{content:n[s].imageCaption})})})})(),E.isActive&&(()=>{const[b,U]=E.position.split("-"),Z=h.direction==="horiz"?`${b}-left`:E.position,te=Ut(Z,E.offset,i),re=()=>{if(h.direction==="horiz"){if(U==="left")return"flex-start";if(U==="center")return"center";if(U==="right")return"flex-end"}else{if(b==="top")return"flex-start";if(b==="middle")return"center";if(b==="bottom")return"flex-end"}return"flex-start"};return l.jsx("div",{ref:F,className:B.thumbsWrapper,onClick:W=>Y(W),style:{position:i?"absolute":"fixed",...te,...h.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:ge(B.thumbsContainer,{[B.thumbsContainerVertical]:h.direction==="vert",[B.thumbsAlignStart]:E.align==="start",[B.thumbsAlignCenter]:E.align==="center",[B.thumbsAlignEnd]:E.align==="end"}),style:{gap:$.scalingValue(E.grid.gap,i),justifyContent:H?"flex-start":re()},children:n.map((W,z)=>{const q=z===s,ee=S[z],ue=E.grid.size*(q?E.activeState.scale:1),Te=()=>{if(E.fit!=="fit")return{};if(!ee)return h.direction==="horiz"?{height:$.scalingValue(ue,i)}:{width:$.scalingValue(ue,i)};const se=ee.width/ee.height;if(h.direction==="horiz"){const he=ue,we=he*se;return{width:$.scalingValue(we,i),height:$.scalingValue(he,i)}}else{const he=ue,we=he/se;return{width:$.scalingValue(he,i),height:$.scalingValue(we,i)}}};return l.jsx("button",{className:B.thumbItem,style:{...h.direction==="horiz"&&E.fit!=="fit"?{height:$.scalingValue(ue,i)}:{},...h.direction==="vert"&&E.fit!=="fit"?{width:$.scalingValue(ue,i)}:{},...E.fit==="cover"?{width:$.scalingValue(ue,i),height:$.scalingValue(ue,i)}:{},...Te(),transition:q?"all 0.25s ease-out":"none",opacity:q?E.activeState.opacity/100:E.opacity/100,"--thumb-hover":E.activeState.opacity/100},onClick:se=>{var he;se.stopPropagation(),g(z),(he=v.current)==null||he.go(z)},onMouseEnter:()=>{var se;E.triggers==="hov"&&((se=v.current)==null||se.go(z))},children:l.jsx("img",{src:W.image.url,alt:W.image.name??"",onLoad:se=>{const he=se.currentTarget;he.naturalWidth&&he.naturalHeight&&y(we=>({...we,[z]:{width:he.naturalWidth,height:he.naturalHeight}}))},style:{objectFit:E.fit==="cover"?"cover":"contain",...E.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...E.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${W.image.name}-${z}`)})})})})()]})]}),document.getElementById(a))};function $o({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.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 Sl={element:bl,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},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 mt(e){const{color:t,...n}=e;return n}function Re(e,t){var n,o,r;return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:$.scalingValue(e.letterSpacing,t),wordSpacing:$.scalingValue(e.wordSpacing,t),fontSize:$.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?$.scalingValue(e.lineHeight,t):void 0,textTransform:(n=e.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=e.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=e.textAppearance)==null?void 0:r.fontVariant,color:e.color}}function qt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cl(e){return`
6
+ */const ya="RichTextRenderer-module__link___BWeZ2",va={link:ya},Pt=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?s.jsx("a",{className:va.link,href:o.value,target:o.target,children:t(o.children)},r):s.jsx("span",{style:ba(o),children:o.text},r));return s.jsx(s.Fragment,{children:e.map((n,o)=>{const r=n.children;return s.jsx("div",{children:t(r)},o)})})};function ba(e){return{...e.fontFamily&&{fontFamily: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 xa="SvgImage-module__svg___q3xE-",Sa="SvgImage-module__img___VsTm-",yo={svg:xa,img:Sa},Ca=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},$a=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Xe=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[a,i]=$.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return $.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(u)}},[]),!Ca(e)||!a?s.jsx("img",{src:e,alt:"",className:ge(yo.img,o),style:r}):s.jsx("span",{"data-supports-mask":a,className:ge(yo.svg,o),style:{"--svg":$a(e),"--fill":t,"--hover-fill":n,...r??{}}})},wa={"top-left":Q.topLeftAlignment,"top-center":Q.topCenterAlignment,"top-right":Q.topRightAlignment,"middle-left":Q.middleLeftAlignment,"middle-center":Q.middleCenterAlignment,"middle-right":Q.middleRightAlignment,"bottom-left":Q.bottomLeftAlignment,"bottom-center":Q.bottomCenterAlignment,"bottom-right":Q.bottomRightAlignment};function Ta({settings:e,content:t,styles:n,isEditor:o}){const[r,a]=$.useState(null),{widthSettings:i,fontSettings:u,letterSpacing:l,textAlign:m,wordSpacing:c,fontSizeLineHeight:L,textAppearance:S,color:g}=n.imageCaption,[p,d]=$.useState(void 0),[x,h]=$.useState(null),[y,E]=$.useState(0),[D,H]=$.useState(0),{direction:_,transition:b,controls:C,pagination:P,imageCaption:O,triggers:R}=e,V=$.useRef(b.type),{x:j,y:B}=e.controls.offset,U=f=>{r&&r.go(f)};return $.useEffect(()=>{if(!x)return;const f=new ResizeObserver(F=>{if(!r)return;const[k]=F;d({width:Math.round(k.contentRect.width),height:Math.round(k.contentRect.height)})});return f.observe(x),()=>f.unobserve(x)},[x]),$.useEffect(()=>{!r||V.current===b.type||(H(f=>f+1),V.current=b.type)},[b.type]),s.jsx("div",{className:ge(Q.wrapper,{[Q.editor]:o}),ref:h,children:s.jsxs("div",{className:Q.sliderInner,style:{width:p?p.width:"100%",height:p?p.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&s.jsx("div",{className:ge(Q.captionBlock),children:s.jsx("div",{className:Q.captionTextWrapper,children:t.map((f,F)=>s.jsx("div",{className:ge(Q.captionText,wa[O.alignment],{[Q.withPointerEvents]:F===y&&o,[Q.active]:F===y}),style:{fontFamily:u.fontFamily,fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:i.sizing==="auto"?"max-content":w.scalingValue(i.width,o),letterSpacing:w.scalingValue(l,o),wordSpacing:w.scalingValue(c,o),textAlign:m,fontSize:w.scalingValue(L.fontSize,o),lineHeight:w.scalingValue(L.lineHeight,o),textTransform:S.textTransform??"none",textDecoration:S.textDecoration??"none",fontVariant:S.fontVariant??"normal",color:g,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:s.jsx("div",{"data-styles":"imageCaption",className:Q.captionTextInner,style:{"--link-hover-color":O.linkHoverColor,"--link-color":O.linkColor,position:"relative",top:w.scalingValue(O.offset.y,o),left:w.scalingValue(O.offset.x,o)},children:s.jsx(Pt,{content:f.imageCaption})})},F))})}),s.jsx(cr,{onMove:f=>{E(f.index)},ref:a,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:R.autoPlay!==null,...R.autoPlay!==null&&{interval:parseInt(R.autoPlay)*1e3},direction:_==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:R.triggersList.drag,perPage:1,width:p?p.width:"100%",height:p?p.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((f,F)=>s.jsx(ur,{children:s.jsx("div",{className:Q.sliderItem,children:s.jsx("div",{className:Q.imgWrapper,children:s.jsx("img",{className:ge(Q.sliderImage,{[Q.contain]:f.image.objectFit==="contain",[Q.cover]:f.image.objectFit==="cover"}),src:f.image.url,alt:f.image.name??""})})})},F))},D),C.isActive&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:ge(Q.arrow,{[Q.arrowVertical]:_==="vert",[Q.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:s.jsxs("button",{onClick:()=>{U("-1")},className:Q.arrowInner,style:{transform:`translate(${w.scalingValue(j,o)}, ${w.scalingValue(B*(_==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&s.jsx(Xe,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:ge(Q.arrowImg,Q.mirror)}),!C.arrowsImgUrl&&s.jsx(vo,{color:C.color,className:ge(Q.arrowIcon,Q.arrowImg,Q.mirror)})]})}),s.jsx("div",{className:ge(Q.arrow,Q.nextArrow,{[Q.arrowVertical]:_==="vert",[Q.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:s.jsxs("button",{className:Q.arrowInner,onClick:()=>U("+1"),style:{transform:`translate(${w.scalingValue(j*(_==="horiz"?-1:1),o)}, ${w.scalingValue(B,o)}) scale(${e.controls.scale/100}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&s.jsx(Xe,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:Q.arrowImg}),!C.arrowsImgUrl&&s.jsx(vo,{color:C.color,className:ge(Q.arrowIcon,Q.arrowImg)})]})})]}),R.triggersList.click&&s.jsx("div",{className:Q.clickOverlay,onClick:()=>{r&&r.go("+1")}}),P.isActive&&s.jsx("div",{className:ge(Q.pagination,{[Q.paginationInsideBottom]:P.position==="inside-1"&&_==="horiz",[Q.paginationInsideTop]:P.position==="inside-2"&&_==="horiz",[Q.paginationOutsideBottom]:P.position==="outside-1"&&_==="horiz",[Q.paginationOutsideTop]:P.position==="outside-2"&&_==="horiz",[Q.paginationInsideLeft]:P.position==="inside-1"&&_==="vert",[Q.paginationInsideRight]:P.position==="inside-2"&&_==="vert",[Q.paginationOutsideLeft]:P.position==="outside-1"&&_==="vert",[Q.paginationOutsideRight]:P.position==="outside-2"&&_==="vert",[Q.paginationVertical]:_==="vert"}),children:s.jsx("div",{className:Q.paginationInner,style:{backgroundColor:P.colors[2],transform:`scale(${P.scale/100}) translate(${w.scalingValue(P.offset.x,o)}, ${w.scalingValue(P.offset.y,o)}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:t.map((f,F)=>s.jsx("button",{onClick:()=>{r&&r.go(F)},className:ge(Q.paginationItem),children:s.jsx("div",{className:ge(Q.dot,{[Q.activeDot]:F===y}),style:{backgroundColor:F===y?P.colors[0]:P.colors[1],"--pagination-hover-color":P.hover}})},F))})})]})})}function vo({color:e,className:t}){return s.jsx("svg",{viewBox:"0 0 10 18",className:t,children:s.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:s.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 _a={element:Ta,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},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:"outside-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"]}},Ea="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Aa="ImageRevealSlider-module__image___Qjt-e",La="ImageRevealSlider-module__link___N-iLG",Ia="ImageRevealSlider-module__cursor___2U03d",lt={imageRevealSlider:Ea,image:Aa,link:La,cursor:Ia};function bo(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const a=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*a,u=a/2,l=i/2;if(e>=o.x-u&&e<=o.x+u&&t>=o.y-l&&t<=o.y+l)return!0}return!1}function Cn(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function ka(e,t,n,o){let r,a;if(t==="custom"){r=n;const i=await Cn(e);a=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await Cn(e);a=i.height/i.width*r}else{const i=await Cn(e);r=i.width,a=i.height}return{width:r,height:a,finalWidth:`${r}px`}}function Fa({settings:e,content:t,isEditor:n}){const[o,r]=$.useState(null),[a,i]=$.useState([]),[u,l]=$.useState(0),m=$.useRef(0),[c,L]=$.useState({x:0,y:0}),[S,g]=$.useState(1),[p,d]=$.useState("none"),x=$.useRef({x:0,y:0}),[h,y]=$.useState(!1),{sizeType:E,imageWidth:D,randomRangeImageWidth:H}=e.imageSize,{revealPosition:_,visible:b}=e.position,{cursorType:C,target:P,defaultCursorScale:O,defaultCursor:R,hoverCursorScale:V,hoverCursor:j}=e.cursor;$.useEffect(()=>{if(!o)return;const f=(I,T)=>{const W=o.getBoundingClientRect(),J=I-W.left,ae=T-W.top;if(L({x:J,y:ae}),C==="system"){d("none"),g(1);return}const te=J,le=ae,M=document.elementFromPoint(W.left+te,W.top+le);if(M&&M.closest("a")){d("none"),g(1);return}const ne=bo(te,le,a)||P==="area"?{img:j??"none",scale:V}:{img:R??"none",scale:O};d(ne.img),g(ne.scale)},F=I=>{I.stopPropagation(),x.current={x:I.clientX,y:I.clientY},f(I.clientX,I.clientY)},k=()=>{h&&f(x.current.x,x.current.y)};return o.addEventListener("mousemove",F),window.addEventListener("scroll",k,!0),()=>{o.removeEventListener("mousemove",F),window.removeEventListener("scroll",k,!0)}},[o,h,c,C,P,j,R,V,O,a]),$.useEffect(()=>{h||(d("none"),g(0))},[h]);const B=async(f,F,k,I={})=>{const{width:T,height:W,finalWidth:J}=await ka(f.image.url,E,D,H);let ae=0,te=0;_==="same"?(ae=F/2,te=k/2):(ae=I.x??Math.random()*F,te=I.y??Math.random()*k);const le=Math.min(Math.max(ae,T/2),F-T/2),M=Math.min(Math.max(te,W/2),k-W/2);return{id:m.current++,url:f.image.url,link:f.link,name:f.image.name,x:le,y:M,width:J}};$.useEffect(()=>{if(!o||t.length===0)return;const f=o.getBoundingClientRect(),F=f.width,k=f.height,I=[];(async()=>{const W=t[0],J=await B(W,F,k);I.push(J),i(I),l(1)})()},[E,D,H,_,o]),$.useEffect(()=>{b==="last One"&&i(f=>f.length>0?[f[f.length-1]]:[])},[b]);const U=async f=>{if(!o)return;const F=o.getBoundingClientRect(),k=f.clientX-F.left,I=f.clientY-F.top;if(P==="image"&&!bo(k,I,a))return;let T=0,W=0;_==="on Click"?(T=k,W=I):_==="same"?(T=F.width/2,W=F.height/2):(T=Math.random()*F.width,W=Math.random()*F.height);const J=t[u],ae=await B(J,F.width,F.height,{x:T,y:W});i(te=>b==="all"?[...te,ae]:[ae]),l(te=>te>=t.length-1?0:te+1)};return s.jsxs("div",{ref:r,onClick:U,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),className:lt.imageRevealSlider,style:{cursor:p==="none"?"default":"none"},children:[a.map(f=>s.jsx("div",{className:lt.wrapper,style:{top:`${f.y}px`,left:`${f.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:f.width??"auto",height:"auto",cursor:p==="none"?"default":"none"},children:P==="area"&&f.link?s.jsx("a",{href:f.link,target:"_blank",className:lt.link,children:s.jsx("img",{src:f.url,alt:f.name,className:lt.image},f.id)}):s.jsx("img",{src:f.url,alt:f.name,className:lt.image},f.id)},f.id)),h&&s.jsx("div",{className:lt.cursor,style:{left:`${c.x}px`,top:`${c.y}px`,transform:`translate(-50%, -50%) scale(${S})`,backgroundImage:`url('${p}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Pa={element:Fa,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{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:""}]}}}},Ma="LightBox-module__hidden___9s-9x",Ra="LightBox-module__heroImage___sTxNF",Wa="LightBox-module__background___rm9ml",Na="LightBox-module__editor___4ACaY",Va="LightBox-module__contentStyle___Bgnsq",Ha="LightBox-module__imageStyle___tLIlB",ja="LightBox-module__imgWrapper___LuFUp",Oa="LightBox-module__contain___8-yaS",za="LightBox-module__cover___hNvOG",Ba="LightBox-module__caption___b6L2I",Da="LightBox-module__captionTextInner___rCGNH",qa="LightBox-module__lightboxSplide___XFuWC",Ua="LightBox-module__arrow___iz38X",Ga="LightBox-module__arrowVertical___Zfz81",Ya="LightBox-module__nextArrow___zkAQN",Xa="LightBox-module__arrowInner___p48sW",Ka="LightBox-module__arrowIcon___3VaFf",Za="LightBox-module__arrowImg___pNV88",Ja="LightBox-module__mirror___pjeXc",Qa="LightBox-module__thumbsWrapper___GB-nU",es="LightBox-module__thumbsContainerVertical___wttk5",ts="LightBox-module__thumbsContainer___osSma",ns="LightBox-module__thumbsAlignStart___MO6tY",os="LightBox-module__thumbsAlignCenter___Q4sUx",rs="LightBox-module__thumbsAlignEnd___p4y9R",is="LightBox-module__thumbItem___HvnF3",as="LightBox-module__closeButton___g2khP",ss="LightBox-module__fadeIn___0m5GW",ls="LightBox-module__slideInLeft___gPYwC",cs="LightBox-module__slideInRight___S-pPp",us="LightBox-module__slideInTop___DFdAj",ps="LightBox-module__slideInBottom___m27kZ",ds="LightBox-module__fadeOut___55qBR",ms="LightBox-module__slideOutLeft___NvU7P",gs="LightBox-module__slideOutRight___SK7eC",fs="LightBox-module__slideOutTop___Vgg0z",hs="LightBox-module__slideOutBottom___nJ0Ef",ys="LightBox-module__scaleSlide___vZriG",z={hidden:Ma,heroImage:Ra,background:Wa,editor:Na,contentStyle:Va,imageStyle:Ha,imgWrapper:ja,contain:Oa,cover:za,caption:Ba,captionTextInner:Da,lightboxSplide:qa,arrow:Ua,arrowVertical:Ga,nextArrow:Ya,arrowInner:Xa,arrowIcon:Ka,arrowImg:Za,mirror:Ja,thumbsWrapper:Qa,thumbsContainerVertical:es,thumbsContainer:ts,thumbsAlignStart:ns,thumbsAlignCenter:os,thumbsAlignEnd:rs,thumbItem:is,closeButton:as,fadeIn:ss,slideInLeft:ls,slideInRight:cs,slideInTop:us,slideInBottom:ps,fadeOut:ds,slideOutLeft:ms,slideOutRight:gs,slideOutTop:fs,slideOutBottom:hs,scaleSlide:ys},qt=(e,t,n)=>{const o={},[r,a]=e.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),a==="left"?(o.left="0",o.right="auto"):a==="center"?(o.left="50%",o.right="auto"):a==="right"&&(o.left="auto",o.right="0"),r==="middle"&&a==="center"?o.transform=`translate(calc(-50% + ${w.scalingValue(t.x,n)}), calc(-50% + ${w.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${w.scalingValue(t.x,n)}, calc(-50% + ${w.scalingValue(t.y,n)}))`:a==="center"?o.transform=`translate(calc(-50% + ${w.scalingValue(t.x,n)}), ${w.scalingValue(t.y,n)})`:o.transform=`translate(${w.scalingValue(t.x,n)}, ${w.scalingValue(t.y,n)})`,o};function pr(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 xo(e){const t=e.getBoundingClientRect(),n=pr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,i=e.naturalHeight,u=o/r,l=a/i;let m,c;l>u?(m=o,c=o/l):(c=r,m=r*l);const L=t.left+n.left,S=t.top+n.top,g=(o-m)/2+L,p=(r-c)/2+S;return{x:g,y:p,width:m,height:c}}function So(e){const t=e.getBoundingClientRect(),n=pr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Co(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const o=t[1].split(",").map(r=>parseFloat(r.trim()));return o.length===4?o[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const o=n[1].substring(6,8);return parseInt(o,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function vs(e,t){const n=(()=>{if(e==="fade in")return z.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return z.slideInLeft;case"right":return z.slideInRight;case"top":return z.slideInTop;case"bottom":return z.slideInBottom;default:return z.slideInRight}return z.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return z.fadeIn;if(e==="slide in")switch(t){case"left":return z.slideInLeft;case"right":return z.slideInRight;case"top":return z.slideInTop;case"bottom":return z.slideInBottom;default:return z.slideInRight}return z.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return z.fadeOut;if(e==="slide in")switch(t){case"left":return z.slideOutLeft;case"right":return z.slideOutRight;case"top":return z.slideOutTop;case"bottom":return z.slideOutBottom;default:return z.slideOutRight}return z.fadeOut})(),a=(()=>{if(e==="fade in")return z.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return z.slideOutLeft;case"right":return z.slideOutRight;case"top":return z.slideOutTop;case"bottom":return z.slideOutBottom;default:return z.slideOutRight}return z.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:a}}const bs=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:a})=>{const[i,u]=$.useState(!1),{url:l}=e.thumbnailBlock.cover;return $.useEffect(()=>{r==="close"&&u(!1),r==="open"&&u(!0)},[r]),s.jsxs(s.Fragment,{children:[s.jsx("img",{src:l,alt:"Cover",className:z.heroImage,onClick:()=>u(!0)}),s.jsx(xs,{isOpen:i,onClose:()=>u(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:a})]})},xs=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:a,isEditor:i,metadata:u})=>{var N;const[l,m]=$.useState(0),[c,L]=$.useState(0),[S,g]=$.useState(!1),[p,d]=$.useState(!1),[x,h]=$.useState({}),y=$.useRef(null),E=$.useRef(null),D=$.useRef(null),H=$.useRef(!1),_=$.useRef(null),b=$.useRef(null),C=$.useRef(null),P=$.useRef(null),O=$.useRef(!1),R=$.useRef(null),[V,j]=$.useState(!1),{appear:B,triggers:U,slider:f,thumbnail:F,controls:k,area:I,caption:T,layout:W}=r.lightboxBlock,{appearClass:J,backdropAppearClass:ae,backdropDisappearClass:te,disappearClass:le}=vs(B.type,B.direction),M=(u==null?void 0:u.itemId)??null;$.useEffect(()=>{const v=()=>{setTimeout(()=>{var K,ee;(ee=(K=y.current)==null?void 0:K.splide)==null||ee.refresh()},16)},q=()=>{L(K=>K+1)};return window.addEventListener("ArticleEditor.Layout:change",v),window.addEventListener("ArticleEditor.ComponentContent:change",q),()=>{window.removeEventListener("ArticleEditor.Layout:change",v),window.removeEventListener("ArticleEditor.ComponentContent:change",q)}},[]),$.useEffect(()=>{if(!e||!F.isActive){j(!1);return}const v=R.current;if(!v)return;const q=()=>{f.direction==="horiz"?j(v.scrollWidth>v.clientWidth):j(v.scrollHeight>v.clientHeight)};q();const K=new ResizeObserver(q);return K.observe(v),()=>K.disconnect()},[e,F.isActive,n.length,x,f.direction]);const ne=$.useCallback(()=>{const v=window.matchMedia("(max-width: 768px)").matches,q=Co(I.color);v&&!i&&q>.9&&(document.body.style.backgroundColor=""),g(!0),H.current=!0;const K=ee=>{ee.target===_.current&&ee.animationName&&(_.current&&b.current&&_.current.removeEventListener("animationend",b.current),b.current=null,H.current&&(H.current=!1,t()),g(!1))};_.current&&(b.current=K,_.current.addEventListener("animationend",K))},[t,I.color,i]),me=(v,q,K)=>{var ee,ie;if(v){if(U.type==="click"&&U.switch==="image")U.repeat==="close"&&l===n.length-1?ne():(ee=y.current)==null||ee.go("+1");else if(U.type==="click"&&U.switch==="50/50"){const oe=v.getBoundingClientRect(),A=q-oe.left,G=K-oe.top,X=oe.width,Z=oe.height;let de;f.direction==="horiz"?de=A<X/2?"-1":"+1":de=G<Z/2?"-1":"+1",(ie=y.current)==null||ie.go(de)}}},pe=v=>{if(O.current){O.current=!1;return}const q=n[l],K=(q==null?void 0:q.image.objectFit)==="cover";let ee,ie;if("changedTouches"in v&&v.changedTouches.length>0)ee=v.changedTouches[0].clientX,ie=v.changedTouches[0].clientY;else if("clientX"in v)ee=v.clientX,ie=v.clientY;else return;let oe;if(K&&D.current){const A=So(D.current);oe=ee>=A.left&&ee<=A.right&&ie>=A.top&&ie<=A.bottom}else{const A=D.current?xo(D.current):null;if(!A){v.target===v.currentTarget&&ne();return}oe=ee>=A.x&&ee<=A.x+A.width&&ie>=A.y&&ie<=A.y+A.height}oe?me(D.current,ee,ie):ne()},he=v=>{const q=v.target;(q.classList.contains(z.thumbsWrapper)||q.classList.contains(z.thumbsContainer))&&pe(v)};$.useEffect(()=>{if(!e)return;const v=q=>{var K,ee;if(q.key==="Escape"){ne();return}if(q.key==="ArrowRight"){m(ie=>(ie+1)%Math.max(n.length,1)),(K=y.current)==null||K.go("+1");return}q.key==="ArrowLeft"&&(m(ie=>(ie-1+Math.max(n.length,1))%Math.max(n.length,1)),(ee=y.current)==null||ee.go("-1"))};return window.addEventListener("keydown",v),()=>{window.removeEventListener("keydown",v)}},[e,ne,n.length]),$.useEffect(()=>{if(e){if(m(0),L(q=>q+1),H.current=!1,g(!1),d(!1),h({}),!M)return;const v=new CustomEvent("page-overlay",{detail:{itemId:M}});window.dispatchEvent(v)}return()=>{_.current&&b.current&&(_.current.removeEventListener("animationend",b.current),b.current=null),d(!1)}},[e,M]),$.useEffect(()=>{E.current!==null&&E.current!==f.type&&L(v=>v+1),E.current=f.type},[f.type]),$.useEffect(()=>{if(!e)return;const v=document.body.style.overflow,q=window.matchMedia("(max-width: 768px)").matches,K=Co(I.color);document.body.style.overflow="hidden",d(!1);const ee=oe=>{oe.target===_.current&&!H.current&&oe.animationName&&(q&&!i&&K>.9&&(document.body.style.backgroundColor=I.color),d(!0),_.current&&C.current&&_.current.removeEventListener("animationend",C.current),C.current=null)};_.current&&(C.current=ee,_.current.addEventListener("animationend",ee));const ie=oe=>{const A=oe.target;A&&(A.closest(`.${z.thumbsWrapper}`)||A.closest(`.${z.thumbsContainer}`))||f.type!=="slide"&&oe.preventDefault()};return document.addEventListener("touchmove",ie,{passive:!1}),()=>{document.body.style.overflow=v,document.removeEventListener("touchmove",ie),_.current&&C.current&&(_.current.removeEventListener("animationend",C.current),C.current=null),d(!1)}},[e,i,I.color,f.type]),$.useEffect(()=>{if(!e)return;const v=q=>{var ee,ie;if(H.current){q.stopPropagation();return}if(O.current){O.current=!1;return}const K=q.target;if(!(K&&(K.closest(`.${z.thumbsContainer}`)||K.closest(`.${z.thumbItem}`)))){if(f.type==="slide"&&U.type==="drag"&&((ie=(ee=y.current)==null?void 0:ee.splide)!=null&&ie.root)){const oe=y.current.splide.root;if(K&&(oe.contains(K)||oe===K))return}if(q.touches.length===0&&q.changedTouches.length>0){const oe=n[l],A=(oe==null?void 0:oe.image.objectFit)==="cover",G=q.changedTouches[0];let X;if(A&&D.current){const Z=So(D.current);X=G.clientX>=Z.left&&G.clientX<=Z.right&&G.clientY>=Z.top&&G.clientY<=Z.bottom}else{const Z=D.current?xo(D.current):null;if(!Z)return;X=G.clientX>=Z.x&&G.clientX<=Z.x+Z.width&&G.clientY>=Z.y&&G.clientY<=Z.y+Z.height}if(!X){q.stopPropagation(),H.current=!0;const Z=de=>{de.stopPropagation(),de.preventDefault(),document.removeEventListener("click",Z,!0)};document.addEventListener("click",Z,!0),ne()}}}};return document.addEventListener("touchend",v,{passive:!0}),()=>{document.removeEventListener("touchend",v)}},[e,ne,l,n]);const Y=(f.type==="scale"||f.type==="fade")&&f.direction==="vert"&&U.type==="drag";$.useEffect(()=>{var de,Se;if(!e||!Y||!((Se=(de=y.current)==null?void 0:de.splide)!=null&&Se.root))return;const v=y.current.splide.root,q=30,K=(re,ue)=>{if(P.current){const $e=Math.abs(re-P.current.x),Le=Math.abs(ue-P.current.y);($e>0||Le>0)&&(O.current=!0)}},ee=re=>{P.current&&(re.preventDefault(),K(re.clientX,re.clientY))},ie=re=>{P.current&&re.touches.length>0&&(re.preventDefault(),K(re.touches[0].clientX,re.touches[0].clientY))},oe=(re,ue)=>{if(!P.current||!y.current){P.current=null;return}const $e=Math.abs(re-P.current.x),Le=Math.abs(ue-P.current.y);Le>q&&Le>$e&&y.current.go(ue<P.current.y?"+1":"-1"),P.current=null},A=re=>{P.current&&oe(re.clientX,re.clientY),document.removeEventListener("pointerup",A),document.removeEventListener("pointercancel",A),document.removeEventListener("pointermove",ee)},G=re=>{if(P.current){if(re.changedTouches.length>0){const ue=re.changedTouches[0];oe(ue.clientX,ue.clientY)}document.removeEventListener("touchend",G),document.removeEventListener("touchcancel",G),document.removeEventListener("touchmove",ie)}},X=re=>{P.current={x:re.clientX,y:re.clientY},O.current=!1,document.addEventListener("pointermove",ee,{passive:!1}),document.addEventListener("pointerup",A),document.addEventListener("pointercancel",A)},Z=re=>{re.touches.length>0&&(P.current={x:re.touches[0].clientX,y:re.touches[0].clientY},O.current=!1,document.addEventListener("touchmove",ie,{passive:!1}),document.addEventListener("touchend",G),document.addEventListener("touchcancel",G))};return v.addEventListener("pointerdown",X),v.addEventListener("touchstart",Z),()=>{v.removeEventListener("pointerdown",X),v.removeEventListener("touchstart",Z),document.removeEventListener("pointermove",ee),document.removeEventListener("pointerup",A),document.removeEventListener("pointercancel",A),document.removeEventListener("touchmove",ie),document.removeEventListener("touchend",G),document.removeEventListener("touchcancel",G),P.current=null,O.current=!1}},[e,Y,c]);const ce={backgroundColor:I.color,backdropFilter:`blur(${I.blur}px)`,animationDuration:`${parseInt(B.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:yr.createPortal(s.jsxs(s.Fragment,{children:[s.jsx("div",{ref:i?null:_,className:ge(z.background,S?te:ae,{[z.editor]:i},{[z.hidden]:!e}),style:{...ce,...p&&!i&&!S?{position:"absolute"}:{}}}),s.jsxs("div",{ref:i?_:null,className:ge(z.contentStyle,S?le:J,{[z.editor]:i},{[z.hidden]:!e}),style:{animationDuration:`${parseInt(B.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[s.jsx(cr,{onMove:v=>m(v.index),ref:y,className:z.lightboxSplide,options:{arrows:!1,speed:f.duration?parseInt(f.duration):500,direction:f.direction==="horiz"||f.type==="fade"||f.type==="scale"?"ltr":"ttb",pagination:!1,drag:U.type==="drag"&&!Y,perPage:1,width:"100%",height:"100%",type:f.type==="fade"||f.type==="scale"?"fade":"loop",padding:0,rewind:U.repeat!=="close",start:0},style:{"--splide-speed":f.duration},children:n.map((v,q)=>{const K=qt(W.position,W.offset,i),ee=`${w.scalingValue(W.padding.top,i)} ${w.scalingValue(W.padding.right,i)} ${w.scalingValue(W.padding.bottom,i)} ${w.scalingValue(W.padding.left,i)}`,ie=f.type==="scale"?(()=>{const{transform:oe,...A}=K;return{...A,position:"absolute",padding:ee,boxSizing:"border-box","--position-transform":oe||"none"}})():{...K,position:"absolute",padding:ee,boxSizing:"border-box"};return s.jsx(ur,{children:s.jsx("div",{className:z.imgWrapper,onClick:pe,children:s.jsx("img",{ref:q===l?D:null,className:ge(z.imageStyle,{[z.contain]:v.image.objectFit==="contain",[z.cover]:v.image.objectFit==="cover",[z.scaleSlide]:f.type==="scale"}),src:v.image.url,alt:v.image.name??"",style:{...ie,pointerEvents:v.image.objectFit==="contain"?"none":"auto"}})})},q)})},c),k.isActive&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:ge(z.arrow,{[z.arrowVertical]:f.direction==="vert"}),style:{color:k.color,"--arrow-hover-color":k.hover},children:s.jsxs("button",{className:z.arrowInner,style:{transform:`translate(${w.scalingValue(k.offset.x,i)}, ${w.scalingValue(k.offset.y*(f.direction==="horiz"?1:-1),i)}) scale(${k.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var v;return(v=y.current)==null?void 0:v.go("-1")},"aria-label":"Previous",children:[k.arrowsImgUrl&&s.jsx(Xe,{url:k.arrowsImgUrl,fill:k.color,hoverFill:k.hover,className:ge(z.arrowImg,z.mirror)}),!k.arrowsImgUrl&&s.jsx($o,{color:k.color,className:ge(z.arrowIcon,z.arrowImg,z.mirror)})]})}),s.jsx("div",{className:ge(z.arrow,z.nextArrow,{[z.arrowVertical]:f.direction==="vert"}),style:{color:k.color,"--arrow-hover-color":k.hover},children:s.jsxs("button",{className:z.arrowInner,style:{transform:`translate(${w.scalingValue(k.offset.x*(f.direction==="horiz"?-1:1),i)}, ${w.scalingValue(k.offset.y,i)}) scale(${k.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var v;return(v=y.current)==null?void 0:v.go("+1")},"aria-label":"Next",children:[k.arrowsImgUrl&&s.jsx(Xe,{url:k.arrowsImgUrl,fill:k.color,hoverFill:k.hover,className:z.arrowImg}),!k.arrowsImgUrl&&s.jsx($o,{color:k.color,className:ge(z.arrowIcon,z.arrowImg)})]})})]}),I.closeIconUrl&&(()=>{const v=qt(I.closeIconAlign,I.closeIconOffset,i),q=`scale(${I.closeIconScale})`,K=v.transform?`${v.transform} ${q}`:q;return s.jsx("button",{className:z.closeButton,style:{...v,transform:K},onClick:ne,"aria-label":"Close lightbox",children:s.jsx(Xe,{url:I.closeIconUrl,fill:I.closeIconColor??"#000000",hoverFill:I.closeIconHover??"#cccccc"})})})(),T&&T.isActive&&o.imageCaption&&((N=n[l])==null?void 0:N.imageCaption)&&(()=>{const{widthSettings:v,fontSettings:q,letterSpacing:K,textAlign:ee,wordSpacing:ie,fontSizeLineHeight:oe,textAppearance:A,color:G}=o.imageCaption;return s.jsx("div",{className:z.caption,style:{...qt(T.alignment,T.offset,i),fontFamily:q.fontFamily,fontWeight:q.fontWeight,fontStyle:q.fontStyle,width:v.sizing==="auto"?"max-content":w.scalingValue(v.width,i),letterSpacing:w.scalingValue(K,i),wordSpacing:w.scalingValue(ie,i),textAlign:ee,fontSize:w.scalingValue(oe.fontSize,i),lineHeight:w.scalingValue(oe.lineHeight,i),textTransform:A.textTransform??"none",textDecoration:A.textDecoration??"none",fontVariant:A.fontVariant??"normal",color:G},onClick:X=>X.stopPropagation(),children:s.jsx("div",{"data-styles":"imageCaption",className:z.captionTextInner,style:{"--link-color":T.linkColor,"--link-hover-color":T.linkHoverColor},children:s.jsx(Pt,{content:n[l].imageCaption})})})})(),F.isActive&&(()=>{const[v,q]=F.position.split("-"),K=f.direction==="horiz"?`${v}-left`:F.position,ee=qt(K,F.offset,i),ie=()=>{if(f.direction==="horiz"){if(q==="left")return"flex-start";if(q==="center")return"center";if(q==="right")return"flex-end"}else{if(v==="top")return"flex-start";if(v==="middle")return"center";if(v==="bottom")return"flex-end"}return"flex-start"};return s.jsx("div",{ref:R,className:z.thumbsWrapper,onClick:oe=>he(oe),style:{position:i?"absolute":"fixed",...ee,...f.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:s.jsx("div",{className:ge(z.thumbsContainer,{[z.thumbsContainerVertical]:f.direction==="vert",[z.thumbsAlignStart]:F.align==="start",[z.thumbsAlignCenter]:F.align==="center",[z.thumbsAlignEnd]:F.align==="end"}),style:{gap:w.scalingValue(F.grid.gap,i),justifyContent:V?"flex-start":ie()},children:n.map((oe,A)=>{const G=A===l,X=x[A],de=F.grid.size*(G?F.activeState.scale:1),Se=()=>{if(F.fit!=="fit")return{};if(!X)return f.direction==="horiz"?{height:w.scalingValue(de,i)}:{width:w.scalingValue(de,i)};const re=X.width/X.height;if(f.direction==="horiz"){const ue=de,$e=ue*re;return{width:w.scalingValue($e,i),height:w.scalingValue(ue,i)}}else{const ue=de,$e=ue/re;return{width:w.scalingValue(ue,i),height:w.scalingValue($e,i)}}};return s.jsx("button",{className:z.thumbItem,style:{...f.direction==="horiz"&&F.fit!=="fit"?{height:w.scalingValue(de,i)}:{},...f.direction==="vert"&&F.fit!=="fit"?{width:w.scalingValue(de,i)}:{},...F.fit==="cover"?{width:w.scalingValue(de,i),height:w.scalingValue(de,i)}:{},...Se(),transition:G?"all 0.25s ease-out":"none",opacity:G?F.activeState.opacity/100:F.opacity/100,"--thumb-hover":F.activeState.opacity/100},onClick:re=>{var ue;re.stopPropagation(),m(A),(ue=y.current)==null||ue.go(A)},onMouseEnter:()=>{var re;F.triggers==="hov"&&((re=y.current)==null||re.go(A))},children:s.jsx("img",{src:oe.image.url,alt:oe.image.name??"",onLoad:re=>{const ue=re.currentTarget;ue.naturalWidth&&ue.naturalHeight&&h($e=>({...$e,[A]:{width:ue.naturalWidth,height:ue.naturalHeight}}))},style:{objectFit:F.fit==="cover"?"cover":"contain",...F.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...F.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${oe.image.name}-${A}`)})})})})()]})]}),document.getElementById(a))};function $o({color:e,className:t}){return s.jsx("svg",{viewBox:"0 0 10 18",className:t,children:s.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:s.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 Ss={element:bs,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},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 gt(e){const{color:t,...n}=e;return n}function Re(e,t){var n,o,r;return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:w.scalingValue(e.letterSpacing,t),wordSpacing:w.scalingValue(e.wordSpacing,t),fontSize:w.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?w.scalingValue(e.lineHeight,t):void 0,textTransform:(n=e.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=e.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=e.textAppearance)==null?void 0:r.fontVariant,color:e.color}}function Ut(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cs(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${qt(48)};
11
+ min-height: ${Ut(48)};
12
12
  }
13
13
  .${e}-wrapper.${e}-type-C .${e}-input:focus-visible,
14
14
  .${e}-wrapper.${e}-type-C .${e}-button:focus-visible {
@@ -32,7 +32,7 @@
32
32
  min-width: 0;
33
33
  }
34
34
  .${e}-field-group.${e}-labeled {
35
- gap: ${qt(4)};
35
+ gap: ${Ut(4)};
36
36
  }
37
37
  .${e}-field-label {
38
38
  white-space: nowrap;
@@ -128,18 +128,18 @@
128
128
  outline: none;
129
129
  }
130
130
  .${e}-success {
131
- margin-top: ${qt(8)};
131
+ margin-top: ${Ut(8)};
132
132
  color: var(--${e}-success-success-color, var(--${e}-success-color));
133
133
  }
134
134
  .${e}-error {
135
- margin-top: ${qt(8)};
135
+ margin-top: ${Ut(8)};
136
136
  color: var(--${e}-error-error-color, var(--${e}-error-color));
137
137
  }
138
138
  .${e}-overlay-anchor {
139
139
  position: relative;
140
140
  height: auto;
141
141
  }
142
- `}function $l({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=$.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:u=[],buttonLabel:s,gap:g,fieldsGap:c,buttonCorners:A,buttonStroke:x,buttonPadding:f,isButtonFullWidth:p,inputCorners:d,inputStroke:S,inputPadding:y,inputColor:v,inputTextColor:_,inputBorderColor:D,placeholderColor:V,buttonColor:T,buttonTextColor:m,buttonBorderColor:k,labelTextColor:R,successColor:O,errorColor:F,fontFamily:H,inputFontSettings:M,inputFontSize:X,inputLineHeight:G,inputLetterSpacing:h,inputWordSpacing:E,inputTextAppearance:I,buttonFontSettings:L,buttonFontSize:w,buttonLineHeight:N,buttonLetterSpacing:K,buttonWordSpacing:ie,buttonTextAppearance:ne,labelFontSettings:ce,labelFontSize:P,labelLineHeight:Q,labelLetterSpacing:de,labelWordSpacing:pe,labelTextAppearance:Y,statusFontSettings:ae,statusFontSize:fe,statusLineHeight:j,statusLetterSpacing:b,statusWordSpacing:U,statusTextAppearance:Z,successMessage:te,errorMessage:re,stateOverrides:W}=e,z=a==="B",q=u.slice(0,Math.min(i,u.length)),ee={fontSettings:{fontFamily:H,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:X??.01,lineHeight:G,letterSpacing:h??0,wordSpacing:E??0,textAppearance:I,color:_},oe=mt(Re(ee,t)),ue=$.scalingValue(S??0,t),Te=$.scalingValue((G??X??.01)+((y==null?void 0:y.top)??0)+((y==null?void 0:y.bottom)??0)+(a==="C"?S??0:(S??0)*2),t),se={...oe,borderStyle:"solid",borderRadius:a==="C"?0:$.scalingValue(d??0,t),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ue,borderLeftWidth:0}:{borderWidth:ue},paddingTop:$.scalingValue((y==null?void 0:y.top)??0,t),paddingRight:$.scalingValue((y==null?void 0:y.right)??0,t),paddingBottom:$.scalingValue((y==null?void 0:y.bottom)??0,t),paddingLeft:$.scalingValue((y==null?void 0:y.left)??0,t),height:Te,minHeight:Te},he={fontSettings:{fontFamily:H,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:w??.01,lineHeight:N,letterSpacing:K??0,wordSpacing:ie??0,textAppearance:ne,color:m},we=mt(Re(he,t)),Ge=$.scalingValue(x??0,t),hn={fontSettings:{fontFamily:H,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:P??.01,lineHeight:Q,letterSpacing:de??0,wordSpacing:pe??0,textAppearance:Y,color:R},St=Re(hn,t),be={fontSettings:{fontFamily:H,fontWeight:(ae==null?void 0:ae.fontWeight)??400,fontStyle:(ae==null?void 0:ae.fontStyle)??"normal"},fontSize:fe??.01,lineHeight:j,letterSpacing:b??0,wordSpacing:U??0,textAppearance:Z,color:O},Pe=mt(Re(be,t)),tt=$.buildColorVars(r,{inputColor:v,inputTextColor:_,inputBorderColor:D,placeholderColor:V!=null&&V.trim()?V:"#cccccc",buttonColor:T,buttonTextColor:m,buttonBorderColor:k,labelTextColor:R,successColor:O,errorColor:F},wl,Tl,W),[Se,He]=C.useState(()=>Object.fromEntries(q.map(me=>[me.name,""]))),[Qn,Ct]=C.useState("idle"),[dr,zt]=C.useState(null),yn=o==="success"?"success":o==="error"?"error":Qn,gr=o==="error"?re:dr,Bt=o==="filled",$t=C.useMemo(()=>{if(!Bt)return Se;let me=null;for(const Ve of q)(Se[Ve.name]??"").trim().length>0||(me=me??{...Se},me[Ve.name]="Filled");return me??Se},[Se,Bt,q]),mr=yn==="error"?$.getFormFieldValidationError(q,$t):null,fr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),eo=n==null?void 0:n.submitUrl,to=(me,Ve)=>{He(je=>({...je,[me]:Ve}))},hr=async me=>{me.preventDefault();const Ve=Object.fromEntries(q.map(Le=>{var lt;return[Le.name,((lt=Se[Le.name])==null?void 0:lt.trim())??""]}).filter(([,Le])=>Le));if(!eo){Ct("error"),zt("No integrations were found for this form.");return}if(Object.keys(Ve).length===0)return;const je=$.getFormFieldValidationError(q,Se);if(je){Ct("error"),zt(je);return}Ct("submitting"),zt(null);try{const Le=await fetch(eo,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ve)});if(!Le.ok){const lt=await Le.text();throw new Error(lt||`Request failed: ${Le.status}`)}Ct("success"),He(Object.fromEntries(q.map(lt=>[lt.name,""])))}catch(Le){Ct("error"),zt(Le instanceof Error?Le.message:"Something went wrong")}};return l.jsxs("div",{className:`${r}-wrapper ${r}-type-${a} ${fr}`.trim(),style:tt,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Cl(r)}}),l.jsxs("form",{onSubmit:hr,className:`${r}-form`,style:{gap:$.scalingValue(g??0,t)},children:[l.jsx("div",{className:`${r}-fields`,style:{gap:$.scalingValue(c??0,t)},children:q.map((me,Ve)=>l.jsxs("div",{className:`${r}-field-group${z?` ${r}-labeled`:""}`,children:[z&&l.jsx("span",{className:`${r}-field-label`,style:St?{...St,lineHeight:St.fontSize}:void 0,children:me.label||me.name}),me.type==="textarea"?l.jsx("textarea",{name:me.name,autoComplete:"off",value:$t[me.name]??"",onChange:je=>to(me.name,je.target.value),placeholder:me.placeholder,className:`${r}-input`,style:se,rows:1,"data-filled":Bt||($t[me.name]??"").trim().length>0,"data-field-type":"textarea"}):l.jsx("input",{type:me.type==="phone"?"tel":me.type==="email"?"email":"text",name:me.name,autoComplete:"off",value:$t[me.name]??"",onChange:je=>to(me.name,je.target.value),placeholder:me.placeholder,required:me.isRequired??me.type==="email",className:`${r}-input`,style:se,"data-filled":Bt||($t[me.name]??"").trim().length>0})]},Ve))}),l.jsx("div",{className:`${r}-overlay-anchor`,children:l.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:$.scalingValue(A??0,t),borderWidth:Ge,paddingTop:$.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:$.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:$.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:$.scalingValue((f==null?void 0:f.left)??0,t),...we,...p?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:l.jsx("span",{className:`${r}-overlay-anchor`,style:p?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Qn==="submitting"?"...":s})})})]}),yn==="success"&&l.jsx("p",{className:`${r}-success`,style:{...Pe},children:te}),yn==="error"&&l.jsx("p",{className:`${r}-error`,style:{...Pe},role:"alert",children:mr??gr??re})]})}const wl={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"},Tl=["hover","focus","filled","success","error"],_l=`import React, { useMemo, useState } from 'react';
142
+ `}function $s({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=w.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:u=[],buttonLabel:l,gap:m,fieldsGap:c,buttonCorners:L,buttonStroke:S,buttonPadding:g,isButtonFullWidth:p,inputCorners:d,inputStroke:x,inputPadding:h,inputColor:y,inputTextColor:E,inputBorderColor:D,placeholderColor:H,buttonColor:_,buttonTextColor:b,buttonBorderColor:C,labelTextColor:P,successColor:O,errorColor:R,fontFamily:V,inputFontSettings:j,inputFontSize:B,inputLineHeight:U,inputLetterSpacing:f,inputWordSpacing:F,inputTextAppearance:k,buttonFontSettings:I,buttonFontSize:T,buttonLineHeight:W,buttonLetterSpacing:J,buttonWordSpacing:ae,buttonTextAppearance:te,labelFontSettings:le,labelFontSize:M,labelLineHeight:ne,labelLetterSpacing:me,labelWordSpacing:pe,labelTextAppearance:he,statusFontSettings:Y,statusFontSize:ce,statusLineHeight:N,statusLetterSpacing:v,statusWordSpacing:q,statusTextAppearance:K,successMessage:ee,errorMessage:ie,stateOverrides:oe}=e,A=a==="B",G=u.slice(0,Math.min(i,u.length)),X={fontSettings:{fontFamily:V,fontWeight:(j==null?void 0:j.fontWeight)??400,fontStyle:(j==null?void 0:j.fontStyle)??"normal"},fontSize:B??.01,lineHeight:U,letterSpacing:f??0,wordSpacing:F??0,textAppearance:k,color:E},Z=gt(Re(X,t)),de=w.scalingValue(x??0,t),Se=w.scalingValue((U??B??.01)+((h==null?void 0:h.top)??0)+((h==null?void 0:h.bottom)??0)+(a==="C"?x??0:(x??0)*2),t),re={...Z,borderStyle:"solid",borderRadius:a==="C"?0:w.scalingValue(d??0,t),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:de,borderLeftWidth:0}:{borderWidth:de},paddingTop:w.scalingValue((h==null?void 0:h.top)??0,t),paddingRight:w.scalingValue((h==null?void 0:h.right)??0,t),paddingBottom:w.scalingValue((h==null?void 0:h.bottom)??0,t),paddingLeft:w.scalingValue((h==null?void 0:h.left)??0,t),height:Se,minHeight:Se},ue={fontSettings:{fontFamily:V,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:T??.01,lineHeight:W,letterSpacing:J??0,wordSpacing:ae??0,textAppearance:te,color:b},$e=gt(Re(ue,t)),Le=w.scalingValue(S??0,t),hn={fontSettings:{fontFamily:V,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:M??.01,lineHeight:ne,letterSpacing:me??0,wordSpacing:pe??0,textAppearance:he,color:P},St=Re(hn,t),be={fontSettings:{fontFamily:V,fontWeight:(Y==null?void 0:Y.fontWeight)??400,fontStyle:(Y==null?void 0:Y.fontStyle)??"normal"},fontSize:ce??.01,lineHeight:N,letterSpacing:v??0,wordSpacing:q??0,textAppearance:K,color:O},Me=gt(Re(be,t)),tt=w.buildColorVars(r,{inputColor:y,inputTextColor:E,inputBorderColor:D,placeholderColor:H!=null&&H.trim()?H:"#cccccc",buttonColor:_,buttonTextColor:b,buttonBorderColor:C,labelTextColor:P,successColor:O,errorColor:R},ws,Ts,oe),[Ce,He]=$.useState(()=>Object.fromEntries(G.map(fe=>[fe.name,""]))),[Qn,Ct]=$.useState("idle"),[dr,zt]=$.useState(null),yn=o==="success"?"success":o==="error"?"error":Qn,mr=o==="error"?ie:dr,Bt=o==="filled",$t=$.useMemo(()=>{if(!Bt)return Ce;let fe=null;for(const je of G)(Ce[je.name]??"").trim().length>0||(fe=fe??{...Ce},fe[je.name]="Filled");return fe??Ce},[Ce,Bt,G]),gr=yn==="error"?w.getFormFieldValidationError(G,$t):null,fr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),eo=n==null?void 0:n.submitUrl,to=(fe,je)=>{He(Oe=>({...Oe,[fe]:je}))},hr=async fe=>{fe.preventDefault();const je=Object.fromEntries(G.map(Ie=>{var st;return[Ie.name,((st=Ce[Ie.name])==null?void 0:st.trim())??""]}).filter(([,Ie])=>Ie));if(!eo){Ct("error"),zt("No integrations were found for this form.");return}if(Object.keys(je).length===0)return;const Oe=w.getFormFieldValidationError(G,Ce);if(Oe){Ct("error"),zt(Oe);return}Ct("submitting"),zt(null);try{const Ie=await fetch(eo,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(je)});if(!Ie.ok){const st=await Ie.text();throw new Error(st||`Request failed: ${Ie.status}`)}Ct("success"),He(Object.fromEntries(G.map(st=>[st.name,""])))}catch(Ie){Ct("error"),zt(Ie instanceof Error?Ie.message:"Something went wrong")}};return s.jsxs("div",{className:`${r}-wrapper ${r}-type-${a} ${fr}`.trim(),style:tt,children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:Cs(r)}}),s.jsxs("form",{onSubmit:hr,className:`${r}-form`,style:{gap:w.scalingValue(m??0,t)},children:[s.jsx("div",{className:`${r}-fields`,style:{gap:w.scalingValue(c??0,t)},children:G.map((fe,je)=>s.jsxs("div",{className:`${r}-field-group${A?` ${r}-labeled`:""}`,children:[A&&s.jsx("span",{className:`${r}-field-label`,style:St?{...St,lineHeight:St.fontSize}:void 0,children:fe.label||fe.name}),fe.type==="textarea"?s.jsx("textarea",{name:fe.name,autoComplete:"off",value:$t[fe.name]??"",onChange:Oe=>to(fe.name,Oe.target.value),placeholder:fe.placeholder,className:`${r}-input`,style:re,rows:1,"data-filled":Bt||($t[fe.name]??"").trim().length>0,"data-field-type":"textarea"}):s.jsx("input",{type:fe.type==="phone"?"tel":fe.type==="email"?"email":"text",name:fe.name,autoComplete:"off",value:$t[fe.name]??"",onChange:Oe=>to(fe.name,Oe.target.value),placeholder:fe.placeholder,required:fe.isRequired??fe.type==="email",className:`${r}-input`,style:re,"data-filled":Bt||($t[fe.name]??"").trim().length>0})]},je))}),s.jsx("div",{className:`${r}-overlay-anchor`,children:s.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:w.scalingValue(L??0,t),borderWidth:Le,paddingTop:w.scalingValue((g==null?void 0:g.top)??0,t),paddingRight:w.scalingValue((g==null?void 0:g.right)??0,t),paddingBottom:w.scalingValue((g==null?void 0:g.bottom)??0,t),paddingLeft:w.scalingValue((g==null?void 0:g.left)??0,t),...$e,...p?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:s.jsx("span",{className:`${r}-overlay-anchor`,style:p?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Qn==="submitting"?"...":l})})})]}),yn==="success"&&s.jsx("p",{className:`${r}-success`,style:{...Me},children:ee}),yn==="error"&&s.jsx("p",{className:`${r}-error`,style:{...Me},role:"alert",children:gr??mr??ie})]})}const ws={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"},Ts=["hover","focus","filled","success","error"],_s=`import React, { useMemo, useState } from 'react';
143
143
  import { CommonComponentProps } from '../props';
144
144
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
145
145
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -740,7 +740,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
740
740
  };
741
741
 
742
742
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
743
- `,Al=[{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."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Gt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},El=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Ll={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","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"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Button Stroke",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},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"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Gt.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},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:{...Gt.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},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"}},labelFontSettings:{...Gt.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Gt.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:{fieldsToShow:2,fields:Al,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",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:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{type:"group",title:"",items:["fieldsGap","inputStroke","inputCorners"]},{type:"group",title:"",items:["inputPadding"]}]},{type:"group",title:"Button",items:[{type:"row",items:["isButtonFullWidth"]},{type:"row",items:[{type:"group",title:"",items:["gap","buttonStroke","buttonCorners"]},{type:"group",title:"",items:["buttonPadding"]}]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["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:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...El],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Il={element:$l,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.jpg"},defaultSize:{width:300,height:42},schema:Ll,sourceCode:_l};function Yt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function kl(e){return`
743
+ `,Es=[{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."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Gt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},As=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Ls={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","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"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Button Stroke",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},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"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Gt.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},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:{...Gt.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},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"}},labelFontSettings:{...Gt.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Gt.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:{fieldsToShow:2,fields:Es,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",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:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{type:"group",title:"",items:["fieldsGap","inputStroke","inputCorners"]},{type:"group",title:"",items:["inputPadding"]}]},{type:"group",title:"Button",items:[{type:"row",items:["isButtonFullWidth"]},{type:"row",items:[{type:"group",title:"",items:["gap","buttonStroke","buttonCorners"]},{type:"group",title:"",items:["buttonPadding"]}]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["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:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...As],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Is={element:$s,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.jpg"},defaultSize:{width:300,height:42},schema:Ls,sourceCode:_s};function Yt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ks(e){return`
744
744
  .${e}-wrapper {
745
745
  display: flex;
746
746
  flex-direction: column;
@@ -931,7 +931,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
931
931
  font-size: ${Yt(14)};
932
932
  color: var(--${e}-error-error-color, var(--${e}-error-color));
933
933
  }
934
- `}const Fl=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=$.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:u,fieldsToShow:s=1,fontFamily:g,inputFontSettings:c,inputFontSize:A,inputLineHeight:x,inputLetterSpacing:f,inputWordSpacing:p,inputTextAppearance:d,buttonFontSettings:S,buttonFontSize:y,buttonLineHeight:v,buttonLetterSpacing:_,buttonWordSpacing:D,buttonTextAppearance:V,statusFontSettings:T,statusFontSize:m,statusLineHeight:k,statusLetterSpacing:R,statusWordSpacing:O,statusTextAppearance:F,iconMaxWidth:H,minHeight:M,corners:X,stroke:G,stateOverrides:h,inputPadding:E,buttonPadding:I,successMessage:L="Thanks for subscribing!",errorMessage:w="Please, fill all required fields."}=e,N=a.slice(0,Math.min(s,a.length)),[K,ie]=C.useState(()=>Object.fromEntries(N.map(be=>[be.name,""]))),[ne,ce]=C.useState("idle"),[P,Q]=C.useState(null),de=o==="success"?"success":o==="error"?"error":ne,pe=o==="error"?w:P,Y=o==="filled",ae=C.useMemo(()=>{if(!Y)return K;let be=null;for(const Pe of N)(K[Pe.name]??"").trim().length>0||(be=be??{...K},be[Pe.name]="Filled");return be??K},[Y,K,N]),fe=de==="error"?$.getFormFieldValidationError(N,ae):null,j=o&&o!=="default"?`${r}-state-${o}`:"",b=N.some(be=>(ae[be.name]??"").trim().length>0),U=j!==`${r}-state-filled`&&b?`${r}-state-filled`:"",Z=`${j} ${U}`.trim(),te=n==null?void 0:n.submitUrl,re=u??"",W=(i==null?void 0:i.icon)??"",z=(i==null?void 0:i.mode)==="On",q=re||"Submit",ee={fontSettings:{fontFamily:g,fontWeight:(c==null?void 0:c.fontWeight)??400,fontStyle:(c==null?void 0:c.fontStyle)??"normal"},fontSize:A??.01,lineHeight:x,letterSpacing:f??0,wordSpacing:p??0,textAppearance:d,color:e.inputTextColor??"#111111"},oe={fontSettings:{fontFamily:g,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:y??.01,lineHeight:v,letterSpacing:_??0,wordSpacing:D??0,textAppearance:V,color:e.buttonTextColor??"#ffffff"},ue={fontSettings:{fontFamily:g,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:m??.01,lineHeight:k,letterSpacing:R??0,wordSpacing:O??0,textAppearance:F,color:e.successColor??"#22c55e"},Te=mt(Re(ee,t)),se=mt(Re(oe,t)),he=mt(Re(ue,t)),we=$.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(ee==null?void 0:ee.color)??"#111111",buttonTextColor:e.buttonTextColor??(oe==null?void 0:oe.color)??"#ffffff"},Pl,Rl,h),Ge={borderRadius:$.scalingValue(X,t),borderWidth:$.scalingValue(G,t),borderStyle:"solid"},hn={borderLeftWidth:$.scalingValue(G,t)},St=async be=>{be.preventDefault();const Pe=Object.fromEntries(N.map(Se=>{var He;return[Se.name,((He=K[Se.name])==null?void 0:He.trim())??""]}).filter(([,Se])=>Se));if(!te){ce("error"),Q("No integrations were found for this form.");return}if(Object.keys(Pe).length===0)return;const tt=$.getFormFieldValidationError(N,K);if(tt){ce("error"),Q(tt);return}ce("submitting"),Q(null);try{const Se=await fetch(te,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Pe)});if(!Se.ok){const He=await Se.text();throw new Error(He||`Request failed: ${Se.status}`)}ce("success"),ie(Object.fromEntries(N.map(He=>[He.name,""])))}catch(Se){ce("error"),Q(Se instanceof Error?Se.message:"Something went wrong")}};return l.jsxs("div",{className:`${r}-wrapper ${Z}`.trim(),style:we,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:kl(r)}}),l.jsxs("form",{onSubmit:St,className:`${r}-form`,style:{...Ge,height:$.scalingValue(M,t),minHeight:$.scalingValue(M,t)},children:[l.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:N.map(be=>l.jsx("input",{type:be.type==="email"?"email":be.type==="phone"?"tel":"text",name:be.name,autoComplete:"off",value:ae[be.name]??"",onChange:Pe=>ie(tt=>({...tt,[be.name]:Pe.target.value})),placeholder:be.placeholder,required:be.isRequired??be.type==="email",className:`${r}-input`,style:{...Te,paddingRight:$.scalingValue(E.right,t),paddingLeft:$.scalingValue(E.left,t),paddingTop:$.scalingValue(E.top,t),paddingBottom:$.scalingValue(E.bottom,t)}},be.name))}),l.jsx("div",{className:`${r}-overlayAnchor`,children:l.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":q,style:{...se,...hn,paddingRight:$.scalingValue(I.right,t),paddingLeft:$.scalingValue(I.left,t),paddingTop:$.scalingValue(I.top,t),paddingBottom:$.scalingValue(I.bottom,t)},children:ne==="submitting"?"...":z?W&&l.jsx(Xe,{url:W,className:`${r}-submitBtnIcon`,style:{maxWidth:$.scalingValue(H??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):re})})]}),de==="success"&&l.jsx("p",{className:`${r}-success`,style:{...he},children:L}),de==="error"&&l.jsx("p",{className:`${r}-error`,style:{...he},role:"alert",children:fe??pe??w})]})},Pl={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"},Rl=["hover","focus","filled","success","error"],Ml=`import React, { useMemo, useState } from 'react';
934
+ `}const Fs=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=w.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:u,fieldsToShow:l=1,fontFamily:m,inputFontSettings:c,inputFontSize:L,inputLineHeight:S,inputLetterSpacing:g,inputWordSpacing:p,inputTextAppearance:d,buttonFontSettings:x,buttonFontSize:h,buttonLineHeight:y,buttonLetterSpacing:E,buttonWordSpacing:D,buttonTextAppearance:H,statusFontSettings:_,statusFontSize:b,statusLineHeight:C,statusLetterSpacing:P,statusWordSpacing:O,statusTextAppearance:R,iconMaxWidth:V,minHeight:j,corners:B,stroke:U,stateOverrides:f,inputPadding:F,buttonPadding:k,successMessage:I="Thanks for subscribing!",errorMessage:T="Please, fill all required fields."}=e,W=a.slice(0,Math.min(l,a.length)),[J,ae]=$.useState(()=>Object.fromEntries(W.map(be=>[be.name,""]))),[te,le]=$.useState("idle"),[M,ne]=$.useState(null),me=o==="success"?"success":o==="error"?"error":te,pe=o==="error"?T:M,he=o==="filled",Y=$.useMemo(()=>{if(!he)return J;let be=null;for(const Me of W)(J[Me.name]??"").trim().length>0||(be=be??{...J},be[Me.name]="Filled");return be??J},[he,J,W]),ce=me==="error"?w.getFormFieldValidationError(W,Y):null,N=o&&o!=="default"?`${r}-state-${o}`:"",v=W.some(be=>(Y[be.name]??"").trim().length>0),q=N!==`${r}-state-filled`&&v?`${r}-state-filled`:"",K=`${N} ${q}`.trim(),ee=n==null?void 0:n.submitUrl,ie=u??"",oe=(i==null?void 0:i.icon)??"",A=(i==null?void 0:i.mode)==="On",G=ie||"Submit",X={fontSettings:{fontFamily:m,fontWeight:(c==null?void 0:c.fontWeight)??400,fontStyle:(c==null?void 0:c.fontStyle)??"normal"},fontSize:L??.01,lineHeight:S,letterSpacing:g??0,wordSpacing:p??0,textAppearance:d,color:e.inputTextColor??"#111111"},Z={fontSettings:{fontFamily:m,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:h??.01,lineHeight:y,letterSpacing:E??0,wordSpacing:D??0,textAppearance:H,color:e.buttonTextColor??"#ffffff"},de={fontSettings:{fontFamily:m,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:b??.01,lineHeight:C,letterSpacing:P??0,wordSpacing:O??0,textAppearance:R,color:e.successColor??"#22c55e"},Se=gt(Re(X,t)),re=gt(Re(Z,t)),ue=gt(Re(de,t)),$e=w.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(X==null?void 0:X.color)??"#111111",buttonTextColor:e.buttonTextColor??(Z==null?void 0:Z.color)??"#ffffff"},Ps,Ms,f),Le={borderRadius:w.scalingValue(B,t),borderWidth:w.scalingValue(U,t),borderStyle:"solid"},hn={borderLeftWidth:w.scalingValue(U,t)},St=async be=>{be.preventDefault();const Me=Object.fromEntries(W.map(Ce=>{var He;return[Ce.name,((He=J[Ce.name])==null?void 0:He.trim())??""]}).filter(([,Ce])=>Ce));if(!ee){le("error"),ne("No integrations were found for this form.");return}if(Object.keys(Me).length===0)return;const tt=w.getFormFieldValidationError(W,J);if(tt){le("error"),ne(tt);return}le("submitting"),ne(null);try{const Ce=await fetch(ee,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Me)});if(!Ce.ok){const He=await Ce.text();throw new Error(He||`Request failed: ${Ce.status}`)}le("success"),ae(Object.fromEntries(W.map(He=>[He.name,""])))}catch(Ce){le("error"),ne(Ce instanceof Error?Ce.message:"Something went wrong")}};return s.jsxs("div",{className:`${r}-wrapper ${K}`.trim(),style:$e,children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:ks(r)}}),s.jsxs("form",{onSubmit:St,className:`${r}-form`,style:{...Le,height:w.scalingValue(j,t),minHeight:w.scalingValue(j,t)},children:[s.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:W.map(be=>s.jsx("input",{type:be.type==="email"?"email":be.type==="phone"?"tel":"text",name:be.name,autoComplete:"off",value:Y[be.name]??"",onChange:Me=>ae(tt=>({...tt,[be.name]:Me.target.value})),placeholder:be.placeholder,required:be.isRequired??be.type==="email",className:`${r}-input`,style:{...Se,paddingRight:w.scalingValue(F.right,t),paddingLeft:w.scalingValue(F.left,t),paddingTop:w.scalingValue(F.top,t),paddingBottom:w.scalingValue(F.bottom,t)}},be.name))}),s.jsx("div",{className:`${r}-overlayAnchor`,children:s.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":G,style:{...re,...hn,paddingRight:w.scalingValue(k.right,t),paddingLeft:w.scalingValue(k.left,t),paddingTop:w.scalingValue(k.top,t),paddingBottom:w.scalingValue(k.bottom,t)},children:te==="submitting"?"...":A?oe&&s.jsx(Xe,{url:oe,className:`${r}-submitBtnIcon`,style:{maxWidth:w.scalingValue(V??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):ie})})]}),me==="success"&&s.jsx("p",{className:`${r}-success`,style:{...ue},children:I}),me==="error"&&s.jsx("p",{className:`${r}-error`,style:{...ue},role:"alert",children:ce??pe??T})]})},Ps={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"},Ms=["hover","focus","filled","success","error"],Rs=`import React, { useMemo, useState } from 'react';
935
935
  import { CommonComponentProps } from '../props';
936
936
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
937
937
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -1503,13 +1503,23 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
1503
1503
  };
1504
1504
 
1505
1505
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1506
- `,Wl="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>'),Nl=[{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."}],$n={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Hl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Vl={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},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:"",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"range-control"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Input Fill",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 Text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",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:{...$n.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:{...$n.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:{...$n.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:Nl,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Wl},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",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:0,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:0,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:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","corners"]},{type:"row",items:[{type:"group",title:"",items:["stroke","buttonIcon"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["buttonPadding"]}}]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["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:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Hl],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"]},jl={element:Fl,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Vl,sourceCode:Ml};function wo(e){return`
1506
+ `,Ws="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>'),Ns=[{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."}],$n={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Vs=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Hs={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},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:"",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"range-control"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Input Fill",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 Text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",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:{...$n.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:{...$n.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:{...$n.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:Ns,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Ws},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",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:0,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:0,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:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","corners"]},{type:"row",items:[{type:"group",title:"",items:["stroke","buttonIcon"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["buttonPadding"]}}]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["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:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Vs],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"]},js={element:Fs,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Hs,sourceCode:Rs};function wo(e){return`
1507
1507
  .${e}-marquee-wrapper {
1508
1508
  overflow: hidden;
1509
1509
  width: 100%;
1510
1510
  height: 100%;
1511
1511
  }
1512
1512
 
1513
+ @keyframes ${e}-marquee-left {
1514
+ from { transform: translate3d(0, 0, 0); }
1515
+ to { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
1516
+ }
1517
+
1518
+ @keyframes ${e}-marquee-right {
1519
+ from { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
1520
+ to { transform: translate3d(0, 0, 0); }
1521
+ }
1522
+
1513
1523
  .${e}-marquee-track {
1514
1524
  display: flex;
1515
1525
  flex-direction: row;
@@ -1517,6 +1527,21 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1517
1527
  will-change: transform;
1518
1528
  backface-visibility: hidden;
1519
1529
  transform: translateZ(0);
1530
+ -webkit-backface-visibility: hidden;
1531
+ -webkit-transform: translateZ(0);
1532
+ perspective: 1000px;
1533
+ animation-duration: var(--marquee-duration);
1534
+ animation-timing-function: linear;
1535
+ animation-iteration-count: infinite;
1536
+ animation-play-state: var(--marquee-play-state, running);
1537
+ }
1538
+
1539
+ .${e}-marquee-track[data-direction="left"] {
1540
+ animation-name: ${e}-marquee-left;
1541
+ }
1542
+
1543
+ .${e}-marquee-track[data-direction="right"] {
1544
+ animation-name: ${e}-marquee-right;
1520
1545
  }
1521
1546
 
1522
1547
  .${e}-marquee-set {
@@ -1565,14 +1590,14 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1565
1590
  pointer-events: auto;
1566
1591
  z-index: 10;
1567
1592
  }
1568
- `}const Ol=30,zl=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=$.useScopedStyles(),{autoplay:a,align:i,speed:u,direction:s,pauseOnHover:g,gap:c,cardWidth:A,corners:x,stroke:f,strokeColor:p,bgColor:d,padding:S,logoMarginTop:y,logoWidth:v,logoHeight:_,captionMarginTop:D}=e,V=a==="on"&&!o,T=Math.max(0,u)*Ol,m=W=>$.scalingValue(W,n??!1),k=C.useRef(null),R=C.useRef(null),O=C.useRef(null),[F,H]=C.useState(0),[M,X]=C.useState(0),G=C.useRef(0),h=C.useRef(!1),E=C.useRef(null),I=V&&g==="on",L=C.useRef(null),[w,N]=C.useState(0),[K,ie]=C.useState(0),ne=C.useRef(s),ce=W=>{var q,ee,oe,ue,Te;return{fontSettings:{fontFamily:(e==null?void 0:e[`${W}FontFamily`])??"Arial",fontWeight:((q=e==null?void 0:e[`${W}FontSettings`])==null?void 0:q.fontWeight)??400,fontStyle:((ee=e==null?void 0:e[`${W}FontSettings`])==null?void 0:ee.fontStyle)??"normal"},textAppearance:{textTransform:((oe=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:oe.textTransform)??"none",textDecoration:((ue=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:ue.textDecoration)??"none",fontVariant:((Te=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:Te.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${W}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${W}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${W}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${W}LineHeight`])??.01,color:(e==null?void 0:e[`${W}Color`])??"#000000"}},P=ce("text"),Q=ce("caption"),de=C.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(W=>{var z,q;return(((z=W.text)==null?void 0:z.length)??0)>0||(((q=W.caption)==null?void 0:q.length)??0)>0}),[t]),pe=C.useMemo(()=>a==="off"||(t==null?void 0:t.length)===0?1:M<=0||F<=0?2:Math.max(2,Math.ceil(F/M)+1),[a,t==null?void 0:t.length,M,F]);C.useLayoutEffect(()=>{if(a==="off")return;const W=k.current,z=O.current;if(!W||!z)return;let q=0;const ee=()=>{H(W.getBoundingClientRect().width),X(z.getBoundingClientRect().width)},oe=()=>{cancelAnimationFrame(q),q=requestAnimationFrame(ee)};oe();const ue=new ResizeObserver(oe);return ue.observe(W),ue.observe(z),()=>{cancelAnimationFrame(q),ue.disconnect()}},[a,t==null?void 0:t.length]),C.useLayoutEffect(()=>{const W=R.current;if(a==="off"||!W||!V)return;if(M<=0||T<=0){W.style.transform="translate3d(0, 0, 0)";return}ne.current!==s&&(G.current=1-G.current,ne.current=s);const z=M/T*1e3,q=s==="left"?-M:0,ee=s==="left"?0:-M,oe=W.animate([{transform:`translate3d(${q}px, 0, 0)`},{transform:`translate3d(${ee}px, 0, 0)`}],{duration:z,iterations:1/0,easing:"linear"});return oe.currentTime=G.current*z,h.current&&oe.pause(),E.current=oe,()=>{const ue=typeof oe.currentTime=="number"?oe.currentTime:0;G.current=z>0?ue/z%1:0,oe.cancel(),E.current===oe&&(E.current=null)}},[a,V,M,T,s]);const Y=()=>{var W;I&&(h.current=!0,(W=E.current)==null||W.pause())},ae=()=>{var W;I&&(h.current=!1,(W=E.current)==null||W.play())},fe=C.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),j=C.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),b=C.useCallback((W,z,q,ee)=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:fe,width:"100%"},children:[l.jsx("div",{"data-controls":ee==null?void 0:ee.controlsName,"data-controls-axis":"y",className:`${r}-control`,style:{height:m((ee==null?void 0:ee.marginTop)??0)}}),l.jsx("div",{...ee!=null&&ee.dataMeasureKind?{"data-testimonial-measure":ee.dataMeasureKind}:{},style:{...Re(W,n),textAlign:j,pointerEvents:"auto",...typeof(ee==null?void 0:ee.minHeightPx)=="number"&&ee.minHeightPx>0?{minHeight:ee.minHeightPx}:{}},children:l.jsx(Pt,{content:z})})]},q),[fe,j,n]),U=C.useCallback((W,z,q)=>{var ee,oe,ue;return l.jsxs("div",{style:{padding:`${m(S.top)} ${m(S.right)} ${m(S.bottom)} ${m(S.left)}`,width:m(A+f*2),height:"100%",borderRadius:m(x),border:`${m(f)} solid ${p}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[l.jsx("div",{className:`${r}-cover`,style:{background:d}}),l.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:fe,textAlign:j},children:[P&&W.text&&b(P,W.text,"text",q!=null&&q.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(q==null?void 0:q.textMinHeightPx)=="number"&&q.textMinHeightPx>0?{minHeightPx:q.textMinHeightPx}:void 0),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:fe,width:"100%"},children:[l.jsx("div",{"data-controls":"logoMarginTop",className:`${r}-control`,style:{height:m(y)}}),l.jsx("div",{style:{width:m(v),height:m(_)},children:((ee=W.logo)==null?void 0:ee.url)&&l.jsx("img",{src:W.logo.url,alt:((oe=W.logo)==null?void 0:oe.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((ue=W.logo)==null?void 0:ue.objectFit)||"contain"}})})]},"logo"),Q&&W.caption&&b(Q,W.caption,"caption",{controlsName:"captionMarginTop",marginTop:D,...q!=null&&q.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(q==null?void 0:q.captionMinHeightPx)=="number"&&q.captionMinHeightPx>0?{minHeightPx:q.captionMinHeightPx}:{}})]})]},z)},[d,D,Q,A,x,_,y,v,fe,j,S.bottom,S.left,S.right,S.top,b,f,p,P,n]);$.useTestimonialTextMeasure({enabled:de,rootRef:L,onExtents:({maxTextPx:W,maxCaptionPx:z})=>{N(W),ie(z)},deps:[t,U]});const Z=de?{textMinHeightPx:w,captionMinHeightPx:K}:void 0,te=de?l.jsx("div",{ref:L,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((W,z)=>U(W,`measure-${z}`,{dataMeasureAttrs:!0}))}):null,re=(W,z,q)=>l.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%"},children:[U(W,`card-${z}`,Z),n&&!q&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${m(c)})`,width:m(c),height:"100%",pointerEvents:"auto",zIndex:2}})]},z);return a==="on"&&(t!=null&&t.length)&&t.length>0?l.jsxs("div",{ref:k,className:ge(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:wo(r)}}),te,l.jsx("div",{ref:R,className:`${r}-marquee-track`,onMouseEnter:Y,onMouseLeave:ae,children:Array.from({length:pe},(W,z)=>l.jsx("div",{ref:z===0?O:void 0,className:`${r}-marquee-set`,style:{gap:m(c),paddingRight:m(c)},"aria-hidden":z>0,children:t==null?void 0:t.map((q,ee)=>re(q,`${z}-${ee}`,ee===((t==null?void 0:t.length)??0)-1))},`set-${z}`))})]}):l.jsxs("div",{className:`${r}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:wo(r)}}),te,l.jsx("div",{style:{gap:m(c),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((W,z)=>re(W,z,z===((t==null?void 0:t.length)??0)-1))})]})},Bl=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
1593
+ `}const Os=30,zs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=w.useScopedStyles(),{autoplay:a,align:i,speed:u,direction:l,pauseOnHover:m,gap:c,cardWidth:L,corners:S,stroke:g,strokeColor:p,bgColor:d,padding:x,logoMarginTop:h,logoWidth:y,logoHeight:E,captionMarginTop:D}=e,H=a==="on"&&!o,_=H,b=Math.max(0,u)*Os,C=A=>w.scalingValue(A,n??!1),P=$.useRef(null),O=$.useRef(null),R=$.useRef(null),[V,j]=$.useState(0),[B,U]=$.useState(0),f=_&&m==="on",[F,k]=$.useState(!1),I=$.useRef(null),[T,W]=$.useState(0),[J,ae]=$.useState(0),te=$.useRef(null),le=A=>{var X,Z,de,Se,re;return{fontSettings:{fontFamily:(e==null?void 0:e[`${A}FontFamily`])??"Arial",fontWeight:((X=e==null?void 0:e[`${A}FontSettings`])==null?void 0:X.fontWeight)??400,fontStyle:((Z=e==null?void 0:e[`${A}FontSettings`])==null?void 0:Z.fontStyle)??"normal"},textAppearance:{textTransform:((de=e==null?void 0:e[`${A}TextAppearance`])==null?void 0:de.textTransform)??"none",textDecoration:((Se=e==null?void 0:e[`${A}TextAppearance`])==null?void 0:Se.textDecoration)??"none",fontVariant:((re=e==null?void 0:e[`${A}TextAppearance`])==null?void 0:re.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${A}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${A}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${A}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${A}LineHeight`])??.01,color:(e==null?void 0:e[`${A}Color`])??"#000000"}},M=le("text"),ne=le("caption"),me=$.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(A=>{var G,X;return(((G=A.text)==null?void 0:G.length)??0)>0||(((X=A.caption)==null?void 0:X.length)??0)>0}),[t]),pe=$.useMemo(()=>!H||(t==null?void 0:t.length)===0?1:B<=0||V<=0?2:Math.max(2,Math.ceil(V/B)+1),[H,t==null?void 0:t.length,B,V]);$.useLayoutEffect(()=>{if(!H)return;const A=P.current,G=R.current;if(!A||!G)return;let X=0;const Z=()=>{const re=A.getBoundingClientRect().width,ue=G.getBoundingClientRect().width,$e=te.current,Le=typeof $e=="number"&&Math.abs($e-ue)<=.25;if(te.current=ue,j(re),typeof ue=="number"&&ue>0&&B<=0){U(ue);return}Le&&ue!==B?U(ue):!Le&&B<=0&&(cancelAnimationFrame(X),X=requestAnimationFrame(Z))},de=()=>{cancelAnimationFrame(X),X=requestAnimationFrame(Z)};de();const Se=new ResizeObserver(de);return Se.observe(A),Se.observe(G),()=>{cancelAnimationFrame(X),Se.disconnect()}},[H,B]),$.useLayoutEffect(()=>{const A=O.current;if(!H||!A||!_)return;const G=B>0?B:0,X=G>0&&b>0?G/b*1e3:0,Z=`${Math.max(0,X)/1e3}s`;A.style.setProperty("--marquee-distance",`${G}px`),A.style.setProperty("--marquee-duration",Z)},[H,_,b,B]);const he=()=>{f&&k(!0)},Y=()=>{f&&k(!1)},ce=$.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),N=$.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),v=$.useCallback((A,G,X,Z)=>s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ce,width:"100%"},children:[s.jsx("div",{"data-controls":Z==null?void 0:Z.controlsName,"data-controls-axis":"y",className:`${r}-control`,style:{height:C((Z==null?void 0:Z.marginTop)??0)}}),s.jsx("div",{...Z!=null&&Z.dataMeasureKind?{"data-testimonial-measure":Z.dataMeasureKind}:{},style:{...Re(A,n),textAlign:N,pointerEvents:"auto",...typeof(Z==null?void 0:Z.minHeightPx)=="number"&&Z.minHeightPx>0?{minHeight:Z.minHeightPx}:{}},children:s.jsx(Pt,{content:G})})]},X),[ce,N,n]),q=$.useCallback((A,G,X)=>{var Z,de,Se;return s.jsxs("div",{style:{padding:`${C(x.top)} ${C(x.right)} ${C(x.bottom)} ${C(x.left)}`,width:C(L+g*2),height:"100%",borderRadius:C(S),border:`${C(g)} solid ${p}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[s.jsx("div",{className:`${r}-cover`,style:{background:d}}),s.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:ce,textAlign:N},children:[A.text&&v(M,A.text,"text",X!=null&&X.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(X==null?void 0:X.textMinHeightPx)=="number"&&X.textMinHeightPx>0?{minHeightPx:X.textMinHeightPx}:void 0),s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ce,width:"100%"},children:[s.jsx("div",{"data-controls":"logoMarginTop",className:`${r}-control`,style:{height:C(h)}}),s.jsx("div",{style:{width:C(y),height:C(E)},children:((Z=A.logo)==null?void 0:Z.url)&&s.jsx("img",{src:A.logo.url,alt:((de=A.logo)==null?void 0:de.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Se=A.logo)==null?void 0:Se.objectFit)||"contain"}})})]}),A.caption&&v(ne,A.caption,"caption",{controlsName:"captionMarginTop",marginTop:D,...X!=null&&X.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(X==null?void 0:X.captionMinHeightPx)=="number"&&X.captionMinHeightPx>0?{minHeightPx:X.captionMinHeightPx}:{}})]})]},G)},[d,D,ne,L,S,E,h,y,ce,N,x.bottom,x.left,x.right,x.top,v,g,p,M,n]),K=$.useCallback(A=>{W(A.maxTextPx),ae(A.maxCaptionPx)},[]);$.useLayoutEffect(()=>{if(!me){K({maxTextPx:0,maxCaptionPx:0});return}const A=I.current;if(!A)return;const G=()=>{w.readTestimonialTextMeasure(A,K)};G();const X=new ResizeObserver(G);return X.observe(A),()=>{X.disconnect()}},[me,K,t,q]);const ee=me?{textMinHeightPx:T,captionMinHeightPx:J}:void 0,ie=me?s.jsx("div",{ref:I,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((A,G)=>q(A,`measure-${G}`,{dataMeasureAttrs:!0}))}):null,oe=(A,G)=>s.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[q(A,`card-${G}`,ee),n&&s.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${C(c)})`,width:C(c),height:"100%",pointerEvents:"auto",zIndex:2}})]},G);return H&&((t==null?void 0:t.length)??0)>0?s.jsxs("div",{ref:P,className:ge(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",height:"100%"},children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:wo(r)}}),ie,s.jsx("div",{ref:O,className:`${r}-marquee-track`,"data-direction":l,onMouseEnter:he,onMouseLeave:Y,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",...f?{"--marquee-play-state":F?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:pe},(A,G)=>s.jsx("div",{ref:G===0?R:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:C(c),paddingRight:C(c)},"aria-hidden":G>0,children:t==null?void 0:t.map((X,Z)=>oe(X,`${G}-${Z}`))},`set-${G}`))})]}):s.jsxs("div",{className:`${r}-wrapper`,children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:wo(r)}}),ie,s.jsx("div",{style:{gap:C(c),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((A,G)=>oe(A,G))})]})},Bs=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
1569
1594
  import cn from 'classnames';
1570
1595
  import { CommonComponentProps } from '../props';
1571
1596
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
1572
1597
  import { scalingValue } from '../utils/scalingValue';
1573
1598
  import { textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
1574
1599
  import { useScopedStyles } from '../utils/useScopedStyles';
1575
- import { useTestimonialTextMeasure } from '../utils/useTestimonialTextMeasure';
1600
+ import { readTestimonialTextMeasure } from '../utils/readTestimonialTextMeasure';
1576
1601
 
1577
1602
  function getCSS(P: string): string {
1578
1603
  return \`
@@ -1582,6 +1607,16 @@ function getCSS(P: string): string {
1582
1607
  height: 100%;
1583
1608
  }
1584
1609
 
1610
+ @keyframes \${P}-marquee-left {
1611
+ from { transform: translate3d(0, 0, 0); }
1612
+ to { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
1613
+ }
1614
+
1615
+ @keyframes \${P}-marquee-right {
1616
+ from { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
1617
+ to { transform: translate3d(0, 0, 0); }
1618
+ }
1619
+
1585
1620
  .\${P}-marquee-track {
1586
1621
  display: flex;
1587
1622
  flex-direction: row;
@@ -1589,6 +1624,21 @@ function getCSS(P: string): string {
1589
1624
  will-change: transform;
1590
1625
  backface-visibility: hidden;
1591
1626
  transform: translateZ(0);
1627
+ -webkit-backface-visibility: hidden;
1628
+ -webkit-transform: translateZ(0);
1629
+ perspective: 1000px;
1630
+ animation-duration: var(--marquee-duration);
1631
+ animation-timing-function: linear;
1632
+ animation-iteration-count: infinite;
1633
+ animation-play-state: var(--marquee-play-state, running);
1634
+ }
1635
+
1636
+ .\${P}-marquee-track[data-direction="left"] {
1637
+ animation-name: \${P}-marquee-left;
1638
+ }
1639
+
1640
+ .\${P}-marquee-track[data-direction="right"] {
1641
+ animation-name: \${P}-marquee-right;
1592
1642
  }
1593
1643
 
1594
1644
  .\${P}-marquee-set {
@@ -1665,7 +1715,8 @@ type RenderTextOpts = {
1665
1715
  export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }: TestimonialsProps) => {
1666
1716
  const { prefix: P } = useScopedStyles();
1667
1717
  const { autoplay, align, speed, direction, pauseOnHover, gap, cardWidth, corners, stroke, strokeColor, bgColor, padding, logoMarginTop, logoWidth, logoHeight, captionMarginTop } = settings;
1668
- const isAnimating = autoplay === 'on' && !isPreviewMode;
1718
+ const autoplayEnabled = autoplay === 'on' && !isPreviewMode;
1719
+ const isAnimating = autoplayEnabled;
1669
1720
  const pxPerSec = Math.max(0, speed) * PX_PER_SEC_PER_SPEED_UNIT;
1670
1721
  const scaled = (v: number) => scalingValue(v, isEditor ?? false);
1671
1722
  const wrapperRef = useRef<HTMLDivElement | null>(null);
@@ -1673,14 +1724,12 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
1673
1724
  const setRef = useRef<HTMLDivElement | null>(null);
1674
1725
  const [containerWidth, setContainerWidth] = useState(0);
1675
1726
  const [setWidth, setSetWidth] = useState(0);
1676
- const progressRef = useRef(0);
1677
- const hoveringRef = useRef(false);
1678
- const animRef = useRef<Animation | null>(null);
1679
1727
  const hoverPauseEnabled = isAnimating && pauseOnHover === 'on';
1728
+ const [isHovering, setIsHovering] = useState(false);
1680
1729
  const measureLayerRef = useRef<HTMLDivElement>(null);
1681
1730
  const [measuredTextMinPx, setMeasuredTextMinPx] = useState(0);
1682
1731
  const [measuredCaptionMinPx, setMeasuredCaptionMinPx] = useState(0);
1683
- const lastDirectionRef = useRef<'left' | 'right'>(direction);
1732
+ const stableCandidateRef = useRef<number | null>(null);
1684
1733
 
1685
1734
  const resolveTextStyle = (kind: 'text' | 'caption'): TextStyles => {
1686
1735
  const styles: TextStyles = {
@@ -1706,28 +1755,41 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
1706
1755
  const textStyle = resolveTextStyle('text');
1707
1756
  const captionStyle = resolveTextStyle('caption');
1708
1757
 
1709
- const shouldMeasureTextExtents = useMemo(
1710
- () =>
1758
+ const shouldMeasureTextExtents = useMemo(() =>
1711
1759
  (content?.length ?? 0) > 1 &&
1712
1760
  (content ?? []).some((item) => (item.text?.length ?? 0) > 0 || (item.caption?.length ?? 0) > 0),
1713
1761
  [content]
1714
1762
  );
1715
1763
 
1716
1764
  const copies = useMemo(() => {
1717
- if (autoplay === 'off' || content?.length === 0) return 1;
1765
+ if (!autoplayEnabled || content?.length === 0) return 1;
1718
1766
  if (setWidth <= 0 || containerWidth <= 0) return 2;
1719
1767
  return Math.max(2, Math.ceil(containerWidth / setWidth) + 1);
1720
- }, [autoplay, content?.length, setWidth, containerWidth]);
1768
+ }, [autoplayEnabled, content?.length, setWidth, containerWidth]);
1721
1769
 
1722
1770
  useLayoutEffect(() => {
1723
- if (autoplay === 'off') return;
1771
+ if (!autoplayEnabled) return;
1724
1772
  const wrapper = wrapperRef.current;
1725
1773
  const set = setRef.current;
1726
1774
  if (!wrapper || !set) return;
1727
1775
  let raf = 0;
1728
1776
  const measure = () => {
1729
- setContainerWidth(wrapper.getBoundingClientRect().width);
1730
- setSetWidth(set.getBoundingClientRect().width);
1777
+ const nextContainerWidth = wrapper.getBoundingClientRect().width;
1778
+ const nextRawSetWidth = set.getBoundingClientRect().width;
1779
+ const prevCandidate = stableCandidateRef.current;
1780
+ const isStableNow = typeof prevCandidate === 'number' && Math.abs(prevCandidate - nextRawSetWidth) <= 0.25;
1781
+ stableCandidateRef.current = nextRawSetWidth;
1782
+ setContainerWidth(nextContainerWidth);
1783
+ if (typeof nextRawSetWidth === 'number' && nextRawSetWidth > 0 && setWidth <= 0) {
1784
+ setSetWidth(nextRawSetWidth);
1785
+ return;
1786
+ }
1787
+ if (isStableNow && nextRawSetWidth !== setWidth) {
1788
+ setSetWidth(nextRawSetWidth);
1789
+ } else if (!isStableNow && setWidth <= 0) {
1790
+ cancelAnimationFrame(raf);
1791
+ raf = requestAnimationFrame(measure);
1792
+ }
1731
1793
  };
1732
1794
  const schedule = () => {
1733
1795
  cancelAnimationFrame(raf);
@@ -1741,47 +1803,25 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
1741
1803
  cancelAnimationFrame(raf);
1742
1804
  ro.disconnect();
1743
1805
  };
1744
- }, [autoplay, content?.length]);
1806
+ }, [autoplayEnabled, setWidth]);
1745
1807
 
1746
1808
  useLayoutEffect(() => {
1747
1809
  const track = trackRef.current;
1748
- if (autoplay === 'off' || !track || !isAnimating) return;
1749
- if (setWidth <= 0 || pxPerSec <= 0) {
1750
- track.style.transform = 'translate3d(0, 0, 0)';
1751
- return;
1752
- }
1753
- if (lastDirectionRef.current !== direction) {
1754
- progressRef.current = 1 - progressRef.current;
1755
- lastDirectionRef.current = direction;
1756
- }
1757
- const duration = (setWidth / pxPerSec) * 1000;
1758
- const from = direction === 'left' ? -setWidth : 0;
1759
- const to = direction === 'left' ? 0 : -setWidth;
1760
- const anim = track.animate(
1761
- [{ transform: \`translate3d(\${from}px, 0, 0)\` }, { transform: \`translate3d(\${to}px, 0, 0)\` }],
1762
- { duration, iterations: Infinity, easing: 'linear' }
1763
- );
1764
- anim.currentTime = progressRef.current * duration;
1765
- if (hoveringRef.current) anim.pause();
1766
- animRef.current = anim;
1767
-
1768
- return () => {
1769
- const ct = typeof anim.currentTime === 'number' ? anim.currentTime : 0;
1770
- progressRef.current = duration > 0 ? (ct / duration) % 1 : 0;
1771
- anim.cancel();
1772
- if (animRef.current === anim) animRef.current = null;
1773
- };
1774
- }, [autoplay, isAnimating, setWidth, pxPerSec, direction]);
1810
+ if (!autoplayEnabled || !track || !isAnimating) return;
1811
+ const safeSetWidth = setWidth > 0 ? setWidth : 0;
1812
+ const durationMs = safeSetWidth > 0 && pxPerSec > 0 ? (safeSetWidth / pxPerSec) * 1000 : 0;
1813
+ const durationS = \`\${Math.max(0, durationMs) / 1000}s\`;
1814
+ track.style.setProperty('--marquee-distance', \`\${safeSetWidth}px\`);
1815
+ track.style.setProperty('--marquee-duration', durationS);
1816
+ }, [autoplayEnabled, isAnimating, pxPerSec, setWidth]);
1775
1817
 
1776
1818
  const onTrackEnter = () => {
1777
1819
  if (!hoverPauseEnabled) return;
1778
- hoveringRef.current = true;
1779
- animRef.current?.pause();
1820
+ setIsHovering(true);
1780
1821
  };
1781
1822
  const onTrackLeave = () => {
1782
1823
  if (!hoverPauseEnabled) return;
1783
- hoveringRef.current = false;
1784
- animRef.current?.play();
1824
+ setIsHovering(false);
1785
1825
  };
1786
1826
 
1787
1827
  const overlayAlignItems = useMemo(() => {
@@ -1863,7 +1903,7 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
1863
1903
  className={\`\${P}-elements-overlay\`}
1864
1904
  style={{ alignItems: overlayAlignItems, textAlign: overlayTextAlign }}
1865
1905
  >
1866
- {textStyle && item.text && renderText(
1906
+ {item.text && renderText(
1867
1907
  textStyle,
1868
1908
  item.text,
1869
1909
  'text',
@@ -1874,7 +1914,6 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
1874
1914
  : undefined
1875
1915
  )}
1876
1916
  <div
1877
- key="logo"
1878
1917
  style={{
1879
1918
  display: 'flex',
1880
1919
  flexDirection: 'column',
@@ -1897,8 +1936,7 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
1897
1936
  )}
1898
1937
  </div>
1899
1938
  </div>
1900
- {captionStyle &&
1901
- item.caption &&
1939
+ {item.caption &&
1902
1940
  renderText(captionStyle, item.caption, 'caption', {
1903
1941
  controlsName: 'captionMarginTop',
1904
1942
  marginTop: captionMarginTop,
@@ -1934,15 +1972,28 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
1934
1972
  ]
1935
1973
  );
1936
1974
 
1937
- useTestimonialTextMeasure({
1938
- enabled: shouldMeasureTextExtents,
1939
- rootRef: measureLayerRef,
1940
- onExtents: ({ maxTextPx, maxCaptionPx }) => {
1941
- setMeasuredTextMinPx(maxTextPx);
1942
- setMeasuredCaptionMinPx(maxCaptionPx);
1943
- },
1944
- deps: [content, renderCard],
1945
- });
1975
+ const onMeasuredExtents = useCallback((extents: { maxTextPx: number; maxCaptionPx: number }) => {
1976
+ setMeasuredTextMinPx(extents.maxTextPx);
1977
+ setMeasuredCaptionMinPx(extents.maxCaptionPx);
1978
+ }, []);
1979
+
1980
+ useLayoutEffect(() => {
1981
+ if (!shouldMeasureTextExtents) {
1982
+ onMeasuredExtents({ maxTextPx: 0, maxCaptionPx: 0 });
1983
+ return;
1984
+ }
1985
+ const root = measureLayerRef.current;
1986
+ if (!root) return;
1987
+ const readExtents = () => {
1988
+ readTestimonialTextMeasure(root, onMeasuredExtents);
1989
+ };
1990
+ readExtents();
1991
+ const ro = new ResizeObserver(readExtents);
1992
+ ro.observe(root);
1993
+ return () => {
1994
+ ro.disconnect();
1995
+ };
1996
+ }, [shouldMeasureTextExtents, onMeasuredExtents, content, renderCard]);
1946
1997
 
1947
1998
  const visibleCardOpts: RenderCardOpts | undefined = shouldMeasureTextExtents
1948
1999
  ? { textMinHeightPx: measuredTextMinPx, captionMinHeightPx: measuredCaptionMinPx }
@@ -1966,10 +2017,21 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
1966
2017
  </div>
1967
2018
  ) : null;
1968
2019
 
1969
- const renderCardWrapper = (item: TestimonialsItem, key: string | number, isLast: boolean) => (
1970
- <div key={key} style={{ position: 'relative', flex: '0 0 auto', height: '100%' }}>
2020
+ const renderCardWrapper = (item: TestimonialsItem, key: string | number) => (
2021
+ <div
2022
+ key={key}
2023
+ style={{
2024
+ position: 'relative',
2025
+ flex: '0 0 auto',
2026
+ height: '100%',
2027
+ transform: 'translateZ(0)',
2028
+ backfaceVisibility: 'hidden',
2029
+ WebkitBackfaceVisibility: 'hidden',
2030
+ willChange: 'transform',
2031
+ }}
2032
+ >
1971
2033
  {renderCard(item, \`card-\${key}\`, visibleCardOpts)}
1972
- {isEditor && !isLast && (
2034
+ {isEditor && (
1973
2035
  <div
1974
2036
  data-controls="gap"
1975
2037
  data-controls-axis="x"
@@ -1987,27 +2049,54 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
1987
2049
  </div>
1988
2050
  );
1989
2051
 
1990
- if (autoplay === 'on' && content?.length && content.length > 0) {
2052
+ if (autoplayEnabled && (content?.length ?? 0) > 0) {
1991
2053
  return (
1992
- <div ref={wrapperRef} className={cn(\`\${P}-wrapper\`, \`\${P}-marquee-wrapper\`)} aria-label="Testimonials">
2054
+ <div
2055
+ ref={wrapperRef}
2056
+ className={cn(\`\${P}-wrapper\`, \`\${P}-marquee-wrapper\`)}
2057
+ aria-label="Testimonials"
2058
+ style={{ overflow: 'hidden', width: '100%', height: '100%' }}
2059
+ >
1993
2060
  <style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
1994
2061
  {measureLayerEl}
1995
2062
  <div
1996
2063
  ref={trackRef}
1997
2064
  className={\`\${P}-marquee-track\`}
2065
+ data-direction={direction}
1998
2066
  onMouseEnter={onTrackEnter}
1999
2067
  onMouseLeave={onTrackLeave}
2068
+ style={{
2069
+ display: 'flex',
2070
+ flexDirection: 'row',
2071
+ flexWrap: 'nowrap',
2072
+ width: 'max-content',
2073
+ willChange: 'transform',
2074
+ backfaceVisibility: 'hidden',
2075
+ WebkitBackfaceVisibility: 'hidden',
2076
+ transform: 'translateZ(0)',
2077
+ WebkitTransform: 'translateZ(0)',
2078
+ perspective: '1000px',
2079
+ ...(hoverPauseEnabled
2080
+ ? ({ '--marquee-play-state': isHovering ? 'paused' : 'running' } as React.CSSProperties)
2081
+ : ({ '--marquee-play-state': 'running' } as React.CSSProperties)),
2082
+ }}
2000
2083
  >
2001
2084
  {Array.from({ length: copies }, (_, copyIndex) => (
2002
2085
  <div
2003
2086
  key={\`set-\${copyIndex}\`}
2004
2087
  ref={copyIndex === 0 ? setRef : undefined}
2005
2088
  className={\`\${P}-marquee-set\`}
2006
- style={{ gap: scaled(gap), paddingRight: scaled(gap) }}
2089
+ style={{
2090
+ display: 'flex',
2091
+ flexDirection: 'row',
2092
+ flex: '0 0 auto',
2093
+ gap: scaled(gap),
2094
+ paddingRight: scaled(gap),
2095
+ }}
2007
2096
  aria-hidden={copyIndex > 0}
2008
2097
  >
2009
2098
  {content?.map((item: TestimonialsItem, index: number) =>
2010
- renderCardWrapper(item, \`\${copyIndex}-\${index}\`, index === (content?.length ?? 0) - 1)
2099
+ renderCardWrapper(item, \`\${copyIndex}-\${index}\`)
2011
2100
  )}
2012
2101
  </div>
2013
2102
  ))}
@@ -2031,7 +2120,7 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
2031
2120
  aria-label="Testimonials"
2032
2121
  >
2033
2122
  {content?.map((item: TestimonialsItem, index: number) =>
2034
- renderCardWrapper(item, index, index === (content?.length ?? 0) - 1)
2123
+ renderCardWrapper(item, index)
2035
2124
  )}
2036
2125
  </div>
2037
2126
  </div>
@@ -2073,7 +2162,7 @@ type TestimonialsSettings = {
2073
2162
  logoHeight: number;
2074
2163
  captionMarginTop: number;
2075
2164
  };
2076
- `,To={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Dl={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"switch-toggle-2",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"range-control"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"range-control"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"range-control"}},strokeColor:{type:"string",scope:"common",title:"Stroke color",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG color",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:100,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"range-control"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"range-control"}},textColor:{type:"string",scope:"common",title:"Text color",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption color",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...To.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...To.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{autoplay:"off",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Arial",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:3,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:0,logoWidth:.02,logoHeight:.02,captionMarginTop:0,textFontSize:.01,textLineHeight:.01,captionFontSize:.01,captionLineHeight:.01},d:{speed:5,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.01,logoWidth:.05,logoHeight:.05,captionMarginTop:.01,textFontSize:.01,textLineHeight:.01,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",items:["align","direction"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners","stroke"]},{type:"group",title:"",items:["padding"]}]},{type:"row",title:"Logo Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Logo",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Innovative solutions redefine connectivity, enhancing user experience through seamless digital integration and efficiency."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"In the realm of digital innovation, transformative algorithms redefine connectivity, propelling unprecedented technological advancements."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Harnessing innovative algorithms, this paradigm shift enhances computational efficiency and optimizes data processing frameworks."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]}]}},Ul={element:zl,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonials.png"},defaultSize:{width:750,height:300},schema:Dl,sourceCode:Bl,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function ql(e){return`
2165
+ `,To={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ds={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"switch-toggle-2",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"range-control"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"range-control"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"range-control"}},strokeColor:{type:"string",scope:"common",title:"Stroke color",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG color",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:100,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"range-control"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"range-control"}},textColor:{type:"string",scope:"common",title:"Text color",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption color",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...To.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...To.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{autoplay:"off",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Arial",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:3,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:0,logoWidth:.02,logoHeight:.02,captionMarginTop:0,textFontSize:.01,textLineHeight:.01,captionFontSize:.01,captionLineHeight:.01},d:{speed:5,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.01,logoWidth:.05,logoHeight:.05,captionMarginTop:.01,textFontSize:.01,textLineHeight:.01,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",items:["align","direction"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners","stroke"]},{type:"group",title:"",items:["padding"]}]},{type:"row",title:"Logo Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Logo",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Innovative solutions redefine connectivity, enhancing user experience through seamless digital integration and efficiency."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"In the realm of digital innovation, transformative algorithms redefine connectivity, propelling unprecedented technological advancements."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Harnessing innovative algorithms, this paradigm shift enhances computational efficiency and optimizes data processing frameworks."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]}]}},qs={element:zs,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonials.png"},defaultSize:{width:750,height:300},schema:Ds,sourceCode:Bs,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Us(e){return`
2077
2166
  .${e}-container {
2078
2167
  overflow-x: clip;
2079
2168
  display: flex;
@@ -2092,9 +2181,7 @@ type TestimonialsSettings = {
2092
2181
  flex-direction: column;
2093
2182
  inset: 0;
2094
2183
  pointer-events: none;
2095
- height: 100%;
2096
2184
  box-sizing: border-box;
2097
- position: relative;
2098
2185
  }
2099
2186
 
2100
2187
  .${e}-wrapper-autoplay-off {
@@ -2208,14 +2295,14 @@ type TestimonialsSettings = {
2208
2295
  width: 100%;
2209
2296
  height: 100%;
2210
2297
  }
2211
- `}const Gl=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=$.useScopedStyles(),a=t||[],{autoplay:i,delay:u,align:s,width:g,imageMarginTop:c,textMarginTop:A,captionMarginTop:x,imageWidth:f,imageHeight:p,controlsWidth:d,controlsColor:S,controlsHoverColor:y}=e,v=i==="on"&&!o,[_,D]=C.useState(0),[V,T]=C.useState(null),[m,k]=C.useState(!1),R=C.useRef(null),O=C.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),F=C.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]);C.useEffect(()=>{D(0),T(null),k(!1)},[a.length]);const H=a[_],M=V===null?null:a[V],X=Y=>{var fe,j,b,U,Z;return{fontSettings:{fontFamily:(e==null?void 0:e[`${Y}FontFamily`])??"Arial",fontWeight:((fe=e==null?void 0:e[`${Y}FontSettings`])==null?void 0:fe.fontWeight)??400,fontStyle:((j=e==null?void 0:e[`${Y}FontSettings`])==null?void 0:j.fontStyle)??"normal"},textAppearance:{textTransform:((b=e==null?void 0:e[`${Y}TextAppearance`])==null?void 0:b.textTransform)??"none",textDecoration:((U=e==null?void 0:e[`${Y}TextAppearance`])==null?void 0:U.textDecoration)??"none",fontVariant:((Z=e==null?void 0:e[`${Y}TextAppearance`])==null?void 0:Z.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${Y}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${Y}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${Y}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${Y}WordSpacing`])??0,color:(e==null?void 0:e[`${Y}Color`])??"#000000"}},G=X("text"),h=X("caption"),E=a.length>1&&a.some(Y=>{var ae,fe;return(((ae=Y.text)==null?void 0:ae.length)??0)>0||(((fe=Y.caption)==null?void 0:fe.length)??0)>0}),I=C.useRef(null),[L,w]=C.useState(0),[N,K]=C.useState(0),ie=e.controls??{mode:"Off",icon:null},ne=a.length>1,ce=C.useCallback((Y,ae)=>!ne||ae===Y?Y:(R.current&&window.clearTimeout(R.current),T(Y),k(!0),R.current=window.setTimeout(()=>{T(null),k(!1),R.current=null},300),ae),[ne]),P=C.useCallback(()=>{ne&&D(Y=>ce(Y,(Y-1+a.length)%a.length))},[ne,ce,a.length]),Q=C.useCallback(()=>{ne&&D(Y=>ce(Y,(Y+1)%a.length))},[ne,ce,a.length]);C.useEffect(()=>{if(!v||!ne)return;const Y=Math.max(300,Number.isFinite(u*1e3)?u*1e3:0),ae=window.setInterval(()=>{D(fe=>ce(fe,(fe+1)%a.length))},Y);return()=>{window.clearInterval(ae)}},[v,ne,ce,a.length,u]),C.useEffect(()=>()=>{R.current&&window.clearTimeout(R.current)},[]);const de=C.useCallback((Y,ae)=>{var U,Z,te,re;const fe=ae==null?void 0:ae.textMinHeightPx,j=ae==null?void 0:ae.captionMinHeightPx,b=ae==null?void 0:ae.dataMeasureAttrs;return l.jsxs(l.Fragment,{children:[Y.text&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[l.jsx("div",{"data-controls":"textMarginTop",className:`${r}-control`,style:{height:$.scalingValue(A??0,n??!1)}}),l.jsx("div",{...b&&{"data-testimonial-measure":"text"},style:{...Re(G,n),...fe&&fe>0?{minHeight:fe}:{},textAlign:F,pointerEvents:"auto"},children:l.jsx(Pt,{content:Y.text})})]},"text"),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[l.jsx("div",{"data-controls":"imageMarginTop",className:`${r}-control`,style:{height:$.scalingValue(c??0,n??!1)}}),l.jsx("div",{style:{width:$.scalingValue(f??0,n??!1),height:$.scalingValue(p??0,n??!1)},children:((U=Y.image)==null?void 0:U.url)&&l.jsx("img",{src:(Z=Y.image)==null?void 0:Z.url,alt:(te=Y.image)==null?void 0:te.name,className:`${r}-icon`,style:{objectFit:((re=Y.image)==null?void 0:re.objectFit)||"contain"}})})]},"image"),Y.caption&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[l.jsx("div",{"data-controls":"captionMarginTop",className:`${r}-control`,style:{height:$.scalingValue(x??0,n??!1)}}),l.jsx("div",{...b?{"data-testimonial-measure":"caption"}:{},style:{...Re(h,n),...j&&j>0?{minHeight:j}:{},textAlign:F,pointerEvents:"auto"},children:l.jsx(Pt,{content:Y.caption})})]},"caption")]})},[x,h,c,f,p,n,O,F,A,G]);if($.useTestimonialTextMeasure({enabled:E,rootRef:I,onExtents:({maxTextPx:Y,maxCaptionPx:ae})=>{w(Y),K(ae)},deps:[a,de]}),!H)return l.jsx(l.Fragment,{});const pe=E?{textMinHeightPx:L,captionMinHeightPx:N}:void 0;return l.jsx(l.Fragment,{children:l.jsxs("div",{className:`${r}-container`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:ql(r)}}),l.jsxs("div",{className:ge(`${r}-elements-overlay`,`${r}-wrapper`,i==="off"&&`${r}-wrapper-autoplay-off`),style:{width:$.scalingValue(g??0,n??!1),alignItems:O},children:[E&&l.jsx("div",{ref:I,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:a.map((Y,ae)=>l.jsx("div",{style:{width:"100%"},children:de(Y,{dataMeasureAttrs:!0})},ae))}),l.jsxs("div",{className:`${r}-fade-stack`,children:[M&&m&&l.jsx("div",{className:ge(`${r}-fade-item-prev`,`${r}-fade-out`),children:de(M,pe)}),l.jsx("div",{className:ge(`${r}-fade-item-current`,m?`${r}-fade-in`:void 0),children:de(H,pe)})]})]}),ie.mode==="On"&&l.jsxs("div",{className:`${r}-controls`,children:[l.jsx("div",{className:`${r}-arrow`,style:{width:$.scalingValue(d??.02,n??!1),height:$.scalingValue(d??.02,n??!1),"--arrow-hover-color":y},children:l.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:P,"aria-label":"Previous testimonial",children:ie.icon&&l.jsx(Xe,{url:ie.icon,fill:S,hoverFill:y,className:ge(`${r}-arrow-img`,`${r}-mirror`)})})}),l.jsx("div",{className:ge(`${r}-arrow`,`${r}-next-arrow`),style:{width:$.scalingValue(d??.02,n??!1),height:$.scalingValue(d??.02,n??!1),"--arrow-hover-color":y},children:l.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:Q,"aria-label":"Next testimonial",children:ie.icon&&l.jsx(Xe,{url:ie.icon,fill:S,hoverFill:y,className:`${r}-arrow-img`})})})]})]})})},Yl=`import cn from 'classnames';
2212
- import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
2298
+ `}const Gs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=w.useScopedStyles(),a=t||[],{autoplay:i,delay:u,align:l,width:m,imageMarginTop:c,textMarginTop:L,captionMarginTop:S,imageWidth:g,imageHeight:p,controlsWidth:d,controlsColor:x,controlsHoverColor:h}=e,y=i==="on"&&!o,[E,D]=$.useState(0),[H,_]=$.useState(null),[b,C]=$.useState(!1),P=$.useRef(null),O=$.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),R=$.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]);$.useEffect(()=>{D(0),_(null),C(!1)},[a.length]);const V=a[E],j=H===null?null:a[H],B=Y=>{var N,v,q,K,ee;return{fontSettings:{fontFamily:(e==null?void 0:e[`${Y}FontFamily`])??"Arial",fontWeight:((N=e==null?void 0:e[`${Y}FontSettings`])==null?void 0:N.fontWeight)??400,fontStyle:((v=e==null?void 0:e[`${Y}FontSettings`])==null?void 0:v.fontStyle)??"normal"},textAppearance:{textTransform:((q=e==null?void 0:e[`${Y}TextAppearance`])==null?void 0:q.textTransform)??"none",textDecoration:((K=e==null?void 0:e[`${Y}TextAppearance`])==null?void 0:K.textDecoration)??"none",fontVariant:((ee=e==null?void 0:e[`${Y}TextAppearance`])==null?void 0:ee.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${Y}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${Y}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${Y}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${Y}WordSpacing`])??0,color:(e==null?void 0:e[`${Y}Color`])??"#000000"}},U=B("text"),f=B("caption"),F=a.length>1&&a.some(Y=>{var ce,N;return(((ce=Y.text)==null?void 0:ce.length)??0)>0||(((N=Y.caption)==null?void 0:N.length)??0)>0}),k=$.useRef(null),[I,T]=$.useState(0),[W,J]=$.useState(0),ae=e.controls??{mode:"Off",icon:null},te=a.length>1,le=$.useCallback((Y,ce)=>!te||ce===Y?Y:(P.current&&window.clearTimeout(P.current),_(Y),C(!0),P.current=window.setTimeout(()=>{_(null),C(!1),P.current=null},300),ce),[te]),M=$.useCallback(()=>{te&&D(Y=>le(Y,(Y-1+a.length)%a.length))},[te,le,a.length]),ne=$.useCallback(()=>{te&&D(Y=>le(Y,(Y+1)%a.length))},[te,le,a.length]);$.useEffect(()=>{if(!y||!te)return;const Y=Math.max(300,Number.isFinite(u*1e3)?u*1e3:0),ce=window.setInterval(()=>{D(N=>le(N,(N+1)%a.length))},Y);return()=>{window.clearInterval(ce)}},[y,te,le,a.length,u]),$.useEffect(()=>()=>{P.current&&window.clearTimeout(P.current)},[]);const me=(Y,ce)=>{var K,ee,ie,oe;const N=ce==null?void 0:ce.textMinHeightPx,v=ce==null?void 0:ce.captionMinHeightPx,q=ce==null?void 0:ce.dataMeasureAttrs;return s.jsxs(s.Fragment,{children:[Y.text&&s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[s.jsx("div",{"data-controls":"textMarginTop",className:`${r}-control`,style:{height:w.scalingValue(L??0,n??!1)}}),s.jsx("div",{...q&&{"data-testimonial-measure":"text"},style:{...Re(U,n),...N&&N>0?{minHeight:N}:{},textAlign:R,pointerEvents:"auto"},children:s.jsx(Pt,{content:Y.text})})]}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[s.jsx("div",{"data-controls":"imageMarginTop",className:`${r}-control`,style:{height:w.scalingValue(c??0,n??!1)}}),s.jsx("div",{style:{width:w.scalingValue(g??0,n??!1),height:w.scalingValue(p??0,n??!1)},children:((K=Y.image)==null?void 0:K.url)&&s.jsx("img",{src:(ee=Y.image)==null?void 0:ee.url,alt:((ie=Y.image)==null?void 0:ie.name)??"",className:`${r}-icon`,style:{objectFit:((oe=Y.image)==null?void 0:oe.objectFit)||"contain"}})})]}),Y.caption&&s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[s.jsx("div",{"data-controls":"captionMarginTop",className:`${r}-control`,style:{height:w.scalingValue(S??0,n??!1)}}),s.jsx("div",{...q?{"data-testimonial-measure":"caption"}:{},style:{...Re(f,n),...v&&v>0?{minHeight:v}:{},textAlign:R,pointerEvents:"auto"},children:s.jsx(Pt,{content:Y.caption})})]})]})},pe=$.useCallback(Y=>{T(Y.maxTextPx),J(Y.maxCaptionPx)},[]);if($.useLayoutEffect(()=>{if(!F){pe({maxTextPx:0,maxCaptionPx:0});return}const Y=k.current;if(!Y)return;const ce=()=>{w.readTestimonialTextMeasure(Y,pe)};ce();const N=new ResizeObserver(ce);return N.observe(Y),()=>{N.disconnect()}},[F,pe,t]),!V)return s.jsx(s.Fragment,{});const he=F?{textMinHeightPx:I,captionMinHeightPx:W}:void 0;return s.jsx(s.Fragment,{children:s.jsxs("div",{className:`${r}-container`,children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:Us(r)}}),s.jsxs("div",{className:ge(`${r}-elements-overlay`,`${r}-wrapper`,i==="off"&&`${r}-wrapper-autoplay-off`),style:{width:w.scalingValue(m??0,n??!1),alignItems:O},children:[F&&s.jsx("div",{ref:k,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:a.map((Y,ce)=>s.jsx("div",{style:{width:"100%"},children:me(Y,{dataMeasureAttrs:!0})},ce))}),s.jsxs("div",{className:`${r}-fade-stack`,children:[j&&b&&s.jsx("div",{className:ge(`${r}-fade-item-prev`,`${r}-fade-out`),children:me(j,he)}),s.jsx("div",{className:ge(`${r}-fade-item-current`,b?`${r}-fade-in`:void 0),children:me(V,he)})]})]}),ae.mode==="On"&&s.jsxs("div",{className:`${r}-controls`,children:[s.jsx("div",{className:`${r}-arrow`,style:{width:w.scalingValue(d??.02,n??!1),height:w.scalingValue(d??.02,n??!1),"--arrow-hover-color":h},children:s.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:M,disabled:!te,"aria-label":"Previous testimonial",children:ae.icon&&s.jsx(Xe,{url:ae.icon,fill:x,hoverFill:h,className:ge(`${r}-arrow-img`,`${r}-mirror`)})})}),s.jsx("div",{className:ge(`${r}-arrow`,`${r}-next-arrow`),style:{width:w.scalingValue(d??.02,n??!1),height:w.scalingValue(d??.02,n??!1),"--arrow-hover-color":h},children:s.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:ne,disabled:!te,"aria-label":"Next testimonial",children:ae.icon&&s.jsx(Xe,{url:ae.icon,fill:x,hoverFill:h,className:`${r}-arrow-img`})})})]})]})})},Ys=`import cn from 'classnames';
2299
+ import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
2213
2300
  import { CommonComponentProps } from '../props';
2214
2301
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
2215
2302
  import { scalingValue } from '../utils/scalingValue';
2216
2303
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
2217
2304
  import { useScopedStyles } from '../utils/useScopedStyles';
2218
- import { useTestimonialTextMeasure } from '../utils/useTestimonialTextMeasure';
2305
+ import { readTestimonialTextMeasure } from '../utils/readTestimonialTextMeasure';
2219
2306
  import { textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
2220
2307
 
2221
2308
  function getCSS(P: string): string {
@@ -2238,9 +2325,7 @@ function getCSS(P: string): string {
2238
2325
  flex-direction: column;
2239
2326
  inset: 0;
2240
2327
  pointer-events: none;
2241
- height: 100%;
2242
2328
  box-sizing: border-box;
2243
- position: relative;
2244
2329
  }
2245
2330
 
2246
2331
  .\${P}-wrapper-autoplay-off {
@@ -2485,7 +2570,7 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
2485
2570
  };
2486
2571
  }, []);
2487
2572
 
2488
- const renderItemContent = useCallback((item: TestimonialsItem, opts?: RenderItemContentOpts) => {
2573
+ const renderItemContent = (item: TestimonialsItem, opts?: RenderItemContentOpts) => {
2489
2574
  const textMinHeightPx = opts?.textMinHeightPx;
2490
2575
  const captionMinHeightPx = opts?.captionMinHeightPx;
2491
2576
  const dataMeasureAttrs = opts?.dataMeasureAttrs;
@@ -2493,10 +2578,7 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
2493
2578
  return (
2494
2579
  <>
2495
2580
  {item.text && (
2496
- <div
2497
- key="text"
2498
- style={{ display: 'flex', flexDirection: 'column', alignItems: overlayAlignItems, width: '100%' }}
2499
- >
2581
+ <div style={{ display: 'flex', flexDirection: 'column', alignItems: overlayAlignItems, width: '100%' }}>
2500
2582
  <div
2501
2583
  data-controls="textMarginTop"
2502
2584
  className={\`\${P}-control\`}
@@ -2515,41 +2597,25 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
2515
2597
  </div>
2516
2598
  </div>
2517
2599
  )}
2518
- <div
2519
- key="image"
2520
- style={{
2521
- display: 'flex',
2522
- flexDirection: 'column',
2523
- alignItems: overlayAlignItems,
2524
- width: '100%',
2525
- }}
2526
- >
2527
- <div
2528
- data-controls="imageMarginTop"
2529
- className={\`\${P}-control\`}
2530
- style={{ height: scalingValue(imageMarginTop ?? 0, isEditor ?? false) }}
2531
- />
2600
+ <div style={{ display: 'flex', flexDirection: 'column', alignItems: overlayAlignItems, width: '100%' }}>
2601
+ <div
2602
+ data-controls="imageMarginTop"
2603
+ className={\`\${P}-control\`}
2604
+ style={{ height: scalingValue(imageMarginTop ?? 0, isEditor ?? false) }}
2605
+ />
2532
2606
  <div style={{ width: scalingValue(imageWidth ?? 0, isEditor ?? false), height: scalingValue(imageHeight ?? 0, isEditor ?? false)}}>
2533
2607
  {item.image?.url &&
2534
2608
  <img
2535
- src={item.image?.url}
2536
- alt={item.image?.name}
2537
- className={\`\${P}-icon\`}
2538
- style={{ objectFit: item.image?.objectFit || 'contain' }}
2539
- />
2609
+ src={item.image?.url}
2610
+ alt={item.image?.name ?? ''}
2611
+ className={\`\${P}-icon\`}
2612
+ style={{ objectFit: item.image?.objectFit || 'contain' }}
2613
+ />
2540
2614
  }
2541
2615
  </div>
2542
2616
  </div>
2543
2617
  {item.caption && (
2544
- <div
2545
- key="caption"
2546
- style={{
2547
- display: 'flex',
2548
- flexDirection: 'column',
2549
- alignItems: overlayAlignItems,
2550
- width: '100%',
2551
- }}
2552
- >
2618
+ <div style={{ display: 'flex', flexDirection: 'column', alignItems: overlayAlignItems, width: '100%' }}>
2553
2619
  <div
2554
2620
  data-controls="captionMarginTop"
2555
2621
  className={\`\${P}-control\`}
@@ -2570,28 +2636,30 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
2570
2636
  )}
2571
2637
  </>
2572
2638
  );
2573
- }, [
2574
- captionMarginTop,
2575
- captionStyle,
2576
- imageMarginTop,
2577
- imageWidth,
2578
- imageHeight,
2579
- isEditor,
2580
- overlayAlignItems,
2581
- overlayTextAlign,
2582
- textMarginTop,
2583
- textStyle,
2584
- ]);
2585
-
2586
- useTestimonialTextMeasure({
2587
- enabled: shouldMeasureTextExtents,
2588
- rootRef: measureLayerRef,
2589
- onExtents: ({ maxTextPx, maxCaptionPx }) => {
2590
- setMeasuredTextMinPx(maxTextPx);
2591
- setMeasuredCaptionMinPx(maxCaptionPx);
2592
- },
2593
- deps: [items, renderItemContent],
2594
- });
2639
+ };
2640
+
2641
+ const onMeasuredExtents = useCallback((extents: { maxTextPx: number; maxCaptionPx: number }) => {
2642
+ setMeasuredTextMinPx(extents.maxTextPx);
2643
+ setMeasuredCaptionMinPx(extents.maxCaptionPx);
2644
+ }, []);
2645
+
2646
+ useLayoutEffect(() => {
2647
+ if (!shouldMeasureTextExtents) {
2648
+ onMeasuredExtents({ maxTextPx: 0, maxCaptionPx: 0 });
2649
+ return;
2650
+ }
2651
+ const root = measureLayerRef.current;
2652
+ if (!root) return;
2653
+ const readExtents = () => {
2654
+ readTestimonialTextMeasure(root, onMeasuredExtents);
2655
+ };
2656
+ readExtents();
2657
+ const ro = new ResizeObserver(readExtents);
2658
+ ro.observe(root);
2659
+ return () => {
2660
+ ro.disconnect();
2661
+ };
2662
+ }, [shouldMeasureTextExtents, onMeasuredExtents, content]);
2595
2663
 
2596
2664
  if (!currentItem) return <></>;
2597
2665
 
@@ -2653,6 +2721,7 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
2653
2721
  type="button"
2654
2722
  className={\`\${P}-arrow-inner\`}
2655
2723
  onClick={goPrev}
2724
+ disabled={!canSwitch}
2656
2725
  aria-label="Previous testimonial"
2657
2726
  >
2658
2727
  {controls.icon && (
@@ -2677,6 +2746,7 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
2677
2746
  type="button"
2678
2747
  className={\`\${P}-arrow-inner\`}
2679
2748
  onClick={goNext}
2749
+ disabled={!canSwitch}
2680
2750
  aria-label="Next testimonial"
2681
2751
  >
2682
2752
  {controls.icon && (
@@ -2703,8 +2773,8 @@ export type TestimonialsItem = {
2703
2773
  name?: string;
2704
2774
  objectFit?: 'cover' | 'contain';
2705
2775
  };
2706
- text: any[];
2707
- caption: any[];
2776
+ text?: any[];
2777
+ caption?: any[];
2708
2778
  };
2709
2779
 
2710
2780
  type TestimonialsSettings = {
@@ -2725,4 +2795,4 @@ type TestimonialsSettings = {
2725
2795
  icon?: string | null;
2726
2796
  };
2727
2797
  };
2728
- `,Xl="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>'),_o={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Kl={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},delay:{type:"number",scope:"common",title:"Delay(s)",display:{type:"step-control"},step:1,min:1,max:8},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"range-control"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"range-control"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"range-control"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:100,display:{type:"range-control"}},textMinHeight:{type:"number",scope:"layout",title:"Text",min:0,max:300,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:100,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:"range-control"}},controlsColor:{type:"string",scope:"common",title:"Controls Color",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMinHeight:{type:"number",scope:"layout",title:"Caption",min:0,max:100,display:{type:"range-control"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{..._o.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"}},captionTextAlign:{display:{type:"text-align-control"},type:"string",scope:"common",title:"Caption Align",enum:["left","center","right"]},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Color"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{..._o.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"}},textTextAlign:{display:{type:"text-align-control"},type:"string",scope:"common",title:"Text Align",enum:["left","center","right"]},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"}},defaults:{autoplay:"off",controls:{mode:"Off",icon:Xl},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Arial",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAlign:"left",captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:4,width:.15,height:.2,corners:.005,stroke:.001,imageMarginTop:.01,textMinHeight:.1,captionMarginTop:.01,textMarginTop:0,textFontSize:.01,captionFontSize:.01,textLineHeight:.01,captionLineHeight:.01,imageWidth:.05,imageHeight:.05,controlsWidth:.02,captionMinHeight:.01},d:{delay:4,width:.15,height:.2,corners:.005,stroke:.001,imageMarginTop:.01,textMarginTop:0,textMinHeight:.08,captionMarginTop:.01,textFontSize:.01,captionFontSize:.01,textLineHeight:.01,captionLineHeight:.01,imageWidth:.05,imageHeight:.05,controlsWidth:.02,captionMinHeight:.01}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["controls",{type:"group",title:"",items:["delay","width"]}]},{type:"row",items:["controlsWidth","align"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{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/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Innovative solutions redefine connectivity, enhancing user experience through seamless digital integration and efficiency."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"In the realm of digital innovation, transformative algorithms redefine connectivity, propelling unprecedented technological advancements."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Harnessing innovative algorithms, this paradigm shift enhances computational efficiency and optimizes data processing frameworks."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]}]}},Zl={element:Gl,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonialsSingle.png"},defaultSize:{width:700,height:300},schema:Kl,sourceCode:Yl,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}},Jl=[_a,Pa,Sl,Il,jl,Ul,Zl];exports.components=Jl;exports.isSchemaV1=vr;
2798
+ `,Xs="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>'),_o={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ks={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},delay:{type:"number",scope:"common",title:"Delay(s)",display:{type:"step-control"},step:1,min:1,max:8},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"range-control"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"range-control"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"range-control"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:100,display:{type:"range-control"}},textMinHeight:{type:"number",scope:"layout",title:"Text",min:0,max:300,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:100,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:"range-control"}},controlsColor:{type:"string",scope:"common",title:"Controls Color",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMinHeight:{type:"number",scope:"layout",title:"Caption",min:0,max:100,display:{type:"range-control"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{..._o.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"}},captionTextAlign:{display:{type:"text-align-control"},type:"string",scope:"common",title:"Caption Align",enum:["left","center","right"]},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Color"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{..._o.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"}},textTextAlign:{display:{type:"text-align-control"},type:"string",scope:"common",title:"Text Align",enum:["left","center","right"]},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"}},defaults:{autoplay:"off",controls:{mode:"Off",icon:Xs},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Arial",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAlign:"left",captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:4,width:.15,height:.2,corners:.005,stroke:.001,imageMarginTop:.01,textMinHeight:.1,captionMarginTop:.01,textMarginTop:0,textFontSize:.01,captionFontSize:.01,textLineHeight:.01,captionLineHeight:.01,imageWidth:.05,imageHeight:.05,controlsWidth:.02,captionMinHeight:.01},d:{delay:4,width:.15,height:.2,corners:.005,stroke:.001,imageMarginTop:.01,textMarginTop:0,textMinHeight:.08,captionMarginTop:.01,textFontSize:.01,captionFontSize:.01,textLineHeight:.01,captionLineHeight:.01,imageWidth:.05,imageHeight:.05,controlsWidth:.02,captionMinHeight:.01}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["controls",{type:"group",title:"",items:["delay","width"]}]},{type:"row",items:["controlsWidth","align"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{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/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Innovative solutions redefine connectivity, enhancing user experience through seamless digital integration and efficiency."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"In the realm of digital innovation, transformative algorithms redefine connectivity, propelling unprecedented technological advancements."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Harnessing innovative algorithms, this paradigm shift enhances computational efficiency and optimizes data processing frameworks."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]}]}},Zs={element:Gs,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonialsSingle.png"},defaultSize:{width:700,height:300},schema:Ks,sourceCode:Ys,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}},Js=[_a,Pa,Ss,Is,js,qs,Zs];exports.components=Js;exports.isSchemaV1=vr;