@cntrl-site/components 1.0.12-alpha.5 → 1.0.12-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,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),p=require("react"),Ce=require("classnames"),T=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Ui=require("react-dom");function jr(e){return e.type==="object"&&e.version===1}const Kr="ControlSlider-module__wrapper___sHEkd",Ur="ControlSlider-module__hoverArrow___A-dOH",qr="ControlSlider-module__sliderItem___QQSkR",Gr="ControlSlider-module__sliderImage___9hRl-",Yr="ControlSlider-module__arrow___05ghY",Xr="ControlSlider-module__arrowVertical___tBfVN",Zr="ControlSlider-module__nextArrow___-30Yc",Jr="ControlSlider-module__arrowInner___aEra3",Qr="ControlSlider-module__arrowIcon___S4ztF",ea="ControlSlider-module__arrowImg___2dwJW",ta="ControlSlider-module__mirror___brd6U",na="ControlSlider-module__pagination___bicLF",oa="ControlSlider-module__paginationInner___bT-P-",ia="ControlSlider-module__paginationVertical___zYqKw",ra="ControlSlider-module__paginationItem___nTRbk",aa="ControlSlider-module__dot___p1Qun",sa="ControlSlider-module__activeDot___LHFaj",la="ControlSlider-module__paginationInsideBottom___R3FWn",ca="ControlSlider-module__paginationInsideTop___V-qb-",da="ControlSlider-module__paginationOutsideBottom___14w8D",ua="ControlSlider-module__paginationOutsideTop___SCLqB",pa="ControlSlider-module__paginationInsideLeft___yOBRZ",ma="ControlSlider-module__paginationInsideRight___Rtt3o",ga="ControlSlider-module__paginationOutsideLeft___lahaw",ha="ControlSlider-module__paginationOutsideRight___EtuQa",fa="ControlSlider-module__imgWrapper___UjEgB",ya="ControlSlider-module__captionBlock___dJ6-j",va="ControlSlider-module__captionTextWrapper___HFlpf",ba="ControlSlider-module__captionText___uGBVc",xa="ControlSlider-module__active___WZK4G",Ca="ControlSlider-module__withPointerEvents___t-18M",Sa="ControlSlider-module__topLeftAlignment___zjnGM",wa="ControlSlider-module__topCenterAlignment___gD1xW",$a="ControlSlider-module__topRightAlignment___NMapS",Ta="ControlSlider-module__middleLeftAlignment___OnUrY",La="ControlSlider-module__middleCenterAlignment___Tdkl0",Ea="ControlSlider-module__middleRightAlignment___wEbfX",_a="ControlSlider-module__bottomLeftAlignment___cTP2-",Pa="ControlSlider-module__bottomCenterAlignment___c54fB",Aa="ControlSlider-module__bottomRightAlignment___kEwrz",Ra="ControlSlider-module__clickOverlay___DZA28",Wa="ControlSlider-module__contain___pLyq7",Ia="ControlSlider-module__cover___KdDat",ae={wrapper:Kr,hoverArrow:Ur,sliderItem:qr,sliderImage:Gr,arrow:Yr,arrowVertical:Xr,nextArrow:Zr,arrowInner:Jr,arrowIcon:Qr,arrowImg:ea,mirror:ta,pagination:na,paginationInner:oa,paginationVertical:ia,paginationItem:ra,dot:aa,activeDot:sa,paginationInsideBottom:la,paginationInsideTop:ca,paginationOutsideBottom:da,paginationOutsideTop:ua,paginationInsideLeft:pa,paginationInsideRight:ma,paginationOutsideLeft:ga,paginationOutsideRight:ha,imgWrapper:fa,captionBlock:ya,captionTextWrapper:va,captionText:ba,active:xa,withPointerEvents:Ca,topLeftAlignment:Sa,topCenterAlignment:wa,topRightAlignment:$a,middleLeftAlignment:Ta,middleCenterAlignment:La,middleRightAlignment:Ea,bottomLeftAlignment:_a,bottomCenterAlignment:Pa,bottomRightAlignment:Aa,clickOverlay:Ra,contain:Wa,cover:Ia};function ka(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 Fa(e,t,n){return t&&ka(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var ui="(prefers-reduced-motion: reduce)",Kt=1,Ma=2,Gt=3,en=4,Cn=5,Bn=6,Un=7,Ha={CREATED:Kt,MOUNTED:Ma,IDLE:Gt,MOVING:en,SCROLLING:Cn,DRAGGING:Bn,DESTROYED:Un};function bt(e){e.length=0}function At(e,t,n){return Array.prototype.slice.call(e,t,n)}function _e(e){return e.bind.apply(e,[null].concat(At(arguments,1)))}var qi=setTimeout,wo=function(){};function pi(e){return requestAnimationFrame(e)}function Jn(e,t){return typeof t===e}function un(e){return!ko(e)&&Jn("object",e)}var Io=Array.isArray,Gi=_e(Jn,"function"),Et=_e(Jn,"string"),Sn=_e(Jn,"undefined");function ko(e){return e===null}function Yi(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function wn(e){return Io(e)?e:[e]}function ot(e,t){wn(e).forEach(t)}function Fo(e,t){return e.indexOf(t)>-1}function On(e,t){return e.push.apply(e,wn(t)),e}function gt(e,t,n){e&&ot(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function dt(e,t){gt(e,Et(t)?t.split(" "):t,!0)}function $n(e,t){ot(t,e.appendChild.bind(e))}function Mo(e,t){ot(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function pn(e,t){return Yi(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Xi(e,t){var n=e?At(e.children):[];return t?n.filter(function(o){return pn(o,t)}):n}function Tn(e,t){return t?Xi(e,t)[0]:e.firstElementChild}var mn=Object.keys;function Ht(e,t,n){return e&&(n?mn(e).reverse():mn(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function gn(e){return At(arguments,1).forEach(function(t){Ht(t,function(n,o){e[o]=t[o]})}),e}function Tt(e){return At(arguments,1).forEach(function(t){Ht(t,function(n,o){Io(n)?e[o]=n.slice():un(n)?e[o]=Tt({},un(e[o])?e[o]:{},n):e[o]=n})}),e}function mi(e,t){ot(t||mn(e),function(n){delete e[n]})}function ut(e,t){ot(e,function(n){ot(t,function(o){n&&n.removeAttribute(o)})})}function fe(e,t,n){un(t)?Ht(t,function(o,i){fe(e,i,o)}):ot(e,function(o){ko(n)||n===""?ut(o,t):o.setAttribute(t,String(n))})}function Ut(e,t,n){var o=document.createElement(e);return t&&(Et(t)?dt(o,t):fe(o,t)),n&&$n(n,o),o}function rt(e,t,n){if(Sn(n))return getComputedStyle(e)[t];ko(n)||(e.style[t]=""+n)}function hn(e,t){rt(e,"display",t)}function Zi(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function at(e,t){return e.getAttribute(t)}function gi(e,t){return e&&e.classList.contains(t)}function et(e){return e.getBoundingClientRect()}function Nt(e){ot(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Ji(e){return Tn(new DOMParser().parseFromString(e,"text/html").body)}function mt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Qi(e,t){return e&&e.querySelector(t)}function Ho(e,t){return t?At(e.querySelectorAll(t)):[]}function ht(e,t){gt(e,t,!1)}function $o(e){return e.timeStamp}function kt(e){return Et(e)?e:e?e+"px":""}var Ln="splide",No="data-"+Ln;function cn(e,t){if(!e)throw new Error("["+Ln+"] "+(t||""))}var _t=Math.min,qn=Math.max,Gn=Math.floor,fn=Math.ceil,qe=Math.abs;function er(e,t,n){return qe(e-t)<n}function Vn(e,t,n,o){var i=_t(t,n),s=qn(t,n);return o?i<e&&e<s:i<=e&&e<=s}function zt(e,t,n){var o=_t(t,n),i=qn(t,n);return _t(qn(o,e),i)}function To(e){return+(e>0)-+(e<0)}function Lo(e,t){return ot(t,function(n){e=e.replace("%s",""+n)}),e}function Bo(e){return e<10?"0"+e:""+e}var hi={};function Na(e){return""+e+Bo(hi[e]=(hi[e]||0)+1)}function tr(){var e=[];function t(r,a,c,u){i(r,a,function(d,$,h){var y="addEventListener"in d,m=y?d.removeEventListener.bind(d,$,c,u):d.removeListener.bind(d,c);y?d.addEventListener($,c,u):d.addListener(c),e.push([d,$,h,c,m])})}function n(r,a,c){i(r,a,function(u,d,$){e=e.filter(function(h){return h[0]===u&&h[1]===d&&h[2]===$&&(!c||h[3]===c)?(h[4](),!1):!0})})}function o(r,a,c){var u,d=!0;return typeof CustomEvent=="function"?u=new CustomEvent(a,{bubbles:d,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(a,d,!1,c)),r.dispatchEvent(u),u}function i(r,a,c){ot(r,function(u){u&&ot(a,function(d){d.split(" ").forEach(function($){var h=$.split(".");c(u,h[0],h[1])})})})}function s(){e.forEach(function(r){r[4]()}),bt(e)}return{bind:t,unbind:n,dispatch:o,destroy:s}}var Rt="mounted",Eo="ready",xt="move",tn="moved",Oo="click",nr="active",or="inactive",ir="visible",rr="hidden",ke="refresh",je="updated",Yt="resize",Qn="resized",ar="drag",sr="dragging",lr="dragged",eo="scroll",Vt="scrolled",Ba="overflow",Vo="destroy",cr="arrows:mounted",dr="arrows:updated",ur="pagination:mounted",pr="pagination:updated",Do="navigation:mounted",zo="autoplay:play",mr="autoplay:playing",jo="autoplay:pause",Ko="lazyload:loaded",gr="sk",hr="sh",Yn="ei";function Ie(e){var t=e?e.event.bus:document.createDocumentFragment(),n=tr();function o(s,r){n.bind(t,wn(s).join(" "),function(a){r.apply(r,Io(a.detail)?a.detail:[])})}function i(s){n.dispatch(t,s,At(arguments,1))}return e&&e.event.on(Vo,n.destroy),gn(n,{bus:t,on:o,off:_e(n.unbind,t),emit:i})}function to(e,t,n,o){var i=Date.now,s,r=0,a,c=!0,u=0;function d(){if(!c){if(r=e?_t((i()-s)/e,1):1,n&&n(r),r>=1&&(t(),s=i(),o&&++u>=o))return h();a=pi(d)}}function $(f){f||m(),s=i()-(f?r*e:0),c=!1,a=pi(d)}function h(){c=!0}function y(){s=i(),r=0,n&&n(r)}function m(){a&&cancelAnimationFrame(a),r=0,a=0,c=!0}function g(f){e=f}function S(){return c}return{start:$,rewind:y,pause:h,cancel:m,set:g,isPaused:S}}function Oa(e){var t=e;function n(i){t=i}function o(i){return Fo(wn(i),t)}return{set:n,is:o}}function Va(e,t){var n=to(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Da(e,t,n){var o=e.state,i=n.breakpoints||{},s=n.reducedMotion||{},r=tr(),a=[];function c(){var m=n.mediaQuery==="min";mn(i).sort(function(g,S){return m?+g-+S:+S-+g}).forEach(function(g){d(i[g],"("+(m?"min":"max")+"-width:"+g+"px)")}),d(s,ui),$()}function u(m){m&&r.destroy()}function d(m,g){var S=matchMedia(g);r.bind(S,"change",$),a.push([m,S])}function $(){var m=o.is(Un),g=n.direction,S=a.reduce(function(f,b){return Tt(f,b[1].matches?b[0]:{})},{});mi(n),y(S),n.destroy?e.destroy(n.destroy==="completely"):m?(u(!0),e.mount()):g!==n.direction&&e.refresh()}function h(m){matchMedia(ui).matches&&(m?Tt(n,s):mi(n,mn(s)))}function y(m,g,S){Tt(n,m),g&&Tt(Object.getPrototypeOf(n),m),(S||!o.is(Kt))&&e.emit(je,n)}return{setup:c,destroy:u,reduce:h,set:y}}var no="Arrow",oo=no+"Left",io=no+"Right",fr=no+"Up",yr=no+"Down",fi="rtl",ro="ttb",mo={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[fr,io],ArrowRight:[yr,oo]};function za(e,t,n){function o(s,r,a){a=a||n.direction;var c=a===fi&&!r?1:a===ro?0:-1;return mo[s]&&mo[s][c]||s.replace(/width|left|right/i,function(u,d){var $=mo[u.toLowerCase()][c]||u;return d>0?$.charAt(0).toUpperCase()+$.slice(1):$})}function i(s){return s*(n.direction===fi?1:-1)}return{resolve:o,orient:i}}var ft="role",qt="tabindex",ja="disabled",st="aria-",En=st+"controls",vr=st+"current",yi=st+"selected",tt=st+"label",Uo=st+"labelledby",br=st+"hidden",qo=st+"orientation",yn=st+"roledescription",vi=st+"live",bi=st+"busy",xi=st+"atomic",Go=[ft,qt,ja,En,vr,tt,Uo,br,qo,yn],pt=Ln+"__",Wt="is-",go=Ln,Ci=pt+"track",Ka=pt+"list",ao=pt+"slide",xr=ao+"--clone",Ua=ao+"__container",Yo=pt+"arrows",so=pt+"arrow",Cr=so+"--prev",Sr=so+"--next",lo=pt+"pagination",wr=lo+"__page",qa=pt+"progress",Ga=qa+"__bar",Ya=pt+"toggle",Xa=pt+"spinner",Za=pt+"sr",Ja=Wt+"initialized",Bt=Wt+"active",$r=Wt+"prev",Tr=Wt+"next",_o=Wt+"visible",Po=Wt+"loading",Lr=Wt+"focus-in",Er=Wt+"overflow",Qa=[Bt,_o,$r,Tr,Po,Lr,Er],es={slide:ao,clone:xr,arrows:Yo,arrow:so,prev:Cr,next:Sr,pagination:lo,page:wr,spinner:Xa};function ts(e,t){if(Gi(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!pn(n,t);)n=n.parentElement;return n}var ns=5,Si=200,_r="touchstart mousedown",ho="touchmove mousemove",fo="touchend touchcancel mouseup click";function os(e,t,n){var o=Ie(e),i=o.on,s=o.bind,r=e.root,a=n.i18n,c={},u=[],d=[],$=[],h,y,m;function g(){_(),E(),b()}function S(){i(ke,f),i(ke,g),i(je,b),s(document,_r+" keydown",function(v){m=v.type==="keydown"},{capture:!0}),s(r,"focusin",function(){gt(r,Lr,!!m)})}function f(v){var C=Go.concat("style");bt(u),ht(r,d),ht(h,$),ut([h,y],C),ut(r,v?C:["style",yn])}function b(){ht(r,d),ht(h,$),d=L(go),$=L(Ci),dt(r,d),dt(h,$),fe(r,tt,n.label),fe(r,Uo,n.labelledby)}function _(){h=P("."+Ci),y=Tn(h,"."+Ka),cn(h&&y,"A track/list element is missing."),On(u,Xi(y,"."+ao+":not(."+xr+")")),Ht({arrows:Yo,pagination:lo,prev:Cr,next:Sr,bar:Ga,toggle:Ya},function(v,C){c[C]=P("."+v)}),gn(c,{root:r,track:h,list:y,slides:u})}function E(){var v=r.id||Na(Ln),C=n.role;r.id=v,h.id=h.id||v+"-track",y.id=y.id||v+"-list",!at(r,ft)&&r.tagName!=="SECTION"&&C&&fe(r,ft,C),fe(r,yn,a.carousel),fe(y,ft,"presentation")}function P(v){var C=Qi(r,v);return C&&ts(C,"."+go)===r?C:void 0}function L(v){return[v+"--"+n.type,v+"--"+n.direction,n.drag&&v+"--draggable",n.isNavigation&&v+"--nav",v===go&&Bt]}return gn(c,{setup:g,mount:S,destroy:f})}var Xt="slide",nn="loop",_n="fade";function is(e,t,n,o){var i=Ie(e),s=i.on,r=i.emit,a=i.bind,c=e.Components,u=e.root,d=e.options,$=d.isNavigation,h=d.updateOnMove,y=d.i18n,m=d.pagination,g=d.slideFocus,S=c.Direction.resolve,f=at(o,"style"),b=at(o,tt),_=n>-1,E=Tn(o,"."+Ua),P;function L(){_||(o.id=u.id+"-slide"+Bo(t+1),fe(o,ft,m?"tabpanel":"group"),fe(o,yn,y.slide),fe(o,tt,b||Lo(y.slideLabel,[t+1,e.length]))),v()}function v(){a(o,"click",_e(r,Oo,F)),a(o,"keydown",_e(r,gr,F)),s([tn,hr,Vt],W),s(Do,R),h&&s(xt,H)}function C(){P=!0,i.destroy(),ht(o,Qa),ut(o,Go),fe(o,"style",f),fe(o,tt,b||"")}function R(){var M=e.splides.map(function(I){var V=I.splide.Components.Slides.getAt(t);return V?V.slide.id:""}).join(" ");fe(o,tt,Lo(y.slideX,(_?n:t)+1)),fe(o,En,M),fe(o,ft,g?"button":""),g&&ut(o,yn)}function H(){P||W()}function W(){if(!P){var M=e.index;O(),D(),gt(o,$r,t===M-1),gt(o,Tr,t===M+1)}}function O(){var M=U();M!==gi(o,Bt)&&(gt(o,Bt,M),fe(o,vr,$&&M||""),r(M?nr:or,F))}function D(){var M=w(),I=!M&&(!U()||_);if(e.state.is([en,Cn])||fe(o,br,I||""),fe(Ho(o,d.focusableNodes||""),qt,I?-1:""),g&&fe(o,qt,I?-1:0),M!==gi(o,_o)&&(gt(o,_o,M),r(M?ir:rr,F)),!M&&document.activeElement===o){var V=c.Slides.getAt(e.index);V&&Zi(V.slide)}}function j(M,I,V){rt(V&&E||o,M,I)}function U(){var M=e.index;return M===t||d.cloneStatus&&M===n}function w(){if(e.is(_n))return U();var M=et(c.Elements.track),I=et(o),V=S("left",!0),te=S("right",!0);return Gn(M[V])<=fn(I[V])&&Gn(I[te])<=fn(M[te])}function N(M,I){var V=qe(M-t);return!_&&(d.rewind||e.is(nn))&&(V=_t(V,e.length-V)),V<=I}var F={index:t,slideIndex:n,slide:o,container:E,isClone:_,mount:L,destroy:C,update:W,style:j,isWithin:N};return F}function rs(e,t,n){var o=Ie(e),i=o.on,s=o.emit,r=o.bind,a=t.Elements,c=a.slides,u=a.list,d=[];function $(){h(),i(ke,y),i(ke,h)}function h(){c.forEach(function(W,O){g(W,O,-1)})}function y(){P(function(W){W.destroy()}),bt(d)}function m(){P(function(W){W.update()})}function g(W,O,D){var j=is(e,O,D,W);j.mount(),d.push(j),d.sort(function(U,w){return U.index-w.index})}function S(W){return W?L(function(O){return!O.isClone}):d}function f(W){var O=t.Controller,D=O.toIndex(W),j=O.hasFocus()?1:n.perPage;return L(function(U){return Vn(U.index,D,D+j-1)})}function b(W){return L(W)[0]}function _(W,O){ot(W,function(D){if(Et(D)&&(D=Ji(D)),Yi(D)){var j=c[O];j?Mo(D,j):$n(u,D),dt(D,n.classes.slide),C(D,_e(s,Yt))}}),s(ke)}function E(W){Nt(L(W).map(function(O){return O.slide})),s(ke)}function P(W,O){S(O).forEach(W)}function L(W){return d.filter(Gi(W)?W:function(O){return Et(W)?pn(O.slide,W):Fo(wn(W),O.index)})}function v(W,O,D){P(function(j){j.style(W,O,D)})}function C(W,O){var D=Ho(W,"img"),j=D.length;j?D.forEach(function(U){r(U,"load error",function(){--j||O()})}):O()}function R(W){return W?c.length:d.length}function H(){return d.length>n.perPage}return{mount:$,destroy:y,update:m,register:g,get:S,getIn:f,getAt:b,add:_,remove:E,forEach:P,filter:L,style:v,getLength:R,isEnough:H}}function as(e,t,n){var o=Ie(e),i=o.on,s=o.bind,r=o.emit,a=t.Slides,c=t.Direction.resolve,u=t.Elements,d=u.root,$=u.track,h=u.list,y=a.getAt,m=a.style,g,S,f;function b(){_(),s(window,"resize load",Va(_e(r,Yt))),i([je,ke],_),i(Yt,E)}function _(){g=n.direction===ro,rt(d,"maxWidth",kt(n.width)),rt($,c("paddingLeft"),P(!1)),rt($,c("paddingRight"),P(!0)),E(!0)}function E(F){var M=et(d);(F||S.width!==M.width||S.height!==M.height)&&(rt($,"height",L()),m(c("marginRight"),kt(n.gap)),m("width",C()),m("height",R(),!0),S=M,r(Qn),f!==(f=N())&&(gt(d,Er,f),r(Ba,f)))}function P(F){var M=n.padding,I=c(F?"right":"left");return M&&kt(M[I]||(un(M)?0:M))||"0px"}function L(){var F="";return g&&(F=v(),cn(F,"height or heightRatio is missing."),F="calc("+F+" - "+P(!1)+" - "+P(!0)+")"),F}function v(){return kt(n.height||et(h).width*n.heightRatio)}function C(){return n.autoWidth?null:kt(n.fixedWidth)||(g?"":H())}function R(){return kt(n.fixedHeight)||(g?n.autoHeight?null:H():v())}function H(){var F=kt(n.gap);return"calc((100%"+(F&&" + "+F)+")/"+(n.perPage||1)+(F&&" - "+F)+")"}function W(){return et(h)[c("width")]}function O(F,M){var I=y(F||0);return I?et(I.slide)[c("width")]+(M?0:U()):0}function D(F,M){var I=y(F);if(I){var V=et(I.slide)[c("right")],te=et(h)[c("left")];return qe(V-te)+(M?0:U())}return 0}function j(F){return D(e.length-1)-D(0)+O(0,F)}function U(){var F=y(0);return F&&parseFloat(rt(F.slide,c("marginRight")))||0}function w(F){return parseFloat(rt($,c("padding"+(F?"Right":"Left"))))||0}function N(){return e.is(_n)||j(!0)>W()}return{mount:b,resize:E,listSize:W,slideSize:O,sliderSize:j,totalSize:D,getPadding:w,isOverflow:N}}var ss=2;function ls(e,t,n){var o=Ie(e),i=o.on,s=t.Elements,r=t.Slides,a=t.Direction.resolve,c=[],u;function d(){i(ke,$),i([je,Yt],y),(u=S())&&(m(u),t.Layout.resize(!0))}function $(){h(),d()}function h(){Nt(c),bt(c),o.destroy()}function y(){var f=S();u!==f&&(u<f||!f)&&o.emit(ke)}function m(f){var b=r.get().slice(),_=b.length;if(_){for(;b.length<f;)On(b,b);On(b.slice(-f),b.slice(0,f)).forEach(function(E,P){var L=P<f,v=g(E.slide,P);L?Mo(v,b[0].slide):$n(s.list,v),On(c,v),r.register(v,P-f+(L?0:_),E.index)})}}function g(f,b){var _=f.cloneNode(!0);return dt(_,n.classes.clone),_.id=e.root.id+"-clone"+Bo(b+1),_}function S(){var f=n.clones;if(!e.is(nn))f=0;else if(Sn(f)){var b=n[a("fixedWidth")]&&t.Layout.slideSize(0),_=b&&fn(et(s.track)[a("width")]/b);f=_||n[a("autoWidth")]&&e.length||n.perPage*ss}return f}return{mount:d,destroy:h}}function cs(e,t,n){var o=Ie(e),i=o.on,s=o.emit,r=e.state.set,a=t.Layout,c=a.slideSize,u=a.getPadding,d=a.totalSize,$=a.listSize,h=a.sliderSize,y=t.Direction,m=y.resolve,g=y.orient,S=t.Elements,f=S.list,b=S.track,_;function E(){_=t.Transition,i([Rt,Qn,je,ke],P)}function P(){t.Controller.isBusy()||(t.Scroll.cancel(),v(e.index),t.Slides.update())}function L(I,V,te,ue){I!==V&&F(I>te)&&(W(),C(H(j(),I>te),!0)),r(en),s(xt,V,te,I),_.start(V,function(){r(Gt),s(tn,V,te,I),ue&&ue()})}function v(I){C(D(I,!0))}function C(I,V){if(!e.is(_n)){var te=V?I:R(I);rt(f,"transform","translate"+m("X")+"("+te+"px)"),I!==te&&s(hr)}}function R(I){if(e.is(nn)){var V=O(I),te=V>t.Controller.getEnd(),ue=V<0;(ue||te)&&(I=H(I,te))}return I}function H(I,V){var te=I-N(V),ue=h();return I-=g(ue*(fn(qe(te)/ue)||1))*(V?1:-1),I}function W(){C(j(),!0),_.cancel()}function O(I){for(var V=t.Slides.get(),te=0,ue=1/0,re=0;re<V.length;re++){var me=V[re].index,B=qe(D(me,!0)-I);if(B<=ue)ue=B,te=me;else break}return te}function D(I,V){var te=g(d(I-1)-w(I));return V?U(te):te}function j(){var I=m("left");return et(f)[I]-et(b)[I]+g(u(!1))}function U(I){return n.trimSpace&&e.is(Xt)&&(I=zt(I,0,g(h(!0)-$()))),I}function w(I){var V=n.focus;return V==="center"?($()-c(I,!0))/2:+V*c(I)||0}function N(I){return D(I?t.Controller.getEnd():0,!!n.trimSpace)}function F(I){var V=g(H(j(),I));return I?V>=0:V<=f[m("scrollWidth")]-et(b)[m("width")]}function M(I,V){V=Sn(V)?j():V;var te=I!==!0&&g(V)<g(N(!1)),ue=I!==!1&&g(V)>g(N(!0));return te||ue}return{mount:E,move:L,jump:v,translate:C,shift:H,cancel:W,toIndex:O,toPosition:D,getPosition:j,getLimit:N,exceededLimit:M,reposition:P}}function ds(e,t,n){var o=Ie(e),i=o.on,s=o.emit,r=t.Move,a=r.getPosition,c=r.getLimit,u=r.toPosition,d=t.Slides,$=d.isEnough,h=d.getLength,y=n.omitEnd,m=e.is(nn),g=e.is(Xt),S=_e(j,!1),f=_e(j,!0),b=n.start||0,_,E=b,P,L,v;function C(){R(),i([je,ke,Yn],R),i(Qn,H)}function R(){P=h(!0),L=n.perMove,v=n.perPage,_=F();var B=zt(b,0,y?_:P-1);B!==b&&(b=B,r.reposition())}function H(){_!==F()&&s(Yn)}function W(B,Q,G){if(!me()){var Y=D(B),ie=N(Y);ie>-1&&(Q||ie!==b)&&(te(ie),r.move(Y,ie,E,G))}}function O(B,Q,G,Y){t.Scroll.scroll(B,Q,G,function(){var ie=N(r.toIndex(a()));te(y?_t(ie,_):ie),Y&&Y()})}function D(B){var Q=b;if(Et(B)){var G=B.match(/([+\-<>])(\d+)?/)||[],Y=G[1],ie=G[2];Y==="+"||Y==="-"?Q=U(b+ +(""+Y+(+ie||1)),b):Y===">"?Q=ie?M(+ie):S(!0):Y==="<"&&(Q=f(!0))}else Q=m?B:zt(B,0,_);return Q}function j(B,Q){var G=L||(re()?1:v),Y=U(b+G*(B?-1:1),b,!(L||re()));return Y===-1&&g&&!er(a(),c(!B),1)?B?0:_:Q?Y:N(Y)}function U(B,Q,G){if($()||re()){var Y=w(B);Y!==B&&(Q=B,B=Y,G=!1),B<0||B>_?!L&&(Vn(0,B,Q,!0)||Vn(_,Q,B,!0))?B=M(I(B)):m?B=G?B<0?-(P%v||v):P:B:n.rewind?B=B<0?_:0:B=-1:G&&B!==Q&&(B=M(I(Q)+(B<Q?-1:1)))}else B=-1;return B}function w(B){if(g&&n.trimSpace==="move"&&B!==b)for(var Q=a();Q===u(B,!0)&&Vn(B,0,e.length-1,!n.rewind);)B<b?--B:++B;return B}function N(B){return m?(B+P)%P||0:B}function F(){for(var B=P-(re()||m&&L?1:v);y&&B-- >0;)if(u(P-1,!0)!==u(B,!0)){B++;break}return zt(B,0,P-1)}function M(B){return zt(re()?B:v*B,0,_)}function I(B){return re()?_t(B,_):Gn((B>=_?P-1:B)/v)}function V(B){var Q=r.toIndex(B);return g?zt(Q,0,_):Q}function te(B){B!==b&&(E=b,b=B)}function ue(B){return B?E:b}function re(){return!Sn(n.focus)||n.isNavigation}function me(){return e.state.is([en,Cn])&&!!n.waitForTransition}return{mount:C,go:W,scroll:O,getNext:S,getPrev:f,getAdjacent:j,getEnd:F,setIndex:te,getIndex:ue,toIndex:M,toPage:I,toDest:V,hasFocus:re,isBusy:me}}var us="http://www.w3.org/2000/svg",ps="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",Wn=40;function ms(e,t,n){var o=Ie(e),i=o.on,s=o.bind,r=o.emit,a=n.classes,c=n.i18n,u=t.Elements,d=t.Controller,$=u.arrows,h=u.track,y=$,m=u.prev,g=u.next,S,f,b={};function _(){P(),i(je,E)}function E(){L(),_()}function P(){var O=n.arrows;O&&!(m&&g)&&R(),m&&g&&(gn(b,{prev:m,next:g}),hn(y,O?"":"none"),dt(y,f=Yo+"--"+n.direction),O&&(v(),W(),fe([m,g],En,h.id),r(cr,m,g)))}function L(){o.destroy(),ht(y,f),S?(Nt($?[m,g]:y),m=g=null):ut([m,g],Go)}function v(){i([Rt,tn,ke,Vt,Yn],W),s(g,"click",_e(C,">")),s(m,"click",_e(C,"<"))}function C(O){d.go(O,!0)}function R(){y=$||Ut("div",a.arrows),m=H(!0),g=H(!1),S=!0,$n(y,[m,g]),!$&&Mo(y,h)}function H(O){var D='<button class="'+a.arrow+" "+(O?a.prev:a.next)+'" type="button"><svg xmlns="'+us+'" viewBox="0 0 '+Wn+" "+Wn+'" width="'+Wn+'" height="'+Wn+'" focusable="false"><path d="'+(n.arrowPath||ps)+'" />';return Ji(D)}function W(){if(m&&g){var O=e.index,D=d.getPrev(),j=d.getNext(),U=D>-1&&O<D?c.last:c.prev,w=j>-1&&O>j?c.first:c.next;m.disabled=D<0,g.disabled=j<0,fe(m,tt,U),fe(g,tt,w),r(dr,m,g,D,j)}}return{arrows:b,mount:_,destroy:L,update:W}}var gs=No+"-interval";function hs(e,t,n){var o=Ie(e),i=o.on,s=o.bind,r=o.emit,a=to(n.interval,e.go.bind(e,">"),v),c=a.isPaused,u=t.Elements,d=t.Elements,$=d.root,h=d.toggle,y=n.autoplay,m,g,S=y==="pause";function f(){y&&(b(),h&&fe(h,En,u.track.id),S||_(),L())}function b(){n.pauseOnHover&&s($,"mouseenter mouseleave",function(R){m=R.type==="mouseenter",P()}),n.pauseOnFocus&&s($,"focusin focusout",function(R){g=R.type==="focusin",P()}),h&&s(h,"click",function(){S?_():E(!0)}),i([xt,eo,ke],a.rewind),i(xt,C)}function _(){c()&&t.Slides.isEnough()&&(a.start(!n.resetProgress),g=m=S=!1,L(),r(zo))}function E(R){R===void 0&&(R=!0),S=!!R,L(),c()||(a.pause(),r(jo))}function P(){S||(m||g?E(!1):_())}function L(){h&&(gt(h,Bt,!S),fe(h,tt,n.i18n[S?"play":"pause"]))}function v(R){var H=u.bar;H&&rt(H,"width",R*100+"%"),r(mr,R)}function C(R){var H=t.Slides.getAt(R);a.set(H&&+at(H.slide,gs)||n.interval)}return{mount:f,destroy:a.cancel,play:_,pause:E,isPaused:c}}function fs(e,t,n){var o=Ie(e),i=o.on;function s(){n.cover&&(i(Ko,_e(a,!0)),i([Rt,je,ke],_e(r,!0)))}function r(c){t.Slides.forEach(function(u){var d=Tn(u.container||u.slide,"img");d&&d.src&&a(c,d,u)})}function a(c,u,d){d.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),hn(u,c?"none":"")}return{mount:s,destroy:_e(r,!1)}}var ys=10,vs=600,bs=.6,xs=1.5,Cs=800;function Ss(e,t,n){var o=Ie(e),i=o.on,s=o.emit,r=e.state.set,a=t.Move,c=a.getPosition,u=a.getLimit,d=a.exceededLimit,$=a.translate,h=e.is(Xt),y,m,g=1;function S(){i(xt,E),i([je,ke],P)}function f(v,C,R,H,W){var O=c();if(E(),R&&(!h||!d())){var D=t.Layout.sliderSize(),j=To(v)*D*Gn(qe(v)/D)||0;v=a.toPosition(t.Controller.toDest(v%D))+j}var U=er(O,v,1);g=1,C=U?0:C||qn(qe(v-O)/xs,Cs),m=H,y=to(C,b,_e(_,O,v,W),1),r(Cn),s(eo),y.start()}function b(){r(Gt),m&&m(),s(Vt)}function _(v,C,R,H){var W=c(),O=v+(C-v)*L(H),D=(O-W)*g;$(W+D),h&&!R&&d()&&(g*=bs,qe(D)<ys&&f(u(d(!0)),vs,!1,m,!0))}function E(){y&&y.cancel()}function P(){y&&!y.isPaused()&&(E(),b())}function L(v){var C=n.easingFunc;return C?C(v):1-Math.pow(1-v,4)}return{mount:S,destroy:E,scroll:f,cancel:P}}var jt={passive:!1,capture:!0};function ws(e,t,n){var o=Ie(e),i=o.on,s=o.emit,r=o.bind,a=o.unbind,c=e.state,u=t.Move,d=t.Scroll,$=t.Controller,h=t.Elements.track,y=t.Media.reduce,m=t.Direction,g=m.resolve,S=m.orient,f=u.getPosition,b=u.exceededLimit,_,E,P,L,v,C=!1,R,H,W;function O(){r(h,ho,wo,jt),r(h,fo,wo,jt),r(h,_r,j,jt),r(h,"click",N,{capture:!0}),r(h,"dragstart",mt),i([Rt,je],D)}function D(){var A=n.drag;ne(!A),L=A==="free"}function j(A){if(R=!1,!H){var x=ie(A);Y(A.target)&&(x||!A.button)&&($.isBusy()?mt(A,!0):(W=x?h:window,v=c.is([en,Cn]),P=null,r(W,ho,U,jt),r(W,fo,w,jt),u.cancel(),d.cancel(),F(A)))}}function U(A){if(c.is(Bn)||(c.set(Bn),s(ar)),A.cancelable)if(v){u.translate(_+G(re(A)));var x=me(A)>Si,z=C!==(C=b());(x||z)&&F(A),R=!0,s(sr),mt(A)}else V(A)&&(v=I(A),mt(A))}function w(A){c.is(Bn)&&(c.set(Gt),s(lr)),v&&(M(A),mt(A)),a(W,ho,U),a(W,fo,w),v=!1}function N(A){!H&&R&&mt(A,!0)}function F(A){P=E,E=A,_=f()}function M(A){var x=te(A),z=ue(x),q=n.rewind&&n.rewindByDrag;y(!1),L?$.scroll(z,0,n.snap):e.is(_n)?$.go(S(To(x))<0?q?"<":"-":q?">":"+"):e.is(Xt)&&C&&q?$.go(b(!0)?">":"<"):$.go($.toDest(z),!0),y(!0)}function I(A){var x=n.dragMinThreshold,z=un(x),q=z&&x.mouse||0,J=(z?x.touch:+x)||10;return qe(re(A))>(ie(A)?J:q)}function V(A){return qe(re(A))>qe(re(A,!0))}function te(A){if(e.is(nn)||!C){var x=me(A);if(x&&x<Si)return re(A)/x}return 0}function ue(A){return f()+To(A)*_t(qe(A)*(n.flickPower||600),L?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function re(A,x){return Q(A,x)-Q(B(A),x)}function me(A){return $o(A)-$o(B(A))}function B(A){return E===A&&P||E}function Q(A,x){return(ie(A)?A.changedTouches[0]:A)["page"+g(x?"Y":"X")]}function G(A){return A/(C&&e.is(Xt)?ns:1)}function Y(A){var x=n.noDrag;return!pn(A,"."+wr+", ."+so)&&(!x||!pn(A,x))}function ie(A){return typeof TouchEvent<"u"&&A instanceof TouchEvent}function k(){return v}function ne(A){H=A}return{mount:O,disable:ne,isDragging:k}}var $s={Spacebar:" ",Right:io,Left:oo,Up:fr,Down:yr};function Xo(e){return e=Et(e)?e:e.key,$s[e]||e}var wi="keydown";function Ts(e,t,n){var o=Ie(e),i=o.on,s=o.bind,r=o.unbind,a=e.root,c=t.Direction.resolve,u,d;function $(){h(),i(je,y),i(je,h),i(xt,g)}function h(){var f=n.keyboard;f&&(u=f==="global"?window:a,s(u,wi,S))}function y(){r(u,wi)}function m(f){d=f}function g(){var f=d;d=!0,qi(function(){d=f})}function S(f){if(!d){var b=Xo(f);b===c(oo)?e.go("<"):b===c(io)&&e.go(">")}}return{mount:$,destroy:y,disable:m}}var dn=No+"-lazy",Dn=dn+"-srcset",Ls="["+dn+"], ["+Dn+"]";function Es(e,t,n){var o=Ie(e),i=o.on,s=o.off,r=o.bind,a=o.emit,c=n.lazyLoad==="sequential",u=[tn,Vt],d=[];function $(){n.lazyLoad&&(h(),i(ke,h))}function h(){bt(d),y(),c?f():(s(u),i(u,m),m())}function y(){t.Slides.forEach(function(b){Ho(b.slide,Ls).forEach(function(_){var E=at(_,dn),P=at(_,Dn);if(E!==_.src||P!==_.srcset){var L=n.classes.spinner,v=_.parentElement,C=Tn(v,"."+L)||Ut("span",L,v);d.push([_,b,C]),_.src||hn(_,"none")}})})}function m(){d=d.filter(function(b){var _=n.perPage*((n.preloadPages||1)+1)-1;return b[1].isWithin(e.index,_)?g(b):!0}),d.length||s(u)}function g(b){var _=b[0];dt(b[1].slide,Po),r(_,"load error",_e(S,b)),fe(_,"src",at(_,dn)),fe(_,"srcset",at(_,Dn)),ut(_,dn),ut(_,Dn)}function S(b,_){var E=b[0],P=b[1];ht(P.slide,Po),_.type!=="error"&&(Nt(b[2]),hn(E,""),a(Ko,E,P),a(Yt)),c&&f()}function f(){d.length&&g(d.shift())}return{mount:$,destroy:_e(bt,d),check:m}}function _s(e,t,n){var o=Ie(e),i=o.on,s=o.emit,r=o.bind,a=t.Slides,c=t.Elements,u=t.Controller,d=u.hasFocus,$=u.getIndex,h=u.go,y=t.Direction.resolve,m=c.pagination,g=[],S,f;function b(){_(),i([je,ke,Yn],b);var H=n.pagination;m&&hn(m,H?"":"none"),H&&(i([xt,eo,Vt],R),E(),R(),s(ur,{list:S,items:g},C(e.index)))}function _(){S&&(Nt(m?At(S.children):S),ht(S,f),bt(g),S=null),o.destroy()}function E(){var H=e.length,W=n.classes,O=n.i18n,D=n.perPage,j=d()?u.getEnd()+1:fn(H/D);S=m||Ut("ul",W.pagination,c.track.parentElement),dt(S,f=lo+"--"+v()),fe(S,ft,"tablist"),fe(S,tt,O.select),fe(S,qo,v()===ro?"vertical":"");for(var U=0;U<j;U++){var w=Ut("li",null,S),N=Ut("button",{class:W.page,type:"button"},w),F=a.getIn(U).map(function(I){return I.slide.id}),M=!d()&&D>1?O.pageX:O.slideX;r(N,"click",_e(P,U)),n.paginationKeyboard&&r(N,"keydown",_e(L,U)),fe(w,ft,"presentation"),fe(N,ft,"tab"),fe(N,En,F.join(" ")),fe(N,tt,Lo(M,U+1)),fe(N,qt,-1),g.push({li:w,button:N,page:U})}}function P(H){h(">"+H,!0)}function L(H,W){var O=g.length,D=Xo(W),j=v(),U=-1;D===y(io,!1,j)?U=++H%O:D===y(oo,!1,j)?U=(--H+O)%O:D==="Home"?U=0:D==="End"&&(U=O-1);var w=g[U];w&&(Zi(w.button),h(">"+U),mt(W,!0))}function v(){return n.paginationDirection||n.direction}function C(H){return g[u.toPage(H)]}function R(){var H=C($(!0)),W=C($());if(H){var O=H.button;ht(O,Bt),ut(O,yi),fe(O,qt,-1)}if(W){var D=W.button;dt(D,Bt),fe(D,yi,!0),fe(D,qt,"")}s(pr,{list:S,items:g},H,W)}return{items:g,mount:b,destroy:_,getAt:C,update:R}}var Ps=[" ","Enter"];function As(e,t,n){var o=n.isNavigation,i=n.slideFocus,s=[];function r(){e.splides.forEach(function(m){m.isParent||(u(e,m.splide),u(m.splide,e))}),o&&d()}function a(){s.forEach(function(m){m.destroy()}),bt(s)}function c(){a(),r()}function u(m,g){var S=Ie(m);S.on(xt,function(f,b,_){g.go(g.is(nn)?_:f)}),s.push(S)}function d(){var m=Ie(e),g=m.on;g(Oo,h),g(gr,y),g([Rt,je],$),s.push(m),m.emit(Do,e.splides)}function $(){fe(t.Elements.list,qo,n.direction===ro?"vertical":"")}function h(m){e.go(m.index)}function y(m,g){Fo(Ps,Xo(g))&&(h(m),mt(g))}return{setup:_e(t.Media.set,{slideFocus:Sn(i)?o:i},!0),mount:r,destroy:a,remount:c}}function Rs(e,t,n){var o=Ie(e),i=o.bind,s=0;function r(){n.wheel&&i(t.Elements.track,"wheel",a,jt)}function a(u){if(u.cancelable){var d=u.deltaY,$=d<0,h=$o(u),y=n.wheelMinThreshold||0,m=n.wheelSleep||0;qe(d)>y&&h-s>m&&(e.go($?"<":">"),s=h),c($)&&mt(u)}}function c(u){return!n.releaseWheel||e.state.is(en)||t.Controller.getAdjacent(u)!==-1}return{mount:r}}var Ws=90;function Is(e,t,n){var o=Ie(e),i=o.on,s=t.Elements.track,r=n.live&&!n.isNavigation,a=Ut("span",Za),c=to(Ws,_e(d,!1));function u(){r&&(h(!t.Autoplay.isPaused()),fe(s,xi,!0),a.textContent="…",i(zo,_e(h,!0)),i(jo,_e(h,!1)),i([tn,Vt],_e(d,!0)))}function d(y){fe(s,bi,y),y?($n(s,a),c.start()):(Nt(a),c.cancel())}function $(){ut(s,[vi,xi,bi]),Nt(a)}function h(y){r&&fe(s,vi,y?"off":"polite")}return{mount:u,disable:h,destroy:$}}var ks=Object.freeze({__proto__:null,Media:Da,Direction:za,Elements:os,Slides:rs,Layout:as,Clones:ls,Move:cs,Controller:ds,Arrows:ms,Autoplay:hs,Cover:fs,Scroll:Ss,Drag:ws,Keyboard:Ts,LazyLoad:Es,Pagination:_s,Sync:As,Wheel:Rs,Live:Is}),Fs={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"},Ms={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:es,i18n:Fs,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Hs(e,t,n){var o=t.Slides;function i(){Ie(e).on([Rt,ke],s)}function s(){o.forEach(function(a){a.style("transform","translateX(-"+100*a.index+"%)")})}function r(a,c){o.style("transition","opacity "+n.speed+"ms "+n.easing),qi(c)}return{mount:i,start:r,cancel:wo}}function Ns(e,t,n){var o=t.Move,i=t.Controller,s=t.Scroll,r=t.Elements.list,a=_e(rt,r,"transition"),c;function u(){Ie(e).bind(r,"transitionend",function(y){y.target===r&&c&&($(),c())})}function d(y,m){var g=o.toPosition(y,!0),S=o.getPosition(),f=h(y);qe(g-S)>=1&&f>=1?n.useScroll?s.scroll(g,f,!1,m):(a("transform "+f+"ms "+n.easing),o.translate(g,!0),c=m):(o.jump(y),m())}function $(){a(""),s.cancel()}function h(y){var m=n.rewindSpeed;if(e.is(Xt)&&m){var g=i.getIndex(!0),S=i.getEnd();if(g===0&&y>=S||g>=S&&y===0)return m}return n.speed}return{mount:u,start:d,cancel:$}}var Bs=(function(){function e(n,o){this.event=Ie(),this.Components={},this.state=Oa(Kt),this.splides=[],this._o={},this._E={};var i=Et(n)?Qi(document,n):n;cn(i,i+" is invalid."),this.root=i,o=Tt({label:at(i,tt)||"",labelledby:at(i,Uo)||""},Ms,e.defaults,o||{});try{Tt(o,JSON.parse(at(i,No)))}catch{cn(!1,"Invalid JSON")}this._o=Object.create(Tt({},o))}var t=e.prototype;return t.mount=function(o,i){var s=this,r=this.state,a=this.Components;cn(r.is([Kt,Un]),"Already mounted!"),r.set(Kt),this._C=a,this._T=i||this._T||(this.is(_n)?Hs:Ns),this._E=o||this._E;var c=gn({},ks,this._E,{Transition:this._T});return Ht(c,function(u,d){var $=u(s,a,s._o);a[d]=$,$.setup&&$.setup()}),Ht(a,function(u){u.mount&&u.mount()}),this.emit(Rt),dt(this.root,Ja),r.set(Gt),this.emit(Eo),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(Gt)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},t.go=function(o){return this._C.Controller.go(o),this},t.on=function(o,i){return this.event.on(o,i),this},t.off=function(o){return this.event.off(o),this},t.emit=function(o){var i;return(i=this.event).emit.apply(i,[o].concat(At(arguments,1))),this},t.add=function(o,i){return this._C.Slides.add(o,i),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(ke),this},t.destroy=function(o){o===void 0&&(o=!0);var i=this.event,s=this.state;return s.is(Kt)?Ie(this).on(Eo,this.destroy.bind(this,o)):(Ht(this._C,function(r){r.destroy&&r.destroy(o)},!0),i.emit(Vo),i.destroy(),o&&bt(this.splides),s.set(Un)),this},Fa(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})(),Zo=Bs;Zo.defaults={};Zo.STATES=Ha;var $i=[[Rt,"onMounted"],[Eo,"onReady"],[xt,"onMove"],[tn,"onMoved"],[Oo,"onClick"],[nr,"onActive"],[or,"onInactive"],[ir,"onVisible"],[rr,"onHidden"],[ke,"onRefresh"],[je,"onUpdated"],[Yt,"onResize"],[Qn,"onResized"],[ar,"onDrag"],[sr,"onDragging"],[lr,"onDragged"],[eo,"onScroll"],[Vt,"onScrolled"],[Vo,"onDestroy"],[cr,"onArrowsMounted"],[dr,"onArrowsUpdated"],[ur,"onPaginationMounted"],[pr,"onPaginationUpdated"],[Do,"onNavigationMounted"],[zo,"onAutoplayPlay"],[mr,"onAutoplayPlaying"],[jo,"onAutoplayPause"],[Ko,"onLazyLoadLoaded"]];function Jo(...e){return e.filter(Boolean).join(" ")}function Xn(e){return e!==null&&typeof e=="object"}function Ao(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!Ao(n,t[o]));if(Xn(e)&&Xn(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(i=>!Object.prototype.hasOwnProperty.call(t,i)||!Ao(e[i],t[i]))}return e===t}function Os(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function Vs(e,t){if(e){const n=Object.keys(e);for(let o=0;o<n.length;o++){const i=n[o];if(i!=="__proto__"&&t(e[i],i)===!1)break}}return e}function Ro(e,t){const n=e;return Vs(t,(o,i)=>{Array.isArray(o)?n[i]=o.slice():Xn(o)?n[i]=Ro(Xn(n[i])?n[i]:{},o):n[i]=o}),n}var Ds=({children:e,className:t,...n})=>p.createElement("div",{className:Jo("splide__track",t),...n},p.createElement("ul",{className:"splide__list"},e)),Qo=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 Zo(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Ro({},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&&!Ao(this.options,e)&&(this.splide.options=e,this.options=Ro({},e));const t=this.getSlides();Os(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){$i.forEach(([t,n])=>{const o=this.props[n];typeof o=="function"&&e.on(t,(...i)=>{o(e,...i)})})}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,...i}=this.props;return p.createElement(t,{className:Jo("splide",e),ref:this.splideRef,...this.omit(i,["options",...$i.map(s=>s[1])])},n?p.createElement(Ds,null,o):o)}},ei=({children:e,className:t,...n})=>p.createElement("li",{className:Jo("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),p=require("react"),we=require("classnames"),w=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Gi=require("react-dom");function Dr(e){return e.type==="object"&&e.version===1}const zr="ControlSlider-module__wrapper___sHEkd",jr="ControlSlider-module__hoverArrow___A-dOH",Kr="ControlSlider-module__sliderItem___QQSkR",qr="ControlSlider-module__sliderImage___9hRl-",Ur="ControlSlider-module__arrow___05ghY",Gr="ControlSlider-module__arrowVertical___tBfVN",Yr="ControlSlider-module__nextArrow___-30Yc",Xr="ControlSlider-module__arrowInner___aEra3",Zr="ControlSlider-module__arrowIcon___S4ztF",Jr="ControlSlider-module__arrowImg___2dwJW",Qr="ControlSlider-module__mirror___brd6U",ea="ControlSlider-module__pagination___bicLF",ta="ControlSlider-module__paginationInner___bT-P-",na="ControlSlider-module__paginationVertical___zYqKw",oa="ControlSlider-module__paginationItem___nTRbk",ia="ControlSlider-module__dot___p1Qun",ra="ControlSlider-module__activeDot___LHFaj",aa="ControlSlider-module__paginationInsideBottom___R3FWn",sa="ControlSlider-module__paginationInsideTop___V-qb-",la="ControlSlider-module__paginationOutsideBottom___14w8D",ca="ControlSlider-module__paginationOutsideTop___SCLqB",ua="ControlSlider-module__paginationInsideLeft___yOBRZ",da="ControlSlider-module__paginationInsideRight___Rtt3o",pa="ControlSlider-module__paginationOutsideLeft___lahaw",ma="ControlSlider-module__paginationOutsideRight___EtuQa",ga="ControlSlider-module__imgWrapper___UjEgB",ha="ControlSlider-module__captionBlock___dJ6-j",fa="ControlSlider-module__captionTextWrapper___HFlpf",ya="ControlSlider-module__captionText___uGBVc",va="ControlSlider-module__active___WZK4G",ba="ControlSlider-module__withPointerEvents___t-18M",xa="ControlSlider-module__topLeftAlignment___zjnGM",Ca="ControlSlider-module__topCenterAlignment___gD1xW",Sa="ControlSlider-module__topRightAlignment___NMapS",wa="ControlSlider-module__middleLeftAlignment___OnUrY",$a="ControlSlider-module__middleCenterAlignment___Tdkl0",Ta="ControlSlider-module__middleRightAlignment___wEbfX",La="ControlSlider-module__bottomLeftAlignment___cTP2-",Ea="ControlSlider-module__bottomCenterAlignment___c54fB",_a="ControlSlider-module__bottomRightAlignment___kEwrz",Pa="ControlSlider-module__clickOverlay___DZA28",Aa="ControlSlider-module__contain___pLyq7",Ra="ControlSlider-module__cover___KdDat",ae={wrapper:zr,hoverArrow:jr,sliderItem:Kr,sliderImage:qr,arrow:Ur,arrowVertical:Gr,nextArrow:Yr,arrowInner:Xr,arrowIcon:Zr,arrowImg:Jr,mirror:Qr,pagination:ea,paginationInner:ta,paginationVertical:na,paginationItem:oa,dot:ia,activeDot:ra,paginationInsideBottom:aa,paginationInsideTop:sa,paginationOutsideBottom:la,paginationOutsideTop:ca,paginationInsideLeft:ua,paginationInsideRight:da,paginationOutsideLeft:pa,paginationOutsideRight:ma,imgWrapper:ga,captionBlock:ha,captionTextWrapper:fa,captionText:ya,active:va,withPointerEvents:ba,topLeftAlignment:xa,topCenterAlignment:Ca,topRightAlignment:Sa,middleLeftAlignment:wa,middleCenterAlignment:$a,middleRightAlignment:Ta,bottomLeftAlignment:La,bottomCenterAlignment:Ea,bottomRightAlignment:_a,clickOverlay:Pa,contain:Aa,cover:Ra};function Ia(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 Wa(e,t,n){return t&&Ia(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var pi="(prefers-reduced-motion: reduce)",Zt=1,ka=2,en=3,sn=4,Tn=5,zn=6,Xn=7,Fa={CREATED:Zt,MOUNTED:ka,IDLE:en,MOVING:sn,SCROLLING:Tn,DRAGGING:zn,DESTROYED:Xn};function St(e){e.length=0}function kt(e,t,n){return Array.prototype.slice.call(e,t,n)}function Pe(e){return e.bind.apply(e,[null].concat(kt(arguments,1)))}var Yi=setTimeout,_o=function(){};function mi(e){return requestAnimationFrame(e)}function no(e,t){return typeof t===e}function gn(e){return!Bo(e)&&no("object",e)}var Ho=Array.isArray,Xi=Pe(no,"function"),Rt=Pe(no,"string"),Ln=Pe(no,"undefined");function Bo(e){return e===null}function Zi(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function En(e){return Ho(e)?e:[e]}function tt(e,t){En(e).forEach(t)}function Oo(e,t){return e.indexOf(t)>-1}function jn(e,t){return e.push.apply(e,En(t)),e}function vt(e,t,n){e&&tt(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function dt(e,t){vt(e,Rt(t)?t.split(" "):t,!0)}function _n(e,t){tt(t,e.appendChild.bind(e))}function Vo(e,t){tt(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function hn(e,t){return Zi(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Ji(e,t){var n=e?kt(e.children):[];return t?n.filter(function(o){return hn(o,t)}):n}function Pn(e,t){return t?Ji(e,t)[0]:e.firstElementChild}var fn=Object.keys;function Dt(e,t,n){return e&&(n?fn(e).reverse():fn(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function yn(e){return kt(arguments,1).forEach(function(t){Dt(t,function(n,o){e[o]=t[o]})}),e}function Pt(e){return kt(arguments,1).forEach(function(t){Dt(t,function(n,o){Ho(n)?e[o]=n.slice():gn(n)?e[o]=Pt({},gn(e[o])?e[o]:{},n):e[o]=n})}),e}function gi(e,t){tt(t||fn(e),function(n){delete e[n]})}function pt(e,t){tt(e,function(n){tt(t,function(o){n&&n.removeAttribute(o)})})}function pe(e,t,n){gn(t)?Dt(t,function(o,i){pe(e,i,o)}):tt(e,function(o){Bo(n)||n===""?pt(o,t):o.setAttribute(t,String(n))})}function Jt(e,t,n){var o=document.createElement(e);return t&&(Rt(t)?dt(o,t):pe(o,t)),n&&_n(n,o),o}function ot(e,t,n){if(Ln(n))return getComputedStyle(e)[t];Bo(n)||(e.style[t]=""+n)}function vn(e,t){ot(e,"display",t)}function Qi(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function it(e,t){return e.getAttribute(t)}function hi(e,t){return e&&e.classList.contains(t)}function Je(e){return e.getBoundingClientRect()}function zt(e){tt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function er(e){return Pn(new DOMParser().parseFromString(e,"text/html").body)}function yt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function tr(e,t){return e&&e.querySelector(t)}function Do(e,t){return t?kt(e.querySelectorAll(t)):[]}function bt(e,t){vt(e,t,!1)}function Po(e){return e.timeStamp}function Bt(e){return Rt(e)?e:e?e+"px":""}var An="splide",zo="data-"+An;function pn(e,t){if(!e)throw new Error("["+An+"] "+(t||""))}var It=Math.min,Zn=Math.max,Jn=Math.floor,bn=Math.ceil,je=Math.abs;function nr(e,t,n){return je(e-t)<n}function Kn(e,t,n,o){var i=It(t,n),s=Zn(t,n);return o?i<e&&e<s:i<=e&&e<=s}function Gt(e,t,n){var o=It(t,n),i=Zn(t,n);return It(Zn(o,e),i)}function Ao(e){return+(e>0)-+(e<0)}function Ro(e,t){return tt(t,function(n){e=e.replace("%s",""+n)}),e}function jo(e){return e<10?"0"+e:""+e}var fi={};function Ma(e){return""+e+jo(fi[e]=(fi[e]||0)+1)}function or(){var e=[];function t(r,a,c,d){i(r,a,function(u,L,h){var f="addEventListener"in u,m=f?u.removeEventListener.bind(u,L,c,d):u.removeListener.bind(u,c);f?u.addEventListener(L,c,d):u.addListener(c),e.push([u,L,h,c,m])})}function n(r,a,c){i(r,a,function(d,u,L){e=e.filter(function(h){return h[0]===d&&h[1]===u&&h[2]===L&&(!c||h[3]===c)?(h[4](),!1):!0})})}function o(r,a,c){var d,u=!0;return typeof CustomEvent=="function"?d=new CustomEvent(a,{bubbles:u,detail:c}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(a,u,!1,c)),r.dispatchEvent(d),d}function i(r,a,c){tt(r,function(d){d&&tt(a,function(u){u.split(" ").forEach(function(L){var h=L.split(".");c(d,h[0],h[1])})})})}function s(){e.forEach(function(r){r[4]()}),St(e)}return{bind:t,unbind:n,dispatch:o,destroy:s}}var Ft="mounted",Io="ready",wt="move",ln="moved",Ko="click",ir="active",rr="inactive",ar="visible",sr="hidden",Ne="refresh",De="updated",tn="resize",oo="resized",lr="drag",cr="dragging",ur="dragged",io="scroll",Kt="scrolled",Na="overflow",qo="destroy",dr="arrows:mounted",pr="arrows:updated",mr="pagination:mounted",gr="pagination:updated",Uo="navigation:mounted",Go="autoplay:play",hr="autoplay:playing",Yo="autoplay:pause",Xo="lazyload:loaded",fr="sk",yr="sh",Qn="ei";function We(e){var t=e?e.event.bus:document.createDocumentFragment(),n=or();function o(s,r){n.bind(t,En(s).join(" "),function(a){r.apply(r,Ho(a.detail)?a.detail:[])})}function i(s){n.dispatch(t,s,kt(arguments,1))}return e&&e.event.on(qo,n.destroy),yn(n,{bus:t,on:o,off:Pe(n.unbind,t),emit:i})}function ro(e,t,n,o){var i=Date.now,s,r=0,a,c=!0,d=0;function u(){if(!c){if(r=e?It((i()-s)/e,1):1,n&&n(r),r>=1&&(t(),s=i(),o&&++d>=o))return h();a=mi(u)}}function L(v){v||m(),s=i()-(v?r*e:0),c=!1,a=mi(u)}function h(){c=!0}function f(){s=i(),r=0,n&&n(r)}function m(){a&&cancelAnimationFrame(a),r=0,a=0,c=!0}function g(v){e=v}function $(){return c}return{start:L,rewind:f,pause:h,cancel:m,set:g,isPaused:$}}function Ha(e){var t=e;function n(i){t=i}function o(i){return Oo(En(i),t)}return{set:n,is:o}}function Ba(e,t){var n=ro(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Oa(e,t,n){var o=e.state,i=n.breakpoints||{},s=n.reducedMotion||{},r=or(),a=[];function c(){var m=n.mediaQuery==="min";fn(i).sort(function(g,$){return m?+g-+$:+$-+g}).forEach(function(g){u(i[g],"("+(m?"min":"max")+"-width:"+g+"px)")}),u(s,pi),L()}function d(m){m&&r.destroy()}function u(m,g){var $=matchMedia(g);r.bind($,"change",L),a.push([m,$])}function L(){var m=o.is(Xn),g=n.direction,$=a.reduce(function(v,C){return Pt(v,C[1].matches?C[0]:{})},{});gi(n),f($),n.destroy?e.destroy(n.destroy==="completely"):m?(d(!0),e.mount()):g!==n.direction&&e.refresh()}function h(m){matchMedia(pi).matches&&(m?Pt(n,s):gi(n,fn(s)))}function f(m,g,$){Pt(n,m),g&&Pt(Object.getPrototypeOf(n),m),($||!o.is(Zt))&&e.emit(De,n)}return{setup:c,destroy:d,reduce:h,set:f}}var ao="Arrow",so=ao+"Left",lo=ao+"Right",vr=ao+"Up",br=ao+"Down",yi="rtl",co="ttb",fo={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[vr,lo],ArrowRight:[br,so]};function Va(e,t,n){function o(s,r,a){a=a||n.direction;var c=a===yi&&!r?1:a===co?0:-1;return fo[s]&&fo[s][c]||s.replace(/width|left|right/i,function(d,u){var L=fo[d.toLowerCase()][c]||d;return u>0?L.charAt(0).toUpperCase()+L.slice(1):L})}function i(s){return s*(n.direction===yi?1:-1)}return{resolve:o,orient:i}}var xt="role",Qt="tabindex",Da="disabled",rt="aria-",Rn=rt+"controls",xr=rt+"current",vi=rt+"selected",Qe=rt+"label",Zo=rt+"labelledby",Cr=rt+"hidden",Jo=rt+"orientation",xn=rt+"roledescription",bi=rt+"live",xi=rt+"busy",Ci=rt+"atomic",Qo=[xt,Qt,Da,Rn,xr,Qe,Zo,Cr,Jo,xn],mt=An+"__",Mt="is-",yo=An,Si=mt+"track",za=mt+"list",uo=mt+"slide",Sr=uo+"--clone",ja=uo+"__container",ei=mt+"arrows",po=mt+"arrow",wr=po+"--prev",$r=po+"--next",mo=mt+"pagination",Tr=mo+"__page",Ka=mt+"progress",qa=Ka+"__bar",Ua=mt+"toggle",Ga=mt+"spinner",Ya=mt+"sr",Xa=Mt+"initialized",jt=Mt+"active",Lr=Mt+"prev",Er=Mt+"next",Wo=Mt+"visible",ko=Mt+"loading",_r=Mt+"focus-in",Pr=Mt+"overflow",Za=[jt,Wo,Lr,Er,ko,_r,Pr],Ja={slide:uo,clone:Sr,arrows:ei,arrow:po,prev:wr,next:$r,pagination:mo,page:Tr,spinner:Ga};function Qa(e,t){if(Xi(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!hn(n,t);)n=n.parentElement;return n}var es=5,wi=200,Ar="touchstart mousedown",vo="touchmove mousemove",bo="touchend touchcancel mouseup click";function ts(e,t,n){var o=We(e),i=o.on,s=o.bind,r=e.root,a=n.i18n,c={},d=[],u=[],L=[],h,f,m;function g(){y(),M(),C()}function $(){i(Ne,v),i(Ne,g),i(De,C),s(document,Ar+" keydown",function(x){m=x.type==="keydown"},{capture:!0}),s(r,"focusin",function(){vt(r,_r,!!m)})}function v(x){var P=Qo.concat("style");St(d),bt(r,u),bt(h,L),pt([h,f],P),pt(r,x?P:["style",xn])}function C(){bt(r,u),bt(h,L),u=A(yo),L=A(Si),dt(r,u),dt(h,L),pe(r,Qe,n.label),pe(r,Zo,n.labelledby)}function y(){h=N("."+Si),f=Pn(h,"."+za),pn(h&&f,"A track/list element is missing."),jn(d,Ji(f,"."+uo+":not(."+Sr+")")),Dt({arrows:ei,pagination:mo,prev:wr,next:$r,bar:qa,toggle:Ua},function(x,P){c[P]=N("."+x)}),yn(c,{root:r,track:h,list:f,slides:d})}function M(){var x=r.id||Ma(An),P=n.role;r.id=x,h.id=h.id||x+"-track",f.id=f.id||x+"-list",!it(r,xt)&&r.tagName!=="SECTION"&&P&&pe(r,xt,P),pe(r,xn,a.carousel),pe(f,xt,"presentation")}function N(x){var P=tr(r,x);return P&&Qa(P,"."+yo)===r?P:void 0}function A(x){return[x+"--"+n.type,x+"--"+n.direction,n.drag&&x+"--draggable",n.isNavigation&&x+"--nav",x===yo&&jt]}return yn(c,{setup:g,mount:$,destroy:v})}var nn="slide",cn="loop",In="fade";function ns(e,t,n,o){var i=We(e),s=i.on,r=i.emit,a=i.bind,c=e.Components,d=e.root,u=e.options,L=u.isNavigation,h=u.updateOnMove,f=u.i18n,m=u.pagination,g=u.slideFocus,$=c.Direction.resolve,v=it(o,"style"),C=it(o,Qe),y=n>-1,M=Pn(o,"."+ja),N;function A(){y||(o.id=d.id+"-slide"+jo(t+1),pe(o,xt,m?"tabpanel":"group"),pe(o,xn,f.slide),pe(o,Qe,C||Ro(f.slideLabel,[t+1,e.length]))),x()}function x(){a(o,"click",Pe(r,Ko,W)),a(o,"keydown",Pe(r,fr,W)),s([ln,yr,Kt],k),s(Uo,T),h&&s(wt,R)}function P(){N=!0,i.destroy(),bt(o,Za),pt(o,Qo),pe(o,"style",v),pe(o,Qe,C||"")}function T(){var F=e.splides.map(function(E){var H=E.splide.Components.Slides.getAt(t);return H?H.slide.id:""}).join(" ");pe(o,Qe,Ro(f.slideX,(y?n:t)+1)),pe(o,Rn,F),pe(o,xt,g?"button":""),g&&pt(o,xn)}function R(){N||k()}function k(){if(!N){var F=e.index;D(),O(),vt(o,Lr,t===F-1),vt(o,Er,t===F+1)}}function D(){var F=X();F!==hi(o,jt)&&(vt(o,jt,F),pe(o,xr,L&&F||""),r(F?ir:rr,W))}function O(){var F=b(),E=!F&&(!X()||y);if(e.state.is([sn,Tn])||pe(o,Cr,E||""),pe(Do(o,u.focusableNodes||""),Qt,E?-1:""),g&&pe(o,Qt,E?-1:0),F!==hi(o,Wo)&&(vt(o,Wo,F),r(F?ar:sr,W)),!F&&document.activeElement===o){var H=c.Slides.getAt(e.index);H&&Qi(H.slide)}}function G(F,E,H){ot(H&&M||o,F,E)}function X(){var F=e.index;return F===t||u.cloneStatus&&F===n}function b(){if(e.is(In))return X();var F=Je(c.Elements.track),E=Je(o),H=$("left",!0),J=$("right",!0);return Jn(F[H])<=bn(E[H])&&Jn(E[J])<=bn(F[J])}function B(F,E){var H=je(F-t);return!y&&(u.rewind||e.is(cn))&&(H=It(H,e.length-H)),H<=E}var W={index:t,slideIndex:n,slide:o,container:M,isClone:y,mount:A,destroy:P,update:k,style:G,isWithin:B};return W}function os(e,t,n){var o=We(e),i=o.on,s=o.emit,r=o.bind,a=t.Elements,c=a.slides,d=a.list,u=[];function L(){h(),i(Ne,f),i(Ne,h)}function h(){c.forEach(function(k,D){g(k,D,-1)})}function f(){N(function(k){k.destroy()}),St(u)}function m(){N(function(k){k.update()})}function g(k,D,O){var G=ns(e,D,O,k);G.mount(),u.push(G),u.sort(function(X,b){return X.index-b.index})}function $(k){return k?A(function(D){return!D.isClone}):u}function v(k){var D=t.Controller,O=D.toIndex(k),G=D.hasFocus()?1:n.perPage;return A(function(X){return Kn(X.index,O,O+G-1)})}function C(k){return A(k)[0]}function y(k,D){tt(k,function(O){if(Rt(O)&&(O=er(O)),Zi(O)){var G=c[D];G?Vo(O,G):_n(d,O),dt(O,n.classes.slide),P(O,Pe(s,tn))}}),s(Ne)}function M(k){zt(A(k).map(function(D){return D.slide})),s(Ne)}function N(k,D){$(D).forEach(k)}function A(k){return u.filter(Xi(k)?k:function(D){return Rt(k)?hn(D.slide,k):Oo(En(k),D.index)})}function x(k,D,O){N(function(G){G.style(k,D,O)})}function P(k,D){var O=Do(k,"img"),G=O.length;G?O.forEach(function(X){r(X,"load error",function(){--G||D()})}):D()}function T(k){return k?c.length:u.length}function R(){return u.length>n.perPage}return{mount:L,destroy:f,update:m,register:g,get:$,getIn:v,getAt:C,add:y,remove:M,forEach:N,filter:A,style:x,getLength:T,isEnough:R}}function is(e,t,n){var o=We(e),i=o.on,s=o.bind,r=o.emit,a=t.Slides,c=t.Direction.resolve,d=t.Elements,u=d.root,L=d.track,h=d.list,f=a.getAt,m=a.style,g,$,v;function C(){y(),s(window,"resize load",Ba(Pe(r,tn))),i([De,Ne],y),i(tn,M)}function y(){g=n.direction===co,ot(u,"maxWidth",Bt(n.width)),ot(L,c("paddingLeft"),N(!1)),ot(L,c("paddingRight"),N(!0)),M(!0)}function M(W){var F=Je(u);(W||$.width!==F.width||$.height!==F.height)&&(ot(L,"height",A()),m(c("marginRight"),Bt(n.gap)),m("width",P()),m("height",T(),!0),$=F,r(oo),v!==(v=B())&&(vt(u,Pr,v),r(Na,v)))}function N(W){var F=n.padding,E=c(W?"right":"left");return F&&Bt(F[E]||(gn(F)?0:F))||"0px"}function A(){var W="";return g&&(W=x(),pn(W,"height or heightRatio is missing."),W="calc("+W+" - "+N(!1)+" - "+N(!0)+")"),W}function x(){return Bt(n.height||Je(h).width*n.heightRatio)}function P(){return n.autoWidth?null:Bt(n.fixedWidth)||(g?"":R())}function T(){return Bt(n.fixedHeight)||(g?n.autoHeight?null:R():x())}function R(){var W=Bt(n.gap);return"calc((100%"+(W&&" + "+W)+")/"+(n.perPage||1)+(W&&" - "+W)+")"}function k(){return Je(h)[c("width")]}function D(W,F){var E=f(W||0);return E?Je(E.slide)[c("width")]+(F?0:X()):0}function O(W,F){var E=f(W);if(E){var H=Je(E.slide)[c("right")],J=Je(h)[c("left")];return je(H-J)+(F?0:X())}return 0}function G(W){return O(e.length-1)-O(0)+D(0,W)}function X(){var W=f(0);return W&&parseFloat(ot(W.slide,c("marginRight")))||0}function b(W){return parseFloat(ot(L,c("padding"+(W?"Right":"Left"))))||0}function B(){return e.is(In)||G(!0)>k()}return{mount:C,resize:M,listSize:k,slideSize:D,sliderSize:G,totalSize:O,getPadding:b,isOverflow:B}}var rs=2;function as(e,t,n){var o=We(e),i=o.on,s=t.Elements,r=t.Slides,a=t.Direction.resolve,c=[],d;function u(){i(Ne,L),i([De,tn],f),(d=$())&&(m(d),t.Layout.resize(!0))}function L(){h(),u()}function h(){zt(c),St(c),o.destroy()}function f(){var v=$();d!==v&&(d<v||!v)&&o.emit(Ne)}function m(v){var C=r.get().slice(),y=C.length;if(y){for(;C.length<v;)jn(C,C);jn(C.slice(-v),C.slice(0,v)).forEach(function(M,N){var A=N<v,x=g(M.slide,N);A?Vo(x,C[0].slide):_n(s.list,x),jn(c,x),r.register(x,N-v+(A?0:y),M.index)})}}function g(v,C){var y=v.cloneNode(!0);return dt(y,n.classes.clone),y.id=e.root.id+"-clone"+jo(C+1),y}function $(){var v=n.clones;if(!e.is(cn))v=0;else if(Ln(v)){var C=n[a("fixedWidth")]&&t.Layout.slideSize(0),y=C&&bn(Je(s.track)[a("width")]/C);v=y||n[a("autoWidth")]&&e.length||n.perPage*rs}return v}return{mount:u,destroy:h}}function ss(e,t,n){var o=We(e),i=o.on,s=o.emit,r=e.state.set,a=t.Layout,c=a.slideSize,d=a.getPadding,u=a.totalSize,L=a.listSize,h=a.sliderSize,f=t.Direction,m=f.resolve,g=f.orient,$=t.Elements,v=$.list,C=$.track,y;function M(){y=t.Transition,i([Ft,oo,De,Ne],N)}function N(){t.Controller.isBusy()||(t.Scroll.cancel(),x(e.index),t.Slides.update())}function A(E,H,J,ie){E!==H&&W(E>J)&&(k(),P(R(G(),E>J),!0)),r(sn),s(wt,H,J,E),y.start(H,function(){r(en),s(ln,H,J,E),ie&&ie()})}function x(E){P(O(E,!0))}function P(E,H){if(!e.is(In)){var J=H?E:T(E);ot(v,"transform","translate"+m("X")+"("+J+"px)"),E!==J&&s(yr)}}function T(E){if(e.is(cn)){var H=D(E),J=H>t.Controller.getEnd(),ie=H<0;(ie||J)&&(E=R(E,J))}return E}function R(E,H){var J=E-B(H),ie=h();return E-=g(ie*(bn(je(J)/ie)||1))*(H?1:-1),E}function k(){P(G(),!0),y.cancel()}function D(E){for(var H=t.Slides.get(),J=0,ie=1/0,U=0;U<H.length;U++){var le=H[U].index,V=je(O(le,!0)-E);if(V<=ie)ie=V,J=le;else break}return J}function O(E,H){var J=g(u(E-1)-b(E));return H?X(J):J}function G(){var E=m("left");return Je(v)[E]-Je(C)[E]+g(d(!1))}function X(E){return n.trimSpace&&e.is(nn)&&(E=Gt(E,0,g(h(!0)-L()))),E}function b(E){var H=n.focus;return H==="center"?(L()-c(E,!0))/2:+H*c(E)||0}function B(E){return O(E?t.Controller.getEnd():0,!!n.trimSpace)}function W(E){var H=g(R(G(),E));return E?H>=0:H<=v[m("scrollWidth")]-Je(C)[m("width")]}function F(E,H){H=Ln(H)?G():H;var J=E!==!0&&g(H)<g(B(!1)),ie=E!==!1&&g(H)>g(B(!0));return J||ie}return{mount:M,move:A,jump:x,translate:P,shift:R,cancel:k,toIndex:D,toPosition:O,getPosition:G,getLimit:B,exceededLimit:F,reposition:N}}function ls(e,t,n){var o=We(e),i=o.on,s=o.emit,r=t.Move,a=r.getPosition,c=r.getLimit,d=r.toPosition,u=t.Slides,L=u.isEnough,h=u.getLength,f=n.omitEnd,m=e.is(cn),g=e.is(nn),$=Pe(G,!1),v=Pe(G,!0),C=n.start||0,y,M=C,N,A,x;function P(){T(),i([De,Ne,Qn],T),i(oo,R)}function T(){N=h(!0),A=n.perMove,x=n.perPage,y=W();var V=Gt(C,0,f?y:N-1);V!==C&&(C=V,r.reposition())}function R(){y!==W()&&s(Qn)}function k(V,re,fe){if(!le()){var me=O(V),ge=B(me);ge>-1&&(re||ge!==C)&&(J(ge),r.move(me,ge,M,fe))}}function D(V,re,fe,me){t.Scroll.scroll(V,re,fe,function(){var ge=B(r.toIndex(a()));J(f?It(ge,y):ge),me&&me()})}function O(V){var re=C;if(Rt(V)){var fe=V.match(/([+\-<>])(\d+)?/)||[],me=fe[1],ge=fe[2];me==="+"||me==="-"?re=X(C+ +(""+me+(+ge||1)),C):me===">"?re=ge?F(+ge):$(!0):me==="<"&&(re=v(!0))}else re=m?V:Gt(V,0,y);return re}function G(V,re){var fe=A||(U()?1:x),me=X(C+fe*(V?-1:1),C,!(A||U()));return me===-1&&g&&!nr(a(),c(!V),1)?V?0:y:re?me:B(me)}function X(V,re,fe){if(L()||U()){var me=b(V);me!==V&&(re=V,V=me,fe=!1),V<0||V>y?!A&&(Kn(0,V,re,!0)||Kn(y,re,V,!0))?V=F(E(V)):m?V=fe?V<0?-(N%x||x):N:V:n.rewind?V=V<0?y:0:V=-1:fe&&V!==re&&(V=F(E(re)+(V<re?-1:1)))}else V=-1;return V}function b(V){if(g&&n.trimSpace==="move"&&V!==C)for(var re=a();re===d(V,!0)&&Kn(V,0,e.length-1,!n.rewind);)V<C?--V:++V;return V}function B(V){return m?(V+N)%N||0:V}function W(){for(var V=N-(U()||m&&A?1:x);f&&V-- >0;)if(d(N-1,!0)!==d(V,!0)){V++;break}return Gt(V,0,N-1)}function F(V){return Gt(U()?V:x*V,0,y)}function E(V){return U()?It(V,y):Jn((V>=y?N-1:V)/x)}function H(V){var re=r.toIndex(V);return g?Gt(re,0,y):re}function J(V){V!==C&&(M=C,C=V)}function ie(V){return V?M:C}function U(){return!Ln(n.focus)||n.isNavigation}function le(){return e.state.is([sn,Tn])&&!!n.waitForTransition}return{mount:P,go:k,scroll:D,getNext:$,getPrev:v,getAdjacent:G,getEnd:W,setIndex:J,getIndex:ie,toIndex:F,toPage:E,toDest:H,hasFocus:U,isBusy:le}}var cs="http://www.w3.org/2000/svg",us="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",Mn=40;function ds(e,t,n){var o=We(e),i=o.on,s=o.bind,r=o.emit,a=n.classes,c=n.i18n,d=t.Elements,u=t.Controller,L=d.arrows,h=d.track,f=L,m=d.prev,g=d.next,$,v,C={};function y(){N(),i(De,M)}function M(){A(),y()}function N(){var D=n.arrows;D&&!(m&&g)&&T(),m&&g&&(yn(C,{prev:m,next:g}),vn(f,D?"":"none"),dt(f,v=ei+"--"+n.direction),D&&(x(),k(),pe([m,g],Rn,h.id),r(dr,m,g)))}function A(){o.destroy(),bt(f,v),$?(zt(L?[m,g]:f),m=g=null):pt([m,g],Qo)}function x(){i([Ft,ln,Ne,Kt,Qn],k),s(g,"click",Pe(P,">")),s(m,"click",Pe(P,"<"))}function P(D){u.go(D,!0)}function T(){f=L||Jt("div",a.arrows),m=R(!0),g=R(!1),$=!0,_n(f,[m,g]),!L&&Vo(f,h)}function R(D){var O='<button class="'+a.arrow+" "+(D?a.prev:a.next)+'" type="button"><svg xmlns="'+cs+'" viewBox="0 0 '+Mn+" "+Mn+'" width="'+Mn+'" height="'+Mn+'" focusable="false"><path d="'+(n.arrowPath||us)+'" />';return er(O)}function k(){if(m&&g){var D=e.index,O=u.getPrev(),G=u.getNext(),X=O>-1&&D<O?c.last:c.prev,b=G>-1&&D>G?c.first:c.next;m.disabled=O<0,g.disabled=G<0,pe(m,Qe,X),pe(g,Qe,b),r(pr,m,g,O,G)}}return{arrows:C,mount:y,destroy:A,update:k}}var ps=zo+"-interval";function ms(e,t,n){var o=We(e),i=o.on,s=o.bind,r=o.emit,a=ro(n.interval,e.go.bind(e,">"),x),c=a.isPaused,d=t.Elements,u=t.Elements,L=u.root,h=u.toggle,f=n.autoplay,m,g,$=f==="pause";function v(){f&&(C(),h&&pe(h,Rn,d.track.id),$||y(),A())}function C(){n.pauseOnHover&&s(L,"mouseenter mouseleave",function(T){m=T.type==="mouseenter",N()}),n.pauseOnFocus&&s(L,"focusin focusout",function(T){g=T.type==="focusin",N()}),h&&s(h,"click",function(){$?y():M(!0)}),i([wt,io,Ne],a.rewind),i(wt,P)}function y(){c()&&t.Slides.isEnough()&&(a.start(!n.resetProgress),g=m=$=!1,A(),r(Go))}function M(T){T===void 0&&(T=!0),$=!!T,A(),c()||(a.pause(),r(Yo))}function N(){$||(m||g?M(!1):y())}function A(){h&&(vt(h,jt,!$),pe(h,Qe,n.i18n[$?"play":"pause"]))}function x(T){var R=d.bar;R&&ot(R,"width",T*100+"%"),r(hr,T)}function P(T){var R=t.Slides.getAt(T);a.set(R&&+it(R.slide,ps)||n.interval)}return{mount:v,destroy:a.cancel,play:y,pause:M,isPaused:c}}function gs(e,t,n){var o=We(e),i=o.on;function s(){n.cover&&(i(Xo,Pe(a,!0)),i([Ft,De,Ne],Pe(r,!0)))}function r(c){t.Slides.forEach(function(d){var u=Pn(d.container||d.slide,"img");u&&u.src&&a(c,u,d)})}function a(c,d,u){u.style("background",c?'center/cover no-repeat url("'+d.src+'")':"",!0),vn(d,c?"none":"")}return{mount:s,destroy:Pe(r,!1)}}var hs=10,fs=600,ys=.6,vs=1.5,bs=800;function xs(e,t,n){var o=We(e),i=o.on,s=o.emit,r=e.state.set,a=t.Move,c=a.getPosition,d=a.getLimit,u=a.exceededLimit,L=a.translate,h=e.is(nn),f,m,g=1;function $(){i(wt,M),i([De,Ne],N)}function v(x,P,T,R,k){var D=c();if(M(),T&&(!h||!u())){var O=t.Layout.sliderSize(),G=Ao(x)*O*Jn(je(x)/O)||0;x=a.toPosition(t.Controller.toDest(x%O))+G}var X=nr(D,x,1);g=1,P=X?0:P||Zn(je(x-D)/vs,bs),m=R,f=ro(P,C,Pe(y,D,x,k),1),r(Tn),s(io),f.start()}function C(){r(en),m&&m(),s(Kt)}function y(x,P,T,R){var k=c(),D=x+(P-x)*A(R),O=(D-k)*g;L(k+O),h&&!T&&u()&&(g*=ys,je(O)<hs&&v(d(u(!0)),fs,!1,m,!0))}function M(){f&&f.cancel()}function N(){f&&!f.isPaused()&&(M(),C())}function A(x){var P=n.easingFunc;return P?P(x):1-Math.pow(1-x,4)}return{mount:$,destroy:M,scroll:v,cancel:N}}var Yt={passive:!1,capture:!0};function Cs(e,t,n){var o=We(e),i=o.on,s=o.emit,r=o.bind,a=o.unbind,c=e.state,d=t.Move,u=t.Scroll,L=t.Controller,h=t.Elements.track,f=t.Media.reduce,m=t.Direction,g=m.resolve,$=m.orient,v=d.getPosition,C=d.exceededLimit,y,M,N,A,x,P=!1,T,R,k;function D(){r(h,vo,_o,Yt),r(h,bo,_o,Yt),r(h,Ar,G,Yt),r(h,"click",B,{capture:!0}),r(h,"dragstart",yt),i([Ft,De],O)}function O(){var _=n.drag;ee(!_),A=_==="free"}function G(_){if(T=!1,!R){var S=ge(_);me(_.target)&&(S||!_.button)&&(L.isBusy()?yt(_,!0):(k=S?h:window,x=c.is([sn,Tn]),N=null,r(k,vo,X,Yt),r(k,bo,b,Yt),d.cancel(),u.cancel(),W(_)))}}function X(_){if(c.is(zn)||(c.set(zn),s(lr)),_.cancelable)if(x){d.translate(y+fe(U(_)));var S=le(_)>wi,j=P!==(P=C());(S||j)&&W(_),T=!0,s(cr),yt(_)}else H(_)&&(x=E(_),yt(_))}function b(_){c.is(zn)&&(c.set(en),s(ur)),x&&(F(_),yt(_)),a(k,vo,X),a(k,bo,b),x=!1}function B(_){!R&&T&&yt(_,!0)}function W(_){N=M,M=_,y=v()}function F(_){var S=J(_),j=ie(S),q=n.rewind&&n.rewindByDrag;f(!1),A?L.scroll(j,0,n.snap):e.is(In)?L.go($(Ao(S))<0?q?"<":"-":q?">":"+"):e.is(nn)&&P&&q?L.go(C(!0)?">":"<"):L.go(L.toDest(j),!0),f(!0)}function E(_){var S=n.dragMinThreshold,j=gn(S),q=j&&S.mouse||0,Y=(j?S.touch:+S)||10;return je(U(_))>(ge(_)?Y:q)}function H(_){return je(U(_))>je(U(_,!0))}function J(_){if(e.is(cn)||!P){var S=le(_);if(S&&S<wi)return U(_)/S}return 0}function ie(_){return v()+Ao(_)*It(je(_)*(n.flickPower||600),A?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function U(_,S){return re(_,S)-re(V(_),S)}function le(_){return Po(_)-Po(V(_))}function V(_){return M===_&&N||M}function re(_,S){return(ge(_)?_.changedTouches[0]:_)["page"+g(S?"Y":"X")]}function fe(_){return _/(P&&e.is(nn)?es:1)}function me(_){var S=n.noDrag;return!hn(_,"."+Tr+", ."+po)&&(!S||!hn(_,S))}function ge(_){return typeof TouchEvent<"u"&&_ instanceof TouchEvent}function I(){return x}function ee(_){R=_}return{mount:D,disable:ee,isDragging:I}}var Ss={Spacebar:" ",Right:lo,Left:so,Up:vr,Down:br};function ti(e){return e=Rt(e)?e:e.key,Ss[e]||e}var $i="keydown";function ws(e,t,n){var o=We(e),i=o.on,s=o.bind,r=o.unbind,a=e.root,c=t.Direction.resolve,d,u;function L(){h(),i(De,f),i(De,h),i(wt,g)}function h(){var v=n.keyboard;v&&(d=v==="global"?window:a,s(d,$i,$))}function f(){r(d,$i)}function m(v){u=v}function g(){var v=u;u=!0,Yi(function(){u=v})}function $(v){if(!u){var C=ti(v);C===c(so)?e.go("<"):C===c(lo)&&e.go(">")}}return{mount:L,destroy:f,disable:m}}var mn=zo+"-lazy",qn=mn+"-srcset",$s="["+mn+"], ["+qn+"]";function Ts(e,t,n){var o=We(e),i=o.on,s=o.off,r=o.bind,a=o.emit,c=n.lazyLoad==="sequential",d=[ln,Kt],u=[];function L(){n.lazyLoad&&(h(),i(Ne,h))}function h(){St(u),f(),c?v():(s(d),i(d,m),m())}function f(){t.Slides.forEach(function(C){Do(C.slide,$s).forEach(function(y){var M=it(y,mn),N=it(y,qn);if(M!==y.src||N!==y.srcset){var A=n.classes.spinner,x=y.parentElement,P=Pn(x,"."+A)||Jt("span",A,x);u.push([y,C,P]),y.src||vn(y,"none")}})})}function m(){u=u.filter(function(C){var y=n.perPage*((n.preloadPages||1)+1)-1;return C[1].isWithin(e.index,y)?g(C):!0}),u.length||s(d)}function g(C){var y=C[0];dt(C[1].slide,ko),r(y,"load error",Pe($,C)),pe(y,"src",it(y,mn)),pe(y,"srcset",it(y,qn)),pt(y,mn),pt(y,qn)}function $(C,y){var M=C[0],N=C[1];bt(N.slide,ko),y.type!=="error"&&(zt(C[2]),vn(M,""),a(Xo,M,N),a(tn)),c&&v()}function v(){u.length&&g(u.shift())}return{mount:L,destroy:Pe(St,u),check:m}}function Ls(e,t,n){var o=We(e),i=o.on,s=o.emit,r=o.bind,a=t.Slides,c=t.Elements,d=t.Controller,u=d.hasFocus,L=d.getIndex,h=d.go,f=t.Direction.resolve,m=c.pagination,g=[],$,v;function C(){y(),i([De,Ne,Qn],C);var R=n.pagination;m&&vn(m,R?"":"none"),R&&(i([wt,io,Kt],T),M(),T(),s(mr,{list:$,items:g},P(e.index)))}function y(){$&&(zt(m?kt($.children):$),bt($,v),St(g),$=null),o.destroy()}function M(){var R=e.length,k=n.classes,D=n.i18n,O=n.perPage,G=u()?d.getEnd()+1:bn(R/O);$=m||Jt("ul",k.pagination,c.track.parentElement),dt($,v=mo+"--"+x()),pe($,xt,"tablist"),pe($,Qe,D.select),pe($,Jo,x()===co?"vertical":"");for(var X=0;X<G;X++){var b=Jt("li",null,$),B=Jt("button",{class:k.page,type:"button"},b),W=a.getIn(X).map(function(E){return E.slide.id}),F=!u()&&O>1?D.pageX:D.slideX;r(B,"click",Pe(N,X)),n.paginationKeyboard&&r(B,"keydown",Pe(A,X)),pe(b,xt,"presentation"),pe(B,xt,"tab"),pe(B,Rn,W.join(" ")),pe(B,Qe,Ro(F,X+1)),pe(B,Qt,-1),g.push({li:b,button:B,page:X})}}function N(R){h(">"+R,!0)}function A(R,k){var D=g.length,O=ti(k),G=x(),X=-1;O===f(lo,!1,G)?X=++R%D:O===f(so,!1,G)?X=(--R+D)%D:O==="Home"?X=0:O==="End"&&(X=D-1);var b=g[X];b&&(Qi(b.button),h(">"+X),yt(k,!0))}function x(){return n.paginationDirection||n.direction}function P(R){return g[d.toPage(R)]}function T(){var R=P(L(!0)),k=P(L());if(R){var D=R.button;bt(D,jt),pt(D,vi),pe(D,Qt,-1)}if(k){var O=k.button;dt(O,jt),pe(O,vi,!0),pe(O,Qt,"")}s(gr,{list:$,items:g},R,k)}return{items:g,mount:C,destroy:y,getAt:P,update:T}}var Es=[" ","Enter"];function _s(e,t,n){var o=n.isNavigation,i=n.slideFocus,s=[];function r(){e.splides.forEach(function(m){m.isParent||(d(e,m.splide),d(m.splide,e))}),o&&u()}function a(){s.forEach(function(m){m.destroy()}),St(s)}function c(){a(),r()}function d(m,g){var $=We(m);$.on(wt,function(v,C,y){g.go(g.is(cn)?y:v)}),s.push($)}function u(){var m=We(e),g=m.on;g(Ko,h),g(fr,f),g([Ft,De],L),s.push(m),m.emit(Uo,e.splides)}function L(){pe(t.Elements.list,Jo,n.direction===co?"vertical":"")}function h(m){e.go(m.index)}function f(m,g){Oo(Es,ti(g))&&(h(m),yt(g))}return{setup:Pe(t.Media.set,{slideFocus:Ln(i)?o:i},!0),mount:r,destroy:a,remount:c}}function Ps(e,t,n){var o=We(e),i=o.bind,s=0;function r(){n.wheel&&i(t.Elements.track,"wheel",a,Yt)}function a(d){if(d.cancelable){var u=d.deltaY,L=u<0,h=Po(d),f=n.wheelMinThreshold||0,m=n.wheelSleep||0;je(u)>f&&h-s>m&&(e.go(L?"<":">"),s=h),c(L)&&yt(d)}}function c(d){return!n.releaseWheel||e.state.is(sn)||t.Controller.getAdjacent(d)!==-1}return{mount:r}}var As=90;function Rs(e,t,n){var o=We(e),i=o.on,s=t.Elements.track,r=n.live&&!n.isNavigation,a=Jt("span",Ya),c=ro(As,Pe(u,!1));function d(){r&&(h(!t.Autoplay.isPaused()),pe(s,Ci,!0),a.textContent="…",i(Go,Pe(h,!0)),i(Yo,Pe(h,!1)),i([ln,Kt],Pe(u,!0)))}function u(f){pe(s,xi,f),f?(_n(s,a),c.start()):(zt(a),c.cancel())}function L(){pt(s,[bi,Ci,xi]),zt(a)}function h(f){r&&pe(s,bi,f?"off":"polite")}return{mount:d,disable:h,destroy:L}}var Is=Object.freeze({__proto__:null,Media:Oa,Direction:Va,Elements:ts,Slides:os,Layout:is,Clones:as,Move:ss,Controller:ls,Arrows:ds,Autoplay:ms,Cover:gs,Scroll:xs,Drag:Cs,Keyboard:ws,LazyLoad:Ts,Pagination:Ls,Sync:_s,Wheel:Ps,Live:Rs}),Ws={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"},ks={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:Ja,i18n:Ws,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Fs(e,t,n){var o=t.Slides;function i(){We(e).on([Ft,Ne],s)}function s(){o.forEach(function(a){a.style("transform","translateX(-"+100*a.index+"%)")})}function r(a,c){o.style("transition","opacity "+n.speed+"ms "+n.easing),Yi(c)}return{mount:i,start:r,cancel:_o}}function Ms(e,t,n){var o=t.Move,i=t.Controller,s=t.Scroll,r=t.Elements.list,a=Pe(ot,r,"transition"),c;function d(){We(e).bind(r,"transitionend",function(f){f.target===r&&c&&(L(),c())})}function u(f,m){var g=o.toPosition(f,!0),$=o.getPosition(),v=h(f);je(g-$)>=1&&v>=1?n.useScroll?s.scroll(g,v,!1,m):(a("transform "+v+"ms "+n.easing),o.translate(g,!0),c=m):(o.jump(f),m())}function L(){a(""),s.cancel()}function h(f){var m=n.rewindSpeed;if(e.is(nn)&&m){var g=i.getIndex(!0),$=i.getEnd();if(g===0&&f>=$||g>=$&&f===0)return m}return n.speed}return{mount:d,start:u,cancel:L}}var Ns=(function(){function e(n,o){this.event=We(),this.Components={},this.state=Ha(Zt),this.splides=[],this._o={},this._E={};var i=Rt(n)?tr(document,n):n;pn(i,i+" is invalid."),this.root=i,o=Pt({label:it(i,Qe)||"",labelledby:it(i,Zo)||""},ks,e.defaults,o||{});try{Pt(o,JSON.parse(it(i,zo)))}catch{pn(!1,"Invalid JSON")}this._o=Object.create(Pt({},o))}var t=e.prototype;return t.mount=function(o,i){var s=this,r=this.state,a=this.Components;pn(r.is([Zt,Xn]),"Already mounted!"),r.set(Zt),this._C=a,this._T=i||this._T||(this.is(In)?Fs:Ms),this._E=o||this._E;var c=yn({},Is,this._E,{Transition:this._T});return Dt(c,function(d,u){var L=d(s,a,s._o);a[u]=L,L.setup&&L.setup()}),Dt(a,function(d){d.mount&&d.mount()}),this.emit(Ft),dt(this.root,Xa),r.set(en),this.emit(Io),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(en)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},t.go=function(o){return this._C.Controller.go(o),this},t.on=function(o,i){return this.event.on(o,i),this},t.off=function(o){return this.event.off(o),this},t.emit=function(o){var i;return(i=this.event).emit.apply(i,[o].concat(kt(arguments,1))),this},t.add=function(o,i){return this._C.Slides.add(o,i),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(Ne),this},t.destroy=function(o){o===void 0&&(o=!0);var i=this.event,s=this.state;return s.is(Zt)?We(this).on(Io,this.destroy.bind(this,o)):(Dt(this._C,function(r){r.destroy&&r.destroy(o)},!0),i.emit(qo),i.destroy(),o&&St(this.splides),s.set(Xn)),this},Wa(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})(),ni=Ns;ni.defaults={};ni.STATES=Fa;var Ti=[[Ft,"onMounted"],[Io,"onReady"],[wt,"onMove"],[ln,"onMoved"],[Ko,"onClick"],[ir,"onActive"],[rr,"onInactive"],[ar,"onVisible"],[sr,"onHidden"],[Ne,"onRefresh"],[De,"onUpdated"],[tn,"onResize"],[oo,"onResized"],[lr,"onDrag"],[cr,"onDragging"],[ur,"onDragged"],[io,"onScroll"],[Kt,"onScrolled"],[qo,"onDestroy"],[dr,"onArrowsMounted"],[pr,"onArrowsUpdated"],[mr,"onPaginationMounted"],[gr,"onPaginationUpdated"],[Uo,"onNavigationMounted"],[Go,"onAutoplayPlay"],[hr,"onAutoplayPlaying"],[Yo,"onAutoplayPause"],[Xo,"onLazyLoadLoaded"]];function oi(...e){return e.filter(Boolean).join(" ")}function eo(e){return e!==null&&typeof e=="object"}function Fo(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!Fo(n,t[o]));if(eo(e)&&eo(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(i=>!Object.prototype.hasOwnProperty.call(t,i)||!Fo(e[i],t[i]))}return e===t}function Hs(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function Bs(e,t){if(e){const n=Object.keys(e);for(let o=0;o<n.length;o++){const i=n[o];if(i!=="__proto__"&&t(e[i],i)===!1)break}}return e}function Mo(e,t){const n=e;return Bs(t,(o,i)=>{Array.isArray(o)?n[i]=o.slice():eo(o)?n[i]=Mo(eo(n[i])?n[i]:{},o):n[i]=o}),n}var Os=({children:e,className:t,...n})=>p.createElement("div",{className:oi("splide__track",t),...n},p.createElement("ul",{className:"splide__list"},e)),ii=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 ni(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Mo({},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&&!Fo(this.options,e)&&(this.splide.options=e,this.options=Mo({},e));const t=this.getSlides();Hs(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){Ti.forEach(([t,n])=>{const o=this.props[n];typeof o=="function"&&e.on(t,(...i)=>{o(e,...i)})})}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,...i}=this.props;return p.createElement(t,{className:oi("splide",e),ref:this.splideRef,...this.omit(i,["options",...Ti.map(s=>s[1])])},n?p.createElement(Os,null,o):o)}},ri=({children:e,className:t,...n})=>p.createElement("li",{className:oi("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 zs="RichTextRenderer-module__link___BWeZ2",js={link:zs},Ks=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(o=>/^\d/.test(o))},co=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Ks(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function yt(e){const{color:t,...n}=e;return n}function Je(e,t){var i,s,r;const{fontSize:n,lineHeight:o}=e;return{fontFamily:co(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(n,t),lineHeight:o!==void 0?T.scalingValue(o,t):void 0,textTransform:(i=e.textAppearance)==null?void 0:i.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(r=e.textAppearance)==null?void 0:r.fontVariant,color:e.color}}const vn=({content:e})=>{const t=n=>n.map((o,i)=>o.type==="link"?l.jsx("a",{className:js.link,href:o.value,target:o.target,children:t(o.children)},i):l.jsx("span",{style:Us(o),children:o.text},i));return l.jsx(l.Fragment,{children:e.map((n,o)=>{const i=n.children;return l.jsx("div",{children:t(i)},o)})})};function Us(e){return{...e.fontFamily&&{fontFamily:co(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 qs="SvgImage-module__svg___q3xE-",Gs="SvgImage-module__img___VsTm-",Ti={svg:qs,img:Gs},Ys=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Xs=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Lt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:i})=>{const[s,r]=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 a=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');r(a)}},[]),!Ys(e)||!s?l.jsx("img",{src:e,alt:"",className:Ce(Ti.img,o),style:i}):l.jsx("span",{"data-supports-mask":s,className:Ce(Ti.svg,o),style:{"--svg":Xs(e),"--fill":t,"--hover-fill":n,...i??{}}})},Zs={"top-left":ae.topLeftAlignment,"top-center":ae.topCenterAlignment,"top-right":ae.topRightAlignment,"middle-left":ae.middleLeftAlignment,"middle-center":ae.middleCenterAlignment,"middle-right":ae.middleRightAlignment,"bottom-left":ae.bottomLeftAlignment,"bottom-center":ae.bottomCenterAlignment,"bottom-right":ae.bottomRightAlignment};function Js({settings:e,content:t,styles:n,isEditor:o}){const[i,s]=p.useState(null),{widthSettings:r,fontSettings:a,letterSpacing:c,textAlign:u,wordSpacing:d,fontSizeLineHeight:$,textAppearance:h,color:y}=n.imageCaption,[m,g]=p.useState(void 0),[S,f]=p.useState(null),[b,_]=p.useState(0),[E,P]=p.useState(0),{direction:L,transition:v,controls:C,pagination:R,imageCaption:H,triggers:W}=e,O=p.useRef(v.type),{x:D,y:j}=e.controls.offset,U=w=>{i&&i.go(w)};return p.useEffect(()=>{if(!S)return;const w=new ResizeObserver(N=>{if(!i)return;const[F]=N;g({width:Math.round(F.contentRect.width),height:Math.round(F.contentRect.height)})});return w.observe(S),()=>w.unobserve(S)},[S]),p.useEffect(()=>{!i||O.current===v.type||(P(w=>w+1),O.current=v.type)},[v.type]),l.jsx("div",{className:Ce(ae.wrapper,{[ae.editor]:o}),ref:f,children:l.jsxs("div",{className:ae.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:v.backgroundColor&&v.type==="fade in"?v.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:Ce(ae.captionBlock),children:l.jsx("div",{className:ae.captionTextWrapper,children:t.map((w,N)=>l.jsx("div",{className:Ce(ae.captionText,Zs[H.alignment],{[ae.withPointerEvents]:N===b&&o,[ae.active]:N===b}),style:{fontFamily:co(a.fontFamily),fontWeight:a.fontWeight,fontStyle:a.fontStyle,width:r.sizing==="auto"?"max-content":T.scalingValue(r.width,o),letterSpacing:T.scalingValue(c,o),wordSpacing:T.scalingValue(d,o),textAlign:u,fontSize:T.scalingValue($.fontSize,o),lineHeight:T.scalingValue($.lineHeight,o),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:y,transitionDuration:v.duration?`${Math.round(parseInt(v.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:ae.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(vn,{content:w.imageCaption})})},N))})}),l.jsx(Qo,{onMove:w=>{_(w.index)},ref:s,options:{arrows:!1,speed:v.duration?parseInt(v.duration):500,autoplay:W.autoPlay!==null,...W.autoPlay!==null&&{interval:parseInt(W.autoPlay)*1e3},direction:L==="horiz"||v.type==="fade in"?"ltr":"ttb",pagination:!1,drag:W.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:v.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((w,N)=>l.jsx(ei,{children:l.jsx("div",{className:ae.sliderItem,children:l.jsx("div",{className:ae.imgWrapper,children:l.jsx("img",{className:Ce(ae.sliderImage,{[ae.contain]:w.image.objectFit==="contain",[ae.cover]:w.image.objectFit==="cover"}),src:w.image.url,alt:w.image.name??""})})})},N))},E),C.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Ce(ae.arrow,{[ae.arrowVertical]:L==="vert",[ae.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:l.jsxs("button",{onClick:()=>{U("-1")},className:ae.arrowInner,style:{transform:`translate(${T.scalingValue(D,o)}, ${T.scalingValue(j*(L==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&l.jsx(Lt,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:Ce(ae.arrowImg,ae.mirror)}),!C.arrowsImgUrl&&l.jsx(Li,{color:C.color,className:Ce(ae.arrowIcon,ae.arrowImg,ae.mirror)})]})}),l.jsx("div",{className:Ce(ae.arrow,ae.nextArrow,{[ae.arrowVertical]:L==="vert",[ae.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:l.jsxs("button",{className:ae.arrowInner,onClick:()=>U("+1"),style:{transform:`translate(${T.scalingValue(D*(L==="horiz"?-1:1),o)}, ${T.scalingValue(j,o)}) scale(${e.controls.scale/100}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&l.jsx(Lt,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:ae.arrowImg}),!C.arrowsImgUrl&&l.jsx(Li,{color:C.color,className:Ce(ae.arrowIcon,ae.arrowImg)})]})})]}),W.triggersList.click&&l.jsx("div",{className:ae.clickOverlay,onClick:()=>{i&&i.go("+1")}}),R.isActive&&l.jsx("div",{className:Ce(ae.pagination,{[ae.paginationInsideBottom]:R.position==="inside-1"&&L==="horiz",[ae.paginationInsideTop]:R.position==="inside-2"&&L==="horiz",[ae.paginationOutsideBottom]:R.position==="outside-1"&&L==="horiz",[ae.paginationOutsideTop]:R.position==="outside-2"&&L==="horiz",[ae.paginationInsideLeft]:R.position==="inside-1"&&L==="vert",[ae.paginationInsideRight]:R.position==="inside-2"&&L==="vert",[ae.paginationOutsideLeft]:R.position==="outside-1"&&L==="vert",[ae.paginationOutsideRight]:R.position==="outside-2"&&L==="vert",[ae.paginationVertical]:L==="vert"}),children:l.jsx("div",{className:ae.paginationInner,style:{backgroundColor:R.colors[2],transform:`scale(${R.scale/100}) translate(${T.scalingValue(R.offset.x,o)}, ${T.scalingValue(R.offset.y,o)}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:t.map((w,N)=>l.jsx("button",{onClick:()=>{i&&i.go(N)},className:Ce(ae.paginationItem),children:l.jsx("div",{className:Ce(ae.dot,{[ae.activeDot]:N===b}),style:{backgroundColor:N===b?R.colors[0]:R.colors[1],"--pagination-hover-color":R.hover}})},N))})})]})})}function Li({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 Qs={element:Js,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},el="ImageRevealSlider-module__imageRevealSlider___UE5Ob",tl="ImageRevealSlider-module__image___Qjt-e",nl="ImageRevealSlider-module__link___N-iLG",ol="ImageRevealSlider-module__cursor___2U03d",Dt={imageRevealSlider:el,image:tl,link:nl,cursor:ol};function Ei(e,t,n){for(const o of n){const i=new Image;i.src=o.url;const s=o.width?Number.parseFloat(o.width):i.naturalWidth,r=i.naturalHeight/i.naturalWidth*s,a=s/2,c=r/2;if(e>=o.x-a&&e<=o.x+a&&t>=o.y-c&&t<=o.y+c)return!0}return!1}function yo(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function il(e,t,n,o){let i,s;if(t==="custom"){i=n;const r=await yo(e);s=r.height/r.width*i}else if(t==="random"){i=Math.random()*(o.max-o.min)+o.min;const r=await yo(e);s=r.height/r.width*i}else{const r=await yo(e);i=r.width,s=r.height}return{width:i,height:s,finalWidth:`${i}px`}}function rl({settings:e,content:t,isEditor:n}){const[o,i]=p.useState(null),[s,r]=p.useState([]),[a,c]=p.useState(0),u=p.useRef(0),[d,$]=p.useState({x:0,y:0}),[h,y]=p.useState(1),[m,g]=p.useState("none"),S=p.useRef({x:0,y:0}),[f,b]=p.useState(!1),{sizeType:_,imageWidth:E,randomRangeImageWidth:P}=e.imageSize,{revealPosition:L,visible:v}=e.position,{cursorType:C,target:R,defaultCursorScale:H,defaultCursor:W,hoverCursorScale:O,hoverCursor:D}=e.cursor;p.useEffect(()=>{if(!o)return;const w=(M,I)=>{const V=o.getBoundingClientRect(),te=M-V.left,ue=I-V.top;if($({x:te,y:ue}),C==="system"){g("none"),y(1);return}const re=te,me=ue,B=document.elementFromPoint(V.left+re,V.top+me);if(B&&B.closest("a")){g("none"),y(1);return}const Q=Ei(re,me,s)||R==="area"?{img:D??"none",scale:O}:{img:W??"none",scale:H};g(Q.img),y(Q.scale)},N=M=>{M.stopPropagation(),S.current={x:M.clientX,y:M.clientY},w(M.clientX,M.clientY)},F=()=>{f&&w(S.current.x,S.current.y)};return o.addEventListener("mousemove",N),window.addEventListener("scroll",F,!0),()=>{o.removeEventListener("mousemove",N),window.removeEventListener("scroll",F,!0)}},[o,f,d,C,R,D,W,O,H,s]),p.useEffect(()=>{f||(g("none"),y(0))},[f]);const j=async(w,N,F,M={})=>{const{width:I,height:V,finalWidth:te}=await il(w.image.url,_,E,P);let ue=0,re=0;L==="same"?(ue=N/2,re=F/2):(ue=M.x??Math.random()*N,re=M.y??Math.random()*F);const me=Math.min(Math.max(ue,I/2),N-I/2),B=Math.min(Math.max(re,V/2),F-V/2);return{id:u.current++,url:w.image.url,link:w.link,name:w.image.name,x:me,y:B,width:te}};p.useEffect(()=>{if(!o||t.length===0)return;const w=o.getBoundingClientRect(),N=w.width,F=w.height,M=[];(async()=>{const V=t[0],te=await j(V,N,F);M.push(te),r(M),c(1)})()},[_,E,P,L,o]),p.useEffect(()=>{v==="last One"&&r(w=>w.length>0?[w[w.length-1]]:[])},[v]);const U=async w=>{if(!o)return;const N=o.getBoundingClientRect(),F=w.clientX-N.left,M=w.clientY-N.top;if(R==="image"&&!Ei(F,M,s))return;let I=0,V=0;L==="on Click"?(I=F,V=M):L==="same"?(I=N.width/2,V=N.height/2):(I=Math.random()*N.width,V=Math.random()*N.height);const te=t[a],ue=await j(te,N.width,N.height,{x:I,y:V});r(re=>v==="all"?[...re,ue]:[ue]),c(re=>re>=t.length-1?0:re+1)};return l.jsxs("div",{ref:i,onClick:U,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),className:Dt.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[s.map(w=>l.jsx("div",{className:Dt.wrapper,style:{top:`${w.y}px`,left:`${w.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:w.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:R==="area"&&w.link?l.jsx("a",{href:w.link,target:"_blank",className:Dt.link,children:l.jsx("img",{src:w.url,alt:w.name,className:Dt.image},w.id)}):l.jsx("img",{src:w.url,alt:w.name,className:Dt.image},w.id)},w.id)),f&&l.jsx("div",{className:Dt.cursor,style:{left:`${d.x}px`,top:`${d.y}px`,transform:`translate(-50%, -50%) scale(${h})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const al={element:rl,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},sl="LightBox-module__hidden___9s-9x",ll="LightBox-module__heroImage___sTxNF",cl="LightBox-module__background___rm9ml",dl="LightBox-module__editor___4ACaY",ul="LightBox-module__contentStyle___Bgnsq",pl="LightBox-module__imageStyle___tLIlB",ml="LightBox-module__imgWrapper___LuFUp",gl="LightBox-module__contain___8-yaS",hl="LightBox-module__cover___hNvOG",fl="LightBox-module__caption___b6L2I",yl="LightBox-module__captionTextInner___rCGNH",vl="LightBox-module__lightboxSplide___XFuWC",bl="LightBox-module__arrow___iz38X",xl="LightBox-module__arrowVertical___Zfz81",Cl="LightBox-module__nextArrow___zkAQN",Sl="LightBox-module__arrowInner___p48sW",wl="LightBox-module__arrowIcon___3VaFf",$l="LightBox-module__arrowImg___pNV88",Tl="LightBox-module__mirror___pjeXc",Ll="LightBox-module__thumbsWrapper___GB-nU",El="LightBox-module__thumbsContainerVertical___wttk5",_l="LightBox-module__thumbsContainer___osSma",Pl="LightBox-module__thumbsAlignStart___MO6tY",Al="LightBox-module__thumbsAlignCenter___Q4sUx",Rl="LightBox-module__thumbsAlignEnd___p4y9R",Wl="LightBox-module__thumbItem___HvnF3",Il="LightBox-module__closeButton___g2khP",kl="LightBox-module__fadeIn___0m5GW",Fl="LightBox-module__slideInLeft___gPYwC",Ml="LightBox-module__slideInRight___S-pPp",Hl="LightBox-module__slideInTop___DFdAj",Nl="LightBox-module__slideInBottom___m27kZ",Bl="LightBox-module__fadeOut___55qBR",Ol="LightBox-module__slideOutLeft___NvU7P",Vl="LightBox-module__slideOutRight___SK7eC",Dl="LightBox-module__slideOutTop___Vgg0z",zl="LightBox-module__slideOutBottom___nJ0Ef",jl="LightBox-module__scaleSlide___vZriG",X={hidden:sl,heroImage:ll,background:cl,editor:dl,contentStyle:ul,imageStyle:pl,imgWrapper:ml,contain:gl,cover:hl,caption:fl,captionTextInner:yl,lightboxSplide:vl,arrow:bl,arrowVertical:xl,nextArrow:Cl,arrowInner:Sl,arrowIcon:wl,arrowImg:$l,mirror:Tl,thumbsWrapper:Ll,thumbsContainerVertical:El,thumbsContainer:_l,thumbsAlignStart:Pl,thumbsAlignCenter:Al,thumbsAlignEnd:Rl,thumbItem:Wl,closeButton:Il,fadeIn:kl,slideInLeft:Fl,slideInRight:Ml,slideInTop:Hl,slideInBottom:Nl,fadeOut:Bl,slideOutLeft:Ol,slideOutRight:Vl,slideOutTop:Dl,slideOutBottom:zl,scaleSlide:jl},In=(e,t,n)=>{const o={},[i,s]=e.split("-");return i==="top"?(o.top="0",o.bottom="auto"):i==="middle"?(o.top="50%",o.bottom="auto"):i==="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"),i==="middle"&&s==="center"?o.transform=`translate(calc(-50% + ${T.scalingValue(t.x,n)}), calc(-50% + ${T.scalingValue(t.y,n)}))`:i==="middle"?o.transform=`translate(${T.scalingValue(t.x,n)}, calc(-50% + ${T.scalingValue(t.y,n)}))`:s==="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 Pr(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function _i(e){const t=e.getBoundingClientRect(),n=Pr(e),o=Math.max(0,t.width-n.left-n.right),i=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,r=e.naturalHeight,a=o/i,c=s/r;let u,d;c>a?(u=o,d=o/c):(d=i,u=i*c);const $=t.left+n.left,h=t.top+n.top,y=(o-u)/2+$,m=(i-d)/2+h;return{x:y,y:m,width:u,height:d}}function Pi(e){const t=e.getBoundingClientRect(),n=Pr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Ai(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const o=t[1].split(",").map(i=>parseFloat(i.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 Kl(e,t){const n=(()=>{if(e==="fade in")return X.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return X.slideInLeft;case"right":return X.slideInRight;case"top":return X.slideInTop;case"bottom":return X.slideInBottom;default:return X.slideInRight}return X.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return X.fadeIn;if(e==="slide in")switch(t){case"left":return X.slideInLeft;case"right":return X.slideInRight;case"top":return X.slideInTop;case"bottom":return X.slideInBottom;default:return X.slideInRight}return X.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return X.fadeOut;if(e==="slide in")switch(t){case"left":return X.slideOutLeft;case"right":return X.slideOutRight;case"top":return X.slideOutTop;case"bottom":return X.slideOutBottom;default:return X.slideOutRight}return X.fadeOut})(),s=(()=>{if(e==="fade in")return X.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return X.slideOutLeft;case"right":return X.slideOutRight;case"top":return X.slideOutTop;case"bottom":return X.slideOutBottom;default:return X.slideOutRight}return X.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:i,disappearClass:s}}const Ul=({settings:e,content:t,styles:n,portalId:o,activeEvent:i,isEditor:s})=>{const[r,a]=p.useState(!1),{url:c}=e.thumbnailBlock.cover;return p.useEffect(()=>{i==="close"&&a(!1),i==="open"&&a(!0)},[i]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:c,alt:"Cover",className:X.heroImage,onClick:()=>a(!0)}),l.jsx(ql,{isOpen:r,onClose:()=>a(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:s})]})},ql=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:i,portalId:s,isEditor:r,metadata:a})=>{var A;const[c,u]=p.useState(0),[d,$]=p.useState(0),[h,y]=p.useState(!1),[m,g]=p.useState(!1),[S,f]=p.useState({}),b=p.useRef(null),_=p.useRef(null),E=p.useRef(null),P=p.useRef(!1),L=p.useRef(null),v=p.useRef(null),C=p.useRef(null),R=p.useRef(null),H=p.useRef(!1),W=p.useRef(null),[O,D]=p.useState(!1),{appear:j,triggers:U,slider:w,thumbnail:N,controls:F,area:M,caption:I,layout:V}=i.lightboxBlock,{appearClass:te,backdropAppearClass:ue,backdropDisappearClass:re,disappearClass:me}=Kl(j.type,j.direction),B=(a==null?void 0:a.itemId)??null;p.useEffect(()=>{const x=()=>{setTimeout(()=>{var q,J;(J=(q=b.current)==null?void 0:q.splide)==null||J.refresh()},16)},z=()=>{$(q=>q+1)};return window.addEventListener("ArticleEditor.Layout:change",x),window.addEventListener("ArticleEditor.ComponentContent:change",z),()=>{window.removeEventListener("ArticleEditor.Layout:change",x),window.removeEventListener("ArticleEditor.ComponentContent:change",z)}},[]),p.useEffect(()=>{if(!e||!N.isActive){D(!1);return}const x=W.current;if(!x)return;const z=()=>{w.direction==="horiz"?D(x.scrollWidth>x.clientWidth):D(x.scrollHeight>x.clientHeight)};z();const q=new ResizeObserver(z);return q.observe(x),()=>q.disconnect()},[e,N.isActive,n.length,S,w.direction]);const Q=p.useCallback(()=>{const x=window.matchMedia("(max-width: 768px)").matches,z=Ai(M.color);x&&!r&&z>.9&&(document.body.style.backgroundColor=""),y(!0),P.current=!0;const q=J=>{J.target===L.current&&J.animationName&&(L.current&&v.current&&L.current.removeEventListener("animationend",v.current),v.current=null,P.current&&(P.current=!1,t()),y(!1))};L.current&&(v.current=q,L.current.addEventListener("animationend",q))},[t,M.color,r]),G=(x,z,q)=>{var J,se;if(x){if(U.type==="click"&&U.switch==="image")U.repeat==="close"&&c===n.length-1?Q():(J=b.current)==null||J.go("+1");else if(U.type==="click"&&U.switch==="50/50"){const le=x.getBoundingClientRect(),ce=z-le.left,he=q-le.top,K=le.width,ee=le.height;let Z;w.direction==="horiz"?Z=ce<K/2?"-1":"+1":Z=he<ee/2?"-1":"+1",(se=b.current)==null||se.go(Z)}}},Y=x=>{if(H.current){H.current=!1;return}const z=n[c],q=(z==null?void 0:z.image.objectFit)==="cover";let J,se;if("changedTouches"in x&&x.changedTouches.length>0)J=x.changedTouches[0].clientX,se=x.changedTouches[0].clientY;else if("clientX"in x)J=x.clientX,se=x.clientY;else return;let le;if(q&&E.current){const ce=Pi(E.current);le=J>=ce.left&&J<=ce.right&&se>=ce.top&&se<=ce.bottom}else{const ce=E.current?_i(E.current):null;if(!ce){x.target===x.currentTarget&&Q();return}le=J>=ce.x&&J<=ce.x+ce.width&&se>=ce.y&&se<=ce.y+ce.height}le?G(E.current,J,se):Q()},ie=x=>{const z=x.target;(z.classList.contains(X.thumbsWrapper)||z.classList.contains(X.thumbsContainer))&&Y(x)};p.useEffect(()=>{if(!e)return;const x=z=>{var q,J;if(z.key==="Escape"){Q();return}if(z.key==="ArrowRight"){u(se=>(se+1)%Math.max(n.length,1)),(q=b.current)==null||q.go("+1");return}z.key==="ArrowLeft"&&(u(se=>(se-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=b.current)==null||J.go("-1"))};return window.addEventListener("keydown",x),()=>{window.removeEventListener("keydown",x)}},[e,Q,n.length]),p.useEffect(()=>{if(e){if(u(0),$(z=>z+1),P.current=!1,y(!1),g(!1),f({}),!B)return;const x=new CustomEvent("page-overlay",{detail:{itemId:B}});window.dispatchEvent(x)}return()=>{L.current&&v.current&&(L.current.removeEventListener("animationend",v.current),v.current=null),g(!1)}},[e,B]),p.useEffect(()=>{_.current!==null&&_.current!==w.type&&$(x=>x+1),_.current=w.type},[w.type]),p.useEffect(()=>{if(!e)return;const x=document.body.style.overflow,z=window.matchMedia("(max-width: 768px)").matches,q=Ai(M.color);document.body.style.overflow="hidden",g(!1);const J=le=>{le.target===L.current&&!P.current&&le.animationName&&(z&&!r&&q>.9&&(document.body.style.backgroundColor=M.color),g(!0),L.current&&C.current&&L.current.removeEventListener("animationend",C.current),C.current=null)};L.current&&(C.current=J,L.current.addEventListener("animationend",J));const se=le=>{const ce=le.target;ce&&(ce.closest(`.${X.thumbsWrapper}`)||ce.closest(`.${X.thumbsContainer}`))||w.type!=="slide"&&le.preventDefault()};return document.addEventListener("touchmove",se,{passive:!1}),()=>{document.body.style.overflow=x,document.removeEventListener("touchmove",se),L.current&&C.current&&(L.current.removeEventListener("animationend",C.current),C.current=null),g(!1)}},[e,r,M.color,w.type]),p.useEffect(()=>{if(!e)return;const x=z=>{var J,se;if(P.current){z.stopPropagation();return}if(H.current){H.current=!1;return}const q=z.target;if(!(q&&(q.closest(`.${X.thumbsContainer}`)||q.closest(`.${X.thumbItem}`)||q.closest(`.${X.arrow}`)||q.closest(`.${X.closeButton}`)||q.closest(`.${X.caption}`)))){if(w.type==="slide"&&U.type==="drag"&&((se=(J=b.current)==null?void 0:J.splide)!=null&&se.root)){const le=b.current.splide.root;if(q&&(le.contains(q)||le===q))return}if(z.touches.length===0&&z.changedTouches.length>0){const le=n[c],ce=(le==null?void 0:le.image.objectFit)==="cover",he=z.changedTouches[0];let K;if(ce&&E.current){const ee=Pi(E.current);K=he.clientX>=ee.left&&he.clientX<=ee.right&&he.clientY>=ee.top&&he.clientY<=ee.bottom}else{const ee=E.current?_i(E.current):null;if(!ee)return;K=he.clientX>=ee.x&&he.clientX<=ee.x+ee.width&&he.clientY>=ee.y&&he.clientY<=ee.y+ee.height}if(!K){z.stopPropagation(),P.current=!0;const ee=Z=>{Z.stopPropagation(),Z.preventDefault(),document.removeEventListener("click",ee,!0)};document.addEventListener("click",ee,!0),Q()}}}};return document.addEventListener("touchend",x,{passive:!0}),()=>{document.removeEventListener("touchend",x)}},[e,Q,c,n]);const k=(w.type==="scale"||w.type==="fade")&&w.direction==="vert"&&U.type==="drag";p.useEffect(()=>{var Z,de;if(!e||!k||!((de=(Z=b.current)==null?void 0:Z.splide)!=null&&de.root))return;const x=b.current.splide.root,z=30,q=(oe,pe)=>{if(R.current){const ve=Math.abs(oe-R.current.x),Pe=Math.abs(pe-R.current.y);(ve>0||Pe>0)&&(H.current=!0)}},J=oe=>{R.current&&(oe.preventDefault(),q(oe.clientX,oe.clientY))},se=oe=>{R.current&&oe.touches.length>0&&(oe.preventDefault(),q(oe.touches[0].clientX,oe.touches[0].clientY))},le=(oe,pe)=>{if(!R.current||!b.current){R.current=null;return}const ve=Math.abs(oe-R.current.x),Pe=Math.abs(pe-R.current.y);Pe>z&&Pe>ve&&b.current.go(pe<R.current.y?"+1":"-1"),R.current=null},ce=oe=>{R.current&&le(oe.clientX,oe.clientY),document.removeEventListener("pointerup",ce),document.removeEventListener("pointercancel",ce),document.removeEventListener("pointermove",J)},he=oe=>{if(R.current){if(oe.changedTouches.length>0){const pe=oe.changedTouches[0];le(pe.clientX,pe.clientY)}document.removeEventListener("touchend",he),document.removeEventListener("touchcancel",he),document.removeEventListener("touchmove",se)}},K=oe=>{R.current={x:oe.clientX,y:oe.clientY},H.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",ce),document.addEventListener("pointercancel",ce)},ee=oe=>{oe.touches.length>0&&(R.current={x:oe.touches[0].clientX,y:oe.touches[0].clientY},H.current=!1,document.addEventListener("touchmove",se,{passive:!1}),document.addEventListener("touchend",he),document.addEventListener("touchcancel",he))};return x.addEventListener("pointerdown",K),x.addEventListener("touchstart",ee),()=>{x.removeEventListener("pointerdown",K),x.removeEventListener("touchstart",ee),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",ce),document.removeEventListener("pointercancel",ce),document.removeEventListener("touchmove",se),document.removeEventListener("touchend",he),document.removeEventListener("touchcancel",he),R.current=null,H.current=!1}},[e,k,d]);const ne={backgroundColor:M.color,backdropFilter:`blur(${M.blur}px)`,animationDuration:`${parseInt(j.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Ui.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:r?null:L,className:Ce(X.background,h?re:ue,{[X.editor]:r},{[X.hidden]:!e}),style:{...ne,...m&&!r&&!h?{position:"absolute"}:{}}}),l.jsxs("div",{ref:r?L:null,className:Ce(X.contentStyle,h?me:te,{[X.editor]:r},{[X.hidden]:!e}),style:{animationDuration:`${parseInt(j.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(Qo,{onMove:x=>u(x.index),ref:b,className:X.lightboxSplide,options:{arrows:!1,speed:w.duration?parseInt(w.duration):500,direction:w.direction==="horiz"||w.type==="fade"||w.type==="scale"?"ltr":"ttb",pagination:!1,drag:U.type==="drag"&&!k,perPage:1,width:"100%",height:"100%",type:w.type==="fade"||w.type==="scale"?"fade":"loop",padding:0,rewind:U.repeat!=="close",start:0},style:{"--splide-speed":w.duration},children:n.map((x,z)=>{const q=In(V.position,V.offset,r),J=`${T.scalingValue(V.padding.top,r)} ${T.scalingValue(V.padding.right,r)} ${T.scalingValue(V.padding.bottom,r)} ${T.scalingValue(V.padding.left,r)}`,se=w.type==="scale"?(()=>{const{transform:le,...ce}=q;return{...ce,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":le||"none"}})():{...q,position:"absolute",padding:J,boxSizing:"border-box"};return l.jsx(ei,{children:l.jsx("div",{className:X.imgWrapper,onClick:Y,children:l.jsx("img",{ref:z===c?E:null,className:Ce(X.imageStyle,{[X.contain]:x.image.objectFit==="contain",[X.cover]:x.image.objectFit==="cover",[X.scaleSlide]:w.type==="scale"}),src:x.image.url,alt:x.image.name??"",style:{...se,pointerEvents:x.image.objectFit==="contain"?"none":"auto"}})})},z)})},d),F.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Ce(X.arrow,{[X.arrowVertical]:w.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:l.jsxs("button",{className:X.arrowInner,style:{transform:`translate(${T.scalingValue(F.offset.x,r)}, ${T.scalingValue(F.offset.y*(w.direction==="horiz"?1:-1),r)}) scale(${F.scale}) rotate(${w.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var x;return(x=b.current)==null?void 0:x.go("-1")},"aria-label":"Previous",children:[F.arrowsImgUrl&&l.jsx(Lt,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:Ce(X.arrowImg,X.mirror)}),!F.arrowsImgUrl&&l.jsx(Ri,{color:F.color,className:Ce(X.arrowIcon,X.arrowImg,X.mirror)})]})}),l.jsx("div",{className:Ce(X.arrow,X.nextArrow,{[X.arrowVertical]:w.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:l.jsxs("button",{className:X.arrowInner,style:{transform:`translate(${T.scalingValue(F.offset.x*(w.direction==="horiz"?-1:1),r)}, ${T.scalingValue(F.offset.y,r)}) scale(${F.scale}) rotate(${w.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var x;return(x=b.current)==null?void 0:x.go("+1")},"aria-label":"Next",children:[F.arrowsImgUrl&&l.jsx(Lt,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:X.arrowImg}),!F.arrowsImgUrl&&l.jsx(Ri,{color:F.color,className:Ce(X.arrowIcon,X.arrowImg)})]})})]}),M.closeIconUrl&&(()=>{const x=In(M.closeIconAlign,M.closeIconOffset,r),z=`scale(${M.closeIconScale})`,q=x.transform?`${x.transform} ${z}`:z;return l.jsx("button",{className:X.closeButton,style:{...x,transform:q},onClick:Q,"aria-label":"Close lightbox",children:l.jsx(Lt,{url:M.closeIconUrl,fill:M.closeIconColor??"#000000",hoverFill:M.closeIconHover??"#cccccc"})})})(),I&&I.isActive&&o.imageCaption&&((A=n[c])==null?void 0:A.imageCaption)&&(()=>{const{widthSettings:x,fontSettings:z,letterSpacing:q,textAlign:J,wordSpacing:se,fontSizeLineHeight:le,textAppearance:ce,color:he}=o.imageCaption;return l.jsx("div",{className:X.caption,style:{...In(I.alignment,I.offset,r),fontFamily:co(z.fontFamily),fontWeight:z.fontWeight,fontStyle:z.fontStyle,width:x.sizing==="auto"?"max-content":T.scalingValue(x.width,r),letterSpacing:T.scalingValue(q,r),wordSpacing:T.scalingValue(se,r),textAlign:J,fontSize:T.scalingValue(le.fontSize,r),lineHeight:T.scalingValue(le.lineHeight,r),textTransform:ce.textTransform??"none",textDecoration:ce.textDecoration??"none",fontVariant:ce.fontVariant??"normal",color:he},onClick:K=>K.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:X.captionTextInner,style:{"--link-color":I.linkColor,"--link-hover-color":I.linkHoverColor},children:l.jsx(vn,{content:n[c].imageCaption})})})})(),N.isActive&&(()=>{const[x,z]=N.position.split("-"),q=w.direction==="horiz"?`${x}-left`:N.position,J=In(q,N.offset,r),se=()=>{if(w.direction==="horiz"){if(z==="left")return"flex-start";if(z==="center")return"center";if(z==="right")return"flex-end"}else{if(x==="top")return"flex-start";if(x==="middle")return"center";if(x==="bottom")return"flex-end"}return"flex-start"};return l.jsx("div",{ref:W,className:X.thumbsWrapper,onClick:le=>ie(le),style:{position:r?"absolute":"fixed",...J,...w.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:Ce(X.thumbsContainer,{[X.thumbsContainerVertical]:w.direction==="vert",[X.thumbsAlignStart]:N.align==="start",[X.thumbsAlignCenter]:N.align==="center",[X.thumbsAlignEnd]:N.align==="end"}),style:{gap:T.scalingValue(N.grid.gap,r),justifyContent:O?"flex-start":se()},children:n.map((le,ce)=>{const he=ce===c,K=S[ce],Z=N.grid.size*(he?N.activeState.scale:1),de=()=>{if(N.fit!=="fit")return{};if(!K)return w.direction==="horiz"?{height:T.scalingValue(Z,r)}:{width:T.scalingValue(Z,r)};const oe=K.width/K.height;if(w.direction==="horiz"){const pe=Z,ve=pe*oe;return{width:T.scalingValue(ve,r),height:T.scalingValue(pe,r)}}else{const pe=Z,ve=pe/oe;return{width:T.scalingValue(pe,r),height:T.scalingValue(ve,r)}}};return l.jsx("button",{className:X.thumbItem,style:{...w.direction==="horiz"&&N.fit!=="fit"?{height:T.scalingValue(Z,r)}:{},...w.direction==="vert"&&N.fit!=="fit"?{width:T.scalingValue(Z,r)}:{},...N.fit==="cover"?{width:T.scalingValue(Z,r),height:T.scalingValue(Z,r)}:{},...de(),transition:he?"all 0.25s ease-out":"none",opacity:he?N.activeState.opacity/100:N.opacity/100,"--thumb-hover":N.activeState.opacity/100},onClick:oe=>{var pe;oe.stopPropagation(),u(ce),(pe=b.current)==null||pe.go(ce)},onMouseEnter:()=>{var oe;N.triggers==="hov"&&((oe=b.current)==null||oe.go(ce))},children:l.jsx("img",{src:le.image.url,alt:le.image.name??"",onLoad:oe=>{const pe=oe.currentTarget;pe.naturalWidth&&pe.naturalHeight&&f(ve=>({...ve,[ce]:{width:pe.naturalWidth,height:pe.naturalHeight}}))},style:{objectFit:N.fit==="cover"?"cover":"contain",...N.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...N.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${le.image.name}-${ce}`)})})})})()]})]}),document.getElementById(s))};function Ri({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 Gl={element:Ul,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function kn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Yl(e){return`
6
+ */const Vs="RichTextRenderer-module__link___BWeZ2",Ds={link:Vs},zs=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(o=>/^\d/.test(o))},go=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>zs(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function ut(e){const{color:t,...n}=e;return n}function Ke(e,t){var i,s,r;const{fontSize:n,lineHeight:o}=e;return{fontFamily:go(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(n,t),lineHeight:o!==void 0?w.scalingValue(o,t):void 0,textTransform:(i=e.textAppearance)==null?void 0:i.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(r=e.textAppearance)==null?void 0:r.fontVariant,textAlign:e.textAlign,color:e.color}}const Cn=({content:e})=>{const t=n=>n.map((o,i)=>o.type==="link"?l.jsx("a",{className:Ds.link,href:o.value,target:o.target,children:t(o.children)},i):l.jsx("span",{style:js(o),children:o.text},i));return l.jsx(l.Fragment,{children:e.map((n,o)=>{const i=n.children;return l.jsx("div",{children:t(i)},o)})})};function js(e){return{...e.fontFamily&&{fontFamily:go(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 Ks="SvgImage-module__svg___q3xE-",qs="SvgImage-module__img___VsTm-",Li={svg:Ks,img:qs},Us=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Gs=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,At=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:i})=>{const[s,r]=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 a=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');r(a)}},[]),!Us(e)||!s?l.jsx("img",{src:e,alt:"",className:we(Li.img,o),style:i}):l.jsx("span",{"data-supports-mask":s,className:we(Li.svg,o),style:{"--svg":Gs(e),"--fill":t,"--hover-fill":n,...i??{}}})},Ys={"top-left":ae.topLeftAlignment,"top-center":ae.topCenterAlignment,"top-right":ae.topRightAlignment,"middle-left":ae.middleLeftAlignment,"middle-center":ae.middleCenterAlignment,"middle-right":ae.middleRightAlignment,"bottom-left":ae.bottomLeftAlignment,"bottom-center":ae.bottomCenterAlignment,"bottom-right":ae.bottomRightAlignment};function Xs({settings:e,content:t,styles:n,isEditor:o}){const[i,s]=p.useState(null),{widthSettings:r,fontSettings:a,letterSpacing:c,textAlign:d,wordSpacing:u,fontSizeLineHeight:L,textAppearance:h,color:f}=n.imageCaption,[m,g]=p.useState(void 0),[$,v]=p.useState(null),[C,y]=p.useState(0),[M,N]=p.useState(0),{direction:A,transition:x,controls:P,pagination:T,imageCaption:R,triggers:k}=e,D=p.useRef(x.type),{x:O,y:G}=e.controls.offset,X=b=>{i&&i.go(b)};return p.useEffect(()=>{if(!$)return;const b=new ResizeObserver(B=>{if(!i)return;const[W]=B;g({width:Math.round(W.contentRect.width),height:Math.round(W.contentRect.height)})});return b.observe($),()=>b.unobserve($)},[$]),p.useEffect(()=>{!i||D.current===x.type||(N(b=>b+1),D.current=x.type)},[x.type]),l.jsx("div",{className:we(ae.wrapper,{[ae.editor]:o}),ref:v,children:l.jsxs("div",{className:ae.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:x.backgroundColor&&x.type==="fade in"?x.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:we(ae.captionBlock),children:l.jsx("div",{className:ae.captionTextWrapper,children:t.map((b,B)=>l.jsx("div",{className:we(ae.captionText,Ys[R.alignment],{[ae.withPointerEvents]:B===C&&o,[ae.active]:B===C}),style:{fontFamily:go(a.fontFamily),fontWeight:a.fontWeight,fontStyle:a.fontStyle,width:r.sizing==="auto"?"max-content":w.scalingValue(r.width,o),letterSpacing:w.scalingValue(c,o),wordSpacing:w.scalingValue(u,o),textAlign:d,fontSize:w.scalingValue(L.fontSize,o),lineHeight:w.scalingValue(L.lineHeight,o),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:f,transitionDuration:x.duration?`${Math.round(parseInt(x.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:ae.captionTextInner,style:{"--link-hover-color":R.linkHoverColor,"--link-color":R.linkColor,position:"relative",top:w.scalingValue(R.offset.y,o),left:w.scalingValue(R.offset.x,o)},children:l.jsx(Cn,{content:b.imageCaption})})},B))})}),l.jsx(ii,{onMove:b=>{y(b.index)},ref:s,options:{arrows:!1,speed:x.duration?parseInt(x.duration):500,autoplay:k.autoPlay!==null,...k.autoPlay!==null&&{interval:parseInt(k.autoPlay)*1e3},direction:A==="horiz"||x.type==="fade in"?"ltr":"ttb",pagination:!1,drag:k.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:x.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((b,B)=>l.jsx(ri,{children:l.jsx("div",{className:ae.sliderItem,children:l.jsx("div",{className:ae.imgWrapper,children:l.jsx("img",{className:we(ae.sliderImage,{[ae.contain]:b.image.objectFit==="contain",[ae.cover]:b.image.objectFit==="cover"}),src:b.image.url,alt:b.image.name??""})})})},B))},M),P.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:we(ae.arrow,{[ae.arrowVertical]:A==="vert",[ae.hoverArrow]:P.show==="on hover"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:l.jsxs("button",{onClick:()=>{X("-1")},className:ae.arrowInner,style:{transform:`translate(${w.scalingValue(O,o)}, ${w.scalingValue(G*(A==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:[P.arrowsImgUrl&&l.jsx(At,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:we(ae.arrowImg,ae.mirror)}),!P.arrowsImgUrl&&l.jsx(Ei,{color:P.color,className:we(ae.arrowIcon,ae.arrowImg,ae.mirror)})]})}),l.jsx("div",{className:we(ae.arrow,ae.nextArrow,{[ae.arrowVertical]:A==="vert",[ae.hoverArrow]:P.show==="on hover"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:l.jsxs("button",{className:ae.arrowInner,onClick:()=>X("+1"),style:{transform:`translate(${w.scalingValue(O*(A==="horiz"?-1:1),o)}, ${w.scalingValue(G,o)}) scale(${e.controls.scale/100}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:[P.arrowsImgUrl&&l.jsx(At,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:ae.arrowImg}),!P.arrowsImgUrl&&l.jsx(Ei,{color:P.color,className:we(ae.arrowIcon,ae.arrowImg)})]})})]}),k.triggersList.click&&l.jsx("div",{className:ae.clickOverlay,onClick:()=>{i&&i.go("+1")}}),T.isActive&&l.jsx("div",{className:we(ae.pagination,{[ae.paginationInsideBottom]:T.position==="inside-1"&&A==="horiz",[ae.paginationInsideTop]:T.position==="inside-2"&&A==="horiz",[ae.paginationOutsideBottom]:T.position==="outside-1"&&A==="horiz",[ae.paginationOutsideTop]:T.position==="outside-2"&&A==="horiz",[ae.paginationInsideLeft]:T.position==="inside-1"&&A==="vert",[ae.paginationInsideRight]:T.position==="inside-2"&&A==="vert",[ae.paginationOutsideLeft]:T.position==="outside-1"&&A==="vert",[ae.paginationOutsideRight]:T.position==="outside-2"&&A==="vert",[ae.paginationVertical]:A==="vert"}),children:l.jsx("div",{className:ae.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(${A==="horiz"?"0deg":"90deg"})`},children:t.map((b,B)=>l.jsx("button",{onClick:()=>{i&&i.go(B)},className:we(ae.paginationItem),children:l.jsx("div",{className:we(ae.dot,{[ae.activeDot]:B===C}),style:{backgroundColor:B===C?T.colors[0]:T.colors[1],"--pagination-hover-color":T.hover}})},B))})})]})})}function Ei({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 Zs={element:Xs,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},Js="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Qs="ImageRevealSlider-module__image___Qjt-e",el="ImageRevealSlider-module__link___N-iLG",tl="ImageRevealSlider-module__cursor___2U03d",Ut={imageRevealSlider:Js,image:Qs,link:el,cursor:tl};function _i(e,t,n){for(const o of n){const i=new Image;i.src=o.url;const s=o.width?Number.parseFloat(o.width):i.naturalWidth,r=i.naturalHeight/i.naturalWidth*s,a=s/2,c=r/2;if(e>=o.x-a&&e<=o.x+a&&t>=o.y-c&&t<=o.y+c)return!0}return!1}function xo(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function nl(e,t,n,o){let i,s;if(t==="custom"){i=n;const r=await xo(e);s=r.height/r.width*i}else if(t==="random"){i=Math.random()*(o.max-o.min)+o.min;const r=await xo(e);s=r.height/r.width*i}else{const r=await xo(e);i=r.width,s=r.height}return{width:i,height:s,finalWidth:`${i}px`}}function ol({settings:e,content:t,isEditor:n}){const[o,i]=p.useState(null),[s,r]=p.useState([]),[a,c]=p.useState(0),d=p.useRef(0),[u,L]=p.useState({x:0,y:0}),[h,f]=p.useState(1),[m,g]=p.useState("none"),$=p.useRef({x:0,y:0}),[v,C]=p.useState(!1),{sizeType:y,imageWidth:M,randomRangeImageWidth:N}=e.imageSize,{revealPosition:A,visible:x}=e.position,{cursorType:P,target:T,defaultCursorScale:R,defaultCursor:k,hoverCursorScale:D,hoverCursor:O}=e.cursor;p.useEffect(()=>{if(!o)return;const b=(F,E)=>{const H=o.getBoundingClientRect(),J=F-H.left,ie=E-H.top;if(L({x:J,y:ie}),P==="system"){g("none"),f(1);return}const U=J,le=ie,V=document.elementFromPoint(H.left+U,H.top+le);if(V&&V.closest("a")){g("none"),f(1);return}const re=_i(U,le,s)||T==="area"?{img:O??"none",scale:D}:{img:k??"none",scale:R};g(re.img),f(re.scale)},B=F=>{F.stopPropagation(),$.current={x:F.clientX,y:F.clientY},b(F.clientX,F.clientY)},W=()=>{v&&b($.current.x,$.current.y)};return o.addEventListener("mousemove",B),window.addEventListener("scroll",W,!0),()=>{o.removeEventListener("mousemove",B),window.removeEventListener("scroll",W,!0)}},[o,v,u,P,T,O,k,D,R,s]),p.useEffect(()=>{v||(g("none"),f(0))},[v]);const G=async(b,B,W,F={})=>{const{width:E,height:H,finalWidth:J}=await nl(b.image.url,y,M,N);let ie=0,U=0;A==="same"?(ie=B/2,U=W/2):(ie=F.x??Math.random()*B,U=F.y??Math.random()*W);const le=Math.min(Math.max(ie,E/2),B-E/2),V=Math.min(Math.max(U,H/2),W-H/2);return{id:d.current++,url:b.image.url,link:b.link,name:b.image.name,x:le,y:V,width:J}};p.useEffect(()=>{if(!o||t.length===0)return;const b=o.getBoundingClientRect(),B=b.width,W=b.height,F=[];(async()=>{const H=t[0],J=await G(H,B,W);F.push(J),r(F),c(1)})()},[y,M,N,A,o]),p.useEffect(()=>{x==="last One"&&r(b=>b.length>0?[b[b.length-1]]:[])},[x]);const X=async b=>{if(!o)return;const B=o.getBoundingClientRect(),W=b.clientX-B.left,F=b.clientY-B.top;if(T==="image"&&!_i(W,F,s))return;let E=0,H=0;A==="on Click"?(E=W,H=F):A==="same"?(E=B.width/2,H=B.height/2):(E=Math.random()*B.width,H=Math.random()*B.height);const J=t[a],ie=await G(J,B.width,B.height,{x:E,y:H});r(U=>x==="all"?[...U,ie]:[ie]),c(U=>U>=t.length-1?0:U+1)};return l.jsxs("div",{ref:i,onClick:X,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),className:Ut.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[s.map(b=>l.jsx("div",{className:Ut.wrapper,style:{top:`${b.y}px`,left:`${b.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:b.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:T==="area"&&b.link?l.jsx("a",{href:b.link,target:"_blank",className:Ut.link,children:l.jsx("img",{src:b.url,alt:b.name,className:Ut.image},b.id)}):l.jsx("img",{src:b.url,alt:b.name,className:Ut.image},b.id)},b.id)),v&&l.jsx("div",{className:Ut.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${h})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const il={element:ol,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},rl="LightBox-module__hidden___9s-9x",al="LightBox-module__heroImage___sTxNF",sl="LightBox-module__background___rm9ml",ll="LightBox-module__editor___4ACaY",cl="LightBox-module__contentStyle___Bgnsq",ul="LightBox-module__imageStyle___tLIlB",dl="LightBox-module__imgWrapper___LuFUp",pl="LightBox-module__contain___8-yaS",ml="LightBox-module__cover___hNvOG",gl="LightBox-module__caption___b6L2I",hl="LightBox-module__captionTextInner___rCGNH",fl="LightBox-module__lightboxSplide___XFuWC",yl="LightBox-module__arrow___iz38X",vl="LightBox-module__arrowVertical___Zfz81",bl="LightBox-module__nextArrow___zkAQN",xl="LightBox-module__arrowInner___p48sW",Cl="LightBox-module__arrowIcon___3VaFf",Sl="LightBox-module__arrowImg___pNV88",wl="LightBox-module__mirror___pjeXc",$l="LightBox-module__thumbsWrapper___GB-nU",Tl="LightBox-module__thumbsContainerVertical___wttk5",Ll="LightBox-module__thumbsContainer___osSma",El="LightBox-module__thumbsAlignStart___MO6tY",_l="LightBox-module__thumbsAlignCenter___Q4sUx",Pl="LightBox-module__thumbsAlignEnd___p4y9R",Al="LightBox-module__thumbItem___HvnF3",Rl="LightBox-module__closeButton___g2khP",Il="LightBox-module__fadeIn___0m5GW",Wl="LightBox-module__slideInLeft___gPYwC",kl="LightBox-module__slideInRight___S-pPp",Fl="LightBox-module__slideInTop___DFdAj",Ml="LightBox-module__slideInBottom___m27kZ",Nl="LightBox-module__fadeOut___55qBR",Hl="LightBox-module__slideOutLeft___NvU7P",Bl="LightBox-module__slideOutRight___SK7eC",Ol="LightBox-module__slideOutTop___Vgg0z",Vl="LightBox-module__slideOutBottom___nJ0Ef",Dl="LightBox-module__scaleSlide___vZriG",Z={hidden:rl,heroImage:al,background:sl,editor:ll,contentStyle:cl,imageStyle:ul,imgWrapper:dl,contain:pl,cover:ml,caption:gl,captionTextInner:hl,lightboxSplide:fl,arrow:yl,arrowVertical:vl,nextArrow:bl,arrowInner:xl,arrowIcon:Cl,arrowImg:Sl,mirror:wl,thumbsWrapper:$l,thumbsContainerVertical:Tl,thumbsContainer:Ll,thumbsAlignStart:El,thumbsAlignCenter:_l,thumbsAlignEnd:Pl,thumbItem:Al,closeButton:Rl,fadeIn:Il,slideInLeft:Wl,slideInRight:kl,slideInTop:Fl,slideInBottom:Ml,fadeOut:Nl,slideOutLeft:Hl,slideOutRight:Bl,slideOutTop:Ol,slideOutBottom:Vl,scaleSlide:Dl},Nn=(e,t,n)=>{const o={},[i,s]=e.split("-");return i==="top"?(o.top="0",o.bottom="auto"):i==="middle"?(o.top="50%",o.bottom="auto"):i==="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"),i==="middle"&&s==="center"?o.transform=`translate(calc(-50% + ${w.scalingValue(t.x,n)}), calc(-50% + ${w.scalingValue(t.y,n)}))`:i==="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 Rr(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 Pi(e){const t=e.getBoundingClientRect(),n=Rr(e),o=Math.max(0,t.width-n.left-n.right),i=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,r=e.naturalHeight,a=o/i,c=s/r;let d,u;c>a?(d=o,u=o/c):(u=i,d=i*c);const L=t.left+n.left,h=t.top+n.top,f=(o-d)/2+L,m=(i-u)/2+h;return{x:f,y:m,width:d,height:u}}function Ai(e){const t=e.getBoundingClientRect(),n=Rr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Ri(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const o=t[1].split(",").map(i=>parseFloat(i.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 zl(e,t){const n=(()=>{if(e==="fade in")return Z.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Z.slideInLeft;case"right":return Z.slideInRight;case"top":return Z.slideInTop;case"bottom":return Z.slideInBottom;default:return Z.slideInRight}return Z.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return Z.fadeIn;if(e==="slide in")switch(t){case"left":return Z.slideInLeft;case"right":return Z.slideInRight;case"top":return Z.slideInTop;case"bottom":return Z.slideInBottom;default:return Z.slideInRight}return Z.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Z.fadeOut;if(e==="slide in")switch(t){case"left":return Z.slideOutLeft;case"right":return Z.slideOutRight;case"top":return Z.slideOutTop;case"bottom":return Z.slideOutBottom;default:return Z.slideOutRight}return Z.fadeOut})(),s=(()=>{if(e==="fade in")return Z.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Z.slideOutLeft;case"right":return Z.slideOutRight;case"top":return Z.slideOutTop;case"bottom":return Z.slideOutBottom;default:return Z.slideOutRight}return Z.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:i,disappearClass:s}}const jl=({settings:e,content:t,styles:n,portalId:o,activeEvent:i,isEditor:s,isPreviewMode:r})=>{const[a,c]=p.useState(!1),{url:d}=e.thumbnailBlock.cover;return p.useEffect(()=>{i==="close"&&c(!1),i==="open"&&c(!0)},[i]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:d,alt:"Cover",className:Z.heroImage,onClick:()=>c(!0)}),l.jsx(Kl,{isOpen:a,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:s})]})},Kl=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:i,portalId:s,isEditor:r,metadata:a})=>{var _;const[c,d]=p.useState(0),[u,L]=p.useState(0),[h,f]=p.useState(!1),[m,g]=p.useState(!1),[$,v]=p.useState({}),C=p.useRef(null),y=p.useRef(null),M=p.useRef(null),N=p.useRef(!1),A=p.useRef(null),x=p.useRef(null),P=p.useRef(null),T=p.useRef(null),R=p.useRef(!1),k=p.useRef(null),[D,O]=p.useState(!1),{appear:G,triggers:X,slider:b,thumbnail:B,controls:W,area:F,caption:E,layout:H}=i.lightboxBlock,{appearClass:J,backdropAppearClass:ie,backdropDisappearClass:U,disappearClass:le}=zl(G.type,G.direction),V=(a==null?void 0:a.itemId)??null;p.useEffect(()=>{const S=()=>{setTimeout(()=>{var q,Y;(Y=(q=C.current)==null?void 0:q.splide)==null||Y.refresh()},16)},j=()=>{L(q=>q+1)};return window.addEventListener("ArticleEditor.Layout:change",S),window.addEventListener("ArticleEditor.ComponentContent:change",j),()=>{window.removeEventListener("ArticleEditor.Layout:change",S),window.removeEventListener("ArticleEditor.ComponentContent:change",j)}},[]),p.useEffect(()=>{if(!e||!B.isActive){O(!1);return}const S=k.current;if(!S)return;const j=()=>{b.direction==="horiz"?O(S.scrollWidth>S.clientWidth):O(S.scrollHeight>S.clientHeight)};j();const q=new ResizeObserver(j);return q.observe(S),()=>q.disconnect()},[e,B.isActive,n.length,$,b.direction]);const re=p.useCallback(()=>{const S=window.matchMedia("(max-width: 768px)").matches,j=Ri(F.color);S&&!r&&j>.9&&(document.body.style.backgroundColor=""),f(!0),N.current=!0;const q=Y=>{Y.target===A.current&&Y.animationName&&(A.current&&x.current&&A.current.removeEventListener("animationend",x.current),x.current=null,N.current&&(N.current=!1,t()),f(!1))};A.current&&(x.current=q,A.current.addEventListener("animationend",q))},[t,F.color,r]),fe=(S,j,q)=>{var Y,te;if(S){if(X.type==="click"&&X.switch==="image")X.repeat==="close"&&c===n.length-1?re():(Y=C.current)==null||Y.go("+1");else if(X.type==="click"&&X.switch==="50/50"){const ne=S.getBoundingClientRect(),oe=j-ne.left,se=q-ne.top,xe=ne.width,de=ne.height;let K;b.direction==="horiz"?K=oe<xe/2?"-1":"+1":K=se<de/2?"-1":"+1",(te=C.current)==null||te.go(K)}}},me=S=>{if(R.current){R.current=!1;return}const j=n[c],q=(j==null?void 0:j.image.objectFit)==="cover";let Y,te;if("changedTouches"in S&&S.changedTouches.length>0)Y=S.changedTouches[0].clientX,te=S.changedTouches[0].clientY;else if("clientX"in S)Y=S.clientX,te=S.clientY;else return;let ne;if(q&&M.current){const oe=Ai(M.current);ne=Y>=oe.left&&Y<=oe.right&&te>=oe.top&&te<=oe.bottom}else{const oe=M.current?Pi(M.current):null;if(!oe){S.target===S.currentTarget&&re();return}ne=Y>=oe.x&&Y<=oe.x+oe.width&&te>=oe.y&&te<=oe.y+oe.height}ne?fe(M.current,Y,te):re()},ge=S=>{const j=S.target;(j.classList.contains(Z.thumbsWrapper)||j.classList.contains(Z.thumbsContainer))&&me(S)};p.useEffect(()=>{if(!e)return;const S=j=>{var q,Y;if(j.key==="Escape"){re();return}if(j.key==="ArrowRight"){d(te=>(te+1)%Math.max(n.length,1)),(q=C.current)==null||q.go("+1");return}j.key==="ArrowLeft"&&(d(te=>(te-1+Math.max(n.length,1))%Math.max(n.length,1)),(Y=C.current)==null||Y.go("-1"))};return window.addEventListener("keydown",S),()=>{window.removeEventListener("keydown",S)}},[e,re,n.length]),p.useEffect(()=>{if(e){if(d(0),L(j=>j+1),N.current=!1,f(!1),g(!1),v({}),!V)return;const S=new CustomEvent("page-overlay",{detail:{itemId:V}});window.dispatchEvent(S)}return()=>{A.current&&x.current&&(A.current.removeEventListener("animationend",x.current),x.current=null),g(!1)}},[e,V]),p.useEffect(()=>{y.current!==null&&y.current!==b.type&&L(S=>S+1),y.current=b.type},[b.type]),p.useEffect(()=>{if(!e)return;const S=document.body.style.overflow,j=window.matchMedia("(max-width: 768px)").matches,q=Ri(F.color);document.body.style.overflow="hidden",g(!1);const Y=ne=>{ne.target===A.current&&!N.current&&ne.animationName&&(j&&!r&&q>.9&&(document.body.style.backgroundColor=F.color),g(!0),A.current&&P.current&&A.current.removeEventListener("animationend",P.current),P.current=null)};A.current&&(P.current=Y,A.current.addEventListener("animationend",Y));const te=ne=>{const oe=ne.target;oe&&(oe.closest(`.${Z.thumbsWrapper}`)||oe.closest(`.${Z.thumbsContainer}`))||b.type!=="slide"&&ne.preventDefault()};return document.addEventListener("touchmove",te,{passive:!1}),()=>{document.body.style.overflow=S,document.removeEventListener("touchmove",te),A.current&&P.current&&(A.current.removeEventListener("animationend",P.current),P.current=null),g(!1)}},[e,r,F.color,b.type]),p.useEffect(()=>{if(!e)return;const S=j=>{var Y,te;if(N.current){j.stopPropagation();return}if(R.current){R.current=!1;return}const q=j.target;if(!(q&&(q.closest(`.${Z.thumbsContainer}`)||q.closest(`.${Z.thumbItem}`)||q.closest(`.${Z.arrow}`)||q.closest(`.${Z.closeButton}`)||q.closest(`.${Z.caption}`)))){if(b.type==="slide"&&X.type==="drag"&&((te=(Y=C.current)==null?void 0:Y.splide)!=null&&te.root)){const ne=C.current.splide.root;if(q&&(ne.contains(q)||ne===q))return}if(j.touches.length===0&&j.changedTouches.length>0){const ne=n[c],oe=(ne==null?void 0:ne.image.objectFit)==="cover",se=j.changedTouches[0];let xe;if(oe&&M.current){const de=Ai(M.current);xe=se.clientX>=de.left&&se.clientX<=de.right&&se.clientY>=de.top&&se.clientY<=de.bottom}else{const de=M.current?Pi(M.current):null;if(!de)return;xe=se.clientX>=de.x&&se.clientX<=de.x+de.width&&se.clientY>=de.y&&se.clientY<=de.y+de.height}if(!xe){j.stopPropagation(),N.current=!0;const de=K=>{K.stopPropagation(),K.preventDefault(),document.removeEventListener("click",de,!0)};document.addEventListener("click",de,!0),re()}}}};return document.addEventListener("touchend",S,{passive:!0}),()=>{document.removeEventListener("touchend",S)}},[e,re,c,n]);const I=(b.type==="scale"||b.type==="fade")&&b.direction==="vert"&&X.type==="drag";p.useEffect(()=>{var K,ue;if(!e||!I||!((ue=(K=C.current)==null?void 0:K.splide)!=null&&ue.root))return;const S=C.current.splide.root,j=30,q=(z,Q)=>{if(T.current){const ye=Math.abs(z-T.current.x),Le=Math.abs(Q-T.current.y);(ye>0||Le>0)&&(R.current=!0)}},Y=z=>{T.current&&(z.preventDefault(),q(z.clientX,z.clientY))},te=z=>{T.current&&z.touches.length>0&&(z.preventDefault(),q(z.touches[0].clientX,z.touches[0].clientY))},ne=(z,Q)=>{if(!T.current||!C.current){T.current=null;return}const ye=Math.abs(z-T.current.x),Le=Math.abs(Q-T.current.y);Le>j&&Le>ye&&C.current.go(Q<T.current.y?"+1":"-1"),T.current=null},oe=z=>{T.current&&ne(z.clientX,z.clientY),document.removeEventListener("pointerup",oe),document.removeEventListener("pointercancel",oe),document.removeEventListener("pointermove",Y)},se=z=>{if(T.current){if(z.changedTouches.length>0){const Q=z.changedTouches[0];ne(Q.clientX,Q.clientY)}document.removeEventListener("touchend",se),document.removeEventListener("touchcancel",se),document.removeEventListener("touchmove",te)}},xe=z=>{T.current={x:z.clientX,y:z.clientY},R.current=!1,document.addEventListener("pointermove",Y,{passive:!1}),document.addEventListener("pointerup",oe),document.addEventListener("pointercancel",oe)},de=z=>{z.touches.length>0&&(T.current={x:z.touches[0].clientX,y:z.touches[0].clientY},R.current=!1,document.addEventListener("touchmove",te,{passive:!1}),document.addEventListener("touchend",se),document.addEventListener("touchcancel",se))};return S.addEventListener("pointerdown",xe),S.addEventListener("touchstart",de),()=>{S.removeEventListener("pointerdown",xe),S.removeEventListener("touchstart",de),document.removeEventListener("pointermove",Y),document.removeEventListener("pointerup",oe),document.removeEventListener("pointercancel",oe),document.removeEventListener("touchmove",te),document.removeEventListener("touchend",se),document.removeEventListener("touchcancel",se),T.current=null,R.current=!1}},[e,I,u]);const ee={backgroundColor:F.color,backdropFilter:`blur(${F.blur}px)`,animationDuration:`${parseInt(G.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Gi.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:r?null:A,className:we(Z.background,h?U:ie,{[Z.editor]:r},{[Z.hidden]:!e}),style:{...ee,...m&&!r&&!h?{position:"absolute"}:{}}}),l.jsxs("div",{ref:r?A:null,className:we(Z.contentStyle,h?le:J,{[Z.editor]:r},{[Z.hidden]:!e}),style:{animationDuration:`${parseInt(G.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(ii,{onMove:S=>d(S.index),ref:C,className:Z.lightboxSplide,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,direction:b.direction==="horiz"||b.type==="fade"||b.type==="scale"?"ltr":"ttb",pagination:!1,drag:X.type==="drag"&&!I,perPage:1,width:"100%",height:"100%",type:b.type==="fade"||b.type==="scale"?"fade":"loop",padding:0,rewind:X.repeat!=="close",start:0},style:{"--splide-speed":b.duration},children:n.map((S,j)=>{const q=Nn(H.position,H.offset,r),Y=`${w.scalingValue(H.padding.top,r)} ${w.scalingValue(H.padding.right,r)} ${w.scalingValue(H.padding.bottom,r)} ${w.scalingValue(H.padding.left,r)}`,te=b.type==="scale"?(()=>{const{transform:ne,...oe}=q;return{...oe,position:"absolute",padding:Y,boxSizing:"border-box","--position-transform":ne||"none"}})():{...q,position:"absolute",padding:Y,boxSizing:"border-box"};return l.jsx(ri,{children:l.jsx("div",{className:Z.imgWrapper,onClick:me,children:l.jsx("img",{ref:j===c?M:null,className:we(Z.imageStyle,{[Z.contain]:S.image.objectFit==="contain",[Z.cover]:S.image.objectFit==="cover",[Z.scaleSlide]:b.type==="scale"}),src:S.image.url,alt:S.image.name??"",style:{...te,pointerEvents:S.image.objectFit==="contain"?"none":"auto"}})})},j)})},u),W.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:we(Z.arrow,{[Z.arrowVertical]:b.direction==="vert"}),style:{color:W.color,"--arrow-hover-color":W.hover},children:l.jsxs("button",{className:Z.arrowInner,style:{transform:`translate(${w.scalingValue(W.offset.x,r)}, ${w.scalingValue(W.offset.y*(b.direction==="horiz"?1:-1),r)}) scale(${W.scale}) rotate(${b.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var S;return(S=C.current)==null?void 0:S.go("-1")},"aria-label":"Previous",children:[W.arrowsImgUrl&&l.jsx(At,{url:W.arrowsImgUrl,fill:W.color,hoverFill:W.hover,className:we(Z.arrowImg,Z.mirror)}),!W.arrowsImgUrl&&l.jsx(Ii,{color:W.color,className:we(Z.arrowIcon,Z.arrowImg,Z.mirror)})]})}),l.jsx("div",{className:we(Z.arrow,Z.nextArrow,{[Z.arrowVertical]:b.direction==="vert"}),style:{color:W.color,"--arrow-hover-color":W.hover},children:l.jsxs("button",{className:Z.arrowInner,style:{transform:`translate(${w.scalingValue(W.offset.x*(b.direction==="horiz"?-1:1),r)}, ${w.scalingValue(W.offset.y,r)}) scale(${W.scale}) rotate(${b.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var S;return(S=C.current)==null?void 0:S.go("+1")},"aria-label":"Next",children:[W.arrowsImgUrl&&l.jsx(At,{url:W.arrowsImgUrl,fill:W.color,hoverFill:W.hover,className:Z.arrowImg}),!W.arrowsImgUrl&&l.jsx(Ii,{color:W.color,className:we(Z.arrowIcon,Z.arrowImg)})]})})]}),F.closeIconUrl&&(()=>{const S=Nn(F.closeIconAlign,F.closeIconOffset,r),j=`scale(${F.closeIconScale})`,q=S.transform?`${S.transform} ${j}`:j;return l.jsx("button",{className:Z.closeButton,style:{...S,transform:q},onClick:re,"aria-label":"Close lightbox",children:l.jsx(At,{url:F.closeIconUrl,fill:F.closeIconColor??"#000000",hoverFill:F.closeIconHover??"#cccccc"})})})(),E&&E.isActive&&o.imageCaption&&((_=n[c])==null?void 0:_.imageCaption)&&(()=>{const{widthSettings:S,fontSettings:j,letterSpacing:q,textAlign:Y,wordSpacing:te,fontSizeLineHeight:ne,textAppearance:oe,color:se}=o.imageCaption;return l.jsx("div",{className:Z.caption,style:{...Nn(E.alignment,E.offset,r),fontFamily:go(j.fontFamily),fontWeight:j.fontWeight,fontStyle:j.fontStyle,width:S.sizing==="auto"?"max-content":w.scalingValue(S.width,r),letterSpacing:w.scalingValue(q,r),wordSpacing:w.scalingValue(te,r),textAlign:Y,fontSize:w.scalingValue(ne.fontSize,r),lineHeight:w.scalingValue(ne.lineHeight,r),textTransform:oe.textTransform??"none",textDecoration:oe.textDecoration??"none",fontVariant:oe.fontVariant??"normal",color:se},onClick:xe=>xe.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:Z.captionTextInner,style:{"--link-color":E.linkColor,"--link-hover-color":E.linkHoverColor},children:l.jsx(Cn,{content:n[c].imageCaption})})})})(),B.isActive&&(()=>{const[S,j]=B.position.split("-"),q=b.direction==="horiz"?`${S}-left`:B.position,Y=Nn(q,B.offset,r),te=()=>{if(b.direction==="horiz"){if(j==="left")return"flex-start";if(j==="center")return"center";if(j==="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:k,className:Z.thumbsWrapper,onClick:ne=>ge(ne),style:{position:r?"absolute":"fixed",...Y,...b.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:we(Z.thumbsContainer,{[Z.thumbsContainerVertical]:b.direction==="vert",[Z.thumbsAlignStart]:B.align==="start",[Z.thumbsAlignCenter]:B.align==="center",[Z.thumbsAlignEnd]:B.align==="end"}),style:{gap:w.scalingValue(B.grid.gap,r),justifyContent:D?"flex-start":te()},children:n.map((ne,oe)=>{const se=oe===c,xe=$[oe],K=B.grid.size*(se?B.activeState.scale:1),ue=()=>{if(B.fit!=="fit")return{};if(!xe)return b.direction==="horiz"?{height:w.scalingValue(K,r)}:{width:w.scalingValue(K,r)};const z=xe.width/xe.height;if(b.direction==="horiz"){const Q=K,ye=Q*z;return{width:w.scalingValue(ye,r),height:w.scalingValue(Q,r)}}else{const Q=K,ye=Q/z;return{width:w.scalingValue(Q,r),height:w.scalingValue(ye,r)}}};return l.jsx("button",{className:Z.thumbItem,style:{...b.direction==="horiz"&&B.fit!=="fit"?{height:w.scalingValue(K,r)}:{},...b.direction==="vert"&&B.fit!=="fit"?{width:w.scalingValue(K,r)}:{},...B.fit==="cover"?{width:w.scalingValue(K,r),height:w.scalingValue(K,r)}:{},...ue(),transition:se?"all 0.25s ease-out":"none",opacity:se?B.activeState.opacity/100:B.opacity/100,"--thumb-hover":B.activeState.opacity/100},onClick:z=>{var Q;z.stopPropagation(),d(oe),(Q=C.current)==null||Q.go(oe)},onMouseEnter:()=>{var z;B.triggers==="hov"&&((z=C.current)==null||z.go(oe))},children:l.jsx("img",{src:ne.image.url,alt:ne.image.name??"",onLoad:z=>{const Q=z.currentTarget;Q.naturalWidth&&Q.naturalHeight&&v(ye=>({...ye,[oe]:{width:Q.naturalWidth,height:Q.naturalHeight}}))},style:{objectFit:B.fit==="cover"?"cover":"contain",...B.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...B.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ne.image.name}-${oe}`)})})})})()]})]}),document.getElementById(s))};function Ii({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 ql={element:jl,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Hn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ul(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${kn(48)};
11
+ min-height: ${Hn(48)};
12
12
  }
13
13
  .${e}-wrapper.${e}-type-C .${e}-input:focus-visible,
14
14
  .${e}-wrapper.${e}-type-C .${e}-button:focus-visible {
@@ -32,7 +32,7 @@
32
32
  min-width: 0;
33
33
  }
34
34
  .${e}-field-group.${e}-labeled {
35
- gap: ${kn(4)};
35
+ gap: ${Hn(4)};
36
36
  }
37
37
  .${e}-field-label {
38
38
  white-space: nowrap;
@@ -128,18 +128,18 @@
128
128
  outline: none;
129
129
  }
130
130
  .${e}-success {
131
- margin-top: ${kn(8)};
131
+ margin-top: ${Hn(8)};
132
132
  color: var(--${e}-success-success-color, var(--${e}-success-color));
133
133
  }
134
134
  .${e}-error {
135
- margin-top: ${kn(8)};
135
+ margin-top: ${Hn(8)};
136
136
  color: var(--${e}-error-error-color, var(--${e}-error-color));
137
137
  }
138
138
  .${e}-overlay-anchor {
139
139
  position: relative;
140
140
  height: auto;
141
141
  }
142
- `}function Xl({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:i}=T.useScopedStyles(),{type:s="A",fieldsToShow:r=2,fields:a=[],buttonLabel:c,gap:u,fieldsGap:d,buttonCorners:$,buttonStroke:h,buttonPadding:y,isButtonFullWidth:m,inputCorners:g,inputStroke:S,inputPadding:f,inputColor:b,inputTextColor:_,inputBorderColor:E,placeholderColor:P,buttonColor:L,buttonTextColor:v,buttonBorderColor:C,labelTextColor:R,successColor:H,errorColor:W,fontFamily:O,inputFontSettings:D,inputFontSize:j,inputLineHeight:U,inputLetterSpacing:w,inputWordSpacing:N,inputTextAppearance:F,buttonFontSettings:M,buttonFontSize:I,buttonLineHeight:V,buttonLetterSpacing:te,buttonWordSpacing:ue,buttonTextAppearance:re,labelFontSettings:me,labelFontSize:B,labelLineHeight:Q,labelLetterSpacing:G,labelWordSpacing:Y,labelTextAppearance:ie,statusFontSettings:k,statusFontSize:ne,statusLineHeight:A,statusLetterSpacing:x,statusWordSpacing:z,statusTextAppearance:q,successMessage:J,errorMessage:se,stateOverrides:le}=e,ce=s==="B",he=a.slice(0,Math.min(r,a.length)),K={fontSettings:{fontFamily:O,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:j??.01,lineHeight:U,letterSpacing:w??0,wordSpacing:N??0,textAppearance:F,color:_},ee=yt(Je(K,t)),Z=T.scalingValue(S??0,t),de=T.scalingValue((U??j??.01)+((f==null?void 0:f.top)??0)+((f==null?void 0:f.bottom)??0)+(s==="C"?S??0:(S??0)*2),t),oe={...ee,borderStyle:"solid",borderRadius:s==="C"?0:T.scalingValue(g??0,t),...s==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:Z,borderLeftWidth:0}:{borderWidth:Z},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),height:de,minHeight:de},pe={fontSettings:{fontFamily:O,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:I??.01,lineHeight:V,letterSpacing:te??0,wordSpacing:ue??0,textAppearance:re,color:v},ve=yt(Je(pe,t)),Pe=T.scalingValue(h??0,t),Ke={fontSettings:{fontFamily:O,fontWeight:(me==null?void 0:me.fontWeight)??400,fontStyle:(me==null?void 0:me.fontStyle)??"normal"},fontSize:B??.01,lineHeight:Q,letterSpacing:G??0,wordSpacing:Y??0,textAppearance:ie,color:R},Ge=Je(Ke,t),$e={fontSettings:{fontFamily:O,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:ne??.01,lineHeight:A,letterSpacing:x??0,wordSpacing:z??0,textAppearance:q,color:H},Ae=yt(Je($e,t)),Me=T.buildColorVars(i,{inputColor:b,inputTextColor:_,inputBorderColor:E,placeholderColor:P!=null&&P.trim()?P:"#cccccc",buttonColor:L,buttonTextColor:v,buttonBorderColor:C,labelTextColor:R,successColor:H,errorColor:W},Zl,Jl,le),[We,Ve]=p.useState(()=>Object.fromEntries(he.map(be=>[be.name,""]))),[ye,Fe]=p.useState("idle"),[Ne,Be]=p.useState(null),De=o==="success"?"success":o==="error"?"error":ye,Qe=o==="error"?se:Ne,Ct=o==="filled",lt=p.useMemo(()=>{if(!Ct)return We;let be=null;for(const Ye of he)(We[Ye.name]??"").trim().length>0||(be=be??{...We},be[Ye.name]="Filled");return be??We},[We,Ct,he]),uo=De==="error"?T.getFormFieldValidationError(he,lt):null,An=`${o&&o!=="default"?`${i}-state-${o}`:""}`.trim(),on=n==null?void 0:n.submitUrl,rn=(be,Ye)=>{Ve(ze=>({...ze,[be]:Ye}))},po=async be=>{be.preventDefault();const Ye=Object.fromEntries(he.map(He=>{var St;return[He.name,((St=We[He.name])==null?void 0:St.trim())??""]}).filter(([,He])=>He));if(!on){Fe("error"),Be("No integrations were found for this form.");return}if(Object.keys(Ye).length===0)return;const ze=T.getFormFieldValidationError(he,We);if(ze){Fe("error"),Be(ze);return}Fe("submitting"),Be(null);try{const He=await fetch(on,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ye)});if(!He.ok){const St=await He.text();throw new Error(St||`Request failed: ${He.status}`)}Fe("success"),Ve(Object.fromEntries(he.map(St=>[St.name,""])))}catch(He){Fe("error"),Be(He instanceof Error?He.message:"Something went wrong")}};return l.jsxs("div",{className:`${i}-wrapper ${i}-type-${s} ${An}`.trim(),style:Me,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Yl(i)}}),l.jsxs("form",{onSubmit:po,className:`${i}-form`,style:{gap:T.scalingValue(u??0,t)},children:[l.jsx("div",{className:`${i}-fields`,style:{gap:T.scalingValue(d??0,t)},children:he.map((be,Ye)=>l.jsxs("div",{className:`${i}-field-group${ce?` ${i}-labeled`:""}`,children:[ce&&l.jsx("span",{className:`${i}-field-label`,style:Ge?{...Ge,lineHeight:Ge.fontSize}:void 0,children:be.label||be.name}),be.type==="textarea"?l.jsx("textarea",{name:be.name,autoComplete:"off",value:lt[be.name]??"",onChange:ze=>rn(be.name,ze.target.value),placeholder:be.placeholder,className:`${i}-input`,style:oe,rows:1,"data-filled":Ct||(lt[be.name]??"").trim().length>0,"data-field-type":"textarea"}):l.jsx("input",{type:be.type==="phone"?"tel":be.type==="email"?"email":"text",name:be.name,autoComplete:"off",value:lt[be.name]??"",onChange:ze=>rn(be.name,ze.target.value),placeholder:be.placeholder,required:be.isRequired??be.type==="email",className:`${i}-input`,style:oe,"data-filled":Ct||(lt[be.name]??"").trim().length>0})]},Ye))}),l.jsx("div",{className:`${i}-overlay-anchor`,children:l.jsx("button",{type:"submit",className:`${i}-button`,style:{borderStyle:"solid",borderRadius:T.scalingValue($??0,t),borderWidth:Pe,paddingTop:T.scalingValue((y==null?void 0:y.top)??0,t),paddingRight:T.scalingValue((y==null?void 0:y.right)??0,t),paddingBottom:T.scalingValue((y==null?void 0:y.bottom)??0,t),paddingLeft:T.scalingValue((y==null?void 0:y.left)??0,t),...ve,...m?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:l.jsx("span",{className:`${i}-overlay-anchor`,style:m?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:ye==="submitting"?"...":c})})})]}),De==="success"&&l.jsx("p",{className:`${i}-success`,style:{...Ae},children:J}),De==="error"&&l.jsx("p",{className:`${i}-error`,style:{...Ae},role:"alert",children:uo??Qe??se})]})}const Zl={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"},Jl=["hover","focus","filled","success","error"],Ql=`import React, { useMemo, useState } from 'react';
142
+ `}function Gl({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:i}=w.useScopedStyles(),{type:s="A",fieldsToShow:r=2,fields:a=[],buttonLabel:c,gap:d,fieldsGap:u,buttonCorners:L,buttonStroke:h,buttonPadding:f,isButtonFullWidth:m,inputCorners:g,inputStroke:$,inputPadding:v,inputColor:C,inputTextColor:y,inputBorderColor:M,placeholderColor:N,buttonColor:A,buttonTextColor:x,buttonBorderColor:P,labelTextColor:T,successColor:R,errorColor:k,fontFamily:D,inputFontSettings:O,inputFontSize:G,inputLineHeight:X,inputLetterSpacing:b,inputWordSpacing:B,inputTextAppearance:W,buttonFontSettings:F,buttonFontSize:E,buttonLineHeight:H,buttonLetterSpacing:J,buttonWordSpacing:ie,buttonTextAppearance:U,labelFontSettings:le,labelFontSize:V,labelLineHeight:re,labelLetterSpacing:fe,labelWordSpacing:me,labelTextAppearance:ge,statusFontSettings:I,statusFontSize:ee,statusLineHeight:_,statusLetterSpacing:S,statusWordSpacing:j,statusTextAppearance:q,successMessage:Y,errorMessage:te,stateOverrides:ne}=e,oe=s==="B",se=a.slice(0,Math.min(r,a.length)),xe={fontSettings:{fontFamily:D,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:G??.01,lineHeight:X,letterSpacing:b??0,wordSpacing:B??0,textAppearance:W,color:y},de=ut(Ke(xe,t)),K=w.scalingValue($??0,t),ue=w.scalingValue((X??G??.01)+((v==null?void 0:v.top)??0)+((v==null?void 0:v.bottom)??0)+(s==="C"?$??0:($??0)*2),t),z={...de,borderStyle:"solid",borderRadius:s==="C"?0:w.scalingValue(g??0,t),...s==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:K,borderLeftWidth:0}:{borderWidth:K},paddingTop:w.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:w.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:w.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:w.scalingValue((v==null?void 0:v.left)??0,t),height:ue,minHeight:ue},Q={fontSettings:{fontFamily:D,fontWeight:(F==null?void 0:F.fontWeight)??400,fontStyle:(F==null?void 0:F.fontStyle)??"normal"},fontSize:E??.01,lineHeight:H,letterSpacing:J??0,wordSpacing:ie??0,textAppearance:U,color:x},ye=ut(Ke(Q,t)),Le=w.scalingValue(h??0,t),ke={fontSettings:{fontFamily:D,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:V??.01,lineHeight:re,letterSpacing:fe??0,wordSpacing:me??0,textAppearance:ge,color:T},Ae=Ke(ke,t),ve={fontSettings:{fontFamily:D,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:ee??.01,lineHeight:_,letterSpacing:S??0,wordSpacing:j??0,textAppearance:q,color:R},Fe=ut(Ke(ve,t)),ze=w.buildColorVars(i,{inputColor:C,inputTextColor:y,inputBorderColor:M,placeholderColor:N!=null&&N.trim()?N:"#cccccc",buttonColor:A,buttonTextColor:x,buttonBorderColor:P,labelTextColor:T,successColor:R,errorColor:k},Yl,Xl,ne),[Re,qe]=p.useState(()=>Object.fromEntries(se.map(he=>[he.name,""]))),[Nt,Xe]=p.useState("idle"),[Ce,Ze]=p.useState(null),at=o==="success"?"success":o==="error"?"error":Nt,gt=o==="error"?te:Ce,$t=o==="filled",nt=p.useMemo(()=>{if(!$t)return Re;let he=null;for(const He of se)(Re[He.name]??"").trim().length>0||(he=he??{...Re},he[He.name]="Filled");return he??Re},[Re,$t,se]),ht=at==="error"?w.getFormFieldValidationError(se,nt):null,ft=`${o&&o!=="default"?`${i}-state-${o}`:""}`.trim(),Ht=n==null?void 0:n.submitUrl,Te=(he,He)=>{qe(Be=>({...Be,[he]:He}))},Ue=async he=>{he.preventDefault();const He=Object.fromEntries(se.map(Me=>{var st;return[Me.name,((st=Re[Me.name])==null?void 0:st.trim())??""]}).filter(([,Me])=>Me));if(!Ht){Xe("error"),Ze("No integrations were found for this form.");return}if(Object.keys(He).length===0)return;const Be=w.getFormFieldValidationError(se,Re);if(Be){Xe("error"),Ze(Be);return}Xe("submitting"),Ze(null);try{const Me=await fetch(Ht,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(He)});if(!Me.ok){const st=await Me.text();throw new Error(st||`Request failed: ${Me.status}`)}Xe("success"),qe(Object.fromEntries(se.map(st=>[st.name,""])))}catch(Me){Xe("error"),Ze(Me instanceof Error?Me.message:"Something went wrong")}};return l.jsxs("div",{className:`${i}-wrapper ${i}-type-${s} ${ft}`.trim(),style:ze,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Ul(i)}}),l.jsxs("form",{onSubmit:Ue,className:`${i}-form`,style:{gap:w.scalingValue(d??0,t)},children:[l.jsx("div",{className:`${i}-fields`,style:{gap:w.scalingValue(u??0,t)},children:se.map((he,He)=>l.jsxs("div",{className:`${i}-field-group${oe?` ${i}-labeled`:""}`,children:[oe&&l.jsx("span",{className:`${i}-field-label`,style:Ae?{...Ae,lineHeight:Ae.fontSize}:void 0,children:he.label||he.name}),he.type==="textarea"?l.jsx("textarea",{name:he.name,autoComplete:"off",value:nt[he.name]??"",onChange:Be=>Te(he.name,Be.target.value),placeholder:he.placeholder,className:`${i}-input`,style:z,rows:1,"data-filled":$t||(nt[he.name]??"").trim().length>0,"data-field-type":"textarea"}):l.jsx("input",{type:he.type==="phone"?"tel":he.type==="email"?"email":"text",name:he.name,autoComplete:"off",value:nt[he.name]??"",onChange:Be=>Te(he.name,Be.target.value),placeholder:he.placeholder,required:he.isRequired??he.type==="email",className:`${i}-input`,style:z,"data-filled":$t||(nt[he.name]??"").trim().length>0})]},He))}),l.jsx("div",{className:`${i}-overlay-anchor`,children:l.jsx("button",{type:"submit",className:`${i}-button`,style:{borderStyle:"solid",borderRadius:w.scalingValue(L??0,t),borderWidth:Le,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),...ye,...m?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:l.jsx("span",{className:`${i}-overlay-anchor`,style:m?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Nt==="submitting"?"...":c})})})]}),at==="success"&&l.jsx("p",{className:`${i}-success`,style:{...Fe},children:Y}),at==="error"&&l.jsx("p",{className:`${i}-error`,style:{...Fe},role:"alert",children:ht??gt??te})]})}const Yl={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"},Xl=["hover","focus","filled","success","error"],Zl=`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
- `,ec=[{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"}],Fn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},tc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],nc={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:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",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:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",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:{...Fn.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:{...Fn.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:{...Fn.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:{...Fn.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:ec,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:"settings",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","inputCorners"]},{type:"group",title:"",items:["inputStroke","inputPadding"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["gap","buttonCorners"]},{type:"row",title:"",items:["buttonStroke","buttonPadding"]},{type:"row",title:"",items:["isButtonFullWidth"]}]}]}]},{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:[...tc],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"]},oc={element:Xl,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300,height:42},t:{width:346,height:42},m:{width:300,height:42}},schema:nc,sourceCode:Ql};function Mn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ic(e){return`
743
+ `,Jl=[{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"}],Bn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ql=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],ec={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:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",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:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",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:{...Bn.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:{...Bn.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:{...Bn.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:{...Bn.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:Jl,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:"settings",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","inputCorners"]},{type:"group",title:"",items:["inputStroke","inputPadding"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["gap","buttonCorners"]},{type:"row",title:"",items:["buttonStroke","buttonPadding"]},{type:"row",title:"",items:["isButtonFullWidth"]}]}]}]},{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:[...Ql],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"]},tc={element:Gl,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300,height:42},t:{width:346,height:42},m:{width:300,height:42}},schema:ec,sourceCode:Zl};function On(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function nc(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: ${Mn(8)};
926
- font-size: ${Mn(14)};
925
+ margin-top: ${On(8)};
926
+ font-size: ${On(14)};
927
927
  color: var(--${e}-success-success-color, var(--${e}-success-color));
928
928
  }
929
929
  .${e}-error {
930
- margin-top: ${Mn(8)};
931
- font-size: ${Mn(14)};
930
+ margin-top: ${On(8)};
931
+ font-size: ${On(14)};
932
932
  color: var(--${e}-error-error-color, var(--${e}-error-color));
933
933
  }
934
- `}const rc=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:i}=T.useScopedStyles(),{fields:s=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:r,buttonLabel:a,fieldsToShow:c=1,fontFamily:u,inputFontSettings:d,inputFontSize:$,inputLineHeight:h,inputLetterSpacing:y,inputWordSpacing:m,inputTextAppearance:g,buttonFontSettings:S,buttonFontSize:f,buttonLineHeight:b,buttonLetterSpacing:_,buttonWordSpacing:E,buttonTextAppearance:P,statusFontSettings:L,statusFontSize:v,statusLineHeight:C,statusLetterSpacing:R,statusWordSpacing:H,statusTextAppearance:W,iconMaxWidth:O,minHeight:D,corners:j,stroke:U,stateOverrides:w,inputPadding:N,buttonPadding:F,successMessage:M="Thanks for subscribing!",errorMessage:I="Please, fill all required fields."}=e,V=s.slice(0,Math.min(c,s.length)),[te,ue]=p.useState(()=>Object.fromEntries(V.map($e=>[$e.name,""]))),[re,me]=p.useState("idle"),[B,Q]=p.useState(null),G=o==="success"?"success":o==="error"?"error":re,Y=o==="error"?I:B,ie=o==="filled",k=p.useMemo(()=>{if(!ie)return te;let $e=null;for(const Ae of V)(te[Ae.name]??"").trim().length>0||($e=$e??{...te},$e[Ae.name]="Filled");return $e??te},[ie,te,V]),ne=G==="error"?T.getFormFieldValidationError(V,k):null,A=o&&o!=="default"?`${i}-state-${o}`:"",x=V.some($e=>(k[$e.name]??"").trim().length>0),z=A!==`${i}-state-filled`&&x?`${i}-state-filled`:"",q=`${A} ${z}`.trim(),J=n==null?void 0:n.submitUrl,se=a??"",le=(r==null?void 0:r.icon)??"",ce=(r==null?void 0:r.mode)==="On",he=se||"Submit",K={fontSettings:{fontFamily:u,fontWeight:(d==null?void 0:d.fontWeight)??400,fontStyle:(d==null?void 0:d.fontStyle)??"normal"},fontSize:$??.01,lineHeight:h,letterSpacing:y??0,wordSpacing:m??0,textAppearance:g,color:e.inputTextColor??"#111111"},ee={fontSettings:{fontFamily:u,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:f??.01,lineHeight:b,letterSpacing:_??0,wordSpacing:E??0,textAppearance:P,color:e.buttonTextColor??"#ffffff"},Z={fontSettings:{fontFamily:u,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:v??.01,lineHeight:C,letterSpacing:R??0,wordSpacing:H??0,textAppearance:W,color:e.successColor??"#22c55e"},de=yt(Je(K,t)),oe=yt(Je(ee,t)),pe=yt(Je(Z,t)),ve=T.buildColorVars(i,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(K==null?void 0:K.color)??"#111111",buttonTextColor:e.buttonTextColor??(ee==null?void 0:ee.color)??"#ffffff"},ac,sc,w),Pe={borderRadius:T.scalingValue(j,t),borderWidth:T.scalingValue(U,t),borderStyle:"solid"},Ke={borderLeftWidth:T.scalingValue(U,t)},Ge=async $e=>{$e.preventDefault();const Ae=Object.fromEntries(V.map(We=>{var Ve;return[We.name,((Ve=te[We.name])==null?void 0:Ve.trim())??""]}).filter(([,We])=>We));if(!J){me("error"),Q("No integrations were found for this form.");return}if(Object.keys(Ae).length===0)return;const Me=T.getFormFieldValidationError(V,te);if(Me){me("error"),Q(Me);return}me("submitting"),Q(null);try{const We=await fetch(J,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ae)});if(!We.ok){const Ve=await We.text();throw new Error(Ve||`Request failed: ${We.status}`)}me("success"),ue(Object.fromEntries(V.map(Ve=>[Ve.name,""])))}catch(We){me("error"),Q(We instanceof Error?We.message:"Something went wrong")}};return l.jsxs("div",{className:`${i}-wrapper ${q}`.trim(),style:ve,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:ic(i)}}),l.jsxs("form",{onSubmit:Ge,className:`${i}-form`,style:{...Pe,height:T.scalingValue(D,t),minHeight:T.scalingValue(D,t)},children:[l.jsx("div",{className:`${i}-inputWrap ${i}-overlayAnchor`,style:{flex:1,minWidth:0},children:V.map($e=>l.jsx("input",{type:$e.type==="email"?"email":$e.type==="phone"?"tel":"text",name:$e.name,autoComplete:"off",value:k[$e.name]??"",onChange:Ae=>ue(Me=>({...Me,[$e.name]:Ae.target.value})),placeholder:$e.placeholder,required:$e.isRequired??$e.type==="email",className:`${i}-input`,style:{...de,paddingRight:T.scalingValue(N.right,t),paddingLeft:T.scalingValue(N.left,t),paddingTop:T.scalingValue(N.top,t),paddingBottom:T.scalingValue(N.bottom,t)}},$e.name))}),l.jsx("div",{className:`${i}-overlayAnchor`,children:l.jsx("button",{type:"submit",className:`${i}-submitBtn`,"aria-label":he,style:{...oe,...Ke,paddingRight:T.scalingValue(F.right,t),paddingLeft:T.scalingValue(F.left,t),paddingTop:T.scalingValue(F.top,t),paddingBottom:T.scalingValue(F.bottom,t)},children:re==="submitting"?"...":ce?le&&l.jsx(Lt,{url:le,className:`${i}-submitBtnIcon`,style:{maxWidth:T.scalingValue(O??0,t)},fill:`var(--${i}-button-text-color)`,hoverFill:`var(--${i}-button-text-color)`}):se})})]}),G==="success"&&l.jsx("p",{className:`${i}-success`,style:{...pe},children:M}),G==="error"&&l.jsx("p",{className:`${i}-error`,style:{...pe},role:"alert",children:ne??Y??I})]})},ac={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"},sc=["hover","focus","filled","success","error"],lc=`import React, { useMemo, useState } from 'react';
934
+ `}const oc=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:i}=w.useScopedStyles(),{fields:s=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:r,buttonLabel:a,fieldsToShow:c=1,fontFamily:d,inputFontSettings:u,inputFontSize:L,inputLineHeight:h,inputLetterSpacing:f,inputWordSpacing:m,inputTextAppearance:g,buttonFontSettings:$,buttonFontSize:v,buttonLineHeight:C,buttonLetterSpacing:y,buttonWordSpacing:M,buttonTextAppearance:N,statusFontSettings:A,statusFontSize:x,statusLineHeight:P,statusLetterSpacing:T,statusWordSpacing:R,statusTextAppearance:k,iconMaxWidth:D,minHeight:O,corners:G,stroke:X,stateOverrides:b,inputPadding:B,buttonPadding:W,successMessage:F="Thanks for subscribing!",errorMessage:E="Please, fill all required fields."}=e,H=s.slice(0,Math.min(c,s.length)),[J,ie]=p.useState(()=>Object.fromEntries(H.map(ve=>[ve.name,""]))),[U,le]=p.useState("idle"),[V,re]=p.useState(null),fe=o==="success"?"success":o==="error"?"error":U,me=o==="error"?E:V,ge=o==="filled",I=p.useMemo(()=>{if(!ge)return J;let ve=null;for(const Fe of H)(J[Fe.name]??"").trim().length>0||(ve=ve??{...J},ve[Fe.name]="Filled");return ve??J},[ge,J,H]),ee=fe==="error"?w.getFormFieldValidationError(H,I):null,_=o&&o!=="default"?`${i}-state-${o}`:"",S=H.some(ve=>(I[ve.name]??"").trim().length>0),j=_!==`${i}-state-filled`&&S?`${i}-state-filled`:"",q=`${_} ${j}`.trim(),Y=n==null?void 0:n.submitUrl,te=a??"",ne=(r==null?void 0:r.icon)??"",oe=(r==null?void 0:r.mode)==="On",se=te||"Submit",xe={fontSettings:{fontFamily:d,fontWeight:(u==null?void 0:u.fontWeight)??400,fontStyle:(u==null?void 0:u.fontStyle)??"normal"},fontSize:L??.01,lineHeight:h,letterSpacing:f??0,wordSpacing:m??0,textAppearance:g,color:e.inputTextColor??"#111111"},de={fontSettings:{fontFamily:d,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:v??.01,lineHeight:C,letterSpacing:y??0,wordSpacing:M??0,textAppearance:N,color:e.buttonTextColor??"#ffffff"},K={fontSettings:{fontFamily:d,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:x??.01,lineHeight:P,letterSpacing:T??0,wordSpacing:R??0,textAppearance:k,color:e.successColor??"#22c55e"},ue=ut(Ke(xe,t)),z=ut(Ke(de,t)),Q=ut(Ke(K,t)),ye=w.buildColorVars(i,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(xe==null?void 0:xe.color)??"#111111",buttonTextColor:e.buttonTextColor??(de==null?void 0:de.color)??"#ffffff"},ic,rc,b),Le={borderRadius:w.scalingValue(G,t),borderWidth:w.scalingValue(X,t),borderStyle:"solid"},ke={borderLeftWidth:w.scalingValue(X,t)},Ae=async ve=>{ve.preventDefault();const Fe=Object.fromEntries(H.map(Re=>{var qe;return[Re.name,((qe=J[Re.name])==null?void 0:qe.trim())??""]}).filter(([,Re])=>Re));if(!Y){le("error"),re("No integrations were found for this form.");return}if(Object.keys(Fe).length===0)return;const ze=w.getFormFieldValidationError(H,J);if(ze){le("error"),re(ze);return}le("submitting"),re(null);try{const Re=await fetch(Y,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Fe)});if(!Re.ok){const qe=await Re.text();throw new Error(qe||`Request failed: ${Re.status}`)}le("success"),ie(Object.fromEntries(H.map(qe=>[qe.name,""])))}catch(Re){le("error"),re(Re instanceof Error?Re.message:"Something went wrong")}};return l.jsxs("div",{className:`${i}-wrapper ${q}`.trim(),style:ye,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:nc(i)}}),l.jsxs("form",{onSubmit:Ae,className:`${i}-form`,style:{...Le,height:w.scalingValue(O,t),minHeight:w.scalingValue(O,t)},children:[l.jsx("div",{className:`${i}-inputWrap ${i}-overlayAnchor`,style:{flex:1,minWidth:0},children:H.map(ve=>l.jsx("input",{type:ve.type==="email"?"email":ve.type==="phone"?"tel":"text",name:ve.name,autoComplete:"off",value:I[ve.name]??"",onChange:Fe=>ie(ze=>({...ze,[ve.name]:Fe.target.value})),placeholder:ve.placeholder,required:ve.isRequired??ve.type==="email",className:`${i}-input`,style:{...ue,paddingRight:w.scalingValue(B.right,t),paddingLeft:w.scalingValue(B.left,t),paddingTop:w.scalingValue(B.top,t),paddingBottom:w.scalingValue(B.bottom,t)}},ve.name))}),l.jsx("div",{className:`${i}-overlayAnchor`,children:l.jsx("button",{type:"submit",className:`${i}-submitBtn`,"aria-label":se,style:{...z,...ke,paddingRight:w.scalingValue(W.right,t),paddingLeft:w.scalingValue(W.left,t),paddingTop:w.scalingValue(W.top,t),paddingBottom:w.scalingValue(W.bottom,t)},children:U==="submitting"?"...":oe?ne&&l.jsx(At,{url:ne,className:`${i}-submitBtnIcon`,style:{maxWidth:w.scalingValue(D??0,t)},fill:`var(--${i}-button-text-color)`,hoverFill:`var(--${i}-button-text-color)`}):te})})]}),fe==="success"&&l.jsx("p",{className:`${i}-success`,style:{...Q},children:F}),fe==="error"&&l.jsx("p",{className:`${i}-error`,style:{...Q},role:"alert",children:ee??me??E})]})},ic={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"},rc=["hover","focus","filled","success","error"],ac=`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,7 +1503,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
1503
1503
  };
1504
1504
 
1505
1505
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1506
- `,cc="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>'),dc=[{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."}],vo={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},uc=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],pc={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:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...vo.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:{...vo.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:{...vo.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:dc,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:cc},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["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:[...uc],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"]},mc={element:rc,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:pc,sourceCode:lc};function Wi(e){return`
1506
+ `,sc="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>'),lc=[{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."}],Co={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},cc=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],uc={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:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...Co.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:{...Co.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:{...Co.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:lc,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:sc},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["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:[...cc],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"]},dc={element:oc,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:uc,sourceCode:ac};function Wi(e){return`
1507
1507
  .${e}-marquee-wrapper {
1508
1508
  overflow: hidden;
1509
1509
  width: 100%;
@@ -1635,7 +1635,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1635
1635
  .${e}-image-hover-grayscale:hover img {
1636
1636
  filter: grayscale(100%);
1637
1637
  }
1638
- `}const gc=30,hc=20,bo=2,fc=2,yc=(e,t)=>Array.from({length:t},()=>e).flat(),vc=(e,t)=>{const n=t.getBoundingClientRect(),o=e.getBoundingClientRect();return o.right>n.left&&o.left<n.right},bc=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(o=>vc(o,e))},xc=({item:e,prefix:t,imageFit:n,imageMaxWidth:o,imageMaxHeight:i,imageHoverClass:s,isFirstSet:r,scaled:a,onFirstSetImageDone:c})=>{var v,C,R;const u=p.useRef(null);p.useLayoutEffect(()=>{if(!r)return;const H=u.current;H!=null&&H.complete&&(c==null||c())},[r,(v=e.image)==null?void 0:v.url,c]);const d=n.display==="Cover",$=n.ratioValue??"1:1",h=n.reversed??!1,[y,m]=$.split(":").map(Number),f=(h?m:y)/(h?y:m);let b=o,_=b/f;_>i&&(_=i,b=_*f);const E=a(b),P=a(_),L=((C=e.image)==null?void 0:C.url)&&l.jsx("img",{ref:u,src:e.image.url,alt:((R=e.image)==null?void 0:R.name)??"",style:d?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:a(o),objectFit:"contain"},onLoad:r?c:void 0,onError:r?c:void 0});return l.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...d?{width:E}:{width:"fit-content",maxWidth:a(o),minWidth:0}},children:l.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...d?{width:E,height:P,overflow:"hidden"}:{width:"fit-content",maxWidth:a(o),height:a(i)}},children:L&&e.link?l.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Ce(`${t}-marquee-link`,!d&&`${t}-marquee-link-contain`),children:L}):L})})},Cc=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:i}=T.useScopedStyles(),{speed:s,direction:r,pauseOnHover:a,gap:c,imageMaxWidth:u,imageMaxHeight:d,imageFit:$,hoverEffect:h}=e,y=h==="off"||h==="randomize"?void 0:`${i}-image-hover-${h}`,m=!o,g=Math.max(0,s)*gc,S=G=>T.scalingValue(G,n??!1),f=p.useRef(null),b=p.useRef(null),_=p.useRef(null),[E,P]=p.useState(0),[L,v]=p.useState(0),C=m&&a==="on",[R,H]=p.useState(!1),[W,O]=p.useState({}),D=p.useRef(W);D.current=W;const j=p.useRef(null),U=p.useRef(0),w=p.useRef(null),N=p.useMemo(()=>(t??[]).map(G=>{var Y;return((Y=G.image)==null?void 0:Y.url)??""}).join("\0"),[t]),[F,M]=p.useState(bo),I=p.useMemo(()=>{const G=t??[];return!m||G.length===0?G:yc(G,F)},[t,m,F]),V=p.useMemo(()=>I.filter(G=>{var Y;return!!((Y=G.image)!=null&&Y.url)}).length,[I]),te=p.useMemo(()=>!m||((t==null?void 0:t.length)??0)===0?1:fc,[m,t==null?void 0:t.length]);p.useLayoutEffect(()=>{U.current=0,O({}),j.current=null,M(bo),P(0)},[N]),p.useEffect(()=>{if(h!=="randomize")return;const G=f.current;if(!G)return;const Y=A=>{O(x=>{let z=null;for(const q of A)q in x&&(bc(G,q)||(z||(z={...x}),delete z[q]));return z??x})},ie=new IntersectionObserver(A=>{const x=new Set;for(const z of A){const q=z.target.dataset.marqueeItemIndex,J=q!==void 0?Number(q):NaN;Number.isNaN(J)||x.add(J)}x.size>0&&Y(x)},{root:G,threshold:0});Object.keys(W).forEach(A=>{const x=Number(A);G.querySelectorAll(`[data-marquee-item-index="${x}"]`).forEach(z=>ie.observe(z))});let k=0;const ne=()=>{const A=Object.keys(D.current);A.length!==0&&(Y(A.map(Number)),k=requestAnimationFrame(ne))};return Object.keys(D.current).length>0&&(k=requestAnimationFrame(ne)),()=>{cancelAnimationFrame(k),ie.disconnect()}},[h,W]),p.useLayoutEffect(()=>{if(!m)return;const G=f.current,Y=_.current;if(!G||!Y)return;let ie=0;const k=()=>{const x=G.getBoundingClientRect().width,z=Y.getBoundingClientRect().width,q=j.current,J=typeof q=="number"&&Math.abs(q-z)<=.25;if(j.current=z,z>0&&F>0){const se=z/F;if(se>0&&x>0){const le=Math.max(bo,Math.ceil(x/se)+1);if(le!==F){M(le);return}}}if(z>0&&E<=0){P(z);return}J&&z!==E?P(z):!J&&E<=0&&(cancelAnimationFrame(ie),ie=requestAnimationFrame(k))},ne=()=>{cancelAnimationFrame(ie),ie=requestAnimationFrame(k)};w.current=ne,ne();const A=new ResizeObserver(ne);return A.observe(G),A.observe(Y),()=>{w.current=null,cancelAnimationFrame(ie),A.disconnect()}},[m,E,N,F]),p.useLayoutEffect(()=>{const G=b.current;if(!m||!G)return;const Y=E>0?E:0,ie=Y>0&&g>0?Y/g*1e3:0,k=`${Math.max(0,ie)/1e3}s`;G.style.setProperty("--marquee-distance",`${Y}px`),G.style.setProperty("--marquee-duration",k)},[m,g,E]),p.useLayoutEffect(()=>{if(!m){v(0);return}if(E<=0){v(0);return}const G=b.current;if(!G)return;const Y=()=>{const k=G.getBoundingClientRect().height;v(k>0?k:0)};Y();const ie=new ResizeObserver(Y);return ie.observe(G),()=>ie.disconnect()},[m,te,I,n,c,u,d,E,$,W]);const ue=()=>{C&&H(!0)},re=()=>{C&&H(!1)},me=p.useCallback(()=>{var G;U.current=Math.min(V,U.current+1),(G=w.current)==null||G.call(w)},[V]),B=p.useCallback((G,Y)=>{O(ie=>{const k=ie[G]??Y,ne=(t??[]).filter(x=>x!==k);if(ne.length===0)return ie;const A=ne[Math.floor(Math.random()*ne.length)];return{...ie,[G]:A}})},[t]),Q=(G,Y,ie,k)=>{const ne=h==="randomize"&&$.display==="Cover"?W[ie]??G:G,A=`max(${S(c)}, ${hc}px)`,x=`calc(-0.5 * (${A} + ${S(c)}))`;return l.jsxs("div",{className:`${i}-marquee-card`,"data-marquee-item-index":ie,onMouseEnter:h==="randomize"&&$.display==="Cover"?()=>B(ie,G):void 0,children:[l.jsx(xc,{item:ne,prefix:i,imageFit:$,imageMaxWidth:u,imageMaxHeight:d,imageHoverClass:y,isEditor:n,isFirstSet:k,scaled:S,onFirstSetImageDone:me}),n&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${i}-gap-control`,style:{position:"absolute",top:0,right:x,width:A,height:"100%"}})]},`${Y}-${ie}`)};return m&&((t==null?void 0:t.length)??0)>0?l.jsxs("div",{ref:f,className:Ce(`${i}-wrapper`,`${i}-marquee-wrapper`),"aria-label":"Marquee",style:E>0&&L>0?{height:L}:void 0,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Wi(i)}}),l.jsx("div",{ref:b,className:`${i}-marquee-track`,"data-direction":r,onMouseEnter:ue,onMouseLeave:re,style:{...C?{"--marquee-play-state":R?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:te},(G,Y)=>l.jsx("div",{ref:Y===0?_:void 0,className:Ce(`${i}-marquee-row`,`${i}-marquee-set`),style:{gap:S(c),paddingRight:S(c)},"aria-hidden":Y>0,children:I.map((ie,k)=>Q(ie,Y,k,Y===0))},`set-${Y}`))},"marquee-track")]}):l.jsxs("div",{ref:f,className:`${i}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Wi(i)}}),l.jsx("div",{className:Ce(`${i}-marquee-row`,`${i}-marquee-static`),style:{gap:S(c),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((G,Y)=>Q(G,0,Y))},"marquee-static")]})},Sc=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1638
+ `}const pc=30,mc=20,So=2,gc=2,hc=(e,t)=>Array.from({length:t},()=>e).flat(),fc=(e,t)=>{const n=t.getBoundingClientRect(),o=e.getBoundingClientRect();return o.right>n.left&&o.left<n.right},yc=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(o=>fc(o,e))},vc=({item:e,prefix:t,imageFit:n,imageMaxWidth:o,imageMaxHeight:i,imageHoverClass:s,isFirstSet:r,scaled:a,onFirstSetImageDone:c})=>{var x,P,T;const d=p.useRef(null);p.useLayoutEffect(()=>{if(!r)return;const R=d.current;R!=null&&R.complete&&(c==null||c())},[r,(x=e.image)==null?void 0:x.url,c]);const u=n.display==="Cover",L=n.ratioValue??"1:1",h=n.reversed??!1,[f,m]=L.split(":").map(Number),v=(h?m:f)/(h?f:m);let C=o,y=C/v;y>i&&(y=i,C=y*v);const M=a(C),N=a(y),A=((P=e.image)==null?void 0:P.url)&&l.jsx("img",{ref:d,src:e.image.url,alt:((T=e.image)==null?void 0:T.name)??"",style:u?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:a(o),objectFit:"contain"},onLoad:r?c:void 0,onError:r?c:void 0});return l.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:M}:{width:"fit-content",maxWidth:a(o),minWidth:0}},children:l.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...u?{width:M,height:N,overflow:"hidden"}:{width:"fit-content",maxWidth:a(o),height:a(i)}},children:A&&e.link?l.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:we(`${t}-marquee-link`,!u&&`${t}-marquee-link-contain`),children:A}):A})})},bc=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:i}=w.useScopedStyles(),{speed:s,direction:r,pauseOnHover:a,gap:c,imageMaxWidth:d,imageMaxHeight:u,imageFit:L,hoverEffect:h}=e,f=!n||!!o,m=f&&h!=="off"&&h!=="randomize"?`${i}-image-hover-${h}`:void 0,g=n?!!o:!0,v=((t==null?void 0:t.length)??0)>0&&(g||!!n),C=Math.max(0,s)*pc,y=I=>w.scalingValue(I,n??!1),M=p.useRef(null),N=p.useRef(null),A=p.useRef(null),[x,P]=p.useState(0),[T,R]=p.useState(0),k=g&&a==="on",[D,O]=p.useState(!1),[G,X]=p.useState({}),b=p.useRef(G);b.current=G;const B=p.useRef(null),W=p.useRef(0),F=p.useRef(null),E=p.useMemo(()=>(t??[]).map(I=>{var ee;return((ee=I.image)==null?void 0:ee.url)??""}).join("\0"),[t]),[H,J]=p.useState(So),ie=p.useMemo(()=>{const I=t??[];return!g||I.length===0?I:hc(I,H)},[t,g,H]),U=p.useMemo(()=>ie.filter(I=>{var ee;return!!((ee=I.image)!=null&&ee.url)}).length,[ie]),le=v?gc:1;p.useLayoutEffect(()=>{W.current=0,X({}),B.current=null,J(So),P(0)},[E]),p.useEffect(()=>{if(!f||h!=="randomize")return;const I=M.current;if(!I)return;const ee=q=>{X(Y=>{let te=null;for(const ne of q)ne in Y&&(yc(I,ne)||(te||(te={...Y}),delete te[ne]));return te??Y})},_=new IntersectionObserver(q=>{const Y=new Set;for(const te of q){const ne=te.target.dataset.marqueeItemIndex,oe=ne!==void 0?Number(ne):NaN;Number.isNaN(oe)||Y.add(oe)}Y.size>0&&ee(Y)},{root:I,threshold:0});Object.keys(G).forEach(q=>{const Y=Number(q);I.querySelectorAll(`[data-marquee-item-index="${Y}"]`).forEach(te=>_.observe(te))});let S=0;const j=()=>{const q=Object.keys(b.current);q.length!==0&&(ee(q.map(Number)),S=requestAnimationFrame(j))};return Object.keys(b.current).length>0&&(S=requestAnimationFrame(j)),()=>{cancelAnimationFrame(S),_.disconnect()}},[h,G,f]),p.useLayoutEffect(()=>{if(!v)return;const I=M.current,ee=A.current;if(!I||!ee)return;let _=0;const S=()=>{const Y=I.getBoundingClientRect().width,te=ee.getBoundingClientRect().width,ne=B.current,oe=typeof ne=="number"&&Math.abs(ne-te)<=.25;if(B.current=te,g&&te>0&&H>0){const se=te/H;if(se>0&&Y>0){const xe=Math.max(So,Math.ceil(Y/se)+1);if(xe!==H){J(xe);return}}}if(te>0&&x<=0){P(te);return}oe&&te!==x?P(te):!oe&&x<=0&&(cancelAnimationFrame(_),_=requestAnimationFrame(S))},j=()=>{cancelAnimationFrame(_),_=requestAnimationFrame(S)};F.current=j,j();const q=new ResizeObserver(j);return q.observe(I),q.observe(ee),()=>{F.current=null,cancelAnimationFrame(_),q.disconnect()}},[g,v,x,E,H]),p.useLayoutEffect(()=>{const I=N.current;if(!v||!I)return;const ee=x>0?x:0,_=ee>0&&C>0?ee/C*1e3:0,S=`${Math.max(0,_)/1e3}s`;I.style.setProperty("--marquee-distance",`${ee}px`),I.style.setProperty("--marquee-duration",S)},[g,v,C,x]),p.useLayoutEffect(()=>{if(!v){R(0);return}if(x<=0){R(0);return}const I=N.current;if(!I)return;const ee=()=>{const S=I.getBoundingClientRect().height;R(S>0?S:0)};ee();const _=new ResizeObserver(ee);return _.observe(I),()=>_.disconnect()},[v,le,ie,n,c,d,u,x,L,G]);const V=()=>{k&&O(!0)},re=()=>{k&&O(!1)},fe=p.useCallback(()=>{var I;W.current=Math.min(U,W.current+1),(I=F.current)==null||I.call(F)},[U]),me=p.useCallback((I,ee)=>{X(_=>{const S=_[I]??ee,j=(t??[]).filter(Y=>Y!==S);if(j.length===0)return _;const q=j[Math.floor(Math.random()*j.length)];return{..._,[I]:q}})},[t]),ge=(I,ee,_,S)=>{const j=f&&h==="randomize"&&L.display==="Cover"?G[_]??I:I,q=`max(${y(c)}, ${mc}px)`,Y=`calc(-0.5 * (${q} + ${y(c)}))`;return l.jsxs("div",{className:`${i}-marquee-card`,"data-marquee-item-index":_,onMouseEnter:f&&h==="randomize"&&L.display==="Cover"?()=>me(_,I):void 0,children:[l.jsx(vc,{item:j,prefix:i,imageFit:L,imageMaxWidth:d,imageMaxHeight:u,imageHoverClass:m,isEditor:n,isFirstSet:S,scaled:y,onFirstSetImageDone:fe}),n&&!o&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${i}-gap-control`,style:{position:"absolute",top:0,right:Y,width:q,height:"100%"}})]},`${ee}-${_}`)};if(v){const I=g?k&&D?"paused":"running":"paused";return l.jsxs("div",{ref:M,className:we(`${i}-wrapper`,`${i}-marquee-wrapper`),"aria-label":"Marquee",style:x>0&&T>0?{height:T}:void 0,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Wi(i)}}),l.jsx("div",{ref:N,className:`${i}-marquee-track`,"data-direction":r,onMouseEnter:V,onMouseLeave:re,style:{"--marquee-play-state":I},children:Array.from({length:le},(ee,_)=>l.jsx("div",{ref:_===0?A:void 0,className:we(`${i}-marquee-row`,`${i}-marquee-set`),style:{gap:y(c),paddingRight:y(c)},"aria-hidden":_>0,children:ie.map((S,j)=>ge(S,_,j,_===0))},`set-${_}`))},"marquee-track")]})}return l.jsxs("div",{ref:M,className:`${i}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Wi(i)}}),l.jsx("div",{className:we(`${i}-marquee-row`,`${i}-marquee-static`),style:{gap:y(c),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((I,ee)=>ge(I,0,ee))},"marquee-static")]})},xc=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1639
1639
  import cn from 'classnames';
1640
1640
  import { CommonComponentProps } from '../props';
1641
1641
  import { scalingValue } from '../utils/scalingValue';
@@ -1926,8 +1926,11 @@ const MarqueeItemCard = ({
1926
1926
  export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeProps) => {
1927
1927
  const { prefix: P } = useScopedStyles();
1928
1928
  const { speed, direction, pauseOnHover, gap, imageMaxWidth, imageMaxHeight, imageFit, hoverEffect } = settings;
1929
- const imageHoverClass = hoverEffect === 'off' || hoverEffect === 'randomize' ? undefined : \`\${P}-image-hover-\${hoverEffect}\`;
1930
- const autoplayEnabled = !isPreviewMode;
1929
+ const showHoverEffects = !isEditor || Boolean(isPreviewMode);
1930
+ const imageHoverClass = showHoverEffects && hoverEffect !== 'off' && hoverEffect !== 'randomize' ? \`\${P}-image-hover-\${hoverEffect}\` : undefined;
1931
+ const autoplayEnabled = isEditor ? Boolean(isPreviewMode) : true;
1932
+ const hasContent = (content?.length ?? 0) > 0;
1933
+ const useMarqueeTrack = hasContent && (autoplayEnabled || Boolean(isEditor));
1931
1934
  const pxPerSec = Math.max(0, speed) * PX_PER_SEC_PER_SPEED_UNIT;
1932
1935
  const scaled = (v: number) => scalingValue(v, isEditor ?? false);
1933
1936
  const wrapperRef = useRef<HTMLDivElement | null>(null);
@@ -1954,10 +1957,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
1954
1957
  () => setContent.filter((i) => Boolean(i.image?.url)).length,
1955
1958
  [setContent],
1956
1959
  );
1957
- const copies = useMemo(() => {
1958
- if (!autoplayEnabled || (content?.length ?? 0) === 0) return 1;
1959
- return OUTER_SET_COPIES;
1960
- }, [autoplayEnabled, content?.length]);
1960
+ const copies = useMarqueeTrack ? OUTER_SET_COPIES : 1;
1961
1961
 
1962
1962
  useLayoutEffect(() => {
1963
1963
  loadedFirstSetImagesRef.current = 0;
@@ -1968,7 +1968,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
1968
1968
  }, [contentImageUrlsKey]);
1969
1969
 
1970
1970
  useEffect(() => {
1971
- if (hoverEffect !== 'randomize') return;
1971
+ if (!showHoverEffects || hoverEffect !== 'randomize') return;
1972
1972
  const wrapper = wrapperRef.current;
1973
1973
  if (!wrapper) return;
1974
1974
 
@@ -2017,10 +2017,10 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2017
2017
  cancelAnimationFrame(raf);
2018
2018
  observer.disconnect();
2019
2019
  };
2020
- }, [hoverEffect, swappedSlots]);
2020
+ }, [hoverEffect, swappedSlots, showHoverEffects]);
2021
2021
 
2022
2022
  useLayoutEffect(() => {
2023
- if (!autoplayEnabled) return;
2023
+ if (!useMarqueeTrack) return;
2024
2024
  const wrapper = wrapperRef.current;
2025
2025
  const set = setRef.current;
2026
2026
  if (!wrapper || !set) return;
@@ -2033,7 +2033,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2033
2033
  typeof prevCandidate === 'number' &&
2034
2034
  Math.abs(prevCandidate - nextRawSetWidth) <= 0.25;
2035
2035
  stableCandidateRef.current = nextRawSetWidth;
2036
- if (nextRawSetWidth > 0 && contentSequenceRepeat > 0) {
2036
+ if (autoplayEnabled && nextRawSetWidth > 0 && contentSequenceRepeat > 0) {
2037
2037
  const singleCycleWidth = nextRawSetWidth / contentSequenceRepeat;
2038
2038
  if (singleCycleWidth > 0 && nextContainerWidth > 0) {
2039
2039
  const targetRepeat = Math.max(
@@ -2071,20 +2071,20 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2071
2071
  cancelAnimationFrame(raf);
2072
2072
  ro.disconnect();
2073
2073
  };
2074
- }, [autoplayEnabled, setWidth, contentImageUrlsKey, contentSequenceRepeat]);
2074
+ }, [autoplayEnabled, useMarqueeTrack, setWidth, contentImageUrlsKey, contentSequenceRepeat]);
2075
2075
 
2076
2076
  useLayoutEffect(() => {
2077
2077
  const track = trackRef.current;
2078
- if (!autoplayEnabled || !track) return;
2078
+ if (!useMarqueeTrack || !track) return;
2079
2079
  const safeSetWidth = setWidth > 0 ? setWidth : 0;
2080
2080
  const durationMs = safeSetWidth > 0 && pxPerSec > 0 ? (safeSetWidth / pxPerSec) * 1000 : 0;
2081
2081
  const durationS = \`\${Math.max(0, durationMs) / 1000}s\`;
2082
2082
  track.style.setProperty('--marquee-distance', \`\${safeSetWidth}px\`);
2083
2083
  track.style.setProperty('--marquee-duration', durationS);
2084
- }, [autoplayEnabled, pxPerSec, setWidth]);
2084
+ }, [autoplayEnabled, useMarqueeTrack, pxPerSec, setWidth]);
2085
2085
 
2086
2086
  useLayoutEffect(() => {
2087
- if (!autoplayEnabled) {
2087
+ if (!useMarqueeTrack) {
2088
2088
  setTrackHeight(0);
2089
2089
  return;
2090
2090
  }
@@ -2102,7 +2102,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2102
2102
  const ro = new ResizeObserver(measure);
2103
2103
  ro.observe(track);
2104
2104
  return () => ro.disconnect();
2105
- }, [autoplayEnabled, copies, setContent, isEditor, gap, imageMaxWidth, imageMaxHeight, setWidth, imageFit, swappedSlots]);
2105
+ }, [useMarqueeTrack, copies, setContent, isEditor, gap, imageMaxWidth, imageMaxHeight, setWidth, imageFit, swappedSlots]);
2106
2106
 
2107
2107
  const onTrackEnter = () => {
2108
2108
  if (!hoverPauseEnabled) return;
@@ -2132,7 +2132,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2132
2132
  }, [content]);
2133
2133
 
2134
2134
  const renderCardWrapper = (item: MarqueeItem, copyIndex: number, slotIndex: number, isFirstSet?: boolean) => {
2135
- const displayItem = hoverEffect === 'randomize' && imageFit.display === 'Cover' ? (swappedSlots[slotIndex] ?? item) : item;
2135
+ const displayItem = showHoverEffects && hoverEffect === 'randomize' && imageFit.display === 'Cover' ? (swappedSlots[slotIndex] ?? item) : item;
2136
2136
  const gapLabelSize = \`max(\${scaled(gap)}, \${GAP_LABEL_AREA_PX}px)\`;
2137
2137
  const gapControlRight = \`calc(-0.5 * (\${gapLabelSize} + \${scaled(gap)}))\`;
2138
2138
  return (
@@ -2140,7 +2140,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2140
2140
  key={\`\${copyIndex}-\${slotIndex}\`}
2141
2141
  className={\`\${P}-marquee-card\`}
2142
2142
  data-marquee-item-index={slotIndex}
2143
- onMouseEnter={hoverEffect === 'randomize' && imageFit.display === 'Cover' ? () => handleRandomizeEnter(slotIndex, item) : undefined}
2143
+ onMouseEnter={showHoverEffects && hoverEffect === 'randomize' && imageFit.display === 'Cover' ? () => handleRandomizeEnter(slotIndex, item) : undefined}
2144
2144
  >
2145
2145
  <MarqueeItemCard
2146
2146
  item={displayItem}
@@ -2154,7 +2154,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2154
2154
  scaled={scaled}
2155
2155
  onFirstSetImageDone={onFirstSetImageDone}
2156
2156
  />
2157
- {isEditor && (
2157
+ {isEditor && !isPreviewMode && (
2158
2158
  <div
2159
2159
  data-controls="gap"
2160
2160
  data-controls-axis="x"
@@ -2172,7 +2172,13 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2172
2172
  );
2173
2173
  };
2174
2174
 
2175
- if (autoplayEnabled && (content?.length ?? 0) > 0) {
2175
+ if (useMarqueeTrack) {
2176
+ const marqueePlayState = !autoplayEnabled
2177
+ ? 'paused'
2178
+ : hoverPauseEnabled
2179
+ ? (isHovering ? 'paused' : 'running')
2180
+ : 'running';
2181
+
2176
2182
  return (
2177
2183
  <div
2178
2184
  ref={wrapperRef}
@@ -2188,11 +2194,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2188
2194
  data-direction={direction}
2189
2195
  onMouseEnter={onTrackEnter}
2190
2196
  onMouseLeave={onTrackLeave}
2191
- style={{
2192
- ...(hoverPauseEnabled
2193
- ? ({ '--marquee-play-state': isHovering ? 'paused' : 'running' } as React.CSSProperties)
2194
- : ({ '--marquee-play-state': 'running' } as React.CSSProperties)),
2195
- }}
2197
+ style={{ '--marquee-play-state': marqueePlayState } as React.CSSProperties}
2196
2198
  >
2197
2199
  {Array.from({ length: copies }, (_, copyIndex) => (
2198
2200
  <div
@@ -2261,7 +2263,7 @@ type MarqueeProps = {
2261
2263
  isEditor?: boolean;
2262
2264
  isPreviewMode?: boolean;
2263
2265
  } & CommonComponentProps;
2264
- `,wc={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:7},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:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,max:400,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,max:400,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"Fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.15,imageMaxHeight:.1}},displayRules:[{if:{name:"imageFit.display",value:"Cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["direction"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZNCQFC3T744H0KX6R3FR.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZRTSS60YBFT6Y37ZX00T.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ9M9YJPQ5JWKCHDEW5M1GJD.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S04EHBXQS1T4KVAMZNZQM.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S08Q40WHD39024VNDWF2Q.jpeg",name:""},link:""}]}},$c={element:Cc,id:"marquee",name:"Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:140},m:{width:390,height:80}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:wc,sourceCode:Sc,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function Ii(e){return`
2266
+ `,Cc={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:7},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:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,max:400,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,max:400,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"Fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.15,imageMaxHeight:.1}},displayRules:[{if:{name:"imageFit.display",value:"Cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["direction"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZNCQFC3T744H0KX6R3FR.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZRTSS60YBFT6Y37ZX00T.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ9M9YJPQ5JWKCHDEW5M1GJD.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S04EHBXQS1T4KVAMZNZQM.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S08Q40WHD39024VNDWF2Q.jpeg",name:""},link:""}]}},Sc={element:bc,id:"marquee",name:"Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:140},m:{width:390,height:80}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:Cc,sourceCode:xc,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function ki(e){return`
2265
2267
  .${e}-marquee-wrapper {
2266
2268
  overflow: hidden;
2267
2269
  width: 100%;
@@ -2348,7 +2350,7 @@ type MarqueeProps = {
2348
2350
  pointer-events: auto;
2349
2351
  z-index: 10;
2350
2352
  }
2351
- `}const Tc=30,Lc=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:i}=T.useScopedStyles(),{autoplay:s,align:r,speed:a,direction:c,pauseOnHover:u,gap:d,cardWidth:$,corners:h,stroke:y,strokeColor:m,bgColor:g,padding:S,logoMarginTop:f,logoWidth:b,logoHeight:_,captionMarginTop:E}=e,P=s==="on"&&!o,L=P,v=Math.max(0,a)*Tc,C=K=>T.scalingValue(K,n??!1),R=p.useRef(null),H=p.useRef(null),W=p.useRef(null),[O,D]=p.useState(0),[j,U]=p.useState(0),[w,N]=p.useState(0),F=L&&u==="on",[M,I]=p.useState(!1),V=p.useRef(null),[te,ue]=p.useState(0),[re,me]=p.useState(0),B=p.useRef(null),Q=K=>{var Z,de,oe,pe,ve;return{fontSettings:{fontFamily:(e==null?void 0:e[`${K}FontFamily`])??"Arial",fontWeight:((Z=e==null?void 0:e[`${K}FontSettings`])==null?void 0:Z.fontWeight)??400,fontStyle:((de=e==null?void 0:e[`${K}FontSettings`])==null?void 0:de.fontStyle)??"normal"},textAppearance:{textTransform:((oe=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:oe.textTransform)??"none",textDecoration:((pe=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:pe.textDecoration)??"none",fontVariant:((ve=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:ve.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${K}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${K}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${K}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${K}LineHeight`])??.01,color:(e==null?void 0:e[`${K}Color`])??"#000000"}},G=Q("text"),Y=Q("caption"),ie=p.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(K=>{var ee,Z;return(((ee=K.text)==null?void 0:ee.length)??0)>0||(((Z=K.caption)==null?void 0:Z.length)??0)>0}),[t]),k=p.useMemo(()=>!P||(t==null?void 0:t.length)===0?1:j<=0||O<=0?2:Math.max(2,Math.ceil(O/j)+1),[P,t==null?void 0:t.length,j,O]);p.useLayoutEffect(()=>{if(!P)return;const K=R.current,ee=W.current;if(!K||!ee)return;let Z=0;const de=()=>{const ve=K.getBoundingClientRect().width,Pe=ee.getBoundingClientRect().width,Ke=B.current,Ge=typeof Ke=="number"&&Math.abs(Ke-Pe)<=.25;if(B.current=Pe,D(ve),typeof Pe=="number"&&Pe>0&&j<=0){U(Pe);return}Ge&&Pe!==j?U(Pe):!Ge&&j<=0&&(cancelAnimationFrame(Z),Z=requestAnimationFrame(de))},oe=()=>{cancelAnimationFrame(Z),Z=requestAnimationFrame(de)};oe();const pe=new ResizeObserver(oe);return pe.observe(K),pe.observe(ee),()=>{cancelAnimationFrame(Z),pe.disconnect()}},[P,j]),p.useLayoutEffect(()=>{const K=H.current;if(!P||!K||!L)return;const ee=j>0?j:0,Z=ee>0&&v>0?ee/v*1e3:0,de=`${Math.max(0,Z)/1e3}s`;K.style.setProperty("--marquee-distance",`${ee}px`),K.style.setProperty("--marquee-duration",de)},[P,L,v,j]),p.useLayoutEffect(()=>{if(!P){N(0);return}const K=W.current,ee=H.current;if(!K||!ee)return;const Z=()=>{let oe=0;for(let pe=0;pe<K.children.length;pe++){const Pe=K.children[pe].firstElementChild;Pe&&(oe=Math.max(oe,Pe.offsetHeight))}oe<=0&&(oe=ee.offsetHeight),N(oe>0?oe:0)};Z();const de=new ResizeObserver(Z);return de.observe(K),de.observe(ee),()=>{de.disconnect()}},[P,k,t,n,d,$,S,y,h,b,_,te,re]);const ne=()=>{F&&I(!0)},A=()=>{F&&I(!1)},x=p.useMemo(()=>{switch(r){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[r]),z=p.useMemo(()=>{switch(r){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[r]),q=p.useCallback((K,ee,Z,de)=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:x,width:"100%"},children:[l.jsx("div",{"data-controls":de==null?void 0:de.controlsName,"data-controls-axis":"y",className:`${i}-control`,style:{height:C((de==null?void 0:de.marginTop)??0)}}),l.jsx("div",{...de!=null&&de.dataMeasureKind?{"data-testimonial-measure":de.dataMeasureKind}:{},style:{...Je(K,n),textAlign:z,pointerEvents:"auto",...typeof(de==null?void 0:de.minHeightPx)=="number"&&de.minHeightPx>0?{minHeight:de.minHeightPx}:{}},children:l.jsx(vn,{content:ee})})]},Z),[x,z,n]),J=p.useCallback((K,ee,Z)=>{var de,oe,pe;return l.jsxs("div",{style:{padding:`${C(S.top)} ${C(S.right)} ${C(S.bottom)} ${C(S.left)}`,width:C($+y*2),height:"100%",borderRadius:C(h),border:`${C(y)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[l.jsx("div",{className:`${i}-cover`,style:{background:g}}),l.jsxs("div",{className:`${i}-elements-overlay`,style:{alignItems:x,textAlign:z},children:[K.text&&q(G,K.text,"text",Z!=null&&Z.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(Z==null?void 0:Z.textMinHeightPx)=="number"&&Z.textMinHeightPx>0?{minHeightPx:Z.textMinHeightPx}:void 0),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:x,width:"100%"},children:[l.jsx("div",{"data-controls":"logoMarginTop",className:`${i}-control`,style:{height:C(f)}}),l.jsx("div",{style:{width:C(b),height:C(_)},children:((de=K.logo)==null?void 0:de.url)&&l.jsx("img",{src:K.logo.url,alt:((oe=K.logo)==null?void 0:oe.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((pe=K.logo)==null?void 0:pe.objectFit)||"contain"}})})]}),K.caption&&q(Y,K.caption,"caption",{controlsName:"captionMarginTop",marginTop:E,...Z!=null&&Z.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(Z==null?void 0:Z.captionMinHeightPx)=="number"&&Z.captionMinHeightPx>0?{minHeightPx:Z.captionMinHeightPx}:{}})]})]},ee)},[g,E,Y,$,h,_,f,b,x,z,S.bottom,S.left,S.right,S.top,q,y,m,G,n]),se=p.useCallback(K=>{ue(K.maxTextPx),me(K.maxCaptionPx)},[]);p.useLayoutEffect(()=>{if(!ie){se({maxTextPx:0,maxCaptionPx:0});return}const K=V.current;if(!K)return;const ee=()=>{T.readTestimonialTextMeasure(K,se)};ee();const Z=new ResizeObserver(ee);return Z.observe(K),()=>{Z.disconnect()}},[ie,se,t,J]);const le=ie?{textMinHeightPx:te,captionMinHeightPx:re}:void 0,ce=ie?l.jsx("div",{ref:V,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((K,ee)=>J(K,`measure-${ee}`,{dataMeasureAttrs:!0}))}):null,he=(K,ee)=>l.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[J(K,`card-${ee}`,le),n&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${C(d)})`,width:C(d),height:"100%",pointerEvents:"auto",zIndex:2}})]},ee);return P&&((t==null?void 0:t.length)??0)>0?l.jsxs("div",{ref:R,className:Ce(`${i}-wrapper`,`${i}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...w>0?{height:w}:{}},children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Ii(i)}}),ce,l.jsx("div",{ref:H,className:`${i}-marquee-track`,"data-direction":c,onMouseEnter:ne,onMouseLeave:A,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",...F?{"--marquee-play-state":M?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:k},(K,ee)=>l.jsx("div",{ref:ee===0?W:void 0,className:`${i}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:C(d),paddingRight:C(d)},"aria-hidden":ee>0,children:t==null?void 0:t.map((Z,de)=>he(Z,`${ee}-${de}`))},`set-${ee}`))})]}):l.jsxs("div",{className:`${i}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Ii(i)}}),ce,l.jsx("div",{style:{gap:C(d),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((K,ee)=>he(K,ee))})]})},Ec=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2353
+ `}const wc=30,Fi=2,$c=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:i}=w.useScopedStyles(),{autoplay:s,align:r,speed:a,direction:c,pauseOnHover:d,gap:u,cardWidth:L,corners:h,stroke:f,strokeColor:m,bgColor:g,padding:$,logoMarginTop:v,logoWidth:C,logoHeight:y,captionMarginTop:M}=e,N=!!(n&&!o),A=((t==null?void 0:t.length)??0)>0,x=s==="on"&&(!n||!!o),P=A&&(x||!!n),T=Math.max(0,a)*wc,R=K=>w.scalingValue(K,n??!1),k=p.useRef(null),D=p.useRef(null),O=p.useRef(null),[G,X]=p.useState(0),[b,B]=p.useState(0),[W,F]=p.useState(0),E=x&&d==="on",[H,J]=p.useState(!1),ie=p.useRef(null),[U,le]=p.useState(0),[V,re]=p.useState(0),fe=p.useRef(null),me=K=>{var z,Q,ye,Le,ke;return{fontSettings:{fontFamily:(e==null?void 0:e[`${K}FontFamily`])??"Arial",fontWeight:((z=e==null?void 0:e[`${K}FontSettings`])==null?void 0:z.fontWeight)??400,fontStyle:((Q=e==null?void 0:e[`${K}FontSettings`])==null?void 0:Q.fontStyle)??"normal"},textAppearance:{textTransform:((ye=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:ye.textTransform)??"none",textDecoration:((Le=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:Le.textDecoration)??"none",fontVariant:((ke=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:ke.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${K}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${K}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${K}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${K}LineHeight`])??.01,color:(e==null?void 0:e[`${K}Color`])??"#000000"}},ge=me("text"),I=me("caption"),ee=p.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(K=>{var ue,z;return(((ue=K.text)==null?void 0:ue.length)??0)>0||(((z=K.caption)==null?void 0:z.length)??0)>0}),[t]),_=p.useMemo(()=>!P||(t==null?void 0:t.length)===0?1:b<=0||G<=0?Fi:Math.max(Fi,Math.ceil(G/b)+1),[P,t==null?void 0:t.length,b,G]);p.useLayoutEffect(()=>{if(!P)return;const K=k.current,ue=O.current;if(!K||!ue)return;let z=0;const Q=()=>{const ke=K.getBoundingClientRect().width,Ae=ue.getBoundingClientRect().width,ve=fe.current,Fe=typeof ve=="number"&&Math.abs(ve-Ae)<=.25;if(fe.current=Ae,X(ke),typeof Ae=="number"&&Ae>0&&b<=0){B(Ae);return}Fe&&Ae!==b?B(Ae):!Fe&&b<=0&&(cancelAnimationFrame(z),z=requestAnimationFrame(Q))},ye=()=>{cancelAnimationFrame(z),z=requestAnimationFrame(Q)};ye();const Le=new ResizeObserver(ye);return Le.observe(K),Le.observe(ue),()=>{cancelAnimationFrame(z),Le.disconnect()}},[x,P,b]),p.useLayoutEffect(()=>{const K=D.current;if(!P||!K)return;const ue=b>0?b:0,z=ue>0&&T>0?ue/T*1e3:0,Q=`${Math.max(0,z)/1e3}s`;K.style.setProperty("--marquee-distance",`${ue}px`),K.style.setProperty("--marquee-duration",Q)},[x,P,T,b]),p.useLayoutEffect(()=>{if(!P){F(0);return}const K=O.current,ue=D.current;if(!K||!ue)return;const z=()=>{let ye=0;for(let Le=0;Le<K.children.length;Le++){const Ae=K.children[Le].firstElementChild;Ae&&(ye=Math.max(ye,Ae.offsetHeight))}ye<=0&&(ye=ue.offsetHeight),F(ye>0?ye:0)};z();const Q=new ResizeObserver(z);return Q.observe(K),Q.observe(ue),()=>{Q.disconnect()}},[P,_,t,n,u,L,$,f,h,C,y,U,V]);const S=()=>{E&&J(!0)},j=()=>{E&&J(!1)},q=p.useMemo(()=>{switch(r){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[r]),Y=p.useMemo(()=>{switch(r){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[r]),te=p.useCallback((K,ue,z,Q)=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:q,width:"100%"},children:[l.jsx("div",{"data-controls":N?Q==null?void 0:Q.controlsName:void 0,"data-controls-axis":N?"y":void 0,className:N?`${i}-control`:void 0,style:{height:R((Q==null?void 0:Q.marginTop)??0)}}),l.jsx("div",{...Q!=null&&Q.dataMeasureKind?{"data-testimonial-measure":Q.dataMeasureKind}:{},style:{...Ke(K,n),textAlign:Y,pointerEvents:"auto",...typeof(Q==null?void 0:Q.minHeightPx)=="number"&&Q.minHeightPx>0?{minHeight:Q.minHeightPx}:{}},children:l.jsx(Cn,{content:ue})})]},z),[q,Y,n,N,i,R]),ne=p.useCallback((K,ue,z)=>{var Q,ye,Le;return l.jsxs("div",{style:{padding:`${R($.top)} ${R($.right)} ${R($.bottom)} ${R($.left)}`,width:R(L+f*2),height:"100%",borderRadius:R(h),border:`${R(f)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[l.jsx("div",{className:`${i}-cover`,style:{background:g}}),l.jsxs("div",{className:`${i}-elements-overlay`,style:{alignItems:q,textAlign:Y},children:[K.text&&te(ge,K.text,"text",z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(z==null?void 0:z.textMinHeightPx)=="number"&&z.textMinHeightPx>0?{minHeightPx:z.textMinHeightPx}:void 0),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:q,width:"100%"},children:[l.jsx("div",{"data-controls":N?"logoMarginTop":void 0,className:N?`${i}-control`:void 0,style:{height:R(v)}}),l.jsx("div",{style:{width:R(C),height:R(y)},children:((Q=K.logo)==null?void 0:Q.url)&&l.jsx("img",{src:K.logo.url,alt:((ye=K.logo)==null?void 0:ye.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Le=K.logo)==null?void 0:Le.objectFit)||"contain"}})})]}),K.caption&&te(I,K.caption,"caption",{controlsName:"captionMarginTop",marginTop:M,...z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(z==null?void 0:z.captionMinHeightPx)=="number"&&z.captionMinHeightPx>0?{minHeightPx:z.captionMinHeightPx}:{}})]})]},ue)},[g,M,I,L,h,y,v,C,q,Y,$.bottom,$.left,$.right,$.top,te,f,m,ge,n,N,i]),oe=p.useCallback(K=>{le(K.maxTextPx),re(K.maxCaptionPx)},[]);p.useLayoutEffect(()=>{if(!ee){oe({maxTextPx:0,maxCaptionPx:0});return}const K=ie.current;if(!K)return;const ue=()=>{w.readTestimonialTextMeasure(K,oe)};ue();const z=new ResizeObserver(ue);return z.observe(K),()=>{z.disconnect()}},[ee,oe,t,ne]);const se=ee?{textMinHeightPx:U,captionMinHeightPx:V}:void 0,xe=ee?l.jsx("div",{ref:ie,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((K,ue)=>ne(K,`measure-${ue}`,{dataMeasureAttrs:!0}))}):null,de=(K,ue)=>l.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[ne(K,`card-${ue}`,se),N&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${R(u)})`,width:R(u),height:"100%",pointerEvents:"auto",zIndex:2}})]},ue);if(P){const K=x?E&&H?"paused":"running":"paused";return l.jsxs("div",{ref:k,className:we(`${i}-wrapper`,`${i}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...W>0?{height:W}:{}},children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:ki(i)}}),xe,l.jsx("div",{ref:D,className:`${i}-marquee-track`,"data-direction":c,onMouseEnter:S,onMouseLeave:j,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":K},children:Array.from({length:_},(ue,z)=>l.jsx("div",{ref:z===0?O:void 0,className:`${i}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:R(u),paddingRight:R(u)},"aria-hidden":z>0,children:t==null?void 0:t.map((Q,ye)=>de(Q,`${z}-${ye}`))},`set-${z}`))})]})}return l.jsxs("div",{className:`${i}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:ki(i)}}),xe,l.jsx("div",{style:{gap:R(u),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((K,ue)=>de(K,ue))})]})},Tc=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2352
2354
  import cn from 'classnames';
2353
2355
  import { CommonComponentProps } from '../props';
2354
2356
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -2456,6 +2458,7 @@ type TestimonialsProps = {
2456
2458
  } & CommonComponentProps;
2457
2459
 
2458
2460
  const PX_PER_SEC_PER_SPEED_UNIT = 30;
2461
+ const MIN_TRACK_COPIES = 2;
2459
2462
 
2460
2463
  type RenderCardOpts = {
2461
2464
  textMinHeightPx?: number;
@@ -2473,8 +2476,10 @@ type RenderTextOpts = {
2473
2476
  export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }: TestimonialsProps) => {
2474
2477
  const { prefix: P } = useScopedStyles();
2475
2478
  const { autoplay, align, speed, direction, pauseOnHover, gap, cardWidth, corners, stroke, strokeColor, bgColor, padding, logoMarginTop, logoWidth, logoHeight, captionMarginTop } = settings;
2476
- const autoplayEnabled = autoplay === 'on' && !isPreviewMode;
2477
- const isAnimating = autoplayEnabled;
2479
+ const showControls = Boolean(isEditor && !isPreviewMode);
2480
+ const hasContent = (content?.length ?? 0) > 0;
2481
+ const autoplayEnabled = autoplay === 'on' && (!isEditor || Boolean(isPreviewMode));
2482
+ const useMarqueeTrack = hasContent && (autoplayEnabled || Boolean(isEditor));
2478
2483
  const pxPerSec = Math.max(0, speed) * PX_PER_SEC_PER_SPEED_UNIT;
2479
2484
  const scaled = (v: number) => scalingValue(v, isEditor ?? false);
2480
2485
  const wrapperRef = useRef<HTMLDivElement | null>(null);
@@ -2483,7 +2488,7 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
2483
2488
  const [containerWidth, setContainerWidth] = useState(0);
2484
2489
  const [setWidth, setSetWidth] = useState(0);
2485
2490
  const [trackHeight, setTrackHeight] = useState(0);
2486
- const hoverPauseEnabled = isAnimating && pauseOnHover === 'on';
2491
+ const hoverPauseEnabled = autoplayEnabled && pauseOnHover === 'on';
2487
2492
  const [isHovering, setIsHovering] = useState(false);
2488
2493
  const measureLayerRef = useRef<HTMLDivElement>(null);
2489
2494
  const [measuredTextMinPx, setMeasuredTextMinPx] = useState(0);
@@ -2521,13 +2526,13 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
2521
2526
  );
2522
2527
 
2523
2528
  const copies = useMemo(() => {
2524
- if (!autoplayEnabled || content?.length === 0) return 1;
2525
- if (setWidth <= 0 || containerWidth <= 0) return 2;
2526
- return Math.max(2, Math.ceil(containerWidth / setWidth) + 1);
2527
- }, [autoplayEnabled, content?.length, setWidth, containerWidth]);
2529
+ if (!useMarqueeTrack || content?.length === 0) return 1;
2530
+ if (setWidth <= 0 || containerWidth <= 0) return MIN_TRACK_COPIES;
2531
+ return Math.max(MIN_TRACK_COPIES, Math.ceil(containerWidth / setWidth) + 1);
2532
+ }, [useMarqueeTrack, content?.length, setWidth, containerWidth]);
2528
2533
 
2529
2534
  useLayoutEffect(() => {
2530
- if (!autoplayEnabled) return;
2535
+ if (!useMarqueeTrack) return;
2531
2536
  const wrapper = wrapperRef.current;
2532
2537
  const set = setRef.current;
2533
2538
  if (!wrapper || !set) return;
@@ -2562,20 +2567,20 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
2562
2567
  cancelAnimationFrame(raf);
2563
2568
  ro.disconnect();
2564
2569
  };
2565
- }, [autoplayEnabled, setWidth]);
2570
+ }, [autoplayEnabled, useMarqueeTrack, setWidth]);
2566
2571
 
2567
2572
  useLayoutEffect(() => {
2568
2573
  const track = trackRef.current;
2569
- if (!autoplayEnabled || !track || !isAnimating) return;
2574
+ if (!useMarqueeTrack || !track) return;
2570
2575
  const safeSetWidth = setWidth > 0 ? setWidth : 0;
2571
2576
  const durationMs = safeSetWidth > 0 && pxPerSec > 0 ? (safeSetWidth / pxPerSec) * 1000 : 0;
2572
2577
  const durationS = \`\${Math.max(0, durationMs) / 1000}s\`;
2573
2578
  track.style.setProperty('--marquee-distance', \`\${safeSetWidth}px\`);
2574
2579
  track.style.setProperty('--marquee-duration', durationS);
2575
- }, [autoplayEnabled, isAnimating, pxPerSec, setWidth]);
2580
+ }, [autoplayEnabled, useMarqueeTrack, pxPerSec, setWidth]);
2576
2581
 
2577
2582
  useLayoutEffect(() => {
2578
- if (!autoplayEnabled) {
2583
+ if (!useMarqueeTrack) {
2579
2584
  setTrackHeight(0);
2580
2585
  return;
2581
2586
  }
@@ -2601,7 +2606,7 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
2601
2606
  return () => {
2602
2607
  ro.disconnect();
2603
2608
  };
2604
- }, [autoplayEnabled, copies, content, isEditor, gap, cardWidth, padding, stroke, corners, logoWidth, logoHeight, measuredTextMinPx, measuredCaptionMinPx]);
2609
+ }, [useMarqueeTrack, copies, content, isEditor, gap, cardWidth, padding, stroke, corners, logoWidth, logoHeight, measuredTextMinPx, measuredCaptionMinPx]);
2605
2610
 
2606
2611
  const onTrackEnter = () => {
2607
2612
  if (!hoverPauseEnabled) return;
@@ -2648,9 +2653,9 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
2648
2653
  }}
2649
2654
  >
2650
2655
  <div
2651
- data-controls={options?.controlsName}
2652
- data-controls-axis="y"
2653
- className={\`\${P}-control\`}
2656
+ data-controls={showControls ? options?.controlsName : undefined}
2657
+ data-controls-axis={showControls ? 'y' : undefined}
2658
+ className={showControls ? \`\${P}-control\` : undefined}
2654
2659
  style={{ height: scaled(options?.marginTop ?? 0) }}
2655
2660
  />
2656
2661
  <div
@@ -2668,7 +2673,7 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
2668
2673
  </div>
2669
2674
  </div>
2670
2675
  ),
2671
- [overlayAlignItems, overlayTextAlign, isEditor]
2676
+ [overlayAlignItems, overlayTextAlign, isEditor, showControls, P, scaled]
2672
2677
  );
2673
2678
 
2674
2679
  const renderCard = useCallback(
@@ -2710,8 +2715,8 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
2710
2715
  }}
2711
2716
  >
2712
2717
  <div
2713
- data-controls="logoMarginTop"
2714
- className={\`\${P}-control\`}
2718
+ data-controls={showControls ? 'logoMarginTop' : undefined}
2719
+ className={showControls ? \`\${P}-control\` : undefined}
2715
2720
  style={{ height: scaled(logoMarginTop) }}
2716
2721
  />
2717
2722
  <div style={{ width: scaled(logoWidth), height: scaled(logoHeight) }}>
@@ -2757,6 +2762,8 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
2757
2762
  strokeColor,
2758
2763
  textStyle,
2759
2764
  isEditor,
2765
+ showControls,
2766
+ P,
2760
2767
  ]
2761
2768
  );
2762
2769
 
@@ -2819,7 +2826,7 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
2819
2826
  }}
2820
2827
  >
2821
2828
  {renderCard(item, \`card-\${key}\`, visibleCardOpts)}
2822
- {isEditor && (
2829
+ {showControls && (
2823
2830
  <div
2824
2831
  data-controls="gap"
2825
2832
  data-controls-axis="x"
@@ -2837,7 +2844,13 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
2837
2844
  </div>
2838
2845
  );
2839
2846
 
2840
- if (autoplayEnabled && (content?.length ?? 0) > 0) {
2847
+ if (useMarqueeTrack) {
2848
+ const marqueePlayState = !autoplayEnabled
2849
+ ? 'paused'
2850
+ : hoverPauseEnabled
2851
+ ? (isHovering ? 'paused' : 'running')
2852
+ : 'running';
2853
+
2841
2854
  return (
2842
2855
  <div
2843
2856
  ref={wrapperRef}
@@ -2868,9 +2881,7 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }:
2868
2881
  transform: 'translateZ(0)',
2869
2882
  WebkitTransform: 'translateZ(0)',
2870
2883
  perspective: '1000px',
2871
- ...(hoverPauseEnabled
2872
- ? ({ '--marquee-play-state': isHovering ? 'paused' : 'running' } as React.CSSProperties)
2873
- : ({ '--marquee-play-state': 'running' } as React.CSSProperties)),
2884
+ ...( { '--marquee-play-state': marqueePlayState } as React.CSSProperties),
2874
2885
  }}
2875
2886
  >
2876
2887
  {Array.from({ length: copies }, (_, copyIndex) => (
@@ -2954,7 +2965,7 @@ type TestimonialsSettings = {
2954
2965
  logoHeight: number;
2955
2966
  captionMarginTop: number;
2956
2967
  };
2957
- `,ki={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},_c={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:"toggle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",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:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...ki.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...ki.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:"on",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"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:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Pc={element:Lc,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:_c,sourceCode:Ec,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Ac(e){return`
2968
+ `,Mi={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Lc={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:"toggle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",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:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Mi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Mi.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:"on",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"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:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Ec={element:$c,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:Lc,sourceCode:Tc,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function _c(e){return`
2958
2969
  .${e}-container {
2959
2970
  position: relative;
2960
2971
  overflow-x: clip;
@@ -3078,7 +3089,7 @@ type TestimonialsSettings = {
3078
3089
  width: 100%;
3079
3090
  height: 100%;
3080
3091
  }
3081
- `}const Rc=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:i}=T.useScopedStyles(),s=t||[],{autoplay:r,delay:a,align:c,width:u,imageMarginTop:d,textMarginTop:$,captionMarginTop:h,imageWidth:y,imageHeight:m,controlsWidth:g,controlsColor:S,controlsHoverColor:f}=e,b=r==="on"&&!o,[_,E]=p.useState(0),[P,L]=p.useState(null),[v,C]=p.useState(!1),R=p.useRef(null),H=p.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),W=p.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);p.useEffect(()=>{E(0),L(null),C(!1)},[s.length]);const O=s[_],D=P===null?null:s[P],j=k=>{var A,x,z,q,J;return{fontSettings:{fontFamily:(e==null?void 0:e[`${k}FontFamily`])??"Arial",fontWeight:((A=e==null?void 0:e[`${k}FontSettings`])==null?void 0:A.fontWeight)??400,fontStyle:((x=e==null?void 0:e[`${k}FontSettings`])==null?void 0:x.fontStyle)??"normal"},textAppearance:{textTransform:((z=e==null?void 0:e[`${k}TextAppearance`])==null?void 0:z.textTransform)??"none",textDecoration:((q=e==null?void 0:e[`${k}TextAppearance`])==null?void 0:q.textDecoration)??"none",fontVariant:((J=e==null?void 0:e[`${k}TextAppearance`])==null?void 0:J.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${k}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${k}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${k}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${k}WordSpacing`])??0,color:(e==null?void 0:e[`${k}Color`])??"#000000"}},U=j("text"),w=j("caption"),N=s.length>1&&s.some(k=>{var ne,A;return(((ne=k.text)==null?void 0:ne.length)??0)>0||(((A=k.caption)==null?void 0:A.length)??0)>0}),F=p.useRef(null),[M,I]=p.useState(0),[V,te]=p.useState(0),ue=e.controls??{mode:"Off",icon:null},re=s.length>1,me=p.useCallback((k,ne)=>!re||ne===k?k:(R.current&&window.clearTimeout(R.current),L(k),C(!0),R.current=window.setTimeout(()=>{L(null),C(!1),R.current=null},300),ne),[re]),B=p.useCallback(()=>{re&&E(k=>me(k,(k-1+s.length)%s.length))},[re,me,s.length]),Q=p.useCallback(()=>{re&&E(k=>me(k,(k+1)%s.length))},[re,me,s.length]);p.useEffect(()=>{if(!b||!re)return;const k=Math.max(300,Number.isFinite(a*1e3)?a*1e3:0),ne=window.setInterval(()=>{E(A=>me(A,(A+1)%s.length))},k);return()=>{window.clearInterval(ne)}},[b,re,me,s.length,a]),p.useEffect(()=>()=>{R.current&&window.clearTimeout(R.current)},[]);const G=(k,ne)=>{var q,J,se,le;const A=ne==null?void 0:ne.textMinHeightPx,x=ne==null?void 0:ne.captionMinHeightPx,z=ne==null?void 0:ne.dataMeasureAttrs;return l.jsxs(l.Fragment,{children:[k.text&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:H,width:"100%"},children:[l.jsx("div",{"data-controls":"textMarginTop",className:`${i}-control`,style:{height:T.scalingValue($??0,n??!1)}}),l.jsx("div",{...z&&{"data-testimonial-measure":"text"},style:{...Je(U,n),...A&&A>0?{minHeight:A}:{},textAlign:W,pointerEvents:"auto"},children:l.jsx(vn,{content:k.text})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:H,width:"100%"},children:[l.jsx("div",{"data-controls":"imageMarginTop",className:`${i}-control`,style:{height:T.scalingValue(d??0,n??!1)}}),l.jsx("div",{style:{width:T.scalingValue(y??0,n??!1),height:T.scalingValue(m??0,n??!1)},children:((q=k.image)==null?void 0:q.url)&&l.jsx("img",{src:(J=k.image)==null?void 0:J.url,alt:((se=k.image)==null?void 0:se.name)??"",className:`${i}-icon`,style:{objectFit:((le=k.image)==null?void 0:le.objectFit)||"contain"}})})]}),k.caption&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:H,width:"100%"},children:[l.jsx("div",{"data-controls":"captionMarginTop",className:`${i}-control`,style:{height:T.scalingValue(h??0,n??!1)}}),l.jsx("div",{...z?{"data-testimonial-measure":"caption"}:{},style:{...Je(w,n),...x&&x>0?{minHeight:x}:{},textAlign:W,pointerEvents:"auto"},children:l.jsx(vn,{content:k.caption})})]})]})},Y=p.useCallback(k=>{I(k.maxTextPx),te(k.maxCaptionPx)},[]);if(p.useLayoutEffect(()=>{if(!N){Y({maxTextPx:0,maxCaptionPx:0});return}const k=F.current;if(!k)return;const ne=()=>{T.readTestimonialTextMeasure(k,Y)};ne();const A=new ResizeObserver(ne);return A.observe(k),()=>{A.disconnect()}},[N,Y,t]),!O)return l.jsx(l.Fragment,{});const ie=N?{textMinHeightPx:M,captionMinHeightPx:V}:void 0;return l.jsx(l.Fragment,{children:l.jsxs("div",{className:`${i}-container`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Ac(i)}}),l.jsxs("div",{className:`${i}-wrapper`,style:{width:T.scalingValue(u??0,n??!1),alignItems:H},children:[N&&l.jsx("div",{ref:F,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((k,ne)=>l.jsx("div",{style:{width:"100%"},children:G(k,{dataMeasureAttrs:!0})},ne))}),l.jsxs("div",{className:`${i}-fade-stack`,children:[D&&v&&l.jsx("div",{className:Ce(`${i}-fade-item-prev`,`${i}-fade-out`),children:G(D,ie)}),l.jsx("div",{className:Ce(`${i}-fade-item-current`,v?`${i}-fade-in`:void 0),children:G(O,ie)})]})]}),ue.mode==="On"&&l.jsxs("div",{className:`${i}-controls`,children:[l.jsx("div",{className:`${i}-arrow`,style:{width:T.scalingValue(g??.02,n??!1),height:T.scalingValue(g??.02,n??!1),"--arrow-hover-color":f},children:l.jsx("button",{type:"button",className:`${i}-arrow-inner`,onClick:B,disabled:!re,"aria-label":"Previous testimonial",children:ue.icon&&l.jsx(Lt,{url:ue.icon,fill:S,hoverFill:f,className:Ce(`${i}-arrow-img`,`${i}-mirror`)})})}),l.jsx("div",{className:Ce(`${i}-arrow`,`${i}-next-arrow`),style:{width:T.scalingValue(g??.02,n??!1),height:T.scalingValue(g??.02,n??!1),"--arrow-hover-color":f},children:l.jsx("button",{type:"button",className:`${i}-arrow-inner`,onClick:Q,disabled:!re,"aria-label":"Next testimonial",children:ue.icon&&l.jsx(Lt,{url:ue.icon,fill:S,hoverFill:f,className:`${i}-arrow-img`})})})]})]})})},Wc=`import cn from 'classnames';
3092
+ `}const Pc=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:i}=w.useScopedStyles(),s=t||[],{autoplay:r,delay:a,align:c,width:d,imageMarginTop:u,textMarginTop:L,captionMarginTop:h,imageWidth:f,imageHeight:m,controlsWidth:g,controlsColor:$,controlsHoverColor:v}=e,C=r==="on"&&o,[y,M]=p.useState(0),[N,A]=p.useState(null),[x,P]=p.useState(!1),T=p.useRef(null),R=p.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),k=p.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);p.useEffect(()=>{M(0),A(null),P(!1)},[s.length]);const D=s[y],O=N===null?null:s[N],G=I=>{var _,S,j,q,Y;return{fontSettings:{fontFamily:(e==null?void 0:e[`${I}FontFamily`])??"Arial",fontWeight:((_=e==null?void 0:e[`${I}FontSettings`])==null?void 0:_.fontWeight)??400,fontStyle:((S=e==null?void 0:e[`${I}FontSettings`])==null?void 0:S.fontStyle)??"normal"},textAppearance:{textTransform:((j=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:j.textTransform)??"none",textDecoration:((q=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:q.textDecoration)??"none",fontVariant:((Y=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:Y.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${I}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${I}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${I}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${I}WordSpacing`])??0,color:(e==null?void 0:e[`${I}Color`])??"#000000"}},X=G("text"),b=G("caption"),B=s.length>1&&s.some(I=>{var ee,_;return(((ee=I.text)==null?void 0:ee.length)??0)>0||(((_=I.caption)==null?void 0:_.length)??0)>0}),W=p.useRef(null),[F,E]=p.useState(0),[H,J]=p.useState(0),ie=e.controls??{mode:"Off",icon:null},U=s.length>1,le=p.useCallback((I,ee)=>!U||ee===I?I:(T.current&&window.clearTimeout(T.current),A(I),P(!0),T.current=window.setTimeout(()=>{A(null),P(!1),T.current=null},300),ee),[U]),V=p.useCallback(()=>{U&&M(I=>le(I,(I-1+s.length)%s.length))},[U,le,s.length]),re=p.useCallback(()=>{U&&M(I=>le(I,(I+1)%s.length))},[U,le,s.length]);p.useEffect(()=>{if(!C||!U)return;const I=Math.max(300,Number.isFinite(a*1e3)?a*1e3:0),ee=window.setInterval(()=>{M(_=>le(_,(_+1)%s.length))},I);return()=>{window.clearInterval(ee)}},[C,U,le,s.length,a]),p.useEffect(()=>()=>{T.current&&window.clearTimeout(T.current)},[]);const fe=(I,ee)=>{var q,Y,te,ne;const _=ee==null?void 0:ee.textMinHeightPx,S=ee==null?void 0:ee.captionMinHeightPx,j=ee==null?void 0:ee.dataMeasureAttrs;return l.jsxs(l.Fragment,{children:[I.text&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:R,width:"100%"},children:[l.jsx("div",{"data-controls":"textMarginTop",className:`${i}-control`,style:{height:w.scalingValue(L??0,n??!1)}}),l.jsx("div",{...j&&{"data-testimonial-measure":"text"},style:{...Ke(X,n),..._&&_>0?{minHeight:_}:{},textAlign:k,pointerEvents:"auto"},children:l.jsx(Cn,{content:I.text})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:R,width:"100%"},children:[l.jsx("div",{"data-controls":"imageMarginTop",className:`${i}-control`,style:{height:w.scalingValue(u??0,n??!1)}}),l.jsx("div",{style:{width:w.scalingValue(f??0,n??!1),height:w.scalingValue(m??0,n??!1)},children:((q=I.image)==null?void 0:q.url)&&l.jsx("img",{src:(Y=I.image)==null?void 0:Y.url,alt:((te=I.image)==null?void 0:te.name)??"",className:`${i}-icon`,style:{objectFit:((ne=I.image)==null?void 0:ne.objectFit)||"contain"}})})]}),I.caption&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:R,width:"100%"},children:[l.jsx("div",{"data-controls":"captionMarginTop",className:`${i}-control`,style:{height:w.scalingValue(h??0,n??!1)}}),l.jsx("div",{...j?{"data-testimonial-measure":"caption"}:{},style:{...Ke(b,n),...S&&S>0?{minHeight:S}:{},textAlign:k,pointerEvents:"auto"},children:l.jsx(Cn,{content:I.caption})})]})]})},me=p.useCallback(I=>{E(I.maxTextPx),J(I.maxCaptionPx)},[]);if(p.useLayoutEffect(()=>{if(!B){me({maxTextPx:0,maxCaptionPx:0});return}const I=W.current;if(!I)return;const ee=()=>{w.readTestimonialTextMeasure(I,me)};ee();const _=new ResizeObserver(ee);return _.observe(I),()=>{_.disconnect()}},[B,me,t]),!D)return l.jsx(l.Fragment,{});const ge=B?{textMinHeightPx:F,captionMinHeightPx:H}:void 0;return l.jsx(l.Fragment,{children:l.jsxs("div",{className:`${i}-container`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:_c(i)}}),l.jsxs("div",{className:`${i}-wrapper`,style:{width:w.scalingValue(d??0,n??!1),alignItems:R},children:[B&&l.jsx("div",{ref:W,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((I,ee)=>l.jsx("div",{style:{width:"100%"},children:fe(I,{dataMeasureAttrs:!0})},ee))}),l.jsxs("div",{className:`${i}-fade-stack`,children:[O&&x&&l.jsx("div",{className:we(`${i}-fade-item-prev`,`${i}-fade-out`),children:fe(O,ge)}),l.jsx("div",{className:we(`${i}-fade-item-current`,x?`${i}-fade-in`:void 0),children:fe(D,ge)})]})]}),ie.mode==="On"&&l.jsxs("div",{className:`${i}-controls`,children:[l.jsx("div",{className:`${i}-arrow`,style:{width:w.scalingValue(g??.02,n??!1),height:w.scalingValue(g??.02,n??!1),"--arrow-hover-color":v},children:l.jsx("button",{type:"button",className:`${i}-arrow-inner`,onClick:V,disabled:!U,"aria-label":"Previous testimonial",children:ie.icon&&l.jsx(At,{url:ie.icon,fill:$,hoverFill:v,className:we(`${i}-arrow-img`,`${i}-mirror`)})})}),l.jsx("div",{className:we(`${i}-arrow`,`${i}-next-arrow`),style:{width:w.scalingValue(g??.02,n??!1),height:w.scalingValue(g??.02,n??!1),"--arrow-hover-color":v},children:l.jsx("button",{type:"button",className:`${i}-arrow-inner`,onClick:re,disabled:!U,"aria-label":"Next testimonial",children:ie.icon&&l.jsx(At,{url:ie.icon,fill:$,hoverFill:v,className:`${i}-arrow-img`})})})]})]})})},Ac=`import cn from 'classnames';
3082
3093
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
3083
3094
  import { CommonComponentProps } from '../props';
3084
3095
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3233,7 +3244,7 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
3233
3244
  const { prefix: P } = useScopedStyles();
3234
3245
  const items = content || [];
3235
3246
  const { autoplay, delay, align, width, imageMarginTop, textMarginTop, captionMarginTop, imageWidth, imageHeight, controlsWidth, controlsColor, controlsHoverColor } = settings;
3236
- const isAnimating = autoplay === 'on' && !isPreviewMode;
3247
+ const isAnimating = autoplay === 'on' && isPreviewMode;
3237
3248
  const [activeIndex, setActiveIndex] = useState(0);
3238
3249
  const [prevIndex, setPrevIndex] = useState<number | null>(null);
3239
3250
  const [isFading, setIsFading] = useState(false);
@@ -3570,11 +3581,11 @@ type TestimonialsSettings = {
3570
3581
  icon?: string | null;
3571
3582
  };
3572
3583
  };
3573
- `,Ic="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" d="M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),Fi={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},kc={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},delay:{type:"number",scope:"layout",title:"Delay(s)",display:{type:"percentage-input"},step:1,min:1,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Fi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Fi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{autoplay:"on",controls:{mode:"On",icon:Ic},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:3,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{delay:3,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","delay"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Fc={element:Rc,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:kc,sourceCode:Wc,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Mc(){return window.navigator.platform==="Win32"||window.navigator.platform==="Win64"?'"InputMono-Regular", monospace':'"DepartureMono-Regular", monospace'}function Hc(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Nc(e){return`
3584
+ `,Rc="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" d="M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),Ni={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ic={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},delay:{type:"number",scope:"layout",title:"Delay(s)",display:{type:"percentage-input"},step:1,min:1,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Ni.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Ni.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{autoplay:"on",controls:{mode:"On",icon:Rc},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:3,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{delay:3,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","delay"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Wc={element:Pc,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:Ic,sourceCode:Ac,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function kc(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Fc(e){return`
3574
3585
  .${e}-wrapper {
3575
3586
  display: grid;
3576
3587
  align-items: start;
3577
- min-height: ${Hc(48)};
3588
+ min-height: ${kc(48)};
3578
3589
  }
3579
3590
  .${e}-item {
3580
3591
  display: flex;
@@ -3640,6 +3651,10 @@ type TestimonialsSettings = {
3640
3651
  margin-top: 0px;
3641
3652
  color: var(--${e}-subtitle-color);
3642
3653
  }
3654
+ .${e}-lightbox-counter {
3655
+ margin: 0;
3656
+ color: var(--${e}-lightbox-counter-color);
3657
+ }
3643
3658
 
3644
3659
  .${e}-control {
3645
3660
  position: relative;
@@ -3658,14 +3673,13 @@ type TestimonialsSettings = {
3658
3673
  pointer-events: auto;
3659
3674
  z-index: 10;
3660
3675
  }
3661
- `}const $t=500,Ft="cubic-bezier(0.22, 1, 0.36, 1)";function Bc({images:e,index:t,imageDisplay:n,originRect:o,reverseClose:i,onClose:s,onPrev:r,onNext:a}){const c=p.useRef(null),u=p.useRef(null),[d,$]=p.useState(null),[h,y]=p.useState(o?"opening":"open"),[m,g]=p.useState(!0),S=p.useRef(t),f=p.useCallback(()=>{const v=c.current,C=u.current;if(!v||!C)return;const R=v.getBoundingClientRect(),H=R.width,W=R.height,O=C.naturalWidth,D=C.naturalHeight;if(!H||!W||!O||!D)return;if(n==="Cover"){$({width:H,height:W,left:R.left,top:R.top});return}const j=O/D,U=H/W;if(j>U){const w=H/j;$({width:H,height:w,left:R.left,top:R.top+(W-w)/2})}else{const w=W*j;$({width:w,height:W,left:R.left+(H-w)/2,top:R.top})}},[n]);p.useEffect(()=>{f();const v=c.current;if(!v)return;const C=new ResizeObserver(()=>f());return C.observe(v),()=>C.disconnect()},[f,t]),p.useEffect(()=>{if(h!=="opening"||!d)return;const v={id:0};return v.id=requestAnimationFrame(()=>{v.id=requestAnimationFrame(()=>y("open"))}),()=>cancelAnimationFrame(v.id)},[h,d]),p.useEffect(()=>{if(h!=="closing")return;const v=setTimeout(()=>s(),$t);return()=>clearTimeout(v)},[h,s]),p.useEffect(()=>{S.current!==t&&g(!1),S.current=t},[t]);const b=()=>{h!=="closing"&&y("closing")},_=h==="open",E=h==="closing",P=E&&i&&!!o,L=h==="opening"?o??d:P?o:d;return l.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:b,children:[l.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:_?1:0,transition:`opacity ${$t}ms ${Ft}`,pointerEvents:"none"}}),l.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[l.jsx("div",{style:{height:"10%"}}),l.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:l.jsx("div",{ref:c,style:{width:"100%",height:"100%"}})}),l.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",color:"#E6E6E6",letterSpacing:"-0.6px",lineHeight:"16px",opacity:_?1:0,transition:`opacity ${$t}ms ${Ft}`,fontFamily:Mc()},children:e.length>1&&l.jsxs(l.Fragment,{children:[l.jsx("p",{children:t+1}),l.jsx("p",{children:"/"}),l.jsx("p",{children:e.length})]})})]}),L&&l.jsx("img",{ref:u,src:e[t],onLoad:f,style:{position:"fixed",top:L.top,left:L.left,width:L.width,height:L.height,objectFit:n==="Cover"?"cover":"contain",opacity:E&&!P?0:1,transition:E&&!P?`opacity ${$t}ms ${Ft}`:P||m?`top ${$t}ms ${Ft}, left ${$t}ms ${Ft}, width ${$t}ms ${Ft}, height ${$t}ms ${Ft}`:"none",pointerEvents:"none",zIndex:9998}}),_&&d&&l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{position:"fixed",top:d.top,left:d.left,width:d.width/2,height:d.height,cursor:"w-resize",zIndex:9999},onClick:v=>{v.stopPropagation(),r()}}),l.jsx("div",{style:{position:"fixed",top:d.top,left:d.left+d.width/2,width:d.width/2,height:d.height,cursor:"e-resize",zIndex:9999},onClick:v=>{v.stopPropagation(),a()}})]})]})}function Oc({settings:e,content:t,isEditor:n,isPreviewMode:o,metadata:i,activeEvent:s,layoutId:r}){const{prefix:a}=T.useScopedStyles(),{type:c="A",gridLayout:u,textBoxWidth:d,verticalGap:$,entriesCount:h,lightbox:y,imageDisplay:m,slider:g,sliderTiming:S,direction:f,transition:b,titleMarginTop:_,subtitleMarginTop:E,titleColor:P,subtitleColor:L,titleFontFamily:v,titleFontSettings:C,titleFontSize:R,titleLineHeight:H,titleLetterSpacing:W,titleWordSpacing:O,titleTextAppearance:D,subtitleFontFamily:j,subtitleFontSettings:U,subtitleFontSize:w,subtitleLineHeight:N,subtitleLetterSpacing:F,subtitleWordSpacing:M,subtitleTextAppearance:I}=e,V={fontSettings:{fontFamily:v,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:R??.01,lineHeight:H,letterSpacing:W??0,wordSpacing:O??0,textAppearance:D,color:P},ue={...yt(Je(V,n))},re={fontSettings:{fontFamily:j,fontWeight:(U==null?void 0:U.fontWeight)??400,fontStyle:(U==null?void 0:U.fontStyle)??"normal"},fontSize:w??.01,lineHeight:N,letterSpacing:F??0,wordSpacing:M??0,textAppearance:I,color:L},B={...yt(Je(re,n))},Q=T.buildColorVars(a,{titleColor:P,subtitleColor:L},Vc,Dc),Y=`${s&&s!=="default"?`${a}-state-${s}`:""}`.trim(),ie=h===0?1/0:h,k=(t??[]).slice(0,ie),ne=u.entryWidth??.2,A=(m==null?void 0:m.display)==="Cover",x=(m==null?void 0:m.ratioValue)??"1:1",z=(m==null?void 0:m.reversed)??!1,[q,J]=x.split(":").map(Number),se=z?J:q,le=z?q:J,ce=`${se} / ${le}`,he=se>=le,K={objectFit:A?"cover":"contain",...A&&{aspectRatio:ce,width:he?"100%":"auto",height:he?"auto":"100%"}},[ee,Z]=p.useState("ltr"),[de,oe]=p.useState(0),pe=p.useRef(null);p.useEffect(()=>{const ye=pe.current;if(!ye)return;const Fe=new ResizeObserver(Ne=>{oe(Math.round(Ne[0].contentRect.width))});return Fe.observe(ye),()=>Fe.disconnect()},[]);const[ve,Pe]=p.useState(!1),[Ke,Ge]=p.useState([]),[$e,Ae]=p.useState(0),[Me,We]=p.useState(null),Ve=(ye,Fe,Ne)=>{if(y==="Off")return;const Be=ye.currentTarget.getBoundingClientRect();We({top:Be.top,left:Be.left,width:Be.width,height:Be.height}),Ge(Fe),Ae(Ne),Pe(!0)};return p.useEffect(()=>{if(!ve||y!=="On"||typeof document>"u")return;const ye=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ye}},[ve,y]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Nc(a)}}),l.jsx("div",{style:Q,children:l.jsx("div",{ref:pe,className:`${a}-wrapper ${a}-type-${c} ${Y}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:T.scalingValue($??0,n),columnGap:T.scalingValue(u.horizontalGap??0,n),width:T.scalingValue(u.wrapperWidth??0,n)},children:k.map((ye,Fe)=>{var Ne,Be;return l.jsx("div",{className:`${a}-item`.trim(),children:l.jsx("div",{className:o?`${a}-item-inner`:`${a}-item-inner-hidden`,style:{width:(d??0)>100?`calc(${T.scalingValue(ne??0,n)} * (${d} / 100))`:T.scalingValue(ne??0,n)},children:l.jsxs("a",{href:(((Ne=ye.link)==null?void 0:Ne.length)??0)>0&&y==="Off"?ye.link:void 0,target:"_blank",className:`${a}-item-image-link`,children:[l.jsx("div",{className:`${a}-item-image-wrapper`,style:{width:T.scalingValue(ne??0,n),height:T.scalingValue(ne??0,n)},children:(((Be=ye.image)==null?void 0:Be.length)??0)===0?null:g==="Off"?l.jsx("img",{src:ye.image[0].url,alt:ye.image[0].name,className:`${a}-item-image`.trim(),style:K,onClick:De=>Ve(De,ye.image.map(Qe=>Qe.url),0)}):l.jsx(Qo,{className:`${a}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:S*1e3,width:"100%",height:"100%",speed:500,type:b==="Fade"?"fade":"loop",rewind:b==="Fade",pauseOnHover:!1,pauseOnFocus:!1,direction:b==="Fade"?"ltr":f!=="Random"?f==="Horizontal"?"ltr":"ttb":ee},onMoved:De=>{if(f!=="Random"||b==="Fade")return;const Qe=Math.random()>.5?Math.random()>.5?"rtl":"ltr":Math.random()>.5?"btt":"ttb";Z(Qe),setTimeout(()=>{De.refresh()},0)},children:ye.image.map((De,Qe)=>l.jsx(ei,{children:l.jsx("img",{src:De.url,alt:De.name,className:`${a}-item-image`.trim(),style:K,onClick:Ct=>Ve(Ct,ye.image.map(lt=>lt.url),Qe)})},Qe))},`${b}-${ne}-${f}-${S}-${de}-${r}`)}),l.jsx("div",{"data-controls":"titleMarginTop",className:`${a}-control`,style:{height:T.scalingValue(_??0,n),width:T.scalingValue(ne*d/100,n)}}),l.jsx("p",{className:`${a}-item-title`.trim(),style:{width:`calc(${T.scalingValue(ne??0,n)} * (${d} / 100))`,...ue},children:ye.title}),c==="B"&&l.jsx("div",{"data-controls":"subtitleMarginTop",className:`${a}-control`,style:{height:T.scalingValue(E??0,n),width:T.scalingValue(ne*d/100,n)}}),c==="B"&&l.jsx("p",{className:`${a}-item-subtitle`.trim(),style:{width:`calc(${T.scalingValue(ne??0,n)} * (${d} / 100))`,...B},children:ye.subtitle})]})})},Fe)})})}),ve&&typeof document&&document.getElementById("grid-component-lightbox-portal")&&y==="On"&&Ui.createPortal(l.jsx("div",{"data-selection":"none",children:l.jsx(Bc,{images:Ke,index:$e,imageDisplay:m.display,originRect:Me,reverseClose:g==="Off",onClose:()=>Pe(!1),onPrev:()=>Ae(ye=>(ye-1+Ke.length)%Ke.length),onNext:()=>Ae(ye=>(ye+1)%Ke.length)})}),document.body)]})}const Vc={titleColor:"title-color",subtitleColor:"subtitle-color"},Dc=["hover","focus","filled","success","error"],zc=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3676
+ `}const _t=500,Ot="cubic-bezier(0.22, 1, 0.36, 1)";function Mc({images:e,index:t,imageDisplay:n,originRect:o,reverseClose:i,onClose:s,onPrev:r,onNext:a,counterClassName:c,counterStyle:d}){const u=p.useRef(null),L=p.useRef(null),[h,f]=p.useState(null),[m,g]=p.useState(o?"opening":"open"),[$,v]=p.useState(!0),C=p.useRef(t),y=p.useCallback(()=>{const T=u.current,R=L.current;if(!T||!R)return;const k=T.getBoundingClientRect(),D=k.width,O=k.height,G=R.naturalWidth,X=R.naturalHeight;if(!D||!O||!G||!X)return;if(n==="Cover"){f({width:D,height:O,left:k.left,top:k.top});return}const b=G/X,B=D/O;if(b>B){const W=D/b;f({width:D,height:W,left:k.left,top:k.top+(O-W)/2})}else{const W=O*b;f({width:W,height:O,left:k.left+(D-W)/2,top:k.top})}},[n]);p.useEffect(()=>{y();const T=u.current;if(!T)return;const R=new ResizeObserver(()=>y());return R.observe(T),()=>R.disconnect()},[y,t]),p.useEffect(()=>{if(m!=="opening"||!h)return;const T={id:0};return T.id=requestAnimationFrame(()=>{T.id=requestAnimationFrame(()=>g("open"))}),()=>cancelAnimationFrame(T.id)},[m,h]),p.useEffect(()=>{if(m!=="closing")return;const T=setTimeout(()=>s(),_t);return()=>clearTimeout(T)},[m,s]),p.useEffect(()=>{C.current!==t&&v(!1),C.current=t},[t]);const M=()=>{m!=="closing"&&g("closing")},N=m==="open",A=m==="closing",x=A&&i&&!!o,P=m==="opening"?o??h:x?o:h;return l.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:M,children:[l.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:N?1:0,transition:`opacity ${_t}ms ${Ot}`,pointerEvents:"none"}}),l.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[l.jsx("div",{style:{height:"10%"}}),l.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:l.jsx("div",{ref:u,style:{width:"100%",height:"100%"}})}),l.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:N?1:0,transition:`opacity ${_t}ms ${Ot}`},children:e.length>1&&l.jsxs("p",{className:c,style:d,children:[t+1," / ",e.length]})})]}),P&&l.jsx("img",{ref:L,src:e[t],onLoad:y,style:{position:"fixed",top:P.top,left:P.left,width:P.width,height:P.height,objectFit:n==="Cover"?"cover":"contain",opacity:A&&!x?0:1,transition:A&&!x?`opacity ${_t}ms ${Ot}`:x||$?`top ${_t}ms ${Ot}, left ${_t}ms ${Ot}, width ${_t}ms ${Ot}, height ${_t}ms ${Ot}`:"none",pointerEvents:"none",zIndex:9998}}),N&&h&&l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{position:"fixed",top:h.top,left:h.left,width:h.width/2,height:h.height,cursor:"w-resize",zIndex:9999},onClick:T=>{T.stopPropagation(),r()}}),l.jsx("div",{style:{position:"fixed",top:h.top,left:h.left+h.width/2,width:h.width/2,height:h.height,cursor:"e-resize",zIndex:9999},onClick:T=>{T.stopPropagation(),a()}})]})]})}function Nc({settings:e,content:t,isEditor:n,isPreviewMode:o,metadata:i,activeEvent:s,layoutId:r}){const{prefix:a}=w.useScopedStyles(),{type:c="A",gridLayout:d,textBoxWidth:u,verticalGap:L,entriesCount:h,lightbox:f,imageDisplay:m,slider:g,sliderTiming:$,direction:v,transition:C,titleMarginTop:y,subtitleMarginTop:M,titleColor:N,subtitleColor:A,lightboxCounterColor:x,titleFontFamily:P,titleFontSettings:T,titleFontSize:R,titleLineHeight:k,titleLetterSpacing:D,titleWordSpacing:O,titleTextAppearance:G,subtitleFontFamily:X,subtitleFontSettings:b,subtitleFontSize:B,subtitleLineHeight:W,subtitleLetterSpacing:F,subtitleWordSpacing:E,subtitleTextAppearance:H,lightboxCounterFontFamily:J,lightboxCounterFontSettings:ie,lightboxCounterFontSize:U,lightboxCounterLineHeight:le,lightboxCounterLetterSpacing:V,lightboxCounterWordSpacing:re,lightboxCounterTextAppearance:fe}=e,me={fontSettings:{fontFamily:P,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:R??.01,lineHeight:k,letterSpacing:D??0,wordSpacing:O??0,textAppearance:G,color:N},I={...ut(Ke(me,n))},ee={fontSettings:{fontFamily:X,fontWeight:(b==null?void 0:b.fontWeight)??400,fontStyle:(b==null?void 0:b.fontStyle)??"normal"},fontSize:B??.01,lineHeight:W,letterSpacing:F??0,wordSpacing:E??0,textAppearance:H,color:A},S={...ut(Ke(ee,n))},j={fontSettings:{fontFamily:J,fontWeight:(ie==null?void 0:ie.fontWeight)??400,fontStyle:(ie==null?void 0:ie.fontStyle)??"normal"},fontSize:U??.01,lineHeight:le,letterSpacing:V??0,wordSpacing:re??0,textAppearance:fe,color:x},Y={...ut(Ke(j,n))},te=w.buildColorVars(a,{titleColor:N,subtitleColor:A,lightboxCounterColor:x},Hc,Bc),oe=`${s&&s!=="default"?`${a}-state-${s}`:""}`.trim(),se=h===0?1/0:h,xe=(t??[]).slice(0,se),de=d.entryWidth??.2,K=(m==null?void 0:m.display)==="Cover",ue=(m==null?void 0:m.ratioValue)??"1:1",z=(m==null?void 0:m.reversed)??!1,[Q,ye]=ue.split(":").map(Number),Le=z?ye:Q,ke=z?Q:ye,Ae=`${Le} / ${ke}`,ve=Le>=ke,Fe={objectFit:K?"cover":"contain",...K&&{aspectRatio:Ae,width:ve?"100%":"auto",height:ve?"auto":"100%"}},[ze,Re]=p.useState("ltr"),[qe,Nt]=p.useState(0),Xe=p.useRef(null);p.useEffect(()=>{const Te=Xe.current;if(!Te)return;const Ue=new ResizeObserver(he=>{Nt(Math.round(he[0].contentRect.width))});return Ue.observe(Te),()=>Ue.disconnect()},[]);const Ce=(()=>{const Te={...te},Ue=Xe.current?getComputedStyle(Xe.current).getPropertyValue("--cntrl-article-width").trim():"";return Ue&&(Te["--cntrl-article-width"]=Ue),Te})(),[Ze,at]=p.useState(!1),[gt,$t]=p.useState([]),[nt,ht]=p.useState(0),[Tt,ft]=p.useState(null),Ht=(Te,Ue,he)=>{if(f==="Off")return;const He=Te.currentTarget.getBoundingClientRect();ft({top:He.top,left:He.left,width:He.width,height:He.height}),$t(Ue),ht(he),at(!0)};return p.useEffect(()=>{if(!Ze||f!=="On"||typeof document>"u")return;const Te=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Te}},[Ze,f]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Fc(a)}}),l.jsx("div",{style:te,children:l.jsx("div",{ref:Xe,className:`${a}-wrapper ${a}-type-${c} ${oe}`.trim(),style:{gridTemplateColumns:`repeat(${d.columnsCount}, minmax(0, 1fr))`,rowGap:w.scalingValue(L??0,n),columnGap:w.scalingValue(d.horizontalGap??0,n),width:w.scalingValue(d.wrapperWidth??0,n)},children:xe.map((Te,Ue)=>{var he,He;return l.jsx("div",{className:`${a}-item`.trim(),children:l.jsx("div",{className:o?`${a}-item-inner`:`${a}-item-inner-hidden`,style:{width:(u??0)>100?`calc(${w.scalingValue(de??0,n)} * (${u} / 100))`:w.scalingValue(de??0,n)},children:l.jsxs("a",{href:(((he=Te.link)==null?void 0:he.length)??0)>0&&f==="Off"?Te.link:void 0,target:"_blank",className:`${a}-item-image-link`,children:[l.jsx("div",{className:`${a}-item-image-wrapper`,style:{width:w.scalingValue(de??0,n),height:w.scalingValue(de??0,n)},children:(((He=Te.image)==null?void 0:He.length)??0)===0?null:g==="Off"?l.jsx("img",{src:Te.image[0].url,alt:Te.image[0].name,className:`${a}-item-image`.trim(),style:Fe,onClick:Be=>Ht(Be,Te.image.map(Me=>Me.url),0)}):l.jsx(ii,{className:`${a}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:$*1e3,width:"100%",height:"100%",speed:500,type:C==="Fade"?"fade":"loop",rewind:C==="Fade",pauseOnHover:!1,pauseOnFocus:!1,direction:C==="Fade"?"ltr":v!=="Random"?v==="Horizontal"?"ltr":"ttb":ze},onMoved:Be=>{if(v!=="Random"||C==="Fade")return;const Me=Math.random()>.5?Math.random()>.5?"rtl":"ltr":Math.random()>.5?"btt":"ttb";Re(Me),setTimeout(()=>{Be.refresh()},0)},children:Te.image.map((Be,Me)=>l.jsx(ri,{children:l.jsx("img",{src:Be.url,alt:Be.name,className:`${a}-item-image`.trim(),style:Fe,onClick:st=>Ht(st,Te.image.map(Wn=>Wn.url),Me)})},Me))},`${C}-${de}-${v}-${$}-${qe}-${r}`)}),l.jsx("div",{"data-controls":"titleMarginTop",className:`${a}-control`,style:{height:w.scalingValue(y??0,n),width:w.scalingValue(de*u/100,n)}}),l.jsx("p",{className:`${a}-item-title`.trim(),style:{width:`calc(${w.scalingValue(de??0,n)} * (${u} / 100))`,...I},children:Te.title}),c==="B"&&l.jsx("div",{"data-controls":"subtitleMarginTop",className:`${a}-control`,style:{height:w.scalingValue(M??0,n),width:w.scalingValue(de*u/100,n)}}),c==="B"&&l.jsx("p",{className:`${a}-item-subtitle`.trim(),style:{width:`calc(${w.scalingValue(de??0,n)} * (${u} / 100))`,...S},children:Te.subtitle})]})})},Ue)})})}),Ze&&typeof document<"u"&&f==="On"&&Gi.createPortal(l.jsx("div",{style:Ce,"data-selection":"none",children:l.jsx(Mc,{images:gt,index:nt,imageDisplay:m.display,originRect:Tt,reverseClose:g==="Off",onClose:()=>at(!1),onPrev:()=>ht(Te=>(Te-1+gt.length)%gt.length),onNext:()=>ht(Te=>(Te+1)%gt.length),counterClassName:`${a}-lightbox-counter`.trim(),counterStyle:Y})}),document.body)]})}const Hc={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Bc=["hover","focus","filled","success","error"],Oc=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3662
3677
  import '@splidejs/react-splide/css/core';
3663
3678
  import { CommonComponentProps } from '../props';
3664
3679
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
3665
3680
  import { useCallback, useEffect, useRef, useState } from 'react';
3666
3681
  import { createPortal } from 'react-dom';
3667
3682
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
3668
- import { getFontBasedOnSystem } from '../utils/getMainFontBaseOnSystem';
3669
3683
 
3670
3684
  function sv(px: number): string {
3671
3685
  return \`calc(var(--cntrl-article-width, 100vw) * \${px / 1440})\`;
@@ -3742,6 +3756,10 @@ function getCSS(P: string): string {
3742
3756
  margin-top: 0px;
3743
3757
  color: var(--\${P}-subtitle-color);
3744
3758
  }
3759
+ .\${P}-lightbox-counter {
3760
+ margin: 0;
3761
+ color: var(--\${P}-lightbox-counter-color);
3762
+ }
3745
3763
 
3746
3764
  .\${P}-control {
3747
3765
  position: relative;
@@ -3784,12 +3802,14 @@ type LightboxProps = {
3784
3802
  onClose: () => void;
3785
3803
  onPrev: () => void;
3786
3804
  onNext: () => void;
3805
+ counterClassName: string;
3806
+ counterStyle: React.CSSProperties;
3787
3807
  };
3788
3808
 
3789
3809
  const LIGHTBOX_ANIM_MS = 500;
3790
3810
  const LIGHTBOX_EASING = 'cubic-bezier(0.22, 1, 0.36, 1)';
3791
3811
 
3792
- function Lightbox({ images, index, imageDisplay, originRect, reverseClose, onClose, onPrev, onNext }: LightboxProps) {
3812
+ function Lightbox({ images, index, imageDisplay, originRect, reverseClose, onClose, onPrev, onNext, counterClassName, counterStyle }: LightboxProps) {
3793
3813
  const ghostRef = useRef<HTMLDivElement>(null);
3794
3814
  const imgRef = useRef<HTMLImageElement>(null);
3795
3815
  const [finalRect, setFinalRect] = useState<AnimRect | null>(null);
@@ -3918,20 +3938,14 @@ function Lightbox({ images, index, imageDisplay, originRect, reverseClose, onClo
3918
3938
  justifyContent: 'center',
3919
3939
  alignItems: 'center',
3920
3940
  height: '10%',
3921
- color: '#E6E6E6',
3922
- letterSpacing: '-0.6px',
3923
- lineHeight: '16px',
3924
3941
  opacity: isOpen ? 1 : 0,
3925
3942
  transition: \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`,
3926
- fontFamily: getFontBasedOnSystem(),
3927
3943
  }}
3928
3944
  >
3929
3945
  {images.length > 1 &&
3930
- <>
3931
- <p>{index + 1}</p>
3932
- <p>/</p>
3933
- <p>{images.length}</p>
3934
- </>
3946
+ <p className={counterClassName} style={counterStyle}>
3947
+ {index + 1} / {images.length}
3948
+ </p>
3935
3949
  }
3936
3950
  </div>
3937
3951
  </div>
@@ -4016,6 +4030,7 @@ export function Grid({ settings, content, isEditor, isPreviewMode, metadata, act
4016
4030
  subtitleMarginTop,
4017
4031
  titleColor,
4018
4032
  subtitleColor,
4033
+ lightboxCounterColor,
4019
4034
  titleFontFamily,
4020
4035
  titleFontSettings,
4021
4036
  titleFontSize,
@@ -4030,6 +4045,13 @@ export function Grid({ settings, content, isEditor, isPreviewMode, metadata, act
4030
4045
  subtitleLetterSpacing,
4031
4046
  subtitleWordSpacing,
4032
4047
  subtitleTextAppearance,
4048
+ lightboxCounterFontFamily,
4049
+ lightboxCounterFontSettings,
4050
+ lightboxCounterFontSize,
4051
+ lightboxCounterLineHeight,
4052
+ lightboxCounterLetterSpacing,
4053
+ lightboxCounterWordSpacing,
4054
+ lightboxCounterTextAppearance,
4033
4055
  } = settings;
4034
4056
 
4035
4057
  const resolvedTitleTextStyle: TextStyles = {
@@ -4068,9 +4090,28 @@ export function Grid({ settings, content, isEditor, isPreviewMode, metadata, act
4068
4090
  ...subtitleTypographyCss,
4069
4091
  } as React.CSSProperties;
4070
4092
 
4093
+ const resolvedLightboxCounterTextStyle: TextStyles = {
4094
+ fontSettings: {
4095
+ fontFamily: lightboxCounterFontFamily,
4096
+ fontWeight: lightboxCounterFontSettings?.fontWeight ?? 400,
4097
+ fontStyle: lightboxCounterFontSettings?.fontStyle ?? 'normal',
4098
+ },
4099
+ fontSize: lightboxCounterFontSize ?? 0.01,
4100
+ lineHeight: lightboxCounterLineHeight,
4101
+ letterSpacing: lightboxCounterLetterSpacing ?? 0,
4102
+ wordSpacing: lightboxCounterWordSpacing ?? 0,
4103
+ textAppearance: lightboxCounterTextAppearance,
4104
+ color: lightboxCounterColor,
4105
+ };
4106
+ const lightboxCounterTypographyCss = omitTextColors(textStylesToCss(resolvedLightboxCounterTextStyle, isEditor));
4107
+ const lightboxCounterFieldCss = {
4108
+ ...lightboxCounterTypographyCss,
4109
+ } as React.CSSProperties;
4110
+
4071
4111
  const colorVars = buildColorVars(P, {
4072
4112
  titleColor,
4073
4113
  subtitleColor,
4114
+ lightboxCounterColor,
4074
4115
  }, COLOR_VAR_MAP, STATE_KEYS);
4075
4116
 
4076
4117
  const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';
@@ -4114,6 +4155,17 @@ export function Grid({ settings, content, isEditor, isPreviewMode, metadata, act
4114
4155
  return () => ro.disconnect();
4115
4156
  }, []);
4116
4157
 
4158
+ const lightboxPortalStyle = (() => {
4159
+ const style: Record<string, string> = { ...(colorVars as Record<string, string>) };
4160
+ const articleWidth = containerRef.current
4161
+ ? getComputedStyle(containerRef.current).getPropertyValue('--cntrl-article-width').trim()
4162
+ : '';
4163
+ if (articleWidth) {
4164
+ style['--cntrl-article-width'] = articleWidth;
4165
+ }
4166
+ return style as React.CSSProperties;
4167
+ })();
4168
+
4117
4169
  const [lightboxOpen, setLightboxOpen] = useState(false);
4118
4170
  const [lightboxImages, setLightboxImages] = useState<string[]>([]);
4119
4171
  const [lightboxIndex, setLightboxIndex] = useState(0);
@@ -4243,9 +4295,9 @@ export function Grid({ settings, content, isEditor, isPreviewMode, metadata, act
4243
4295
  ))}
4244
4296
  </div>
4245
4297
  </div>
4246
- {lightboxOpen && typeof document && document.getElementById("grid-component-lightbox-portal") && lightbox === 'On' &&
4298
+ {lightboxOpen && typeof document !== 'undefined' && lightbox === 'On' &&
4247
4299
  createPortal(
4248
- <div data-selection="none">
4300
+ <div style={lightboxPortalStyle} data-selection="none">
4249
4301
  <Lightbox
4250
4302
  images={lightboxImages}
4251
4303
  index={lightboxIndex}
@@ -4255,6 +4307,8 @@ export function Grid({ settings, content, isEditor, isPreviewMode, metadata, act
4255
4307
  onClose={() => setLightboxOpen(false)}
4256
4308
  onPrev={() => setLightboxIndex((prev) => (prev - 1 + lightboxImages.length) % lightboxImages.length)}
4257
4309
  onNext={() => setLightboxIndex((prev) => (prev + 1) % lightboxImages.length)}
4310
+ counterClassName={\`\${P}-lightbox-counter\`.trim()}
4311
+ counterStyle={lightboxCounterFieldCss}
4258
4312
  />
4259
4313
  </div>,
4260
4314
  document.body
@@ -4291,6 +4345,7 @@ type GridSettings = {
4291
4345
  subtitleMarginTop: number;
4292
4346
  titleColor: string;
4293
4347
  subtitleColor: string;
4348
+ lightboxCounterColor: string;
4294
4349
  titleFontFamily: string;
4295
4350
  titleFontSettings?: { fontWeight: number; fontStyle: string };
4296
4351
  titleFontSize?: number;
@@ -4305,23 +4360,32 @@ type GridSettings = {
4305
4360
  subtitleLetterSpacing?: number;
4306
4361
  subtitleWordSpacing?: number;
4307
4362
  subtitleTextAppearance?: TextStyles['textAppearance'];
4363
+ lightboxCounterFontFamily: string;
4364
+ lightboxCounterFontSettings?: { fontWeight: number; fontStyle: string };
4365
+ lightboxCounterFontSize?: number;
4366
+ lightboxCounterLineHeight?: number;
4367
+ lightboxCounterLetterSpacing?: number;
4368
+ lightboxCounterWordSpacing?: number;
4369
+ lightboxCounterTextAppearance?: TextStyles['textAppearance'];
4308
4370
  };
4309
4371
 
4310
4372
  type ColorKeys =
4311
4373
  | 'titleColor'
4312
4374
  | 'subtitleColor'
4375
+ | 'lightboxCounterColor'
4313
4376
 
4314
4377
  const COLOR_VAR_MAP: Record<ColorKeys, string> = {
4315
4378
  titleColor: 'title-color',
4316
4379
  subtitleColor: 'subtitle-color',
4380
+ lightboxCounterColor: 'lightbox-counter-color',
4317
4381
  };
4318
4382
 
4319
4383
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
4320
- `,Mi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},jc=["titleColor","subtitleColor"],Kc={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",rules:[{if:{name:"type",value:"A"},then:{name:"subtitle",value:!1}}]},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"Title 1",subtitle:"Subtitle 1",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Grid-1.png",objectFit:"cover"}],link:""},{title:"Title 2",subtitle:"Subtitle 2",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Grid-2.png",objectFit:"cover"}],link:""},{title:"Title 3",subtitle:"Subtitle 3",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Grid-3.png",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["On","Off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["On","Off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["Horizontal","Vertical","Random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["Fade","Slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Color",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Color",display:{type:"palette-color-picker",visible:!1}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Mi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...Mi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"Off",imageDisplay:{display:"Fit",ratioValue:"16:9",reversed:!1},type:"A",slider:"Off",sliderTiming:5,direction:"Horizontal",transition:"Slide",titleColor:"#767676",subtitleColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Arial",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.043,titleLineHeight:.043,subtitleFontSize:.0373,subtitleLineHeight:.0373},d:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.01,titleLineHeight:.01,subtitleFontSize:.01,subtitleLineHeight:.01}},displayRules:[{if:{name:"transition",value:"Fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.subtitleColor.display.visible",value:!0}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","entriesCount","lightbox","imageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"Image",items:["imageDisplay","lightbox"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]}]}],paletteBookmark:{items:[...jc],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor"]}}},Uc={element:Oc,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Kc,sourceCode:zc};function zn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function qc(e){return String(e??"").trim().length>0}function Gc(e,t,n,o,i,s,r){const a=T.scalingValue(s,r),c=T.scalingValue(0,r),u=e===0,d=e===t-1&&!i;return{borderTopWidth:u&&n?a:c,borderBottomWidth:!d||o?a:c}}function Yc(e,t,n){const o=T.scalingValue(t,n),i=T.scalingValue(0,n);return{borderTopWidth:i,borderBottomWidth:e?o:i}}const Hi=10;function Xc(e){return`
4384
+ `,wo={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Vc=["titleColor","subtitleColor","lightboxCounterColor"],Dc={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",rules:[{if:{name:"type",value:"A"},then:{name:"subtitle",value:!1}}]},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"Title 1",subtitle:"Subtitle 1",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Grid-1.png",objectFit:"cover"}],link:""},{title:"Title 2",subtitle:"Subtitle 2",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Grid-2.png",objectFit:"cover"}],link:""},{title:"Title 3",subtitle:"Subtitle 3",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Grid-3.png",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["On","Off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["On","Off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["Horizontal","Vertical","Random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["Fade","Slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Color",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Color",display:{type:"palette-color-picker",visible:!1}},lightboxCounterColor:{type:"string",scope:"common",title:"Lightbox Counter Color",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...wo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...wo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...wo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"Off",imageDisplay:{display:"Fit",ratioValue:"16:9",reversed:!1},type:"A",slider:"Off",sliderTiming:5,direction:"Horizontal",transition:"Slide",titleColor:"#767676",subtitleColor:"#DEDDDD",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Arial",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Arial",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.043,titleLineHeight:.043,subtitleFontSize:.0373,subtitleLineHeight:.0373,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.01,titleLineHeight:.01,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"Fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.subtitleColor.display.visible",value:!0}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","entriesCount","lightbox","imageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"Image",items:["imageDisplay","lightbox"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...Vc],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},zc={element:Nc,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Dc,sourceCode:Oc};function Un(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function jc(e){return String(e??"").trim().length>0}function Kc(e,t,n,o,i,s,r){const a=w.scalingValue(s,r),c=w.scalingValue(0,r),d=e===0,u=e===t-1&&!i;return{borderTopWidth:d&&n?a:c,borderBottomWidth:!u||o?a:c}}function qc(e,t,n){const o=w.scalingValue(t,n),i=w.scalingValue(0,n);return{borderTopWidth:i,borderBottomWidth:e?o:i}}const Hi=10;function Uc(e){return`
4321
4385
  .${e}-wrapper {
4322
4386
  display: grid;
4323
4387
  align-items: start;
4324
- min-height: ${zn(48)};
4388
+ min-height: ${Un(48)};
4325
4389
  position: relative;
4326
4390
  overflow: visible;
4327
4391
  box-sizing: border-box;
@@ -4422,13 +4486,9 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
4422
4486
 
4423
4487
  .${e}-wrapper.${e}-type-b .${e}-cut-item .${e}-list-cols-row {
4424
4488
  flex-direction: row;
4425
- align-items: center;
4426
- justify-content: center;
4427
4489
  }
4428
4490
 
4429
4491
  .${e}-wrapper.${e}-type-b .${e}-cut-label {
4430
- text-align: center;
4431
- width: 100%;
4432
4492
  box-sizing: border-box;
4433
4493
  }
4434
4494
 
@@ -4447,7 +4507,7 @@ a.${e}-list-item {
4447
4507
  flex-shrink: 0;
4448
4508
  overflow: visible;
4449
4509
  box-sizing: border-box;
4450
- min-width: ${zn(50)};
4510
+ min-width: ${Un(50)};
4451
4511
  position: relative;
4452
4512
  display: flex;
4453
4513
  align-items: flex-start;
@@ -4455,7 +4515,7 @@ a.${e}-list-item {
4455
4515
 
4456
4516
  .${e}-list-col-last {
4457
4517
  flex: 1 1 auto;
4458
- min-width: ${zn(50)};
4518
+ min-width: ${Un(50)};
4459
4519
  }
4460
4520
 
4461
4521
  .${e}-list-col-title {
@@ -4483,15 +4543,13 @@ a.${e}-list-item {
4483
4543
  }
4484
4544
 
4485
4545
  .${e}-row-padding-handle {
4486
- position: relative;
4487
- z-index: 2;
4488
4546
  width: 100%;
4489
4547
  flex-shrink: 0;
4490
4548
  background: transparent;
4491
4549
  }
4492
4550
 
4493
- .${e}-row-padding-handle[data-controls] {
4494
- min-height: 20px;
4551
+ .${e}-list-col-wrap {
4552
+ position: relative;
4495
4553
  }
4496
4554
 
4497
4555
  .${e}-col-resize-handle::after {
@@ -4607,8 +4665,7 @@ a.${e}-list-item {
4607
4665
 
4608
4666
  .${e}-cut-item {
4609
4667
  display: flex;
4610
- align-items: center;
4611
- justify-content: center;
4668
+ align-items: stretch;
4612
4669
  width: 100%;
4613
4670
  overflow: visible;
4614
4671
  position: relative;
@@ -4628,7 +4685,8 @@ a.${e}-list-item {
4628
4685
  .${e}-cut-item .${e}-list-cols-row {
4629
4686
  flex: 1;
4630
4687
  min-height: 100%;
4631
- align-items: center;
4688
+ width: 100%;
4689
+ display: flex;
4632
4690
  }
4633
4691
 
4634
4692
  .${e}-wrapper.${e}-divider-bottom .${e}-cut-item {
@@ -4646,10 +4704,11 @@ a.${e}-list-item {
4646
4704
  overflow-wrap: anywhere;
4647
4705
  word-break: break-word;
4648
4706
  }
4649
- `}const Pt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ti=["AColumn","BColumn","CColumn","DColumn","EColumn"],vt="cutLabel",Pn=[...ti,vt],ni=["A","B","C","D","E"];function Ar(e){return`${e}ColumnVerticalAlign`}const Zc=["Top","Center","Bottom"];function Jc(e){const t=String(e??"Top").trim();return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Qc(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return ni.includes(n)?n:null}function Rr(e,t,n){const o=Qc(e);return o?o===t?!1:Jc(n[Ar(o)]):!0}function Wo(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return ni.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function ed(e,t,n){if(Wr(e,t,n))return Wo(e);const o=Wo(e);return o.kind==="baseline"?{kind:"top"}:o}function Wr(e,t,n){return Rr(e,n,t)?Wo(e).kind==="baseline":!1}function td(e){if(e.type==="B")return null;const t={};let n=!1;for(const o of ni){const i=Ar(o),s=e[i];Rr(s,o,e)||(t[i]="Top",n=!0)}return n?t:null}function nd(e){return e==="center"?{marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{marginTop:"auto"}:{}}function od(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:o}=e.getBoundingClientRect(),{bottom:i}=n.getBoundingClientRect(),s=i-o;return n.remove(),s}function xo(e,t,n,o){const i=e.titleEl;if(!i)return 0;const s=i.closest(`.${n}`);if(!s)return 0;const r=od(i,o);if(e.kind==="baseline")return i.getBoundingClientRect().top-t+r;const a=s.getBoundingClientRect(),c=i.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(a.height-c)/2:e.kind==="bottom"&&(u=a.height-c),a.top-t+u+r}function id(e,t,n){const o=e.getBoundingClientRect().height;return o<=0?0:(t.forEach(i=>{const s=i.querySelector(`.${n}`);s&&(s.style.minHeight=`${o}px`,s.style.height=`${o}px`)}),e.offsetHeight,o)}function rd(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const ad={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"},sd=["textFontFamily","textFontSettings","textFontSize","textLineHeight","textLetterSpacing","textWordSpacing","textTextAppearance"];function we(e,t){return`${e}${t.replace(/^text/,"Text")}`}function Zn(e,t){const n=o=>{const i=we(t,o),s=e[i];return s!==void 0?s:e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Ni(e,t){var o,i;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((o=e.textFontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((i=e.textFontSettings)==null?void 0:i.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return yt(Je(n,t))}function Bi(e,t,n,o){const i=Zn(e,t),s=i.textFontSize??.01,r=i.textLineHeight;return r!==void 0&&r<s?`${n} ${o}`:n}function Oi(e,t,n,o){const i=Zn(e,t),s=i.textFontSize??.01,r=i.textLineHeight;return r===void 0||r>=s?{}:{[`--${n}-title-leading-gap`]:T.scalingValue((s-r)/2,o)}}function ld(e,t){const n={};let o=!1;for(const i of sd)if(e[i]!==t[i]&&e[i]!==void 0){o=!0;for(const s of Pn)Object.assign(n,{[we(s,i)]:e[i]})}return o?n:null}const nt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Zt=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Jt=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Qt=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],cd={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},dd=["hover","focus","filled","success","error"],Vi=.004,ln=.004,oi=50,bn=1440,xn=oi/bn;function Ir(e){const t=typeof e=="number"&&e>0?e:bn;return oi/t}function ud(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const i=parseFloat(n);if(Number.isFinite(i)&&i>0)return i}const o=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(o){const i=parseFloat(o);if(Number.isFinite(i)&&i>0)return i}t=t.parentElement}return bn}const kr={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function jn(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function pd(e,t=1){const n=t/e;return Object.fromEntries(nt.map(o=>[o,n]))}function md(){return Object.fromEntries([...Zt.map(e=>[e,0]),...Jt.map(e=>[e,0])])}function gd(){return Object.fromEntries(Qt.map(e=>[e,0]))}function Hn(e){return Object.fromEntries(nt.map(t=>[t,typeof e[t]=="number"?e[t]:kr[t]]))}function Fr(e,t,n){const o=e-xn,i=t+n;if(i<=0||i<=o)return{paddingLeft:t,paddingRight:n};if(o<=0)return{paddingLeft:0,paddingRight:0};const s=o/i;return{paddingLeft:t*s,paddingRight:n*s}}function Kn(e,t,n){const o=ii(e,t,n);if(e<=0)return[];const i=o.slice(0,e-1).reduce((s,r)=>s+r,0);return[...o.slice(0,e-1),Math.max(0,t-i)]}function hd(e,t,n){const o={};for(let i=0;i<e;i+=1){const s=Zt[i],r=Jt[i],a=typeof n[s]=="number"?n[s]:0,c=typeof n[r]=="number"?n[r]:0,u=Fr(t[i]??0,a,c);u.paddingLeft!==a&&(o[s]=u.paddingLeft),u.paddingRight!==c&&(o[r]=u.paddingRight)}return o}function ii(e,t,n){if(e<=0)return[];const o=nt.slice(0,e).map(u=>n[u]);if(e===1)return o;const i=o.slice(0,e-1),r=i.reduce((u,d)=>u+d,0)+xn;if(t>=r)return o;const a=[...i];let c=r-t;for(let u=a.length-1;u>=0&&c>0;u-=1){const d=a[u]-xn;if(d<=0)continue;const $=Math.min(c,d);a[u]-=$,c-=$}return[...a,o[e-1]]}function fd(e,t,n){if(e<=1)return{};const o=ii(e,t,n),i={};for(let s=0;s<e-1;s+=1){const r=nt[s];o[s]!==n[r]&&(i[r]=o[s])}return i}function Di(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Pt]}function yd(e,t){return e.length!==t.length?!1:e.every((n,o)=>n===t[o])}function vd(e,t,n,o){const i=Math.min(o,e.length,nt.length),s={};for(let r=0;r<i;r+=1){const a=e[r],c=t.indexOf(a);if(c===-1)continue;const u=nt[c],d=Zt[c],$=Jt[c],h=Qt[c],y=nt[r],m=Zt[r],g=Jt[r],S=Qt[r],f=n[u],b=n[d],_=n[$],E=n[h];typeof f=="number"&&(s[y]=f),typeof b=="number"&&(s[m]=b),typeof _=="number"&&(s[g]=_),typeof E=="number"&&(s[S]=E)}return s}function bd(e,t,n){const o=ld(e,t);o&&(e={...e,...o});const i=td(e);i&&(e={...e,...i});const s=Ir(n==null?void 0:n.designWidth),r=e.columns,a=t.columns,c=jn(e),u=jn(t),d=e.type==="B"||e.type===void 0&&t.type==="B",$=typeof r=="number"?r:typeof a=="number"?a:Pt.length,h=E=>{if(d)return E;const P=Hn({...t,...E}),L=jn(E),v=Kn($,L,P),C=hd($,v,{...t,...E});return Object.keys(C).length===0?E:{...E,...C}};if(typeof r=="number"&&r!==a){const E={...e,...pd(r,c),...md()};if(d)for(const P of Qt)typeof t[P]=="number"&&(E[P]=t[P]);else Object.assign(E,gd());return E}const y=Di(e),m=Di(t);if(!yd(y,m))return h({...e,...vd(y,m,t,$)});if(c<u&&typeof $=="number"&&!d){const E=Hn({...t,...e});return h({...e,...fd($,c,E)})}if(d){const E=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,P=Math.max(0,(c-s)/2);return E>P?{...e,textPaddingLR:P}:e}const g=Hn({...t,...e}),S=Kn($,u,Hn(t)),b=Kn($,c,g).some((E,P)=>E<(S[P]??E)),_=nt.some(E=>{const P=e[E],L=t[E];return typeof P=="number"&&typeof L=="number"&&P!==L});return b||_?h(e):e}function xd(e,t,n,o){const i=t.slice(0,e).reduce((r,a)=>r+a,0),s=n.slice(e+1,t.length-1).reduce((r,a)=>r+a,0);return Math.max(xn,o-i-s-xn)}function Cd(e,t){return Math.random()*(t-e)+e}function Sd(e){return Object.fromEntries(nt.map(t=>[t,typeof e[t]=="number"?e[t]:kr[t]]))}function Co(e,t,n=0){return Object.fromEntries(t.map(o=>[o,typeof e[o]=="number"?e[o]:n]))}function wd(e,t,n,o,i,s){return e.slice(0,t).map((r,a)=>{const c=Zt[a],u=Jt[a],d=Qt[a];return{key:r,textPrefix:ad[r],widthKey:nt[a],width:n[nt[a]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:d,paddingLeft:o[c],paddingRight:i[u],paddingBottom:s[d]}})}function $d({settings:e,content:t,isEditor:n,isPreviewMode:o,activeEvent:i,layoutId:s,onUpdateSettings:r}){const{prefix:a}=T.useScopedStyles(),c=!!(n&&o),{columns:u,type:d,wrapperWidth:$,entriesCount:h,cellMinHeight:y,dividerWidth:m,showVisibility:g,cut:S,showCut:f,cutCellMinHeight:b,cutLabel:_,imageSize:E,imageOnHover:P,entryHoverEffect:L,rowPaddingTop:v,rowPaddingBottom:C,rowPaddingTopB:R,columnsOrder:H,textPaddingLR:W,textColor:O,textFontFamily:D,textFontSettings:j,textFontSize:U,textLineHeight:w,textLetterSpacing:N,textWordSpacing:F,textTextAppearance:M,backgroundColor:I,dividerColor:V,textHoverColor:te,backgroundHoverColor:ue,dividerHoverColor:re}=e,[me,B]=p.useState(void 0),[Q,G]=p.useState(null),Y=P==="On"&&(!n||o),ie=(S??0)>0,k=d==="B",ne=p.useRef(null),[A,x]=p.useState(bn),z=Ir(A),q=Math.max(0,(($??0)-z)/2),J=Math.min(W??0,q),se=Math.max(J,ln),le=(($??0)+z)/2;p.useLayoutEffect(()=>{if(!n){x(bn);return}const ge=()=>{x(ud(ne.current))};ge();const xe=ne.current;if(!xe)return;const Se=new ResizeObserver(ge);Se.observe(xe);let Re=xe;for(;Re&&!Re.style.getPropertyValue("--cntrl-article-width");)Re=Re.parentElement;return Re&&Se.observe(Re),()=>Se.disconnect()},[n,s]),p.useEffect(()=>{B(void 0)},[S,f,t,h]);const ce=T.buildColorVars(a,{textColor:O,backgroundColor:I,dividerColor:V,textHoverColor:te,backgroundHoverColor:ue,dividerHoverColor:re},cd,dd),he=i&&i!=="default"?`${a}-state-${i}`:"",ee=`${L==="Default"?`${a}-entry-hover-default`:L==="Blinds"?`${a}-entry-hover-blinds`:""} ${he}`.trim(),Z=(g==null?void 0:g[0])??!1,de=(g==null?void 0:g[1])??!1,oe=p.useRef(e),pe=p.useRef(s);p.useEffect(()=>{if(!r||!n){oe.current=e,pe.current=s;return}if(pe.current!==s){oe.current=e,pe.current=s;return}const ge=oe.current,xe=bd(e,ge,{designWidth:A});oe.current=e,xe!==e&&r(xe)},[e,r,n,s,A]);const ve=p.useMemo(()=>Sd(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),Pe=p.useMemo(()=>Co(e,Zt),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),Ke=p.useMemo(()=>Co(e,Jt),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Ge=p.useMemo(()=>Co(e,Qt),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),$e=p.useMemo(()=>Array.isArray(H)&&H.length>0?H:[...Pt],[H]),Ae=p.useMemo(()=>wd($e,u,ve,Pe,Ke,Ge),[$e,u,ve,Pe,Ke,Ge]),Me=jn(e),We=p.useMemo(()=>nt.slice(0,u).map(ge=>ve[ge]),[u,ve]),Ve=p.useMemo(()=>ii(u,Me,ve),[u,Me,ve]),ye=p.useMemo(()=>Kn(u,Me,ve),[u,Me,ve]),Fe=p.useMemo(()=>Ae.map((ge,xe)=>Fr(ye[xe]??0,ge.paddingLeft,ge.paddingRight)),[Ae,ye]),Ne=p.useMemo(()=>{const ge=h===0?1/0:h;return(t??[]).slice(0,ge).map((Se,Re)=>({id:Re,cells:Object.fromEntries(Pt.map(Xe=>[Xe,Se[Xe]??""])),image:Se.image,link:Se.link}))},[t,h]),Be=ie?me??S:Ne.length,De=p.useMemo(()=>ie?Ne.slice(0,Be):Ne,[Ne,ie,Be]),Qe=ie&&Be<Ne.length,Ct=De.length>1||Qe,lt=[Z?`${a}-divider-top`:"",de||Ct?`${a}-divider-bottom`:""].filter(Boolean).join(" "),uo=()=>{const ge=me??S;if(!f){B(Ne.length);return}B(Math.min(ge+f,Ne.length))},Ee=ge=>T.scalingValue(ge,n??!1),An=k?R??0:v??0,on=C??0,rn=y??0,po=k?"rowPaddingTopB":"rowPaddingTop",be=Ae[0],Ye=Ae[Ae.length-1],ze=Fe[0],He=Fe[Fe.length-1],St=be&&ze?Math.max(ze.paddingLeft,ln):0,ri=Ye&&He?Math.max(He.paddingRight,ln):0,Hr=Me,ai=ge=>{const xe=ne.current;if(!xe)return{x:0,y:0};const Se=xe.getBoundingClientRect();return{x:ge.clientX-Se.left+Hi,y:ge.clientY-Se.top+Hi}},Nr=(ge,xe)=>{if(!Y)return;const Se=ge.image;if(!(Se!=null&&Se.url)){G(null);return}const{x:Re,y:Xe}=ai(xe),ct=(E==null?void 0:E.min)??80,Te=(E==null?void 0:E.max)??320,Oe=(Q==null?void 0:Q.rowId)===ge.id?Q.widthPx:Cd(ct,Te);G({rowId:ge.id,url:Se.url,objectFit:Se.objectFit??"cover",widthPx:Oe,x:Re,y:Xe})},Br=ge=>{if(!Y||!Q)return;const{x:xe,y:Se}=ai(ge);G(Re=>!Re||Re.x===xe&&Re.y===Se?Re:{...Re,x:xe,y:Se})},Or=()=>{G(null)},si=p.useMemo(()=>!k&&ti.some(ge=>{const xe=ge.charAt(0),Se=e[`${ge}VerticalAlign`];return Wr(Se,e,xe)}),[k,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);return p.useLayoutEffect(()=>{var ct;const ge=ne.current;if(!ge)return;const xe=()=>{ge.querySelectorAll("[data-list-col]").forEach(Te=>{Te.style.transform="";const Oe=Te.querySelector(`.${a}-list-col`);Oe&&(Oe.style.minHeight="",Oe.style.height="");const it=Te.querySelector(`.${a}-list-col-title`);it&&(it.style.transform="")})};if(k||!si){xe();return}const Se=()=>{ge.querySelectorAll("[data-list-row]").forEach(Te=>{const Oe=Array.from(Te.querySelectorAll("[data-list-col]"));Oe.forEach(Le=>{Le.style.transform="";const Ze=Le.querySelector(`.${a}-list-col`);Ze&&(Ze.style.minHeight="",Ze.style.height="");const Ue=Le.querySelector(`.${a}-list-col-title`);Ue&&(Ue.style.transform="")}),id(Te,Oe,`${a}-list-col`),Te.offsetHeight;const it=Te.getBoundingClientRect().top,wt=`${a}-baseline-probe`,It=new Map,an=Oe.map(Le=>{const Ze=Le.querySelector(`.${a}-list-col-title`),Ue={el:Le,titleEl:Ze,letter:Le.getAttribute("data-col-letter")??"",kind:Le.getAttribute("data-valign")??"top",anchor:Le.getAttribute("data-valign-anchor")};return It.set(Ue.letter,Ue),Ue}),sn=new Map,Rn=(Le,Ze)=>{const Ue=sn.get(Le.letter);if(Ue!==void 0)return Ue;const li=Le.anchor?It.get(Le.anchor):void 0;if(Le.kind!=="baseline"||!li||Ze.has(Le.letter)){const di=xo(Le,it,`${a}-list-col`,wt);return sn.set(Le.letter,di),di}Ze.add(Le.letter);const Vr=Rn(li,Ze);Ze.delete(Le.letter);const Dr=xo(Le,it,`${a}-list-col`,wt),zr=Vr-Dr;rd(Le.titleEl,zr);const ci=xo(Le,it,`${a}-list-col`,wt);return sn.set(Le.letter,ci),ci};an.forEach(Le=>Rn(Le,new Set))})};Se();const Re=new ResizeObserver(()=>Se());Re.observe(ge);let Xe=!1;return typeof document<"u"&&((ct=document.fonts)!=null&&ct.ready)&&document.fonts.ready.then(()=>{Xe||Se()}),()=>{Xe=!0,Re.disconnect(),xe()}},[si,k,e,t,A,De,ye]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Xc(a)}}),l.jsx("div",{style:ce,children:l.jsxs("div",{ref:ne,className:`${a}-wrapper ${ee}${lt?` ${lt}`:""}${k?` ${a}-type-b`:""}`.trim(),style:{width:T.scalingValue($??0,n)},onMouseMove:Y?Br:void 0,onMouseLeave:Y?Or:void 0,children:[l.jsxs("div",{style:{width:"100%"},children:[De.map((ge,xe)=>{var ct;const Se=(((ct=ge.link)==null?void 0:ct.length)??0)>0,Re=Se?"a":"div",Xe=Gc(xe,De.length,Z,de,Qe,m??0,n??!1);return l.jsxs(Re,{className:`${a}-list-item${Se?` ${a}-list-item-has-link`:""}`,...Se?{href:ge.link,target:"_blank"}:{},style:Xe,onMouseEnter:Y?Te=>Nr(ge,Te):void 0,children:[(An>0||c)&&l.jsx("div",{...c?{"data-controls":po,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0"}:{},className:`${a}-row-padding-handle`,style:{height:Ee(An)}}),l.jsx("div",{className:`${a}-list-cols-row${k?"":` ${a}-list-cols-row-h`}`,...k?{}:{"data-list-row":""},style:k?void 0:{minHeight:Ee(rn)},children:Ae.map((Te,Oe)=>{const it=Oe===Ae.length-1,wt=Fe[Oe],It=Te.paddingBottom,an=qc(ge.cells[Te.key]),sn=k&&an&&(It>0||c),Rn=k?{minHeight:Ee(rn)}:it?{}:{width:Ee(ye[Oe])},Le=k?{paddingLeft:Ee(J),paddingRight:Ee(J)}:{paddingLeft:Ee(wt.paddingLeft),paddingRight:Ee(wt.paddingRight)},Ze=Te.textPrefix.charAt(0),Ue=k?{kind:"top"}:ed(e[`${Te.textPrefix}VerticalAlign`],e,Ze);return l.jsxs("div",{...k?{}:{"data-list-col":"","data-col-letter":Ze,"data-valign":Ue.kind,...Ue.kind==="baseline"?{"data-valign-anchor":Ue.anchorLetter}:{}},children:[l.jsx("div",{className:`${a}-list-col${it?` ${a}-list-col-last`:""}`,style:{...Le,...Rn},"data-test":Te.width,children:l.jsx("span",{className:Bi(e,Te.textPrefix,`${a}-list-col-title`,`${a}-text-tight-leading`),style:{...Ni(Zn(e,Te.textPrefix),n),...Oi(e,Te.textPrefix,a,n),...k?{}:nd(Ue.kind)},children:ge.cells[Te.key]??null})}),sn&&l.jsx("div",{...c?{"data-controls":Te.paddingBottomKey,"data-controls-axis":"y","data-controls-min":"0"}:{},className:`${a}-row-padding-handle`,style:{height:Ee(It)}})]},Te.key)})}),!k&&(on>0||c)&&l.jsx("div",{...c?{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0"}:{},className:`${a}-row-padding-handle`,style:{height:Ee(on)}})]},ge.id)}),Qe&&l.jsx("button",{type:"button",className:`${a}-cut-item`,style:{minHeight:Ee(b??0),...Yc(de,m??0,n??!1)},onClick:uo,children:l.jsx("div",{className:`${a}-list-cols-row`,style:k?{paddingLeft:Ee(J),paddingRight:Ee(J)}:{justifyContent:"center"},children:l.jsx("span",{className:Bi(e,vt,`${a}-cut-label`,`${a}-text-tight-leading`),style:{...Ni(Zn(e,vt),n),...Oi(e,vt,a,n)},children:_})})})]}),c&&!k&&be&&Ye&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx("div",{"data-controls":be.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ye[0]-((ze==null?void 0:ze.paddingRight)??0)),className:`${a}-padding-control-handle`,style:{position:"absolute",top:0,left:0,width:Ee(St),height:"100%",pointerEvents:"auto",zIndex:2}}),l.jsx("div",{"data-controls":Ye.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ye[Ae.length-1]-((He==null?void 0:He.paddingLeft)??0)),className:`${a}-padding-control-handle`,style:{position:"absolute",top:0,left:Ee(Hr-ri),width:Ee(ri),height:"100%",pointerEvents:"auto",zIndex:2}})]},"column-edge-padding-handles"),c&&!k&&Ae.slice(0,-1).map((ge,xe)=>{const Se=Ae[xe+1],Re=xd(xe,Ve,We,Me),Xe=Ve.slice(0,xe+1).reduce((It,an)=>It+an,0),ct=Fe[xe],Te=Fe[xe+1],Oe=Math.max(ct.paddingRight,ln),it=Math.max(Te.paddingLeft,ln),wt=Xe-Vi/2;return l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx("div",{"data-controls":ge.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ye[xe]-ct.paddingLeft),className:`${a}-padding-control-handle`,style:{position:"absolute",top:0,left:Ee(Xe-Oe),width:Ee(Oe),height:"100%",pointerEvents:"auto",zIndex:2}}),l.jsx("div",{"data-controls":ge.widthKey,"data-controls-axis":"x","data-controls-min":String(oi),"data-controls-max-fraction":String(Re),"data-controls-variant":"column-width",className:`${a}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ee(wt),width:Ee(Vi),height:"calc(100%)",pointerEvents:"auto",zIndex:4}}),l.jsx("div",{"data-controls":Se.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ye[xe+1]-Te.paddingRight),className:`${a}-padding-control-handle`,style:{position:"absolute",top:0,left:Ee(Xe),width:Ee(it),height:"100%",pointerEvents:"auto",zIndex:2}})]},`${ge.widthKey}-junction`)}),c&&k&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(le),className:`${a}-text-padding-lr-handle`,style:{position:"absolute",top:0,left:0,width:Ee(se),height:"100%",pointerEvents:"auto",zIndex:2}}),l.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(le),className:`${a}-text-padding-lr-handle`,style:{position:"absolute",top:0,left:Ee(Math.max(se,Me-se)),width:Ee(se),height:"100%",pointerEvents:"auto",zIndex:2}})]},"text-padding-lr-handles"),Y&&Q&&l.jsx("img",{className:`${a}-hover-image`,src:Q.url,alt:"",style:{width:zn(Q.widthPx),objectFit:Q.objectFit,left:Q.x,top:Q.y}})]})})]})}const Td=`import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
4707
+ `}const Wt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ai=["AColumn","BColumn","CColumn","DColumn","EColumn"],Ct="cutLabel",ho=[...ai,Ct],si=["A","B","C","D","E"];function Ir(e){return`${e}ColumnVerticalAlign`}const No=["Top","Center","Bottom"];function Gc(e){const t=String(e??"Top").trim();return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Yc(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return si.includes(n)?n:null}function Wr(e,t,n){const o=Yc(e);return o?o===t?!1:Gc(n[Ir(o)]):!0}function Sn(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return si.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Xc(e,t,n){if(kr(e,t,n))return Sn(e);const o=Sn(e);return o.kind==="baseline"?{kind:"top"}:o}function Zc(e){const t=Sn(e);return t.kind==="baseline"?{kind:"top"}:t}function kr(e,t,n){return Wr(e,n,t)?Sn(e).kind==="baseline":!1}function Jc(e){const t={};let n=!1;for(const o of si){const i=Ir(o),s=e[i];if(e.type==="B"){const r=String(s??"Top").trim();r!=="Top"&&r!=="Center"&&r!=="Bottom"&&(t[i]="Top",n=!0);continue}Wr(s,o,e)||(t[i]="Top",n=!0)}return n?t:null}function Qc(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function eu(e){const t=Sn(e).kind;return t==="baseline"?"center":t}function tu(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Bi(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function nu(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:o}=e.getBoundingClientRect(),{bottom:i}=n.getBoundingClientRect(),s=i-o;return n.remove(),s}function $o(e,t,n,o){const i=e.titleEl;if(!i)return 0;const s=i.closest(`.${n}`);if(!s)return 0;const r=nu(i,o);if(e.kind==="baseline")return i.getBoundingClientRect().top-t+r;const a=s.getBoundingClientRect(),c=i.getBoundingClientRect().height;let d=0;return e.kind==="center"?d=(a.height-c)/2:e.kind==="bottom"&&(d=a.height-c),a.top-t+d+r}function ou(e,t,n){const o=e.getBoundingClientRect().height;return o<=0?0:(t.forEach(i=>{const s=i.querySelector(`.${n}`);s&&(s.style.minHeight=`${o}px`,s.style.height=`${o}px`)}),e.offsetHeight,o)}function iu(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const ru={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function $e(e,t){return`${e}${t.replace(/^text/,"Text")}`}const au={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function su(e){return[$e(e,"textFontFamily"),$e(e,"textFontSettings"),{type:"row",items:[$e(e,"textFontSize"),$e(e,"textLineHeight"),$e(e,"textLetterSpacing"),$e(e,"textWordSpacing")]},$e(e,"textTextAlign"),$e(e,"textTextAppearance"),`${e}VerticalAlign`]}function lu(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(ho.map(e=>[au[e],su(e)]))}}function to(e,t){const n=o=>{const i=$e(t,o);return e[i]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===Ct?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Oi(e,t){var o,i;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((o=e.textFontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((i=e.textFontSettings)==null?void 0:i.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return ut(Ke(n,t))}function Vi(e,t,n,o){const i=to(e,t),s=i.textFontSize??.01,r=i.textLineHeight;return r!==void 0&&r<s?`${n} ${o}`:n}function Di(e,t,n,o){const i=to(e,t),s=i.textFontSize??.01,r=i.textLineHeight;return r===void 0||r>=s?{}:{[`--${n}-title-leading-gap`]:w.scalingValue((s-r)/2,o)}}const et=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],on=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],rn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],an=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],cu={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},uu=["hover","focus","filled","success","error"],zi=.004,Xt=.004,To=Xt,li=50,wn=1440,$n=li/wn;function Fr(e){const t=typeof e=="number"&&e>0?e:wn;return li/t}function du(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const i=parseFloat(n);if(Number.isFinite(i)&&i>0)return i}const o=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(o){const i=parseFloat(o);if(Number.isFinite(i)&&i>0)return i}t=t.parentElement}return wn}const Mr={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Gn(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function pu(e,t=1){const n=t/e;return Object.fromEntries(et.map(o=>[o,n]))}function mu(){return Object.fromEntries([...on.map(e=>[e,0]),...rn.map(e=>[e,0])])}function gu(){return Object.fromEntries(an.map(e=>[e,0]))}function Vn(e){return Object.fromEntries(et.map(t=>[t,typeof e[t]=="number"?e[t]:Mr[t]]))}function Nr(e,t,n){const o=e-$n,i=t+n;if(i<=0||i<=o)return{paddingLeft:t,paddingRight:n};if(o<=0)return{paddingLeft:0,paddingRight:0};const s=o/i;return{paddingLeft:t*s,paddingRight:n*s}}function Yn(e,t,n){const o=ci(e,t,n);if(e<=0)return[];const i=o.slice(0,e-1).reduce((s,r)=>s+r,0);return[...o.slice(0,e-1),Math.max(0,t-i)]}function hu(e,t,n){const o={};for(let i=0;i<e;i+=1){const s=on[i],r=rn[i],a=typeof n[s]=="number"?n[s]:0,c=typeof n[r]=="number"?n[r]:0,d=Nr(t[i]??0,a,c);d.paddingLeft!==a&&(o[s]=d.paddingLeft),d.paddingRight!==c&&(o[r]=d.paddingRight)}return o}function ci(e,t,n){if(e<=0)return[];const o=et.slice(0,e).map(d=>n[d]);if(e===1)return o;const i=o.slice(0,e-1),r=i.reduce((d,u)=>d+u,0)+$n;if(t>=r)return o;const a=[...i];let c=r-t;for(let d=a.length-1;d>=0&&c>0;d-=1){const u=a[d]-$n;if(u<=0)continue;const L=Math.min(c,u);a[d]-=L,c-=L}return[...a,o[e-1]]}function fu(e,t,n){if(e<=1)return{};const o=ci(e,t,n),i={};for(let s=0;s<e-1;s+=1){const r=et[s];o[s]!==n[r]&&(i[r]=o[s])}return i}function ji(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Wt]}function yu(e,t){return e.length!==t.length?!1:e.every((n,o)=>n===t[o])}function vu(e,t,n,o){const i=Math.min(o,e.length,et.length),s={};for(let r=0;r<i;r+=1){const a=e[r],c=t.indexOf(a);if(c===-1)continue;const d=et[c],u=on[c],L=rn[c],h=an[c],f=et[r],m=on[r],g=rn[r],$=an[r],v=n[d],C=n[u],y=n[L],M=n[h];typeof v=="number"&&(s[f]=v),typeof C=="number"&&(s[m]=C),typeof y=="number"&&(s[g]=y),typeof M=="number"&&(s[$]=M)}return s}function bu(e,t,n){const o=Jc(e);o&&(e={...e,...o});const i=Fr(n==null?void 0:n.designWidth),s=e.columns,r=t.columns,a=Gn(e),c=Gn(t),d=e.type==="B"||e.type===void 0&&t.type==="B",u=typeof s=="number"?s:typeof r=="number"?r:Wt.length,L=y=>{if(d)return y;const M=Vn({...t,...y}),N=Gn(y),A=Yn(u,N,M),x=hu(u,A,{...t,...y});return Object.keys(x).length===0?y:{...y,...x}};if(typeof s=="number"&&s!==r){const y={...e,...pu(s,a),...mu()};if(d)for(const M of an)typeof t[M]=="number"&&(y[M]=t[M]);else Object.assign(y,gu());return y}const h=ji(e),f=ji(t);if(!yu(h,f))return L({...e,...vu(h,f,t,u)});if(a<c&&typeof u=="number"&&!d){const y=Vn({...t,...e});return L({...e,...fu(u,a,y)})}if(d){const y=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,M=Math.max(0,(a-i)/2);return y>M?{...e,textPaddingLR:M}:e}const m=Vn({...t,...e}),g=Yn(u,c,Vn(t)),v=Yn(u,a,m).some((y,M)=>y<(g[M]??y)),C=et.some(y=>{const M=e[y],N=t[y];return typeof M=="number"&&typeof N=="number"&&M!==N});return v||C?L(e):e}function xu(e,t,n,o){const i=t.slice(0,e).reduce((r,a)=>r+a,0),s=n.slice(e+1,t.length-1).reduce((r,a)=>r+a,0);return Math.max($n,o-i-s-$n)}function Cu(e,t){return Math.random()*(t-e)+e}function Su(e){return Object.fromEntries(et.map(t=>[t,typeof e[t]=="number"?e[t]:Mr[t]]))}function Lo(e,t,n=0){return Object.fromEntries(t.map(o=>[o,typeof e[o]=="number"?e[o]:n]))}function wu(e,t,n,o,i,s){return e.slice(0,t).map((r,a)=>{const c=on[a],d=rn[a],u=an[a];return{key:r,textPrefix:ru[r],widthKey:et[a],width:n[et[a]],paddingLeftKey:c,paddingRightKey:d,paddingBottomKey:u,paddingLeft:o[c],paddingRight:i[d],paddingBottom:s[u]}})}function $u({settings:e,content:t,isEditor:n,isPreviewMode:o,activeEvent:i,layoutId:s,onUpdateSettings:r}){const{prefix:a}=w.useScopedStyles(),c=!!(n&&!o),{columns:d,type:u,wrapperWidth:L,entriesCount:h,cellMinHeight:f,dividerWidth:m,showVisibility:g,cut:$,showCut:v,cutCellMinHeight:C,cutLabel:y,imageSize:M,imageOnHover:N,entryHoverEffect:A,rowPaddingTop:x,rowPaddingBottom:P,rowPaddingTopB:T,columnsOrder:R,textPaddingLR:k,textColor:D,backgroundColor:O,dividerColor:G,textHoverColor:X,backgroundHoverColor:b,dividerHoverColor:B}=e,[W,F]=p.useState(void 0),[E,H]=p.useState(null),J=N==="On"&&(!n||o),ie=($??0)>0,U=u==="B",le=p.useRef(null),[V,re]=p.useState(wn),fe=Fr(V),me=Math.max(0,((L??0)-fe)/2),ge=Math.min(k??0,me),I=Math.max(ge,Xt),ee=((L??0)+fe)/2;p.useLayoutEffect(()=>{if(!n){re(wn);return}const ce=()=>{re(du(le.current))};ce();const Se=le.current;if(!Se)return;const be=new ResizeObserver(ce);be.observe(Se);let Ie=Se;for(;Ie&&!Ie.style.getPropertyValue("--cntrl-article-width");)Ie=Ie.parentElement;return Ie&&be.observe(Ie),()=>be.disconnect()},[n,s]),p.useEffect(()=>{F(void 0)},[$,v,t,h]);const _=w.buildColorVars(a,{textColor:D,backgroundColor:O,dividerColor:G,textHoverColor:X,backgroundHoverColor:b,dividerHoverColor:B},cu,uu),S=i&&i!=="default"?`${a}-state-${i}`:"",q=`${A==="Default"?`${a}-entry-hover-default`:A==="Blinds"?`${a}-entry-hover-blinds`:""} ${S}`.trim(),Y=(g==null?void 0:g[0])??!1,te=(g==null?void 0:g[1])??!1,ne=p.useRef(e),oe=p.useRef(s);p.useEffect(()=>{if(!r||!n){ne.current=e,oe.current=s;return}if(oe.current!==s){ne.current=e,oe.current=s;return}const ce=ne.current;if(!(ce!==e))return;const be=bu(e,ce,{designWidth:V});ne.current=e,be!==e&&r(be)},[e,r,n,s,V]);const se=p.useMemo(()=>Su(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),xe=p.useMemo(()=>Lo(e,on),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),de=p.useMemo(()=>Lo(e,rn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),K=p.useMemo(()=>Lo(e,an),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),ue=p.useMemo(()=>Array.isArray(R)&&R.length>0?R:[...Wt],[R]),z=p.useMemo(()=>wu(ue,d,se,xe,de,K),[ue,d,se,xe,de,K]),Q=Gn(e),ye=p.useMemo(()=>et.slice(0,d).map(ce=>se[ce]),[d,se]),Le=p.useMemo(()=>ci(d,Q,se),[d,Q,se]),ke=p.useMemo(()=>Yn(d,Q,se),[d,Q,se]),Ae=p.useMemo(()=>z.map((ce,Se)=>Nr(ke[Se]??0,ce.paddingLeft,ce.paddingRight)),[z,ke]),ve=p.useMemo(()=>{const ce=h===0?1/0:h;return(t??[]).slice(0,ce).map((be,Ie)=>({id:Ie,cells:Object.fromEntries(Wt.map(Ge=>[Ge,be[Ge]??""])),image:be.image,link:be.link}))},[t,h]),Fe=ie?W??$:ve.length,ze=p.useMemo(()=>ie?ve.slice(0,Fe):ve,[ve,ie,Fe]),Re=ie&&Fe<ve.length,qe=ze.length>1||Re,Nt=[Y?`${a}-divider-top`:"",te||qe?`${a}-divider-bottom`:""].filter(Boolean).join(" "),Xe=()=>{const ce=W??$;if(!v){F(ve.length);return}F(Math.min(ce+v,ve.length))},Ce=ce=>w.scalingValue(ce,n??!1),Ze=U?T??0:x??0,at=P??0,gt=f??0,$t=U?"rowPaddingTopB":"rowPaddingTop",nt=z[0],ht=z[z.length-1],Tt=Ae[0],ft=Ae[Ae.length-1],Ht=nt&&Tt?Math.max(Tt.paddingLeft,Xt):0,Te=ht&&ft?Math.max(ft.paddingRight,Xt):0,Ue=Q,he=ce=>{const Se=le.current;if(!Se)return{x:0,y:0};const be=Se.getBoundingClientRect();return{x:ce.clientX-be.left+Hi,y:ce.clientY-be.top+Hi}},He=(ce,Se)=>{if(!J)return;const be=ce.image;if(!(be!=null&&be.url)){H(null);return}const{x:Ie,y:Ge}=he(Se),lt=(M==null?void 0:M.min)??80,Ee=(M==null?void 0:M.max)??320,Oe=(E==null?void 0:E.rowId)===ce.id?E.widthPx:Cu(lt,Ee);H({rowId:ce.id,url:be.url,objectFit:be.objectFit??"cover",widthPx:Oe,x:Ie,y:Ge})},Be=ce=>{if(!J||!E)return;const{x:Se,y:be}=he(ce);H(Ie=>!Ie||Ie.x===Se&&Ie.y===be?Ie:{...Ie,x:Se,y:be})},Me=()=>{H(null)},st=()=>{J&&H(null)},Wn=p.useMemo(()=>!U&&ai.some(ce=>{const Se=ce.charAt(0),be=e[`${ce}VerticalAlign`];return kr(be,e,Se)}),[U,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);return p.useLayoutEffect(()=>{var lt;const ce=le.current;if(!ce)return;const Se=()=>{ce.querySelectorAll("[data-list-col]").forEach(Ee=>{Ee.style.transform="";const Oe=Ee.querySelector(`.${a}-list-col`);Oe&&(Oe.style.minHeight="",Oe.style.height="");const ct=Ee.querySelector(`.${a}-list-col-title`);ct&&(ct.style.transform="")})};if(U||!Wn){Se();return}const be=()=>{ce.querySelectorAll("[data-list-row]").forEach(Ee=>{const Oe=Array.from(Ee.querySelectorAll("[data-list-col]"));Oe.forEach(_e=>{_e.style.transform="";const Ye=_e.querySelector(`.${a}-list-col`);Ye&&(Ye.style.minHeight="",Ye.style.height="");const Ve=_e.querySelector(`.${a}-list-col-title`);Ve&&(Ve.style.transform="")}),ou(Ee,Oe,`${a}-list-col`),Ee.offsetHeight;const ct=Ee.getBoundingClientRect().top,Lt=`${a}-baseline-probe`,Et=new Map,qt=Oe.map(_e=>{const Ye=_e.querySelector(`.${a}-list-col-title`),Ve={el:_e,titleEl:Ye,letter:_e.getAttribute("data-col-letter")??"",kind:_e.getAttribute("data-valign")??"top",anchor:_e.getAttribute("data-valign-anchor")};return Et.set(Ve.letter,Ve),Ve}),dn=new Map,kn=(_e,Ye)=>{const Ve=dn.get(_e.letter);if(Ve!==void 0)return Ve;const Fn=_e.anchor?Et.get(_e.anchor):void 0;if(_e.kind!=="baseline"||!Fn||Ye.has(_e.letter)){const di=$o(_e,ct,`${a}-list-col`,Lt);return dn.set(_e.letter,di),di}Ye.add(_e.letter);const Br=kn(Fn,Ye);Ye.delete(_e.letter);const Or=$o(_e,ct,`${a}-list-col`,Lt),Vr=Br-Or;iu(_e.titleEl,Vr);const ui=$o(_e,ct,`${a}-list-col`,Lt);return dn.set(_e.letter,ui),ui};qt.forEach(_e=>kn(_e,new Set))})};be();const Ie=new ResizeObserver(()=>be());Ie.observe(ce);let Ge=!1;return typeof document<"u"&&((lt=document.fonts)!=null&&lt.ready)&&document.fonts.ready.then(()=>{Ge||be()}),()=>{Ge=!0,Ie.disconnect(),Se()}},[Wn,U,e,t,V,ze,ke]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Uc(a)}}),l.jsx("div",{style:_,children:l.jsxs("div",{ref:le,className:`${a}-wrapper ${q}${Nt?` ${Nt}`:""}${U?` ${a}-type-b`:""}`.trim(),style:{width:w.scalingValue(L??0,n)},onMouseMove:J?Be:void 0,onMouseLeave:J?Me:void 0,children:[l.jsxs("div",{style:{width:"100%"},children:[ze.map((ce,Se)=>{var lt;const be=(((lt=ce.link)==null?void 0:lt.length)??0)>0,Ie=be?"a":"div",Ge=Kc(Se,ze.length,Y,te,Re,m??0,n??!1);return l.jsxs(Ie,{className:`${a}-list-item${be?` ${a}-list-item-has-link`:""}`,...be?{href:ce.link,target:"_blank"}:{},style:Ge,onMouseEnter:J?Ee=>He(ce,Ee):void 0,children:[Ze>0&&l.jsx("div",{className:`${a}-row-padding-handle`,style:{height:Ce(Ze)}}),l.jsx("div",{className:`${a}-list-cols-row${U?"":` ${a}-list-cols-row-h`}`,...U?{}:{"data-list-row":""},style:U?void 0:{minHeight:Ce(gt)},children:z.map((Ee,Oe)=>{const ct=Oe===z.length-1,Lt=Ae[Oe],Et=Ee.paddingBottom,qt=jc(ce.cells[Ee.key]),dn=U&&qt&&Et>0,kn=U?{minHeight:Ce(gt)}:{width:Ce(ke[Oe])},_e=U?{paddingLeft:Ce(ge),paddingRight:Ce(ge)}:{paddingLeft:Ce(Lt.paddingLeft),paddingRight:Ce(Lt.paddingRight)},Ye=Ee.textPrefix.charAt(0),Ve=U?Zc(e[`${Ee.textPrefix}VerticalAlign`]):Xc(e[`${Ee.textPrefix}VerticalAlign`],e,Ye),Fn=U&&qt&&c;return l.jsxs("div",{className:U?`${a}-list-col-wrap`:void 0,...U?{}:{"data-list-col":"","data-col-letter":Ye,"data-valign":Ve.kind,...Ve.kind==="baseline"?{"data-valign-anchor":Ve.anchorLetter}:{}},children:[l.jsx("div",{className:`${a}-list-col${ct?` ${a}-list-col-last`:""}`,style:{..._e,...kn,...U?{justifyContent:Bi(Ve.kind)}:{}},"data-test":Ee.width,children:l.jsx("span",{className:Vi(e,Ee.textPrefix,`${a}-list-col-title`,`${a}-text-tight-leading`),style:{...Oi(to(e,Ee.textPrefix),n),...Di(e,Ee.textPrefix,a,n),...U?{}:Qc(Ve.kind)},children:ce.cells[Ee.key]??null})}),dn&&l.jsx("div",{className:`${a}-row-padding-handle`,style:{height:Ce(Et)}}),Fn&&l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none",zIndex:2},children:l.jsx("div",{"data-controls":Ee.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,style:{position:"absolute",bottom:0,left:0,width:"100%",height:Ce(Math.max(Et,To)),pointerEvents:"auto"}})})]},Ee.key)})}),!U&&at>0&&l.jsx("div",{className:`${a}-row-padding-handle`,style:{height:Ce(at)}}),c&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none",zIndex:2},children:[l.jsx("div",{"data-controls":$t,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,style:{position:"absolute",top:0,left:0,width:"100%",height:Ce(Math.max(Ze,To)),pointerEvents:"auto"}}),!U&&l.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,style:{position:"absolute",bottom:0,left:0,width:"100%",height:Ce(Math.max(at,To)),pointerEvents:"auto"}})]})]},ce.id)}),Re&&(()=>{const ce=to(e,Ct),Se=eu(e.cutLabelVerticalAlign),be=ce.textTextAlign==="justify"||U;return l.jsx("button",{type:"button",className:`${a}-cut-item`,style:{minHeight:Ce(C??0),...qc(te,m??0,n??!1)},onClick:Xe,onMouseEnter:J?st:void 0,children:l.jsx("div",{className:`${a}-list-cols-row`,style:{...U?{paddingLeft:Ce(ge),paddingRight:Ce(ge)}:{},justifyContent:tu(ce.textTextAlign),alignItems:Bi(Se)},children:l.jsx("span",{className:Vi(e,Ct,`${a}-cut-label`,`${a}-text-tight-leading`),style:{...Oi(ce,n),...Di(e,Ct,a,n),...be?{width:"100%"}:{}},children:y})})})})()]}),c&&!U&&nt&&ht&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx("div",{"data-controls":nt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ke[0]-((Tt==null?void 0:Tt.paddingRight)??0)),className:`${a}-padding-control-handle`,style:{position:"absolute",top:0,left:0,width:Ce(Ht),height:"100%",pointerEvents:"auto",zIndex:2}}),l.jsx("div",{"data-controls":ht.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ke[z.length-1]-((ft==null?void 0:ft.paddingLeft)??0)),className:`${a}-padding-control-handle`,style:{position:"absolute",top:0,left:Ce(Ue-Te),width:Ce(Te),height:"100%",pointerEvents:"auto",zIndex:2}})]},"column-edge-padding-handles"),c&&!U&&z.slice(0,-1).map((ce,Se)=>{const be=z[Se+1],Ie=xu(Se,Le,ye,Q),Ge=Le.slice(0,Se+1).reduce((Et,qt)=>Et+qt,0),lt=Ae[Se],Ee=Ae[Se+1],Oe=Math.max(lt.paddingRight,Xt),ct=Math.max(Ee.paddingLeft,Xt),Lt=Ge-zi/2;return l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx("div",{"data-controls":ce.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ke[Se]-lt.paddingLeft),className:`${a}-padding-control-handle`,style:{position:"absolute",top:0,left:Ce(Ge-Oe),width:Ce(Oe),height:"100%",pointerEvents:"auto",zIndex:2}}),l.jsx("div",{"data-controls":ce.widthKey,"data-controls-axis":"x","data-controls-min":String(li),"data-controls-max-fraction":String(Ie),"data-controls-variant":"column-width",className:`${a}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ce(Lt),width:Ce(zi),height:"calc(100%)",pointerEvents:"auto",zIndex:4}}),l.jsx("div",{"data-controls":be.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ke[Se+1]-Ee.paddingRight),className:`${a}-padding-control-handle`,style:{position:"absolute",top:0,left:Ce(Ge),width:Ce(ct),height:"100%",pointerEvents:"auto",zIndex:2}})]},`${ce.widthKey}-junction`)}),c&&U&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ee),className:`${a}-text-padding-lr-handle`,style:{position:"absolute",top:0,left:0,width:Ce(I),height:"100%",pointerEvents:"auto",zIndex:2}}),l.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ee),className:`${a}-text-padding-lr-handle`,style:{position:"absolute",top:0,left:Ce(Math.max(I,Q-I)),width:Ce(I),height:"100%",pointerEvents:"auto",zIndex:2}})]},"text-padding-lr-handles"),J&&E&&l.jsx("img",{className:`${a}-hover-image`,src:E.url,alt:"",style:{width:Un(E.widthPx),objectFit:E.objectFit,left:E.x,top:E.y}})]})})]})}const Tu=`import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
4650
4708
  import { CommonComponentProps } from '../props';
4651
4709
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
4652
4710
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
4711
+ import type { LayoutItem, LayoutTab } from '../../types/SchemaV1';
4653
4712
 
4654
4713
  type ListFontSettings = { fontWeight: number; fontStyle: string };
4655
4714
 
@@ -4663,6 +4722,7 @@ type ListColumnTextStyleOverrides = {
4663
4722
  AColumnTextLineHeight?: number;
4664
4723
  AColumnTextLetterSpacing?: number;
4665
4724
  AColumnTextWordSpacing?: number;
4725
+ AColumnTextTextAlign?: 'left' | 'center' | 'right' | 'justify';
4666
4726
  AColumnTextTextAppearance?: TextStyles['textAppearance'];
4667
4727
  BColumnVerticalAlign?: string;
4668
4728
  BColumnTextFontFamily?: string;
@@ -4671,6 +4731,7 @@ type ListColumnTextStyleOverrides = {
4671
4731
  BColumnTextLineHeight?: number;
4672
4732
  BColumnTextLetterSpacing?: number;
4673
4733
  BColumnTextWordSpacing?: number;
4734
+ BColumnTextTextAlign?: 'left' | 'center' | 'right' | 'justify';
4674
4735
  BColumnTextTextAppearance?: TextStyles['textAppearance'];
4675
4736
  CColumnVerticalAlign?: string;
4676
4737
  CColumnTextFontFamily?: string;
@@ -4679,6 +4740,7 @@ type ListColumnTextStyleOverrides = {
4679
4740
  CColumnTextLineHeight?: number;
4680
4741
  CColumnTextLetterSpacing?: number;
4681
4742
  CColumnTextWordSpacing?: number;
4743
+ CColumnTextTextAlign?: 'left' | 'center' | 'right' | 'justify';
4682
4744
  CColumnTextTextAppearance?: TextStyles['textAppearance'];
4683
4745
  DColumnVerticalAlign?: string;
4684
4746
  DColumnTextFontFamily?: string;
@@ -4687,6 +4749,7 @@ type ListColumnTextStyleOverrides = {
4687
4749
  DColumnTextLineHeight?: number;
4688
4750
  DColumnTextLetterSpacing?: number;
4689
4751
  DColumnTextWordSpacing?: number;
4752
+ DColumnTextTextAlign?: 'left' | 'center' | 'right' | 'justify';
4690
4753
  DColumnTextTextAppearance?: TextStyles['textAppearance'];
4691
4754
  EColumnVerticalAlign?: string;
4692
4755
  EColumnTextFontFamily?: string;
@@ -4695,6 +4758,7 @@ type ListColumnTextStyleOverrides = {
4695
4758
  EColumnTextLineHeight?: number;
4696
4759
  EColumnTextLetterSpacing?: number;
4697
4760
  EColumnTextWordSpacing?: number;
4761
+ EColumnTextTextAlign?: 'left' | 'center' | 'right' | 'justify';
4698
4762
  EColumnTextTextAppearance?: TextStyles['textAppearance'];
4699
4763
  cutLabelTextFontFamily?: string;
4700
4764
  cutLabelTextFontSettings?: ListFontSettings;
@@ -4702,7 +4766,9 @@ type ListColumnTextStyleOverrides = {
4702
4766
  cutLabelTextLineHeight?: number;
4703
4767
  cutLabelTextLetterSpacing?: number;
4704
4768
  cutLabelTextWordSpacing?: number;
4769
+ cutLabelTextTextAlign?: 'left' | 'center' | 'right' | 'justify';
4705
4770
  cutLabelTextTextAppearance?: TextStyles['textAppearance'];
4771
+ cutLabelVerticalAlign?: string;
4706
4772
  };
4707
4773
 
4708
4774
  export type ListColumnVerticalAlignKey = \`\${ListColumnPrefix}VerticalAlign\`;
@@ -4715,51 +4781,6 @@ type ListColumnVerticalAlignUpdates = {
4715
4781
  EColumnVerticalAlign?: string;
4716
4782
  };
4717
4783
 
4718
- type ListColumnTextStyleSyncUpdates = {
4719
- AColumnTextFontFamily?: string;
4720
- AColumnTextFontSettings?: ListFontSettings;
4721
- AColumnTextFontSize?: number;
4722
- AColumnTextLineHeight?: number;
4723
- AColumnTextLetterSpacing?: number;
4724
- AColumnTextWordSpacing?: number;
4725
- AColumnTextTextAppearance?: TextStyles['textAppearance'];
4726
- BColumnTextFontFamily?: string;
4727
- BColumnTextFontSettings?: ListFontSettings;
4728
- BColumnTextFontSize?: number;
4729
- BColumnTextLineHeight?: number;
4730
- BColumnTextLetterSpacing?: number;
4731
- BColumnTextWordSpacing?: number;
4732
- BColumnTextTextAppearance?: TextStyles['textAppearance'];
4733
- CColumnTextFontFamily?: string;
4734
- CColumnTextFontSettings?: ListFontSettings;
4735
- CColumnTextFontSize?: number;
4736
- CColumnTextLineHeight?: number;
4737
- CColumnTextLetterSpacing?: number;
4738
- CColumnTextWordSpacing?: number;
4739
- CColumnTextTextAppearance?: TextStyles['textAppearance'];
4740
- DColumnTextFontFamily?: string;
4741
- DColumnTextFontSettings?: ListFontSettings;
4742
- DColumnTextFontSize?: number;
4743
- DColumnTextLineHeight?: number;
4744
- DColumnTextLetterSpacing?: number;
4745
- DColumnTextWordSpacing?: number;
4746
- DColumnTextTextAppearance?: TextStyles['textAppearance'];
4747
- EColumnTextFontFamily?: string;
4748
- EColumnTextFontSettings?: ListFontSettings;
4749
- EColumnTextFontSize?: number;
4750
- EColumnTextLineHeight?: number;
4751
- EColumnTextLetterSpacing?: number;
4752
- EColumnTextWordSpacing?: number;
4753
- EColumnTextTextAppearance?: TextStyles['textAppearance'];
4754
- cutLabelTextFontFamily?: string;
4755
- cutLabelTextFontSettings?: ListFontSettings;
4756
- cutLabelTextFontSize?: number;
4757
- cutLabelTextLineHeight?: number;
4758
- cutLabelTextLetterSpacing?: number;
4759
- cutLabelTextWordSpacing?: number;
4760
- cutLabelTextTextAppearance?: TextStyles['textAppearance'];
4761
- };
4762
-
4763
4784
  export type ListSettings = {
4764
4785
  columns: number;
4765
4786
  type: 'A' | 'B';
@@ -4801,13 +4822,6 @@ export type ListSettings = {
4801
4822
  columnsOrder?: string[];
4802
4823
  textPaddingLR?: number;
4803
4824
  textColor: string;
4804
- textFontFamily: string;
4805
- textFontSettings?: ListFontSettings;
4806
- textFontSize?: number;
4807
- textLineHeight?: number;
4808
- textLetterSpacing?: number;
4809
- textWordSpacing?: number;
4810
- textTextAppearance?: TextStyles['textAppearance'];
4811
4825
  backgroundColor: string;
4812
4826
  dividerColor: string;
4813
4827
  textHoverColor: string;
@@ -5006,13 +5020,9 @@ function getCSS(P: string): string {
5006
5020
 
5007
5021
  .\${P}-wrapper.\${P}-type-b .\${P}-cut-item .\${P}-list-cols-row {
5008
5022
  flex-direction: row;
5009
- align-items: center;
5010
- justify-content: center;
5011
5023
  }
5012
5024
 
5013
5025
  .\${P}-wrapper.\${P}-type-b .\${P}-cut-label {
5014
- text-align: center;
5015
- width: 100%;
5016
5026
  box-sizing: border-box;
5017
5027
  }
5018
5028
 
@@ -5067,15 +5077,13 @@ a.\${P}-list-item {
5067
5077
  }
5068
5078
 
5069
5079
  .\${P}-row-padding-handle {
5070
- position: relative;
5071
- z-index: 2;
5072
5080
  width: 100%;
5073
5081
  flex-shrink: 0;
5074
5082
  background: transparent;
5075
5083
  }
5076
5084
 
5077
- .\${P}-row-padding-handle[data-controls] {
5078
- min-height: 20px;
5085
+ .\${P}-list-col-wrap {
5086
+ position: relative;
5079
5087
  }
5080
5088
 
5081
5089
  .\${P}-col-resize-handle::after {
@@ -5191,8 +5199,7 @@ a.\${P}-list-item {
5191
5199
 
5192
5200
  .\${P}-cut-item {
5193
5201
  display: flex;
5194
- align-items: center;
5195
- justify-content: center;
5202
+ align-items: stretch;
5196
5203
  width: 100%;
5197
5204
  overflow: visible;
5198
5205
  position: relative;
@@ -5212,7 +5219,8 @@ a.\${P}-list-item {
5212
5219
  .\${P}-cut-item .\${P}-list-cols-row {
5213
5220
  flex: 1;
5214
5221
  min-height: 100%;
5215
- align-items: center;
5222
+ width: 100%;
5223
+ display: flex;
5216
5224
  }
5217
5225
 
5218
5226
  .\${P}-wrapper.\${P}-divider-bottom .\${P}-cut-item {
@@ -5347,6 +5355,14 @@ function resolveColumnVerticalAlign(
5347
5355
  return parsed;
5348
5356
  }
5349
5357
 
5358
+ function resolveBasicColumnVerticalAlign(value: string | undefined): ColumnVerticalAlign {
5359
+ const parsed = parseColumnVerticalAlign(value);
5360
+ if (parsed.kind === 'baseline') {
5361
+ return { kind: 'top' };
5362
+ }
5363
+ return parsed;
5364
+ }
5365
+
5350
5366
  function isActiveBaselineVAlign(
5351
5367
  value: string | undefined,
5352
5368
  settings: ListSettings,
@@ -5361,16 +5377,22 @@ function isActiveBaselineVAlign(
5361
5377
  function getListColumnVerticalAlignSanitizeUpdates(
5362
5378
  settings: ListSettings,
5363
5379
  ): ListColumnVerticalAlignUpdates | null {
5364
- if (settings.type === 'B') {
5365
- return null;
5366
- }
5367
-
5368
5380
  const updates: ListColumnVerticalAlignUpdates = {};
5369
5381
  let hasUpdates = false;
5370
5382
 
5371
5383
  for (const letter of LIST_COLUMN_LETTERS) {
5372
5384
  const key = getListColumnVerticalAlignSettingKey(letter) as ListColumnVerticalAlignKey;
5373
5385
  const value = settings[key];
5386
+
5387
+ if (settings.type === 'B') {
5388
+ const raw = String(value ?? 'Top').trim();
5389
+ if (raw !== 'Top' && raw !== 'Center' && raw !== 'Bottom') {
5390
+ updates[key] = 'Top';
5391
+ hasUpdates = true;
5392
+ }
5393
+ continue;
5394
+ }
5395
+
5374
5396
  if (!isValidColumnBaselineVAlign(value, letter, settings)) {
5375
5397
  updates[key] = 'Top';
5376
5398
  hasUpdates = true;
@@ -5384,14 +5406,48 @@ function vAlignToTitleStyle(
5384
5406
  kind: ColumnVerticalAlign['kind'],
5385
5407
  ): React.CSSProperties {
5386
5408
  if (kind === 'center') {
5387
- return { marginTop: 'auto', marginBottom: 'auto' };
5409
+ return { flex: '0 0 auto', marginTop: 'auto', marginBottom: 'auto' };
5388
5410
  }
5389
5411
  if (kind === 'bottom') {
5390
- return { marginTop: 'auto' };
5412
+ return { flex: '0 0 auto', marginTop: 'auto' };
5391
5413
  }
5392
5414
  return {};
5393
5415
  }
5394
5416
 
5417
+ function resolveCutLabelVerticalAlignKind(
5418
+ value: string | undefined,
5419
+ ): ColumnVerticalAlign['kind'] {
5420
+ const kind = parseColumnVerticalAlign(value).kind;
5421
+ return kind === 'baseline' ? 'center' : kind;
5422
+ }
5423
+
5424
+ function textAlignToJustifyContent(
5425
+ textAlign: 'left' | 'center' | 'right' | 'justify',
5426
+ ): React.CSSProperties['justifyContent'] {
5427
+ if (textAlign === 'right') {
5428
+ return 'flex-end';
5429
+ }
5430
+ if (textAlign === 'center') {
5431
+ return 'center';
5432
+ }
5433
+ if (textAlign === 'left') {
5434
+ return 'flex-start';
5435
+ }
5436
+ return 'flex-start';
5437
+ }
5438
+
5439
+ function cutVerticalAlignKindToFlexAlign(
5440
+ kind: ColumnVerticalAlign['kind'],
5441
+ ): React.CSSProperties['alignItems'] {
5442
+ if (kind === 'center') {
5443
+ return 'center';
5444
+ }
5445
+ if (kind === 'bottom') {
5446
+ return 'flex-end';
5447
+ }
5448
+ return 'flex-start';
5449
+ }
5450
+
5395
5451
  function getFirstLineBaselineOffsetInTitle(
5396
5452
  titleEl: HTMLElement,
5397
5453
  probeClassName: string,
@@ -5495,6 +5551,7 @@ export const LIST_GLOBAL_TEXT_STYLE_KEYS = [
5495
5551
  'textLineHeight',
5496
5552
  'textLetterSpacing',
5497
5553
  'textWordSpacing',
5554
+ 'textTextAlign',
5498
5555
  'textTextAppearance',
5499
5556
  ] as const;
5500
5557
 
@@ -5507,6 +5564,47 @@ export function getListColumnTextSettingKey(
5507
5564
  return \`\${prefix}\${globalKey.replace(/^text/, 'Text')}\`;
5508
5565
  }
5509
5566
 
5567
+ export const LIST_TEXT_STYLE_TAB_LABELS: Record<ListTextStylePrefix, string> = {
5568
+ AColumn: 'A',
5569
+ BColumn: 'B',
5570
+ CColumn: 'C',
5571
+ DColumn: 'D',
5572
+ EColumn: 'E',
5573
+ cutLabel: 'CUT',
5574
+ };
5575
+
5576
+ export function createListTextStyleTabContentItems(prefix: ListTextStylePrefix): LayoutItem[] {
5577
+ return [
5578
+ getListColumnTextSettingKey(prefix, 'textFontFamily'),
5579
+ getListColumnTextSettingKey(prefix, 'textFontSettings'),
5580
+ {
5581
+ type: 'row',
5582
+ items: [
5583
+ getListColumnTextSettingKey(prefix, 'textFontSize'),
5584
+ getListColumnTextSettingKey(prefix, 'textLineHeight'),
5585
+ getListColumnTextSettingKey(prefix, 'textLetterSpacing'),
5586
+ getListColumnTextSettingKey(prefix, 'textWordSpacing'),
5587
+ ],
5588
+ },
5589
+ getListColumnTextSettingKey(prefix, 'textTextAlign'),
5590
+ getListColumnTextSettingKey(prefix, 'textTextAppearance'),
5591
+ \`\${prefix}VerticalAlign\`,
5592
+ ];
5593
+ }
5594
+
5595
+ export function createListTextStylePanelTab(): LayoutTab {
5596
+ return {
5597
+ type: 'tab',
5598
+ id: 'listColumnTextStyle',
5599
+ tabs: Object.fromEntries(
5600
+ LIST_TEXT_STYLE_PREFIXES.map((prefix) => [
5601
+ LIST_TEXT_STYLE_TAB_LABELS[prefix],
5602
+ createListTextStyleTabContentItems(prefix),
5603
+ ]),
5604
+ ),
5605
+ };
5606
+ }
5607
+
5510
5608
  type ListTextStyleFields = {
5511
5609
  textFontFamily?: string;
5512
5610
  textFontSettings?: { fontWeight: number; fontStyle: string };
@@ -5514,6 +5612,7 @@ type ListTextStyleFields = {
5514
5612
  textLineHeight?: number;
5515
5613
  textLetterSpacing?: number;
5516
5614
  textWordSpacing?: number;
5615
+ textTextAlign?: 'left' | 'center' | 'right' | 'justify';
5517
5616
  textTextAppearance?: TextStyles['textAppearance'];
5518
5617
  textColor?: string;
5519
5618
  };
@@ -5525,39 +5624,18 @@ type ResolvedListTextFields = {
5525
5624
  textLineHeight?: number;
5526
5625
  textLetterSpacing: number;
5527
5626
  textWordSpacing: number;
5627
+ textTextAlign: 'left' | 'center' | 'right' | 'justify';
5528
5628
  textTextAppearance?: TextStyles['textAppearance'];
5529
5629
  textColor?: string;
5530
5630
  };
5531
5631
 
5532
- function resolveListGlobalTextFields(
5533
- settings: ListTextStyleFields,
5534
- ): ResolvedListTextFields {
5535
- return {
5536
- textFontFamily: settings.textFontFamily ?? 'Arial',
5537
- textFontSettings: settings.textFontSettings ?? {
5538
- fontWeight: 400,
5539
- fontStyle: 'normal',
5540
- },
5541
- textFontSize: settings.textFontSize,
5542
- textLineHeight: settings.textLineHeight,
5543
- textLetterSpacing: settings.textLetterSpacing ?? 0,
5544
- textWordSpacing: settings.textWordSpacing ?? 0,
5545
- textTextAppearance: settings.textTextAppearance,
5546
- textColor: settings.textColor,
5547
- };
5548
- }
5549
-
5550
5632
  function resolveListColumnTextFields(
5551
5633
  settings: ListSettings,
5552
5634
  textPrefix: ListTextStylePrefix,
5553
5635
  ): ResolvedListTextFields {
5554
5636
  const read = <K extends ListGlobalTextStyleKey>(globalKey: K) => {
5555
5637
  const columnKey = getListColumnTextSettingKey(textPrefix, globalKey);
5556
- const columnValue = settings[columnKey as keyof ListSettings];
5557
- if (columnValue !== undefined) {
5558
- return columnValue as ListTextStyleFields[K];
5559
- }
5560
- return settings[globalKey];
5638
+ return settings[columnKey as keyof ListSettings] as ListTextStyleFields[K] | undefined;
5561
5639
  };
5562
5640
 
5563
5641
  return {
@@ -5570,6 +5648,8 @@ function resolveListColumnTextFields(
5570
5648
  textLineHeight: read('textLineHeight') as number | undefined,
5571
5649
  textLetterSpacing: (read('textLetterSpacing') as number | undefined) ?? 0,
5572
5650
  textWordSpacing: (read('textWordSpacing') as number | undefined) ?? 0,
5651
+ textTextAlign: (read('textTextAlign') as ListTextStyleFields['textTextAlign'])
5652
+ ?? (textPrefix === CUT_LABEL_TEXT_PREFIX ? 'center' : 'left'),
5573
5653
  textTextAppearance: read('textTextAppearance') as ListTextStyleFields['textTextAppearance'],
5574
5654
  textColor: settings.textColor,
5575
5655
  };
@@ -5589,6 +5669,7 @@ function listColumnTextFieldsToCss(
5589
5669
  lineHeight: fields.textLineHeight,
5590
5670
  letterSpacing: fields.textLetterSpacing,
5591
5671
  wordSpacing: fields.textWordSpacing,
5672
+ textAlign: fields.textTextAlign,
5592
5673
  textAppearance: fields.textTextAppearance,
5593
5674
  color: fields.textColor ?? '#767676',
5594
5675
  };
@@ -5631,32 +5712,6 @@ function getListColumnTitleVars(
5631
5712
  } as React.CSSProperties;
5632
5713
  }
5633
5714
 
5634
- function getListGlobalTextSyncUpdates(
5635
- nextSettings: ListSettings,
5636
- prevSettings: ListSettings,
5637
- ): ListColumnTextStyleSyncUpdates | null {
5638
- const updates: ListColumnTextStyleSyncUpdates = {};
5639
- let hasChanges = false;
5640
-
5641
- for (const globalKey of LIST_GLOBAL_TEXT_STYLE_KEYS) {
5642
- if (nextSettings[globalKey] === prevSettings[globalKey]) {
5643
- continue;
5644
- }
5645
- if (nextSettings[globalKey] === undefined) {
5646
- continue;
5647
- }
5648
-
5649
- hasChanges = true;
5650
- for (const prefix of LIST_TEXT_STYLE_PREFIXES) {
5651
- Object.assign(updates, {
5652
- [getListColumnTextSettingKey(prefix, globalKey)]: nextSettings[globalKey],
5653
- });
5654
- }
5655
- }
5656
-
5657
- return hasChanges ? updates : null;
5658
- }
5659
-
5660
5715
  const COLUMN_WIDTH_KEYS = [
5661
5716
  'AColumnWidth',
5662
5717
  'BColumnWidth',
@@ -5749,6 +5804,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
5749
5804
 
5750
5805
  const COL_RESIZE_HANDLE_WIDTH = 0.004;
5751
5806
  const COL_PADDING_HANDLE_WIDTH = 0.004;
5807
+ const ROW_PADDING_HANDLE_HEIGHT = COL_PADDING_HANDLE_WIDTH;
5752
5808
  const MIN_COLUMN_WIDTH_PX = 50;
5753
5809
  const ARTICLE_DESIGN_WIDTH = 1440;
5754
5810
  const MIN_COLUMN_WIDTH = MIN_COLUMN_WIDTH_PX / ARTICLE_DESIGN_WIDTH;
@@ -6055,11 +6111,6 @@ export function applyListSettingsChange(
6055
6111
  prevSettings: ListSettings,
6056
6112
  options?: { designWidth?: number },
6057
6113
  ): ListSettings {
6058
- const textSyncUpdates = getListGlobalTextSyncUpdates(nextSettings, prevSettings);
6059
- if (textSyncUpdates) {
6060
- nextSettings = { ...nextSettings, ...textSyncUpdates };
6061
- }
6062
-
6063
6114
  const valignSanitizeUpdates = getListColumnVerticalAlignSanitizeUpdates(nextSettings);
6064
6115
  if (valignSanitizeUpdates) {
6065
6116
  nextSettings = { ...nextSettings, ...valignSanitizeUpdates };
@@ -6265,7 +6316,7 @@ function buildListColumns(
6265
6316
 
6266
6317
  export function List({ settings, content, isEditor, isPreviewMode, activeEvent, layoutId, onUpdateSettings }: ListProps) {
6267
6318
  const { prefix: P } = useScopedStyles();
6268
- const showControls = Boolean(isEditor && isPreviewMode);
6319
+ const showControls = Boolean(isEditor && !isPreviewMode);
6269
6320
  const {
6270
6321
  columns,
6271
6322
  type,
@@ -6287,13 +6338,6 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
6287
6338
  columnsOrder,
6288
6339
  textPaddingLR,
6289
6340
  textColor,
6290
- textFontFamily,
6291
- textFontSettings,
6292
- textFontSize,
6293
- textLineHeight,
6294
- textLetterSpacing,
6295
- textWordSpacing,
6296
- textTextAppearance,
6297
6341
  backgroundColor,
6298
6342
  dividerColor,
6299
6343
  textHoverColor,
@@ -6387,6 +6431,12 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
6387
6431
  }
6388
6432
 
6389
6433
  const prevSettings = prevSettingsRef.current;
6434
+ const settingsChanged = prevSettings !== settings;
6435
+
6436
+ if (!settingsChanged) {
6437
+ return;
6438
+ }
6439
+
6390
6440
  const updatedSettings = applyListSettingsChange(
6391
6441
  settings,
6392
6442
  prevSettings,
@@ -6608,6 +6658,11 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
6608
6658
  setHoverImage(null);
6609
6659
  };
6610
6660
 
6661
+ const handleCutItemMouseEnter = () => {
6662
+ if (!showHoverImage) return;
6663
+ setHoverImage(null);
6664
+ };
6665
+
6611
6666
  const hasBaselineColumn = useMemo(
6612
6667
  () =>
6613
6668
  !isVerticalLayout &&
@@ -6800,14 +6855,8 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
6800
6855
  style={rowStyle}
6801
6856
  onMouseEnter={showHoverImage ? (event) => handleRowMouseEnter(row, event) : undefined}
6802
6857
  >
6803
- {(resolvedRowPaddingTop > 0 || showControls) && (
6858
+ {resolvedRowPaddingTop > 0 && (
6804
6859
  <div
6805
- {...(showControls ? {
6806
- 'data-controls': rowPaddingTopControlKey,
6807
- 'data-controls-axis': 'y',
6808
- 'data-controls-variant': 'row-padding',
6809
- 'data-controls-min': '0',
6810
- } : {})}
6811
6860
  className={\`\${P}-row-padding-handle\`}
6812
6861
  style={{ height: scaled(resolvedRowPaddingTop) }}
6813
6862
  />
@@ -6824,10 +6873,10 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
6824
6873
  const hasColumnText = hasListColumnText(row.cells[col.key]);
6825
6874
  const showColumnPaddingBottom = isVerticalLayout
6826
6875
  && hasColumnText
6827
- && (columnPaddingBottom > 0 || showControls);
6876
+ && columnPaddingBottom > 0;
6828
6877
  const columnSizeStyle = isVerticalLayout
6829
6878
  ? { minHeight: scaled(resolvedCellMinHeight) }
6830
- : (isLastColumn ? {} : { width: scaled(effectiveColumnWidths[colIndex]) });
6879
+ : { width: scaled(effectiveColumnWidths[colIndex]) };
6831
6880
  const columnPaddingStyle = isVerticalLayout
6832
6881
  ? {
6833
6882
  paddingLeft: scaled(effectiveTextPaddingLR),
@@ -6839,16 +6888,23 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
6839
6888
  };
6840
6889
  const columnLetter = col.textPrefix.charAt(0);
6841
6890
  const vAlign = isVerticalLayout
6842
- ? { kind: 'top' as const }
6891
+ ? resolveBasicColumnVerticalAlign(
6892
+ settings[\`\${col.textPrefix}VerticalAlign\` as ListColumnVerticalAlignKey],
6893
+ )
6843
6894
  : resolveColumnVerticalAlign(
6844
6895
  settings[\`\${col.textPrefix}VerticalAlign\` as ListColumnVerticalAlignKey],
6845
6896
  settings,
6846
6897
  columnLetter,
6847
6898
  );
6848
6899
 
6900
+ const columnPaddingBottomOverlay = isVerticalLayout
6901
+ && hasColumnText
6902
+ && showControls;
6903
+
6849
6904
  return (
6850
6905
  <div
6851
6906
  key={col.key}
6907
+ className={isVerticalLayout ? \`\${P}-list-col-wrap\` : undefined}
6852
6908
  {...(isVerticalLayout
6853
6909
  ? {}
6854
6910
  : {
@@ -6865,6 +6921,9 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
6865
6921
  style={{
6866
6922
  ...columnPaddingStyle,
6867
6923
  ...columnSizeStyle,
6924
+ ...(isVerticalLayout
6925
+ ? { justifyContent: cutVerticalAlignKindToFlexAlign(vAlign.kind) }
6926
+ : {}),
6868
6927
  }}
6869
6928
  data-test={col.width}
6870
6929
  >
@@ -6886,35 +6945,84 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
6886
6945
  </div>
6887
6946
  {showColumnPaddingBottom && (
6888
6947
  <div
6889
- {...(showControls ? {
6890
- 'data-controls': col.paddingBottomKey,
6891
- 'data-controls-axis': 'y',
6892
- 'data-controls-min': '0',
6893
- } : {})}
6894
6948
  className={\`\${P}-row-padding-handle\`}
6895
6949
  style={{ height: scaled(columnPaddingBottom) }}
6896
6950
  />
6897
6951
  )}
6952
+ {columnPaddingBottomOverlay && (
6953
+ <div style={{ position: 'absolute', inset: 0, pointerEvents: 'none', zIndex: 2 }}>
6954
+ <div
6955
+ data-controls={col.paddingBottomKey}
6956
+ data-controls-axis="y"
6957
+ data-controls-variant="column-padding"
6958
+ data-controls-min="0"
6959
+ className={\`\${P}-padding-control-handle\`}
6960
+ style={{
6961
+ position: 'absolute',
6962
+ bottom: 0,
6963
+ left: 0,
6964
+ width: '100%',
6965
+ height: scaled(Math.max(columnPaddingBottom, ROW_PADDING_HANDLE_HEIGHT)),
6966
+ pointerEvents: 'auto',
6967
+ }}
6968
+ />
6969
+ </div>
6970
+ )}
6898
6971
  </div>
6899
6972
  );
6900
6973
  })}
6901
6974
  </div>
6902
- {!isVerticalLayout && (resolvedRowPaddingBottom > 0 || showControls) && (
6975
+ {!isVerticalLayout && resolvedRowPaddingBottom > 0 && (
6903
6976
  <div
6904
- {...(showControls ? {
6905
- 'data-controls': 'rowPaddingBottom',
6906
- 'data-controls-axis': 'y',
6907
- 'data-controls-variant': 'row-padding',
6908
- 'data-controls-min': '0',
6909
- } : {})}
6910
6977
  className={\`\${P}-row-padding-handle\`}
6911
6978
  style={{ height: scaled(resolvedRowPaddingBottom) }}
6912
6979
  />
6913
6980
  )}
6981
+ {showControls && (
6982
+ <div style={{ position: 'absolute', inset: 0, pointerEvents: 'none', zIndex: 2 }}>
6983
+ <div
6984
+ data-controls={rowPaddingTopControlKey}
6985
+ data-controls-axis="y"
6986
+ data-controls-variant="row-padding"
6987
+ data-controls-min="0"
6988
+ className={\`\${P}-padding-control-handle\`}
6989
+ style={{
6990
+ position: 'absolute',
6991
+ top: 0,
6992
+ left: 0,
6993
+ width: '100%',
6994
+ height: scaled(Math.max(resolvedRowPaddingTop, ROW_PADDING_HANDLE_HEIGHT)),
6995
+ pointerEvents: 'auto',
6996
+ }}
6997
+ />
6998
+ {!isVerticalLayout && (
6999
+ <div
7000
+ data-controls="rowPaddingBottom"
7001
+ data-controls-axis="y"
7002
+ data-controls-variant="row-padding"
7003
+ data-controls-min="0"
7004
+ className={\`\${P}-padding-control-handle\`}
7005
+ style={{
7006
+ position: 'absolute',
7007
+ bottom: 0,
7008
+ left: 0,
7009
+ width: '100%',
7010
+ height: scaled(Math.max(resolvedRowPaddingBottom, ROW_PADDING_HANDLE_HEIGHT)),
7011
+ pointerEvents: 'auto',
7012
+ }}
7013
+ />
7014
+ )}
7015
+ </div>
7016
+ )}
6914
7017
  </RowElement>
6915
7018
  );
6916
7019
  })}
6917
- {showCutLabel && (
7020
+ {showCutLabel && (() => {
7021
+ const cutLabelFields = resolveListColumnTextFields(settings, CUT_LABEL_TEXT_PREFIX);
7022
+ const cutLabelVerticalAlignKind = resolveCutLabelVerticalAlignKind(settings.cutLabelVerticalAlign);
7023
+ const cutLabelUsesFullWidth = cutLabelFields.textTextAlign === 'justify' || isVerticalLayout;
7024
+
7025
+ return (
6918
7026
  <button
6919
7027
  type="button"
6920
7028
  className={\`\${P}-cut-item\`}
@@ -6927,17 +7035,20 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
6927
7035
  ),
6928
7036
  }}
6929
7037
  onClick={handleShowMore}
7038
+ onMouseEnter={showHoverImage ? handleCutItemMouseEnter : undefined}
6930
7039
  >
6931
7040
  <div
6932
7041
  className={\`\${P}-list-cols-row\`}
6933
- style={
6934
- isVerticalLayout
7042
+ style={{
7043
+ ...(isVerticalLayout
6935
7044
  ? {
6936
7045
  paddingLeft: scaled(effectiveTextPaddingLR),
6937
7046
  paddingRight: scaled(effectiveTextPaddingLR),
6938
7047
  }
6939
- : { justifyContent: 'center' }
6940
- }
7048
+ : {}),
7049
+ justifyContent: textAlignToJustifyContent(cutLabelFields.textTextAlign),
7050
+ alignItems: cutVerticalAlignKindToFlexAlign(cutLabelVerticalAlignKind),
7051
+ }}
6941
7052
  >
6942
7053
  <span
6943
7054
  className={getListColumnTitleClassName(
@@ -6947,15 +7058,17 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
6947
7058
  \`\${P}-text-tight-leading\`,
6948
7059
  )}
6949
7060
  style={{
6950
- ...listColumnTextFieldsToCss(resolveListColumnTextFields(settings, CUT_LABEL_TEXT_PREFIX), isEditor),
7061
+ ...listColumnTextFieldsToCss(cutLabelFields, isEditor),
6951
7062
  ...getListColumnTitleVars(settings, CUT_LABEL_TEXT_PREFIX, P, isEditor),
7063
+ ...(cutLabelUsesFullWidth ? { width: '100%' } : {}),
6952
7064
  }}
6953
7065
  >
6954
7066
  {cutLabel}
6955
7067
  </span>
6956
7068
  </div>
6957
7069
  </button>
6958
- )}
7070
+ );
7071
+ })()}
6959
7072
  </div>
6960
7073
  {showControls && !isVerticalLayout && firstColumn && lastColumn && (
6961
7074
  <div key="column-edge-padding-handles" style={{ position: 'absolute', inset: 0, pointerEvents: 'none' }}>
@@ -7142,4 +7255,4 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
7142
7255
  </>
7143
7256
  );
7144
7257
  }
7145
- `,Ot=["A","B","C","D","E"],zi=[...Zc,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Mt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Ld(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Nn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Ed(){return Object.fromEntries(Ot.map((e,t)=>{const n=Pt[t],o=`${e} column`;return[n,Ld(o)]}))}function _d(){const e={};for(const t of Ot)e[`${t}ColumnWidth`]=Nn(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Nn(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Nn(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Nn(`${t} column padding bottom`);return e}function ji(e={}){const t={columns:5,wrapperWidth:1,columnsOrder:[...Pt]};for(const n of Ot)t[`${n}ColumnWidth`]=.2,t[`${n}ColumnPaddingLeft`]=0,t[`${n}ColumnPaddingRight`]=0,t[`${n}ColumnPaddingBottom`]=0;return{...t,...e}}function Pd(e){const t={};if(e!==vt){const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"Vertical align",display:{type:"drop-down",enum:[...zi],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...zi]}}return t[we(e,"textFontFamily")]={type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},t[we(e,"textFontSettings")]={...Mt.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},t[we(e,"textFontSize")]={...Mt.fontSize,scope:"layout",title:"Font Size",display:{type:"font-size"}},t[we(e,"textLineHeight")]={...Mt.lineHeight,scope:"layout",title:"Line Height",display:{type:"line-height-input"}},t[we(e,"textLetterSpacing")]={...Mt.letterSpacing,scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},t[we(e,"textWordSpacing")]={...Mt.wordSpacing,scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},t[we(e,"textTextAppearance")]={...Mt.textAppearance,scope:"layout",title:"Text Appearance",display:{type:"text-appearance"}},t}const Ad=Pn.reduce((e,t)=>({...e,...Pd(t)}),{}),Rd=Pn.reduce((e,t)=>({...e,...t!==vt?{[`${t}VerticalAlign`]:"Top"}:{},[we(t,"textFontFamily")]:"Arial",[we(t,"textFontSettings")]:{fontWeight:400,fontStyle:"normal"},[we(t,"textLetterSpacing")]:0,[we(t,"textWordSpacing")]:0,[we(t,"textTextAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ki(e){const{textFontSize:t,textLineHeight:n}=e;return Pn.reduce((o,i)=>(t!==void 0&&(o[`${i}TextFontSize`]=t),n!==void 0&&(o[`${i}TextLineHeight`]=n),o),{})}const Wd={AColumn:"A column",BColumn:"B column",CColumn:"C column",DColumn:"D column",EColumn:"E column",cutLabel:"See all"},Id=Pn.map(e=>({type:"group",title:Wd[e],items:[we(e,"textFontFamily"),we(e,"textFontSettings"),{type:"row",items:[we(e,"textFontSize"),we(e,"textLineHeight"),we(e,"textLetterSpacing"),we(e,"textWordSpacing")]},we(e,"textTextAppearance"),...e!==vt?[`${e}VerticalAlign`]:[]]}));function Mr(e){return[we(e,"textFontFamily"),we(e,"textFontSettings"),we(e,"textFontSize"),we(e,"textLineHeight"),we(e,"textLetterSpacing"),we(e,"textWordSpacing"),we(e,"textTextAppearance"),...e!==vt?[`${e}VerticalAlign`]:[]]}function kd(){const e=[];return ti.forEach((t,n)=>{const o=Pt[n],i=Mr(t);for(let s=1;s<Pt.length;s+=1){const r=[{name:"columns",value:s},...Array.from({length:s},(a,c)=>({name:`columnsOrder.${c}`,value:o,isNotEqual:!0}))];i.forEach(a=>{e.push({if:r,then:{name:`properties.${a}.display.visible`,value:!1}})})}}),e}const Fd=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"],Md=["cutLabel","cutCellMinHeight","showCut"],Hd=Mr(vt),Nd=[...Md,...Hd],Bd=[...Ot.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"];function So(e,t){const n=e?` ${e}`:"";return{AColumn:`AColumn${n}`,BColumnWidth:`BColumnWidth${n}`,CColumnWidth:`CColumnWidth${n}`,DColumnWidth:`DColumnWidth${n}`,EColumnWidth:`EColumnWidth${n}`,image:t,link:""}}const Od=[So("",{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"}),So("2",{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"}),So("3",{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"})],Vd=[...Ot.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Dd={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Ed(),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:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:Od},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["On","Off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["Top","Bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Cut",display:{type:"toggle-numeric-input",enum:["Off","On"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Entry Hover Effect",display:{type:"toggle-cycle",enum:["None","Default","Blinds"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["All","Custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},..._d(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},textFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},textFontSettings:{...Mt.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},...Ad,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"Off",entryHoverEffect:"None",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#767676",textHoverColor:"#767676",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...Rd,backgroundColor:"#FFFFFF00",dividerColor:"#767676",backgroundHoverColor:"#FFFFFF00",dividerHoverColor:"#767676"},layoutDefaults:{m:ji({type:"B",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.002,cut:0,showCut:0,cutCellMinHeight:.043,rowPaddingTop:.01,rowPaddingBottom:.01,rowPaddingTopB:.01,textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},textFontSize:.043,textLineHeight:.043,...Ki({textFontSize:.043,textLineHeight:.043})}),d:ji({type:"A",textPaddingLR:.01,entriesCount:0,cellMinHeight:.03,imageSize:{min:80,max:320},dividerWidth:6e-4,cut:0,showCut:0,cutCellMinHeight:.03,rowPaddingTop:.01,rowPaddingBottom:.01,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},textFontSize:.01,textLineHeight:.01,...Ki({textFontSize:.01,textLineHeight:.01})})},displayRules:[...kd(),...Nd.map(e=>({if:{name:"cut",value:0},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"A"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Bd.map(e=>({if:{name:"type",value:"B"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"A"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...Ot.map(e=>({if:{name:"type",value:"A"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}})),...Ot.map(e=>({if:{name:"type",value:"B"},then:{name:`properties.${e}ColumnVerticalAlign.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Vd]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"",items:["entryHoverEffect"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]},{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["columnsOrder"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"All text",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]},...Id]}],paletteBookmark:{items:[...Fd],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},zd={element:$d,id:"list",name:"Default List",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png "},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Dd,sourceCode:Td},jd=[Qs,al,Gl,oc,mc,$c,Pc,Fc,Uc,zd];exports.components=jd;exports.isSchemaV1=jr;
7258
+ `,un=["A","B","C","D","E"],Ki=[...No,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Vt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Lu(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Dn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Eu(){return Object.fromEntries(un.map((e,t)=>{const n=Wt[t],o=`${e} column`;return[n,Lu(o)]}))}function _u(){const e={};for(const t of un)e[`${t}ColumnWidth`]=Dn(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Dn(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Dn(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Dn(`${t} column padding bottom`);return e}function qi(e={}){const t={columns:5,wrapperWidth:1,columnsOrder:[...Wt]};for(const n of un)t[`${n}ColumnWidth`]=.2,t[`${n}ColumnPaddingLeft`]=0,t[`${n}ColumnPaddingRight`]=0,t[`${n}ColumnPaddingBottom`]=0;return{...t,...e}}function Pu(e){const t={};if(e===Ct)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...No],useTabDesign:!0},enum:[...No]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Ki],filterBaselineByTopAnchor:!0,columnLetter:n,useTabDesign:!0},enum:[...Ki]}}return t[$e(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[$e(e,"textFontSettings")]={...Vt.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[$e(e,"textFontSize")]={...Vt.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[$e(e,"textLineHeight")]={...Vt.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[$e(e,"textLetterSpacing")]={...Vt.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[$e(e,"textWordSpacing")]={...Vt.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[$e(e,"textTextAlign")]={...Vt.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[$e(e,"textTextAppearance")]={...Vt.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Au=ho.reduce((e,t)=>({...e,...Pu(t)}),{}),Ru=ho.reduce((e,t)=>({...e,[`${t}VerticalAlign`]:t===Ct?"Center":"Top",[$e(t,"textFontFamily")]:"Arial",[$e(t,"textFontSettings")]:{fontWeight:400,fontStyle:"normal"},[$e(t,"textLetterSpacing")]:0,[$e(t,"textWordSpacing")]:0,[$e(t,"textTextAlign")]:t===Ct?"center":"left",[$e(t,"textTextAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ui(e){const{textFontSize:t,textLineHeight:n,textTextAlign:o}=e;return ho.reduce((i,s)=>(t!==void 0&&(i[`${s}TextFontSize`]=t),n!==void 0&&(i[`${s}TextLineHeight`]=n),o!==void 0&&(i[$e(s,"textTextAlign")]=o),i),{})}const Iu=lu();function Hr(e){return[$e(e,"textFontFamily"),$e(e,"textFontSettings"),$e(e,"textFontSize"),$e(e,"textLineHeight"),$e(e,"textLetterSpacing"),$e(e,"textWordSpacing"),$e(e,"textTextAlign"),$e(e,"textTextAppearance"),`${e}VerticalAlign`]}function Wu(){const e=[];return ai.forEach((t,n)=>{const o=Wt[n],i=Hr(t);for(let s=1;s<Wt.length;s+=1){const r=[{name:"columns",value:s},...Array.from({length:s},(a,c)=>({name:`columnsOrder.${c}`,value:o,isNotEqual:!0}))];i.forEach(a=>{e.push({if:r,then:{name:`properties.${a}.display.visible`,value:!1}})})}}),e}const ku=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"],Fu=["cutLabel","cutCellMinHeight","showCut"],Mu=Hr(Ct),Nu=[...Fu,...Mu],Hu=[...un.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"];function Eo(e,t){const n=e?` ${e}`:"";return{AColumn:`AColumn${n}`,BColumnWidth:`BColumnWidth${n}`,CColumnWidth:`CColumnWidth${n}`,DColumnWidth:`DColumnWidth${n}`,EColumnWidth:`EColumnWidth${n}`,image:t,link:""}}const Bu=[Eo("",{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"}),Eo("2",{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"}),Eo("3",{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"})],Ou=[...un.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Vu={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Eu(),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:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:Bu},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["On","Off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["Top","Bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Cut",display:{type:"toggle-numeric-input",enum:["Off","On"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Entry Hover Effect",display:{type:"toggle-cycle",enum:["None","Default","Blinds"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["All","Custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},..._u(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},...Au,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"Off",entryHoverEffect:"None",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#767676",textHoverColor:"#767676",...Ru,backgroundColor:"#FFFFFF00",dividerColor:"#767676",backgroundHoverColor:"#FFFFFF00",dividerHoverColor:"#767676"},layoutDefaults:{m:qi({type:"B",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.002,cut:0,showCut:0,cutCellMinHeight:.043,rowPaddingTop:.01,rowPaddingBottom:.01,rowPaddingTopB:.01,textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...Ui({textFontSize:.043,textLineHeight:.043,textTextAlign:"center"})}),d:qi({type:"A",textPaddingLR:.01,entriesCount:0,cellMinHeight:.03,imageSize:{min:80,max:320},dividerWidth:6e-4,cut:0,showCut:0,cutCellMinHeight:.03,rowPaddingTop:.01,rowPaddingBottom:.01,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...Ui({textFontSize:.01,textLineHeight:.01})})},displayRules:[...Wu(),...Nu.map(e=>({if:{name:"cut",value:0},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"A"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Hu.map(e=>({if:{name:"type",value:"B"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"A"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...un.map(e=>({if:{name:"type",value:"A"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Ou]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"",items:["entryHoverEffect"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]},{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["columnsOrder"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Iu]}],paletteBookmark:{items:[...ku],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Du={element:$u,id:"list",name:"Default List",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png "},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Vu,sourceCode:Tu},zu=[Zs,il,ql,tc,dc,Sc,Ec,Wc,zc,Du];exports.components=zu;exports.isSchemaV1=Dr;