@cntrl-site/components 1.0.19-0 → 1.0.19-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +131 -28
  2. package/dist/index.mjs +3381 -3250
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),d=require("react"),Ee=require("classnames"),y=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),_o=require("react-dom");function wa(e){return e.type==="object"&&e.version===1}const Ta="ControlSlider-module__wrapper___sHEkd",La="ControlSlider-module__hoverArrow___A-dOH",Pa="ControlSlider-module__sliderItem___QQSkR",Ea="ControlSlider-module__sliderImage___9hRl-",_a="ControlSlider-module__arrow___05ghY",Aa="ControlSlider-module__arrowVertical___tBfVN",Ma="ControlSlider-module__nextArrow___-30Yc",Ia="ControlSlider-module__arrowInner___aEra3",ka="ControlSlider-module__arrowIcon___S4ztF",Ra="ControlSlider-module__arrowImg___2dwJW",Fa="ControlSlider-module__mirror___brd6U",Wa="ControlSlider-module__pagination___bicLF",Ha="ControlSlider-module__paginationInner___bT-P-",Na="ControlSlider-module__paginationVertical___zYqKw",Ba="ControlSlider-module__paginationItem___nTRbk",Oa="ControlSlider-module__dot___p1Qun",Va="ControlSlider-module__activeDot___LHFaj",Da="ControlSlider-module__paginationInsideBottom___R3FWn",za="ControlSlider-module__paginationInsideTop___V-qb-",ja="ControlSlider-module__paginationOutsideBottom___14w8D",qa="ControlSlider-module__paginationOutsideTop___SCLqB",Ka="ControlSlider-module__paginationInsideLeft___yOBRZ",Ua="ControlSlider-module__paginationInsideRight___Rtt3o",Ga="ControlSlider-module__paginationOutsideLeft___lahaw",Ya="ControlSlider-module__paginationOutsideRight___EtuQa",Xa="ControlSlider-module__imgWrapper___UjEgB",Za="ControlSlider-module__captionBlock___dJ6-j",Qa="ControlSlider-module__captionTextWrapper___HFlpf",Ja="ControlSlider-module__captionText___uGBVc",es="ControlSlider-module__active___WZK4G",ts="ControlSlider-module__withPointerEvents___t-18M",ns="ControlSlider-module__topLeftAlignment___zjnGM",rs="ControlSlider-module__topCenterAlignment___gD1xW",is="ControlSlider-module__topRightAlignment___NMapS",os="ControlSlider-module__middleLeftAlignment___OnUrY",as="ControlSlider-module__middleCenterAlignment___Tdkl0",ss="ControlSlider-module__middleRightAlignment___wEbfX",ls="ControlSlider-module__bottomLeftAlignment___cTP2-",cs="ControlSlider-module__bottomCenterAlignment___c54fB",ds="ControlSlider-module__bottomRightAlignment___kEwrz",us="ControlSlider-module__clickOverlay___DZA28",ps="ControlSlider-module__contain___pLyq7",ms="ControlSlider-module__cover___KdDat",ue={wrapper:Ta,hoverArrow:La,sliderItem:Pa,sliderImage:Ea,arrow:_a,arrowVertical:Aa,nextArrow:Ma,arrowInner:Ia,arrowIcon:ka,arrowImg:Ra,mirror:Fa,pagination:Wa,paginationInner:Ha,paginationVertical:Na,paginationItem:Ba,dot:Oa,activeDot:Va,paginationInsideBottom:Da,paginationInsideTop:za,paginationOutsideBottom:ja,paginationOutsideTop:qa,paginationInsideLeft:Ka,paginationInsideRight:Ua,paginationOutsideLeft:Ga,paginationOutsideRight:Ya,imgWrapper:Xa,captionBlock:Za,captionTextWrapper:Qa,captionText:Ja,active:es,withPointerEvents:ts,topLeftAlignment:ns,topCenterAlignment:rs,topRightAlignment:is,middleLeftAlignment:os,middleCenterAlignment:as,middleRightAlignment:ss,bottomLeftAlignment:ls,bottomCenterAlignment:cs,bottomRightAlignment:ds,clickOverlay:us,contain:ps,cover:ms};function gs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hs(e,t,n){return t&&gs(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Wi="(prefers-reduced-motion: reduce)",gn=1,fs=2,yn=3,wn=4,zn=5,lr=6,hr=7,ys={CREATED:gn,MOUNTED:fs,IDLE:yn,MOVING:wn,SCROLLING:zn,DRAGGING:lr,DESTROYED:hr};function Bt(e){e.length=0}function Xt(e,t,n){return Array.prototype.slice.call(e,t,n)}function He(e){return e.bind.apply(e,[null].concat(Xt(arguments,1)))}var Ao=setTimeout,Xr=function(){};function Hi(e){return requestAnimationFrame(e)}function Cr(e,t){return typeof t===e}function kn(e){return!si(e)&&Cr("object",e)}var ai=Array.isArray,Mo=He(Cr,"function"),Ut=He(Cr,"string"),jn=He(Cr,"undefined");function si(e){return e===null}function Io(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function qn(e){return ai(e)?e:[e]}function bt(e,t){qn(e).forEach(t)}function li(e,t){return e.indexOf(t)>-1}function cr(e,t){return e.push.apply(e,qn(t)),e}function Rt(e,t,n){e&&bt(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function Tt(e,t){Rt(e,Ut(t)?t.split(" "):t,!0)}function Kn(e,t){bt(t,e.appendChild.bind(e))}function ci(e,t){bt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function Rn(e,t){return Io(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ko(e,t){var n=e?Xt(e.children):[];return t?n.filter(function(r){return Rn(r,t)}):n}function Un(e,t){return t?ko(e,t)[0]:e.firstElementChild}var Fn=Object.keys;function nn(e,t,n){return e&&(n?Fn(e).reverse():Fn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function Wn(e){return Xt(arguments,1).forEach(function(t){nn(t,function(n,r){e[r]=t[r]})}),e}function Kt(e){return Xt(arguments,1).forEach(function(t){nn(t,function(n,r){ai(n)?e[r]=n.slice():kn(n)?e[r]=Kt({},kn(e[r])?e[r]:{},n):e[r]=n})}),e}function Ni(e,t){bt(t||Fn(e),function(n){delete e[n]})}function Lt(e,t){bt(e,function(n){bt(t,function(r){n&&n.removeAttribute(r)})})}function Ce(e,t,n){kn(t)?nn(t,function(r,o){Ce(e,o,r)}):bt(e,function(r){si(n)||n===""?Lt(r,t):r.setAttribute(t,String(n))})}function hn(e,t,n){var r=document.createElement(e);return t&&(Ut(t)?Tt(r,t):Ce(r,t)),n&&Kn(n,r),r}function $t(e,t,n){if(jn(n))return getComputedStyle(e)[t];si(n)||(e.style[t]=""+n)}function Hn(e,t){$t(e,"display",t)}function Ro(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function St(e,t){return e.getAttribute(t)}function Bi(e,t){return e&&e.classList.contains(t)}function ht(e){return e.getBoundingClientRect()}function rn(e){bt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Fo(e){return Un(new DOMParser().parseFromString(e,"text/html").body)}function kt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Wo(e,t){return e&&e.querySelector(t)}function di(e,t){return t?Xt(e.querySelectorAll(t)):[]}function Ft(e,t){Rt(e,t,!1)}function Zr(e){return e.timeStamp}function Jt(e){return Ut(e)?e:e?e+"px":""}var Gn="splide",ui="data-"+Gn;function _n(e,t){if(!e)throw new Error("["+Gn+"] "+(t||""))}var Gt=Math.min,fr=Math.max,yr=Math.floor,Nn=Math.ceil,it=Math.abs;function Ho(e,t,n){return it(e-t)<n}function dr(e,t,n,r){var o=Gt(t,n),l=fr(t,n);return r?o<e&&e<l:o<=e&&e<=l}function un(e,t,n){var r=Gt(t,n),o=fr(t,n);return Gt(fr(r,e),o)}function Qr(e){return+(e>0)-+(e<0)}function Jr(e,t){return bt(t,function(n){e=e.replace("%s",""+n)}),e}function pi(e){return e<10?"0"+e:""+e}var Oi={};function vs(e){return""+e+pi(Oi[e]=(Oi[e]||0)+1)}function No(){var e=[];function t(i,c,s,p){o(i,c,function(u,T,v){var f="addEventListener"in u,m=f?u.removeEventListener.bind(u,T,s,p):u.removeListener.bind(u,s);f?u.addEventListener(T,s,p):u.addListener(s),e.push([u,T,v,s,m])})}function n(i,c,s){o(i,c,function(p,u,T){e=e.filter(function(v){return v[0]===p&&v[1]===u&&v[2]===T&&(!s||v[3]===s)?(v[4](),!1):!0})})}function r(i,c,s){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(c,{bubbles:u,detail:s}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(c,u,!1,s)),i.dispatchEvent(p),p}function o(i,c,s){bt(i,function(p){p&&bt(c,function(u){u.split(" ").forEach(function(T){var v=T.split(".");s(p,v[0],v[1])})})})}function l(){e.forEach(function(i){i[4]()}),Bt(e)}return{bind:t,unbind:n,dispatch:r,destroy:l}}var Zt="mounted",ei="ready",Ot="move",Tn="moved",mi="click",Bo="active",Oo="inactive",Vo="visible",Do="hidden",je="refresh",nt="updated",vn="resize",$r="resized",zo="drag",jo="dragging",qo="dragged",Sr="scroll",an="scrolled",bs="overflow",gi="destroy",Ko="arrows:mounted",Uo="arrows:updated",Go="pagination:mounted",Yo="pagination:updated",hi="navigation:mounted",fi="autoplay:play",Xo="autoplay:playing",yi="autoplay:pause",vi="lazyload:loaded",Zo="sk",Qo="sh",vr="ei";function Oe(e){var t=e?e.event.bus:document.createDocumentFragment(),n=No();function r(l,i){n.bind(t,qn(l).join(" "),function(c){i.apply(i,ai(c.detail)?c.detail:[])})}function o(l){n.dispatch(t,l,Xt(arguments,1))}return e&&e.event.on(gi,n.destroy),Wn(n,{bus:t,on:r,off:He(n.unbind,t),emit:o})}function wr(e,t,n,r){var o=Date.now,l,i=0,c,s=!0,p=0;function u(){if(!s){if(i=e?Gt((o()-l)/e,1):1,n&&n(i),i>=1&&(t(),l=o(),r&&++p>=r))return v();c=Hi(u)}}function T(S){S||m(),l=o()-(S?i*e:0),s=!1,c=Hi(u)}function v(){s=!0}function f(){l=o(),i=0,n&&n(i)}function m(){c&&cancelAnimationFrame(c),i=0,c=0,s=!0}function g(S){e=S}function C(){return s}return{start:T,rewind:f,pause:v,cancel:m,set:g,isPaused:C}}function xs(e){var t=e;function n(o){t=o}function r(o){return li(qn(o),t)}return{set:n,is:r}}function Cs(e,t){var n=wr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function $s(e,t,n){var r=e.state,o=n.breakpoints||{},l=n.reducedMotion||{},i=No(),c=[];function s(){var m=n.mediaQuery==="min";Fn(o).sort(function(g,C){return m?+g-+C:+C-+g}).forEach(function(g){u(o[g],"("+(m?"min":"max")+"-width:"+g+"px)")}),u(l,Wi),T()}function p(m){m&&i.destroy()}function u(m,g){var C=matchMedia(g);i.bind(C,"change",T),c.push([m,C])}function T(){var m=r.is(hr),g=n.direction,C=c.reduce(function(S,$){return Kt(S,$[1].matches?$[0]:{})},{});Ni(n),f(C),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):g!==n.direction&&e.refresh()}function v(m){matchMedia(Wi).matches&&(m?Kt(n,l):Ni(n,Fn(l)))}function f(m,g,C){Kt(n,m),g&&Kt(Object.getPrototypeOf(n),m),(C||!r.is(gn))&&e.emit(nt,n)}return{setup:s,destroy:p,reduce:v,set:f}}var Tr="Arrow",Lr=Tr+"Left",Pr=Tr+"Right",Jo=Tr+"Up",ea=Tr+"Down",Vi="rtl",Er="ttb",Hr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Jo,Pr],ArrowRight:[ea,Lr]};function Ss(e,t,n){function r(l,i,c){c=c||n.direction;var s=c===Vi&&!i?1:c===Er?0:-1;return Hr[l]&&Hr[l][s]||l.replace(/width|left|right/i,function(p,u){var T=Hr[p.toLowerCase()][s]||p;return u>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function o(l){return l*(n.direction===Vi?1:-1)}return{resolve:r,orient:o}}var Wt="role",fn="tabindex",ws="disabled",wt="aria-",Yn=wt+"controls",ta=wt+"current",Di=wt+"selected",ft=wt+"label",bi=wt+"labelledby",na=wt+"hidden",xi=wt+"orientation",Bn=wt+"roledescription",zi=wt+"live",ji=wt+"busy",qi=wt+"atomic",Ci=[Wt,fn,ws,Yn,ta,ft,bi,na,xi,Bn],Pt=Gn+"__",Qt="is-",Nr=Gn,Ki=Pt+"track",Ts=Pt+"list",_r=Pt+"slide",ra=_r+"--clone",Ls=_r+"__container",$i=Pt+"arrows",Ar=Pt+"arrow",ia=Ar+"--prev",oa=Ar+"--next",Mr=Pt+"pagination",aa=Mr+"__page",Ps=Pt+"progress",Es=Ps+"__bar",_s=Pt+"toggle",As=Pt+"spinner",Ms=Pt+"sr",Is=Qt+"initialized",on=Qt+"active",sa=Qt+"prev",la=Qt+"next",ti=Qt+"visible",ni=Qt+"loading",ca=Qt+"focus-in",da=Qt+"overflow",ks=[on,ti,sa,la,ni,ca,da],Rs={slide:_r,clone:ra,arrows:$i,arrow:Ar,prev:ia,next:oa,pagination:Mr,page:aa,spinner:As};function Fs(e,t){if(Mo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Rn(n,t);)n=n.parentElement;return n}var Ws=5,Ui=200,ua="touchstart mousedown",Br="touchmove mousemove",Or="touchend touchcancel mouseup click";function Hs(e,t,n){var r=Oe(e),o=r.on,l=r.bind,i=e.root,c=n.i18n,s={},p=[],u=[],T=[],v,f,m;function g(){b(),F(),$()}function C(){o(je,S),o(je,g),o(nt,$),l(document,ua+" keydown",function(w){m=w.type==="keydown"},{capture:!0}),l(i,"focusin",function(){Rt(i,ca,!!m)})}function S(w){var A=Ci.concat("style");Bt(p),Ft(i,u),Ft(v,T),Lt([v,f],A),Lt(i,w?A:["style",Bn])}function $(){Ft(i,u),Ft(v,T),u=N(Nr),T=N(Ki),Tt(i,u),Tt(v,T),Ce(i,ft,n.label),Ce(i,bi,n.labelledby)}function b(){v=L("."+Ki),f=Un(v,"."+Ts),_n(v&&f,"A track/list element is missing."),cr(p,ko(f,"."+_r+":not(."+ra+")")),nn({arrows:$i,pagination:Mr,prev:ia,next:oa,bar:Es,toggle:_s},function(w,A){s[A]=L("."+w)}),Wn(s,{root:i,track:v,list:f,slides:p})}function F(){var w=i.id||vs(Gn),A=n.role;i.id=w,v.id=v.id||w+"-track",f.id=f.id||w+"-list",!St(i,Wt)&&i.tagName!=="SECTION"&&A&&Ce(i,Wt,A),Ce(i,Bn,c.carousel),Ce(f,Wt,"presentation")}function L(w){var A=Wo(i,w);return A&&Fs(A,"."+Nr)===i?A:void 0}function N(w){return[w+"--"+n.type,w+"--"+n.direction,n.drag&&w+"--draggable",n.isNavigation&&w+"--nav",w===Nr&&on]}return Wn(s,{setup:g,mount:C,destroy:S})}var bn="slide",Ln="loop",Xn="fade";function Ns(e,t,n,r){var o=Oe(e),l=o.on,i=o.emit,c=o.bind,s=e.Components,p=e.root,u=e.options,T=u.isNavigation,v=u.updateOnMove,f=u.i18n,m=u.pagination,g=u.slideFocus,C=s.Direction.resolve,S=St(r,"style"),$=St(r,ft),b=n>-1,F=Un(r,"."+Ls),L;function N(){b||(r.id=p.id+"-slide"+pi(t+1),Ce(r,Wt,m?"tabpanel":"group"),Ce(r,Bn,f.slide),Ce(r,ft,$||Jr(f.slideLabel,[t+1,e.length]))),w()}function w(){c(r,"click",He(i,mi,H)),c(r,"keydown",He(i,Zo,H)),l([Tn,Qo,an],M),l(hi,D),v&&l(Ot,P)}function A(){L=!0,o.destroy(),Ft(r,ks),Lt(r,Ci),Ce(r,"style",S),Ce(r,ft,$||"")}function D(){var W=e.splides.map(function(_){var z=_.splide.Components.Slides.getAt(t);return z?z.slide.id:""}).join(" ");Ce(r,ft,Jr(f.slideX,(b?n:t)+1)),Ce(r,Yn,W),Ce(r,Wt,g?"button":""),g&&Lt(r,Bn)}function P(){L||M()}function M(){if(!L){var W=e.index;R(),B(),Rt(r,sa,t===W-1),Rt(r,la,t===W+1)}}function R(){var W=te();W!==Bi(r,on)&&(Rt(r,on,W),Ce(r,ta,T&&W||""),i(W?Bo:Oo,H))}function B(){var W=x(),_=!W&&(!te()||b);if(e.state.is([wn,zn])||Ce(r,na,_||""),Ce(di(r,u.focusableNodes||""),fn,_?-1:""),g&&Ce(r,fn,_?-1:0),W!==Bi(r,ti)&&(Rt(r,ti,W),i(W?Vo:Do,H)),!W&&document.activeElement===r){var z=s.Slides.getAt(e.index);z&&Ro(z.slide)}}function K(W,_,z){$t(z&&F||r,W,_)}function te(){var W=e.index;return W===t||u.cloneStatus&&W===n}function x(){if(e.is(Xn))return te();var W=ht(s.Elements.track),_=ht(r),z=C("left",!0),X=C("right",!0);return yr(W[z])<=Nn(_[z])&&yr(_[X])<=Nn(W[X])}function E(W,_){var z=it(W-t);return!b&&(u.rewind||e.is(Ln))&&(z=Gt(z,e.length-z)),z<=_}var H={index:t,slideIndex:n,slide:r,container:F,isClone:b,mount:N,destroy:A,update:M,style:K,isWithin:E};return H}function Bs(e,t,n){var r=Oe(e),o=r.on,l=r.emit,i=r.bind,c=t.Elements,s=c.slides,p=c.list,u=[];function T(){v(),o(je,f),o(je,v)}function v(){s.forEach(function(M,R){g(M,R,-1)})}function f(){L(function(M){M.destroy()}),Bt(u)}function m(){L(function(M){M.update()})}function g(M,R,B){var K=Ns(e,R,B,M);K.mount(),u.push(K),u.sort(function(te,x){return te.index-x.index})}function C(M){return M?N(function(R){return!R.isClone}):u}function S(M){var R=t.Controller,B=R.toIndex(M),K=R.hasFocus()?1:n.perPage;return N(function(te){return dr(te.index,B,B+K-1)})}function $(M){return N(M)[0]}function b(M,R){bt(M,function(B){if(Ut(B)&&(B=Fo(B)),Io(B)){var K=s[R];K?ci(B,K):Kn(p,B),Tt(B,n.classes.slide),A(B,He(l,vn))}}),l(je)}function F(M){rn(N(M).map(function(R){return R.slide})),l(je)}function L(M,R){C(R).forEach(M)}function N(M){return u.filter(Mo(M)?M:function(R){return Ut(M)?Rn(R.slide,M):li(qn(M),R.index)})}function w(M,R,B){L(function(K){K.style(M,R,B)})}function A(M,R){var B=di(M,"img"),K=B.length;K?B.forEach(function(te){i(te,"load error",function(){--K||R()})}):R()}function D(M){return M?s.length:u.length}function P(){return u.length>n.perPage}return{mount:T,destroy:f,update:m,register:g,get:C,getIn:S,getAt:$,add:b,remove:F,forEach:L,filter:N,style:w,getLength:D,isEnough:P}}function Os(e,t,n){var r=Oe(e),o=r.on,l=r.bind,i=r.emit,c=t.Slides,s=t.Direction.resolve,p=t.Elements,u=p.root,T=p.track,v=p.list,f=c.getAt,m=c.style,g,C,S;function $(){b(),l(window,"resize load",Cs(He(i,vn))),o([nt,je],b),o(vn,F)}function b(){g=n.direction===Er,$t(u,"maxWidth",Jt(n.width)),$t(T,s("paddingLeft"),L(!1)),$t(T,s("paddingRight"),L(!0)),F(!0)}function F(H){var W=ht(u);(H||C.width!==W.width||C.height!==W.height)&&($t(T,"height",N()),m(s("marginRight"),Jt(n.gap)),m("width",A()),m("height",D(),!0),C=W,i($r),S!==(S=E())&&(Rt(u,da,S),i(bs,S)))}function L(H){var W=n.padding,_=s(H?"right":"left");return W&&Jt(W[_]||(kn(W)?0:W))||"0px"}function N(){var H="";return g&&(H=w(),_n(H,"height or heightRatio is missing."),H="calc("+H+" - "+L(!1)+" - "+L(!0)+")"),H}function w(){return Jt(n.height||ht(v).width*n.heightRatio)}function A(){return n.autoWidth?null:Jt(n.fixedWidth)||(g?"":P())}function D(){return Jt(n.fixedHeight)||(g?n.autoHeight?null:P():w())}function P(){var H=Jt(n.gap);return"calc((100%"+(H&&" + "+H)+")/"+(n.perPage||1)+(H&&" - "+H)+")"}function M(){return ht(v)[s("width")]}function R(H,W){var _=f(H||0);return _?ht(_.slide)[s("width")]+(W?0:te()):0}function B(H,W){var _=f(H);if(_){var z=ht(_.slide)[s("right")],X=ht(v)[s("left")];return it(z-X)+(W?0:te())}return 0}function K(H){return B(e.length-1)-B(0)+R(0,H)}function te(){var H=f(0);return H&&parseFloat($t(H.slide,s("marginRight")))||0}function x(H){return parseFloat($t(T,s("padding"+(H?"Right":"Left"))))||0}function E(){return e.is(Xn)||K(!0)>M()}return{mount:$,resize:F,listSize:M,slideSize:R,sliderSize:K,totalSize:B,getPadding:x,isOverflow:E}}var Vs=2;function Ds(e,t,n){var r=Oe(e),o=r.on,l=t.Elements,i=t.Slides,c=t.Direction.resolve,s=[],p;function u(){o(je,T),o([nt,vn],f),(p=C())&&(m(p),t.Layout.resize(!0))}function T(){v(),u()}function v(){rn(s),Bt(s),r.destroy()}function f(){var S=C();p!==S&&(p<S||!S)&&r.emit(je)}function m(S){var $=i.get().slice(),b=$.length;if(b){for(;$.length<S;)cr($,$);cr($.slice(-S),$.slice(0,S)).forEach(function(F,L){var N=L<S,w=g(F.slide,L);N?ci(w,$[0].slide):Kn(l.list,w),cr(s,w),i.register(w,L-S+(N?0:b),F.index)})}}function g(S,$){var b=S.cloneNode(!0);return Tt(b,n.classes.clone),b.id=e.root.id+"-clone"+pi($+1),b}function C(){var S=n.clones;if(!e.is(Ln))S=0;else if(jn(S)){var $=n[c("fixedWidth")]&&t.Layout.slideSize(0),b=$&&Nn(ht(l.track)[c("width")]/$);S=b||n[c("autoWidth")]&&e.length||n.perPage*Vs}return S}return{mount:u,destroy:v}}function zs(e,t,n){var r=Oe(e),o=r.on,l=r.emit,i=e.state.set,c=t.Layout,s=c.slideSize,p=c.getPadding,u=c.totalSize,T=c.listSize,v=c.sliderSize,f=t.Direction,m=f.resolve,g=f.orient,C=t.Elements,S=C.list,$=C.track,b;function F(){b=t.Transition,o([Zt,$r,nt,je],L)}function L(){t.Controller.isBusy()||(t.Scroll.cancel(),w(e.index),t.Slides.update())}function N(_,z,X,Z){_!==z&&H(_>X)&&(M(),A(P(K(),_>X),!0)),i(wn),l(Ot,z,X,_),b.start(z,function(){i(yn),l(Tn,z,X,_),Z&&Z()})}function w(_){A(B(_,!0))}function A(_,z){if(!e.is(Xn)){var X=z?_:D(_);$t(S,"transform","translate"+m("X")+"("+X+"px)"),_!==X&&l(Qo)}}function D(_){if(e.is(Ln)){var z=R(_),X=z>t.Controller.getEnd(),Z=z<0;(Z||X)&&(_=P(_,X))}return _}function P(_,z){var X=_-E(z),Z=v();return _-=g(Z*(Nn(it(X)/Z)||1))*(z?1:-1),_}function M(){A(K(),!0),b.cancel()}function R(_){for(var z=t.Slides.get(),X=0,Z=1/0,k=0;k<z.length;k++){var J=z[k].index,h=it(B(J,!0)-_);if(h<=Z)Z=h,X=J;else break}return X}function B(_,z){var X=g(u(_-1)-x(_));return z?te(X):X}function K(){var _=m("left");return ht(S)[_]-ht($)[_]+g(p(!1))}function te(_){return n.trimSpace&&e.is(bn)&&(_=un(_,0,g(v(!0)-T()))),_}function x(_){var z=n.focus;return z==="center"?(T()-s(_,!0))/2:+z*s(_)||0}function E(_){return B(_?t.Controller.getEnd():0,!!n.trimSpace)}function H(_){var z=g(P(K(),_));return _?z>=0:z<=S[m("scrollWidth")]-ht($)[m("width")]}function W(_,z){z=jn(z)?K():z;var X=_!==!0&&g(z)<g(E(!1)),Z=_!==!1&&g(z)>g(E(!0));return X||Z}return{mount:F,move:N,jump:w,translate:A,shift:P,cancel:M,toIndex:R,toPosition:B,getPosition:K,getLimit:E,exceededLimit:W,reposition:L}}function js(e,t,n){var r=Oe(e),o=r.on,l=r.emit,i=t.Move,c=i.getPosition,s=i.getLimit,p=i.toPosition,u=t.Slides,T=u.isEnough,v=u.getLength,f=n.omitEnd,m=e.is(Ln),g=e.is(bn),C=He(K,!1),S=He(K,!0),$=n.start||0,b,F=$,L,N,w;function A(){D(),o([nt,je,vr],D),o($r,P)}function D(){L=v(!0),N=n.perMove,w=n.perPage,b=H();var h=un($,0,f?b:L-1);h!==$&&($=h,i.reposition())}function P(){b!==H()&&l(vr)}function M(h,ne,he){if(!J()){var ce=B(h),be=E(ce);be>-1&&(ne||be!==$)&&(X(be),i.move(ce,be,F,he))}}function R(h,ne,he,ce){t.Scroll.scroll(h,ne,he,function(){var be=E(i.toIndex(c()));X(f?Gt(be,b):be),ce&&ce()})}function B(h){var ne=$;if(Ut(h)){var he=h.match(/([+\-<>])(\d+)?/)||[],ce=he[1],be=he[2];ce==="+"||ce==="-"?ne=te($+ +(""+ce+(+be||1)),$):ce===">"?ne=be?W(+be):C(!0):ce==="<"&&(ne=S(!0))}else ne=m?h:un(h,0,b);return ne}function K(h,ne){var he=N||(k()?1:w),ce=te($+he*(h?-1:1),$,!(N||k()));return ce===-1&&g&&!Ho(c(),s(!h),1)?h?0:b:ne?ce:E(ce)}function te(h,ne,he){if(T()||k()){var ce=x(h);ce!==h&&(ne=h,h=ce,he=!1),h<0||h>b?!N&&(dr(0,h,ne,!0)||dr(b,ne,h,!0))?h=W(_(h)):m?h=he?h<0?-(L%w||w):L:h:n.rewind?h=h<0?b:0:h=-1:he&&h!==ne&&(h=W(_(ne)+(h<ne?-1:1)))}else h=-1;return h}function x(h){if(g&&n.trimSpace==="move"&&h!==$)for(var ne=c();ne===p(h,!0)&&dr(h,0,e.length-1,!n.rewind);)h<$?--h:++h;return h}function E(h){return m?(h+L)%L||0:h}function H(){for(var h=L-(k()||m&&N?1:w);f&&h-- >0;)if(p(L-1,!0)!==p(h,!0)){h++;break}return un(h,0,L-1)}function W(h){return un(k()?h:w*h,0,b)}function _(h){return k()?Gt(h,b):yr((h>=b?L-1:h)/w)}function z(h){var ne=i.toIndex(h);return g?un(ne,0,b):ne}function X(h){h!==$&&(F=$,$=h)}function Z(h){return h?F:$}function k(){return!jn(n.focus)||n.isNavigation}function J(){return e.state.is([wn,zn])&&!!n.waitForTransition}return{mount:A,go:M,scroll:R,getNext:C,getPrev:S,getAdjacent:K,getEnd:H,setIndex:X,getIndex:Z,toIndex:W,toPage:_,toDest:z,hasFocus:k,isBusy:J}}var qs="http://www.w3.org/2000/svg",Ks="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",tr=40;function Us(e,t,n){var r=Oe(e),o=r.on,l=r.bind,i=r.emit,c=n.classes,s=n.i18n,p=t.Elements,u=t.Controller,T=p.arrows,v=p.track,f=T,m=p.prev,g=p.next,C,S,$={};function b(){L(),o(nt,F)}function F(){N(),b()}function L(){var R=n.arrows;R&&!(m&&g)&&D(),m&&g&&(Wn($,{prev:m,next:g}),Hn(f,R?"":"none"),Tt(f,S=$i+"--"+n.direction),R&&(w(),M(),Ce([m,g],Yn,v.id),i(Ko,m,g)))}function N(){r.destroy(),Ft(f,S),C?(rn(T?[m,g]:f),m=g=null):Lt([m,g],Ci)}function w(){o([Zt,Tn,je,an,vr],M),l(g,"click",He(A,">")),l(m,"click",He(A,"<"))}function A(R){u.go(R,!0)}function D(){f=T||hn("div",c.arrows),m=P(!0),g=P(!1),C=!0,Kn(f,[m,g]),!T&&ci(f,v)}function P(R){var B='<button class="'+c.arrow+" "+(R?c.prev:c.next)+'" type="button"><svg xmlns="'+qs+'" viewBox="0 0 '+tr+" "+tr+'" width="'+tr+'" height="'+tr+'" focusable="false"><path d="'+(n.arrowPath||Ks)+'" />';return Fo(B)}function M(){if(m&&g){var R=e.index,B=u.getPrev(),K=u.getNext(),te=B>-1&&R<B?s.last:s.prev,x=K>-1&&R>K?s.first:s.next;m.disabled=B<0,g.disabled=K<0,Ce(m,ft,te),Ce(g,ft,x),i(Uo,m,g,B,K)}}return{arrows:$,mount:b,destroy:N,update:M}}var Gs=ui+"-interval";function Ys(e,t,n){var r=Oe(e),o=r.on,l=r.bind,i=r.emit,c=wr(n.interval,e.go.bind(e,">"),w),s=c.isPaused,p=t.Elements,u=t.Elements,T=u.root,v=u.toggle,f=n.autoplay,m,g,C=f==="pause";function S(){f&&($(),v&&Ce(v,Yn,p.track.id),C||b(),N())}function $(){n.pauseOnHover&&l(T,"mouseenter mouseleave",function(D){m=D.type==="mouseenter",L()}),n.pauseOnFocus&&l(T,"focusin focusout",function(D){g=D.type==="focusin",L()}),v&&l(v,"click",function(){C?b():F(!0)}),o([Ot,Sr,je],c.rewind),o(Ot,A)}function b(){s()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),g=m=C=!1,N(),i(fi))}function F(D){D===void 0&&(D=!0),C=!!D,N(),s()||(c.pause(),i(yi))}function L(){C||(m||g?F(!1):b())}function N(){v&&(Rt(v,on,!C),Ce(v,ft,n.i18n[C?"play":"pause"]))}function w(D){var P=p.bar;P&&$t(P,"width",D*100+"%"),i(Xo,D)}function A(D){var P=t.Slides.getAt(D);c.set(P&&+St(P.slide,Gs)||n.interval)}return{mount:S,destroy:c.cancel,play:b,pause:F,isPaused:s}}function Xs(e,t,n){var r=Oe(e),o=r.on;function l(){n.cover&&(o(vi,He(c,!0)),o([Zt,nt,je],He(i,!0)))}function i(s){t.Slides.forEach(function(p){var u=Un(p.container||p.slide,"img");u&&u.src&&c(s,u,p)})}function c(s,p,u){u.style("background",s?'center/cover no-repeat url("'+p.src+'")':"",!0),Hn(p,s?"none":"")}return{mount:l,destroy:He(i,!1)}}var Zs=10,Qs=600,Js=.6,el=1.5,tl=800;function nl(e,t,n){var r=Oe(e),o=r.on,l=r.emit,i=e.state.set,c=t.Move,s=c.getPosition,p=c.getLimit,u=c.exceededLimit,T=c.translate,v=e.is(bn),f,m,g=1;function C(){o(Ot,F),o([nt,je],L)}function S(w,A,D,P,M){var R=s();if(F(),D&&(!v||!u())){var B=t.Layout.sliderSize(),K=Qr(w)*B*yr(it(w)/B)||0;w=c.toPosition(t.Controller.toDest(w%B))+K}var te=Ho(R,w,1);g=1,A=te?0:A||fr(it(w-R)/el,tl),m=P,f=wr(A,$,He(b,R,w,M),1),i(zn),l(Sr),f.start()}function $(){i(yn),m&&m(),l(an)}function b(w,A,D,P){var M=s(),R=w+(A-w)*N(P),B=(R-M)*g;T(M+B),v&&!D&&u()&&(g*=Js,it(B)<Zs&&S(p(u(!0)),Qs,!1,m,!0))}function F(){f&&f.cancel()}function L(){f&&!f.isPaused()&&(F(),$())}function N(w){var A=n.easingFunc;return A?A(w):1-Math.pow(1-w,4)}return{mount:C,destroy:F,scroll:S,cancel:L}}var pn={passive:!1,capture:!0};function rl(e,t,n){var r=Oe(e),o=r.on,l=r.emit,i=r.bind,c=r.unbind,s=e.state,p=t.Move,u=t.Scroll,T=t.Controller,v=t.Elements.track,f=t.Media.reduce,m=t.Direction,g=m.resolve,C=m.orient,S=p.getPosition,$=p.exceededLimit,b,F,L,N,w,A=!1,D,P,M;function R(){i(v,Br,Xr,pn),i(v,Or,Xr,pn),i(v,ua,K,pn),i(v,"click",E,{capture:!0}),i(v,"dragstart",kt),o([Zt,nt],B)}function B(){var V=n.drag;de(!V),N=V==="free"}function K(V){if(D=!1,!P){var U=be(V);ce(V.target)&&(U||!V.button)&&(T.isBusy()?kt(V,!0):(M=U?v:window,w=s.is([wn,zn]),L=null,i(M,Br,te,pn),i(M,Or,x,pn),p.cancel(),u.cancel(),H(V)))}}function te(V){if(s.is(lr)||(s.set(lr),l(zo)),V.cancelable)if(w){p.translate(b+he(k(V)));var U=J(V)>Ui,G=A!==(A=$());(U||G)&&H(V),D=!0,l(jo),kt(V)}else z(V)&&(w=_(V),kt(V))}function x(V){s.is(lr)&&(s.set(yn),l(qo)),w&&(W(V),kt(V)),c(M,Br,te),c(M,Or,x),w=!1}function E(V){!P&&D&&kt(V,!0)}function H(V){L=F,F=V,b=S()}function W(V){var U=X(V),G=Z(U),se=n.rewind&&n.rewindByDrag;f(!1),N?T.scroll(G,0,n.snap):e.is(Xn)?T.go(C(Qr(U))<0?se?"<":"-":se?">":"+"):e.is(bn)&&A&&se?T.go($(!0)?">":"<"):T.go(T.toDest(G),!0),f(!0)}function _(V){var U=n.dragMinThreshold,G=kn(U),se=G&&U.mouse||0,ye=(G?U.touch:+U)||10;return it(k(V))>(be(V)?ye:se)}function z(V){return it(k(V))>it(k(V,!0))}function X(V){if(e.is(Ln)||!A){var U=J(V);if(U&&U<Ui)return k(V)/U}return 0}function Z(V){return S()+Qr(V)*Gt(it(V)*(n.flickPower||600),N?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function k(V,U){return ne(V,U)-ne(h(V),U)}function J(V){return Zr(V)-Zr(h(V))}function h(V){return F===V&&L||F}function ne(V,U){return(be(V)?V.changedTouches[0]:V)["page"+g(U?"Y":"X")]}function he(V){return V/(A&&e.is(bn)?Ws:1)}function ce(V){var U=n.noDrag;return!Rn(V,"."+aa+", ."+Ar)&&(!U||!Rn(V,U))}function be(V){return typeof TouchEvent<"u"&&V instanceof TouchEvent}function re(){return w}function de(V){P=V}return{mount:R,disable:de,isDragging:re}}var il={Spacebar:" ",Right:Pr,Left:Lr,Up:Jo,Down:ea};function Si(e){return e=Ut(e)?e:e.key,il[e]||e}var Gi="keydown";function ol(e,t,n){var r=Oe(e),o=r.on,l=r.bind,i=r.unbind,c=e.root,s=t.Direction.resolve,p,u;function T(){v(),o(nt,f),o(nt,v),o(Ot,g)}function v(){var S=n.keyboard;S&&(p=S==="global"?window:c,l(p,Gi,C))}function f(){i(p,Gi)}function m(S){u=S}function g(){var S=u;u=!0,Ao(function(){u=S})}function C(S){if(!u){var $=Si(S);$===s(Lr)?e.go("<"):$===s(Pr)&&e.go(">")}}return{mount:T,destroy:f,disable:m}}var An=ui+"-lazy",ur=An+"-srcset",al="["+An+"], ["+ur+"]";function sl(e,t,n){var r=Oe(e),o=r.on,l=r.off,i=r.bind,c=r.emit,s=n.lazyLoad==="sequential",p=[Tn,an],u=[];function T(){n.lazyLoad&&(v(),o(je,v))}function v(){Bt(u),f(),s?S():(l(p),o(p,m),m())}function f(){t.Slides.forEach(function($){di($.slide,al).forEach(function(b){var F=St(b,An),L=St(b,ur);if(F!==b.src||L!==b.srcset){var N=n.classes.spinner,w=b.parentElement,A=Un(w,"."+N)||hn("span",N,w);u.push([b,$,A]),b.src||Hn(b,"none")}})})}function m(){u=u.filter(function($){var b=n.perPage*((n.preloadPages||1)+1)-1;return $[1].isWithin(e.index,b)?g($):!0}),u.length||l(p)}function g($){var b=$[0];Tt($[1].slide,ni),i(b,"load error",He(C,$)),Ce(b,"src",St(b,An)),Ce(b,"srcset",St(b,ur)),Lt(b,An),Lt(b,ur)}function C($,b){var F=$[0],L=$[1];Ft(L.slide,ni),b.type!=="error"&&(rn($[2]),Hn(F,""),c(vi,F,L),c(vn)),s&&S()}function S(){u.length&&g(u.shift())}return{mount:T,destroy:He(Bt,u),check:m}}function ll(e,t,n){var r=Oe(e),o=r.on,l=r.emit,i=r.bind,c=t.Slides,s=t.Elements,p=t.Controller,u=p.hasFocus,T=p.getIndex,v=p.go,f=t.Direction.resolve,m=s.pagination,g=[],C,S;function $(){b(),o([nt,je,vr],$);var P=n.pagination;m&&Hn(m,P?"":"none"),P&&(o([Ot,Sr,an],D),F(),D(),l(Go,{list:C,items:g},A(e.index)))}function b(){C&&(rn(m?Xt(C.children):C),Ft(C,S),Bt(g),C=null),r.destroy()}function F(){var P=e.length,M=n.classes,R=n.i18n,B=n.perPage,K=u()?p.getEnd()+1:Nn(P/B);C=m||hn("ul",M.pagination,s.track.parentElement),Tt(C,S=Mr+"--"+w()),Ce(C,Wt,"tablist"),Ce(C,ft,R.select),Ce(C,xi,w()===Er?"vertical":"");for(var te=0;te<K;te++){var x=hn("li",null,C),E=hn("button",{class:M.page,type:"button"},x),H=c.getIn(te).map(function(_){return _.slide.id}),W=!u()&&B>1?R.pageX:R.slideX;i(E,"click",He(L,te)),n.paginationKeyboard&&i(E,"keydown",He(N,te)),Ce(x,Wt,"presentation"),Ce(E,Wt,"tab"),Ce(E,Yn,H.join(" ")),Ce(E,ft,Jr(W,te+1)),Ce(E,fn,-1),g.push({li:x,button:E,page:te})}}function L(P){v(">"+P,!0)}function N(P,M){var R=g.length,B=Si(M),K=w(),te=-1;B===f(Pr,!1,K)?te=++P%R:B===f(Lr,!1,K)?te=(--P+R)%R:B==="Home"?te=0:B==="End"&&(te=R-1);var x=g[te];x&&(Ro(x.button),v(">"+te),kt(M,!0))}function w(){return n.paginationDirection||n.direction}function A(P){return g[p.toPage(P)]}function D(){var P=A(T(!0)),M=A(T());if(P){var R=P.button;Ft(R,on),Lt(R,Di),Ce(R,fn,-1)}if(M){var B=M.button;Tt(B,on),Ce(B,Di,!0),Ce(B,fn,"")}l(Yo,{list:C,items:g},P,M)}return{items:g,mount:$,destroy:b,getAt:A,update:D}}var cl=[" ","Enter"];function dl(e,t,n){var r=n.isNavigation,o=n.slideFocus,l=[];function i(){e.splides.forEach(function(m){m.isParent||(p(e,m.splide),p(m.splide,e))}),r&&u()}function c(){l.forEach(function(m){m.destroy()}),Bt(l)}function s(){c(),i()}function p(m,g){var C=Oe(m);C.on(Ot,function(S,$,b){g.go(g.is(Ln)?b:S)}),l.push(C)}function u(){var m=Oe(e),g=m.on;g(mi,v),g(Zo,f),g([Zt,nt],T),l.push(m),m.emit(hi,e.splides)}function T(){Ce(t.Elements.list,xi,n.direction===Er?"vertical":"")}function v(m){e.go(m.index)}function f(m,g){li(cl,Si(g))&&(v(m),kt(g))}return{setup:He(t.Media.set,{slideFocus:jn(o)?r:o},!0),mount:i,destroy:c,remount:s}}function ul(e,t,n){var r=Oe(e),o=r.bind,l=0;function i(){n.wheel&&o(t.Elements.track,"wheel",c,pn)}function c(p){if(p.cancelable){var u=p.deltaY,T=u<0,v=Zr(p),f=n.wheelMinThreshold||0,m=n.wheelSleep||0;it(u)>f&&v-l>m&&(e.go(T?"<":">"),l=v),s(T)&&kt(p)}}function s(p){return!n.releaseWheel||e.state.is(wn)||t.Controller.getAdjacent(p)!==-1}return{mount:i}}var pl=90;function ml(e,t,n){var r=Oe(e),o=r.on,l=t.Elements.track,i=n.live&&!n.isNavigation,c=hn("span",Ms),s=wr(pl,He(u,!1));function p(){i&&(v(!t.Autoplay.isPaused()),Ce(l,qi,!0),c.textContent="…",o(fi,He(v,!0)),o(yi,He(v,!1)),o([Tn,an],He(u,!0)))}function u(f){Ce(l,ji,f),f?(Kn(l,c),s.start()):(rn(c),s.cancel())}function T(){Lt(l,[zi,qi,ji]),rn(c)}function v(f){i&&Ce(l,zi,f?"off":"polite")}return{mount:p,disable:v,destroy:T}}var gl=Object.freeze({__proto__:null,Media:$s,Direction:Ss,Elements:Hs,Slides:Bs,Layout:Os,Clones:Ds,Move:zs,Controller:js,Arrows:Us,Autoplay:Ys,Cover:Xs,Scroll:nl,Drag:rl,Keyboard:ol,LazyLoad:sl,Pagination:ll,Sync:dl,Wheel:ul,Live:ml}),hl={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"},fl={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:Rs,i18n:hl,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function yl(e,t,n){var r=t.Slides;function o(){Oe(e).on([Zt,je],l)}function l(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function i(c,s){r.style("transition","opacity "+n.speed+"ms "+n.easing),Ao(s)}return{mount:o,start:i,cancel:Xr}}function vl(e,t,n){var r=t.Move,o=t.Controller,l=t.Scroll,i=t.Elements.list,c=He($t,i,"transition"),s;function p(){Oe(e).bind(i,"transitionend",function(f){f.target===i&&s&&(T(),s())})}function u(f,m){var g=r.toPosition(f,!0),C=r.getPosition(),S=v(f);it(g-C)>=1&&S>=1?n.useScroll?l.scroll(g,S,!1,m):(c("transform "+S+"ms "+n.easing),r.translate(g,!0),s=m):(r.jump(f),m())}function T(){c(""),l.cancel()}function v(f){var m=n.rewindSpeed;if(e.is(bn)&&m){var g=o.getIndex(!0),C=o.getEnd();if(g===0&&f>=C||g>=C&&f===0)return m}return n.speed}return{mount:p,start:u,cancel:T}}var bl=(function(){function e(n,r){this.event=Oe(),this.Components={},this.state=xs(gn),this.splides=[],this._o={},this._E={};var o=Ut(n)?Wo(document,n):n;_n(o,o+" is invalid."),this.root=o,r=Kt({label:St(o,ft)||"",labelledby:St(o,bi)||""},fl,e.defaults,r||{});try{Kt(r,JSON.parse(St(o,ui)))}catch{_n(!1,"Invalid JSON")}this._o=Object.create(Kt({},r))}var t=e.prototype;return t.mount=function(r,o){var l=this,i=this.state,c=this.Components;_n(i.is([gn,hr]),"Already mounted!"),i.set(gn),this._C=c,this._T=o||this._T||(this.is(Xn)?yl:vl),this._E=r||this._E;var s=Wn({},gl,this._E,{Transition:this._T});return nn(s,function(p,u){var T=p(l,c,l._o);c[u]=T,T.setup&&T.setup()}),nn(c,function(p){p.mount&&p.mount()}),this.emit(Zt),Tt(this.root,Is),i.set(yn),this.emit(ei),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(yn)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,o){return this.event.on(r,o),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var o;return(o=this.event).emit.apply(o,[r].concat(Xt(arguments,1))),this},t.add=function(r,o){return this._C.Slides.add(r,o),this},t.remove=function(r){return this._C.Slides.remove(r),this},t.is=function(r){return this._o.type===r},t.refresh=function(){return this.emit(je),this},t.destroy=function(r){r===void 0&&(r=!0);var o=this.event,l=this.state;return l.is(gn)?Oe(this).on(ei,this.destroy.bind(this,r)):(nn(this._C,function(i){i.destroy&&i.destroy(r)},!0),o.emit(gi),o.destroy(),r&&Bt(this.splides),l.set(hr)),this},hs(e,[{key:"options",get:function(){return this._o},set:function(r){this._C.Media.set(r,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),wi=bl;wi.defaults={};wi.STATES=ys;var Yi=[[Zt,"onMounted"],[ei,"onReady"],[Ot,"onMove"],[Tn,"onMoved"],[mi,"onClick"],[Bo,"onActive"],[Oo,"onInactive"],[Vo,"onVisible"],[Do,"onHidden"],[je,"onRefresh"],[nt,"onUpdated"],[vn,"onResize"],[$r,"onResized"],[zo,"onDrag"],[jo,"onDragging"],[qo,"onDragged"],[Sr,"onScroll"],[an,"onScrolled"],[gi,"onDestroy"],[Ko,"onArrowsMounted"],[Uo,"onArrowsUpdated"],[Go,"onPaginationMounted"],[Yo,"onPaginationUpdated"],[hi,"onNavigationMounted"],[fi,"onAutoplayPlay"],[Xo,"onAutoplayPlaying"],[yi,"onAutoplayPause"],[vi,"onLazyLoadLoaded"]];function Ti(...e){return e.filter(Boolean).join(" ")}function br(e){return e!==null&&typeof e=="object"}function ri(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!ri(n,t[r]));if(br(e)&&br(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!ri(e[o],t[o]))}return e===t}function xl(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function Cl(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=n[r];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function ii(e,t){const n=e;return Cl(t,(r,o)=>{Array.isArray(r)?n[o]=r.slice():br(r)?n[o]=ii(br(n[o])?n[o]:{},r):n[o]=r}),n}var $l=({children:e,className:t,...n})=>d.createElement("div",{className:Ti("splide__track",t),...n},d.createElement("ul",{className:"splide__list"},e)),Li=class extends d.Component{constructor(){super(...arguments),this.splideRef=d.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new wi(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=ii({},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&&!ri(this.options,e)&&(this.splide.options=e,this.options=ii({},e));const t=this.getSlides();xl(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){Yi.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...o)=>{r(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:r,...o}=this.props;return d.createElement(t,{className:Ti("splide",e),ref:this.splideRef,...this.omit(o,["options",...Yi.map(l=>l[1])])},n?d.createElement($l,null,r):r)}},Pi=({children:e,className:t,...n})=>d.createElement("li",{className:Ti("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),c=require("react"),Pe=require("classnames"),x=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),_o=require("react-dom");function wa(e){return e.type==="object"&&e.version===1}const Ta="ControlSlider-module__wrapper___sHEkd",La="ControlSlider-module__hoverArrow___A-dOH",Ea="ControlSlider-module__sliderItem___QQSkR",Pa="ControlSlider-module__sliderImage___9hRl-",_a="ControlSlider-module__arrow___05ghY",Aa="ControlSlider-module__arrowVertical___tBfVN",Ma="ControlSlider-module__nextArrow___-30Yc",Ia="ControlSlider-module__arrowInner___aEra3",Ra="ControlSlider-module__arrowIcon___S4ztF",ka="ControlSlider-module__arrowImg___2dwJW",Fa="ControlSlider-module__mirror___brd6U",Wa="ControlSlider-module__pagination___bicLF",Ha="ControlSlider-module__paginationInner___bT-P-",Na="ControlSlider-module__paginationVertical___zYqKw",Oa="ControlSlider-module__paginationItem___nTRbk",Ba="ControlSlider-module__dot___p1Qun",Va="ControlSlider-module__activeDot___LHFaj",Da="ControlSlider-module__paginationInsideBottom___R3FWn",za="ControlSlider-module__paginationInsideTop___V-qb-",ja="ControlSlider-module__paginationOutsideBottom___14w8D",qa="ControlSlider-module__paginationOutsideTop___SCLqB",Ka="ControlSlider-module__paginationInsideLeft___yOBRZ",Ga="ControlSlider-module__paginationInsideRight___Rtt3o",Ua="ControlSlider-module__paginationOutsideLeft___lahaw",Ya="ControlSlider-module__paginationOutsideRight___EtuQa",Xa="ControlSlider-module__imgWrapper___UjEgB",Za="ControlSlider-module__captionBlock___dJ6-j",Qa="ControlSlider-module__captionTextWrapper___HFlpf",Ja="ControlSlider-module__captionText___uGBVc",es="ControlSlider-module__active___WZK4G",ts="ControlSlider-module__withPointerEvents___t-18M",ns="ControlSlider-module__topLeftAlignment___zjnGM",rs="ControlSlider-module__topCenterAlignment___gD1xW",is="ControlSlider-module__topRightAlignment___NMapS",os="ControlSlider-module__middleLeftAlignment___OnUrY",as="ControlSlider-module__middleCenterAlignment___Tdkl0",ss="ControlSlider-module__middleRightAlignment___wEbfX",ls="ControlSlider-module__bottomLeftAlignment___cTP2-",cs="ControlSlider-module__bottomCenterAlignment___c54fB",ds="ControlSlider-module__bottomRightAlignment___kEwrz",us="ControlSlider-module__clickOverlay___DZA28",ps="ControlSlider-module__contain___pLyq7",ms="ControlSlider-module__cover___KdDat",me={wrapper:Ta,hoverArrow:La,sliderItem:Ea,sliderImage:Pa,arrow:_a,arrowVertical:Aa,nextArrow:Ma,arrowInner:Ia,arrowIcon:Ra,arrowImg:ka,mirror:Fa,pagination:Wa,paginationInner:Ha,paginationVertical:Na,paginationItem:Oa,dot:Ba,activeDot:Va,paginationInsideBottom:Da,paginationInsideTop:za,paginationOutsideBottom:ja,paginationOutsideTop:qa,paginationInsideLeft:Ka,paginationInsideRight:Ga,paginationOutsideLeft:Ua,paginationOutsideRight:Ya,imgWrapper:Xa,captionBlock:Za,captionTextWrapper:Qa,captionText:Ja,active:es,withPointerEvents:ts,topLeftAlignment:ns,topCenterAlignment:rs,topRightAlignment:is,middleLeftAlignment:os,middleCenterAlignment:as,middleRightAlignment:ss,bottomLeftAlignment:ls,bottomCenterAlignment:cs,bottomRightAlignment:ds,clickOverlay:us,contain:ps,cover:ms};function gs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hs(e,t,n){return t&&gs(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Wi="(prefers-reduced-motion: reduce)",gn=1,fs=2,yn=3,wn=4,zn=5,lr=6,hr=7,ys={CREATED:gn,MOUNTED:fs,IDLE:yn,MOVING:wn,SCROLLING:zn,DRAGGING:lr,DESTROYED:hr};function Bt(e){e.length=0}function Xt(e,t,n){return Array.prototype.slice.call(e,t,n)}function He(e){return e.bind.apply(e,[null].concat(Xt(arguments,1)))}var Ao=setTimeout,Xr=function(){};function Hi(e){return requestAnimationFrame(e)}function Cr(e,t){return typeof t===e}function Rn(e){return!si(e)&&Cr("object",e)}var ai=Array.isArray,Mo=He(Cr,"function"),Gt=He(Cr,"string"),jn=He(Cr,"undefined");function si(e){return e===null}function Io(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function qn(e){return ai(e)?e:[e]}function bt(e,t){qn(e).forEach(t)}function li(e,t){return e.indexOf(t)>-1}function cr(e,t){return e.push.apply(e,qn(t)),e}function Ft(e,t,n){e&&bt(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function Et(e,t){Ft(e,Gt(t)?t.split(" "):t,!0)}function Kn(e,t){bt(t,e.appendChild.bind(e))}function ci(e,t){bt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function kn(e,t){return Io(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Ro(e,t){var n=e?Xt(e.children):[];return t?n.filter(function(r){return kn(r,t)}):n}function Gn(e,t){return t?Ro(e,t)[0]:e.firstElementChild}var Fn=Object.keys;function nn(e,t,n){return e&&(n?Fn(e).reverse():Fn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function Wn(e){return Xt(arguments,1).forEach(function(t){nn(t,function(n,r){e[r]=t[r]})}),e}function Kt(e){return Xt(arguments,1).forEach(function(t){nn(t,function(n,r){ai(n)?e[r]=n.slice():Rn(n)?e[r]=Kt({},Rn(e[r])?e[r]:{},n):e[r]=n})}),e}function Ni(e,t){bt(t||Fn(e),function(n){delete e[n]})}function Pt(e,t){bt(e,function(n){bt(t,function(r){n&&n.removeAttribute(r)})})}function Ce(e,t,n){Rn(t)?nn(t,function(r,o){Ce(e,o,r)}):bt(e,function(r){si(n)||n===""?Pt(r,t):r.setAttribute(t,String(n))})}function hn(e,t,n){var r=document.createElement(e);return t&&(Gt(t)?Et(r,t):Ce(r,t)),n&&Kn(n,r),r}function $t(e,t,n){if(jn(n))return getComputedStyle(e)[t];si(n)||(e.style[t]=""+n)}function Hn(e,t){$t(e,"display",t)}function ko(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function wt(e,t){return e.getAttribute(t)}function Oi(e,t){return e&&e.classList.contains(t)}function ht(e){return e.getBoundingClientRect()}function rn(e){bt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Fo(e){return Gn(new DOMParser().parseFromString(e,"text/html").body)}function kt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Wo(e,t){return e&&e.querySelector(t)}function di(e,t){return t?Xt(e.querySelectorAll(t)):[]}function Wt(e,t){Ft(e,t,!1)}function Zr(e){return e.timeStamp}function Jt(e){return Gt(e)?e:e?e+"px":""}var Un="splide",ui="data-"+Un;function _n(e,t){if(!e)throw new Error("["+Un+"] "+(t||""))}var Ut=Math.min,fr=Math.max,yr=Math.floor,Nn=Math.ceil,it=Math.abs;function Ho(e,t,n){return it(e-t)<n}function dr(e,t,n,r){var o=Ut(t,n),l=fr(t,n);return r?o<e&&e<l:o<=e&&e<=l}function un(e,t,n){var r=Ut(t,n),o=fr(t,n);return Ut(fr(r,e),o)}function Qr(e){return+(e>0)-+(e<0)}function Jr(e,t){return bt(t,function(n){e=e.replace("%s",""+n)}),e}function pi(e){return e<10?"0"+e:""+e}var Bi={};function vs(e){return""+e+pi(Bi[e]=(Bi[e]||0)+1)}function No(){var e=[];function t(i,d,s,p){o(i,d,function(u,w,C){var b="addEventListener"in u,m=b?u.removeEventListener.bind(u,w,s,p):u.removeListener.bind(u,s);b?u.addEventListener(w,s,p):u.addListener(s),e.push([u,w,C,s,m])})}function n(i,d,s){o(i,d,function(p,u,w){e=e.filter(function(C){return C[0]===p&&C[1]===u&&C[2]===w&&(!s||C[3]===s)?(C[4](),!1):!0})})}function r(i,d,s){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(d,{bubbles:u,detail:s}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(d,u,!1,s)),i.dispatchEvent(p),p}function o(i,d,s){bt(i,function(p){p&&bt(d,function(u){u.split(" ").forEach(function(w){var C=w.split(".");s(p,C[0],C[1])})})})}function l(){e.forEach(function(i){i[4]()}),Bt(e)}return{bind:t,unbind:n,dispatch:r,destroy:l}}var Zt="mounted",ei="ready",Vt="move",Tn="moved",mi="click",Oo="active",Bo="inactive",Vo="visible",Do="hidden",je="refresh",nt="updated",vn="resize",Sr="resized",zo="drag",jo="dragging",qo="dragged",$r="scroll",an="scrolled",bs="overflow",gi="destroy",Ko="arrows:mounted",Go="arrows:updated",Uo="pagination:mounted",Yo="pagination:updated",hi="navigation:mounted",fi="autoplay:play",Xo="autoplay:playing",yi="autoplay:pause",vi="lazyload:loaded",Zo="sk",Qo="sh",vr="ei";function Be(e){var t=e?e.event.bus:document.createDocumentFragment(),n=No();function r(l,i){n.bind(t,qn(l).join(" "),function(d){i.apply(i,ai(d.detail)?d.detail:[])})}function o(l){n.dispatch(t,l,Xt(arguments,1))}return e&&e.event.on(gi,n.destroy),Wn(n,{bus:t,on:r,off:He(n.unbind,t),emit:o})}function wr(e,t,n,r){var o=Date.now,l,i=0,d,s=!0,p=0;function u(){if(!s){if(i=e?Ut((o()-l)/e,1):1,n&&n(i),i>=1&&(t(),l=o(),r&&++p>=r))return C();d=Hi(u)}}function w(y){y||m(),l=o()-(y?i*e:0),s=!1,d=Hi(u)}function C(){s=!0}function b(){l=o(),i=0,n&&n(i)}function m(){d&&cancelAnimationFrame(d),i=0,d=0,s=!0}function h(y){e=y}function S(){return s}return{start:w,rewind:b,pause:C,cancel:m,set:h,isPaused:S}}function xs(e){var t=e;function n(o){t=o}function r(o){return li(qn(o),t)}return{set:n,is:r}}function Cs(e,t){var n=wr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Ss(e,t,n){var r=e.state,o=n.breakpoints||{},l=n.reducedMotion||{},i=No(),d=[];function s(){var m=n.mediaQuery==="min";Fn(o).sort(function(h,S){return m?+h-+S:+S-+h}).forEach(function(h){u(o[h],"("+(m?"min":"max")+"-width:"+h+"px)")}),u(l,Wi),w()}function p(m){m&&i.destroy()}function u(m,h){var S=matchMedia(h);i.bind(S,"change",w),d.push([m,S])}function w(){var m=r.is(hr),h=n.direction,S=d.reduce(function(y,$){return Kt(y,$[1].matches?$[0]:{})},{});Ni(n),b(S),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):h!==n.direction&&e.refresh()}function C(m){matchMedia(Wi).matches&&(m?Kt(n,l):Ni(n,Fn(l)))}function b(m,h,S){Kt(n,m),h&&Kt(Object.getPrototypeOf(n),m),(S||!r.is(gn))&&e.emit(nt,n)}return{setup:s,destroy:p,reduce:C,set:b}}var Tr="Arrow",Lr=Tr+"Left",Er=Tr+"Right",Jo=Tr+"Up",ea=Tr+"Down",Vi="rtl",Pr="ttb",Hr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Jo,Er],ArrowRight:[ea,Lr]};function $s(e,t,n){function r(l,i,d){d=d||n.direction;var s=d===Vi&&!i?1:d===Pr?0:-1;return Hr[l]&&Hr[l][s]||l.replace(/width|left|right/i,function(p,u){var w=Hr[p.toLowerCase()][s]||p;return u>0?w.charAt(0).toUpperCase()+w.slice(1):w})}function o(l){return l*(n.direction===Vi?1:-1)}return{resolve:r,orient:o}}var Ht="role",fn="tabindex",ws="disabled",Tt="aria-",Yn=Tt+"controls",ta=Tt+"current",Di=Tt+"selected",ft=Tt+"label",bi=Tt+"labelledby",na=Tt+"hidden",xi=Tt+"orientation",On=Tt+"roledescription",zi=Tt+"live",ji=Tt+"busy",qi=Tt+"atomic",Ci=[Ht,fn,ws,Yn,ta,ft,bi,na,xi,On],_t=Un+"__",Qt="is-",Nr=Un,Ki=_t+"track",Ts=_t+"list",_r=_t+"slide",ra=_r+"--clone",Ls=_r+"__container",Si=_t+"arrows",Ar=_t+"arrow",ia=Ar+"--prev",oa=Ar+"--next",Mr=_t+"pagination",aa=Mr+"__page",Es=_t+"progress",Ps=Es+"__bar",_s=_t+"toggle",As=_t+"spinner",Ms=_t+"sr",Is=Qt+"initialized",on=Qt+"active",sa=Qt+"prev",la=Qt+"next",ti=Qt+"visible",ni=Qt+"loading",ca=Qt+"focus-in",da=Qt+"overflow",Rs=[on,ti,sa,la,ni,ca,da],ks={slide:_r,clone:ra,arrows:Si,arrow:Ar,prev:ia,next:oa,pagination:Mr,page:aa,spinner:As};function Fs(e,t){if(Mo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!kn(n,t);)n=n.parentElement;return n}var Ws=5,Gi=200,ua="touchstart mousedown",Or="touchmove mousemove",Br="touchend touchcancel mouseup click";function Hs(e,t,n){var r=Be(e),o=r.on,l=r.bind,i=e.root,d=n.i18n,s={},p=[],u=[],w=[],C,b,m;function h(){f(),F(),$()}function S(){o(je,y),o(je,h),o(nt,$),l(document,ua+" keydown",function(v){m=v.type==="keydown"},{capture:!0}),l(i,"focusin",function(){Ft(i,ca,!!m)})}function y(v){var E=Ci.concat("style");Bt(p),Wt(i,u),Wt(C,w),Pt([C,b],E),Pt(i,v?E:["style",On])}function $(){Wt(i,u),Wt(C,w),u=D(Nr),w=D(Ki),Et(i,u),Et(C,w),Ce(i,ft,n.label),Ce(i,bi,n.labelledby)}function f(){C=L("."+Ki),b=Gn(C,"."+Ts),_n(C&&b,"A track/list element is missing."),cr(p,Ro(b,"."+_r+":not(."+ra+")")),nn({arrows:Si,pagination:Mr,prev:ia,next:oa,bar:Ps,toggle:_s},function(v,E){s[E]=L("."+v)}),Wn(s,{root:i,track:C,list:b,slides:p})}function F(){var v=i.id||vs(Un),E=n.role;i.id=v,C.id=C.id||v+"-track",b.id=b.id||v+"-list",!wt(i,Ht)&&i.tagName!=="SECTION"&&E&&Ce(i,Ht,E),Ce(i,On,d.carousel),Ce(b,Ht,"presentation")}function L(v){var E=Wo(i,v);return E&&Fs(E,"."+Nr)===i?E:void 0}function D(v){return[v+"--"+n.type,v+"--"+n.direction,n.drag&&v+"--draggable",n.isNavigation&&v+"--nav",v===Nr&&on]}return Wn(s,{setup:h,mount:S,destroy:y})}var bn="slide",Ln="loop",Xn="fade";function Ns(e,t,n,r){var o=Be(e),l=o.on,i=o.emit,d=o.bind,s=e.Components,p=e.root,u=e.options,w=u.isNavigation,C=u.updateOnMove,b=u.i18n,m=u.pagination,h=u.slideFocus,S=s.Direction.resolve,y=wt(r,"style"),$=wt(r,ft),f=n>-1,F=Gn(r,"."+Ls),L;function D(){f||(r.id=p.id+"-slide"+pi(t+1),Ce(r,Ht,m?"tabpanel":"group"),Ce(r,On,b.slide),Ce(r,ft,$||Jr(b.slideLabel,[t+1,e.length]))),v()}function v(){d(r,"click",He(i,mi,z)),d(r,"keydown",He(i,Zo,z)),l([Tn,Qo,an],k),l(hi,j),C&&l(Vt,T)}function E(){L=!0,o.destroy(),Wt(r,Rs),Pt(r,Ci),Ce(r,"style",y),Ce(r,ft,$||"")}function j(){var V=e.splides.map(function(P){var G=P.splide.Components.Slides.getAt(t);return G?G.slide.id:""}).join(" ");Ce(r,ft,Jr(b.slideX,(f?n:t)+1)),Ce(r,Yn,V),Ce(r,Ht,h?"button":""),h&&Pt(r,On)}function T(){L||k()}function k(){if(!L){var V=e.index;R(),N(),Ft(r,sa,t===V-1),Ft(r,la,t===V+1)}}function R(){var V=ie();V!==Oi(r,on)&&(Ft(r,on,V),Ce(r,ta,w&&V||""),i(V?Oo:Bo,z))}function N(){var V=M(),P=!V&&(!ie()||f);if(e.state.is([wn,zn])||Ce(r,na,P||""),Ce(di(r,u.focusableNodes||""),fn,P?-1:""),h&&Ce(r,fn,P?-1:0),V!==Oi(r,ti)&&(Ft(r,ti,V),i(V?Vo:Do,z)),!V&&document.activeElement===r){var G=s.Slides.getAt(e.index);G&&ko(G.slide)}}function q(V,P,G){$t(G&&F||r,V,P)}function ie(){var V=e.index;return V===t||u.cloneStatus&&V===n}function M(){if(e.is(Xn))return ie();var V=ht(s.Elements.track),P=ht(r),G=S("left",!0),ee=S("right",!0);return yr(V[G])<=Nn(P[G])&&yr(P[ee])<=Nn(V[ee])}function W(V,P){var G=it(V-t);return!f&&(u.rewind||e.is(Ln))&&(G=Ut(G,e.length-G)),G<=P}var z={index:t,slideIndex:n,slide:r,container:F,isClone:f,mount:D,destroy:E,update:k,style:q,isWithin:W};return z}function Os(e,t,n){var r=Be(e),o=r.on,l=r.emit,i=r.bind,d=t.Elements,s=d.slides,p=d.list,u=[];function w(){C(),o(je,b),o(je,C)}function C(){s.forEach(function(k,R){h(k,R,-1)})}function b(){L(function(k){k.destroy()}),Bt(u)}function m(){L(function(k){k.update()})}function h(k,R,N){var q=Ns(e,R,N,k);q.mount(),u.push(q),u.sort(function(ie,M){return ie.index-M.index})}function S(k){return k?D(function(R){return!R.isClone}):u}function y(k){var R=t.Controller,N=R.toIndex(k),q=R.hasFocus()?1:n.perPage;return D(function(ie){return dr(ie.index,N,N+q-1)})}function $(k){return D(k)[0]}function f(k,R){bt(k,function(N){if(Gt(N)&&(N=Fo(N)),Io(N)){var q=s[R];q?ci(N,q):Kn(p,N),Et(N,n.classes.slide),E(N,He(l,vn))}}),l(je)}function F(k){rn(D(k).map(function(R){return R.slide})),l(je)}function L(k,R){S(R).forEach(k)}function D(k){return u.filter(Mo(k)?k:function(R){return Gt(k)?kn(R.slide,k):li(qn(k),R.index)})}function v(k,R,N){L(function(q){q.style(k,R,N)})}function E(k,R){var N=di(k,"img"),q=N.length;q?N.forEach(function(ie){i(ie,"load error",function(){--q||R()})}):R()}function j(k){return k?s.length:u.length}function T(){return u.length>n.perPage}return{mount:w,destroy:b,update:m,register:h,get:S,getIn:y,getAt:$,add:f,remove:F,forEach:L,filter:D,style:v,getLength:j,isEnough:T}}function Bs(e,t,n){var r=Be(e),o=r.on,l=r.bind,i=r.emit,d=t.Slides,s=t.Direction.resolve,p=t.Elements,u=p.root,w=p.track,C=p.list,b=d.getAt,m=d.style,h,S,y;function $(){f(),l(window,"resize load",Cs(He(i,vn))),o([nt,je],f),o(vn,F)}function f(){h=n.direction===Pr,$t(u,"maxWidth",Jt(n.width)),$t(w,s("paddingLeft"),L(!1)),$t(w,s("paddingRight"),L(!0)),F(!0)}function F(z){var V=ht(u);(z||S.width!==V.width||S.height!==V.height)&&($t(w,"height",D()),m(s("marginRight"),Jt(n.gap)),m("width",E()),m("height",j(),!0),S=V,i(Sr),y!==(y=W())&&(Ft(u,da,y),i(bs,y)))}function L(z){var V=n.padding,P=s(z?"right":"left");return V&&Jt(V[P]||(Rn(V)?0:V))||"0px"}function D(){var z="";return h&&(z=v(),_n(z,"height or heightRatio is missing."),z="calc("+z+" - "+L(!1)+" - "+L(!0)+")"),z}function v(){return Jt(n.height||ht(C).width*n.heightRatio)}function E(){return n.autoWidth?null:Jt(n.fixedWidth)||(h?"":T())}function j(){return Jt(n.fixedHeight)||(h?n.autoHeight?null:T():v())}function T(){var z=Jt(n.gap);return"calc((100%"+(z&&" + "+z)+")/"+(n.perPage||1)+(z&&" - "+z)+")"}function k(){return ht(C)[s("width")]}function R(z,V){var P=b(z||0);return P?ht(P.slide)[s("width")]+(V?0:ie()):0}function N(z,V){var P=b(z);if(P){var G=ht(P.slide)[s("right")],ee=ht(C)[s("left")];return it(G-ee)+(V?0:ie())}return 0}function q(z){return N(e.length-1)-N(0)+R(0,z)}function ie(){var z=b(0);return z&&parseFloat($t(z.slide,s("marginRight")))||0}function M(z){return parseFloat($t(w,s("padding"+(z?"Right":"Left"))))||0}function W(){return e.is(Xn)||q(!0)>k()}return{mount:$,resize:F,listSize:k,slideSize:R,sliderSize:q,totalSize:N,getPadding:M,isOverflow:W}}var Vs=2;function Ds(e,t,n){var r=Be(e),o=r.on,l=t.Elements,i=t.Slides,d=t.Direction.resolve,s=[],p;function u(){o(je,w),o([nt,vn],b),(p=S())&&(m(p),t.Layout.resize(!0))}function w(){C(),u()}function C(){rn(s),Bt(s),r.destroy()}function b(){var y=S();p!==y&&(p<y||!y)&&r.emit(je)}function m(y){var $=i.get().slice(),f=$.length;if(f){for(;$.length<y;)cr($,$);cr($.slice(-y),$.slice(0,y)).forEach(function(F,L){var D=L<y,v=h(F.slide,L);D?ci(v,$[0].slide):Kn(l.list,v),cr(s,v),i.register(v,L-y+(D?0:f),F.index)})}}function h(y,$){var f=y.cloneNode(!0);return Et(f,n.classes.clone),f.id=e.root.id+"-clone"+pi($+1),f}function S(){var y=n.clones;if(!e.is(Ln))y=0;else if(jn(y)){var $=n[d("fixedWidth")]&&t.Layout.slideSize(0),f=$&&Nn(ht(l.track)[d("width")]/$);y=f||n[d("autoWidth")]&&e.length||n.perPage*Vs}return y}return{mount:u,destroy:C}}function zs(e,t,n){var r=Be(e),o=r.on,l=r.emit,i=e.state.set,d=t.Layout,s=d.slideSize,p=d.getPadding,u=d.totalSize,w=d.listSize,C=d.sliderSize,b=t.Direction,m=b.resolve,h=b.orient,S=t.Elements,y=S.list,$=S.track,f;function F(){f=t.Transition,o([Zt,Sr,nt,je],L)}function L(){t.Controller.isBusy()||(t.Scroll.cancel(),v(e.index),t.Slides.update())}function D(P,G,ee,Y){P!==G&&z(P>ee)&&(k(),E(T(q(),P>ee),!0)),i(wn),l(Vt,G,ee,P),f.start(G,function(){i(yn),l(Tn,G,ee,P),Y&&Y()})}function v(P){E(N(P,!0))}function E(P,G){if(!e.is(Xn)){var ee=G?P:j(P);$t(y,"transform","translate"+m("X")+"("+ee+"px)"),P!==ee&&l(Qo)}}function j(P){if(e.is(Ln)){var G=R(P),ee=G>t.Controller.getEnd(),Y=G<0;(Y||ee)&&(P=T(P,ee))}return P}function T(P,G){var ee=P-W(G),Y=C();return P-=h(Y*(Nn(it(ee)/Y)||1))*(G?1:-1),P}function k(){E(q(),!0),f.cancel()}function R(P){for(var G=t.Slides.get(),ee=0,Y=1/0,A=0;A<G.length;A++){var ae=G[A].index,g=it(N(ae,!0)-P);if(g<=Y)Y=g,ee=ae;else break}return ee}function N(P,G){var ee=h(u(P-1)-M(P));return G?ie(ee):ee}function q(){var P=m("left");return ht(y)[P]-ht($)[P]+h(p(!1))}function ie(P){return n.trimSpace&&e.is(bn)&&(P=un(P,0,h(C(!0)-w()))),P}function M(P){var G=n.focus;return G==="center"?(w()-s(P,!0))/2:+G*s(P)||0}function W(P){return N(P?t.Controller.getEnd():0,!!n.trimSpace)}function z(P){var G=h(T(q(),P));return P?G>=0:G<=y[m("scrollWidth")]-ht($)[m("width")]}function V(P,G){G=jn(G)?q():G;var ee=P!==!0&&h(G)<h(W(!1)),Y=P!==!1&&h(G)>h(W(!0));return ee||Y}return{mount:F,move:D,jump:v,translate:E,shift:T,cancel:k,toIndex:R,toPosition:N,getPosition:q,getLimit:W,exceededLimit:V,reposition:L}}function js(e,t,n){var r=Be(e),o=r.on,l=r.emit,i=t.Move,d=i.getPosition,s=i.getLimit,p=i.toPosition,u=t.Slides,w=u.isEnough,C=u.getLength,b=n.omitEnd,m=e.is(Ln),h=e.is(bn),S=He(q,!1),y=He(q,!0),$=n.start||0,f,F=$,L,D,v;function E(){j(),o([nt,je,vr],j),o(Sr,T)}function j(){L=C(!0),D=n.perMove,v=n.perPage,f=z();var g=un($,0,b?f:L-1);g!==$&&($=g,i.reposition())}function T(){f!==z()&&l(vr)}function k(g,ne,X){if(!ae()){var J=N(g),ue=W(J);ue>-1&&(ne||ue!==$)&&(ee(ue),i.move(J,ue,F,X))}}function R(g,ne,X,J){t.Scroll.scroll(g,ne,X,function(){var ue=W(i.toIndex(d()));ee(b?Ut(ue,f):ue),J&&J()})}function N(g){var ne=$;if(Gt(g)){var X=g.match(/([+\-<>])(\d+)?/)||[],J=X[1],ue=X[2];J==="+"||J==="-"?ne=ie($+ +(""+J+(+ue||1)),$):J===">"?ne=ue?V(+ue):S(!0):J==="<"&&(ne=y(!0))}else ne=m?g:un(g,0,f);return ne}function q(g,ne){var X=D||(A()?1:v),J=ie($+X*(g?-1:1),$,!(D||A()));return J===-1&&h&&!Ho(d(),s(!g),1)?g?0:f:ne?J:W(J)}function ie(g,ne,X){if(w()||A()){var J=M(g);J!==g&&(ne=g,g=J,X=!1),g<0||g>f?!D&&(dr(0,g,ne,!0)||dr(f,ne,g,!0))?g=V(P(g)):m?g=X?g<0?-(L%v||v):L:g:n.rewind?g=g<0?f:0:g=-1:X&&g!==ne&&(g=V(P(ne)+(g<ne?-1:1)))}else g=-1;return g}function M(g){if(h&&n.trimSpace==="move"&&g!==$)for(var ne=d();ne===p(g,!0)&&dr(g,0,e.length-1,!n.rewind);)g<$?--g:++g;return g}function W(g){return m?(g+L)%L||0:g}function z(){for(var g=L-(A()||m&&D?1:v);b&&g-- >0;)if(p(L-1,!0)!==p(g,!0)){g++;break}return un(g,0,L-1)}function V(g){return un(A()?g:v*g,0,f)}function P(g){return A()?Ut(g,f):yr((g>=f?L-1:g)/v)}function G(g){var ne=i.toIndex(g);return h?un(ne,0,f):ne}function ee(g){g!==$&&(F=$,$=g)}function Y(g){return g?F:$}function A(){return!jn(n.focus)||n.isNavigation}function ae(){return e.state.is([wn,zn])&&!!n.waitForTransition}return{mount:E,go:k,scroll:R,getNext:S,getPrev:y,getAdjacent:q,getEnd:z,setIndex:ee,getIndex:Y,toIndex:V,toPage:P,toDest:G,hasFocus:A,isBusy:ae}}var qs="http://www.w3.org/2000/svg",Ks="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",tr=40;function Gs(e,t,n){var r=Be(e),o=r.on,l=r.bind,i=r.emit,d=n.classes,s=n.i18n,p=t.Elements,u=t.Controller,w=p.arrows,C=p.track,b=w,m=p.prev,h=p.next,S,y,$={};function f(){L(),o(nt,F)}function F(){D(),f()}function L(){var R=n.arrows;R&&!(m&&h)&&j(),m&&h&&(Wn($,{prev:m,next:h}),Hn(b,R?"":"none"),Et(b,y=Si+"--"+n.direction),R&&(v(),k(),Ce([m,h],Yn,C.id),i(Ko,m,h)))}function D(){r.destroy(),Wt(b,y),S?(rn(w?[m,h]:b),m=h=null):Pt([m,h],Ci)}function v(){o([Zt,Tn,je,an,vr],k),l(h,"click",He(E,">")),l(m,"click",He(E,"<"))}function E(R){u.go(R,!0)}function j(){b=w||hn("div",d.arrows),m=T(!0),h=T(!1),S=!0,Kn(b,[m,h]),!w&&ci(b,C)}function T(R){var N='<button class="'+d.arrow+" "+(R?d.prev:d.next)+'" type="button"><svg xmlns="'+qs+'" viewBox="0 0 '+tr+" "+tr+'" width="'+tr+'" height="'+tr+'" focusable="false"><path d="'+(n.arrowPath||Ks)+'" />';return Fo(N)}function k(){if(m&&h){var R=e.index,N=u.getPrev(),q=u.getNext(),ie=N>-1&&R<N?s.last:s.prev,M=q>-1&&R>q?s.first:s.next;m.disabled=N<0,h.disabled=q<0,Ce(m,ft,ie),Ce(h,ft,M),i(Go,m,h,N,q)}}return{arrows:$,mount:f,destroy:D,update:k}}var Us=ui+"-interval";function Ys(e,t,n){var r=Be(e),o=r.on,l=r.bind,i=r.emit,d=wr(n.interval,e.go.bind(e,">"),v),s=d.isPaused,p=t.Elements,u=t.Elements,w=u.root,C=u.toggle,b=n.autoplay,m,h,S=b==="pause";function y(){b&&($(),C&&Ce(C,Yn,p.track.id),S||f(),D())}function $(){n.pauseOnHover&&l(w,"mouseenter mouseleave",function(j){m=j.type==="mouseenter",L()}),n.pauseOnFocus&&l(w,"focusin focusout",function(j){h=j.type==="focusin",L()}),C&&l(C,"click",function(){S?f():F(!0)}),o([Vt,$r,je],d.rewind),o(Vt,E)}function f(){s()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),h=m=S=!1,D(),i(fi))}function F(j){j===void 0&&(j=!0),S=!!j,D(),s()||(d.pause(),i(yi))}function L(){S||(m||h?F(!1):f())}function D(){C&&(Ft(C,on,!S),Ce(C,ft,n.i18n[S?"play":"pause"]))}function v(j){var T=p.bar;T&&$t(T,"width",j*100+"%"),i(Xo,j)}function E(j){var T=t.Slides.getAt(j);d.set(T&&+wt(T.slide,Us)||n.interval)}return{mount:y,destroy:d.cancel,play:f,pause:F,isPaused:s}}function Xs(e,t,n){var r=Be(e),o=r.on;function l(){n.cover&&(o(vi,He(d,!0)),o([Zt,nt,je],He(i,!0)))}function i(s){t.Slides.forEach(function(p){var u=Gn(p.container||p.slide,"img");u&&u.src&&d(s,u,p)})}function d(s,p,u){u.style("background",s?'center/cover no-repeat url("'+p.src+'")':"",!0),Hn(p,s?"none":"")}return{mount:l,destroy:He(i,!1)}}var Zs=10,Qs=600,Js=.6,el=1.5,tl=800;function nl(e,t,n){var r=Be(e),o=r.on,l=r.emit,i=e.state.set,d=t.Move,s=d.getPosition,p=d.getLimit,u=d.exceededLimit,w=d.translate,C=e.is(bn),b,m,h=1;function S(){o(Vt,F),o([nt,je],L)}function y(v,E,j,T,k){var R=s();if(F(),j&&(!C||!u())){var N=t.Layout.sliderSize(),q=Qr(v)*N*yr(it(v)/N)||0;v=d.toPosition(t.Controller.toDest(v%N))+q}var ie=Ho(R,v,1);h=1,E=ie?0:E||fr(it(v-R)/el,tl),m=T,b=wr(E,$,He(f,R,v,k),1),i(zn),l($r),b.start()}function $(){i(yn),m&&m(),l(an)}function f(v,E,j,T){var k=s(),R=v+(E-v)*D(T),N=(R-k)*h;w(k+N),C&&!j&&u()&&(h*=Js,it(N)<Zs&&y(p(u(!0)),Qs,!1,m,!0))}function F(){b&&b.cancel()}function L(){b&&!b.isPaused()&&(F(),$())}function D(v){var E=n.easingFunc;return E?E(v):1-Math.pow(1-v,4)}return{mount:S,destroy:F,scroll:y,cancel:L}}var pn={passive:!1,capture:!0};function rl(e,t,n){var r=Be(e),o=r.on,l=r.emit,i=r.bind,d=r.unbind,s=e.state,p=t.Move,u=t.Scroll,w=t.Controller,C=t.Elements.track,b=t.Media.reduce,m=t.Direction,h=m.resolve,S=m.orient,y=p.getPosition,$=p.exceededLimit,f,F,L,D,v,E=!1,j,T,k;function R(){i(C,Or,Xr,pn),i(C,Br,Xr,pn),i(C,ua,q,pn),i(C,"click",W,{capture:!0}),i(C,"dragstart",kt),o([Zt,nt],N)}function N(){var I=n.drag;re(!I),D=I==="free"}function q(I){if(j=!1,!T){var H=ue(I);J(I.target)&&(H||!I.button)&&(w.isBusy()?kt(I,!0):(k=H?C:window,v=s.is([wn,zn]),L=null,i(k,Or,ie,pn),i(k,Br,M,pn),p.cancel(),u.cancel(),z(I)))}}function ie(I){if(s.is(lr)||(s.set(lr),l(zo)),I.cancelable)if(v){p.translate(f+X(A(I)));var H=ae(I)>Gi,O=E!==(E=$());(H||O)&&z(I),j=!0,l(jo),kt(I)}else G(I)&&(v=P(I),kt(I))}function M(I){s.is(lr)&&(s.set(yn),l(qo)),v&&(V(I),kt(I)),d(k,Or,ie),d(k,Br,M),v=!1}function W(I){!T&&j&&kt(I,!0)}function z(I){L=F,F=I,f=y()}function V(I){var H=ee(I),O=Y(H),se=n.rewind&&n.rewindByDrag;b(!1),D?w.scroll(O,0,n.snap):e.is(Xn)?w.go(S(Qr(H))<0?se?"<":"-":se?">":"+"):e.is(bn)&&E&&se?w.go($(!0)?">":"<"):w.go(w.toDest(O),!0),b(!0)}function P(I){var H=n.dragMinThreshold,O=Rn(H),se=O&&H.mouse||0,ge=(O?H.touch:+H)||10;return it(A(I))>(ue(I)?ge:se)}function G(I){return it(A(I))>it(A(I,!0))}function ee(I){if(e.is(Ln)||!E){var H=ae(I);if(H&&H<Gi)return A(I)/H}return 0}function Y(I){return y()+Qr(I)*Ut(it(I)*(n.flickPower||600),D?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function A(I,H){return ne(I,H)-ne(g(I),H)}function ae(I){return Zr(I)-Zr(g(I))}function g(I){return F===I&&L||F}function ne(I,H){return(ue(I)?I.changedTouches[0]:I)["page"+h(H?"Y":"X")]}function X(I){return I/(E&&e.is(bn)?Ws:1)}function J(I){var H=n.noDrag;return!kn(I,"."+aa+", ."+Ar)&&(!H||!kn(I,H))}function ue(I){return typeof TouchEvent<"u"&&I instanceof TouchEvent}function Z(){return v}function re(I){T=I}return{mount:R,disable:re,isDragging:Z}}var il={Spacebar:" ",Right:Er,Left:Lr,Up:Jo,Down:ea};function $i(e){return e=Gt(e)?e:e.key,il[e]||e}var Ui="keydown";function ol(e,t,n){var r=Be(e),o=r.on,l=r.bind,i=r.unbind,d=e.root,s=t.Direction.resolve,p,u;function w(){C(),o(nt,b),o(nt,C),o(Vt,h)}function C(){var y=n.keyboard;y&&(p=y==="global"?window:d,l(p,Ui,S))}function b(){i(p,Ui)}function m(y){u=y}function h(){var y=u;u=!0,Ao(function(){u=y})}function S(y){if(!u){var $=$i(y);$===s(Lr)?e.go("<"):$===s(Er)&&e.go(">")}}return{mount:w,destroy:b,disable:m}}var An=ui+"-lazy",ur=An+"-srcset",al="["+An+"], ["+ur+"]";function sl(e,t,n){var r=Be(e),o=r.on,l=r.off,i=r.bind,d=r.emit,s=n.lazyLoad==="sequential",p=[Tn,an],u=[];function w(){n.lazyLoad&&(C(),o(je,C))}function C(){Bt(u),b(),s?y():(l(p),o(p,m),m())}function b(){t.Slides.forEach(function($){di($.slide,al).forEach(function(f){var F=wt(f,An),L=wt(f,ur);if(F!==f.src||L!==f.srcset){var D=n.classes.spinner,v=f.parentElement,E=Gn(v,"."+D)||hn("span",D,v);u.push([f,$,E]),f.src||Hn(f,"none")}})})}function m(){u=u.filter(function($){var f=n.perPage*((n.preloadPages||1)+1)-1;return $[1].isWithin(e.index,f)?h($):!0}),u.length||l(p)}function h($){var f=$[0];Et($[1].slide,ni),i(f,"load error",He(S,$)),Ce(f,"src",wt(f,An)),Ce(f,"srcset",wt(f,ur)),Pt(f,An),Pt(f,ur)}function S($,f){var F=$[0],L=$[1];Wt(L.slide,ni),f.type!=="error"&&(rn($[2]),Hn(F,""),d(vi,F,L),d(vn)),s&&y()}function y(){u.length&&h(u.shift())}return{mount:w,destroy:He(Bt,u),check:m}}function ll(e,t,n){var r=Be(e),o=r.on,l=r.emit,i=r.bind,d=t.Slides,s=t.Elements,p=t.Controller,u=p.hasFocus,w=p.getIndex,C=p.go,b=t.Direction.resolve,m=s.pagination,h=[],S,y;function $(){f(),o([nt,je,vr],$);var T=n.pagination;m&&Hn(m,T?"":"none"),T&&(o([Vt,$r,an],j),F(),j(),l(Uo,{list:S,items:h},E(e.index)))}function f(){S&&(rn(m?Xt(S.children):S),Wt(S,y),Bt(h),S=null),r.destroy()}function F(){var T=e.length,k=n.classes,R=n.i18n,N=n.perPage,q=u()?p.getEnd()+1:Nn(T/N);S=m||hn("ul",k.pagination,s.track.parentElement),Et(S,y=Mr+"--"+v()),Ce(S,Ht,"tablist"),Ce(S,ft,R.select),Ce(S,xi,v()===Pr?"vertical":"");for(var ie=0;ie<q;ie++){var M=hn("li",null,S),W=hn("button",{class:k.page,type:"button"},M),z=d.getIn(ie).map(function(P){return P.slide.id}),V=!u()&&N>1?R.pageX:R.slideX;i(W,"click",He(L,ie)),n.paginationKeyboard&&i(W,"keydown",He(D,ie)),Ce(M,Ht,"presentation"),Ce(W,Ht,"tab"),Ce(W,Yn,z.join(" ")),Ce(W,ft,Jr(V,ie+1)),Ce(W,fn,-1),h.push({li:M,button:W,page:ie})}}function L(T){C(">"+T,!0)}function D(T,k){var R=h.length,N=$i(k),q=v(),ie=-1;N===b(Er,!1,q)?ie=++T%R:N===b(Lr,!1,q)?ie=(--T+R)%R:N==="Home"?ie=0:N==="End"&&(ie=R-1);var M=h[ie];M&&(ko(M.button),C(">"+ie),kt(k,!0))}function v(){return n.paginationDirection||n.direction}function E(T){return h[p.toPage(T)]}function j(){var T=E(w(!0)),k=E(w());if(T){var R=T.button;Wt(R,on),Pt(R,Di),Ce(R,fn,-1)}if(k){var N=k.button;Et(N,on),Ce(N,Di,!0),Ce(N,fn,"")}l(Yo,{list:S,items:h},T,k)}return{items:h,mount:$,destroy:f,getAt:E,update:j}}var cl=[" ","Enter"];function dl(e,t,n){var r=n.isNavigation,o=n.slideFocus,l=[];function i(){e.splides.forEach(function(m){m.isParent||(p(e,m.splide),p(m.splide,e))}),r&&u()}function d(){l.forEach(function(m){m.destroy()}),Bt(l)}function s(){d(),i()}function p(m,h){var S=Be(m);S.on(Vt,function(y,$,f){h.go(h.is(Ln)?f:y)}),l.push(S)}function u(){var m=Be(e),h=m.on;h(mi,C),h(Zo,b),h([Zt,nt],w),l.push(m),m.emit(hi,e.splides)}function w(){Ce(t.Elements.list,xi,n.direction===Pr?"vertical":"")}function C(m){e.go(m.index)}function b(m,h){li(cl,$i(h))&&(C(m),kt(h))}return{setup:He(t.Media.set,{slideFocus:jn(o)?r:o},!0),mount:i,destroy:d,remount:s}}function ul(e,t,n){var r=Be(e),o=r.bind,l=0;function i(){n.wheel&&o(t.Elements.track,"wheel",d,pn)}function d(p){if(p.cancelable){var u=p.deltaY,w=u<0,C=Zr(p),b=n.wheelMinThreshold||0,m=n.wheelSleep||0;it(u)>b&&C-l>m&&(e.go(w?"<":">"),l=C),s(w)&&kt(p)}}function s(p){return!n.releaseWheel||e.state.is(wn)||t.Controller.getAdjacent(p)!==-1}return{mount:i}}var pl=90;function ml(e,t,n){var r=Be(e),o=r.on,l=t.Elements.track,i=n.live&&!n.isNavigation,d=hn("span",Ms),s=wr(pl,He(u,!1));function p(){i&&(C(!t.Autoplay.isPaused()),Ce(l,qi,!0),d.textContent="…",o(fi,He(C,!0)),o(yi,He(C,!1)),o([Tn,an],He(u,!0)))}function u(b){Ce(l,ji,b),b?(Kn(l,d),s.start()):(rn(d),s.cancel())}function w(){Pt(l,[zi,qi,ji]),rn(d)}function C(b){i&&Ce(l,zi,b?"off":"polite")}return{mount:p,disable:C,destroy:w}}var gl=Object.freeze({__proto__:null,Media:Ss,Direction:$s,Elements:Hs,Slides:Os,Layout:Bs,Clones:Ds,Move:zs,Controller:js,Arrows:Gs,Autoplay:Ys,Cover:Xs,Scroll:nl,Drag:rl,Keyboard:ol,LazyLoad:sl,Pagination:ll,Sync:dl,Wheel:ul,Live:ml}),hl={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"},fl={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:ks,i18n:hl,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function yl(e,t,n){var r=t.Slides;function o(){Be(e).on([Zt,je],l)}function l(){r.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function i(d,s){r.style("transition","opacity "+n.speed+"ms "+n.easing),Ao(s)}return{mount:o,start:i,cancel:Xr}}function vl(e,t,n){var r=t.Move,o=t.Controller,l=t.Scroll,i=t.Elements.list,d=He($t,i,"transition"),s;function p(){Be(e).bind(i,"transitionend",function(b){b.target===i&&s&&(w(),s())})}function u(b,m){var h=r.toPosition(b,!0),S=r.getPosition(),y=C(b);it(h-S)>=1&&y>=1?n.useScroll?l.scroll(h,y,!1,m):(d("transform "+y+"ms "+n.easing),r.translate(h,!0),s=m):(r.jump(b),m())}function w(){d(""),l.cancel()}function C(b){var m=n.rewindSpeed;if(e.is(bn)&&m){var h=o.getIndex(!0),S=o.getEnd();if(h===0&&b>=S||h>=S&&b===0)return m}return n.speed}return{mount:p,start:u,cancel:w}}var bl=(function(){function e(n,r){this.event=Be(),this.Components={},this.state=xs(gn),this.splides=[],this._o={},this._E={};var o=Gt(n)?Wo(document,n):n;_n(o,o+" is invalid."),this.root=o,r=Kt({label:wt(o,ft)||"",labelledby:wt(o,bi)||""},fl,e.defaults,r||{});try{Kt(r,JSON.parse(wt(o,ui)))}catch{_n(!1,"Invalid JSON")}this._o=Object.create(Kt({},r))}var t=e.prototype;return t.mount=function(r,o){var l=this,i=this.state,d=this.Components;_n(i.is([gn,hr]),"Already mounted!"),i.set(gn),this._C=d,this._T=o||this._T||(this.is(Xn)?yl:vl),this._E=r||this._E;var s=Wn({},gl,this._E,{Transition:this._T});return nn(s,function(p,u){var w=p(l,d,l._o);d[u]=w,w.setup&&w.setup()}),nn(d,function(p){p.mount&&p.mount()}),this.emit(Zt),Et(this.root,Is),i.set(yn),this.emit(ei),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(yn)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,o){return this.event.on(r,o),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var o;return(o=this.event).emit.apply(o,[r].concat(Xt(arguments,1))),this},t.add=function(r,o){return this._C.Slides.add(r,o),this},t.remove=function(r){return this._C.Slides.remove(r),this},t.is=function(r){return this._o.type===r},t.refresh=function(){return this.emit(je),this},t.destroy=function(r){r===void 0&&(r=!0);var o=this.event,l=this.state;return l.is(gn)?Be(this).on(ei,this.destroy.bind(this,r)):(nn(this._C,function(i){i.destroy&&i.destroy(r)},!0),o.emit(gi),o.destroy(),r&&Bt(this.splides),l.set(hr)),this},hs(e,[{key:"options",get:function(){return this._o},set:function(r){this._C.Media.set(r,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),wi=bl;wi.defaults={};wi.STATES=ys;var Yi=[[Zt,"onMounted"],[ei,"onReady"],[Vt,"onMove"],[Tn,"onMoved"],[mi,"onClick"],[Oo,"onActive"],[Bo,"onInactive"],[Vo,"onVisible"],[Do,"onHidden"],[je,"onRefresh"],[nt,"onUpdated"],[vn,"onResize"],[Sr,"onResized"],[zo,"onDrag"],[jo,"onDragging"],[qo,"onDragged"],[$r,"onScroll"],[an,"onScrolled"],[gi,"onDestroy"],[Ko,"onArrowsMounted"],[Go,"onArrowsUpdated"],[Uo,"onPaginationMounted"],[Yo,"onPaginationUpdated"],[hi,"onNavigationMounted"],[fi,"onAutoplayPlay"],[Xo,"onAutoplayPlaying"],[yi,"onAutoplayPause"],[vi,"onLazyLoadLoaded"]];function Ti(...e){return e.filter(Boolean).join(" ")}function br(e){return e!==null&&typeof e=="object"}function ri(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!ri(n,t[r]));if(br(e)&&br(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!ri(e[o],t[o]))}return e===t}function xl(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function Cl(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=n[r];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function ii(e,t){const n=e;return Cl(t,(r,o)=>{Array.isArray(r)?n[o]=r.slice():br(r)?n[o]=ii(br(n[o])?n[o]:{},r):n[o]=r}),n}var Sl=({children:e,className:t,...n})=>c.createElement("div",{className:Ti("splide__track",t),...n},c.createElement("ul",{className:"splide__list"},e)),Li=class extends c.Component{constructor(){super(...arguments),this.splideRef=c.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new wi(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=ii({},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&&!ri(this.options,e)&&(this.splide.options=e,this.options=ii({},e));const t=this.getSlides();xl(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){Yi.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...o)=>{r(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:r,...o}=this.props;return c.createElement(t,{className:Ti("splide",e),ref:this.splideRef,...this.omit(o,["options",...Yi.map(l=>l[1])])},n?c.createElement(Sl,null,r):r)}},Ei=({children:e,className:t,...n})=>c.createElement("li",{className:Ti("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 Sl="RichTextRenderer-module__link___BWeZ2",wl={link:Sl},Tl=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(r=>/^\d/.test(r))},Ir=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Tl(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function yt(e){const{color:t,...n}=e;return n}function et(e,t){var o,l,i;const{fontSize:n,lineHeight:r}=e;return{fontFamily:Ir(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:y.scalingValue(e.letterSpacing,t),wordSpacing:y.scalingValue(e.wordSpacing,t),fontSize:y.scalingValue(n,t),lineHeight:r!==void 0?y.scalingValue(r,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(l=e.textAppearance)==null?void 0:l.textDecoration,fontVariant:(i=e.textAppearance)==null?void 0:i.fontVariant,textAlign:e.textAlign,color:e.color}}const xn=({content:e})=>{const t=n=>n.map((r,o)=>r.type==="link"?a.jsx("a",{className:wl.link,href:r.value,target:r.target,children:t(r.children)},o):a.jsx("span",{style:Ll(r),children:r.text},o));return a.jsx(a.Fragment,{children:e.map((n,r)=>{const o=n.children;return a.jsx("div",{children:t(o)},r)})})};function Ll(e){return{...e.fontFamily&&{fontFamily:Ir(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 Pl="SvgImage-module__svg___q3xE-",El="SvgImage-module__img___VsTm-",Xi={svg:Pl,img:El},_l=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Al=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Ht=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:o})=>{const[l,i]=d.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return d.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(c)}},[]),!_l(e)||!l?a.jsx("img",{src:e,alt:"",className:Ee(Xi.img,r),style:o}):a.jsx("span",{"data-supports-mask":l,className:Ee(Xi.svg,r),style:{"--svg":Al(e),"--fill":t,"--hover-fill":n,...o??{}}})},Ml={"top-left":ue.topLeftAlignment,"top-center":ue.topCenterAlignment,"top-right":ue.topRightAlignment,"middle-left":ue.middleLeftAlignment,"middle-center":ue.middleCenterAlignment,"middle-right":ue.middleRightAlignment,"bottom-left":ue.bottomLeftAlignment,"bottom-center":ue.bottomCenterAlignment,"bottom-right":ue.bottomRightAlignment};function Il({settings:e,content:t,styles:n,isEditor:r}){const[o,l]=d.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:s,textAlign:p,wordSpacing:u,fontSizeLineHeight:T,textAppearance:v,color:f}=n.imageCaption??{},[m,g]=d.useState(void 0),[C,S]=d.useState(null),[$,b]=d.useState(0),[F,L]=d.useState(0),{direction:N,transition:w,controls:A,pagination:D,imageCaption:P,triggers:M}=e,R=d.useRef(w.type),{x:B,y:K}=e.controls.offset,te=x=>{o&&o.go(x)};return d.useEffect(()=>{if(!C)return;const x=new ResizeObserver(E=>{if(!o)return;const[H]=E;g({width:Math.round(H.contentRect.width),height:Math.round(H.contentRect.height)})});return x.observe(C),()=>x.unobserve(C)},[C]),d.useEffect(()=>{!o||R.current===w.type||(L(x=>x+1),R.current=w.type)},[w.type]),a.jsx("div",{className:Ee(ue.wrapper,{[ue.editor]:r}),ref:S,children:a.jsxs("div",{className:ue.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:w.backgroundColor&&w.type==="fade in"?w.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Ee(ue.captionBlock),children:a.jsx("div",{className:ue.captionTextWrapper,children:t.map((x,E)=>a.jsx("div",{className:Ee(ue.captionText,Ml[P.alignment],{[ue.withPointerEvents]:E===$&&r,[ue.active]:E===$}),style:{fontFamily:Ir(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:i.sizing==="auto"?"max-content":y.scalingValue(i.width,r),letterSpacing:y.scalingValue(s,r),wordSpacing:y.scalingValue(u,r),textAlign:p,fontSize:y.scalingValue(T.fontSize,r),lineHeight:y.scalingValue(T.lineHeight,r),textTransform:v.textTransform??"none",textDecoration:v.textDecoration??"none",fontVariant:v.fontVariant??"normal",color:f,transitionDuration:w.duration?`${Math.round(parseInt(w.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:ue.captionTextInner,style:{"--link-hover-color":P.linkHoverColor,"--link-color":P.linkColor,position:"relative",top:y.scalingValue(P.offset.y,r),left:y.scalingValue(P.offset.x,r)},children:a.jsx(xn,{content:x.imageCaption})})},E))})}),a.jsx(Li,{onMove:x=>{b(x.index)},ref:l,options:{arrows:!1,speed:w.duration?parseInt(w.duration):500,autoplay:M.autoPlay!==null,...M.autoPlay!==null&&{interval:parseInt(M.autoPlay)*1e3},direction:N==="horiz"||w.type==="fade in"?"ltr":"ttb",pagination:!1,drag:M.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:w.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((x,E)=>a.jsx(Pi,{children:a.jsx("div",{className:ue.sliderItem,children:a.jsx("div",{className:ue.imgWrapper,children:a.jsx("img",{className:Ee(ue.sliderImage,{[ue.contain]:x.image.objectFit==="contain",[ue.cover]:x.image.objectFit==="cover"}),src:x.image.url,alt:x.image.name??""})})})},E))},F),A.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ee(ue.arrow,{[ue.arrowVertical]:N==="vert",[ue.hoverArrow]:A.show==="on hover"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:a.jsxs("button",{onClick:()=>{te("-1")},className:ue.arrowInner,style:{transform:`translate(${y.scalingValue(B,r)}, ${y.scalingValue(K*(N==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:[A.arrowsImgUrl&&a.jsx(Ht,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:Ee(ue.arrowImg,ue.mirror)}),!A.arrowsImgUrl&&a.jsx(Zi,{color:A.color,className:Ee(ue.arrowIcon,ue.arrowImg,ue.mirror)})]})}),a.jsx("div",{className:Ee(ue.arrow,ue.nextArrow,{[ue.arrowVertical]:N==="vert",[ue.hoverArrow]:A.show==="on hover"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:a.jsxs("button",{className:ue.arrowInner,onClick:()=>te("+1"),style:{transform:`translate(${y.scalingValue(B*(N==="horiz"?-1:1),r)}, ${y.scalingValue(K,r)}) scale(${e.controls.scale/100}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:[A.arrowsImgUrl&&a.jsx(Ht,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:ue.arrowImg}),!A.arrowsImgUrl&&a.jsx(Zi,{color:A.color,className:Ee(ue.arrowIcon,ue.arrowImg)})]})})]}),M.triggersList.click&&a.jsx("div",{className:ue.clickOverlay,onClick:()=>{o&&o.go("+1")}}),D.isActive&&a.jsx("div",{className:Ee(ue.pagination,{[ue.paginationInsideBottom]:D.position==="inside-1"&&N==="horiz",[ue.paginationInsideTop]:D.position==="inside-2"&&N==="horiz",[ue.paginationOutsideBottom]:D.position==="outside-1"&&N==="horiz",[ue.paginationOutsideTop]:D.position==="outside-2"&&N==="horiz",[ue.paginationInsideLeft]:D.position==="inside-1"&&N==="vert",[ue.paginationInsideRight]:D.position==="inside-2"&&N==="vert",[ue.paginationOutsideLeft]:D.position==="outside-1"&&N==="vert",[ue.paginationOutsideRight]:D.position==="outside-2"&&N==="vert",[ue.paginationVertical]:N==="vert"}),children:a.jsx("div",{className:ue.paginationInner,style:{backgroundColor:D.colors[2],transform:`scale(${D.scale/100}) translate(${y.scalingValue(D.offset.x,r)}, ${y.scalingValue(D.offset.y,r)}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:t.map((x,E)=>a.jsx("button",{onClick:()=>{o&&o.go(E)},className:Ee(ue.paginationItem),children:a.jsx("div",{className:Ee(ue.dot,{[ue.activeDot]:E===$}),style:{backgroundColor:E===$?D.colors[0]:D.colors[1],"--pagination-hover-color":D.hover}})},E))})})]})})}function Zi({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const kl={element:Il,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"]}},Rl="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Fl="ImageRevealSlider-module__image___Qjt-e",Wl="ImageRevealSlider-module__link___N-iLG",Hl="ImageRevealSlider-module__cursor___2U03d",dn={imageRevealSlider:Rl,image:Fl,link:Wl,cursor:Hl};function Qi(e,t,n){for(const r of n){const o=new Image;o.src=r.url;const l=r.width?Number.parseFloat(r.width):o.naturalWidth,i=o.naturalHeight/o.naturalWidth*l,c=l/2,s=i/2;if(e>=r.x-c&&e<=r.x+c&&t>=r.y-s&&t<=r.y+s)return!0}return!1}function Vr(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,r){let o,l;if(t==="custom"){o=n;const i=await Vr(e);l=i.height/i.width*o}else if(t==="random"){o=Math.random()*(r.max-r.min)+r.min;const i=await Vr(e);l=i.height/i.width*o}else{const i=await Vr(e);o=i.width,l=i.height}return{width:o,height:l,finalWidth:`${o}px`}}function Bl({settings:e,content:t,isEditor:n}){const[r,o]=d.useState(null),[l,i]=d.useState([]),[c,s]=d.useState(0),p=d.useRef(0),[u,T]=d.useState({x:0,y:0}),[v,f]=d.useState(1),[m,g]=d.useState("none"),C=d.useRef({x:0,y:0}),[S,$]=d.useState(!1),{sizeType:b,imageWidth:F,randomRangeImageWidth:L}=e.imageSize,{revealPosition:N,visible:w}=e.position,{cursorType:A,target:D,defaultCursorScale:P,defaultCursor:M,hoverCursorScale:R,hoverCursor:B}=e.cursor;d.useEffect(()=>{if(!r)return;const x=(W,_)=>{const z=r.getBoundingClientRect(),X=W-z.left,Z=_-z.top;if(T({x:X,y:Z}),A==="system"){g("none"),f(1);return}const k=X,J=Z,h=document.elementFromPoint(z.left+k,z.top+J);if(h&&h.closest("a")){g("none"),f(1);return}const ne=Qi(k,J,l)||D==="area"?{img:B??"none",scale:R}:{img:M??"none",scale:P};g(ne.img),f(ne.scale)},E=W=>{W.stopPropagation(),C.current={x:W.clientX,y:W.clientY},x(W.clientX,W.clientY)},H=()=>{S&&x(C.current.x,C.current.y)};return r.addEventListener("mousemove",E),window.addEventListener("scroll",H,!0),()=>{r.removeEventListener("mousemove",E),window.removeEventListener("scroll",H,!0)}},[r,S,u,A,D,B,M,R,P,l]),d.useEffect(()=>{S||(g("none"),f(0))},[S]);const K=async(x,E,H,W={})=>{const{width:_,height:z,finalWidth:X}=await Nl(x.image.url,b,F,L);let Z=0,k=0;N==="same"?(Z=E/2,k=H/2):(Z=W.x??Math.random()*E,k=W.y??Math.random()*H);const J=Math.min(Math.max(Z,_/2),E-_/2),h=Math.min(Math.max(k,z/2),H-z/2);return{id:p.current++,url:x.image.url,link:x.link,name:x.image.name,x:J,y:h,width:X}};d.useEffect(()=>{if(!r||t.length===0)return;const x=r.getBoundingClientRect(),E=x.width,H=x.height,W=[];(async()=>{const z=t[0],X=await K(z,E,H);W.push(X),i(W),s(1)})()},[b,F,L,N,r]),d.useEffect(()=>{w==="last One"&&i(x=>x.length>0?[x[x.length-1]]:[])},[w]);const te=async x=>{if(!r)return;const E=r.getBoundingClientRect(),H=x.clientX-E.left,W=x.clientY-E.top;if(D==="image"&&!Qi(H,W,l))return;let _=0,z=0;N==="on Click"?(_=H,z=W):N==="same"?(_=E.width/2,z=E.height/2):(_=Math.random()*E.width,z=Math.random()*E.height);const X=t[c],Z=await K(X,E.width,E.height,{x:_,y:z});i(k=>w==="all"?[...k,Z]:[Z]),s(k=>k>=t.length-1?0:k+1)};return a.jsxs("div",{ref:o,onClick:te,onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),className:dn.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[l.map(x=>a.jsx("div",{className:dn.wrapper,style:{top:`${x.y}px`,left:`${x.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:x.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:D==="area"&&x.link?a.jsx("a",{href:x.link,target:"_blank",className:dn.link,children:a.jsx("img",{src:x.url,alt:x.name,className:dn.image},x.id)}):a.jsx("img",{src:x.url,alt:x.name,className:dn.image},x.id)},x.id)),S&&a.jsx("div",{className:dn.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${v})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Ol={element:Bl,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:""}]}}}},Vl="LightBox-module__hidden___9s-9x",Dl="LightBox-module__heroImage___sTxNF",zl="LightBox-module__background___rm9ml",jl="LightBox-module__editor___4ACaY",ql="LightBox-module__contentStyle___Bgnsq",Kl="LightBox-module__imageStyle___tLIlB",Ul="LightBox-module__imgWrapper___LuFUp",Gl="LightBox-module__contain___8-yaS",Yl="LightBox-module__cover___hNvOG",Xl="LightBox-module__caption___b6L2I",Zl="LightBox-module__captionTextInner___rCGNH",Ql="LightBox-module__lightboxSplide___XFuWC",Jl="LightBox-module__arrow___iz38X",ec="LightBox-module__arrowVertical___Zfz81",tc="LightBox-module__nextArrow___zkAQN",nc="LightBox-module__arrowInner___p48sW",rc="LightBox-module__arrowIcon___3VaFf",ic="LightBox-module__arrowImg___pNV88",oc="LightBox-module__mirror___pjeXc",ac="LightBox-module__thumbsWrapper___GB-nU",sc="LightBox-module__thumbsContainerVertical___wttk5",lc="LightBox-module__thumbsContainer___osSma",cc="LightBox-module__thumbsAlignStart___MO6tY",dc="LightBox-module__thumbsAlignCenter___Q4sUx",uc="LightBox-module__thumbsAlignEnd___p4y9R",pc="LightBox-module__thumbItem___HvnF3",mc="LightBox-module__closeButton___g2khP",gc="LightBox-module__fadeIn___0m5GW",hc="LightBox-module__slideInLeft___gPYwC",fc="LightBox-module__slideInRight___S-pPp",yc="LightBox-module__slideInTop___DFdAj",vc="LightBox-module__slideInBottom___m27kZ",bc="LightBox-module__fadeOut___55qBR",xc="LightBox-module__slideOutLeft___NvU7P",Cc="LightBox-module__slideOutRight___SK7eC",$c="LightBox-module__slideOutTop___Vgg0z",Sc="LightBox-module__slideOutBottom___nJ0Ef",wc="LightBox-module__scaleSlide___vZriG",ee={hidden:Vl,heroImage:Dl,background:zl,editor:jl,contentStyle:ql,imageStyle:Kl,imgWrapper:Ul,contain:Gl,cover:Yl,caption:Xl,captionTextInner:Zl,lightboxSplide:Ql,arrow:Jl,arrowVertical:ec,nextArrow:tc,arrowInner:nc,arrowIcon:rc,arrowImg:ic,mirror:oc,thumbsWrapper:ac,thumbsContainerVertical:sc,thumbsContainer:lc,thumbsAlignStart:cc,thumbsAlignCenter:dc,thumbsAlignEnd:uc,thumbItem:pc,closeButton:mc,fadeIn:gc,slideInLeft:hc,slideInRight:fc,slideInTop:yc,slideInBottom:vc,fadeOut:bc,slideOutLeft:xc,slideOutRight:Cc,slideOutTop:$c,slideOutBottom:Sc,scaleSlide:wc},nr=(e,t,n)=>{const r={},[o,l]=e.split("-");return o==="top"?(r.top="0",r.bottom="auto"):o==="middle"?(r.top="50%",r.bottom="auto"):o==="bottom"&&(r.top="auto",r.bottom="0"),l==="left"?(r.left="0",r.right="auto"):l==="center"?(r.left="50%",r.right="auto"):l==="right"&&(r.left="auto",r.right="0"),o==="middle"&&l==="center"?r.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), calc(-50% + ${y.scalingValue(t.y,n)}))`:o==="middle"?r.transform=`translate(${y.scalingValue(t.x,n)}, calc(-50% + ${y.scalingValue(t.y,n)}))`:l==="center"?r.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), ${y.scalingValue(t.y,n)})`:r.transform=`translate(${y.scalingValue(t.x,n)}, ${y.scalingValue(t.y,n)})`,r};function pa(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 Ji(e){const t=e.getBoundingClientRect(),n=pa(e),r=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),l=e.naturalWidth,i=e.naturalHeight,c=r/o,s=l/i;let p,u;s>c?(p=r,u=r/s):(u=o,p=o*s);const T=t.left+n.left,v=t.top+n.top,f=(r-p)/2+T,m=(o-u)/2+v;return{x:f,y:m,width:p,height:u}}function eo(e){const t=e.getBoundingClientRect(),n=pa(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function to(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(o=>parseFloat(o.trim()));return r.length===4?r[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Tc(e,t){const n=(()=>{if(e==="fade in")return ee.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return ee.slideInLeft;case"right":return ee.slideInRight;case"top":return ee.slideInTop;case"bottom":return ee.slideInBottom;default:return ee.slideInRight}return ee.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return ee.fadeIn;if(e==="slide in")switch(t){case"left":return ee.slideInLeft;case"right":return ee.slideInRight;case"top":return ee.slideInTop;case"bottom":return ee.slideInBottom;default:return ee.slideInRight}return ee.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return ee.fadeOut;if(e==="slide in")switch(t){case"left":return ee.slideOutLeft;case"right":return ee.slideOutRight;case"top":return ee.slideOutTop;case"bottom":return ee.slideOutBottom;default:return ee.slideOutRight}return ee.fadeOut})(),l=(()=>{if(e==="fade in")return ee.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return ee.slideOutLeft;case"right":return ee.slideOutRight;case"top":return ee.slideOutTop;case"bottom":return ee.slideOutBottom;default:return ee.slideOutRight}return ee.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:o,disappearClass:l}}const Lc=({settings:e,content:t,styles:n,portalId:r,activeEvent:o,isEditor:l,isPreviewMode:i})=>{const[c,s]=d.useState(!1),{url:p}=e.thumbnailBlock.cover;return d.useEffect(()=>{o==="close"&&s(!1),o==="open"&&s(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:p,alt:"Cover",className:ee.heroImage,onClick:()=>s(!0)}),a.jsx(Pc,{isOpen:c,onClose:()=>s(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:l})]})},Pc=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:o,portalId:l,isEditor:i,metadata:c})=>{var _e;const{widthSettings:s,fontSettings:p,letterSpacing:u,textAlign:T,wordSpacing:v,fontSizeLineHeight:f,textAppearance:m,color:g}=r.imageCaption??{},[C,S]=d.useState(0),[$,b]=d.useState(0),[F,L]=d.useState(!1),[N,w]=d.useState(!1),[A,D]=d.useState({}),P=d.useRef(null),M=d.useRef(null),R=d.useRef(null),B=d.useRef(!1),K=d.useRef(null),te=d.useRef(null),x=d.useRef(null),E=d.useRef(null),H=d.useRef(!1),W=d.useRef(null),[_,z]=d.useState(!1),{appear:X,triggers:Z,slider:k,thumbnail:J,controls:h,area:ne,caption:he,layout:ce}=o.lightboxBlock,{appearClass:be,backdropAppearClass:re,backdropDisappearClass:de,disappearClass:V}=Tc(X.type,X.direction),U=(c==null?void 0:c.itemId)??null;d.useEffect(()=>{const O=()=>{setTimeout(()=>{var I,j;(j=(I=P.current)==null?void 0:I.splide)==null||j.refresh()},16)},ie=()=>{b(I=>I+1)};return window.addEventListener("ArticleEditor.Layout:change",O),window.addEventListener("ArticleEditor.ComponentContent:change",ie),()=>{window.removeEventListener("ArticleEditor.Layout:change",O),window.removeEventListener("ArticleEditor.ComponentContent:change",ie)}},[]),d.useEffect(()=>{if(!e||!J.isActive){z(!1);return}const O=W.current;if(!O)return;const ie=()=>{k.direction==="horiz"?z(O.scrollWidth>O.clientWidth):z(O.scrollHeight>O.clientHeight)};ie();const I=new ResizeObserver(ie);return I.observe(O),()=>I.disconnect()},[e,J.isActive,n.length,A,k.direction]);const G=d.useCallback(()=>{const O=window.matchMedia("(max-width: 768px)").matches,ie=to(ne.color);O&&!i&&ie>.9&&(document.body.style.backgroundColor=""),L(!0),B.current=!0;const I=j=>{j.target===K.current&&j.animationName&&(K.current&&te.current&&K.current.removeEventListener("animationend",te.current),te.current=null,B.current&&(B.current=!1,t()),L(!1))};K.current&&(te.current=I,K.current.addEventListener("animationend",I))},[t,ne.color,i]),se=(O,ie,I)=>{var j,q;if(O){if(Z.type==="click"&&Z.switch==="image")Z.repeat==="close"&&C===n.length-1?G():(j=P.current)==null||j.go("+1");else if(Z.type==="click"&&Z.switch==="50/50"){const Y=O.getBoundingClientRect(),ae=ie-Y.left,me=I-Y.top,ke=Y.width,fe=Y.height;let ve;k.direction==="horiz"?ve=ae<ke/2?"-1":"+1":ve=me<fe/2?"-1":"+1",(q=P.current)==null||q.go(ve)}}},ye=O=>{if(H.current){H.current=!1;return}const ie=n[C],I=(ie==null?void 0:ie.image.objectFit)==="cover";let j,q;if("changedTouches"in O&&O.changedTouches.length>0)j=O.changedTouches[0].clientX,q=O.changedTouches[0].clientY;else if("clientX"in O)j=O.clientX,q=O.clientY;else return;let Y;if(I&&R.current){const ae=eo(R.current);Y=j>=ae.left&&j<=ae.right&&q>=ae.top&&q<=ae.bottom}else{const ae=R.current?Ji(R.current):null;if(!ae){O.target===O.currentTarget&&G();return}Y=j>=ae.x&&j<=ae.x+ae.width&&q>=ae.y&&q<=ae.y+ae.height}Y?se(R.current,j,q):G()},Te=O=>{const ie=O.target;(ie.classList.contains(ee.thumbsWrapper)||ie.classList.contains(ee.thumbsContainer))&&ye(O)};d.useEffect(()=>{if(!e)return;const O=ie=>{var I,j;if(ie.key==="Escape"){G();return}if(ie.key==="ArrowRight"){S(q=>(q+1)%Math.max(n.length,1)),(I=P.current)==null||I.go("+1");return}ie.key==="ArrowLeft"&&(S(q=>(q-1+Math.max(n.length,1))%Math.max(n.length,1)),(j=P.current)==null||j.go("-1"))};return window.addEventListener("keydown",O),()=>{window.removeEventListener("keydown",O)}},[e,G,n.length]),d.useEffect(()=>{if(e){if(S(0),b(ie=>ie+1),B.current=!1,L(!1),w(!1),D({}),!U)return;const O=new CustomEvent("page-overlay",{detail:{itemId:U}});window.dispatchEvent(O)}return()=>{K.current&&te.current&&(K.current.removeEventListener("animationend",te.current),te.current=null),w(!1)}},[e,U]),d.useEffect(()=>{M.current!==null&&M.current!==k.type&&b(O=>O+1),M.current=k.type},[k.type]),d.useEffect(()=>{if(!e)return;const O=document.body.style.overflow,ie=window.matchMedia("(max-width: 768px)").matches,I=to(ne.color);document.body.style.overflow="hidden",w(!1);const j=Y=>{Y.target===K.current&&!B.current&&Y.animationName&&(ie&&!i&&I>.9&&(document.body.style.backgroundColor=ne.color),w(!0),K.current&&x.current&&K.current.removeEventListener("animationend",x.current),x.current=null)};K.current&&(x.current=j,K.current.addEventListener("animationend",j));const q=Y=>{const ae=Y.target;ae&&(ae.closest(`.${ee.thumbsWrapper}`)||ae.closest(`.${ee.thumbsContainer}`))||k.type!=="slide"&&Y.preventDefault()};return document.addEventListener("touchmove",q,{passive:!1}),()=>{document.body.style.overflow=O,document.removeEventListener("touchmove",q),K.current&&x.current&&(K.current.removeEventListener("animationend",x.current),x.current=null),w(!1)}},[e,i,ne.color,k.type]),d.useEffect(()=>{if(!e)return;const O=ie=>{var j,q;if(B.current){ie.stopPropagation();return}if(H.current){H.current=!1;return}const I=ie.target;if(!(I&&(I.closest(`.${ee.thumbsContainer}`)||I.closest(`.${ee.thumbItem}`)||I.closest(`.${ee.arrow}`)||I.closest(`.${ee.closeButton}`)||I.closest(`.${ee.caption}`)))){if(k.type==="slide"&&Z.type==="drag"&&((q=(j=P.current)==null?void 0:j.splide)!=null&&q.root)){const Y=P.current.splide.root;if(I&&(Y.contains(I)||Y===I))return}if(ie.touches.length===0&&ie.changedTouches.length>0){const Y=n[C],ae=(Y==null?void 0:Y.image.objectFit)==="cover",me=ie.changedTouches[0];let ke;if(ae&&R.current){const fe=eo(R.current);ke=me.clientX>=fe.left&&me.clientX<=fe.right&&me.clientY>=fe.top&&me.clientY<=fe.bottom}else{const fe=R.current?Ji(R.current):null;if(!fe)return;ke=me.clientX>=fe.x&&me.clientX<=fe.x+fe.width&&me.clientY>=fe.y&&me.clientY<=fe.y+fe.height}if(!ke){ie.stopPropagation(),B.current=!0;const fe=ve=>{ve.stopPropagation(),ve.preventDefault(),document.removeEventListener("click",fe,!0)};document.addEventListener("click",fe,!0),G()}}}};return document.addEventListener("touchend",O,{passive:!0}),()=>{document.removeEventListener("touchend",O)}},[e,G,C,n]);const $e=(k.type==="scale"||k.type==="fade")&&k.direction==="vert"&&Z.type==="drag";d.useEffect(()=>{var ve,Re;if(!e||!$e||!((Re=(ve=P.current)==null?void 0:ve.splide)!=null&&Re.root))return;const O=P.current.splide.root,ie=30,I=(oe,xe)=>{if(E.current){const Me=Math.abs(oe-E.current.x),Ie=Math.abs(xe-E.current.y);(Me>0||Ie>0)&&(H.current=!0)}},j=oe=>{E.current&&(oe.preventDefault(),I(oe.clientX,oe.clientY))},q=oe=>{E.current&&oe.touches.length>0&&(oe.preventDefault(),I(oe.touches[0].clientX,oe.touches[0].clientY))},Y=(oe,xe)=>{if(!E.current||!P.current){E.current=null;return}const Me=Math.abs(oe-E.current.x),Ie=Math.abs(xe-E.current.y);Ie>ie&&Ie>Me&&P.current.go(xe<E.current.y?"+1":"-1"),E.current=null},ae=oe=>{E.current&&Y(oe.clientX,oe.clientY),document.removeEventListener("pointerup",ae),document.removeEventListener("pointercancel",ae),document.removeEventListener("pointermove",j)},me=oe=>{if(E.current){if(oe.changedTouches.length>0){const xe=oe.changedTouches[0];Y(xe.clientX,xe.clientY)}document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),document.removeEventListener("touchmove",q)}},ke=oe=>{E.current={x:oe.clientX,y:oe.clientY},H.current=!1,document.addEventListener("pointermove",j,{passive:!1}),document.addEventListener("pointerup",ae),document.addEventListener("pointercancel",ae)},fe=oe=>{oe.touches.length>0&&(E.current={x:oe.touches[0].clientX,y:oe.touches[0].clientY},H.current=!1,document.addEventListener("touchmove",q,{passive:!1}),document.addEventListener("touchend",me),document.addEventListener("touchcancel",me))};return O.addEventListener("pointerdown",ke),O.addEventListener("touchstart",fe),()=>{O.removeEventListener("pointerdown",ke),O.removeEventListener("touchstart",fe),document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",ae),document.removeEventListener("pointercancel",ae),document.removeEventListener("touchmove",q),document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),E.current=null,H.current=!1}},[e,$e,$]);const Pe={backgroundColor:ne.color,backdropFilter:`blur(${ne.blur}px)`,animationDuration:`${parseInt(X.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:_o.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:i?null:K,className:Ee(ee.background,F?de:re,{[ee.editor]:i},{[ee.hidden]:!e}),style:{...Pe,...N&&!i&&!F?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?K:null,className:Ee(ee.contentStyle,F?V:be,{[ee.editor]:i},{[ee.hidden]:!e}),style:{animationDuration:`${parseInt(X.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Li,{onMove:O=>S(O.index),ref:P,className:ee.lightboxSplide,options:{arrows:!1,speed:k.duration?parseInt(k.duration):500,direction:k.direction==="horiz"||k.type==="fade"||k.type==="scale"?"ltr":"ttb",pagination:!1,drag:Z.type==="drag"&&!$e,perPage:1,width:"100%",height:"100%",type:k.type==="fade"||k.type==="scale"?"fade":"loop",padding:0,rewind:Z.repeat!=="close",start:0},style:{"--splide-speed":k.duration},children:n.map((O,ie)=>{const I=nr(ce.position,ce.offset,i),j=`${y.scalingValue(ce.padding.top,i)} ${y.scalingValue(ce.padding.right,i)} ${y.scalingValue(ce.padding.bottom,i)} ${y.scalingValue(ce.padding.left,i)}`,q=k.type==="scale"?(()=>{const{transform:Y,...ae}=I;return{...ae,position:"absolute",padding:j,boxSizing:"border-box","--position-transform":Y||"none"}})():{...I,position:"absolute",padding:j,boxSizing:"border-box"};return a.jsx(Pi,{children:a.jsx("div",{className:ee.imgWrapper,onClick:ye,children:a.jsx("img",{ref:ie===C?R:null,className:Ee(ee.imageStyle,{[ee.contain]:O.image.objectFit==="contain",[ee.cover]:O.image.objectFit==="cover",[ee.scaleSlide]:k.type==="scale"}),src:O.image.url,alt:O.image.name??"",style:{...q,pointerEvents:O.image.objectFit==="contain"?"none":"auto"}})})},ie)})},$),h.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ee(ee.arrow,{[ee.arrowVertical]:k.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:a.jsxs("button",{className:ee.arrowInner,style:{transform:`translate(${y.scalingValue(h.offset.x,i)}, ${y.scalingValue(h.offset.y*(k.direction==="horiz"?1:-1),i)}) scale(${h.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var O;return(O=P.current)==null?void 0:O.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&a.jsx(Ht,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:Ee(ee.arrowImg,ee.mirror)}),!h.arrowsImgUrl&&a.jsx(no,{color:h.color,className:Ee(ee.arrowIcon,ee.arrowImg,ee.mirror)})]})}),a.jsx("div",{className:Ee(ee.arrow,ee.nextArrow,{[ee.arrowVertical]:k.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:a.jsxs("button",{className:ee.arrowInner,style:{transform:`translate(${y.scalingValue(h.offset.x*(k.direction==="horiz"?-1:1),i)}, ${y.scalingValue(h.offset.y,i)}) scale(${h.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var O;return(O=P.current)==null?void 0:O.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&a.jsx(Ht,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:ee.arrowImg}),!h.arrowsImgUrl&&a.jsx(no,{color:h.color,className:Ee(ee.arrowIcon,ee.arrowImg)})]})})]}),ne.closeIconUrl&&(()=>{const O=nr(ne.closeIconAlign,ne.closeIconOffset,i),ie=`scale(${ne.closeIconScale})`,I=O.transform?`${O.transform} ${ie}`:ie;return a.jsx("button",{className:ee.closeButton,style:{...O,transform:I},onClick:G,"aria-label":"Close lightbox",children:a.jsx(Ht,{url:ne.closeIconUrl,fill:ne.closeIconColor??"#000000",hoverFill:ne.closeIconHover??"#cccccc"})})})(),he&&he.isActive&&r.imageCaption&&((_e=n[C])==null?void 0:_e.imageCaption)&&a.jsx("div",{className:ee.caption,style:{...nr(he.alignment,he.offset,i),fontFamily:Ir(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:s.sizing==="auto"?"max-content":y.scalingValue(s.width,i),letterSpacing:y.scalingValue(u,i),wordSpacing:y.scalingValue(v,i),textAlign:T,fontSize:y.scalingValue(f.fontSize,i),lineHeight:y.scalingValue(f.lineHeight,i),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:g},onClick:O=>O.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:ee.captionTextInner,style:{"--link-color":he.linkColor,"--link-hover-color":he.linkHoverColor},children:a.jsx(xn,{content:n[C].imageCaption})})}),J.isActive&&(()=>{const[O,ie]=J.position.split("-"),I=k.direction==="horiz"?`${O}-left`:J.position,j=nr(I,J.offset,i),q=()=>{if(k.direction==="horiz"){if(ie==="left")return"flex-start";if(ie==="center")return"center";if(ie==="right")return"flex-end"}else{if(O==="top")return"flex-start";if(O==="middle")return"center";if(O==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:W,className:ee.thumbsWrapper,onClick:Y=>Te(Y),style:{position:i?"absolute":"fixed",...j,...k.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Ee(ee.thumbsContainer,{[ee.thumbsContainerVertical]:k.direction==="vert",[ee.thumbsAlignStart]:J.align==="start",[ee.thumbsAlignCenter]:J.align==="center",[ee.thumbsAlignEnd]:J.align==="end"}),style:{gap:y.scalingValue(J.grid.gap,i),justifyContent:_?"flex-start":q()},children:n.map((Y,ae)=>{const me=ae===C,ke=A[ae],ve=J.grid.size*(me?J.activeState.scale:1),Re=()=>{if(J.fit!=="fit")return{};if(!ke)return k.direction==="horiz"?{height:y.scalingValue(ve,i)}:{width:y.scalingValue(ve,i)};const oe=ke.width/ke.height;if(k.direction==="horiz"){const xe=ve,Me=xe*oe;return{width:y.scalingValue(Me,i),height:y.scalingValue(xe,i)}}else{const xe=ve,Me=xe/oe;return{width:y.scalingValue(xe,i),height:y.scalingValue(Me,i)}}};return a.jsx("button",{className:ee.thumbItem,style:{...k.direction==="horiz"&&J.fit!=="fit"?{height:y.scalingValue(ve,i)}:{},...k.direction==="vert"&&J.fit!=="fit"?{width:y.scalingValue(ve,i)}:{},...J.fit==="cover"?{width:y.scalingValue(ve,i),height:y.scalingValue(ve,i)}:{},...Re(),transition:me?"all 0.25s ease-out":"none",opacity:me?J.activeState.opacity/100:J.opacity/100,"--thumb-hover":J.activeState.opacity/100},onClick:oe=>{var xe;oe.stopPropagation(),S(ae),(xe=P.current)==null||xe.go(ae)},onMouseEnter:()=>{var oe;J.triggers==="hov"&&((oe=P.current)==null||oe.go(ae))},children:a.jsx("img",{src:Y.image.url,alt:Y.image.name??"",onLoad:oe=>{const xe=oe.currentTarget;xe.naturalWidth&&xe.naturalHeight&&D(Me=>({...Me,[ae]:{width:xe.naturalWidth,height:xe.naturalHeight}}))},style:{objectFit:J.fit==="cover"?"cover":"contain",...J.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...J.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Y.image.name}-${ae}`)})})})})()]})]}),document.getElementById(l))};function no({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ec={element:Lc,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 rr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function _c(e){return`
6
+ */const $l="RichTextRenderer-module__link___BWeZ2",wl={link:$l},Tl=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(r=>/^\d/.test(r))},Ir=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Tl(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function yt(e){const{color:t,...n}=e;return n}function et(e,t){var o,l,i;const{fontSize:n,lineHeight:r}=e;return{fontFamily:Ir(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:x.scalingValue(e.letterSpacing,t),wordSpacing:x.scalingValue(e.wordSpacing,t),fontSize:x.scalingValue(n,t),lineHeight:r!==void 0?x.scalingValue(r,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(l=e.textAppearance)==null?void 0:l.textDecoration,fontVariant:(i=e.textAppearance)==null?void 0:i.fontVariant,textAlign:e.textAlign,color:e.color}}const xn=({content:e})=>{const t=n=>n.map((r,o)=>r.type==="link"?a.jsx("a",{className:wl.link,href:r.value,target:r.target,children:t(r.children)},o):a.jsx("span",{style:Ll(r),children:r.text},o));return a.jsx(a.Fragment,{children:e.map((n,r)=>{const o=n.children;return a.jsx("div",{children:t(o)},r)})})};function Ll(e){return{...e.fontFamily&&{fontFamily:Ir(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 El="SvgImage-module__svg___q3xE-",Pl="SvgImage-module__img___VsTm-",Xi={svg:El,img:Pl},_l=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Al=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Nt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:o})=>{const[l,i]=c.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return c.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(d)}},[]),!_l(e)||!l?a.jsx("img",{src:e,alt:"",className:Pe(Xi.img,r),style:o}):a.jsx("span",{"data-supports-mask":l,className:Pe(Xi.svg,r),style:{"--svg":Al(e),"--fill":t,"--hover-fill":n,...o??{}}})},Ml={"top-left":me.topLeftAlignment,"top-center":me.topCenterAlignment,"top-right":me.topRightAlignment,"middle-left":me.middleLeftAlignment,"middle-center":me.middleCenterAlignment,"middle-right":me.middleRightAlignment,"bottom-left":me.bottomLeftAlignment,"bottom-center":me.bottomCenterAlignment,"bottom-right":me.bottomRightAlignment};function Il({settings:e,content:t,styles:n,isEditor:r}){const[o,l]=c.useState(null),{widthSettings:i,fontSettings:d,letterSpacing:s,textAlign:p,wordSpacing:u,fontSizeLineHeight:w,textAppearance:C,color:b}=n.imageCaption??{},[m,h]=c.useState(void 0),[S,y]=c.useState(null),[$,f]=c.useState(0),[F,L]=c.useState(0),{direction:D,transition:v,controls:E,pagination:j,imageCaption:T,triggers:k}=e,R=c.useRef(v.type),{x:N,y:q}=e.controls.offset,ie=M=>{o&&o.go(M)};return c.useEffect(()=>{if(!S)return;const M=new ResizeObserver(W=>{if(!o)return;const[z]=W;h({width:Math.round(z.contentRect.width),height:Math.round(z.contentRect.height)})});return M.observe(S),()=>M.unobserve(S)},[S]),c.useEffect(()=>{!o||R.current===v.type||(L(M=>M+1),R.current=v.type)},[v.type]),a.jsx("div",{className:Pe(me.wrapper,{[me.editor]:r}),ref:y,children:a.jsxs("div",{className:me.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&&a.jsx("div",{className:Pe(me.captionBlock),children:a.jsx("div",{className:me.captionTextWrapper,children:t.map((M,W)=>a.jsx("div",{className:Pe(me.captionText,Ml[T.alignment],{[me.withPointerEvents]:W===$&&r,[me.active]:W===$}),style:{fontFamily:Ir(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:i.sizing==="auto"?"max-content":x.scalingValue(i.width,r),letterSpacing:x.scalingValue(s,r),wordSpacing:x.scalingValue(u,r),textAlign:p,fontSize:x.scalingValue(w.fontSize,r),lineHeight:x.scalingValue(w.lineHeight,r),textTransform:C.textTransform??"none",textDecoration:C.textDecoration??"none",fontVariant:C.fontVariant??"normal",color:b,transitionDuration:v.duration?`${Math.round(parseInt(v.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:me.captionTextInner,style:{"--link-hover-color":T.linkHoverColor,"--link-color":T.linkColor,position:"relative",top:x.scalingValue(T.offset.y,r),left:x.scalingValue(T.offset.x,r)},children:a.jsx(xn,{content:M.imageCaption})})},W))})}),a.jsx(Li,{onMove:M=>{f(M.index)},ref:l,options:{arrows:!1,speed:v.duration?parseInt(v.duration):500,autoplay:k.autoPlay!==null,...k.autoPlay!==null&&{interval:parseInt(k.autoPlay)*1e3},direction:D==="horiz"||v.type==="fade in"?"ltr":"ttb",pagination:!1,drag:k.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((M,W)=>a.jsx(Ei,{children:a.jsx("div",{className:me.sliderItem,children:a.jsx("div",{className:me.imgWrapper,children:a.jsx("img",{className:Pe(me.sliderImage,{[me.contain]:M.image.objectFit==="contain",[me.cover]:M.image.objectFit==="cover"}),src:M.image.url,alt:M.image.name??""})})})},W))},F),E.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Pe(me.arrow,{[me.arrowVertical]:D==="vert",[me.hoverArrow]:E.show==="on hover"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:a.jsxs("button",{onClick:()=>{ie("-1")},className:me.arrowInner,style:{transform:`translate(${x.scalingValue(N,r)}, ${x.scalingValue(q*(D==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${D==="horiz"?"0deg":"90deg"})`},children:[E.arrowsImgUrl&&a.jsx(Nt,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:Pe(me.arrowImg,me.mirror)}),!E.arrowsImgUrl&&a.jsx(Zi,{color:E.color,className:Pe(me.arrowIcon,me.arrowImg,me.mirror)})]})}),a.jsx("div",{className:Pe(me.arrow,me.nextArrow,{[me.arrowVertical]:D==="vert",[me.hoverArrow]:E.show==="on hover"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:a.jsxs("button",{className:me.arrowInner,onClick:()=>ie("+1"),style:{transform:`translate(${x.scalingValue(N*(D==="horiz"?-1:1),r)}, ${x.scalingValue(q,r)}) scale(${e.controls.scale/100}) rotate(${D==="horiz"?"0deg":"90deg"})`},children:[E.arrowsImgUrl&&a.jsx(Nt,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:me.arrowImg}),!E.arrowsImgUrl&&a.jsx(Zi,{color:E.color,className:Pe(me.arrowIcon,me.arrowImg)})]})})]}),k.triggersList.click&&a.jsx("div",{className:me.clickOverlay,onClick:()=>{o&&o.go("+1")}}),j.isActive&&a.jsx("div",{className:Pe(me.pagination,{[me.paginationInsideBottom]:j.position==="inside-1"&&D==="horiz",[me.paginationInsideTop]:j.position==="inside-2"&&D==="horiz",[me.paginationOutsideBottom]:j.position==="outside-1"&&D==="horiz",[me.paginationOutsideTop]:j.position==="outside-2"&&D==="horiz",[me.paginationInsideLeft]:j.position==="inside-1"&&D==="vert",[me.paginationInsideRight]:j.position==="inside-2"&&D==="vert",[me.paginationOutsideLeft]:j.position==="outside-1"&&D==="vert",[me.paginationOutsideRight]:j.position==="outside-2"&&D==="vert",[me.paginationVertical]:D==="vert"}),children:a.jsx("div",{className:me.paginationInner,style:{backgroundColor:j.colors[2],transform:`scale(${j.scale/100}) translate(${x.scalingValue(j.offset.x,r)}, ${x.scalingValue(j.offset.y,r)}) rotate(${D==="horiz"?"0deg":"90deg"})`},children:t.map((M,W)=>a.jsx("button",{onClick:()=>{o&&o.go(W)},className:Pe(me.paginationItem),children:a.jsx("div",{className:Pe(me.dot,{[me.activeDot]:W===$}),style:{backgroundColor:W===$?j.colors[0]:j.colors[1],"--pagination-hover-color":j.hover}})},W))})})]})})}function Zi({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Rl={element:Il,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"]}},kl="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Fl="ImageRevealSlider-module__image___Qjt-e",Wl="ImageRevealSlider-module__link___N-iLG",Hl="ImageRevealSlider-module__cursor___2U03d",dn={imageRevealSlider:kl,image:Fl,link:Wl,cursor:Hl};function Qi(e,t,n){for(const r of n){const o=new Image;o.src=r.url;const l=r.width?Number.parseFloat(r.width):o.naturalWidth,i=o.naturalHeight/o.naturalWidth*l,d=l/2,s=i/2;if(e>=r.x-d&&e<=r.x+d&&t>=r.y-s&&t<=r.y+s)return!0}return!1}function Vr(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,r){let o,l;if(t==="custom"){o=n;const i=await Vr(e);l=i.height/i.width*o}else if(t==="random"){o=Math.random()*(r.max-r.min)+r.min;const i=await Vr(e);l=i.height/i.width*o}else{const i=await Vr(e);o=i.width,l=i.height}return{width:o,height:l,finalWidth:`${o}px`}}function Ol({settings:e,content:t,isEditor:n}){const[r,o]=c.useState(null),[l,i]=c.useState([]),[d,s]=c.useState(0),p=c.useRef(0),[u,w]=c.useState({x:0,y:0}),[C,b]=c.useState(1),[m,h]=c.useState("none"),S=c.useRef({x:0,y:0}),[y,$]=c.useState(!1),{sizeType:f,imageWidth:F,randomRangeImageWidth:L}=e.imageSize,{revealPosition:D,visible:v}=e.position,{cursorType:E,target:j,defaultCursorScale:T,defaultCursor:k,hoverCursorScale:R,hoverCursor:N}=e.cursor;c.useEffect(()=>{if(!r)return;const M=(V,P)=>{const G=r.getBoundingClientRect(),ee=V-G.left,Y=P-G.top;if(w({x:ee,y:Y}),E==="system"){h("none"),b(1);return}const A=ee,ae=Y,g=document.elementFromPoint(G.left+A,G.top+ae);if(g&&g.closest("a")){h("none"),b(1);return}const ne=Qi(A,ae,l)||j==="area"?{img:N??"none",scale:R}:{img:k??"none",scale:T};h(ne.img),b(ne.scale)},W=V=>{V.stopPropagation(),S.current={x:V.clientX,y:V.clientY},M(V.clientX,V.clientY)},z=()=>{y&&M(S.current.x,S.current.y)};return r.addEventListener("mousemove",W),window.addEventListener("scroll",z,!0),()=>{r.removeEventListener("mousemove",W),window.removeEventListener("scroll",z,!0)}},[r,y,u,E,j,N,k,R,T,l]),c.useEffect(()=>{y||(h("none"),b(0))},[y]);const q=async(M,W,z,V={})=>{const{width:P,height:G,finalWidth:ee}=await Nl(M.image.url,f,F,L);let Y=0,A=0;D==="same"?(Y=W/2,A=z/2):(Y=V.x??Math.random()*W,A=V.y??Math.random()*z);const ae=Math.min(Math.max(Y,P/2),W-P/2),g=Math.min(Math.max(A,G/2),z-G/2);return{id:p.current++,url:M.image.url,link:M.link,name:M.image.name,x:ae,y:g,width:ee}};c.useEffect(()=>{if(!r||t.length===0)return;const M=r.getBoundingClientRect(),W=M.width,z=M.height,V=[];(async()=>{const G=t[0],ee=await q(G,W,z);V.push(ee),i(V),s(1)})()},[f,F,L,D,r]),c.useEffect(()=>{v==="last One"&&i(M=>M.length>0?[M[M.length-1]]:[])},[v]);const ie=async M=>{if(!r)return;const W=r.getBoundingClientRect(),z=M.clientX-W.left,V=M.clientY-W.top;if(j==="image"&&!Qi(z,V,l))return;let P=0,G=0;D==="on Click"?(P=z,G=V):D==="same"?(P=W.width/2,G=W.height/2):(P=Math.random()*W.width,G=Math.random()*W.height);const ee=t[d],Y=await q(ee,W.width,W.height,{x:P,y:G});i(A=>v==="all"?[...A,Y]:[Y]),s(A=>A>=t.length-1?0:A+1)};return a.jsxs("div",{ref:o,onClick:ie,onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),className:dn.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[l.map(M=>a.jsx("div",{className:dn.wrapper,style:{top:`${M.y}px`,left:`${M.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:M.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:j==="area"&&M.link?a.jsx("a",{href:M.link,target:"_blank",className:dn.link,children:a.jsx("img",{src:M.url,alt:M.name,className:dn.image},M.id)}):a.jsx("img",{src:M.url,alt:M.name,className:dn.image},M.id)},M.id)),y&&a.jsx("div",{className:dn.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${C})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Bl={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:""}]}}}},Vl="LightBox-module__hidden___9s-9x",Dl="LightBox-module__heroImage___sTxNF",zl="LightBox-module__background___rm9ml",jl="LightBox-module__editor___4ACaY",ql="LightBox-module__contentStyle___Bgnsq",Kl="LightBox-module__imageStyle___tLIlB",Gl="LightBox-module__imgWrapper___LuFUp",Ul="LightBox-module__contain___8-yaS",Yl="LightBox-module__cover___hNvOG",Xl="LightBox-module__caption___b6L2I",Zl="LightBox-module__captionTextInner___rCGNH",Ql="LightBox-module__lightboxSplide___XFuWC",Jl="LightBox-module__arrow___iz38X",ec="LightBox-module__arrowVertical___Zfz81",tc="LightBox-module__nextArrow___zkAQN",nc="LightBox-module__arrowInner___p48sW",rc="LightBox-module__arrowIcon___3VaFf",ic="LightBox-module__arrowImg___pNV88",oc="LightBox-module__mirror___pjeXc",ac="LightBox-module__thumbsWrapper___GB-nU",sc="LightBox-module__thumbsContainerVertical___wttk5",lc="LightBox-module__thumbsContainer___osSma",cc="LightBox-module__thumbsAlignStart___MO6tY",dc="LightBox-module__thumbsAlignCenter___Q4sUx",uc="LightBox-module__thumbsAlignEnd___p4y9R",pc="LightBox-module__thumbItem___HvnF3",mc="LightBox-module__closeButton___g2khP",gc="LightBox-module__fadeIn___0m5GW",hc="LightBox-module__slideInLeft___gPYwC",fc="LightBox-module__slideInRight___S-pPp",yc="LightBox-module__slideInTop___DFdAj",vc="LightBox-module__slideInBottom___m27kZ",bc="LightBox-module__fadeOut___55qBR",xc="LightBox-module__slideOutLeft___NvU7P",Cc="LightBox-module__slideOutRight___SK7eC",Sc="LightBox-module__slideOutTop___Vgg0z",$c="LightBox-module__slideOutBottom___nJ0Ef",wc="LightBox-module__scaleSlide___vZriG",oe={hidden:Vl,heroImage:Dl,background:zl,editor:jl,contentStyle:ql,imageStyle:Kl,imgWrapper:Gl,contain:Ul,cover:Yl,caption:Xl,captionTextInner:Zl,lightboxSplide:Ql,arrow:Jl,arrowVertical:ec,nextArrow:tc,arrowInner:nc,arrowIcon:rc,arrowImg:ic,mirror:oc,thumbsWrapper:ac,thumbsContainerVertical:sc,thumbsContainer:lc,thumbsAlignStart:cc,thumbsAlignCenter:dc,thumbsAlignEnd:uc,thumbItem:pc,closeButton:mc,fadeIn:gc,slideInLeft:hc,slideInRight:fc,slideInTop:yc,slideInBottom:vc,fadeOut:bc,slideOutLeft:xc,slideOutRight:Cc,slideOutTop:Sc,slideOutBottom:$c,scaleSlide:wc},nr=(e,t,n)=>{const r={},[o,l]=e.split("-");return o==="top"?(r.top="0",r.bottom="auto"):o==="middle"?(r.top="50%",r.bottom="auto"):o==="bottom"&&(r.top="auto",r.bottom="0"),l==="left"?(r.left="0",r.right="auto"):l==="center"?(r.left="50%",r.right="auto"):l==="right"&&(r.left="auto",r.right="0"),o==="middle"&&l==="center"?r.transform=`translate(calc(-50% + ${x.scalingValue(t.x,n)}), calc(-50% + ${x.scalingValue(t.y,n)}))`:o==="middle"?r.transform=`translate(${x.scalingValue(t.x,n)}, calc(-50% + ${x.scalingValue(t.y,n)}))`:l==="center"?r.transform=`translate(calc(-50% + ${x.scalingValue(t.x,n)}), ${x.scalingValue(t.y,n)})`:r.transform=`translate(${x.scalingValue(t.x,n)}, ${x.scalingValue(t.y,n)})`,r};function pa(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 Ji(e){const t=e.getBoundingClientRect(),n=pa(e),r=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),l=e.naturalWidth,i=e.naturalHeight,d=r/o,s=l/i;let p,u;s>d?(p=r,u=r/s):(u=o,p=o*s);const w=t.left+n.left,C=t.top+n.top,b=(r-p)/2+w,m=(o-u)/2+C;return{x:b,y:m,width:p,height:u}}function eo(e){const t=e.getBoundingClientRect(),n=pa(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function to(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(o=>parseFloat(o.trim()));return r.length===4?r[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Tc(e,t){const n=(()=>{if(e==="fade in")return oe.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return oe.slideInLeft;case"right":return oe.slideInRight;case"top":return oe.slideInTop;case"bottom":return oe.slideInBottom;default:return oe.slideInRight}return oe.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return oe.fadeIn;if(e==="slide in")switch(t){case"left":return oe.slideInLeft;case"right":return oe.slideInRight;case"top":return oe.slideInTop;case"bottom":return oe.slideInBottom;default:return oe.slideInRight}return oe.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return oe.fadeOut;if(e==="slide in")switch(t){case"left":return oe.slideOutLeft;case"right":return oe.slideOutRight;case"top":return oe.slideOutTop;case"bottom":return oe.slideOutBottom;default:return oe.slideOutRight}return oe.fadeOut})(),l=(()=>{if(e==="fade in")return oe.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return oe.slideOutLeft;case"right":return oe.slideOutRight;case"top":return oe.slideOutTop;case"bottom":return oe.slideOutBottom;default:return oe.slideOutRight}return oe.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:o,disappearClass:l}}const Lc=({settings:e,content:t,styles:n,portalId:r,activeEvent:o,isEditor:l,isPreviewMode:i})=>{const[d,s]=c.useState(!1),{url:p}=e.thumbnailBlock.cover;return c.useEffect(()=>{o==="close"&&s(!1),o==="open"&&s(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:p,alt:"Cover",className:oe.heroImage,onClick:()=>s(!0)}),a.jsx(Ec,{isOpen:d,onClose:()=>s(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:l})]})},Ec=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:o,portalId:l,isEditor:i,metadata:d})=>{var _e;const{widthSettings:s,fontSettings:p,letterSpacing:u,textAlign:w,wordSpacing:C,fontSizeLineHeight:b,textAppearance:m,color:h}=r.imageCaption??{},[S,y]=c.useState(0),[$,f]=c.useState(0),[F,L]=c.useState(!1),[D,v]=c.useState(!1),[E,j]=c.useState({}),T=c.useRef(null),k=c.useRef(null),R=c.useRef(null),N=c.useRef(!1),q=c.useRef(null),ie=c.useRef(null),M=c.useRef(null),W=c.useRef(null),z=c.useRef(!1),V=c.useRef(null),[P,G]=c.useState(!1),{appear:ee,triggers:Y,slider:A,thumbnail:ae,controls:g,area:ne,caption:X,layout:J}=o.lightboxBlock,{appearClass:ue,backdropAppearClass:Z,backdropDisappearClass:re,disappearClass:I}=Tc(ee.type,ee.direction),H=(d==null?void 0:d.itemId)??null;c.useEffect(()=>{const B=()=>{setTimeout(()=>{var _,K;(K=(_=T.current)==null?void 0:_.splide)==null||K.refresh()},16)},le=()=>{f(_=>_+1)};return window.addEventListener("ArticleEditor.Layout:change",B),window.addEventListener("ArticleEditor.ComponentContent:change",le),()=>{window.removeEventListener("ArticleEditor.Layout:change",B),window.removeEventListener("ArticleEditor.ComponentContent:change",le)}},[]),c.useEffect(()=>{if(!e||!ae.isActive){G(!1);return}const B=V.current;if(!B)return;const le=()=>{A.direction==="horiz"?G(B.scrollWidth>B.clientWidth):G(B.scrollHeight>B.clientHeight)};le();const _=new ResizeObserver(le);return _.observe(B),()=>_.disconnect()},[e,ae.isActive,n.length,E,A.direction]);const O=c.useCallback(()=>{const B=window.matchMedia("(max-width: 768px)").matches,le=to(ne.color);B&&!i&&le>.9&&(document.body.style.backgroundColor=""),L(!0),N.current=!0;const _=K=>{K.target===q.current&&K.animationName&&(q.current&&ie.current&&q.current.removeEventListener("animationend",ie.current),ie.current=null,N.current&&(N.current=!1,t()),L(!1))};q.current&&(ie.current=_,q.current.addEventListener("animationend",_))},[t,ne.color,i]),se=(B,le,_)=>{var K,U;if(B){if(Y.type==="click"&&Y.switch==="image")Y.repeat==="close"&&S===n.length-1?O():(K=T.current)==null||K.go("+1");else if(Y.type==="click"&&Y.switch==="50/50"){const Q=B.getBoundingClientRect(),de=le-Q.left,fe=_-Q.top,Re=Q.width,ve=Q.height;let be;A.direction==="horiz"?be=de<Re/2?"-1":"+1":be=fe<ve/2?"-1":"+1",(U=T.current)==null||U.go(be)}}},ge=B=>{if(z.current){z.current=!1;return}const le=n[S],_=(le==null?void 0:le.image.objectFit)==="cover";let K,U;if("changedTouches"in B&&B.changedTouches.length>0)K=B.changedTouches[0].clientX,U=B.changedTouches[0].clientY;else if("clientX"in B)K=B.clientX,U=B.clientY;else return;let Q;if(_&&R.current){const de=eo(R.current);Q=K>=de.left&&K<=de.right&&U>=de.top&&U<=de.bottom}else{const de=R.current?Ji(R.current):null;if(!de){B.target===B.currentTarget&&O();return}Q=K>=de.x&&K<=de.x+de.width&&U>=de.y&&U<=de.y+de.height}Q?se(R.current,K,U):O()},Te=B=>{const le=B.target;(le.classList.contains(oe.thumbsWrapper)||le.classList.contains(oe.thumbsContainer))&&ge(B)};c.useEffect(()=>{if(!e)return;const B=le=>{var _,K;if(le.key==="Escape"){O();return}if(le.key==="ArrowRight"){y(U=>(U+1)%Math.max(n.length,1)),(_=T.current)==null||_.go("+1");return}le.key==="ArrowLeft"&&(y(U=>(U-1+Math.max(n.length,1))%Math.max(n.length,1)),(K=T.current)==null||K.go("-1"))};return window.addEventListener("keydown",B),()=>{window.removeEventListener("keydown",B)}},[e,O,n.length]),c.useEffect(()=>{if(e){if(y(0),f(le=>le+1),N.current=!1,L(!1),v(!1),j({}),!H)return;const B=new CustomEvent("page-overlay",{detail:{itemId:H}});window.dispatchEvent(B)}return()=>{q.current&&ie.current&&(q.current.removeEventListener("animationend",ie.current),ie.current=null),v(!1)}},[e,H]),c.useEffect(()=>{k.current!==null&&k.current!==A.type&&f(B=>B+1),k.current=A.type},[A.type]),c.useEffect(()=>{if(!e)return;const B=document.body.style.overflow,le=window.matchMedia("(max-width: 768px)").matches,_=to(ne.color);document.body.style.overflow="hidden",v(!1);const K=Q=>{Q.target===q.current&&!N.current&&Q.animationName&&(le&&!i&&_>.9&&(document.body.style.backgroundColor=ne.color),v(!0),q.current&&M.current&&q.current.removeEventListener("animationend",M.current),M.current=null)};q.current&&(M.current=K,q.current.addEventListener("animationend",K));const U=Q=>{const de=Q.target;de&&(de.closest(`.${oe.thumbsWrapper}`)||de.closest(`.${oe.thumbsContainer}`))||A.type!=="slide"&&Q.preventDefault()};return document.addEventListener("touchmove",U,{passive:!1}),()=>{document.body.style.overflow=B,document.removeEventListener("touchmove",U),q.current&&M.current&&(q.current.removeEventListener("animationend",M.current),M.current=null),v(!1)}},[e,i,ne.color,A.type]),c.useEffect(()=>{if(!e)return;const B=le=>{var K,U;if(N.current){le.stopPropagation();return}if(z.current){z.current=!1;return}const _=le.target;if(!(_&&(_.closest(`.${oe.thumbsContainer}`)||_.closest(`.${oe.thumbItem}`)||_.closest(`.${oe.arrow}`)||_.closest(`.${oe.closeButton}`)||_.closest(`.${oe.caption}`)))){if(A.type==="slide"&&Y.type==="drag"&&((U=(K=T.current)==null?void 0:K.splide)!=null&&U.root)){const Q=T.current.splide.root;if(_&&(Q.contains(_)||Q===_))return}if(le.touches.length===0&&le.changedTouches.length>0){const Q=n[S],de=(Q==null?void 0:Q.image.objectFit)==="cover",fe=le.changedTouches[0];let Re;if(de&&R.current){const ve=eo(R.current);Re=fe.clientX>=ve.left&&fe.clientX<=ve.right&&fe.clientY>=ve.top&&fe.clientY<=ve.bottom}else{const ve=R.current?Ji(R.current):null;if(!ve)return;Re=fe.clientX>=ve.x&&fe.clientX<=ve.x+ve.width&&fe.clientY>=ve.y&&fe.clientY<=ve.y+ve.height}if(!Re){le.stopPropagation(),N.current=!0;const ve=be=>{be.stopPropagation(),be.preventDefault(),document.removeEventListener("click",ve,!0)};document.addEventListener("click",ve,!0),O()}}}};return document.addEventListener("touchend",B,{passive:!0}),()=>{document.removeEventListener("touchend",B)}},[e,O,S,n]);const Se=(A.type==="scale"||A.type==="fade")&&A.direction==="vert"&&Y.type==="drag";c.useEffect(()=>{var be,ke;if(!e||!Se||!((ke=(be=T.current)==null?void 0:be.splide)!=null&&ke.root))return;const B=T.current.splide.root,le=30,_=(ce,xe)=>{if(W.current){const Me=Math.abs(ce-W.current.x),Ie=Math.abs(xe-W.current.y);(Me>0||Ie>0)&&(z.current=!0)}},K=ce=>{W.current&&(ce.preventDefault(),_(ce.clientX,ce.clientY))},U=ce=>{W.current&&ce.touches.length>0&&(ce.preventDefault(),_(ce.touches[0].clientX,ce.touches[0].clientY))},Q=(ce,xe)=>{if(!W.current||!T.current){W.current=null;return}const Me=Math.abs(ce-W.current.x),Ie=Math.abs(xe-W.current.y);Ie>le&&Ie>Me&&T.current.go(xe<W.current.y?"+1":"-1"),W.current=null},de=ce=>{W.current&&Q(ce.clientX,ce.clientY),document.removeEventListener("pointerup",de),document.removeEventListener("pointercancel",de),document.removeEventListener("pointermove",K)},fe=ce=>{if(W.current){if(ce.changedTouches.length>0){const xe=ce.changedTouches[0];Q(xe.clientX,xe.clientY)}document.removeEventListener("touchend",fe),document.removeEventListener("touchcancel",fe),document.removeEventListener("touchmove",U)}},Re=ce=>{W.current={x:ce.clientX,y:ce.clientY},z.current=!1,document.addEventListener("pointermove",K,{passive:!1}),document.addEventListener("pointerup",de),document.addEventListener("pointercancel",de)},ve=ce=>{ce.touches.length>0&&(W.current={x:ce.touches[0].clientX,y:ce.touches[0].clientY},z.current=!1,document.addEventListener("touchmove",U,{passive:!1}),document.addEventListener("touchend",fe),document.addEventListener("touchcancel",fe))};return B.addEventListener("pointerdown",Re),B.addEventListener("touchstart",ve),()=>{B.removeEventListener("pointerdown",Re),B.removeEventListener("touchstart",ve),document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",de),document.removeEventListener("pointercancel",de),document.removeEventListener("touchmove",U),document.removeEventListener("touchend",fe),document.removeEventListener("touchcancel",fe),W.current=null,z.current=!1}},[e,Se,$]);const Ee={backgroundColor:ne.color,backdropFilter:`blur(${ne.blur}px)`,animationDuration:`${parseInt(ee.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:_o.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:i?null:q,className:Pe(oe.background,F?re:Z,{[oe.editor]:i},{[oe.hidden]:!e}),style:{...Ee,...D&&!i&&!F?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?q:null,className:Pe(oe.contentStyle,F?I:ue,{[oe.editor]:i},{[oe.hidden]:!e}),style:{animationDuration:`${parseInt(ee.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Li,{onMove:B=>y(B.index),ref:T,className:oe.lightboxSplide,options:{arrows:!1,speed:A.duration?parseInt(A.duration):500,direction:A.direction==="horiz"||A.type==="fade"||A.type==="scale"?"ltr":"ttb",pagination:!1,drag:Y.type==="drag"&&!Se,perPage:1,width:"100%",height:"100%",type:A.type==="fade"||A.type==="scale"?"fade":"loop",padding:0,rewind:Y.repeat!=="close",start:0},style:{"--splide-speed":A.duration},children:n.map((B,le)=>{const _=nr(J.position,J.offset,i),K=`${x.scalingValue(J.padding.top,i)} ${x.scalingValue(J.padding.right,i)} ${x.scalingValue(J.padding.bottom,i)} ${x.scalingValue(J.padding.left,i)}`,U=A.type==="scale"?(()=>{const{transform:Q,...de}=_;return{...de,position:"absolute",padding:K,boxSizing:"border-box","--position-transform":Q||"none"}})():{..._,position:"absolute",padding:K,boxSizing:"border-box"};return a.jsx(Ei,{children:a.jsx("div",{className:oe.imgWrapper,onClick:ge,children:a.jsx("img",{ref:le===S?R:null,className:Pe(oe.imageStyle,{[oe.contain]:B.image.objectFit==="contain",[oe.cover]:B.image.objectFit==="cover",[oe.scaleSlide]:A.type==="scale"}),src:B.image.url,alt:B.image.name??"",style:{...U,pointerEvents:B.image.objectFit==="contain"?"none":"auto"}})})},le)})},$),g.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Pe(oe.arrow,{[oe.arrowVertical]:A.direction==="vert"}),style:{color:g.color,"--arrow-hover-color":g.hover},children:a.jsxs("button",{className:oe.arrowInner,style:{transform:`translate(${x.scalingValue(g.offset.x,i)}, ${x.scalingValue(g.offset.y*(A.direction==="horiz"?1:-1),i)}) scale(${g.scale}) rotate(${A.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var B;return(B=T.current)==null?void 0:B.go("-1")},"aria-label":"Previous",children:[g.arrowsImgUrl&&a.jsx(Nt,{url:g.arrowsImgUrl,fill:g.color,hoverFill:g.hover,className:Pe(oe.arrowImg,oe.mirror)}),!g.arrowsImgUrl&&a.jsx(no,{color:g.color,className:Pe(oe.arrowIcon,oe.arrowImg,oe.mirror)})]})}),a.jsx("div",{className:Pe(oe.arrow,oe.nextArrow,{[oe.arrowVertical]:A.direction==="vert"}),style:{color:g.color,"--arrow-hover-color":g.hover},children:a.jsxs("button",{className:oe.arrowInner,style:{transform:`translate(${x.scalingValue(g.offset.x*(A.direction==="horiz"?-1:1),i)}, ${x.scalingValue(g.offset.y,i)}) scale(${g.scale}) rotate(${A.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var B;return(B=T.current)==null?void 0:B.go("+1")},"aria-label":"Next",children:[g.arrowsImgUrl&&a.jsx(Nt,{url:g.arrowsImgUrl,fill:g.color,hoverFill:g.hover,className:oe.arrowImg}),!g.arrowsImgUrl&&a.jsx(no,{color:g.color,className:Pe(oe.arrowIcon,oe.arrowImg)})]})})]}),ne.closeIconUrl&&(()=>{const B=nr(ne.closeIconAlign,ne.closeIconOffset,i),le=`scale(${ne.closeIconScale})`,_=B.transform?`${B.transform} ${le}`:le;return a.jsx("button",{className:oe.closeButton,style:{...B,transform:_},onClick:O,"aria-label":"Close lightbox",children:a.jsx(Nt,{url:ne.closeIconUrl,fill:ne.closeIconColor??"#000000",hoverFill:ne.closeIconHover??"#cccccc"})})})(),X&&X.isActive&&r.imageCaption&&((_e=n[S])==null?void 0:_e.imageCaption)&&a.jsx("div",{className:oe.caption,style:{...nr(X.alignment,X.offset,i),fontFamily:Ir(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:s.sizing==="auto"?"max-content":x.scalingValue(s.width,i),letterSpacing:x.scalingValue(u,i),wordSpacing:x.scalingValue(C,i),textAlign:w,fontSize:x.scalingValue(b.fontSize,i),lineHeight:x.scalingValue(b.lineHeight,i),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:h},onClick:B=>B.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:oe.captionTextInner,style:{"--link-color":X.linkColor,"--link-hover-color":X.linkHoverColor},children:a.jsx(xn,{content:n[S].imageCaption})})}),ae.isActive&&(()=>{const[B,le]=ae.position.split("-"),_=A.direction==="horiz"?`${B}-left`:ae.position,K=nr(_,ae.offset,i),U=()=>{if(A.direction==="horiz"){if(le==="left")return"flex-start";if(le==="center")return"center";if(le==="right")return"flex-end"}else{if(B==="top")return"flex-start";if(B==="middle")return"center";if(B==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:V,className:oe.thumbsWrapper,onClick:Q=>Te(Q),style:{position:i?"absolute":"fixed",...K,...A.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Pe(oe.thumbsContainer,{[oe.thumbsContainerVertical]:A.direction==="vert",[oe.thumbsAlignStart]:ae.align==="start",[oe.thumbsAlignCenter]:ae.align==="center",[oe.thumbsAlignEnd]:ae.align==="end"}),style:{gap:x.scalingValue(ae.grid.gap,i),justifyContent:P?"flex-start":U()},children:n.map((Q,de)=>{const fe=de===S,Re=E[de],be=ae.grid.size*(fe?ae.activeState.scale:1),ke=()=>{if(ae.fit!=="fit")return{};if(!Re)return A.direction==="horiz"?{height:x.scalingValue(be,i)}:{width:x.scalingValue(be,i)};const ce=Re.width/Re.height;if(A.direction==="horiz"){const xe=be,Me=xe*ce;return{width:x.scalingValue(Me,i),height:x.scalingValue(xe,i)}}else{const xe=be,Me=xe/ce;return{width:x.scalingValue(xe,i),height:x.scalingValue(Me,i)}}};return a.jsx("button",{className:oe.thumbItem,style:{...A.direction==="horiz"&&ae.fit!=="fit"?{height:x.scalingValue(be,i)}:{},...A.direction==="vert"&&ae.fit!=="fit"?{width:x.scalingValue(be,i)}:{},...ae.fit==="cover"?{width:x.scalingValue(be,i),height:x.scalingValue(be,i)}:{},...ke(),transition:fe?"all 0.25s ease-out":"none",opacity:fe?ae.activeState.opacity/100:ae.opacity/100,"--thumb-hover":ae.activeState.opacity/100},onClick:ce=>{var xe;ce.stopPropagation(),y(de),(xe=T.current)==null||xe.go(de)},onMouseEnter:()=>{var ce;ae.triggers==="hov"&&((ce=T.current)==null||ce.go(de))},children:a.jsx("img",{src:Q.image.url,alt:Q.image.name??"",onLoad:ce=>{const xe=ce.currentTarget;xe.naturalWidth&&xe.naturalHeight&&j(Me=>({...Me,[de]:{width:xe.naturalWidth,height:xe.naturalHeight}}))},style:{objectFit:ae.fit==="cover"?"cover":"contain",...ae.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ae.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Q.image.name}-${de}`)})})})})()]})]}),document.getElementById(l))};function no({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Pc={element:Lc,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 rr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function _c(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
@@ -155,7 +155,7 @@
155
155
  pointer-events: auto;
156
156
  z-index: 10;
157
157
  }
158
- `}function Ac({settings:e,isEditor:t,isEditMode:n,isPreviewMode:r,metadata:o,activeEvent:l}){const i=!!n,c=r&&t||!t,{prefix:s}=y.useScopedStyles(),{type:p="A",fieldsToShow:u=2,fields:T=[],buttonLabel:v,gap:f,fieldsGap:m,buttonCorners:g,buttonStroke:C,buttonPadding:S,isButtonFullWidth:$,inputCorners:b,inputStroke:F,inputPadding:L,inputColor:N,inputTextColor:w,inputBorderColor:A,placeholderColor:D,buttonColor:P,buttonTextColor:M,buttonBorderColor:R,labelTextColor:B,successColor:K,errorColor:te,fontFamily:x,inputFontSettings:E,inputFontSize:H,inputLineHeight:W,inputLetterSpacing:_,inputWordSpacing:z,inputTextAppearance:X,buttonFontSettings:Z,buttonFontSize:k,buttonLineHeight:J,buttonLetterSpacing:h,buttonWordSpacing:ne,buttonTextAppearance:he,labelFontSettings:ce,labelFontSize:be,labelLineHeight:re,labelLetterSpacing:de,labelWordSpacing:V,labelTextAppearance:U,statusFontSettings:G,statusFontSize:se,statusLineHeight:ye,statusLetterSpacing:Te,statusWordSpacing:$e,statusTextAppearance:Pe,successMessage:_e,errorMessage:O,stateOverrides:ie}=e,I=p==="B",j=T.slice(0,Math.min(u,T.length)),q={fontSettings:{fontFamily:x,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:H??.01,lineHeight:W,letterSpacing:_??0,wordSpacing:z??0,textAppearance:X,color:w},Y=yt(et(q,t)),ae=y.scalingValue(F??0,t),me=y.scalingValue((W??H??.01)+((L==null?void 0:L.top)??0)+((L==null?void 0:L.bottom)??0)+(p==="C"?F??0:(F??0)*2),t),ke={...Y,borderStyle:"solid",borderRadius:p==="C"?0:y.scalingValue(b??0,t),...p==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ae,borderLeftWidth:0}:{borderWidth:ae},paddingTop:y.scalingValue((L==null?void 0:L.top)??0,t),paddingRight:y.scalingValue((L==null?void 0:L.right)??0,t),paddingBottom:y.scalingValue((L==null?void 0:L.bottom)??0,t),paddingLeft:y.scalingValue((L==null?void 0:L.left)??0,t),height:me,minHeight:me},fe={fontSettings:{fontFamily:x,fontWeight:(Z==null?void 0:Z.fontWeight)??400,fontStyle:(Z==null?void 0:Z.fontStyle)??"normal"},fontSize:k??.01,lineHeight:J,letterSpacing:h??0,wordSpacing:ne??0,textAppearance:he,color:M},ve=yt(et(fe,t)),Re=y.scalingValue(C??0,t),oe={fontSettings:{fontFamily:x,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:be??.01,lineHeight:re,letterSpacing:de??0,wordSpacing:V??0,textAppearance:U,color:B},xe=et(oe,t),Me={fontSettings:{fontFamily:x,fontWeight:(G==null?void 0:G.fontWeight)??400,fontStyle:(G==null?void 0:G.fontStyle)??"normal"},fontSize:se??.01,lineHeight:ye,letterSpacing:Te??0,wordSpacing:$e??0,textAppearance:Pe,color:K},Ie=yt(et(Me,t)),Ve=y.buildColorVars(s,{inputColor:N,inputTextColor:w,inputBorderColor:A,placeholderColor:D!=null&&D.trim()?D:"#cccccc",buttonColor:P,buttonTextColor:M,buttonBorderColor:R,labelTextColor:B,successColor:K,errorColor:te},Mc,Ic,ie),[rt,st]=d.useState(()=>Object.fromEntries(j.map(Se=>[Se.name,""]))),[lt,xt]=d.useState("idle"),[Et,ct]=d.useState(null),_t=l==="success"?"success":l==="error"?"error":lt,pe=l==="error"?O:Et,Ne=l==="filled",Be=d.useMemo(()=>{if(!Ne)return rt;let Se=null;for(const Qe of j)(rt[Qe.name]??"").trim().length>0||(Se=Se??{...rt},Se[Qe.name]="Filled");return Se??rt},[rt,Ne,j]),Ge=_t==="error"?y.getFormFieldValidationError(j,Be):null,Vt=`${l&&l!=="default"?`${s}-state-${l}`:""}`.trim(),dt=o==null?void 0:o.submitUrl,At=(Se,Qe)=>{st(qe=>({...qe,[Se]:Qe}))},En=async Se=>{if(Se.preventDefault(),!c)return;const Qe=Object.fromEntries(j.map(De=>{var ot;return[De.name,((ot=rt[De.name])==null?void 0:ot.trim())??""]}).filter(([,De])=>De));if(!dt){xt("error"),ct("No integrations were found for this form.");return}if(Object.keys(Qe).length===0)return;const qe=y.getFormFieldValidationError(j,rt);if(qe){xt("error"),ct(qe);return}xt("submitting"),ct(null);try{const De=await fetch(dt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Qe)});if(!De.ok){const ot=await De.text();throw new Error(ot||`Request failed: ${De.status}`)}xt("success"),st(Object.fromEntries(j.map(ot=>[ot.name,""])))}catch(De){xt("error"),ct(De instanceof Error?De.message:"Something went wrong")}};return a.jsxs("div",{className:`${s}-wrapper ${s}-type-${p} ${Vt}`.trim(),style:Ve,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_c(s)}}),a.jsxs("form",{onSubmit:En,className:`${s}-form`,children:[a.jsx("div",{className:`${s}-fields`,children:j.map((Se,Qe)=>a.jsxs(d.Fragment,{children:[Qe>0&&a.jsx("div",{"data-controls":i?"fieldsGap":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(m??0,t)}}),a.jsxs("div",{className:`${s}-field-group${I?` ${s}-labeled`:""}`,children:[I&&a.jsx("span",{className:`${s}-field-label`,style:xe?{...xe,lineHeight:xe.fontSize}:void 0,children:Se.label||Se.name}),Se.type==="textarea"?a.jsx("textarea",{name:Se.name,autoComplete:"off",value:Be[Se.name]??"",onChange:qe=>At(Se.name,qe.target.value),placeholder:Se.placeholder,className:`${s}-input`,style:ke,rows:1,"data-filled":Ne||(Be[Se.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Se.type==="phone"?"tel":Se.type==="email"?"email":"text",name:Se.name,autoComplete:"off",value:Be[Se.name]??"",onChange:qe=>At(Se.name,qe.target.value),placeholder:Se.placeholder,required:Se.isRequired??Se.type==="email",className:`${s}-input`,style:ke,"data-filled":Ne||(Be[Se.name]??"").trim().length>0})]})]},Qe))}),a.jsx("div",{"data-controls":i?"gap":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(f??0,t)}}),a.jsx("div",{className:`${s}-overlay-anchor`,children:a.jsx("button",{type:c?"submit":"button",className:`${s}-button`,style:{borderStyle:"solid",borderRadius:y.scalingValue(g??0,t),borderWidth:Re,paddingTop:y.scalingValue((S==null?void 0:S.top)??0,t),paddingRight:y.scalingValue((S==null?void 0:S.right)??0,t),paddingBottom:y.scalingValue((S==null?void 0:S.bottom)??0,t),paddingLeft:y.scalingValue((S==null?void 0:S.left)??0,t),pointerEvents:c?"auto":void 0,...ve,...$?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${s}-overlay-anchor`,style:$?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:lt==="submitting"?"...":v})})})]}),_t==="success"&&a.jsx("p",{className:`${s}-success`,style:{...Ie},children:_e}),_t==="error"&&a.jsx("p",{className:`${s}-error`,style:{...Ie},role:"alert",children:Ge??pe??O})]})}const Mc={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"},Ic=["hover","focus","filled","success","error"],kc=`import React, { useMemo, useState } from 'react';
158
+ `}function Ac({settings:e,isEditor:t,isEditMode:n,isPreviewMode:r,metadata:o,activeEvent:l}){const i=!!n,d=r&&t||!t,{prefix:s}=x.useScopedStyles(),{type:p="A",fieldsToShow:u=2,fields:w=[],buttonLabel:C,gap:b,fieldsGap:m,buttonCorners:h,buttonStroke:S,buttonPadding:y,isButtonFullWidth:$,inputCorners:f,inputStroke:F,inputPadding:L,inputColor:D,inputTextColor:v,inputBorderColor:E,placeholderColor:j,buttonColor:T,buttonTextColor:k,buttonBorderColor:R,labelTextColor:N,successColor:q,errorColor:ie,fontFamily:M,inputFontSettings:W,inputFontSize:z,inputLineHeight:V,inputLetterSpacing:P,inputWordSpacing:G,inputTextAppearance:ee,buttonFontSettings:Y,buttonFontSize:A,buttonLineHeight:ae,buttonLetterSpacing:g,buttonWordSpacing:ne,buttonTextAppearance:X,labelFontSettings:J,labelFontSize:ue,labelLineHeight:Z,labelLetterSpacing:re,labelWordSpacing:I,labelTextAppearance:H,statusFontSettings:O,statusFontSize:se,statusLineHeight:ge,statusLetterSpacing:Te,statusWordSpacing:Se,statusTextAppearance:Ee,successMessage:_e,errorMessage:B,stateOverrides:le}=e,_=p==="B",K=w.slice(0,Math.min(u,w.length)),U={fontSettings:{fontFamily:M,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:z??.01,lineHeight:V,letterSpacing:P??0,wordSpacing:G??0,textAppearance:ee,color:v},Q=yt(et(U,t)),de=x.scalingValue(F??0,t),fe=x.scalingValue((V??z??.01)+((L==null?void 0:L.top)??0)+((L==null?void 0:L.bottom)??0)+(p==="C"?F??0:(F??0)*2),t),Re={...Q,borderStyle:"solid",borderRadius:p==="C"?0:x.scalingValue(f??0,t),...p==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:de,borderLeftWidth:0}:{borderWidth:de},paddingTop:x.scalingValue((L==null?void 0:L.top)??0,t),paddingRight:x.scalingValue((L==null?void 0:L.right)??0,t),paddingBottom:x.scalingValue((L==null?void 0:L.bottom)??0,t),paddingLeft:x.scalingValue((L==null?void 0:L.left)??0,t),height:fe,minHeight:fe},ve={fontSettings:{fontFamily:M,fontWeight:(Y==null?void 0:Y.fontWeight)??400,fontStyle:(Y==null?void 0:Y.fontStyle)??"normal"},fontSize:A??.01,lineHeight:ae,letterSpacing:g??0,wordSpacing:ne??0,textAppearance:X,color:k},be=yt(et(ve,t)),ke=x.scalingValue(S??0,t),ce={fontSettings:{fontFamily:M,fontWeight:(J==null?void 0:J.fontWeight)??400,fontStyle:(J==null?void 0:J.fontStyle)??"normal"},fontSize:ue??.01,lineHeight:Z,letterSpacing:re??0,wordSpacing:I??0,textAppearance:H,color:N},xe=et(ce,t),Me={fontSettings:{fontFamily:M,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:se??.01,lineHeight:ge,letterSpacing:Te??0,wordSpacing:Se??0,textAppearance:Ee,color:q},Ie=yt(et(Me,t)),Ve=x.buildColorVars(s,{inputColor:D,inputTextColor:v,inputBorderColor:E,placeholderColor:j!=null&&j.trim()?j:"#cccccc",buttonColor:T,buttonTextColor:k,buttonBorderColor:R,labelTextColor:N,successColor:q,errorColor:ie},Mc,Ic,le),[rt,st]=c.useState(()=>Object.fromEntries(K.map($e=>[$e.name,""]))),[lt,xt]=c.useState("idle"),[At,ct]=c.useState(null),Mt=l==="success"?"success":l==="error"?"error":lt,he=l==="error"?B:At,Ne=l==="filled",Oe=c.useMemo(()=>{if(!Ne)return rt;let $e=null;for(const Qe of K)(rt[Qe.name]??"").trim().length>0||($e=$e??{...rt},$e[Qe.name]="Filled");return $e??rt},[rt,Ne,K]),Ue=Mt==="error"?x.getFormFieldValidationError(K,Oe):null,Dt=`${l&&l!=="default"?`${s}-state-${l}`:""}`.trim(),dt=o==null?void 0:o.submitUrl,It=($e,Qe)=>{st(qe=>({...qe,[$e]:Qe}))},Pn=async $e=>{if($e.preventDefault(),!d)return;const Qe=Object.fromEntries(K.map(De=>{var ot;return[De.name,((ot=rt[De.name])==null?void 0:ot.trim())??""]}).filter(([,De])=>De));if(!dt){xt("error"),ct("No integrations were found for this form.");return}if(Object.keys(Qe).length===0)return;const qe=x.getFormFieldValidationError(K,rt);if(qe){xt("error"),ct(qe);return}xt("submitting"),ct(null);try{const De=await fetch(dt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Qe)});if(!De.ok){const ot=await De.text();throw new Error(ot||`Request failed: ${De.status}`)}xt("success"),st(Object.fromEntries(K.map(ot=>[ot.name,""])))}catch(De){xt("error"),ct(De instanceof Error?De.message:"Something went wrong")}};return a.jsxs("div",{className:`${s}-wrapper ${s}-type-${p} ${Dt}`.trim(),style:Ve,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_c(s)}}),a.jsxs("form",{onSubmit:Pn,className:`${s}-form`,children:[a.jsx("div",{className:`${s}-fields`,children:K.map(($e,Qe)=>a.jsxs(c.Fragment,{children:[Qe>0&&a.jsx("div",{"data-controls":i?"fieldsGap":void 0,className:i?`${s}-control`:void 0,style:{height:x.scalingValue(m??0,t)}}),a.jsxs("div",{className:`${s}-field-group${_?` ${s}-labeled`:""}`,children:[_&&a.jsx("span",{className:`${s}-field-label`,style:xe?{...xe,lineHeight:xe.fontSize}:void 0,children:$e.label||$e.name}),$e.type==="textarea"?a.jsx("textarea",{name:$e.name,autoComplete:"off",value:Oe[$e.name]??"",onChange:qe=>It($e.name,qe.target.value),placeholder:$e.placeholder,className:`${s}-input`,style:Re,rows:1,"data-filled":Ne||(Oe[$e.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:$e.type==="phone"?"tel":$e.type==="email"?"email":"text",name:$e.name,autoComplete:"off",value:Oe[$e.name]??"",onChange:qe=>It($e.name,qe.target.value),placeholder:$e.placeholder,required:$e.isRequired??$e.type==="email",className:`${s}-input`,style:Re,"data-filled":Ne||(Oe[$e.name]??"").trim().length>0})]})]},Qe))}),a.jsx("div",{"data-controls":i?"gap":void 0,className:i?`${s}-control`:void 0,style:{height:x.scalingValue(b??0,t)}}),a.jsx("div",{className:`${s}-overlay-anchor`,children:a.jsx("button",{type:d?"submit":"button",className:`${s}-button`,style:{borderStyle:"solid",borderRadius:x.scalingValue(h??0,t),borderWidth:ke,paddingTop:x.scalingValue((y==null?void 0:y.top)??0,t),paddingRight:x.scalingValue((y==null?void 0:y.right)??0,t),paddingBottom:x.scalingValue((y==null?void 0:y.bottom)??0,t),paddingLeft:x.scalingValue((y==null?void 0:y.left)??0,t),pointerEvents:d?"auto":void 0,...be,...$?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${s}-overlay-anchor`,style:$?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:lt==="submitting"?"...":C})})})]}),Mt==="success"&&a.jsx("p",{className:`${s}-success`,style:{...Ie},children:_e}),Mt==="error"&&a.jsx("p",{className:`${s}-error`,style:{...Ie},role:"alert",children:Ue??he??B})]})}const Mc={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"},Ic=["hover","focus","filled","success","error"],Rc=`import React, { useMemo, useState } from 'react';
159
159
  import { CommonComponentProps } from '../props';
160
160
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
161
161
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -789,7 +789,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
789
789
  };
790
790
 
791
791
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
792
- `,Rc=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{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"}],ir={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Fc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Wc={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},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:{...ir.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:{...ir.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:{...ir.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:{...ir.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:Rc,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"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["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:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Fc],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"]},Hc={element:Ac,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:Wc,sourceCode:kc};function or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Nc(e){return`
792
+ `,kc=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{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"}],ir={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Fc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Wc={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},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:{...ir.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:{...ir.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:{...ir.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:{...ir.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:kc,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"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["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:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Fc],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"]},Hc={element:Ac,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:Wc,sourceCode:Rc};function or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Nc(e){return`
793
793
  .${e}-wrapper {
794
794
  display: flex;
795
795
  flex-direction: column;
@@ -980,7 +980,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
980
980
  font-size: ${or(14)};
981
981
  color: var(--${e}-error-error-color, var(--${e}-error-color));
982
982
  }
983
- `}const Bc=({settings:e,isEditor:t,isPreviewMode:n,metadata:r,activeEvent:o})=>{const{prefix:l}=y.useScopedStyles(),i=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:s,buttonLabel:p,fieldsToShow:u=1,fontFamily:T,inputFontSettings:v,inputFontSize:f,inputLineHeight:m,inputLetterSpacing:g,inputWordSpacing:C,inputTextAppearance:S,buttonFontSettings:$,buttonFontSize:b,buttonLineHeight:F,buttonLetterSpacing:L,buttonWordSpacing:N,buttonTextAppearance:w,statusFontSettings:A,statusFontSize:D,statusLineHeight:P,statusLetterSpacing:M,statusWordSpacing:R,statusTextAppearance:B,iconMaxWidth:K,minHeight:te,corners:x,stroke:E,stateOverrides:H,inputPadding:W,buttonPadding:_,successMessage:z="Thanks for subscribing!",errorMessage:X="Please, fill all required fields."}=e,Z=c.slice(0,Math.min(u,c.length)),[k,J]=d.useState(()=>Object.fromEntries(Z.map(oe=>[oe.name,""]))),[h,ne]=d.useState("idle"),[he,ce]=d.useState(null),be=o==="success"?"success":o==="error"?"error":h,re=o==="error"?X:he,de=o==="filled",V=d.useMemo(()=>{if(!de)return k;let oe=null;for(const xe of Z)(k[xe.name]??"").trim().length>0||(oe=oe??{...k},oe[xe.name]="Filled");return oe??k},[de,k,Z]),U=be==="error"?y.getFormFieldValidationError(Z,V):null,G=o&&o!=="default"?`${l}-state-${o}`:"",se=Z.some(oe=>(V[oe.name]??"").trim().length>0),ye=G!==`${l}-state-filled`&&se?`${l}-state-filled`:"",Te=`${G} ${ye}`.trim(),$e=r==null?void 0:r.submitUrl,Pe=p??"",_e=(s==null?void 0:s.icon)??"",O=(s==null?void 0:s.mode)==="On",ie=Pe||"Submit",I={fontSettings:{fontFamily:T,fontWeight:(v==null?void 0:v.fontWeight)??400,fontStyle:(v==null?void 0:v.fontStyle)??"normal"},fontSize:f??.01,lineHeight:m,letterSpacing:g??0,wordSpacing:C??0,textAppearance:S,color:e.inputTextColor??"#111111"},j={fontSettings:{fontFamily:T,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:b??.01,lineHeight:F,letterSpacing:L??0,wordSpacing:N??0,textAppearance:w,color:e.buttonTextColor??"#ffffff"},q={fontSettings:{fontFamily:T,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:D??.01,lineHeight:P,letterSpacing:M??0,wordSpacing:R??0,textAppearance:B,color:e.successColor??"#22c55e"},Y=yt(et(I,t)),ae=yt(et(j,t)),me=yt(et(q,t)),ke=y.buildColorVars(l,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(I==null?void 0:I.color)??"#111111",buttonTextColor:e.buttonTextColor??(j==null?void 0:j.color)??"#ffffff"},Oc,Vc,H),fe={borderRadius:y.scalingValue(x,t),borderWidth:y.scalingValue(E,t),borderStyle:"solid"},ve={borderLeftWidth:y.scalingValue(E,t)},Re=async oe=>{if(oe.preventDefault(),!i)return;const xe=Object.fromEntries(Z.map(Ie=>{var Ve;return[Ie.name,((Ve=k[Ie.name])==null?void 0:Ve.trim())??""]}).filter(([,Ie])=>Ie));if(!$e){ne("error"),ce("No integrations were found for this form.");return}if(Object.keys(xe).length===0)return;const Me=y.getFormFieldValidationError(Z,k);if(Me){ne("error"),ce(Me);return}ne("submitting"),ce(null);try{const Ie=await fetch($e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(xe)});if(!Ie.ok){const Ve=await Ie.text();throw new Error(Ve||`Request failed: ${Ie.status}`)}ne("success"),J(Object.fromEntries(Z.map(Ve=>[Ve.name,""])))}catch(Ie){ne("error"),ce(Ie instanceof Error?Ie.message:"Something went wrong")}};return a.jsxs("div",{className:`${l}-wrapper ${Te}`.trim(),style:ke,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Nc(l)}}),a.jsxs("form",{onSubmit:Re,className:`${l}-form`,style:{...fe,height:y.scalingValue(te,t),minHeight:y.scalingValue(te,t)},children:[a.jsx("div",{className:`${l}-inputWrap ${l}-overlayAnchor`,style:{flex:1,minWidth:0},children:Z.map(oe=>a.jsx("input",{type:oe.type==="email"?"email":oe.type==="phone"?"tel":"text",name:oe.name,autoComplete:"off",value:V[oe.name]??"",onChange:xe=>J(Me=>({...Me,[oe.name]:xe.target.value})),placeholder:oe.placeholder,required:oe.isRequired??oe.type==="email",className:`${l}-input`,style:{...Y,paddingRight:y.scalingValue(W.right,t),paddingLeft:y.scalingValue(W.left,t),paddingTop:y.scalingValue(W.top,t),paddingBottom:y.scalingValue(W.bottom,t)}},oe.name))}),a.jsx("div",{className:`${l}-overlayAnchor`,children:a.jsx("button",{type:i?"submit":"button",className:`${l}-submitBtn`,"aria-label":ie,style:{...ae,...ve,paddingRight:y.scalingValue(_.right,t),paddingLeft:y.scalingValue(_.left,t),paddingTop:y.scalingValue(_.top,t),paddingBottom:y.scalingValue(_.bottom,t),pointerEvents:i?"auto":void 0},children:h==="submitting"?"...":O?_e&&a.jsx(Ht,{url:_e,className:`${l}-submitBtnIcon`,style:{maxWidth:y.scalingValue(K??0,t)},fill:`var(--${l}-button-text-color)`,hoverFill:`var(--${l}-button-text-color)`}):Pe})})]}),be==="success"&&a.jsx("p",{className:`${l}-success`,style:{...me},children:z}),be==="error"&&a.jsx("p",{className:`${l}-error`,style:{...me},role:"alert",children:U??re??X})]})},Oc={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"},Vc=["hover","focus","filled","success","error"],Dc=`import React, { useMemo, useState } from 'react';\r
983
+ `}const Oc=({settings:e,isEditor:t,isPreviewMode:n,metadata:r,activeEvent:o})=>{const{prefix:l}=x.useScopedStyles(),i=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:s,buttonLabel:p,fieldsToShow:u=1,fontFamily:w,inputFontSettings:C,inputFontSize:b,inputLineHeight:m,inputLetterSpacing:h,inputWordSpacing:S,inputTextAppearance:y,buttonFontSettings:$,buttonFontSize:f,buttonLineHeight:F,buttonLetterSpacing:L,buttonWordSpacing:D,buttonTextAppearance:v,statusFontSettings:E,statusFontSize:j,statusLineHeight:T,statusLetterSpacing:k,statusWordSpacing:R,statusTextAppearance:N,iconMaxWidth:q,minHeight:ie,corners:M,stroke:W,stateOverrides:z,inputPadding:V,buttonPadding:P,successMessage:G="Thanks for subscribing!",errorMessage:ee="Please, fill all required fields."}=e,Y=d.slice(0,Math.min(u,d.length)),[A,ae]=c.useState(()=>Object.fromEntries(Y.map(ce=>[ce.name,""]))),[g,ne]=c.useState("idle"),[X,J]=c.useState(null),ue=o==="success"?"success":o==="error"?"error":g,Z=o==="error"?ee:X,re=o==="filled",I=c.useMemo(()=>{if(!re)return A;let ce=null;for(const xe of Y)(A[xe.name]??"").trim().length>0||(ce=ce??{...A},ce[xe.name]="Filled");return ce??A},[re,A,Y]),H=ue==="error"?x.getFormFieldValidationError(Y,I):null,O=o&&o!=="default"?`${l}-state-${o}`:"",se=Y.some(ce=>(I[ce.name]??"").trim().length>0),ge=O!==`${l}-state-filled`&&se?`${l}-state-filled`:"",Te=`${O} ${ge}`.trim(),Se=r==null?void 0:r.submitUrl,Ee=p??"",_e=(s==null?void 0:s.icon)??"",B=(s==null?void 0:s.mode)==="On",le=Ee||"Submit",_={fontSettings:{fontFamily:w,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:b??.01,lineHeight:m,letterSpacing:h??0,wordSpacing:S??0,textAppearance:y,color:e.inputTextColor??"#111111"},K={fontSettings:{fontFamily:w,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:f??.01,lineHeight:F,letterSpacing:L??0,wordSpacing:D??0,textAppearance:v,color:e.buttonTextColor??"#ffffff"},U={fontSettings:{fontFamily:w,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:j??.01,lineHeight:T,letterSpacing:k??0,wordSpacing:R??0,textAppearance:N,color:e.successColor??"#22c55e"},Q=yt(et(_,t)),de=yt(et(K,t)),fe=yt(et(U,t)),Re=x.buildColorVars(l,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(_==null?void 0:_.color)??"#111111",buttonTextColor:e.buttonTextColor??(K==null?void 0:K.color)??"#ffffff"},Bc,Vc,z),ve={borderRadius:x.scalingValue(M,t),borderWidth:x.scalingValue(W,t),borderStyle:"solid"},be={borderLeftWidth:x.scalingValue(W,t)},ke=async ce=>{if(ce.preventDefault(),!i)return;const xe=Object.fromEntries(Y.map(Ie=>{var Ve;return[Ie.name,((Ve=A[Ie.name])==null?void 0:Ve.trim())??""]}).filter(([,Ie])=>Ie));if(!Se){ne("error"),J("No integrations were found for this form.");return}if(Object.keys(xe).length===0)return;const Me=x.getFormFieldValidationError(Y,A);if(Me){ne("error"),J(Me);return}ne("submitting"),J(null);try{const Ie=await fetch(Se,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(xe)});if(!Ie.ok){const Ve=await Ie.text();throw new Error(Ve||`Request failed: ${Ie.status}`)}ne("success"),ae(Object.fromEntries(Y.map(Ve=>[Ve.name,""])))}catch(Ie){ne("error"),J(Ie instanceof Error?Ie.message:"Something went wrong")}};return a.jsxs("div",{className:`${l}-wrapper ${Te}`.trim(),style:Re,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Nc(l)}}),a.jsxs("form",{onSubmit:ke,className:`${l}-form`,style:{...ve,height:x.scalingValue(ie,t),minHeight:x.scalingValue(ie,t)},children:[a.jsx("div",{className:`${l}-inputWrap ${l}-overlayAnchor`,style:{flex:1,minWidth:0},children:Y.map(ce=>a.jsx("input",{type:ce.type==="email"?"email":ce.type==="phone"?"tel":"text",name:ce.name,autoComplete:"off",value:I[ce.name]??"",onChange:xe=>ae(Me=>({...Me,[ce.name]:xe.target.value})),placeholder:ce.placeholder,required:ce.isRequired??ce.type==="email",className:`${l}-input`,style:{...Q,paddingRight:x.scalingValue(V.right,t),paddingLeft:x.scalingValue(V.left,t),paddingTop:x.scalingValue(V.top,t),paddingBottom:x.scalingValue(V.bottom,t)}},ce.name))}),a.jsx("div",{className:`${l}-overlayAnchor`,children:a.jsx("button",{type:i?"submit":"button",className:`${l}-submitBtn`,"aria-label":le,style:{...de,...be,paddingRight:x.scalingValue(P.right,t),paddingLeft:x.scalingValue(P.left,t),paddingTop:x.scalingValue(P.top,t),paddingBottom:x.scalingValue(P.bottom,t),pointerEvents:i?"auto":void 0},children:g==="submitting"?"...":B?_e&&a.jsx(Nt,{url:_e,className:`${l}-submitBtnIcon`,style:{maxWidth:x.scalingValue(q??0,t)},fill:`var(--${l}-button-text-color)`,hoverFill:`var(--${l}-button-text-color)`}):Ee})})]}),ue==="success"&&a.jsx("p",{className:`${l}-success`,style:{...fe},children:G}),ue==="error"&&a.jsx("p",{className:`${l}-error`,style:{...fe},role:"alert",children:H??Z??ee})]})},Bc={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"},Vc=["hover","focus","filled","success","error"],Dc=`import React, { useMemo, useState } from 'react';\r
984
984
  import { CommonComponentProps } from '../props';\r
985
985
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
986
986
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';\r
@@ -1557,7 +1557,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {\r
1557
1557
  };\r
1558
1558
  \r
1559
1559
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
1560
- `,zc="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>'),jc=[{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."}],Dr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},qc=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Kc={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...Dr.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:{...Dr.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:{...Dr.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:jc,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:zc},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["fieldsToShow","minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...qc],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"]},Uc={element:Bc,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:Kc,sourceCode:Dc};function Gc(e){return`
1560
+ `,zc="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>'),jc=[{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."}],Dr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},qc=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Kc={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...Dr.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:{...Dr.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:{...Dr.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:jc,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:zc},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["fieldsToShow","minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...qc],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"]},Gc={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:Kc,sourceCode:Dc};function Uc(e){return`
1561
1561
  .${e}-marquee-wrapper {
1562
1562
  overflow: hidden;
1563
1563
  width: 100%;
@@ -1689,7 +1689,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
1689
1689
  .${e}-image-hover-grayscale:hover img {
1690
1690
  filter: grayscale(100%);
1691
1691
  }
1692
- `}const Yc=30,Xc=20,zr=2,Zc=2,Qc=(e,t)=>Array.from({length:t},()=>e).flat(),Jc=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},ed=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>Jc(r,e))},td=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:o,imageHoverClass:l,isFirstSet:i,scaled:c,onFirstSetImageDone:s})=>{var w,A,D;const p=d.useRef(null);d.useLayoutEffect(()=>{if(!i)return;const P=p.current;P!=null&&P.complete&&(s==null||s())},[i,(w=e.image)==null?void 0:w.url,s]);const u=n.display==="cover",T=n.ratioValue??"1:1",v=n.reversed??!1,[f,m]=T.split(":").map(Number),S=(v?m:f)/(v?f:m);let $=r,b=$/S;b>o&&(b=o,$=b*S);const F=c($),L=c(b),N=((A=e.image)==null?void 0:A.url)&&a.jsx("img",{ref:p,src:e.image.url,alt:((D=e.image)==null?void 0:D.name)??"",style:u?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:c(r),objectFit:"contain"},onLoad:i?s:void 0,onError:i?s:void 0});return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:F}:{width:"fit-content",maxWidth:c(r),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...u?{width:F,height:L,overflow:"hidden"}:{width:"fit-content",maxWidth:c(r),height:c(o)}},children:N&&e.link?a.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Ee(`${t}-marquee-link`,!u&&`${t}-marquee-link-contain`),children:N}):N})})},nd=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o})=>{const{prefix:l}=y.useScopedStyles(),i=d.useMemo(()=>Gc(l),[l]),{speed:c,direction:s,pauseOnHover:p,gap:u,imageMaxWidth:T,imageMaxHeight:v,imageFit:f,hoverEffect:m}=e,g=!!o,C=!n||!!r,S=C&&m!=="off"&&m!=="randomize"?`${l}-image-hover-${m}`:void 0,$=n?!!r:!0,F=((t==null?void 0:t.length)??0)>0&&($||!!n),L=Math.max(0,c)*Yc,N=U=>y.scalingValue(U,n??!1),w=d.useRef(null),A=d.useRef(null),D=d.useRef(null),[P,M]=d.useState(0),[R,B]=d.useState(0),K=$&&p==="on",[te,x]=d.useState(!1),[E,H]=d.useState({}),W=d.useRef(E);W.current=E;const _=d.useRef(null),z=d.useRef(0),X=d.useRef(null),Z=d.useMemo(()=>(t??[]).map(U=>{var G;return((G=U.image)==null?void 0:G.url)??""}).join("\0"),[t]),[k,J]=d.useState(zr),h=d.useMemo(()=>{const U=t??[];return!$||U.length===0?U:Qc(U,k)},[t,$,k]),ne=d.useMemo(()=>h.filter(U=>{var G;return!!((G=U.image)!=null&&G.url)}).length,[h]),he=F?Zc:1;d.useLayoutEffect(()=>{z.current=0,H({}),_.current=null,J(zr),M(0)},[Z]),d.useEffect(()=>{if(!C||m!=="randomize")return;const U=w.current;if(!U)return;const G=$e=>{H(Pe=>{let _e=null;for(const O of $e)O in Pe&&(ed(U,O)||(_e||(_e={...Pe}),delete _e[O]));return _e??Pe})},se=new IntersectionObserver($e=>{const Pe=new Set;for(const _e of $e){const O=_e.target.dataset.marqueeItemIndex,ie=O!==void 0?Number(O):NaN;Number.isNaN(ie)||Pe.add(ie)}Pe.size>0&&G(Pe)},{root:U,threshold:0});Object.keys(E).forEach($e=>{const Pe=Number($e);U.querySelectorAll(`[data-marquee-item-index="${Pe}"]`).forEach(_e=>se.observe(_e))});let ye=0;const Te=()=>{const $e=Object.keys(W.current);$e.length!==0&&(G($e.map(Number)),ye=requestAnimationFrame(Te))};return Object.keys(W.current).length>0&&(ye=requestAnimationFrame(Te)),()=>{cancelAnimationFrame(ye),se.disconnect()}},[m,E,C]),d.useLayoutEffect(()=>{if(!F)return;const U=w.current,G=D.current;if(!U||!G)return;let se=0;const ye=()=>{const Pe=U.getBoundingClientRect().width,_e=G.getBoundingClientRect().width,O=_.current,ie=typeof O=="number"&&Math.abs(O-_e)<=.25;if(_.current=_e,$&&_e>0&&k>0){const I=_e/k;if(I>0&&Pe>0){const j=Math.max(zr,Math.ceil(Pe/I)+1);if(j!==k){J(j);return}}}if(_e>0&&P<=0){M(_e);return}ie&&_e!==P?M(_e):!ie&&P<=0&&(cancelAnimationFrame(se),se=requestAnimationFrame(ye))},Te=()=>{cancelAnimationFrame(se),se=requestAnimationFrame(ye)};X.current=Te,Te();const $e=new ResizeObserver(Te);return $e.observe(U),$e.observe(G),()=>{X.current=null,cancelAnimationFrame(se),$e.disconnect()}},[$,F,P,Z,k]),d.useLayoutEffect(()=>{const U=A.current;if(!F||!U)return;const G=P>0?P:0,se=G>0&&L>0?G/L*1e3:0,ye=`${Math.max(0,se)/1e3}s`;U.style.setProperty("--marquee-distance",`${G}px`),U.style.setProperty("--marquee-duration",ye)},[$,F,L,P]),d.useLayoutEffect(()=>{if(!F){B(0);return}if(P<=0){B(0);return}const U=A.current;if(!U)return;const G=()=>{const ye=U.getBoundingClientRect().height;B(ye>0?ye:0)};G();const se=new ResizeObserver(G);return se.observe(U),()=>se.disconnect()},[F,he,h,n,u,T,v,P,f,E]);const ce=()=>{K&&x(!0)},be=()=>{K&&x(!1)},re=d.useCallback(()=>{var U;z.current=Math.min(ne,z.current+1),(U=X.current)==null||U.call(X)},[ne]),de=d.useCallback((U,G)=>{H(se=>{const ye=se[U]??G,Te=(t??[]).filter(Pe=>Pe!==ye);if(Te.length===0)return se;const $e=Te[Math.floor(Math.random()*Te.length)];return{...se,[U]:$e}})},[t]),V=(U,G,se,ye)=>{const Te=C&&m==="randomize"&&f.display==="cover"?E[se]??U:U,$e=`max(${N(u)}, ${Xc}px)`,Pe=`calc(-0.5 * (${$e} + ${N(u)}))`;return a.jsxs("div",{className:`${l}-marquee-card`,"data-marquee-item-index":se,onMouseEnter:C&&m==="randomize"&&f.display==="cover"?()=>de(se,U):void 0,children:[a.jsx(td,{item:Te,prefix:l,imageFit:f,imageMaxWidth:T,imageMaxHeight:v,imageHoverClass:S,isEditor:n,isFirstSet:ye,scaled:N,onFirstSetImageDone:re}),g&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${l}-gap-control`,style:{position:"absolute",top:0,right:Pe,width:$e,height:"100%"}})]},`${G}-${se}`)};if(F){const U=$?K&&te?"paused":"running":"paused";return a.jsxs("div",{ref:w,className:Ee(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Marquee",style:P>0&&R>0?{height:R}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:i}}),a.jsx("div",{ref:A,className:`${l}-marquee-track`,"data-direction":s,onMouseEnter:ce,onMouseLeave:be,style:{"--marquee-play-state":U},children:Array.from({length:he},(G,se)=>a.jsx("div",{ref:se===0?D:void 0,className:Ee(`${l}-marquee-row`,`${l}-marquee-set`),style:{gap:N(u),paddingRight:N(u)},"aria-hidden":se>0,children:h.map((ye,Te)=>V(ye,se,Te,se===0))},`set-${se}`))},"marquee-track")]})}return a.jsxs("div",{ref:w,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:i}}),a.jsx("div",{className:Ee(`${l}-marquee-row`,`${l}-marquee-static`),style:{gap:N(u),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((U,G)=>V(U,0,G))},"marquee-static")]})},rd=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
1692
+ `}const Yc=30,Xc=20,zr=2,Zc=2,Qc=(e,t)=>Array.from({length:t},()=>e).flat(),Jc=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},ed=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>Jc(r,e))},td=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:o,imageHoverClass:l,isFirstSet:i,scaled:d,onFirstSetImageDone:s})=>{var v,E,j;const p=c.useRef(null);c.useLayoutEffect(()=>{if(!i)return;const T=p.current;T!=null&&T.complete&&(s==null||s())},[i,(v=e.image)==null?void 0:v.url,s]);const u=n.display==="cover",w=n.ratioValue??"1:1",C=n.reversed??!1,[b,m]=w.split(":").map(Number),y=(C?m:b)/(C?b:m);let $=r,f=$/y;f>o&&(f=o,$=f*y);const F=d($),L=d(f),D=((E=e.image)==null?void 0:E.url)&&a.jsx("img",{ref:p,src:e.image.url,alt:((j=e.image)==null?void 0:j.name)??"",style:u?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:d(r),objectFit:"contain"},onLoad:i?s:void 0,onError:i?s:void 0});return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:F}:{width:"fit-content",maxWidth:d(r),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...u?{width:F,height:L,overflow:"hidden"}:{width:"fit-content",maxWidth:d(r),height:d(o)}},children:D&&e.link?a.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Pe(`${t}-marquee-link`,!u&&`${t}-marquee-link-contain`),children:D}):D})})},nd=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o})=>{const{prefix:l}=x.useScopedStyles(),i=c.useMemo(()=>Uc(l),[l]),{speed:d,direction:s,pauseOnHover:p,gap:u,imageMaxWidth:w,imageMaxHeight:C,imageFit:b,hoverEffect:m}=e,h=!!o,S=!n||!!r,y=S&&m!=="off"&&m!=="randomize"?`${l}-image-hover-${m}`:void 0,$=n?!!r:!0,F=((t==null?void 0:t.length)??0)>0&&($||!!n),L=Math.max(0,d)*Yc,D=H=>x.scalingValue(H,n??!1),v=c.useRef(null),E=c.useRef(null),j=c.useRef(null),[T,k]=c.useState(0),[R,N]=c.useState(0),q=$&&p==="on",[ie,M]=c.useState(!1),[W,z]=c.useState({}),V=c.useRef(W);V.current=W;const P=c.useRef(null),G=c.useRef(0),ee=c.useRef(null),Y=c.useMemo(()=>(t??[]).map(H=>{var O;return((O=H.image)==null?void 0:O.url)??""}).join("\0"),[t]),[A,ae]=c.useState(zr),g=c.useMemo(()=>{const H=t??[];return!$||H.length===0?H:Qc(H,A)},[t,$,A]),ne=c.useMemo(()=>g.filter(H=>{var O;return!!((O=H.image)!=null&&O.url)}).length,[g]),X=F?Zc:1;c.useLayoutEffect(()=>{G.current=0,z({}),P.current=null,ae(zr),k(0)},[Y]),c.useEffect(()=>{if(!S||m!=="randomize")return;const H=v.current;if(!H)return;const O=Se=>{z(Ee=>{let _e=null;for(const B of Se)B in Ee&&(ed(H,B)||(_e||(_e={...Ee}),delete _e[B]));return _e??Ee})},se=new IntersectionObserver(Se=>{const Ee=new Set;for(const _e of Se){const B=_e.target.dataset.marqueeItemIndex,le=B!==void 0?Number(B):NaN;Number.isNaN(le)||Ee.add(le)}Ee.size>0&&O(Ee)},{root:H,threshold:0});Object.keys(W).forEach(Se=>{const Ee=Number(Se);H.querySelectorAll(`[data-marquee-item-index="${Ee}"]`).forEach(_e=>se.observe(_e))});let ge=0;const Te=()=>{const Se=Object.keys(V.current);Se.length!==0&&(O(Se.map(Number)),ge=requestAnimationFrame(Te))};return Object.keys(V.current).length>0&&(ge=requestAnimationFrame(Te)),()=>{cancelAnimationFrame(ge),se.disconnect()}},[m,W,S]),c.useLayoutEffect(()=>{if(!F)return;const H=v.current,O=j.current;if(!H||!O)return;let se=0;const ge=()=>{const Ee=H.getBoundingClientRect().width,_e=O.getBoundingClientRect().width,B=P.current,le=typeof B=="number"&&Math.abs(B-_e)<=.25;if(P.current=_e,$&&_e>0&&A>0){const _=_e/A;if(_>0&&Ee>0){const K=Math.max(zr,Math.ceil(Ee/_)+1);if(K!==A){ae(K);return}}}if(_e>0&&T<=0){k(_e);return}le&&_e!==T?k(_e):!le&&T<=0&&(cancelAnimationFrame(se),se=requestAnimationFrame(ge))},Te=()=>{cancelAnimationFrame(se),se=requestAnimationFrame(ge)};ee.current=Te,Te();const Se=new ResizeObserver(Te);return Se.observe(H),Se.observe(O),()=>{ee.current=null,cancelAnimationFrame(se),Se.disconnect()}},[$,F,T,Y,A]),c.useLayoutEffect(()=>{const H=E.current;if(!F||!H)return;const O=T>0?T:0,se=O>0&&L>0?O/L*1e3:0,ge=`${Math.max(0,se)/1e3}s`;H.style.setProperty("--marquee-distance",`${O}px`),H.style.setProperty("--marquee-duration",ge)},[$,F,L,T]),c.useLayoutEffect(()=>{if(!F){N(0);return}if(T<=0){N(0);return}const H=E.current;if(!H)return;const O=()=>{const ge=H.getBoundingClientRect().height;N(ge>0?ge:0)};O();const se=new ResizeObserver(O);return se.observe(H),()=>se.disconnect()},[F,X,g,n,u,w,C,T,b,W]);const J=()=>{q&&M(!0)},ue=()=>{q&&M(!1)},Z=c.useCallback(()=>{var H;G.current=Math.min(ne,G.current+1),(H=ee.current)==null||H.call(ee)},[ne]),re=c.useCallback((H,O)=>{z(se=>{const ge=se[H]??O,Te=(t??[]).filter(Ee=>Ee!==ge);if(Te.length===0)return se;const Se=Te[Math.floor(Math.random()*Te.length)];return{...se,[H]:Se}})},[t]),I=(H,O,se,ge)=>{const Te=S&&m==="randomize"&&b.display==="cover"?W[se]??H:H,Se=`max(${D(u)}, ${Xc}px)`,Ee=`calc(-0.5 * (${Se} + ${D(u)}))`;return a.jsxs("div",{className:`${l}-marquee-card`,"data-marquee-item-index":se,onMouseEnter:S&&m==="randomize"&&b.display==="cover"?()=>re(se,H):void 0,children:[a.jsx(td,{item:Te,prefix:l,imageFit:b,imageMaxWidth:w,imageMaxHeight:C,imageHoverClass:y,isEditor:n,isFirstSet:ge,scaled:D,onFirstSetImageDone:Z}),h&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${l}-gap-control`,style:{position:"absolute",top:0,right:Ee,width:Se,height:"100%"}})]},`${O}-${se}`)};if(F){const H=$?q&&ie?"paused":"running":"paused";return a.jsxs("div",{ref:v,className:Pe(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Marquee",style:T>0&&R>0?{height:R}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:i}}),a.jsx("div",{ref:E,className:`${l}-marquee-track`,"data-direction":s,onMouseEnter:J,onMouseLeave:ue,style:{"--marquee-play-state":H},children:Array.from({length:X},(O,se)=>a.jsx("div",{ref:se===0?j:void 0,className:Pe(`${l}-marquee-row`,`${l}-marquee-set`),style:{gap:D(u),paddingRight:D(u)},"aria-hidden":se>0,children:g.map((ge,Te)=>I(ge,se,Te,se===0))},`set-${se}`))},"marquee-track")]})}return a.jsxs("div",{ref:v,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:i}}),a.jsx("div",{className:Pe(`${l}-marquee-row`,`${l}-marquee-static`),style:{gap:D(u),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((H,O)=>I(H,0,O))},"marquee-static")]})},rd=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
1693
1693
  import cn from 'classnames';\r
1694
1694
  import { CommonComponentProps } from '../props';\r
1695
1695
  import { scalingValue } from '../utils/scalingValue';\r
@@ -2407,7 +2407,7 @@ type MarqueeProps = {\r
2407
2407
  pointer-events: auto;
2408
2408
  z-index: 10;
2409
2409
  }
2410
- `}const ad=30,io=2,sd=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o})=>{const{prefix:l}=y.useScopedStyles(),{align:i,speed:c,direction:s,pauseOnHover:p,gap:u,cardWidth:T,corners:v,stroke:f,strokeColor:m,bgColor:g,padding:C,logoMarginTop:S,logoWidth:$,logoHeight:b,captionMarginTop:F}=e,L=!!o,N=((t==null?void 0:t.length)??0)>0,w=c>0&&(!n||r),A=N&&(w||n),D=Math.max(0,c)*ad,P=I=>y.scalingValue(I,n??!1),M=d.useRef(null),R=d.useRef(null),B=d.useRef(null),[K,te]=d.useState(0),[x,E]=d.useState(0),[H,W]=d.useState(0),_=w&&p==="on",[z,X]=d.useState(!1),Z=d.useRef(null),[k,J]=d.useState(0),[h,ne]=d.useState(0),he=d.useRef(null),ce=I=>{var q,Y,ae,me,ke;return{fontSettings:{fontFamily:(e==null?void 0:e[`${I}FontFamily`])??"Arial",fontWeight:((q=e==null?void 0:e[`${I}FontSettings`])==null?void 0:q.fontWeight)??400,fontStyle:((Y=e==null?void 0:e[`${I}FontSettings`])==null?void 0:Y.fontStyle)??"normal"},textAppearance:{textTransform:((ae=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:ae.textTransform)??"none",textDecoration:((me=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:me.textDecoration)??"none",fontVariant:((ke=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:ke.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${I}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${I}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${I}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${I}LineHeight`])??.01,color:(e==null?void 0:e[`${I}Color`])??"#000000"}},be=ce("text"),re=ce("caption"),de=d.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(I=>{var j,q;return(((j=I.text)==null?void 0:j.length)??0)>0||(((q=I.caption)==null?void 0:q.length)??0)>0}),[t]),V=d.useMemo(()=>!A||(t==null?void 0:t.length)===0?1:x<=0||K<=0?io:Math.max(io,Math.ceil(K/x)+1),[A,t==null?void 0:t.length,x,K]);d.useLayoutEffect(()=>{if(!A)return;const I=M.current,j=B.current;if(!I||!j)return;let q=0;const Y=()=>{const ke=I.getBoundingClientRect().width,fe=j.getBoundingClientRect().width,ve=he.current,Re=typeof ve=="number"&&Math.abs(ve-fe)<=.25;if(he.current=fe,te(ke),typeof fe=="number"&&fe>0&&x<=0){E(fe);return}Re&&fe!==x?E(fe):!Re&&x<=0&&(cancelAnimationFrame(q),q=requestAnimationFrame(Y))},ae=()=>{cancelAnimationFrame(q),q=requestAnimationFrame(Y)};ae();const me=new ResizeObserver(ae);return me.observe(I),me.observe(j),()=>{cancelAnimationFrame(q),me.disconnect()}},[w,A,x]),d.useLayoutEffect(()=>{const I=R.current;if(!A||!I)return;const j=x>0?x:0,q=j>0&&D>0?j/D*1e3:0,Y=`${Math.max(0,q)/1e3}s`;I.style.setProperty("--marquee-distance",`${j}px`),I.style.setProperty("--marquee-duration",Y)},[w,A,D,x]),d.useLayoutEffect(()=>{if(!A){W(0);return}const I=B.current,j=R.current;if(!I||!j)return;const q=()=>{let ae=0;for(let me=0;me<I.children.length;me++){const fe=I.children[me].firstElementChild;fe&&(ae=Math.max(ae,fe.offsetHeight))}ae<=0&&(ae=j.offsetHeight),W(ae>0?ae:0)};q();const Y=new ResizeObserver(q);return Y.observe(I),Y.observe(j),()=>{Y.disconnect()}},[A,V,t,n,u,T,C,f,v,$,b,k,h]);const U=()=>{_&&X(!0)},G=()=>{_&&X(!1)},se=d.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),ye=d.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),Te=d.useCallback((I,j,q,Y)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[a.jsx("div",{"data-controls":L?Y==null?void 0:Y.controlsName:void 0,"data-controls-axis":L?"y":void 0,className:L?`${l}-control`:void 0,style:{height:P((Y==null?void 0:Y.marginTop)??0)}}),a.jsx("div",{...Y!=null&&Y.dataMeasureKind?{"data-testimonial-measure":Y.dataMeasureKind}:{},style:{...et(I,n),textAlign:ye,pointerEvents:"auto",...typeof(Y==null?void 0:Y.minHeightPx)=="number"&&Y.minHeightPx>0?{minHeight:Y.minHeightPx}:{}},children:a.jsx(xn,{content:j})})]},q),[se,ye,n,L,l,P]),$e=d.useCallback((I,j,q)=>{var Y,ae,me;return a.jsxs("div",{style:{padding:`${P(C.top)} ${P(C.right)} ${P(C.bottom)} ${P(C.left)}`,width:P(T+f*2),height:"100%",borderRadius:P(v),border:`${P(f)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${l}-cover`,style:{background:g}}),a.jsxs("div",{className:`${l}-elements-overlay`,style:{alignItems:se,textAlign:ye},children:[I.text&&Te(be,I.text,"text",q!=null&&q.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(q==null?void 0:q.textMinHeightPx)=="number"&&q.textMinHeightPx>0?{minHeightPx:q.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[a.jsx("div",{"data-controls":L&&!(q!=null&&q.dataMeasureAttrs)?"logoMarginTop":void 0,className:L&&!(q!=null&&q.dataMeasureAttrs)?`${l}-control`:void 0,style:{height:P(S)}}),a.jsx("div",{style:{width:P($),height:P(b)},children:((Y=I.logo)==null?void 0:Y.url)&&a.jsx("img",{src:I.logo.url,alt:((ae=I.logo)==null?void 0:ae.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((me=I.logo)==null?void 0:me.objectFit)||"contain"}})})]}),I.caption&&Te(re,I.caption,"caption",{...q!=null&&q.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:F,...q!=null&&q.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(q==null?void 0:q.captionMinHeightPx)=="number"&&q.captionMinHeightPx>0?{minHeightPx:q.captionMinHeightPx}:{}})]})]},j)},[g,F,re,T,v,b,S,$,se,ye,C.bottom,C.left,C.right,C.top,Te,f,m,be,n,L,l]),Pe=d.useCallback(I=>{J(I.maxTextPx),ne(I.maxCaptionPx)},[]);d.useLayoutEffect(()=>{if(!de){Pe({maxTextPx:0,maxCaptionPx:0});return}const I=Z.current;if(!I)return;const j=()=>{y.readTestimonialTextMeasure(I,Pe)};j();const q=new ResizeObserver(j);return q.observe(I),()=>{q.disconnect()}},[de,Pe,t,$e]);const _e=de?{textMinHeightPx:k,captionMinHeightPx:h}:void 0,O=de?a.jsx("div",{ref:Z,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((I,j)=>$e(I,`measure-${j}`,{dataMeasureAttrs:!0}))}):null,ie=(I,j)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[$e(I,`card-${j}`,_e),L&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${P(u)})`,width:P(u),height:"100%",pointerEvents:"auto",zIndex:2}})]},j);if(A){const I=w?_&&z?"paused":"running":"paused";return a.jsxs("div",{ref:M,className:Ee(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...H>0?{height:H}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ro(l)}}),O,a.jsx("div",{ref:R,className:`${l}-marquee-track`,"data-direction":s,onMouseEnter:U,onMouseLeave:G,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":I},children:Array.from({length:V},(j,q)=>a.jsx("div",{ref:q===0?B:void 0,className:`${l}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:P(u),paddingRight:P(u)},"aria-hidden":q>0,children:t==null?void 0:t.map((Y,ae)=>ie(Y,`${q}-${ae}`))},`set-${q}`))})]})}return a.jsxs("div",{className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ro(l)}}),O,a.jsx("div",{style:{gap:P(u),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((I,j)=>ie(I,j))})]})},ld=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2410
+ `}const ad=30,io=2,sd=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o})=>{const{prefix:l}=x.useScopedStyles(),{align:i,speed:d,direction:s,pauseOnHover:p,gap:u,cardWidth:w,corners:C,stroke:b,strokeColor:m,bgColor:h,padding:S,logoMarginTop:y,logoWidth:$,logoHeight:f,captionMarginTop:F}=e,L=!!o,D=((t==null?void 0:t.length)??0)>0,v=d>0&&(!n||r),E=D&&(v||n),j=Math.max(0,d)*ad,T=_=>x.scalingValue(_,n??!1),k=c.useRef(null),R=c.useRef(null),N=c.useRef(null),[q,ie]=c.useState(0),[M,W]=c.useState(0),[z,V]=c.useState(0),P=v&&p==="on",[G,ee]=c.useState(!1),Y=c.useRef(null),[A,ae]=c.useState(0),[g,ne]=c.useState(0),X=c.useRef(null),J=_=>{var U,Q,de,fe,Re;return{fontSettings:{fontFamily:(e==null?void 0:e[`${_}FontFamily`])??"Arial",fontWeight:((U=e==null?void 0:e[`${_}FontSettings`])==null?void 0:U.fontWeight)??400,fontStyle:((Q=e==null?void 0:e[`${_}FontSettings`])==null?void 0:Q.fontStyle)??"normal"},textAppearance:{textTransform:((de=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:de.textTransform)??"none",textDecoration:((fe=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:fe.textDecoration)??"none",fontVariant:((Re=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:Re.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${_}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${_}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${_}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${_}LineHeight`])??.01,color:(e==null?void 0:e[`${_}Color`])??"#000000"}},ue=J("text"),Z=J("caption"),re=c.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(_=>{var K,U;return(((K=_.text)==null?void 0:K.length)??0)>0||(((U=_.caption)==null?void 0:U.length)??0)>0}),[t]),I=c.useMemo(()=>!E||(t==null?void 0:t.length)===0?1:M<=0||q<=0?io:Math.max(io,Math.ceil(q/M)+1),[E,t==null?void 0:t.length,M,q]);c.useLayoutEffect(()=>{if(!E)return;const _=k.current,K=N.current;if(!_||!K)return;let U=0;const Q=()=>{const Re=_.getBoundingClientRect().width,ve=K.getBoundingClientRect().width,be=X.current,ke=typeof be=="number"&&Math.abs(be-ve)<=.25;if(X.current=ve,ie(Re),typeof ve=="number"&&ve>0&&M<=0){W(ve);return}ke&&ve!==M?W(ve):!ke&&M<=0&&(cancelAnimationFrame(U),U=requestAnimationFrame(Q))},de=()=>{cancelAnimationFrame(U),U=requestAnimationFrame(Q)};de();const fe=new ResizeObserver(de);return fe.observe(_),fe.observe(K),()=>{cancelAnimationFrame(U),fe.disconnect()}},[v,E,M]),c.useLayoutEffect(()=>{const _=R.current;if(!E||!_)return;const K=M>0?M:0,U=K>0&&j>0?K/j*1e3:0,Q=`${Math.max(0,U)/1e3}s`;_.style.setProperty("--marquee-distance",`${K}px`),_.style.setProperty("--marquee-duration",Q)},[v,E,j,M]),c.useLayoutEffect(()=>{if(!E){V(0);return}const _=N.current,K=R.current;if(!_||!K)return;const U=()=>{let de=0;for(let fe=0;fe<_.children.length;fe++){const ve=_.children[fe].firstElementChild;ve&&(de=Math.max(de,ve.offsetHeight))}de<=0&&(de=K.offsetHeight),V(de>0?de:0)};U();const Q=new ResizeObserver(U);return Q.observe(_),Q.observe(K),()=>{Q.disconnect()}},[E,I,t,n,u,w,S,b,C,$,f,A,g]);const H=()=>{P&&ee(!0)},O=()=>{P&&ee(!1)},se=c.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),ge=c.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),Te=c.useCallback((_,K,U,Q)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[a.jsx("div",{"data-controls":L?Q==null?void 0:Q.controlsName:void 0,"data-controls-axis":L?"y":void 0,className:L?`${l}-control`:void 0,style:{height:T((Q==null?void 0:Q.marginTop)??0)}}),a.jsx("div",{...Q!=null&&Q.dataMeasureKind?{"data-testimonial-measure":Q.dataMeasureKind}:{},style:{...et(_,n),textAlign:ge,pointerEvents:"auto",...typeof(Q==null?void 0:Q.minHeightPx)=="number"&&Q.minHeightPx>0?{minHeight:Q.minHeightPx}:{}},children:a.jsx(xn,{content:K})})]},U),[se,ge,n,L,l,T]),Se=c.useCallback((_,K,U)=>{var Q,de,fe;return a.jsxs("div",{style:{padding:`${T(S.top)} ${T(S.right)} ${T(S.bottom)} ${T(S.left)}`,width:T(w+b*2),height:"100%",borderRadius:T(C),border:`${T(b)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${l}-cover`,style:{background:h}}),a.jsxs("div",{className:`${l}-elements-overlay`,style:{alignItems:se,textAlign:ge},children:[_.text&&Te(ue,_.text,"text",U!=null&&U.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(U==null?void 0:U.textMinHeightPx)=="number"&&U.textMinHeightPx>0?{minHeightPx:U.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[a.jsx("div",{"data-controls":L&&!(U!=null&&U.dataMeasureAttrs)?"logoMarginTop":void 0,className:L&&!(U!=null&&U.dataMeasureAttrs)?`${l}-control`:void 0,style:{height:T(y)}}),a.jsx("div",{style:{width:T($),height:T(f)},children:((Q=_.logo)==null?void 0:Q.url)&&a.jsx("img",{src:_.logo.url,alt:((de=_.logo)==null?void 0:de.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((fe=_.logo)==null?void 0:fe.objectFit)||"contain"}})})]}),_.caption&&Te(Z,_.caption,"caption",{...U!=null&&U.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:F,...U!=null&&U.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(U==null?void 0:U.captionMinHeightPx)=="number"&&U.captionMinHeightPx>0?{minHeightPx:U.captionMinHeightPx}:{}})]})]},K)},[h,F,Z,w,C,f,y,$,se,ge,S.bottom,S.left,S.right,S.top,Te,b,m,ue,n,L,l]),Ee=c.useCallback(_=>{ae(_.maxTextPx),ne(_.maxCaptionPx)},[]);c.useLayoutEffect(()=>{if(!re){Ee({maxTextPx:0,maxCaptionPx:0});return}const _=Y.current;if(!_)return;const K=()=>{x.readTestimonialTextMeasure(_,Ee)};K();const U=new ResizeObserver(K);return U.observe(_),()=>{U.disconnect()}},[re,Ee,t,Se]);const _e=re?{textMinHeightPx:A,captionMinHeightPx:g}:void 0,B=re?a.jsx("div",{ref:Y,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((_,K)=>Se(_,`measure-${K}`,{dataMeasureAttrs:!0}))}):null,le=(_,K)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Se(_,`card-${K}`,_e),L&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${T(u)})`,width:T(u),height:"100%",pointerEvents:"auto",zIndex:2}})]},K);if(E){const _=v?P&&G?"paused":"running":"paused";return a.jsxs("div",{ref:k,className:Pe(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...z>0?{height:z}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ro(l)}}),B,a.jsx("div",{ref:R,className:`${l}-marquee-track`,"data-direction":s,onMouseEnter:H,onMouseLeave:O,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":_},children:Array.from({length:I},(K,U)=>a.jsx("div",{ref:U===0?N:void 0,className:`${l}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:T(u),paddingRight:T(u)},"aria-hidden":U>0,children:t==null?void 0:t.map((Q,de)=>le(Q,`${U}-${de}`))},`set-${U}`))})]})}return a.jsxs("div",{className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ro(l)}}),B,a.jsx("div",{style:{gap:T(u),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((_,K)=>le(_,K))})]})},ld=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2411
2411
  import cn from 'classnames';
2412
2412
  import { CommonComponentProps } from '../props';
2413
2413
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3146,7 +3146,7 @@ type TestimonialsSettings = {
3146
3146
  width: 100%;
3147
3147
  height: 100%;
3148
3148
  }
3149
- `}const pd=3e3,md=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o})=>{const{prefix:l}=y.useScopedStyles(),i=t||[],{speed:c,align:s,width:p,imageMarginTop:u,textMarginTop:T,captionMarginTop:v,imageWidth:f,imageHeight:m,controlsWidth:g,controlsColor:C,controlsHoverColor:S}=e,$=c>0&&(!n||!!r),[b,F]=d.useState(0),[L,N]=d.useState(null),[w,A]=d.useState(!1),D=d.useRef(null),P=d.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),M=d.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]);d.useEffect(()=>{F(0),N(null),A(!1)},[i.length]);const R=i[b],B=L===null?null:i[L],K=re=>{var V,U,G,se,ye;return{fontSettings:{fontFamily:(e==null?void 0:e[`${re}FontFamily`])??"Arial",fontWeight:((V=e==null?void 0:e[`${re}FontSettings`])==null?void 0:V.fontWeight)??400,fontStyle:((U=e==null?void 0:e[`${re}FontSettings`])==null?void 0:U.fontStyle)??"normal"},textAppearance:{textTransform:((G=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:G.textTransform)??"none",textDecoration:((se=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:se.textDecoration)??"none",fontVariant:((ye=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:ye.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${re}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${re}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${re}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${re}WordSpacing`])??0,color:(e==null?void 0:e[`${re}Color`])??"#000000"}},te=K("text"),x=K("caption"),E=i.length>1&&i.some(re=>{var de,V;return(((de=re.text)==null?void 0:de.length)??0)>0||(((V=re.caption)==null?void 0:V.length)??0)>0}),H=d.useRef(null),[W,_]=d.useState(0),[z,X]=d.useState(0),Z=e.controls??{mode:"Off",icon:null},k=i.length>1,J=d.useCallback((re,de)=>!k||de===re?re:(D.current&&window.clearTimeout(D.current),N(re),A(!0),D.current=window.setTimeout(()=>{N(null),A(!1),D.current=null},300),de),[k]),h=d.useCallback(()=>{k&&F(re=>J(re,(re-1+i.length)%i.length))},[k,J,i.length]),ne=d.useCallback(()=>{k&&F(re=>J(re,(re+1)%i.length))},[k,J,i.length]);d.useEffect(()=>{if(!$||!k)return;const re=Math.max(300,pd/c),de=window.setInterval(()=>{F(V=>J(V,(V+1)%i.length))},re);return()=>{window.clearInterval(de)}},[$,k,J,i.length,c]),d.useEffect(()=>()=>{D.current&&window.clearTimeout(D.current)},[]);const he=(re,de)=>{var ye,Te,$e,Pe;const V=de==null?void 0:de.textMinHeightPx,U=de==null?void 0:de.captionMinHeightPx,G=de==null?void 0:de.dataMeasureAttrs,se=o&&!(de!=null&&de.dataMeasureAttrs)&&!(de!=null&&de.hideControls);return a.jsxs(a.Fragment,{children:[re.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:P,width:"100%"},children:[a.jsx("div",{"data-controls":se?"textMarginTop":void 0,className:se?`${l}-control`:void 0,style:{height:y.scalingValue(T??0,n??!1)}}),a.jsx("div",{...G&&{"data-testimonial-measure":"text"},style:{...et(te,n),...V&&V>0?{minHeight:V}:{},textAlign:M,pointerEvents:"auto"},children:a.jsx(xn,{content:re.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:P,width:"100%"},children:[a.jsx("div",{"data-controls":se?"imageMarginTop":void 0,className:se?`${l}-control`:void 0,style:{height:y.scalingValue(u??0,n??!1)}}),a.jsx("div",{style:{width:y.scalingValue(f??0,n??!1),height:y.scalingValue(m??0,n??!1)},children:((ye=re.image)==null?void 0:ye.url)&&a.jsx("img",{src:(Te=re.image)==null?void 0:Te.url,alt:(($e=re.image)==null?void 0:$e.name)??"",className:`${l}-icon`,style:{objectFit:((Pe=re.image)==null?void 0:Pe.objectFit)||"contain"}})})]}),re.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:P,width:"100%"},children:[a.jsx("div",{"data-controls":se?"captionMarginTop":void 0,className:se?`${l}-control`:void 0,style:{height:y.scalingValue(v??0,n??!1)}}),a.jsx("div",{...G?{"data-testimonial-measure":"caption"}:{},style:{...et(x,n),...U&&U>0?{minHeight:U}:{},textAlign:M,pointerEvents:"auto"},children:a.jsx(xn,{content:re.caption})})]})]})},ce=d.useCallback(re=>{_(re.maxTextPx),X(re.maxCaptionPx)},[]);if(d.useLayoutEffect(()=>{if(!E){ce({maxTextPx:0,maxCaptionPx:0});return}const re=H.current;if(!re)return;const de=()=>{y.readTestimonialTextMeasure(re,ce)};de();const V=new ResizeObserver(de);return V.observe(re),()=>{V.disconnect()}},[E,ce,t]),!R)return a.jsx(a.Fragment,{});const be=E?{textMinHeightPx:W,captionMinHeightPx:z}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${l}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ud(l)}}),a.jsxs("div",{className:`${l}-wrapper`,style:{width:y.scalingValue(p??0,n??!1),alignItems:P},children:[E&&a.jsx("div",{ref:H,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:i.map((re,de)=>a.jsx("div",{style:{width:"100%"},children:he(re,{dataMeasureAttrs:!0})},de))}),a.jsxs("div",{className:`${l}-fade-stack`,children:[B&&w&&a.jsx("div",{className:Ee(`${l}-fade-item-prev`,`${l}-fade-out`),children:he(B,{...be,hideControls:!0})}),a.jsx("div",{className:Ee(`${l}-fade-item-current`,w?`${l}-fade-in`:void 0),children:he(R,be)})]})]}),Z.mode==="On"&&a.jsxs("div",{className:`${l}-controls`,children:[a.jsx("div",{className:`${l}-arrow`,style:{width:y.scalingValue(g??.02,n??!1),height:y.scalingValue(g??.02,n??!1),"--arrow-hover-color":S},children:a.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:h,disabled:!k,"aria-label":"Previous testimonial",children:Z.icon&&a.jsx(Ht,{url:Z.icon,fill:C,hoverFill:S,className:Ee(`${l}-arrow-img`,`${l}-mirror`)})})}),a.jsx("div",{className:Ee(`${l}-arrow`,`${l}-next-arrow`),style:{width:y.scalingValue(g??.02,n??!1),height:y.scalingValue(g??.02,n??!1),"--arrow-hover-color":S},children:a.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:ne,disabled:!k,"aria-label":"Next testimonial",children:Z.icon&&a.jsx(Ht,{url:Z.icon,fill:C,hoverFill:S,className:`${l}-arrow-img`})})})]})]})})},gd=`import cn from 'classnames';\r
3149
+ `}const pd=3e3,md=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o})=>{const{prefix:l}=x.useScopedStyles(),i=t||[],{speed:d,align:s,width:p,imageMarginTop:u,textMarginTop:w,captionMarginTop:C,imageWidth:b,imageHeight:m,controlsWidth:h,controlsColor:S,controlsHoverColor:y}=e,$=d>0&&(!n||!!r),[f,F]=c.useState(0),[L,D]=c.useState(null),[v,E]=c.useState(!1),j=c.useRef(null),T=c.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),k=c.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]);c.useEffect(()=>{F(0),D(null),E(!1)},[i.length]);const R=i[f],N=L===null?null:i[L],q=Z=>{var I,H,O,se,ge;return{fontSettings:{fontFamily:(e==null?void 0:e[`${Z}FontFamily`])??"Arial",fontWeight:((I=e==null?void 0:e[`${Z}FontSettings`])==null?void 0:I.fontWeight)??400,fontStyle:((H=e==null?void 0:e[`${Z}FontSettings`])==null?void 0:H.fontStyle)??"normal"},textAppearance:{textTransform:((O=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:O.textTransform)??"none",textDecoration:((se=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:se.textDecoration)??"none",fontVariant:((ge=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:ge.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${Z}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${Z}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${Z}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${Z}WordSpacing`])??0,color:(e==null?void 0:e[`${Z}Color`])??"#000000"}},ie=q("text"),M=q("caption"),W=i.length>1&&i.some(Z=>{var re,I;return(((re=Z.text)==null?void 0:re.length)??0)>0||(((I=Z.caption)==null?void 0:I.length)??0)>0}),z=c.useRef(null),[V,P]=c.useState(0),[G,ee]=c.useState(0),Y=e.controls??{mode:"Off",icon:null},A=i.length>1,ae=c.useCallback((Z,re)=>!A||re===Z?Z:(j.current&&window.clearTimeout(j.current),D(Z),E(!0),j.current=window.setTimeout(()=>{D(null),E(!1),j.current=null},300),re),[A]),g=c.useCallback(()=>{A&&F(Z=>ae(Z,(Z-1+i.length)%i.length))},[A,ae,i.length]),ne=c.useCallback(()=>{A&&F(Z=>ae(Z,(Z+1)%i.length))},[A,ae,i.length]);c.useEffect(()=>{if(!$||!A)return;const Z=Math.max(300,pd/d),re=window.setInterval(()=>{F(I=>ae(I,(I+1)%i.length))},Z);return()=>{window.clearInterval(re)}},[$,A,ae,i.length,d]),c.useEffect(()=>()=>{j.current&&window.clearTimeout(j.current)},[]);const X=(Z,re)=>{var ge,Te,Se,Ee;const I=re==null?void 0:re.textMinHeightPx,H=re==null?void 0:re.captionMinHeightPx,O=re==null?void 0:re.dataMeasureAttrs,se=o&&!(re!=null&&re.dataMeasureAttrs)&&!(re!=null&&re.hideControls);return a.jsxs(a.Fragment,{children:[Z.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:T,width:"100%"},children:[a.jsx("div",{"data-controls":se?"textMarginTop":void 0,className:se?`${l}-control`:void 0,style:{height:x.scalingValue(w??0,n??!1)}}),a.jsx("div",{...O&&{"data-testimonial-measure":"text"},style:{...et(ie,n),...I&&I>0?{minHeight:I}:{},textAlign:k,pointerEvents:"auto"},children:a.jsx(xn,{content:Z.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:T,width:"100%"},children:[a.jsx("div",{"data-controls":se?"imageMarginTop":void 0,className:se?`${l}-control`:void 0,style:{height:x.scalingValue(u??0,n??!1)}}),a.jsx("div",{style:{width:x.scalingValue(b??0,n??!1),height:x.scalingValue(m??0,n??!1)},children:((ge=Z.image)==null?void 0:ge.url)&&a.jsx("img",{src:(Te=Z.image)==null?void 0:Te.url,alt:((Se=Z.image)==null?void 0:Se.name)??"",className:`${l}-icon`,style:{objectFit:((Ee=Z.image)==null?void 0:Ee.objectFit)||"contain"}})})]}),Z.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:T,width:"100%"},children:[a.jsx("div",{"data-controls":se?"captionMarginTop":void 0,className:se?`${l}-control`:void 0,style:{height:x.scalingValue(C??0,n??!1)}}),a.jsx("div",{...O?{"data-testimonial-measure":"caption"}:{},style:{...et(M,n),...H&&H>0?{minHeight:H}:{},textAlign:k,pointerEvents:"auto"},children:a.jsx(xn,{content:Z.caption})})]})]})},J=c.useCallback(Z=>{P(Z.maxTextPx),ee(Z.maxCaptionPx)},[]);if(c.useLayoutEffect(()=>{if(!W){J({maxTextPx:0,maxCaptionPx:0});return}const Z=z.current;if(!Z)return;const re=()=>{x.readTestimonialTextMeasure(Z,J)};re();const I=new ResizeObserver(re);return I.observe(Z),()=>{I.disconnect()}},[W,J,t]),!R)return a.jsx(a.Fragment,{});const ue=W?{textMinHeightPx:V,captionMinHeightPx:G}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${l}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ud(l)}}),a.jsxs("div",{className:`${l}-wrapper`,style:{width:x.scalingValue(p??0,n??!1),alignItems:T},children:[W&&a.jsx("div",{ref:z,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:i.map((Z,re)=>a.jsx("div",{style:{width:"100%"},children:X(Z,{dataMeasureAttrs:!0})},re))}),a.jsxs("div",{className:`${l}-fade-stack`,children:[N&&v&&a.jsx("div",{className:Pe(`${l}-fade-item-prev`,`${l}-fade-out`),children:X(N,{...ue,hideControls:!0})}),a.jsx("div",{className:Pe(`${l}-fade-item-current`,v?`${l}-fade-in`:void 0),children:X(R,ue)})]})]}),Y.mode==="On"&&a.jsxs("div",{className:`${l}-controls`,children:[a.jsx("div",{className:`${l}-arrow`,style:{width:x.scalingValue(h??.02,n??!1),height:x.scalingValue(h??.02,n??!1),"--arrow-hover-color":y},children:a.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:g,disabled:!A,"aria-label":"Previous testimonial",children:Y.icon&&a.jsx(Nt,{url:Y.icon,fill:S,hoverFill:y,className:Pe(`${l}-arrow-img`,`${l}-mirror`)})})}),a.jsx("div",{className:Pe(`${l}-arrow`,`${l}-next-arrow`),style:{width:x.scalingValue(h??.02,n??!1),height:x.scalingValue(h??.02,n??!1),"--arrow-hover-color":y},children:a.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:ne,disabled:!A,"aria-label":"Next testimonial",children:Y.icon&&a.jsx(Nt,{url:Y.icon,fill:S,hoverFill:y,className:`${l}-arrow-img`})})})]})]})})},gd=`import cn from 'classnames';\r
3150
3150
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
3151
3151
  import { CommonComponentProps } from '../props';\r
3152
3152
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';\r
@@ -3642,7 +3642,7 @@ type TestimonialsSettings = {\r
3642
3642
  icon?: string | null;\r
3643
3643
  };\r
3644
3644
  };\r
3645
- `,hd="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>'),ao={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},fd={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...ao.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},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:{...ao.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{controls:{mode:"On",icon:hd},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},yd={element:md,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:fd,sourceCode:gd,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function vd(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function so(e){return((e==null?void 0:e.trim().length)??0)>0}function jr(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function qr(e,t,n,r){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((o-t)/2,r)}}function bd(e){return`
3645
+ `,hd="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>'),ao={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},fd={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...ao.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},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:{...ao.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{controls:{mode:"On",icon:hd},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},yd={element:md,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:fd,sourceCode:gd,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function vd(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function so(e){return((e==null?void 0:e.trim().length)??0)>0}function jr(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function qr(e,t,n,r){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:x.scalingValue((o-t)/2,r)}}function bd(e){return`
3646
3646
  .${e}-wrapper {
3647
3647
  display: grid;
3648
3648
  align-items: start;
@@ -3845,7 +3845,7 @@ type TestimonialsSettings = {\r
3845
3845
  pointer-events: auto;
3846
3846
  z-index: 10;
3847
3847
  }
3848
- `}const It=500,xd=750,zt="cubic-bezier(0.22, 1, 0.36, 1)";function Cd(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function $d(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Sd(e){const[t]=e.media;return t!=null&&t.url?t:null}function wd(e){return!Array.isArray(e)||e.length===0?[]:Cd(e)?e.flatMap(t=>{const n=$d(t);if(!n)return[];const r=Sd(t);return[{displayMedia:n,lightboxMedia:r!=null&&r.url?r:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Mn(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function lo({media:e,className:t,style:n,onMediaClick:r}){return Mn(e)?a.jsx("video",{src:e.url,className:t,style:{...n,cursor:r?"pointer":"default"},muted:!0,loop:!0,autoPlay:!0,playsInline:!0,onClick:r}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:r?"pointer":"default"},onClick:r})}function Td(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ld({items:e,index:t,imageDisplay:n,originRect:r,reverseClose:o,onClose:l,onPrev:i,onNext:c,counterClassName:s,counterStyle:p}){const u=n==="cover",T=d.useRef(null),v=d.useRef(null),[f,m]=d.useState(null),[g,C]=d.useState(r?"opening":"open"),[S,$]=d.useState(!0),b=d.useRef(t),F=e[t],L=F?Mn(F):!1,N=d.useCallback(()=>{const x=T.current,E=v.current;if(!x||!E)return;const H=x.getBoundingClientRect(),W=H.width,_=H.height,{width:z,height:X}=Td(E);if(!W||!_||!z||!X)return;if(n==="cover"){m({width:W,height:_,left:H.left,top:H.top});return}const Z=z/X,k=W/_;if(Z>k){const J=W/Z;m({width:W,height:J,left:H.left,top:H.top+(_-J)/2})}else{const J=_*Z;m({width:J,height:_,left:H.left+(W-J)/2,top:H.top})}},[n]);d.useEffect(()=>{N();const x=T.current;if(!x)return;const E=new ResizeObserver(()=>N());return E.observe(x),()=>E.disconnect()},[N,t]),d.useEffect(()=>{g==="opening"&&f&&C("open")},[g,f]),d.useEffect(()=>{if(g!=="closing")return;const x=setTimeout(()=>l(),It);return()=>clearTimeout(x)},[g,l]),d.useEffect(()=>{b.current!==t&&$(!1),b.current=t},[t]),d.useEffect(()=>{const x=v.current;if(x instanceof HTMLVideoElement){if(g!=="open"){x.pause();return}x.play().catch(()=>{})}},[t,g,L]),d.useEffect(()=>{const x=E=>{E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),g!=="closing"&&C("closing"))};return window.addEventListener("keydown",x,!0),()=>window.removeEventListener("keydown",x,!0)},[g]);const w=()=>{g!=="closing"&&C("closing")},A=g==="open",D=g==="closing",P=D&&o&&!!r,M=g==="opening"?r??f:P?r:f,R=x=>{if(x.stopPropagation(),e.length<=1)return;const E=x.currentTarget.getBoundingClientRect(),H=x.clientX-E.left,W=x.clientY-E.top,_=Math.min(52,E.height*.2);if(!(W>E.height-_)){if(H<E.width/2){i();return}c()}},B=x=>{if(e.length<=1)return;const E=x.currentTarget.getBoundingClientRect(),H=x.clientX-E.left,W=x.clientY-E.top,_=Math.min(52,E.height*.2);if(W>E.height-_){x.currentTarget.style.cursor="default";return}x.currentTarget.style.cursor=H<E.width/2?"w-resize":"e-resize"},K={position:"fixed",top:M==null?void 0:M.top,left:M==null?void 0:M.left,width:M==null?void 0:M.width,height:M==null?void 0:M.height,objectFit:n==="cover"?"cover":"contain",opacity:D&&!P?0:1,transition:D&&!P?`opacity ${It}ms ${zt}`:P||S?`top ${It}ms ${zt}, left ${It}ms ${zt}, width ${It}ms ${zt}, height ${It}ms ${zt}`:"none",pointerEvents:L&&A?"auto":"none",zIndex:9998},te=f?{position:"fixed",top:f.top,height:f.height,width:f.width/2,zIndex:9999}:null;return a.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:w,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:A?1:0,transition:`opacity ${It}ms ${zt}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:T,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:A?1:0,transition:`opacity ${It}ms ${zt}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:T,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:A?1:0,transition:`opacity ${It}ms ${zt}`},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]})}),M&&F&&(L?a.jsx("video",{ref:v,src:F.url,controls:g==="open",autoPlay:!0,playsInline:!0,onLoadedMetadata:N,onClick:R,onMouseMove:B,style:K},F.url):a.jsx("img",{ref:v,src:F.url,alt:F.name,onLoad:N,style:K},F.url)),A&&te&&e.length>1&&!L&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...te,left:f.left,cursor:"w-resize"},onClick:x=>{x.stopPropagation(),i()}}),a.jsx("div",{style:{...te,left:f.left+f.width/2,cursor:"e-resize"},onClick:x=>{x.stopPropagation(),c()}})]})]})}function Pd(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Ed({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o,metadata:l,activeEvent:i,layoutId:c}){const{prefix:s}=y.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:T=100,verticalGap:v,entriesCount:f,lightbox:m,imageDisplay:g,lightboxImageDisplay:C,slider:S,sliderTiming:$,direction:b,transition:F,titleMarginTop:L,subtitleMarginTop:N,titleColor:w,subtitleColor:A,lightboxCounterColor:D,titleFontFamily:P,titleFontSettings:M,titleFontSize:R,titleLineHeight:B,titleLetterSpacing:K,titleWordSpacing:te,titleTextAppearance:x,subtitleFontFamily:E,subtitleFontSettings:H,subtitleFontSize:W,subtitleLineHeight:_,subtitleLetterSpacing:z,subtitleWordSpacing:X,subtitleTextAppearance:Z,lightboxCounterFontFamily:k,lightboxCounterFontSettings:J,lightboxCounterFontSize:h,lightboxCounterLineHeight:ne,lightboxCounterLetterSpacing:he,lightboxCounterWordSpacing:ce,lightboxCounterTextAppearance:be,showText:re="always",alignEntries:de="off"}=e,V={fontSettings:{fontFamily:P,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:R??.01,lineHeight:B,letterSpacing:K??0,wordSpacing:te??0,textAppearance:x,color:w},G={...yt(et(V,n))},se={fontSettings:{fontFamily:E,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:W??.01,lineHeight:_,letterSpacing:z??0,wordSpacing:X??0,textAppearance:Z,color:A},Te={...yt(et(se,n))},$e={fontSettings:{fontFamily:k,fontWeight:(J==null?void 0:J.fontWeight)??400,fontStyle:(J==null?void 0:J.fontStyle)??"normal"},fontSize:h??.01,lineHeight:ne,letterSpacing:he??0,wordSpacing:ce??0,textAppearance:be,color:D},_e={...yt(et($e,n)),...qr(h,ne,s,n)},O=jr(R,B,`${s}-item-title`,`${s}-text-tight-leading`),ie=jr(W,_,`${s}-item-subtitle`,`${s}-text-tight-leading`),I=qr(R,B,s,n),j=qr(W,_,s,n),q=jr(h,ne,`${s}-lightbox-counter`,`${s}-text-tight-leading`),Y=y.buildColorVars(s,{titleColor:w,subtitleColor:A,lightboxCounterColor:D},_d,Ad),ke=`${i&&i!=="default"?`${s}-state-${i}`:""}${re==="on hover"&&(!n||r)?` ${s}-show-text-hover`:""}`.trim(),fe=f===0?1/0:f,ve=(t??[]).slice(0,fe),Re=u.entryWidth??.2,oe=(g==null?void 0:g.display)==="cover",xe=(g==null?void 0:g.ratioValue)??"1:1",Me=(g==null?void 0:g.reversed)??!1,[Ie,Ve]=xe.split(":").map(Number),lt=`${Me?Ve:Ie} / ${Me?Ie:Ve}`,xt=y.scalingValue(Re??0,n),Et=!oe&&S!=="off",ct={width:xt,...oe?{aspectRatio:lt,height:"auto",overflow:"hidden"}:{height:"auto"}},_t=`${s}-item-image-wrapper${Et?` ${s}-item-image-wrapper-fit-slider`:""}`.trim(),pe=p==="c",Ne=pe&&de==="on",Be=`calc(${y.scalingValue(Re??0,n)} * (${T} / 100))`,Ge=y.scalingValue(Re*T/100,n),Ct=oe?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Vt,dt]=d.useState("ltr"),[At,En]=d.useState(0),Se=d.useRef(null);d.useEffect(()=>{const Fe=Se.current;if(!Fe)return;const ut=new ResizeObserver(Q=>{En(Math.round(Q[0].contentRect.width))});return ut.observe(Fe),()=>ut.disconnect()},[]);const Qe=(()=>{const Fe={...Y},ut=Se.current?getComputedStyle(Se.current).getPropertyValue("--cntrl-article-width").trim():"";return ut&&(Fe["--cntrl-article-width"]=ut),Fe})(),[qe,De]=d.useState(!1),[ot,Zn]=d.useState([]),[Rr,sn]=d.useState(0),[Fr,Qn]=d.useState(null),Jn=m==="on"&&(!n||r),er=(Fe,ut,Q)=>{if(n&&!r||m==="off")return;const le=Fe.currentTarget.getBoundingClientRect();Qn({top:le.top,left:le.left,width:le.width,height:le.height}),Zn(ut),sn(Q),De(!0)};d.useEffect(()=>{if(!qe||m!=="on"||typeof document>"u")return;const Fe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Fe}},[qe,m]),d.useEffect(()=>{!n||r||(De(!1),Qn(null))},[n,r]);const Wr=d.useMemo(()=>bd(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Wr}}),a.jsx("div",{style:Y,children:a.jsx("div",{ref:Se,className:`${s}-wrapper ${s}-type-${p}${Ne?` ${s}-align-entries`:""} ${ke}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:Ne?0:y.scalingValue(v??0,n),columnGap:y.scalingValue(u.horizontalGap??0,n),width:y.scalingValue(u.wrapperWidth??0,n),...Ne?{[`--${s}-align-entries-row-gap`]:y.scalingValue(v??0,n)}:{}},children:ve.map((Fe,ut)=>{var gt;const Q=so(Fe.title),le=so(Fe.subtitle),ge=(((gt=Fe.link)==null?void 0:gt.length)??0)>0&&m==="off"?Fe.link:void 0,we=Math.floor(ut/u.columnsCount)===Math.ceil(ve.length/u.columnsCount)-1,Ke=pe?a.jsxs("div",{className:`${s}-item-text-block`,children:[Q&&a.jsx("p",{className:O,style:{width:Be,...G,...I},children:Fe.title}),Q&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:y.scalingValue(L??0,n),width:Ge}}),le&&a.jsx("p",{className:ie,style:{width:Be,...Te,...j},children:Fe.subtitle}),le&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:y.scalingValue(N??0,n),width:Ge}})]}):null,Ye=pe?a.jsxs("div",{className:`${s}-item-title-row`,children:[Q&&a.jsx("p",{className:O,style:{width:Be,...G,...I},children:Fe.title}),Q&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:y.scalingValue(L??0,n),width:Ge}})]}):null,Le=pe?a.jsxs("div",{className:`${s}-item-subtitle-row`,children:[le&&a.jsx("p",{className:ie,style:{width:Be,...Te,...j},children:Fe.subtitle}),le&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:y.scalingValue(N??0,n),width:Ge}})]}):null,pt=ge?a.jsxs("a",{href:ge,target:"_blank",className:`${s}-item-text-link`,children:[Ye,Le]}):a.jsxs(a.Fragment,{children:[Ye,Le]}),Xe=wd(Fe.gallery),Ue=Xe.filter(We=>We.lightboxMedia).map(We=>We.lightboxMedia),at=a.jsx("div",{className:_t,style:ct,children:Xe.length===0?null:S==="off"?(()=>{const{displayMedia:We,lightboxMedia:tt}=Xe[0],Mt=tt?Ue.findIndex(Je=>Je.url===tt.url):-1;return a.jsx(lo,{media:We,className:`${s}-item-${Mn(We)?"video":"image"}`.trim(),style:Ct,onMediaClick:Jn&&Mt>=0?Je=>er(Je,Ue,Mt):void 0})})():a.jsxs(a.Fragment,{children:[Et&&a.jsx("div",{className:`${s}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Xe.map(({displayMedia:We})=>Mn(We)?a.jsx("video",{src:We.url,muted:!0,playsInline:!0},`sizer-${We.url}`):a.jsx("img",{src:We.url,alt:""},`sizer-${We.url}`))}),a.jsx(Li,{className:`${s}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:$*1e3,width:"100%",height:"100%",speed:xd,type:F==="fade"?"fade":"loop",rewind:F==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:F==="fade"?"ltr":b!=="random"?b==="horizontal"?"ltr":"ttb":Vt},onMoved:We=>{if(b!=="random"||F==="fade")return;const tt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";dt(tt),setTimeout(()=>{We.refresh()},0)},children:Xe.map(({displayMedia:We,lightboxMedia:tt},Mt)=>{const Je=tt?Ue.findIndex(Dt=>Dt.url===tt.url):-1;return a.jsx(Pi,{children:a.jsx(lo,{media:We,className:`${s}-item-${Mn(We)?"video":"image"}`.trim(),style:Ct,onMediaClick:Jn&&Je>=0?Dt=>er(Dt,Ue,Je):void 0})},Mt)})},`${F}-${Re}-${b}-${$}-${At}-${c}`)]})}),mt=pe?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&Q?"titleMarginTop":void 0,className:o&&Q?`${s}-control`:void 0,style:{height:Q?y.scalingValue(L??0,n):0,width:Ge}}),a.jsx("p",{className:O,style:{width:Be,...G,...I},children:Fe.title}),a.jsx("div",{"data-controls":o&&le?"subtitleMarginTop":void 0,className:o&&le?`${s}-control`:void 0,style:{height:le?y.scalingValue(N??0,n):0,width:Ge}}),a.jsx("p",{className:ie,style:{width:Be,...Te,...j},children:Fe.subtitle})]});return a.jsx("div",{className:`${s}-item`.trim(),children:a.jsx("div",{className:`${o?`${s}-item-inner`:`${s}-item-inner-hidden`}${Ne&&we?` ${s}-item-inner-last-row`:""}`.trim(),style:{width:(T??0)>100?`calc(${y.scalingValue(Re??0,n)} * (${T} / 100))`:y.scalingValue(Re??0,n)},children:Ne?a.jsxs(a.Fragment,{children:[pt,a.jsx("a",{href:ge,target:"_blank",className:`${s}-item-image-link`,children:at})]}):a.jsxs("a",{href:ge,target:"_blank",className:`${s}-item-image-link`,children:[Ke,at,mt]})})},ut)})})}),(!n||r)&&qe&&typeof document<"u"&&m==="on"&&_o.createPortal(a.jsx("div",{style:Qe,"data-selection":"none",children:a.jsx(Ld,{items:ot,index:Rr,imageDisplay:Pd(C),originRect:Fr,reverseClose:S==="off",onClose:()=>De(!1),onPrev:()=>sn(Fe=>(Fe-1+ot.length)%ot.length),onNext:()=>sn(Fe=>(Fe+1)%ot.length),counterClassName:q,counterStyle:_e})}),document.body)]})}const _d={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Ad=["hover","focus","filled","success","error"],Md=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3848
+ `}const St=500,xd=750,Lt="cubic-bezier(0.22, 1, 0.36, 1)",Cd=72;function Sd(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function $d(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function wd(e){const[t]=e.media;return t!=null&&t.url?t:null}function Td(e){return!Array.isArray(e)||e.length===0?[]:Sd(e)?e.flatMap(t=>{const n=$d(t);if(!n)return[];const r=wd(t);return[{displayMedia:n,lightboxMedia:r!=null&&r.url?r:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Mn(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function lo({media:e,className:t,style:n,onMediaClick:r}){return Mn(e)?a.jsx("video",{src:e.url,className:t,style:{...n,cursor:r?"pointer":"default"},muted:!0,loop:!0,autoPlay:!0,playsInline:!0,onClick:r}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:r?"pointer":"default"},onClick:r})}function Ld(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ed({items:e,index:t,imageDisplay:n,originRect:r,reverseClose:o,onClose:l,onPrev:i,onNext:d,counterClassName:s,counterStyle:p}){const u=n==="cover",w=c.useRef(null),C=c.useRef(null),b=c.useRef(null),m=c.useRef(null),h=c.useRef(0),S=c.useRef(!1),[y,$]=c.useState(null),[f,F]=c.useState(r?"opening":"open"),[L,D]=c.useState(!0),[v,E]=c.useState(0),[j,T]=c.useState(!1),[k,R]=c.useState(!1),N=c.useRef(t),q=e[t],ie=q?Mn(q):!1,M=c.useCallback(()=>{const X=C.current,J=b.current;if(!X||!J)return;const ue=X.getBoundingClientRect(),Z=ue.width,re=ue.height,{width:I,height:H}=Ld(J);if(!Z||!re||!I||!H)return;if(n==="cover"){$({width:Z,height:re,left:ue.left,top:ue.top});return}const O=I/H,se=Z/re;if(O>se){const ge=Z/O;$({width:Z,height:ge,left:ue.left,top:ue.top+(re-ge)/2})}else{const ge=re*O;$({width:ge,height:re,left:ue.left+(Z-ge)/2,top:ue.top})}},[n]);c.useEffect(()=>{M();const X=C.current;if(!X)return;const J=new ResizeObserver(()=>M());return J.observe(X),()=>J.disconnect()},[M,t]),c.useEffect(()=>{f==="opening"&&y&&F("open")},[f,y]),c.useEffect(()=>{if(f!=="closing")return;const X=setTimeout(()=>l(),St);return()=>clearTimeout(X)},[f,l]),c.useEffect(()=>{N.current!==t&&(D(!1),E(0),R(!1),T(!1),h.current=0,S.current=!1,m.current=null),N.current=t},[t]),c.useEffect(()=>{const X=w.current;if(!X||f!=="open")return;const J=re=>{if(re.touches.length!==1)return;const I=re.touches[0];if(ie&&b.current){const H=b.current.getBoundingClientRect(),O=I.clientY-H.top,se=Math.min(52,H.height*.2);if(O>H.height-se)return}m.current={x:I.clientX,y:I.clientY},S.current=!1},ue=re=>{if(!m.current||re.touches.length!==1)return;const I=re.touches[0],H=I.clientX-m.current.x,O=I.clientY-m.current.y;O<=0||Math.abs(O)<=Math.abs(H)||(S.current=!0,T(!0),h.current=O,E(O),re.preventDefault())},Z=()=>{if(!m.current)return;const re=h.current,I=S.current;if(I&&re>Cd){const H=window.innerHeight;h.current=H,R(!0),E(H),F("closing")}else I&&(h.current=0,E(0));if(I){const H=O=>{O.stopPropagation(),O.preventDefault(),X.removeEventListener("click",H,!0)};X.addEventListener("click",H,!0)}m.current=null,S.current=!1,T(!1)};return X.addEventListener("touchstart",J,{passive:!0}),X.addEventListener("touchmove",ue,{passive:!1}),X.addEventListener("touchend",Z),X.addEventListener("touchcancel",Z),()=>{X.removeEventListener("touchstart",J),X.removeEventListener("touchmove",ue),X.removeEventListener("touchend",Z),X.removeEventListener("touchcancel",Z)}},[f,ie]),c.useEffect(()=>{const X=b.current;X instanceof HTMLVideoElement&&f!=="open"&&X.pause()},[t,f,ie]),c.useEffect(()=>{const X=J=>{J.key==="Escape"&&(J.preventDefault(),J.stopPropagation(),f!=="closing"&&F("closing"))};return window.addEventListener("keydown",X,!0),()=>window.removeEventListener("keydown",X,!0)},[f]);const W=()=>{f!=="closing"&&F("closing")},z=f==="open",V=f==="closing",P=V&&o&&!!r&&!k,G=v>0?Math.max(0,1-v/500):1,ee=v>0?Math.max(.35,1-v/500):1,Y=f==="opening"?r??y:P?r:y,A=X=>{if(X.stopPropagation(),e.length<=1)return;const J=X.currentTarget.getBoundingClientRect(),ue=X.clientX-J.left,Z=X.clientY-J.top,re=Math.min(52,J.height*.2);if(!(Z>J.height-re)){if(ue<J.width/2){i();return}d()}},ae=X=>{if(e.length<=1)return;const J=X.currentTarget.getBoundingClientRect(),ue=X.clientX-J.left,Z=X.clientY-J.top,re=Math.min(52,J.height*.2);if(Z>J.height-re){X.currentTarget.style.cursor="default";return}X.currentTarget.style.cursor=ue<J.width/2?"w-resize":"e-resize"},g={position:"fixed",top:Y==null?void 0:Y.top,left:Y==null?void 0:Y.left,width:Y==null?void 0:Y.width,height:Y==null?void 0:Y.height,objectFit:n==="cover"?"cover":"contain",transform:v>0?`translateY(${v}px)`:void 0,opacity:v>0?ee:V&&!P?0:1,transition:j?"none":k?`transform ${St}ms ${Lt}, opacity ${St}ms ${Lt}`:V&&!P?`opacity ${St}ms ${Lt}`:P||L?`top ${St}ms ${Lt}, left ${St}ms ${Lt}, width ${St}ms ${Lt}, height ${St}ms ${Lt}`:"none",pointerEvents:ie&&z?"auto":"none",zIndex:9998},ne=y?{position:"fixed",top:y.top,height:y.height,width:y.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:w,style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997,touchAction:f==="open"?"none":void 0},onClick:W,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:z?G:0,transition:j?"none":`opacity ${St}ms ${Lt}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:C,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:z?1:0,transition:`opacity ${St}ms ${Lt}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:C,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:z?1:0,transition:`opacity ${St}ms ${Lt}`},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]})}),Y&&q&&(ie?a.jsx("video",{ref:b,src:q.url,controls:f==="open",playsInline:!0,onLoadedMetadata:M,onClick:A,onMouseMove:ae,style:g},q.url):a.jsx("img",{ref:b,src:q.url,alt:q.name,onLoad:M,style:g},q.url)),z&&ne&&e.length>1&&!ie&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...ne,left:y.left,cursor:"w-resize"},onClick:X=>{X.stopPropagation(),i()}}),a.jsx("div",{style:{...ne,left:y.left+y.width/2,cursor:"e-resize"},onClick:X=>{X.stopPropagation(),d()}})]})]})}function Pd(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function _d({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o,metadata:l,activeEvent:i,layoutId:d}){const{prefix:s}=x.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:w=100,verticalGap:C,entriesCount:b,lightbox:m,imageDisplay:h,lightboxImageDisplay:S,slider:y,sliderTiming:$,direction:f,transition:F,titleMarginTop:L,subtitleMarginTop:D,titleColor:v,subtitleColor:E,lightboxCounterColor:j,titleFontFamily:T,titleFontSettings:k,titleFontSize:R,titleLineHeight:N,titleLetterSpacing:q,titleWordSpacing:ie,titleTextAppearance:M,subtitleFontFamily:W,subtitleFontSettings:z,subtitleFontSize:V,subtitleLineHeight:P,subtitleLetterSpacing:G,subtitleWordSpacing:ee,subtitleTextAppearance:Y,lightboxCounterFontFamily:A,lightboxCounterFontSettings:ae,lightboxCounterFontSize:g,lightboxCounterLineHeight:ne,lightboxCounterLetterSpacing:X,lightboxCounterWordSpacing:J,lightboxCounterTextAppearance:ue,showText:Z="always",alignEntries:re="off"}=e,I={fontSettings:{fontFamily:T,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:R??.01,lineHeight:N,letterSpacing:q??0,wordSpacing:ie??0,textAppearance:M,color:v},O={...yt(et(I,n))},se={fontSettings:{fontFamily:W,fontWeight:(z==null?void 0:z.fontWeight)??400,fontStyle:(z==null?void 0:z.fontStyle)??"normal"},fontSize:V??.01,lineHeight:P,letterSpacing:G??0,wordSpacing:ee??0,textAppearance:Y,color:E},Te={...yt(et(se,n))},Se={fontSettings:{fontFamily:A,fontWeight:(ae==null?void 0:ae.fontWeight)??400,fontStyle:(ae==null?void 0:ae.fontStyle)??"normal"},fontSize:g??.01,lineHeight:ne,letterSpacing:X??0,wordSpacing:J??0,textAppearance:ue,color:j},_e={...yt(et(Se,n)),...qr(g,ne,s,n)},B=jr(R,N,`${s}-item-title`,`${s}-text-tight-leading`),le=jr(V,P,`${s}-item-subtitle`,`${s}-text-tight-leading`),_=qr(R,N,s,n),K=qr(V,P,s,n),U=jr(g,ne,`${s}-lightbox-counter`,`${s}-text-tight-leading`),Q=x.buildColorVars(s,{titleColor:v,subtitleColor:E,lightboxCounterColor:j},Ad,Md),Re=`${i&&i!=="default"?`${s}-state-${i}`:""}${Z==="on hover"&&(!n||r)?` ${s}-show-text-hover`:""}`.trim(),ve=b===0?1/0:b,be=(t??[]).slice(0,ve),ke=u.entryWidth??.2,ce=(h==null?void 0:h.display)==="cover",xe=(h==null?void 0:h.ratioValue)??"1:1",Me=(h==null?void 0:h.reversed)??!1,[Ie,Ve]=xe.split(":").map(Number),lt=`${Me?Ve:Ie} / ${Me?Ie:Ve}`,xt=x.scalingValue(ke??0,n),At=!ce&&y!=="off",ct={width:xt,...ce?{aspectRatio:lt,height:"auto",overflow:"hidden"}:{height:"auto"}},Mt=`${s}-item-image-wrapper${At?` ${s}-item-image-wrapper-fit-slider`:""}`.trim(),he=p==="c",Ne=he&&re==="on",Oe=`calc(${x.scalingValue(ke??0,n)} * (${w} / 100))`,Ue=x.scalingValue(ke*w/100,n),Ct=ce?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Dt,dt]=c.useState("ltr"),[It,Pn]=c.useState(0),$e=c.useRef(null);c.useEffect(()=>{const Fe=$e.current;if(!Fe)return;const ut=new ResizeObserver(te=>{Pn(Math.round(te[0].contentRect.width))});return ut.observe(Fe),()=>ut.disconnect()},[]);const Qe=(()=>{const Fe={...Q},ut=$e.current?getComputedStyle($e.current).getPropertyValue("--cntrl-article-width").trim():"";return ut&&(Fe["--cntrl-article-width"]=ut),Fe})(),[qe,De]=c.useState(!1),[ot,Zn]=c.useState([]),[kr,sn]=c.useState(0),[Fr,Qn]=c.useState(null),Jn=m==="on"&&(!n||r),er=(Fe,ut,te)=>{if(n&&!r||m==="off")return;const pe=Fe.currentTarget.getBoundingClientRect();Qn({top:pe.top,left:pe.left,width:pe.width,height:pe.height}),Zn(ut),sn(te),De(!0)};c.useEffect(()=>{if(!qe||m!=="on"||typeof document>"u")return;const Fe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Fe}},[qe,m]),c.useEffect(()=>{!n||r||(De(!1),Qn(null))},[n,r]);const Wr=c.useMemo(()=>bd(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Wr}}),a.jsx("div",{style:Q,children:a.jsx("div",{ref:$e,className:`${s}-wrapper ${s}-type-${p}${Ne?` ${s}-align-entries`:""} ${Re}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:Ne?0:x.scalingValue(C??0,n),columnGap:x.scalingValue(u.horizontalGap??0,n),width:x.scalingValue(u.wrapperWidth??0,n),...Ne?{[`--${s}-align-entries-row-gap`]:x.scalingValue(C??0,n)}:{}},children:be.map((Fe,ut)=>{var gt;const te=so(Fe.title),pe=so(Fe.subtitle),ye=(((gt=Fe.link)==null?void 0:gt.length)??0)>0&&m==="off"?Fe.link:void 0,we=Math.floor(ut/u.columnsCount)===Math.ceil(be.length/u.columnsCount)-1,Ke=he?a.jsxs("div",{className:`${s}-item-text-block`,children:[te&&a.jsx("p",{className:B,style:{width:Oe,...O,..._},children:Fe.title}),te&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:x.scalingValue(L??0,n),width:Ue}}),pe&&a.jsx("p",{className:le,style:{width:Oe,...Te,...K},children:Fe.subtitle}),pe&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:x.scalingValue(D??0,n),width:Ue}})]}):null,Ye=he?a.jsxs("div",{className:`${s}-item-title-row`,children:[te&&a.jsx("p",{className:B,style:{width:Oe,...O,..._},children:Fe.title}),te&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:x.scalingValue(L??0,n),width:Ue}})]}):null,Le=he?a.jsxs("div",{className:`${s}-item-subtitle-row`,children:[pe&&a.jsx("p",{className:le,style:{width:Oe,...Te,...K},children:Fe.subtitle}),pe&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:x.scalingValue(D??0,n),width:Ue}})]}):null,pt=ye?a.jsxs("a",{href:ye,target:"_blank",className:`${s}-item-text-link`,children:[Ye,Le]}):a.jsxs(a.Fragment,{children:[Ye,Le]}),Xe=Td(Fe.gallery),Ge=Xe.filter(We=>We.lightboxMedia).map(We=>We.lightboxMedia),at=a.jsx("div",{className:Mt,style:ct,children:Xe.length===0?null:y==="off"?(()=>{const{displayMedia:We,lightboxMedia:tt}=Xe[0],Rt=tt?Ge.findIndex(Je=>Je.url===tt.url):-1;return a.jsx(lo,{media:We,className:`${s}-item-${Mn(We)?"video":"image"}`.trim(),style:Ct,onMediaClick:Jn&&Rt>=0?Je=>er(Je,Ge,Rt):void 0})})():a.jsxs(a.Fragment,{children:[At&&a.jsx("div",{className:`${s}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Xe.map(({displayMedia:We})=>Mn(We)?a.jsx("video",{src:We.url,muted:!0,playsInline:!0},`sizer-${We.url}`):a.jsx("img",{src:We.url,alt:""},`sizer-${We.url}`))}),a.jsx(Li,{className:`${s}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:$*1e3,width:"100%",height:"100%",speed:xd,type:F==="fade"?"fade":"loop",rewind:F==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:F==="fade"?"ltr":f!=="random"?f==="horizontal"?"ltr":"ttb":Dt},onMoved:We=>{if(f!=="random"||F==="fade")return;const tt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";dt(tt),setTimeout(()=>{We.refresh()},0)},children:Xe.map(({displayMedia:We,lightboxMedia:tt},Rt)=>{const Je=tt?Ge.findIndex(zt=>zt.url===tt.url):-1;return a.jsx(Ei,{children:a.jsx(lo,{media:We,className:`${s}-item-${Mn(We)?"video":"image"}`.trim(),style:Ct,onMediaClick:Jn&&Je>=0?zt=>er(zt,Ge,Je):void 0})},Rt)})},`${F}-${ke}-${f}-${$}-${It}-${d}`)]})}),mt=he?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&te?"titleMarginTop":void 0,className:o&&te?`${s}-control`:void 0,style:{height:te?x.scalingValue(L??0,n):0,width:Ue}}),a.jsx("p",{className:B,style:{width:Oe,...O,..._},children:Fe.title}),a.jsx("div",{"data-controls":o&&pe?"subtitleMarginTop":void 0,className:o&&pe?`${s}-control`:void 0,style:{height:pe?x.scalingValue(D??0,n):0,width:Ue}}),a.jsx("p",{className:le,style:{width:Oe,...Te,...K},children:Fe.subtitle})]});return a.jsx("div",{className:`${s}-item`.trim(),children:a.jsx("div",{className:`${o?`${s}-item-inner`:`${s}-item-inner-hidden`}${Ne&&we?` ${s}-item-inner-last-row`:""}`.trim(),style:{width:(w??0)>100?`calc(${x.scalingValue(ke??0,n)} * (${w} / 100))`:x.scalingValue(ke??0,n)},children:Ne?a.jsxs(a.Fragment,{children:[pt,a.jsx("a",{href:ye,target:"_blank",className:`${s}-item-image-link`,children:at})]}):a.jsxs("a",{href:ye,target:"_blank",className:`${s}-item-image-link`,children:[Ke,at,mt]})})},ut)})})}),(!n||r)&&qe&&typeof document<"u"&&m==="on"&&_o.createPortal(a.jsx("div",{style:Qe,"data-selection":"none",children:a.jsx(Ed,{items:ot,index:kr,imageDisplay:Pd(S),originRect:Fr,reverseClose:y==="off",onClose:()=>De(!1),onPrev:()=>sn(Fe=>(Fe-1+ot.length)%ot.length),onNext:()=>sn(Fe=>(Fe+1)%ot.length),counterClassName:U,counterStyle:_e})}),document.body)]})}const Ad={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Md=["hover","focus","filled","success","error"],Id=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3849
3849
  import '@splidejs/react-splide/css/core';
3850
3850
  import { CommonComponentProps } from '../props';
3851
3851
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
@@ -4128,6 +4128,7 @@ type LightboxProps = {
4128
4128
  const LIGHTBOX_ANIM_MS = 500;
4129
4129
  const SLIDER_TRANSITION_MS = 750;
4130
4130
  const LIGHTBOX_EASING = 'cubic-bezier(0.22, 1, 0.36, 1)';
4131
+ const SWIPE_CLOSE_THRESHOLD = 72;
4131
4132
 
4132
4133
  type GridMedia = {
4133
4134
  url: string;
@@ -4245,11 +4246,18 @@ function getLightboxMediaDimensions(media: HTMLImageElement | HTMLVideoElement)
4245
4246
 
4246
4247
  function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClose, onPrev, onNext, counterClassName, counterStyle }: LightboxProps) {
4247
4248
  const isCover = imageDisplay === 'cover';
4249
+ const containerRef = useRef<HTMLDivElement>(null);
4248
4250
  const ghostRef = useRef<HTMLDivElement>(null);
4249
4251
  const mediaRef = useRef<HTMLImageElement | HTMLVideoElement>(null);
4252
+ const touchStartRef = useRef<{ x: number; y: number } | null>(null);
4253
+ const swipeOffsetRef = useRef(0);
4254
+ const isSwipingRef = useRef(false);
4250
4255
  const [finalRect, setFinalRect] = useState<AnimRect | null>(null);
4251
4256
  const [phase, setPhase] = useState<'opening' | 'open' | 'closing'>(originRect ? 'opening' : 'open');
4252
4257
  const [transitionsEnabled, setTransitionsEnabled] = useState(true);
4258
+ const [swipeOffset, setSwipeOffset] = useState(0);
4259
+ const [isSwiping, setIsSwiping] = useState(false);
4260
+ const [swipeDismiss, setSwipeDismiss] = useState(false);
4253
4261
  const prevIndexRef = useRef(index);
4254
4262
  const currentItem = items[index];
4255
4263
  const isCurrentVideo = currentItem ? isVideoMedia(currentItem) : false;
@@ -4300,18 +4308,101 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
4300
4308
  useEffect(() => {
4301
4309
  if (prevIndexRef.current !== index) {
4302
4310
  setTransitionsEnabled(false);
4311
+ setSwipeOffset(0);
4312
+ setSwipeDismiss(false);
4313
+ setIsSwiping(false);
4314
+ swipeOffsetRef.current = 0;
4315
+ isSwipingRef.current = false;
4316
+ touchStartRef.current = null;
4303
4317
  }
4304
4318
  prevIndexRef.current = index;
4305
4319
  }, [index]);
4306
4320
 
4321
+ useEffect(() => {
4322
+ const container = containerRef.current;
4323
+ if (!container || phase !== 'open') return;
4324
+
4325
+ const handleTouchStart = (e: TouchEvent) => {
4326
+ if (e.touches.length !== 1) return;
4327
+ const touch = e.touches[0];
4328
+
4329
+ if (isCurrentVideo && mediaRef.current) {
4330
+ const rect = mediaRef.current.getBoundingClientRect();
4331
+ const y = touch.clientY - rect.top;
4332
+ const controlsZoneHeight = Math.min(52, rect.height * 0.2);
4333
+ if (y > rect.height - controlsZoneHeight) return;
4334
+ }
4335
+
4336
+ touchStartRef.current = { x: touch.clientX, y: touch.clientY };
4337
+ isSwipingRef.current = false;
4338
+ };
4339
+
4340
+ const handleTouchMove = (e: TouchEvent) => {
4341
+ if (!touchStartRef.current || e.touches.length !== 1) return;
4342
+ const touch = e.touches[0];
4343
+ const deltaX = touch.clientX - touchStartRef.current.x;
4344
+ const deltaY = touch.clientY - touchStartRef.current.y;
4345
+
4346
+ if (deltaY <= 0) return;
4347
+ if (Math.abs(deltaY) <= Math.abs(deltaX)) return;
4348
+
4349
+ isSwipingRef.current = true;
4350
+ setIsSwiping(true);
4351
+ swipeOffsetRef.current = deltaY;
4352
+ setSwipeOffset(deltaY);
4353
+ e.preventDefault();
4354
+ };
4355
+
4356
+ const handleTouchEnd = () => {
4357
+ if (!touchStartRef.current) return;
4358
+
4359
+ const offset = swipeOffsetRef.current;
4360
+ const wasSwiping = isSwipingRef.current;
4361
+
4362
+ if (wasSwiping && offset > SWIPE_CLOSE_THRESHOLD) {
4363
+ const dismissOffset = window.innerHeight;
4364
+ swipeOffsetRef.current = dismissOffset;
4365
+ setSwipeDismiss(true);
4366
+ setSwipeOffset(dismissOffset);
4367
+ setPhase('closing');
4368
+ } else if (wasSwiping) {
4369
+ swipeOffsetRef.current = 0;
4370
+ setSwipeOffset(0);
4371
+ }
4372
+
4373
+ if (wasSwiping) {
4374
+ const blockClick = (clickEvent: Event) => {
4375
+ clickEvent.stopPropagation();
4376
+ clickEvent.preventDefault();
4377
+ container.removeEventListener('click', blockClick, true);
4378
+ };
4379
+ container.addEventListener('click', blockClick, true);
4380
+ }
4381
+
4382
+ touchStartRef.current = null;
4383
+ isSwipingRef.current = false;
4384
+ setIsSwiping(false);
4385
+ };
4386
+
4387
+ container.addEventListener('touchstart', handleTouchStart, { passive: true });
4388
+ container.addEventListener('touchmove', handleTouchMove, { passive: false });
4389
+ container.addEventListener('touchend', handleTouchEnd);
4390
+ container.addEventListener('touchcancel', handleTouchEnd);
4391
+
4392
+ return () => {
4393
+ container.removeEventListener('touchstart', handleTouchStart);
4394
+ container.removeEventListener('touchmove', handleTouchMove);
4395
+ container.removeEventListener('touchend', handleTouchEnd);
4396
+ container.removeEventListener('touchcancel', handleTouchEnd);
4397
+ };
4398
+ }, [phase, isCurrentVideo]);
4399
+
4307
4400
  useEffect(() => {
4308
4401
  const media = mediaRef.current;
4309
4402
  if (!(media instanceof HTMLVideoElement)) return;
4310
4403
  if (phase !== 'open') {
4311
4404
  media.pause();
4312
- return;
4313
4405
  }
4314
- void media.play().catch(() => undefined);
4315
4406
  }, [index, phase, isCurrentVideo]);
4316
4407
 
4317
4408
  useEffect(() => {
@@ -4333,7 +4424,9 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
4333
4424
 
4334
4425
  const isOpen = phase === 'open';
4335
4426
  const isClosing = phase === 'closing';
4336
- const reverseAnimateClose = isClosing && reverseClose && !!originRect;
4427
+ const reverseAnimateClose = isClosing && reverseClose && !!originRect && !swipeDismiss;
4428
+ const swipeBackdropOpacity = swipeOffset > 0 ? Math.max(0, 1 - swipeOffset / 500) : 1;
4429
+ const swipeMediaOpacity = swipeOffset > 0 ? Math.max(0.35, 1 - swipeOffset / 500) : 1;
4337
4430
  const animatedRect = phase === 'opening'
4338
4431
  ? (originRect ?? finalRect)
4339
4432
  : reverseAnimateClose
@@ -4384,12 +4477,21 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
4384
4477
  width: animatedRect?.width,
4385
4478
  height: animatedRect?.height,
4386
4479
  objectFit: imageDisplay === 'cover' ? 'cover' : 'contain',
4387
- opacity: isClosing && !reverseAnimateClose ? 0 : 1,
4388
- transition: isClosing && !reverseAnimateClose
4389
- ? \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
4390
- : (reverseAnimateClose || transitionsEnabled)
4391
- ? \`top \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, left \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, width \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, height \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
4392
- : 'none',
4480
+ transform: swipeOffset > 0 ? \`translateY(\${swipeOffset}px)\` : undefined,
4481
+ opacity: swipeOffset > 0
4482
+ ? swipeMediaOpacity
4483
+ : isClosing && !reverseAnimateClose
4484
+ ? 0
4485
+ : 1,
4486
+ transition: isSwiping
4487
+ ? 'none'
4488
+ : swipeDismiss
4489
+ ? \`transform \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
4490
+ : isClosing && !reverseAnimateClose
4491
+ ? \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
4492
+ : (reverseAnimateClose || transitionsEnabled)
4493
+ ? \`top \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, left \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, width \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, height \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
4494
+ : 'none',
4393
4495
  pointerEvents: isCurrentVideo && isOpen ? 'auto' : 'none',
4394
4496
  zIndex: 9998,
4395
4497
  };
@@ -4404,6 +4506,7 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
4404
4506
 
4405
4507
  return (
4406
4508
  <div
4509
+ ref={containerRef}
4407
4510
  style={{
4408
4511
  position: 'fixed',
4409
4512
  top: 0,
@@ -4411,6 +4514,7 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
4411
4514
  width: '100vw',
4412
4515
  height: '100vh',
4413
4516
  zIndex: 9997,
4517
+ touchAction: phase === 'open' ? 'none' : undefined,
4414
4518
  }}
4415
4519
  onClick={handleClose}
4416
4520
  >
@@ -4419,8 +4523,8 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
4419
4523
  position: 'absolute',
4420
4524
  inset: 0,
4421
4525
  background: 'rgba(28,31,34,0.9)',
4422
- opacity: isOpen ? 1 : 0,
4423
- transition: \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`,
4526
+ opacity: isOpen ? swipeBackdropOpacity : 0,
4527
+ transition: isSwiping ? 'none' : \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`,
4424
4528
  pointerEvents: 'none',
4425
4529
  }}
4426
4530
  />
@@ -4503,7 +4607,6 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
4503
4607
  ref={mediaRef as React.RefObject<HTMLVideoElement>}
4504
4608
  src={currentItem.url}
4505
4609
  controls={phase === 'open'}
4506
- autoPlay
4507
4610
  playsInline
4508
4611
  onLoadedMetadata={computeFinalRect}
4509
4612
  onClick={handleVideoClick}
@@ -5159,7 +5262,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
5159
5262
  };
5160
5263
 
5161
5264
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
5162
- `,Kr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Id=["titleColor","subtitleColor","lightboxCounterColor"],kd={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Kr.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:{...Kr.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:{...Kr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"a",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignEntries.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.alignEntries.display.visible",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap","showText"]},{type:"row",title:"",items:["alignEntries"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...Id],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Rd={element:Ed,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},schema:kd,sourceCode:Md},co=12;function Fd(e,t="50%"){const n={position:"absolute",width:co,height:co,pointerEvents:"auto"};return e==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:e==="center-x"?{...n,left:"50%",top:t,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function Ze({className:e,areaStyle:t,hitPlacement:n,centerXHitTop:r,...o}){return a.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...o,children:a.jsx("div",{style:Fd(n,r)})})}function Wd(e){if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function Hd({media:e,className:t,style:n}){const r=d.useRef(null);return d.useEffect(()=>{if(!e.isVideo)return;const o=r.current;if(!o)return;const l=o.play();l&&l.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:r,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function pr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Nd(e){return String(e??"").trim().length>0}function uo(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),o=e.clientY-r.top>r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function po(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),o=e.clientY<r.top+r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function mo(e,t,n,r,o,l,i){const c=y.scalingValue(l,i),s=y.scalingValue(0,i),p=e===0,u=e===t-1&&!o;return{borderTopWidth:p&&n?c:s,borderBottomWidth:!u||r?c:s}}function Bd(e,t,n){const r=y.scalingValue(t,n),o=y.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?r:o}}const go=10;function Od(e){return`
5265
+ `,Kr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Rd=["titleColor","subtitleColor","lightboxCounterColor"],kd={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Kr.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:{...Kr.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:{...Kr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"a",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignEntries.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.alignEntries.display.visible",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap","showText"]},{type:"row",title:"",items:["alignEntries"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...Rd],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Fd={element:_d,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},schema:kd,sourceCode:Id},co=12;function Wd(e,t="50%"){const n={position:"absolute",width:co,height:co,pointerEvents:"auto"};return e==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:e==="center-x"?{...n,left:"50%",top:t,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function Ze({className:e,areaStyle:t,hitPlacement:n,centerXHitTop:r,...o}){return a.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...o,children:a.jsx("div",{style:Wd(n,r)})})}function Hd(e){if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function Nd({media:e,className:t,style:n}){const r=c.useRef(null);return c.useEffect(()=>{if(!e.isVideo)return;const o=r.current;if(!o)return;const l=o.play();l&&l.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:r,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function pr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Od(e){return String(e??"").trim().length>0}function uo(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),o=e.clientY-r.top>r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function po(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),o=e.clientY<r.top+r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function mo(e,t,n,r,o,l,i){const d=x.scalingValue(l,i),s=x.scalingValue(0,i),p=e===0,u=e===t-1&&!o;return{borderTopWidth:p&&n?d:s,borderBottomWidth:!u||r?d:s}}function Bd(e,t,n){const r=x.scalingValue(t,n),o=x.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?r:o}}const go=10;function Vd(e){return`
5163
5266
  .${e}-wrapper {
5164
5267
  display: grid;
5165
5268
  align-items: start;
@@ -5590,7 +5693,7 @@ a.${e}-list-item {
5590
5693
  overflow-wrap: anywhere;
5591
5694
  word-break: break-word;
5592
5695
  }
5593
- `}const Yt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ei=["AColumn","BColumn","CColumn","DColumn","EColumn"],Nt="cutLabel",_i=[...Ei,Nt],kr=["A","B","C","D","E"];function ma(e){return`${e}ColumnVerticalAlign`}const oi=["Top","Center","Bottom"];function Ai(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const r=t.slice(-1).toUpperCase();return kr.includes(r)?`Baseline ${r}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Vd(e){const t=Ai(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Dd(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return kr.includes(n)?n:null}function ga(e,t,n){const r=Dd(e);return r?r===t?!1:Vd(n[ma(r)]):!0}function On(e){const t=Ai(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return kr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function zd(e,t,n){if(ha(e,t,n))return On(e);const r=On(e);return r.kind==="baseline"?{kind:"top"}:r}function jd(e){const t=On(e);return t.kind==="baseline"?{kind:"top"}:t}function ha(e,t,n){return ga(e,n,t)?On(e).kind==="baseline":!1}function qd(e){const t={};let n=!1;for(const r of kr){const o=ma(r),l=e[o];if(e.type==="b"){const i=String(l??"Top").trim();i!=="Top"&&i!=="Center"&&i!=="Bottom"&&(t[o]="Top",n=!0);continue}ga(l,r,e)||(t[o]="Top",n=!0)}return n?t:null}function Kd(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Ud(e){const t=On(e).kind;return t==="baseline"?"center":t}function Gd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function ho(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Yd(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),l=o-r;return n.remove(),l}function Ur(e,t,n,r){const o=e.titleEl;if(!o)return 0;const l=o.closest(`.${n}`);if(!l)return 0;const i=Yd(o,r);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+i;const c=l.getBoundingClientRect(),s=o.getBoundingClientRect().height;let p=0;return e.kind==="center"?p=(c.height-s)/2:e.kind==="bottom"&&(p=c.height-s),c.top-t+p+i}function Xd(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(o=>{const l=o.querySelector(`.${n}`);l&&(l.style.minHeight=`${r}px`,l.style.height=`${r}px`)}),r)}function Zd(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Qd={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Ae(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Jd={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function eu(e){return[Ae(e,"textFontFamily"),Ae(e,"textFontSettings"),{type:"row",items:[Ae(e,"textFontSize"),Ae(e,"textLineHeight"),Ae(e,"textLetterSpacing"),Ae(e,"textWordSpacing")]},Ae(e,"textTextAlign"),Ae(e,"textTextAppearance"),`${e}VerticalAlign`]}function tu(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(_i.map(e=>[Jd[e],eu(e)]))}}function xr(e,t){const n=r=>{const o=Ae(t,r);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===Nt?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function fo(e,t){var r,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return yt(et(n,t))}function yo(e,t,n,r){const o=xr(e,t),l=o.textFontSize??.01,i=o.textLineHeight;return i!==void 0&&i<l?`${n} ${r}`:n}function vo(e,t,n,r){const o=xr(e,t),l=o.textFontSize??.01,i=o.textLineHeight;return i===void 0||i>=l?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((l-i)/2,r)}}const vt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Cn=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],$n=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Sn=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],nu={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},ru=["hover","focus","filled","success","error"],bo=.004,mn=.004,Gr=mn,Mi=50,Vn=1440,Dn=Mi/Vn;function fa(e){const t=typeof e=="number"&&e>0?e:Vn;return Mi/t}function iu(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const o=parseFloat(r);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return Vn}const ya={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function In(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function ou(e,t=1){const n=t/e;return Object.fromEntries(vt.map(r=>[r,n]))}function au(){return Object.fromEntries([...Cn.map(e=>[e,0]),...$n.map(e=>[e,0])])}function su(){return Object.fromEntries(Sn.map(e=>[e,0]))}function ar(e){return Object.fromEntries(vt.map(t=>[t,typeof e[t]=="number"?e[t]:ya[t]]))}function va(e,t,n){const r=e-Dn,o=t+n;if(o<=0||o<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const l=r/o;return{paddingLeft:t*l,paddingRight:n*l}}function mr(e,t,n){const r=Ii(e,t,n);if(e<=0)return[];const o=r.slice(0,e-1).reduce((l,i)=>l+i,0);return[...r.slice(0,e-1),Math.max(0,t-o)]}function lu(e,t,n){const r={};for(let o=0;o<e;o+=1){const l=Cn[o],i=$n[o],c=typeof n[l]=="number"?n[l]:0,s=typeof n[i]=="number"?n[i]:0,p=va(t[o]??0,c,s);p.paddingLeft!==c&&(r[l]=p.paddingLeft),p.paddingRight!==s&&(r[i]=p.paddingRight)}return r}function Ii(e,t,n){if(e<=0)return[];const r=vt.slice(0,e).map(p=>n[p]);if(e===1)return r;const o=r.slice(0,e-1),i=o.reduce((p,u)=>p+u,0)+Dn;if(t>=i)return r;const c=[...o];let s=i-t;for(let p=c.length-1;p>=0&&s>0;p-=1){const u=c[p]-Dn;if(u<=0)continue;const T=Math.min(s,u);c[p]-=T,s-=T}return[...c,r[e-1]]}function cu(e,t,n){if(e<=1)return{};const r=Ii(e,t,n),o={};for(let l=0;l<e-1;l+=1){const i=vt[l];r[l]!==n[i]&&(o[i]=r[l])}return o}function xo(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Yt]}function du(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function uu(e,t,n,r){const o=Math.min(r,e.length,vt.length),l={};for(let i=0;i<o;i+=1){const c=e[i],s=t.indexOf(c);if(s===-1)continue;const p=vt[s],u=Cn[s],T=$n[s],v=Sn[s],f=vt[i],m=Cn[i],g=$n[i],C=Sn[i],S=n[p],$=n[u],b=n[T],F=n[v];typeof S=="number"&&(l[f]=S),typeof $=="number"&&(l[m]=$),typeof b=="number"&&(l[g]=b),typeof F=="number"&&(l[C]=F)}return l}function ba(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const r of n)if(e[r]!==t[r])return!0;return!1}function pu(e,t){const n=e.columns,r=t.columns;if(typeof n!="number"||n===r)return e;const o=In(e),l=e.type==="b"||e.type===void 0&&t.type==="b",i={...e,...ou(n,o),...au()};if(l)for(const c of Sn)typeof t[c]=="number"&&(i[c]=t[c]);else Object.assign(i,su());return ba(e,i)?i:e}function mu(e,t,n){const r=qd(e);r&&(e={...e,...r});const o=fa(n==null?void 0:n.designWidth),l=e.columns,i=t.columns,c=In(e),s=In(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof l=="number"?l:typeof i=="number"?i:Yt.length,T=b=>{if(p)return b;const F=ar({...t,...b}),L=In(b),N=mr(u,L,F),w=lu(u,N,{...t,...b});return Object.keys(w).length===0?b:{...b,...w}};if(typeof l=="number"&&l!==i)return e;const v=xo(e),f=xo(t);if(!du(v,f))return T({...e,...uu(v,f,t,u)});if(c<s&&typeof u=="number"&&!p){const b=ar({...t,...e});return T({...e,...cu(u,c,b)})}if(p){const b=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,F=Math.max(0,(c-o)/2);return b>F?{...e,textPaddingLR:F}:e}const m=ar({...t,...e}),g=mr(u,s,ar(t)),S=mr(u,c,m).some((b,F)=>b<(g[F]??b)),$=vt.some(b=>{const F=e[b],L=t[b];return typeof F=="number"&&typeof L=="number"&&F!==L});return S||$?T(e):e}function gu(e,t,n,r){const o=t.slice(0,e).reduce((i,c)=>i+c,0),l=n.slice(e+1,t.length-1).reduce((i,c)=>i+c,0);return Math.max(Dn,r-o-l-Dn)}function hu(e,t){return Math.random()*(t-e)+e}function fu(e){return Object.fromEntries(vt.map(t=>[t,typeof e[t]=="number"?e[t]:ya[t]]))}function Yr(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function yu(e,t,n,r,o,l){return e.slice(0,t).map((i,c)=>{const s=Cn[c],p=$n[c],u=Sn[c];return{key:i,textPrefix:Qd[i],widthKey:vt[c],width:n[vt[c]],paddingLeftKey:s,paddingRightKey:p,paddingBottomKey:u,paddingLeft:r[s],paddingRight:o[p],paddingBottom:l[u]}})}function vu({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o,activeEvent:l,layoutId:i,onUpdateSettings:c}){const{prefix:s}=y.useScopedStyles(),p=!!o,{columns:u,type:T,wrapperWidth:v,entriesCount:f,cellMinHeight:m,dividerWidth:g,showVisibility:C,cut:S,showCut:$,cutCellMinHeight:b,cutLabel:F,imageSize:L,imageOnHover:N,entryHoverEffect:w,entryHoverShowOption:A,rowPaddingTop:D,rowPaddingBottom:P,rowPaddingTopB:M,columnsOrder:R,textPaddingLR:B,textColor:K,backgroundColor:te,dividerColor:x,textHoverColor:E,backgroundHoverColor:H,dividerHoverColor:W}=e,[_,z]=d.useState(void 0),[X,Z]=d.useState(null),k=N==="on"&&(!n||r),J=(S??0)>0,h=T==="b",ne=d.useRef(null),he=d.useRef(null),[ce,be]=d.useState(null),[re,de]=d.useState(Vn),V=fa(re),U=Math.max(0,((v??0)-V)/2),G=Math.min(B??0,U),se=Math.max(G,mn),ye=((v??0)+V)/2;d.useLayoutEffect(()=>{if(!n){de(Vn);return}const Q=()=>{de(iu(ne.current))};Q();const le=ne.current;if(!le)return;const ge=new ResizeObserver(Q);ge.observe(le);let we=le;for(;we&&!we.style.getPropertyValue("--cntrl-article-width");)we=we.parentElement;return we&&ge.observe(we),()=>ge.disconnect()},[n,i]),d.useEffect(()=>{z(void 0)},[S,$,t,f]),d.useEffect(()=>{n&&!r&&z(void 0)},[n,r]);const Te=y.buildColorVars(s,{textColor:K,backgroundColor:te,dividerColor:x,textHoverColor:E,backgroundHoverColor:H,dividerHoverColor:W},nu,ru),$e=l&&l!=="default"?`${s}-state-${l}`:"",_e=`${!n||r?w==="default"?`${s}-entry-hover-default`:w==="blinds"?`${s}-entry-hover-blinds`:w==="reveal"?`${s}-entry-hover-reveal`:"":""} ${$e}`.trim(),O=w==="reveal"&&(!n||r),ie=(C==null?void 0:C[0])??!1,I=(C==null?void 0:C[1])??!1,j=d.useRef(e),q=d.useRef(i);d.useEffect(()=>{if(!c||!n){j.current=e,q.current=i;return}if(q.current!==i){j.current=e,q.current=i;return}const Q=j.current;if(!(Q!==e))return;if(typeof Q.columns=="number"&&typeof e.columns=="number"&&Q.columns!==e.columns){j.current=e;return}const ge=mu(e,Q,{designWidth:re});j.current=e,ba(e,ge)&&c(ge)},[e,c,n,i,re]);const Y=d.useMemo(()=>fu(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ae=d.useMemo(()=>Yr(e,Cn),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),me=d.useMemo(()=>Yr(e,$n),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),ke=d.useMemo(()=>Yr(e,Sn),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),fe=d.useMemo(()=>Array.isArray(R)&&R.length>0?R:[...Yt],[R]),ve=d.useMemo(()=>yu(fe,u,Y,ae,me,ke),[fe,u,Y,ae,me,ke]),Re=In(e),oe=d.useMemo(()=>vt.slice(0,u).map(Q=>Y[Q]),[u,Y]),xe=d.useMemo(()=>Ii(u,Re,Y),[u,Re,Y]),Me=d.useMemo(()=>mr(u,Re,Y),[u,Re,Y]),Ie=d.useMemo(()=>ve.map((Q,le)=>va(Me[le]??0,Q.paddingLeft,Q.paddingRight)),[ve,Me]),Ve=d.useMemo(()=>{const Q=f===0?1/0:f;return(t??[]).slice(0,Q).map((ge,we)=>({id:we,cells:Object.fromEntries(Yt.map(Ke=>[Ke,ge[Ke]??""])),image:ge.image,link:ge.link}))},[t,f]),rt=J?_??S:Ve.length,st=d.useMemo(()=>J?Ve.slice(0,rt):Ve,[Ve,J,rt]),lt=J&&rt<Ve.length,xt=st.length>1||lt,Et=[ie?`${s}-divider-top`:"",I||xt?`${s}-divider-bottom`:""].filter(Boolean).join(" "),ct=!n||r,_t=()=>{if(!ct)return;const Q=_??S;if(!$){z(Ve.length);return}z(Math.min(Q+$,Ve.length))},pe=Q=>y.scalingValue(Q,n??!1),Ne=h?M??0:D??0,Be=P??0,Ge=m??0,Ct=Ne+Ge/2,Vt=Math.max(Be,Gr),dt=mo(0,st.length,ie,I,lt,g??0,n??!1).borderTopWidth,At=ce!=null?`${ce}px`:`calc(${dt} + ${pe(Ct)})`,En=h?"rowPaddingTopB":"rowPaddingTop",Se=ve[0],Qe=ve[ve.length-1],qe=Ie[0],De=Ie[Ie.length-1],ot=Se&&qe?Math.max(qe.paddingLeft,mn):0,Zn=Qe&&De?Math.max(De.paddingRight,mn):0,Rr=Re,sn=Q=>{const le=ne.current;if(!le)return{x:0,y:0};const ge=le.getBoundingClientRect();return{x:Q.clientX-ge.left+go,y:Q.clientY-ge.top+go}},Fr=(Q,le)=>{if(!k)return;const ge=Q.image;if(!(ge!=null&&ge.url)){Z(null);return}const{x:we,y:Ke}=sn(le),Ye=(L==null?void 0:L.min)??80,Le=(L==null?void 0:L.max)??320,pt=(X==null?void 0:X.rowId)===Q.id?X.widthPx:hu(Ye,Le);Z({rowId:Q.id,url:ge.url,objectFit:"contain",isVideo:Wd(ge),widthPx:pt,x:we,y:Ke})},Qn=Q=>{if(!k||!X)return;const{x:le,y:ge}=sn(Q);Z(we=>!we||we.x===le&&we.y===ge?we:{...we,x:le,y:ge})},Jn=()=>{Z(null)},er=Q=>{O&&uo(Q,s),k&&Z(null)},Wr=Q=>{O&&po(Q,s)};d.useLayoutEffect(()=>{if(!p||h){be(null);return}const Q=he.current,le=Q==null?void 0:Q.parentElement;if(!Q||!le){be(null);return}const ge=()=>{const Ke=Q.querySelector("[data-list-row]");if(!Ke){be(null);return}const Ye=le.getBoundingClientRect(),Le=Ke.getBoundingClientRect();be(Le.top-Ye.top+Le.height/2)};ge();const we=new ResizeObserver(ge);return we.observe(Q),we.observe(le),()=>we.disconnect()},[p,h,st,Ne,Be,Ge,t,e,ve,Me,re,g,ie,I,lt]);const Fe=d.useMemo(()=>!h&&Ei.some(Q=>{const le=Q.charAt(0),ge=e[`${Q}VerticalAlign`];return ha(ge,e,le)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);d.useLayoutEffect(()=>{var pt;const Q=ne.current;if(!Q)return;const le=()=>{Q.querySelectorAll("[data-list-col]").forEach(Xe=>{Xe.style.transform="";const Ue=Xe.querySelector(`.${s}-list-col`);Ue&&(Ue.style.minHeight="",Ue.style.height="");const at=Xe.querySelector(`.${s}-list-col-title`);at&&(at.style.transform="")})};if(h||!Fe){le();return}const ge=()=>{const Xe=Array.from(Q.querySelectorAll("[data-list-row]")),Ue=`${s}-list-col`,at=`${s}-baseline-probe`;Xe.forEach(mt=>{mt.querySelectorAll("[data-list-col]").forEach(gt=>{gt.style.transform="";const We=gt.querySelector(`.${Ue}`);We&&(We.style.minHeight="",We.style.height="");const tt=gt.querySelector(`.${s}-list-col-title`);tt&&(tt.style.transform="")})}),Xe.forEach(mt=>{const gt=Array.from(mt.querySelectorAll("[data-list-col]"));Xd(mt,gt,Ue)}),Q.offsetHeight,Xe.forEach(mt=>{const gt=Array.from(mt.querySelectorAll("[data-list-col]")),We=mt.getBoundingClientRect().top,tt=new Map,Mt=gt.map(ze=>{const ln=ze.querySelector(`.${s}-list-col-title`),cn={el:ze,titleEl:ln,letter:ze.getAttribute("data-col-letter")??"",kind:ze.getAttribute("data-valign")??"top",anchor:ze.getAttribute("data-valign-anchor")};return tt.set(cn.letter,cn),cn}),Je=new Map,Dt=(ze,ln)=>{const cn=Je.get(ze.letter);if(cn!==void 0)return cn;const ki=ze.anchor?tt.get(ze.anchor):void 0;if(ze.kind!=="baseline"||!ki||ln.has(ze.letter)){const Fi=Ur(ze,We,Ue,at);return Je.set(ze.letter,Fi),Fi}ln.add(ze.letter);const Ca=Dt(ki,ln);ln.delete(ze.letter);const $a=Ur(ze,We,Ue,at),Sa=Ca-$a;Zd(ze.titleEl,Sa);const Ri=Ur(ze,We,Ue,at);return Je.set(ze.letter,Ri),Ri};Mt.forEach(ze=>Dt(ze,new Set))})};let we=null;const Ke=()=>{we===null&&(we=requestAnimationFrame(()=>{we=null,ge()}))};ge();const Ye=new ResizeObserver(()=>Ke());Ye.observe(Q);let Le=!1;return typeof document<"u"&&((pt=document.fonts)!=null&&pt.ready)&&document.fonts.ready.then(()=>{Le||Ke()}),()=>{Le=!0,we!==null&&(cancelAnimationFrame(we),we=null),Ye.disconnect(),le()}},[Fe,h,e,t,re,st,Me]);const ut=d.useMemo(()=>Od(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ut}}),a.jsx("div",{style:Te,children:a.jsxs("div",{ref:ne,className:`${s}-wrapper ${_e}${Et?` ${Et}`:""}${h?` ${s}-type-b`:""}`.trim(),style:{width:y.scalingValue(v??0,n),...!h&&p?{[`--${s}-first-entry-handle-top`]:At}:{}},onMouseMove:k?Qn:void 0,onMouseLeave:k?Jn:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[st.map((Q,le)=>{var Ye;const ge=(((Ye=Q.link)==null?void 0:Ye.length)??0)>0,we=ge&&(!n||r)?"a":"div",Ke=mo(le,st.length,ie,I,lt,g??0,n??!1);return a.jsxs(we,{ref:le===0?Le=>{he.current=Le}:void 0,className:`${s}-list-item${ge||A==="always"?` ${s}-list-item-has-link`:""}`,...ge?{href:Q.link,target:"_blank"}:{},style:Ke,onMouseEnter:Le=>{O&&(ge||A==="always")&&uo(Le,s),k&&Fr(Q,Le)},onMouseLeave:Le=>{O&&(ge||A==="always")&&po(Le,s)},children:[Ne>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:pe(Ne)}}),a.jsxs("div",{className:`${s}-list-cols-row${h?"":` ${s}-list-cols-row-h`}${p&&le===0&&h?` ${s}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:pe(Ge)},children:[ve.map((Le,pt)=>{const Xe=pt===ve.length-1,Ue=Ie[pt],at=Le.paddingBottom,mt=Nd(Q.cells[Le.key]),gt=h&&mt&&at>0,We=h?{minHeight:pe(Ge)}:{width:pe(Me[pt])},tt=h?{paddingLeft:pe(G),paddingRight:pe(G)}:{paddingLeft:pe(Ue.paddingLeft),paddingRight:pe(Ue.paddingRight)},Mt=Le.textPrefix.charAt(0),Je=h?jd(e[`${Le.textPrefix}VerticalAlign`]):zd(e[`${Le.textPrefix}VerticalAlign`],e,Mt),Dt=h&&mt&&p&&le===0;return a.jsxs("div",{className:h?`${s}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":Mt,"data-valign":Je.kind,...Je.kind==="baseline"?{"data-valign-anchor":Je.anchorLetter}:{}},children:[a.jsx("div",{className:`${s}-list-col${Xe?` ${s}-list-col-last`:""}`,style:{...tt,...We,...h?{justifyContent:ho(Je.kind)}:{}},"data-test":Le.width,children:a.jsx("span",{className:yo(e,Le.textPrefix,`${s}-list-col-title`,`${s}-text-tight-leading`),style:{...fo(xr(e,Le.textPrefix),n),...vo(e,Le.textPrefix,s,n),...h?{}:Kd(Je.kind)},children:Q.cells[Le.key]??null})}),gt&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:pe(at)}}),Dt&&a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":Le.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:pe(Math.max(at,Gr))}})]},Le.key)}),p&&le===0&&h&&a.jsxs(a.Fragment,{children:[a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ye),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:pe(se),height:"100%"}}),a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ye),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:pe(Math.max(se,Re-se)),width:pe(se),height:"100%"}})]})]}),!h&&Be>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:pe(Be)}}),p&&le===0&&!h&&a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:pe(Vt)}})]},Q.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":En,"data-controls-static-handle":"",...h?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:h?"center":"left-y",areaStyle:{position:"absolute",top:dt,left:0,width:"100%",height:pe(Math.max(Ne,Gr))}})},"row-padding-handles"),p&&!h&&Se&&Qe&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":Se.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Me[0]-((qe==null?void 0:qe.paddingRight)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:pe(ot),height:"100%"}}),a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":Qe.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Me[ve.length-1]-((De==null?void 0:De.paddingLeft)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:pe(Rr-Zn),width:pe(Zn),height:"100%"}})]},"column-edge-padding-handles"),p&&!h&&ve.slice(0,-1).map((Q,le)=>{const ge=ve[le+1],we=xe.slice(0,le+1).reduce((Xe,Ue)=>Xe+Ue,0),Ke=Ie[le],Ye=Ie[le+1],Le=Math.max(Ke.paddingRight,mn),pt=Math.max(Ye.paddingLeft,mn);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":Q.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Me[le]-Ke.paddingLeft),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:pe(we-Le),width:pe(Le),height:"100%"}}),a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":ge.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Me[le+1]-Ye.paddingRight),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:pe(we),width:pe(pt),height:"100%"}})]},`${Q.paddingRightKey}-padding`)}),p&&!h&&ve.slice(0,-1).map((Q,le)=>{const ge=gu(le,xe,oe,Re),Ke=xe.slice(0,le+1).reduce((Ye,Le)=>Ye+Le,0)-bo/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Q.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(Mi),"data-controls-max-fraction":String(ge),"data-controls-variant":"column-width",className:`${s}-col-resize-handle`,style:{position:"absolute",top:"0px",left:pe(Ke),width:pe(bo),height:"calc(100%)",pointerEvents:"auto"}})},`${Q.widthKey}-junction`)})]}),lt&&(()=>{const Q=xr(e,Nt),le=Ud(e.cutLabelVerticalAlign),ge=Q.textTextAlign==="justify"||h;return a.jsx("button",{type:"button",className:`${s}-cut-item`,style:{minHeight:pe(b??0),cursor:ct?"pointer":"default",...Bd(I,g??0,n??!1)},onClick:ct?_t:void 0,onMouseEnter:O||k?er:void 0,onMouseLeave:O?Wr:void 0,children:a.jsx("div",{className:`${s}-list-cols-row`,style:{...h?{paddingLeft:pe(G),paddingRight:pe(G)}:{},justifyContent:Gd(Q.textTextAlign),alignItems:ho(le)},children:a.jsx("span",{className:yo(e,Nt,`${s}-cut-label`,`${s}-text-tight-leading`),style:{...fo(Q,n),...vo(e,Nt,s,n),...ge?{width:"100%"}:{}},children:F})})})})(),k&&X&&(()=>{const Q=pr(X.widthPx),le={width:Q,height:"auto",maxHeight:Q,objectFit:"contain",left:X.x,top:X.y,position:"absolute"};return a.jsx(Hd,{media:X,className:X.isVideo?`${s}-hover-video`:`${s}-hover-image`,style:le},`${X.rowId}-${X.url}`)})()]})})]})}const bu=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';\r
5696
+ `}const Yt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Pi=["AColumn","BColumn","CColumn","DColumn","EColumn"],Ot="cutLabel",_i=[...Pi,Ot],Rr=["A","B","C","D","E"];function ma(e){return`${e}ColumnVerticalAlign`}const oi=["Top","Center","Bottom"];function Ai(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const r=t.slice(-1).toUpperCase();return Rr.includes(r)?`Baseline ${r}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Dd(e){const t=Ai(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function zd(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Rr.includes(n)?n:null}function ga(e,t,n){const r=zd(e);return r?r===t?!1:Dd(n[ma(r)]):!0}function Bn(e){const t=Ai(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Rr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function jd(e,t,n){if(ha(e,t,n))return Bn(e);const r=Bn(e);return r.kind==="baseline"?{kind:"top"}:r}function qd(e){const t=Bn(e);return t.kind==="baseline"?{kind:"top"}:t}function ha(e,t,n){return ga(e,n,t)?Bn(e).kind==="baseline":!1}function Kd(e){const t={};let n=!1;for(const r of Rr){const o=ma(r),l=e[o];if(e.type==="b"){const i=String(l??"Top").trim();i!=="Top"&&i!=="Center"&&i!=="Bottom"&&(t[o]="Top",n=!0);continue}ga(l,r,e)||(t[o]="Top",n=!0)}return n?t:null}function Gd(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Ud(e){const t=Bn(e).kind;return t==="baseline"?"center":t}function Yd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function ho(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Xd(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),l=o-r;return n.remove(),l}function Gr(e,t,n,r){const o=e.titleEl;if(!o)return 0;const l=o.closest(`.${n}`);if(!l)return 0;const i=Xd(o,r);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+i;const d=l.getBoundingClientRect(),s=o.getBoundingClientRect().height;let p=0;return e.kind==="center"?p=(d.height-s)/2:e.kind==="bottom"&&(p=d.height-s),d.top-t+p+i}function Zd(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(o=>{const l=o.querySelector(`.${n}`);l&&(l.style.minHeight=`${r}px`,l.style.height=`${r}px`)}),r)}function Qd(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Jd={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Ae(e,t){return`${e}${t.replace(/^text/,"Text")}`}const eu={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function tu(e){return[Ae(e,"textFontFamily"),Ae(e,"textFontSettings"),{type:"row",items:[Ae(e,"textFontSize"),Ae(e,"textLineHeight"),Ae(e,"textLetterSpacing"),Ae(e,"textWordSpacing")]},Ae(e,"textTextAlign"),Ae(e,"textTextAppearance"),`${e}VerticalAlign`]}function nu(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(_i.map(e=>[eu[e],tu(e)]))}}function xr(e,t){const n=r=>{const o=Ae(t,r);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===Ot?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function fo(e,t){var r,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return yt(et(n,t))}function yo(e,t,n,r){const o=xr(e,t),l=o.textFontSize??.01,i=o.textLineHeight;return i!==void 0&&i<l?`${n} ${r}`:n}function vo(e,t,n,r){const o=xr(e,t),l=o.textFontSize??.01,i=o.textLineHeight;return i===void 0||i>=l?{}:{[`--${n}-title-leading-gap`]:x.scalingValue((l-i)/2,r)}}const vt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Cn=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Sn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],$n=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],ru={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},iu=["hover","focus","filled","success","error"],bo=.004,mn=.004,Ur=mn,Mi=50,Vn=1440,Dn=Mi/Vn;function fa(e){const t=typeof e=="number"&&e>0?e:Vn;return Mi/t}function ou(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const o=parseFloat(r);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return Vn}const ya={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function In(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function au(e,t=1){const n=t/e;return Object.fromEntries(vt.map(r=>[r,n]))}function su(){return Object.fromEntries([...Cn.map(e=>[e,0]),...Sn.map(e=>[e,0])])}function lu(){return Object.fromEntries($n.map(e=>[e,0]))}function ar(e){return Object.fromEntries(vt.map(t=>[t,typeof e[t]=="number"?e[t]:ya[t]]))}function va(e,t,n){const r=e-Dn,o=t+n;if(o<=0||o<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const l=r/o;return{paddingLeft:t*l,paddingRight:n*l}}function mr(e,t,n){const r=Ii(e,t,n);if(e<=0)return[];const o=r.slice(0,e-1).reduce((l,i)=>l+i,0);return[...r.slice(0,e-1),Math.max(0,t-o)]}function cu(e,t,n){const r={};for(let o=0;o<e;o+=1){const l=Cn[o],i=Sn[o],d=typeof n[l]=="number"?n[l]:0,s=typeof n[i]=="number"?n[i]:0,p=va(t[o]??0,d,s);p.paddingLeft!==d&&(r[l]=p.paddingLeft),p.paddingRight!==s&&(r[i]=p.paddingRight)}return r}function Ii(e,t,n){if(e<=0)return[];const r=vt.slice(0,e).map(p=>n[p]);if(e===1)return r;const o=r.slice(0,e-1),i=o.reduce((p,u)=>p+u,0)+Dn;if(t>=i)return r;const d=[...o];let s=i-t;for(let p=d.length-1;p>=0&&s>0;p-=1){const u=d[p]-Dn;if(u<=0)continue;const w=Math.min(s,u);d[p]-=w,s-=w}return[...d,r[e-1]]}function du(e,t,n){if(e<=1)return{};const r=Ii(e,t,n),o={};for(let l=0;l<e-1;l+=1){const i=vt[l];r[l]!==n[i]&&(o[i]=r[l])}return o}function xo(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Yt]}function uu(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function pu(e,t,n,r){const o=Math.min(r,e.length,vt.length),l={};for(let i=0;i<o;i+=1){const d=e[i],s=t.indexOf(d);if(s===-1)continue;const p=vt[s],u=Cn[s],w=Sn[s],C=$n[s],b=vt[i],m=Cn[i],h=Sn[i],S=$n[i],y=n[p],$=n[u],f=n[w],F=n[C];typeof y=="number"&&(l[b]=y),typeof $=="number"&&(l[m]=$),typeof f=="number"&&(l[h]=f),typeof F=="number"&&(l[S]=F)}return l}function ba(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const r of n)if(e[r]!==t[r])return!0;return!1}function mu(e,t){const n=e.columns,r=t.columns;if(typeof n!="number"||n===r)return e;const o=In(e),l=e.type==="b"||e.type===void 0&&t.type==="b",i={...e,...au(n,o),...su()};if(l)for(const d of $n)typeof t[d]=="number"&&(i[d]=t[d]);else Object.assign(i,lu());return ba(e,i)?i:e}function gu(e,t,n){const r=Kd(e);r&&(e={...e,...r});const o=fa(n==null?void 0:n.designWidth),l=e.columns,i=t.columns,d=In(e),s=In(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof l=="number"?l:typeof i=="number"?i:Yt.length,w=f=>{if(p)return f;const F=ar({...t,...f}),L=In(f),D=mr(u,L,F),v=cu(u,D,{...t,...f});return Object.keys(v).length===0?f:{...f,...v}};if(typeof l=="number"&&l!==i)return e;const C=xo(e),b=xo(t);if(!uu(C,b))return w({...e,...pu(C,b,t,u)});if(d<s&&typeof u=="number"&&!p){const f=ar({...t,...e});return w({...e,...du(u,d,f)})}if(p){const f=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,F=Math.max(0,(d-o)/2);return f>F?{...e,textPaddingLR:F}:e}const m=ar({...t,...e}),h=mr(u,s,ar(t)),y=mr(u,d,m).some((f,F)=>f<(h[F]??f)),$=vt.some(f=>{const F=e[f],L=t[f];return typeof F=="number"&&typeof L=="number"&&F!==L});return y||$?w(e):e}function hu(e,t,n,r){const o=t.slice(0,e).reduce((i,d)=>i+d,0),l=n.slice(e+1,t.length-1).reduce((i,d)=>i+d,0);return Math.max(Dn,r-o-l-Dn)}function fu(e,t){return Math.random()*(t-e)+e}function yu(e){return Object.fromEntries(vt.map(t=>[t,typeof e[t]=="number"?e[t]:ya[t]]))}function Yr(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function vu(e,t,n,r,o,l){return e.slice(0,t).map((i,d)=>{const s=Cn[d],p=Sn[d],u=$n[d];return{key:i,textPrefix:Jd[i],widthKey:vt[d],width:n[vt[d]],paddingLeftKey:s,paddingRightKey:p,paddingBottomKey:u,paddingLeft:r[s],paddingRight:o[p],paddingBottom:l[u]}})}function bu({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o,activeEvent:l,layoutId:i,onUpdateSettings:d}){const{prefix:s}=x.useScopedStyles(),p=!!o,{columns:u,type:w,wrapperWidth:C,entriesCount:b,cellMinHeight:m,dividerWidth:h,showVisibility:S,cut:y,showCut:$,cutCellMinHeight:f,cutLabel:F,imageSize:L,imageOnHover:D,entryHoverEffect:v,entryHoverShowOption:E,rowPaddingTop:j,rowPaddingBottom:T,rowPaddingTopB:k,columnsOrder:R,textPaddingLR:N,textColor:q,backgroundColor:ie,dividerColor:M,textHoverColor:W,backgroundHoverColor:z,dividerHoverColor:V}=e,[P,G]=c.useState(void 0),[ee,Y]=c.useState(null),A=D==="on"&&(!n||r),ae=(y??0)>0,g=w==="b",ne=c.useRef(null),X=c.useRef(null),[J,ue]=c.useState(null),[Z,re]=c.useState(Vn),I=fa(Z),H=Math.max(0,((C??0)-I)/2),O=Math.min(N??0,H),se=Math.max(O,mn),ge=((C??0)+I)/2;c.useLayoutEffect(()=>{if(!n){re(Vn);return}const te=()=>{re(ou(ne.current))};te();const pe=ne.current;if(!pe)return;const ye=new ResizeObserver(te);ye.observe(pe);let we=pe;for(;we&&!we.style.getPropertyValue("--cntrl-article-width");)we=we.parentElement;return we&&ye.observe(we),()=>ye.disconnect()},[n,i]),c.useEffect(()=>{G(void 0)},[y,$,t,b]),c.useEffect(()=>{n&&!r&&G(void 0)},[n,r]);const Te=x.buildColorVars(s,{textColor:q,backgroundColor:ie,dividerColor:M,textHoverColor:W,backgroundHoverColor:z,dividerHoverColor:V},ru,iu),Se=l&&l!=="default"?`${s}-state-${l}`:"",_e=`${!n||r?v==="default"?`${s}-entry-hover-default`:v==="blinds"?`${s}-entry-hover-blinds`:v==="reveal"?`${s}-entry-hover-reveal`:"":""} ${Se}`.trim(),B=v==="reveal"&&(!n||r),le=(S==null?void 0:S[0])??!1,_=(S==null?void 0:S[1])??!1,K=c.useRef(e),U=c.useRef(i);c.useEffect(()=>{if(!d||!n){K.current=e,U.current=i;return}if(U.current!==i){K.current=e,U.current=i;return}const te=K.current;if(!(te!==e))return;if(typeof te.columns=="number"&&typeof e.columns=="number"&&te.columns!==e.columns){K.current=e;return}const ye=gu(e,te,{designWidth:Z});K.current=e,ba(e,ye)&&d(ye)},[e,d,n,i,Z]);const Q=c.useMemo(()=>yu(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),de=c.useMemo(()=>Yr(e,Cn),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),fe=c.useMemo(()=>Yr(e,Sn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Re=c.useMemo(()=>Yr(e,$n),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),ve=c.useMemo(()=>Array.isArray(R)&&R.length>0?R:[...Yt],[R]),be=c.useMemo(()=>vu(ve,u,Q,de,fe,Re),[ve,u,Q,de,fe,Re]),ke=In(e),ce=c.useMemo(()=>vt.slice(0,u).map(te=>Q[te]),[u,Q]),xe=c.useMemo(()=>Ii(u,ke,Q),[u,ke,Q]),Me=c.useMemo(()=>mr(u,ke,Q),[u,ke,Q]),Ie=c.useMemo(()=>be.map((te,pe)=>va(Me[pe]??0,te.paddingLeft,te.paddingRight)),[be,Me]),Ve=c.useMemo(()=>{const te=b===0?1/0:b;return(t??[]).slice(0,te).map((ye,we)=>({id:we,cells:Object.fromEntries(Yt.map(Ke=>[Ke,ye[Ke]??""])),image:ye.image,link:ye.link}))},[t,b]),rt=ae?P??y:Ve.length,st=c.useMemo(()=>ae?Ve.slice(0,rt):Ve,[Ve,ae,rt]),lt=ae&&rt<Ve.length,xt=st.length>1||lt,At=[le?`${s}-divider-top`:"",_||xt?`${s}-divider-bottom`:""].filter(Boolean).join(" "),ct=!n||r,Mt=()=>{if(!ct)return;const te=P??y;if(!$){G(Ve.length);return}G(Math.min(te+$,Ve.length))},he=te=>x.scalingValue(te,n??!1),Ne=g?k??0:j??0,Oe=T??0,Ue=m??0,Ct=Ne+Ue/2,Dt=Math.max(Oe,Ur),dt=mo(0,st.length,le,_,lt,h??0,n??!1).borderTopWidth,It=J!=null?`${J}px`:`calc(${dt} + ${he(Ct)})`,Pn=g?"rowPaddingTopB":"rowPaddingTop",$e=be[0],Qe=be[be.length-1],qe=Ie[0],De=Ie[Ie.length-1],ot=$e&&qe?Math.max(qe.paddingLeft,mn):0,Zn=Qe&&De?Math.max(De.paddingRight,mn):0,kr=ke,sn=te=>{const pe=ne.current;if(!pe)return{x:0,y:0};const ye=pe.getBoundingClientRect();return{x:te.clientX-ye.left+go,y:te.clientY-ye.top+go}},Fr=(te,pe)=>{if(!A)return;const ye=te.image;if(!(ye!=null&&ye.url)){Y(null);return}const{x:we,y:Ke}=sn(pe),Ye=(L==null?void 0:L.min)??80,Le=(L==null?void 0:L.max)??320,pt=(ee==null?void 0:ee.rowId)===te.id?ee.widthPx:fu(Ye,Le);Y({rowId:te.id,url:ye.url,objectFit:"contain",isVideo:Hd(ye),widthPx:pt,x:we,y:Ke})},Qn=te=>{if(!A||!ee)return;const{x:pe,y:ye}=sn(te);Y(we=>!we||we.x===pe&&we.y===ye?we:{...we,x:pe,y:ye})},Jn=()=>{Y(null)},er=te=>{B&&uo(te,s),A&&Y(null)},Wr=te=>{B&&po(te,s)};c.useLayoutEffect(()=>{if(!p||g){ue(null);return}const te=X.current,pe=te==null?void 0:te.parentElement;if(!te||!pe){ue(null);return}const ye=()=>{const Ke=te.querySelector("[data-list-row]");if(!Ke){ue(null);return}const Ye=pe.getBoundingClientRect(),Le=Ke.getBoundingClientRect();ue(Le.top-Ye.top+Le.height/2)};ye();const we=new ResizeObserver(ye);return we.observe(te),we.observe(pe),()=>we.disconnect()},[p,g,st,Ne,Oe,Ue,t,e,be,Me,Z,h,le,_,lt]);const Fe=c.useMemo(()=>!g&&Pi.some(te=>{const pe=te.charAt(0),ye=e[`${te}VerticalAlign`];return ha(ye,e,pe)}),[g,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);c.useLayoutEffect(()=>{var pt;const te=ne.current;if(!te)return;const pe=()=>{te.querySelectorAll("[data-list-col]").forEach(Xe=>{Xe.style.transform="";const Ge=Xe.querySelector(`.${s}-list-col`);Ge&&(Ge.style.minHeight="",Ge.style.height="");const at=Xe.querySelector(`.${s}-list-col-title`);at&&(at.style.transform="")})};if(g||!Fe){pe();return}const ye=()=>{const Xe=Array.from(te.querySelectorAll("[data-list-row]")),Ge=`${s}-list-col`,at=`${s}-baseline-probe`;Xe.forEach(mt=>{mt.querySelectorAll("[data-list-col]").forEach(gt=>{gt.style.transform="";const We=gt.querySelector(`.${Ge}`);We&&(We.style.minHeight="",We.style.height="");const tt=gt.querySelector(`.${s}-list-col-title`);tt&&(tt.style.transform="")})}),Xe.forEach(mt=>{const gt=Array.from(mt.querySelectorAll("[data-list-col]"));Zd(mt,gt,Ge)}),te.offsetHeight,Xe.forEach(mt=>{const gt=Array.from(mt.querySelectorAll("[data-list-col]")),We=mt.getBoundingClientRect().top,tt=new Map,Rt=gt.map(ze=>{const ln=ze.querySelector(`.${s}-list-col-title`),cn={el:ze,titleEl:ln,letter:ze.getAttribute("data-col-letter")??"",kind:ze.getAttribute("data-valign")??"top",anchor:ze.getAttribute("data-valign-anchor")};return tt.set(cn.letter,cn),cn}),Je=new Map,zt=(ze,ln)=>{const cn=Je.get(ze.letter);if(cn!==void 0)return cn;const Ri=ze.anchor?tt.get(ze.anchor):void 0;if(ze.kind!=="baseline"||!Ri||ln.has(ze.letter)){const Fi=Gr(ze,We,Ge,at);return Je.set(ze.letter,Fi),Fi}ln.add(ze.letter);const Ca=zt(Ri,ln);ln.delete(ze.letter);const Sa=Gr(ze,We,Ge,at),$a=Ca-Sa;Qd(ze.titleEl,$a);const ki=Gr(ze,We,Ge,at);return Je.set(ze.letter,ki),ki};Rt.forEach(ze=>zt(ze,new Set))})};let we=null;const Ke=()=>{we===null&&(we=requestAnimationFrame(()=>{we=null,ye()}))};ye();const Ye=new ResizeObserver(()=>Ke());Ye.observe(te);let Le=!1;return typeof document<"u"&&((pt=document.fonts)!=null&&pt.ready)&&document.fonts.ready.then(()=>{Le||Ke()}),()=>{Le=!0,we!==null&&(cancelAnimationFrame(we),we=null),Ye.disconnect(),pe()}},[Fe,g,e,t,Z,st,Me]);const ut=c.useMemo(()=>Vd(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ut}}),a.jsx("div",{style:Te,children:a.jsxs("div",{ref:ne,className:`${s}-wrapper ${_e}${At?` ${At}`:""}${g?` ${s}-type-b`:""}`.trim(),style:{width:x.scalingValue(C??0,n),...!g&&p?{[`--${s}-first-entry-handle-top`]:It}:{}},onMouseMove:A?Qn:void 0,onMouseLeave:A?Jn:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[st.map((te,pe)=>{var Ye;const ye=(((Ye=te.link)==null?void 0:Ye.length)??0)>0,we=ye&&(!n||r)?"a":"div",Ke=mo(pe,st.length,le,_,lt,h??0,n??!1);return a.jsxs(we,{ref:pe===0?Le=>{X.current=Le}:void 0,className:`${s}-list-item${ye||E==="always"?` ${s}-list-item-has-link`:""}`,...ye?{href:te.link,target:"_blank"}:{},style:Ke,onMouseEnter:Le=>{B&&(ye||E==="always")&&uo(Le,s),A&&Fr(te,Le)},onMouseLeave:Le=>{B&&(ye||E==="always")&&po(Le,s)},children:[Ne>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:he(Ne)}}),a.jsxs("div",{className:`${s}-list-cols-row${g?"":` ${s}-list-cols-row-h`}${p&&pe===0&&g?` ${s}-list-cols-row-controls`:""}`,...g?{}:{"data-list-row":""},style:g?void 0:{minHeight:he(Ue)},children:[be.map((Le,pt)=>{const Xe=pt===be.length-1,Ge=Ie[pt],at=Le.paddingBottom,mt=Od(te.cells[Le.key]),gt=g&&mt&&at>0,We=g?{minHeight:he(Ue)}:{width:he(Me[pt])},tt=g?{paddingLeft:he(O),paddingRight:he(O)}:{paddingLeft:he(Ge.paddingLeft),paddingRight:he(Ge.paddingRight)},Rt=Le.textPrefix.charAt(0),Je=g?qd(e[`${Le.textPrefix}VerticalAlign`]):jd(e[`${Le.textPrefix}VerticalAlign`],e,Rt),zt=g&&mt&&p&&pe===0;return a.jsxs("div",{className:g?`${s}-list-col-wrap`:void 0,...g?{}:{"data-list-col":"","data-col-letter":Rt,"data-valign":Je.kind,...Je.kind==="baseline"?{"data-valign-anchor":Je.anchorLetter}:{}},children:[a.jsx("div",{className:`${s}-list-col${Xe?` ${s}-list-col-last`:""}`,style:{...tt,...We,...g?{justifyContent:ho(Je.kind)}:{}},"data-test":Le.width,children:a.jsx("span",{className:yo(e,Le.textPrefix,`${s}-list-col-title`,`${s}-text-tight-leading`),style:{...fo(xr(e,Le.textPrefix),n),...vo(e,Le.textPrefix,s,n),...g?{}:Gd(Je.kind)},children:te.cells[Le.key]??null})}),gt&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:he(at)}}),zt&&a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":Le.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:he(Math.max(at,Ur))}})]},Le.key)}),p&&pe===0&&g&&a.jsxs(a.Fragment,{children:[a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ge),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:he(se),height:"100%"}}),a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ge),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:he(Math.max(se,ke-se)),width:he(se),height:"100%"}})]})]}),!g&&Oe>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:he(Oe)}}),p&&pe===0&&!g&&a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:he(Dt)}})]},te.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":Pn,"data-controls-static-handle":"",...g?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:g?"center":"left-y",areaStyle:{position:"absolute",top:dt,left:0,width:"100%",height:he(Math.max(Ne,Ur))}})},"row-padding-handles"),p&&!g&&$e&&Qe&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":$e.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Me[0]-((qe==null?void 0:qe.paddingRight)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:he(ot),height:"100%"}}),a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":Qe.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Me[be.length-1]-((De==null?void 0:De.paddingLeft)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:he(kr-Zn),width:he(Zn),height:"100%"}})]},"column-edge-padding-handles"),p&&!g&&be.slice(0,-1).map((te,pe)=>{const ye=be[pe+1],we=xe.slice(0,pe+1).reduce((Xe,Ge)=>Xe+Ge,0),Ke=Ie[pe],Ye=Ie[pe+1],Le=Math.max(Ke.paddingRight,mn),pt=Math.max(Ye.paddingLeft,mn);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":te.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Me[pe]-Ke.paddingLeft),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:he(we-Le),width:he(Le),height:"100%"}}),a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":ye.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Me[pe+1]-Ye.paddingRight),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:he(we),width:he(pt),height:"100%"}})]},`${te.paddingRightKey}-padding`)}),p&&!g&&be.slice(0,-1).map((te,pe)=>{const ye=hu(pe,xe,ce,ke),Ke=xe.slice(0,pe+1).reduce((Ye,Le)=>Ye+Le,0)-bo/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":te.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(Mi),"data-controls-max-fraction":String(ye),"data-controls-variant":"column-width",className:`${s}-col-resize-handle`,style:{position:"absolute",top:"0px",left:he(Ke),width:he(bo),height:"calc(100%)",pointerEvents:"auto"}})},`${te.widthKey}-junction`)})]}),lt&&(()=>{const te=xr(e,Ot),pe=Ud(e.cutLabelVerticalAlign),ye=te.textTextAlign==="justify"||g;return a.jsx("button",{type:"button",className:`${s}-cut-item`,style:{minHeight:he(f??0),cursor:ct?"pointer":"default",...Bd(_,h??0,n??!1)},onClick:ct?Mt:void 0,onMouseEnter:B||A?er:void 0,onMouseLeave:B?Wr:void 0,children:a.jsx("div",{className:`${s}-list-cols-row`,style:{...g?{paddingLeft:he(O),paddingRight:he(O)}:{},justifyContent:Yd(te.textTextAlign),alignItems:ho(pe)},children:a.jsx("span",{className:yo(e,Ot,`${s}-cut-label`,`${s}-text-tight-leading`),style:{...fo(te,n),...vo(e,Ot,s,n),...ye?{width:"100%"}:{}},children:F})})})})(),A&&ee&&(()=>{const te=pr(ee.widthPx),pe={width:te,height:"auto",maxHeight:te,objectFit:"contain",left:ee.x,top:ee.y,position:"absolute"};return a.jsx(Nd,{media:ee,className:ee.isVideo?`${s}-hover-video`:`${s}-hover-image`,style:pe},`${ee.rowId}-${ee.url}`)})()]})})]})}const xu=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';\r
5594
5697
  import { CommonComponentProps } from '../props';\r
5595
5698
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';\r
5596
5699
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';\r
@@ -8547,7 +8650,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8547
8650
  </>\r
8548
8651
  );\r
8549
8652
  }\r
8550
- `,Pn=["A","B","C","D","E"],Co=[...oi,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],en={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function xu(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function sr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Cu(){return Object.fromEntries(Pn.map((e,t)=>{const n=Yt[t],r=`${e} column`;return[n,xu(r)]}))}function $u(){const e={};for(const t of Pn)e[`${t}ColumnWidth`]=sr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=sr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=sr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=sr(`${t} column padding bottom`);return e}function $o(e={}){const{typeBDefaults:t,...n}=e,r={wrapperWidth:1,columnsOrder:[...Yt]};for(const l of Pn)r[`${l}ColumnWidth`]=l==="A"?.0798:.32,r[`${l}ColumnPaddingLeft`]=0,r[`${l}ColumnPaddingRight`]=0,r[`${l}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...r,...o,...n}}function Su(e){const t={};if(e===Nt)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...oi]},enum:[...oi]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Co],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Co]}}return t[Ae(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Ae(e,"textFontSettings")]={...en.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Ae(e,"textFontSize")]={...en.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ae(e,"textLineHeight")]={...en.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ae(e,"textLetterSpacing")]={...en.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ae(e,"textWordSpacing")]={...en.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ae(e,"textTextAlign")]={...en.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ae(e,"textTextAppearance")]={...en.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const wu=_i.reduce((e,t)=>({...e,...Su(t)}),{});function Tu(e){return{verticalAlign:e===Nt?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Nt?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Lu(e,t={}){var n;return{...Tu(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const So=new Set(["textFontFamily","textFontSettings"]);function Pu(e,t,n){const r=l=>n===void 0?!0:n==="common"?So.has(l):!So.has(l),o={};return r("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Ai(t.verticalAlign)),r("textFontFamily")&&t.textFontFamily!==void 0&&(o[Ae(e,"textFontFamily")]=t.textFontFamily),r("textFontSettings")&&t.textFontSettings!==void 0&&(o[Ae(e,"textFontSettings")]=t.textFontSettings),r("textFontSize")&&t.textFontSize!==void 0&&(o[Ae(e,"textFontSize")]=t.textFontSize),r("textLineHeight")&&t.textLineHeight!==void 0&&(o[Ae(e,"textLineHeight")]=t.textLineHeight),r("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Ae(e,"textLetterSpacing")]=t.textLetterSpacing),r("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Ae(e,"textWordSpacing")]=t.textWordSpacing),r("textTextAlign")&&t.textTextAlign!==void 0&&(o[Ae(e,"textTextAlign")]=t.textTextAlign),r("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Ae(e,"textTextAppearance")]=t.textTextAppearance),o}function gr(e={},t){return _i.reduce((n,r)=>({...n,...Pu(r,Lu(r,e),t)}),{})}const Eu=gr(),_u=tu();function xa(e){return[Ae(e,"textFontFamily"),Ae(e,"textFontSettings"),Ae(e,"textFontSize"),Ae(e,"textLineHeight"),Ae(e,"textLetterSpacing"),Ae(e,"textWordSpacing"),Ae(e,"textTextAlign"),Ae(e,"textTextAppearance"),`${e}VerticalAlign`]}function Au(){const e=[];return Ei.forEach((t,n)=>{const r=Yt[n],o=xa(t);for(let l=1;l<Yt.length;l+=1){const i=[{name:"columns",value:l},...Array.from({length:l},(c,s)=>({name:`columnsOrder.${s}`,value:r,isNotEqual:!0}))];o.forEach(c=>{e.push({if:i,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const Mu=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];xa(Nt);const Iu=[...Pn.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],tn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],ku=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:tn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:tn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:tn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:tn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:tn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:tn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:tn[6],link:""}],Ru=[...Pn.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Fu={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:{...Cu(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:ku},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...$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"}},...wu,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...Eu,...gr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:$o({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...gr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:$o({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...gr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Au(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Iu.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}},...Pn.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Ru]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",_u]}],paletteBookmark:{items:[...Mu],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Wu={element:vu,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>pu(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Fu,sourceCode:bu},wo=300,jt=.004,Hu={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},Nu=["hover","focus","filled","success","error"];function Bu(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function To(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function Lo(e,t,n,r){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:y.scalingValue((o-t)/2,r)}}function Ou(e){return`
8653
+ `,En=["A","B","C","D","E"],Co=[...oi,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],en={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Cu(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function sr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Su(){return Object.fromEntries(En.map((e,t)=>{const n=Yt[t],r=`${e} column`;return[n,Cu(r)]}))}function $u(){const e={};for(const t of En)e[`${t}ColumnWidth`]=sr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=sr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=sr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=sr(`${t} column padding bottom`);return e}function So(e={}){const{typeBDefaults:t,...n}=e,r={wrapperWidth:1,columnsOrder:[...Yt]};for(const l of En)r[`${l}ColumnWidth`]=l==="A"?.0798:.32,r[`${l}ColumnPaddingLeft`]=0,r[`${l}ColumnPaddingRight`]=0,r[`${l}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...r,...o,...n}}function wu(e){const t={};if(e===Ot)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...oi]},enum:[...oi]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Co],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Co]}}return t[Ae(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Ae(e,"textFontSettings")]={...en.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Ae(e,"textFontSize")]={...en.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ae(e,"textLineHeight")]={...en.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ae(e,"textLetterSpacing")]={...en.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ae(e,"textWordSpacing")]={...en.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ae(e,"textTextAlign")]={...en.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ae(e,"textTextAppearance")]={...en.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Tu=_i.reduce((e,t)=>({...e,...wu(t)}),{});function Lu(e){return{verticalAlign:e===Ot?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Ot?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Eu(e,t={}){var n;return{...Lu(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const $o=new Set(["textFontFamily","textFontSettings"]);function Pu(e,t,n){const r=l=>n===void 0?!0:n==="common"?$o.has(l):!$o.has(l),o={};return r("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Ai(t.verticalAlign)),r("textFontFamily")&&t.textFontFamily!==void 0&&(o[Ae(e,"textFontFamily")]=t.textFontFamily),r("textFontSettings")&&t.textFontSettings!==void 0&&(o[Ae(e,"textFontSettings")]=t.textFontSettings),r("textFontSize")&&t.textFontSize!==void 0&&(o[Ae(e,"textFontSize")]=t.textFontSize),r("textLineHeight")&&t.textLineHeight!==void 0&&(o[Ae(e,"textLineHeight")]=t.textLineHeight),r("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Ae(e,"textLetterSpacing")]=t.textLetterSpacing),r("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Ae(e,"textWordSpacing")]=t.textWordSpacing),r("textTextAlign")&&t.textTextAlign!==void 0&&(o[Ae(e,"textTextAlign")]=t.textTextAlign),r("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Ae(e,"textTextAppearance")]=t.textTextAppearance),o}function gr(e={},t){return _i.reduce((n,r)=>({...n,...Pu(r,Eu(r,e),t)}),{})}const _u=gr(),Au=nu();function xa(e){return[Ae(e,"textFontFamily"),Ae(e,"textFontSettings"),Ae(e,"textFontSize"),Ae(e,"textLineHeight"),Ae(e,"textLetterSpacing"),Ae(e,"textWordSpacing"),Ae(e,"textTextAlign"),Ae(e,"textTextAppearance"),`${e}VerticalAlign`]}function Mu(){const e=[];return Pi.forEach((t,n)=>{const r=Yt[n],o=xa(t);for(let l=1;l<Yt.length;l+=1){const i=[{name:"columns",value:l},...Array.from({length:l},(d,s)=>({name:`columnsOrder.${s}`,value:r,isNotEqual:!0}))];o.forEach(d=>{e.push({if:i,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const Iu=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];xa(Ot);const Ru=[...En.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],tn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],ku=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:tn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:tn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:tn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:tn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:tn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:tn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:tn[6],link:""}],Fu=[...En.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Wu={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:{...Su(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:ku},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...$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"}},...Tu,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",..._u,...gr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:So({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...gr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:So({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...gr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Mu(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Ru.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}},...En.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Fu]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",Au]}],paletteBookmark:{items:[...Iu],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Hu={element:bu,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>mu(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Wu,sourceCode:xu},wo=300,jt=.004,Nu={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},Ou=["hover","focus","filled","success","error"];function Bu(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function To(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function Lo(e,t,n,r){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:x.scalingValue((o-t)/2,r)}}function Vu(e){return`
8551
8654
  .${e}-wrapper {
8552
8655
  box-sizing: border-box;
8553
8656
  display: flex;
@@ -8740,7 +8843,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8740
8843
  left: 20px;
8741
8844
  transform: translateY(-50%);
8742
8845
  }
8743
- `}function Po(e,t,n,r,o,l,i,c){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:r,letterSpacing:o??0,wordSpacing:l??0,textAppearance:i,color:c??"#000000"}}function Vu({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o,activeEvent:l}){const{prefix:i}=y.useScopedStyles(),c=o??!1,{wrapperWidth:s=1,cellMinHeight:p=0,dividerWidth:u=694e-6,dividerStyle:T="solid",entryHoverEffect:v="default",autoclose:f="off",icon:m,iconMaxWidth:g=.00833,iconPaddingRight:C=0,iconAnimation:S="rotate 45",questionColor:$="#000000",answerColor:b="#000000",dividerColor:F="#0000001F",iconColor:L="#000000",questionHoverColor:N="#666666",iconHoverColor:w="#666666",iconActiveColor:A="#000000",dividerHoverColor:D="#000000",questionFontFamily:P,questionFontSettings:M,questionFontSize:R,questionLineHeight:B,questionLetterSpacing:K,questionWordSpacing:te,questionTextAppearance:x,answerFontFamily:E,answerFontSettings:H,answerFontSize:W,answerLineHeight:_,answerLetterSpacing:z,answerWordSpacing:X,answerTextAppearance:Z,questionPaddingLeft:k=0,questionPaddingTop:J=0,questionPaddingBottom:h=0,answerPaddingLeft:ne=0,answerPaddingRight:he=0,answerPaddingTop:ce=0,answerPaddingBottom:be=0}=e,re=t??[],[de,V]=d.useState(()=>new Set),U=!n||r;d.useEffect(()=>{V(new Set)},[f]),d.useEffect(()=>{n&&!o&&!r&&V(new Set)},[n,o,r]);const G=pe=>y.scalingValue(pe,n??!1),se=Math.max(k,jt),ye=Math.max(J,jt),Te=Math.max(h,jt),$e=Math.max(ne,jt),Pe=Math.max(he,jt),_e=Math.max(ce,jt),O=Math.max(be,jt),ie=Math.max(0,(s??1)-C-g),I=Math.max(0,(s??1)-he),j=Math.max(0,(s??1)-ne),q=Math.max(C,jt),Y=Math.max(0,(s??1)-k-g),ae=d.useMemo(()=>de.size===0?0:Math.min(...de),[de]),me=d.useCallback(pe=>de.has(pe),[de]),ke=U&&v==="default"?`${i}-entry-hover-default`:"",fe=m??"",ve=fe!=="",Re=S.replace(/^rotate /,""),oe=`${i}-icon-anim-${Re}`,xe=yt(et(Po(P,M,R,B,K,te,x,$),n)),Me=yt(et(Po(E,H,W,_,z,X,Z,b),n)),Ie=To(R,B,`${i}-question`,`${i}-text-tight-leading`),Ve=To(W,_,`${i}-answer-text`,`${i}-text-tight-leading`),rt=Lo(R,B,i,n),st=Lo(W,_,i,n),lt=y.buildColorVars(i,{questionColor:$,answerColor:b,dividerColor:F,iconColor:L,questionHoverColor:N,iconHoverColor:w,iconActiveColor:A,dividerHoverColor:D},Hu,Nu),xt=l&&l!=="default"?`${i}-state-${l}`:"",Et=d.useCallback(pe=>{U&&V(Ne=>{if(Ne.has(pe)){const Ge=new Set(Ne);return Ge.delete(pe),Ge}if(f==="on")return new Set([pe]);const Be=new Set(Ne);return Be.add(pe),Be})},[U,f]),ct=d.useMemo(()=>Ou(i),[i]),_t={[`--${i}-divider-width`]:y.scalingValue(u,n??!1),[`--${i}-divider-style`]:T,[`--${i}-icon-max-width`]:y.scalingValue(g,n??!1),...p>0?{[`--${i}-question-min-height`]:y.scalingValue(p,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ct}}),a.jsx("div",{style:lt,children:a.jsx("div",{className:Ee(`${i}-wrapper`,n&&!r&&`${i}-editor`,ke,xt),style:{width:y.scalingValue(s,n??!1),maxWidth:"100%",..._t},children:re.map((pe,Ne)=>{var At;const Be=me(Ne),Ge=((At=pe.question)==null?void 0:At.trim())??"",Ct=pe.answer,Vt=((Ct==null?void 0:Ct.length)??0)>0,dt=c&&Ne===ae;return a.jsxs("div",{className:Ee(`${i}-item`,Be&&`${i}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${i}-question-controls`,children:[dt&&a.jsxs(a.Fragment,{children:[a.jsx(Ze,{"data-controls":"questionPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${i}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:G(ye),zIndex:2}}),a.jsx(Ze,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ie),className:`${i}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:G(se),height:"100%",zIndex:2}}),a.jsx(Ze,{"data-controls":"iconPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Y),className:`${i}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:G(q),height:"100%",zIndex:2}})]}),a.jsxs("button",{type:"button",className:`${i}-question-button`,"aria-expanded":Be,style:{...xe,...rt,paddingLeft:G(k),paddingRight:G(C)},onClick:()=>Et(Ne),children:[J>0&&a.jsx("span",{className:`${i}-padding-handle`,style:{height:G(J)},"aria-hidden":"true"}),a.jsxs("span",{className:`${i}-question-row`,children:[a.jsx("span",{className:Ie,children:Ge}),Vt&&(ve?a.jsx("span",{className:`${i}-icon ${i}-icon-custom ${oe}`,"aria-hidden":"true",children:a.jsx(Ht,{url:fe,fill:L,hoverFill:w,className:`${i}-icon-image`})}):a.jsx("span",{className:`${i}-icon ${i}-icon-default ${oe}`,"aria-hidden":"true"}))]}),h>0&&a.jsx("span",{className:`${i}-padding-handle`,style:{height:G(h)},"aria-hidden":"true"})]}),dt&&a.jsx(Ze,{"data-controls":"questionPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${i}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:G(Te),zIndex:2}})]}),Vt&&Ct&&a.jsx("div",{className:`${i}-panel`,"aria-hidden":!Be,children:a.jsx("div",{className:`${i}-panel-inner`,children:a.jsxs("div",{className:`${i}-answer-controls`,children:[dt&&a.jsxs(a.Fragment,{children:[a.jsx(Ze,{"data-controls":"answerPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${i}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:G(_e),zIndex:2}}),a.jsx(Ze,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(I),className:`${i}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:G($e),height:"100%",zIndex:2}}),a.jsx(Ze,{"data-controls":"answerPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(j),className:`${i}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:G(Pe),height:"100%",zIndex:2}})]}),ce>0&&a.jsx("div",{className:`${i}-padding-handle`,style:{height:G(ce)}}),a.jsx("div",{className:`${i}-answer`,style:{...Me,...st,paddingLeft:G(ne),paddingRight:G(he)},children:a.jsx("div",{className:Ve,children:a.jsx(xn,{content:Ct})})}),be>0&&a.jsx("div",{className:`${i}-padding-handle`,style:{height:G(be)}}),dt&&a.jsx(Ze,{"data-controls":"answerPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${i}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:G(O),zIndex:2}})]})})})]},Ne)})})})]})}const Du=`import { useCallback, useEffect, useMemo, useState } from 'react';\r
8846
+ `}function Eo(e,t,n,r,o,l,i,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:r,letterSpacing:o??0,wordSpacing:l??0,textAppearance:i,color:d??"#000000"}}function Du({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o,activeEvent:l}){const{prefix:i}=x.useScopedStyles(),d=o??!1,{wrapperWidth:s=1,cellMinHeight:p=0,dividerWidth:u=694e-6,dividerStyle:w="solid",entryHoverEffect:C="default",autoclose:b="off",icon:m,iconMaxWidth:h=.00833,iconPaddingRight:S=0,iconAnimation:y="rotate 45",questionColor:$="#000000",answerColor:f="#000000",dividerColor:F="#0000001F",iconColor:L="#000000",questionHoverColor:D="#666666",iconHoverColor:v="#666666",iconActiveColor:E="#000000",dividerHoverColor:j="#000000",questionFontFamily:T,questionFontSettings:k,questionFontSize:R,questionLineHeight:N,questionLetterSpacing:q,questionWordSpacing:ie,questionTextAppearance:M,answerFontFamily:W,answerFontSettings:z,answerFontSize:V,answerLineHeight:P,answerLetterSpacing:G,answerWordSpacing:ee,answerTextAppearance:Y,questionPaddingLeft:A=0,questionPaddingTop:ae=0,questionPaddingBottom:g=0,answerPaddingLeft:ne=0,answerPaddingRight:X=0,answerPaddingTop:J=0,answerPaddingBottom:ue=0}=e,Z=t??[],[re,I]=c.useState(()=>new Set),H=!n||r;c.useEffect(()=>{I(new Set)},[b]),c.useEffect(()=>{n&&!o&&!r&&I(new Set)},[n,o,r]);const O=he=>x.scalingValue(he,n??!1),se=Math.max(A,jt),ge=Math.max(ae,jt),Te=Math.max(g,jt),Se=Math.max(ne,jt),Ee=Math.max(X,jt),_e=Math.max(J,jt),B=Math.max(ue,jt),le=Math.max(0,(s??1)-S-h),_=Math.max(0,(s??1)-X),K=Math.max(0,(s??1)-ne),U=Math.max(S,jt),Q=Math.max(0,(s??1)-A-h),de=c.useMemo(()=>re.size===0?0:Math.min(...re),[re]),fe=c.useCallback(he=>re.has(he),[re]),Re=H&&C==="default"?`${i}-entry-hover-default`:"",ve=m??"",be=ve!=="",ke=y.replace(/^rotate /,""),ce=`${i}-icon-anim-${ke}`,xe=yt(et(Eo(T,k,R,N,q,ie,M,$),n)),Me=yt(et(Eo(W,z,V,P,G,ee,Y,f),n)),Ie=To(R,N,`${i}-question`,`${i}-text-tight-leading`),Ve=To(V,P,`${i}-answer-text`,`${i}-text-tight-leading`),rt=Lo(R,N,i,n),st=Lo(V,P,i,n),lt=x.buildColorVars(i,{questionColor:$,answerColor:f,dividerColor:F,iconColor:L,questionHoverColor:D,iconHoverColor:v,iconActiveColor:E,dividerHoverColor:j},Nu,Ou),xt=l&&l!=="default"?`${i}-state-${l}`:"",At=c.useCallback(he=>{H&&I(Ne=>{if(Ne.has(he)){const Ue=new Set(Ne);return Ue.delete(he),Ue}if(b==="on")return new Set([he]);const Oe=new Set(Ne);return Oe.add(he),Oe})},[H,b]),ct=c.useMemo(()=>Vu(i),[i]),Mt={[`--${i}-divider-width`]:x.scalingValue(u,n??!1),[`--${i}-divider-style`]:w,[`--${i}-icon-max-width`]:x.scalingValue(h,n??!1),...p>0?{[`--${i}-question-min-height`]:x.scalingValue(p,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ct}}),a.jsx("div",{style:lt,children:a.jsx("div",{className:Pe(`${i}-wrapper`,n&&!r&&`${i}-editor`,Re,xt),style:{width:x.scalingValue(s,n??!1),maxWidth:"100%",...Mt},children:Z.map((he,Ne)=>{var It;const Oe=fe(Ne),Ue=((It=he.question)==null?void 0:It.trim())??"",Ct=he.answer,Dt=((Ct==null?void 0:Ct.length)??0)>0,dt=d&&Ne===de;return a.jsxs("div",{className:Pe(`${i}-item`,Oe&&`${i}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${i}-question-controls`,children:[dt&&a.jsxs(a.Fragment,{children:[a.jsx(Ze,{"data-controls":"questionPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${i}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:O(ge),zIndex:2}}),a.jsx(Ze,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(le),className:`${i}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:O(se),height:"100%",zIndex:2}}),a.jsx(Ze,{"data-controls":"iconPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Q),className:`${i}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:O(U),height:"100%",zIndex:2}})]}),a.jsxs("button",{type:"button",className:`${i}-question-button`,"aria-expanded":Oe,style:{...xe,...rt,paddingLeft:O(A),paddingRight:O(S)},onClick:()=>At(Ne),children:[ae>0&&a.jsx("span",{className:`${i}-padding-handle`,style:{height:O(ae)},"aria-hidden":"true"}),a.jsxs("span",{className:`${i}-question-row`,children:[a.jsx("span",{className:Ie,children:Ue}),Dt&&(be?a.jsx("span",{className:`${i}-icon ${i}-icon-custom ${ce}`,"aria-hidden":"true",children:a.jsx(Nt,{url:ve,fill:L,hoverFill:v,className:`${i}-icon-image`})}):a.jsx("span",{className:`${i}-icon ${i}-icon-default ${ce}`,"aria-hidden":"true"}))]}),g>0&&a.jsx("span",{className:`${i}-padding-handle`,style:{height:O(g)},"aria-hidden":"true"})]}),dt&&a.jsx(Ze,{"data-controls":"questionPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${i}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:O(Te),zIndex:2}})]}),Dt&&Ct&&a.jsx("div",{className:`${i}-panel`,"aria-hidden":!Oe,children:a.jsx("div",{className:`${i}-panel-inner`,children:a.jsxs("div",{className:`${i}-answer-controls`,children:[dt&&a.jsxs(a.Fragment,{children:[a.jsx(Ze,{"data-controls":"answerPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${i}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:O(_e),zIndex:2}}),a.jsx(Ze,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(_),className:`${i}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:O(Se),height:"100%",zIndex:2}}),a.jsx(Ze,{"data-controls":"answerPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(K),className:`${i}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:O(Ee),height:"100%",zIndex:2}})]}),J>0&&a.jsx("div",{className:`${i}-padding-handle`,style:{height:O(J)}}),a.jsx("div",{className:`${i}-answer`,style:{...Me,...st,paddingLeft:O(ne),paddingRight:O(X)},children:a.jsx("div",{className:Ve,children:a.jsx(xn,{content:Ct})})}),ue>0&&a.jsx("div",{className:`${i}-padding-handle`,style:{height:O(ue)}}),dt&&a.jsx(Ze,{"data-controls":"answerPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${i}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:O(B),zIndex:2}})]})})})]},Ne)})})})]})}const zu=`import { useCallback, useEffect, useMemo, useState } from 'react';\r
8744
8847
  import cn from 'classnames';\r
8745
8848
  import { CommonComponentProps } from '../props';\r
8746
8849
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';\r
@@ -9537,4 +9640,4 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
9537
9640
  </>\r
9538
9641
  );\r
9539
9642
  }\r
9540
- `;function qt(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Eo={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},zu=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],ju={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"icon-switch-control"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:qt("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...Eo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...Eo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:qt("Question Padding Left"),questionPaddingTop:qt("Question Padding Top"),questionPaddingBottom:qt("Question Padding Bottom"),answerPaddingLeft:qt("Answer Padding Left"),answerPaddingRight:qt("Answer Padding Right"),answerPaddingTop:qt("Answer Padding Top"),answerPaddingBottom:qt("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...zu],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},qu={element:Vu,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},schema:ju,sourceCode:Du},Ku=[kl,Ol,Ec,Hc,Uc,od,dd,yd,Rd,Wu,qu];exports.components=Ku;exports.isSchemaV1=wa;
9643
+ `;function qt(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Po={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},ju=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],qu={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"icon-switch-control"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:qt("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...Po.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...Po.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:qt("Question Padding Left"),questionPaddingTop:qt("Question Padding Top"),questionPaddingBottom:qt("Question Padding Bottom"),answerPaddingLeft:qt("Answer Padding Left"),answerPaddingRight:qt("Answer Padding Right"),answerPaddingTop:qt("Answer Padding Top"),answerPaddingBottom:qt("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...ju],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Ku={element:Du,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},schema:qu,sourceCode:zu},Gu=[Rl,Bl,Pc,Hc,Gc,od,dd,yd,Fd,Hu,Ku];exports.components=Gu;exports.isSchemaV1=wa;