@cntrl-site/components 1.0.7-alpha.10 → 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 a=require("react/jsx-runtime"),S=require("react"),me=require("classnames"),w=require("./useScopedStyles-DpVdqfXj.js"),br=require("react-dom");function xr(e){return e.type==="object"&&e.version===1}const Sr="ControlSlider-module__wrapper___sHEkd",Cr="ControlSlider-module__hoverArrow___A-dOH",wr="ControlSlider-module__sliderItem___QQSkR",Tr="ControlSlider-module__sliderImage___9hRl-",_r="ControlSlider-module__arrow___05ghY",$r="ControlSlider-module__arrowVertical___tBfVN",Ar="ControlSlider-module__nextArrow___-30Yc",Er="ControlSlider-module__arrowInner___aEra3",Ir="ControlSlider-module__arrowIcon___S4ztF",Lr="ControlSlider-module__arrowImg___2dwJW",Fr="ControlSlider-module__mirror___brd6U",kr="ControlSlider-module__pagination___bicLF",Rr="ControlSlider-module__paginationInner___bT-P-",Mr="ControlSlider-module__paginationVertical___zYqKw",Pr="ControlSlider-module__paginationItem___nTRbk",Wr="ControlSlider-module__dot___p1Qun",zr="ControlSlider-module__activeDot___LHFaj",Hr="ControlSlider-module__paginationInsideBottom___R3FWn",Vr="ControlSlider-module__paginationInsideTop___V-qb-",Nr="ControlSlider-module__paginationOutsideBottom___14w8D",Or="ControlSlider-module__paginationOutsideTop___SCLqB",jr="ControlSlider-module__paginationInsideLeft___yOBRZ",Br="ControlSlider-module__paginationInsideRight___Rtt3o",Dr="ControlSlider-module__paginationOutsideLeft___lahaw",Ur="ControlSlider-module__paginationOutsideRight___EtuQa",qr="ControlSlider-module__imgWrapper___UjEgB",Gr="ControlSlider-module__captionBlock___dJ6-j",Yr="ControlSlider-module__captionTextWrapper___HFlpf",Xr="ControlSlider-module__captionText___uGBVc",Kr="ControlSlider-module__active___WZK4G",Jr="ControlSlider-module__withPointerEvents___t-18M",Zr="ControlSlider-module__topLeftAlignment___zjnGM",Qr="ControlSlider-module__topCenterAlignment___gD1xW",ei="ControlSlider-module__topRightAlignment___NMapS",ti="ControlSlider-module__middleLeftAlignment___OnUrY",ni="ControlSlider-module__middleCenterAlignment___Tdkl0",oi="ControlSlider-module__middleRightAlignment___wEbfX",ri="ControlSlider-module__bottomLeftAlignment___cTP2-",ii="ControlSlider-module__bottomCenterAlignment___c54fB",ai="ControlSlider-module__bottomRightAlignment___kEwrz",li="ControlSlider-module__clickOverlay___DZA28",si="ControlSlider-module__contain___pLyq7",ci="ControlSlider-module__cover___KdDat",te={wrapper:Sr,hoverArrow:Cr,sliderItem:wr,sliderImage:Tr,arrow:_r,arrowVertical:$r,nextArrow:Ar,arrowInner:Er,arrowIcon:Ir,arrowImg:Lr,mirror:Fr,pagination:kr,paginationInner:Rr,paginationVertical:Mr,paginationItem:Pr,dot:Wr,activeDot:zr,paginationInsideBottom:Hr,paginationInsideTop:Vr,paginationOutsideBottom:Nr,paginationOutsideTop:Or,paginationInsideLeft:jr,paginationInsideRight:Br,paginationOutsideLeft:Dr,paginationOutsideRight:Ur,imgWrapper:qr,captionBlock:Gr,captionTextWrapper:Yr,captionText:Xr,active:Kr,withPointerEvents:Jr,topLeftAlignment:Zr,topCenterAlignment:Qr,topRightAlignment:ei,middleLeftAlignment:ti,middleCenterAlignment:ni,middleRightAlignment:oi,bottomLeftAlignment:ri,bottomCenterAlignment:ii,bottomRightAlignment:ai,clickOverlay:li,contain:si,cover:ci};function ui(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 pi(e,t,n){return t&&ui(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var io="(prefers-reduced-motion: reduce)",yt=1,di=2,xt=3,wt=4,Ht=5,Qt=6,on=7,gi={CREATED:yt,MOUNTED:di,IDLE:xt,MOVING:wt,SCROLLING:Ht,DRAGGING:Qt,DESTROYED:on};function Je(e){e.length=0}function rt(e,t,n){return Array.prototype.slice.call(e,t,n)}function he(e){return e.bind.apply(e,[null].concat(rt(arguments,1)))}var Io=setTimeout,An=function(){};function ao(e){return requestAnimationFrame(e)}function cn(e,t){return typeof t===e}function Lt(e){return!zn(e)&&cn("object",e)}var Wn=Array.isArray,Lo=he(cn,"function"),nt=he(cn,"string"),Vt=he(cn,"undefined");function zn(e){return e===null}function Fo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Nt(e){return Wn(e)?e:[e]}function Re(e,t){Nt(e).forEach(t)}function Hn(e,t){return e.indexOf(t)>-1}function en(e,t){return e.push.apply(e,Nt(t)),e}function Ye(e,t,n){e&&Re(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function Oe(e,t){Ye(e,nt(t)?t.split(" "):t,!0)}function Ot(e,t){Re(t,e.appendChild.bind(e))}function Vn(e,t){Re(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function Ft(e,t){return Fo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ko(e,t){var n=e?rt(e.children):[];return t?n.filter(function(o){return Ft(o,t)}):n}function jt(e,t){return t?ko(e,t)[0]:e.firstElementChild}var kt=Object.keys;function st(e,t,n){return e&&(n?kt(e).reverse():kt(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function Rt(e){return rt(arguments,1).forEach(function(t){st(t,function(n,o){e[o]=t[o]})}),e}function Qe(e){return rt(arguments,1).forEach(function(t){st(t,function(n,o){Wn(n)?e[o]=n.slice():Lt(n)?e[o]=Qe({},Lt(e[o])?e[o]:{},n):e[o]=n})}),e}function lo(e,t){Re(t||kt(e),function(n){delete e[n]})}function je(e,t){Re(e,function(n){Re(t,function(o){n&&n.removeAttribute(o)})})}function ae(e,t,n){Lt(t)?st(t,function(o,r){ae(e,r,o)}):Re(e,function(o){zn(n)||n===""?je(o,t):o.setAttribute(t,String(n))})}function ht(e,t,n){var o=document.createElement(e);return t&&(nt(t)?Oe(o,t):ae(o,t)),n&&Ot(n,o),o}function We(e,t,n){if(Vt(n))return getComputedStyle(e)[t];zn(n)||(e.style[t]=""+n)}function Mt(e,t){We(e,"display",t)}function Ro(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function ze(e,t){return e.getAttribute(t)}function so(e,t){return e&&e.classList.contains(t)}function Fe(e){return e.getBoundingClientRect()}function ct(e){Re(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Mo(e){return jt(new DOMParser().parseFromString(e,"text/html").body)}function Ge(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Po(e,t){return e&&e.querySelector(t)}function Nn(e,t){return t?rt(e.querySelectorAll(t)):[]}function Xe(e,t){Ye(e,t,!1)}function En(e){return e.timeStamp}function lt(e){return nt(e)?e:e?e+"px":""}var Bt="splide",On="data-"+Bt;function Et(e,t){if(!e)throw new Error("["+Bt+"] "+(t||""))}var ot=Math.min,rn=Math.max,an=Math.floor,Pt=Math.ceil,Ie=Math.abs;function Wo(e,t,n){return Ie(e-t)<n}function tn(e,t,n,o){var r=ot(t,n),l=rn(t,n);return o?r<e&&e<l:r<=e&&e<=l}function mt(e,t,n){var o=ot(t,n),r=rn(t,n);return ot(rn(o,e),r)}function In(e){return+(e>0)-+(e<0)}function Ln(e,t){return Re(t,function(n){e=e.replace("%s",""+n)}),e}function jn(e){return e<10?"0"+e:""+e}var co={};function mi(e){return""+e+jn(co[e]=(co[e]||0)+1)}function zo(){var e=[];function t(i,c,p,m){r(i,c,function(u,E,x){var h="addEventListener"in u,d=h?u.removeEventListener.bind(u,E,p,m):u.removeListener.bind(u,p);h?u.addEventListener(E,p,m):u.addListener(p),e.push([u,E,x,p,d])})}function n(i,c,p){r(i,c,function(m,u,E){e=e.filter(function(x){return x[0]===m&&x[1]===u&&x[2]===E&&(!p||x[3]===p)?(x[4](),!1):!0})})}function o(i,c,p){var m,u=!0;return typeof CustomEvent=="function"?m=new CustomEvent(c,{bubbles:u,detail:p}):(m=document.createEvent("CustomEvent"),m.initCustomEvent(c,u,!1,p)),i.dispatchEvent(m),m}function r(i,c,p){Re(i,function(m){m&&Re(c,function(u){u.split(" ").forEach(function(E){var x=E.split(".");p(m,x[0],x[1])})})})}function l(){e.forEach(function(i){i[4]()}),Je(e)}return{bind:t,unbind:n,dispatch:o,destroy:l}}var it="mounted",Fn="ready",Ze="move",Tt="moved",Bn="click",Ho="active",Vo="inactive",No="visible",Oo="hidden",Ce="refresh",Ee="updated",St="resize",un="resized",jo="drag",Bo="dragging",Do="dragged",pn="scroll",pt="scrolled",fi="overflow",Dn="destroy",Uo="arrows:mounted",qo="arrows:updated",Go="pagination:mounted",Yo="pagination:updated",Un="navigation:mounted",qn="autoplay:play",Xo="autoplay:playing",Gn="autoplay:pause",Yn="lazyload:loaded",Ko="sk",Jo="sh",ln="ei";function xe(e){var t=e?e.event.bus:document.createDocumentFragment(),n=zo();function o(l,i){n.bind(t,Nt(l).join(" "),function(c){i.apply(i,Wn(c.detail)?c.detail:[])})}function r(l){n.dispatch(t,l,rt(arguments,1))}return e&&e.event.on(Dn,n.destroy),Rt(n,{bus:t,on:o,off:he(n.unbind,t),emit:r})}function dn(e,t,n,o){var r=Date.now,l,i=0,c,p=!0,m=0;function u(){if(!p){if(i=e?ot((r()-l)/e,1):1,n&&n(i),i>=1&&(t(),l=r(),o&&++m>=o))return x();c=ao(u)}}function E(v){v||d(),l=r()-(v?i*e:0),p=!1,c=ao(u)}function x(){p=!0}function h(){l=r(),i=0,n&&n(i)}function d(){c&&cancelAnimationFrame(c),i=0,c=0,p=!0}function g(v){e=v}function C(){return p}return{start:E,rewind:h,pause:x,cancel:d,set:g,isPaused:C}}function yi(e){var t=e;function n(r){t=r}function o(r){return Hn(Nt(r),t)}return{set:n,is:o}}function hi(e,t){var n=dn(0,e,null,1);return function(){n.isPaused()&&n.start()}}function vi(e,t,n){var o=e.state,r=n.breakpoints||{},l=n.reducedMotion||{},i=zo(),c=[];function p(){var d=n.mediaQuery==="min";kt(r).sort(function(g,C){return d?+g-+C:+C-+g}).forEach(function(g){u(r[g],"("+(d?"min":"max")+"-width:"+g+"px)")}),u(l,io),E()}function m(d){d&&i.destroy()}function u(d,g){var C=matchMedia(g);i.bind(C,"change",E),c.push([d,C])}function E(){var d=o.is(on),g=n.direction,C=c.reduce(function(v,b){return Qe(v,b[1].matches?b[0]:{})},{});lo(n),h(C),n.destroy?e.destroy(n.destroy==="completely"):d?(m(!0),e.mount()):g!==n.direction&&e.refresh()}function x(d){matchMedia(io).matches&&(d?Qe(n,l):lo(n,kt(l)))}function h(d,g,C){Qe(n,d),g&&Qe(Object.getPrototypeOf(n),d),(C||!o.is(yt))&&e.emit(Ee,n)}return{setup:p,destroy:m,reduce:x,set:h}}var gn="Arrow",mn=gn+"Left",fn=gn+"Right",Zo=gn+"Up",Qo=gn+"Down",uo="rtl",yn="ttb",Sn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Zo,fn],ArrowRight:[Qo,mn]};function bi(e,t,n){function o(l,i,c){c=c||n.direction;var p=c===uo&&!i?1:c===yn?0:-1;return Sn[l]&&Sn[l][p]||l.replace(/width|left|right/i,function(m,u){var E=Sn[m.toLowerCase()][p]||m;return u>0?E.charAt(0).toUpperCase()+E.slice(1):E})}function r(l){return l*(n.direction===uo?1:-1)}return{resolve:o,orient:r}}var Ke="role",vt="tabindex",xi="disabled",He="aria-",Dt=He+"controls",er=He+"current",po=He+"selected",ke=He+"label",Xn=He+"labelledby",tr=He+"hidden",Kn=He+"orientation",Wt=He+"roledescription",go=He+"live",mo=He+"busy",fo=He+"atomic",Jn=[Ke,vt,xi,Dt,er,ke,Xn,tr,Kn,Wt],Be=Bt+"__",at="is-",Cn=Bt,yo=Be+"track",Si=Be+"list",hn=Be+"slide",nr=hn+"--clone",Ci=hn+"__container",Zn=Be+"arrows",vn=Be+"arrow",or=vn+"--prev",rr=vn+"--next",bn=Be+"pagination",ir=bn+"__page",wi=Be+"progress",Ti=wi+"__bar",_i=Be+"toggle",$i=Be+"spinner",Ai=Be+"sr",Ei=at+"initialized",ut=at+"active",ar=at+"prev",lr=at+"next",kn=at+"visible",Rn=at+"loading",sr=at+"focus-in",cr=at+"overflow",Ii=[ut,kn,ar,lr,Rn,sr,cr],Li={slide:hn,clone:nr,arrows:Zn,arrow:vn,prev:or,next:rr,pagination:bn,page:ir,spinner:$i};function Fi(e,t){if(Lo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Ft(n,t);)n=n.parentElement;return n}var ki=5,ho=200,ur="touchstart mousedown",wn="touchmove mousemove",Tn="touchend touchcancel mouseup click";function Ri(e,t,n){var o=xe(e),r=o.on,l=o.bind,i=e.root,c=n.i18n,p={},m=[],u=[],E=[],x,h,d;function g(){A(),j(),b()}function C(){r(Ce,v),r(Ce,g),r(Ee,b),l(document,ur+" keydown",function(f){d=f.type==="keydown"},{capture:!0}),l(i,"focusin",function(){Ye(i,sr,!!d)})}function v(f){var F=Jn.concat("style");Je(m),Xe(i,u),Xe(x,E),je([x,h],F),je(i,f?F:["style",Wt])}function b(){Xe(i,u),Xe(x,E),u=$(Cn),E=$(yo),Oe(i,u),Oe(x,E),ae(i,ke,n.label),ae(i,Xn,n.labelledby)}function A(){x=N("."+yo),h=jt(x,"."+Si),Et(x&&h,"A track/list element is missing."),en(m,ko(h,"."+hn+":not(."+nr+")")),st({arrows:Zn,pagination:bn,prev:or,next:rr,bar:Ti,toggle:_i},function(f,F){p[F]=N("."+f)}),Rt(p,{root:i,track:x,list:h,slides:m})}function j(){var f=i.id||mi(Bt),F=n.role;i.id=f,x.id=x.id||f+"-track",h.id=h.id||f+"-list",!ze(i,Ke)&&i.tagName!=="SECTION"&&F&&ae(i,Ke,F),ae(i,Wt,c.carousel),ae(h,Ke,"presentation")}function N(f){var F=Po(i,f);return F&&Fi(F,"."+Cn)===i?F:void 0}function $(f){return[f+"--"+n.type,f+"--"+n.direction,n.drag&&f+"--draggable",n.isNavigation&&f+"--nav",f===Cn&&ut]}return Rt(p,{setup:g,mount:C,destroy:v})}var Ct="slide",_t="loop",Ut="fade";function Mi(e,t,n,o){var r=xe(e),l=r.on,i=r.emit,c=r.bind,p=e.Components,m=e.root,u=e.options,E=u.isNavigation,x=u.updateOnMove,h=u.i18n,d=u.pagination,g=u.slideFocus,C=p.Direction.resolve,v=ze(o,"style"),b=ze(o,ke),A=n>-1,j=jt(o,"."+Ci),N;function $(){A||(o.id=m.id+"-slide"+jn(t+1),ae(o,Ke,d?"tabpanel":"group"),ae(o,Wt,h.slide),ae(o,ke,b||Ln(h.slideLabel,[t+1,e.length]))),f()}function f(){c(o,"click",he(i,Bn,I)),c(o,"keydown",he(i,Ko,I)),l([Tt,Jo,pt],R),l(Un,P),x&&l(Ze,O)}function F(){N=!0,r.destroy(),Xe(o,Ii),je(o,Jn),ae(o,"style",v),ae(o,ke,b||"")}function P(){var L=e.splides.map(function(_){var z=_.splide.Components.Slides.getAt(t);return z?z.slide.id:""}).join(" ");ae(o,ke,Ln(h.slideX,(A?n:t)+1)),ae(o,Dt,L),ae(o,Ke,g?"button":""),g&&je(o,Wt)}function O(){N||R()}function R(){if(!N){var L=e.index;V(),W(),Ye(o,ar,t===L-1),Ye(o,lr,t===L+1)}}function V(){var L=G();L!==so(o,ut)&&(Ye(o,ut,L),ae(o,er,E&&L||""),i(L?Ho:Vo,I))}function W(){var L=y(),_=!L&&(!G()||A);if(e.state.is([wt,Ht])||ae(o,tr,_||""),ae(Nn(o,u.focusableNodes||""),vt,_?-1:""),g&&ae(o,vt,_?-1:0),L!==so(o,kn)&&(Ye(o,kn,L),i(L?No:Oo,I)),!L&&document.activeElement===o){var z=p.Slides.getAt(e.index);z&&Ro(z.slide)}}function K(L,_,z){We(z&&j||o,L,_)}function G(){var L=e.index;return L===t||u.cloneStatus&&L===n}function y(){if(e.is(Ut))return G();var L=Fe(p.Elements.track),_=Fe(o),z=C("left",!0),Z=C("right",!0);return an(L[z])<=Pt(_[z])&&an(_[Z])<=Pt(L[Z])}function k(L,_){var z=Ie(L-t);return!A&&(u.rewind||e.is(_t))&&(z=ot(z,e.length-z)),z<=_}var I={index:t,slideIndex:n,slide:o,container:j,isClone:A,mount:$,destroy:F,update:R,style:K,isWithin:k};return I}function Pi(e,t,n){var o=xe(e),r=o.on,l=o.emit,i=o.bind,c=t.Elements,p=c.slides,m=c.list,u=[];function E(){x(),r(Ce,h),r(Ce,x)}function x(){p.forEach(function(R,V){g(R,V,-1)})}function h(){N(function(R){R.destroy()}),Je(u)}function d(){N(function(R){R.update()})}function g(R,V,W){var K=Mi(e,V,W,R);K.mount(),u.push(K),u.sort(function(G,y){return G.index-y.index})}function C(R){return R?$(function(V){return!V.isClone}):u}function v(R){var V=t.Controller,W=V.toIndex(R),K=V.hasFocus()?1:n.perPage;return $(function(G){return tn(G.index,W,W+K-1)})}function b(R){return $(R)[0]}function A(R,V){Re(R,function(W){if(nt(W)&&(W=Mo(W)),Fo(W)){var K=p[V];K?Vn(W,K):Ot(m,W),Oe(W,n.classes.slide),F(W,he(l,St))}}),l(Ce)}function j(R){ct($(R).map(function(V){return V.slide})),l(Ce)}function N(R,V){C(V).forEach(R)}function $(R){return u.filter(Lo(R)?R:function(V){return nt(R)?Ft(V.slide,R):Hn(Nt(R),V.index)})}function f(R,V,W){N(function(K){K.style(R,V,W)})}function F(R,V){var W=Nn(R,"img"),K=W.length;K?W.forEach(function(G){i(G,"load error",function(){--K||V()})}):V()}function P(R){return R?p.length:u.length}function O(){return u.length>n.perPage}return{mount:E,destroy:h,update:d,register:g,get:C,getIn:v,getAt:b,add:A,remove:j,forEach:N,filter:$,style:f,getLength:P,isEnough:O}}function Wi(e,t,n){var o=xe(e),r=o.on,l=o.bind,i=o.emit,c=t.Slides,p=t.Direction.resolve,m=t.Elements,u=m.root,E=m.track,x=m.list,h=c.getAt,d=c.style,g,C,v;function b(){A(),l(window,"resize load",hi(he(i,St))),r([Ee,Ce],A),r(St,j)}function A(){g=n.direction===yn,We(u,"maxWidth",lt(n.width)),We(E,p("paddingLeft"),N(!1)),We(E,p("paddingRight"),N(!0)),j(!0)}function j(I){var L=Fe(u);(I||C.width!==L.width||C.height!==L.height)&&(We(E,"height",$()),d(p("marginRight"),lt(n.gap)),d("width",F()),d("height",P(),!0),C=L,i(un),v!==(v=k())&&(Ye(u,cr,v),i(fi,v)))}function N(I){var L=n.padding,_=p(I?"right":"left");return L&&lt(L[_]||(Lt(L)?0:L))||"0px"}function $(){var I="";return g&&(I=f(),Et(I,"height or heightRatio is missing."),I="calc("+I+" - "+N(!1)+" - "+N(!0)+")"),I}function f(){return lt(n.height||Fe(x).width*n.heightRatio)}function F(){return n.autoWidth?null:lt(n.fixedWidth)||(g?"":O())}function P(){return lt(n.fixedHeight)||(g?n.autoHeight?null:O():f())}function O(){var I=lt(n.gap);return"calc((100%"+(I&&" + "+I)+")/"+(n.perPage||1)+(I&&" - "+I)+")"}function R(){return Fe(x)[p("width")]}function V(I,L){var _=h(I||0);return _?Fe(_.slide)[p("width")]+(L?0:G()):0}function W(I,L){var _=h(I);if(_){var z=Fe(_.slide)[p("right")],Z=Fe(x)[p("left")];return Ie(z-Z)+(L?0:G())}return 0}function K(I){return W(e.length-1)-W(0)+V(0,I)}function G(){var I=h(0);return I&&parseFloat(We(I.slide,p("marginRight")))||0}function y(I){return parseFloat(We(E,p("padding"+(I?"Right":"Left"))))||0}function k(){return e.is(Ut)||K(!0)>R()}return{mount:b,resize:j,listSize:R,slideSize:V,sliderSize:K,totalSize:W,getPadding:y,isOverflow:k}}var zi=2;function Hi(e,t,n){var o=xe(e),r=o.on,l=t.Elements,i=t.Slides,c=t.Direction.resolve,p=[],m;function u(){r(Ce,E),r([Ee,St],h),(m=C())&&(d(m),t.Layout.resize(!0))}function E(){x(),u()}function x(){ct(p),Je(p),o.destroy()}function h(){var v=C();m!==v&&(m<v||!v)&&o.emit(Ce)}function d(v){var b=i.get().slice(),A=b.length;if(A){for(;b.length<v;)en(b,b);en(b.slice(-v),b.slice(0,v)).forEach(function(j,N){var $=N<v,f=g(j.slide,N);$?Vn(f,b[0].slide):Ot(l.list,f),en(p,f),i.register(f,N-v+($?0:A),j.index)})}}function g(v,b){var A=v.cloneNode(!0);return Oe(A,n.classes.clone),A.id=e.root.id+"-clone"+jn(b+1),A}function C(){var v=n.clones;if(!e.is(_t))v=0;else if(Vt(v)){var b=n[c("fixedWidth")]&&t.Layout.slideSize(0),A=b&&Pt(Fe(l.track)[c("width")]/b);v=A||n[c("autoWidth")]&&e.length||n.perPage*zi}return v}return{mount:u,destroy:x}}function Vi(e,t,n){var o=xe(e),r=o.on,l=o.emit,i=e.state.set,c=t.Layout,p=c.slideSize,m=c.getPadding,u=c.totalSize,E=c.listSize,x=c.sliderSize,h=t.Direction,d=h.resolve,g=h.orient,C=t.Elements,v=C.list,b=C.track,A;function j(){A=t.Transition,r([it,un,Ee,Ce],N)}function N(){t.Controller.isBusy()||(t.Scroll.cancel(),f(e.index),t.Slides.update())}function $(_,z,Z,se){_!==z&&I(_>Z)&&(R(),F(O(K(),_>Z),!0)),i(wt),l(Ze,z,Z,_),A.start(z,function(){i(xt),l(Tt,z,Z,_),se&&se()})}function f(_){F(W(_,!0))}function F(_,z){if(!e.is(Ut)){var Z=z?_:P(_);We(v,"transform","translate"+d("X")+"("+Z+"px)"),_!==Z&&l(Jo)}}function P(_){if(e.is(_t)){var z=V(_),Z=z>t.Controller.getEnd(),se=z<0;(se||Z)&&(_=O(_,Z))}return _}function O(_,z){var Z=_-k(z),se=x();return _-=g(se*(Pt(Ie(Z)/se)||1))*(z?1:-1),_}function R(){F(K(),!0),A.cancel()}function V(_){for(var z=t.Slides.get(),Z=0,se=1/0,ie=0;ie<z.length;ie++){var le=z[ie].index,H=Ie(W(le,!0)-_);if(H<=se)se=H,Z=le;else break}return Z}function W(_,z){var Z=g(u(_-1)-y(_));return z?G(Z):Z}function K(){var _=d("left");return Fe(v)[_]-Fe(b)[_]+g(m(!1))}function G(_){return n.trimSpace&&e.is(Ct)&&(_=mt(_,0,g(x(!0)-E()))),_}function y(_){var z=n.focus;return z==="center"?(E()-p(_,!0))/2:+z*p(_)||0}function k(_){return W(_?t.Controller.getEnd():0,!!n.trimSpace)}function I(_){var z=g(O(K(),_));return _?z>=0:z<=v[d("scrollWidth")]-Fe(b)[d("width")]}function L(_,z){z=Vt(z)?K():z;var Z=_!==!0&&g(z)<g(k(!1)),se=_!==!1&&g(z)>g(k(!0));return Z||se}return{mount:j,move:$,jump:f,translate:F,shift:O,cancel:R,toIndex:V,toPosition:W,getPosition:K,getLimit:k,exceededLimit:L,reposition:N}}function Ni(e,t,n){var o=xe(e),r=o.on,l=o.emit,i=t.Move,c=i.getPosition,p=i.getLimit,m=i.toPosition,u=t.Slides,E=u.isEnough,x=u.getLength,h=n.omitEnd,d=e.is(_t),g=e.is(Ct),C=he(K,!1),v=he(K,!0),b=n.start||0,A,j=b,N,$,f;function F(){P(),r([Ee,Ce,ln],P),r(un,O)}function P(){N=x(!0),$=n.perMove,f=n.perPage,A=I();var H=mt(b,0,h?A:N-1);H!==b&&(b=H,i.reposition())}function O(){A!==I()&&l(ln)}function R(H,re,de){if(!le()){var ce=W(H),ye=k(ce);ye>-1&&(re||ye!==b)&&(Z(ye),i.move(ce,ye,j,de))}}function V(H,re,de,ce){t.Scroll.scroll(H,re,de,function(){var ye=k(i.toIndex(c()));Z(h?ot(ye,A):ye),ce&&ce()})}function W(H){var re=b;if(nt(H)){var de=H.match(/([+\-<>])(\d+)?/)||[],ce=de[1],ye=de[2];ce==="+"||ce==="-"?re=G(b+ +(""+ce+(+ye||1)),b):ce===">"?re=ye?L(+ye):C(!0):ce==="<"&&(re=v(!0))}else re=d?H:mt(H,0,A);return re}function K(H,re){var de=$||(ie()?1:f),ce=G(b+de*(H?-1:1),b,!($||ie()));return ce===-1&&g&&!Wo(c(),p(!H),1)?H?0:A:re?ce:k(ce)}function G(H,re,de){if(E()||ie()){var ce=y(H);ce!==H&&(re=H,H=ce,de=!1),H<0||H>A?!$&&(tn(0,H,re,!0)||tn(A,re,H,!0))?H=L(_(H)):d?H=de?H<0?-(N%f||f):N:H:n.rewind?H=H<0?A:0:H=-1:de&&H!==re&&(H=L(_(re)+(H<re?-1:1)))}else H=-1;return H}function y(H){if(g&&n.trimSpace==="move"&&H!==b)for(var re=c();re===m(H,!0)&&tn(H,0,e.length-1,!n.rewind);)H<b?--H:++H;return H}function k(H){return d?(H+N)%N||0:H}function I(){for(var H=N-(ie()||d&&$?1:f);h&&H-- >0;)if(m(N-1,!0)!==m(H,!0)){H++;break}return mt(H,0,N-1)}function L(H){return mt(ie()?H:f*H,0,A)}function _(H){return ie()?ot(H,A):an((H>=A?N-1:H)/f)}function z(H){var re=i.toIndex(H);return g?mt(re,0,A):re}function Z(H){H!==b&&(j=b,b=H)}function se(H){return H?j:b}function ie(){return!Vt(n.focus)||n.isNavigation}function le(){return e.state.is([wt,Ht])&&!!n.waitForTransition}return{mount:F,go:R,scroll:V,getNext:C,getPrev:v,getAdjacent:K,getEnd:I,setIndex:Z,getIndex:se,toIndex:L,toPage:_,toDest:z,hasFocus:ie,isBusy:le}}var Oi="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",Yt=40;function Bi(e,t,n){var o=xe(e),r=o.on,l=o.bind,i=o.emit,c=n.classes,p=n.i18n,m=t.Elements,u=t.Controller,E=m.arrows,x=m.track,h=E,d=m.prev,g=m.next,C,v,b={};function A(){N(),r(Ee,j)}function j(){$(),A()}function N(){var V=n.arrows;V&&!(d&&g)&&P(),d&&g&&(Rt(b,{prev:d,next:g}),Mt(h,V?"":"none"),Oe(h,v=Zn+"--"+n.direction),V&&(f(),R(),ae([d,g],Dt,x.id),i(Uo,d,g)))}function $(){o.destroy(),Xe(h,v),C?(ct(E?[d,g]:h),d=g=null):je([d,g],Jn)}function f(){r([it,Tt,Ce,pt,ln],R),l(g,"click",he(F,">")),l(d,"click",he(F,"<"))}function F(V){u.go(V,!0)}function P(){h=E||ht("div",c.arrows),d=O(!0),g=O(!1),C=!0,Ot(h,[d,g]),!E&&Vn(h,x)}function O(V){var W='<button class="'+c.arrow+" "+(V?c.prev:c.next)+'" type="button"><svg xmlns="'+Oi+'" viewBox="0 0 '+Yt+" "+Yt+'" width="'+Yt+'" height="'+Yt+'" focusable="false"><path d="'+(n.arrowPath||ji)+'" />';return Mo(W)}function R(){if(d&&g){var V=e.index,W=u.getPrev(),K=u.getNext(),G=W>-1&&V<W?p.last:p.prev,y=K>-1&&V>K?p.first:p.next;d.disabled=W<0,g.disabled=K<0,ae(d,ke,G),ae(g,ke,y),i(qo,d,g,W,K)}}return{arrows:b,mount:A,destroy:$,update:R}}var Di=On+"-interval";function Ui(e,t,n){var o=xe(e),r=o.on,l=o.bind,i=o.emit,c=dn(n.interval,e.go.bind(e,">"),f),p=c.isPaused,m=t.Elements,u=t.Elements,E=u.root,x=u.toggle,h=n.autoplay,d,g,C=h==="pause";function v(){h&&(b(),x&&ae(x,Dt,m.track.id),C||A(),$())}function b(){n.pauseOnHover&&l(E,"mouseenter mouseleave",function(P){d=P.type==="mouseenter",N()}),n.pauseOnFocus&&l(E,"focusin focusout",function(P){g=P.type==="focusin",N()}),x&&l(x,"click",function(){C?A():j(!0)}),r([Ze,pn,Ce],c.rewind),r(Ze,F)}function A(){p()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),g=d=C=!1,$(),i(qn))}function j(P){P===void 0&&(P=!0),C=!!P,$(),p()||(c.pause(),i(Gn))}function N(){C||(d||g?j(!1):A())}function $(){x&&(Ye(x,ut,!C),ae(x,ke,n.i18n[C?"play":"pause"]))}function f(P){var O=m.bar;O&&We(O,"width",P*100+"%"),i(Xo,P)}function F(P){var O=t.Slides.getAt(P);c.set(O&&+ze(O.slide,Di)||n.interval)}return{mount:v,destroy:c.cancel,play:A,pause:j,isPaused:p}}function qi(e,t,n){var o=xe(e),r=o.on;function l(){n.cover&&(r(Yn,he(c,!0)),r([it,Ee,Ce],he(i,!0)))}function i(p){t.Slides.forEach(function(m){var u=jt(m.container||m.slide,"img");u&&u.src&&c(p,u,m)})}function c(p,m,u){u.style("background",p?'center/cover no-repeat url("'+m.src+'")':"",!0),Mt(m,p?"none":"")}return{mount:l,destroy:he(i,!1)}}var Gi=10,Yi=600,Xi=.6,Ki=1.5,Ji=800;function Zi(e,t,n){var o=xe(e),r=o.on,l=o.emit,i=e.state.set,c=t.Move,p=c.getPosition,m=c.getLimit,u=c.exceededLimit,E=c.translate,x=e.is(Ct),h,d,g=1;function C(){r(Ze,j),r([Ee,Ce],N)}function v(f,F,P,O,R){var V=p();if(j(),P&&(!x||!u())){var W=t.Layout.sliderSize(),K=In(f)*W*an(Ie(f)/W)||0;f=c.toPosition(t.Controller.toDest(f%W))+K}var G=Wo(V,f,1);g=1,F=G?0:F||rn(Ie(f-V)/Ki,Ji),d=O,h=dn(F,b,he(A,V,f,R),1),i(Ht),l(pn),h.start()}function b(){i(xt),d&&d(),l(pt)}function A(f,F,P,O){var R=p(),V=f+(F-f)*$(O),W=(V-R)*g;E(R+W),x&&!P&&u()&&(g*=Xi,Ie(W)<Gi&&v(m(u(!0)),Yi,!1,d,!0))}function j(){h&&h.cancel()}function N(){h&&!h.isPaused()&&(j(),b())}function $(f){var F=n.easingFunc;return F?F(f):1-Math.pow(1-f,4)}return{mount:C,destroy:j,scroll:v,cancel:N}}var ft={passive:!1,capture:!0};function Qi(e,t,n){var o=xe(e),r=o.on,l=o.emit,i=o.bind,c=o.unbind,p=e.state,m=t.Move,u=t.Scroll,E=t.Controller,x=t.Elements.track,h=t.Media.reduce,d=t.Direction,g=d.resolve,C=d.orient,v=m.getPosition,b=m.exceededLimit,A,j,N,$,f,F=!1,P,O,R;function V(){i(x,wn,An,ft),i(x,Tn,An,ft),i(x,ur,K,ft),i(x,"click",k,{capture:!0}),i(x,"dragstart",Ge),r([it,Ee],W)}function W(){var D=n.drag;$e(!D),$=D==="free"}function K(D){if(P=!1,!O){var s=ye(D);ce(D.target)&&(s||!D.button)&&(E.isBusy()?Ge(D,!0):(R=s?x:window,f=p.is([wt,Ht]),N=null,i(R,wn,G,ft),i(R,Tn,y,ft),m.cancel(),u.cancel(),I(D)))}}function G(D){if(p.is(Qt)||(p.set(Qt),l(jo)),D.cancelable)if(f){m.translate(A+de(ie(D)));var s=le(D)>ho,M=F!==(F=b());(s||M)&&I(D),P=!0,l(Bo),Ge(D)}else z(D)&&(f=_(D),Ge(D))}function y(D){p.is(Qt)&&(p.set(xt),l(Do)),f&&(L(D),Ge(D)),c(R,wn,G),c(R,Tn,y),f=!1}function k(D){!O&&P&&Ge(D,!0)}function I(D){N=j,j=D,A=v()}function L(D){var s=Z(D),M=se(s),Y=n.rewind&&n.rewindByDrag;h(!1),$?E.scroll(M,0,n.snap):e.is(Ut)?E.go(C(In(s))<0?Y?"<":"-":Y?">":"+"):e.is(Ct)&&F&&Y?E.go(b(!0)?">":"<"):E.go(E.toDest(M),!0),h(!0)}function _(D){var s=n.dragMinThreshold,M=Lt(s),Y=M&&s.mouse||0,ee=(M?s.touch:+s)||10;return Ie(ie(D))>(ye(D)?ee:Y)}function z(D){return Ie(ie(D))>Ie(ie(D,!0))}function Z(D){if(e.is(_t)||!F){var s=le(D);if(s&&s<ho)return ie(D)/s}return 0}function se(D){return v()+In(D)*ot(Ie(D)*(n.flickPower||600),$?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function ie(D,s){return re(D,s)-re(H(D),s)}function le(D){return En(D)-En(H(D))}function H(D){return j===D&&N||j}function re(D,s){return(ye(D)?D.changedTouches[0]:D)["page"+g(s?"Y":"X")]}function de(D){return D/(F&&e.is(Ct)?ki:1)}function ce(D){var s=n.noDrag;return!Ft(D,"."+ir+", ."+vn)&&(!s||!Ft(D,s))}function ye(D){return typeof TouchEvent<"u"&&D instanceof TouchEvent}function ve(){return f}function $e(D){O=D}return{mount:V,disable:$e,isDragging:ve}}var ea={Spacebar:" ",Right:fn,Left:mn,Up:Zo,Down:Qo};function Qn(e){return e=nt(e)?e:e.key,ea[e]||e}var vo="keydown";function ta(e,t,n){var o=xe(e),r=o.on,l=o.bind,i=o.unbind,c=e.root,p=t.Direction.resolve,m,u;function E(){x(),r(Ee,h),r(Ee,x),r(Ze,g)}function x(){var v=n.keyboard;v&&(m=v==="global"?window:c,l(m,vo,C))}function h(){i(m,vo)}function d(v){u=v}function g(){var v=u;u=!0,Io(function(){u=v})}function C(v){if(!u){var b=Qn(v);b===p(mn)?e.go("<"):b===p(fn)&&e.go(">")}}return{mount:E,destroy:h,disable:d}}var It=On+"-lazy",nn=It+"-srcset",na="["+It+"], ["+nn+"]";function oa(e,t,n){var o=xe(e),r=o.on,l=o.off,i=o.bind,c=o.emit,p=n.lazyLoad==="sequential",m=[Tt,pt],u=[];function E(){n.lazyLoad&&(x(),r(Ce,x))}function x(){Je(u),h(),p?v():(l(m),r(m,d),d())}function h(){t.Slides.forEach(function(b){Nn(b.slide,na).forEach(function(A){var j=ze(A,It),N=ze(A,nn);if(j!==A.src||N!==A.srcset){var $=n.classes.spinner,f=A.parentElement,F=jt(f,"."+$)||ht("span",$,f);u.push([A,b,F]),A.src||Mt(A,"none")}})})}function d(){u=u.filter(function(b){var A=n.perPage*((n.preloadPages||1)+1)-1;return b[1].isWithin(e.index,A)?g(b):!0}),u.length||l(m)}function g(b){var A=b[0];Oe(b[1].slide,Rn),i(A,"load error",he(C,b)),ae(A,"src",ze(A,It)),ae(A,"srcset",ze(A,nn)),je(A,It),je(A,nn)}function C(b,A){var j=b[0],N=b[1];Xe(N.slide,Rn),A.type!=="error"&&(ct(b[2]),Mt(j,""),c(Yn,j,N),c(St)),p&&v()}function v(){u.length&&g(u.shift())}return{mount:E,destroy:he(Je,u),check:d}}function ra(e,t,n){var o=xe(e),r=o.on,l=o.emit,i=o.bind,c=t.Slides,p=t.Elements,m=t.Controller,u=m.hasFocus,E=m.getIndex,x=m.go,h=t.Direction.resolve,d=p.pagination,g=[],C,v;function b(){A(),r([Ee,Ce,ln],b);var O=n.pagination;d&&Mt(d,O?"":"none"),O&&(r([Ze,pn,pt],P),j(),P(),l(Go,{list:C,items:g},F(e.index)))}function A(){C&&(ct(d?rt(C.children):C),Xe(C,v),Je(g),C=null),o.destroy()}function j(){var O=e.length,R=n.classes,V=n.i18n,W=n.perPage,K=u()?m.getEnd()+1:Pt(O/W);C=d||ht("ul",R.pagination,p.track.parentElement),Oe(C,v=bn+"--"+f()),ae(C,Ke,"tablist"),ae(C,ke,V.select),ae(C,Kn,f()===yn?"vertical":"");for(var G=0;G<K;G++){var y=ht("li",null,C),k=ht("button",{class:R.page,type:"button"},y),I=c.getIn(G).map(function(_){return _.slide.id}),L=!u()&&W>1?V.pageX:V.slideX;i(k,"click",he(N,G)),n.paginationKeyboard&&i(k,"keydown",he($,G)),ae(y,Ke,"presentation"),ae(k,Ke,"tab"),ae(k,Dt,I.join(" ")),ae(k,ke,Ln(L,G+1)),ae(k,vt,-1),g.push({li:y,button:k,page:G})}}function N(O){x(">"+O,!0)}function $(O,R){var V=g.length,W=Qn(R),K=f(),G=-1;W===h(fn,!1,K)?G=++O%V:W===h(mn,!1,K)?G=(--O+V)%V:W==="Home"?G=0:W==="End"&&(G=V-1);var y=g[G];y&&(Ro(y.button),x(">"+G),Ge(R,!0))}function f(){return n.paginationDirection||n.direction}function F(O){return g[m.toPage(O)]}function P(){var O=F(E(!0)),R=F(E());if(O){var V=O.button;Xe(V,ut),je(V,po),ae(V,vt,-1)}if(R){var W=R.button;Oe(W,ut),ae(W,po,!0),ae(W,vt,"")}l(Yo,{list:C,items:g},O,R)}return{items:g,mount:b,destroy:A,getAt:F,update:P}}var ia=[" ","Enter"];function aa(e,t,n){var o=n.isNavigation,r=n.slideFocus,l=[];function i(){e.splides.forEach(function(d){d.isParent||(m(e,d.splide),m(d.splide,e))}),o&&u()}function c(){l.forEach(function(d){d.destroy()}),Je(l)}function p(){c(),i()}function m(d,g){var C=xe(d);C.on(Ze,function(v,b,A){g.go(g.is(_t)?A:v)}),l.push(C)}function u(){var d=xe(e),g=d.on;g(Bn,x),g(Ko,h),g([it,Ee],E),l.push(d),d.emit(Un,e.splides)}function E(){ae(t.Elements.list,Kn,n.direction===yn?"vertical":"")}function x(d){e.go(d.index)}function h(d,g){Hn(ia,Qn(g))&&(x(d),Ge(g))}return{setup:he(t.Media.set,{slideFocus:Vt(r)?o:r},!0),mount:i,destroy:c,remount:p}}function la(e,t,n){var o=xe(e),r=o.bind,l=0;function i(){n.wheel&&r(t.Elements.track,"wheel",c,ft)}function c(m){if(m.cancelable){var u=m.deltaY,E=u<0,x=En(m),h=n.wheelMinThreshold||0,d=n.wheelSleep||0;Ie(u)>h&&x-l>d&&(e.go(E?"<":">"),l=x),p(E)&&Ge(m)}}function p(m){return!n.releaseWheel||e.state.is(wt)||t.Controller.getAdjacent(m)!==-1}return{mount:i}}var sa=90;function ca(e,t,n){var o=xe(e),r=o.on,l=t.Elements.track,i=n.live&&!n.isNavigation,c=ht("span",Ai),p=dn(sa,he(u,!1));function m(){i&&(x(!t.Autoplay.isPaused()),ae(l,fo,!0),c.textContent="…",r(qn,he(x,!0)),r(Gn,he(x,!1)),r([Tt,pt],he(u,!0)))}function u(h){ae(l,mo,h),h?(Ot(l,c),p.start()):(ct(c),p.cancel())}function E(){je(l,[go,fo,mo]),ct(c)}function x(h){i&&ae(l,go,h?"off":"polite")}return{mount:m,disable:x,destroy:E}}var ua=Object.freeze({__proto__:null,Media:vi,Direction:bi,Elements:Ri,Slides:Pi,Layout:Wi,Clones:Hi,Move:Vi,Controller:Ni,Arrows:Bi,Autoplay:Ui,Cover:qi,Scroll:Zi,Drag:Qi,Keyboard:ta,LazyLoad:oa,Pagination:ra,Sync:aa,Wheel:la,Live:ca}),pa={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"},da={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:Li,i18n:pa,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ga(e,t,n){var o=t.Slides;function r(){xe(e).on([it,Ce],l)}function l(){o.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function i(c,p){o.style("transition","opacity "+n.speed+"ms "+n.easing),Io(p)}return{mount:r,start:i,cancel:An}}function ma(e,t,n){var o=t.Move,r=t.Controller,l=t.Scroll,i=t.Elements.list,c=he(We,i,"transition"),p;function m(){xe(e).bind(i,"transitionend",function(h){h.target===i&&p&&(E(),p())})}function u(h,d){var g=o.toPosition(h,!0),C=o.getPosition(),v=x(h);Ie(g-C)>=1&&v>=1?n.useScroll?l.scroll(g,v,!1,d):(c("transform "+v+"ms "+n.easing),o.translate(g,!0),p=d):(o.jump(h),d())}function E(){c(""),l.cancel()}function x(h){var d=n.rewindSpeed;if(e.is(Ct)&&d){var g=r.getIndex(!0),C=r.getEnd();if(g===0&&h>=C||g>=C&&h===0)return d}return n.speed}return{mount:m,start:u,cancel:E}}var fa=(function(){function e(n,o){this.event=xe(),this.Components={},this.state=yi(yt),this.splides=[],this._o={},this._E={};var r=nt(n)?Po(document,n):n;Et(r,r+" is invalid."),this.root=r,o=Qe({label:ze(r,ke)||"",labelledby:ze(r,Xn)||""},da,e.defaults,o||{});try{Qe(o,JSON.parse(ze(r,On)))}catch{Et(!1,"Invalid JSON")}this._o=Object.create(Qe({},o))}var t=e.prototype;return t.mount=function(o,r){var l=this,i=this.state,c=this.Components;Et(i.is([yt,on]),"Already mounted!"),i.set(yt),this._C=c,this._T=r||this._T||(this.is(Ut)?ga:ma),this._E=o||this._E;var p=Rt({},ua,this._E,{Transition:this._T});return st(p,function(m,u){var E=m(l,c,l._o);c[u]=E,E.setup&&E.setup()}),st(c,function(m){m.mount&&m.mount()}),this.emit(it),Oe(this.root,Ei),i.set(xt),this.emit(Fn),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(xt)&&(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(rt(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(Ce),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,l=this.state;return l.is(yt)?xe(this).on(Fn,this.destroy.bind(this,o)):(st(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(Dn),r.destroy(),o&&Je(this.splides),l.set(on)),this},pi(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})(),eo=fa;eo.defaults={};eo.STATES=gi;var bo=[[it,"onMounted"],[Fn,"onReady"],[Ze,"onMove"],[Tt,"onMoved"],[Bn,"onClick"],[Ho,"onActive"],[Vo,"onInactive"],[No,"onVisible"],[Oo,"onHidden"],[Ce,"onRefresh"],[Ee,"onUpdated"],[St,"onResize"],[un,"onResized"],[jo,"onDrag"],[Bo,"onDragging"],[Do,"onDragged"],[pn,"onScroll"],[pt,"onScrolled"],[Dn,"onDestroy"],[Uo,"onArrowsMounted"],[qo,"onArrowsUpdated"],[Go,"onPaginationMounted"],[Yo,"onPaginationUpdated"],[Un,"onNavigationMounted"],[qn,"onAutoplayPlay"],[Xo,"onAutoplayPlaying"],[Gn,"onAutoplayPause"],[Yn,"onLazyLoadLoaded"]];function to(...e){return e.filter(Boolean).join(" ")}function sn(e){return e!==null&&typeof e=="object"}function Mn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!Mn(n,t[o]));if(sn(e)&&sn(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!Mn(e[r],t[r]))}return e===t}function ya(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function ha(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 Pn(e,t){const n=e;return ha(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():sn(o)?n[r]=Pn(sn(n[r])?n[r]:{},o):n[r]=o}),n}var va=({children:e,className:t,...n})=>S.createElement("div",{className:to("splide__track",t),...n},S.createElement("ul",{className:"splide__list"},e)),pr=class extends S.Component{constructor(){super(...arguments),this.splideRef=S.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new eo(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Pn({},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&&!Mn(this.options,e)&&(this.splide.options=e,this.options=Pn({},e));const t=this.getSlides();ya(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){bo.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 S.createElement(t,{className:to("splide",e),ref:this.splideRef,...this.omit(r,["options",...bo.map(l=>l[1])])},n?S.createElement(va,null,o):o)}},dr=({children:e,className:t,...n})=>S.createElement("li",{className:to("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 ba="RichTextRenderer-module__link___BWeZ2",xa={link:ba},zt=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?a.jsx("a",{className:xa.link,href:o.value,target:o.target,children:t(o.children)},r):a.jsx("span",{style:Sa(o),children:o.text},r));return a.jsx(a.Fragment,{children:e.map((n,o)=>{const r=n.children;return a.jsx("div",{children:t(r)},o)})})};function Sa(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 Ca="SvgImage-module__svg___q3xE-",wa="SvgImage-module__img___VsTm-",xo={svg:Ca,img:wa},Ta=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,'\\"')}")`,tt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[l,i]=S.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return S.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(c)}},[]),!Ta(e)||!l?a.jsx("img",{src:e,alt:"",className:me(xo.img,o),style:r}):a.jsx("span",{"data-supports-mask":l,className:me(xo.svg,o),style:{"--svg":_a(e),"--fill":t,"--hover-fill":n,...r??{}}})},$a={"top-left":te.topLeftAlignment,"top-center":te.topCenterAlignment,"top-right":te.topRightAlignment,"middle-left":te.middleLeftAlignment,"middle-center":te.middleCenterAlignment,"middle-right":te.middleRightAlignment,"bottom-left":te.bottomLeftAlignment,"bottom-center":te.bottomCenterAlignment,"bottom-right":te.bottomRightAlignment};function Aa({settings:e,content:t,styles:n,isEditor:o}){const[r,l]=S.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:p,textAlign:m,wordSpacing:u,fontSizeLineHeight:E,textAppearance:x,color:h}=n.imageCaption,[d,g]=S.useState(void 0),[C,v]=S.useState(null),[b,A]=S.useState(0),[j,N]=S.useState(0),{direction:$,transition:f,controls:F,pagination:P,imageCaption:O,triggers:R}=e,V=S.useRef(f.type),{x:W,y:K}=e.controls.offset,G=y=>{r&&r.go(y)};return S.useEffect(()=>{if(!C)return;const y=new ResizeObserver(k=>{if(!r)return;const[I]=k;g({width:Math.round(I.contentRect.width),height:Math.round(I.contentRect.height)})});return y.observe(C),()=>y.unobserve(C)},[C]),S.useEffect(()=>{!r||V.current===f.type||(N(y=>y+1),V.current=f.type)},[f.type]),a.jsx("div",{className:me(te.wrapper,{[te.editor]:o}),ref:v,children:a.jsxs("div",{className:te.sliderInner,style:{width:d?d.width:"100%",height:d?d.height:"100%",backgroundColor:f.backgroundColor&&f.type==="fade in"?f.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:me(te.captionBlock),children:a.jsx("div",{className:te.captionTextWrapper,children:t.map((y,k)=>a.jsx("div",{className:me(te.captionText,$a[O.alignment],{[te.withPointerEvents]:k===b&&o,[te.active]:k===b}),style:{fontFamily:c.fontFamily,fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:i.sizing==="auto"?"max-content":w.scalingValue(i.width,o),letterSpacing:w.scalingValue(p,o),wordSpacing:w.scalingValue(u,o),textAlign:m,fontSize:w.scalingValue(E.fontSize,o),lineHeight:w.scalingValue(E.lineHeight,o),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:h,transitionDuration:f.duration?`${Math.round(parseInt(f.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:te.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:a.jsx(zt,{content:y.imageCaption})})},k))})}),a.jsx(pr,{onMove:y=>{A(y.index)},ref:l,options:{arrows:!1,speed:f.duration?parseInt(f.duration):500,autoplay:R.autoPlay!==null,...R.autoPlay!==null&&{interval:parseInt(R.autoPlay)*1e3},direction:$==="horiz"||f.type==="fade in"?"ltr":"ttb",pagination:!1,drag:R.triggersList.drag,perPage:1,width:d?d.width:"100%",height:d?d.height:"100%",type:f.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((y,k)=>a.jsx(dr,{children:a.jsx("div",{className:te.sliderItem,children:a.jsx("div",{className:te.imgWrapper,children:a.jsx("img",{className:me(te.sliderImage,{[te.contain]:y.image.objectFit==="contain",[te.cover]:y.image.objectFit==="cover"}),src:y.image.url,alt:y.image.name??""})})})},k))},j),F.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:me(te.arrow,{[te.arrowVertical]:$==="vert",[te.hoverArrow]:F.show==="on hover"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:a.jsxs("button",{onClick:()=>{G("-1")},className:te.arrowInner,style:{transform:`translate(${w.scalingValue(W,o)}, ${w.scalingValue(K*($==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${$==="horiz"?"0deg":"90deg"})`},children:[F.arrowsImgUrl&&a.jsx(tt,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:me(te.arrowImg,te.mirror)}),!F.arrowsImgUrl&&a.jsx(So,{color:F.color,className:me(te.arrowIcon,te.arrowImg,te.mirror)})]})}),a.jsx("div",{className:me(te.arrow,te.nextArrow,{[te.arrowVertical]:$==="vert",[te.hoverArrow]:F.show==="on hover"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:a.jsxs("button",{className:te.arrowInner,onClick:()=>G("+1"),style:{transform:`translate(${w.scalingValue(W*($==="horiz"?-1:1),o)}, ${w.scalingValue(K,o)}) scale(${e.controls.scale/100}) rotate(${$==="horiz"?"0deg":"90deg"})`},children:[F.arrowsImgUrl&&a.jsx(tt,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:te.arrowImg}),!F.arrowsImgUrl&&a.jsx(So,{color:F.color,className:me(te.arrowIcon,te.arrowImg)})]})})]}),R.triggersList.click&&a.jsx("div",{className:te.clickOverlay,onClick:()=>{r&&r.go("+1")}}),P.isActive&&a.jsx("div",{className:me(te.pagination,{[te.paginationInsideBottom]:P.position==="inside-1"&&$==="horiz",[te.paginationInsideTop]:P.position==="inside-2"&&$==="horiz",[te.paginationOutsideBottom]:P.position==="outside-1"&&$==="horiz",[te.paginationOutsideTop]:P.position==="outside-2"&&$==="horiz",[te.paginationInsideLeft]:P.position==="inside-1"&&$==="vert",[te.paginationInsideRight]:P.position==="inside-2"&&$==="vert",[te.paginationOutsideLeft]:P.position==="outside-1"&&$==="vert",[te.paginationOutsideRight]:P.position==="outside-2"&&$==="vert",[te.paginationVertical]:$==="vert"}),children:a.jsx("div",{className:te.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((y,k)=>a.jsx("button",{onClick:()=>{r&&r.go(k)},className:me(te.paginationItem),children:a.jsx("div",{className:me(te.dot,{[te.activeDot]:k===b}),style:{backgroundColor:k===b?P.colors[0]:P.colors[1],"--pagination-hover-color":P.hover}})},k))})})]})})}function So({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.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 Ea={element:Aa,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"]}},Ia="ImageRevealSlider-module__imageRevealSlider___UE5Ob",La="ImageRevealSlider-module__image___Qjt-e",Fa="ImageRevealSlider-module__link___N-iLG",ka="ImageRevealSlider-module__cursor___2U03d",gt={imageRevealSlider:Ia,image:La,link:Fa,cursor:ka};function Co(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const l=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*l,c=l/2,p=i/2;if(e>=o.x-c&&e<=o.x+c&&t>=o.y-p&&t<=o.y+p)return!0}return!1}function _n(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ra(e,t,n,o){let r,l;if(t==="custom"){r=n;const i=await _n(e);l=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await _n(e);l=i.height/i.width*r}else{const i=await _n(e);r=i.width,l=i.height}return{width:r,height:l,finalWidth:`${r}px`}}function Ma({settings:e,content:t,isEditor:n}){const[o,r]=S.useState(null),[l,i]=S.useState([]),[c,p]=S.useState(0),m=S.useRef(0),[u,E]=S.useState({x:0,y:0}),[x,h]=S.useState(1),[d,g]=S.useState("none"),C=S.useRef({x:0,y:0}),[v,b]=S.useState(!1),{sizeType:A,imageWidth:j,randomRangeImageWidth:N}=e.imageSize,{revealPosition:$,visible:f}=e.position,{cursorType:F,target:P,defaultCursorScale:O,defaultCursor:R,hoverCursorScale:V,hoverCursor:W}=e.cursor;S.useEffect(()=>{if(!o)return;const y=(L,_)=>{const z=o.getBoundingClientRect(),Z=L-z.left,se=_-z.top;if(E({x:Z,y:se}),F==="system"){g("none"),h(1);return}const ie=Z,le=se,H=document.elementFromPoint(z.left+ie,z.top+le);if(H&&H.closest("a")){g("none"),h(1);return}const re=Co(ie,le,l)||P==="area"?{img:W??"none",scale:V}:{img:R??"none",scale:O};g(re.img),h(re.scale)},k=L=>{L.stopPropagation(),C.current={x:L.clientX,y:L.clientY},y(L.clientX,L.clientY)},I=()=>{v&&y(C.current.x,C.current.y)};return o.addEventListener("mousemove",k),window.addEventListener("scroll",I,!0),()=>{o.removeEventListener("mousemove",k),window.removeEventListener("scroll",I,!0)}},[o,v,u,F,P,W,R,V,O,l]),S.useEffect(()=>{v||(g("none"),h(0))},[v]);const K=async(y,k,I,L={})=>{const{width:_,height:z,finalWidth:Z}=await Ra(y.image.url,A,j,N);let se=0,ie=0;$==="same"?(se=k/2,ie=I/2):(se=L.x??Math.random()*k,ie=L.y??Math.random()*I);const le=Math.min(Math.max(se,_/2),k-_/2),H=Math.min(Math.max(ie,z/2),I-z/2);return{id:m.current++,url:y.image.url,link:y.link,name:y.image.name,x:le,y:H,width:Z}};S.useEffect(()=>{if(!o||t.length===0)return;const y=o.getBoundingClientRect(),k=y.width,I=y.height,L=[];(async()=>{const z=t[0],Z=await K(z,k,I);L.push(Z),i(L),p(1)})()},[A,j,N,$,o]),S.useEffect(()=>{f==="last One"&&i(y=>y.length>0?[y[y.length-1]]:[])},[f]);const G=async y=>{if(!o)return;const k=o.getBoundingClientRect(),I=y.clientX-k.left,L=y.clientY-k.top;if(P==="image"&&!Co(I,L,l))return;let _=0,z=0;$==="on Click"?(_=I,z=L):$==="same"?(_=k.width/2,z=k.height/2):(_=Math.random()*k.width,z=Math.random()*k.height);const Z=t[c],se=await K(Z,k.width,k.height,{x:_,y:z});i(ie=>f==="all"?[...ie,se]:[se]),p(ie=>ie>=t.length-1?0:ie+1)};return a.jsxs("div",{ref:r,onClick:G,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),className:gt.imageRevealSlider,style:{cursor:d==="none"?"default":"none"},children:[l.map(y=>a.jsx("div",{className:gt.wrapper,style:{top:`${y.y}px`,left:`${y.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:y.width??"auto",height:"auto",cursor:d==="none"?"default":"none"},children:P==="area"&&y.link?a.jsx("a",{href:y.link,target:"_blank",className:gt.link,children:a.jsx("img",{src:y.url,alt:y.name,className:gt.image},y.id)}):a.jsx("img",{src:y.url,alt:y.name,className:gt.image},y.id)},y.id)),v&&a.jsx("div",{className:gt.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${d}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Pa={element:Ma,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:""}]}}}},Wa="LightBox-module__hidden___9s-9x",za="LightBox-module__heroImage___sTxNF",Ha="LightBox-module__background___rm9ml",Va="LightBox-module__editor___4ACaY",Na="LightBox-module__contentStyle___Bgnsq",Oa="LightBox-module__imageStyle___tLIlB",ja="LightBox-module__imgWrapper___LuFUp",Ba="LightBox-module__contain___8-yaS",Da="LightBox-module__cover___hNvOG",Ua="LightBox-module__caption___b6L2I",qa="LightBox-module__captionTextInner___rCGNH",Ga="LightBox-module__lightboxSplide___XFuWC",Ya="LightBox-module__arrow___iz38X",Xa="LightBox-module__arrowVertical___Zfz81",Ka="LightBox-module__nextArrow___zkAQN",Ja="LightBox-module__arrowInner___p48sW",Za="LightBox-module__arrowIcon___3VaFf",Qa="LightBox-module__arrowImg___pNV88",el="LightBox-module__mirror___pjeXc",tl="LightBox-module__thumbsWrapper___GB-nU",nl="LightBox-module__thumbsContainerVertical___wttk5",ol="LightBox-module__thumbsContainer___osSma",rl="LightBox-module__thumbsAlignStart___MO6tY",il="LightBox-module__thumbsAlignCenter___Q4sUx",al="LightBox-module__thumbsAlignEnd___p4y9R",ll="LightBox-module__thumbItem___HvnF3",sl="LightBox-module__closeButton___g2khP",cl="LightBox-module__fadeIn___0m5GW",ul="LightBox-module__slideInLeft___gPYwC",pl="LightBox-module__slideInRight___S-pPp",dl="LightBox-module__slideInTop___DFdAj",gl="LightBox-module__slideInBottom___m27kZ",ml="LightBox-module__fadeOut___55qBR",fl="LightBox-module__slideOutLeft___NvU7P",yl="LightBox-module__slideOutRight___SK7eC",hl="LightBox-module__slideOutTop___Vgg0z",vl="LightBox-module__slideOutBottom___nJ0Ef",bl="LightBox-module__scaleSlide___vZriG",q={hidden:Wa,heroImage:za,background:Ha,editor:Va,contentStyle:Na,imageStyle:Oa,imgWrapper:ja,contain:Ba,cover:Da,caption:Ua,captionTextInner:qa,lightboxSplide:Ga,arrow:Ya,arrowVertical:Xa,nextArrow:Ka,arrowInner:Ja,arrowIcon:Za,arrowImg:Qa,mirror:el,thumbsWrapper:tl,thumbsContainerVertical:nl,thumbsContainer:ol,thumbsAlignStart:rl,thumbsAlignCenter:il,thumbsAlignEnd:al,thumbItem:ll,closeButton:sl,fadeIn:cl,slideInLeft:ul,slideInRight:pl,slideInTop:dl,slideInBottom:gl,fadeOut:ml,slideOutLeft:fl,slideOutRight:yl,slideOutTop:hl,slideOutBottom:vl,scaleSlide:bl},Xt=(e,t,n)=>{const o={},[r,l]=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"),l==="left"?(o.left="0",o.right="auto"):l==="center"?(o.left="50%",o.right="auto"):l==="right"&&(o.left="auto",o.right="0"),r==="middle"&&l==="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)}))`:l==="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 gr(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 wo(e){const t=e.getBoundingClientRect(),n=gr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),l=e.naturalWidth,i=e.naturalHeight,c=o/r,p=l/i;let m,u;p>c?(m=o,u=o/p):(u=r,m=r*p);const E=t.left+n.left,x=t.top+n.top,h=(o-m)/2+E,d=(r-u)/2+x;return{x:h,y:d,width:m,height:u}}function To(e){const t=e.getBoundingClientRect(),n=gr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function _o(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 xl(e,t){const n=(()=>{if(e==="fade in")return q.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return q.slideInLeft;case"right":return q.slideInRight;case"top":return q.slideInTop;case"bottom":return q.slideInBottom;default:return q.slideInRight}return q.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return q.fadeIn;if(e==="slide in")switch(t){case"left":return q.slideInLeft;case"right":return q.slideInRight;case"top":return q.slideInTop;case"bottom":return q.slideInBottom;default:return q.slideInRight}return q.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return q.fadeOut;if(e==="slide in")switch(t){case"left":return q.slideOutLeft;case"right":return q.slideOutRight;case"top":return q.slideOutTop;case"bottom":return q.slideOutBottom;default:return q.slideOutRight}return q.fadeOut})(),l=(()=>{if(e==="fade in")return q.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return q.slideOutLeft;case"right":return q.slideOutRight;case"top":return q.slideOutTop;case"bottom":return q.slideOutBottom;default:return q.slideOutRight}return q.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:l}}const Sl=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:l})=>{const[i,c]=S.useState(!1),{url:p}=e.thumbnailBlock.cover;return S.useEffect(()=>{r==="close"&&c(!1),r==="open"&&c(!0)},[r]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:p,alt:"Cover",className:q.heroImage,onClick:()=>c(!0)}),a.jsx(Cl,{isOpen:i,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:l})]})},Cl=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:l,isEditor:i,metadata:c})=>{var D;const[p,m]=S.useState(0),[u,E]=S.useState(0),[x,h]=S.useState(!1),[d,g]=S.useState(!1),[C,v]=S.useState({}),b=S.useRef(null),A=S.useRef(null),j=S.useRef(null),N=S.useRef(!1),$=S.useRef(null),f=S.useRef(null),F=S.useRef(null),P=S.useRef(null),O=S.useRef(!1),R=S.useRef(null),[V,W]=S.useState(!1),{appear:K,triggers:G,slider:y,thumbnail:k,controls:I,area:L,caption:_,layout:z}=r.lightboxBlock,{appearClass:Z,backdropAppearClass:se,backdropDisappearClass:ie,disappearClass:le}=xl(K.type,K.direction),H=(c==null?void 0:c.itemId)??null;S.useEffect(()=>{const s=()=>{setTimeout(()=>{var Y,ee;(ee=(Y=b.current)==null?void 0:Y.splide)==null||ee.refresh()},16)},M=()=>{E(Y=>Y+1)};return window.addEventListener("ArticleEditor.Layout:change",s),window.addEventListener("ArticleEditor.ComponentContent:change",M),()=>{window.removeEventListener("ArticleEditor.Layout:change",s),window.removeEventListener("ArticleEditor.ComponentContent:change",M)}},[]),S.useEffect(()=>{if(!e||!k.isActive){W(!1);return}const s=R.current;if(!s)return;const M=()=>{y.direction==="horiz"?W(s.scrollWidth>s.clientWidth):W(s.scrollHeight>s.clientHeight)};M();const Y=new ResizeObserver(M);return Y.observe(s),()=>Y.disconnect()},[e,k.isActive,n.length,C,y.direction]);const re=S.useCallback(()=>{const s=window.matchMedia("(max-width: 768px)").matches,M=_o(L.color);s&&!i&&M>.9&&(document.body.style.backgroundColor=""),h(!0),N.current=!0;const Y=ee=>{ee.target===$.current&&ee.animationName&&($.current&&f.current&&$.current.removeEventListener("animationend",f.current),f.current=null,N.current&&(N.current=!1,t()),h(!1))};$.current&&(f.current=Y,$.current.addEventListener("animationend",Y))},[t,L.color,i]),de=(s,M,Y)=>{var ee,ne;if(s){if(G.type==="click"&&G.switch==="image")G.repeat==="close"&&p===n.length-1?re():(ee=b.current)==null||ee.go("+1");else if(G.type==="click"&&G.switch==="50/50"){const oe=s.getBoundingClientRect(),T=M-oe.left,U=Y-oe.top,B=oe.width,X=oe.height;let Q;y.direction==="horiz"?Q=T<B/2?"-1":"+1":Q=U<X/2?"-1":"+1",(ne=b.current)==null||ne.go(Q)}}},ce=s=>{if(O.current){O.current=!1;return}const M=n[p],Y=(M==null?void 0:M.image.objectFit)==="cover";let ee,ne;if("changedTouches"in s&&s.changedTouches.length>0)ee=s.changedTouches[0].clientX,ne=s.changedTouches[0].clientY;else if("clientX"in s)ee=s.clientX,ne=s.clientY;else return;let oe;if(Y&&j.current){const T=To(j.current);oe=ee>=T.left&&ee<=T.right&&ne>=T.top&&ne<=T.bottom}else{const T=j.current?wo(j.current):null;if(!T){s.target===s.currentTarget&&re();return}oe=ee>=T.x&&ee<=T.x+T.width&&ne>=T.y&&ne<=T.y+T.height}oe?de(j.current,ee,ne):re()},ye=s=>{const M=s.target;(M.classList.contains(q.thumbsWrapper)||M.classList.contains(q.thumbsContainer))&&ce(s)};S.useEffect(()=>{if(!e)return;const s=M=>{var Y,ee;if(M.key==="Escape"){re();return}if(M.key==="ArrowRight"){m(ne=>(ne+1)%Math.max(n.length,1)),(Y=b.current)==null||Y.go("+1");return}M.key==="ArrowLeft"&&(m(ne=>(ne-1+Math.max(n.length,1))%Math.max(n.length,1)),(ee=b.current)==null||ee.go("-1"))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[e,re,n.length]),S.useEffect(()=>{if(e){if(m(0),E(M=>M+1),N.current=!1,h(!1),g(!1),v({}),!H)return;const s=new CustomEvent("page-overlay",{detail:{itemId:H}});window.dispatchEvent(s)}return()=>{$.current&&f.current&&($.current.removeEventListener("animationend",f.current),f.current=null),g(!1)}},[e,H]),S.useEffect(()=>{A.current!==null&&A.current!==y.type&&E(s=>s+1),A.current=y.type},[y.type]),S.useEffect(()=>{if(!e)return;const s=document.body.style.overflow,M=window.matchMedia("(max-width: 768px)").matches,Y=_o(L.color);document.body.style.overflow="hidden",g(!1);const ee=oe=>{oe.target===$.current&&!N.current&&oe.animationName&&(M&&!i&&Y>.9&&(document.body.style.backgroundColor=L.color),g(!0),$.current&&F.current&&$.current.removeEventListener("animationend",F.current),F.current=null)};$.current&&(F.current=ee,$.current.addEventListener("animationend",ee));const ne=oe=>{const T=oe.target;T&&(T.closest(`.${q.thumbsWrapper}`)||T.closest(`.${q.thumbsContainer}`))||y.type!=="slide"&&oe.preventDefault()};return document.addEventListener("touchmove",ne,{passive:!1}),()=>{document.body.style.overflow=s,document.removeEventListener("touchmove",ne),$.current&&F.current&&($.current.removeEventListener("animationend",F.current),F.current=null),g(!1)}},[e,i,L.color,y.type]),S.useEffect(()=>{if(!e)return;const s=M=>{var ee,ne;if(N.current){M.stopPropagation();return}if(O.current){O.current=!1;return}const Y=M.target;if(!(Y&&(Y.closest(`.${q.thumbsContainer}`)||Y.closest(`.${q.thumbItem}`)))){if(y.type==="slide"&&G.type==="drag"&&((ne=(ee=b.current)==null?void 0:ee.splide)!=null&&ne.root)){const oe=b.current.splide.root;if(Y&&(oe.contains(Y)||oe===Y))return}if(M.touches.length===0&&M.changedTouches.length>0){const oe=n[p],T=(oe==null?void 0:oe.image.objectFit)==="cover",U=M.changedTouches[0];let B;if(T&&j.current){const X=To(j.current);B=U.clientX>=X.left&&U.clientX<=X.right&&U.clientY>=X.top&&U.clientY<=X.bottom}else{const X=j.current?wo(j.current):null;if(!X)return;B=U.clientX>=X.x&&U.clientX<=X.x+X.width&&U.clientY>=X.y&&U.clientY<=X.y+X.height}if(!B){M.stopPropagation(),N.current=!0;const X=Q=>{Q.stopPropagation(),Q.preventDefault(),document.removeEventListener("click",X,!0)};document.addEventListener("click",X,!0),re()}}}};return document.addEventListener("touchend",s,{passive:!0}),()=>{document.removeEventListener("touchend",s)}},[e,re,p,n]);const ve=(y.type==="scale"||y.type==="fade")&&y.direction==="vert"&&G.type==="drag";S.useEffect(()=>{var Q,pe;if(!e||!ve||!((pe=(Q=b.current)==null?void 0:Q.splide)!=null&&pe.root))return;const s=b.current.splide.root,M=30,Y=(J,ue)=>{if(P.current){const ge=Math.abs(J-P.current.x),Te=Math.abs(ue-P.current.y);(ge>0||Te>0)&&(O.current=!0)}},ee=J=>{P.current&&(J.preventDefault(),Y(J.clientX,J.clientY))},ne=J=>{P.current&&J.touches.length>0&&(J.preventDefault(),Y(J.touches[0].clientX,J.touches[0].clientY))},oe=(J,ue)=>{if(!P.current||!b.current){P.current=null;return}const ge=Math.abs(J-P.current.x),Te=Math.abs(ue-P.current.y);Te>M&&Te>ge&&b.current.go(ue<P.current.y?"+1":"-1"),P.current=null},T=J=>{P.current&&oe(J.clientX,J.clientY),document.removeEventListener("pointerup",T),document.removeEventListener("pointercancel",T),document.removeEventListener("pointermove",ee)},U=J=>{if(P.current){if(J.changedTouches.length>0){const ue=J.changedTouches[0];oe(ue.clientX,ue.clientY)}document.removeEventListener("touchend",U),document.removeEventListener("touchcancel",U),document.removeEventListener("touchmove",ne)}},B=J=>{P.current={x:J.clientX,y:J.clientY},O.current=!1,document.addEventListener("pointermove",ee,{passive:!1}),document.addEventListener("pointerup",T),document.addEventListener("pointercancel",T)},X=J=>{J.touches.length>0&&(P.current={x:J.touches[0].clientX,y:J.touches[0].clientY},O.current=!1,document.addEventListener("touchmove",ne,{passive:!1}),document.addEventListener("touchend",U),document.addEventListener("touchcancel",U))};return s.addEventListener("pointerdown",B),s.addEventListener("touchstart",X),()=>{s.removeEventListener("pointerdown",B),s.removeEventListener("touchstart",X),document.removeEventListener("pointermove",ee),document.removeEventListener("pointerup",T),document.removeEventListener("pointercancel",T),document.removeEventListener("touchmove",ne),document.removeEventListener("touchend",U),document.removeEventListener("touchcancel",U),P.current=null,O.current=!1}},[e,ve,u]);const $e={backgroundColor:L.color,backdropFilter:`blur(${L.blur}px)`,animationDuration:`${parseInt(K.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:br.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:i?null:$,className:me(q.background,x?ie:se,{[q.editor]:i},{[q.hidden]:!e}),style:{...$e,...d&&!i&&!x?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?$:null,className:me(q.contentStyle,x?le:Z,{[q.editor]:i},{[q.hidden]:!e}),style:{animationDuration:`${parseInt(K.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(pr,{onMove:s=>m(s.index),ref:b,className:q.lightboxSplide,options:{arrows:!1,speed:y.duration?parseInt(y.duration):500,direction:y.direction==="horiz"||y.type==="fade"||y.type==="scale"?"ltr":"ttb",pagination:!1,drag:G.type==="drag"&&!ve,perPage:1,width:"100%",height:"100%",type:y.type==="fade"||y.type==="scale"?"fade":"loop",padding:0,rewind:G.repeat!=="close",start:0},style:{"--splide-speed":y.duration},children:n.map((s,M)=>{const Y=Xt(z.position,z.offset,i),ee=`${w.scalingValue(z.padding.top,i)} ${w.scalingValue(z.padding.right,i)} ${w.scalingValue(z.padding.bottom,i)} ${w.scalingValue(z.padding.left,i)}`,ne=y.type==="scale"?(()=>{const{transform:oe,...T}=Y;return{...T,position:"absolute",padding:ee,boxSizing:"border-box","--position-transform":oe||"none"}})():{...Y,position:"absolute",padding:ee,boxSizing:"border-box"};return a.jsx(dr,{children:a.jsx("div",{className:q.imgWrapper,onClick:ce,children:a.jsx("img",{ref:M===p?j:null,className:me(q.imageStyle,{[q.contain]:s.image.objectFit==="contain",[q.cover]:s.image.objectFit==="cover",[q.scaleSlide]:y.type==="scale"}),src:s.image.url,alt:s.image.name??"",style:{...ne,pointerEvents:s.image.objectFit==="contain"?"none":"auto"}})})},M)})},u),I.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:me(q.arrow,{[q.arrowVertical]:y.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:a.jsxs("button",{className:q.arrowInner,style:{transform:`translate(${w.scalingValue(I.offset.x,i)}, ${w.scalingValue(I.offset.y*(y.direction==="horiz"?1:-1),i)}) scale(${I.scale}) rotate(${y.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var s;return(s=b.current)==null?void 0:s.go("-1")},"aria-label":"Previous",children:[I.arrowsImgUrl&&a.jsx(tt,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:me(q.arrowImg,q.mirror)}),!I.arrowsImgUrl&&a.jsx($o,{color:I.color,className:me(q.arrowIcon,q.arrowImg,q.mirror)})]})}),a.jsx("div",{className:me(q.arrow,q.nextArrow,{[q.arrowVertical]:y.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:a.jsxs("button",{className:q.arrowInner,style:{transform:`translate(${w.scalingValue(I.offset.x*(y.direction==="horiz"?-1:1),i)}, ${w.scalingValue(I.offset.y,i)}) scale(${I.scale}) rotate(${y.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var s;return(s=b.current)==null?void 0:s.go("+1")},"aria-label":"Next",children:[I.arrowsImgUrl&&a.jsx(tt,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:q.arrowImg}),!I.arrowsImgUrl&&a.jsx($o,{color:I.color,className:me(q.arrowIcon,q.arrowImg)})]})})]}),L.closeIconUrl&&(()=>{const s=Xt(L.closeIconAlign,L.closeIconOffset,i),M=`scale(${L.closeIconScale})`,Y=s.transform?`${s.transform} ${M}`:M;return a.jsx("button",{className:q.closeButton,style:{...s,transform:Y},onClick:re,"aria-label":"Close lightbox",children:a.jsx(tt,{url:L.closeIconUrl,fill:L.closeIconColor??"#000000",hoverFill:L.closeIconHover??"#cccccc"})})})(),_&&_.isActive&&o.imageCaption&&((D=n[p])==null?void 0:D.imageCaption)&&(()=>{const{widthSettings:s,fontSettings:M,letterSpacing:Y,textAlign:ee,wordSpacing:ne,fontSizeLineHeight:oe,textAppearance:T,color:U}=o.imageCaption;return a.jsx("div",{className:q.caption,style:{...Xt(_.alignment,_.offset,i),fontFamily:M.fontFamily,fontWeight:M.fontWeight,fontStyle:M.fontStyle,width:s.sizing==="auto"?"max-content":w.scalingValue(s.width,i),letterSpacing:w.scalingValue(Y,i),wordSpacing:w.scalingValue(ne,i),textAlign:ee,fontSize:w.scalingValue(oe.fontSize,i),lineHeight:w.scalingValue(oe.lineHeight,i),textTransform:T.textTransform??"none",textDecoration:T.textDecoration??"none",fontVariant:T.fontVariant??"normal",color:U},onClick:B=>B.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:q.captionTextInner,style:{"--link-color":_.linkColor,"--link-hover-color":_.linkHoverColor},children:a.jsx(zt,{content:n[p].imageCaption})})})})(),k.isActive&&(()=>{const[s,M]=k.position.split("-"),Y=y.direction==="horiz"?`${s}-left`:k.position,ee=Xt(Y,k.offset,i),ne=()=>{if(y.direction==="horiz"){if(M==="left")return"flex-start";if(M==="center")return"center";if(M==="right")return"flex-end"}else{if(s==="top")return"flex-start";if(s==="middle")return"center";if(s==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:R,className:q.thumbsWrapper,onClick:oe=>ye(oe),style:{position:i?"absolute":"fixed",...ee,...y.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:me(q.thumbsContainer,{[q.thumbsContainerVertical]:y.direction==="vert",[q.thumbsAlignStart]:k.align==="start",[q.thumbsAlignCenter]:k.align==="center",[q.thumbsAlignEnd]:k.align==="end"}),style:{gap:w.scalingValue(k.grid.gap,i),justifyContent:V?"flex-start":ne()},children:n.map((oe,T)=>{const U=T===p,B=C[T],Q=k.grid.size*(U?k.activeState.scale:1),pe=()=>{if(k.fit!=="fit")return{};if(!B)return y.direction==="horiz"?{height:w.scalingValue(Q,i)}:{width:w.scalingValue(Q,i)};const J=B.width/B.height;if(y.direction==="horiz"){const ue=Q,ge=ue*J;return{width:w.scalingValue(ge,i),height:w.scalingValue(ue,i)}}else{const ue=Q,ge=ue/J;return{width:w.scalingValue(ue,i),height:w.scalingValue(ge,i)}}};return a.jsx("button",{className:q.thumbItem,style:{...y.direction==="horiz"&&k.fit!=="fit"?{height:w.scalingValue(Q,i)}:{},...y.direction==="vert"&&k.fit!=="fit"?{width:w.scalingValue(Q,i)}:{},...k.fit==="cover"?{width:w.scalingValue(Q,i),height:w.scalingValue(Q,i)}:{},...pe(),transition:U?"all 0.25s ease-out":"none",opacity:U?k.activeState.opacity/100:k.opacity/100,"--thumb-hover":k.activeState.opacity/100},onClick:J=>{var ue;J.stopPropagation(),m(T),(ue=b.current)==null||ue.go(T)},onMouseEnter:()=>{var J;k.triggers==="hov"&&((J=b.current)==null||J.go(T))},children:a.jsx("img",{src:oe.image.url,alt:oe.image.name??"",onLoad:J=>{const ue=J.currentTarget;ue.naturalWidth&&ue.naturalHeight&&v(ge=>({...ge,[T]:{width:ue.naturalWidth,height:ue.naturalHeight}}))},style:{objectFit:k.fit==="cover"?"cover":"contain",...k.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...k.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${oe.image.name}-${T}`)})})})})()]})]}),document.getElementById(l))};function $o({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.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 wl={element:Sl,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 bt(e){const{color:t,...n}=e;return n}function et(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 Kt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Tl(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: ${Kt(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: ${Kt(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: ${Kt(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: ${Kt(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}=w.useScopedStyles(),{type:l="A",fieldsToShow:i=2,fields:c=[],buttonLabel:p,gap:m,fieldsGap:u,buttonCorners:E,buttonStroke:x,buttonPadding:h,isButtonFullWidth:d,inputCorners:g,inputStroke:C,inputPadding:v,inputColor:b,inputTextColor:A,inputBorderColor:j,placeholderColor:N,buttonColor:$,buttonTextColor:f,buttonBorderColor:F,labelTextColor:P,successColor:O,errorColor:R,fontFamily:V,inputFontSettings:W,inputFontSize:K,inputLineHeight:G,inputLetterSpacing:y,inputWordSpacing:k,inputTextAppearance:I,buttonFontSettings:L,buttonFontSize:_,buttonLineHeight:z,buttonLetterSpacing:Z,buttonWordSpacing:se,buttonTextAppearance:ie,labelFontSettings:le,labelFontSize:H,labelLineHeight:re,labelLetterSpacing:de,labelWordSpacing:ce,labelTextAppearance:ye,statusFontSettings:ve,statusFontSize:$e,statusLineHeight:D,statusLetterSpacing:s,statusWordSpacing:M,statusTextAppearance:Y,successMessage:ee,errorMessage:ne,stateOverrides:oe}=e,T=l==="B",U=c.slice(0,Math.min(i,c.length)),B={fontSettings:{fontFamily:V,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:K??.01,lineHeight:G,letterSpacing:y??0,wordSpacing:k??0,textAppearance:I,color:A},X=bt(et(B,t)),Q=w.scalingValue(C??0,t),pe=w.scalingValue((G??K??.01)+((v==null?void 0:v.top)??0)+((v==null?void 0:v.bottom)??0)+(l==="C"?C??0:(C??0)*2),t),J={...X,borderStyle:"solid",borderRadius:l==="C"?0:w.scalingValue(g??0,t),...l==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:Q,borderLeftWidth:0}:{borderWidth:Q},paddingTop:w.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:w.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:w.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:w.scalingValue((v==null?void 0:v.left)??0,t),height:pe,minHeight:pe},ue={fontSettings:{fontFamily:V,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:_??.01,lineHeight:z,letterSpacing:Z??0,wordSpacing:se??0,textAppearance:ie,color:f},ge=bt(et(ue,t)),Te=w.scalingValue(x??0,t),Ae={fontSettings:{fontFamily:V,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:H??.01,lineHeight:re,letterSpacing:de??0,wordSpacing:ce??0,textAppearance:ye,color:P},Le=et(Ae,t),be={fontSettings:{fontFamily:V,fontWeight:(ve==null?void 0:ve.fontWeight)??400,fontStyle:(ve==null?void 0:ve.fontStyle)??"normal"},fontSize:$e??.01,lineHeight:D,letterSpacing:s??0,wordSpacing:M??0,textAppearance:Y,color:O},Me=bt(et(be,t)),Ve=w.buildColorVars(r,{inputColor:b,inputTextColor:A,inputBorderColor:j,placeholderColor:N!=null&&N.trim()?N:"#cccccc",buttonColor:$,buttonTextColor:f,buttonBorderColor:F,labelTextColor:P,successColor:O,errorColor:R},$l,Al,oe),[we,De]=S.useState(()=>Object.fromEntries(U.map(fe=>[fe.name,""]))),[no,$t]=S.useState("idle"),[mr,qt]=S.useState(null),xn=o==="success"?"success":o==="error"?"error":no,fr=o==="error"?ne:mr,Gt=o==="filled",At=S.useMemo(()=>{if(!Gt)return we;let fe=null;for(const Ue of U)(we[Ue.name]??"").trim().length>0||(fe=fe??{...we},fe[Ue.name]="Filled");return fe??we},[we,Gt,U]),yr=xn==="error"?w.getFormFieldValidationError(U,At):null,hr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),oo=n==null?void 0:n.submitUrl,ro=(fe,Ue)=>{De(qe=>({...qe,[fe]:Ue}))},vr=async fe=>{fe.preventDefault();const Ue=Object.fromEntries(U.map(Pe=>{var dt;return[Pe.name,((dt=we[Pe.name])==null?void 0:dt.trim())??""]}).filter(([,Pe])=>Pe));if(!oo){$t("error"),qt("No integrations were found for this form.");return}if(Object.keys(Ue).length===0)return;const qe=w.getFormFieldValidationError(U,we);if(qe){$t("error"),qt(qe);return}$t("submitting"),qt(null);try{const Pe=await fetch(oo,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ue)});if(!Pe.ok){const dt=await Pe.text();throw new Error(dt||`Request failed: ${Pe.status}`)}$t("success"),De(Object.fromEntries(U.map(dt=>[dt.name,""])))}catch(Pe){$t("error"),qt(Pe instanceof Error?Pe.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${r}-type-${l} ${hr}`.trim(),style:Ve,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Tl(r)}}),a.jsxs("form",{onSubmit:vr,className:`${r}-form`,style:{gap:w.scalingValue(m??0,t)},children:[a.jsx("div",{className:`${r}-fields`,style:{gap:w.scalingValue(u??0,t)},children:U.map((fe,Ue)=>a.jsxs("div",{className:`${r}-field-group${T?` ${r}-labeled`:""}`,children:[T&&a.jsx("span",{className:`${r}-field-label`,style:Le?{...Le,lineHeight:Le.fontSize}:void 0,children:fe.label||fe.name}),fe.type==="textarea"?a.jsx("textarea",{name:fe.name,autoComplete:"off",value:At[fe.name]??"",onChange:qe=>ro(fe.name,qe.target.value),placeholder:fe.placeholder,className:`${r}-input`,style:J,rows:1,"data-filled":Gt||(At[fe.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:fe.type==="phone"?"tel":fe.type==="email"?"email":"text",name:fe.name,autoComplete:"off",value:At[fe.name]??"",onChange:qe=>ro(fe.name,qe.target.value),placeholder:fe.placeholder,required:fe.isRequired??fe.type==="email",className:`${r}-input`,style:J,"data-filled":Gt||(At[fe.name]??"").trim().length>0})]},Ue))}),a.jsx("div",{className:`${r}-overlay-anchor`,children:a.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:w.scalingValue(E??0,t),borderWidth:Te,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),...ge,...d?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${r}-overlay-anchor`,style:d?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:no==="submitting"?"...":p})})})]}),xn==="success"&&a.jsx("p",{className:`${r}-success`,style:{...Me},children:ee}),xn==="error"&&a.jsx("p",{className:`${r}-error`,style:{...Me},role:"alert",children:yr??fr??ne})]})}const $l={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"},Al=["hover","focus","filled","success","error"],El=`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
- `,Il=[{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"}],Jt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ll=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Fl={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:{...Jt.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:{...Jt.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:{...Jt.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:{...Jt.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:Il,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:[...Ll],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"]},kl={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:Fl,sourceCode:El};function Zt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rl(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;
@@ -922,16 +922,16 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
922
922
  align-items: center;
923
923
  }
924
924
  .${e}-success {
925
- margin-top: ${Zt(8)};
926
- font-size: ${Zt(14)};
925
+ margin-top: ${Yt(8)};
926
+ font-size: ${Yt(14)};
927
927
  color: var(--${e}-success-success-color, var(--${e}-success-color));
928
928
  }
929
929
  .${e}-error {
930
- margin-top: ${Zt(8)};
931
- font-size: ${Zt(14)};
930
+ margin-top: ${Yt(8)};
931
+ font-size: ${Yt(14)};
932
932
  color: var(--${e}-error-error-color, var(--${e}-error-color));
933
933
  }
934
- `}const Ml=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=w.useScopedStyles(),{fields:l=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:c,fieldsToShow:p=1,fontFamily:m,inputFontSettings:u,inputFontSize:E,inputLineHeight:x,inputLetterSpacing:h,inputWordSpacing:d,inputTextAppearance:g,buttonFontSettings:C,buttonFontSize:v,buttonLineHeight:b,buttonLetterSpacing:A,buttonWordSpacing:j,buttonTextAppearance:N,statusFontSettings:$,statusFontSize:f,statusLineHeight:F,statusLetterSpacing:P,statusWordSpacing:O,statusTextAppearance:R,iconMaxWidth:V,minHeight:W,corners:K,stroke:G,stateOverrides:y,inputPadding:k,buttonPadding:I,successMessage:L="Thanks for subscribing!",errorMessage:_="Please, fill all required fields."}=e,z=l.slice(0,Math.min(p,l.length)),[Z,se]=S.useState(()=>Object.fromEntries(z.map(be=>[be.name,""]))),[ie,le]=S.useState("idle"),[H,re]=S.useState(null),de=o==="success"?"success":o==="error"?"error":ie,ce=o==="error"?_:H,ye=o==="filled",ve=S.useMemo(()=>{if(!ye)return Z;let be=null;for(const Me of z)(Z[Me.name]??"").trim().length>0||(be=be??{...Z},be[Me.name]="Filled");return be??Z},[ye,Z,z]),$e=de==="error"?w.getFormFieldValidationError(z,ve):null,D=o&&o!=="default"?`${r}-state-${o}`:"",s=z.some(be=>(ve[be.name]??"").trim().length>0),M=D!==`${r}-state-filled`&&s?`${r}-state-filled`:"",Y=`${D} ${M}`.trim(),ee=n==null?void 0:n.submitUrl,ne=c??"",oe=(i==null?void 0:i.icon)??"",T=(i==null?void 0:i.mode)==="On",U=ne||"Submit",B={fontSettings:{fontFamily:m,fontWeight:(u==null?void 0:u.fontWeight)??400,fontStyle:(u==null?void 0:u.fontStyle)??"normal"},fontSize:E??.01,lineHeight:x,letterSpacing:h??0,wordSpacing:d??0,textAppearance:g,color:e.inputTextColor??"#111111"},X={fontSettings:{fontFamily:m,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:v??.01,lineHeight:b,letterSpacing:A??0,wordSpacing:j??0,textAppearance:N,color:e.buttonTextColor??"#ffffff"},Q={fontSettings:{fontFamily:m,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:f??.01,lineHeight:F,letterSpacing:P??0,wordSpacing:O??0,textAppearance:R,color:e.successColor??"#22c55e"},pe=bt(et(B,t)),J=bt(et(X,t)),ue=bt(et(Q,t)),ge=w.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(B==null?void 0:B.color)??"#111111",buttonTextColor:e.buttonTextColor??(X==null?void 0:X.color)??"#ffffff"},Pl,Wl,y),Te={borderRadius:w.scalingValue(K,t),borderWidth:w.scalingValue(G,t),borderStyle:"solid"},Ae={borderLeftWidth:w.scalingValue(G,t)},Le=async be=>{be.preventDefault();const Me=Object.fromEntries(z.map(we=>{var De;return[we.name,((De=Z[we.name])==null?void 0:De.trim())??""]}).filter(([,we])=>we));if(!ee){le("error"),re("No integrations were found for this form.");return}if(Object.keys(Me).length===0)return;const Ve=w.getFormFieldValidationError(z,Z);if(Ve){le("error"),re(Ve);return}le("submitting"),re(null);try{const we=await fetch(ee,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Me)});if(!we.ok){const De=await we.text();throw new Error(De||`Request failed: ${we.status}`)}le("success"),se(Object.fromEntries(z.map(De=>[De.name,""])))}catch(we){le("error"),re(we instanceof Error?we.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Y}`.trim(),style:ge,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Rl(r)}}),a.jsxs("form",{onSubmit:Le,className:`${r}-form`,style:{...Te,height:w.scalingValue(W,t),minHeight:w.scalingValue(W,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:z.map(be=>a.jsx("input",{type:be.type==="email"?"email":be.type==="phone"?"tel":"text",name:be.name,autoComplete:"off",value:ve[be.name]??"",onChange:Me=>se(Ve=>({...Ve,[be.name]:Me.target.value})),placeholder:be.placeholder,required:be.isRequired??be.type==="email",className:`${r}-input`,style:{...pe,paddingRight:w.scalingValue(k.right,t),paddingLeft:w.scalingValue(k.left,t),paddingTop:w.scalingValue(k.top,t),paddingBottom:w.scalingValue(k.bottom,t)}},be.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":U,style:{...J,...Ae,paddingRight:w.scalingValue(I.right,t),paddingLeft:w.scalingValue(I.left,t),paddingTop:w.scalingValue(I.top,t),paddingBottom:w.scalingValue(I.bottom,t)},children:ie==="submitting"?"...":T?oe&&a.jsx(tt,{url:oe,className:`${r}-submitBtnIcon`,style:{maxWidth:w.scalingValue(V??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):ne})})]}),de==="success"&&a.jsx("p",{className:`${r}-success`,style:{...ue},children:L}),de==="error"&&a.jsx("p",{className:`${r}-error`,style:{...ue},role:"alert",children:$e??ce??_})]})},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"},Wl=["hover","focus","filled","success","error"],zl=`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,192 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
1503
1503
  };
1504
1504
 
1505
1505
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1506
- `,Hl="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>'),Vl=[{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"}}}},Nl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Ol={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:Vl,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Hl},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:[...Nl],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:Ml,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:Ol,sourceCode:zl},Bl="TestimonialsGrid-module__marqueeWrapper___VC616",Dl="TestimonialsGrid-module__marqueeTrack___U0OTH",Ul="TestimonialsGrid-module__marqueeSet___L7ZdX",ql="TestimonialsGrid-module__wrapper___-JQKm",Gl="TestimonialsGrid-module__cover___3-r73",Yl="TestimonialsGrid-module__elementsOverlay___sSbJp",Xl="TestimonialsGrid-module__control___pD3e4",Ne={marqueeWrapper:Bl,marqueeTrack:Dl,marqueeSet:Ul,wrapper:ql,cover:Gl,elementsOverlay:Yl,control:Xl},Kl=30,Jl=e=>{if(typeof e=="number")return e;const t=parseFloat(String(e??""));return Number.isFinite(t)?t:0},Zl=e=>({fontSettings:{...e.fontSettings},letterSpacing:e.letterSpacing,wordSpacing:e.wordSpacing,fontSize:e.fontSizeLineHeight.fontSize,lineHeight:e.fontSizeLineHeight.lineHeight,textAppearance:e.textAppearance,color:e.color}),Ql=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{autoplay:r,align:l,speed:i,direction:c,pauseOnHover:p,gap:m,cardWidth:u,corners:E,stroke:x,strokeColor:h,bgColor:d,padding:g,logoMarginTop:C,logoWidth:v,logoHeight:b,captionMarginTop:A}=e,j=r==="on",N=j&&!o,$=Math.max(0,Jl(i))*Kl,f=T=>w.scalingValue(T,n??!1),F=S.useRef(null),P=S.useRef(null),O=S.useRef(null),[R,V]=S.useState(0),[W,K]=S.useState(0),G=S.useRef(0),y=S.useRef(!1),k=S.useRef(null),I=N&&p==="on",L=S.useRef(null),[_,z]=S.useState(0),[Z,se]=S.useState(0),ie=S.useMemo(()=>typeof c=="boolean"?c?"right":"left":String(c??"").trim().toLowerCase()==="right"?"right":"left",[c]),le=S.useRef(ie),H=T=>{var Ve;const U=(Ve=e==null?void 0:e.styles)==null?void 0:Ve[T];if(U)return U;const B=T==="text"?"text":"caption",X=e==null?void 0:e[`${B}FontFamily`],Q=e==null?void 0:e[`${B}FontSettings`],pe=e==null?void 0:e[`${B}LetterSpacing`],J=e==null?void 0:e[`${B}WordSpacing`],ue=e==null?void 0:e[`${B}TextAlign`],ge=e==null?void 0:e[`${B}TextAppearance`],Te=(e==null?void 0:e[`${B}Color`])??(T==="text"?e==null?void 0:e.textColor:void 0)??(T==="caption"?e==null?void 0:e.captionColor:void 0),Ae=e==null?void 0:e[`${B}FontSize`],Le=e==null?void 0:e[`${B}LineHeight`];return typeof X=="string"||!!Q||typeof pe=="number"||typeof J=="number"||typeof ue=="string"||!!ge||typeof Te=="string"||typeof Ae=="number"||typeof Le=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof X=="string"?X:"Arial",fontWeight:typeof(Q==null?void 0:Q.fontWeight)=="number"?Q.fontWeight:400,fontStyle:typeof(Q==null?void 0:Q.fontStyle)=="string"?Q.fontStyle:"normal"},letterSpacing:typeof pe=="number"?pe:0,wordSpacing:typeof J=="number"?J:0,textAlign:ue==="left"||ue==="center"||ue==="right"?ue:"left",fontSizeLineHeight:{fontSize:typeof Ae=="number"?Ae:.01,lineHeight:typeof Le=="number"?Le:.01},textAppearance:{textTransform:(ge==null?void 0:ge.textTransform)??"none",textDecoration:(ge==null?void 0:ge.textDecoration)??"none",fontVariant:(ge==null?void 0:ge.fontVariant)??"normal"},color:typeof Te=="string"?Te:"#000000"}:void 0},re=H("text"),de=H("caption"),ce=S.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(!!re||!!de),[t,re,de]),ye=S.useMemo(()=>!j||(t==null?void 0:t.length)===0?1:W<=0||R<=0?2:Math.max(2,Math.ceil(R/W)+1),[j,t==null?void 0:t.length,W,R]);S.useLayoutEffect(()=>{if(!j)return;const T=F.current,U=O.current;if(!T||!U)return;let B=0;const X=()=>{V(T.getBoundingClientRect().width),K(U.getBoundingClientRect().width)},Q=()=>{cancelAnimationFrame(B),B=requestAnimationFrame(X)};Q();const pe=new ResizeObserver(Q);return pe.observe(T),pe.observe(U),()=>{cancelAnimationFrame(B),pe.disconnect()}},[j,t==null?void 0:t.length]),S.useLayoutEffect(()=>{const T=P.current;if(!j||!T||!N)return;if(W<=0||$<=0){T.style.transform="translate3d(0, 0, 0)";return}le.current!==ie&&(G.current=1-G.current,le.current=ie);const U=W/$*1e3,B=ie==="left"?-W:0,X=ie==="left"?0:-W,Q=T.animate([{transform:`translate3d(${B}px, 0, 0)`},{transform:`translate3d(${X}px, 0, 0)`}],{duration:U,iterations:1/0,easing:"linear"});return Q.currentTime=G.current*U,y.current&&Q.pause(),k.current=Q,()=>{const pe=typeof Q.currentTime=="number"?Q.currentTime:0;G.current=U>0?pe/U%1:0,Q.cancel(),k.current===Q&&(k.current=null)}},[j,N,W,$,ie]);const ve=()=>{var T;I&&(y.current=!0,(T=k.current)==null||T.pause())},$e=()=>{var T;I&&(y.current=!1,(T=k.current)==null||T.play())},D=S.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),s=S.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),M=S.useCallback((T,U,B,X)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:D,width:"100%"},children:[a.jsx("div",{"data-controls":X==null?void 0:X.controlsName,"data-controls-axis":"y",className:Ne.control,style:{width:"100%",height:f((X==null?void 0:X.marginTop)??0)}}),a.jsx("div",{...X!=null&&X.dataMeasureKind?{"data-testimonial-measure":X.dataMeasureKind}:{},style:{...et(Zl(T),n),textAlign:s,pointerEvents:"auto",...typeof(X==null?void 0:X.minHeightPx)=="number"&&X.minHeightPx>0?{minHeight:X.minHeightPx}:{}},children:a.jsx(zt,{content:U})})]},B),[D,s,n,Ne.control]),Y=S.useCallback((T,U,B)=>{var X,Q,pe;return a.jsxs("div",{style:{padding:`${f(g.top)} ${f(g.right)} ${f(g.bottom)} ${f(g.left)}`,width:f(u+x*2),height:"100%",borderRadius:f(E),border:`${f(x)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:Ne.cover,style:{background:d,height:"100%"}}),a.jsxs("div",{className:Ne.elementsOverlay,style:{display:"flex",flexDirection:"column",pointerEvents:"none",alignItems:D,textAlign:s},children:[re&&T.text&&M(re,T.text,"text",B!=null&&B.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(B==null?void 0:B.textMinHeightPx)=="number"&&B.textMinHeightPx>0?{minHeightPx:B.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:D,width:"100%"},children:[a.jsx("div",{"data-controls":"logoMarginTop",className:Ne.control,style:{width:"100%",height:f(C)}}),a.jsx("div",{style:{width:f(v),height:f(b)},children:a.jsx("img",{src:(X=T.logo)==null?void 0:X.url,alt:(Q=T.logo)==null?void 0:Q.name,style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((pe=T.logo)==null?void 0:pe.objectFit)||"cover"}})})]},"logo"),de&&T.caption&&M(de,T.caption,"caption",{controlsName:"captionMarginTop",marginTop:A,...B!=null&&B.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(B==null?void 0:B.captionMinHeightPx)=="number"&&B.captionMinHeightPx>0?{minHeightPx:B.captionMinHeightPx}:{}})]})]},U)},[d,A,de,u,E,b,C,v,D,s,g.bottom,g.left,g.right,g.top,M,x,h,re,n]);S.useLayoutEffect(()=>{if(!ce){z(0),se(0);return}const T=L.current;if(!T)return;const U=()=>{const X=Array.from(T.querySelectorAll('[data-testimonial-measure="text"]')).reduce((pe,J)=>Math.max(pe,J.getBoundingClientRect().height),0),Q=Array.from(T.querySelectorAll('[data-testimonial-measure="caption"]')).reduce((pe,J)=>Math.max(pe,J.getBoundingClientRect().height),0);z(X),se(Q)};U();const B=new ResizeObserver(U);return B.observe(T),()=>{B.disconnect()}},[ce,t,Y]);const ee=ce?{textMinHeightPx:_,captionMinHeightPx:Z}:void 0,ne=ce?a.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((T,U)=>Y(T,`measure-${U}`,{dataMeasureAttrs:!0}))}):null,oe=(T,U,B)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%"},children:[Y(T,`card-${U}`,ee),n&&!B&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${f(m)})`,width:f(m),height:"100%",pointerEvents:"auto",zIndex:2}})]},U);return j&&(t!=null&&t.length)&&t.length>0?a.jsxs("div",{ref:F,className:me(Ne.wrapper,Ne.marqueeWrapper),"aria-label":"Testimonials",children:[ne,a.jsx("div",{ref:P,className:Ne.marqueeTrack,onMouseEnter:ve,onMouseLeave:$e,children:Array.from({length:ye},(T,U)=>a.jsx("div",{ref:U===0?O:void 0,className:Ne.marqueeSet,style:{gap:f(m),paddingRight:f(m)},"aria-hidden":U>0,children:t==null?void 0:t.map((B,X)=>oe(B,`${U}-${X}`,X===((t==null?void 0:t.length)??0)-1))},`set-${U}`))})]}):a.jsxs("div",{className:Ne.wrapper,children:[ne,a.jsx("div",{style:{display:"flex",flexDirection:"row",gap:f(m),justifyContent:"center",overflowX:"auto"},"aria-label":"Testimonials",children:t==null?void 0:t.map((T,U)=>oe(T,U,U===((t==null?void 0:t.length)??0)-1))})]})},es=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
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
+ .${e}-marquee-wrapper {
1508
+ overflow: hidden;
1509
+ width: 100%;
1510
+ height: 100%;
1511
+ }
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
+
1523
+ .${e}-marquee-track {
1524
+ display: flex;
1525
+ flex-direction: row;
1526
+ width: max-content;
1527
+ will-change: transform;
1528
+ backface-visibility: hidden;
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;
1545
+ }
1546
+
1547
+ .${e}-marquee-set {
1548
+ display: flex;
1549
+ flex-direction: row;
1550
+ flex: 0 0 auto;
1551
+ }
1552
+
1553
+ .${e}-wrapper {
1554
+ position: relative;
1555
+ width: 100%;
1556
+ height: 100%;
1557
+ order: 1;
1558
+ }
1559
+
1560
+ .${e}-cover {
1561
+ position: absolute;
1562
+ width: 100%;
1563
+ height: 100%;
1564
+ top: 0;
1565
+ left: 0;
1566
+ }
1567
+
1568
+ .${e}-elements-overlay {
1569
+ position: relative;
1570
+ inset: 0;
1571
+ display: flex;
1572
+ flex-direction: column;
1573
+ pointer-events: none;
1574
+ }
1575
+
1576
+ .${e}-control {
1577
+ position: relative;
1578
+ z-index: 2;
1579
+ width: 100%;
1580
+ }
1581
+
1582
+ .${e}-control::before {
1583
+ content: "";
1584
+ position: absolute;
1585
+ top: 0;
1586
+ left: 0;
1587
+ width: 100%;
1588
+ height: 100%;
1589
+ min-height: 20px;
1590
+ pointer-events: auto;
1591
+ z-index: 10;
1592
+ }
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';
1507
1594
  import cn from 'classnames';
1508
- import classes from './TestimonialsGrid.module.scss';
1509
1595
  import { CommonComponentProps } from '../props';
1510
1596
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
1511
1597
  import { scalingValue } from '../utils/scalingValue';
1512
1598
  import { textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
1599
+ import { useScopedStyles } from '../utils/useScopedStyles';
1600
+ import { readTestimonialTextMeasure } from '../utils/readTestimonialTextMeasure';
1601
+
1602
+ function getCSS(P: string): string {
1603
+ return \`
1604
+ .\${P}-marquee-wrapper {
1605
+ overflow: hidden;
1606
+ width: 100%;
1607
+ height: 100%;
1608
+ }
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
+
1620
+ .\${P}-marquee-track {
1621
+ display: flex;
1622
+ flex-direction: row;
1623
+ width: max-content;
1624
+ will-change: transform;
1625
+ backface-visibility: hidden;
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;
1642
+ }
1643
+
1644
+ .\${P}-marquee-set {
1645
+ display: flex;
1646
+ flex-direction: row;
1647
+ flex: 0 0 auto;
1648
+ }
1649
+
1650
+ .\${P}-wrapper {
1651
+ position: relative;
1652
+ width: 100%;
1653
+ height: 100%;
1654
+ order: 1;
1655
+ }
1656
+
1657
+ .\${P}-cover {
1658
+ position: absolute;
1659
+ width: 100%;
1660
+ height: 100%;
1661
+ top: 0;
1662
+ left: 0;
1663
+ }
1664
+
1665
+ .\${P}-elements-overlay {
1666
+ position: relative;
1667
+ inset: 0;
1668
+ display: flex;
1669
+ flex-direction: column;
1670
+ pointer-events: none;
1671
+ }
1672
+
1673
+ .\${P}-control {
1674
+ position: relative;
1675
+ z-index: 2;
1676
+ width: 100%;
1677
+ }
1678
+
1679
+ .\${P}-control::before {
1680
+ content: "";
1681
+ position: absolute;
1682
+ top: 0;
1683
+ left: 0;
1684
+ width: 100%;
1685
+ height: 100%;
1686
+ min-height: 20px;
1687
+ pointer-events: auto;
1688
+ z-index: 10;
1689
+ }
1690
+ \`;
1691
+ }
1513
1692
 
1514
1693
  type TestimonialsProps = {
1515
1694
  settings: TestimonialsSettings;
@@ -1518,49 +1697,8 @@ type TestimonialsProps = {
1518
1697
  isPreviewMode?: boolean;
1519
1698
  } & CommonComponentProps;
1520
1699
 
1521
- type CaptionStyleFromFlatSettings = {
1522
- fontSettings: {
1523
- fontFamily: string;
1524
- fontWeight: number;
1525
- fontStyle: string;
1526
- };
1527
- widthSettings: {
1528
- width: number;
1529
- sizing: 'auto' | 'manual';
1530
- };
1531
- letterSpacing: number;
1532
- textAlign: 'left' | 'center' | 'right';
1533
- wordSpacing: number;
1534
- fontSizeLineHeight: {
1535
- fontSize: number;
1536
- lineHeight: number;
1537
- };
1538
- textAppearance: {
1539
- textTransform: 'none' | 'uppercase' | 'lowercase';
1540
- textDecoration: 'none' | 'underline';
1541
- fontVariant: 'normal' | 'small-caps';
1542
- };
1543
- color: string;
1544
- };
1545
-
1546
1700
  const PX_PER_SEC_PER_SPEED_UNIT = 30;
1547
1701
 
1548
- const parseSpeed = (speed: unknown): number => {
1549
- if (typeof speed === 'number') return speed;
1550
- const n = parseFloat(String(speed ?? ''));
1551
- return Number.isFinite(n) ? n : 0;
1552
- };
1553
-
1554
- const resolveCaptionTextStyles = (caption: CaptionStyles): TextStyles => ({
1555
- fontSettings: { ...caption.fontSettings },
1556
- letterSpacing: caption.letterSpacing,
1557
- wordSpacing: caption.wordSpacing,
1558
- fontSize: caption.fontSizeLineHeight.fontSize,
1559
- lineHeight: caption.fontSizeLineHeight.lineHeight,
1560
- textAppearance: caption.textAppearance,
1561
- color: caption.color,
1562
- });
1563
-
1564
1702
  type RenderCardOpts = {
1565
1703
  textMinHeightPx?: number;
1566
1704
  captionMinHeightPx?: number;
@@ -1574,111 +1712,84 @@ type RenderTextOpts = {
1574
1712
  dataMeasureKind?: 'text' | 'caption';
1575
1713
  };
1576
1714
 
1577
- export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: TestimonialsProps) => {
1715
+ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }: TestimonialsProps) => {
1716
+ const { prefix: P } = useScopedStyles();
1578
1717
  const { autoplay, align, speed, direction, pauseOnHover, gap, cardWidth, corners, stroke, strokeColor, bgColor, padding, logoMarginTop, logoWidth, logoHeight, captionMarginTop } = settings;
1579
- const isAutoplay = autoplay === 'on';
1580
- const isAnimating = isAutoplay && !isPreviewMode;
1581
- const pxPerSec = Math.max(0, parseSpeed(speed)) * PX_PER_SEC_PER_SPEED_UNIT;
1718
+ const autoplayEnabled = autoplay === 'on' && !isPreviewMode;
1719
+ const isAnimating = autoplayEnabled;
1720
+ const pxPerSec = Math.max(0, speed) * PX_PER_SEC_PER_SPEED_UNIT;
1582
1721
  const scaled = (v: number) => scalingValue(v, isEditor ?? false);
1583
1722
  const wrapperRef = useRef<HTMLDivElement | null>(null);
1584
1723
  const trackRef = useRef<HTMLDivElement | null>(null);
1585
1724
  const setRef = useRef<HTMLDivElement | null>(null);
1586
1725
  const [containerWidth, setContainerWidth] = useState(0);
1587
1726
  const [setWidth, setSetWidth] = useState(0);
1588
- const progressRef = useRef(0);
1589
- const hoveringRef = useRef(false);
1590
- const animRef = useRef<Animation | null>(null);
1591
1727
  const hoverPauseEnabled = isAnimating && pauseOnHover === 'on';
1728
+ const [isHovering, setIsHovering] = useState(false);
1592
1729
  const measureLayerRef = useRef<HTMLDivElement>(null);
1593
1730
  const [measuredTextMinPx, setMeasuredTextMinPx] = useState(0);
1594
1731
  const [measuredCaptionMinPx, setMeasuredCaptionMinPx] = useState(0);
1732
+ const stableCandidateRef = useRef<number | null>(null);
1595
1733
 
1596
- const normalizedDirection = useMemo<'left' | 'right'>(() => {
1597
- if (typeof direction === 'boolean') return direction ? 'right' : 'left';
1598
- const d = String(direction ?? '').trim().toLowerCase();
1599
- return d === 'right' ? 'right' : 'left';
1600
- }, [direction]);
1601
-
1602
- const lastDirectionRef = useRef<'left' | 'right'>(normalizedDirection);
1603
-
1604
- const resolveCaptionStyle = (kind: 'text' | 'caption'): CaptionStyles | undefined => {
1605
- const fromNested = (settings as any)?.styles?.[kind] as CaptionStyles | undefined;
1606
- if (fromNested) return fromNested;
1607
-
1608
- const prefix = kind === 'text' ? 'text' : 'caption';
1609
- const fontFamily = (settings as any)?.[\`\${prefix}FontFamily\`];
1610
- const fontSettings = (settings as any)?.[\`\${prefix}FontSettings\`];
1611
- const letterSpacing = (settings as any)?.[\`\${prefix}LetterSpacing\`];
1612
- const wordSpacing = (settings as any)?.[\`\${prefix}WordSpacing\`];
1613
- const textAlign = (settings as any)?.[\`\${prefix}TextAlign\`];
1614
- const textAppearance = (settings as any)?.[\`\${prefix}TextAppearance\`];
1615
- const color =
1616
- (settings as any)?.[\`\${prefix}Color\`] ??
1617
- (kind === 'text' ? (settings as any)?.textColor : undefined) ??
1618
- (kind === 'caption' ? (settings as any)?.captionColor : undefined);
1619
- const fontSize = (settings as any)?.[\`\${prefix}FontSize\`];
1620
- const lineHeight = (settings as any)?.[\`\${prefix}LineHeight\`];
1621
-
1622
- const hasAnyFlat =
1623
- typeof fontFamily === 'string' ||
1624
- !!fontSettings ||
1625
- typeof letterSpacing === 'number' ||
1626
- typeof wordSpacing === 'number' ||
1627
- typeof textAlign === 'string' ||
1628
- !!textAppearance ||
1629
- typeof color === 'string' ||
1630
- typeof fontSize === 'number' ||
1631
- typeof lineHeight === 'number';
1632
- if (!hasAnyFlat) return undefined;
1633
-
1634
- const flat: CaptionStyleFromFlatSettings = {
1635
- widthSettings: { width: 0.13, sizing: 'manual' },
1734
+ const resolveTextStyle = (kind: 'text' | 'caption'): TextStyles => {
1735
+ const styles: TextStyles = {
1636
1736
  fontSettings: {
1637
- fontFamily: typeof fontFamily === 'string' ? fontFamily : 'Arial',
1638
- fontWeight: typeof fontSettings?.fontWeight === 'number' ? fontSettings.fontWeight : 400,
1639
- fontStyle: typeof fontSettings?.fontStyle === 'string' ? fontSettings.fontStyle : 'normal',
1640
- },
1641
- letterSpacing: typeof letterSpacing === 'number' ? letterSpacing : 0,
1642
- wordSpacing: typeof wordSpacing === 'number' ? wordSpacing : 0,
1643
- textAlign: (textAlign === 'left' || textAlign === 'center' || textAlign === 'right') ? textAlign : 'left',
1644
- fontSizeLineHeight: {
1645
- fontSize: typeof fontSize === 'number' ? fontSize : 0.01,
1646
- lineHeight: typeof lineHeight === 'number' ? lineHeight : 0.01,
1737
+ fontFamily: (settings as any)?.[\`\${kind}FontFamily\`] ?? 'Arial',
1738
+ fontWeight: (settings as any)?.[\`\${kind}FontSettings\`]?.fontWeight ?? 400,
1739
+ fontStyle: (settings as any)?.[\`\${kind}FontSettings\`]?.fontStyle ?? 'normal',
1647
1740
  },
1648
1741
  textAppearance: {
1649
- textTransform: textAppearance?.textTransform ?? 'none',
1650
- textDecoration: textAppearance?.textDecoration ?? 'none',
1651
- fontVariant: textAppearance?.fontVariant ?? 'normal',
1742
+ textTransform: (settings as any)?.[\`\${kind}TextAppearance\`]?.textTransform ?? 'none',
1743
+ textDecoration: (settings as any)?.[\`\${kind}TextAppearance\`]?.textDecoration ?? 'none',
1744
+ fontVariant: (settings as any)?.[\`\${kind}TextAppearance\`]?.fontVariant ?? 'normal',
1652
1745
  },
1653
- color: typeof color === 'string' ? color : '#000000',
1746
+ letterSpacing: (settings as any)?.[\`\${kind}LetterSpacing\`] ?? 0,
1747
+ wordSpacing: (settings as any)?.[\`\${kind}WordSpacing\`] ?? 0,
1748
+ fontSize: (settings as any)?.[\`\${kind}FontSize\`] ?? 0.01,
1749
+ lineHeight: (settings as any)?.[\`\${kind}LineHeight\`] ?? 0.01,
1750
+ color: (settings as any)?.[\`\${kind}Color\`] ?? '#000000',
1654
1751
  };
1655
-
1656
- return flat as CaptionStyles;
1752
+ return styles;
1657
1753
  };
1658
1754
 
1659
- const textStyle = resolveCaptionStyle('text');
1660
- const captionStyle = resolveCaptionStyle('caption');
1755
+ const textStyle = resolveTextStyle('text');
1756
+ const captionStyle = resolveTextStyle('caption');
1661
1757
 
1662
- const shouldMeasureTextExtents = useMemo(
1663
- () => (content?.length ?? 0) > 1 && (!!textStyle || !!captionStyle),
1664
- [content, textStyle, captionStyle]
1758
+ const shouldMeasureTextExtents = useMemo(() =>
1759
+ (content?.length ?? 0) > 1 &&
1760
+ (content ?? []).some((item) => (item.text?.length ?? 0) > 0 || (item.caption?.length ?? 0) > 0),
1761
+ [content]
1665
1762
  );
1666
1763
 
1667
1764
  const copies = useMemo(() => {
1668
- if (!isAutoplay || content?.length === 0) return 1;
1765
+ if (!autoplayEnabled || content?.length === 0) return 1;
1669
1766
  if (setWidth <= 0 || containerWidth <= 0) return 2;
1670
1767
  return Math.max(2, Math.ceil(containerWidth / setWidth) + 1);
1671
- }, [isAutoplay, content?.length, setWidth, containerWidth]);
1768
+ }, [autoplayEnabled, content?.length, setWidth, containerWidth]);
1672
1769
 
1673
1770
  useLayoutEffect(() => {
1674
- if (!isAutoplay) return;
1771
+ if (!autoplayEnabled) return;
1675
1772
  const wrapper = wrapperRef.current;
1676
1773
  const set = setRef.current;
1677
1774
  if (!wrapper || !set) return;
1678
1775
  let raf = 0;
1679
1776
  const measure = () => {
1680
- setContainerWidth(wrapper.getBoundingClientRect().width);
1681
- 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
+ }
1682
1793
  };
1683
1794
  const schedule = () => {
1684
1795
  cancelAnimationFrame(raf);
@@ -1692,47 +1803,25 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1692
1803
  cancelAnimationFrame(raf);
1693
1804
  ro.disconnect();
1694
1805
  };
1695
- }, [isAutoplay, content?.length]);
1806
+ }, [autoplayEnabled, setWidth]);
1696
1807
 
1697
1808
  useLayoutEffect(() => {
1698
1809
  const track = trackRef.current;
1699
- if (!isAutoplay || !track || !isAnimating) return;
1700
- if (setWidth <= 0 || pxPerSec <= 0) {
1701
- track.style.transform = 'translate3d(0, 0, 0)';
1702
- return;
1703
- }
1704
- if (lastDirectionRef.current !== normalizedDirection) {
1705
- progressRef.current = 1 - progressRef.current;
1706
- lastDirectionRef.current = normalizedDirection;
1707
- }
1708
- const duration = (setWidth / pxPerSec) * 1000;
1709
- const from = normalizedDirection === 'left' ? -setWidth : 0;
1710
- const to = normalizedDirection === 'left' ? 0 : -setWidth;
1711
- const anim = track.animate(
1712
- [{ transform: \`translate3d(\${from}px, 0, 0)\` }, { transform: \`translate3d(\${to}px, 0, 0)\` }],
1713
- { duration, iterations: Infinity, easing: 'linear' }
1714
- );
1715
- anim.currentTime = progressRef.current * duration;
1716
- if (hoveringRef.current) anim.pause();
1717
- animRef.current = anim;
1718
-
1719
- return () => {
1720
- const ct = typeof anim.currentTime === 'number' ? anim.currentTime : 0;
1721
- progressRef.current = duration > 0 ? (ct / duration) % 1 : 0;
1722
- anim.cancel();
1723
- if (animRef.current === anim) animRef.current = null;
1724
- };
1725
- }, [isAutoplay, isAnimating, setWidth, pxPerSec, normalizedDirection]);
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]);
1726
1817
 
1727
1818
  const onTrackEnter = () => {
1728
1819
  if (!hoverPauseEnabled) return;
1729
- hoveringRef.current = true;
1730
- animRef.current?.pause();
1820
+ setIsHovering(true);
1731
1821
  };
1732
1822
  const onTrackLeave = () => {
1733
1823
  if (!hoverPauseEnabled) return;
1734
- hoveringRef.current = false;
1735
- animRef.current?.play();
1824
+ setIsHovering(false);
1736
1825
  };
1737
1826
 
1738
1827
  const overlayAlignItems = useMemo(() => {
@@ -1760,7 +1849,7 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1760
1849
  }, [align]);
1761
1850
 
1762
1851
  const renderText = useCallback(
1763
- (style: CaptionStyles, richContent: any[], key: string, options?: RenderTextOpts) => (
1852
+ (style: TextStyles, richContent: any[], key: string, options?: RenderTextOpts) => (
1764
1853
  <div
1765
1854
  key={key}
1766
1855
  style={{
@@ -1773,13 +1862,13 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1773
1862
  <div
1774
1863
  data-controls={options?.controlsName}
1775
1864
  data-controls-axis="y"
1776
- className={classes.control}
1777
- style={{ width: '100%', height: scaled(options?.marginTop ?? 0) }}
1865
+ className={\`\${P}-control\`}
1866
+ style={{ height: scaled(options?.marginTop ?? 0) }}
1778
1867
  />
1779
1868
  <div
1780
1869
  {...(options?.dataMeasureKind ? { 'data-testimonial-measure': options.dataMeasureKind } : {})}
1781
1870
  style={{
1782
- ...textStylesToCss(resolveCaptionTextStyles(style), isEditor),
1871
+ ...textStylesToCss(style, isEditor),
1783
1872
  textAlign: overlayTextAlign,
1784
1873
  pointerEvents: 'auto',
1785
1874
  ...(typeof options?.minHeightPx === 'number' && options.minHeightPx > 0
@@ -1791,7 +1880,7 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1791
1880
  </div>
1792
1881
  </div>
1793
1882
  ),
1794
- [overlayAlignItems, overlayTextAlign, isEditor, classes.control]
1883
+ [overlayAlignItems, overlayTextAlign, isEditor]
1795
1884
  );
1796
1885
 
1797
1886
  const renderCard = useCallback(
@@ -1809,23 +1898,12 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1809
1898
  overflow: 'hidden',
1810
1899
  }}
1811
1900
  >
1901
+ <div className={\`\${P}-cover\`} style={{ background: bgColor }} />
1812
1902
  <div
1813
- className={classes.cover}
1814
- style={{ background: bgColor, height: '100%' }}
1815
- />
1816
- <div
1817
- className={classes.elementsOverlay}
1818
- style={{
1819
- display: 'flex',
1820
- flexDirection: 'column',
1821
- pointerEvents: 'none',
1822
- alignItems: overlayAlignItems,
1823
- textAlign: overlayTextAlign,
1824
- }}
1903
+ className={\`\${P}-elements-overlay\`}
1904
+ style={{ alignItems: overlayAlignItems, textAlign: overlayTextAlign }}
1825
1905
  >
1826
- {textStyle &&
1827
- item.text &&
1828
- renderText(
1906
+ {item.text && renderText(
1829
1907
  textStyle,
1830
1908
  item.text,
1831
1909
  'text',
@@ -1836,7 +1914,6 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1836
1914
  : undefined
1837
1915
  )}
1838
1916
  <div
1839
- key="logo"
1840
1917
  style={{
1841
1918
  display: 'flex',
1842
1919
  flexDirection: 'column',
@@ -1846,19 +1923,20 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1846
1923
  >
1847
1924
  <div
1848
1925
  data-controls="logoMarginTop"
1849
- className={classes.control}
1850
- style={{ width: '100%', height: scaled(logoMarginTop) }}
1926
+ className={\`\${P}-control\`}
1927
+ style={{ height: scaled(logoMarginTop) }}
1851
1928
  />
1852
1929
  <div style={{ width: scaled(logoWidth), height: scaled(logoHeight) }}>
1853
- <img
1854
- src={item.logo?.url}
1855
- alt={item.logo?.name}
1856
- style={{ pointerEvents: 'auto', width: '100%', height: '100%', objectFit: item.logo?.objectFit || 'cover' }}
1857
- />
1930
+ {item.logo?.url && (
1931
+ <img
1932
+ src={item.logo.url}
1933
+ alt={item.logo?.name ?? ''}
1934
+ style={{ pointerEvents: 'auto', width: '100%', height: '100%', objectFit: item.logo?.objectFit || 'contain' }}
1935
+ />
1936
+ )}
1858
1937
  </div>
1859
1938
  </div>
1860
- {captionStyle &&
1861
- item.caption &&
1939
+ {item.caption &&
1862
1940
  renderText(captionStyle, item.caption, 'caption', {
1863
1941
  controlsName: 'captionMarginTop',
1864
1942
  marginTop: captionMarginTop,
@@ -1894,36 +1972,28 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1894
1972
  ]
1895
1973
  );
1896
1974
 
1975
+ const onMeasuredExtents = useCallback((extents: { maxTextPx: number; maxCaptionPx: number }) => {
1976
+ setMeasuredTextMinPx(extents.maxTextPx);
1977
+ setMeasuredCaptionMinPx(extents.maxCaptionPx);
1978
+ }, []);
1979
+
1897
1980
  useLayoutEffect(() => {
1898
1981
  if (!shouldMeasureTextExtents) {
1899
- setMeasuredTextMinPx(0);
1900
- setMeasuredCaptionMinPx(0);
1982
+ onMeasuredExtents({ maxTextPx: 0, maxCaptionPx: 0 });
1901
1983
  return;
1902
1984
  }
1903
-
1904
1985
  const root = measureLayerRef.current;
1905
1986
  if (!root) return;
1906
-
1907
1987
  const readExtents = () => {
1908
- const maxText = Array.from(root.querySelectorAll('[data-testimonial-measure="text"]')).reduce(
1909
- (acc, el) => Math.max(acc, el.getBoundingClientRect().height),
1910
- 0
1911
- );
1912
- const maxCaption = Array.from(root.querySelectorAll('[data-testimonial-measure="caption"]')).reduce(
1913
- (acc, el) => Math.max(acc, el.getBoundingClientRect().height),
1914
- 0
1915
- );
1916
- setMeasuredTextMinPx(maxText);
1917
- setMeasuredCaptionMinPx(maxCaption);
1988
+ readTestimonialTextMeasure(root, onMeasuredExtents);
1918
1989
  };
1919
-
1920
1990
  readExtents();
1921
1991
  const ro = new ResizeObserver(readExtents);
1922
1992
  ro.observe(root);
1923
1993
  return () => {
1924
1994
  ro.disconnect();
1925
1995
  };
1926
- }, [shouldMeasureTextExtents, content, renderCard]);
1996
+ }, [shouldMeasureTextExtents, onMeasuredExtents, content, renderCard]);
1927
1997
 
1928
1998
  const visibleCardOpts: RenderCardOpts | undefined = shouldMeasureTextExtents
1929
1999
  ? { textMinHeightPx: measuredTextMinPx, captionMinHeightPx: measuredCaptionMinPx }
@@ -1947,17 +2017,21 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1947
2017
  </div>
1948
2018
  ) : null;
1949
2019
 
1950
- const renderCardWrapper = (item: TestimonialsItem, key: string | number, isLast: boolean) => (
2020
+ const renderCardWrapper = (item: TestimonialsItem, key: string | number) => (
1951
2021
  <div
1952
2022
  key={key}
1953
2023
  style={{
1954
2024
  position: 'relative',
1955
2025
  flex: '0 0 auto',
1956
2026
  height: '100%',
2027
+ transform: 'translateZ(0)',
2028
+ backfaceVisibility: 'hidden',
2029
+ WebkitBackfaceVisibility: 'hidden',
2030
+ willChange: 'transform',
1957
2031
  }}
1958
2032
  >
1959
2033
  {renderCard(item, \`card-\${key}\`, visibleCardOpts)}
1960
- {isEditor && !isLast && (
2034
+ {isEditor && (
1961
2035
  <div
1962
2036
  data-controls="gap"
1963
2037
  data-controls-axis="x"
@@ -1975,26 +2049,54 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1975
2049
  </div>
1976
2050
  );
1977
2051
 
1978
- if (isAutoplay && content?.length && content.length > 0) {
2052
+ if (autoplayEnabled && (content?.length ?? 0) > 0) {
1979
2053
  return (
1980
- <div ref={wrapperRef} className={cn(classes.wrapper, classes.marqueeWrapper)} 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
+ >
2060
+ <style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
1981
2061
  {measureLayerEl}
1982
2062
  <div
1983
2063
  ref={trackRef}
1984
- className={classes.marqueeTrack}
2064
+ className={\`\${P}-marquee-track\`}
2065
+ data-direction={direction}
1985
2066
  onMouseEnter={onTrackEnter}
1986
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
+ }}
1987
2083
  >
1988
2084
  {Array.from({ length: copies }, (_, copyIndex) => (
1989
2085
  <div
1990
2086
  key={\`set-\${copyIndex}\`}
1991
2087
  ref={copyIndex === 0 ? setRef : undefined}
1992
- className={classes.marqueeSet}
1993
- style={{ gap: scaled(gap), paddingRight: scaled(gap) }}
2088
+ className={\`\${P}-marquee-set\`}
2089
+ style={{
2090
+ display: 'flex',
2091
+ flexDirection: 'row',
2092
+ flex: '0 0 auto',
2093
+ gap: scaled(gap),
2094
+ paddingRight: scaled(gap),
2095
+ }}
1994
2096
  aria-hidden={copyIndex > 0}
1995
2097
  >
1996
2098
  {content?.map((item: TestimonialsItem, index: number) =>
1997
- renderCardWrapper(item, \`\${copyIndex}-\${index}\`, index === (content?.length ?? 0) - 1)
2099
+ renderCardWrapper(item, \`\${copyIndex}-\${index}\`)
1998
2100
  )}
1999
2101
  </div>
2000
2102
  ))}
@@ -2004,20 +2106,21 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
2004
2106
  }
2005
2107
 
2006
2108
  return (
2007
- <div className={classes.wrapper}>
2109
+ <div className={\`\${P}-wrapper\`}>
2110
+ <style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
2008
2111
  {measureLayerEl}
2009
2112
  <div
2010
2113
  style={{
2011
- display: 'flex',
2012
- flexDirection: 'row',
2013
2114
  gap: scaled(gap),
2014
2115
  justifyContent: 'center',
2015
2116
  overflowX: 'auto',
2117
+ display: 'flex',
2118
+ flexDirection: 'row',
2016
2119
  }}
2017
2120
  aria-label="Testimonials"
2018
2121
  >
2019
2122
  {content?.map((item: TestimonialsItem, index: number) =>
2020
- renderCardWrapper(item, index, index === (content?.length ?? 0) - 1)
2123
+ renderCardWrapper(item, index)
2021
2124
  )}
2022
2125
  </div>
2023
2126
  </div>
@@ -2058,45 +2161,286 @@ type TestimonialsSettings = {
2058
2161
  logoWidth: number;
2059
2162
  logoHeight: number;
2060
2163
  captionMarginTop: number;
2061
- styles: TestimonialsStyles;
2062
2164
  };
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`
2166
+ .${e}-container {
2167
+ overflow-x: clip;
2168
+ display: flex;
2169
+ height: 100%;
2170
+ width: 100%;
2171
+ flex-direction: column;
2172
+ align-items: center;
2173
+ }
2063
2174
 
2064
- type CaptionStyles = {
2065
- fontSettings: {
2066
- fontFamily: string;
2067
- fontWeight: number;
2068
- fontStyle: string;
2069
- };
2070
- widthSettings: {
2071
- width: number;
2072
- sizing: 'auto' | 'manual';
2073
- };
2074
- letterSpacing: number;
2075
- textAlign: 'left' | 'center' | 'right';
2076
- wordSpacing: number;
2077
- fontSizeLineHeight: {
2078
- fontSize: number;
2079
- lineHeight: number;
2080
- };
2081
- textAppearance: {
2082
- textTransform: 'none' | 'uppercase' | 'lowercase';
2083
- textDecoration: 'none' | 'underline';
2084
- fontVariant: 'normal' | 'small-caps';
2085
- };
2086
- color: string;
2087
- };
2175
+ .${e}-wrapper {
2176
+ position: relative;
2177
+ width: 100%;
2178
+ height: 100%;
2179
+ order: 1;
2180
+ display: flex;
2181
+ flex-direction: column;
2182
+ inset: 0;
2183
+ pointer-events: none;
2184
+ box-sizing: border-box;
2185
+ }
2088
2186
 
2089
- type TestimonialsStyles = {
2090
- text: CaptionStyles;
2091
- caption: CaptionStyles;
2092
- };
2093
- `,Ao={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},ts={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:"Caption",display:{type:"font-family-select"}},captionFontSettings:{...Ao.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:"Text",display:{type:"font-family-select"}},textFontSettings:{...Ao.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:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]},"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"}]}]}]}},ns={element:Ql,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:ts,sourceCode:es,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"}]}},os="TestimonialSingle-module__container___YKr4M",rs="TestimonialSingle-module__wrapper___hUgOd",is="TestimonialSingle-module__wrapperAutoplayOff___dgrHY",as="TestimonialSingle-module__elementsOverlay___2QyBb",ls="TestimonialSingle-module__fadeStack___Ye77N",ss="TestimonialSingle-module__fadeItemPrev___dQn4-",cs="TestimonialSingle-module__fadeItemCurrent___intAh",us="TestimonialSingle-module__fadeIn___mnR5D",ps="TestimonialSingle-module__fadeOut___WiXP1",ds="TestimonialSingle-module__icon___qH8ha",gs="TestimonialSingle-module__controls___0dIZ-",ms="TestimonialSingle-module__arrow___sVKUw",fs="TestimonialSingle-module__nextArrow___U31Ty",ys="TestimonialSingle-module__arrowInner___tep0d",hs="TestimonialSingle-module__arrowImg___8JHHQ",vs="TestimonialSingle-module__mirror___kWPu-",bs="TestimonialSingle-module__control___RwzDc",Se={container:os,wrapper:rs,wrapperAutoplayOff:is,elementsOverlay:as,fadeStack:ls,fadeItemPrev:ss,fadeItemCurrent:cs,fadeIn:us,fadeOut:ps,icon:ds,controls:gs,arrow:ms,nextArrow:fs,arrowInner:ys,arrowImg:hs,mirror:vs,control:bs},xs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const r=t||[],{autoplay:l,delay:i,align:c,width:p,imageMarginTop:m,textMarginTop:u,captionMarginTop:E,imageWidth:x,imageHeight:h,controlsWidth:d,controlsColor:g,controlsHoverColor:C}=e,v=(()=>{const s=l;if(typeof s=="boolean")return s;if(typeof s=="string"){const M=s.trim().toLowerCase();return M==="on"||M==="true"}return!1})(),b=v&&!o,[A,j]=S.useState(0),[N,$]=S.useState(null),[f,F]=S.useState(!1),P=S.useRef(null),O=S.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),R=S.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);S.useEffect(()=>{j(0),$(null),F(!1)},[r.length]);const V=r[A],W=N===null?null:r[N],K=s=>{var ge;const M=(ge=e==null?void 0:e.styles)==null?void 0:ge[s];if(M)return M;const Y=s==="text"?"text":"caption",ee=e==null?void 0:e[`${Y}FontFamily`],ne=e==null?void 0:e[`${Y}FontSettings`],oe=e==null?void 0:e[`${Y}LetterSpacing`],T=e==null?void 0:e[`${Y}WordSpacing`],U=e==null?void 0:e[`${Y}TextAlign`],B=e==null?void 0:e[`${Y}TextAppearance`],X=e==null?void 0:e[`${Y}Color`],Q=e==null?void 0:e[`${Y}FontSize`],pe=e==null?void 0:e[`${Y}LineHeight`];return typeof ee=="string"||!!ne||typeof oe=="number"||typeof T=="number"||typeof U=="string"||!!B||typeof X=="string"||typeof Q=="number"||typeof pe=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof ee=="string"?ee:"Arial",fontWeight:typeof(ne==null?void 0:ne.fontWeight)=="number"?ne.fontWeight:400,fontStyle:typeof(ne==null?void 0:ne.fontStyle)=="string"?ne.fontStyle:"normal"},letterSpacing:typeof oe=="number"?oe:0,wordSpacing:typeof T=="number"?T:0,textAlign:U==="left"||U==="center"||U==="right"?U:"left",fontSizeLineHeight:{fontSize:typeof Q=="number"?Q:.01,lineHeight:typeof pe=="number"?pe:.01},textAppearance:{textTransform:(B==null?void 0:B.textTransform)??"none",textDecoration:(B==null?void 0:B.textDecoration)??"none",fontVariant:(B==null?void 0:B.fontVariant)??"normal"},color:typeof X=="string"?X:"#000000"}:void 0},G=K("text"),y=K("caption"),k=s=>w.scalingValue(s,n??!1),I=r.length>1&&(!!G||!!y),L=S.useRef(null),[_,z]=S.useState(0),[Z,se]=S.useState(0),ie=r.length>1,le=S.useCallback((s,M)=>!ie||M===s?s:(P.current&&window.clearTimeout(P.current),$(s),F(!0),P.current=window.setTimeout(()=>{$(null),F(!1),P.current=null},300),M),[ie]);S.useCallback(s=>{j(M=>le(M,s))},[le]);const H=S.useCallback(()=>{ie&&j(s=>le(s,(s-1+r.length)%r.length))},[ie,le,r.length]),re=S.useCallback(()=>{ie&&j(s=>le(s,(s+1)%r.length))},[ie,le,r.length]);S.useEffect(()=>{if(!b||!ie)return;const s=window.setInterval(()=>{j(M=>le(M,(M+1)%r.length))},i);return()=>{window.clearInterval(s)}},[b,ie,le,r.length,i]),S.useEffect(()=>()=>{P.current&&window.clearTimeout(P.current)},[]);const de=e.controls??{mode:"Off",icon:null},ce=de.mode==="On"?de.icon??null:null,ye=S.useMemo(()=>k(.01),[n]),ve=S.useMemo(()=>w.scalingValue(d??.02,n??!1),[d,n]),$e=S.useCallback((s,M)=>{var U,B,X,Q,pe;const Y=M==null?void 0:M.textMinHeightPx,ee=M==null?void 0:M.captionMinHeightPx,ne=M==null?void 0:M.dataMeasureAttrs;let oe=null;if(G){const{fontSettings:J,letterSpacing:ue,wordSpacing:ge,fontSizeLineHeight:Te,textAppearance:Ae,color:Le}=G;oe=a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[a.jsx("div",{"data-controls":"textMarginTop",className:Se.control,style:{height:w.scalingValue(u??0,n??!1),width:"100%"}}),a.jsx("div",{...ne?{"data-testimonial-measure":"text"}:{},style:{fontFamily:J.fontFamily,fontWeight:J.fontWeight,fontStyle:J.fontStyle,...typeof Y=="number"&&Y>0?{minHeight:Y}:{},letterSpacing:w.scalingValue(ue,n),wordSpacing:w.scalingValue(ge,n),textAlign:R,fontSize:w.scalingValue(Te.fontSize,n),lineHeight:w.scalingValue(Te.lineHeight,n),textTransform:Ae.textTransform??"none",textDecoration:Ae.textDecoration??"none",fontVariant:Ae.fontVariant??"normal",color:Le,pointerEvents:"auto"},children:a.jsx(zt,{content:s.text??[]})})]},"text")}let T=null;if(y){const{fontSettings:J,letterSpacing:ue,wordSpacing:ge,fontSizeLineHeight:Te,textAppearance:Ae,color:Le}=y;T=a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[a.jsx("div",{"data-controls":"captionMarginTop",className:Se.control,style:{height:w.scalingValue(E??0,n??!1),width:"100%"}}),a.jsx("div",{...ne?{"data-testimonial-measure":"caption"}:{},style:{fontFamily:J.fontFamily,fontWeight:J.fontWeight,fontStyle:J.fontStyle,...typeof ee=="number"&&ee>0?{minHeight:ee}:{},letterSpacing:w.scalingValue(ue,n),wordSpacing:w.scalingValue(ge,n),textAlign:R,fontSize:w.scalingValue(Te.fontSize,n),lineHeight:w.scalingValue(Te.lineHeight,n),textTransform:Ae.textTransform??"none",textDecoration:Ae.textDecoration??"none",fontVariant:Ae.fontVariant??"normal",color:Le,pointerEvents:"auto"},children:a.jsx(zt,{content:s.caption})})]},"caption")}return a.jsxs(a.Fragment,{children:[oe,a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:a.jsxs("div",{style:{width:w.scalingValue(x??0,n??!1),height:w.scalingValue(h??0,n??!1)},children:[((U=s.image)==null?void 0:U.url)&&a.jsx("div",{"data-controls":"imageMarginTop",className:Se.control,style:{height:w.scalingValue(m??0,n??!1),width:"100%"}}),((B=s.image)==null?void 0:B.url)&&a.jsx("img",{src:(X=s.image)==null?void 0:X.url,alt:(Q=s.image)==null?void 0:Q.name,className:Se.icon,style:{pointerEvents:"auto",objectFit:((pe=s.image)==null?void 0:pe.objectFit)||"cover",width:"100%",height:"100%"}})]})},"image"),T]})},[E,y,m,x,h,n,O,R,u,G]);if(S.useLayoutEffect(()=>{if(!I){z(0),se(0);return}const s=L.current;if(!s)return;const M=()=>{const ee=Array.from(s.querySelectorAll('[data-testimonial-measure="text"]')).reduce((oe,T)=>Math.max(oe,T.getBoundingClientRect().height),0),ne=Array.from(s.querySelectorAll('[data-testimonial-measure="caption"]')).reduce((oe,T)=>Math.max(oe,T.getBoundingClientRect().height),0);z(ee),se(ne)};M();const Y=new ResizeObserver(M);return Y.observe(s),()=>{Y.disconnect()}},[I,r,$e]),!V)return a.jsx(a.Fragment,{});const D=I?{textMinHeightPx:_,captionMinHeightPx:Z}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:Se.container,style:{flexDirection:"column",alignItems:"center"},children:[a.jsxs("div",{className:me(Se.elementsOverlay,Se.wrapper,!v&&Se.wrapperAutoplayOff),style:{width:w.scalingValue(p??0,n??!1),display:"flex",flexDirection:"column",alignItems:O,inset:0,pointerEvents:"none",height:"100%",boxSizing:"border-box",position:"relative"},children:[I&&a.jsx("div",{ref:L,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:r.map((s,M)=>a.jsx("div",{style:{width:"100%"},children:$e(s,{dataMeasureAttrs:!0})},M))}),a.jsxs("div",{className:Se.fadeStack,children:[W&&f&&a.jsx("div",{className:me(Se.fadeItemPrev,Se.fadeOut),children:$e(W,D)}),a.jsx("div",{className:me(Se.fadeItemCurrent,f?Se.fadeIn:void 0),children:$e(V,D)})]})]}),de.mode==="On"&&a.jsxs("div",{className:Se.controls,style:{position:"absolute",inset:0,pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:ye,paddingRight:ye},children:[a.jsx("div",{className:Se.arrow,style:{pointerEvents:"auto",width:ve,height:ve,"--arrow-hover-color":C},children:a.jsx("button",{type:"button",className:Se.arrowInner,onClick:H,"aria-label":"Previous testimonial",style:{pointerEvents:"auto"},children:ce&&a.jsx(tt,{url:ce,fill:g,hoverFill:C,className:me(Se.arrowImg,Se.mirror)})})}),a.jsx("div",{className:me(Se.arrow,Se.nextArrow),style:{pointerEvents:"auto",width:ve,height:ve,"--arrow-hover-color":C},children:a.jsx("button",{type:"button",className:Se.arrowInner,onClick:re,"aria-label":"Next testimonial",style:{pointerEvents:"auto"},children:ce&&a.jsx(tt,{url:ce,fill:g,hoverFill:C,className:Se.arrowImg})})})]})]})})},Ss=`import cn from 'classnames';
2187
+ .${e}-wrapper-autoplay-off {
2188
+ overflow-x: hidden;
2189
+ }
2190
+
2191
+ .${e}-elements-overlay {
2192
+ position: relative;
2193
+ inset: 0;
2194
+ }
2195
+
2196
+ .${e}-fade-stack {
2197
+ position: relative;
2198
+ width: 100%;
2199
+ }
2200
+
2201
+ .${e}-fade-item-prev {
2202
+ position: absolute;
2203
+ inset: 0;
2204
+ width: 100%;
2205
+ height: 100%;
2206
+ }
2207
+
2208
+ .${e}-fade-item-current {
2209
+ position: relative;
2210
+ width: 100%;
2211
+ }
2212
+
2213
+ @keyframes ${e}-testimonial-fade-in {
2214
+ from { opacity: 0; }
2215
+ to { opacity: 1; }
2216
+ }
2217
+
2218
+ @keyframes ${e}-testimonial-fade-out {
2219
+ from { opacity: 1; }
2220
+ to { opacity: 0; }
2221
+ }
2222
+
2223
+ .${e}-fade-in {
2224
+ animation: ${e}-testimonial-fade-in 300ms ease-in forwards;
2225
+ }
2226
+
2227
+ .${e}-fade-out {
2228
+ animation: ${e}-testimonial-fade-out 300ms ease-in forwards;
2229
+ }
2230
+
2231
+ .${e}-controls {
2232
+ position: absolute;
2233
+ inset: 0;
2234
+ pointer-events: none;
2235
+ display: flex;
2236
+ width: 100%;
2237
+ align-items: center;
2238
+ justify-content: space-between;
2239
+ }
2240
+
2241
+ .${e}-arrow {
2242
+ pointer-events: auto;
2243
+ position: relative;
2244
+ display: flex;
2245
+ align-items: center;
2246
+ justify-content: center;
2247
+ border: none;
2248
+ background-color: transparent;
2249
+ z-index: 1;
2250
+ padding: 0;
2251
+ }
2252
+
2253
+ .${e}-next-arrow {
2254
+ left: unset;
2255
+ }
2256
+
2257
+ .${e}-arrow-inner {
2258
+ all: unset;
2259
+ cursor: pointer;
2260
+ width: 100%;
2261
+ height: 100%;
2262
+ pointer-events: auto;
2263
+ }
2264
+
2265
+ .${e}-arrow-img {
2266
+ position: absolute;
2267
+ top: 50%;
2268
+ left: 50%;
2269
+ transform: translate(-50%, -50%);
2270
+ }
2271
+
2272
+ .${e}-mirror {
2273
+ transform: translate(-50%, -50%) scaleX(-1) !important;
2274
+ }
2275
+
2276
+ .${e}-control {
2277
+ position: relative;
2278
+ z-index: 2;
2279
+ pointer-events: auto;
2280
+ width: 100%;
2281
+ }
2282
+
2283
+ .${e}-control::before {
2284
+ content: "";
2285
+ position: absolute;
2286
+ top: 0;
2287
+ left: 0;
2288
+ width: 100%;
2289
+ height: 100%;
2290
+ pointer-events: auto;
2291
+ z-index: 10;
2292
+ }
2293
+ .${e}-icon {
2294
+ pointer-events: auto;
2295
+ width: 100%;
2296
+ height: 100%;
2297
+ }
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';
2094
2299
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
2095
- import classes from './TestimonialSingle.module.scss';
2096
2300
  import { CommonComponentProps } from '../props';
2097
2301
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
2098
2302
  import { scalingValue } from '../utils/scalingValue';
2099
2303
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
2304
+ import { useScopedStyles } from '../utils/useScopedStyles';
2305
+ import { readTestimonialTextMeasure } from '../utils/readTestimonialTextMeasure';
2306
+ import { textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
2307
+
2308
+ function getCSS(P: string): string {
2309
+ return \`
2310
+ .\${P}-container {
2311
+ overflow-x: clip;
2312
+ display: flex;
2313
+ height: 100%;
2314
+ width: 100%;
2315
+ flex-direction: column;
2316
+ align-items: center;
2317
+ }
2318
+
2319
+ .\${P}-wrapper {
2320
+ position: relative;
2321
+ width: 100%;
2322
+ height: 100%;
2323
+ order: 1;
2324
+ display: flex;
2325
+ flex-direction: column;
2326
+ inset: 0;
2327
+ pointer-events: none;
2328
+ box-sizing: border-box;
2329
+ }
2330
+
2331
+ .\${P}-wrapper-autoplay-off {
2332
+ overflow-x: hidden;
2333
+ }
2334
+
2335
+ .\${P}-elements-overlay {
2336
+ position: relative;
2337
+ inset: 0;
2338
+ }
2339
+
2340
+ .\${P}-fade-stack {
2341
+ position: relative;
2342
+ width: 100%;
2343
+ }
2344
+
2345
+ .\${P}-fade-item-prev {
2346
+ position: absolute;
2347
+ inset: 0;
2348
+ width: 100%;
2349
+ height: 100%;
2350
+ }
2351
+
2352
+ .\${P}-fade-item-current {
2353
+ position: relative;
2354
+ width: 100%;
2355
+ }
2356
+
2357
+ @keyframes \${P}-testimonial-fade-in {
2358
+ from { opacity: 0; }
2359
+ to { opacity: 1; }
2360
+ }
2361
+
2362
+ @keyframes \${P}-testimonial-fade-out {
2363
+ from { opacity: 1; }
2364
+ to { opacity: 0; }
2365
+ }
2366
+
2367
+ .\${P}-fade-in {
2368
+ animation: \${P}-testimonial-fade-in 300ms ease-in forwards;
2369
+ }
2370
+
2371
+ .\${P}-fade-out {
2372
+ animation: \${P}-testimonial-fade-out 300ms ease-in forwards;
2373
+ }
2374
+
2375
+ .\${P}-controls {
2376
+ position: absolute;
2377
+ inset: 0;
2378
+ pointer-events: none;
2379
+ display: flex;
2380
+ width: 100%;
2381
+ align-items: center;
2382
+ justify-content: space-between;
2383
+ }
2384
+
2385
+ .\${P}-arrow {
2386
+ pointer-events: auto;
2387
+ position: relative;
2388
+ display: flex;
2389
+ align-items: center;
2390
+ justify-content: center;
2391
+ border: none;
2392
+ background-color: transparent;
2393
+ z-index: 1;
2394
+ padding: 0;
2395
+ }
2396
+
2397
+ .\${P}-next-arrow {
2398
+ left: unset;
2399
+ }
2400
+
2401
+ .\${P}-arrow-inner {
2402
+ all: unset;
2403
+ cursor: pointer;
2404
+ width: 100%;
2405
+ height: 100%;
2406
+ pointer-events: auto;
2407
+ }
2408
+
2409
+ .\${P}-arrow-img {
2410
+ position: absolute;
2411
+ top: 50%;
2412
+ left: 50%;
2413
+ transform: translate(-50%, -50%);
2414
+ }
2415
+
2416
+ .\${P}-mirror {
2417
+ transform: translate(-50%, -50%) scaleX(-1) !important;
2418
+ }
2419
+
2420
+ .\${P}-control {
2421
+ position: relative;
2422
+ z-index: 2;
2423
+ pointer-events: auto;
2424
+ width: 100%;
2425
+ }
2426
+
2427
+ .\${P}-control::before {
2428
+ content: "";
2429
+ position: absolute;
2430
+ top: 0;
2431
+ left: 0;
2432
+ width: 100%;
2433
+ height: 100%;
2434
+ pointer-events: auto;
2435
+ z-index: 10;
2436
+ }
2437
+ .\${P}-icon {
2438
+ pointer-events: auto;
2439
+ width: 100%;
2440
+ height: 100%;
2441
+ }
2442
+ \`;
2443
+ }
2100
2444
 
2101
2445
  type TestimonialsProps = {
2102
2446
  settings: TestimonialsSettings;
@@ -2111,44 +2455,11 @@ type RenderItemContentOpts = {
2111
2455
  dataMeasureAttrs?: boolean;
2112
2456
  };
2113
2457
 
2114
- type CaptionStyleFromFlatSettings = {
2115
- fontSettings: {
2116
- fontFamily: string;
2117
- fontWeight: number;
2118
- fontStyle: string;
2119
- };
2120
- widthSettings: {
2121
- width: number;
2122
- sizing: 'auto' | 'manual';
2123
- };
2124
- letterSpacing: number;
2125
- textAlign: 'left' | 'center' | 'right';
2126
- wordSpacing: number;
2127
- fontSizeLineHeight: {
2128
- fontSize: number;
2129
- lineHeight: number;
2130
- };
2131
- textAppearance: {
2132
- textTransform: 'none' | 'uppercase' | 'lowercase';
2133
- textDecoration: 'none' | 'underline';
2134
- fontVariant: 'normal' | 'small-caps';
2135
- };
2136
- color: string;
2137
- };
2138
-
2139
2458
  export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }: TestimonialsProps) => {
2459
+ const { prefix: P } = useScopedStyles();
2140
2460
  const items = content || [];
2141
2461
  const { autoplay, delay, align, width, imageMarginTop, textMarginTop, captionMarginTop, imageWidth, imageHeight, controlsWidth, controlsColor, controlsHoverColor } = settings;
2142
- const isAutoplay = (() => {
2143
- const v = autoplay as unknown;
2144
- if (typeof v === 'boolean') return v;
2145
- if (typeof v === 'string') {
2146
- const s = v.trim().toLowerCase();
2147
- return s === 'on' || s === 'true';
2148
- }
2149
- return false;
2150
- })();
2151
- const isAnimating = isAutoplay && !isPreviewMode;
2462
+ const isAnimating = autoplay === 'on' && !isPreviewMode;
2152
2463
  const [activeIndex, setActiveIndex] = useState(0);
2153
2464
  const [prevIndex, setPrevIndex] = useState<number | null>(null);
2154
2465
  const [isFading, setIsFading] = useState(false);
@@ -2187,70 +2498,37 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
2187
2498
  const currentItem = items[activeIndex];
2188
2499
  const previousItem = prevIndex === null ? null : items[prevIndex];
2189
2500
 
2190
- const resolveCaptionStyle = (
2191
- kind: 'text' | 'caption'
2192
- ): CaptionStyles | undefined => {
2193
- const fromNested = (settings as any)?.styles?.[kind] as CaptionStyles | undefined;
2194
- if (fromNested) return fromNested;
2195
-
2196
- const prefix = kind === 'text' ? 'text' : 'caption';
2197
- const fontFamily = (settings as any)?.[\`\${prefix}FontFamily\`];
2198
- const fontSettings = (settings as any)?.[\`\${prefix}FontSettings\`];
2199
- const letterSpacing = (settings as any)?.[\`\${prefix}LetterSpacing\`];
2200
- const wordSpacing = (settings as any)?.[\`\${prefix}WordSpacing\`];
2201
- const textAlign = (settings as any)?.[\`\${prefix}TextAlign\`];
2202
- const textAppearance = (settings as any)?.[\`\${prefix}TextAppearance\`];
2203
- const color = (settings as any)?.[\`\${prefix}Color\`];
2204
- const fontSize = (settings as any)?.[\`\${prefix}FontSize\`];
2205
- const lineHeight = (settings as any)?.[\`\${prefix}LineHeight\`];
2206
-
2207
- const hasAnyFlat =
2208
- typeof fontFamily === 'string' ||
2209
- !!fontSettings ||
2210
- typeof letterSpacing === 'number' ||
2211
- typeof wordSpacing === 'number' ||
2212
- typeof textAlign === 'string' ||
2213
- !!textAppearance ||
2214
- typeof color === 'string' ||
2215
- typeof fontSize === 'number' ||
2216
- typeof lineHeight === 'number';
2217
- if (!hasAnyFlat) return undefined;
2218
-
2219
- const flat: CaptionStyleFromFlatSettings = {
2220
- widthSettings: { width: 0.13, sizing: 'manual' },
2501
+ const resolveTextStyle = (kind: 'text' | 'caption'): TextStyles => {
2502
+ const styles: TextStyles = {
2221
2503
  fontSettings: {
2222
- fontFamily: typeof fontFamily === 'string' ? fontFamily : 'Arial',
2223
- fontWeight: typeof fontSettings?.fontWeight === 'number' ? fontSettings.fontWeight : 400,
2224
- fontStyle: typeof fontSettings?.fontStyle === 'string' ? fontSettings.fontStyle : 'normal',
2225
- },
2226
- letterSpacing: typeof letterSpacing === 'number' ? letterSpacing : 0,
2227
- wordSpacing: typeof wordSpacing === 'number' ? wordSpacing : 0,
2228
- textAlign: (textAlign === 'left' || textAlign === 'center' || textAlign === 'right') ? textAlign : 'left',
2229
- fontSizeLineHeight: {
2230
- fontSize: typeof fontSize === 'number' ? fontSize : 0.01,
2231
- lineHeight: typeof lineHeight === 'number' ? lineHeight : 0.01,
2504
+ fontFamily: (settings as any)?.[\`\${kind}FontFamily\`] ?? 'Arial',
2505
+ fontWeight: (settings as any)?.[\`\${kind}FontSettings\`]?.fontWeight ?? 400,
2506
+ fontStyle: (settings as any)?.[\`\${kind}FontSettings\`]?.fontStyle ?? 'normal',
2232
2507
  },
2233
2508
  textAppearance: {
2234
- textTransform: textAppearance?.textTransform ?? 'none',
2235
- textDecoration: textAppearance?.textDecoration ?? 'none',
2236
- fontVariant: textAppearance?.fontVariant ?? 'normal',
2509
+ textTransform: (settings as any)?.[\`\${kind}TextAppearance\`]?.textTransform ?? 'none',
2510
+ textDecoration: (settings as any)?.[\`\${kind}TextAppearance\`]?.textDecoration ?? 'none',
2511
+ fontVariant: (settings as any)?.[\`\${kind}TextAppearance\`]?.fontVariant ?? 'normal',
2237
2512
  },
2238
- color: typeof color === 'string' ? color : '#000000',
2513
+ fontSize: (settings as any)?.[\`\${kind}FontSize\`] ?? 0.01,
2514
+ lineHeight: (settings as any)?.[\`\${kind}LineHeight\`] ?? 0.01,
2515
+ letterSpacing: (settings as any)?.[\`\${kind}LetterSpacing\`] ?? 0,
2516
+ wordSpacing: (settings as any)?.[\`\${kind}WordSpacing\`] ?? 0,
2517
+ color: (settings as any)?.[\`\${kind}Color\`] ?? '#000000',
2239
2518
  };
2240
-
2241
- return flat as CaptionStyles;
2519
+ return styles;
2242
2520
  };
2243
2521
 
2244
- const textStyle = resolveCaptionStyle('text');
2245
- const captionStyle = resolveCaptionStyle('caption');
2246
- const scaled = (v: number) => scalingValue(v, isEditor ?? false);
2247
-
2248
- const shouldMeasureTextExtents = items.length > 1 && (!!textStyle || !!captionStyle);
2522
+ const textStyle = resolveTextStyle('text');
2523
+ const captionStyle = resolveTextStyle('caption');
2524
+ const shouldMeasureTextExtents =
2525
+ items.length > 1 && items.some((item) => (item.text?.length ?? 0) > 0 || (item.caption?.length ?? 0) > 0);
2249
2526
  const measureLayerRef = useRef<HTMLDivElement>(null);
2250
2527
  const [measuredTextMinPx, setMeasuredTextMinPx] = useState(0);
2251
2528
  const [measuredCaptionMinPx, setMeasuredCaptionMinPx] = useState(0);
2252
-
2529
+ const controls: TestimonialsSettings['controls'] = settings.controls ?? { mode: 'Off', icon: null };
2253
2530
  const canSwitch = items.length > 1;
2531
+
2254
2532
  const commitTransition = useCallback((currentIndex: number, nextIndex: number) => {
2255
2533
  if (!canSwitch) return currentIndex;
2256
2534
  if (nextIndex === currentIndex) return currentIndex;
@@ -2265,10 +2543,6 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
2265
2543
  return nextIndex;
2266
2544
  }, [canSwitch]);
2267
2545
 
2268
- const transitionToIndex = useCallback((nextIndex: number) => {
2269
- setActiveIndex((currentIndex) => commitTransition(currentIndex, nextIndex));
2270
- }, [commitTransition]);
2271
-
2272
2546
  const goPrev = useCallback(() => {
2273
2547
  if (!canSwitch) return;
2274
2548
  setActiveIndex((currentIndex) => commitTransition(currentIndex, (currentIndex - 1 + items.length) % items.length));
@@ -2281,9 +2555,10 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
2281
2555
 
2282
2556
  useEffect(() => {
2283
2557
  if (!isAnimating || !canSwitch) return;
2558
+ const safeDelayMs = Math.max(300, Number.isFinite(delay * 1000) ? delay * 1000 : 0);
2284
2559
  const id = window.setInterval(() => {
2285
2560
  setActiveIndex((currentIndex) => commitTransition(currentIndex, (currentIndex + 1) % items.length));
2286
- }, delay);
2561
+ }, safeDelayMs);
2287
2562
  return () => {
2288
2563
  window.clearInterval(id);
2289
2564
  };
@@ -2295,186 +2570,96 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
2295
2570
  };
2296
2571
  }, []);
2297
2572
 
2298
- const controls: TestimonialsSettings['controls'] = settings.controls ?? {
2299
- mode: 'Off',
2300
- icon: null,
2301
- };
2302
-
2303
- const customArrowsUrl = controls.mode === 'On' ? (controls.icon ?? null) : null;
2304
- const controlsInsetX = useMemo(() => scaled(0.01), [isEditor]);
2305
- const controlsIconSize = useMemo(
2306
- () => scalingValue(controlsWidth ?? 0.02, isEditor ?? false),
2307
- [controlsWidth, isEditor]
2308
- );
2309
-
2310
- const renderItemContent = useCallback((item: TestimonialsItem, opts?: RenderItemContentOpts) => {
2573
+ const renderItemContent = (item: TestimonialsItem, opts?: RenderItemContentOpts) => {
2311
2574
  const textMinHeightPx = opts?.textMinHeightPx;
2312
2575
  const captionMinHeightPx = opts?.captionMinHeightPx;
2313
2576
  const dataMeasureAttrs = opts?.dataMeasureAttrs;
2314
- let textSection = null;
2315
- if (textStyle) {
2316
- const { fontSettings, letterSpacing, wordSpacing, fontSizeLineHeight, textAppearance, color } = textStyle;
2317
- textSection = (
2318
- <div
2319
- key="text"
2320
- style={{
2321
- display: 'flex',
2322
- flexDirection: 'column',
2323
- alignItems: overlayAlignItems,
2324
- width: '100%',
2325
- }}
2326
- >
2327
- <div
2328
- data-controls="textMarginTop"
2329
- className={classes.control}
2330
- style={{ height: scalingValue(textMarginTop ?? 0, isEditor ?? false), width: '100%' }}
2331
- />
2332
- <div
2333
- {...(dataMeasureAttrs ? { 'data-testimonial-measure': 'text' as const } : {})}
2334
- style={{
2335
- fontFamily: fontSettings.fontFamily,
2336
- fontWeight: fontSettings.fontWeight,
2337
- fontStyle: fontSettings.fontStyle,
2338
- ...(typeof textMinHeightPx === 'number' && textMinHeightPx > 0 ? { minHeight: textMinHeightPx } : {}),
2339
- letterSpacing: scalingValue(letterSpacing, isEditor),
2340
- wordSpacing: scalingValue(wordSpacing, isEditor),
2341
- textAlign: overlayTextAlign,
2342
- fontSize: scalingValue(fontSizeLineHeight.fontSize, isEditor),
2343
- lineHeight: scalingValue(fontSizeLineHeight.lineHeight, isEditor),
2344
- textTransform: textAppearance.textTransform ?? 'none',
2345
- textDecoration: textAppearance.textDecoration ?? 'none',
2346
- fontVariant: textAppearance.fontVariant ?? 'normal',
2347
- color,
2348
- pointerEvents: 'auto',
2349
- }}
2350
- >
2351
- <RichTextRenderer content={item.text ?? []} />
2352
- </div>
2353
- </div>
2354
- );
2355
- }
2356
2577
 
2357
- let captionSection = null;
2358
- if (captionStyle) {
2359
- const { fontSettings, letterSpacing, wordSpacing, fontSizeLineHeight, textAppearance, color } = captionStyle;
2360
- captionSection = (
2361
- <div
2362
- key="caption"
2363
- style={{
2364
- display: 'flex',
2365
- flexDirection: 'column',
2366
- alignItems: overlayAlignItems,
2367
- width: '100%',
2368
- }}
2369
- >
2578
+ return (
2579
+ <>
2580
+ {item.text && (
2581
+ <div style={{ display: 'flex', flexDirection: 'column', alignItems: overlayAlignItems, width: '100%' }}>
2582
+ <div
2583
+ data-controls="textMarginTop"
2584
+ className={\`\${P}-control\`}
2585
+ style={{ height: scalingValue(textMarginTop ?? 0, isEditor ?? false) }}
2586
+ />
2587
+ <div
2588
+ {...(dataMeasureAttrs && { 'data-testimonial-measure': 'text' as const })}
2589
+ style={{
2590
+ ...textStylesToCss(textStyle, isEditor),
2591
+ ...(textMinHeightPx && textMinHeightPx > 0 ? { minHeight: textMinHeightPx } : {}),
2592
+ textAlign: overlayTextAlign,
2593
+ pointerEvents: 'auto',
2594
+ }}
2595
+ >
2596
+ <RichTextRenderer content={item.text} />
2597
+ </div>
2598
+ </div>
2599
+ )}
2600
+ <div style={{ display: 'flex', flexDirection: 'column', alignItems: overlayAlignItems, width: '100%' }}>
2370
2601
  <div
2371
- data-controls="captionMarginTop"
2372
- className={classes.control}
2373
- style={{ height: scalingValue(captionMarginTop ?? 0, isEditor ?? false), width: '100%' }}
2602
+ data-controls="imageMarginTop"
2603
+ className={\`\${P}-control\`}
2604
+ style={{ height: scalingValue(imageMarginTop ?? 0, isEditor ?? false) }}
2374
2605
  />
2375
- <div
2376
- {...(dataMeasureAttrs ? { 'data-testimonial-measure': 'caption' as const } : {})}
2377
- style={{
2378
- fontFamily: fontSettings.fontFamily,
2379
- fontWeight: fontSettings.fontWeight,
2380
- fontStyle: fontSettings.fontStyle,
2381
- ...(typeof captionMinHeightPx === 'number' && captionMinHeightPx > 0 ? { minHeight: captionMinHeightPx } : {}),
2382
- letterSpacing: scalingValue(letterSpacing, isEditor),
2383
- wordSpacing: scalingValue(wordSpacing, isEditor),
2384
- textAlign: overlayTextAlign,
2385
- fontSize: scalingValue(fontSizeLineHeight.fontSize, isEditor),
2386
- lineHeight: scalingValue(fontSizeLineHeight.lineHeight, isEditor),
2387
- textTransform: textAppearance.textTransform ?? 'none',
2388
- textDecoration: textAppearance.textDecoration ?? 'none',
2389
- fontVariant: textAppearance.fontVariant ?? 'normal',
2390
- color,
2391
- pointerEvents: 'auto',
2392
- }}
2393
- >
2394
- <RichTextRenderer content={item.caption} />
2606
+ <div style={{ width: scalingValue(imageWidth ?? 0, isEditor ?? false), height: scalingValue(imageHeight ?? 0, isEditor ?? false)}}>
2607
+ {item.image?.url &&
2608
+ <img
2609
+ src={item.image?.url}
2610
+ alt={item.image?.name ?? ''}
2611
+ className={\`\${P}-icon\`}
2612
+ style={{ objectFit: item.image?.objectFit || 'contain' }}
2613
+ />
2614
+ }
2395
2615
  </div>
2396
2616
  </div>
2397
- );
2398
- }
2399
-
2400
- return (
2401
- <>
2402
- {textSection}
2403
- <div
2404
- key="image"
2405
- style={{
2406
- display: 'flex',
2407
- flexDirection: 'column',
2408
- alignItems: overlayAlignItems,
2409
- width: '100%',
2410
- }}
2411
- >
2412
-
2413
- <div style={{ width: scalingValue(imageWidth ?? 0, isEditor ?? false), height: scalingValue(imageHeight ?? 0, isEditor ?? false)}}>
2414
- {item.image?.url && <div
2415
- data-controls="imageMarginTop"
2416
- className={classes.control}
2417
- style={{ height: scalingValue(imageMarginTop ?? 0, isEditor ?? false), width: '100%' }}
2418
- />}
2419
- {item.image?.url && <img
2420
- src={item.image?.url}
2421
- alt={item.image?.name}
2422
- className={classes.icon}
2617
+ {item.caption && (
2618
+ <div style={{ display: 'flex', flexDirection: 'column', alignItems: overlayAlignItems, width: '100%' }}>
2619
+ <div
2620
+ data-controls="captionMarginTop"
2621
+ className={\`\${P}-control\`}
2622
+ style={{ height: scalingValue(captionMarginTop ?? 0, isEditor ?? false) }}
2623
+ />
2624
+ <div
2625
+ {...(dataMeasureAttrs ? { 'data-testimonial-measure': 'caption' as const } : {})}
2423
2626
  style={{
2627
+ ...textStylesToCss(captionStyle, isEditor),
2628
+ ...(captionMinHeightPx && captionMinHeightPx > 0 ? { minHeight: captionMinHeightPx } : {}),
2629
+ textAlign: overlayTextAlign,
2424
2630
  pointerEvents: 'auto',
2425
- objectFit: item.image?.objectFit || 'cover',
2426
- width: '100%',
2427
- height: '100%',
2428
2631
  }}
2429
- />}
2632
+ >
2633
+ <RichTextRenderer content={item.caption} />
2634
+ </div>
2430
2635
  </div>
2431
- </div>
2432
- {captionSection}
2636
+ )}
2433
2637
  </>
2434
2638
  );
2435
- }, [
2436
- captionMarginTop,
2437
- captionStyle,
2438
- imageMarginTop,
2439
- imageWidth,
2440
- imageHeight,
2441
- isEditor,
2442
- overlayAlignItems,
2443
- overlayTextAlign,
2444
- textMarginTop,
2445
- textStyle,
2446
- ]);
2639
+ };
2640
+
2641
+ const onMeasuredExtents = useCallback((extents: { maxTextPx: number; maxCaptionPx: number }) => {
2642
+ setMeasuredTextMinPx(extents.maxTextPx);
2643
+ setMeasuredCaptionMinPx(extents.maxCaptionPx);
2644
+ }, []);
2447
2645
 
2448
2646
  useLayoutEffect(() => {
2449
2647
  if (!shouldMeasureTextExtents) {
2450
- setMeasuredTextMinPx(0);
2451
- setMeasuredCaptionMinPx(0);
2648
+ onMeasuredExtents({ maxTextPx: 0, maxCaptionPx: 0 });
2452
2649
  return;
2453
2650
  }
2454
-
2455
2651
  const root = measureLayerRef.current;
2456
2652
  if (!root) return;
2457
-
2458
2653
  const readExtents = () => {
2459
- const maxText = Array.from(root.querySelectorAll('[data-testimonial-measure="text"]')).reduce(
2460
- (acc, el) => Math.max(acc, el.getBoundingClientRect().height),
2461
- 0
2462
- );
2463
- const maxCaption = Array.from(root.querySelectorAll('[data-testimonial-measure="caption"]')).reduce(
2464
- (acc, el) => Math.max(acc, el.getBoundingClientRect().height),
2465
- 0
2466
- );
2467
- setMeasuredTextMinPx(maxText);
2468
- setMeasuredCaptionMinPx(maxCaption);
2654
+ readTestimonialTextMeasure(root, onMeasuredExtents);
2469
2655
  };
2470
-
2471
2656
  readExtents();
2472
2657
  const ro = new ResizeObserver(readExtents);
2473
2658
  ro.observe(root);
2474
2659
  return () => {
2475
2660
  ro.disconnect();
2476
2661
  };
2477
- }, [shouldMeasureTextExtents, items, renderItemContent]);
2662
+ }, [shouldMeasureTextExtents, onMeasuredExtents, content]);
2478
2663
 
2479
2664
  if (!currentItem) return <></>;
2480
2665
 
@@ -2484,26 +2669,11 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
2484
2669
 
2485
2670
  return (
2486
2671
  <>
2487
- <div
2488
- className={classes.container}
2489
- style={{
2490
- flexDirection: 'column',
2491
- alignItems: 'center'
2492
- }}
2493
- >
2672
+ <div className={\`\${P}-container\`}>
2673
+ <style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
2494
2674
  <div
2495
- className={cn(classes.elementsOverlay, classes.wrapper, !isAutoplay && classes.wrapperAutoplayOff)}
2496
- style={{
2497
- width: scalingValue(width ?? 0, isEditor ?? false),
2498
- display: 'flex',
2499
- flexDirection: 'column',
2500
- alignItems: overlayAlignItems,
2501
- inset: 0,
2502
- pointerEvents: 'none',
2503
- height: '100%',
2504
- boxSizing: 'border-box',
2505
- position: 'relative',
2506
- }}
2675
+ className={cn(\`\${P}-elements-overlay\`, \`\${P}-wrapper\`, autoplay === 'off' && \`\${P}-wrapper-autoplay-off\`)}
2676
+ style={{ width: scalingValue(width ?? 0, isEditor ?? false), alignItems: overlayAlignItems }}
2507
2677
  >
2508
2678
  {shouldMeasureTextExtents && (
2509
2679
  <div
@@ -2526,79 +2696,65 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
2526
2696
  ))}
2527
2697
  </div>
2528
2698
  )}
2529
- <div className={classes.fadeStack}>
2699
+ <div className={\`\${P}-fade-stack\`}>
2530
2700
  {previousItem && isFading && (
2531
- <div className={cn(classes.fadeItemPrev, classes.fadeOut)}>
2701
+ <div className={cn(\`\${P}-fade-item-prev\`, \`\${P}-fade-out\`)}>
2532
2702
  {renderItemContent(previousItem, visibleContentOpts)}
2533
2703
  </div>
2534
2704
  )}
2535
- <div className={cn(classes.fadeItemCurrent, isFading ? classes.fadeIn : undefined)}>
2705
+ <div className={cn(\`\${P}-fade-item-current\`, isFading ? \`\${P}-fade-in\` : undefined)}>
2536
2706
  {renderItemContent(currentItem, visibleContentOpts)}
2537
2707
  </div>
2538
2708
  </div>
2539
2709
  </div>
2540
2710
  {controls.mode === 'On' && (
2541
- <div
2542
- className={classes.controls}
2543
- style={{
2544
- position: 'absolute',
2545
- inset: 0,
2546
- pointerEvents: 'none',
2547
- display: 'flex',
2548
- alignItems: 'center',
2549
- justifyContent: 'space-between',
2550
- paddingLeft: controlsInsetX,
2551
- paddingRight: controlsInsetX,
2552
- }}
2553
- >
2711
+ <div className={\`\${P}-controls\`}>
2554
2712
  <div
2555
- className={classes.arrow}
2713
+ className={\`\${P}-arrow\`}
2556
2714
  style={{
2557
- pointerEvents: 'auto',
2558
- width: controlsIconSize,
2559
- height: controlsIconSize,
2715
+ width: scalingValue(controlsWidth ?? 0.02, isEditor ?? false),
2716
+ height: scalingValue(controlsWidth ?? 0.02, isEditor ?? false),
2560
2717
  ['--arrow-hover-color' as string]: controlsHoverColor,
2561
2718
  }}
2562
2719
  >
2563
2720
  <button
2564
2721
  type="button"
2565
- className={classes.arrowInner}
2722
+ className={\`\${P}-arrow-inner\`}
2566
2723
  onClick={goPrev}
2724
+ disabled={!canSwitch}
2567
2725
  aria-label="Previous testimonial"
2568
- style={{ pointerEvents: 'auto' }}
2569
2726
  >
2570
- {customArrowsUrl && (
2727
+ {controls.icon && (
2571
2728
  <SvgImage
2572
- url={customArrowsUrl}
2729
+ url={controls.icon }
2573
2730
  fill={controlsColor}
2574
2731
  hoverFill={controlsHoverColor}
2575
- className={cn(classes.arrowImg, classes.mirror)}
2732
+ className={cn(\`\${P}-arrow-img\`, \`\${P}-mirror\`)}
2576
2733
  />
2577
2734
  )}
2578
2735
  </button>
2579
2736
  </div>
2580
2737
  <div
2581
- className={cn(classes.arrow, classes.nextArrow)}
2738
+ className={cn(\`\${P}-arrow\`, \`\${P}-next-arrow\`)}
2582
2739
  style={{
2583
- pointerEvents: 'auto',
2584
- width: controlsIconSize,
2585
- height: controlsIconSize,
2740
+ width: scalingValue(controlsWidth ?? 0.02, isEditor ?? false),
2741
+ height: scalingValue(controlsWidth ?? 0.02, isEditor ?? false),
2586
2742
  ['--arrow-hover-color' as string]: controlsHoverColor,
2587
2743
  }}
2588
2744
  >
2589
2745
  <button
2590
2746
  type="button"
2591
- className={classes.arrowInner}
2747
+ className={\`\${P}-arrow-inner\`}
2592
2748
  onClick={goNext}
2749
+ disabled={!canSwitch}
2593
2750
  aria-label="Next testimonial"
2594
- style={{ pointerEvents: 'auto' }}
2595
2751
  >
2596
- {customArrowsUrl && (
2752
+ {controls.icon && (
2597
2753
  <SvgImage
2598
- url={customArrowsUrl}
2754
+ url={controls.icon }
2599
2755
  fill={controlsColor}
2600
2756
  hoverFill={controlsHoverColor}
2601
- className={classes.arrowImg}
2757
+ className={\`\${P}-arrow-img\`}
2602
2758
  />
2603
2759
  )}
2604
2760
  </button>
@@ -2617,8 +2773,8 @@ export type TestimonialsItem = {
2617
2773
  name?: string;
2618
2774
  objectFit?: 'cover' | 'contain';
2619
2775
  };
2620
- text: any[];
2621
- caption: any[];
2776
+ text?: any[];
2777
+ caption?: any[];
2622
2778
  };
2623
2779
 
2624
2780
  type TestimonialsSettings = {
@@ -2631,7 +2787,6 @@ type TestimonialsSettings = {
2631
2787
  imageHeight?: number;
2632
2788
  textMarginTop?: number;
2633
2789
  captionMarginTop?: number;
2634
- styles: TestimonialsStyles;
2635
2790
  controlsColor: string;
2636
2791
  controlsHoverColor: string;
2637
2792
  controlsWidth?: number;
@@ -2640,33 +2795,4 @@ type TestimonialsSettings = {
2640
2795
  icon?: string | null;
2641
2796
  };
2642
2797
  };
2643
-
2644
- type CaptionStyles = {
2645
- fontSettings: {
2646
- fontFamily: string;
2647
- fontWeight: number;
2648
- fontStyle: string;
2649
- };
2650
- widthSettings: {
2651
- width: number;
2652
- sizing: 'auto' | 'manual';
2653
- };
2654
- letterSpacing: number;
2655
- textAlign: 'left' | 'center' | 'right';
2656
- wordSpacing: number;
2657
- fontSizeLineHeight: {
2658
- fontSize: number;
2659
- lineHeight: number;
2660
- };
2661
- textAppearance: {
2662
- textTransform: 'none' | 'uppercase' | 'lowercase';
2663
- textDecoration: 'none' | 'underline';
2664
- fontVariant: 'normal' | 'small-caps';
2665
- };
2666
- color: string;
2667
- };
2668
-
2669
- type TestimonialsStyles = {
2670
- text: CaptionStyles;
2671
- caption: CaptionStyles;
2672
- };`,Cs="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>'),Eo={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},_e={fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"},ws={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(ms)",display:{type:"step-control"},step:500,min:1e3,max:5e3},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:"Caption",display:{type:"font-family-select"}},captionFontSettings:{...Eo.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:"Text",display:{type:"font-family-select"}},textFontSettings:{...Eo.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:Cs},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:_e.fontSettings.fontFamily,textFontSettings:{fontWeight:_e.fontSettings.fontWeight,fontStyle:_e.fontSettings.fontStyle},textLetterSpacing:_e.letterSpacing,textWordSpacing:_e.wordSpacing,textTextAlign:_e.textAlign,textTextAppearance:_e.textAppearance,textColor:_e.color,captionFontFamily:_e.fontSettings.fontFamily,captionFontSettings:{fontWeight:_e.fontSettings.fontWeight,fontStyle:_e.fontSettings.fontStyle},captionLetterSpacing:_e.letterSpacing,captionWordSpacing:_e.wordSpacing,captionTextAlign:_e.textAlign,captionTextAppearance:_e.textAppearance,captionColor:_e.color},layoutDefaults:{m:{delay:2500,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:2500,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:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]},"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"}]}]}]}},Ts={element:xs,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:ws,sourceCode:Ss,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}},_s=[Ea,Pa,wl,kl,jl,ns,Ts];exports.components=_s;exports.isSchemaV1=xr;
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;