@cntrl-site/components 1.0.7-alpha.5 → 1.0.7-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),P=require("react"),me=require("classnames"),T=require("./useScopedStyles-DpVdqfXj.js"),br=require("react-dom");function Sr(e){return e.type==="object"&&e.version===1}const xr="ControlSlider-module__wrapper___sHEkd",Cr="ControlSlider-module__hoverArrow___A-dOH",wr="ControlSlider-module__sliderItem___QQSkR",$r="ControlSlider-module__sliderImage___9hRl-",Tr="ControlSlider-module__arrow___05ghY",_r="ControlSlider-module__arrowVertical___tBfVN",Ar="ControlSlider-module__nextArrow___-30Yc",Lr="ControlSlider-module__arrowInner___aEra3",Er="ControlSlider-module__arrowIcon___S4ztF",Fr="ControlSlider-module__arrowImg___2dwJW",kr="ControlSlider-module__mirror___brd6U",Ir="ControlSlider-module__pagination___bicLF",Rr="ControlSlider-module__paginationInner___bT-P-",Wr="ControlSlider-module__paginationVertical___zYqKw",zr="ControlSlider-module__paginationItem___nTRbk",Vr="ControlSlider-module__dot___p1Qun",Mr="ControlSlider-module__activeDot___LHFaj",Nr="ControlSlider-module__paginationInsideBottom___R3FWn",Hr="ControlSlider-module__paginationInsideTop___V-qb-",Pr="ControlSlider-module__paginationOutsideBottom___14w8D",jr="ControlSlider-module__paginationOutsideTop___SCLqB",Or="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",Zr="ControlSlider-module__withPointerEvents___t-18M",Jr="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",K={wrapper:xr,hoverArrow:Cr,sliderItem:wr,sliderImage:$r,arrow:Tr,arrowVertical:_r,nextArrow:Ar,arrowInner:Lr,arrowIcon:Er,arrowImg:Fr,mirror:kr,pagination:Ir,paginationInner:Rr,paginationVertical:Wr,paginationItem:zr,dot:Vr,activeDot:Mr,paginationInsideBottom:Nr,paginationInsideTop:Hr,paginationOutsideBottom:Pr,paginationOutsideTop:jr,paginationInsideLeft:Or,paginationInsideRight:Br,paginationOutsideLeft:Dr,paginationOutsideRight:Ur,imgWrapper:qr,captionBlock:Gr,captionTextWrapper:Yr,captionText:Xr,active:Kr,withPointerEvents:Zr,topLeftAlignment:Jr,topCenterAlignment:Qr,topRightAlignment:ei,middleLeftAlignment:ti,middleCenterAlignment:ni,middleRightAlignment:oi,bottomLeftAlignment:ri,bottomCenterAlignment:ii,bottomRightAlignment:ai,clickOverlay:li,contain:si,cover:ci};function pi(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 ui(e,t,n){return t&&pi(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var io="(prefers-reduced-motion: reduce)",gt=1,di=2,vt=3,xt=4,Mt=5,Jt=6,nn=7,gi={CREATED:gt,MOUNTED:di,IDLE:vt,MOVING:xt,SCROLLING:Mt,DRAGGING:Jt,DESTROYED:nn};function Ge(e){e.length=0}function et(e,t,n){return Array.prototype.slice.call(e,t,n)}function de(e){return e.bind.apply(e,[null].concat(et(arguments,1)))}var Eo=setTimeout,An=function(){};function ao(e){return requestAnimationFrame(e)}function sn(e,t){return typeof t===e}function Et(e){return!Mn(e)&&sn("object",e)}var Vn=Array.isArray,Fo=de(sn,"function"),Je=de(sn,"string"),Nt=de(sn,"undefined");function Mn(e){return e===null}function ko(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ht(e){return Vn(e)?e:[e]}function Le(e,t){Ht(e).forEach(t)}function Nn(e,t){return e.indexOf(t)>-1}function Qt(e,t){return e.push.apply(e,Ht(t)),e}function De(e,t,n){e&&Le(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function Me(e,t){De(e,Je(t)?t.split(" "):t,!0)}function Pt(e,t){Le(t,e.appendChild.bind(e))}function Hn(e,t){Le(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function Ft(e,t){return ko(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Io(e,t){var n=e?et(e.children):[];return t?n.filter(function(o){return Ft(o,t)}):n}function jt(e,t){return t?Io(e,t)[0]:e.firstElementChild}var kt=Object.keys;function it(e,t,n){return e&&(n?kt(e).reverse():kt(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function It(e){return et(arguments,1).forEach(function(t){it(t,function(n,o){e[o]=t[o]})}),e}function Ke(e){return et(arguments,1).forEach(function(t){it(t,function(n,o){Vn(n)?e[o]=n.slice():Et(n)?e[o]=Ke({},Et(e[o])?e[o]:{},n):e[o]=n})}),e}function lo(e,t){Le(t||kt(e),function(n){delete e[n]})}function Ne(e,t){Le(e,function(n){Le(t,function(o){n&&n.removeAttribute(o)})})}function te(e,t,n){Et(t)?it(t,function(o,r){te(e,r,o)}):Le(e,function(o){Mn(n)||n===""?Ne(o,t):o.setAttribute(t,String(n))})}function mt(e,t,n){var o=document.createElement(e);return t&&(Je(t)?Me(o,t):te(o,t)),n&&Pt(n,o),o}function Ie(e,t,n){if(Nt(n))return getComputedStyle(e)[t];Mn(n)||(e.style[t]=""+n)}function Rt(e,t){Ie(e,"display",t)}function Ro(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Re(e,t){return e.getAttribute(t)}function so(e,t){return e&&e.classList.contains(t)}function _e(e){return e.getBoundingClientRect()}function at(e){Le(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Wo(e){return jt(new DOMParser().parseFromString(e,"text/html").body)}function Be(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function zo(e,t){return e&&e.querySelector(t)}function Pn(e,t){return t?et(e.querySelectorAll(t)):[]}function Ue(e,t){De(e,t,!1)}function Ln(e){return e.timeStamp}function rt(e){return Je(e)?e:e?e+"px":""}var Ot="splide",jn="data-"+Ot;function At(e,t){if(!e)throw new Error("["+Ot+"] "+(t||""))}var Qe=Math.min,on=Math.max,rn=Math.floor,Wt=Math.ceil,$e=Math.abs;function Vo(e,t,n){return $e(e-t)<n}function en(e,t,n,o){var r=Qe(t,n),a=on(t,n);return o?r<e&&e<a:r<=e&&e<=a}function ut(e,t,n){var o=Qe(t,n),r=on(t,n);return Qe(on(o,e),r)}function En(e){return+(e>0)-+(e<0)}function Fn(e,t){return Le(t,function(n){e=e.replace("%s",""+n)}),e}function On(e){return e<10?"0"+e:""+e}var co={};function mi(e){return""+e+On(co[e]=(co[e]||0)+1)}function Mo(){var e=[];function t(i,c,p,g){r(i,c,function(u,F,x){var f="addEventListener"in u,d=f?u.removeEventListener.bind(u,F,p,g):u.removeListener.bind(u,p);f?u.addEventListener(F,p,g):u.addListener(p),e.push([u,F,x,p,d])})}function n(i,c,p){r(i,c,function(g,u,F){e=e.filter(function(x){return x[0]===g&&x[1]===u&&x[2]===F&&(!p||x[3]===p)?(x[4](),!1):!0})})}function o(i,c,p){var g,u=!0;return typeof CustomEvent=="function"?g=new CustomEvent(c,{bubbles:u,detail:p}):(g=document.createEvent("CustomEvent"),g.initCustomEvent(c,u,!1,p)),i.dispatchEvent(g),g}function r(i,c,p){Le(i,function(g){g&&Le(c,function(u){u.split(" ").forEach(function(F){var x=F.split(".");p(g,x[0],x[1])})})})}function a(){e.forEach(function(i){i[4]()}),Ge(e)}return{bind:t,unbind:n,dispatch:o,destroy:a}}var tt="mounted",kn="ready",Ye="move",Ct="moved",Bn="click",No="active",Ho="inactive",Po="visible",jo="hidden",ve="refresh",we="updated",bt="resize",cn="resized",Oo="drag",Bo="dragging",Do="dragged",pn="scroll",st="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",Zo="sh",an="ei";function ye(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Mo();function o(a,i){n.bind(t,Ht(a).join(" "),function(c){i.apply(i,Vn(c.detail)?c.detail:[])})}function r(a){n.dispatch(t,a,et(arguments,1))}return e&&e.event.on(Dn,n.destroy),It(n,{bus:t,on:o,off:de(n.unbind,t),emit:r})}function un(e,t,n,o){var r=Date.now,a,i=0,c,p=!0,g=0;function u(){if(!p){if(i=e?Qe((r()-a)/e,1):1,n&&n(i),i>=1&&(t(),a=r(),o&&++g>=o))return x();c=ao(u)}}function F(S){S||d(),a=r()-(S?i*e:0),p=!1,c=ao(u)}function x(){p=!0}function f(){a=r(),i=0,n&&n(i)}function d(){c&&cancelAnimationFrame(c),i=0,c=0,p=!0}function m(S){e=S}function _(){return p}return{start:F,rewind:f,pause:x,cancel:d,set:m,isPaused:_}}function yi(e){var t=e;function n(r){t=r}function o(r){return Nn(Ht(r),t)}return{set:n,is:o}}function hi(e,t){var n=un(0,e,null,1);return function(){n.isPaused()&&n.start()}}function vi(e,t,n){var o=e.state,r=n.breakpoints||{},a=n.reducedMotion||{},i=Mo(),c=[];function p(){var d=n.mediaQuery==="min";kt(r).sort(function(m,_){return d?+m-+_:+_-+m}).forEach(function(m){u(r[m],"("+(d?"min":"max")+"-width:"+m+"px)")}),u(a,io),F()}function g(d){d&&i.destroy()}function u(d,m){var _=matchMedia(m);i.bind(_,"change",F),c.push([d,_])}function F(){var d=o.is(nn),m=n.direction,_=c.reduce(function(S,b){return Ke(S,b[1].matches?b[0]:{})},{});lo(n),f(_),n.destroy?e.destroy(n.destroy==="completely"):d?(g(!0),e.mount()):m!==n.direction&&e.refresh()}function x(d){matchMedia(io).matches&&(d?Ke(n,a):lo(n,kt(a)))}function f(d,m,_){Ke(n,d),m&&Ke(Object.getPrototypeOf(n),d),(_||!o.is(gt))&&e.emit(we,n)}return{setup:p,destroy:g,reduce:x,set:f}}var dn="Arrow",gn=dn+"Left",mn=dn+"Right",Jo=dn+"Up",Qo=dn+"Down",po="rtl",fn="ttb",xn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Jo,mn],ArrowRight:[Qo,gn]};function bi(e,t,n){function o(a,i,c){c=c||n.direction;var p=c===po&&!i?1:c===fn?0:-1;return xn[a]&&xn[a][p]||a.replace(/width|left|right/i,function(g,u){var F=xn[g.toLowerCase()][p]||g;return u>0?F.charAt(0).toUpperCase()+F.slice(1):F})}function r(a){return a*(n.direction===po?1:-1)}return{resolve:o,orient:r}}var qe="role",ft="tabindex",Si="disabled",We="aria-",Bt=We+"controls",er=We+"current",uo=We+"selected",Ae=We+"label",Xn=We+"labelledby",tr=We+"hidden",Kn=We+"orientation",zt=We+"roledescription",go=We+"live",mo=We+"busy",fo=We+"atomic",Zn=[qe,ft,Si,Bt,er,Ae,Xn,tr,Kn,zt],He=Ot+"__",nt="is-",Cn=Ot,yo=He+"track",xi=He+"list",yn=He+"slide",nr=yn+"--clone",Ci=yn+"__container",Jn=He+"arrows",hn=He+"arrow",or=hn+"--prev",rr=hn+"--next",vn=He+"pagination",ir=vn+"__page",wi=He+"progress",$i=wi+"__bar",Ti=He+"toggle",_i=He+"spinner",Ai=He+"sr",Li=nt+"initialized",lt=nt+"active",ar=nt+"prev",lr=nt+"next",In=nt+"visible",Rn=nt+"loading",sr=nt+"focus-in",cr=nt+"overflow",Ei=[lt,In,ar,lr,Rn,sr,cr],Fi={slide:yn,clone:nr,arrows:Jn,arrow:hn,prev:or,next:rr,pagination:vn,page:ir,spinner:_i};function ki(e,t){if(Fo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Ft(n,t);)n=n.parentElement;return n}var Ii=5,ho=200,pr="touchstart mousedown",wn="touchmove mousemove",$n="touchend touchcancel mouseup click";function Ri(e,t,n){var o=ye(e),r=o.on,a=o.bind,i=e.root,c=n.i18n,p={},g=[],u=[],F=[],x,f,d;function m(){w(),j(),b()}function _(){r(ve,S),r(ve,m),r(we,b),a(document,pr+" keydown",function(y){d=y.type==="keydown"},{capture:!0}),a(i,"focusin",function(){De(i,sr,!!d)})}function S(y){var L=Zn.concat("style");Ge(g),Ue(i,u),Ue(x,F),Ne([x,f],L),Ne(i,y?L:["style",zt])}function b(){Ue(i,u),Ue(x,F),u=C(Cn),F=C(yo),Me(i,u),Me(x,F),te(i,Ae,n.label),te(i,Xn,n.labelledby)}function w(){x=z("."+yo),f=jt(x,"."+xi),At(x&&f,"A track/list element is missing."),Qt(g,Io(f,"."+yn+":not(."+nr+")")),it({arrows:Jn,pagination:vn,prev:or,next:rr,bar:$i,toggle:Ti},function(y,L){p[L]=z("."+y)}),It(p,{root:i,track:x,list:f,slides:g})}function j(){var y=i.id||mi(Ot),L=n.role;i.id=y,x.id=x.id||y+"-track",f.id=f.id||y+"-list",!Re(i,qe)&&i.tagName!=="SECTION"&&L&&te(i,qe,L),te(i,zt,c.carousel),te(f,qe,"presentation")}function z(y){var L=zo(i,y);return L&&ki(L,"."+Cn)===i?L:void 0}function C(y){return[y+"--"+n.type,y+"--"+n.direction,n.drag&&y+"--draggable",n.isNavigation&&y+"--nav",y===Cn&&lt]}return It(p,{setup:m,mount:_,destroy:S})}var St="slide",wt="loop",Dt="fade";function Wi(e,t,n,o){var r=ye(e),a=r.on,i=r.emit,c=r.bind,p=e.Components,g=e.root,u=e.options,F=u.isNavigation,x=u.updateOnMove,f=u.i18n,d=u.pagination,m=u.slideFocus,_=p.Direction.resolve,S=Re(o,"style"),b=Re(o,Ae),w=n>-1,j=jt(o,"."+Ci),z;function C(){w||(o.id=g.id+"-slide"+On(t+1),te(o,qe,d?"tabpanel":"group"),te(o,zt,f.slide),te(o,Ae,b||Fn(f.slideLabel,[t+1,e.length]))),y()}function y(){c(o,"click",de(i,Bn,R)),c(o,"keydown",de(i,Ko,R)),a([Ct,Zo,st],$),a(Un,v),x&&a(Ye,H)}function L(){z=!0,r.destroy(),Ue(o,Ei),Ne(o,Zn),te(o,"style",S),te(o,Ae,b||"")}function v(){var E=e.splides.map(function(A){var W=A.splide.Components.Slides.getAt(t);return W?W.slide.id:""}).join(" ");te(o,Ae,Fn(f.slideX,(w?n:t)+1)),te(o,Bt,E),te(o,qe,m?"button":""),m&&Ne(o,zt)}function H(){z||$()}function $(){if(!z){var E=e.index;V(),k(),De(o,ar,t===E-1),De(o,lr,t===E+1)}}function V(){var E=O();E!==so(o,lt)&&(De(o,lt,E),te(o,er,F&&E||""),i(E?No:Ho,R))}function k(){var E=h(),A=!E&&(!O()||w);if(e.state.is([xt,Mt])||te(o,tr,A||""),te(Pn(o,u.focusableNodes||""),ft,A?-1:""),m&&te(o,ft,A?-1:0),E!==so(o,In)&&(De(o,In,E),i(E?Po:jo,R)),!E&&document.activeElement===o){var W=p.Slides.getAt(e.index);W&&Ro(W.slide)}}function U(E,A,W){Ie(W&&j||o,E,A)}function O(){var E=e.index;return E===t||u.cloneStatus&&E===n}function h(){if(e.is(Dt))return O();var E=_e(p.Elements.track),A=_e(o),W=_("left",!0),X=_("right",!0);return rn(E[W])<=Wt(A[W])&&rn(A[X])<=Wt(E[X])}function I(E,A){var W=$e(E-t);return!w&&(u.rewind||e.is(wt))&&(W=Qe(W,e.length-W)),W<=A}var R={index:t,slideIndex:n,slide:o,container:j,isClone:w,mount:C,destroy:L,update:$,style:U,isWithin:I};return R}function zi(e,t,n){var o=ye(e),r=o.on,a=o.emit,i=o.bind,c=t.Elements,p=c.slides,g=c.list,u=[];function F(){x(),r(ve,f),r(ve,x)}function x(){p.forEach(function($,V){m($,V,-1)})}function f(){z(function($){$.destroy()}),Ge(u)}function d(){z(function($){$.update()})}function m($,V,k){var U=Wi(e,V,k,$);U.mount(),u.push(U),u.sort(function(O,h){return O.index-h.index})}function _($){return $?C(function(V){return!V.isClone}):u}function S($){var V=t.Controller,k=V.toIndex($),U=V.hasFocus()?1:n.perPage;return C(function(O){return en(O.index,k,k+U-1)})}function b($){return C($)[0]}function w($,V){Le($,function(k){if(Je(k)&&(k=Wo(k)),ko(k)){var U=p[V];U?Hn(k,U):Pt(g,k),Me(k,n.classes.slide),L(k,de(a,bt))}}),a(ve)}function j($){at(C($).map(function(V){return V.slide})),a(ve)}function z($,V){_(V).forEach($)}function C($){return u.filter(Fo($)?$:function(V){return Je($)?Ft(V.slide,$):Nn(Ht($),V.index)})}function y($,V,k){z(function(U){U.style($,V,k)})}function L($,V){var k=Pn($,"img"),U=k.length;U?k.forEach(function(O){i(O,"load error",function(){--U||V()})}):V()}function v($){return $?p.length:u.length}function H(){return u.length>n.perPage}return{mount:F,destroy:f,update:d,register:m,get:_,getIn:S,getAt:b,add:w,remove:j,forEach:z,filter:C,style:y,getLength:v,isEnough:H}}function Vi(e,t,n){var o=ye(e),r=o.on,a=o.bind,i=o.emit,c=t.Slides,p=t.Direction.resolve,g=t.Elements,u=g.root,F=g.track,x=g.list,f=c.getAt,d=c.style,m,_,S;function b(){w(),a(window,"resize load",hi(de(i,bt))),r([we,ve],w),r(bt,j)}function w(){m=n.direction===fn,Ie(u,"maxWidth",rt(n.width)),Ie(F,p("paddingLeft"),z(!1)),Ie(F,p("paddingRight"),z(!0)),j(!0)}function j(R){var E=_e(u);(R||_.width!==E.width||_.height!==E.height)&&(Ie(F,"height",C()),d(p("marginRight"),rt(n.gap)),d("width",L()),d("height",v(),!0),_=E,i(cn),S!==(S=I())&&(De(u,cr,S),i(fi,S)))}function z(R){var E=n.padding,A=p(R?"right":"left");return E&&rt(E[A]||(Et(E)?0:E))||"0px"}function C(){var R="";return m&&(R=y(),At(R,"height or heightRatio is missing."),R="calc("+R+" - "+z(!1)+" - "+z(!0)+")"),R}function y(){return rt(n.height||_e(x).width*n.heightRatio)}function L(){return n.autoWidth?null:rt(n.fixedWidth)||(m?"":H())}function v(){return rt(n.fixedHeight)||(m?n.autoHeight?null:H():y())}function H(){var R=rt(n.gap);return"calc((100%"+(R&&" + "+R)+")/"+(n.perPage||1)+(R&&" - "+R)+")"}function $(){return _e(x)[p("width")]}function V(R,E){var A=f(R||0);return A?_e(A.slide)[p("width")]+(E?0:O()):0}function k(R,E){var A=f(R);if(A){var W=_e(A.slide)[p("right")],X=_e(x)[p("left")];return $e(W-X)+(E?0:O())}return 0}function U(R){return k(e.length-1)-k(0)+V(0,R)}function O(){var R=f(0);return R&&parseFloat(Ie(R.slide,p("marginRight")))||0}function h(R){return parseFloat(Ie(F,p("padding"+(R?"Right":"Left"))))||0}function I(){return e.is(Dt)||U(!0)>$()}return{mount:b,resize:j,listSize:$,slideSize:V,sliderSize:U,totalSize:k,getPadding:h,isOverflow:I}}var Mi=2;function Ni(e,t,n){var o=ye(e),r=o.on,a=t.Elements,i=t.Slides,c=t.Direction.resolve,p=[],g;function u(){r(ve,F),r([we,bt],f),(g=_())&&(d(g),t.Layout.resize(!0))}function F(){x(),u()}function x(){at(p),Ge(p),o.destroy()}function f(){var S=_();g!==S&&(g<S||!S)&&o.emit(ve)}function d(S){var b=i.get().slice(),w=b.length;if(w){for(;b.length<S;)Qt(b,b);Qt(b.slice(-S),b.slice(0,S)).forEach(function(j,z){var C=z<S,y=m(j.slide,z);C?Hn(y,b[0].slide):Pt(a.list,y),Qt(p,y),i.register(y,z-S+(C?0:w),j.index)})}}function m(S,b){var w=S.cloneNode(!0);return Me(w,n.classes.clone),w.id=e.root.id+"-clone"+On(b+1),w}function _(){var S=n.clones;if(!e.is(wt))S=0;else if(Nt(S)){var b=n[c("fixedWidth")]&&t.Layout.slideSize(0),w=b&&Wt(_e(a.track)[c("width")]/b);S=w||n[c("autoWidth")]&&e.length||n.perPage*Mi}return S}return{mount:u,destroy:x}}function Hi(e,t,n){var o=ye(e),r=o.on,a=o.emit,i=e.state.set,c=t.Layout,p=c.slideSize,g=c.getPadding,u=c.totalSize,F=c.listSize,x=c.sliderSize,f=t.Direction,d=f.resolve,m=f.orient,_=t.Elements,S=_.list,b=_.track,w;function j(){w=t.Transition,r([tt,cn,we,ve],z)}function z(){t.Controller.isBusy()||(t.Scroll.cancel(),y(e.index),t.Slides.update())}function C(A,W,X,re){A!==W&&R(A>X)&&($(),L(H(U(),A>X),!0)),i(xt),a(Ye,W,X,A),w.start(W,function(){i(vt),a(Ct,W,X,A),re&&re()})}function y(A){L(k(A,!0))}function L(A,W){if(!e.is(Dt)){var X=W?A:v(A);Ie(S,"transform","translate"+d("X")+"("+X+"px)"),A!==X&&a(Zo)}}function v(A){if(e.is(wt)){var W=V(A),X=W>t.Controller.getEnd(),re=W<0;(re||X)&&(A=H(A,X))}return A}function H(A,W){var X=A-I(W),re=x();return A-=m(re*(Wt($e(X)/re)||1))*(W?1:-1),A}function $(){L(U(),!0),w.cancel()}function V(A){for(var W=t.Slides.get(),X=0,re=1/0,oe=0;oe<W.length;oe++){var le=W[oe].index,M=$e(k(le,!0)-A);if(M<=re)re=M,X=le;else break}return X}function k(A,W){var X=m(u(A-1)-h(A));return W?O(X):X}function U(){var A=d("left");return _e(S)[A]-_e(b)[A]+m(g(!1))}function O(A){return n.trimSpace&&e.is(St)&&(A=ut(A,0,m(x(!0)-F()))),A}function h(A){var W=n.focus;return W==="center"?(F()-p(A,!0))/2:+W*p(A)||0}function I(A){return k(A?t.Controller.getEnd():0,!!n.trimSpace)}function R(A){var W=m(H(U(),A));return A?W>=0:W<=S[d("scrollWidth")]-_e(b)[d("width")]}function E(A,W){W=Nt(W)?U():W;var X=A!==!0&&m(W)<m(I(!1)),re=A!==!1&&m(W)>m(I(!0));return X||re}return{mount:j,move:C,jump:y,translate:L,shift:H,cancel:$,toIndex:V,toPosition:k,getPosition:U,getLimit:I,exceededLimit:E,reposition:z}}function Pi(e,t,n){var o=ye(e),r=o.on,a=o.emit,i=t.Move,c=i.getPosition,p=i.getLimit,g=i.toPosition,u=t.Slides,F=u.isEnough,x=u.getLength,f=n.omitEnd,d=e.is(wt),m=e.is(St),_=de(U,!1),S=de(U,!0),b=n.start||0,w,j=b,z,C,y;function L(){v(),r([we,ve,an],v),r(cn,H)}function v(){z=x(!0),C=n.perMove,y=n.perPage,w=R();var M=ut(b,0,f?w:z-1);M!==b&&(b=M,i.reposition())}function H(){w!==R()&&a(an)}function $(M,Q,fe){if(!le()){var se=k(M),ge=I(se);ge>-1&&(Q||ge!==b)&&(X(ge),i.move(se,ge,j,fe))}}function V(M,Q,fe,se){t.Scroll.scroll(M,Q,fe,function(){var ge=I(i.toIndex(c()));X(f?Qe(ge,w):ge),se&&se()})}function k(M){var Q=b;if(Je(M)){var fe=M.match(/([+\-<>])(\d+)?/)||[],se=fe[1],ge=fe[2];se==="+"||se==="-"?Q=O(b+ +(""+se+(+ge||1)),b):se===">"?Q=ge?E(+ge):_(!0):se==="<"&&(Q=S(!0))}else Q=d?M:ut(M,0,w);return Q}function U(M,Q){var fe=C||(oe()?1:y),se=O(b+fe*(M?-1:1),b,!(C||oe()));return se===-1&&m&&!Vo(c(),p(!M),1)?M?0:w:Q?se:I(se)}function O(M,Q,fe){if(F()||oe()){var se=h(M);se!==M&&(Q=M,M=se,fe=!1),M<0||M>w?!C&&(en(0,M,Q,!0)||en(w,Q,M,!0))?M=E(A(M)):d?M=fe?M<0?-(z%y||y):z:M:n.rewind?M=M<0?w:0:M=-1:fe&&M!==Q&&(M=E(A(Q)+(M<Q?-1:1)))}else M=-1;return M}function h(M){if(m&&n.trimSpace==="move"&&M!==b)for(var Q=c();Q===g(M,!0)&&en(M,0,e.length-1,!n.rewind);)M<b?--M:++M;return M}function I(M){return d?(M+z)%z||0:M}function R(){for(var M=z-(oe()||d&&C?1:y);f&&M-- >0;)if(g(z-1,!0)!==g(M,!0)){M++;break}return ut(M,0,z-1)}function E(M){return ut(oe()?M:y*M,0,w)}function A(M){return oe()?Qe(M,w):rn((M>=w?z-1:M)/y)}function W(M){var Q=i.toIndex(M);return m?ut(Q,0,w):Q}function X(M){M!==b&&(j=b,b=M)}function re(M){return M?j:b}function oe(){return!Nt(n.focus)||n.isNavigation}function le(){return e.state.is([xt,Mt])&&!!n.waitForTransition}return{mount:L,go:$,scroll:V,getNext:_,getPrev:S,getAdjacent:U,getEnd:R,setIndex:X,getIndex:re,toIndex:E,toPage:A,toDest:W,hasFocus:oe,isBusy:le}}var ji="http://www.w3.org/2000/svg",Oi="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",Gt=40;function Bi(e,t,n){var o=ye(e),r=o.on,a=o.bind,i=o.emit,c=n.classes,p=n.i18n,g=t.Elements,u=t.Controller,F=g.arrows,x=g.track,f=F,d=g.prev,m=g.next,_,S,b={};function w(){z(),r(we,j)}function j(){C(),w()}function z(){var V=n.arrows;V&&!(d&&m)&&v(),d&&m&&(It(b,{prev:d,next:m}),Rt(f,V?"":"none"),Me(f,S=Jn+"--"+n.direction),V&&(y(),$(),te([d,m],Bt,x.id),i(Uo,d,m)))}function C(){o.destroy(),Ue(f,S),_?(at(F?[d,m]:f),d=m=null):Ne([d,m],Zn)}function y(){r([tt,Ct,ve,st,an],$),a(m,"click",de(L,">")),a(d,"click",de(L,"<"))}function L(V){u.go(V,!0)}function v(){f=F||mt("div",c.arrows),d=H(!0),m=H(!1),_=!0,Pt(f,[d,m]),!F&&Hn(f,x)}function H(V){var k='<button class="'+c.arrow+" "+(V?c.prev:c.next)+'" type="button"><svg xmlns="'+ji+'" viewBox="0 0 '+Gt+" "+Gt+'" width="'+Gt+'" height="'+Gt+'" focusable="false"><path d="'+(n.arrowPath||Oi)+'" />';return Wo(k)}function $(){if(d&&m){var V=e.index,k=u.getPrev(),U=u.getNext(),O=k>-1&&V<k?p.last:p.prev,h=U>-1&&V>U?p.first:p.next;d.disabled=k<0,m.disabled=U<0,te(d,Ae,O),te(m,Ae,h),i(qo,d,m,k,U)}}return{arrows:b,mount:w,destroy:C,update:$}}var Di=jn+"-interval";function Ui(e,t,n){var o=ye(e),r=o.on,a=o.bind,i=o.emit,c=un(n.interval,e.go.bind(e,">"),y),p=c.isPaused,g=t.Elements,u=t.Elements,F=u.root,x=u.toggle,f=n.autoplay,d,m,_=f==="pause";function S(){f&&(b(),x&&te(x,Bt,g.track.id),_||w(),C())}function b(){n.pauseOnHover&&a(F,"mouseenter mouseleave",function(v){d=v.type==="mouseenter",z()}),n.pauseOnFocus&&a(F,"focusin focusout",function(v){m=v.type==="focusin",z()}),x&&a(x,"click",function(){_?w():j(!0)}),r([Ye,pn,ve],c.rewind),r(Ye,L)}function w(){p()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),m=d=_=!1,C(),i(qn))}function j(v){v===void 0&&(v=!0),_=!!v,C(),p()||(c.pause(),i(Gn))}function z(){_||(d||m?j(!1):w())}function C(){x&&(De(x,lt,!_),te(x,Ae,n.i18n[_?"play":"pause"]))}function y(v){var H=g.bar;H&&Ie(H,"width",v*100+"%"),i(Xo,v)}function L(v){var H=t.Slides.getAt(v);c.set(H&&+Re(H.slide,Di)||n.interval)}return{mount:S,destroy:c.cancel,play:w,pause:j,isPaused:p}}function qi(e,t,n){var o=ye(e),r=o.on;function a(){n.cover&&(r(Yn,de(c,!0)),r([tt,we,ve],de(i,!0)))}function i(p){t.Slides.forEach(function(g){var u=jt(g.container||g.slide,"img");u&&u.src&&c(p,u,g)})}function c(p,g,u){u.style("background",p?'center/cover no-repeat url("'+g.src+'")':"",!0),Rt(g,p?"none":"")}return{mount:a,destroy:de(i,!1)}}var Gi=10,Yi=600,Xi=.6,Ki=1.5,Zi=800;function Ji(e,t,n){var o=ye(e),r=o.on,a=o.emit,i=e.state.set,c=t.Move,p=c.getPosition,g=c.getLimit,u=c.exceededLimit,F=c.translate,x=e.is(St),f,d,m=1;function _(){r(Ye,j),r([we,ve],z)}function S(y,L,v,H,$){var V=p();if(j(),v&&(!x||!u())){var k=t.Layout.sliderSize(),U=En(y)*k*rn($e(y)/k)||0;y=c.toPosition(t.Controller.toDest(y%k))+U}var O=Vo(V,y,1);m=1,L=O?0:L||on($e(y-V)/Ki,Zi),d=H,f=un(L,b,de(w,V,y,$),1),i(Mt),a(pn),f.start()}function b(){i(vt),d&&d(),a(st)}function w(y,L,v,H){var $=p(),V=y+(L-y)*C(H),k=(V-$)*m;F($+k),x&&!v&&u()&&(m*=Xi,$e(k)<Gi&&S(g(u(!0)),Yi,!1,d,!0))}function j(){f&&f.cancel()}function z(){f&&!f.isPaused()&&(j(),b())}function C(y){var L=n.easingFunc;return L?L(y):1-Math.pow(1-y,4)}return{mount:_,destroy:j,scroll:S,cancel:z}}var dt={passive:!1,capture:!0};function Qi(e,t,n){var o=ye(e),r=o.on,a=o.emit,i=o.bind,c=o.unbind,p=e.state,g=t.Move,u=t.Scroll,F=t.Controller,x=t.Elements.track,f=t.Media.reduce,d=t.Direction,m=d.resolve,_=d.orient,S=g.getPosition,b=g.exceededLimit,w,j,z,C,y,L=!1,v,H,$;function V(){i(x,wn,An,dt),i(x,$n,An,dt),i(x,pr,U,dt),i(x,"click",I,{capture:!0}),i(x,"dragstart",Be),r([tt,we],k)}function k(){var q=n.drag;ze(!q),C=q==="free"}function U(q){if(v=!1,!H){var s=ge(q);se(q.target)&&(s||!q.button)&&(F.isBusy()?Be(q,!0):($=s?x:window,y=p.is([xt,Mt]),z=null,i($,wn,O,dt),i($,$n,h,dt),g.cancel(),u.cancel(),R(q)))}}function O(q){if(p.is(Jt)||(p.set(Jt),a(Oo)),q.cancelable)if(y){g.translate(w+fe(oe(q)));var s=le(q)>ho,N=L!==(L=b());(s||N)&&R(q),v=!0,a(Bo),Be(q)}else W(q)&&(y=A(q),Be(q))}function h(q){p.is(Jt)&&(p.set(vt),a(Do)),y&&(E(q),Be(q)),c($,wn,O),c($,$n,h),y=!1}function I(q){!H&&v&&Be(q,!0)}function R(q){z=j,j=q,w=S()}function E(q){var s=X(q),N=re(s),B=n.rewind&&n.rewindByDrag;f(!1),C?F.scroll(N,0,n.snap):e.is(Dt)?F.go(_(En(s))<0?B?"<":"-":B?">":"+"):e.is(St)&&L&&B?F.go(b(!0)?">":"<"):F.go(F.toDest(N),!0),f(!0)}function A(q){var s=n.dragMinThreshold,N=Et(s),B=N&&s.mouse||0,G=(N?s.touch:+s)||10;return $e(oe(q))>(ge(q)?G:B)}function W(q){return $e(oe(q))>$e(oe(q,!0))}function X(q){if(e.is(wt)||!L){var s=le(q);if(s&&s<ho)return oe(q)/s}return 0}function re(q){return S()+En(q)*Qe($e(q)*(n.flickPower||600),C?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function oe(q,s){return Q(q,s)-Q(M(q),s)}function le(q){return Ln(q)-Ln(M(q))}function M(q){return j===q&&z||j}function Q(q,s){return(ge(q)?q.changedTouches[0]:q)["page"+m(s?"Y":"X")]}function fe(q){return q/(L&&e.is(St)?Ii:1)}function se(q){var s=n.noDrag;return!Ft(q,"."+ir+", ."+hn)&&(!s||!Ft(q,s))}function ge(q){return typeof TouchEvent<"u"&&q instanceof TouchEvent}function be(){return y}function ze(q){H=q}return{mount:V,disable:ze,isDragging:be}}var ea={Spacebar:" ",Right:mn,Left:gn,Up:Jo,Down:Qo};function Qn(e){return e=Je(e)?e:e.key,ea[e]||e}var vo="keydown";function ta(e,t,n){var o=ye(e),r=o.on,a=o.bind,i=o.unbind,c=e.root,p=t.Direction.resolve,g,u;function F(){x(),r(we,f),r(we,x),r(Ye,m)}function x(){var S=n.keyboard;S&&(g=S==="global"?window:c,a(g,vo,_))}function f(){i(g,vo)}function d(S){u=S}function m(){var S=u;u=!0,Eo(function(){u=S})}function _(S){if(!u){var b=Qn(S);b===p(gn)?e.go("<"):b===p(mn)&&e.go(">")}}return{mount:F,destroy:f,disable:d}}var Lt=jn+"-lazy",tn=Lt+"-srcset",na="["+Lt+"], ["+tn+"]";function oa(e,t,n){var o=ye(e),r=o.on,a=o.off,i=o.bind,c=o.emit,p=n.lazyLoad==="sequential",g=[Ct,st],u=[];function F(){n.lazyLoad&&(x(),r(ve,x))}function x(){Ge(u),f(),p?S():(a(g),r(g,d),d())}function f(){t.Slides.forEach(function(b){Pn(b.slide,na).forEach(function(w){var j=Re(w,Lt),z=Re(w,tn);if(j!==w.src||z!==w.srcset){var C=n.classes.spinner,y=w.parentElement,L=jt(y,"."+C)||mt("span",C,y);u.push([w,b,L]),w.src||Rt(w,"none")}})})}function d(){u=u.filter(function(b){var w=n.perPage*((n.preloadPages||1)+1)-1;return b[1].isWithin(e.index,w)?m(b):!0}),u.length||a(g)}function m(b){var w=b[0];Me(b[1].slide,Rn),i(w,"load error",de(_,b)),te(w,"src",Re(w,Lt)),te(w,"srcset",Re(w,tn)),Ne(w,Lt),Ne(w,tn)}function _(b,w){var j=b[0],z=b[1];Ue(z.slide,Rn),w.type!=="error"&&(at(b[2]),Rt(j,""),c(Yn,j,z),c(bt)),p&&S()}function S(){u.length&&m(u.shift())}return{mount:F,destroy:de(Ge,u),check:d}}function ra(e,t,n){var o=ye(e),r=o.on,a=o.emit,i=o.bind,c=t.Slides,p=t.Elements,g=t.Controller,u=g.hasFocus,F=g.getIndex,x=g.go,f=t.Direction.resolve,d=p.pagination,m=[],_,S;function b(){w(),r([we,ve,an],b);var H=n.pagination;d&&Rt(d,H?"":"none"),H&&(r([Ye,pn,st],v),j(),v(),a(Go,{list:_,items:m},L(e.index)))}function w(){_&&(at(d?et(_.children):_),Ue(_,S),Ge(m),_=null),o.destroy()}function j(){var H=e.length,$=n.classes,V=n.i18n,k=n.perPage,U=u()?g.getEnd()+1:Wt(H/k);_=d||mt("ul",$.pagination,p.track.parentElement),Me(_,S=vn+"--"+y()),te(_,qe,"tablist"),te(_,Ae,V.select),te(_,Kn,y()===fn?"vertical":"");for(var O=0;O<U;O++){var h=mt("li",null,_),I=mt("button",{class:$.page,type:"button"},h),R=c.getIn(O).map(function(A){return A.slide.id}),E=!u()&&k>1?V.pageX:V.slideX;i(I,"click",de(z,O)),n.paginationKeyboard&&i(I,"keydown",de(C,O)),te(h,qe,"presentation"),te(I,qe,"tab"),te(I,Bt,R.join(" ")),te(I,Ae,Fn(E,O+1)),te(I,ft,-1),m.push({li:h,button:I,page:O})}}function z(H){x(">"+H,!0)}function C(H,$){var V=m.length,k=Qn($),U=y(),O=-1;k===f(mn,!1,U)?O=++H%V:k===f(gn,!1,U)?O=(--H+V)%V:k==="Home"?O=0:k==="End"&&(O=V-1);var h=m[O];h&&(Ro(h.button),x(">"+O),Be($,!0))}function y(){return n.paginationDirection||n.direction}function L(H){return m[g.toPage(H)]}function v(){var H=L(F(!0)),$=L(F());if(H){var V=H.button;Ue(V,lt),Ne(V,uo),te(V,ft,-1)}if($){var k=$.button;Me(k,lt),te(k,uo,!0),te(k,ft,"")}a(Yo,{list:_,items:m},H,$)}return{items:m,mount:b,destroy:w,getAt:L,update:v}}var ia=[" ","Enter"];function aa(e,t,n){var o=n.isNavigation,r=n.slideFocus,a=[];function i(){e.splides.forEach(function(d){d.isParent||(g(e,d.splide),g(d.splide,e))}),o&&u()}function c(){a.forEach(function(d){d.destroy()}),Ge(a)}function p(){c(),i()}function g(d,m){var _=ye(d);_.on(Ye,function(S,b,w){m.go(m.is(wt)?w:S)}),a.push(_)}function u(){var d=ye(e),m=d.on;m(Bn,x),m(Ko,f),m([tt,we],F),a.push(d),d.emit(Un,e.splides)}function F(){te(t.Elements.list,Kn,n.direction===fn?"vertical":"")}function x(d){e.go(d.index)}function f(d,m){Nn(ia,Qn(m))&&(x(d),Be(m))}return{setup:de(t.Media.set,{slideFocus:Nt(r)?o:r},!0),mount:i,destroy:c,remount:p}}function la(e,t,n){var o=ye(e),r=o.bind,a=0;function i(){n.wheel&&r(t.Elements.track,"wheel",c,dt)}function c(g){if(g.cancelable){var u=g.deltaY,F=u<0,x=Ln(g),f=n.wheelMinThreshold||0,d=n.wheelSleep||0;$e(u)>f&&x-a>d&&(e.go(F?"<":">"),a=x),p(F)&&Be(g)}}function p(g){return!n.releaseWheel||e.state.is(xt)||t.Controller.getAdjacent(g)!==-1}return{mount:i}}var sa=90;function ca(e,t,n){var o=ye(e),r=o.on,a=t.Elements.track,i=n.live&&!n.isNavigation,c=mt("span",Ai),p=un(sa,de(u,!1));function g(){i&&(x(!t.Autoplay.isPaused()),te(a,fo,!0),c.textContent="…",r(qn,de(x,!0)),r(Gn,de(x,!1)),r([Ct,st],de(u,!0)))}function u(f){te(a,mo,f),f?(Pt(a,c),p.start()):(at(c),p.cancel())}function F(){Ne(a,[go,fo,mo]),at(c)}function x(f){i&&te(a,go,f?"off":"polite")}return{mount:g,disable:x,destroy:F}}var pa=Object.freeze({__proto__:null,Media:vi,Direction:bi,Elements:Ri,Slides:zi,Layout:Vi,Clones:Ni,Move:Hi,Controller:Pi,Arrows:Bi,Autoplay:Ui,Cover:qi,Scroll:Ji,Drag:Qi,Keyboard:ta,LazyLoad:oa,Pagination:ra,Sync:aa,Wheel:la,Live:ca}),ua={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:Fi,i18n:ua,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ga(e,t,n){var o=t.Slides;function r(){ye(e).on([tt,ve],a)}function a(){o.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function i(c,p){o.style("transition","opacity "+n.speed+"ms "+n.easing),Eo(p)}return{mount:r,start:i,cancel:An}}function ma(e,t,n){var o=t.Move,r=t.Controller,a=t.Scroll,i=t.Elements.list,c=de(Ie,i,"transition"),p;function g(){ye(e).bind(i,"transitionend",function(f){f.target===i&&p&&(F(),p())})}function u(f,d){var m=o.toPosition(f,!0),_=o.getPosition(),S=x(f);$e(m-_)>=1&&S>=1?n.useScroll?a.scroll(m,S,!1,d):(c("transform "+S+"ms "+n.easing),o.translate(m,!0),p=d):(o.jump(f),d())}function F(){c(""),a.cancel()}function x(f){var d=n.rewindSpeed;if(e.is(St)&&d){var m=r.getIndex(!0),_=r.getEnd();if(m===0&&f>=_||m>=_&&f===0)return d}return n.speed}return{mount:g,start:u,cancel:F}}var fa=(function(){function e(n,o){this.event=ye(),this.Components={},this.state=yi(gt),this.splides=[],this._o={},this._E={};var r=Je(n)?zo(document,n):n;At(r,r+" is invalid."),this.root=r,o=Ke({label:Re(r,Ae)||"",labelledby:Re(r,Xn)||""},da,e.defaults,o||{});try{Ke(o,JSON.parse(Re(r,jn)))}catch{At(!1,"Invalid JSON")}this._o=Object.create(Ke({},o))}var t=e.prototype;return t.mount=function(o,r){var a=this,i=this.state,c=this.Components;At(i.is([gt,nn]),"Already mounted!"),i.set(gt),this._C=c,this._T=r||this._T||(this.is(Dt)?ga:ma),this._E=o||this._E;var p=It({},pa,this._E,{Transition:this._T});return it(p,function(g,u){var F=g(a,c,a._o);c[u]=F,F.setup&&F.setup()}),it(c,function(g){g.mount&&g.mount()}),this.emit(tt),Me(this.root,Li),i.set(vt),this.emit(kn),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(vt)&&(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(et(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(ve),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,a=this.state;return a.is(gt)?ye(this).on(kn,this.destroy.bind(this,o)):(it(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(Dn),r.destroy(),o&&Ge(this.splides),a.set(nn)),this},ui(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=[[tt,"onMounted"],[kn,"onReady"],[Ye,"onMove"],[Ct,"onMoved"],[Bn,"onClick"],[No,"onActive"],[Ho,"onInactive"],[Po,"onVisible"],[jo,"onHidden"],[ve,"onRefresh"],[we,"onUpdated"],[bt,"onResize"],[cn,"onResized"],[Oo,"onDrag"],[Bo,"onDragging"],[Do,"onDragged"],[pn,"onScroll"],[st,"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 ln(e){return e!==null&&typeof e=="object"}function Wn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!Wn(n,t[o]));if(ln(e)&&ln(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!Wn(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 zn(e,t){const n=e;return ha(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():ln(o)?n[r]=zn(ln(n[r])?n[r]:{},o):n[r]=o}),n}var va=({children:e,className:t,...n})=>P.createElement("div",{className:to("splide__track",t),...n},P.createElement("ul",{className:"splide__list"},e)),ur=class extends P.Component{constructor(){super(...arguments),this.splideRef=P.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=zn({},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&&!Wn(this.options,e)&&(this.splide.options=e,this.options=zn({},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 P.createElement(t,{className:to("splide",e),ref:this.splideRef,...this.omit(r,["options",...bo.map(a=>a[1])])},n?P.createElement(va,null,o):o)}},dr=({children:e,className:t,...n})=>P.createElement("li",{className:to("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),k=require("react"),pe=require("classnames"),w=require("./useScopedStyles-DpVdqfXj.js"),xr=require("react-dom");function Sr(e){return e.type==="object"&&e.version===1}const Cr="ControlSlider-module__wrapper___sHEkd",wr="ControlSlider-module__hoverArrow___A-dOH",Tr="ControlSlider-module__sliderItem___QQSkR",_r="ControlSlider-module__sliderImage___9hRl-",$r="ControlSlider-module__arrow___05ghY",Ar="ControlSlider-module__arrowVertical___tBfVN",Ir="ControlSlider-module__nextArrow___-30Yc",Lr="ControlSlider-module__arrowInner___aEra3",Er="ControlSlider-module__arrowIcon___S4ztF",Fr="ControlSlider-module__arrowImg___2dwJW",kr="ControlSlider-module__mirror___brd6U",Rr="ControlSlider-module__pagination___bicLF",Wr="ControlSlider-module__paginationInner___bT-P-",Mr="ControlSlider-module__paginationVertical___zYqKw",zr="ControlSlider-module__paginationItem___nTRbk",Hr="ControlSlider-module__dot___p1Qun",Vr="ControlSlider-module__activeDot___LHFaj",Nr="ControlSlider-module__paginationInsideBottom___R3FWn",Pr="ControlSlider-module__paginationInsideTop___V-qb-",jr="ControlSlider-module__paginationOutsideBottom___14w8D",Or="ControlSlider-module__paginationOutsideTop___SCLqB",Br="ControlSlider-module__paginationInsideLeft___yOBRZ",Dr="ControlSlider-module__paginationInsideRight___Rtt3o",Ur="ControlSlider-module__paginationOutsideLeft___lahaw",Gr="ControlSlider-module__paginationOutsideRight___EtuQa",qr="ControlSlider-module__imgWrapper___UjEgB",Yr="ControlSlider-module__captionBlock___dJ6-j",Xr="ControlSlider-module__captionTextWrapper___HFlpf",Kr="ControlSlider-module__captionText___uGBVc",Jr="ControlSlider-module__active___WZK4G",Zr="ControlSlider-module__withPointerEvents___t-18M",Qr="ControlSlider-module__topLeftAlignment___zjnGM",ei="ControlSlider-module__topCenterAlignment___gD1xW",ti="ControlSlider-module__topRightAlignment___NMapS",ni="ControlSlider-module__middleLeftAlignment___OnUrY",oi="ControlSlider-module__middleCenterAlignment___Tdkl0",ri="ControlSlider-module__middleRightAlignment___wEbfX",ii="ControlSlider-module__bottomLeftAlignment___cTP2-",ai="ControlSlider-module__bottomCenterAlignment___c54fB",li="ControlSlider-module__bottomRightAlignment___kEwrz",si="ControlSlider-module__clickOverlay___DZA28",ci="ControlSlider-module__contain___pLyq7",pi="ControlSlider-module__cover___KdDat",Z={wrapper:Cr,hoverArrow:wr,sliderItem:Tr,sliderImage:_r,arrow:$r,arrowVertical:Ar,nextArrow:Ir,arrowInner:Lr,arrowIcon:Er,arrowImg:Fr,mirror:kr,pagination:Rr,paginationInner:Wr,paginationVertical:Mr,paginationItem:zr,dot:Hr,activeDot:Vr,paginationInsideBottom:Nr,paginationInsideTop:Pr,paginationOutsideBottom:jr,paginationOutsideTop:Or,paginationInsideLeft:Br,paginationInsideRight:Dr,paginationOutsideLeft:Ur,paginationOutsideRight:Gr,imgWrapper:qr,captionBlock:Yr,captionTextWrapper:Xr,captionText:Kr,active:Jr,withPointerEvents:Zr,topLeftAlignment:Qr,topCenterAlignment:ei,topRightAlignment:ti,middleLeftAlignment:ni,middleCenterAlignment:oi,middleRightAlignment:ri,bottomLeftAlignment:ii,bottomCenterAlignment:ai,bottomRightAlignment:li,clickOverlay:si,contain:ci,cover:pi};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 di(e,t,n){return t&&ui(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var io="(prefers-reduced-motion: reduce)",mt=1,gi=2,vt=3,St=4,Ht=5,Zt=6,nn=7,mi={CREATED:mt,MOUNTED:gi,IDLE:vt,MOVING:St,SCROLLING:Ht,DRAGGING:Zt,DESTROYED:nn};function qe(e){e.length=0}function tt(e,t,n){return Array.prototype.slice.call(e,t,n)}function ve(e){return e.bind.apply(e,[null].concat(tt(arguments,1)))}var Eo=setTimeout,An=function(){};function ao(e){return requestAnimationFrame(e)}function sn(e,t){return typeof t===e}function Lt(e){return!Hn(e)&&sn("object",e)}var zn=Array.isArray,Fo=ve(sn,"function"),Qe=ve(sn,"string"),Vt=ve(sn,"undefined");function Hn(e){return e===null}function ko(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Nt(e){return zn(e)?e:[e]}function Ee(e,t){Nt(e).forEach(t)}function Vn(e,t){return e.indexOf(t)>-1}function Qt(e,t){return e.push.apply(e,Nt(t)),e}function De(e,t,n){e&&Ee(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function ze(e,t){De(e,Qe(t)?t.split(" "):t,!0)}function Pt(e,t){Ee(t,e.appendChild.bind(e))}function Nn(e,t){Ee(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function Et(e,t){return ko(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Ro(e,t){var n=e?tt(e.children):[];return t?n.filter(function(o){return Et(o,t)}):n}function jt(e,t){return t?Ro(e,t)[0]:e.firstElementChild}var Ft=Object.keys;function at(e,t,n){return e&&(n?Ft(e).reverse():Ft(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function kt(e){return tt(arguments,1).forEach(function(t){at(t,function(n,o){e[o]=t[o]})}),e}function Ke(e){return tt(arguments,1).forEach(function(t){at(t,function(n,o){zn(n)?e[o]=n.slice():Lt(n)?e[o]=Ke({},Lt(e[o])?e[o]:{},n):e[o]=n})}),e}function lo(e,t){Ee(t||Ft(e),function(n){delete e[n]})}function He(e,t){Ee(e,function(n){Ee(t,function(o){n&&n.removeAttribute(o)})})}function re(e,t,n){Lt(t)?at(t,function(o,r){re(e,r,o)}):Ee(e,function(o){Hn(n)||n===""?He(o,t):o.setAttribute(t,String(n))})}function ft(e,t,n){var o=document.createElement(e);return t&&(Qe(t)?ze(o,t):re(o,t)),n&&Pt(n,o),o}function ke(e,t,n){if(Vt(n))return getComputedStyle(e)[t];Hn(n)||(e.style[t]=""+n)}function Rt(e,t){ke(e,"display",t)}function Wo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Re(e,t){return e.getAttribute(t)}function so(e,t){return e&&e.classList.contains(t)}function Ie(e){return e.getBoundingClientRect()}function lt(e){Ee(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Mo(e){return jt(new DOMParser().parseFromString(e,"text/html").body)}function Be(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function zo(e,t){return e&&e.querySelector(t)}function Pn(e,t){return t?tt(e.querySelectorAll(t)):[]}function Ue(e,t){De(e,t,!1)}function In(e){return e.timeStamp}function it(e){return Qe(e)?e:e?e+"px":""}var Ot="splide",jn="data-"+Ot;function At(e,t){if(!e)throw new Error("["+Ot+"] "+(t||""))}var et=Math.min,on=Math.max,rn=Math.floor,Wt=Math.ceil,Ae=Math.abs;function Ho(e,t,n){return Ae(e-t)<n}function en(e,t,n,o){var r=et(t,n),s=on(t,n);return o?r<e&&e<s:r<=e&&e<=s}function dt(e,t,n){var o=et(t,n),r=on(t,n);return et(on(o,e),r)}function Ln(e){return+(e>0)-+(e<0)}function En(e,t){return Ee(t,function(n){e=e.replace("%s",""+n)}),e}function On(e){return e<10?"0"+e:""+e}var co={};function fi(e){return""+e+On(co[e]=(co[e]||0)+1)}function Vo(){var e=[];function t(i,c,p,g){r(i,c,function(u,L,v){var f="addEventListener"in u,d=f?u.removeEventListener.bind(u,L,p,g):u.removeListener.bind(u,p);f?u.addEventListener(L,p,g):u.addListener(p),e.push([u,L,v,p,d])})}function n(i,c,p){r(i,c,function(g,u,L){e=e.filter(function(v){return v[0]===g&&v[1]===u&&v[2]===L&&(!p||v[3]===p)?(v[4](),!1):!0})})}function o(i,c,p){var g,u=!0;return typeof CustomEvent=="function"?g=new CustomEvent(c,{bubbles:u,detail:p}):(g=document.createEvent("CustomEvent"),g.initCustomEvent(c,u,!1,p)),i.dispatchEvent(g),g}function r(i,c,p){Ee(i,function(g){g&&Ee(c,function(u){u.split(" ").forEach(function(L){var v=L.split(".");p(g,v[0],v[1])})})})}function s(){e.forEach(function(i){i[4]()}),qe(e)}return{bind:t,unbind:n,dispatch:o,destroy:s}}var nt="mounted",Fn="ready",Ye="move",Ct="moved",Bn="click",No="active",Po="inactive",jo="visible",Oo="hidden",Se="refresh",$e="updated",bt="resize",cn="resized",Bo="drag",Do="dragging",Uo="dragged",pn="scroll",ct="scrolled",yi="overflow",Dn="destroy",Go="arrows:mounted",qo="arrows:updated",Yo="pagination:mounted",Xo="pagination:updated",Un="navigation:mounted",Gn="autoplay:play",Ko="autoplay:playing",qn="autoplay:pause",Yn="lazyload:loaded",Jo="sk",Zo="sh",an="ei";function be(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Vo();function o(s,i){n.bind(t,Nt(s).join(" "),function(c){i.apply(i,zn(c.detail)?c.detail:[])})}function r(s){n.dispatch(t,s,tt(arguments,1))}return e&&e.event.on(Dn,n.destroy),kt(n,{bus:t,on:o,off:ve(n.unbind,t),emit:r})}function un(e,t,n,o){var r=Date.now,s,i=0,c,p=!0,g=0;function u(){if(!p){if(i=e?et((r()-s)/e,1):1,n&&n(i),i>=1&&(t(),s=r(),o&&++g>=o))return v();c=ao(u)}}function L(b){b||d(),s=r()-(b?i*e:0),p=!1,c=ao(u)}function v(){p=!0}function f(){s=r(),i=0,n&&n(i)}function d(){c&&cancelAnimationFrame(c),i=0,c=0,p=!0}function m(b){e=b}function _(){return p}return{start:L,rewind:f,pause:v,cancel:d,set:m,isPaused:_}}function hi(e){var t=e;function n(r){t=r}function o(r){return Vn(Nt(r),t)}return{set:n,is:o}}function vi(e,t){var n=un(0,e,null,1);return function(){n.isPaused()&&n.start()}}function bi(e,t,n){var o=e.state,r=n.breakpoints||{},s=n.reducedMotion||{},i=Vo(),c=[];function p(){var d=n.mediaQuery==="min";Ft(r).sort(function(m,_){return d?+m-+_:+_-+m}).forEach(function(m){u(r[m],"("+(d?"min":"max")+"-width:"+m+"px)")}),u(s,io),L()}function g(d){d&&i.destroy()}function u(d,m){var _=matchMedia(m);i.bind(_,"change",L),c.push([d,_])}function L(){var d=o.is(nn),m=n.direction,_=c.reduce(function(b,h){return Ke(b,h[1].matches?h[0]:{})},{});lo(n),f(_),n.destroy?e.destroy(n.destroy==="completely"):d?(g(!0),e.mount()):m!==n.direction&&e.refresh()}function v(d){matchMedia(io).matches&&(d?Ke(n,s):lo(n,Ft(s)))}function f(d,m,_){Ke(n,d),m&&Ke(Object.getPrototypeOf(n),d),(_||!o.is(mt))&&e.emit($e,n)}return{setup:p,destroy:g,reduce:v,set:f}}var dn="Arrow",gn=dn+"Left",mn=dn+"Right",Qo=dn+"Up",er=dn+"Down",po="rtl",fn="ttb",Sn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Qo,mn],ArrowRight:[er,gn]};function xi(e,t,n){function o(s,i,c){c=c||n.direction;var p=c===po&&!i?1:c===fn?0:-1;return Sn[s]&&Sn[s][p]||s.replace(/width|left|right/i,function(g,u){var L=Sn[g.toLowerCase()][p]||g;return u>0?L.charAt(0).toUpperCase()+L.slice(1):L})}function r(s){return s*(n.direction===po?1:-1)}return{resolve:o,orient:r}}var Ge="role",yt="tabindex",Si="disabled",We="aria-",Bt=We+"controls",tr=We+"current",uo=We+"selected",Le=We+"label",Xn=We+"labelledby",nr=We+"hidden",Kn=We+"orientation",Mt=We+"roledescription",go=We+"live",mo=We+"busy",fo=We+"atomic",Jn=[Ge,yt,Si,Bt,tr,Le,Xn,nr,Kn,Mt],Ve=Ot+"__",ot="is-",Cn=Ot,yo=Ve+"track",Ci=Ve+"list",yn=Ve+"slide",or=yn+"--clone",wi=yn+"__container",Zn=Ve+"arrows",hn=Ve+"arrow",rr=hn+"--prev",ir=hn+"--next",vn=Ve+"pagination",ar=vn+"__page",Ti=Ve+"progress",_i=Ti+"__bar",$i=Ve+"toggle",Ai=Ve+"spinner",Ii=Ve+"sr",Li=ot+"initialized",st=ot+"active",lr=ot+"prev",sr=ot+"next",kn=ot+"visible",Rn=ot+"loading",cr=ot+"focus-in",pr=ot+"overflow",Ei=[st,kn,lr,sr,Rn,cr,pr],Fi={slide:yn,clone:or,arrows:Zn,arrow:hn,prev:rr,next:ir,pagination:vn,page:ar,spinner:Ai};function ki(e,t){if(Fo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Et(n,t);)n=n.parentElement;return n}var Ri=5,ho=200,ur="touchstart mousedown",wn="touchmove mousemove",Tn="touchend touchcancel mouseup click";function Wi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=e.root,c=n.i18n,p={},g=[],u=[],L=[],v,f,d;function m(){E(),Y(),h()}function _(){r(Se,b),r(Se,m),r($e,h),s(document,ur+" keydown",function(x){d=x.type==="keydown"},{capture:!0}),s(i,"focusin",function(){De(i,cr,!!d)})}function b(x){var R=Jn.concat("style");qe(g),Ue(i,u),Ue(v,L),He([v,f],R),He(i,x?R:["style",Mt])}function h(){Ue(i,u),Ue(v,L),u=C(Cn),L=C(yo),ze(i,u),ze(v,L),re(i,Le,n.label),re(i,Xn,n.labelledby)}function E(){v=j("."+yo),f=jt(v,"."+Ci),At(v&&f,"A track/list element is missing."),Qt(g,Ro(f,"."+yn+":not(."+or+")")),at({arrows:Zn,pagination:vn,prev:rr,next:ir,bar:_i,toggle:$i},function(x,R){p[R]=j("."+x)}),kt(p,{root:i,track:v,list:f,slides:g})}function Y(){var x=i.id||fi(Ot),R=n.role;i.id=x,v.id=v.id||x+"-track",f.id=f.id||x+"-list",!Re(i,Ge)&&i.tagName!=="SECTION"&&R&&re(i,Ge,R),re(i,Mt,c.carousel),re(f,Ge,"presentation")}function j(x){var R=zo(i,x);return R&&ki(R,"."+Cn)===i?R:void 0}function C(x){return[x+"--"+n.type,x+"--"+n.direction,n.drag&&x+"--draggable",n.isNavigation&&x+"--nav",x===Cn&&st]}return kt(p,{setup:m,mount:_,destroy:b})}var xt="slide",wt="loop",Dt="fade";function Mi(e,t,n,o){var r=be(e),s=r.on,i=r.emit,c=r.bind,p=e.Components,g=e.root,u=e.options,L=u.isNavigation,v=u.updateOnMove,f=u.i18n,d=u.pagination,m=u.slideFocus,_=p.Direction.resolve,b=Re(o,"style"),h=Re(o,Le),E=n>-1,Y=jt(o,"."+wi),j;function C(){E||(o.id=g.id+"-slide"+On(t+1),re(o,Ge,d?"tabpanel":"group"),re(o,Mt,f.slide),re(o,Le,h||En(f.slideLabel,[t+1,e.length]))),x()}function x(){c(o,"click",ve(i,Bn,F)),c(o,"keydown",ve(i,Jo,F)),s([Ct,Zo,ct],W),s(Un,T),v&&s(Ye,O)}function R(){j=!0,r.destroy(),Ue(o,Ei),He(o,Jn),re(o,"style",b),re(o,Le,h||"")}function T(){var I=e.splides.map(function(S){var $=S.splide.Components.Slides.getAt(t);return $?$.slide.id:""}).join(" ");re(o,Le,En(f.slideX,(E?n:t)+1)),re(o,Bt,I),re(o,Ge,m?"button":""),m&&He(o,Mt)}function O(){j||W()}function W(){if(!j){var I=e.index;H(),V(),De(o,lr,t===I-1),De(o,sr,t===I+1)}}function H(){var I=D();I!==so(o,st)&&(De(o,st,I),re(o,tr,L&&I||""),i(I?No:Po,F))}function V(){var I=y(),S=!I&&(!D()||E);if(e.state.is([St,Ht])||re(o,nr,S||""),re(Pn(o,u.focusableNodes||""),yt,S?-1:""),m&&re(o,yt,S?-1:0),I!==so(o,kn)&&(De(o,kn,I),i(I?jo:Oo,F)),!I&&document.activeElement===o){var $=p.Slides.getAt(e.index);$&&Wo($.slide)}}function X(I,S,$){ke($&&Y||o,I,S)}function D(){var I=e.index;return I===t||u.cloneStatus&&I===n}function y(){if(e.is(Dt))return D();var I=Ie(p.Elements.track),S=Ie(o),$=_("left",!0),J=_("right",!0);return rn(I[$])<=Wt(S[$])&&rn(S[J])<=Wt(I[J])}function M(I,S){var $=Ae(I-t);return!E&&(u.rewind||e.is(wt))&&($=et($,e.length-$)),$<=S}var F={index:t,slideIndex:n,slide:o,container:Y,isClone:E,mount:C,destroy:R,update:W,style:X,isWithin:M};return F}function zi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,c=t.Elements,p=c.slides,g=c.list,u=[];function L(){v(),r(Se,f),r(Se,v)}function v(){p.forEach(function(W,H){m(W,H,-1)})}function f(){j(function(W){W.destroy()}),qe(u)}function d(){j(function(W){W.update()})}function m(W,H,V){var X=Mi(e,H,V,W);X.mount(),u.push(X),u.sort(function(D,y){return D.index-y.index})}function _(W){return W?C(function(H){return!H.isClone}):u}function b(W){var H=t.Controller,V=H.toIndex(W),X=H.hasFocus()?1:n.perPage;return C(function(D){return en(D.index,V,V+X-1)})}function h(W){return C(W)[0]}function E(W,H){Ee(W,function(V){if(Qe(V)&&(V=Mo(V)),ko(V)){var X=p[H];X?Nn(V,X):Pt(g,V),ze(V,n.classes.slide),R(V,ve(s,bt))}}),s(Se)}function Y(W){lt(C(W).map(function(H){return H.slide})),s(Se)}function j(W,H){_(H).forEach(W)}function C(W){return u.filter(Fo(W)?W:function(H){return Qe(W)?Et(H.slide,W):Vn(Nt(W),H.index)})}function x(W,H,V){j(function(X){X.style(W,H,V)})}function R(W,H){var V=Pn(W,"img"),X=V.length;X?V.forEach(function(D){i(D,"load error",function(){--X||H()})}):H()}function T(W){return W?p.length:u.length}function O(){return u.length>n.perPage}return{mount:L,destroy:f,update:d,register:m,get:_,getIn:b,getAt:h,add:E,remove:Y,forEach:j,filter:C,style:x,getLength:T,isEnough:O}}function Hi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,c=t.Slides,p=t.Direction.resolve,g=t.Elements,u=g.root,L=g.track,v=g.list,f=c.getAt,d=c.style,m,_,b;function h(){E(),s(window,"resize load",vi(ve(i,bt))),r([$e,Se],E),r(bt,Y)}function E(){m=n.direction===fn,ke(u,"maxWidth",it(n.width)),ke(L,p("paddingLeft"),j(!1)),ke(L,p("paddingRight"),j(!0)),Y(!0)}function Y(F){var I=Ie(u);(F||_.width!==I.width||_.height!==I.height)&&(ke(L,"height",C()),d(p("marginRight"),it(n.gap)),d("width",R()),d("height",T(),!0),_=I,i(cn),b!==(b=M())&&(De(u,pr,b),i(yi,b)))}function j(F){var I=n.padding,S=p(F?"right":"left");return I&&it(I[S]||(Lt(I)?0:I))||"0px"}function C(){var F="";return m&&(F=x(),At(F,"height or heightRatio is missing."),F="calc("+F+" - "+j(!1)+" - "+j(!0)+")"),F}function x(){return it(n.height||Ie(v).width*n.heightRatio)}function R(){return n.autoWidth?null:it(n.fixedWidth)||(m?"":O())}function T(){return it(n.fixedHeight)||(m?n.autoHeight?null:O():x())}function O(){var F=it(n.gap);return"calc((100%"+(F&&" + "+F)+")/"+(n.perPage||1)+(F&&" - "+F)+")"}function W(){return Ie(v)[p("width")]}function H(F,I){var S=f(F||0);return S?Ie(S.slide)[p("width")]+(I?0:D()):0}function V(F,I){var S=f(F);if(S){var $=Ie(S.slide)[p("right")],J=Ie(v)[p("left")];return Ae($-J)+(I?0:D())}return 0}function X(F){return V(e.length-1)-V(0)+H(0,F)}function D(){var F=f(0);return F&&parseFloat(ke(F.slide,p("marginRight")))||0}function y(F){return parseFloat(ke(L,p("padding"+(F?"Right":"Left"))))||0}function M(){return e.is(Dt)||X(!0)>W()}return{mount:h,resize:Y,listSize:W,slideSize:H,sliderSize:X,totalSize:V,getPadding:y,isOverflow:M}}var Vi=2;function Ni(e,t,n){var o=be(e),r=o.on,s=t.Elements,i=t.Slides,c=t.Direction.resolve,p=[],g;function u(){r(Se,L),r([$e,bt],f),(g=_())&&(d(g),t.Layout.resize(!0))}function L(){v(),u()}function v(){lt(p),qe(p),o.destroy()}function f(){var b=_();g!==b&&(g<b||!b)&&o.emit(Se)}function d(b){var h=i.get().slice(),E=h.length;if(E){for(;h.length<b;)Qt(h,h);Qt(h.slice(-b),h.slice(0,b)).forEach(function(Y,j){var C=j<b,x=m(Y.slide,j);C?Nn(x,h[0].slide):Pt(s.list,x),Qt(p,x),i.register(x,j-b+(C?0:E),Y.index)})}}function m(b,h){var E=b.cloneNode(!0);return ze(E,n.classes.clone),E.id=e.root.id+"-clone"+On(h+1),E}function _(){var b=n.clones;if(!e.is(wt))b=0;else if(Vt(b)){var h=n[c("fixedWidth")]&&t.Layout.slideSize(0),E=h&&Wt(Ie(s.track)[c("width")]/h);b=E||n[c("autoWidth")]&&e.length||n.perPage*Vi}return b}return{mount:u,destroy:v}}function Pi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,c=t.Layout,p=c.slideSize,g=c.getPadding,u=c.totalSize,L=c.listSize,v=c.sliderSize,f=t.Direction,d=f.resolve,m=f.orient,_=t.Elements,b=_.list,h=_.track,E;function Y(){E=t.Transition,r([nt,cn,$e,Se],j)}function j(){t.Controller.isBusy()||(t.Scroll.cancel(),x(e.index),t.Slides.update())}function C(S,$,J,ie){S!==$&&F(S>J)&&(W(),R(O(X(),S>J),!0)),i(St),s(Ye,$,J,S),E.start($,function(){i(vt),s(Ct,$,J,S),ie&&ie()})}function x(S){R(V(S,!0))}function R(S,$){if(!e.is(Dt)){var J=$?S:T(S);ke(b,"transform","translate"+d("X")+"("+J+"px)"),S!==J&&s(Zo)}}function T(S){if(e.is(wt)){var $=H(S),J=$>t.Controller.getEnd(),ie=$<0;(ie||J)&&(S=O(S,J))}return S}function O(S,$){var J=S-M($),ie=v();return S-=m(ie*(Wt(Ae(J)/ie)||1))*($?1:-1),S}function W(){R(X(),!0),E.cancel()}function H(S){for(var $=t.Slides.get(),J=0,ie=1/0,ne=0;ne<$.length;ne++){var se=$[ne].index,z=Ae(V(se,!0)-S);if(z<=ie)ie=z,J=se;else break}return J}function V(S,$){var J=m(u(S-1)-y(S));return $?D(J):J}function X(){var S=d("left");return Ie(b)[S]-Ie(h)[S]+m(g(!1))}function D(S){return n.trimSpace&&e.is(xt)&&(S=dt(S,0,m(v(!0)-L()))),S}function y(S){var $=n.focus;return $==="center"?(L()-p(S,!0))/2:+$*p(S)||0}function M(S){return V(S?t.Controller.getEnd():0,!!n.trimSpace)}function F(S){var $=m(O(X(),S));return S?$>=0:$<=b[d("scrollWidth")]-Ie(h)[d("width")]}function I(S,$){$=Vt($)?X():$;var J=S!==!0&&m($)<m(M(!1)),ie=S!==!1&&m($)>m(M(!0));return J||ie}return{mount:Y,move:C,jump:x,translate:R,shift:O,cancel:W,toIndex:H,toPosition:V,getPosition:X,getLimit:M,exceededLimit:I,reposition:j}}function ji(e,t,n){var o=be(e),r=o.on,s=o.emit,i=t.Move,c=i.getPosition,p=i.getLimit,g=i.toPosition,u=t.Slides,L=u.isEnough,v=u.getLength,f=n.omitEnd,d=e.is(wt),m=e.is(xt),_=ve(X,!1),b=ve(X,!0),h=n.start||0,E,Y=h,j,C,x;function R(){T(),r([$e,Se,an],T),r(cn,O)}function T(){j=v(!0),C=n.perMove,x=n.perPage,E=F();var z=dt(h,0,f?E:j-1);z!==h&&(h=z,i.reposition())}function O(){E!==F()&&s(an)}function W(z,ee,me){if(!se()){var ae=V(z),ue=M(ae);ue>-1&&(ee||ue!==h)&&(J(ue),i.move(ae,ue,Y,me))}}function H(z,ee,me,ae){t.Scroll.scroll(z,ee,me,function(){var ue=M(i.toIndex(c()));J(f?et(ue,E):ue),ae&&ae()})}function V(z){var ee=h;if(Qe(z)){var me=z.match(/([+\-<>])(\d+)?/)||[],ae=me[1],ue=me[2];ae==="+"||ae==="-"?ee=D(h+ +(""+ae+(+ue||1)),h):ae===">"?ee=ue?I(+ue):_(!0):ae==="<"&&(ee=b(!0))}else ee=d?z:dt(z,0,E);return ee}function X(z,ee){var me=C||(ne()?1:x),ae=D(h+me*(z?-1:1),h,!(C||ne()));return ae===-1&&m&&!Ho(c(),p(!z),1)?z?0:E:ee?ae:M(ae)}function D(z,ee,me){if(L()||ne()){var ae=y(z);ae!==z&&(ee=z,z=ae,me=!1),z<0||z>E?!C&&(en(0,z,ee,!0)||en(E,ee,z,!0))?z=I(S(z)):d?z=me?z<0?-(j%x||x):j:z:n.rewind?z=z<0?E:0:z=-1:me&&z!==ee&&(z=I(S(ee)+(z<ee?-1:1)))}else z=-1;return z}function y(z){if(m&&n.trimSpace==="move"&&z!==h)for(var ee=c();ee===g(z,!0)&&en(z,0,e.length-1,!n.rewind);)z<h?--z:++z;return z}function M(z){return d?(z+j)%j||0:z}function F(){for(var z=j-(ne()||d&&C?1:x);f&&z-- >0;)if(g(j-1,!0)!==g(z,!0)){z++;break}return dt(z,0,j-1)}function I(z){return dt(ne()?z:x*z,0,E)}function S(z){return ne()?et(z,E):rn((z>=E?j-1:z)/x)}function $(z){var ee=i.toIndex(z);return m?dt(ee,0,E):ee}function J(z){z!==h&&(Y=h,h=z)}function ie(z){return z?Y:h}function ne(){return!Vt(n.focus)||n.isNavigation}function se(){return e.state.is([St,Ht])&&!!n.waitForTransition}return{mount:R,go:W,scroll:H,getNext:_,getPrev:b,getAdjacent:X,getEnd:F,setIndex:J,getIndex:ie,toIndex:I,toPage:S,toDest:$,hasFocus:ne,isBusy:se}}var Oi="http://www.w3.org/2000/svg",Bi="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",qt=40;function Di(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,c=n.classes,p=n.i18n,g=t.Elements,u=t.Controller,L=g.arrows,v=g.track,f=L,d=g.prev,m=g.next,_,b,h={};function E(){j(),r($e,Y)}function Y(){C(),E()}function j(){var H=n.arrows;H&&!(d&&m)&&T(),d&&m&&(kt(h,{prev:d,next:m}),Rt(f,H?"":"none"),ze(f,b=Zn+"--"+n.direction),H&&(x(),W(),re([d,m],Bt,v.id),i(Go,d,m)))}function C(){o.destroy(),Ue(f,b),_?(lt(L?[d,m]:f),d=m=null):He([d,m],Jn)}function x(){r([nt,Ct,Se,ct,an],W),s(m,"click",ve(R,">")),s(d,"click",ve(R,"<"))}function R(H){u.go(H,!0)}function T(){f=L||ft("div",c.arrows),d=O(!0),m=O(!1),_=!0,Pt(f,[d,m]),!L&&Nn(f,v)}function O(H){var V='<button class="'+c.arrow+" "+(H?c.prev:c.next)+'" type="button"><svg xmlns="'+Oi+'" viewBox="0 0 '+qt+" "+qt+'" width="'+qt+'" height="'+qt+'" focusable="false"><path d="'+(n.arrowPath||Bi)+'" />';return Mo(V)}function W(){if(d&&m){var H=e.index,V=u.getPrev(),X=u.getNext(),D=V>-1&&H<V?p.last:p.prev,y=X>-1&&H>X?p.first:p.next;d.disabled=V<0,m.disabled=X<0,re(d,Le,D),re(m,Le,y),i(qo,d,m,V,X)}}return{arrows:h,mount:E,destroy:C,update:W}}var Ui=jn+"-interval";function Gi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,c=un(n.interval,e.go.bind(e,">"),x),p=c.isPaused,g=t.Elements,u=t.Elements,L=u.root,v=u.toggle,f=n.autoplay,d,m,_=f==="pause";function b(){f&&(h(),v&&re(v,Bt,g.track.id),_||E(),C())}function h(){n.pauseOnHover&&s(L,"mouseenter mouseleave",function(T){d=T.type==="mouseenter",j()}),n.pauseOnFocus&&s(L,"focusin focusout",function(T){m=T.type==="focusin",j()}),v&&s(v,"click",function(){_?E():Y(!0)}),r([Ye,pn,Se],c.rewind),r(Ye,R)}function E(){p()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),m=d=_=!1,C(),i(Gn))}function Y(T){T===void 0&&(T=!0),_=!!T,C(),p()||(c.pause(),i(qn))}function j(){_||(d||m?Y(!1):E())}function C(){v&&(De(v,st,!_),re(v,Le,n.i18n[_?"play":"pause"]))}function x(T){var O=g.bar;O&&ke(O,"width",T*100+"%"),i(Ko,T)}function R(T){var O=t.Slides.getAt(T);c.set(O&&+Re(O.slide,Ui)||n.interval)}return{mount:b,destroy:c.cancel,play:E,pause:Y,isPaused:p}}function qi(e,t,n){var o=be(e),r=o.on;function s(){n.cover&&(r(Yn,ve(c,!0)),r([nt,$e,Se],ve(i,!0)))}function i(p){t.Slides.forEach(function(g){var u=jt(g.container||g.slide,"img");u&&u.src&&c(p,u,g)})}function c(p,g,u){u.style("background",p?'center/cover no-repeat url("'+g.src+'")':"",!0),Rt(g,p?"none":"")}return{mount:s,destroy:ve(i,!1)}}var Yi=10,Xi=600,Ki=.6,Ji=1.5,Zi=800;function Qi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,c=t.Move,p=c.getPosition,g=c.getLimit,u=c.exceededLimit,L=c.translate,v=e.is(xt),f,d,m=1;function _(){r(Ye,Y),r([$e,Se],j)}function b(x,R,T,O,W){var H=p();if(Y(),T&&(!v||!u())){var V=t.Layout.sliderSize(),X=Ln(x)*V*rn(Ae(x)/V)||0;x=c.toPosition(t.Controller.toDest(x%V))+X}var D=Ho(H,x,1);m=1,R=D?0:R||on(Ae(x-H)/Ji,Zi),d=O,f=un(R,h,ve(E,H,x,W),1),i(Ht),s(pn),f.start()}function h(){i(vt),d&&d(),s(ct)}function E(x,R,T,O){var W=p(),H=x+(R-x)*C(O),V=(H-W)*m;L(W+V),v&&!T&&u()&&(m*=Ki,Ae(V)<Yi&&b(g(u(!0)),Xi,!1,d,!0))}function Y(){f&&f.cancel()}function j(){f&&!f.isPaused()&&(Y(),h())}function C(x){var R=n.easingFunc;return R?R(x):1-Math.pow(1-x,4)}return{mount:_,destroy:Y,scroll:b,cancel:j}}var gt={passive:!1,capture:!0};function ea(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,c=o.unbind,p=e.state,g=t.Move,u=t.Scroll,L=t.Controller,v=t.Elements.track,f=t.Media.reduce,d=t.Direction,m=d.resolve,_=d.orient,b=g.getPosition,h=g.exceededLimit,E,Y,j,C,x,R=!1,T,O,W;function H(){i(v,wn,An,gt),i(v,Tn,An,gt),i(v,ur,X,gt),i(v,"click",M,{capture:!0}),i(v,"dragstart",Be),r([nt,$e],V)}function V(){var N=n.drag;fe(!N),C=N==="free"}function X(N){if(T=!1,!O){var l=ue(N);ae(N.target)&&(l||!N.button)&&(L.isBusy()?Be(N,!0):(W=l?v:window,x=p.is([St,Ht]),j=null,i(W,wn,D,gt),i(W,Tn,y,gt),g.cancel(),u.cancel(),F(N)))}}function D(N){if(p.is(Zt)||(p.set(Zt),s(Bo)),N.cancelable)if(x){g.translate(E+me(ne(N)));var l=se(N)>ho,A=R!==(R=h());(l||A)&&F(N),T=!0,s(Do),Be(N)}else $(N)&&(x=S(N),Be(N))}function y(N){p.is(Zt)&&(p.set(vt),s(Uo)),x&&(I(N),Be(N)),c(W,wn,D),c(W,Tn,y),x=!1}function M(N){!O&&T&&Be(N,!0)}function F(N){j=Y,Y=N,E=b()}function I(N){var l=J(N),A=ie(l),P=n.rewind&&n.rewindByDrag;f(!1),C?L.scroll(A,0,n.snap):e.is(Dt)?L.go(_(Ln(l))<0?P?"<":"-":P?">":"+"):e.is(xt)&&R&&P?L.go(h(!0)?">":"<"):L.go(L.toDest(A),!0),f(!0)}function S(N){var l=n.dragMinThreshold,A=Lt(l),P=A&&l.mouse||0,B=(A?l.touch:+l)||10;return Ae(ne(N))>(ue(N)?B:P)}function $(N){return Ae(ne(N))>Ae(ne(N,!0))}function J(N){if(e.is(wt)||!R){var l=se(N);if(l&&l<ho)return ne(N)/l}return 0}function ie(N){return b()+Ln(N)*et(Ae(N)*(n.flickPower||600),C?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function ne(N,l){return ee(N,l)-ee(z(N),l)}function se(N){return In(N)-In(z(N))}function z(N){return Y===N&&j||Y}function ee(N,l){return(ue(N)?N.changedTouches[0]:N)["page"+m(l?"Y":"X")]}function me(N){return N/(R&&e.is(xt)?Ri:1)}function ae(N){var l=n.noDrag;return!Et(N,"."+ar+", ."+hn)&&(!l||!Et(N,l))}function ue(N){return typeof TouchEvent<"u"&&N instanceof TouchEvent}function Q(){return x}function fe(N){O=N}return{mount:H,disable:fe,isDragging:Q}}var ta={Spacebar:" ",Right:mn,Left:gn,Up:Qo,Down:er};function Qn(e){return e=Qe(e)?e:e.key,ta[e]||e}var vo="keydown";function na(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.unbind,c=e.root,p=t.Direction.resolve,g,u;function L(){v(),r($e,f),r($e,v),r(Ye,m)}function v(){var b=n.keyboard;b&&(g=b==="global"?window:c,s(g,vo,_))}function f(){i(g,vo)}function d(b){u=b}function m(){var b=u;u=!0,Eo(function(){u=b})}function _(b){if(!u){var h=Qn(b);h===p(gn)?e.go("<"):h===p(mn)&&e.go(">")}}return{mount:L,destroy:f,disable:d}}var It=jn+"-lazy",tn=It+"-srcset",oa="["+It+"], ["+tn+"]";function ra(e,t,n){var o=be(e),r=o.on,s=o.off,i=o.bind,c=o.emit,p=n.lazyLoad==="sequential",g=[Ct,ct],u=[];function L(){n.lazyLoad&&(v(),r(Se,v))}function v(){qe(u),f(),p?b():(s(g),r(g,d),d())}function f(){t.Slides.forEach(function(h){Pn(h.slide,oa).forEach(function(E){var Y=Re(E,It),j=Re(E,tn);if(Y!==E.src||j!==E.srcset){var C=n.classes.spinner,x=E.parentElement,R=jt(x,"."+C)||ft("span",C,x);u.push([E,h,R]),E.src||Rt(E,"none")}})})}function d(){u=u.filter(function(h){var E=n.perPage*((n.preloadPages||1)+1)-1;return h[1].isWithin(e.index,E)?m(h):!0}),u.length||s(g)}function m(h){var E=h[0];ze(h[1].slide,Rn),i(E,"load error",ve(_,h)),re(E,"src",Re(E,It)),re(E,"srcset",Re(E,tn)),He(E,It),He(E,tn)}function _(h,E){var Y=h[0],j=h[1];Ue(j.slide,Rn),E.type!=="error"&&(lt(h[2]),Rt(Y,""),c(Yn,Y,j),c(bt)),p&&b()}function b(){u.length&&m(u.shift())}return{mount:L,destroy:ve(qe,u),check:d}}function ia(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,c=t.Slides,p=t.Elements,g=t.Controller,u=g.hasFocus,L=g.getIndex,v=g.go,f=t.Direction.resolve,d=p.pagination,m=[],_,b;function h(){E(),r([$e,Se,an],h);var O=n.pagination;d&&Rt(d,O?"":"none"),O&&(r([Ye,pn,ct],T),Y(),T(),s(Yo,{list:_,items:m},R(e.index)))}function E(){_&&(lt(d?tt(_.children):_),Ue(_,b),qe(m),_=null),o.destroy()}function Y(){var O=e.length,W=n.classes,H=n.i18n,V=n.perPage,X=u()?g.getEnd()+1:Wt(O/V);_=d||ft("ul",W.pagination,p.track.parentElement),ze(_,b=vn+"--"+x()),re(_,Ge,"tablist"),re(_,Le,H.select),re(_,Kn,x()===fn?"vertical":"");for(var D=0;D<X;D++){var y=ft("li",null,_),M=ft("button",{class:W.page,type:"button"},y),F=c.getIn(D).map(function(S){return S.slide.id}),I=!u()&&V>1?H.pageX:H.slideX;i(M,"click",ve(j,D)),n.paginationKeyboard&&i(M,"keydown",ve(C,D)),re(y,Ge,"presentation"),re(M,Ge,"tab"),re(M,Bt,F.join(" ")),re(M,Le,En(I,D+1)),re(M,yt,-1),m.push({li:y,button:M,page:D})}}function j(O){v(">"+O,!0)}function C(O,W){var H=m.length,V=Qn(W),X=x(),D=-1;V===f(mn,!1,X)?D=++O%H:V===f(gn,!1,X)?D=(--O+H)%H:V==="Home"?D=0:V==="End"&&(D=H-1);var y=m[D];y&&(Wo(y.button),v(">"+D),Be(W,!0))}function x(){return n.paginationDirection||n.direction}function R(O){return m[g.toPage(O)]}function T(){var O=R(L(!0)),W=R(L());if(O){var H=O.button;Ue(H,st),He(H,uo),re(H,yt,-1)}if(W){var V=W.button;ze(V,st),re(V,uo,!0),re(V,yt,"")}s(Xo,{list:_,items:m},O,W)}return{items:m,mount:h,destroy:E,getAt:R,update:T}}var aa=[" ","Enter"];function la(e,t,n){var o=n.isNavigation,r=n.slideFocus,s=[];function i(){e.splides.forEach(function(d){d.isParent||(g(e,d.splide),g(d.splide,e))}),o&&u()}function c(){s.forEach(function(d){d.destroy()}),qe(s)}function p(){c(),i()}function g(d,m){var _=be(d);_.on(Ye,function(b,h,E){m.go(m.is(wt)?E:b)}),s.push(_)}function u(){var d=be(e),m=d.on;m(Bn,v),m(Jo,f),m([nt,$e],L),s.push(d),d.emit(Un,e.splides)}function L(){re(t.Elements.list,Kn,n.direction===fn?"vertical":"")}function v(d){e.go(d.index)}function f(d,m){Vn(aa,Qn(m))&&(v(d),Be(m))}return{setup:ve(t.Media.set,{slideFocus:Vt(r)?o:r},!0),mount:i,destroy:c,remount:p}}function sa(e,t,n){var o=be(e),r=o.bind,s=0;function i(){n.wheel&&r(t.Elements.track,"wheel",c,gt)}function c(g){if(g.cancelable){var u=g.deltaY,L=u<0,v=In(g),f=n.wheelMinThreshold||0,d=n.wheelSleep||0;Ae(u)>f&&v-s>d&&(e.go(L?"<":">"),s=v),p(L)&&Be(g)}}function p(g){return!n.releaseWheel||e.state.is(St)||t.Controller.getAdjacent(g)!==-1}return{mount:i}}var ca=90;function pa(e,t,n){var o=be(e),r=o.on,s=t.Elements.track,i=n.live&&!n.isNavigation,c=ft("span",Ii),p=un(ca,ve(u,!1));function g(){i&&(v(!t.Autoplay.isPaused()),re(s,fo,!0),c.textContent="…",r(Gn,ve(v,!0)),r(qn,ve(v,!1)),r([Ct,ct],ve(u,!0)))}function u(f){re(s,mo,f),f?(Pt(s,c),p.start()):(lt(c),p.cancel())}function L(){He(s,[go,fo,mo]),lt(c)}function v(f){i&&re(s,go,f?"off":"polite")}return{mount:g,disable:v,destroy:L}}var ua=Object.freeze({__proto__:null,Media:bi,Direction:xi,Elements:Wi,Slides:zi,Layout:Hi,Clones:Ni,Move:Pi,Controller:ji,Arrows:Di,Autoplay:Gi,Cover:qi,Scroll:Qi,Drag:ea,Keyboard:na,LazyLoad:ra,Pagination:ia,Sync:la,Wheel:sa,Live:pa}),da={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"},ga={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:Fi,i18n:da,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ma(e,t,n){var o=t.Slides;function r(){be(e).on([nt,Se],s)}function s(){o.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function i(c,p){o.style("transition","opacity "+n.speed+"ms "+n.easing),Eo(p)}return{mount:r,start:i,cancel:An}}function fa(e,t,n){var o=t.Move,r=t.Controller,s=t.Scroll,i=t.Elements.list,c=ve(ke,i,"transition"),p;function g(){be(e).bind(i,"transitionend",function(f){f.target===i&&p&&(L(),p())})}function u(f,d){var m=o.toPosition(f,!0),_=o.getPosition(),b=v(f);Ae(m-_)>=1&&b>=1?n.useScroll?s.scroll(m,b,!1,d):(c("transform "+b+"ms "+n.easing),o.translate(m,!0),p=d):(o.jump(f),d())}function L(){c(""),s.cancel()}function v(f){var d=n.rewindSpeed;if(e.is(xt)&&d){var m=r.getIndex(!0),_=r.getEnd();if(m===0&&f>=_||m>=_&&f===0)return d}return n.speed}return{mount:g,start:u,cancel:L}}var ya=(function(){function e(n,o){this.event=be(),this.Components={},this.state=hi(mt),this.splides=[],this._o={},this._E={};var r=Qe(n)?zo(document,n):n;At(r,r+" is invalid."),this.root=r,o=Ke({label:Re(r,Le)||"",labelledby:Re(r,Xn)||""},ga,e.defaults,o||{});try{Ke(o,JSON.parse(Re(r,jn)))}catch{At(!1,"Invalid JSON")}this._o=Object.create(Ke({},o))}var t=e.prototype;return t.mount=function(o,r){var s=this,i=this.state,c=this.Components;At(i.is([mt,nn]),"Already mounted!"),i.set(mt),this._C=c,this._T=r||this._T||(this.is(Dt)?ma:fa),this._E=o||this._E;var p=kt({},ua,this._E,{Transition:this._T});return at(p,function(g,u){var L=g(s,c,s._o);c[u]=L,L.setup&&L.setup()}),at(c,function(g){g.mount&&g.mount()}),this.emit(nt),ze(this.root,Li),i.set(vt),this.emit(Fn),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(vt)&&(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(tt(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(Se),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,s=this.state;return s.is(mt)?be(this).on(Fn,this.destroy.bind(this,o)):(at(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(Dn),r.destroy(),o&&qe(this.splides),s.set(nn)),this},di(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=ya;eo.defaults={};eo.STATES=mi;var bo=[[nt,"onMounted"],[Fn,"onReady"],[Ye,"onMove"],[Ct,"onMoved"],[Bn,"onClick"],[No,"onActive"],[Po,"onInactive"],[jo,"onVisible"],[Oo,"onHidden"],[Se,"onRefresh"],[$e,"onUpdated"],[bt,"onResize"],[cn,"onResized"],[Bo,"onDrag"],[Do,"onDragging"],[Uo,"onDragged"],[pn,"onScroll"],[ct,"onScrolled"],[Dn,"onDestroy"],[Go,"onArrowsMounted"],[qo,"onArrowsUpdated"],[Yo,"onPaginationMounted"],[Xo,"onPaginationUpdated"],[Un,"onNavigationMounted"],[Gn,"onAutoplayPlay"],[Ko,"onAutoplayPlaying"],[qn,"onAutoplayPause"],[Yn,"onLazyLoadLoaded"]];function to(...e){return e.filter(Boolean).join(" ")}function ln(e){return e!==null&&typeof e=="object"}function Wn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!Wn(n,t[o]));if(ln(e)&&ln(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!Wn(e[r],t[r]))}return e===t}function ha(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function va(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 Mn(e,t){const n=e;return va(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():ln(o)?n[r]=Mn(ln(n[r])?n[r]:{},o):n[r]=o}),n}var ba=({children:e,className:t,...n})=>k.createElement("div",{className:to("splide__track",t),...n},k.createElement("ul",{className:"splide__list"},e)),dr=class extends k.Component{constructor(){super(...arguments),this.splideRef=k.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=Mn({},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&&!Wn(this.options,e)&&(this.splide.options=e,this.options=Mn({},e));const t=this.getSlides();ha(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 k.createElement(t,{className:to("splide",e),ref:this.splideRef,...this.omit(r,["options",...bo.map(s=>s[1])])},n?k.createElement(ba,null,o):o)}},gr=({children:e,className:t,...n})=>k.createElement("li",{className:to("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",Sa={link:ba},Vt=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?l.jsx("a",{className:Sa.link,href:o.value,target:o.target,children:t(o.children)},r):l.jsx("span",{style:xa(o),children:o.text},r));return l.jsx(l.Fragment,{children:e.map((n,o)=>{const r=n.children;return l.jsx("div",{children:t(r)},o)})})};function xa(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-",So={svg:Ca,img:wa},$a=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Ta=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,yt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[a,i]=P.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return P.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(c)}},[]),!$a(e)||!a?l.jsx("img",{src:e,alt:"",className:me(So.img,o),style:r}):l.jsx("span",{"data-supports-mask":a,className:me(So.svg,o),style:{"--svg":Ta(e),"--fill":t,"--hover-fill":n,...r??{}}})},_a={"top-left":K.topLeftAlignment,"top-center":K.topCenterAlignment,"top-right":K.topRightAlignment,"middle-left":K.middleLeftAlignment,"middle-center":K.middleCenterAlignment,"middle-right":K.middleRightAlignment,"bottom-left":K.bottomLeftAlignment,"bottom-center":K.bottomCenterAlignment,"bottom-right":K.bottomRightAlignment};function Aa({settings:e,content:t,styles:n,isEditor:o}){const[r,a]=P.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:p,textAlign:g,wordSpacing:u,fontSizeLineHeight:F,textAppearance:x,color:f}=n.imageCaption,[d,m]=P.useState(void 0),[_,S]=P.useState(null),[b,w]=P.useState(0),[j,z]=P.useState(0),{direction:C,transition:y,controls:L,pagination:v,imageCaption:H,triggers:$}=e,V=P.useRef(y.type),{x:k,y:U}=e.controls.offset,O=h=>{r&&r.go(h)};return P.useEffect(()=>{if(!_)return;const h=new ResizeObserver(I=>{if(!r)return;const[R]=I;m({width:Math.round(R.contentRect.width),height:Math.round(R.contentRect.height)})});return h.observe(_),()=>h.unobserve(_)},[_]),P.useEffect(()=>{!r||V.current===y.type||(z(h=>h+1),V.current=y.type)},[y.type]),l.jsx("div",{className:me(K.wrapper,{[K.editor]:o}),ref:S,children:l.jsxs("div",{className:K.sliderInner,style:{width:d?d.width:"100%",height:d?d.height:"100%",backgroundColor:y.backgroundColor&&y.type==="fade in"?y.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:me(K.captionBlock),children:l.jsx("div",{className:K.captionTextWrapper,children:t.map((h,I)=>l.jsx("div",{className:me(K.captionText,_a[H.alignment],{[K.withPointerEvents]:I===b&&o,[K.active]:I===b}),style:{fontFamily:c.fontFamily,fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:i.sizing==="auto"?"max-content":T.scalingValue(i.width,o),letterSpacing:T.scalingValue(p,o),wordSpacing:T.scalingValue(u,o),textAlign:g,fontSize:T.scalingValue(F.fontSize,o),lineHeight:T.scalingValue(F.lineHeight,o),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:f,transitionDuration:y.duration?`${Math.round(parseInt(y.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:K.captionTextInner,style:{"--link-hover-color":H.linkHoverColor,"--link-color":H.linkColor,position:"relative",top:T.scalingValue(H.offset.y,o),left:T.scalingValue(H.offset.x,o)},children:l.jsx(Vt,{content:h.imageCaption})})},I))})}),l.jsx(ur,{onMove:h=>{w(h.index)},ref:a,options:{arrows:!1,speed:y.duration?parseInt(y.duration):500,autoplay:$.autoPlay!==null,...$.autoPlay!==null&&{interval:parseInt($.autoPlay)*1e3},direction:C==="horiz"||y.type==="fade in"?"ltr":"ttb",pagination:!1,drag:$.triggersList.drag,perPage:1,width:d?d.width:"100%",height:d?d.height:"100%",type:y.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((h,I)=>l.jsx(dr,{children:l.jsx("div",{className:K.sliderItem,children:l.jsx("div",{className:K.imgWrapper,children:l.jsx("img",{className:me(K.sliderImage,{[K.contain]:h.image.objectFit==="contain",[K.cover]:h.image.objectFit==="cover"}),src:h.image.url,alt:h.image.name??""})})})},I))},j),L.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:me(K.arrow,{[K.arrowVertical]:C==="vert",[K.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:l.jsxs("button",{onClick:()=>{O("-1")},className:K.arrowInner,style:{transform:`translate(${T.scalingValue(k,o)}, ${T.scalingValue(U*(C==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${C==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&l.jsx(yt,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:me(K.arrowImg,K.mirror)}),!L.arrowsImgUrl&&l.jsx(xo,{color:L.color,className:me(K.arrowIcon,K.arrowImg,K.mirror)})]})}),l.jsx("div",{className:me(K.arrow,K.nextArrow,{[K.arrowVertical]:C==="vert",[K.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:l.jsxs("button",{className:K.arrowInner,onClick:()=>O("+1"),style:{transform:`translate(${T.scalingValue(k*(C==="horiz"?-1:1),o)}, ${T.scalingValue(U,o)}) scale(${e.controls.scale/100}) rotate(${C==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&l.jsx(yt,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:K.arrowImg}),!L.arrowsImgUrl&&l.jsx(xo,{color:L.color,className:me(K.arrowIcon,K.arrowImg)})]})})]}),$.triggersList.click&&l.jsx("div",{className:K.clickOverlay,onClick:()=>{r&&r.go("+1")}}),v.isActive&&l.jsx("div",{className:me(K.pagination,{[K.paginationInsideBottom]:v.position==="inside-1"&&C==="horiz",[K.paginationInsideTop]:v.position==="inside-2"&&C==="horiz",[K.paginationOutsideBottom]:v.position==="outside-1"&&C==="horiz",[K.paginationOutsideTop]:v.position==="outside-2"&&C==="horiz",[K.paginationInsideLeft]:v.position==="inside-1"&&C==="vert",[K.paginationInsideRight]:v.position==="inside-2"&&C==="vert",[K.paginationOutsideLeft]:v.position==="outside-1"&&C==="vert",[K.paginationOutsideRight]:v.position==="outside-2"&&C==="vert",[K.paginationVertical]:C==="vert"}),children:l.jsx("div",{className:K.paginationInner,style:{backgroundColor:v.colors[2],transform:`scale(${v.scale/100}) translate(${T.scalingValue(v.offset.x,o)}, ${T.scalingValue(v.offset.y,o)}) rotate(${C==="horiz"?"0deg":"90deg"})`},children:t.map((h,I)=>l.jsx("button",{onClick:()=>{r&&r.go(I)},className:me(K.paginationItem),children:l.jsx("div",{className:me(K.dot,{[K.activeDot]:I===b}),style:{backgroundColor:I===b?v.colors[0]:v.colors[1],"--pagination-hover-color":v.hover}})},I))})})]})})}function xo({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const La={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"]}},Ea="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Fa="ImageRevealSlider-module__image___Qjt-e",ka="ImageRevealSlider-module__link___N-iLG",Ia="ImageRevealSlider-module__cursor___2U03d",pt={imageRevealSlider:Ea,image:Fa,link:ka,cursor:Ia};function Co(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,c=a/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 Tn(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,a;if(t==="custom"){r=n;const i=await Tn(e);a=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await Tn(e);a=i.height/i.width*r}else{const i=await Tn(e);r=i.width,a=i.height}return{width:r,height:a,finalWidth:`${r}px`}}function Wa({settings:e,content:t,isEditor:n}){const[o,r]=P.useState(null),[a,i]=P.useState([]),[c,p]=P.useState(0),g=P.useRef(0),[u,F]=P.useState({x:0,y:0}),[x,f]=P.useState(1),[d,m]=P.useState("none"),_=P.useRef({x:0,y:0}),[S,b]=P.useState(!1),{sizeType:w,imageWidth:j,randomRangeImageWidth:z}=e.imageSize,{revealPosition:C,visible:y}=e.position,{cursorType:L,target:v,defaultCursorScale:H,defaultCursor:$,hoverCursorScale:V,hoverCursor:k}=e.cursor;P.useEffect(()=>{if(!o)return;const h=(E,A)=>{const W=o.getBoundingClientRect(),X=E-W.left,re=A-W.top;if(F({x:X,y:re}),L==="system"){m("none"),f(1);return}const oe=X,le=re,M=document.elementFromPoint(W.left+oe,W.top+le);if(M&&M.closest("a")){m("none"),f(1);return}const Q=Co(oe,le,a)||v==="area"?{img:k??"none",scale:V}:{img:$??"none",scale:H};m(Q.img),f(Q.scale)},I=E=>{E.stopPropagation(),_.current={x:E.clientX,y:E.clientY},h(E.clientX,E.clientY)},R=()=>{S&&h(_.current.x,_.current.y)};return o.addEventListener("mousemove",I),window.addEventListener("scroll",R,!0),()=>{o.removeEventListener("mousemove",I),window.removeEventListener("scroll",R,!0)}},[o,S,u,L,v,k,$,V,H,a]),P.useEffect(()=>{S||(m("none"),f(0))},[S]);const U=async(h,I,R,E={})=>{const{width:A,height:W,finalWidth:X}=await Ra(h.image.url,w,j,z);let re=0,oe=0;C==="same"?(re=I/2,oe=R/2):(re=E.x??Math.random()*I,oe=E.y??Math.random()*R);const le=Math.min(Math.max(re,A/2),I-A/2),M=Math.min(Math.max(oe,W/2),R-W/2);return{id:g.current++,url:h.image.url,link:h.link,name:h.image.name,x:le,y:M,width:X}};P.useEffect(()=>{if(!o||t.length===0)return;const h=o.getBoundingClientRect(),I=h.width,R=h.height,E=[];(async()=>{const W=t[0],X=await U(W,I,R);E.push(X),i(E),p(1)})()},[w,j,z,C,o]),P.useEffect(()=>{y==="last One"&&i(h=>h.length>0?[h[h.length-1]]:[])},[y]);const O=async h=>{if(!o)return;const I=o.getBoundingClientRect(),R=h.clientX-I.left,E=h.clientY-I.top;if(v==="image"&&!Co(R,E,a))return;let A=0,W=0;C==="on Click"?(A=R,W=E):C==="same"?(A=I.width/2,W=I.height/2):(A=Math.random()*I.width,W=Math.random()*I.height);const X=t[c],re=await U(X,I.width,I.height,{x:A,y:W});i(oe=>y==="all"?[...oe,re]:[re]),p(oe=>oe>=t.length-1?0:oe+1)};return l.jsxs("div",{ref:r,onClick:O,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),className:pt.imageRevealSlider,style:{cursor:d==="none"?"default":"none"},children:[a.map(h=>l.jsx("div",{className:pt.wrapper,style:{top:`${h.y}px`,left:`${h.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:h.width??"auto",height:"auto",cursor:d==="none"?"default":"none"},children:v==="area"&&h.link?l.jsx("a",{href:h.link,target:"_blank",className:pt.link,children:l.jsx("img",{src:h.url,alt:h.name,className:pt.image},h.id)}):l.jsx("img",{src:h.url,alt:h.name,className:pt.image},h.id)},h.id)),S&&l.jsx("div",{className:pt.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 za={element:Wa,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:""}]}}}},Va="LightBox-module__hidden___9s-9x",Ma="LightBox-module__heroImage___sTxNF",Na="LightBox-module__background___rm9ml",Ha="LightBox-module__editor___4ACaY",Pa="LightBox-module__contentStyle___Bgnsq",ja="LightBox-module__imageStyle___tLIlB",Oa="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",Za="LightBox-module__arrowInner___p48sW",Ja="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",pl="LightBox-module__slideInLeft___gPYwC",ul="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",D={hidden:Va,heroImage:Ma,background:Na,editor:Ha,contentStyle:Pa,imageStyle:ja,imgWrapper:Oa,contain:Ba,cover:Da,caption:Ua,captionTextInner:qa,lightboxSplide:Ga,arrow:Ya,arrowVertical:Xa,nextArrow:Ka,arrowInner:Za,arrowIcon:Ja,arrowImg:Qa,mirror:el,thumbsWrapper:tl,thumbsContainerVertical:nl,thumbsContainer:ol,thumbsAlignStart:rl,thumbsAlignCenter:il,thumbsAlignEnd:al,thumbItem:ll,closeButton:sl,fadeIn:cl,slideInLeft:pl,slideInRight:ul,slideInTop:dl,slideInBottom:gl,fadeOut:ml,slideOutLeft:fl,slideOutRight:yl,slideOutTop:hl,slideOutBottom:vl,scaleSlide:bl},Yt=(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% + ${T.scalingValue(t.x,n)}), calc(-50% + ${T.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${T.scalingValue(t.x,n)}, calc(-50% + ${T.scalingValue(t.y,n)}))`:a==="center"?o.transform=`translate(calc(-50% + ${T.scalingValue(t.x,n)}), ${T.scalingValue(t.y,n)})`:o.transform=`translate(${T.scalingValue(t.x,n)}, ${T.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),a=e.naturalWidth,i=e.naturalHeight,c=o/r,p=a/i;let g,u;p>c?(g=o,u=o/p):(u=r,g=r*p);const F=t.left+n.left,x=t.top+n.top,f=(o-g)/2+F,d=(r-u)/2+x;return{x:f,y:d,width:g,height:u}}function $o(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 To(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 Sl(e,t){const n=(()=>{if(e==="fade in")return D.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return D.slideInLeft;case"right":return D.slideInRight;case"top":return D.slideInTop;case"bottom":return D.slideInBottom;default:return D.slideInRight}return D.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return D.fadeIn;if(e==="slide in")switch(t){case"left":return D.slideInLeft;case"right":return D.slideInRight;case"top":return D.slideInTop;case"bottom":return D.slideInBottom;default:return D.slideInRight}return D.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return D.fadeOut;if(e==="slide in")switch(t){case"left":return D.slideOutLeft;case"right":return D.slideOutRight;case"top":return D.slideOutTop;case"bottom":return D.slideOutBottom;default:return D.slideOutRight}return D.fadeOut})(),a=(()=>{if(e==="fade in")return D.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return D.slideOutLeft;case"right":return D.slideOutRight;case"top":return D.slideOutTop;case"bottom":return D.slideOutBottom;default:return D.slideOutRight}return D.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:a}}const xl=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:a})=>{const[i,c]=P.useState(!1),{url:p}=e.thumbnailBlock.cover;return P.useEffect(()=>{r==="close"&&c(!1),r==="open"&&c(!0)},[r]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:p,alt:"Cover",className:D.heroImage,onClick:()=>c(!0)}),l.jsx(Cl,{isOpen:i,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:a})]})},Cl=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:a,isEditor:i,metadata:c})=>{var q;const[p,g]=P.useState(0),[u,F]=P.useState(0),[x,f]=P.useState(!1),[d,m]=P.useState(!1),[_,S]=P.useState({}),b=P.useRef(null),w=P.useRef(null),j=P.useRef(null),z=P.useRef(!1),C=P.useRef(null),y=P.useRef(null),L=P.useRef(null),v=P.useRef(null),H=P.useRef(!1),$=P.useRef(null),[V,k]=P.useState(!1),{appear:U,triggers:O,slider:h,thumbnail:I,controls:R,area:E,caption:A,layout:W}=r.lightboxBlock,{appearClass:X,backdropAppearClass:re,backdropDisappearClass:oe,disappearClass:le}=Sl(U.type,U.direction),M=(c==null?void 0:c.itemId)??null;P.useEffect(()=>{const s=()=>{setTimeout(()=>{var B,G;(G=(B=b.current)==null?void 0:B.splide)==null||G.refresh()},16)},N=()=>{F(B=>B+1)};return window.addEventListener("ArticleEditor.Layout:change",s),window.addEventListener("ArticleEditor.ComponentContent:change",N),()=>{window.removeEventListener("ArticleEditor.Layout:change",s),window.removeEventListener("ArticleEditor.ComponentContent:change",N)}},[]),P.useEffect(()=>{if(!e||!I.isActive){k(!1);return}const s=$.current;if(!s)return;const N=()=>{h.direction==="horiz"?k(s.scrollWidth>s.clientWidth):k(s.scrollHeight>s.clientHeight)};N();const B=new ResizeObserver(N);return B.observe(s),()=>B.disconnect()},[e,I.isActive,n.length,_,h.direction]);const Q=P.useCallback(()=>{const s=window.matchMedia("(max-width: 768px)").matches,N=To(E.color);s&&!i&&N>.9&&(document.body.style.backgroundColor=""),f(!0),z.current=!0;const B=G=>{G.target===C.current&&G.animationName&&(C.current&&y.current&&C.current.removeEventListener("animationend",y.current),y.current=null,z.current&&(z.current=!1,t()),f(!1))};C.current&&(y.current=B,C.current.addEventListener("animationend",B))},[t,E.color,i]),fe=(s,N,B)=>{var G,Y;if(s){if(O.type==="click"&&O.switch==="image")O.repeat==="close"&&p===n.length-1?Q():(G=b.current)==null||G.go("+1");else if(O.type==="click"&&O.switch==="50/50"){const Z=s.getBoundingClientRect(),J=N-Z.left,ne=B-Z.top,ie=Z.width,ae=Z.height;let pe;h.direction==="horiz"?pe=J<ie/2?"-1":"+1":pe=ne<ae/2?"-1":"+1",(Y=b.current)==null||Y.go(pe)}}},se=s=>{if(H.current){H.current=!1;return}const N=n[p],B=(N==null?void 0:N.image.objectFit)==="cover";let G,Y;if("changedTouches"in s&&s.changedTouches.length>0)G=s.changedTouches[0].clientX,Y=s.changedTouches[0].clientY;else if("clientX"in s)G=s.clientX,Y=s.clientY;else return;let Z;if(B&&j.current){const J=$o(j.current);Z=G>=J.left&&G<=J.right&&Y>=J.top&&Y<=J.bottom}else{const J=j.current?wo(j.current):null;if(!J){s.target===s.currentTarget&&Q();return}Z=G>=J.x&&G<=J.x+J.width&&Y>=J.y&&Y<=J.y+J.height}Z?fe(j.current,G,Y):Q()},ge=s=>{const N=s.target;(N.classList.contains(D.thumbsWrapper)||N.classList.contains(D.thumbsContainer))&&se(s)};P.useEffect(()=>{if(!e)return;const s=N=>{var B,G;if(N.key==="Escape"){Q();return}if(N.key==="ArrowRight"){g(Y=>(Y+1)%Math.max(n.length,1)),(B=b.current)==null||B.go("+1");return}N.key==="ArrowLeft"&&(g(Y=>(Y-1+Math.max(n.length,1))%Math.max(n.length,1)),(G=b.current)==null||G.go("-1"))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[e,Q,n.length]),P.useEffect(()=>{if(e){if(g(0),F(N=>N+1),z.current=!1,f(!1),m(!1),S({}),!M)return;const s=new CustomEvent("page-overlay",{detail:{itemId:M}});window.dispatchEvent(s)}return()=>{C.current&&y.current&&(C.current.removeEventListener("animationend",y.current),y.current=null),m(!1)}},[e,M]),P.useEffect(()=>{w.current!==null&&w.current!==h.type&&F(s=>s+1),w.current=h.type},[h.type]),P.useEffect(()=>{if(!e)return;const s=document.body.style.overflow,N=window.matchMedia("(max-width: 768px)").matches,B=To(E.color);document.body.style.overflow="hidden",m(!1);const G=Z=>{Z.target===C.current&&!z.current&&Z.animationName&&(N&&!i&&B>.9&&(document.body.style.backgroundColor=E.color),m(!0),C.current&&L.current&&C.current.removeEventListener("animationend",L.current),L.current=null)};C.current&&(L.current=G,C.current.addEventListener("animationend",G));const Y=Z=>{const J=Z.target;J&&(J.closest(`.${D.thumbsWrapper}`)||J.closest(`.${D.thumbsContainer}`))||h.type!=="slide"&&Z.preventDefault()};return document.addEventListener("touchmove",Y,{passive:!1}),()=>{document.body.style.overflow=s,document.removeEventListener("touchmove",Y),C.current&&L.current&&(C.current.removeEventListener("animationend",L.current),L.current=null),m(!1)}},[e,i,E.color,h.type]),P.useEffect(()=>{if(!e)return;const s=N=>{var G,Y;if(z.current){N.stopPropagation();return}if(H.current){H.current=!1;return}const B=N.target;if(!(B&&(B.closest(`.${D.thumbsContainer}`)||B.closest(`.${D.thumbItem}`)))){if(h.type==="slide"&&O.type==="drag"&&((Y=(G=b.current)==null?void 0:G.splide)!=null&&Y.root)){const Z=b.current.splide.root;if(B&&(Z.contains(B)||Z===B))return}if(N.touches.length===0&&N.changedTouches.length>0){const Z=n[p],J=(Z==null?void 0:Z.image.objectFit)==="cover",ne=N.changedTouches[0];let ie;if(J&&j.current){const ae=$o(j.current);ie=ne.clientX>=ae.left&&ne.clientX<=ae.right&&ne.clientY>=ae.top&&ne.clientY<=ae.bottom}else{const ae=j.current?wo(j.current):null;if(!ae)return;ie=ne.clientX>=ae.x&&ne.clientX<=ae.x+ae.width&&ne.clientY>=ae.y&&ne.clientY<=ae.y+ae.height}if(!ie){N.stopPropagation(),z.current=!0;const ae=pe=>{pe.stopPropagation(),pe.preventDefault(),document.removeEventListener("click",ae,!0)};document.addEventListener("click",ae,!0),Q()}}}};return document.addEventListener("touchend",s,{passive:!0}),()=>{document.removeEventListener("touchend",s)}},[e,Q,p,n]);const be=(h.type==="scale"||h.type==="fade")&&h.direction==="vert"&&O.type==="drag";P.useEffect(()=>{var pe,Te;if(!e||!be||!((Te=(pe=b.current)==null?void 0:pe.splide)!=null&&Te.root))return;const s=b.current.splide.root,N=30,B=(ee,ue)=>{if(v.current){const xe=Math.abs(ee-v.current.x),Xe=Math.abs(ue-v.current.y);(xe>0||Xe>0)&&(H.current=!0)}},G=ee=>{v.current&&(ee.preventDefault(),B(ee.clientX,ee.clientY))},Y=ee=>{v.current&&ee.touches.length>0&&(ee.preventDefault(),B(ee.touches[0].clientX,ee.touches[0].clientY))},Z=(ee,ue)=>{if(!v.current||!b.current){v.current=null;return}const xe=Math.abs(ee-v.current.x),Xe=Math.abs(ue-v.current.y);Xe>N&&Xe>xe&&b.current.go(ue<v.current.y?"+1":"-1"),v.current=null},J=ee=>{v.current&&Z(ee.clientX,ee.clientY),document.removeEventListener("pointerup",J),document.removeEventListener("pointercancel",J),document.removeEventListener("pointermove",G)},ne=ee=>{if(v.current){if(ee.changedTouches.length>0){const ue=ee.changedTouches[0];Z(ue.clientX,ue.clientY)}document.removeEventListener("touchend",ne),document.removeEventListener("touchcancel",ne),document.removeEventListener("touchmove",Y)}},ie=ee=>{v.current={x:ee.clientX,y:ee.clientY},H.current=!1,document.addEventListener("pointermove",G,{passive:!1}),document.addEventListener("pointerup",J),document.addEventListener("pointercancel",J)},ae=ee=>{ee.touches.length>0&&(v.current={x:ee.touches[0].clientX,y:ee.touches[0].clientY},H.current=!1,document.addEventListener("touchmove",Y,{passive:!1}),document.addEventListener("touchend",ne),document.addEventListener("touchcancel",ne))};return s.addEventListener("pointerdown",ie),s.addEventListener("touchstart",ae),()=>{s.removeEventListener("pointerdown",ie),s.removeEventListener("touchstart",ae),document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",J),document.removeEventListener("pointercancel",J),document.removeEventListener("touchmove",Y),document.removeEventListener("touchend",ne),document.removeEventListener("touchcancel",ne),v.current=null,H.current=!1}},[e,be,u]);const ze={backgroundColor:E.color,backdropFilter:`blur(${E.blur}px)`,animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:br.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:i?null:C,className:me(D.background,x?oe:re,{[D.editor]:i},{[D.hidden]:!e}),style:{...ze,...d&&!i&&!x?{position:"absolute"}:{}}}),l.jsxs("div",{ref:i?C:null,className:me(D.contentStyle,x?le:X,{[D.editor]:i},{[D.hidden]:!e}),style:{animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(ur,{onMove:s=>g(s.index),ref:b,className:D.lightboxSplide,options:{arrows:!1,speed:h.duration?parseInt(h.duration):500,direction:h.direction==="horiz"||h.type==="fade"||h.type==="scale"?"ltr":"ttb",pagination:!1,drag:O.type==="drag"&&!be,perPage:1,width:"100%",height:"100%",type:h.type==="fade"||h.type==="scale"?"fade":"loop",padding:0,rewind:O.repeat!=="close",start:0},style:{"--splide-speed":h.duration},children:n.map((s,N)=>{const B=Yt(W.position,W.offset,i),G=`${T.scalingValue(W.padding.top,i)} ${T.scalingValue(W.padding.right,i)} ${T.scalingValue(W.padding.bottom,i)} ${T.scalingValue(W.padding.left,i)}`,Y=h.type==="scale"?(()=>{const{transform:Z,...J}=B;return{...J,position:"absolute",padding:G,boxSizing:"border-box","--position-transform":Z||"none"}})():{...B,position:"absolute",padding:G,boxSizing:"border-box"};return l.jsx(dr,{children:l.jsx("div",{className:D.imgWrapper,onClick:se,children:l.jsx("img",{ref:N===p?j:null,className:me(D.imageStyle,{[D.contain]:s.image.objectFit==="contain",[D.cover]:s.image.objectFit==="cover",[D.scaleSlide]:h.type==="scale"}),src:s.image.url,alt:s.image.name??"",style:{...Y,pointerEvents:s.image.objectFit==="contain"?"none":"auto"}})})},N)})},u),R.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:me(D.arrow,{[D.arrowVertical]:h.direction==="vert"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:l.jsxs("button",{className:D.arrowInner,style:{transform:`translate(${T.scalingValue(R.offset.x,i)}, ${T.scalingValue(R.offset.y*(h.direction==="horiz"?1:-1),i)}) scale(${R.scale}) rotate(${h.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var s;return(s=b.current)==null?void 0:s.go("-1")},"aria-label":"Previous",children:[R.arrowsImgUrl&&l.jsx(yt,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:me(D.arrowImg,D.mirror)}),!R.arrowsImgUrl&&l.jsx(_o,{color:R.color,className:me(D.arrowIcon,D.arrowImg,D.mirror)})]})}),l.jsx("div",{className:me(D.arrow,D.nextArrow,{[D.arrowVertical]:h.direction==="vert"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:l.jsxs("button",{className:D.arrowInner,style:{transform:`translate(${T.scalingValue(R.offset.x*(h.direction==="horiz"?-1:1),i)}, ${T.scalingValue(R.offset.y,i)}) scale(${R.scale}) rotate(${h.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var s;return(s=b.current)==null?void 0:s.go("+1")},"aria-label":"Next",children:[R.arrowsImgUrl&&l.jsx(yt,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:D.arrowImg}),!R.arrowsImgUrl&&l.jsx(_o,{color:R.color,className:me(D.arrowIcon,D.arrowImg)})]})})]}),E.closeIconUrl&&(()=>{const s=Yt(E.closeIconAlign,E.closeIconOffset,i),N=`scale(${E.closeIconScale})`,B=s.transform?`${s.transform} ${N}`:N;return l.jsx("button",{className:D.closeButton,style:{...s,transform:B},onClick:Q,"aria-label":"Close lightbox",children:l.jsx(yt,{url:E.closeIconUrl,fill:E.closeIconColor??"#000000",hoverFill:E.closeIconHover??"#cccccc"})})})(),A&&A.isActive&&o.imageCaption&&((q=n[p])==null?void 0:q.imageCaption)&&(()=>{const{widthSettings:s,fontSettings:N,letterSpacing:B,textAlign:G,wordSpacing:Y,fontSizeLineHeight:Z,textAppearance:J,color:ne}=o.imageCaption;return l.jsx("div",{className:D.caption,style:{...Yt(A.alignment,A.offset,i),fontFamily:N.fontFamily,fontWeight:N.fontWeight,fontStyle:N.fontStyle,width:s.sizing==="auto"?"max-content":T.scalingValue(s.width,i),letterSpacing:T.scalingValue(B,i),wordSpacing:T.scalingValue(Y,i),textAlign:G,fontSize:T.scalingValue(Z.fontSize,i),lineHeight:T.scalingValue(Z.lineHeight,i),textTransform:J.textTransform??"none",textDecoration:J.textDecoration??"none",fontVariant:J.fontVariant??"normal",color:ne},onClick:ie=>ie.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:D.captionTextInner,style:{"--link-color":A.linkColor,"--link-hover-color":A.linkHoverColor},children:l.jsx(Vt,{content:n[p].imageCaption})})})})(),I.isActive&&(()=>{const[s,N]=I.position.split("-"),B=h.direction==="horiz"?`${s}-left`:I.position,G=Yt(B,I.offset,i),Y=()=>{if(h.direction==="horiz"){if(N==="left")return"flex-start";if(N==="center")return"center";if(N==="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 l.jsx("div",{ref:$,className:D.thumbsWrapper,onClick:Z=>ge(Z),style:{position:i?"absolute":"fixed",...G,...h.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:me(D.thumbsContainer,{[D.thumbsContainerVertical]:h.direction==="vert",[D.thumbsAlignStart]:I.align==="start",[D.thumbsAlignCenter]:I.align==="center",[D.thumbsAlignEnd]:I.align==="end"}),style:{gap:T.scalingValue(I.grid.gap,i),justifyContent:V?"flex-start":Y()},children:n.map((Z,J)=>{const ne=J===p,ie=_[J],pe=I.grid.size*(ne?I.activeState.scale:1),Te=()=>{if(I.fit!=="fit")return{};if(!ie)return h.direction==="horiz"?{height:T.scalingValue(pe,i)}:{width:T.scalingValue(pe,i)};const ee=ie.width/ie.height;if(h.direction==="horiz"){const ue=pe,xe=ue*ee;return{width:T.scalingValue(xe,i),height:T.scalingValue(ue,i)}}else{const ue=pe,xe=ue/ee;return{width:T.scalingValue(ue,i),height:T.scalingValue(xe,i)}}};return l.jsx("button",{className:D.thumbItem,style:{...h.direction==="horiz"&&I.fit!=="fit"?{height:T.scalingValue(pe,i)}:{},...h.direction==="vert"&&I.fit!=="fit"?{width:T.scalingValue(pe,i)}:{},...I.fit==="cover"?{width:T.scalingValue(pe,i),height:T.scalingValue(pe,i)}:{},...Te(),transition:ne?"all 0.25s ease-out":"none",opacity:ne?I.activeState.opacity/100:I.opacity/100,"--thumb-hover":I.activeState.opacity/100},onClick:ee=>{var ue;ee.stopPropagation(),g(J),(ue=b.current)==null||ue.go(J)},onMouseEnter:()=>{var ee;I.triggers==="hov"&&((ee=b.current)==null||ee.go(J))},children:l.jsx("img",{src:Z.image.url,alt:Z.image.name??"",onLoad:ee=>{const ue=ee.currentTarget;ue.naturalWidth&&ue.naturalHeight&&S(xe=>({...xe,[J]:{width:ue.naturalWidth,height:ue.naturalHeight}}))},style:{objectFit:I.fit==="cover"?"cover":"contain",...I.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...I.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Z.image.name}-${J}`)})})})})()]})]}),document.getElementById(a))};function _o({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const wl={element:xl,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 ht(e){const{color:t,...n}=e;return n}function Ze(e,t){var n,o,r;return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:T.scalingValue(e.letterSpacing,t),wordSpacing:T.scalingValue(e.wordSpacing,t),fontSize:T.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?T.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 Xt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function $l(e){return`
6
+ */const xa="RichTextRenderer-module__link___BWeZ2",Sa={link:xa},zt=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?a.jsx("a",{className:Sa.link,href:o.value,target:o.target,children:t(o.children)},r):a.jsx("span",{style:Ca(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 Ca(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 wa="SvgImage-module__svg___q3xE-",Ta="SvgImage-module__img___VsTm-",xo={svg:wa,img:Ta},_a=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,'\\"')}")`,Ze=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[s,i]=k.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return k.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(c)}},[]),!_a(e)||!s?a.jsx("img",{src:e,alt:"",className:pe(xo.img,o),style:r}):a.jsx("span",{"data-supports-mask":s,className:pe(xo.svg,o),style:{"--svg":$a(e),"--fill":t,"--hover-fill":n,...r??{}}})},Aa={"top-left":Z.topLeftAlignment,"top-center":Z.topCenterAlignment,"top-right":Z.topRightAlignment,"middle-left":Z.middleLeftAlignment,"middle-center":Z.middleCenterAlignment,"middle-right":Z.middleRightAlignment,"bottom-left":Z.bottomLeftAlignment,"bottom-center":Z.bottomCenterAlignment,"bottom-right":Z.bottomRightAlignment};function Ia({settings:e,content:t,styles:n,isEditor:o}){const[r,s]=k.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:p,textAlign:g,wordSpacing:u,fontSizeLineHeight:L,textAppearance:v,color:f}=n.imageCaption,[d,m]=k.useState(void 0),[_,b]=k.useState(null),[h,E]=k.useState(0),[Y,j]=k.useState(0),{direction:C,transition:x,controls:R,pagination:T,imageCaption:O,triggers:W}=e,H=k.useRef(x.type),{x:V,y:X}=e.controls.offset,D=y=>{r&&r.go(y)};return k.useEffect(()=>{if(!_)return;const y=new ResizeObserver(M=>{if(!r)return;const[F]=M;m({width:Math.round(F.contentRect.width),height:Math.round(F.contentRect.height)})});return y.observe(_),()=>y.unobserve(_)},[_]),k.useEffect(()=>{!r||H.current===x.type||(j(y=>y+1),H.current=x.type)},[x.type]),a.jsx("div",{className:pe(Z.wrapper,{[Z.editor]:o}),ref:b,children:a.jsxs("div",{className:Z.sliderInner,style:{width:d?d.width:"100%",height:d?d.height:"100%",backgroundColor:x.backgroundColor&&x.type==="fade in"?x.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:pe(Z.captionBlock),children:a.jsx("div",{className:Z.captionTextWrapper,children:t.map((y,M)=>a.jsx("div",{className:pe(Z.captionText,Aa[O.alignment],{[Z.withPointerEvents]:M===h&&o,[Z.active]:M===h}),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:g,fontSize:w.scalingValue(L.fontSize,o),lineHeight:w.scalingValue(L.lineHeight,o),textTransform:v.textTransform??"none",textDecoration:v.textDecoration??"none",fontVariant:v.fontVariant??"normal",color:f,transitionDuration:x.duration?`${Math.round(parseInt(x.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:Z.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})})},M))})}),a.jsx(dr,{onMove:y=>{E(y.index)},ref:s,options:{arrows:!1,speed:x.duration?parseInt(x.duration):500,autoplay:W.autoPlay!==null,...W.autoPlay!==null&&{interval:parseInt(W.autoPlay)*1e3},direction:C==="horiz"||x.type==="fade in"?"ltr":"ttb",pagination:!1,drag:W.triggersList.drag,perPage:1,width:d?d.width:"100%",height:d?d.height:"100%",type:x.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((y,M)=>a.jsx(gr,{children:a.jsx("div",{className:Z.sliderItem,children:a.jsx("div",{className:Z.imgWrapper,children:a.jsx("img",{className:pe(Z.sliderImage,{[Z.contain]:y.image.objectFit==="contain",[Z.cover]:y.image.objectFit==="cover"}),src:y.image.url,alt:y.image.name??""})})})},M))},Y),R.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:pe(Z.arrow,{[Z.arrowVertical]:C==="vert",[Z.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:a.jsxs("button",{onClick:()=>{D("-1")},className:Z.arrowInner,style:{transform:`translate(${w.scalingValue(V,o)}, ${w.scalingValue(X*(C==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${C==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&a.jsx(Ze,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:pe(Z.arrowImg,Z.mirror)}),!R.arrowsImgUrl&&a.jsx(So,{color:R.color,className:pe(Z.arrowIcon,Z.arrowImg,Z.mirror)})]})}),a.jsx("div",{className:pe(Z.arrow,Z.nextArrow,{[Z.arrowVertical]:C==="vert",[Z.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:a.jsxs("button",{className:Z.arrowInner,onClick:()=>D("+1"),style:{transform:`translate(${w.scalingValue(V*(C==="horiz"?-1:1),o)}, ${w.scalingValue(X,o)}) scale(${e.controls.scale/100}) rotate(${C==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&a.jsx(Ze,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:Z.arrowImg}),!R.arrowsImgUrl&&a.jsx(So,{color:R.color,className:pe(Z.arrowIcon,Z.arrowImg)})]})})]}),W.triggersList.click&&a.jsx("div",{className:Z.clickOverlay,onClick:()=>{r&&r.go("+1")}}),T.isActive&&a.jsx("div",{className:pe(Z.pagination,{[Z.paginationInsideBottom]:T.position==="inside-1"&&C==="horiz",[Z.paginationInsideTop]:T.position==="inside-2"&&C==="horiz",[Z.paginationOutsideBottom]:T.position==="outside-1"&&C==="horiz",[Z.paginationOutsideTop]:T.position==="outside-2"&&C==="horiz",[Z.paginationInsideLeft]:T.position==="inside-1"&&C==="vert",[Z.paginationInsideRight]:T.position==="inside-2"&&C==="vert",[Z.paginationOutsideLeft]:T.position==="outside-1"&&C==="vert",[Z.paginationOutsideRight]:T.position==="outside-2"&&C==="vert",[Z.paginationVertical]:C==="vert"}),children:a.jsx("div",{className:Z.paginationInner,style:{backgroundColor:T.colors[2],transform:`scale(${T.scale/100}) translate(${w.scalingValue(T.offset.x,o)}, ${w.scalingValue(T.offset.y,o)}) rotate(${C==="horiz"?"0deg":"90deg"})`},children:t.map((y,M)=>a.jsx("button",{onClick:()=>{r&&r.go(M)},className:pe(Z.paginationItem),children:a.jsx("div",{className:pe(Z.dot,{[Z.activeDot]:M===h}),style:{backgroundColor:M===h?T.colors[0]:T.colors[1],"--pagination-hover-color":T.hover}})},M))})})]})})}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 La={element:Ia,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",Fa="ImageRevealSlider-module__image___Qjt-e",ka="ImageRevealSlider-module__link___N-iLG",Ra="ImageRevealSlider-module__cursor___2U03d",ut={imageRevealSlider:Ea,image:Fa,link:ka,cursor:Ra};function Co(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const s=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*s,c=s/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 Wa(e,t,n,o){let r,s;if(t==="custom"){r=n;const i=await _n(e);s=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await _n(e);s=i.height/i.width*r}else{const i=await _n(e);r=i.width,s=i.height}return{width:r,height:s,finalWidth:`${r}px`}}function Ma({settings:e,content:t,isEditor:n}){const[o,r]=k.useState(null),[s,i]=k.useState([]),[c,p]=k.useState(0),g=k.useRef(0),[u,L]=k.useState({x:0,y:0}),[v,f]=k.useState(1),[d,m]=k.useState("none"),_=k.useRef({x:0,y:0}),[b,h]=k.useState(!1),{sizeType:E,imageWidth:Y,randomRangeImageWidth:j}=e.imageSize,{revealPosition:C,visible:x}=e.position,{cursorType:R,target:T,defaultCursorScale:O,defaultCursor:W,hoverCursorScale:H,hoverCursor:V}=e.cursor;k.useEffect(()=>{if(!o)return;const y=(I,S)=>{const $=o.getBoundingClientRect(),J=I-$.left,ie=S-$.top;if(L({x:J,y:ie}),R==="system"){m("none"),f(1);return}const ne=J,se=ie,z=document.elementFromPoint($.left+ne,$.top+se);if(z&&z.closest("a")){m("none"),f(1);return}const ee=Co(ne,se,s)||T==="area"?{img:V??"none",scale:H}:{img:W??"none",scale:O};m(ee.img),f(ee.scale)},M=I=>{I.stopPropagation(),_.current={x:I.clientX,y:I.clientY},y(I.clientX,I.clientY)},F=()=>{b&&y(_.current.x,_.current.y)};return o.addEventListener("mousemove",M),window.addEventListener("scroll",F,!0),()=>{o.removeEventListener("mousemove",M),window.removeEventListener("scroll",F,!0)}},[o,b,u,R,T,V,W,H,O,s]),k.useEffect(()=>{b||(m("none"),f(0))},[b]);const X=async(y,M,F,I={})=>{const{width:S,height:$,finalWidth:J}=await Wa(y.image.url,E,Y,j);let ie=0,ne=0;C==="same"?(ie=M/2,ne=F/2):(ie=I.x??Math.random()*M,ne=I.y??Math.random()*F);const se=Math.min(Math.max(ie,S/2),M-S/2),z=Math.min(Math.max(ne,$/2),F-$/2);return{id:g.current++,url:y.image.url,link:y.link,name:y.image.name,x:se,y:z,width:J}};k.useEffect(()=>{if(!o||t.length===0)return;const y=o.getBoundingClientRect(),M=y.width,F=y.height,I=[];(async()=>{const $=t[0],J=await X($,M,F);I.push(J),i(I),p(1)})()},[E,Y,j,C,o]),k.useEffect(()=>{x==="last One"&&i(y=>y.length>0?[y[y.length-1]]:[])},[x]);const D=async y=>{if(!o)return;const M=o.getBoundingClientRect(),F=y.clientX-M.left,I=y.clientY-M.top;if(T==="image"&&!Co(F,I,s))return;let S=0,$=0;C==="on Click"?(S=F,$=I):C==="same"?(S=M.width/2,$=M.height/2):(S=Math.random()*M.width,$=Math.random()*M.height);const J=t[c],ie=await X(J,M.width,M.height,{x:S,y:$});i(ne=>x==="all"?[...ne,ie]:[ie]),p(ne=>ne>=t.length-1?0:ne+1)};return a.jsxs("div",{ref:r,onClick:D,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),className:ut.imageRevealSlider,style:{cursor:d==="none"?"default":"none"},children:[s.map(y=>a.jsx("div",{className:ut.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:T==="area"&&y.link?a.jsx("a",{href:y.link,target:"_blank",className:ut.link,children:a.jsx("img",{src:y.url,alt:y.name,className:ut.image},y.id)}):a.jsx("img",{src:y.url,alt:y.name,className:ut.image},y.id)},y.id)),b&&a.jsx("div",{className:ut.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${v})`,backgroundImage:`url('${d}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const za={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:""}]}}}},Ha="LightBox-module__hidden___9s-9x",Va="LightBox-module__heroImage___sTxNF",Na="LightBox-module__background___rm9ml",Pa="LightBox-module__editor___4ACaY",ja="LightBox-module__contentStyle___Bgnsq",Oa="LightBox-module__imageStyle___tLIlB",Ba="LightBox-module__imgWrapper___LuFUp",Da="LightBox-module__contain___8-yaS",Ua="LightBox-module__cover___hNvOG",Ga="LightBox-module__caption___b6L2I",qa="LightBox-module__captionTextInner___rCGNH",Ya="LightBox-module__lightboxSplide___XFuWC",Xa="LightBox-module__arrow___iz38X",Ka="LightBox-module__arrowVertical___Zfz81",Ja="LightBox-module__nextArrow___zkAQN",Za="LightBox-module__arrowInner___p48sW",Qa="LightBox-module__arrowIcon___3VaFf",el="LightBox-module__arrowImg___pNV88",tl="LightBox-module__mirror___pjeXc",nl="LightBox-module__thumbsWrapper___GB-nU",ol="LightBox-module__thumbsContainerVertical___wttk5",rl="LightBox-module__thumbsContainer___osSma",il="LightBox-module__thumbsAlignStart___MO6tY",al="LightBox-module__thumbsAlignCenter___Q4sUx",ll="LightBox-module__thumbsAlignEnd___p4y9R",sl="LightBox-module__thumbItem___HvnF3",cl="LightBox-module__closeButton___g2khP",pl="LightBox-module__fadeIn___0m5GW",ul="LightBox-module__slideInLeft___gPYwC",dl="LightBox-module__slideInRight___S-pPp",gl="LightBox-module__slideInTop___DFdAj",ml="LightBox-module__slideInBottom___m27kZ",fl="LightBox-module__fadeOut___55qBR",yl="LightBox-module__slideOutLeft___NvU7P",hl="LightBox-module__slideOutRight___SK7eC",vl="LightBox-module__slideOutTop___Vgg0z",bl="LightBox-module__slideOutBottom___nJ0Ef",xl="LightBox-module__scaleSlide___vZriG",U={hidden:Ha,heroImage:Va,background:Na,editor:Pa,contentStyle:ja,imageStyle:Oa,imgWrapper:Ba,contain:Da,cover:Ua,caption:Ga,captionTextInner:qa,lightboxSplide:Ya,arrow:Xa,arrowVertical:Ka,nextArrow:Ja,arrowInner:Za,arrowIcon:Qa,arrowImg:el,mirror:tl,thumbsWrapper:nl,thumbsContainerVertical:ol,thumbsContainer:rl,thumbsAlignStart:il,thumbsAlignCenter:al,thumbsAlignEnd:ll,thumbItem:sl,closeButton:cl,fadeIn:pl,slideInLeft:ul,slideInRight:dl,slideInTop:gl,slideInBottom:ml,fadeOut:fl,slideOutLeft:yl,slideOutRight:hl,slideOutTop:vl,slideOutBottom:bl,scaleSlide:xl},Yt=(e,t,n)=>{const o={},[r,s]=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"),s==="left"?(o.left="0",o.right="auto"):s==="center"?(o.left="50%",o.right="auto"):s==="right"&&(o.left="auto",o.right="0"),r==="middle"&&s==="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)}))`:s==="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 mr(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=mr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,i=e.naturalHeight,c=o/r,p=s/i;let g,u;p>c?(g=o,u=o/p):(u=r,g=r*p);const L=t.left+n.left,v=t.top+n.top,f=(o-g)/2+L,d=(r-u)/2+v;return{x:f,y:d,width:g,height:u}}function To(e){const t=e.getBoundingClientRect(),n=mr(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 Sl(e,t){const n=(()=>{if(e==="fade in")return U.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return U.slideInLeft;case"right":return U.slideInRight;case"top":return U.slideInTop;case"bottom":return U.slideInBottom;default:return U.slideInRight}return U.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return U.fadeIn;if(e==="slide in")switch(t){case"left":return U.slideInLeft;case"right":return U.slideInRight;case"top":return U.slideInTop;case"bottom":return U.slideInBottom;default:return U.slideInRight}return U.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return U.fadeOut;if(e==="slide in")switch(t){case"left":return U.slideOutLeft;case"right":return U.slideOutRight;case"top":return U.slideOutTop;case"bottom":return U.slideOutBottom;default:return U.slideOutRight}return U.fadeOut})(),s=(()=>{if(e==="fade in")return U.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return U.slideOutLeft;case"right":return U.slideOutRight;case"top":return U.slideOutTop;case"bottom":return U.slideOutBottom;default:return U.slideOutRight}return U.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:s}}const Cl=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:s})=>{const[i,c]=k.useState(!1),{url:p}=e.thumbnailBlock.cover;return k.useEffect(()=>{r==="close"&&c(!1),r==="open"&&c(!0)},[r]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:p,alt:"Cover",className:U.heroImage,onClick:()=>c(!0)}),a.jsx(wl,{isOpen:i,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:s})]})},wl=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:s,isEditor:i,metadata:c})=>{var N;const[p,g]=k.useState(0),[u,L]=k.useState(0),[v,f]=k.useState(!1),[d,m]=k.useState(!1),[_,b]=k.useState({}),h=k.useRef(null),E=k.useRef(null),Y=k.useRef(null),j=k.useRef(!1),C=k.useRef(null),x=k.useRef(null),R=k.useRef(null),T=k.useRef(null),O=k.useRef(!1),W=k.useRef(null),[H,V]=k.useState(!1),{appear:X,triggers:D,slider:y,thumbnail:M,controls:F,area:I,caption:S,layout:$}=r.lightboxBlock,{appearClass:J,backdropAppearClass:ie,backdropDisappearClass:ne,disappearClass:se}=Sl(X.type,X.direction),z=(c==null?void 0:c.itemId)??null;k.useEffect(()=>{const l=()=>{setTimeout(()=>{var P,B;(B=(P=h.current)==null?void 0:P.splide)==null||B.refresh()},16)},A=()=>{L(P=>P+1)};return window.addEventListener("ArticleEditor.Layout:change",l),window.addEventListener("ArticleEditor.ComponentContent:change",A),()=>{window.removeEventListener("ArticleEditor.Layout:change",l),window.removeEventListener("ArticleEditor.ComponentContent:change",A)}},[]),k.useEffect(()=>{if(!e||!M.isActive){V(!1);return}const l=W.current;if(!l)return;const A=()=>{y.direction==="horiz"?V(l.scrollWidth>l.clientWidth):V(l.scrollHeight>l.clientHeight)};A();const P=new ResizeObserver(A);return P.observe(l),()=>P.disconnect()},[e,M.isActive,n.length,_,y.direction]);const ee=k.useCallback(()=>{const l=window.matchMedia("(max-width: 768px)").matches,A=_o(I.color);l&&!i&&A>.9&&(document.body.style.backgroundColor=""),f(!0),j.current=!0;const P=B=>{B.target===C.current&&B.animationName&&(C.current&&x.current&&C.current.removeEventListener("animationend",x.current),x.current=null,j.current&&(j.current=!1,t()),f(!1))};C.current&&(x.current=P,C.current.addEventListener("animationend",P))},[t,I.color,i]),me=(l,A,P)=>{var B,G;if(l){if(D.type==="click"&&D.switch==="image")D.repeat==="close"&&p===n.length-1?ee():(B=h.current)==null||B.go("+1");else if(D.type==="click"&&D.switch==="50/50"){const q=l.getBoundingClientRect(),K=A-q.left,te=P-q.top,le=q.width,ce=q.height;let de;y.direction==="horiz"?de=K<le/2?"-1":"+1":de=te<ce/2?"-1":"+1",(G=h.current)==null||G.go(de)}}},ae=l=>{if(O.current){O.current=!1;return}const A=n[p],P=(A==null?void 0:A.image.objectFit)==="cover";let B,G;if("changedTouches"in l&&l.changedTouches.length>0)B=l.changedTouches[0].clientX,G=l.changedTouches[0].clientY;else if("clientX"in l)B=l.clientX,G=l.clientY;else return;let q;if(P&&Y.current){const K=To(Y.current);q=B>=K.left&&B<=K.right&&G>=K.top&&G<=K.bottom}else{const K=Y.current?wo(Y.current):null;if(!K){l.target===l.currentTarget&&ee();return}q=B>=K.x&&B<=K.x+K.width&&G>=K.y&&G<=K.y+K.height}q?me(Y.current,B,G):ee()},ue=l=>{const A=l.target;(A.classList.contains(U.thumbsWrapper)||A.classList.contains(U.thumbsContainer))&&ae(l)};k.useEffect(()=>{if(!e)return;const l=A=>{var P,B;if(A.key==="Escape"){ee();return}if(A.key==="ArrowRight"){g(G=>(G+1)%Math.max(n.length,1)),(P=h.current)==null||P.go("+1");return}A.key==="ArrowLeft"&&(g(G=>(G-1+Math.max(n.length,1))%Math.max(n.length,1)),(B=h.current)==null||B.go("-1"))};return window.addEventListener("keydown",l),()=>{window.removeEventListener("keydown",l)}},[e,ee,n.length]),k.useEffect(()=>{if(e){if(g(0),L(A=>A+1),j.current=!1,f(!1),m(!1),b({}),!z)return;const l=new CustomEvent("page-overlay",{detail:{itemId:z}});window.dispatchEvent(l)}return()=>{C.current&&x.current&&(C.current.removeEventListener("animationend",x.current),x.current=null),m(!1)}},[e,z]),k.useEffect(()=>{E.current!==null&&E.current!==y.type&&L(l=>l+1),E.current=y.type},[y.type]),k.useEffect(()=>{if(!e)return;const l=document.body.style.overflow,A=window.matchMedia("(max-width: 768px)").matches,P=_o(I.color);document.body.style.overflow="hidden",m(!1);const B=q=>{q.target===C.current&&!j.current&&q.animationName&&(A&&!i&&P>.9&&(document.body.style.backgroundColor=I.color),m(!0),C.current&&R.current&&C.current.removeEventListener("animationend",R.current),R.current=null)};C.current&&(R.current=B,C.current.addEventListener("animationend",B));const G=q=>{const K=q.target;K&&(K.closest(`.${U.thumbsWrapper}`)||K.closest(`.${U.thumbsContainer}`))||y.type!=="slide"&&q.preventDefault()};return document.addEventListener("touchmove",G,{passive:!1}),()=>{document.body.style.overflow=l,document.removeEventListener("touchmove",G),C.current&&R.current&&(C.current.removeEventListener("animationend",R.current),R.current=null),m(!1)}},[e,i,I.color,y.type]),k.useEffect(()=>{if(!e)return;const l=A=>{var B,G;if(j.current){A.stopPropagation();return}if(O.current){O.current=!1;return}const P=A.target;if(!(P&&(P.closest(`.${U.thumbsContainer}`)||P.closest(`.${U.thumbItem}`)))){if(y.type==="slide"&&D.type==="drag"&&((G=(B=h.current)==null?void 0:B.splide)!=null&&G.root)){const q=h.current.splide.root;if(P&&(q.contains(P)||q===P))return}if(A.touches.length===0&&A.changedTouches.length>0){const q=n[p],K=(q==null?void 0:q.image.objectFit)==="cover",te=A.changedTouches[0];let le;if(K&&Y.current){const ce=To(Y.current);le=te.clientX>=ce.left&&te.clientX<=ce.right&&te.clientY>=ce.top&&te.clientY<=ce.bottom}else{const ce=Y.current?wo(Y.current):null;if(!ce)return;le=te.clientX>=ce.x&&te.clientX<=ce.x+ce.width&&te.clientY>=ce.y&&te.clientY<=ce.y+ce.height}if(!le){A.stopPropagation(),j.current=!0;const ce=de=>{de.stopPropagation(),de.preventDefault(),document.removeEventListener("click",ce,!0)};document.addEventListener("click",ce,!0),ee()}}}};return document.addEventListener("touchend",l,{passive:!0}),()=>{document.removeEventListener("touchend",l)}},[e,ee,p,n]);const Q=(y.type==="scale"||y.type==="fade")&&y.direction==="vert"&&D.type==="drag";k.useEffect(()=>{var de,we;if(!e||!Q||!((we=(de=h.current)==null?void 0:de.splide)!=null&&we.root))return;const l=h.current.splide.root,A=30,P=(oe,ye)=>{if(T.current){const Te=Math.abs(oe-T.current.x),Xe=Math.abs(ye-T.current.y);(Te>0||Xe>0)&&(O.current=!0)}},B=oe=>{T.current&&(oe.preventDefault(),P(oe.clientX,oe.clientY))},G=oe=>{T.current&&oe.touches.length>0&&(oe.preventDefault(),P(oe.touches[0].clientX,oe.touches[0].clientY))},q=(oe,ye)=>{if(!T.current||!h.current){T.current=null;return}const Te=Math.abs(oe-T.current.x),Xe=Math.abs(ye-T.current.y);Xe>A&&Xe>Te&&h.current.go(ye<T.current.y?"+1":"-1"),T.current=null},K=oe=>{T.current&&q(oe.clientX,oe.clientY),document.removeEventListener("pointerup",K),document.removeEventListener("pointercancel",K),document.removeEventListener("pointermove",B)},te=oe=>{if(T.current){if(oe.changedTouches.length>0){const ye=oe.changedTouches[0];q(ye.clientX,ye.clientY)}document.removeEventListener("touchend",te),document.removeEventListener("touchcancel",te),document.removeEventListener("touchmove",G)}},le=oe=>{T.current={x:oe.clientX,y:oe.clientY},O.current=!1,document.addEventListener("pointermove",B,{passive:!1}),document.addEventListener("pointerup",K),document.addEventListener("pointercancel",K)},ce=oe=>{oe.touches.length>0&&(T.current={x:oe.touches[0].clientX,y:oe.touches[0].clientY},O.current=!1,document.addEventListener("touchmove",G,{passive:!1}),document.addEventListener("touchend",te),document.addEventListener("touchcancel",te))};return l.addEventListener("pointerdown",le),l.addEventListener("touchstart",ce),()=>{l.removeEventListener("pointerdown",le),l.removeEventListener("touchstart",ce),document.removeEventListener("pointermove",B),document.removeEventListener("pointerup",K),document.removeEventListener("pointercancel",K),document.removeEventListener("touchmove",G),document.removeEventListener("touchend",te),document.removeEventListener("touchcancel",te),T.current=null,O.current=!1}},[e,Q,u]);const fe={backgroundColor:I.color,backdropFilter:`blur(${I.blur}px)`,animationDuration:`${parseInt(X.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:xr.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:i?null:C,className:pe(U.background,v?ne:ie,{[U.editor]:i},{[U.hidden]:!e}),style:{...fe,...d&&!i&&!v?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?C:null,className:pe(U.contentStyle,v?se:J,{[U.editor]:i},{[U.hidden]:!e}),style:{animationDuration:`${parseInt(X.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(dr,{onMove:l=>g(l.index),ref:h,className:U.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:D.type==="drag"&&!Q,perPage:1,width:"100%",height:"100%",type:y.type==="fade"||y.type==="scale"?"fade":"loop",padding:0,rewind:D.repeat!=="close",start:0},style:{"--splide-speed":y.duration},children:n.map((l,A)=>{const P=Yt($.position,$.offset,i),B=`${w.scalingValue($.padding.top,i)} ${w.scalingValue($.padding.right,i)} ${w.scalingValue($.padding.bottom,i)} ${w.scalingValue($.padding.left,i)}`,G=y.type==="scale"?(()=>{const{transform:q,...K}=P;return{...K,position:"absolute",padding:B,boxSizing:"border-box","--position-transform":q||"none"}})():{...P,position:"absolute",padding:B,boxSizing:"border-box"};return a.jsx(gr,{children:a.jsx("div",{className:U.imgWrapper,onClick:ae,children:a.jsx("img",{ref:A===p?Y:null,className:pe(U.imageStyle,{[U.contain]:l.image.objectFit==="contain",[U.cover]:l.image.objectFit==="cover",[U.scaleSlide]:y.type==="scale"}),src:l.image.url,alt:l.image.name??"",style:{...G,pointerEvents:l.image.objectFit==="contain"?"none":"auto"}})})},A)})},u),F.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:pe(U.arrow,{[U.arrowVertical]:y.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:a.jsxs("button",{className:U.arrowInner,style:{transform:`translate(${w.scalingValue(F.offset.x,i)}, ${w.scalingValue(F.offset.y*(y.direction==="horiz"?1:-1),i)}) scale(${F.scale}) rotate(${y.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var l;return(l=h.current)==null?void 0:l.go("-1")},"aria-label":"Previous",children:[F.arrowsImgUrl&&a.jsx(Ze,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:pe(U.arrowImg,U.mirror)}),!F.arrowsImgUrl&&a.jsx($o,{color:F.color,className:pe(U.arrowIcon,U.arrowImg,U.mirror)})]})}),a.jsx("div",{className:pe(U.arrow,U.nextArrow,{[U.arrowVertical]:y.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:a.jsxs("button",{className:U.arrowInner,style:{transform:`translate(${w.scalingValue(F.offset.x*(y.direction==="horiz"?-1:1),i)}, ${w.scalingValue(F.offset.y,i)}) scale(${F.scale}) rotate(${y.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var l;return(l=h.current)==null?void 0:l.go("+1")},"aria-label":"Next",children:[F.arrowsImgUrl&&a.jsx(Ze,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:U.arrowImg}),!F.arrowsImgUrl&&a.jsx($o,{color:F.color,className:pe(U.arrowIcon,U.arrowImg)})]})})]}),I.closeIconUrl&&(()=>{const l=Yt(I.closeIconAlign,I.closeIconOffset,i),A=`scale(${I.closeIconScale})`,P=l.transform?`${l.transform} ${A}`:A;return a.jsx("button",{className:U.closeButton,style:{...l,transform:P},onClick:ee,"aria-label":"Close lightbox",children:a.jsx(Ze,{url:I.closeIconUrl,fill:I.closeIconColor??"#000000",hoverFill:I.closeIconHover??"#cccccc"})})})(),S&&S.isActive&&o.imageCaption&&((N=n[p])==null?void 0:N.imageCaption)&&(()=>{const{widthSettings:l,fontSettings:A,letterSpacing:P,textAlign:B,wordSpacing:G,fontSizeLineHeight:q,textAppearance:K,color:te}=o.imageCaption;return a.jsx("div",{className:U.caption,style:{...Yt(S.alignment,S.offset,i),fontFamily:A.fontFamily,fontWeight:A.fontWeight,fontStyle:A.fontStyle,width:l.sizing==="auto"?"max-content":w.scalingValue(l.width,i),letterSpacing:w.scalingValue(P,i),wordSpacing:w.scalingValue(G,i),textAlign:B,fontSize:w.scalingValue(q.fontSize,i),lineHeight:w.scalingValue(q.lineHeight,i),textTransform:K.textTransform??"none",textDecoration:K.textDecoration??"none",fontVariant:K.fontVariant??"normal",color:te},onClick:le=>le.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:U.captionTextInner,style:{"--link-color":S.linkColor,"--link-hover-color":S.linkHoverColor},children:a.jsx(zt,{content:n[p].imageCaption})})})})(),M.isActive&&(()=>{const[l,A]=M.position.split("-"),P=y.direction==="horiz"?`${l}-left`:M.position,B=Yt(P,M.offset,i),G=()=>{if(y.direction==="horiz"){if(A==="left")return"flex-start";if(A==="center")return"center";if(A==="right")return"flex-end"}else{if(l==="top")return"flex-start";if(l==="middle")return"center";if(l==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:W,className:U.thumbsWrapper,onClick:q=>ue(q),style:{position:i?"absolute":"fixed",...B,...y.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:pe(U.thumbsContainer,{[U.thumbsContainerVertical]:y.direction==="vert",[U.thumbsAlignStart]:M.align==="start",[U.thumbsAlignCenter]:M.align==="center",[U.thumbsAlignEnd]:M.align==="end"}),style:{gap:w.scalingValue(M.grid.gap,i),justifyContent:H?"flex-start":G()},children:n.map((q,K)=>{const te=K===p,le=_[K],de=M.grid.size*(te?M.activeState.scale:1),we=()=>{if(M.fit!=="fit")return{};if(!le)return y.direction==="horiz"?{height:w.scalingValue(de,i)}:{width:w.scalingValue(de,i)};const oe=le.width/le.height;if(y.direction==="horiz"){const ye=de,Te=ye*oe;return{width:w.scalingValue(Te,i),height:w.scalingValue(ye,i)}}else{const ye=de,Te=ye/oe;return{width:w.scalingValue(ye,i),height:w.scalingValue(Te,i)}}};return a.jsx("button",{className:U.thumbItem,style:{...y.direction==="horiz"&&M.fit!=="fit"?{height:w.scalingValue(de,i)}:{},...y.direction==="vert"&&M.fit!=="fit"?{width:w.scalingValue(de,i)}:{},...M.fit==="cover"?{width:w.scalingValue(de,i),height:w.scalingValue(de,i)}:{},...we(),transition:te?"all 0.25s ease-out":"none",opacity:te?M.activeState.opacity/100:M.opacity/100,"--thumb-hover":M.activeState.opacity/100},onClick:oe=>{var ye;oe.stopPropagation(),g(K),(ye=h.current)==null||ye.go(K)},onMouseEnter:()=>{var oe;M.triggers==="hov"&&((oe=h.current)==null||oe.go(K))},children:a.jsx("img",{src:q.image.url,alt:q.image.name??"",onLoad:oe=>{const ye=oe.currentTarget;ye.naturalWidth&&ye.naturalHeight&&b(Te=>({...Te,[K]:{width:ye.naturalWidth,height:ye.naturalHeight}}))},style:{objectFit:M.fit==="cover"?"cover":"contain",...M.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...M.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${q.image.name}-${K}`)})})})})()]})]}),document.getElementById(s))};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 Tl={element:Cl,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 ht(e){const{color:t,...n}=e;return n}function Je(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 Xt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function _l(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
@@ -139,7 +139,7 @@
139
139
  position: relative;
140
140
  height: auto;
141
141
  }
142
- `}function Tl({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=T.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:c=[],buttonLabel:p,gap:g,fieldsGap:u,buttonCorners:F,buttonStroke:x,buttonPadding:f,isButtonFullWidth:d,inputCorners:m,inputStroke:_,inputPadding:S,inputColor:b,inputTextColor:w,inputBorderColor:j,placeholderColor:z,buttonColor:C,buttonTextColor:y,buttonBorderColor:L,labelTextColor:v,successColor:H,errorColor:$,fontFamily:V,inputFontSettings:k,inputFontSize:U,inputLineHeight:O,inputLetterSpacing:h,inputWordSpacing:I,inputTextAppearance:R,buttonFontSettings:E,buttonFontSize:A,buttonLineHeight:W,buttonLetterSpacing:X,buttonWordSpacing:re,buttonTextAppearance:oe,labelFontSettings:le,labelFontSize:M,labelLineHeight:Q,labelLetterSpacing:fe,labelWordSpacing:se,labelTextAppearance:ge,statusFontSettings:be,statusFontSize:ze,statusLineHeight:q,statusLetterSpacing:s,statusWordSpacing:N,statusTextAppearance:B,successMessage:G,errorMessage:Y,stateOverrides:Z}=e,J=a==="B",ne=c.slice(0,Math.min(i,c.length)),ie={fontSettings:{fontFamily:V,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:U??.01,lineHeight:O,letterSpacing:h??0,wordSpacing:I??0,textAppearance:R,color:w},ae=ht(Ze(ie,t)),pe=T.scalingValue(_??0,t),Te=T.scalingValue((O??U??.01)+((S==null?void 0:S.top)??0)+((S==null?void 0:S.bottom)??0)+(a==="C"?_??0:(_??0)*2),t),ee={...ae,borderStyle:"solid",borderRadius:a==="C"?0:T.scalingValue(m??0,t),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:pe,borderLeftWidth:0}:{borderWidth:pe},paddingTop:T.scalingValue((S==null?void 0:S.top)??0,t),paddingRight:T.scalingValue((S==null?void 0:S.right)??0,t),paddingBottom:T.scalingValue((S==null?void 0:S.bottom)??0,t),paddingLeft:T.scalingValue((S==null?void 0:S.left)??0,t),height:Te,minHeight:Te},ue={fontSettings:{fontFamily:V,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:A??.01,lineHeight:W,letterSpacing:X??0,wordSpacing:re??0,textAppearance:oe,color:y},xe=ht(Ze(ue,t)),Xe=T.scalingValue(x??0,t),bn={fontSettings:{fontFamily:V,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:M??.01,lineHeight:Q,letterSpacing:fe??0,wordSpacing:se??0,textAppearance:ge,color:v},$t=Ze(bn,t),he={fontSettings:{fontFamily:V,fontWeight:(be==null?void 0:be.fontWeight)??400,fontStyle:(be==null?void 0:be.fontStyle)??"normal"},fontSize:ze??.01,lineHeight:q,letterSpacing:s??0,wordSpacing:N??0,textAppearance:B,color:H},Ve=ht(Ze(he,t)),ot=T.buildColorVars(r,{inputColor:b,inputTextColor:w,inputBorderColor:j,placeholderColor:z!=null&&z.trim()?z:"#cccccc",buttonColor:C,buttonTextColor:y,buttonBorderColor:L,labelTextColor:v,successColor:H,errorColor:$},_l,Al,Z),[Se,Pe]=P.useState(()=>Object.fromEntries(ne.map(ce=>[ce.name,""]))),[no,Tt]=P.useState("idle"),[mr,Ut]=P.useState(null),Sn=o==="success"?"success":o==="error"?"error":no,fr=o==="error"?Y:mr,qt=o==="filled",_t=P.useMemo(()=>{if(!qt)return Se;let ce=null;for(const je of ne)(Se[je.name]??"").trim().length>0||(ce=ce??{...Se},ce[je.name]="Filled");return ce??Se},[Se,qt,ne]),yr=Sn==="error"?T.getFormFieldValidationError(ne,_t):null,hr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),oo=n==null?void 0:n.submitUrl,ro=(ce,je)=>{Pe(Oe=>({...Oe,[ce]:je}))},vr=async ce=>{ce.preventDefault();const je=Object.fromEntries(ne.map(Ee=>{var ct;return[Ee.name,((ct=Se[Ee.name])==null?void 0:ct.trim())??""]}).filter(([,Ee])=>Ee));if(!oo){Tt("error"),Ut("No integrations were found for this form.");return}if(Object.keys(je).length===0)return;const Oe=T.getFormFieldValidationError(ne,Se);if(Oe){Tt("error"),Ut(Oe);return}Tt("submitting"),Ut(null);try{const Ee=await fetch(oo,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(je)});if(!Ee.ok){const ct=await Ee.text();throw new Error(ct||`Request failed: ${Ee.status}`)}Tt("success"),Pe(Object.fromEntries(ne.map(ct=>[ct.name,""])))}catch(Ee){Tt("error"),Ut(Ee instanceof Error?Ee.message:"Something went wrong")}};return l.jsxs("div",{className:`${r}-wrapper ${r}-type-${a} ${hr}`.trim(),style:ot,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:$l(r)}}),l.jsxs("form",{onSubmit:vr,className:`${r}-form`,style:{gap:T.scalingValue(g??0,t)},children:[l.jsx("div",{className:`${r}-fields`,style:{gap:T.scalingValue(u??0,t)},children:ne.map((ce,je)=>l.jsxs("div",{className:`${r}-field-group${J?` ${r}-labeled`:""}`,children:[J&&l.jsx("span",{className:`${r}-field-label`,style:$t?{...$t,lineHeight:$t.fontSize}:void 0,children:ce.label||ce.name}),ce.type==="textarea"?l.jsx("textarea",{name:ce.name,autoComplete:"off",value:_t[ce.name]??"",onChange:Oe=>ro(ce.name,Oe.target.value),placeholder:ce.placeholder,className:`${r}-input`,style:ee,rows:1,"data-filled":qt||(_t[ce.name]??"").trim().length>0,"data-field-type":"textarea"}):l.jsx("input",{type:ce.type==="phone"?"tel":ce.type==="email"?"email":"text",name:ce.name,autoComplete:"off",value:_t[ce.name]??"",onChange:Oe=>ro(ce.name,Oe.target.value),placeholder:ce.placeholder,required:ce.isRequired??ce.type==="email",className:`${r}-input`,style:ee,"data-filled":qt||(_t[ce.name]??"").trim().length>0})]},je))}),l.jsx("div",{className:`${r}-overlay-anchor`,children:l.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:T.scalingValue(F??0,t),borderWidth:Xe,paddingTop:T.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:T.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:T.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:T.scalingValue((f==null?void 0:f.left)??0,t),...xe,...d?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:l.jsx("span",{className:`${r}-overlay-anchor`,style:d?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:no==="submitting"?"...":p})})})]}),Sn==="success"&&l.jsx("p",{className:`${r}-success`,style:{...Ve},children:G}),Sn==="error"&&l.jsx("p",{className:`${r}-error`,style:{...Ve},role:"alert",children:yr??fr??Y})]})}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"],Ll=`import React, { useMemo, useState } from 'react';
142
+ `}function $l({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=w.useScopedStyles(),{type:s="A",fieldsToShow:i=2,fields:c=[],buttonLabel:p,gap:g,fieldsGap:u,buttonCorners:L,buttonStroke:v,buttonPadding:f,isButtonFullWidth:d,inputCorners:m,inputStroke:_,inputPadding:b,inputColor:h,inputTextColor:E,inputBorderColor:Y,placeholderColor:j,buttonColor:C,buttonTextColor:x,buttonBorderColor:R,labelTextColor:T,successColor:O,errorColor:W,fontFamily:H,inputFontSettings:V,inputFontSize:X,inputLineHeight:D,inputLetterSpacing:y,inputWordSpacing:M,inputTextAppearance:F,buttonFontSettings:I,buttonFontSize:S,buttonLineHeight:$,buttonLetterSpacing:J,buttonWordSpacing:ie,buttonTextAppearance:ne,labelFontSettings:se,labelFontSize:z,labelLineHeight:ee,labelLetterSpacing:me,labelWordSpacing:ae,labelTextAppearance:ue,statusFontSettings:Q,statusFontSize:fe,statusLineHeight:N,statusLetterSpacing:l,statusWordSpacing:A,statusTextAppearance:P,successMessage:B,errorMessage:G,stateOverrides:q}=e,K=s==="B",te=c.slice(0,Math.min(i,c.length)),le={fontSettings:{fontFamily:H,fontWeight:(V==null?void 0:V.fontWeight)??400,fontStyle:(V==null?void 0:V.fontStyle)??"normal"},fontSize:X??.01,lineHeight:D,letterSpacing:y??0,wordSpacing:M??0,textAppearance:F,color:E},ce=ht(Je(le,t)),de=w.scalingValue(_??0,t),we=w.scalingValue((D??X??.01)+((b==null?void 0:b.top)??0)+((b==null?void 0:b.bottom)??0)+(s==="C"?_??0:(_??0)*2),t),oe={...ce,borderStyle:"solid",borderRadius:s==="C"?0:w.scalingValue(m??0,t),...s==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:de,borderLeftWidth:0}:{borderWidth:de},paddingTop:w.scalingValue((b==null?void 0:b.top)??0,t),paddingRight:w.scalingValue((b==null?void 0:b.right)??0,t),paddingBottom:w.scalingValue((b==null?void 0:b.bottom)??0,t),paddingLeft:w.scalingValue((b==null?void 0:b.left)??0,t),height:we,minHeight:we},ye={fontSettings:{fontFamily:H,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:S??.01,lineHeight:$,letterSpacing:J??0,wordSpacing:ie??0,textAppearance:ne,color:x},Te=ht(Je(ye,t)),Xe=w.scalingValue(v??0,t),bn={fontSettings:{fontFamily:H,fontWeight:(se==null?void 0:se.fontWeight)??400,fontStyle:(se==null?void 0:se.fontStyle)??"normal"},fontSize:z??.01,lineHeight:ee,letterSpacing:me??0,wordSpacing:ae??0,textAppearance:ue,color:T},Tt=Je(bn,t),xe={fontSettings:{fontFamily:H,fontWeight:(Q==null?void 0:Q.fontWeight)??400,fontStyle:(Q==null?void 0:Q.fontStyle)??"normal"},fontSize:fe??.01,lineHeight:N,letterSpacing:l??0,wordSpacing:A??0,textAppearance:P,color:O},Me=ht(Je(xe,t)),rt=w.buildColorVars(r,{inputColor:h,inputTextColor:E,inputBorderColor:Y,placeholderColor:j!=null&&j.trim()?j:"#cccccc",buttonColor:C,buttonTextColor:x,buttonBorderColor:R,labelTextColor:T,successColor:O,errorColor:W},Al,Il,q),[Ce,Ne]=k.useState(()=>Object.fromEntries(te.map(ge=>[ge.name,""]))),[no,_t]=k.useState("idle"),[fr,Ut]=k.useState(null),xn=o==="success"?"success":o==="error"?"error":no,yr=o==="error"?G:fr,Gt=o==="filled",$t=k.useMemo(()=>{if(!Gt)return Ce;let ge=null;for(const Pe of te)(Ce[Pe.name]??"").trim().length>0||(ge=ge??{...Ce},ge[Pe.name]="Filled");return ge??Ce},[Ce,Gt,te]),hr=xn==="error"?w.getFormFieldValidationError(te,$t):null,vr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),oo=n==null?void 0:n.submitUrl,ro=(ge,Pe)=>{Ne(je=>({...je,[ge]:Pe}))},br=async ge=>{ge.preventDefault();const Pe=Object.fromEntries(te.map(Fe=>{var pt;return[Fe.name,((pt=Ce[Fe.name])==null?void 0:pt.trim())??""]}).filter(([,Fe])=>Fe));if(!oo){_t("error"),Ut("No integrations were found for this form.");return}if(Object.keys(Pe).length===0)return;const je=w.getFormFieldValidationError(te,Ce);if(je){_t("error"),Ut(je);return}_t("submitting"),Ut(null);try{const Fe=await fetch(oo,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Pe)});if(!Fe.ok){const pt=await Fe.text();throw new Error(pt||`Request failed: ${Fe.status}`)}_t("success"),Ne(Object.fromEntries(te.map(pt=>[pt.name,""])))}catch(Fe){_t("error"),Ut(Fe instanceof Error?Fe.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${r}-type-${s} ${vr}`.trim(),style:rt,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_l(r)}}),a.jsxs("form",{onSubmit:br,className:`${r}-form`,style:{gap:w.scalingValue(g??0,t)},children:[a.jsx("div",{className:`${r}-fields`,style:{gap:w.scalingValue(u??0,t)},children:te.map((ge,Pe)=>a.jsxs("div",{className:`${r}-field-group${K?` ${r}-labeled`:""}`,children:[K&&a.jsx("span",{className:`${r}-field-label`,style:Tt?{...Tt,lineHeight:Tt.fontSize}:void 0,children:ge.label||ge.name}),ge.type==="textarea"?a.jsx("textarea",{name:ge.name,autoComplete:"off",value:$t[ge.name]??"",onChange:je=>ro(ge.name,je.target.value),placeholder:ge.placeholder,className:`${r}-input`,style:oe,rows:1,"data-filled":Gt||($t[ge.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:ge.type==="phone"?"tel":ge.type==="email"?"email":"text",name:ge.name,autoComplete:"off",value:$t[ge.name]??"",onChange:je=>ro(ge.name,je.target.value),placeholder:ge.placeholder,required:ge.isRequired??ge.type==="email",className:`${r}-input`,style:oe,"data-filled":Gt||($t[ge.name]??"").trim().length>0})]},Pe))}),a.jsx("div",{className:`${r}-overlay-anchor`,children:a.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:w.scalingValue(L??0,t),borderWidth:Xe,paddingTop:w.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:w.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:w.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:w.scalingValue((f==null?void 0:f.left)??0,t),...Te,...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:B}),xn==="error"&&a.jsx("p",{className:`${r}-error`,style:{...Me},role:"alert",children:hr??yr??G})]})}const Al={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"},Il=["hover","focus","filled","success","error"],Ll=`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
- `,El=[{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"}],Kt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Fl=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],kl={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:{...Kt.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:{...Kt.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:{...Kt.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:{...Kt.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:El,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:[...Fl],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Il={element:Tl,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:kl,sourceCode:Ll};function Zt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rl(e){return`
743
+ `,El=[{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"}],Kt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Fl=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],kl={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:{...Kt.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:{...Kt.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:{...Kt.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:{...Kt.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:El,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:[...Fl],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"]},Rl={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:kl,sourceCode:Ll};function Jt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Wl(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: ${Jt(8)};
926
+ font-size: ${Jt(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: ${Jt(8)};
931
+ font-size: ${Jt(14)};
932
932
  color: var(--${e}-error-error-color, var(--${e}-error-color));
933
933
  }
934
- `}const Wl=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=T.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:c,fieldsToShow:p=1,fontFamily:g,inputFontSettings:u,inputFontSize:F,inputLineHeight:x,inputLetterSpacing:f,inputWordSpacing:d,inputTextAppearance:m,buttonFontSettings:_,buttonFontSize:S,buttonLineHeight:b,buttonLetterSpacing:w,buttonWordSpacing:j,buttonTextAppearance:z,statusFontSettings:C,statusFontSize:y,statusLineHeight:L,statusLetterSpacing:v,statusWordSpacing:H,statusTextAppearance:$,iconMaxWidth:V,minHeight:k,corners:U,stroke:O,stateOverrides:h,inputPadding:I,buttonPadding:R,successMessage:E="Thanks for subscribing!",errorMessage:A="Please, fill all required fields."}=e,W=a.slice(0,Math.min(p,a.length)),[X,re]=P.useState(()=>Object.fromEntries(W.map(he=>[he.name,""]))),[oe,le]=P.useState("idle"),[M,Q]=P.useState(null),fe=o==="success"?"success":o==="error"?"error":oe,se=o==="error"?A:M,ge=o==="filled",be=P.useMemo(()=>{if(!ge)return X;let he=null;for(const Ve of W)(X[Ve.name]??"").trim().length>0||(he=he??{...X},he[Ve.name]="Filled");return he??X},[ge,X,W]),ze=fe==="error"?T.getFormFieldValidationError(W,be):null,q=o&&o!=="default"?`${r}-state-${o}`:"",s=W.some(he=>(be[he.name]??"").trim().length>0),N=q!==`${r}-state-filled`&&s?`${r}-state-filled`:"",B=`${q} ${N}`.trim(),G=n==null?void 0:n.submitUrl,Y=c??"",Z=(i==null?void 0:i.icon)??"",J=(i==null?void 0:i.mode)==="On",ne=Y||"Submit",ie={fontSettings:{fontFamily:g,fontWeight:(u==null?void 0:u.fontWeight)??400,fontStyle:(u==null?void 0:u.fontStyle)??"normal"},fontSize:F??.01,lineHeight:x,letterSpacing:f??0,wordSpacing:d??0,textAppearance:m,color:e.inputTextColor??"#111111"},ae={fontSettings:{fontFamily:g,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:S??.01,lineHeight:b,letterSpacing:w??0,wordSpacing:j??0,textAppearance:z,color:e.buttonTextColor??"#ffffff"},pe={fontSettings:{fontFamily:g,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:y??.01,lineHeight:L,letterSpacing:v??0,wordSpacing:H??0,textAppearance:$,color:e.successColor??"#22c55e"},Te=ht(Ze(ie,t)),ee=ht(Ze(ae,t)),ue=ht(Ze(pe,t)),xe=T.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(ie==null?void 0:ie.color)??"#111111",buttonTextColor:e.buttonTextColor??(ae==null?void 0:ae.color)??"#ffffff"},zl,Vl,h),Xe={borderRadius:T.scalingValue(U,t),borderWidth:T.scalingValue(O,t),borderStyle:"solid"},bn={borderLeftWidth:T.scalingValue(O,t)},$t=async he=>{he.preventDefault();const Ve=Object.fromEntries(W.map(Se=>{var Pe;return[Se.name,((Pe=X[Se.name])==null?void 0:Pe.trim())??""]}).filter(([,Se])=>Se));if(!G){le("error"),Q("No integrations were found for this form.");return}if(Object.keys(Ve).length===0)return;const ot=T.getFormFieldValidationError(W,X);if(ot){le("error"),Q(ot);return}le("submitting"),Q(null);try{const Se=await fetch(G,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ve)});if(!Se.ok){const Pe=await Se.text();throw new Error(Pe||`Request failed: ${Se.status}`)}le("success"),re(Object.fromEntries(W.map(Pe=>[Pe.name,""])))}catch(Se){le("error"),Q(Se instanceof Error?Se.message:"Something went wrong")}};return l.jsxs("div",{className:`${r}-wrapper ${B}`.trim(),style:xe,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Rl(r)}}),l.jsxs("form",{onSubmit:$t,className:`${r}-form`,style:{...Xe,height:T.scalingValue(k,t),minHeight:T.scalingValue(k,t)},children:[l.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:W.map(he=>l.jsx("input",{type:he.type==="email"?"email":he.type==="phone"?"tel":"text",name:he.name,autoComplete:"off",value:be[he.name]??"",onChange:Ve=>re(ot=>({...ot,[he.name]:Ve.target.value})),placeholder:he.placeholder,required:he.isRequired??he.type==="email",className:`${r}-input`,style:{...Te,paddingRight:T.scalingValue(I.right,t),paddingLeft:T.scalingValue(I.left,t),paddingTop:T.scalingValue(I.top,t),paddingBottom:T.scalingValue(I.bottom,t)}},he.name))}),l.jsx("div",{className:`${r}-overlayAnchor`,children:l.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":ne,style:{...ee,...bn,paddingRight:T.scalingValue(R.right,t),paddingLeft:T.scalingValue(R.left,t),paddingTop:T.scalingValue(R.top,t),paddingBottom:T.scalingValue(R.bottom,t)},children:oe==="submitting"?"...":J?Z&&l.jsx(yt,{url:Z,className:`${r}-submitBtnIcon`,style:{maxWidth:T.scalingValue(V??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):Y})})]}),fe==="success"&&l.jsx("p",{className:`${r}-success`,style:{...ue},children:E}),fe==="error"&&l.jsx("p",{className:`${r}-error`,style:{...ue},role:"alert",children:ze??se??A})]})},zl={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"},Vl=["hover","focus","filled","success","error"],Ml=`import React, { useMemo, useState } from 'react';
934
+ `}const Ml=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=w.useScopedStyles(),{fields:s=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:c,fieldsToShow:p=1,fontFamily:g,inputFontSettings:u,inputFontSize:L,inputLineHeight:v,inputLetterSpacing:f,inputWordSpacing:d,inputTextAppearance:m,buttonFontSettings:_,buttonFontSize:b,buttonLineHeight:h,buttonLetterSpacing:E,buttonWordSpacing:Y,buttonTextAppearance:j,statusFontSettings:C,statusFontSize:x,statusLineHeight:R,statusLetterSpacing:T,statusWordSpacing:O,statusTextAppearance:W,iconMaxWidth:H,minHeight:V,corners:X,stroke:D,stateOverrides:y,inputPadding:M,buttonPadding:F,successMessage:I="Thanks for subscribing!",errorMessage:S="Please, fill all required fields."}=e,$=s.slice(0,Math.min(p,s.length)),[J,ie]=k.useState(()=>Object.fromEntries($.map(xe=>[xe.name,""]))),[ne,se]=k.useState("idle"),[z,ee]=k.useState(null),me=o==="success"?"success":o==="error"?"error":ne,ae=o==="error"?S:z,ue=o==="filled",Q=k.useMemo(()=>{if(!ue)return J;let xe=null;for(const Me of $)(J[Me.name]??"").trim().length>0||(xe=xe??{...J},xe[Me.name]="Filled");return xe??J},[ue,J,$]),fe=me==="error"?w.getFormFieldValidationError($,Q):null,N=o&&o!=="default"?`${r}-state-${o}`:"",l=$.some(xe=>(Q[xe.name]??"").trim().length>0),A=N!==`${r}-state-filled`&&l?`${r}-state-filled`:"",P=`${N} ${A}`.trim(),B=n==null?void 0:n.submitUrl,G=c??"",q=(i==null?void 0:i.icon)??"",K=(i==null?void 0:i.mode)==="On",te=G||"Submit",le={fontSettings:{fontFamily:g,fontWeight:(u==null?void 0:u.fontWeight)??400,fontStyle:(u==null?void 0:u.fontStyle)??"normal"},fontSize:L??.01,lineHeight:v,letterSpacing:f??0,wordSpacing:d??0,textAppearance:m,color:e.inputTextColor??"#111111"},ce={fontSettings:{fontFamily:g,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:b??.01,lineHeight:h,letterSpacing:E??0,wordSpacing:Y??0,textAppearance:j,color:e.buttonTextColor??"#ffffff"},de={fontSettings:{fontFamily:g,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:x??.01,lineHeight:R,letterSpacing:T??0,wordSpacing:O??0,textAppearance:W,color:e.successColor??"#22c55e"},we=ht(Je(le,t)),oe=ht(Je(ce,t)),ye=ht(Je(de,t)),Te=w.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(le==null?void 0:le.color)??"#111111",buttonTextColor:e.buttonTextColor??(ce==null?void 0:ce.color)??"#ffffff"},zl,Hl,y),Xe={borderRadius:w.scalingValue(X,t),borderWidth:w.scalingValue(D,t),borderStyle:"solid"},bn={borderLeftWidth:w.scalingValue(D,t)},Tt=async xe=>{xe.preventDefault();const Me=Object.fromEntries($.map(Ce=>{var Ne;return[Ce.name,((Ne=J[Ce.name])==null?void 0:Ne.trim())??""]}).filter(([,Ce])=>Ce));if(!B){se("error"),ee("No integrations were found for this form.");return}if(Object.keys(Me).length===0)return;const rt=w.getFormFieldValidationError($,J);if(rt){se("error"),ee(rt);return}se("submitting"),ee(null);try{const Ce=await fetch(B,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Me)});if(!Ce.ok){const Ne=await Ce.text();throw new Error(Ne||`Request failed: ${Ce.status}`)}se("success"),ie(Object.fromEntries($.map(Ne=>[Ne.name,""])))}catch(Ce){se("error"),ee(Ce instanceof Error?Ce.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${P}`.trim(),style:Te,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Wl(r)}}),a.jsxs("form",{onSubmit:Tt,className:`${r}-form`,style:{...Xe,height:w.scalingValue(V,t),minHeight:w.scalingValue(V,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:$.map(xe=>a.jsx("input",{type:xe.type==="email"?"email":xe.type==="phone"?"tel":"text",name:xe.name,autoComplete:"off",value:Q[xe.name]??"",onChange:Me=>ie(rt=>({...rt,[xe.name]:Me.target.value})),placeholder:xe.placeholder,required:xe.isRequired??xe.type==="email",className:`${r}-input`,style:{...we,paddingRight:w.scalingValue(M.right,t),paddingLeft:w.scalingValue(M.left,t),paddingTop:w.scalingValue(M.top,t),paddingBottom:w.scalingValue(M.bottom,t)}},xe.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":te,style:{...oe,...bn,paddingRight:w.scalingValue(F.right,t),paddingLeft:w.scalingValue(F.left,t),paddingTop:w.scalingValue(F.top,t),paddingBottom:w.scalingValue(F.bottom,t)},children:ne==="submitting"?"...":K?q&&a.jsx(Ze,{url:q,className:`${r}-submitBtnIcon`,style:{maxWidth:w.scalingValue(H??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):G})})]}),me==="success"&&a.jsx("p",{className:`${r}-success`,style:{...ye},children:I}),me==="error"&&a.jsx("p",{className:`${r}-error`,style:{...ye},role:"alert",children:fe??ae??S})]})},zl={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"},Hl=["hover","focus","filled","success","error"],Vl=`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,9 +1503,9 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
1503
1503
  };
1504
1504
 
1505
1505
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1506
- `,Nl="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>'),Hl=[{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"}}}},Pl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],jl={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:Hl,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Nl},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:[...Pl],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"]},Ol={element:Wl,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:jl,sourceCode:Ml},Bl="Testimonials-module__marqueeWrapper___CwgXx",Dl="Testimonials-module__marqueeTrack___0eRvh",Ul="Testimonials-module__marqueeSet___Zz-mH",ql="Testimonials-module__wrapper___MSG51",Gl="Testimonials-module__cover___8N6A3",Yl="Testimonials-module__elementsOverlay___ar14y",Xl="Testimonials-module__image___fqDvN",Kl="Testimonials-module__control___ORbH3",Fe={marqueeWrapper:Bl,marqueeTrack:Dl,marqueeSet:Ul,wrapper:ql,cover:Gl,elementsOverlay:Yl,image:Xl,control:Kl},Zl=30,Jl=e=>{if(typeof e=="number")return e;const t=parseFloat(String(e??""));return Number.isFinite(t)?t:0},Ql=e=>({fontSettings:{...e.fontSettings},letterSpacing:e.letterSpacing,wordSpacing:e.wordSpacing,fontSize:e.fontSizeLineHeight.fontSize,lineHeight:e.fontSizeLineHeight.lineHeight,textAppearance:e.textAppearance,color:e.color}),es=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{autoplay:r,align:a,speed:i,direction:c,pauseOnHover:p,gap:g,cardWidth:u,corners:F,stroke:x,strokeColor:f,bgColor:d,padding:m,logoMarginTop:_,logoWidth:S,logoHeight:b,textMinHeight:w,captionMinHeight:j,captionMarginTop:z}=e,C=r==="on",y=C&&!o,L=Math.max(0,Jl(i))*Zl,v=s=>T.scalingValue(s,n??!1),H=P.useRef(null),$=P.useRef(null),V=P.useRef(null),[k,U]=P.useState(0),[O,h]=P.useState(0),I=P.useRef(0),R=P.useRef(!1),E=P.useRef(null),A=y&&p==="on",W=P.useMemo(()=>typeof c=="boolean"?c?"right":"left":String(c??"").trim().toLowerCase()==="right"?"right":"left",[c]),X=P.useRef(W),re=s=>{var xe;const N=(xe=e==null?void 0:e.styles)==null?void 0:xe[s];if(N)return N;const B=s==="text"?"text":"caption",G=e==null?void 0:e[`${B}FontFamily`],Y=e==null?void 0:e[`${B}FontSettings`],Z=e==null?void 0:e[`${B}LetterSpacing`],J=e==null?void 0:e[`${B}WordSpacing`],ne=e==null?void 0:e[`${B}TextAlign`],ie=e==null?void 0:e[`${B}TextAppearance`],ae=(e==null?void 0:e[`${B}Color`])??(s==="text"?e==null?void 0:e.imageCaptionColor:void 0),pe=e==null?void 0:e[`${B}FontSize`],Te=e==null?void 0:e[`${B}LineHeight`];return typeof G=="string"||!!Y||typeof Z=="number"||typeof J=="number"||typeof ne=="string"||!!ie||typeof ae=="string"||typeof pe=="number"||typeof Te=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof G=="string"?G:"Arial",fontWeight:typeof(Y==null?void 0:Y.fontWeight)=="number"?Y.fontWeight:400,fontStyle:typeof(Y==null?void 0:Y.fontStyle)=="string"?Y.fontStyle:"normal"},letterSpacing:typeof Z=="number"?Z:0,wordSpacing:typeof J=="number"?J:0,textAlign:ne==="left"||ne==="center"||ne==="right"?ne:"left",fontSizeLineHeight:{fontSize:typeof pe=="number"?pe:.01,lineHeight:typeof Te=="number"?Te:.01},textAppearance:{textTransform:(ie==null?void 0:ie.textTransform)??"none",textDecoration:(ie==null?void 0:ie.textDecoration)??"none",fontVariant:(ie==null?void 0:ie.fontVariant)??"normal"},color:typeof ae=="string"?ae:"#000000"}:void 0},oe=re("text"),le=re("caption"),M=P.useMemo(()=>!C||(t==null?void 0:t.length)===0?1:O<=0||k<=0?2:Math.max(2,Math.ceil(k/O)+1),[C,t==null?void 0:t.length,O,k]);P.useLayoutEffect(()=>{if(!C)return;const s=H.current,N=V.current;if(!s||!N)return;let B=0;const G=()=>{U(s.getBoundingClientRect().width),h(N.getBoundingClientRect().width)},Y=()=>{cancelAnimationFrame(B),B=requestAnimationFrame(G)};Y();const Z=new ResizeObserver(Y);return Z.observe(s),Z.observe(N),()=>{cancelAnimationFrame(B),Z.disconnect()}},[C,t==null?void 0:t.length]),P.useLayoutEffect(()=>{const s=$.current;if(!C||!s||!y)return;if(O<=0||L<=0){s.style.transform="translate3d(0, 0, 0)";return}X.current!==W&&(I.current=1-I.current,X.current=W);const N=O/L*1e3,B=W==="left"?-O:0,G=W==="left"?0:-O,Y=s.animate([{transform:`translate3d(${B}px, 0, 0)`},{transform:`translate3d(${G}px, 0, 0)`}],{duration:N,iterations:1/0,easing:"linear"});return Y.currentTime=I.current*N,R.current&&Y.pause(),E.current=Y,()=>{const Z=typeof Y.currentTime=="number"?Y.currentTime:0;I.current=N>0?Z/N%1:0,Y.cancel(),E.current===Y&&(E.current=null)}},[C,y,O,L,W]);const Q=()=>{var s;A&&(R.current=!0,(s=E.current)==null||s.pause())},fe=()=>{var s;A&&(R.current=!1,(s=E.current)==null||s.play())},se=P.useMemo(()=>{switch(a){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[a]),ge=P.useMemo(()=>{switch(a){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[a]),be=(s,N,B,G)=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[G!=null&&G.marginTop?l.jsx("div",{"data-controls":G.controlsName,className:Fe.control,style:{width:"100%",height:v(G.marginTop)}}):null,l.jsx("div",{className:Fe.caption,style:{...Ze(Ql(s),n),textAlign:ge,pointerEvents:"auto",...G!=null&&G.minHeight?{minHeight:v(G.minHeight)}:{}},children:l.jsx(Vt,{content:N})})]},B),ze=(s,N)=>{var B,G,Y,Z;return l.jsxs("div",{style:{padding:`${v(m.top)} ${v(m.right)} ${v(m.bottom)} ${v(m.left)}`,width:v(u+x*2),height:"100%",borderRadius:v(F),border:`${v(x)} solid ${f}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[((B=s.image)==null?void 0:B.url)&&l.jsx("img",{className:Fe.image,src:s.image.url,alt:s.image.name,style:{objectFit:s.image.objectFit||"cover",borderRadius:v(F)}}),l.jsx("div",{className:Fe.cover,style:{background:d,height:"100%"}}),l.jsxs("div",{className:Fe.elementsOverlay,style:{display:"flex",flexDirection:"column",pointerEvents:"none",alignItems:se,textAlign:ge},children:[oe&&s.text&&be(oe,s.text,"text",{minHeight:w}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[l.jsx("div",{"data-controls":"logoMarginTop",className:Fe.control,style:{width:"100%",height:v(_)}}),l.jsx("div",{style:{width:v(S),height:v(b)},children:l.jsx("img",{src:(G=s.logo)==null?void 0:G.url,alt:(Y=s.logo)==null?void 0:Y.name,style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Z=s.logo)==null?void 0:Z.objectFit)||"cover"}})})]},"logo"),le&&s.caption&&be(le,s.caption,"caption",{controlsName:"captionMarginTop",marginTop:z,minHeight:j})]})]},N)},q=(s,N,B)=>l.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%"},children:[ze(s,`card-${N}`),n&&!B&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${v(g)})`,width:v(g),height:"100%",pointerEvents:"auto",zIndex:2}})]},N);return C&&(t!=null&&t.length)&&t.length>0?l.jsx("div",{ref:H,className:me(Fe.wrapper,Fe.marqueeWrapper),"aria-label":"Testimonials",children:l.jsx("div",{ref:$,className:Fe.marqueeTrack,onMouseEnter:Q,onMouseLeave:fe,children:Array.from({length:M},(s,N)=>l.jsx("div",{ref:N===0?V:void 0,className:Fe.marqueeSet,style:{gap:v(g),paddingRight:v(g)},"aria-hidden":N>0,children:t==null?void 0:t.map((B,G)=>q(B,`${N}-${G}`,G===((t==null?void 0:t.length)??0)-1))},`set-${N}`))})}):l.jsx("div",{className:Fe.wrapper,children:l.jsx("div",{style:{display:"flex",flexDirection:"row",gap:v(g),justifyContent:"center",overflowX:"auto"},"aria-label":"Testimonials",children:t==null?void 0:t.map((s,N)=>q(s,N,N===((t==null?void 0:t.length)??0)-1))})})},ts=`import { useLayoutEffect, useMemo, useRef, useState } from 'react';
1506
+ `,Nl="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>'),Pl=[{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"}}}},jl=["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:Pl,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Nl},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:[...jl],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"]},Bl={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:Vl},Dl="TestimonialsGrid-module__marqueeWrapper___VC616",Ul="TestimonialsGrid-module__marqueeTrack___U0OTH",Gl="TestimonialsGrid-module__marqueeSet___L7ZdX",ql="TestimonialsGrid-module__wrapper___-JQKm",Yl="TestimonialsGrid-module__cover___3-r73",Xl="TestimonialsGrid-module__elementsOverlay___sSbJp",Kl="TestimonialsGrid-module__control___pD3e4",Oe={marqueeWrapper:Dl,marqueeTrack:Ul,marqueeSet:Gl,wrapper:ql,cover:Yl,elementsOverlay:Xl,control:Kl},Jl=30,Zl=e=>{if(typeof e=="number")return e;const t=parseFloat(String(e??""));return Number.isFinite(t)?t:0},Ql=e=>({fontSettings:{...e.fontSettings},letterSpacing:e.letterSpacing,wordSpacing:e.wordSpacing,fontSize:e.fontSizeLineHeight.fontSize,lineHeight:e.fontSizeLineHeight.lineHeight,textAppearance:e.textAppearance,color:e.color}),es=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{autoplay:r,align:s,speed:i,direction:c,pauseOnHover:p,gap:g,cardWidth:u,corners:L,stroke:v,strokeColor:f,bgColor:d,padding:m,logoMarginTop:_,logoWidth:b,logoHeight:h,textMinHeight:E,captionMinHeight:Y,captionMarginTop:j}=e,C=r==="on",x=C&&!o,R=Math.max(0,Zl(i))*Jl,T=l=>w.scalingValue(l,n??!1),O=k.useRef(null),W=k.useRef(null),H=k.useRef(null),[V,X]=k.useState(0),[D,y]=k.useState(0),M=k.useRef(0),F=k.useRef(!1),I=k.useRef(null),S=x&&p==="on",$=k.useMemo(()=>typeof c=="boolean"?c?"right":"left":String(c??"").trim().toLowerCase()==="right"?"right":"left",[c]),J=k.useRef($),ie=l=>{var Te;const A=(Te=e==null?void 0:e.styles)==null?void 0:Te[l];if(A)return A;const P=l==="text"?"text":"caption",B=e==null?void 0:e[`${P}FontFamily`],G=e==null?void 0:e[`${P}FontSettings`],q=e==null?void 0:e[`${P}LetterSpacing`],K=e==null?void 0:e[`${P}WordSpacing`],te=e==null?void 0:e[`${P}TextAlign`],le=e==null?void 0:e[`${P}TextAppearance`],ce=(e==null?void 0:e[`${P}Color`])??(l==="text"?e==null?void 0:e.textColor:void 0)??(l==="caption"?e==null?void 0:e.captionColor:void 0),de=e==null?void 0:e[`${P}FontSize`],we=e==null?void 0:e[`${P}LineHeight`];return typeof B=="string"||!!G||typeof q=="number"||typeof K=="number"||typeof te=="string"||!!le||typeof ce=="string"||typeof de=="number"||typeof we=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof B=="string"?B:"Arial",fontWeight:typeof(G==null?void 0:G.fontWeight)=="number"?G.fontWeight:400,fontStyle:typeof(G==null?void 0:G.fontStyle)=="string"?G.fontStyle:"normal"},letterSpacing:typeof q=="number"?q:0,wordSpacing:typeof K=="number"?K:0,textAlign:te==="left"||te==="center"||te==="right"?te:"left",fontSizeLineHeight:{fontSize:typeof de=="number"?de:.01,lineHeight:typeof we=="number"?we:.01},textAppearance:{textTransform:(le==null?void 0:le.textTransform)??"none",textDecoration:(le==null?void 0:le.textDecoration)??"none",fontVariant:(le==null?void 0:le.fontVariant)??"normal"},color:typeof ce=="string"?ce:"#000000"}:void 0},ne=ie("text"),se=ie("caption"),z=k.useMemo(()=>!C||(t==null?void 0:t.length)===0?1:D<=0||V<=0?2:Math.max(2,Math.ceil(V/D)+1),[C,t==null?void 0:t.length,D,V]);k.useLayoutEffect(()=>{if(!C)return;const l=O.current,A=H.current;if(!l||!A)return;let P=0;const B=()=>{X(l.getBoundingClientRect().width),y(A.getBoundingClientRect().width)},G=()=>{cancelAnimationFrame(P),P=requestAnimationFrame(B)};G();const q=new ResizeObserver(G);return q.observe(l),q.observe(A),()=>{cancelAnimationFrame(P),q.disconnect()}},[C,t==null?void 0:t.length]),k.useLayoutEffect(()=>{const l=W.current;if(!C||!l||!x)return;if(D<=0||R<=0){l.style.transform="translate3d(0, 0, 0)";return}J.current!==$&&(M.current=1-M.current,J.current=$);const A=D/R*1e3,P=$==="left"?-D:0,B=$==="left"?0:-D,G=l.animate([{transform:`translate3d(${P}px, 0, 0)`},{transform:`translate3d(${B}px, 0, 0)`}],{duration:A,iterations:1/0,easing:"linear"});return G.currentTime=M.current*A,F.current&&G.pause(),I.current=G,()=>{const q=typeof G.currentTime=="number"?G.currentTime:0;M.current=A>0?q/A%1:0,G.cancel(),I.current===G&&(I.current=null)}},[C,x,D,R,$]);const ee=()=>{var l;S&&(F.current=!0,(l=I.current)==null||l.pause())},me=()=>{var l;S&&(F.current=!1,(l=I.current)==null||l.play())},ae=k.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),ue=k.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]),Q=(l,A,P,B)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ae,width:"100%"},children:[a.jsx("div",{"data-controls":B==null?void 0:B.controlsName,"data-controls-axis":"y",className:Oe.control,style:{width:"100%",height:T((B==null?void 0:B.marginTop)??0)}}),a.jsx("div",{style:{...Je(Ql(l),n),textAlign:ue,pointerEvents:"auto",...B!=null&&B.minHeight?{minHeight:T(B.minHeight)}:{}},children:a.jsx(zt,{content:A})})]},P),fe=(l,A)=>{var P,B,G;return a.jsxs("div",{style:{padding:`${T(m.top)} ${T(m.right)} ${T(m.bottom)} ${T(m.left)}`,width:T(u+v*2),height:"100%",borderRadius:T(L),border:`${T(v)} solid ${f}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:Oe.cover,style:{background:d,height:"100%"}}),a.jsxs("div",{className:Oe.elementsOverlay,style:{display:"flex",flexDirection:"column",pointerEvents:"none",alignItems:ae,textAlign:ue},children:[ne&&l.text&&Q(ne,l.text,"text",{minHeight:E}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ae,width:"100%"},children:[a.jsx("div",{"data-controls":"logoMarginTop",className:Oe.control,style:{width:"100%",height:T(_)}}),a.jsx("div",{style:{width:T(b),height:T(h)},children:a.jsx("img",{src:(P=l.logo)==null?void 0:P.url,alt:(B=l.logo)==null?void 0:B.name,style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((G=l.logo)==null?void 0:G.objectFit)||"cover"}})})]},"logo"),se&&l.caption&&Q(se,l.caption,"caption",{controlsName:"captionMarginTop",marginTop:j,minHeight:Y})]})]},A)},N=(l,A,P)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%"},children:[fe(l,`card-${A}`),n&&!P&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${T(g)})`,width:T(g),height:"100%",pointerEvents:"auto",zIndex:2}})]},A);return C&&(t!=null&&t.length)&&t.length>0?a.jsx("div",{ref:O,className:pe(Oe.wrapper,Oe.marqueeWrapper),"aria-label":"Testimonials",children:a.jsx("div",{ref:W,className:Oe.marqueeTrack,onMouseEnter:ee,onMouseLeave:me,children:Array.from({length:z},(l,A)=>a.jsx("div",{ref:A===0?H:void 0,className:Oe.marqueeSet,style:{gap:T(g),paddingRight:T(g)},"aria-hidden":A>0,children:t==null?void 0:t.map((P,B)=>N(P,`${A}-${B}`,B===((t==null?void 0:t.length)??0)-1))},`set-${A}`))})}):a.jsx("div",{className:Oe.wrapper,children:a.jsx("div",{style:{display:"flex",flexDirection:"row",gap:T(g),justifyContent:"center",overflowX:"auto"},"aria-label":"Testimonials",children:t==null?void 0:t.map((l,A)=>N(l,A,A===((t==null?void 0:t.length)??0)-1))})})},ts=`import { useLayoutEffect, useMemo, useRef, useState } from 'react';
1507
1507
  import cn from 'classnames';
1508
- import classes from './Testimonials.module.scss';
1508
+ import classes from './TestimonialsGrid.module.scss';
1509
1509
  import { CommonComponentProps } from '../props';
1510
1510
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
1511
1511
  import { scalingValue } from '../utils/scalingValue';
@@ -1598,7 +1598,8 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1598
1598
  const textAppearance = (settings as any)?.[\`\${prefix}TextAppearance\`];
1599
1599
  const color =
1600
1600
  (settings as any)?.[\`\${prefix}Color\`] ??
1601
- (kind === 'text' ? (settings as any)?.imageCaptionColor : undefined);
1601
+ (kind === 'text' ? (settings as any)?.textColor : undefined) ??
1602
+ (kind === 'caption' ? (settings as any)?.captionColor : undefined);
1602
1603
  const fontSize = (settings as any)?.[\`\${prefix}FontSize\`];
1603
1604
  const lineHeight = (settings as any)?.[\`\${prefix}LineHeight\`];
1604
1605
 
@@ -1756,15 +1757,13 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1756
1757
  width: '100%',
1757
1758
  }}
1758
1759
  >
1759
- {options?.marginTop ? (
1760
- <div
1761
- data-controls={options.controlsName}
1762
- className={classes.control}
1763
- style={{ width: '100%', height: scaled(options.marginTop) }}
1764
- />
1765
- ) : null}
1766
1760
  <div
1767
- className={classes.caption}
1761
+ data-controls={options?.controlsName}
1762
+ data-controls-axis="y"
1763
+ className={classes.control}
1764
+ style={{ width: '100%', height: scaled(options?.marginTop ?? 0) }}
1765
+ />
1766
+ <div
1768
1767
  style={{
1769
1768
  ...textStylesToCss(resolveCaptionTextStyles(style), isEditor),
1770
1769
  textAlign: overlayTextAlign,
@@ -1791,17 +1790,6 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1791
1790
  overflow: 'hidden',
1792
1791
  }}
1793
1792
  >
1794
- {item.image?.url && (
1795
- <img
1796
- className={classes.image}
1797
- src={item.image.url}
1798
- alt={item.image.name}
1799
- style={{
1800
- objectFit: item.image.objectFit || 'cover',
1801
- borderRadius: scaled(corners),
1802
- }}
1803
- />
1804
- )}
1805
1793
  <div
1806
1794
  className={classes.cover}
1807
1795
  style={{background: bgColor,height: '100%'}}
@@ -1925,11 +1913,6 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1925
1913
  };
1926
1914
 
1927
1915
  export type TestimonialsItem = {
1928
- image?: {
1929
- url?: string;
1930
- name?: string;
1931
- objectFit?: 'cover' | 'contain';
1932
- };
1933
1916
  logo?: {
1934
1917
  url?: string;
1935
1918
  name?: string;
@@ -1997,17 +1980,19 @@ type TestimonialsStyles = {
1997
1980
  text: CaptionStyles;
1998
1981
  caption: CaptionStyles;
1999
1982
  };
2000
- `,Ao={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},ns={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:20,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"}},imageCaptionColor:{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"}},textMinHeight:{type:"number",scope:"layout",title:"Quote",min:0,max:300,display:{type:"range-control"}},captionMinHeight:{type:"number",scope:"layout",title:"Caption",min:0,max:300,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:{...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)",imageCaptionColor:"#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,textMinHeight:.01,captionMinHeight:.01,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,textMinHeight:.07,captionMinHeight:.01,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","textMinHeight","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:"Min Height",items:["textMinHeight","captionMinHeight"]},{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:["strokeColor","bgColor","imageCaptionColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},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"]}}},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:[{image:{},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"}]}]},{image:{},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"}]}]},{image:{},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"}]}]}]}},os={element:es,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:ns,sourceCode:ts,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"}]}},rs="Testimonials-module__container___Hxc4p",is="Testimonials-module__wrapper___uBekx",as="Testimonials-module__cover___ZvEoE",ls="Testimonials-module__elementsOverlay___5I51C",ss="Testimonials-module__icon___Cpw7E",cs="Testimonials-module__control___DktvH",ke={container:rs,wrapper:is,cover:as,elementsOverlay:ls,icon:ss,control:cs},ps=({settings:e,content:t,isEditor:n})=>{var b;const o=t||[],{autoplay:r,speed:a,imageWidth:i}=e,c=r==="on",p=e.width??0,g=e.imageMarginTop??0,u=e.textMarginTop??0,F=e.textMinHeight??0,x=e.captionMarginTop??0,f=o[0],d=w=>{var I;const j=(I=e==null?void 0:e.styles)==null?void 0:I[w];if(j)return j;const z=w==="text"?"text":"caption",C=e==null?void 0:e[`${z}FontFamily`],y=e==null?void 0:e[`${z}FontSettings`],L=e==null?void 0:e[`${z}LetterSpacing`],v=e==null?void 0:e[`${z}WordSpacing`],H=e==null?void 0:e[`${z}TextAlign`],$=e==null?void 0:e[`${z}TextAppearance`],V=e==null?void 0:e[`${z}Color`],k=e==null?void 0:e[`${z}FontSize`],U=e==null?void 0:e[`${z}LineHeight`];return typeof C=="string"||!!y||typeof L=="number"||typeof v=="number"||typeof H=="string"||!!$||typeof V=="string"||typeof k=="number"||typeof U=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof C=="string"?C:"Arial",fontWeight:typeof(y==null?void 0:y.fontWeight)=="number"?y.fontWeight:400,fontStyle:typeof(y==null?void 0:y.fontStyle)=="string"?y.fontStyle:"normal"},letterSpacing:typeof L=="number"?L:0,wordSpacing:typeof v=="number"?v:0,textAlign:H==="left"||H==="center"||H==="right"?H:"left",fontSizeLineHeight:{fontSize:typeof k=="number"?k:.01,lineHeight:typeof U=="number"?U:.01},textAppearance:{textTransform:($==null?void 0:$.textTransform)??"none",textDecoration:($==null?void 0:$.textDecoration)??"none",fontVariant:($==null?void 0:$.fontVariant)??"normal"},color:typeof V=="string"?V:"#000000"}:void 0},m=d("text"),_=d("caption"),S=P.useMemo(()=>["text","image","caption"].map((j,z)=>({key:j,order:z})),[]);return f?l.jsx(l.Fragment,{children:l.jsxs("div",{className:ke.container,style:{flexDirection:"column",alignItems:"center"},children:[l.jsx("div",{className:me(ke.wrapper,!c&&ke.wrapperAutoplayOff),style:{width:T.scalingValue(p,n??!1)},children:l.jsxs("div",{style:{width:T.scalingValue(p,n??!1),height:"100%",boxSizing:"border-box",position:"relative"},children:[l.jsx("div",{className:ke.cover}),l.jsx("div",{className:ke.elementsOverlay,style:{display:"flex",flexDirection:"column",inset:0,pointerEvents:"none"},children:S.map(({key:w,order:j})=>{var z,C,y;if(w==="image")return l.jsxs("div",{style:{order:j,zIndex:j},children:[l.jsx("div",{"data-controls":"imageMarginTop",className:ke.control,style:{height:T.scalingValue(g,n??!1)}}),l.jsx("div",{style:{width:"100%"},children:l.jsx("img",{src:(z=f.image)==null?void 0:z.url,alt:(C=f.image)==null?void 0:C.name,className:ke.icon,style:{pointerEvents:"auto",objectFit:((y=f.image)==null?void 0:y.objectFit)||"cover",width:T.scalingValue(i??0,n??!1),height:"100%"}})})]},"image");if(w==="text"&&m){const{widthSettings:L,fontSettings:v,letterSpacing:H,textAlign:$,wordSpacing:V,fontSizeLineHeight:k,textAppearance:U,color:O}=m;return l.jsxs("div",{style:{order:j,zIndex:j},children:[l.jsx("div",{"data-controls":"textMarginTop",className:ke.control,style:{height:T.scalingValue(u,n??!1)}}),l.jsx("div",{"data-styles":"text",className:ke.caption,style:{fontFamily:v.fontFamily,fontWeight:v.fontWeight,fontStyle:v.fontStyle,minHeight:T.scalingValue(F,n??!1),letterSpacing:T.scalingValue(H,n),wordSpacing:T.scalingValue(V,n),textAlign:$,fontSize:T.scalingValue(k.fontSize,n),lineHeight:T.scalingValue(k.lineHeight,n),textTransform:U.textTransform??"none",textDecoration:U.textDecoration??"none",fontVariant:U.fontVariant??"normal",color:O,pointerEvents:"auto"},children:l.jsx(Vt,{content:f.text??[]})})]},"text")}if(w==="caption"&&_){const{widthSettings:L,fontSettings:v,letterSpacing:H,textAlign:$,wordSpacing:V,fontSizeLineHeight:k,textAppearance:U,color:O}=_;return l.jsxs("div",{style:{order:j,zIndex:j},children:[l.jsx("div",{"data-controls":"captionMarginTop",className:ke.control,style:{height:T.scalingValue(x,n??!1)}}),l.jsx("div",{"data-styles":"caption",className:ke.caption,style:{fontFamily:v.fontFamily,fontWeight:v.fontWeight,fontStyle:v.fontStyle,minHeight:0,letterSpacing:T.scalingValue(H,n),wordSpacing:T.scalingValue(V,n),textAlign:$,fontSize:T.scalingValue(k.fontSize,n),lineHeight:T.scalingValue(k.lineHeight,n),textTransform:U.textTransform??"none",textDecoration:U.textDecoration??"none",fontVariant:U.fontVariant??"normal",color:O,pointerEvents:"auto"},children:l.jsx(Vt,{content:f.caption})})]},"caption")}return null})})]})}),((b=e.controls)==null?void 0:b.isActive)==="visible"&&e.autoplay==="off"&&l.jsx("div",{children:"Controls"})]})}):l.jsx(l.Fragment,{})},us=`import cn from 'classnames';
2001
- import { useMemo } from 'react';
2002
- import classes from './Testimonials.module.scss';
1983
+ `,Ao={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},ns={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"}},textMinHeight:{type:"number",scope:"layout",title:"Quote",min:0,max:300,display:{type:"range-control"}},captionMinHeight:{type:"number",scope:"layout",title:"Caption",min:0,max:300,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:{...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,textMinHeight:.01,captionMinHeight:.01,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,textMinHeight:.07,captionMinHeight:.01,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","textMinHeight","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:"Min Height",items:["textMinHeight","captionMinHeight"]},{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"}]}]}]}},os={element:es,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:ns,sourceCode:ts,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"}]}},rs="TestimonialSingle-module__container___YKr4M",is="TestimonialSingle-module__wrapper___hUgOd",as="TestimonialSingle-module__wrapperAutoplayOff___dgrHY",ls="TestimonialSingle-module__elementsOverlay___2QyBb",ss="TestimonialSingle-module__fadeStack___Ye77N",cs="TestimonialSingle-module__fadeItemPrev___dQn4-",ps="TestimonialSingle-module__fadeItemCurrent___intAh",us="TestimonialSingle-module__fadeIn___mnR5D",ds="TestimonialSingle-module__fadeOut___WiXP1",gs="TestimonialSingle-module__icon___qH8ha",ms="TestimonialSingle-module__controls___0dIZ-",fs="TestimonialSingle-module__arrow___sVKUw",ys="TestimonialSingle-module__nextArrow___U31Ty",hs="TestimonialSingle-module__arrowInner___tep0d",vs="TestimonialSingle-module__arrowIcon___FpxdE",bs="TestimonialSingle-module__arrowImg___8JHHQ",xs="TestimonialSingle-module__mirror___kWPu-",Ss="TestimonialSingle-module__control___RwzDc",he={container:rs,wrapper:is,wrapperAutoplayOff:as,elementsOverlay:ls,fadeStack:ss,fadeItemPrev:cs,fadeItemCurrent:ps,fadeIn:us,fadeOut:ds,icon:gs,controls:ms,arrow:fs,nextArrow:ys,arrowInner:hs,arrowIcon:vs,arrowImg:bs,mirror:xs,control:Ss},Cs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const r=t||[],{autoplay:s,speed:i,align:c,imageWidth:p,imageHeight:g,controlsWidth:u,controlsColor:L,controlsHoverColor:v,textMinHeight:f,captionMinHeight:d}=e,m=(()=>{const Q=s;if(typeof Q=="boolean")return Q;if(typeof Q=="string"){const fe=Q.trim().toLowerCase();return fe==="on"||fe==="true"}return!1})(),_=m&&!o,b=e.width??0,h=e.imageMarginTop??0,E=e.captionMarginTop??0,Y=e.textMarginTop??0,[j,C]=k.useState(0),[x,R]=k.useState(null),[T,O]=k.useState(!1),W=k.useRef(null),H=k.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),V=k.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);k.useEffect(()=>{C(0),R(null),O(!1)},[r.length]);const X=r[j],D=x===null?null:r[x],y=Q=>{var we;const fe=(we=e==null?void 0:e.styles)==null?void 0:we[Q];if(fe)return fe;const N=Q==="text"?"text":"caption",l=e==null?void 0:e[`${N}FontFamily`],A=e==null?void 0:e[`${N}FontSettings`],P=e==null?void 0:e[`${N}LetterSpacing`],B=e==null?void 0:e[`${N}WordSpacing`],G=e==null?void 0:e[`${N}TextAlign`],q=e==null?void 0:e[`${N}TextAppearance`],K=e==null?void 0:e[`${N}Color`],te=e==null?void 0:e[`${N}FontSize`],le=e==null?void 0:e[`${N}LineHeight`];return typeof l=="string"||!!A||typeof P=="number"||typeof B=="number"||typeof G=="string"||!!q||typeof K=="string"||typeof te=="number"||typeof le=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof l=="string"?l:"Arial",fontWeight:typeof(A==null?void 0:A.fontWeight)=="number"?A.fontWeight:400,fontStyle:typeof(A==null?void 0:A.fontStyle)=="string"?A.fontStyle:"normal"},letterSpacing:typeof P=="number"?P:0,wordSpacing:typeof B=="number"?B:0,textAlign:G==="left"||G==="center"||G==="right"?G:"left",fontSizeLineHeight:{fontSize:typeof te=="number"?te:.01,lineHeight:typeof le=="number"?le:.01},textAppearance:{textTransform:(q==null?void 0:q.textTransform)??"none",textDecoration:(q==null?void 0:q.textDecoration)??"none",fontVariant:(q==null?void 0:q.fontVariant)??"normal"},color:typeof K=="string"?K:"#000000"}:void 0},M=y("text"),F=y("caption");if(!X)return a.jsx(a.Fragment,{});const I=Q=>w.scalingValue(Q,n??!1),S=r.length>1,$=k.useCallback((Q,fe)=>!S||fe===Q?Q:(W.current&&window.clearTimeout(W.current),R(Q),O(!0),W.current=window.setTimeout(()=>{R(null),O(!1),W.current=null},300),fe),[S]);k.useCallback(Q=>{C(fe=>$(fe,Q))},[$]);const J=k.useCallback(()=>{S&&C(Q=>$(Q,(Q-1+r.length)%r.length))},[S,$,r.length]),ie=k.useCallback(()=>{S&&C(Q=>$(Q,(Q+1)%r.length))},[S,$,r.length]);k.useEffect(()=>{if(!_||!S)return;const Q=typeof i=="number"&&Number.isFinite(i)?i:0,fe=Math.max(.1,Q)*1e3,N=window.setInterval(()=>{C(l=>$(l,(l+1)%r.length))},fe);return()=>{window.clearInterval(N)}},[_,S,$,r.length,i]),k.useEffect(()=>()=>{W.current&&window.clearTimeout(W.current)},[]);const ne=e.controls??{isActive:"visible",arrowsImgUrl:null},se=ne.mode,ee=(ne.isActive==="visible"||se==="On")&&S,me=k.useMemo(()=>I(.01),[n]),ae=k.useMemo(()=>w.scalingValue(u??.02,n??!1),[u,n]),ue=k.useCallback(Q=>a.jsx(a.Fragment,{children:["text","image","caption"].map(fe=>{var N,l,A;if(fe==="image")return a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:H,width:"100%"},children:[a.jsx("div",{"data-controls":"imageMarginTop",className:he.control,style:{height:w.scalingValue(h,n??!1),width:"100%"}}),a.jsx("img",{src:(N=Q.image)==null?void 0:N.url,alt:(l=Q.image)==null?void 0:l.name,className:he.icon,style:{pointerEvents:"auto",objectFit:((A=Q.image)==null?void 0:A.objectFit)||"cover",width:w.scalingValue(p??0,n??!1),height:w.scalingValue(g??0,n??!1)}})]},"image");if(fe==="text"&&M){const{fontSettings:P,letterSpacing:B,wordSpacing:G,fontSizeLineHeight:q,textAppearance:K,color:te}=M;return a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:H,width:"100%"},children:[a.jsx("div",{"data-controls":"textMarginTop",className:he.control,style:{height:w.scalingValue(Y,n??!1),width:"100%"}}),a.jsx("div",{style:{fontFamily:P.fontFamily,fontWeight:P.fontWeight,fontStyle:P.fontStyle,minHeight:w.scalingValue(f??0,n??!1),letterSpacing:w.scalingValue(B,n),wordSpacing:w.scalingValue(G,n),textAlign:V,fontSize:w.scalingValue(q.fontSize,n),lineHeight:w.scalingValue(q.lineHeight,n),textTransform:K.textTransform??"none",textDecoration:K.textDecoration??"none",fontVariant:K.fontVariant??"normal",color:te,pointerEvents:"auto"},children:a.jsx(zt,{content:Q.text??[]})})]},"text")}if(fe==="caption"&&F){const{fontSettings:P,letterSpacing:B,wordSpacing:G,fontSizeLineHeight:q,textAppearance:K,color:te}=F;return a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:H,width:"100%"},children:[a.jsx("div",{"data-controls":"captionMarginTop",className:he.control,style:{height:w.scalingValue(E,n??!1),width:"100%"}}),a.jsx("div",{style:{fontFamily:P.fontFamily,fontWeight:P.fontWeight,fontStyle:P.fontStyle,minHeight:w.scalingValue(d??0,n??!1),letterSpacing:w.scalingValue(B,n),wordSpacing:w.scalingValue(G,n),textAlign:V,fontSize:w.scalingValue(q.fontSize,n),lineHeight:w.scalingValue(q.lineHeight,n),textTransform:K.textTransform??"none",textDecoration:K.textDecoration??"none",fontVariant:K.fontVariant??"normal",color:te,pointerEvents:"auto"},children:a.jsx(zt,{content:Q.caption})})]},"caption")}return null})}),[E,F,h,p,g,n,H,V,f,M]);return a.jsx(a.Fragment,{children:a.jsxs("div",{className:he.container,style:{flexDirection:"column",alignItems:"center"},children:[a.jsx("div",{className:pe(he.elementsOverlay,he.wrapper,!m&&he.wrapperAutoplayOff),style:{width:w.scalingValue(b,n??!1),display:"flex",flexDirection:"column",alignItems:H,inset:0,pointerEvents:"none",height:"100%",boxSizing:"border-box",position:"relative"},children:a.jsxs("div",{className:he.fadeStack,children:[D&&T&&a.jsx("div",{className:pe(he.fadeItemPrev,he.fadeOut),children:ue(D)}),a.jsx("div",{className:pe(he.fadeItemCurrent,T?he.fadeIn:void 0),children:ue(X)})]})}),ee&&a.jsxs("div",{className:he.controls,style:{position:"absolute",inset:0,pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:me,paddingRight:me},children:[a.jsx("div",{className:he.arrow,style:{pointerEvents:"auto",width:ae,height:ae,"--arrow-hover-color":v},children:a.jsx("button",{type:"button",className:he.arrowInner,onClick:J,"aria-label":"Previous testimonial",style:{pointerEvents:"auto"},children:ne.arrowsImgUrl?a.jsx(Ze,{url:ne.arrowsImgUrl,fill:L,hoverFill:v,className:pe(he.arrowImg,he.mirror)}):a.jsx(Io,{color:L,className:pe(he.arrowIcon,he.arrowImg,he.mirror)})})}),a.jsx("div",{className:pe(he.arrow,he.nextArrow),style:{pointerEvents:"auto",width:ae,height:ae,"--arrow-hover-color":v},children:a.jsx("button",{type:"button",className:he.arrowInner,onClick:ie,"aria-label":"Next testimonial",style:{pointerEvents:"auto"},children:ne.arrowsImgUrl?a.jsx(Ze,{url:ne.arrowsImgUrl,fill:L,hoverFill:v,className:he.arrowImg}):a.jsx(Io,{color:L,className:pe(he.arrowIcon,he.arrowImg)})})})]})]})})},Io=({color:e,className:t})=>a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{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",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})}),ws=`import cn from 'classnames';
1984
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
1985
+ import classes from './TestimonialSingle.module.scss';
2003
1986
  import { CommonComponentProps } from '../props';
2004
1987
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
2005
1988
  import { scalingValue } from '../utils/scalingValue';
1989
+ import { SvgImage } from '../helpers/SvgImage/SvgImage';
2006
1990
 
2007
1991
  type TestimonialsProps = {
2008
1992
  settings: TestimonialsSettings;
2009
1993
  content?: TestimonialsItem[];
2010
1994
  isEditor?: boolean;
1995
+ isPreviewMode?: boolean;
2011
1996
  } & CommonComponentProps;
2012
1997
 
2013
1998
  type CaptionStyleFromFlatSettings = {
@@ -2035,18 +2020,62 @@ type CaptionStyleFromFlatSettings = {
2035
2020
  color: string;
2036
2021
  };
2037
2022
 
2038
- export const TestimonialSingle = ({ settings, content, isEditor }: TestimonialsProps) => {
2023
+ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }: TestimonialsProps) => {
2039
2024
  const items = content || [];
2040
- const { autoplay, speed, imageWidth } = settings;
2041
- const isAutoplay = autoplay === 'on';
2025
+ const { autoplay, speed, align, imageWidth, imageHeight, controlsWidth, controlsColor, controlsHoverColor, textMinHeight, captionMinHeight } = settings;
2026
+ const isAutoplay = (() => {
2027
+ const v = autoplay as unknown;
2028
+ if (typeof v === 'boolean') return v;
2029
+ if (typeof v === 'string') {
2030
+ const s = v.trim().toLowerCase();
2031
+ return s === 'on' || s === 'true';
2032
+ }
2033
+ return false;
2034
+ })();
2035
+ const isAnimating = isAutoplay && !isPreviewMode;
2042
2036
 
2043
2037
  const cardWidth = settings.width ?? 0;
2044
2038
  const imageMarginTop = settings.imageMarginTop ?? 0;
2045
- const textMarginTop = settings.textMarginTop ?? 0;
2046
- const textMinHeight = settings.textMinHeight ?? 0;
2047
2039
  const captionMarginTop = settings.captionMarginTop ?? 0;
2040
+ const textMarginTop = settings.textMarginTop ?? 0;
2048
2041
 
2049
- const item = items[0];
2042
+ const [activeIndex, setActiveIndex] = useState(0);
2043
+ const [prevIndex, setPrevIndex] = useState<number | null>(null);
2044
+ const [isFading, setIsFading] = useState(false);
2045
+ const fadeTimerRef = useRef<number | null>(null);
2046
+
2047
+ const overlayAlignItems = useMemo(() => {
2048
+ switch (align) {
2049
+ case 'center':
2050
+ return 'center' as const;
2051
+ case 'end':
2052
+ return 'flex-end' as const;
2053
+ case 'start':
2054
+ default:
2055
+ return 'flex-start' as const;
2056
+ }
2057
+ }, [align]);
2058
+
2059
+ const overlayTextAlign = useMemo(() => {
2060
+ switch (align) {
2061
+ case 'center':
2062
+ return 'center' as const;
2063
+ case 'end':
2064
+ return 'right' as const;
2065
+ case 'start':
2066
+ default:
2067
+ return 'left' as const;
2068
+ }
2069
+ }, [align]);
2070
+
2071
+ useEffect(() => {
2072
+ setActiveIndex(0);
2073
+ setPrevIndex(null);
2074
+ setIsFading(false);
2075
+ }, [items.length]);
2076
+
2077
+ const currentItem = items[activeIndex];
2078
+ const previousItem = prevIndex === null ? null : items[prevIndex];
2050
2079
 
2051
2080
  const resolveCaptionStyle = (
2052
2081
  kind: 'text' | 'caption'
@@ -2104,12 +2133,209 @@ export const TestimonialSingle = ({ settings, content, isEditor }: TestimonialsP
2104
2133
 
2105
2134
  const textStyle = resolveCaptionStyle('text');
2106
2135
  const captionStyle = resolveCaptionStyle('caption');
2107
- const elementOrder = useMemo(() => {
2108
- const order: ElementOrderKey[] = ['text', 'image', 'caption'];
2109
- return order.map((key, index: number) => ({ key, order: index }));
2136
+
2137
+ if (!currentItem) return <></>;
2138
+
2139
+ const scaled = (v: number) => scalingValue(v, isEditor ?? false);
2140
+
2141
+ const canSwitch = items.length > 1;
2142
+ const commitTransition = useCallback((currentIndex: number, nextIndex: number) => {
2143
+ if (!canSwitch) return currentIndex;
2144
+ if (nextIndex === currentIndex) return currentIndex;
2145
+ if (fadeTimerRef.current) window.clearTimeout(fadeTimerRef.current);
2146
+ setPrevIndex(currentIndex);
2147
+ setIsFading(true);
2148
+ fadeTimerRef.current = window.setTimeout(() => {
2149
+ setPrevIndex(null);
2150
+ setIsFading(false);
2151
+ fadeTimerRef.current = null;
2152
+ }, 300);
2153
+ return nextIndex;
2154
+ }, [canSwitch]);
2155
+
2156
+ const transitionToIndex = useCallback((nextIndex: number) => {
2157
+ setActiveIndex((currentIndex) => commitTransition(currentIndex, nextIndex));
2158
+ }, [commitTransition]);
2159
+
2160
+ const goPrev = useCallback(() => {
2161
+ if (!canSwitch) return;
2162
+ setActiveIndex((currentIndex) => commitTransition(currentIndex, (currentIndex - 1 + items.length) % items.length));
2163
+ }, [canSwitch, commitTransition, items.length]);
2164
+
2165
+ const goNext = useCallback(() => {
2166
+ if (!canSwitch) return;
2167
+ setActiveIndex((currentIndex) => commitTransition(currentIndex, (currentIndex + 1) % items.length));
2168
+ }, [canSwitch, commitTransition, items.length]);
2169
+
2170
+ useEffect(() => {
2171
+ if (!isAnimating || !canSwitch) return;
2172
+ const speedSeconds = typeof speed === 'number' && Number.isFinite(speed) ? speed : 0;
2173
+ const intervalMs = Math.max(0.1, speedSeconds) * 1000;
2174
+ const id = window.setInterval(() => {
2175
+ setActiveIndex((currentIndex) => commitTransition(currentIndex, (currentIndex + 1) % items.length));
2176
+ }, intervalMs);
2177
+ return () => {
2178
+ window.clearInterval(id);
2179
+ };
2180
+ }, [isAnimating, canSwitch, commitTransition, items.length, speed]);
2181
+
2182
+ useEffect(() => {
2183
+ return () => {
2184
+ if (fadeTimerRef.current) window.clearTimeout(fadeTimerRef.current);
2185
+ };
2110
2186
  }, []);
2111
2187
 
2112
- if (!item) return <></>;
2188
+ const controls: TestimonialsSettings['controls'] = settings.controls ?? {
2189
+ isActive: 'visible',
2190
+ arrowsImgUrl: null,
2191
+ align: 'bottom-center',
2192
+ gap: 0.01,
2193
+ scale: 100,
2194
+ color: '#FFFFFF',
2195
+ hover: '#EABC01',
2196
+ };
2197
+
2198
+ const controlsMode = (controls as unknown as { mode?: string }).mode;
2199
+ const isControlsVisible =
2200
+ controls.isActive === 'visible' ||
2201
+ controlsMode === 'On';
2202
+ const showControls = isControlsVisible && canSwitch;
2203
+ const controlsInsetX = useMemo(() => scaled(0.01), [isEditor]);
2204
+ const controlsIconSize = useMemo(
2205
+ () => scalingValue(controlsWidth ?? 0.02, isEditor ?? false),
2206
+ [controlsWidth, isEditor]
2207
+ );
2208
+
2209
+ const renderItemContent = useCallback((item: TestimonialsItem) => {
2210
+ return (
2211
+ <>
2212
+ {['text', 'image', 'caption'].map((key: string) => {
2213
+ if (key === 'image') {
2214
+ return (
2215
+ <div
2216
+ key="image"
2217
+ style={{
2218
+ display: 'flex',
2219
+ flexDirection: 'column',
2220
+ alignItems: overlayAlignItems,
2221
+ width: '100%',
2222
+ }}
2223
+ >
2224
+ <div
2225
+ data-controls="imageMarginTop"
2226
+ className={classes.control}
2227
+ style={{ height: scalingValue(imageMarginTop, isEditor ?? false), width: '100%' }}
2228
+ />
2229
+ <img
2230
+ src={item.image?.url}
2231
+ alt={item.image?.name}
2232
+ className={classes.icon}
2233
+ style={{
2234
+ pointerEvents: 'auto',
2235
+ objectFit: item.image?.objectFit || 'cover',
2236
+ width: scalingValue(imageWidth ?? 0, isEditor ?? false),
2237
+ height: scalingValue(imageHeight ?? 0, isEditor ?? false),
2238
+ }}
2239
+ />
2240
+ </div>
2241
+ );
2242
+ }
2243
+ if (key === 'text' && textStyle) {
2244
+ const { fontSettings, letterSpacing, wordSpacing, fontSizeLineHeight, textAppearance, color } = textStyle;
2245
+ return (
2246
+ <div
2247
+ key="text"
2248
+ style={{
2249
+ display: 'flex',
2250
+ flexDirection: 'column',
2251
+ alignItems: overlayAlignItems,
2252
+ width: '100%',
2253
+ }}
2254
+ >
2255
+ <div
2256
+ data-controls="textMarginTop"
2257
+ className={classes.control}
2258
+ style={{ height: scalingValue(textMarginTop, isEditor ?? false), width: '100%' }}
2259
+ />
2260
+ <div
2261
+ style={{
2262
+ fontFamily: fontSettings.fontFamily,
2263
+ fontWeight: fontSettings.fontWeight,
2264
+ fontStyle: fontSettings.fontStyle,
2265
+ minHeight: scalingValue(textMinHeight ?? 0, isEditor ?? false),
2266
+ letterSpacing: scalingValue(letterSpacing, isEditor),
2267
+ wordSpacing: scalingValue(wordSpacing, isEditor),
2268
+ textAlign: overlayTextAlign,
2269
+ fontSize: scalingValue(fontSizeLineHeight.fontSize, isEditor),
2270
+ lineHeight: scalingValue(fontSizeLineHeight.lineHeight, isEditor),
2271
+ textTransform: textAppearance.textTransform ?? 'none',
2272
+ textDecoration: textAppearance.textDecoration ?? 'none',
2273
+ fontVariant: textAppearance.fontVariant ?? 'normal',
2274
+ color,
2275
+ pointerEvents: 'auto',
2276
+ }}
2277
+ >
2278
+ <RichTextRenderer content={item.text ?? []} />
2279
+ </div>
2280
+ </div>
2281
+ );
2282
+ }
2283
+ if (key === 'caption' && captionStyle) {
2284
+ const { fontSettings, letterSpacing, wordSpacing, fontSizeLineHeight, textAppearance, color } = captionStyle;
2285
+ return (
2286
+ <div
2287
+ key="caption"
2288
+ style={{
2289
+ display: 'flex',
2290
+ flexDirection: 'column',
2291
+ alignItems: overlayAlignItems,
2292
+ width: '100%',
2293
+ }}
2294
+ >
2295
+ <div
2296
+ data-controls="captionMarginTop"
2297
+ className={classes.control}
2298
+ style={{ height: scalingValue(captionMarginTop, isEditor ?? false), width: '100%' }}
2299
+ />
2300
+ <div
2301
+ style={{
2302
+ fontFamily: fontSettings.fontFamily,
2303
+ fontWeight: fontSettings.fontWeight,
2304
+ fontStyle: fontSettings.fontStyle,
2305
+ minHeight: scalingValue(captionMinHeight ?? 0, isEditor ?? false),
2306
+ letterSpacing: scalingValue(letterSpacing, isEditor),
2307
+ wordSpacing: scalingValue(wordSpacing, isEditor),
2308
+ textAlign: overlayTextAlign,
2309
+ fontSize: scalingValue(fontSizeLineHeight.fontSize, isEditor),
2310
+ lineHeight: scalingValue(fontSizeLineHeight.lineHeight, isEditor),
2311
+ textTransform: textAppearance.textTransform ?? 'none',
2312
+ textDecoration: textAppearance.textDecoration ?? 'none',
2313
+ fontVariant: textAppearance.fontVariant ?? 'normal',
2314
+ color,
2315
+ pointerEvents: 'auto',
2316
+ }}
2317
+ >
2318
+ <RichTextRenderer content={item.caption} />
2319
+ </div>
2320
+ </div>
2321
+ );
2322
+ }
2323
+ return null;
2324
+ })}
2325
+ </>
2326
+ );
2327
+ }, [
2328
+ captionMarginTop,
2329
+ captionStyle,
2330
+ imageMarginTop,
2331
+ imageWidth,
2332
+ imageHeight,
2333
+ isEditor,
2334
+ overlayAlignItems,
2335
+ overlayTextAlign,
2336
+ textMinHeight,
2337
+ textStyle,
2338
+ ]);
2113
2339
 
2114
2340
  return (
2115
2341
  <>
@@ -2121,138 +2347,121 @@ export const TestimonialSingle = ({ settings, content, isEditor }: TestimonialsP
2121
2347
  }}
2122
2348
  >
2123
2349
  <div
2124
- className={cn(classes.wrapper, !isAutoplay && classes.wrapperAutoplayOff)}
2350
+ className={cn(classes.elementsOverlay, classes.wrapper, !isAutoplay && classes.wrapperAutoplayOff)}
2125
2351
  style={{
2126
2352
  width: scalingValue(cardWidth, isEditor ?? false),
2353
+ display: 'flex',
2354
+ flexDirection: 'column',
2355
+ alignItems: overlayAlignItems,
2356
+ inset: 0,
2357
+ pointerEvents: 'none',
2358
+ height: '100%',
2359
+ boxSizing: 'border-box',
2360
+ position: 'relative',
2127
2361
  }}
2128
2362
  >
2363
+ <div className={classes.fadeStack}>
2364
+ {previousItem && isFading && (
2365
+ <div className={cn(classes.fadeItemPrev, classes.fadeOut)}>
2366
+ {renderItemContent(previousItem)}
2367
+ </div>
2368
+ )}
2369
+ <div className={cn(classes.fadeItemCurrent, isFading ? classes.fadeIn : undefined)}>
2370
+ {renderItemContent(currentItem)}
2371
+ </div>
2372
+ </div>
2373
+ </div>
2374
+ {showControls && (
2129
2375
  <div
2376
+ className={classes.controls}
2130
2377
  style={{
2131
- width: scalingValue(cardWidth, isEditor ?? false),
2132
- height: '100%',
2133
- boxSizing: 'border-box',
2134
- position: 'relative',
2378
+ position: 'absolute',
2379
+ inset: 0,
2380
+ pointerEvents: 'none',
2381
+ display: 'flex',
2382
+ alignItems: 'center',
2383
+ justifyContent: 'space-between',
2384
+ paddingLeft: controlsInsetX,
2385
+ paddingRight: controlsInsetX,
2135
2386
  }}
2136
2387
  >
2137
- <div className={classes.cover} />
2138
2388
  <div
2139
- className={classes.elementsOverlay}
2389
+ className={classes.arrow}
2140
2390
  style={{
2141
- display: 'flex',
2142
- flexDirection: 'column',
2143
- inset: 0,
2144
- pointerEvents: 'none',
2391
+ pointerEvents: 'auto',
2392
+ width: controlsIconSize,
2393
+ height: controlsIconSize,
2394
+ ['--arrow-hover-color' as string]: controlsHoverColor,
2145
2395
  }}
2146
2396
  >
2147
- {elementOrder.map(({ key, order: orderIndex }: { key: ElementOrderKey, order: number }) => {
2148
- if (key === 'image') {
2149
- return (
2150
- <div key="image" style={{ order: orderIndex, zIndex: orderIndex }}>
2151
- <div
2152
- data-controls="imageMarginTop"
2153
- className={classes.control}
2154
- style={{ height: scalingValue(imageMarginTop, isEditor ?? false) }}
2155
- />
2156
- <div style={{ width: '100%'}}>
2157
- <img
2158
- src={item.image?.url}
2159
- alt={item.image?.name}
2160
- className={classes.icon}
2161
- style={{
2162
- pointerEvents: 'auto',
2163
- objectFit: item.image?.objectFit || 'cover',
2164
- width: scalingValue(imageWidth ?? 0, isEditor ?? false),
2165
- height: '100%',
2166
- }}
2167
- />
2168
- </div>
2169
- </div>
2170
- );
2171
- }
2172
- if (key === 'text' && textStyle) {
2173
- const { widthSettings, fontSettings, letterSpacing, textAlign, wordSpacing, fontSizeLineHeight, textAppearance, color } =
2174
- textStyle;
2175
- return (
2176
- <div key="text" style={{ order: orderIndex, zIndex: orderIndex }}>
2177
- <div
2178
- data-controls="textMarginTop"
2179
- className={classes.control}
2180
- style={{ height: scalingValue(textMarginTop, isEditor ?? false) }}
2181
- />
2182
- <div
2183
- data-styles="text"
2184
- className={classes.caption}
2185
- style={{
2186
- fontFamily: fontSettings.fontFamily,
2187
- fontWeight: fontSettings.fontWeight,
2188
- fontStyle: fontSettings.fontStyle,
2189
- minHeight: scalingValue(textMinHeight, isEditor ?? false),
2190
- letterSpacing: scalingValue(letterSpacing, isEditor),
2191
- wordSpacing: scalingValue(wordSpacing, isEditor),
2192
- textAlign,
2193
- fontSize: scalingValue(fontSizeLineHeight.fontSize, isEditor),
2194
- lineHeight: scalingValue(fontSizeLineHeight.lineHeight, isEditor),
2195
- textTransform: textAppearance.textTransform ?? 'none',
2196
- textDecoration: textAppearance.textDecoration ?? 'none',
2197
- fontVariant: textAppearance.fontVariant ?? 'normal',
2198
- color,
2199
- pointerEvents: 'auto'
2200
- }}
2201
- >
2202
- <RichTextRenderer content={item.text ?? []} />
2203
- </div>
2204
- </div>
2205
- );
2206
- }
2207
- if (key === 'caption' && captionStyle) {
2208
- const { widthSettings, fontSettings, letterSpacing, textAlign, wordSpacing, fontSizeLineHeight, textAppearance, color } =
2209
- captionStyle;
2210
- return (
2211
- <div key="caption" style={{ order: orderIndex, zIndex: orderIndex }}>
2212
- <div
2213
- data-controls="captionMarginTop"
2214
- className={classes.control}
2215
- style={{ height: scalingValue(captionMarginTop, isEditor ?? false) }}
2216
- />
2217
- <div
2218
- data-styles="caption"
2219
- className={classes.caption}
2220
- style={{
2221
- fontFamily: fontSettings.fontFamily,
2222
- fontWeight: fontSettings.fontWeight,
2223
- fontStyle: fontSettings.fontStyle,
2224
- minHeight: 0,
2225
- letterSpacing: scalingValue(letterSpacing, isEditor),
2226
- wordSpacing: scalingValue(wordSpacing, isEditor),
2227
- textAlign,
2228
- fontSize: scalingValue(fontSizeLineHeight.fontSize, isEditor),
2229
- lineHeight: scalingValue(fontSizeLineHeight.lineHeight, isEditor),
2230
- textTransform: textAppearance.textTransform ?? 'none',
2231
- textDecoration: textAppearance.textDecoration ?? 'none',
2232
- fontVariant: textAppearance.fontVariant ?? 'normal',
2233
- color,
2234
- pointerEvents: 'auto'
2235
- }}
2236
- >
2237
- <RichTextRenderer content={item.caption} />
2238
- </div>
2239
- </div>
2240
- );
2241
- }
2242
- return null;
2243
- })}
2397
+ <button
2398
+ type="button"
2399
+ className={classes.arrowInner}
2400
+ onClick={goPrev}
2401
+ aria-label="Previous testimonial"
2402
+ style={{ pointerEvents: 'auto' }}
2403
+ >
2404
+ {controls.arrowsImgUrl ? (
2405
+ <SvgImage
2406
+ url={controls.arrowsImgUrl}
2407
+ fill={controlsColor}
2408
+ hoverFill={controlsHoverColor}
2409
+ className={cn(classes.arrowImg, classes.mirror)}
2410
+ />
2411
+ ) : (
2412
+ <ArrowIcon color={controlsColor} className={cn(classes.arrowIcon, classes.arrowImg, classes.mirror)} />
2413
+ )}
2414
+ </button>
2415
+ </div>
2416
+ <div
2417
+ className={cn(classes.arrow, classes.nextArrow)}
2418
+ style={{
2419
+ pointerEvents: 'auto',
2420
+ width: controlsIconSize,
2421
+ height: controlsIconSize,
2422
+ ['--arrow-hover-color' as string]: controlsHoverColor,
2423
+ }}
2424
+ >
2425
+ <button
2426
+ type="button"
2427
+ className={classes.arrowInner}
2428
+ onClick={goNext}
2429
+ aria-label="Next testimonial"
2430
+ style={{ pointerEvents: 'auto' }}
2431
+ >
2432
+ {controls.arrowsImgUrl ? (
2433
+ <SvgImage
2434
+ url={controls.arrowsImgUrl}
2435
+ fill={controlsColor}
2436
+ hoverFill={controlsHoverColor}
2437
+ className={classes.arrowImg}
2438
+ />
2439
+ ) : (
2440
+ <ArrowIcon color={controlsColor} className={cn(classes.arrowIcon, classes.arrowImg)} />
2441
+ )}
2442
+ </button>
2244
2443
  </div>
2245
2444
  </div>
2246
- </div>
2247
- {settings.controls?.isActive === 'visible' && settings.autoplay === 'off' && (
2248
- // TODO: Add controls
2249
- <div>Controls</div>
2250
2445
  )}
2251
2446
  </div>
2252
2447
  </>
2253
2448
  );
2254
2449
  };
2255
2450
 
2451
+ const ArrowIcon = ({ color, className }: { color: string; className: string }) => {
2452
+ return (
2453
+ <svg viewBox="0 0 10 18" className={className}>
2454
+ <g stroke="none" strokeWidth="1" fillRule="evenodd">
2455
+ <path
2456
+ 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"
2457
+ fill={color}
2458
+ transform="translate(5, 9) rotate(-90) translate(-5, -9)"
2459
+ />
2460
+ </g>
2461
+ </svg>
2462
+ );
2463
+ };
2464
+
2256
2465
  export type TestimonialsItem = {
2257
2466
  image?: {
2258
2467
  url?: string;
@@ -2273,21 +2482,24 @@ type Padding = {
2273
2482
  type TestimonialsSettings = {
2274
2483
  autoplay: 'on' | 'off';
2275
2484
  speed: number;
2485
+ delay: number;
2486
+ align: 'start' | 'center' | 'end';
2276
2487
  width: number;
2277
2488
  imageMarginTop?: number;
2278
2489
  imageWidth?: number;
2279
- textMarginTop?: number;
2490
+ imageHeight?: number;
2280
2491
  textMinHeight?: number;
2492
+ textMarginTop?: number;
2493
+ captionMinHeight?: number;
2281
2494
  captionMarginTop?: number;
2282
2495
  styles: TestimonialsStyles;
2496
+ controlsColor: string;
2497
+ controlsHoverColor: string;
2498
+ controlsWidth?: number;
2283
2499
  controls: {
2284
2500
  isActive: 'visible' | 'hidden';
2285
2501
  arrowsImgUrl: string | null;
2286
- align: 'top-center' | 'top-left' | 'top-right' | 'bottom-center' | 'bottom-left' | 'bottom-right' | 'center-center' | 'center-left' | 'center-right';
2287
- gap: number;
2288
- scale: number;
2289
- color: string;
2290
- hover: string;
2502
+
2291
2503
  };
2292
2504
  };
2293
2505
 
@@ -2322,4 +2534,4 @@ type TestimonialsStyles = {
2322
2534
  };
2323
2535
 
2324
2536
  type ElementOrderKey = 'text' | 'image' | 'caption';
2325
- `,Lo={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ce={fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"},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:1,max:10},width:{type:"number",scope:"layout",title:"Card width",min:0,max:400,display:{type:"range-control"}},imageWidth:{type:"number",scope:"layout",title:"Image width",min:0,max:100,display:{type:"range-control"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:100,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:100,display:{type:"range-control"}},textMinHeight:{type:"number",scope:"layout",title:"Text min height",min:0,max:300,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:{...Lo.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:{...Lo.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",textFontFamily:Ce.fontSettings.fontFamily,textFontSettings:{fontWeight:Ce.fontSettings.fontWeight,fontStyle:Ce.fontSettings.fontStyle},textLetterSpacing:Ce.letterSpacing,textWordSpacing:Ce.wordSpacing,textTextAlign:Ce.textAlign,textTextAppearance:Ce.textAppearance,textColor:Ce.color,captionFontFamily:Ce.fontSettings.fontFamily,captionFontSettings:{fontWeight:Ce.fontSettings.fontWeight,fontStyle:Ce.fontSettings.fontStyle},captionLetterSpacing:Ce.letterSpacing,captionWordSpacing:Ce.wordSpacing,captionTextAlign:Ce.textAlign,captionTextAppearance:Ce.textAppearance,captionColor:Ce.color},layoutDefaults:{m:{speed:5,width:.15,height:.2,corners:.005,stroke:.001,imageMarginTop:0,textMarginTop:0,textMinHeight:.01,captionMarginTop:0,textFontSize:.01,captionFontSize:.01,textLineHeight:.01,captionLineHeight:.01,imageWidth:.15},d:{speed:5,width:.15,height:.2,corners:.005,stroke:.001,imageMarginTop:0,textMarginTop:0,textMinHeight:.01,captionMarginTop:0,textFontSize:.01,captionFontSize:.01,textLineHeight:.01,captionLineHeight:.01,imageWidth:.15}},displayRules:[],layout:["__componentName__","autoplay","speed","width","imageMarginTop","textMarginTop","textMinHeight","captionMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["controls","speed"]},{type:"row",items:[{type:"group",title:"",items:["width"]}]},{type:"row",items:[{type:"group",title:"",items:["delay","imageWidth"]}]}]},{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"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},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:"cover",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:"cover",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:"cover",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"}]}]}]}},gs={element:ps,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:ds,sourceCode:us,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}},ms=[La,za,wl,Il,Ol,os,gs];exports.components=ms;exports.isSchemaV1=Sr;
2537
+ `,Lo={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"},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",reverse:!0},min:.5,max:10},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:400,display:{type:"range-control"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:100,display:{type:"range-control"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:100,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:{...Lo.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:{...Lo.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",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:{speed:5,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:{speed:5,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:[],layout:["__componentName__","autoplay","speed","width","imageMarginTop","textMarginTop","textMinHeight","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:["speed","width"]}]},{type:"row",items:["controlsWidth","align"]},{type:"row",title:"Min Height",items:["textMinHeight","captionMinHeight"]},{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:!0},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"}]}]}]}},_s={element:Cs,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:Ts,sourceCode:ws,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}},$s=[La,za,Tl,Rl,Bl,os,_s];exports.components=$s;exports.isSchemaV1=Sr;