@cntrl-site/components 1.0.17-6 → 1.0.17-8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +12 -12
- package/dist/index.mjs +566 -547
- 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"),Re=require("classnames"),y=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Ii=require("react-dom");function La(e){return e.type==="object"&&e.version===1}const Pa="ControlSlider-module__wrapper___sHEkd",Ea="ControlSlider-module__hoverArrow___A-dOH",_a="ControlSlider-module__sliderItem___QQSkR",Aa="ControlSlider-module__sliderImage___9hRl-",Ia="ControlSlider-module__arrow___05ghY",Ra="ControlSlider-module__arrowVertical___tBfVN",ka="ControlSlider-module__nextArrow___-30Yc",Wa="ControlSlider-module__arrowInner___aEra3",Fa="ControlSlider-module__arrowIcon___S4ztF",Ma="ControlSlider-module__arrowImg___2dwJW",Na="ControlSlider-module__mirror___brd6U",Ha="ControlSlider-module__pagination___bicLF",Oa="ControlSlider-module__paginationInner___bT-P-",Ba="ControlSlider-module__paginationVertical___zYqKw",Va="ControlSlider-module__paginationItem___nTRbk",Da="ControlSlider-module__dot___p1Qun",za="ControlSlider-module__activeDot___LHFaj",ja="ControlSlider-module__paginationInsideBottom___R3FWn",qa="ControlSlider-module__paginationInsideTop___V-qb-",Ka="ControlSlider-module__paginationOutsideBottom___14w8D",Ua="ControlSlider-module__paginationOutsideTop___SCLqB",Ga="ControlSlider-module__paginationInsideLeft___yOBRZ",Ya="ControlSlider-module__paginationInsideRight___Rtt3o",Xa="ControlSlider-module__paginationOutsideLeft___lahaw",Qa="ControlSlider-module__paginationOutsideRight___EtuQa",Za="ControlSlider-module__imgWrapper___UjEgB",Ja="ControlSlider-module__captionBlock___dJ6-j",es="ControlSlider-module__captionTextWrapper___HFlpf",ts="ControlSlider-module__captionText___uGBVc",ns="ControlSlider-module__active___WZK4G",rs="ControlSlider-module__withPointerEvents___t-18M",os="ControlSlider-module__topLeftAlignment___zjnGM",is="ControlSlider-module__topCenterAlignment___gD1xW",as="ControlSlider-module__topRightAlignment___NMapS",ss="ControlSlider-module__middleLeftAlignment___OnUrY",ls="ControlSlider-module__middleCenterAlignment___Tdkl0",cs="ControlSlider-module__middleRightAlignment___wEbfX",ds="ControlSlider-module__bottomLeftAlignment___cTP2-",us="ControlSlider-module__bottomCenterAlignment___c54fB",ps="ControlSlider-module__bottomRightAlignment___kEwrz",ms="ControlSlider-module__clickOverlay___DZA28",gs="ControlSlider-module__contain___pLyq7",hs="ControlSlider-module__cover___KdDat",de={wrapper:Pa,hoverArrow:Ea,sliderItem:_a,sliderImage:Aa,arrow:Ia,arrowVertical:Ra,nextArrow:ka,arrowInner:Wa,arrowIcon:Fa,arrowImg:Ma,mirror:Na,pagination:Ha,paginationInner:Oa,paginationVertical:Ba,paginationItem:Va,dot:Da,activeDot:za,paginationInsideBottom:ja,paginationInsideTop:qa,paginationOutsideBottom:Ka,paginationOutsideTop:Ua,paginationInsideLeft:Ga,paginationInsideRight:Ya,paginationOutsideLeft:Xa,paginationOutsideRight:Qa,imgWrapper:Za,captionBlock:Ja,captionTextWrapper:es,captionText:ts,active:ns,withPointerEvents:rs,topLeftAlignment:os,topCenterAlignment:is,topRightAlignment:as,middleLeftAlignment:ss,middleCenterAlignment:ls,middleRightAlignment:cs,bottomLeftAlignment:ds,bottomCenterAlignment:us,bottomRightAlignment:ps,clickOverlay:ms,contain:gs,cover:hs};function fs(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 ys(e,t,n){return t&&fs(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ho="(prefers-reduced-motion: reduce)",fn=1,vs=2,bn=3,Ln=4,jn=5,cr=6,fr=7,bs={CREATED:fn,MOUNTED:vs,IDLE:bn,MOVING:Ln,SCROLLING:jn,DRAGGING:cr,DESTROYED:fr};function Ot(e){e.length=0}function Qt(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ne(e){return e.bind.apply(e,[null].concat(Qt(arguments,1)))}var Ri=setTimeout,Qr=function(){};function Oo(e){return requestAnimationFrame(e)}function Sr(e,t){return typeof t===e}function Wn(e){return!lo(e)&&Sr("object",e)}var so=Array.isArray,ki=Ne(Sr,"function"),Gt=Ne(Sr,"string"),qn=Ne(Sr,"undefined");function lo(e){return e===null}function Wi(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Kn(e){return so(e)?e:[e]}function bt(e,t){Kn(e).forEach(t)}function co(e,t){return e.indexOf(t)>-1}function dr(e,t){return e.push.apply(e,Kn(t)),e}function Wt(e,t,n){e&&bt(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function Tt(e,t){Wt(e,Gt(t)?t.split(" "):t,!0)}function Un(e,t){bt(t,e.appendChild.bind(e))}function uo(e,t){bt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function Fn(e,t){return Wi(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Fi(e,t){var n=e?Qt(e.children):[];return t?n.filter(function(r){return Fn(r,t)}):n}function Gn(e,t){return t?Fi(e,t)[0]:e.firstElementChild}var Mn=Object.keys;function rn(e,t,n){return e&&(n?Mn(e).reverse():Mn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function Nn(e){return Qt(arguments,1).forEach(function(t){rn(t,function(n,r){e[r]=t[r]})}),e}function Ut(e){return Qt(arguments,1).forEach(function(t){rn(t,function(n,r){so(n)?e[r]=n.slice():Wn(n)?e[r]=Ut({},Wn(e[r])?e[r]:{},n):e[r]=n})}),e}function Bo(e,t){bt(t||Mn(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){Wn(t)?rn(t,function(r,i){Ce(e,i,r)}):bt(e,function(r){lo(n)||n===""?Lt(r,t):r.setAttribute(t,String(n))})}function yn(e,t,n){var r=document.createElement(e);return t&&(Gt(t)?Tt(r,t):Ce(r,t)),n&&Un(n,r),r}function St(e,t,n){if(qn(n))return getComputedStyle(e)[t];lo(n)||(e.style[t]=""+n)}function Hn(e,t){St(e,"display",t)}function Mi(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function $t(e,t){return e.getAttribute(t)}function Vo(e,t){return e&&e.classList.contains(t)}function ht(e){return e.getBoundingClientRect()}function on(e){bt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Ni(e){return Gn(new DOMParser().parseFromString(e,"text/html").body)}function kt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Hi(e,t){return e&&e.querySelector(t)}function po(e,t){return t?Qt(e.querySelectorAll(t)):[]}function Ft(e,t){Wt(e,t,!1)}function Zr(e){return e.timeStamp}function en(e){return Gt(e)?e:e?e+"px":""}var Yn="splide",mo="data-"+Yn;function In(e,t){if(!e)throw new Error("["+Yn+"] "+(t||""))}var Yt=Math.min,yr=Math.max,vr=Math.floor,On=Math.ceil,ot=Math.abs;function Oi(e,t,n){return ot(e-t)<n}function ur(e,t,n,r){var i=Yt(t,n),l=yr(t,n);return r?i<e&&e<l:i<=e&&e<=l}function mn(e,t,n){var r=Yt(t,n),i=yr(t,n);return Yt(yr(r,e),i)}function Jr(e){return+(e>0)-+(e<0)}function eo(e,t){return bt(t,function(n){e=e.replace("%s",""+n)}),e}function go(e){return e<10?"0"+e:""+e}var Do={};function xs(e){return""+e+go(Do[e]=(Do[e]||0)+1)}function Bi(){var e=[];function t(o,c,s,p){i(o,c,function(u,T,x){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,x,s,m])})}function n(o,c,s){i(o,c,function(p,u,T){e=e.filter(function(x){return x[0]===p&&x[1]===u&&x[2]===T&&(!s||x[3]===s)?(x[4](),!1):!0})})}function r(o,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)),o.dispatchEvent(p),p}function i(o,c,s){bt(o,function(p){p&&bt(c,function(u){u.split(" ").forEach(function(T){var x=T.split(".");s(p,x[0],x[1])})})})}function l(){e.forEach(function(o){o[4]()}),Ot(e)}return{bind:t,unbind:n,dispatch:r,destroy:l}}var Zt="mounted",to="ready",Bt="move",Pn="moved",ho="click",Vi="active",Di="inactive",zi="visible",ji="hidden",qe="refresh",et="updated",xn="resize",$r="resized",qi="drag",Ki="dragging",Ui="dragged",wr="scroll",sn="scrolled",Cs="overflow",fo="destroy",Gi="arrows:mounted",Yi="arrows:updated",Xi="pagination:mounted",Qi="pagination:updated",yo="navigation:mounted",vo="autoplay:play",Zi="autoplay:playing",bo="autoplay:pause",xo="lazyload:loaded",Ji="sk",ea="sh",br="ei";function Be(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Bi();function r(l,o){n.bind(t,Kn(l).join(" "),function(c){o.apply(o,so(c.detail)?c.detail:[])})}function i(l){n.dispatch(t,l,Qt(arguments,1))}return e&&e.event.on(fo,n.destroy),Nn(n,{bus:t,on:r,off:Ne(n.unbind,t),emit:i})}function Tr(e,t,n,r){var i=Date.now,l,o=0,c,s=!0,p=0;function u(){if(!s){if(o=e?Yt((i()-l)/e,1):1,n&&n(o),o>=1&&(t(),l=i(),r&&++p>=r))return x();c=Oo(u)}}function T(w){w||m(),l=i()-(w?o*e:0),s=!1,c=Oo(u)}function x(){s=!0}function f(){l=i(),o=0,n&&n(o)}function m(){c&&cancelAnimationFrame(c),o=0,c=0,s=!0}function g(w){e=w}function C(){return s}return{start:T,rewind:f,pause:x,cancel:m,set:g,isPaused:C}}function Ss(e){var t=e;function n(i){t=i}function r(i){return co(Kn(i),t)}return{set:n,is:r}}function $s(e,t){var n=Tr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ws(e,t,n){var r=e.state,i=n.breakpoints||{},l=n.reducedMotion||{},o=Bi(),c=[];function s(){var m=n.mediaQuery==="min";Mn(i).sort(function(g,C){return m?+g-+C:+C-+g}).forEach(function(g){u(i[g],"("+(m?"min":"max")+"-width:"+g+"px)")}),u(l,Ho),T()}function p(m){m&&o.destroy()}function u(m,g){var C=matchMedia(g);o.bind(C,"change",T),c.push([m,C])}function T(){var m=r.is(fr),g=n.direction,C=c.reduce(function(w,S){return Ut(w,S[1].matches?S[0]:{})},{});Bo(n),f(C),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):g!==n.direction&&e.refresh()}function x(m){matchMedia(Ho).matches&&(m?Ut(n,l):Bo(n,Mn(l)))}function f(m,g,C){Ut(n,m),g&&Ut(Object.getPrototypeOf(n),m),(C||!r.is(fn))&&e.emit(et,n)}return{setup:s,destroy:p,reduce:x,set:f}}var Lr="Arrow",Pr=Lr+"Left",Er=Lr+"Right",ta=Lr+"Up",na=Lr+"Down",zo="rtl",_r="ttb",Hr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[ta,Er],ArrowRight:[na,Pr]};function Ts(e,t,n){function r(l,o,c){c=c||n.direction;var s=c===zo&&!o?1:c===_r?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 i(l){return l*(n.direction===zo?1:-1)}return{resolve:r,orient:i}}var Mt="role",vn="tabindex",Ls="disabled",wt="aria-",Xn=wt+"controls",ra=wt+"current",jo=wt+"selected",ft=wt+"label",Co=wt+"labelledby",oa=wt+"hidden",So=wt+"orientation",Bn=wt+"roledescription",qo=wt+"live",Ko=wt+"busy",Uo=wt+"atomic",$o=[Mt,vn,Ls,Xn,ra,ft,Co,oa,So,Bn],Pt=Yn+"__",Jt="is-",Or=Yn,Go=Pt+"track",Ps=Pt+"list",Ar=Pt+"slide",ia=Ar+"--clone",Es=Ar+"__container",wo=Pt+"arrows",Ir=Pt+"arrow",aa=Ir+"--prev",sa=Ir+"--next",Rr=Pt+"pagination",la=Rr+"__page",_s=Pt+"progress",As=_s+"__bar",Is=Pt+"toggle",Rs=Pt+"spinner",ks=Pt+"sr",Ws=Jt+"initialized",an=Jt+"active",ca=Jt+"prev",da=Jt+"next",no=Jt+"visible",ro=Jt+"loading",ua=Jt+"focus-in",pa=Jt+"overflow",Fs=[an,no,ca,da,ro,ua,pa],Ms={slide:Ar,clone:ia,arrows:wo,arrow:Ir,prev:aa,next:sa,pagination:Rr,page:la,spinner:Rs};function Ns(e,t){if(ki(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Fn(n,t);)n=n.parentElement;return n}var Hs=5,Yo=200,ma="touchstart mousedown",Br="touchmove mousemove",Vr="touchend touchcancel mouseup click";function Os(e,t,n){var r=Be(e),i=r.on,l=r.bind,o=e.root,c=n.i18n,s={},p=[],u=[],T=[],x,f,m;function g(){v(),M(),S()}function C(){i(qe,w),i(qe,g),i(et,S),l(document,ma+" keydown",function(b){m=b.type==="keydown"},{capture:!0}),l(o,"focusin",function(){Wt(o,ua,!!m)})}function w(b){var P=$o.concat("style");Ot(p),Ft(o,u),Ft(x,T),Lt([x,f],P),Lt(o,b?P:["style",Bn])}function S(){Ft(o,u),Ft(x,T),u=N(Or),T=N(Go),Tt(o,u),Tt(x,T),Ce(o,ft,n.label),Ce(o,Co,n.labelledby)}function v(){x=L("."+Go),f=Gn(x,"."+Ps),In(x&&f,"A track/list element is missing."),dr(p,Fi(f,"."+Ar+":not(."+ia+")")),rn({arrows:wo,pagination:Rr,prev:aa,next:sa,bar:As,toggle:Is},function(b,P){s[P]=L("."+b)}),Nn(s,{root:o,track:x,list:f,slides:p})}function M(){var b=o.id||xs(Yn),P=n.role;o.id=b,x.id=x.id||b+"-track",f.id=f.id||b+"-list",!$t(o,Mt)&&o.tagName!=="SECTION"&&P&&Ce(o,Mt,P),Ce(o,Bn,c.carousel),Ce(f,Mt,"presentation")}function L(b){var P=Hi(o,b);return P&&Ns(P,"."+Or)===o?P:void 0}function N(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===Or&&an]}return Nn(s,{setup:g,mount:C,destroy:w})}var Cn="slide",En="loop",Qn="fade";function Bs(e,t,n,r){var i=Be(e),l=i.on,o=i.emit,c=i.bind,s=e.Components,p=e.root,u=e.options,T=u.isNavigation,x=u.updateOnMove,f=u.i18n,m=u.pagination,g=u.slideFocus,C=s.Direction.resolve,w=$t(r,"style"),S=$t(r,ft),v=n>-1,M=Gn(r,"."+Es),L;function N(){v||(r.id=p.id+"-slide"+go(t+1),Ce(r,Mt,m?"tabpanel":"group"),Ce(r,Bn,f.slide),Ce(r,ft,S||eo(f.slideLabel,[t+1,e.length]))),b()}function b(){c(r,"click",Ne(o,ho,D)),c(r,"keydown",Ne(o,Ji,D)),l([Pn,ea,sn],E),l(yo,B),x&&l(Bt,$)}function P(){L=!0,i.destroy(),Ft(r,Fs),Lt(r,$o),Ce(r,"style",w),Ce(r,ft,S||"")}function B(){var H=e.splides.map(function(I){var K=I.splide.Components.Slides.getAt(t);return K?K.slide.id:""}).join(" ");Ce(r,ft,eo(f.slideX,(v?n:t)+1)),Ce(r,Xn,H),Ce(r,Mt,g?"button":""),g&&Lt(r,Bn)}function $(){L||E()}function E(){if(!L){var H=e.index;A(),W(),Wt(r,ca,t===H-1),Wt(r,da,t===H+1)}}function A(){var H=te();H!==Vo(r,an)&&(Wt(r,an,H),Ce(r,ra,T&&H||""),o(H?Vi:Di,D))}function W(){var H=k(),I=!H&&(!te()||v);if(e.state.is([Ln,jn])||Ce(r,oa,I||""),Ce(po(r,u.focusableNodes||""),vn,I?-1:""),g&&Ce(r,vn,I?-1:0),H!==Vo(r,no)&&(Wt(r,no,H),o(H?zi:ji,D)),!H&&document.activeElement===r){var K=s.Slides.getAt(e.index);K&&Mi(K.slide)}}function j(H,I,K){St(K&&M||r,H,I)}function te(){var H=e.index;return H===t||u.cloneStatus&&H===n}function k(){if(e.is(Qn))return te();var H=ht(s.Elements.track),I=ht(r),K=C("left",!0),Q=C("right",!0);return vr(H[K])<=On(I[K])&&vr(I[Q])<=On(H[Q])}function F(H,I){var K=ot(H-t);return!v&&(u.rewind||e.is(En))&&(K=Yt(K,e.length-K)),K<=I}var D={index:t,slideIndex:n,slide:r,container:M,isClone:v,mount:N,destroy:P,update:E,style:j,isWithin:F};return D}function Vs(e,t,n){var r=Be(e),i=r.on,l=r.emit,o=r.bind,c=t.Elements,s=c.slides,p=c.list,u=[];function T(){x(),i(qe,f),i(qe,x)}function x(){s.forEach(function(E,A){g(E,A,-1)})}function f(){L(function(E){E.destroy()}),Ot(u)}function m(){L(function(E){E.update()})}function g(E,A,W){var j=Bs(e,A,W,E);j.mount(),u.push(j),u.sort(function(te,k){return te.index-k.index})}function C(E){return E?N(function(A){return!A.isClone}):u}function w(E){var A=t.Controller,W=A.toIndex(E),j=A.hasFocus()?1:n.perPage;return N(function(te){return ur(te.index,W,W+j-1)})}function S(E){return N(E)[0]}function v(E,A){bt(E,function(W){if(Gt(W)&&(W=Ni(W)),Wi(W)){var j=s[A];j?uo(W,j):Un(p,W),Tt(W,n.classes.slide),P(W,Ne(l,xn))}}),l(qe)}function M(E){on(N(E).map(function(A){return A.slide})),l(qe)}function L(E,A){C(A).forEach(E)}function N(E){return u.filter(ki(E)?E:function(A){return Gt(E)?Fn(A.slide,E):co(Kn(E),A.index)})}function b(E,A,W){L(function(j){j.style(E,A,W)})}function P(E,A){var W=po(E,"img"),j=W.length;j?W.forEach(function(te){o(te,"load error",function(){--j||A()})}):A()}function B(E){return E?s.length:u.length}function $(){return u.length>n.perPage}return{mount:T,destroy:f,update:m,register:g,get:C,getIn:w,getAt:S,add:v,remove:M,forEach:L,filter:N,style:b,getLength:B,isEnough:$}}function Ds(e,t,n){var r=Be(e),i=r.on,l=r.bind,o=r.emit,c=t.Slides,s=t.Direction.resolve,p=t.Elements,u=p.root,T=p.track,x=p.list,f=c.getAt,m=c.style,g,C,w;function S(){v(),l(window,"resize load",$s(Ne(o,xn))),i([et,qe],v),i(xn,M)}function v(){g=n.direction===_r,St(u,"maxWidth",en(n.width)),St(T,s("paddingLeft"),L(!1)),St(T,s("paddingRight"),L(!0)),M(!0)}function M(D){var H=ht(u);(D||C.width!==H.width||C.height!==H.height)&&(St(T,"height",N()),m(s("marginRight"),en(n.gap)),m("width",P()),m("height",B(),!0),C=H,o($r),w!==(w=F())&&(Wt(u,pa,w),o(Cs,w)))}function L(D){var H=n.padding,I=s(D?"right":"left");return H&&en(H[I]||(Wn(H)?0:H))||"0px"}function N(){var D="";return g&&(D=b(),In(D,"height or heightRatio is missing."),D="calc("+D+" - "+L(!1)+" - "+L(!0)+")"),D}function b(){return en(n.height||ht(x).width*n.heightRatio)}function P(){return n.autoWidth?null:en(n.fixedWidth)||(g?"":$())}function B(){return en(n.fixedHeight)||(g?n.autoHeight?null:$():b())}function $(){var D=en(n.gap);return"calc((100%"+(D&&" + "+D)+")/"+(n.perPage||1)+(D&&" - "+D)+")"}function E(){return ht(x)[s("width")]}function A(D,H){var I=f(D||0);return I?ht(I.slide)[s("width")]+(H?0:te()):0}function W(D,H){var I=f(D);if(I){var K=ht(I.slide)[s("right")],Q=ht(x)[s("left")];return ot(K-Q)+(H?0:te())}return 0}function j(D){return W(e.length-1)-W(0)+A(0,D)}function te(){var D=f(0);return D&&parseFloat(St(D.slide,s("marginRight")))||0}function k(D){return parseFloat(St(T,s("padding"+(D?"Right":"Left"))))||0}function F(){return e.is(Qn)||j(!0)>E()}return{mount:S,resize:M,listSize:E,slideSize:A,sliderSize:j,totalSize:W,getPadding:k,isOverflow:F}}var zs=2;function js(e,t,n){var r=Be(e),i=r.on,l=t.Elements,o=t.Slides,c=t.Direction.resolve,s=[],p;function u(){i(qe,T),i([et,xn],f),(p=C())&&(m(p),t.Layout.resize(!0))}function T(){x(),u()}function x(){on(s),Ot(s),r.destroy()}function f(){var w=C();p!==w&&(p<w||!w)&&r.emit(qe)}function m(w){var S=o.get().slice(),v=S.length;if(v){for(;S.length<w;)dr(S,S);dr(S.slice(-w),S.slice(0,w)).forEach(function(M,L){var N=L<w,b=g(M.slide,L);N?uo(b,S[0].slide):Un(l.list,b),dr(s,b),o.register(b,L-w+(N?0:v),M.index)})}}function g(w,S){var v=w.cloneNode(!0);return Tt(v,n.classes.clone),v.id=e.root.id+"-clone"+go(S+1),v}function C(){var w=n.clones;if(!e.is(En))w=0;else if(qn(w)){var S=n[c("fixedWidth")]&&t.Layout.slideSize(0),v=S&&On(ht(l.track)[c("width")]/S);w=v||n[c("autoWidth")]&&e.length||n.perPage*zs}return w}return{mount:u,destroy:x}}function qs(e,t,n){var r=Be(e),i=r.on,l=r.emit,o=e.state.set,c=t.Layout,s=c.slideSize,p=c.getPadding,u=c.totalSize,T=c.listSize,x=c.sliderSize,f=t.Direction,m=f.resolve,g=f.orient,C=t.Elements,w=C.list,S=C.track,v;function M(){v=t.Transition,i([Zt,$r,et,qe],L)}function L(){t.Controller.isBusy()||(t.Scroll.cancel(),b(e.index),t.Slides.update())}function N(I,K,Q,Z){I!==K&&D(I>Q)&&(E(),P($(j(),I>Q),!0)),o(Ln),l(Bt,K,Q,I),v.start(K,function(){o(bn),l(Pn,K,Q,I),Z&&Z()})}function b(I){P(W(I,!0))}function P(I,K){if(!e.is(Qn)){var Q=K?I:B(I);St(w,"transform","translate"+m("X")+"("+Q+"px)"),I!==Q&&l(ea)}}function B(I){if(e.is(En)){var K=A(I),Q=K>t.Controller.getEnd(),Z=K<0;(Z||Q)&&(I=$(I,Q))}return I}function $(I,K){var Q=I-F(K),Z=x();return I-=g(Z*(On(ot(Q)/Z)||1))*(K?1:-1),I}function E(){P(j(),!0),v.cancel()}function A(I){for(var K=t.Slides.get(),Q=0,Z=1/0,R=0;R<K.length;R++){var ne=K[R].index,h=ot(W(ne,!0)-I);if(h<=Z)Z=h,Q=ne;else break}return Q}function W(I,K){var Q=g(u(I-1)-k(I));return K?te(Q):Q}function j(){var I=m("left");return ht(w)[I]-ht(S)[I]+g(p(!1))}function te(I){return n.trimSpace&&e.is(Cn)&&(I=mn(I,0,g(x(!0)-T()))),I}function k(I){var K=n.focus;return K==="center"?(T()-s(I,!0))/2:+K*s(I)||0}function F(I){return W(I?t.Controller.getEnd():0,!!n.trimSpace)}function D(I){var K=g($(j(),I));return I?K>=0:K<=w[m("scrollWidth")]-ht(S)[m("width")]}function H(I,K){K=qn(K)?j():K;var Q=I!==!0&&g(K)<g(F(!1)),Z=I!==!1&&g(K)>g(F(!0));return Q||Z}return{mount:M,move:N,jump:b,translate:P,shift:$,cancel:E,toIndex:A,toPosition:W,getPosition:j,getLimit:F,exceededLimit:H,reposition:L}}function Ks(e,t,n){var r=Be(e),i=r.on,l=r.emit,o=t.Move,c=o.getPosition,s=o.getLimit,p=o.toPosition,u=t.Slides,T=u.isEnough,x=u.getLength,f=n.omitEnd,m=e.is(En),g=e.is(Cn),C=Ne(j,!1),w=Ne(j,!0),S=n.start||0,v,M=S,L,N,b;function P(){B(),i([et,qe,br],B),i($r,$)}function B(){L=x(!0),N=n.perMove,b=n.perPage,v=D();var h=mn(S,0,f?v:L-1);h!==S&&(S=h,o.reposition())}function $(){v!==D()&&l(br)}function E(h,ee,ge){if(!ne()){var le=W(h),be=F(le);be>-1&&(ee||be!==S)&&(Q(be),o.move(le,be,M,ge))}}function A(h,ee,ge,le){t.Scroll.scroll(h,ee,ge,function(){var be=F(o.toIndex(c()));Q(f?Yt(be,v):be),le&&le()})}function W(h){var ee=S;if(Gt(h)){var ge=h.match(/([+\-<>])(\d+)?/)||[],le=ge[1],be=ge[2];le==="+"||le==="-"?ee=te(S+ +(""+le+(+be||1)),S):le===">"?ee=be?H(+be):C(!0):le==="<"&&(ee=w(!0))}else ee=m?h:mn(h,0,v);return ee}function j(h,ee){var ge=N||(R()?1:b),le=te(S+ge*(h?-1:1),S,!(N||R()));return le===-1&&g&&!Oi(c(),s(!h),1)?h?0:v:ee?le:F(le)}function te(h,ee,ge){if(T()||R()){var le=k(h);le!==h&&(ee=h,h=le,ge=!1),h<0||h>v?!N&&(ur(0,h,ee,!0)||ur(v,ee,h,!0))?h=H(I(h)):m?h=ge?h<0?-(L%b||b):L:h:n.rewind?h=h<0?v:0:h=-1:ge&&h!==ee&&(h=H(I(ee)+(h<ee?-1:1)))}else h=-1;return h}function k(h){if(g&&n.trimSpace==="move"&&h!==S)for(var ee=c();ee===p(h,!0)&&ur(h,0,e.length-1,!n.rewind);)h<S?--h:++h;return h}function F(h){return m?(h+L)%L||0:h}function D(){for(var h=L-(R()||m&&N?1:b);f&&h-- >0;)if(p(L-1,!0)!==p(h,!0)){h++;break}return mn(h,0,L-1)}function H(h){return mn(R()?h:b*h,0,v)}function I(h){return R()?Yt(h,v):vr((h>=v?L-1:h)/b)}function K(h){var ee=o.toIndex(h);return g?mn(ee,0,v):ee}function Q(h){h!==S&&(M=S,S=h)}function Z(h){return h?M:S}function R(){return!qn(n.focus)||n.isNavigation}function ne(){return e.state.is([Ln,jn])&&!!n.waitForTransition}return{mount:P,go:E,scroll:A,getNext:C,getPrev:w,getAdjacent:j,getEnd:D,setIndex:Q,getIndex:Z,toIndex:H,toPage:I,toDest:K,hasFocus:R,isBusy:ne}}var Us="http://www.w3.org/2000/svg",Gs="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",nr=40;function Ys(e,t,n){var r=Be(e),i=r.on,l=r.bind,o=r.emit,c=n.classes,s=n.i18n,p=t.Elements,u=t.Controller,T=p.arrows,x=p.track,f=T,m=p.prev,g=p.next,C,w,S={};function v(){L(),i(et,M)}function M(){N(),v()}function L(){var A=n.arrows;A&&!(m&&g)&&B(),m&&g&&(Nn(S,{prev:m,next:g}),Hn(f,A?"":"none"),Tt(f,w=wo+"--"+n.direction),A&&(b(),E(),Ce([m,g],Xn,x.id),o(Gi,m,g)))}function N(){r.destroy(),Ft(f,w),C?(on(T?[m,g]:f),m=g=null):Lt([m,g],$o)}function b(){i([Zt,Pn,qe,sn,br],E),l(g,"click",Ne(P,">")),l(m,"click",Ne(P,"<"))}function P(A){u.go(A,!0)}function B(){f=T||yn("div",c.arrows),m=$(!0),g=$(!1),C=!0,Un(f,[m,g]),!T&&uo(f,x)}function $(A){var W='<button class="'+c.arrow+" "+(A?c.prev:c.next)+'" type="button"><svg xmlns="'+Us+'" viewBox="0 0 '+nr+" "+nr+'" width="'+nr+'" height="'+nr+'" focusable="false"><path d="'+(n.arrowPath||Gs)+'" />';return Ni(W)}function E(){if(m&&g){var A=e.index,W=u.getPrev(),j=u.getNext(),te=W>-1&&A<W?s.last:s.prev,k=j>-1&&A>j?s.first:s.next;m.disabled=W<0,g.disabled=j<0,Ce(m,ft,te),Ce(g,ft,k),o(Yi,m,g,W,j)}}return{arrows:S,mount:v,destroy:N,update:E}}var Xs=mo+"-interval";function Qs(e,t,n){var r=Be(e),i=r.on,l=r.bind,o=r.emit,c=Tr(n.interval,e.go.bind(e,">"),b),s=c.isPaused,p=t.Elements,u=t.Elements,T=u.root,x=u.toggle,f=n.autoplay,m,g,C=f==="pause";function w(){f&&(S(),x&&Ce(x,Xn,p.track.id),C||v(),N())}function S(){n.pauseOnHover&&l(T,"mouseenter mouseleave",function(B){m=B.type==="mouseenter",L()}),n.pauseOnFocus&&l(T,"focusin focusout",function(B){g=B.type==="focusin",L()}),x&&l(x,"click",function(){C?v():M(!0)}),i([Bt,wr,qe],c.rewind),i(Bt,P)}function v(){s()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),g=m=C=!1,N(),o(vo))}function M(B){B===void 0&&(B=!0),C=!!B,N(),s()||(c.pause(),o(bo))}function L(){C||(m||g?M(!1):v())}function N(){x&&(Wt(x,an,!C),Ce(x,ft,n.i18n[C?"play":"pause"]))}function b(B){var $=p.bar;$&&St($,"width",B*100+"%"),o(Zi,B)}function P(B){var $=t.Slides.getAt(B);c.set($&&+$t($.slide,Xs)||n.interval)}return{mount:w,destroy:c.cancel,play:v,pause:M,isPaused:s}}function Zs(e,t,n){var r=Be(e),i=r.on;function l(){n.cover&&(i(xo,Ne(c,!0)),i([Zt,et,qe],Ne(o,!0)))}function o(s){t.Slides.forEach(function(p){var u=Gn(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:Ne(o,!1)}}var Js=10,el=600,tl=.6,nl=1.5,rl=800;function ol(e,t,n){var r=Be(e),i=r.on,l=r.emit,o=e.state.set,c=t.Move,s=c.getPosition,p=c.getLimit,u=c.exceededLimit,T=c.translate,x=e.is(Cn),f,m,g=1;function C(){i(Bt,M),i([et,qe],L)}function w(b,P,B,$,E){var A=s();if(M(),B&&(!x||!u())){var W=t.Layout.sliderSize(),j=Jr(b)*W*vr(ot(b)/W)||0;b=c.toPosition(t.Controller.toDest(b%W))+j}var te=Oi(A,b,1);g=1,P=te?0:P||yr(ot(b-A)/nl,rl),m=$,f=Tr(P,S,Ne(v,A,b,E),1),o(jn),l(wr),f.start()}function S(){o(bn),m&&m(),l(sn)}function v(b,P,B,$){var E=s(),A=b+(P-b)*N($),W=(A-E)*g;T(E+W),x&&!B&&u()&&(g*=tl,ot(W)<Js&&w(p(u(!0)),el,!1,m,!0))}function M(){f&&f.cancel()}function L(){f&&!f.isPaused()&&(M(),S())}function N(b){var P=n.easingFunc;return P?P(b):1-Math.pow(1-b,4)}return{mount:C,destroy:M,scroll:w,cancel:L}}var gn={passive:!1,capture:!0};function il(e,t,n){var r=Be(e),i=r.on,l=r.emit,o=r.bind,c=r.unbind,s=e.state,p=t.Move,u=t.Scroll,T=t.Controller,x=t.Elements.track,f=t.Media.reduce,m=t.Direction,g=m.resolve,C=m.orient,w=p.getPosition,S=p.exceededLimit,v,M,L,N,b,P=!1,B,$,E;function A(){o(x,Br,Qr,gn),o(x,Vr,Qr,gn),o(x,ma,j,gn),o(x,"click",F,{capture:!0}),o(x,"dragstart",kt),i([Zt,et],W)}function W(){var V=n.drag;ce(!V),N=V==="free"}function j(V){if(B=!1,!$){var U=be(V);le(V.target)&&(U||!V.button)&&(T.isBusy()?kt(V,!0):(E=U?x:window,b=s.is([Ln,jn]),L=null,o(E,Br,te,gn),o(E,Vr,k,gn),p.cancel(),u.cancel(),D(V)))}}function te(V){if(s.is(cr)||(s.set(cr),l(qi)),V.cancelable)if(b){p.translate(v+ge(R(V)));var U=ne(V)>Yo,G=P!==(P=S());(U||G)&&D(V),B=!0,l(Ki),kt(V)}else K(V)&&(b=I(V),kt(V))}function k(V){s.is(cr)&&(s.set(bn),l(Ui)),b&&(H(V),kt(V)),c(E,Br,te),c(E,Vr,k),b=!1}function F(V){!$&&B&&kt(V,!0)}function D(V){L=M,M=V,v=w()}function H(V){var U=Q(V),G=Z(U),se=n.rewind&&n.rewindByDrag;f(!1),N?T.scroll(G,0,n.snap):e.is(Qn)?T.go(C(Jr(U))<0?se?"<":"-":se?">":"+"):e.is(Cn)&&P&&se?T.go(S(!0)?">":"<"):T.go(T.toDest(G),!0),f(!0)}function I(V){var U=n.dragMinThreshold,G=Wn(U),se=G&&U.mouse||0,ye=(G?U.touch:+U)||10;return ot(R(V))>(be(V)?ye:se)}function K(V){return ot(R(V))>ot(R(V,!0))}function Q(V){if(e.is(En)||!P){var U=ne(V);if(U&&U<Yo)return R(V)/U}return 0}function Z(V){return w()+Jr(V)*Yt(ot(V)*(n.flickPower||600),N?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function R(V,U){return ee(V,U)-ee(h(V),U)}function ne(V){return Zr(V)-Zr(h(V))}function h(V){return M===V&&L||M}function ee(V,U){return(be(V)?V.changedTouches[0]:V)["page"+g(U?"Y":"X")]}function ge(V){return V/(P&&e.is(Cn)?Hs:1)}function le(V){var U=n.noDrag;return!Fn(V,"."+la+", ."+Ir)&&(!U||!Fn(V,U))}function be(V){return typeof TouchEvent<"u"&&V instanceof TouchEvent}function re(){return b}function ce(V){$=V}return{mount:A,disable:ce,isDragging:re}}var al={Spacebar:" ",Right:Er,Left:Pr,Up:ta,Down:na};function To(e){return e=Gt(e)?e:e.key,al[e]||e}var Xo="keydown";function sl(e,t,n){var r=Be(e),i=r.on,l=r.bind,o=r.unbind,c=e.root,s=t.Direction.resolve,p,u;function T(){x(),i(et,f),i(et,x),i(Bt,g)}function x(){var w=n.keyboard;w&&(p=w==="global"?window:c,l(p,Xo,C))}function f(){o(p,Xo)}function m(w){u=w}function g(){var w=u;u=!0,Ri(function(){u=w})}function C(w){if(!u){var S=To(w);S===s(Pr)?e.go("<"):S===s(Er)&&e.go(">")}}return{mount:T,destroy:f,disable:m}}var Rn=mo+"-lazy",pr=Rn+"-srcset",ll="["+Rn+"], ["+pr+"]";function cl(e,t,n){var r=Be(e),i=r.on,l=r.off,o=r.bind,c=r.emit,s=n.lazyLoad==="sequential",p=[Pn,sn],u=[];function T(){n.lazyLoad&&(x(),i(qe,x))}function x(){Ot(u),f(),s?w():(l(p),i(p,m),m())}function f(){t.Slides.forEach(function(S){po(S.slide,ll).forEach(function(v){var M=$t(v,Rn),L=$t(v,pr);if(M!==v.src||L!==v.srcset){var N=n.classes.spinner,b=v.parentElement,P=Gn(b,"."+N)||yn("span",N,b);u.push([v,S,P]),v.src||Hn(v,"none")}})})}function m(){u=u.filter(function(S){var v=n.perPage*((n.preloadPages||1)+1)-1;return S[1].isWithin(e.index,v)?g(S):!0}),u.length||l(p)}function g(S){var v=S[0];Tt(S[1].slide,ro),o(v,"load error",Ne(C,S)),Ce(v,"src",$t(v,Rn)),Ce(v,"srcset",$t(v,pr)),Lt(v,Rn),Lt(v,pr)}function C(S,v){var M=S[0],L=S[1];Ft(L.slide,ro),v.type!=="error"&&(on(S[2]),Hn(M,""),c(xo,M,L),c(xn)),s&&w()}function w(){u.length&&g(u.shift())}return{mount:T,destroy:Ne(Ot,u),check:m}}function dl(e,t,n){var r=Be(e),i=r.on,l=r.emit,o=r.bind,c=t.Slides,s=t.Elements,p=t.Controller,u=p.hasFocus,T=p.getIndex,x=p.go,f=t.Direction.resolve,m=s.pagination,g=[],C,w;function S(){v(),i([et,qe,br],S);var $=n.pagination;m&&Hn(m,$?"":"none"),$&&(i([Bt,wr,sn],B),M(),B(),l(Xi,{list:C,items:g},P(e.index)))}function v(){C&&(on(m?Qt(C.children):C),Ft(C,w),Ot(g),C=null),r.destroy()}function M(){var $=e.length,E=n.classes,A=n.i18n,W=n.perPage,j=u()?p.getEnd()+1:On($/W);C=m||yn("ul",E.pagination,s.track.parentElement),Tt(C,w=Rr+"--"+b()),Ce(C,Mt,"tablist"),Ce(C,ft,A.select),Ce(C,So,b()===_r?"vertical":"");for(var te=0;te<j;te++){var k=yn("li",null,C),F=yn("button",{class:E.page,type:"button"},k),D=c.getIn(te).map(function(I){return I.slide.id}),H=!u()&&W>1?A.pageX:A.slideX;o(F,"click",Ne(L,te)),n.paginationKeyboard&&o(F,"keydown",Ne(N,te)),Ce(k,Mt,"presentation"),Ce(F,Mt,"tab"),Ce(F,Xn,D.join(" ")),Ce(F,ft,eo(H,te+1)),Ce(F,vn,-1),g.push({li:k,button:F,page:te})}}function L($){x(">"+$,!0)}function N($,E){var A=g.length,W=To(E),j=b(),te=-1;W===f(Er,!1,j)?te=++$%A:W===f(Pr,!1,j)?te=(--$+A)%A:W==="Home"?te=0:W==="End"&&(te=A-1);var k=g[te];k&&(Mi(k.button),x(">"+te),kt(E,!0))}function b(){return n.paginationDirection||n.direction}function P($){return g[p.toPage($)]}function B(){var $=P(T(!0)),E=P(T());if($){var A=$.button;Ft(A,an),Lt(A,jo),Ce(A,vn,-1)}if(E){var W=E.button;Tt(W,an),Ce(W,jo,!0),Ce(W,vn,"")}l(Qi,{list:C,items:g},$,E)}return{items:g,mount:S,destroy:v,getAt:P,update:B}}var ul=[" ","Enter"];function pl(e,t,n){var r=n.isNavigation,i=n.slideFocus,l=[];function o(){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()}),Ot(l)}function s(){c(),o()}function p(m,g){var C=Be(m);C.on(Bt,function(w,S,v){g.go(g.is(En)?v:w)}),l.push(C)}function u(){var m=Be(e),g=m.on;g(ho,x),g(Ji,f),g([Zt,et],T),l.push(m),m.emit(yo,e.splides)}function T(){Ce(t.Elements.list,So,n.direction===_r?"vertical":"")}function x(m){e.go(m.index)}function f(m,g){co(ul,To(g))&&(x(m),kt(g))}return{setup:Ne(t.Media.set,{slideFocus:qn(i)?r:i},!0),mount:o,destroy:c,remount:s}}function ml(e,t,n){var r=Be(e),i=r.bind,l=0;function o(){n.wheel&&i(t.Elements.track,"wheel",c,gn)}function c(p){if(p.cancelable){var u=p.deltaY,T=u<0,x=Zr(p),f=n.wheelMinThreshold||0,m=n.wheelSleep||0;ot(u)>f&&x-l>m&&(e.go(T?"<":">"),l=x),s(T)&&kt(p)}}function s(p){return!n.releaseWheel||e.state.is(Ln)||t.Controller.getAdjacent(p)!==-1}return{mount:o}}var gl=90;function hl(e,t,n){var r=Be(e),i=r.on,l=t.Elements.track,o=n.live&&!n.isNavigation,c=yn("span",ks),s=Tr(gl,Ne(u,!1));function p(){o&&(x(!t.Autoplay.isPaused()),Ce(l,Uo,!0),c.textContent="…",i(vo,Ne(x,!0)),i(bo,Ne(x,!1)),i([Pn,sn],Ne(u,!0)))}function u(f){Ce(l,Ko,f),f?(Un(l,c),s.start()):(on(c),s.cancel())}function T(){Lt(l,[qo,Uo,Ko]),on(c)}function x(f){o&&Ce(l,qo,f?"off":"polite")}return{mount:p,disable:x,destroy:T}}var fl=Object.freeze({__proto__:null,Media:ws,Direction:Ts,Elements:Os,Slides:Vs,Layout:Ds,Clones:js,Move:qs,Controller:Ks,Arrows:Ys,Autoplay:Qs,Cover:Zs,Scroll:ol,Drag:il,Keyboard:sl,LazyLoad:cl,Pagination:dl,Sync:pl,Wheel:ml,Live:hl}),yl={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"},vl={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:Ms,i18n:yl,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function bl(e,t,n){var r=t.Slides;function i(){Be(e).on([Zt,qe],l)}function l(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function o(c,s){r.style("transition","opacity "+n.speed+"ms "+n.easing),Ri(s)}return{mount:i,start:o,cancel:Qr}}function xl(e,t,n){var r=t.Move,i=t.Controller,l=t.Scroll,o=t.Elements.list,c=Ne(St,o,"transition"),s;function p(){Be(e).bind(o,"transitionend",function(f){f.target===o&&s&&(T(),s())})}function u(f,m){var g=r.toPosition(f,!0),C=r.getPosition(),w=x(f);ot(g-C)>=1&&w>=1?n.useScroll?l.scroll(g,w,!1,m):(c("transform "+w+"ms "+n.easing),r.translate(g,!0),s=m):(r.jump(f),m())}function T(){c(""),l.cancel()}function x(f){var m=n.rewindSpeed;if(e.is(Cn)&&m){var g=i.getIndex(!0),C=i.getEnd();if(g===0&&f>=C||g>=C&&f===0)return m}return n.speed}return{mount:p,start:u,cancel:T}}var Cl=(function(){function e(n,r){this.event=Be(),this.Components={},this.state=Ss(fn),this.splides=[],this._o={},this._E={};var i=Gt(n)?Hi(document,n):n;In(i,i+" is invalid."),this.root=i,r=Ut({label:$t(i,ft)||"",labelledby:$t(i,Co)||""},vl,e.defaults,r||{});try{Ut(r,JSON.parse($t(i,mo)))}catch{In(!1,"Invalid JSON")}this._o=Object.create(Ut({},r))}var t=e.prototype;return t.mount=function(r,i){var l=this,o=this.state,c=this.Components;In(o.is([fn,fr]),"Already mounted!"),o.set(fn),this._C=c,this._T=i||this._T||(this.is(Qn)?bl:xl),this._E=r||this._E;var s=Nn({},fl,this._E,{Transition:this._T});return rn(s,function(p,u){var T=p(l,c,l._o);c[u]=T,T.setup&&T.setup()}),rn(c,function(p){p.mount&&p.mount()}),this.emit(Zt),Tt(this.root,Ws),o.set(bn),this.emit(to),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(bn)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,i){return this.event.on(r,i),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var i;return(i=this.event).emit.apply(i,[r].concat(Qt(arguments,1))),this},t.add=function(r,i){return this._C.Slides.add(r,i),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(qe),this},t.destroy=function(r){r===void 0&&(r=!0);var i=this.event,l=this.state;return l.is(fn)?Be(this).on(to,this.destroy.bind(this,r)):(rn(this._C,function(o){o.destroy&&o.destroy(r)},!0),i.emit(fo),i.destroy(),r&&Ot(this.splides),l.set(fr)),this},ys(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})(),Lo=Cl;Lo.defaults={};Lo.STATES=bs;var Qo=[[Zt,"onMounted"],[to,"onReady"],[Bt,"onMove"],[Pn,"onMoved"],[ho,"onClick"],[Vi,"onActive"],[Di,"onInactive"],[zi,"onVisible"],[ji,"onHidden"],[qe,"onRefresh"],[et,"onUpdated"],[xn,"onResize"],[$r,"onResized"],[qi,"onDrag"],[Ki,"onDragging"],[Ui,"onDragged"],[wr,"onScroll"],[sn,"onScrolled"],[fo,"onDestroy"],[Gi,"onArrowsMounted"],[Yi,"onArrowsUpdated"],[Xi,"onPaginationMounted"],[Qi,"onPaginationUpdated"],[yo,"onNavigationMounted"],[vo,"onAutoplayPlay"],[Zi,"onAutoplayPlaying"],[bo,"onAutoplayPause"],[xo,"onLazyLoadLoaded"]];function Po(...e){return e.filter(Boolean).join(" ")}function xr(e){return e!==null&&typeof e=="object"}function oo(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!oo(n,t[r]));if(xr(e)&&xr(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(i=>!Object.prototype.hasOwnProperty.call(t,i)||!oo(e[i],t[i]))}return e===t}function Sl(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function $l(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const i=n[r];if(i!=="__proto__"&&t(e[i],i)===!1)break}}return e}function io(e,t){const n=e;return $l(t,(r,i)=>{Array.isArray(r)?n[i]=r.slice():xr(r)?n[i]=io(xr(n[i])?n[i]:{},r):n[i]=r}),n}var wl=({children:e,className:t,...n})=>d.createElement("div",{className:Po("splide__track",t),...n},d.createElement("ul",{className:"splide__list"},e)),Eo=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 Lo(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=io({},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&&!oo(this.options,e)&&(this.splide.options=e,this.options=io({},e));const t=this.getSlides();Sl(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){Qo.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...i)=>{r(e,...i)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:r,...i}=this.props;return d.createElement(t,{className:Po("splide",e),ref:this.splideRef,...this.omit(i,["options",...Qo.map(l=>l[1])])},n?d.createElement(wl,null,r):r)}},_o=({children:e,className:t,...n})=>d.createElement("li",{className:Po("splide__slide",t),...n},e);/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),d=require("react"),Re=require("classnames"),y=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Ii=require("react-dom");function La(e){return e.type==="object"&&e.version===1}const Pa="ControlSlider-module__wrapper___sHEkd",Ea="ControlSlider-module__hoverArrow___A-dOH",_a="ControlSlider-module__sliderItem___QQSkR",Aa="ControlSlider-module__sliderImage___9hRl-",Ia="ControlSlider-module__arrow___05ghY",Ra="ControlSlider-module__arrowVertical___tBfVN",ka="ControlSlider-module__nextArrow___-30Yc",Wa="ControlSlider-module__arrowInner___aEra3",Fa="ControlSlider-module__arrowIcon___S4ztF",Ma="ControlSlider-module__arrowImg___2dwJW",Na="ControlSlider-module__mirror___brd6U",Ha="ControlSlider-module__pagination___bicLF",Ba="ControlSlider-module__paginationInner___bT-P-",Oa="ControlSlider-module__paginationVertical___zYqKw",Va="ControlSlider-module__paginationItem___nTRbk",Da="ControlSlider-module__dot___p1Qun",za="ControlSlider-module__activeDot___LHFaj",ja="ControlSlider-module__paginationInsideBottom___R3FWn",qa="ControlSlider-module__paginationInsideTop___V-qb-",Ka="ControlSlider-module__paginationOutsideBottom___14w8D",Ua="ControlSlider-module__paginationOutsideTop___SCLqB",Ga="ControlSlider-module__paginationInsideLeft___yOBRZ",Ya="ControlSlider-module__paginationInsideRight___Rtt3o",Xa="ControlSlider-module__paginationOutsideLeft___lahaw",Qa="ControlSlider-module__paginationOutsideRight___EtuQa",Za="ControlSlider-module__imgWrapper___UjEgB",Ja="ControlSlider-module__captionBlock___dJ6-j",es="ControlSlider-module__captionTextWrapper___HFlpf",ts="ControlSlider-module__captionText___uGBVc",ns="ControlSlider-module__active___WZK4G",rs="ControlSlider-module__withPointerEvents___t-18M",os="ControlSlider-module__topLeftAlignment___zjnGM",is="ControlSlider-module__topCenterAlignment___gD1xW",as="ControlSlider-module__topRightAlignment___NMapS",ss="ControlSlider-module__middleLeftAlignment___OnUrY",ls="ControlSlider-module__middleCenterAlignment___Tdkl0",cs="ControlSlider-module__middleRightAlignment___wEbfX",ds="ControlSlider-module__bottomLeftAlignment___cTP2-",us="ControlSlider-module__bottomCenterAlignment___c54fB",ps="ControlSlider-module__bottomRightAlignment___kEwrz",ms="ControlSlider-module__clickOverlay___DZA28",gs="ControlSlider-module__contain___pLyq7",hs="ControlSlider-module__cover___KdDat",de={wrapper:Pa,hoverArrow:Ea,sliderItem:_a,sliderImage:Aa,arrow:Ia,arrowVertical:Ra,nextArrow:ka,arrowInner:Wa,arrowIcon:Fa,arrowImg:Ma,mirror:Na,pagination:Ha,paginationInner:Ba,paginationVertical:Oa,paginationItem:Va,dot:Da,activeDot:za,paginationInsideBottom:ja,paginationInsideTop:qa,paginationOutsideBottom:Ka,paginationOutsideTop:Ua,paginationInsideLeft:Ga,paginationInsideRight:Ya,paginationOutsideLeft:Xa,paginationOutsideRight:Qa,imgWrapper:Za,captionBlock:Ja,captionTextWrapper:es,captionText:ts,active:ns,withPointerEvents:rs,topLeftAlignment:os,topCenterAlignment:is,topRightAlignment:as,middleLeftAlignment:ss,middleCenterAlignment:ls,middleRightAlignment:cs,bottomLeftAlignment:ds,bottomCenterAlignment:us,bottomRightAlignment:ps,clickOverlay:ms,contain:gs,cover:hs};function fs(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 ys(e,t,n){return t&&fs(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ho="(prefers-reduced-motion: reduce)",fn=1,vs=2,bn=3,Ln=4,jn=5,cr=6,fr=7,bs={CREATED:fn,MOUNTED:vs,IDLE:bn,MOVING:Ln,SCROLLING:jn,DRAGGING:cr,DESTROYED:fr};function Bt(e){e.length=0}function Qt(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ne(e){return e.bind.apply(e,[null].concat(Qt(arguments,1)))}var Ri=setTimeout,Qr=function(){};function Bo(e){return requestAnimationFrame(e)}function Sr(e,t){return typeof t===e}function Wn(e){return!lo(e)&&Sr("object",e)}var so=Array.isArray,ki=Ne(Sr,"function"),Gt=Ne(Sr,"string"),qn=Ne(Sr,"undefined");function lo(e){return e===null}function Wi(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Kn(e){return so(e)?e:[e]}function bt(e,t){Kn(e).forEach(t)}function co(e,t){return e.indexOf(t)>-1}function dr(e,t){return e.push.apply(e,Kn(t)),e}function Wt(e,t,n){e&&bt(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function Tt(e,t){Wt(e,Gt(t)?t.split(" "):t,!0)}function Un(e,t){bt(t,e.appendChild.bind(e))}function uo(e,t){bt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function Fn(e,t){return Wi(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Fi(e,t){var n=e?Qt(e.children):[];return t?n.filter(function(r){return Fn(r,t)}):n}function Gn(e,t){return t?Fi(e,t)[0]:e.firstElementChild}var Mn=Object.keys;function rn(e,t,n){return e&&(n?Mn(e).reverse():Mn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function Nn(e){return Qt(arguments,1).forEach(function(t){rn(t,function(n,r){e[r]=t[r]})}),e}function Ut(e){return Qt(arguments,1).forEach(function(t){rn(t,function(n,r){so(n)?e[r]=n.slice():Wn(n)?e[r]=Ut({},Wn(e[r])?e[r]:{},n):e[r]=n})}),e}function Oo(e,t){bt(t||Mn(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){Wn(t)?rn(t,function(r,i){Ce(e,i,r)}):bt(e,function(r){lo(n)||n===""?Lt(r,t):r.setAttribute(t,String(n))})}function yn(e,t,n){var r=document.createElement(e);return t&&(Gt(t)?Tt(r,t):Ce(r,t)),n&&Un(n,r),r}function St(e,t,n){if(qn(n))return getComputedStyle(e)[t];lo(n)||(e.style[t]=""+n)}function Hn(e,t){St(e,"display",t)}function Mi(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function $t(e,t){return e.getAttribute(t)}function Vo(e,t){return e&&e.classList.contains(t)}function ht(e){return e.getBoundingClientRect()}function on(e){bt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Ni(e){return Gn(new DOMParser().parseFromString(e,"text/html").body)}function kt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Hi(e,t){return e&&e.querySelector(t)}function po(e,t){return t?Qt(e.querySelectorAll(t)):[]}function Ft(e,t){Wt(e,t,!1)}function Zr(e){return e.timeStamp}function en(e){return Gt(e)?e:e?e+"px":""}var Yn="splide",mo="data-"+Yn;function In(e,t){if(!e)throw new Error("["+Yn+"] "+(t||""))}var Yt=Math.min,yr=Math.max,vr=Math.floor,Bn=Math.ceil,ot=Math.abs;function Bi(e,t,n){return ot(e-t)<n}function ur(e,t,n,r){var i=Yt(t,n),l=yr(t,n);return r?i<e&&e<l:i<=e&&e<=l}function mn(e,t,n){var r=Yt(t,n),i=yr(t,n);return Yt(yr(r,e),i)}function Jr(e){return+(e>0)-+(e<0)}function eo(e,t){return bt(t,function(n){e=e.replace("%s",""+n)}),e}function go(e){return e<10?"0"+e:""+e}var Do={};function xs(e){return""+e+go(Do[e]=(Do[e]||0)+1)}function Oi(){var e=[];function t(o,c,s,p){i(o,c,function(u,T,x){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,x,s,m])})}function n(o,c,s){i(o,c,function(p,u,T){e=e.filter(function(x){return x[0]===p&&x[1]===u&&x[2]===T&&(!s||x[3]===s)?(x[4](),!1):!0})})}function r(o,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)),o.dispatchEvent(p),p}function i(o,c,s){bt(o,function(p){p&&bt(c,function(u){u.split(" ").forEach(function(T){var x=T.split(".");s(p,x[0],x[1])})})})}function l(){e.forEach(function(o){o[4]()}),Bt(e)}return{bind:t,unbind:n,dispatch:r,destroy:l}}var Zt="mounted",to="ready",Ot="move",Pn="moved",ho="click",Vi="active",Di="inactive",zi="visible",ji="hidden",qe="refresh",et="updated",xn="resize",$r="resized",qi="drag",Ki="dragging",Ui="dragged",wr="scroll",sn="scrolled",Cs="overflow",fo="destroy",Gi="arrows:mounted",Yi="arrows:updated",Xi="pagination:mounted",Qi="pagination:updated",yo="navigation:mounted",vo="autoplay:play",Zi="autoplay:playing",bo="autoplay:pause",xo="lazyload:loaded",Ji="sk",ea="sh",br="ei";function Oe(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Oi();function r(l,o){n.bind(t,Kn(l).join(" "),function(c){o.apply(o,so(c.detail)?c.detail:[])})}function i(l){n.dispatch(t,l,Qt(arguments,1))}return e&&e.event.on(fo,n.destroy),Nn(n,{bus:t,on:r,off:Ne(n.unbind,t),emit:i})}function Tr(e,t,n,r){var i=Date.now,l,o=0,c,s=!0,p=0;function u(){if(!s){if(o=e?Yt((i()-l)/e,1):1,n&&n(o),o>=1&&(t(),l=i(),r&&++p>=r))return x();c=Bo(u)}}function T(w){w||m(),l=i()-(w?o*e:0),s=!1,c=Bo(u)}function x(){s=!0}function f(){l=i(),o=0,n&&n(o)}function m(){c&&cancelAnimationFrame(c),o=0,c=0,s=!0}function g(w){e=w}function C(){return s}return{start:T,rewind:f,pause:x,cancel:m,set:g,isPaused:C}}function Ss(e){var t=e;function n(i){t=i}function r(i){return co(Kn(i),t)}return{set:n,is:r}}function $s(e,t){var n=Tr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ws(e,t,n){var r=e.state,i=n.breakpoints||{},l=n.reducedMotion||{},o=Oi(),c=[];function s(){var m=n.mediaQuery==="min";Mn(i).sort(function(g,C){return m?+g-+C:+C-+g}).forEach(function(g){u(i[g],"("+(m?"min":"max")+"-width:"+g+"px)")}),u(l,Ho),T()}function p(m){m&&o.destroy()}function u(m,g){var C=matchMedia(g);o.bind(C,"change",T),c.push([m,C])}function T(){var m=r.is(fr),g=n.direction,C=c.reduce(function(w,S){return Ut(w,S[1].matches?S[0]:{})},{});Oo(n),f(C),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):g!==n.direction&&e.refresh()}function x(m){matchMedia(Ho).matches&&(m?Ut(n,l):Oo(n,Mn(l)))}function f(m,g,C){Ut(n,m),g&&Ut(Object.getPrototypeOf(n),m),(C||!r.is(fn))&&e.emit(et,n)}return{setup:s,destroy:p,reduce:x,set:f}}var Lr="Arrow",Pr=Lr+"Left",Er=Lr+"Right",ta=Lr+"Up",na=Lr+"Down",zo="rtl",_r="ttb",Hr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[ta,Er],ArrowRight:[na,Pr]};function Ts(e,t,n){function r(l,o,c){c=c||n.direction;var s=c===zo&&!o?1:c===_r?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 i(l){return l*(n.direction===zo?1:-1)}return{resolve:r,orient:i}}var Mt="role",vn="tabindex",Ls="disabled",wt="aria-",Xn=wt+"controls",ra=wt+"current",jo=wt+"selected",ft=wt+"label",Co=wt+"labelledby",oa=wt+"hidden",So=wt+"orientation",On=wt+"roledescription",qo=wt+"live",Ko=wt+"busy",Uo=wt+"atomic",$o=[Mt,vn,Ls,Xn,ra,ft,Co,oa,So,On],Pt=Yn+"__",Jt="is-",Br=Yn,Go=Pt+"track",Ps=Pt+"list",Ar=Pt+"slide",ia=Ar+"--clone",Es=Ar+"__container",wo=Pt+"arrows",Ir=Pt+"arrow",aa=Ir+"--prev",sa=Ir+"--next",Rr=Pt+"pagination",la=Rr+"__page",_s=Pt+"progress",As=_s+"__bar",Is=Pt+"toggle",Rs=Pt+"spinner",ks=Pt+"sr",Ws=Jt+"initialized",an=Jt+"active",ca=Jt+"prev",da=Jt+"next",no=Jt+"visible",ro=Jt+"loading",ua=Jt+"focus-in",pa=Jt+"overflow",Fs=[an,no,ca,da,ro,ua,pa],Ms={slide:Ar,clone:ia,arrows:wo,arrow:Ir,prev:aa,next:sa,pagination:Rr,page:la,spinner:Rs};function Ns(e,t){if(ki(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Fn(n,t);)n=n.parentElement;return n}var Hs=5,Yo=200,ma="touchstart mousedown",Or="touchmove mousemove",Vr="touchend touchcancel mouseup click";function Bs(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=e.root,c=n.i18n,s={},p=[],u=[],T=[],x,f,m;function g(){v(),M(),S()}function C(){i(qe,w),i(qe,g),i(et,S),l(document,ma+" keydown",function(b){m=b.type==="keydown"},{capture:!0}),l(o,"focusin",function(){Wt(o,ua,!!m)})}function w(b){var P=$o.concat("style");Bt(p),Ft(o,u),Ft(x,T),Lt([x,f],P),Lt(o,b?P:["style",On])}function S(){Ft(o,u),Ft(x,T),u=N(Br),T=N(Go),Tt(o,u),Tt(x,T),Ce(o,ft,n.label),Ce(o,Co,n.labelledby)}function v(){x=L("."+Go),f=Gn(x,"."+Ps),In(x&&f,"A track/list element is missing."),dr(p,Fi(f,"."+Ar+":not(."+ia+")")),rn({arrows:wo,pagination:Rr,prev:aa,next:sa,bar:As,toggle:Is},function(b,P){s[P]=L("."+b)}),Nn(s,{root:o,track:x,list:f,slides:p})}function M(){var b=o.id||xs(Yn),P=n.role;o.id=b,x.id=x.id||b+"-track",f.id=f.id||b+"-list",!$t(o,Mt)&&o.tagName!=="SECTION"&&P&&Ce(o,Mt,P),Ce(o,On,c.carousel),Ce(f,Mt,"presentation")}function L(b){var P=Hi(o,b);return P&&Ns(P,"."+Br)===o?P:void 0}function N(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===Br&&an]}return Nn(s,{setup:g,mount:C,destroy:w})}var Cn="slide",En="loop",Qn="fade";function Os(e,t,n,r){var i=Oe(e),l=i.on,o=i.emit,c=i.bind,s=e.Components,p=e.root,u=e.options,T=u.isNavigation,x=u.updateOnMove,f=u.i18n,m=u.pagination,g=u.slideFocus,C=s.Direction.resolve,w=$t(r,"style"),S=$t(r,ft),v=n>-1,M=Gn(r,"."+Es),L;function N(){v||(r.id=p.id+"-slide"+go(t+1),Ce(r,Mt,m?"tabpanel":"group"),Ce(r,On,f.slide),Ce(r,ft,S||eo(f.slideLabel,[t+1,e.length]))),b()}function b(){c(r,"click",Ne(o,ho,D)),c(r,"keydown",Ne(o,Ji,D)),l([Pn,ea,sn],E),l(yo,O),x&&l(Ot,$)}function P(){L=!0,i.destroy(),Ft(r,Fs),Lt(r,$o),Ce(r,"style",w),Ce(r,ft,S||"")}function O(){var H=e.splides.map(function(I){var K=I.splide.Components.Slides.getAt(t);return K?K.slide.id:""}).join(" ");Ce(r,ft,eo(f.slideX,(v?n:t)+1)),Ce(r,Xn,H),Ce(r,Mt,g?"button":""),g&&Lt(r,On)}function $(){L||E()}function E(){if(!L){var H=e.index;A(),W(),Wt(r,ca,t===H-1),Wt(r,da,t===H+1)}}function A(){var H=te();H!==Vo(r,an)&&(Wt(r,an,H),Ce(r,ra,T&&H||""),o(H?Vi:Di,D))}function W(){var H=k(),I=!H&&(!te()||v);if(e.state.is([Ln,jn])||Ce(r,oa,I||""),Ce(po(r,u.focusableNodes||""),vn,I?-1:""),g&&Ce(r,vn,I?-1:0),H!==Vo(r,no)&&(Wt(r,no,H),o(H?zi:ji,D)),!H&&document.activeElement===r){var K=s.Slides.getAt(e.index);K&&Mi(K.slide)}}function j(H,I,K){St(K&&M||r,H,I)}function te(){var H=e.index;return H===t||u.cloneStatus&&H===n}function k(){if(e.is(Qn))return te();var H=ht(s.Elements.track),I=ht(r),K=C("left",!0),Q=C("right",!0);return vr(H[K])<=Bn(I[K])&&vr(I[Q])<=Bn(H[Q])}function F(H,I){var K=ot(H-t);return!v&&(u.rewind||e.is(En))&&(K=Yt(K,e.length-K)),K<=I}var D={index:t,slideIndex:n,slide:r,container:M,isClone:v,mount:N,destroy:P,update:E,style:j,isWithin:F};return D}function Vs(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=r.bind,c=t.Elements,s=c.slides,p=c.list,u=[];function T(){x(),i(qe,f),i(qe,x)}function x(){s.forEach(function(E,A){g(E,A,-1)})}function f(){L(function(E){E.destroy()}),Bt(u)}function m(){L(function(E){E.update()})}function g(E,A,W){var j=Os(e,A,W,E);j.mount(),u.push(j),u.sort(function(te,k){return te.index-k.index})}function C(E){return E?N(function(A){return!A.isClone}):u}function w(E){var A=t.Controller,W=A.toIndex(E),j=A.hasFocus()?1:n.perPage;return N(function(te){return ur(te.index,W,W+j-1)})}function S(E){return N(E)[0]}function v(E,A){bt(E,function(W){if(Gt(W)&&(W=Ni(W)),Wi(W)){var j=s[A];j?uo(W,j):Un(p,W),Tt(W,n.classes.slide),P(W,Ne(l,xn))}}),l(qe)}function M(E){on(N(E).map(function(A){return A.slide})),l(qe)}function L(E,A){C(A).forEach(E)}function N(E){return u.filter(ki(E)?E:function(A){return Gt(E)?Fn(A.slide,E):co(Kn(E),A.index)})}function b(E,A,W){L(function(j){j.style(E,A,W)})}function P(E,A){var W=po(E,"img"),j=W.length;j?W.forEach(function(te){o(te,"load error",function(){--j||A()})}):A()}function O(E){return E?s.length:u.length}function $(){return u.length>n.perPage}return{mount:T,destroy:f,update:m,register:g,get:C,getIn:w,getAt:S,add:v,remove:M,forEach:L,filter:N,style:b,getLength:O,isEnough:$}}function Ds(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=r.emit,c=t.Slides,s=t.Direction.resolve,p=t.Elements,u=p.root,T=p.track,x=p.list,f=c.getAt,m=c.style,g,C,w;function S(){v(),l(window,"resize load",$s(Ne(o,xn))),i([et,qe],v),i(xn,M)}function v(){g=n.direction===_r,St(u,"maxWidth",en(n.width)),St(T,s("paddingLeft"),L(!1)),St(T,s("paddingRight"),L(!0)),M(!0)}function M(D){var H=ht(u);(D||C.width!==H.width||C.height!==H.height)&&(St(T,"height",N()),m(s("marginRight"),en(n.gap)),m("width",P()),m("height",O(),!0),C=H,o($r),w!==(w=F())&&(Wt(u,pa,w),o(Cs,w)))}function L(D){var H=n.padding,I=s(D?"right":"left");return H&&en(H[I]||(Wn(H)?0:H))||"0px"}function N(){var D="";return g&&(D=b(),In(D,"height or heightRatio is missing."),D="calc("+D+" - "+L(!1)+" - "+L(!0)+")"),D}function b(){return en(n.height||ht(x).width*n.heightRatio)}function P(){return n.autoWidth?null:en(n.fixedWidth)||(g?"":$())}function O(){return en(n.fixedHeight)||(g?n.autoHeight?null:$():b())}function $(){var D=en(n.gap);return"calc((100%"+(D&&" + "+D)+")/"+(n.perPage||1)+(D&&" - "+D)+")"}function E(){return ht(x)[s("width")]}function A(D,H){var I=f(D||0);return I?ht(I.slide)[s("width")]+(H?0:te()):0}function W(D,H){var I=f(D);if(I){var K=ht(I.slide)[s("right")],Q=ht(x)[s("left")];return ot(K-Q)+(H?0:te())}return 0}function j(D){return W(e.length-1)-W(0)+A(0,D)}function te(){var D=f(0);return D&&parseFloat(St(D.slide,s("marginRight")))||0}function k(D){return parseFloat(St(T,s("padding"+(D?"Right":"Left"))))||0}function F(){return e.is(Qn)||j(!0)>E()}return{mount:S,resize:M,listSize:E,slideSize:A,sliderSize:j,totalSize:W,getPadding:k,isOverflow:F}}var zs=2;function js(e,t,n){var r=Oe(e),i=r.on,l=t.Elements,o=t.Slides,c=t.Direction.resolve,s=[],p;function u(){i(qe,T),i([et,xn],f),(p=C())&&(m(p),t.Layout.resize(!0))}function T(){x(),u()}function x(){on(s),Bt(s),r.destroy()}function f(){var w=C();p!==w&&(p<w||!w)&&r.emit(qe)}function m(w){var S=o.get().slice(),v=S.length;if(v){for(;S.length<w;)dr(S,S);dr(S.slice(-w),S.slice(0,w)).forEach(function(M,L){var N=L<w,b=g(M.slide,L);N?uo(b,S[0].slide):Un(l.list,b),dr(s,b),o.register(b,L-w+(N?0:v),M.index)})}}function g(w,S){var v=w.cloneNode(!0);return Tt(v,n.classes.clone),v.id=e.root.id+"-clone"+go(S+1),v}function C(){var w=n.clones;if(!e.is(En))w=0;else if(qn(w)){var S=n[c("fixedWidth")]&&t.Layout.slideSize(0),v=S&&Bn(ht(l.track)[c("width")]/S);w=v||n[c("autoWidth")]&&e.length||n.perPage*zs}return w}return{mount:u,destroy:x}}function qs(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=e.state.set,c=t.Layout,s=c.slideSize,p=c.getPadding,u=c.totalSize,T=c.listSize,x=c.sliderSize,f=t.Direction,m=f.resolve,g=f.orient,C=t.Elements,w=C.list,S=C.track,v;function M(){v=t.Transition,i([Zt,$r,et,qe],L)}function L(){t.Controller.isBusy()||(t.Scroll.cancel(),b(e.index),t.Slides.update())}function N(I,K,Q,Z){I!==K&&D(I>Q)&&(E(),P($(j(),I>Q),!0)),o(Ln),l(Ot,K,Q,I),v.start(K,function(){o(bn),l(Pn,K,Q,I),Z&&Z()})}function b(I){P(W(I,!0))}function P(I,K){if(!e.is(Qn)){var Q=K?I:O(I);St(w,"transform","translate"+m("X")+"("+Q+"px)"),I!==Q&&l(ea)}}function O(I){if(e.is(En)){var K=A(I),Q=K>t.Controller.getEnd(),Z=K<0;(Z||Q)&&(I=$(I,Q))}return I}function $(I,K){var Q=I-F(K),Z=x();return I-=g(Z*(Bn(ot(Q)/Z)||1))*(K?1:-1),I}function E(){P(j(),!0),v.cancel()}function A(I){for(var K=t.Slides.get(),Q=0,Z=1/0,R=0;R<K.length;R++){var ne=K[R].index,h=ot(W(ne,!0)-I);if(h<=Z)Z=h,Q=ne;else break}return Q}function W(I,K){var Q=g(u(I-1)-k(I));return K?te(Q):Q}function j(){var I=m("left");return ht(w)[I]-ht(S)[I]+g(p(!1))}function te(I){return n.trimSpace&&e.is(Cn)&&(I=mn(I,0,g(x(!0)-T()))),I}function k(I){var K=n.focus;return K==="center"?(T()-s(I,!0))/2:+K*s(I)||0}function F(I){return W(I?t.Controller.getEnd():0,!!n.trimSpace)}function D(I){var K=g($(j(),I));return I?K>=0:K<=w[m("scrollWidth")]-ht(S)[m("width")]}function H(I,K){K=qn(K)?j():K;var Q=I!==!0&&g(K)<g(F(!1)),Z=I!==!1&&g(K)>g(F(!0));return Q||Z}return{mount:M,move:N,jump:b,translate:P,shift:$,cancel:E,toIndex:A,toPosition:W,getPosition:j,getLimit:F,exceededLimit:H,reposition:L}}function Ks(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=t.Move,c=o.getPosition,s=o.getLimit,p=o.toPosition,u=t.Slides,T=u.isEnough,x=u.getLength,f=n.omitEnd,m=e.is(En),g=e.is(Cn),C=Ne(j,!1),w=Ne(j,!0),S=n.start||0,v,M=S,L,N,b;function P(){O(),i([et,qe,br],O),i($r,$)}function O(){L=x(!0),N=n.perMove,b=n.perPage,v=D();var h=mn(S,0,f?v:L-1);h!==S&&(S=h,o.reposition())}function $(){v!==D()&&l(br)}function E(h,ee,ge){if(!ne()){var le=W(h),be=F(le);be>-1&&(ee||be!==S)&&(Q(be),o.move(le,be,M,ge))}}function A(h,ee,ge,le){t.Scroll.scroll(h,ee,ge,function(){var be=F(o.toIndex(c()));Q(f?Yt(be,v):be),le&&le()})}function W(h){var ee=S;if(Gt(h)){var ge=h.match(/([+\-<>])(\d+)?/)||[],le=ge[1],be=ge[2];le==="+"||le==="-"?ee=te(S+ +(""+le+(+be||1)),S):le===">"?ee=be?H(+be):C(!0):le==="<"&&(ee=w(!0))}else ee=m?h:mn(h,0,v);return ee}function j(h,ee){var ge=N||(R()?1:b),le=te(S+ge*(h?-1:1),S,!(N||R()));return le===-1&&g&&!Bi(c(),s(!h),1)?h?0:v:ee?le:F(le)}function te(h,ee,ge){if(T()||R()){var le=k(h);le!==h&&(ee=h,h=le,ge=!1),h<0||h>v?!N&&(ur(0,h,ee,!0)||ur(v,ee,h,!0))?h=H(I(h)):m?h=ge?h<0?-(L%b||b):L:h:n.rewind?h=h<0?v:0:h=-1:ge&&h!==ee&&(h=H(I(ee)+(h<ee?-1:1)))}else h=-1;return h}function k(h){if(g&&n.trimSpace==="move"&&h!==S)for(var ee=c();ee===p(h,!0)&&ur(h,0,e.length-1,!n.rewind);)h<S?--h:++h;return h}function F(h){return m?(h+L)%L||0:h}function D(){for(var h=L-(R()||m&&N?1:b);f&&h-- >0;)if(p(L-1,!0)!==p(h,!0)){h++;break}return mn(h,0,L-1)}function H(h){return mn(R()?h:b*h,0,v)}function I(h){return R()?Yt(h,v):vr((h>=v?L-1:h)/b)}function K(h){var ee=o.toIndex(h);return g?mn(ee,0,v):ee}function Q(h){h!==S&&(M=S,S=h)}function Z(h){return h?M:S}function R(){return!qn(n.focus)||n.isNavigation}function ne(){return e.state.is([Ln,jn])&&!!n.waitForTransition}return{mount:P,go:E,scroll:A,getNext:C,getPrev:w,getAdjacent:j,getEnd:D,setIndex:Q,getIndex:Z,toIndex:H,toPage:I,toDest:K,hasFocus:R,isBusy:ne}}var Us="http://www.w3.org/2000/svg",Gs="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",nr=40;function Ys(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=r.emit,c=n.classes,s=n.i18n,p=t.Elements,u=t.Controller,T=p.arrows,x=p.track,f=T,m=p.prev,g=p.next,C,w,S={};function v(){L(),i(et,M)}function M(){N(),v()}function L(){var A=n.arrows;A&&!(m&&g)&&O(),m&&g&&(Nn(S,{prev:m,next:g}),Hn(f,A?"":"none"),Tt(f,w=wo+"--"+n.direction),A&&(b(),E(),Ce([m,g],Xn,x.id),o(Gi,m,g)))}function N(){r.destroy(),Ft(f,w),C?(on(T?[m,g]:f),m=g=null):Lt([m,g],$o)}function b(){i([Zt,Pn,qe,sn,br],E),l(g,"click",Ne(P,">")),l(m,"click",Ne(P,"<"))}function P(A){u.go(A,!0)}function O(){f=T||yn("div",c.arrows),m=$(!0),g=$(!1),C=!0,Un(f,[m,g]),!T&&uo(f,x)}function $(A){var W='<button class="'+c.arrow+" "+(A?c.prev:c.next)+'" type="button"><svg xmlns="'+Us+'" viewBox="0 0 '+nr+" "+nr+'" width="'+nr+'" height="'+nr+'" focusable="false"><path d="'+(n.arrowPath||Gs)+'" />';return Ni(W)}function E(){if(m&&g){var A=e.index,W=u.getPrev(),j=u.getNext(),te=W>-1&&A<W?s.last:s.prev,k=j>-1&&A>j?s.first:s.next;m.disabled=W<0,g.disabled=j<0,Ce(m,ft,te),Ce(g,ft,k),o(Yi,m,g,W,j)}}return{arrows:S,mount:v,destroy:N,update:E}}var Xs=mo+"-interval";function Qs(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=r.emit,c=Tr(n.interval,e.go.bind(e,">"),b),s=c.isPaused,p=t.Elements,u=t.Elements,T=u.root,x=u.toggle,f=n.autoplay,m,g,C=f==="pause";function w(){f&&(S(),x&&Ce(x,Xn,p.track.id),C||v(),N())}function S(){n.pauseOnHover&&l(T,"mouseenter mouseleave",function(O){m=O.type==="mouseenter",L()}),n.pauseOnFocus&&l(T,"focusin focusout",function(O){g=O.type==="focusin",L()}),x&&l(x,"click",function(){C?v():M(!0)}),i([Ot,wr,qe],c.rewind),i(Ot,P)}function v(){s()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),g=m=C=!1,N(),o(vo))}function M(O){O===void 0&&(O=!0),C=!!O,N(),s()||(c.pause(),o(bo))}function L(){C||(m||g?M(!1):v())}function N(){x&&(Wt(x,an,!C),Ce(x,ft,n.i18n[C?"play":"pause"]))}function b(O){var $=p.bar;$&&St($,"width",O*100+"%"),o(Zi,O)}function P(O){var $=t.Slides.getAt(O);c.set($&&+$t($.slide,Xs)||n.interval)}return{mount:w,destroy:c.cancel,play:v,pause:M,isPaused:s}}function Zs(e,t,n){var r=Oe(e),i=r.on;function l(){n.cover&&(i(xo,Ne(c,!0)),i([Zt,et,qe],Ne(o,!0)))}function o(s){t.Slides.forEach(function(p){var u=Gn(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:Ne(o,!1)}}var Js=10,el=600,tl=.6,nl=1.5,rl=800;function ol(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=e.state.set,c=t.Move,s=c.getPosition,p=c.getLimit,u=c.exceededLimit,T=c.translate,x=e.is(Cn),f,m,g=1;function C(){i(Ot,M),i([et,qe],L)}function w(b,P,O,$,E){var A=s();if(M(),O&&(!x||!u())){var W=t.Layout.sliderSize(),j=Jr(b)*W*vr(ot(b)/W)||0;b=c.toPosition(t.Controller.toDest(b%W))+j}var te=Bi(A,b,1);g=1,P=te?0:P||yr(ot(b-A)/nl,rl),m=$,f=Tr(P,S,Ne(v,A,b,E),1),o(jn),l(wr),f.start()}function S(){o(bn),m&&m(),l(sn)}function v(b,P,O,$){var E=s(),A=b+(P-b)*N($),W=(A-E)*g;T(E+W),x&&!O&&u()&&(g*=tl,ot(W)<Js&&w(p(u(!0)),el,!1,m,!0))}function M(){f&&f.cancel()}function L(){f&&!f.isPaused()&&(M(),S())}function N(b){var P=n.easingFunc;return P?P(b):1-Math.pow(1-b,4)}return{mount:C,destroy:M,scroll:w,cancel:L}}var gn={passive:!1,capture:!0};function il(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=r.bind,c=r.unbind,s=e.state,p=t.Move,u=t.Scroll,T=t.Controller,x=t.Elements.track,f=t.Media.reduce,m=t.Direction,g=m.resolve,C=m.orient,w=p.getPosition,S=p.exceededLimit,v,M,L,N,b,P=!1,O,$,E;function A(){o(x,Or,Qr,gn),o(x,Vr,Qr,gn),o(x,ma,j,gn),o(x,"click",F,{capture:!0}),o(x,"dragstart",kt),i([Zt,et],W)}function W(){var V=n.drag;ce(!V),N=V==="free"}function j(V){if(O=!1,!$){var U=be(V);le(V.target)&&(U||!V.button)&&(T.isBusy()?kt(V,!0):(E=U?x:window,b=s.is([Ln,jn]),L=null,o(E,Or,te,gn),o(E,Vr,k,gn),p.cancel(),u.cancel(),D(V)))}}function te(V){if(s.is(cr)||(s.set(cr),l(qi)),V.cancelable)if(b){p.translate(v+ge(R(V)));var U=ne(V)>Yo,G=P!==(P=S());(U||G)&&D(V),O=!0,l(Ki),kt(V)}else K(V)&&(b=I(V),kt(V))}function k(V){s.is(cr)&&(s.set(bn),l(Ui)),b&&(H(V),kt(V)),c(E,Or,te),c(E,Vr,k),b=!1}function F(V){!$&&O&&kt(V,!0)}function D(V){L=M,M=V,v=w()}function H(V){var U=Q(V),G=Z(U),se=n.rewind&&n.rewindByDrag;f(!1),N?T.scroll(G,0,n.snap):e.is(Qn)?T.go(C(Jr(U))<0?se?"<":"-":se?">":"+"):e.is(Cn)&&P&&se?T.go(S(!0)?">":"<"):T.go(T.toDest(G),!0),f(!0)}function I(V){var U=n.dragMinThreshold,G=Wn(U),se=G&&U.mouse||0,ye=(G?U.touch:+U)||10;return ot(R(V))>(be(V)?ye:se)}function K(V){return ot(R(V))>ot(R(V,!0))}function Q(V){if(e.is(En)||!P){var U=ne(V);if(U&&U<Yo)return R(V)/U}return 0}function Z(V){return w()+Jr(V)*Yt(ot(V)*(n.flickPower||600),N?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function R(V,U){return ee(V,U)-ee(h(V),U)}function ne(V){return Zr(V)-Zr(h(V))}function h(V){return M===V&&L||M}function ee(V,U){return(be(V)?V.changedTouches[0]:V)["page"+g(U?"Y":"X")]}function ge(V){return V/(P&&e.is(Cn)?Hs:1)}function le(V){var U=n.noDrag;return!Fn(V,"."+la+", ."+Ir)&&(!U||!Fn(V,U))}function be(V){return typeof TouchEvent<"u"&&V instanceof TouchEvent}function re(){return b}function ce(V){$=V}return{mount:A,disable:ce,isDragging:re}}var al={Spacebar:" ",Right:Er,Left:Pr,Up:ta,Down:na};function To(e){return e=Gt(e)?e:e.key,al[e]||e}var Xo="keydown";function sl(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=r.unbind,c=e.root,s=t.Direction.resolve,p,u;function T(){x(),i(et,f),i(et,x),i(Ot,g)}function x(){var w=n.keyboard;w&&(p=w==="global"?window:c,l(p,Xo,C))}function f(){o(p,Xo)}function m(w){u=w}function g(){var w=u;u=!0,Ri(function(){u=w})}function C(w){if(!u){var S=To(w);S===s(Pr)?e.go("<"):S===s(Er)&&e.go(">")}}return{mount:T,destroy:f,disable:m}}var Rn=mo+"-lazy",pr=Rn+"-srcset",ll="["+Rn+"], ["+pr+"]";function cl(e,t,n){var r=Oe(e),i=r.on,l=r.off,o=r.bind,c=r.emit,s=n.lazyLoad==="sequential",p=[Pn,sn],u=[];function T(){n.lazyLoad&&(x(),i(qe,x))}function x(){Bt(u),f(),s?w():(l(p),i(p,m),m())}function f(){t.Slides.forEach(function(S){po(S.slide,ll).forEach(function(v){var M=$t(v,Rn),L=$t(v,pr);if(M!==v.src||L!==v.srcset){var N=n.classes.spinner,b=v.parentElement,P=Gn(b,"."+N)||yn("span",N,b);u.push([v,S,P]),v.src||Hn(v,"none")}})})}function m(){u=u.filter(function(S){var v=n.perPage*((n.preloadPages||1)+1)-1;return S[1].isWithin(e.index,v)?g(S):!0}),u.length||l(p)}function g(S){var v=S[0];Tt(S[1].slide,ro),o(v,"load error",Ne(C,S)),Ce(v,"src",$t(v,Rn)),Ce(v,"srcset",$t(v,pr)),Lt(v,Rn),Lt(v,pr)}function C(S,v){var M=S[0],L=S[1];Ft(L.slide,ro),v.type!=="error"&&(on(S[2]),Hn(M,""),c(xo,M,L),c(xn)),s&&w()}function w(){u.length&&g(u.shift())}return{mount:T,destroy:Ne(Bt,u),check:m}}function dl(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=r.bind,c=t.Slides,s=t.Elements,p=t.Controller,u=p.hasFocus,T=p.getIndex,x=p.go,f=t.Direction.resolve,m=s.pagination,g=[],C,w;function S(){v(),i([et,qe,br],S);var $=n.pagination;m&&Hn(m,$?"":"none"),$&&(i([Ot,wr,sn],O),M(),O(),l(Xi,{list:C,items:g},P(e.index)))}function v(){C&&(on(m?Qt(C.children):C),Ft(C,w),Bt(g),C=null),r.destroy()}function M(){var $=e.length,E=n.classes,A=n.i18n,W=n.perPage,j=u()?p.getEnd()+1:Bn($/W);C=m||yn("ul",E.pagination,s.track.parentElement),Tt(C,w=Rr+"--"+b()),Ce(C,Mt,"tablist"),Ce(C,ft,A.select),Ce(C,So,b()===_r?"vertical":"");for(var te=0;te<j;te++){var k=yn("li",null,C),F=yn("button",{class:E.page,type:"button"},k),D=c.getIn(te).map(function(I){return I.slide.id}),H=!u()&&W>1?A.pageX:A.slideX;o(F,"click",Ne(L,te)),n.paginationKeyboard&&o(F,"keydown",Ne(N,te)),Ce(k,Mt,"presentation"),Ce(F,Mt,"tab"),Ce(F,Xn,D.join(" ")),Ce(F,ft,eo(H,te+1)),Ce(F,vn,-1),g.push({li:k,button:F,page:te})}}function L($){x(">"+$,!0)}function N($,E){var A=g.length,W=To(E),j=b(),te=-1;W===f(Er,!1,j)?te=++$%A:W===f(Pr,!1,j)?te=(--$+A)%A:W==="Home"?te=0:W==="End"&&(te=A-1);var k=g[te];k&&(Mi(k.button),x(">"+te),kt(E,!0))}function b(){return n.paginationDirection||n.direction}function P($){return g[p.toPage($)]}function O(){var $=P(T(!0)),E=P(T());if($){var A=$.button;Ft(A,an),Lt(A,jo),Ce(A,vn,-1)}if(E){var W=E.button;Tt(W,an),Ce(W,jo,!0),Ce(W,vn,"")}l(Qi,{list:C,items:g},$,E)}return{items:g,mount:S,destroy:v,getAt:P,update:O}}var ul=[" ","Enter"];function pl(e,t,n){var r=n.isNavigation,i=n.slideFocus,l=[];function o(){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(),o()}function p(m,g){var C=Oe(m);C.on(Ot,function(w,S,v){g.go(g.is(En)?v:w)}),l.push(C)}function u(){var m=Oe(e),g=m.on;g(ho,x),g(Ji,f),g([Zt,et],T),l.push(m),m.emit(yo,e.splides)}function T(){Ce(t.Elements.list,So,n.direction===_r?"vertical":"")}function x(m){e.go(m.index)}function f(m,g){co(ul,To(g))&&(x(m),kt(g))}return{setup:Ne(t.Media.set,{slideFocus:qn(i)?r:i},!0),mount:o,destroy:c,remount:s}}function ml(e,t,n){var r=Oe(e),i=r.bind,l=0;function o(){n.wheel&&i(t.Elements.track,"wheel",c,gn)}function c(p){if(p.cancelable){var u=p.deltaY,T=u<0,x=Zr(p),f=n.wheelMinThreshold||0,m=n.wheelSleep||0;ot(u)>f&&x-l>m&&(e.go(T?"<":">"),l=x),s(T)&&kt(p)}}function s(p){return!n.releaseWheel||e.state.is(Ln)||t.Controller.getAdjacent(p)!==-1}return{mount:o}}var gl=90;function hl(e,t,n){var r=Oe(e),i=r.on,l=t.Elements.track,o=n.live&&!n.isNavigation,c=yn("span",ks),s=Tr(gl,Ne(u,!1));function p(){o&&(x(!t.Autoplay.isPaused()),Ce(l,Uo,!0),c.textContent="…",i(vo,Ne(x,!0)),i(bo,Ne(x,!1)),i([Pn,sn],Ne(u,!0)))}function u(f){Ce(l,Ko,f),f?(Un(l,c),s.start()):(on(c),s.cancel())}function T(){Lt(l,[qo,Uo,Ko]),on(c)}function x(f){o&&Ce(l,qo,f?"off":"polite")}return{mount:p,disable:x,destroy:T}}var fl=Object.freeze({__proto__:null,Media:ws,Direction:Ts,Elements:Bs,Slides:Vs,Layout:Ds,Clones:js,Move:qs,Controller:Ks,Arrows:Ys,Autoplay:Qs,Cover:Zs,Scroll:ol,Drag:il,Keyboard:sl,LazyLoad:cl,Pagination:dl,Sync:pl,Wheel:ml,Live:hl}),yl={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"},vl={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:Ms,i18n:yl,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function bl(e,t,n){var r=t.Slides;function i(){Oe(e).on([Zt,qe],l)}function l(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function o(c,s){r.style("transition","opacity "+n.speed+"ms "+n.easing),Ri(s)}return{mount:i,start:o,cancel:Qr}}function xl(e,t,n){var r=t.Move,i=t.Controller,l=t.Scroll,o=t.Elements.list,c=Ne(St,o,"transition"),s;function p(){Oe(e).bind(o,"transitionend",function(f){f.target===o&&s&&(T(),s())})}function u(f,m){var g=r.toPosition(f,!0),C=r.getPosition(),w=x(f);ot(g-C)>=1&&w>=1?n.useScroll?l.scroll(g,w,!1,m):(c("transform "+w+"ms "+n.easing),r.translate(g,!0),s=m):(r.jump(f),m())}function T(){c(""),l.cancel()}function x(f){var m=n.rewindSpeed;if(e.is(Cn)&&m){var g=i.getIndex(!0),C=i.getEnd();if(g===0&&f>=C||g>=C&&f===0)return m}return n.speed}return{mount:p,start:u,cancel:T}}var Cl=(function(){function e(n,r){this.event=Oe(),this.Components={},this.state=Ss(fn),this.splides=[],this._o={},this._E={};var i=Gt(n)?Hi(document,n):n;In(i,i+" is invalid."),this.root=i,r=Ut({label:$t(i,ft)||"",labelledby:$t(i,Co)||""},vl,e.defaults,r||{});try{Ut(r,JSON.parse($t(i,mo)))}catch{In(!1,"Invalid JSON")}this._o=Object.create(Ut({},r))}var t=e.prototype;return t.mount=function(r,i){var l=this,o=this.state,c=this.Components;In(o.is([fn,fr]),"Already mounted!"),o.set(fn),this._C=c,this._T=i||this._T||(this.is(Qn)?bl:xl),this._E=r||this._E;var s=Nn({},fl,this._E,{Transition:this._T});return rn(s,function(p,u){var T=p(l,c,l._o);c[u]=T,T.setup&&T.setup()}),rn(c,function(p){p.mount&&p.mount()}),this.emit(Zt),Tt(this.root,Ws),o.set(bn),this.emit(to),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(bn)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,i){return this.event.on(r,i),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var i;return(i=this.event).emit.apply(i,[r].concat(Qt(arguments,1))),this},t.add=function(r,i){return this._C.Slides.add(r,i),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(qe),this},t.destroy=function(r){r===void 0&&(r=!0);var i=this.event,l=this.state;return l.is(fn)?Oe(this).on(to,this.destroy.bind(this,r)):(rn(this._C,function(o){o.destroy&&o.destroy(r)},!0),i.emit(fo),i.destroy(),r&&Bt(this.splides),l.set(fr)),this},ys(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})(),Lo=Cl;Lo.defaults={};Lo.STATES=bs;var Qo=[[Zt,"onMounted"],[to,"onReady"],[Ot,"onMove"],[Pn,"onMoved"],[ho,"onClick"],[Vi,"onActive"],[Di,"onInactive"],[zi,"onVisible"],[ji,"onHidden"],[qe,"onRefresh"],[et,"onUpdated"],[xn,"onResize"],[$r,"onResized"],[qi,"onDrag"],[Ki,"onDragging"],[Ui,"onDragged"],[wr,"onScroll"],[sn,"onScrolled"],[fo,"onDestroy"],[Gi,"onArrowsMounted"],[Yi,"onArrowsUpdated"],[Xi,"onPaginationMounted"],[Qi,"onPaginationUpdated"],[yo,"onNavigationMounted"],[vo,"onAutoplayPlay"],[Zi,"onAutoplayPlaying"],[bo,"onAutoplayPause"],[xo,"onLazyLoadLoaded"]];function Po(...e){return e.filter(Boolean).join(" ")}function xr(e){return e!==null&&typeof e=="object"}function oo(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!oo(n,t[r]));if(xr(e)&&xr(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(i=>!Object.prototype.hasOwnProperty.call(t,i)||!oo(e[i],t[i]))}return e===t}function Sl(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function $l(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const i=n[r];if(i!=="__proto__"&&t(e[i],i)===!1)break}}return e}function io(e,t){const n=e;return $l(t,(r,i)=>{Array.isArray(r)?n[i]=r.slice():xr(r)?n[i]=io(xr(n[i])?n[i]:{},r):n[i]=r}),n}var wl=({children:e,className:t,...n})=>d.createElement("div",{className:Po("splide__track",t),...n},d.createElement("ul",{className:"splide__list"},e)),Eo=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 Lo(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=io({},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&&!oo(this.options,e)&&(this.splide.options=e,this.options=io({},e));const t=this.getSlides();Sl(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){Qo.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...i)=>{r(e,...i)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:r,...i}=this.props;return d.createElement(t,{className:Po("splide",e),ref:this.splideRef,...this.omit(i,["options",...Qo.map(l=>l[1])])},n?d.createElement(wl,null,r):r)}},_o=({children:e,className:t,...n})=>d.createElement("li",{className:Po("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 Tl="RichTextRenderer-module__link___BWeZ2",Ll={link:Tl},Pl=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))},kr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Pl(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function yt(e){const{color:t,...n}=e;return n}function Ze(e,t){var i,l,o;const{fontSize:n,lineHeight:r}=e;return{fontFamily:kr(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:(i=e.textAppearance)==null?void 0:i.textTransform,textDecoration:(l=e.textAppearance)==null?void 0:l.textDecoration,fontVariant:(o=e.textAppearance)==null?void 0:o.fontVariant,textAlign:e.textAlign,color:e.color}}const Sn=({content:e})=>{const t=n=>n.map((r,i)=>r.type==="link"?a.jsx("a",{className:Ll.link,href:r.value,target:r.target,children:t(r.children)},i):a.jsx("span",{style:El(r),children:r.text},i));return a.jsx(a.Fragment,{children:e.map((n,r)=>{const i=n.children;return a.jsx("div",{children:t(i)},r)})})};function El(e){return{...e.fontFamily&&{fontFamily:kr(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 _l="SvgImage-module__svg___q3xE-",Al="SvgImage-module__img___VsTm-",Zo={svg:_l,img:Al},Il=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Rl=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Nt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:i})=>{const[l,o]=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("")');o(c)}},[]),!Il(e)||!l?a.jsx("img",{src:e,alt:"",className:Re(Zo.img,r),style:i}):a.jsx("span",{"data-supports-mask":l,className:Re(Zo.svg,r),style:{"--svg":Rl(e),"--fill":t,"--hover-fill":n,...i??{}}})},kl={"top-left":de.topLeftAlignment,"top-center":de.topCenterAlignment,"top-right":de.topRightAlignment,"middle-left":de.middleLeftAlignment,"middle-center":de.middleCenterAlignment,"middle-right":de.middleRightAlignment,"bottom-left":de.bottomLeftAlignment,"bottom-center":de.bottomCenterAlignment,"bottom-right":de.bottomRightAlignment};function Wl({settings:e,content:t,styles:n,isEditor:r}){const[i,l]=d.useState(null),{widthSettings:o,fontSettings:c,letterSpacing:s,textAlign:p,wordSpacing:u,fontSizeLineHeight:T,textAppearance:x,color:f}=n.imageCaption??{},[m,g]=d.useState(void 0),[C,w]=d.useState(null),[S,v]=d.useState(0),[M,L]=d.useState(0),{direction:N,transition:b,controls:P,pagination:B,imageCaption:$,triggers:E}=e,A=d.useRef(b.type),{x:W,y:j}=e.controls.offset,te=k=>{i&&i.go(k)};return d.useEffect(()=>{if(!C)return;const k=new ResizeObserver(F=>{if(!i)return;const[D]=F;g({width:Math.round(D.contentRect.width),height:Math.round(D.contentRect.height)})});return k.observe(C),()=>k.unobserve(C)},[C]),d.useEffect(()=>{!i||A.current===b.type||(L(k=>k+1),A.current=b.type)},[b.type]),a.jsx("div",{className:Re(de.wrapper,{[de.editor]:r}),ref:w,children:a.jsxs("div",{className:de.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Re(de.captionBlock),children:a.jsx("div",{className:de.captionTextWrapper,children:t.map((k,F)=>a.jsx("div",{className:Re(de.captionText,kl[$.alignment],{[de.withPointerEvents]:F===S&&r,[de.active]:F===S}),style:{fontFamily:kr(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:o.sizing==="auto"?"max-content":y.scalingValue(o.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:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:f,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:de.captionTextInner,style:{"--link-hover-color":$.linkHoverColor,"--link-color":$.linkColor,position:"relative",top:y.scalingValue($.offset.y,r),left:y.scalingValue($.offset.x,r)},children:a.jsx(Sn,{content:k.imageCaption})})},F))})}),a.jsx(Eo,{onMove:k=>{v(k.index)},ref:l,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:E.autoPlay!==null,...E.autoPlay!==null&&{interval:parseInt(E.autoPlay)*1e3},direction:N==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:E.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((k,F)=>a.jsx(_o,{children:a.jsx("div",{className:de.sliderItem,children:a.jsx("div",{className:de.imgWrapper,children:a.jsx("img",{className:Re(de.sliderImage,{[de.contain]:k.image.objectFit==="contain",[de.cover]:k.image.objectFit==="cover"}),src:k.image.url,alt:k.image.name??""})})})},F))},M),P.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Re(de.arrow,{[de.arrowVertical]:N==="vert",[de.hoverArrow]:P.show==="on hover"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:a.jsxs("button",{onClick:()=>{te("-1")},className:de.arrowInner,style:{transform:`translate(${y.scalingValue(W,r)}, ${y.scalingValue(j*(N==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:[P.arrowsImgUrl&&a.jsx(Nt,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:Re(de.arrowImg,de.mirror)}),!P.arrowsImgUrl&&a.jsx(Jo,{color:P.color,className:Re(de.arrowIcon,de.arrowImg,de.mirror)})]})}),a.jsx("div",{className:Re(de.arrow,de.nextArrow,{[de.arrowVertical]:N==="vert",[de.hoverArrow]:P.show==="on hover"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:a.jsxs("button",{className:de.arrowInner,onClick:()=>te("+1"),style:{transform:`translate(${y.scalingValue(W*(N==="horiz"?-1:1),r)}, ${y.scalingValue(j,r)}) scale(${e.controls.scale/100}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:[P.arrowsImgUrl&&a.jsx(Nt,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:de.arrowImg}),!P.arrowsImgUrl&&a.jsx(Jo,{color:P.color,className:Re(de.arrowIcon,de.arrowImg)})]})})]}),E.triggersList.click&&a.jsx("div",{className:de.clickOverlay,onClick:()=>{i&&i.go("+1")}}),B.isActive&&a.jsx("div",{className:Re(de.pagination,{[de.paginationInsideBottom]:B.position==="inside-1"&&N==="horiz",[de.paginationInsideTop]:B.position==="inside-2"&&N==="horiz",[de.paginationOutsideBottom]:B.position==="outside-1"&&N==="horiz",[de.paginationOutsideTop]:B.position==="outside-2"&&N==="horiz",[de.paginationInsideLeft]:B.position==="inside-1"&&N==="vert",[de.paginationInsideRight]:B.position==="inside-2"&&N==="vert",[de.paginationOutsideLeft]:B.position==="outside-1"&&N==="vert",[de.paginationOutsideRight]:B.position==="outside-2"&&N==="vert",[de.paginationVertical]:N==="vert"}),children:a.jsx("div",{className:de.paginationInner,style:{backgroundColor:B.colors[2],transform:`scale(${B.scale/100}) translate(${y.scalingValue(B.offset.x,r)}, ${y.scalingValue(B.offset.y,r)}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:t.map((k,F)=>a.jsx("button",{onClick:()=>{i&&i.go(F)},className:Re(de.paginationItem),children:a.jsx("div",{className:Re(de.dot,{[de.activeDot]:F===S}),style:{backgroundColor:F===S?B.colors[0]:B.colors[1],"--pagination-hover-color":B.hover}})},F))})})]})})}function Jo({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 Fl={element:Wl,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"]}},Ml="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Nl="ImageRevealSlider-module__image___Qjt-e",Hl="ImageRevealSlider-module__link___N-iLG",Ol="ImageRevealSlider-module__cursor___2U03d",pn={imageRevealSlider:Ml,image:Nl,link:Hl,cursor:Ol};function ei(e,t,n){for(const r of n){const i=new Image;i.src=r.url;const l=r.width?Number.parseFloat(r.width):i.naturalWidth,o=i.naturalHeight/i.naturalWidth*l,c=l/2,s=o/2;if(e>=r.x-c&&e<=r.x+c&&t>=r.y-s&&t<=r.y+s)return!0}return!1}function Dr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Bl(e,t,n,r){let i,l;if(t==="custom"){i=n;const o=await Dr(e);l=o.height/o.width*i}else if(t==="random"){i=Math.random()*(r.max-r.min)+r.min;const o=await Dr(e);l=o.height/o.width*i}else{const o=await Dr(e);i=o.width,l=o.height}return{width:i,height:l,finalWidth:`${i}px`}}function Vl({settings:e,content:t,isEditor:n}){const[r,i]=d.useState(null),[l,o]=d.useState([]),[c,s]=d.useState(0),p=d.useRef(0),[u,T]=d.useState({x:0,y:0}),[x,f]=d.useState(1),[m,g]=d.useState("none"),C=d.useRef({x:0,y:0}),[w,S]=d.useState(!1),{sizeType:v,imageWidth:M,randomRangeImageWidth:L}=e.imageSize,{revealPosition:N,visible:b}=e.position,{cursorType:P,target:B,defaultCursorScale:$,defaultCursor:E,hoverCursorScale:A,hoverCursor:W}=e.cursor;d.useEffect(()=>{if(!r)return;const k=(H,I)=>{const K=r.getBoundingClientRect(),Q=H-K.left,Z=I-K.top;if(T({x:Q,y:Z}),P==="system"){g("none"),f(1);return}const R=Q,ne=Z,h=document.elementFromPoint(K.left+R,K.top+ne);if(h&&h.closest("a")){g("none"),f(1);return}const ee=ei(R,ne,l)||B==="area"?{img:W??"none",scale:A}:{img:E??"none",scale:$};g(ee.img),f(ee.scale)},F=H=>{H.stopPropagation(),C.current={x:H.clientX,y:H.clientY},k(H.clientX,H.clientY)},D=()=>{w&&k(C.current.x,C.current.y)};return r.addEventListener("mousemove",F),window.addEventListener("scroll",D,!0),()=>{r.removeEventListener("mousemove",F),window.removeEventListener("scroll",D,!0)}},[r,w,u,P,B,W,E,A,$,l]),d.useEffect(()=>{w||(g("none"),f(0))},[w]);const j=async(k,F,D,H={})=>{const{width:I,height:K,finalWidth:Q}=await Bl(k.image.url,v,M,L);let Z=0,R=0;N==="same"?(Z=F/2,R=D/2):(Z=H.x??Math.random()*F,R=H.y??Math.random()*D);const ne=Math.min(Math.max(Z,I/2),F-I/2),h=Math.min(Math.max(R,K/2),D-K/2);return{id:p.current++,url:k.image.url,link:k.link,name:k.image.name,x:ne,y:h,width:Q}};d.useEffect(()=>{if(!r||t.length===0)return;const k=r.getBoundingClientRect(),F=k.width,D=k.height,H=[];(async()=>{const K=t[0],Q=await j(K,F,D);H.push(Q),o(H),s(1)})()},[v,M,L,N,r]),d.useEffect(()=>{b==="last One"&&o(k=>k.length>0?[k[k.length-1]]:[])},[b]);const te=async k=>{if(!r)return;const F=r.getBoundingClientRect(),D=k.clientX-F.left,H=k.clientY-F.top;if(B==="image"&&!ei(D,H,l))return;let I=0,K=0;N==="on Click"?(I=D,K=H):N==="same"?(I=F.width/2,K=F.height/2):(I=Math.random()*F.width,K=Math.random()*F.height);const Q=t[c],Z=await j(Q,F.width,F.height,{x:I,y:K});o(R=>b==="all"?[...R,Z]:[Z]),s(R=>R>=t.length-1?0:R+1)};return a.jsxs("div",{ref:i,onClick:te,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),className:pn.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[l.map(k=>a.jsx("div",{className:pn.wrapper,style:{top:`${k.y}px`,left:`${k.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:k.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:B==="area"&&k.link?a.jsx("a",{href:k.link,target:"_blank",className:pn.link,children:a.jsx("img",{src:k.url,alt:k.name,className:pn.image},k.id)}):a.jsx("img",{src:k.url,alt:k.name,className:pn.image},k.id)},k.id)),w&&a.jsx("div",{className:pn.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Dl={element:Vl,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:""}]}}}},zl="LightBox-module__hidden___9s-9x",jl="LightBox-module__heroImage___sTxNF",ql="LightBox-module__background___rm9ml",Kl="LightBox-module__editor___4ACaY",Ul="LightBox-module__contentStyle___Bgnsq",Gl="LightBox-module__imageStyle___tLIlB",Yl="LightBox-module__imgWrapper___LuFUp",Xl="LightBox-module__contain___8-yaS",Ql="LightBox-module__cover___hNvOG",Zl="LightBox-module__caption___b6L2I",Jl="LightBox-module__captionTextInner___rCGNH",ec="LightBox-module__lightboxSplide___XFuWC",tc="LightBox-module__arrow___iz38X",nc="LightBox-module__arrowVertical___Zfz81",rc="LightBox-module__nextArrow___zkAQN",oc="LightBox-module__arrowInner___p48sW",ic="LightBox-module__arrowIcon___3VaFf",ac="LightBox-module__arrowImg___pNV88",sc="LightBox-module__mirror___pjeXc",lc="LightBox-module__thumbsWrapper___GB-nU",cc="LightBox-module__thumbsContainerVertical___wttk5",dc="LightBox-module__thumbsContainer___osSma",uc="LightBox-module__thumbsAlignStart___MO6tY",pc="LightBox-module__thumbsAlignCenter___Q4sUx",mc="LightBox-module__thumbsAlignEnd___p4y9R",gc="LightBox-module__thumbItem___HvnF3",hc="LightBox-module__closeButton___g2khP",fc="LightBox-module__fadeIn___0m5GW",yc="LightBox-module__slideInLeft___gPYwC",vc="LightBox-module__slideInRight___S-pPp",bc="LightBox-module__slideInTop___DFdAj",xc="LightBox-module__slideInBottom___m27kZ",Cc="LightBox-module__fadeOut___55qBR",Sc="LightBox-module__slideOutLeft___NvU7P",$c="LightBox-module__slideOutRight___SK7eC",wc="LightBox-module__slideOutTop___Vgg0z",Tc="LightBox-module__slideOutBottom___nJ0Ef",Lc="LightBox-module__scaleSlide___vZriG",J={hidden:zl,heroImage:jl,background:ql,editor:Kl,contentStyle:Ul,imageStyle:Gl,imgWrapper:Yl,contain:Xl,cover:Ql,caption:Zl,captionTextInner:Jl,lightboxSplide:ec,arrow:tc,arrowVertical:nc,nextArrow:rc,arrowInner:oc,arrowIcon:ic,arrowImg:ac,mirror:sc,thumbsWrapper:lc,thumbsContainerVertical:cc,thumbsContainer:dc,thumbsAlignStart:uc,thumbsAlignCenter:pc,thumbsAlignEnd:mc,thumbItem:gc,closeButton:hc,fadeIn:fc,slideInLeft:yc,slideInRight:vc,slideInTop:bc,slideInBottom:xc,fadeOut:Cc,slideOutLeft:Sc,slideOutRight:$c,slideOutTop:wc,slideOutBottom:Tc,scaleSlide:Lc},rr=(e,t,n)=>{const r={},[i,l]=e.split("-");return i==="top"?(r.top="0",r.bottom="auto"):i==="middle"?(r.top="50%",r.bottom="auto"):i==="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"),i==="middle"&&l==="center"?r.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), calc(-50% + ${y.scalingValue(t.y,n)}))`:i==="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 ga(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 ti(e){const t=e.getBoundingClientRect(),n=ga(e),r=Math.max(0,t.width-n.left-n.right),i=Math.max(0,t.height-n.top-n.bottom),l=e.naturalWidth,o=e.naturalHeight,c=r/i,s=l/o;let p,u;s>c?(p=r,u=r/s):(u=i,p=i*s);const T=t.left+n.left,x=t.top+n.top,f=(r-p)/2+T,m=(i-u)/2+x;return{x:f,y:m,width:p,height:u}}function ni(e){const t=e.getBoundingClientRect(),n=ga(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function ri(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(i=>parseFloat(i.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 Pc(e,t){const n=(()=>{if(e==="fade in")return J.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return J.slideInLeft;case"right":return J.slideInRight;case"top":return J.slideInTop;case"bottom":return J.slideInBottom;default:return J.slideInRight}return J.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return J.fadeIn;if(e==="slide in")switch(t){case"left":return J.slideInLeft;case"right":return J.slideInRight;case"top":return J.slideInTop;case"bottom":return J.slideInBottom;default:return J.slideInRight}return J.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return J.fadeOut;if(e==="slide in")switch(t){case"left":return J.slideOutLeft;case"right":return J.slideOutRight;case"top":return J.slideOutTop;case"bottom":return J.slideOutBottom;default:return J.slideOutRight}return J.fadeOut})(),l=(()=>{if(e==="fade in")return J.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return J.slideOutLeft;case"right":return J.slideOutRight;case"top":return J.slideOutTop;case"bottom":return J.slideOutBottom;default:return J.slideOutRight}return J.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:i,disappearClass:l}}const Ec=({settings:e,content:t,styles:n,portalId:r,activeEvent:i,isEditor:l,isPreviewMode:o})=>{const[c,s]=d.useState(!1),{url:p}=e.thumbnailBlock.cover;return d.useEffect(()=>{i==="close"&&s(!1),i==="open"&&s(!0)},[i]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:p,alt:"Cover",className:J.heroImage,onClick:()=>s(!0)}),a.jsx(_c,{isOpen:c,onClose:()=>s(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:l})]})},_c=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:i,portalId:l,isEditor:o,metadata:c})=>{var Ee;const{widthSettings:s,fontSettings:p,letterSpacing:u,textAlign:T,wordSpacing:x,fontSizeLineHeight:f,textAppearance:m,color:g}=r.imageCaption??{},[C,w]=d.useState(0),[S,v]=d.useState(0),[M,L]=d.useState(!1),[N,b]=d.useState(!1),[P,B]=d.useState({}),$=d.useRef(null),E=d.useRef(null),A=d.useRef(null),W=d.useRef(!1),j=d.useRef(null),te=d.useRef(null),k=d.useRef(null),F=d.useRef(null),D=d.useRef(!1),H=d.useRef(null),[I,K]=d.useState(!1),{appear:Q,triggers:Z,slider:R,thumbnail:ne,controls:h,area:ee,caption:ge,layout:le}=i.lightboxBlock,{appearClass:be,backdropAppearClass:re,backdropDisappearClass:ce,disappearClass:V}=Pc(Q.type,Q.direction),U=(c==null?void 0:c.itemId)??null;d.useEffect(()=>{const O=()=>{setTimeout(()=>{var _,z;(z=(_=$.current)==null?void 0:_.splide)==null||z.refresh()},16)},oe=()=>{v(_=>_+1)};return window.addEventListener("ArticleEditor.Layout:change",O),window.addEventListener("ArticleEditor.ComponentContent:change",oe),()=>{window.removeEventListener("ArticleEditor.Layout:change",O),window.removeEventListener("ArticleEditor.ComponentContent:change",oe)}},[]),d.useEffect(()=>{if(!e||!ne.isActive){K(!1);return}const O=H.current;if(!O)return;const oe=()=>{R.direction==="horiz"?K(O.scrollWidth>O.clientWidth):K(O.scrollHeight>O.clientHeight)};oe();const _=new ResizeObserver(oe);return _.observe(O),()=>_.disconnect()},[e,ne.isActive,n.length,P,R.direction]);const G=d.useCallback(()=>{const O=window.matchMedia("(max-width: 768px)").matches,oe=ri(ee.color);O&&!o&&oe>.9&&(document.body.style.backgroundColor=""),L(!0),W.current=!0;const _=z=>{z.target===j.current&&z.animationName&&(j.current&&te.current&&j.current.removeEventListener("animationend",te.current),te.current=null,W.current&&(W.current=!1,t()),L(!1))};j.current&&(te.current=_,j.current.addEventListener("animationend",_))},[t,ee.color,o]),se=(O,oe,_)=>{var z,q;if(O){if(Z.type==="click"&&Z.switch==="image")Z.repeat==="close"&&C===n.length-1?G():(z=$.current)==null||z.go("+1");else if(Z.type==="click"&&Z.switch==="50/50"){const Y=O.getBoundingClientRect(),ae=oe-Y.left,me=_-Y.top,We=Y.width,he=Y.height;let ve;R.direction==="horiz"?ve=ae<We/2?"-1":"+1":ve=me<he/2?"-1":"+1",(q=$.current)==null||q.go(ve)}}},ye=O=>{if(D.current){D.current=!1;return}const oe=n[C],_=(oe==null?void 0:oe.image.objectFit)==="cover";let z,q;if("changedTouches"in O&&O.changedTouches.length>0)z=O.changedTouches[0].clientX,q=O.changedTouches[0].clientY;else if("clientX"in O)z=O.clientX,q=O.clientY;else return;let Y;if(_&&A.current){const ae=ni(A.current);Y=z>=ae.left&&z<=ae.right&&q>=ae.top&&q<=ae.bottom}else{const ae=A.current?ti(A.current):null;if(!ae){O.target===O.currentTarget&&G();return}Y=z>=ae.x&&z<=ae.x+ae.width&&q>=ae.y&&q<=ae.y+ae.height}Y?se(A.current,z,q):G()},Te=O=>{const oe=O.target;(oe.classList.contains(J.thumbsWrapper)||oe.classList.contains(J.thumbsContainer))&&ye(O)};d.useEffect(()=>{if(!e)return;const O=oe=>{var _,z;if(oe.key==="Escape"){G();return}if(oe.key==="ArrowRight"){w(q=>(q+1)%Math.max(n.length,1)),(_=$.current)==null||_.go("+1");return}oe.key==="ArrowLeft"&&(w(q=>(q-1+Math.max(n.length,1))%Math.max(n.length,1)),(z=$.current)==null||z.go("-1"))};return window.addEventListener("keydown",O),()=>{window.removeEventListener("keydown",O)}},[e,G,n.length]),d.useEffect(()=>{if(e){if(w(0),v(oe=>oe+1),W.current=!1,L(!1),b(!1),B({}),!U)return;const O=new CustomEvent("page-overlay",{detail:{itemId:U}});window.dispatchEvent(O)}return()=>{j.current&&te.current&&(j.current.removeEventListener("animationend",te.current),te.current=null),b(!1)}},[e,U]),d.useEffect(()=>{E.current!==null&&E.current!==R.type&&v(O=>O+1),E.current=R.type},[R.type]),d.useEffect(()=>{if(!e)return;const O=document.body.style.overflow,oe=window.matchMedia("(max-width: 768px)").matches,_=ri(ee.color);document.body.style.overflow="hidden",b(!1);const z=Y=>{Y.target===j.current&&!W.current&&Y.animationName&&(oe&&!o&&_>.9&&(document.body.style.backgroundColor=ee.color),b(!0),j.current&&k.current&&j.current.removeEventListener("animationend",k.current),k.current=null)};j.current&&(k.current=z,j.current.addEventListener("animationend",z));const q=Y=>{const ae=Y.target;ae&&(ae.closest(`.${J.thumbsWrapper}`)||ae.closest(`.${J.thumbsContainer}`))||R.type!=="slide"&&Y.preventDefault()};return document.addEventListener("touchmove",q,{passive:!1}),()=>{document.body.style.overflow=O,document.removeEventListener("touchmove",q),j.current&&k.current&&(j.current.removeEventListener("animationend",k.current),k.current=null),b(!1)}},[e,o,ee.color,R.type]),d.useEffect(()=>{if(!e)return;const O=oe=>{var z,q;if(W.current){oe.stopPropagation();return}if(D.current){D.current=!1;return}const _=oe.target;if(!(_&&(_.closest(`.${J.thumbsContainer}`)||_.closest(`.${J.thumbItem}`)||_.closest(`.${J.arrow}`)||_.closest(`.${J.closeButton}`)||_.closest(`.${J.caption}`)))){if(R.type==="slide"&&Z.type==="drag"&&((q=(z=$.current)==null?void 0:z.splide)!=null&&q.root)){const Y=$.current.splide.root;if(_&&(Y.contains(_)||Y===_))return}if(oe.touches.length===0&&oe.changedTouches.length>0){const Y=n[C],ae=(Y==null?void 0:Y.image.objectFit)==="cover",me=oe.changedTouches[0];let We;if(ae&&A.current){const he=ni(A.current);We=me.clientX>=he.left&&me.clientX<=he.right&&me.clientY>=he.top&&me.clientY<=he.bottom}else{const he=A.current?ti(A.current):null;if(!he)return;We=me.clientX>=he.x&&me.clientX<=he.x+he.width&&me.clientY>=he.y&&me.clientY<=he.y+he.height}if(!We){oe.stopPropagation(),W.current=!0;const he=ve=>{ve.stopPropagation(),ve.preventDefault(),document.removeEventListener("click",he,!0)};document.addEventListener("click",he,!0),G()}}}};return document.addEventListener("touchend",O,{passive:!0}),()=>{document.removeEventListener("touchend",O)}},[e,G,C,n]);const Se=(R.type==="scale"||R.type==="fade")&&R.direction==="vert"&&Z.type==="drag";d.useEffect(()=>{var ve,Fe;if(!e||!Se||!((Fe=(ve=$.current)==null?void 0:ve.splide)!=null&&Fe.root))return;const O=$.current.splide.root,oe=30,_=(ie,xe)=>{if(F.current){const Ae=Math.abs(ie-F.current.x),ke=Math.abs(xe-F.current.y);(Ae>0||ke>0)&&(D.current=!0)}},z=ie=>{F.current&&(ie.preventDefault(),_(ie.clientX,ie.clientY))},q=ie=>{F.current&&ie.touches.length>0&&(ie.preventDefault(),_(ie.touches[0].clientX,ie.touches[0].clientY))},Y=(ie,xe)=>{if(!F.current||!$.current){F.current=null;return}const Ae=Math.abs(ie-F.current.x),ke=Math.abs(xe-F.current.y);ke>oe&&ke>Ae&&$.current.go(xe<F.current.y?"+1":"-1"),F.current=null},ae=ie=>{F.current&&Y(ie.clientX,ie.clientY),document.removeEventListener("pointerup",ae),document.removeEventListener("pointercancel",ae),document.removeEventListener("pointermove",z)},me=ie=>{if(F.current){if(ie.changedTouches.length>0){const xe=ie.changedTouches[0];Y(xe.clientX,xe.clientY)}document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),document.removeEventListener("touchmove",q)}},We=ie=>{F.current={x:ie.clientX,y:ie.clientY},D.current=!1,document.addEventListener("pointermove",z,{passive:!1}),document.addEventListener("pointerup",ae),document.addEventListener("pointercancel",ae)},he=ie=>{ie.touches.length>0&&(F.current={x:ie.touches[0].clientX,y:ie.touches[0].clientY},D.current=!1,document.addEventListener("touchmove",q,{passive:!1}),document.addEventListener("touchend",me),document.addEventListener("touchcancel",me))};return O.addEventListener("pointerdown",We),O.addEventListener("touchstart",he),()=>{O.removeEventListener("pointerdown",We),O.removeEventListener("touchstart",he),document.removeEventListener("pointermove",z),document.removeEventListener("pointerup",ae),document.removeEventListener("pointercancel",ae),document.removeEventListener("touchmove",q),document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),F.current=null,D.current=!1}},[e,Se,S]);const Le={backgroundColor:ee.color,backdropFilter:`blur(${ee.blur}px)`,animationDuration:`${parseInt(Q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:Ii.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:o?null:j,className:Re(J.background,M?ce:re,{[J.editor]:o},{[J.hidden]:!e}),style:{...Le,...N&&!o&&!M?{position:"absolute"}:{}}}),a.jsxs("div",{ref:o?j:null,className:Re(J.contentStyle,M?V:be,{[J.editor]:o},{[J.hidden]:!e}),style:{animationDuration:`${parseInt(Q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Eo,{onMove:O=>w(O.index),ref:$,className:J.lightboxSplide,options:{arrows:!1,speed:R.duration?parseInt(R.duration):500,direction:R.direction==="horiz"||R.type==="fade"||R.type==="scale"?"ltr":"ttb",pagination:!1,drag:Z.type==="drag"&&!Se,perPage:1,width:"100%",height:"100%",type:R.type==="fade"||R.type==="scale"?"fade":"loop",padding:0,rewind:Z.repeat!=="close",start:0},style:{"--splide-speed":R.duration},children:n.map((O,oe)=>{const _=rr(le.position,le.offset,o),z=`${y.scalingValue(le.padding.top,o)} ${y.scalingValue(le.padding.right,o)} ${y.scalingValue(le.padding.bottom,o)} ${y.scalingValue(le.padding.left,o)}`,q=R.type==="scale"?(()=>{const{transform:Y,...ae}=_;return{...ae,position:"absolute",padding:z,boxSizing:"border-box","--position-transform":Y||"none"}})():{..._,position:"absolute",padding:z,boxSizing:"border-box"};return a.jsx(_o,{children:a.jsx("div",{className:J.imgWrapper,onClick:ye,children:a.jsx("img",{ref:oe===C?A:null,className:Re(J.imageStyle,{[J.contain]:O.image.objectFit==="contain",[J.cover]:O.image.objectFit==="cover",[J.scaleSlide]:R.type==="scale"}),src:O.image.url,alt:O.image.name??"",style:{...q,pointerEvents:O.image.objectFit==="contain"?"none":"auto"}})})},oe)})},S),h.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Re(J.arrow,{[J.arrowVertical]:R.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:a.jsxs("button",{className:J.arrowInner,style:{transform:`translate(${y.scalingValue(h.offset.x,o)}, ${y.scalingValue(h.offset.y*(R.direction==="horiz"?1:-1),o)}) scale(${h.scale}) rotate(${R.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var O;return(O=$.current)==null?void 0:O.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&a.jsx(Nt,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:Re(J.arrowImg,J.mirror)}),!h.arrowsImgUrl&&a.jsx(oi,{color:h.color,className:Re(J.arrowIcon,J.arrowImg,J.mirror)})]})}),a.jsx("div",{className:Re(J.arrow,J.nextArrow,{[J.arrowVertical]:R.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:a.jsxs("button",{className:J.arrowInner,style:{transform:`translate(${y.scalingValue(h.offset.x*(R.direction==="horiz"?-1:1),o)}, ${y.scalingValue(h.offset.y,o)}) scale(${h.scale}) rotate(${R.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var O;return(O=$.current)==null?void 0:O.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&a.jsx(Nt,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:J.arrowImg}),!h.arrowsImgUrl&&a.jsx(oi,{color:h.color,className:Re(J.arrowIcon,J.arrowImg)})]})})]}),ee.closeIconUrl&&(()=>{const O=rr(ee.closeIconAlign,ee.closeIconOffset,o),oe=`scale(${ee.closeIconScale})`,_=O.transform?`${O.transform} ${oe}`:oe;return a.jsx("button",{className:J.closeButton,style:{...O,transform:_},onClick:G,"aria-label":"Close lightbox",children:a.jsx(Nt,{url:ee.closeIconUrl,fill:ee.closeIconColor??"#000000",hoverFill:ee.closeIconHover??"#cccccc"})})})(),ge&&ge.isActive&&r.imageCaption&&((Ee=n[C])==null?void 0:Ee.imageCaption)&&a.jsx("div",{className:J.caption,style:{...rr(ge.alignment,ge.offset,o),fontFamily:kr(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:s.sizing==="auto"?"max-content":y.scalingValue(s.width,o),letterSpacing:y.scalingValue(u,o),wordSpacing:y.scalingValue(x,o),textAlign:T,fontSize:y.scalingValue(f.fontSize,o),lineHeight:y.scalingValue(f.lineHeight,o),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:J.captionTextInner,style:{"--link-color":ge.linkColor,"--link-hover-color":ge.linkHoverColor},children:a.jsx(Sn,{content:n[C].imageCaption})})}),ne.isActive&&(()=>{const[O,oe]=ne.position.split("-"),_=R.direction==="horiz"?`${O}-left`:ne.position,z=rr(_,ne.offset,o),q=()=>{if(R.direction==="horiz"){if(oe==="left")return"flex-start";if(oe==="center")return"center";if(oe==="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:H,className:J.thumbsWrapper,onClick:Y=>Te(Y),style:{position:o?"absolute":"fixed",...z,...R.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Re(J.thumbsContainer,{[J.thumbsContainerVertical]:R.direction==="vert",[J.thumbsAlignStart]:ne.align==="start",[J.thumbsAlignCenter]:ne.align==="center",[J.thumbsAlignEnd]:ne.align==="end"}),style:{gap:y.scalingValue(ne.grid.gap,o),justifyContent:I?"flex-start":q()},children:n.map((Y,ae)=>{const me=ae===C,We=P[ae],ve=ne.grid.size*(me?ne.activeState.scale:1),Fe=()=>{if(ne.fit!=="fit")return{};if(!We)return R.direction==="horiz"?{height:y.scalingValue(ve,o)}:{width:y.scalingValue(ve,o)};const ie=We.width/We.height;if(R.direction==="horiz"){const xe=ve,Ae=xe*ie;return{width:y.scalingValue(Ae,o),height:y.scalingValue(xe,o)}}else{const xe=ve,Ae=xe/ie;return{width:y.scalingValue(xe,o),height:y.scalingValue(Ae,o)}}};return a.jsx("button",{className:J.thumbItem,style:{...R.direction==="horiz"&&ne.fit!=="fit"?{height:y.scalingValue(ve,o)}:{},...R.direction==="vert"&&ne.fit!=="fit"?{width:y.scalingValue(ve,o)}:{},...ne.fit==="cover"?{width:y.scalingValue(ve,o),height:y.scalingValue(ve,o)}:{},...Fe(),transition:me?"all 0.25s ease-out":"none",opacity:me?ne.activeState.opacity/100:ne.opacity/100,"--thumb-hover":ne.activeState.opacity/100},onClick:ie=>{var xe;ie.stopPropagation(),w(ae),(xe=$.current)==null||xe.go(ae)},onMouseEnter:()=>{var ie;ne.triggers==="hov"&&((ie=$.current)==null||ie.go(ae))},children:a.jsx("img",{src:Y.image.url,alt:Y.image.name??"",onLoad:ie=>{const xe=ie.currentTarget;xe.naturalWidth&&xe.naturalHeight&&B(Ae=>({...Ae,[ae]:{width:xe.naturalWidth,height:xe.naturalHeight}}))},style:{objectFit:ne.fit==="cover"?"cover":"contain",...ne.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ne.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Y.image.name}-${ae}`)})})})})()]})]}),document.getElementById(l))};function oi({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 Ac={element:Ec,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 or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ic(e){return`
|
|
6
|
+
*/const Tl="RichTextRenderer-module__link___BWeZ2",Ll={link:Tl},Pl=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))},kr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Pl(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function yt(e){const{color:t,...n}=e;return n}function Ze(e,t){var i,l,o;const{fontSize:n,lineHeight:r}=e;return{fontFamily:kr(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:(i=e.textAppearance)==null?void 0:i.textTransform,textDecoration:(l=e.textAppearance)==null?void 0:l.textDecoration,fontVariant:(o=e.textAppearance)==null?void 0:o.fontVariant,textAlign:e.textAlign,color:e.color}}const Sn=({content:e})=>{const t=n=>n.map((r,i)=>r.type==="link"?a.jsx("a",{className:Ll.link,href:r.value,target:r.target,children:t(r.children)},i):a.jsx("span",{style:El(r),children:r.text},i));return a.jsx(a.Fragment,{children:e.map((n,r)=>{const i=n.children;return a.jsx("div",{children:t(i)},r)})})};function El(e){return{...e.fontFamily&&{fontFamily:kr(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 _l="SvgImage-module__svg___q3xE-",Al="SvgImage-module__img___VsTm-",Zo={svg:_l,img:Al},Il=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Rl=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Nt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:i})=>{const[l,o]=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("")');o(c)}},[]),!Il(e)||!l?a.jsx("img",{src:e,alt:"",className:Re(Zo.img,r),style:i}):a.jsx("span",{"data-supports-mask":l,className:Re(Zo.svg,r),style:{"--svg":Rl(e),"--fill":t,"--hover-fill":n,...i??{}}})},kl={"top-left":de.topLeftAlignment,"top-center":de.topCenterAlignment,"top-right":de.topRightAlignment,"middle-left":de.middleLeftAlignment,"middle-center":de.middleCenterAlignment,"middle-right":de.middleRightAlignment,"bottom-left":de.bottomLeftAlignment,"bottom-center":de.bottomCenterAlignment,"bottom-right":de.bottomRightAlignment};function Wl({settings:e,content:t,styles:n,isEditor:r}){const[i,l]=d.useState(null),{widthSettings:o,fontSettings:c,letterSpacing:s,textAlign:p,wordSpacing:u,fontSizeLineHeight:T,textAppearance:x,color:f}=n.imageCaption??{},[m,g]=d.useState(void 0),[C,w]=d.useState(null),[S,v]=d.useState(0),[M,L]=d.useState(0),{direction:N,transition:b,controls:P,pagination:O,imageCaption:$,triggers:E}=e,A=d.useRef(b.type),{x:W,y:j}=e.controls.offset,te=k=>{i&&i.go(k)};return d.useEffect(()=>{if(!C)return;const k=new ResizeObserver(F=>{if(!i)return;const[D]=F;g({width:Math.round(D.contentRect.width),height:Math.round(D.contentRect.height)})});return k.observe(C),()=>k.unobserve(C)},[C]),d.useEffect(()=>{!i||A.current===b.type||(L(k=>k+1),A.current=b.type)},[b.type]),a.jsx("div",{className:Re(de.wrapper,{[de.editor]:r}),ref:w,children:a.jsxs("div",{className:de.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Re(de.captionBlock),children:a.jsx("div",{className:de.captionTextWrapper,children:t.map((k,F)=>a.jsx("div",{className:Re(de.captionText,kl[$.alignment],{[de.withPointerEvents]:F===S&&r,[de.active]:F===S}),style:{fontFamily:kr(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:o.sizing==="auto"?"max-content":y.scalingValue(o.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:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:f,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:de.captionTextInner,style:{"--link-hover-color":$.linkHoverColor,"--link-color":$.linkColor,position:"relative",top:y.scalingValue($.offset.y,r),left:y.scalingValue($.offset.x,r)},children:a.jsx(Sn,{content:k.imageCaption})})},F))})}),a.jsx(Eo,{onMove:k=>{v(k.index)},ref:l,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:E.autoPlay!==null,...E.autoPlay!==null&&{interval:parseInt(E.autoPlay)*1e3},direction:N==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:E.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((k,F)=>a.jsx(_o,{children:a.jsx("div",{className:de.sliderItem,children:a.jsx("div",{className:de.imgWrapper,children:a.jsx("img",{className:Re(de.sliderImage,{[de.contain]:k.image.objectFit==="contain",[de.cover]:k.image.objectFit==="cover"}),src:k.image.url,alt:k.image.name??""})})})},F))},M),P.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Re(de.arrow,{[de.arrowVertical]:N==="vert",[de.hoverArrow]:P.show==="on hover"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:a.jsxs("button",{onClick:()=>{te("-1")},className:de.arrowInner,style:{transform:`translate(${y.scalingValue(W,r)}, ${y.scalingValue(j*(N==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:[P.arrowsImgUrl&&a.jsx(Nt,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:Re(de.arrowImg,de.mirror)}),!P.arrowsImgUrl&&a.jsx(Jo,{color:P.color,className:Re(de.arrowIcon,de.arrowImg,de.mirror)})]})}),a.jsx("div",{className:Re(de.arrow,de.nextArrow,{[de.arrowVertical]:N==="vert",[de.hoverArrow]:P.show==="on hover"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:a.jsxs("button",{className:de.arrowInner,onClick:()=>te("+1"),style:{transform:`translate(${y.scalingValue(W*(N==="horiz"?-1:1),r)}, ${y.scalingValue(j,r)}) scale(${e.controls.scale/100}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:[P.arrowsImgUrl&&a.jsx(Nt,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:de.arrowImg}),!P.arrowsImgUrl&&a.jsx(Jo,{color:P.color,className:Re(de.arrowIcon,de.arrowImg)})]})})]}),E.triggersList.click&&a.jsx("div",{className:de.clickOverlay,onClick:()=>{i&&i.go("+1")}}),O.isActive&&a.jsx("div",{className:Re(de.pagination,{[de.paginationInsideBottom]:O.position==="inside-1"&&N==="horiz",[de.paginationInsideTop]:O.position==="inside-2"&&N==="horiz",[de.paginationOutsideBottom]:O.position==="outside-1"&&N==="horiz",[de.paginationOutsideTop]:O.position==="outside-2"&&N==="horiz",[de.paginationInsideLeft]:O.position==="inside-1"&&N==="vert",[de.paginationInsideRight]:O.position==="inside-2"&&N==="vert",[de.paginationOutsideLeft]:O.position==="outside-1"&&N==="vert",[de.paginationOutsideRight]:O.position==="outside-2"&&N==="vert",[de.paginationVertical]:N==="vert"}),children:a.jsx("div",{className:de.paginationInner,style:{backgroundColor:O.colors[2],transform:`scale(${O.scale/100}) translate(${y.scalingValue(O.offset.x,r)}, ${y.scalingValue(O.offset.y,r)}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:t.map((k,F)=>a.jsx("button",{onClick:()=>{i&&i.go(F)},className:Re(de.paginationItem),children:a.jsx("div",{className:Re(de.dot,{[de.activeDot]:F===S}),style:{backgroundColor:F===S?O.colors[0]:O.colors[1],"--pagination-hover-color":O.hover}})},F))})})]})})}function Jo({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 Fl={element:Wl,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"]}},Ml="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Nl="ImageRevealSlider-module__image___Qjt-e",Hl="ImageRevealSlider-module__link___N-iLG",Bl="ImageRevealSlider-module__cursor___2U03d",pn={imageRevealSlider:Ml,image:Nl,link:Hl,cursor:Bl};function ei(e,t,n){for(const r of n){const i=new Image;i.src=r.url;const l=r.width?Number.parseFloat(r.width):i.naturalWidth,o=i.naturalHeight/i.naturalWidth*l,c=l/2,s=o/2;if(e>=r.x-c&&e<=r.x+c&&t>=r.y-s&&t<=r.y+s)return!0}return!1}function Dr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ol(e,t,n,r){let i,l;if(t==="custom"){i=n;const o=await Dr(e);l=o.height/o.width*i}else if(t==="random"){i=Math.random()*(r.max-r.min)+r.min;const o=await Dr(e);l=o.height/o.width*i}else{const o=await Dr(e);i=o.width,l=o.height}return{width:i,height:l,finalWidth:`${i}px`}}function Vl({settings:e,content:t,isEditor:n}){const[r,i]=d.useState(null),[l,o]=d.useState([]),[c,s]=d.useState(0),p=d.useRef(0),[u,T]=d.useState({x:0,y:0}),[x,f]=d.useState(1),[m,g]=d.useState("none"),C=d.useRef({x:0,y:0}),[w,S]=d.useState(!1),{sizeType:v,imageWidth:M,randomRangeImageWidth:L}=e.imageSize,{revealPosition:N,visible:b}=e.position,{cursorType:P,target:O,defaultCursorScale:$,defaultCursor:E,hoverCursorScale:A,hoverCursor:W}=e.cursor;d.useEffect(()=>{if(!r)return;const k=(H,I)=>{const K=r.getBoundingClientRect(),Q=H-K.left,Z=I-K.top;if(T({x:Q,y:Z}),P==="system"){g("none"),f(1);return}const R=Q,ne=Z,h=document.elementFromPoint(K.left+R,K.top+ne);if(h&&h.closest("a")){g("none"),f(1);return}const ee=ei(R,ne,l)||O==="area"?{img:W??"none",scale:A}:{img:E??"none",scale:$};g(ee.img),f(ee.scale)},F=H=>{H.stopPropagation(),C.current={x:H.clientX,y:H.clientY},k(H.clientX,H.clientY)},D=()=>{w&&k(C.current.x,C.current.y)};return r.addEventListener("mousemove",F),window.addEventListener("scroll",D,!0),()=>{r.removeEventListener("mousemove",F),window.removeEventListener("scroll",D,!0)}},[r,w,u,P,O,W,E,A,$,l]),d.useEffect(()=>{w||(g("none"),f(0))},[w]);const j=async(k,F,D,H={})=>{const{width:I,height:K,finalWidth:Q}=await Ol(k.image.url,v,M,L);let Z=0,R=0;N==="same"?(Z=F/2,R=D/2):(Z=H.x??Math.random()*F,R=H.y??Math.random()*D);const ne=Math.min(Math.max(Z,I/2),F-I/2),h=Math.min(Math.max(R,K/2),D-K/2);return{id:p.current++,url:k.image.url,link:k.link,name:k.image.name,x:ne,y:h,width:Q}};d.useEffect(()=>{if(!r||t.length===0)return;const k=r.getBoundingClientRect(),F=k.width,D=k.height,H=[];(async()=>{const K=t[0],Q=await j(K,F,D);H.push(Q),o(H),s(1)})()},[v,M,L,N,r]),d.useEffect(()=>{b==="last One"&&o(k=>k.length>0?[k[k.length-1]]:[])},[b]);const te=async k=>{if(!r)return;const F=r.getBoundingClientRect(),D=k.clientX-F.left,H=k.clientY-F.top;if(O==="image"&&!ei(D,H,l))return;let I=0,K=0;N==="on Click"?(I=D,K=H):N==="same"?(I=F.width/2,K=F.height/2):(I=Math.random()*F.width,K=Math.random()*F.height);const Q=t[c],Z=await j(Q,F.width,F.height,{x:I,y:K});o(R=>b==="all"?[...R,Z]:[Z]),s(R=>R>=t.length-1?0:R+1)};return a.jsxs("div",{ref:i,onClick:te,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),className:pn.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[l.map(k=>a.jsx("div",{className:pn.wrapper,style:{top:`${k.y}px`,left:`${k.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:k.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:O==="area"&&k.link?a.jsx("a",{href:k.link,target:"_blank",className:pn.link,children:a.jsx("img",{src:k.url,alt:k.name,className:pn.image},k.id)}):a.jsx("img",{src:k.url,alt:k.name,className:pn.image},k.id)},k.id)),w&&a.jsx("div",{className:pn.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Dl={element:Vl,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:""}]}}}},zl="LightBox-module__hidden___9s-9x",jl="LightBox-module__heroImage___sTxNF",ql="LightBox-module__background___rm9ml",Kl="LightBox-module__editor___4ACaY",Ul="LightBox-module__contentStyle___Bgnsq",Gl="LightBox-module__imageStyle___tLIlB",Yl="LightBox-module__imgWrapper___LuFUp",Xl="LightBox-module__contain___8-yaS",Ql="LightBox-module__cover___hNvOG",Zl="LightBox-module__caption___b6L2I",Jl="LightBox-module__captionTextInner___rCGNH",ec="LightBox-module__lightboxSplide___XFuWC",tc="LightBox-module__arrow___iz38X",nc="LightBox-module__arrowVertical___Zfz81",rc="LightBox-module__nextArrow___zkAQN",oc="LightBox-module__arrowInner___p48sW",ic="LightBox-module__arrowIcon___3VaFf",ac="LightBox-module__arrowImg___pNV88",sc="LightBox-module__mirror___pjeXc",lc="LightBox-module__thumbsWrapper___GB-nU",cc="LightBox-module__thumbsContainerVertical___wttk5",dc="LightBox-module__thumbsContainer___osSma",uc="LightBox-module__thumbsAlignStart___MO6tY",pc="LightBox-module__thumbsAlignCenter___Q4sUx",mc="LightBox-module__thumbsAlignEnd___p4y9R",gc="LightBox-module__thumbItem___HvnF3",hc="LightBox-module__closeButton___g2khP",fc="LightBox-module__fadeIn___0m5GW",yc="LightBox-module__slideInLeft___gPYwC",vc="LightBox-module__slideInRight___S-pPp",bc="LightBox-module__slideInTop___DFdAj",xc="LightBox-module__slideInBottom___m27kZ",Cc="LightBox-module__fadeOut___55qBR",Sc="LightBox-module__slideOutLeft___NvU7P",$c="LightBox-module__slideOutRight___SK7eC",wc="LightBox-module__slideOutTop___Vgg0z",Tc="LightBox-module__slideOutBottom___nJ0Ef",Lc="LightBox-module__scaleSlide___vZriG",J={hidden:zl,heroImage:jl,background:ql,editor:Kl,contentStyle:Ul,imageStyle:Gl,imgWrapper:Yl,contain:Xl,cover:Ql,caption:Zl,captionTextInner:Jl,lightboxSplide:ec,arrow:tc,arrowVertical:nc,nextArrow:rc,arrowInner:oc,arrowIcon:ic,arrowImg:ac,mirror:sc,thumbsWrapper:lc,thumbsContainerVertical:cc,thumbsContainer:dc,thumbsAlignStart:uc,thumbsAlignCenter:pc,thumbsAlignEnd:mc,thumbItem:gc,closeButton:hc,fadeIn:fc,slideInLeft:yc,slideInRight:vc,slideInTop:bc,slideInBottom:xc,fadeOut:Cc,slideOutLeft:Sc,slideOutRight:$c,slideOutTop:wc,slideOutBottom:Tc,scaleSlide:Lc},rr=(e,t,n)=>{const r={},[i,l]=e.split("-");return i==="top"?(r.top="0",r.bottom="auto"):i==="middle"?(r.top="50%",r.bottom="auto"):i==="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"),i==="middle"&&l==="center"?r.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), calc(-50% + ${y.scalingValue(t.y,n)}))`:i==="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 ga(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 ti(e){const t=e.getBoundingClientRect(),n=ga(e),r=Math.max(0,t.width-n.left-n.right),i=Math.max(0,t.height-n.top-n.bottom),l=e.naturalWidth,o=e.naturalHeight,c=r/i,s=l/o;let p,u;s>c?(p=r,u=r/s):(u=i,p=i*s);const T=t.left+n.left,x=t.top+n.top,f=(r-p)/2+T,m=(i-u)/2+x;return{x:f,y:m,width:p,height:u}}function ni(e){const t=e.getBoundingClientRect(),n=ga(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function ri(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(i=>parseFloat(i.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 Pc(e,t){const n=(()=>{if(e==="fade in")return J.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return J.slideInLeft;case"right":return J.slideInRight;case"top":return J.slideInTop;case"bottom":return J.slideInBottom;default:return J.slideInRight}return J.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return J.fadeIn;if(e==="slide in")switch(t){case"left":return J.slideInLeft;case"right":return J.slideInRight;case"top":return J.slideInTop;case"bottom":return J.slideInBottom;default:return J.slideInRight}return J.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return J.fadeOut;if(e==="slide in")switch(t){case"left":return J.slideOutLeft;case"right":return J.slideOutRight;case"top":return J.slideOutTop;case"bottom":return J.slideOutBottom;default:return J.slideOutRight}return J.fadeOut})(),l=(()=>{if(e==="fade in")return J.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return J.slideOutLeft;case"right":return J.slideOutRight;case"top":return J.slideOutTop;case"bottom":return J.slideOutBottom;default:return J.slideOutRight}return J.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:i,disappearClass:l}}const Ec=({settings:e,content:t,styles:n,portalId:r,activeEvent:i,isEditor:l,isPreviewMode:o})=>{const[c,s]=d.useState(!1),{url:p}=e.thumbnailBlock.cover;return d.useEffect(()=>{i==="close"&&s(!1),i==="open"&&s(!0)},[i]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:p,alt:"Cover",className:J.heroImage,onClick:()=>s(!0)}),a.jsx(_c,{isOpen:c,onClose:()=>s(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:l})]})},_c=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:i,portalId:l,isEditor:o,metadata:c})=>{var Ee;const{widthSettings:s,fontSettings:p,letterSpacing:u,textAlign:T,wordSpacing:x,fontSizeLineHeight:f,textAppearance:m,color:g}=r.imageCaption??{},[C,w]=d.useState(0),[S,v]=d.useState(0),[M,L]=d.useState(!1),[N,b]=d.useState(!1),[P,O]=d.useState({}),$=d.useRef(null),E=d.useRef(null),A=d.useRef(null),W=d.useRef(!1),j=d.useRef(null),te=d.useRef(null),k=d.useRef(null),F=d.useRef(null),D=d.useRef(!1),H=d.useRef(null),[I,K]=d.useState(!1),{appear:Q,triggers:Z,slider:R,thumbnail:ne,controls:h,area:ee,caption:ge,layout:le}=i.lightboxBlock,{appearClass:be,backdropAppearClass:re,backdropDisappearClass:ce,disappearClass:V}=Pc(Q.type,Q.direction),U=(c==null?void 0:c.itemId)??null;d.useEffect(()=>{const B=()=>{setTimeout(()=>{var _,z;(z=(_=$.current)==null?void 0:_.splide)==null||z.refresh()},16)},oe=()=>{v(_=>_+1)};return window.addEventListener("ArticleEditor.Layout:change",B),window.addEventListener("ArticleEditor.ComponentContent:change",oe),()=>{window.removeEventListener("ArticleEditor.Layout:change",B),window.removeEventListener("ArticleEditor.ComponentContent:change",oe)}},[]),d.useEffect(()=>{if(!e||!ne.isActive){K(!1);return}const B=H.current;if(!B)return;const oe=()=>{R.direction==="horiz"?K(B.scrollWidth>B.clientWidth):K(B.scrollHeight>B.clientHeight)};oe();const _=new ResizeObserver(oe);return _.observe(B),()=>_.disconnect()},[e,ne.isActive,n.length,P,R.direction]);const G=d.useCallback(()=>{const B=window.matchMedia("(max-width: 768px)").matches,oe=ri(ee.color);B&&!o&&oe>.9&&(document.body.style.backgroundColor=""),L(!0),W.current=!0;const _=z=>{z.target===j.current&&z.animationName&&(j.current&&te.current&&j.current.removeEventListener("animationend",te.current),te.current=null,W.current&&(W.current=!1,t()),L(!1))};j.current&&(te.current=_,j.current.addEventListener("animationend",_))},[t,ee.color,o]),se=(B,oe,_)=>{var z,q;if(B){if(Z.type==="click"&&Z.switch==="image")Z.repeat==="close"&&C===n.length-1?G():(z=$.current)==null||z.go("+1");else if(Z.type==="click"&&Z.switch==="50/50"){const Y=B.getBoundingClientRect(),ae=oe-Y.left,me=_-Y.top,We=Y.width,he=Y.height;let ve;R.direction==="horiz"?ve=ae<We/2?"-1":"+1":ve=me<he/2?"-1":"+1",(q=$.current)==null||q.go(ve)}}},ye=B=>{if(D.current){D.current=!1;return}const oe=n[C],_=(oe==null?void 0:oe.image.objectFit)==="cover";let z,q;if("changedTouches"in B&&B.changedTouches.length>0)z=B.changedTouches[0].clientX,q=B.changedTouches[0].clientY;else if("clientX"in B)z=B.clientX,q=B.clientY;else return;let Y;if(_&&A.current){const ae=ni(A.current);Y=z>=ae.left&&z<=ae.right&&q>=ae.top&&q<=ae.bottom}else{const ae=A.current?ti(A.current):null;if(!ae){B.target===B.currentTarget&&G();return}Y=z>=ae.x&&z<=ae.x+ae.width&&q>=ae.y&&q<=ae.y+ae.height}Y?se(A.current,z,q):G()},Te=B=>{const oe=B.target;(oe.classList.contains(J.thumbsWrapper)||oe.classList.contains(J.thumbsContainer))&&ye(B)};d.useEffect(()=>{if(!e)return;const B=oe=>{var _,z;if(oe.key==="Escape"){G();return}if(oe.key==="ArrowRight"){w(q=>(q+1)%Math.max(n.length,1)),(_=$.current)==null||_.go("+1");return}oe.key==="ArrowLeft"&&(w(q=>(q-1+Math.max(n.length,1))%Math.max(n.length,1)),(z=$.current)==null||z.go("-1"))};return window.addEventListener("keydown",B),()=>{window.removeEventListener("keydown",B)}},[e,G,n.length]),d.useEffect(()=>{if(e){if(w(0),v(oe=>oe+1),W.current=!1,L(!1),b(!1),O({}),!U)return;const B=new CustomEvent("page-overlay",{detail:{itemId:U}});window.dispatchEvent(B)}return()=>{j.current&&te.current&&(j.current.removeEventListener("animationend",te.current),te.current=null),b(!1)}},[e,U]),d.useEffect(()=>{E.current!==null&&E.current!==R.type&&v(B=>B+1),E.current=R.type},[R.type]),d.useEffect(()=>{if(!e)return;const B=document.body.style.overflow,oe=window.matchMedia("(max-width: 768px)").matches,_=ri(ee.color);document.body.style.overflow="hidden",b(!1);const z=Y=>{Y.target===j.current&&!W.current&&Y.animationName&&(oe&&!o&&_>.9&&(document.body.style.backgroundColor=ee.color),b(!0),j.current&&k.current&&j.current.removeEventListener("animationend",k.current),k.current=null)};j.current&&(k.current=z,j.current.addEventListener("animationend",z));const q=Y=>{const ae=Y.target;ae&&(ae.closest(`.${J.thumbsWrapper}`)||ae.closest(`.${J.thumbsContainer}`))||R.type!=="slide"&&Y.preventDefault()};return document.addEventListener("touchmove",q,{passive:!1}),()=>{document.body.style.overflow=B,document.removeEventListener("touchmove",q),j.current&&k.current&&(j.current.removeEventListener("animationend",k.current),k.current=null),b(!1)}},[e,o,ee.color,R.type]),d.useEffect(()=>{if(!e)return;const B=oe=>{var z,q;if(W.current){oe.stopPropagation();return}if(D.current){D.current=!1;return}const _=oe.target;if(!(_&&(_.closest(`.${J.thumbsContainer}`)||_.closest(`.${J.thumbItem}`)||_.closest(`.${J.arrow}`)||_.closest(`.${J.closeButton}`)||_.closest(`.${J.caption}`)))){if(R.type==="slide"&&Z.type==="drag"&&((q=(z=$.current)==null?void 0:z.splide)!=null&&q.root)){const Y=$.current.splide.root;if(_&&(Y.contains(_)||Y===_))return}if(oe.touches.length===0&&oe.changedTouches.length>0){const Y=n[C],ae=(Y==null?void 0:Y.image.objectFit)==="cover",me=oe.changedTouches[0];let We;if(ae&&A.current){const he=ni(A.current);We=me.clientX>=he.left&&me.clientX<=he.right&&me.clientY>=he.top&&me.clientY<=he.bottom}else{const he=A.current?ti(A.current):null;if(!he)return;We=me.clientX>=he.x&&me.clientX<=he.x+he.width&&me.clientY>=he.y&&me.clientY<=he.y+he.height}if(!We){oe.stopPropagation(),W.current=!0;const he=ve=>{ve.stopPropagation(),ve.preventDefault(),document.removeEventListener("click",he,!0)};document.addEventListener("click",he,!0),G()}}}};return document.addEventListener("touchend",B,{passive:!0}),()=>{document.removeEventListener("touchend",B)}},[e,G,C,n]);const Se=(R.type==="scale"||R.type==="fade")&&R.direction==="vert"&&Z.type==="drag";d.useEffect(()=>{var ve,Fe;if(!e||!Se||!((Fe=(ve=$.current)==null?void 0:ve.splide)!=null&&Fe.root))return;const B=$.current.splide.root,oe=30,_=(ie,xe)=>{if(F.current){const Ae=Math.abs(ie-F.current.x),ke=Math.abs(xe-F.current.y);(Ae>0||ke>0)&&(D.current=!0)}},z=ie=>{F.current&&(ie.preventDefault(),_(ie.clientX,ie.clientY))},q=ie=>{F.current&&ie.touches.length>0&&(ie.preventDefault(),_(ie.touches[0].clientX,ie.touches[0].clientY))},Y=(ie,xe)=>{if(!F.current||!$.current){F.current=null;return}const Ae=Math.abs(ie-F.current.x),ke=Math.abs(xe-F.current.y);ke>oe&&ke>Ae&&$.current.go(xe<F.current.y?"+1":"-1"),F.current=null},ae=ie=>{F.current&&Y(ie.clientX,ie.clientY),document.removeEventListener("pointerup",ae),document.removeEventListener("pointercancel",ae),document.removeEventListener("pointermove",z)},me=ie=>{if(F.current){if(ie.changedTouches.length>0){const xe=ie.changedTouches[0];Y(xe.clientX,xe.clientY)}document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),document.removeEventListener("touchmove",q)}},We=ie=>{F.current={x:ie.clientX,y:ie.clientY},D.current=!1,document.addEventListener("pointermove",z,{passive:!1}),document.addEventListener("pointerup",ae),document.addEventListener("pointercancel",ae)},he=ie=>{ie.touches.length>0&&(F.current={x:ie.touches[0].clientX,y:ie.touches[0].clientY},D.current=!1,document.addEventListener("touchmove",q,{passive:!1}),document.addEventListener("touchend",me),document.addEventListener("touchcancel",me))};return B.addEventListener("pointerdown",We),B.addEventListener("touchstart",he),()=>{B.removeEventListener("pointerdown",We),B.removeEventListener("touchstart",he),document.removeEventListener("pointermove",z),document.removeEventListener("pointerup",ae),document.removeEventListener("pointercancel",ae),document.removeEventListener("touchmove",q),document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),F.current=null,D.current=!1}},[e,Se,S]);const Le={backgroundColor:ee.color,backdropFilter:`blur(${ee.blur}px)`,animationDuration:`${parseInt(Q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:Ii.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:o?null:j,className:Re(J.background,M?ce:re,{[J.editor]:o},{[J.hidden]:!e}),style:{...Le,...N&&!o&&!M?{position:"absolute"}:{}}}),a.jsxs("div",{ref:o?j:null,className:Re(J.contentStyle,M?V:be,{[J.editor]:o},{[J.hidden]:!e}),style:{animationDuration:`${parseInt(Q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Eo,{onMove:B=>w(B.index),ref:$,className:J.lightboxSplide,options:{arrows:!1,speed:R.duration?parseInt(R.duration):500,direction:R.direction==="horiz"||R.type==="fade"||R.type==="scale"?"ltr":"ttb",pagination:!1,drag:Z.type==="drag"&&!Se,perPage:1,width:"100%",height:"100%",type:R.type==="fade"||R.type==="scale"?"fade":"loop",padding:0,rewind:Z.repeat!=="close",start:0},style:{"--splide-speed":R.duration},children:n.map((B,oe)=>{const _=rr(le.position,le.offset,o),z=`${y.scalingValue(le.padding.top,o)} ${y.scalingValue(le.padding.right,o)} ${y.scalingValue(le.padding.bottom,o)} ${y.scalingValue(le.padding.left,o)}`,q=R.type==="scale"?(()=>{const{transform:Y,...ae}=_;return{...ae,position:"absolute",padding:z,boxSizing:"border-box","--position-transform":Y||"none"}})():{..._,position:"absolute",padding:z,boxSizing:"border-box"};return a.jsx(_o,{children:a.jsx("div",{className:J.imgWrapper,onClick:ye,children:a.jsx("img",{ref:oe===C?A:null,className:Re(J.imageStyle,{[J.contain]:B.image.objectFit==="contain",[J.cover]:B.image.objectFit==="cover",[J.scaleSlide]:R.type==="scale"}),src:B.image.url,alt:B.image.name??"",style:{...q,pointerEvents:B.image.objectFit==="contain"?"none":"auto"}})})},oe)})},S),h.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Re(J.arrow,{[J.arrowVertical]:R.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:a.jsxs("button",{className:J.arrowInner,style:{transform:`translate(${y.scalingValue(h.offset.x,o)}, ${y.scalingValue(h.offset.y*(R.direction==="horiz"?1:-1),o)}) scale(${h.scale}) rotate(${R.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var B;return(B=$.current)==null?void 0:B.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&a.jsx(Nt,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:Re(J.arrowImg,J.mirror)}),!h.arrowsImgUrl&&a.jsx(oi,{color:h.color,className:Re(J.arrowIcon,J.arrowImg,J.mirror)})]})}),a.jsx("div",{className:Re(J.arrow,J.nextArrow,{[J.arrowVertical]:R.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:a.jsxs("button",{className:J.arrowInner,style:{transform:`translate(${y.scalingValue(h.offset.x*(R.direction==="horiz"?-1:1),o)}, ${y.scalingValue(h.offset.y,o)}) scale(${h.scale}) rotate(${R.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var B;return(B=$.current)==null?void 0:B.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&a.jsx(Nt,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:J.arrowImg}),!h.arrowsImgUrl&&a.jsx(oi,{color:h.color,className:Re(J.arrowIcon,J.arrowImg)})]})})]}),ee.closeIconUrl&&(()=>{const B=rr(ee.closeIconAlign,ee.closeIconOffset,o),oe=`scale(${ee.closeIconScale})`,_=B.transform?`${B.transform} ${oe}`:oe;return a.jsx("button",{className:J.closeButton,style:{...B,transform:_},onClick:G,"aria-label":"Close lightbox",children:a.jsx(Nt,{url:ee.closeIconUrl,fill:ee.closeIconColor??"#000000",hoverFill:ee.closeIconHover??"#cccccc"})})})(),ge&&ge.isActive&&r.imageCaption&&((Ee=n[C])==null?void 0:Ee.imageCaption)&&a.jsx("div",{className:J.caption,style:{...rr(ge.alignment,ge.offset,o),fontFamily:kr(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:s.sizing==="auto"?"max-content":y.scalingValue(s.width,o),letterSpacing:y.scalingValue(u,o),wordSpacing:y.scalingValue(x,o),textAlign:T,fontSize:y.scalingValue(f.fontSize,o),lineHeight:y.scalingValue(f.lineHeight,o),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:g},onClick:B=>B.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:J.captionTextInner,style:{"--link-color":ge.linkColor,"--link-hover-color":ge.linkHoverColor},children:a.jsx(Sn,{content:n[C].imageCaption})})}),ne.isActive&&(()=>{const[B,oe]=ne.position.split("-"),_=R.direction==="horiz"?`${B}-left`:ne.position,z=rr(_,ne.offset,o),q=()=>{if(R.direction==="horiz"){if(oe==="left")return"flex-start";if(oe==="center")return"center";if(oe==="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:H,className:J.thumbsWrapper,onClick:Y=>Te(Y),style:{position:o?"absolute":"fixed",...z,...R.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Re(J.thumbsContainer,{[J.thumbsContainerVertical]:R.direction==="vert",[J.thumbsAlignStart]:ne.align==="start",[J.thumbsAlignCenter]:ne.align==="center",[J.thumbsAlignEnd]:ne.align==="end"}),style:{gap:y.scalingValue(ne.grid.gap,o),justifyContent:I?"flex-start":q()},children:n.map((Y,ae)=>{const me=ae===C,We=P[ae],ve=ne.grid.size*(me?ne.activeState.scale:1),Fe=()=>{if(ne.fit!=="fit")return{};if(!We)return R.direction==="horiz"?{height:y.scalingValue(ve,o)}:{width:y.scalingValue(ve,o)};const ie=We.width/We.height;if(R.direction==="horiz"){const xe=ve,Ae=xe*ie;return{width:y.scalingValue(Ae,o),height:y.scalingValue(xe,o)}}else{const xe=ve,Ae=xe/ie;return{width:y.scalingValue(xe,o),height:y.scalingValue(Ae,o)}}};return a.jsx("button",{className:J.thumbItem,style:{...R.direction==="horiz"&&ne.fit!=="fit"?{height:y.scalingValue(ve,o)}:{},...R.direction==="vert"&&ne.fit!=="fit"?{width:y.scalingValue(ve,o)}:{},...ne.fit==="cover"?{width:y.scalingValue(ve,o),height:y.scalingValue(ve,o)}:{},...Fe(),transition:me?"all 0.25s ease-out":"none",opacity:me?ne.activeState.opacity/100:ne.opacity/100,"--thumb-hover":ne.activeState.opacity/100},onClick:ie=>{var xe;ie.stopPropagation(),w(ae),(xe=$.current)==null||xe.go(ae)},onMouseEnter:()=>{var ie;ne.triggers==="hov"&&((ie=$.current)==null||ie.go(ae))},children:a.jsx("img",{src:Y.image.url,alt:Y.image.name??"",onLoad:ie=>{const xe=ie.currentTarget;xe.naturalWidth&&xe.naturalHeight&&O(Ae=>({...Ae,[ae]:{width:xe.naturalWidth,height:xe.naturalHeight}}))},style:{objectFit:ne.fit==="cover"?"cover":"contain",...ne.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ne.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Y.image.name}-${ae}`)})})})})()]})]}),document.getElementById(l))};function oi({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 Ac={element:Ec,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 or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ic(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 Rc({settings:e,isEditor:t,isEditMode:n,isPreviewMode:r,metadata:i,activeEvent:l}){const o=!!n,c=r&&t||!t,{prefix:s}=y.useScopedStyles(),{type:p="A",fieldsToShow:u=2,fields:T=[],buttonLabel:x,gap:f,fieldsGap:m,buttonCorners:g,buttonStroke:C,buttonPadding:w,isButtonFullWidth:S,inputCorners:v,inputStroke:M,inputPadding:L,inputColor:N,inputTextColor:b,inputBorderColor:P,placeholderColor:
|
|
158
|
+
`}function Rc({settings:e,isEditor:t,isEditMode:n,isPreviewMode:r,metadata:i,activeEvent:l}){const o=!!n,c=r&&t||!t,{prefix:s}=y.useScopedStyles(),{type:p="A",fieldsToShow:u=2,fields:T=[],buttonLabel:x,gap:f,fieldsGap:m,buttonCorners:g,buttonStroke:C,buttonPadding:w,isButtonFullWidth:S,inputCorners:v,inputStroke:M,inputPadding:L,inputColor:N,inputTextColor:b,inputBorderColor:P,placeholderColor:O,buttonColor:$,buttonTextColor:E,buttonBorderColor:A,labelTextColor:W,successColor:j,errorColor:te,fontFamily:k,inputFontSettings:F,inputFontSize:D,inputLineHeight:H,inputLetterSpacing:I,inputWordSpacing:K,inputTextAppearance:Q,buttonFontSettings:Z,buttonFontSize:R,buttonLineHeight:ne,buttonLetterSpacing:h,buttonWordSpacing:ee,buttonTextAppearance:ge,labelFontSettings:le,labelFontSize:be,labelLineHeight:re,labelLetterSpacing:ce,labelWordSpacing:V,labelTextAppearance:U,statusFontSettings:G,statusFontSize:se,statusLineHeight:ye,statusLetterSpacing:Te,statusWordSpacing:Se,statusTextAppearance:Le,successMessage:Ee,errorMessage:B,stateOverrides:oe}=e,_=p==="B",z=T.slice(0,Math.min(u,T.length)),q={fontSettings:{fontFamily:k,fontWeight:(F==null?void 0:F.fontWeight)??400,fontStyle:(F==null?void 0:F.fontStyle)??"normal"},fontSize:D??.01,lineHeight:H,letterSpacing:I??0,wordSpacing:K??0,textAppearance:Q,color:b},Y=yt(Ze(q,t)),ae=y.scalingValue(M??0,t),me=y.scalingValue((H??D??.01)+((L==null?void 0:L.top)??0)+((L==null?void 0:L.bottom)??0)+(p==="C"?M??0:(M??0)*2),t),We={...Y,borderStyle:"solid",borderRadius:p==="C"?0:y.scalingValue(v??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},he={fontSettings:{fontFamily:k,fontWeight:(Z==null?void 0:Z.fontWeight)??400,fontStyle:(Z==null?void 0:Z.fontStyle)??"normal"},fontSize:R??.01,lineHeight:ne,letterSpacing:h??0,wordSpacing:ee??0,textAppearance:ge,color:E},ve=yt(Ze(he,t)),Fe=y.scalingValue(C??0,t),ie={fontSettings:{fontFamily:k,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:be??.01,lineHeight:re,letterSpacing:ce??0,wordSpacing:V??0,textAppearance:U,color:W},xe=Ze(ie,t),Ae={fontSettings:{fontFamily:k,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:Se??0,textAppearance:Le,color:j},ke=yt(Ze(Ae,t)),Ve=y.buildColorVars(s,{inputColor:N,inputTextColor:b,inputBorderColor:P,placeholderColor:O!=null&&O.trim()?O:"#cccccc",buttonColor:$,buttonTextColor:E,buttonBorderColor:A,labelTextColor:W,successColor:j,errorColor:te},kc,Wc,oe),[tt,ut]=d.useState(()=>Object.fromEntries(z.map($e=>[$e.name,""]))),[pt,xt]=d.useState("idle"),[Et,mt]=d.useState(null),_t=l==="success"?"success":l==="error"?"error":pt,pe=l==="error"?B:Et,He=l==="filled",Be=d.useMemo(()=>{if(!He)return tt;let $e=null;for(const Qe of z)(tt[Qe.name]??"").trim().length>0||($e=$e??{...tt},$e[Qe.name]="Filled");return $e??tt},[tt,He,z]),Ue=_t==="error"?y.getFormFieldValidationError(z,Be):null,Vt=`${l&&l!=="default"?`${s}-state-${l}`:""}`.trim(),gt=i==null?void 0:i.submitUrl,At=($e,Qe)=>{ut(Ke=>({...Ke,[$e]:Qe}))},An=async $e=>{if($e.preventDefault(),!c)return;const Qe=Object.fromEntries(z.map(De=>{var it;return[De.name,((it=tt[De.name])==null?void 0:it.trim())??""]}).filter(([,De])=>De));if(!gt){xt("error"),mt("No integrations were found for this form.");return}if(Object.keys(Qe).length===0)return;const Ke=y.getFormFieldValidationError(z,tt);if(Ke){xt("error"),mt(Ke);return}xt("submitting"),mt(null);try{const De=await fetch(gt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Qe)});if(!De.ok){const it=await De.text();throw new Error(it||`Request failed: ${De.status}`)}xt("success"),ut(Object.fromEntries(z.map(it=>[it.name,""])))}catch(De){xt("error"),mt(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:Ic(s)}}),a.jsxs("form",{onSubmit:An,className:`${s}-form`,children:[a.jsx("div",{className:`${s}-fields`,children:z.map(($e,Qe)=>a.jsxs(d.Fragment,{children:[Qe>0&&a.jsx("div",{"data-controls":o?"fieldsGap":void 0,className:o?`${s}-control`:void 0,style:{height:y.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:Be[$e.name]??"",onChange:Ke=>At($e.name,Ke.target.value),placeholder:$e.placeholder,className:`${s}-input`,style:We,rows:1,"data-filled":He||(Be[$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:Be[$e.name]??"",onChange:Ke=>At($e.name,Ke.target.value),placeholder:$e.placeholder,required:$e.isRequired??$e.type==="email",className:`${s}-input`,style:We,"data-filled":He||(Be[$e.name]??"").trim().length>0})]})]},Qe))}),a.jsx("div",{"data-controls":o?"gap":void 0,className:o?`${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:Fe,paddingTop:y.scalingValue((w==null?void 0:w.top)??0,t),paddingRight:y.scalingValue((w==null?void 0:w.right)??0,t),paddingBottom:y.scalingValue((w==null?void 0:w.bottom)??0,t),paddingLeft:y.scalingValue((w==null?void 0:w.left)??0,t),pointerEvents:c?"auto":void 0,...ve,...S?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${s}-overlay-anchor`,style:S?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:pt==="submitting"?"...":x})})})]}),_t==="success"&&a.jsx("p",{className:`${s}-success`,style:{...ke},children:Ee}),_t==="error"&&a.jsx("p",{className:`${s}-error`,style:{...ke},role:"alert",children:Ue??pe??B})]})}const kc={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"},Wc=["hover","focus","filled","success","error"],Fc=`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
|
-
`,Mc=[{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"}}}},Nc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Hc={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:Mc,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:[...Nc],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Oc={element:Rc,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:Hc,sourceCode:Fc};function ar(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Bc(e){return`
|
|
792
|
+
`,Mc=[{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"}}}},Nc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Hc={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:Mc,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:[...Nc],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"]},Bc={element:Rc,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:Hc,sourceCode:Fc};function ar(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Oc(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: ${ar(14)};
|
|
981
981
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
982
982
|
}
|
|
983
|
-
`}const Vc=({settings:e,isEditor:t,isPreviewMode:n,metadata:r,activeEvent:i})=>{const{prefix:l}=y.useScopedStyles(),o=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:s,buttonLabel:p,fieldsToShow:u=1,fontFamily:T,inputFontSettings:x,inputFontSize:f,inputLineHeight:m,inputLetterSpacing:g,inputWordSpacing:C,inputTextAppearance:w,buttonFontSettings:S,buttonFontSize:v,buttonLineHeight:M,buttonLetterSpacing:L,buttonWordSpacing:N,buttonTextAppearance:b,statusFontSettings:P,statusFontSize:
|
|
983
|
+
`}const Vc=({settings:e,isEditor:t,isPreviewMode:n,metadata:r,activeEvent:i})=>{const{prefix:l}=y.useScopedStyles(),o=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:s,buttonLabel:p,fieldsToShow:u=1,fontFamily:T,inputFontSettings:x,inputFontSize:f,inputLineHeight:m,inputLetterSpacing:g,inputWordSpacing:C,inputTextAppearance:w,buttonFontSettings:S,buttonFontSize:v,buttonLineHeight:M,buttonLetterSpacing:L,buttonWordSpacing:N,buttonTextAppearance:b,statusFontSettings:P,statusFontSize:O,statusLineHeight:$,statusLetterSpacing:E,statusWordSpacing:A,statusTextAppearance:W,iconMaxWidth:j,minHeight:te,corners:k,stroke:F,stateOverrides:D,inputPadding:H,buttonPadding:I,successMessage:K="Thanks for subscribing!",errorMessage:Q="Please, fill all required fields."}=e,Z=c.slice(0,Math.min(u,c.length)),[R,ne]=d.useState(()=>Object.fromEntries(Z.map(ie=>[ie.name,""]))),[h,ee]=d.useState("idle"),[ge,le]=d.useState(null),be=i==="success"?"success":i==="error"?"error":h,re=i==="error"?Q:ge,ce=i==="filled",V=d.useMemo(()=>{if(!ce)return R;let ie=null;for(const xe of Z)(R[xe.name]??"").trim().length>0||(ie=ie??{...R},ie[xe.name]="Filled");return ie??R},[ce,R,Z]),U=be==="error"?y.getFormFieldValidationError(Z,V):null,G=i&&i!=="default"?`${l}-state-${i}`:"",se=Z.some(ie=>(V[ie.name]??"").trim().length>0),ye=G!==`${l}-state-filled`&&se?`${l}-state-filled`:"",Te=`${G} ${ye}`.trim(),Se=r==null?void 0:r.submitUrl,Le=p??"",Ee=(s==null?void 0:s.icon)??"",B=(s==null?void 0:s.mode)==="On",oe=Le||"Submit",_={fontSettings:{fontFamily:T,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:f??.01,lineHeight:m,letterSpacing:g??0,wordSpacing:C??0,textAppearance:w,color:e.inputTextColor??"#111111"},z={fontSettings:{fontFamily:T,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:v??.01,lineHeight:M,letterSpacing:L??0,wordSpacing:N??0,textAppearance:b,color:e.buttonTextColor??"#ffffff"},q={fontSettings:{fontFamily:T,fontWeight:(P==null?void 0:P.fontWeight)??400,fontStyle:(P==null?void 0:P.fontStyle)??"normal"},fontSize:O??.01,lineHeight:$,letterSpacing:E??0,wordSpacing:A??0,textAppearance:W,color:e.successColor??"#22c55e"},Y=yt(Ze(_,t)),ae=yt(Ze(z,t)),me=yt(Ze(q,t)),We=y.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??(z==null?void 0:z.color)??"#ffffff"},Dc,zc,D),he={borderRadius:y.scalingValue(k,t),borderWidth:y.scalingValue(F,t),borderStyle:"solid"},ve={borderLeftWidth:y.scalingValue(F,t)},Fe=async ie=>{if(ie.preventDefault(),!o)return;const xe=Object.fromEntries(Z.map(ke=>{var Ve;return[ke.name,((Ve=R[ke.name])==null?void 0:Ve.trim())??""]}).filter(([,ke])=>ke));if(!Se){ee("error"),le("No integrations were found for this form.");return}if(Object.keys(xe).length===0)return;const Ae=y.getFormFieldValidationError(Z,R);if(Ae){ee("error"),le(Ae);return}ee("submitting"),le(null);try{const ke=await fetch(Se,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(xe)});if(!ke.ok){const Ve=await ke.text();throw new Error(Ve||`Request failed: ${ke.status}`)}ee("success"),ne(Object.fromEntries(Z.map(Ve=>[Ve.name,""])))}catch(ke){ee("error"),le(ke instanceof Error?ke.message:"Something went wrong")}};return a.jsxs("div",{className:`${l}-wrapper ${Te}`.trim(),style:We,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Oc(l)}}),a.jsxs("form",{onSubmit:Fe,className:`${l}-form`,style:{...he,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(ie=>a.jsx("input",{type:ie.type==="email"?"email":ie.type==="phone"?"tel":"text",name:ie.name,autoComplete:"off",value:V[ie.name]??"",onChange:xe=>ne(Ae=>({...Ae,[ie.name]:xe.target.value})),placeholder:ie.placeholder,required:ie.isRequired??ie.type==="email",className:`${l}-input`,style:{...Y,paddingRight:y.scalingValue(H.right,t),paddingLeft:y.scalingValue(H.left,t),paddingTop:y.scalingValue(H.top,t),paddingBottom:y.scalingValue(H.bottom,t)}},ie.name))}),a.jsx("div",{className:`${l}-overlayAnchor`,children:a.jsx("button",{type:o?"submit":"button",className:`${l}-submitBtn`,"aria-label":oe,style:{...ae,...ve,paddingRight:y.scalingValue(I.right,t),paddingLeft:y.scalingValue(I.left,t),paddingTop:y.scalingValue(I.top,t),paddingBottom:y.scalingValue(I.bottom,t),pointerEvents:o?"auto":void 0},children:h==="submitting"?"...":B?Ee&&a.jsx(Nt,{url:Ee,className:`${l}-submitBtnIcon`,style:{maxWidth:y.scalingValue(j??0,t)},fill:`var(--${l}-button-text-color)`,hoverFill:`var(--${l}-button-text-color)`}):Le})})]}),be==="success"&&a.jsx("p",{className:`${l}-success`,style:{...me},children:K}),be==="error"&&a.jsx("p",{className:`${l}-error`,style:{...me},role:"alert",children:U??re??Q})]})},Dc={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"},zc=["hover","focus","filled","success","error"],jc=`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
|
|
@@ -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 Qc=30,Zc=20,jr=2,Jc=2,ed=(e,t)=>Array.from({length:t},()=>e).flat(),td=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},nd=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>td(r,e))},rd=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:i,imageHoverClass:l,isFirstSet:o,scaled:c,onFirstSetImageDone:s})=>{var b,P,
|
|
1692
|
+
`}const Qc=30,Zc=20,jr=2,Jc=2,ed=(e,t)=>Array.from({length:t},()=>e).flat(),td=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},nd=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>td(r,e))},rd=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:i,imageHoverClass:l,isFirstSet:o,scaled:c,onFirstSetImageDone:s})=>{var b,P,O;const p=d.useRef(null);d.useLayoutEffect(()=>{if(!o)return;const $=p.current;$!=null&&$.complete&&(s==null||s())},[o,(b=e.image)==null?void 0:b.url,s]);const u=n.display==="Cover",T=n.ratioValue??"1:1",x=n.reversed??!1,[f,m]=T.split(":").map(Number),w=(x?m:f)/(x?f:m);let S=r,v=S/w;v>i&&(v=i,S=v*w);const M=c(S),L=c(v),N=((P=e.image)==null?void 0:P.url)&&a.jsx("img",{ref:p,src:e.image.url,alt:((O=e.image)==null?void 0:O.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:o?s:void 0,onError:o?s:void 0});return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:M}:{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:M,height:L,overflow:"hidden"}:{width:"fit-content",maxWidth:c(r),height:c(i)}},children:N&&e.link?a.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Re(`${t}-marquee-link`,!u&&`${t}-marquee-link-contain`),children:N}):N})})},od=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:l}=y.useScopedStyles(),o=d.useMemo(()=>Xc(l),[l]),{speed:c,direction:s,pauseOnHover:p,gap:u,imageMaxWidth:T,imageMaxHeight:x,imageFit:f,hoverEffect:m}=e,g=!!i,C=!n||!!r,w=C&&m!=="off"&&m!=="randomize"?`${l}-image-hover-${m}`:void 0,S=n?!!r:!0,M=((t==null?void 0:t.length)??0)>0&&(S||!!n),L=Math.max(0,c)*Qc,N=U=>y.scalingValue(U,n??!1),b=d.useRef(null),P=d.useRef(null),O=d.useRef(null),[$,E]=d.useState(0),[A,W]=d.useState(0),j=S&&p==="on",[te,k]=d.useState(!1),[F,D]=d.useState({}),H=d.useRef(F);H.current=F;const I=d.useRef(null),K=d.useRef(0),Q=d.useRef(null),Z=d.useMemo(()=>(t??[]).map(U=>{var G;return((G=U.image)==null?void 0:G.url)??""}).join("\0"),[t]),[R,ne]=d.useState(jr),h=d.useMemo(()=>{const U=t??[];return!S||U.length===0?U:ed(U,R)},[t,S,R]),ee=d.useMemo(()=>h.filter(U=>{var G;return!!((G=U.image)!=null&&G.url)}).length,[h]),ge=M?Jc:1;d.useLayoutEffect(()=>{K.current=0,D({}),I.current=null,ne(jr),E(0)},[Z]),d.useEffect(()=>{if(!C||m!=="randomize")return;const U=b.current;if(!U)return;const G=Se=>{D(Le=>{let Ee=null;for(const B of Se)B in Le&&(nd(U,B)||(Ee||(Ee={...Le}),delete Ee[B]));return Ee??Le})},se=new IntersectionObserver(Se=>{const Le=new Set;for(const Ee of Se){const B=Ee.target.dataset.marqueeItemIndex,oe=B!==void 0?Number(B):NaN;Number.isNaN(oe)||Le.add(oe)}Le.size>0&&G(Le)},{root:U,threshold:0});Object.keys(F).forEach(Se=>{const Le=Number(Se);U.querySelectorAll(`[data-marquee-item-index="${Le}"]`).forEach(Ee=>se.observe(Ee))});let ye=0;const Te=()=>{const Se=Object.keys(H.current);Se.length!==0&&(G(Se.map(Number)),ye=requestAnimationFrame(Te))};return Object.keys(H.current).length>0&&(ye=requestAnimationFrame(Te)),()=>{cancelAnimationFrame(ye),se.disconnect()}},[m,F,C]),d.useLayoutEffect(()=>{if(!M)return;const U=b.current,G=O.current;if(!U||!G)return;let se=0;const ye=()=>{const Le=U.getBoundingClientRect().width,Ee=G.getBoundingClientRect().width,B=I.current,oe=typeof B=="number"&&Math.abs(B-Ee)<=.25;if(I.current=Ee,S&&Ee>0&&R>0){const _=Ee/R;if(_>0&&Le>0){const z=Math.max(jr,Math.ceil(Le/_)+1);if(z!==R){ne(z);return}}}if(Ee>0&&$<=0){E(Ee);return}oe&&Ee!==$?E(Ee):!oe&&$<=0&&(cancelAnimationFrame(se),se=requestAnimationFrame(ye))},Te=()=>{cancelAnimationFrame(se),se=requestAnimationFrame(ye)};Q.current=Te,Te();const Se=new ResizeObserver(Te);return Se.observe(U),Se.observe(G),()=>{Q.current=null,cancelAnimationFrame(se),Se.disconnect()}},[S,M,$,Z,R]),d.useLayoutEffect(()=>{const U=P.current;if(!M||!U)return;const G=$>0?$: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)},[S,M,L,$]),d.useLayoutEffect(()=>{if(!M){W(0);return}if($<=0){W(0);return}const U=P.current;if(!U)return;const G=()=>{const ye=U.getBoundingClientRect().height;W(ye>0?ye:0)};G();const se=new ResizeObserver(G);return se.observe(U),()=>se.disconnect()},[M,ge,h,n,u,T,x,$,f,F]);const le=()=>{j&&k(!0)},be=()=>{j&&k(!1)},re=d.useCallback(()=>{var U;K.current=Math.min(ee,K.current+1),(U=Q.current)==null||U.call(Q)},[ee]),ce=d.useCallback((U,G)=>{D(se=>{const ye=se[U]??G,Te=(t??[]).filter(Le=>Le!==ye);if(Te.length===0)return se;const Se=Te[Math.floor(Math.random()*Te.length)];return{...se,[U]:Se}})},[t]),V=(U,G,se,ye)=>{const Te=C&&m==="randomize"&&f.display==="Cover"?F[se]??U:U,Se=`max(${N(u)}, ${Zc}px)`,Le=`calc(-0.5 * (${Se} + ${N(u)}))`;return a.jsxs("div",{className:`${l}-marquee-card`,"data-marquee-item-index":se,onMouseEnter:C&&m==="randomize"&&f.display==="Cover"?()=>ce(se,U):void 0,children:[a.jsx(rd,{item:Te,prefix:l,imageFit:f,imageMaxWidth:T,imageMaxHeight:x,imageHoverClass:w,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:Le,width:Se,height:"100%"}})]},`${G}-${se}`)};if(M){const U=S?j&&te?"paused":"running":"paused";return a.jsxs("div",{ref:b,className:Re(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Marquee",style:$>0&&A>0?{height:A}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:o}}),a.jsx("div",{ref:P,className:`${l}-marquee-track`,"data-direction":s,onMouseEnter:le,onMouseLeave:be,style:{"--marquee-play-state":U},children:Array.from({length:ge},(G,se)=>a.jsx("div",{ref:se===0?O:void 0,className:Re(`${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:b,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:o}}),a.jsx("div",{className:Re(`${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")]})},id=`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 ld=30,ai=2,cd=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:l}=y.useScopedStyles(),{align:o,speed:c,direction:s,pauseOnHover:p,gap:u,cardWidth:T,corners:x,stroke:f,strokeColor:m,bgColor:g,padding:C,logoMarginTop:w,logoWidth:S,logoHeight:v,captionMarginTop:M}=e,L=!!i,N=((t==null?void 0:t.length)??0)>0,b=c>0&&(!n||r),P=N&&(b||n),
|
|
2410
|
+
`}const ld=30,ai=2,cd=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:l}=y.useScopedStyles(),{align:o,speed:c,direction:s,pauseOnHover:p,gap:u,cardWidth:T,corners:x,stroke:f,strokeColor:m,bgColor:g,padding:C,logoMarginTop:w,logoWidth:S,logoHeight:v,captionMarginTop:M}=e,L=!!i,N=((t==null?void 0:t.length)??0)>0,b=c>0&&(!n||r),P=N&&(b||n),O=Math.max(0,c)*ld,$=_=>y.scalingValue(_,n??!1),E=d.useRef(null),A=d.useRef(null),W=d.useRef(null),[j,te]=d.useState(0),[k,F]=d.useState(0),[D,H]=d.useState(0),I=b&&p==="on",[K,Q]=d.useState(!1),Z=d.useRef(null),[R,ne]=d.useState(0),[h,ee]=d.useState(0),ge=d.useRef(null),le=_=>{var q,Y,ae,me,We;return{fontSettings:{fontFamily:(e==null?void 0:e[`${_}FontFamily`])??"Arial",fontWeight:((q=e==null?void 0:e[`${_}FontSettings`])==null?void 0:q.fontWeight)??400,fontStyle:((Y=e==null?void 0:e[`${_}FontSettings`])==null?void 0:Y.fontStyle)??"normal"},textAppearance:{textTransform:((ae=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:ae.textTransform)??"none",textDecoration:((me=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:me.textDecoration)??"none",fontVariant:((We=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:We.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"}},be=le("text"),re=le("caption"),ce=d.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(_=>{var z,q;return(((z=_.text)==null?void 0:z.length)??0)>0||(((q=_.caption)==null?void 0:q.length)??0)>0}),[t]),V=d.useMemo(()=>!P||(t==null?void 0:t.length)===0?1:k<=0||j<=0?ai:Math.max(ai,Math.ceil(j/k)+1),[P,t==null?void 0:t.length,k,j]);d.useLayoutEffect(()=>{if(!P)return;const _=E.current,z=W.current;if(!_||!z)return;let q=0;const Y=()=>{const We=_.getBoundingClientRect().width,he=z.getBoundingClientRect().width,ve=ge.current,Fe=typeof ve=="number"&&Math.abs(ve-he)<=.25;if(ge.current=he,te(We),typeof he=="number"&&he>0&&k<=0){F(he);return}Fe&&he!==k?F(he):!Fe&&k<=0&&(cancelAnimationFrame(q),q=requestAnimationFrame(Y))},ae=()=>{cancelAnimationFrame(q),q=requestAnimationFrame(Y)};ae();const me=new ResizeObserver(ae);return me.observe(_),me.observe(z),()=>{cancelAnimationFrame(q),me.disconnect()}},[b,P,k]),d.useLayoutEffect(()=>{const _=A.current;if(!P||!_)return;const z=k>0?k:0,q=z>0&&O>0?z/O*1e3:0,Y=`${Math.max(0,q)/1e3}s`;_.style.setProperty("--marquee-distance",`${z}px`),_.style.setProperty("--marquee-duration",Y)},[b,P,O,k]),d.useLayoutEffect(()=>{if(!P){H(0);return}const _=W.current,z=A.current;if(!_||!z)return;const q=()=>{let ae=0;for(let me=0;me<_.children.length;me++){const he=_.children[me].firstElementChild;he&&(ae=Math.max(ae,he.offsetHeight))}ae<=0&&(ae=z.offsetHeight),H(ae>0?ae:0)};q();const Y=new ResizeObserver(q);return Y.observe(_),Y.observe(z),()=>{Y.disconnect()}},[P,V,t,n,u,T,C,f,x,S,v,R,h]);const U=()=>{I&&Q(!0)},G=()=>{I&&Q(!1)},se=d.useMemo(()=>{switch(o){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[o]),ye=d.useMemo(()=>{switch(o){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[o]),Te=d.useCallback((_,z,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:$((Y==null?void 0:Y.marginTop)??0)}}),a.jsx("div",{...Y!=null&&Y.dataMeasureKind?{"data-testimonial-measure":Y.dataMeasureKind}:{},style:{...Ze(_,n),textAlign:ye,pointerEvents:"auto",...typeof(Y==null?void 0:Y.minHeightPx)=="number"&&Y.minHeightPx>0?{minHeight:Y.minHeightPx}:{}},children:a.jsx(Sn,{content:z})})]},q),[se,ye,n,L,l,$]),Se=d.useCallback((_,z,q)=>{var Y,ae,me;return a.jsxs("div",{style:{padding:`${$(C.top)} ${$(C.right)} ${$(C.bottom)} ${$(C.left)}`,width:$(T+f*2),height:"100%",borderRadius:$(x),border:`${$(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:[_.text&&Te(be,_.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:$(w)}}),a.jsx("div",{style:{width:$(S),height:$(v)},children:((Y=_.logo)==null?void 0:Y.url)&&a.jsx("img",{src:_.logo.url,alt:((ae=_.logo)==null?void 0:ae.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((me=_.logo)==null?void 0:me.objectFit)||"contain"}})})]}),_.caption&&Te(re,_.caption,"caption",{...q!=null&&q.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:M,...q!=null&&q.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(q==null?void 0:q.captionMinHeightPx)=="number"&&q.captionMinHeightPx>0?{minHeightPx:q.captionMinHeightPx}:{}})]})]},z)},[g,M,re,T,x,v,w,S,se,ye,C.bottom,C.left,C.right,C.top,Te,f,m,be,n,L,l]),Le=d.useCallback(_=>{ne(_.maxTextPx),ee(_.maxCaptionPx)},[]);d.useLayoutEffect(()=>{if(!ce){Le({maxTextPx:0,maxCaptionPx:0});return}const _=Z.current;if(!_)return;const z=()=>{y.readTestimonialTextMeasure(_,Le)};z();const q=new ResizeObserver(z);return q.observe(_),()=>{q.disconnect()}},[ce,Le,t,Se]);const Ee=ce?{textMinHeightPx:R,captionMinHeightPx:h}:void 0,B=ce?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((_,z)=>Se(_,`measure-${z}`,{dataMeasureAttrs:!0}))}):null,oe=(_,z)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Se(_,`card-${z}`,Ee),L&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(u)})`,width:$(u),height:"100%",pointerEvents:"auto",zIndex:2}})]},z);if(P){const _=b?I&&K?"paused":"running":"paused";return a.jsxs("div",{ref:E,className:Re(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...D>0?{height:D}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ii(l)}}),B,a.jsx("div",{ref:A,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":_},children:Array.from({length:V},(z,q)=>a.jsx("div",{ref:q===0?W:void 0,className:`${l}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(u),paddingRight:$(u)},"aria-hidden":q>0,children:t==null?void 0:t.map((Y,ae)=>oe(Y,`${q}-${ae}`))},`set-${q}`))})]})}return a.jsxs("div",{className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ii(l)}}),B,a.jsx("div",{style:{gap:$(u),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((_,z)=>oe(_,z))})]})},dd=`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 gd=3e3,hd=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:l}=y.useScopedStyles(),o=t||[],{speed:c,align:s,width:p,imageMarginTop:u,textMarginTop:T,captionMarginTop:x,imageWidth:f,imageHeight:m,controlsWidth:g,controlsColor:C,controlsHoverColor:w}=e,S=c>0&&(!n||!!r),[v,M]=d.useState(0),[L,N]=d.useState(null),[b,P]=d.useState(!1),
|
|
3149
|
+
`}const gd=3e3,hd=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:l}=y.useScopedStyles(),o=t||[],{speed:c,align:s,width:p,imageMarginTop:u,textMarginTop:T,captionMarginTop:x,imageWidth:f,imageHeight:m,controlsWidth:g,controlsColor:C,controlsHoverColor:w}=e,S=c>0&&(!n||!!r),[v,M]=d.useState(0),[L,N]=d.useState(null),[b,P]=d.useState(!1),O=d.useRef(null),$=d.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),E=d.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]);d.useEffect(()=>{M(0),N(null),P(!1)},[o.length]);const A=o[v],W=L===null?null:o[L],j=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=j("text"),k=j("caption"),F=o.length>1&&o.some(re=>{var ce,V;return(((ce=re.text)==null?void 0:ce.length)??0)>0||(((V=re.caption)==null?void 0:V.length)??0)>0}),D=d.useRef(null),[H,I]=d.useState(0),[K,Q]=d.useState(0),Z=e.controls??{mode:"Off",icon:null},R=o.length>1,ne=d.useCallback((re,ce)=>!R||ce===re?re:(O.current&&window.clearTimeout(O.current),N(re),P(!0),O.current=window.setTimeout(()=>{N(null),P(!1),O.current=null},300),ce),[R]),h=d.useCallback(()=>{R&&M(re=>ne(re,(re-1+o.length)%o.length))},[R,ne,o.length]),ee=d.useCallback(()=>{R&&M(re=>ne(re,(re+1)%o.length))},[R,ne,o.length]);d.useEffect(()=>{if(!S||!R)return;const re=Math.max(300,gd/c),ce=window.setInterval(()=>{M(V=>ne(V,(V+1)%o.length))},re);return()=>{window.clearInterval(ce)}},[S,R,ne,o.length,c]),d.useEffect(()=>()=>{O.current&&window.clearTimeout(O.current)},[]);const ge=(re,ce)=>{var ye,Te,Se,Le;const V=ce==null?void 0:ce.textMinHeightPx,U=ce==null?void 0:ce.captionMinHeightPx,G=ce==null?void 0:ce.dataMeasureAttrs,se=i&&!(ce!=null&&ce.dataMeasureAttrs)&&!(ce!=null&&ce.hideControls);return a.jsxs(a.Fragment,{children:[re.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,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:{...Ze(te,n),...V&&V>0?{minHeight:V}:{},textAlign:E,pointerEvents:"auto"},children:a.jsx(Sn,{content:re.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,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:((Se=re.image)==null?void 0:Se.name)??"",className:`${l}-icon`,style:{objectFit:((Le=re.image)==null?void 0:Le.objectFit)||"contain"}})})]}),re.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":se?"captionMarginTop":void 0,className:se?`${l}-control`:void 0,style:{height:y.scalingValue(x??0,n??!1)}}),a.jsx("div",{...G?{"data-testimonial-measure":"caption"}:{},style:{...Ze(k,n),...U&&U>0?{minHeight:U}:{},textAlign:E,pointerEvents:"auto"},children:a.jsx(Sn,{content:re.caption})})]})]})},le=d.useCallback(re=>{I(re.maxTextPx),Q(re.maxCaptionPx)},[]);if(d.useLayoutEffect(()=>{if(!F){le({maxTextPx:0,maxCaptionPx:0});return}const re=D.current;if(!re)return;const ce=()=>{y.readTestimonialTextMeasure(re,le)};ce();const V=new ResizeObserver(ce);return V.observe(re),()=>{V.disconnect()}},[F,le,t]),!A)return a.jsx(a.Fragment,{});const be=F?{textMinHeightPx:H,captionMinHeightPx:K}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${l}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:md(l)}}),a.jsxs("div",{className:`${l}-wrapper`,style:{width:y.scalingValue(p??0,n??!1),alignItems:$},children:[F&&a.jsx("div",{ref:D,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:o.map((re,ce)=>a.jsx("div",{style:{width:"100%"},children:ge(re,{dataMeasureAttrs:!0})},ce))}),a.jsxs("div",{className:`${l}-fade-stack`,children:[W&&b&&a.jsx("div",{className:Re(`${l}-fade-item-prev`,`${l}-fade-out`),children:ge(W,{...be,hideControls:!0})}),a.jsx("div",{className:Re(`${l}-fade-item-current`,b?`${l}-fade-in`:void 0),children:ge(A,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":w},children:a.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:h,disabled:!R,"aria-label":"Previous testimonial",children:Z.icon&&a.jsx(Nt,{url:Z.icon,fill:C,hoverFill:w,className:Re(`${l}-arrow-img`,`${l}-mirror`)})})}),a.jsx("div",{className:Re(`${l}-arrow`,`${l}-next-arrow`),style:{width:y.scalingValue(g??.02,n??!1),height:y.scalingValue(g??.02,n??!1),"--arrow-hover-color":w},children:a.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:ee,disabled:!R,"aria-label":"Next testimonial",children:Z.icon&&a.jsx(Nt,{url:Z.icon,fill:C,hoverFill:w,className:`${l}-arrow-img`})})})]})]})})},fd=`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
|
|
@@ -3845,7 +3845,7 @@ type TestimonialsSettings = {\r
|
|
|
3845
3845
|
pointer-events: auto;
|
|
3846
3846
|
z-index: 10;
|
|
3847
3847
|
}
|
|
3848
|
-
`}const It=500,Sd=750,Dt="cubic-bezier(0.22, 1, 0.36, 1)";function Kt(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function di({media:e,className:t,style:n,onImageClick:r}){return Kt(e)?a.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:r})}function $d({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:i,onClose:l,onPrev:o,onNext:c,counterClassName:s,counterStyle:p}){const u=n==="cover",T=d.useRef(null),x=d.useRef(null),[f,m]=d.useState(null),[g,C]=d.useState(r?"opening":"open"),[w,S]=d.useState(!0),v=d.useRef(t),M=d.useCallback(()=>{const $=T.current,E=x.current;if(!$||!E)return;const A=$.getBoundingClientRect(),W=A.width,j=A.height,te=E.naturalWidth,k=E.naturalHeight;if(!W||!j||!te||!k)return;if(n==="cover"){m({width:W,height:j,left:A.left,top:A.top});return}const F=te/k,D=W/j;if(F>D){const H=W/F;m({width:W,height:H,left:A.left,top:A.top+(j-H)/2})}else{const H=j*F;m({width:H,height:j,left:A.left+(W-H)/2,top:A.top})}},[n]);d.useEffect(()=>{M();const $=T.current;if(!$)return;const E=new ResizeObserver(()=>M());return E.observe($),()=>E.disconnect()},[M,t]),d.useEffect(()=>{g==="opening"&&f&&C("open")},[g,f]),d.useEffect(()=>{if(g!=="closing")return;const $=setTimeout(()=>l(),It);return()=>clearTimeout($)},[g,l]),d.useEffect(()=>{v.current!==t&&S(!1),v.current=t},[t]),d.useEffect(()=>{const $=E=>{E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),g!=="closing"&&C("closing"))};return window.addEventListener("keydown",$,!0),()=>window.removeEventListener("keydown",$,!0)},[g]);const L=()=>{g!=="closing"&&C("closing")},N=g==="open",b=g==="closing",P=b&&i&&!!r,B=g==="opening"?r??f:P?r:f;return a.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:L,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:N?1:0,transition:`opacity ${It}ms ${Dt}`,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:N?1:0,transition:`opacity ${It}ms ${Dt}`,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:N?1:0,transition:`opacity ${It}ms ${Dt}`},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]})}),B&&a.jsx("img",{ref:x,src:e[t],onLoad:M,style:{position:"fixed",top:B.top,left:B.left,width:B.width,height:B.height,objectFit:n==="cover"?"cover":"contain",opacity:b&&!P?0:1,transition:b&&!P?`opacity ${It}ms ${Dt}`:P||w?`top ${It}ms ${Dt}, left ${It}ms ${Dt}, width ${It}ms ${Dt}, height ${It}ms ${Dt}`:"none",pointerEvents:"none",zIndex:9998}}),N&&f&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{position:"fixed",top:f.top,left:f.left,width:f.width/2,height:f.height,cursor:"w-resize",zIndex:9999},onClick:$=>{$.stopPropagation(),o()}}),a.jsx("div",{style:{position:"fixed",top:f.top,left:f.left+f.width/2,width:f.width/2,height:f.height,cursor:"e-resize",zIndex:9999},onClick:$=>{$.stopPropagation(),c()}})]})]})}function wd(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Td({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,metadata:l,activeEvent:o,layoutId:c}){const{prefix:s}=y.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:T=100,verticalGap:x,entriesCount:f,lightbox:m,imageDisplay:g,lightboxImageDisplay:C,slider:w,sliderTiming:S,direction:v,transition:M,titleMarginTop:L,subtitleMarginTop:N,titleColor:b,subtitleColor:P,lightboxCounterColor:B,titleFontFamily:$,titleFontSettings:E,titleFontSize:A,titleLineHeight:W,titleLetterSpacing:j,titleWordSpacing:te,titleTextAppearance:k,subtitleFontFamily:F,subtitleFontSettings:D,subtitleFontSize:H,subtitleLineHeight:I,subtitleLetterSpacing:K,subtitleWordSpacing:Q,subtitleTextAppearance:Z,lightboxCounterFontFamily:R,lightboxCounterFontSettings:ne,lightboxCounterFontSize:h,lightboxCounterLineHeight:ee,lightboxCounterLetterSpacing:ge,lightboxCounterWordSpacing:le,lightboxCounterTextAppearance:be,showText:re="always",alignEntries:ce="off"}=e,V={fontSettings:{fontFamily:$,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:A??.01,lineHeight:W,letterSpacing:j??0,wordSpacing:te??0,textAppearance:k,color:b},G={...yt(Ze(V,n))},se={fontSettings:{fontFamily:F,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:H??.01,lineHeight:I,letterSpacing:K??0,wordSpacing:Q??0,textAppearance:Z,color:P},Te={...yt(Ze(se,n))},Se={fontSettings:{fontFamily:R,fontWeight:(ne==null?void 0:ne.fontWeight)??400,fontStyle:(ne==null?void 0:ne.fontStyle)??"normal"},fontSize:h??.01,lineHeight:ee,letterSpacing:ge??0,wordSpacing:le??0,textAppearance:be,color:B},Ee={...yt(Ze(Se,n)),...Kr(h,ee,s,n)},O=qr(A,W,`${s}-item-title`,`${s}-text-tight-leading`),oe=qr(H,I,`${s}-item-subtitle`,`${s}-text-tight-leading`),_=Kr(A,W,s,n),z=Kr(H,I,s,n),q=qr(h,ee,`${s}-lightbox-counter`,`${s}-text-tight-leading`),Y=y.buildColorVars(s,{titleColor:b,subtitleColor:P,lightboxCounterColor:B},Ld,Pd),We=`${o&&o!=="default"?`${s}-state-${o}`:""}${re==="on hover"&&(!n||r)?` ${s}-show-text-hover`:""}`.trim(),he=f===0?1/0:f,ve=(t??[]).slice(0,he),Fe=u.entryWidth??.2,ie=(g==null?void 0:g.display)==="cover",xe=(g==null?void 0:g.ratioValue)??"1:1",Ae=(g==null?void 0:g.reversed)??!1,[ke,Ve]=xe.split(":").map(Number),pt=`${Ae?Ve:ke} / ${Ae?ke:Ve}`,xt=y.scalingValue(Fe??0,n),Et=!ie&&w!=="off",mt={width:xt,...ie?{aspectRatio:pt,height:"auto",overflow:"hidden"}:{height:"auto"}},_t=`${s}-item-image-wrapper${Et?` ${s}-item-image-wrapper-fit-slider`:""}`.trim(),pe=p==="c",He=pe&&ce==="on",Oe=`calc(${y.scalingValue(Fe??0,n)} * (${T} / 100))`,Ue=y.scalingValue(Fe*T/100,n),Ct=ie?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Vt,gt]=d.useState("ltr"),[At,An]=d.useState(0),$e=d.useRef(null);d.useEffect(()=>{const Ie=$e.current;if(!Ie)return;const at=new ResizeObserver(st=>{An(Math.round(st[0].contentRect.width))});return at.observe(Ie),()=>at.disconnect()},[]);const Qe=(()=>{const Ie={...Y},at=$e.current?getComputedStyle($e.current).getPropertyValue("--cntrl-article-width").trim():"";return at&&(Ie["--cntrl-article-width"]=at),Ie})(),[Ke,De]=d.useState(!1),[it,Zn]=d.useState([]),[Fr,ln]=d.useState(0),[Mr,Jn]=d.useState(null),er=(Ie,at,st)=>{if(n&&!r||m==="off")return;const X=Ie.currentTarget.getBoundingClientRect();Jn({top:X.top,left:X.left,width:X.width,height:X.height}),Zn(at),ln(st),De(!0)};d.useEffect(()=>{if(!Ke||m!=="on"||typeof document>"u")return;const Ie=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ie}},[Ke,m]),d.useEffect(()=>{!n||r||(De(!1),Jn(null))},[n,r]);const Nr=d.useMemo(()=>Cd(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Nr}}),a.jsx("div",{style:Y,children:a.jsx("div",{ref:$e,className:`${s}-wrapper ${s}-type-${p}${He?` ${s}-align-entries`:""} ${We}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:He?0:y.scalingValue(x??0,n),columnGap:y.scalingValue(u.horizontalGap??0,n),width:y.scalingValue(u.wrapperWidth??0,n),...He?{[`--${s}-align-entries-row-gap`]:y.scalingValue(x??0,n)}:{}},children:ve.map((Ie,at)=>{var Ye,dt;const st=ci(Ie.title),X=ci(Ie.subtitle),ue=(((Ye=Ie.link)==null?void 0:Ye.length)??0)>0&&m==="off"?Ie.link:void 0,fe=Math.floor(at/u.columnsCount)===Math.ceil(ve.length/u.columnsCount)-1,we=pe?a.jsxs("div",{className:`${s}-item-text-block`,children:[st&&a.jsx("p",{className:O,style:{width:Oe,...G,..._},children:Ie.title}),st&&a.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(L??0,n),width:Ue}}),X&&a.jsx("p",{className:oe,style:{width:Oe,...Te,...z},children:Ie.subtitle}),X&&a.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(N??0,n),width:Ue}})]}):null,je=pe?a.jsxs("div",{className:`${s}-item-title-row`,children:[st&&a.jsx("p",{className:O,style:{width:Oe,...G,..._},children:Ie.title}),st&&a.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(L??0,n),width:Ue}})]}):null,Ge=pe?a.jsxs("div",{className:`${s}-item-subtitle-row`,children:[X&&a.jsx("p",{className:oe,style:{width:Oe,...Te,...z},children:Ie.subtitle}),X&&a.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(N??0,n),width:Ue}})]}):null,Pe=ue?a.jsxs("a",{href:ue,target:"_blank",className:`${s}-item-text-link`,children:[je,Ge]}):a.jsxs(a.Fragment,{children:[je,Ge]}),lt=a.jsx("div",{className:_t,style:mt,children:(((dt=Ie.image)==null?void 0:dt.length)??0)===0?null:w==="off"?(()=>{const Me=Ie.image[0],rt=Ie.image.filter(Je=>!Kt(Je)).map(Je=>Je.url);return a.jsx(di,{media:Me,className:`${s}-item-${Kt(Me)?"video":"image"}`.trim(),style:Ct,onImageClick:Kt(Me)?void 0:Je=>er(Je,rt,0)})})():a.jsxs(a.Fragment,{children:[Et&&a.jsx("div",{className:`${s}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ie.image.map(Me=>Kt(Me)?a.jsx("video",{src:Me.url,muted:!0,playsInline:!0},`sizer-${Me.url}`):a.jsx("img",{src:Me.url,alt:""},`sizer-${Me.url}`))}),a.jsx(Eo,{className:`${s}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:S*1e3,width:"100%",height:"100%",speed:Sd,type:M==="fade"?"fade":"loop",rewind:M==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:M==="fade"?"ltr":v!=="random"?v==="horizontal"?"ltr":"ttb":Vt},onMoved:Me=>{if(v!=="random"||M==="fade")return;const nt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";gt(nt),setTimeout(()=>{Me.refresh()},0)},children:Ie.image.map((Me,nt)=>{const rt=Ie.image.filter(Xe=>!Kt(Xe)),Je=rt.map(Xe=>Xe.url),cn=rt.findIndex(Xe=>Xe.url===Me.url);return a.jsx(_o,{children:a.jsx(di,{media:Me,className:`${s}-item-${Kt(Me)?"video":"image"}`.trim(),style:Ct,onImageClick:Kt(Me)?void 0:Xe=>er(Xe,Je,cn)})},nt)})},`${M}-${Fe}-${v}-${S}-${At}-${c}`)]})}),ct=pe?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":i&&st?"titleMarginTop":void 0,className:i&&st?`${s}-control`:void 0,style:{height:st?y.scalingValue(L??0,n):0,width:Ue}}),a.jsx("p",{className:O,style:{width:Oe,...G,..._},children:Ie.title}),a.jsx("div",{"data-controls":i&&X?"subtitleMarginTop":void 0,className:i&&X?`${s}-control`:void 0,style:{height:X?y.scalingValue(N??0,n):0,width:Ue}}),a.jsx("p",{className:oe,style:{width:Oe,...Te,...z},children:Ie.subtitle})]});return a.jsx("div",{className:`${s}-item`.trim(),children:a.jsx("div",{className:`${i?`${s}-item-inner`:`${s}-item-inner-hidden`}${He&&fe?` ${s}-item-inner-last-row`:""}`.trim(),style:{width:(T??0)>100?`calc(${y.scalingValue(Fe??0,n)} * (${T} / 100))`:y.scalingValue(Fe??0,n)},children:He?a.jsxs(a.Fragment,{children:[Pe,a.jsx("a",{href:ue,target:"_blank",className:`${s}-item-image-link`,children:lt})]}):a.jsxs("a",{href:ue,target:"_blank",className:`${s}-item-image-link`,children:[we,lt,ct]})})},at)})})}),(!n||r)&&Ke&&typeof document<"u"&&m==="on"&&Ii.createPortal(a.jsx("div",{style:Qe,"data-selection":"none",children:a.jsx($d,{images:it,index:Fr,imageDisplay:wd(C),originRect:Mr,reverseClose:w==="off",onClose:()=>De(!1),onPrev:()=>ln(Ie=>(Ie-1+it.length)%it.length),onNext:()=>ln(Ie=>(Ie+1)%it.length),counterClassName:q,counterStyle:Ee})}),document.body)]})}const Ld={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Pd=["hover","focus","filled","success","error"],Ed=`import { Splide, SplideSlide } from '@splidejs/react-splide';\r
|
|
3848
|
+
`}const It=500,Sd=750,Dt="cubic-bezier(0.22, 1, 0.36, 1)";function Kt(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function di({media:e,className:t,style:n,onImageClick:r}){return Kt(e)?a.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:r})}function $d({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:i,onClose:l,onPrev:o,onNext:c,counterClassName:s,counterStyle:p}){const u=n==="cover",T=d.useRef(null),x=d.useRef(null),[f,m]=d.useState(null),[g,C]=d.useState(r?"opening":"open"),[w,S]=d.useState(!0),v=d.useRef(t),M=d.useCallback(()=>{const $=T.current,E=x.current;if(!$||!E)return;const A=$.getBoundingClientRect(),W=A.width,j=A.height,te=E.naturalWidth,k=E.naturalHeight;if(!W||!j||!te||!k)return;if(n==="cover"){m({width:W,height:j,left:A.left,top:A.top});return}const F=te/k,D=W/j;if(F>D){const H=W/F;m({width:W,height:H,left:A.left,top:A.top+(j-H)/2})}else{const H=j*F;m({width:H,height:j,left:A.left+(W-H)/2,top:A.top})}},[n]);d.useEffect(()=>{M();const $=T.current;if(!$)return;const E=new ResizeObserver(()=>M());return E.observe($),()=>E.disconnect()},[M,t]),d.useEffect(()=>{g==="opening"&&f&&C("open")},[g,f]),d.useEffect(()=>{if(g!=="closing")return;const $=setTimeout(()=>l(),It);return()=>clearTimeout($)},[g,l]),d.useEffect(()=>{v.current!==t&&S(!1),v.current=t},[t]),d.useEffect(()=>{const $=E=>{E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),g!=="closing"&&C("closing"))};return window.addEventListener("keydown",$,!0),()=>window.removeEventListener("keydown",$,!0)},[g]);const L=()=>{g!=="closing"&&C("closing")},N=g==="open",b=g==="closing",P=b&&i&&!!r,O=g==="opening"?r??f:P?r:f;return a.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:L,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:N?1:0,transition:`opacity ${It}ms ${Dt}`,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:N?1:0,transition:`opacity ${It}ms ${Dt}`,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:N?1:0,transition:`opacity ${It}ms ${Dt}`},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]})}),O&&a.jsx("img",{ref:x,src:e[t],onLoad:M,style:{position:"fixed",top:O.top,left:O.left,width:O.width,height:O.height,objectFit:n==="cover"?"cover":"contain",opacity:b&&!P?0:1,transition:b&&!P?`opacity ${It}ms ${Dt}`:P||w?`top ${It}ms ${Dt}, left ${It}ms ${Dt}, width ${It}ms ${Dt}, height ${It}ms ${Dt}`:"none",pointerEvents:"none",zIndex:9998}}),N&&f&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{position:"fixed",top:f.top,left:f.left,width:f.width/2,height:f.height,cursor:"w-resize",zIndex:9999},onClick:$=>{$.stopPropagation(),o()}}),a.jsx("div",{style:{position:"fixed",top:f.top,left:f.left+f.width/2,width:f.width/2,height:f.height,cursor:"e-resize",zIndex:9999},onClick:$=>{$.stopPropagation(),c()}})]})]})}function wd(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Td({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,metadata:l,activeEvent:o,layoutId:c}){const{prefix:s}=y.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:T=100,verticalGap:x,entriesCount:f,lightbox:m,imageDisplay:g,lightboxImageDisplay:C,slider:w,sliderTiming:S,direction:v,transition:M,titleMarginTop:L,subtitleMarginTop:N,titleColor:b,subtitleColor:P,lightboxCounterColor:O,titleFontFamily:$,titleFontSettings:E,titleFontSize:A,titleLineHeight:W,titleLetterSpacing:j,titleWordSpacing:te,titleTextAppearance:k,subtitleFontFamily:F,subtitleFontSettings:D,subtitleFontSize:H,subtitleLineHeight:I,subtitleLetterSpacing:K,subtitleWordSpacing:Q,subtitleTextAppearance:Z,lightboxCounterFontFamily:R,lightboxCounterFontSettings:ne,lightboxCounterFontSize:h,lightboxCounterLineHeight:ee,lightboxCounterLetterSpacing:ge,lightboxCounterWordSpacing:le,lightboxCounterTextAppearance:be,showText:re="always",alignEntries:ce="off"}=e,V={fontSettings:{fontFamily:$,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:A??.01,lineHeight:W,letterSpacing:j??0,wordSpacing:te??0,textAppearance:k,color:b},G={...yt(Ze(V,n))},se={fontSettings:{fontFamily:F,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:H??.01,lineHeight:I,letterSpacing:K??0,wordSpacing:Q??0,textAppearance:Z,color:P},Te={...yt(Ze(se,n))},Se={fontSettings:{fontFamily:R,fontWeight:(ne==null?void 0:ne.fontWeight)??400,fontStyle:(ne==null?void 0:ne.fontStyle)??"normal"},fontSize:h??.01,lineHeight:ee,letterSpacing:ge??0,wordSpacing:le??0,textAppearance:be,color:O},Ee={...yt(Ze(Se,n)),...Kr(h,ee,s,n)},B=qr(A,W,`${s}-item-title`,`${s}-text-tight-leading`),oe=qr(H,I,`${s}-item-subtitle`,`${s}-text-tight-leading`),_=Kr(A,W,s,n),z=Kr(H,I,s,n),q=qr(h,ee,`${s}-lightbox-counter`,`${s}-text-tight-leading`),Y=y.buildColorVars(s,{titleColor:b,subtitleColor:P,lightboxCounterColor:O},Ld,Pd),We=`${o&&o!=="default"?`${s}-state-${o}`:""}${re==="on hover"&&(!n||r)?` ${s}-show-text-hover`:""}`.trim(),he=f===0?1/0:f,ve=(t??[]).slice(0,he),Fe=u.entryWidth??.2,ie=(g==null?void 0:g.display)==="cover",xe=(g==null?void 0:g.ratioValue)??"1:1",Ae=(g==null?void 0:g.reversed)??!1,[ke,Ve]=xe.split(":").map(Number),pt=`${Ae?Ve:ke} / ${Ae?ke:Ve}`,xt=y.scalingValue(Fe??0,n),Et=!ie&&w!=="off",mt={width:xt,...ie?{aspectRatio:pt,height:"auto",overflow:"hidden"}:{height:"auto"}},_t=`${s}-item-image-wrapper${Et?` ${s}-item-image-wrapper-fit-slider`:""}`.trim(),pe=p==="c",He=pe&&ce==="on",Be=`calc(${y.scalingValue(Fe??0,n)} * (${T} / 100))`,Ue=y.scalingValue(Fe*T/100,n),Ct=ie?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Vt,gt]=d.useState("ltr"),[At,An]=d.useState(0),$e=d.useRef(null);d.useEffect(()=>{const Ie=$e.current;if(!Ie)return;const at=new ResizeObserver(st=>{An(Math.round(st[0].contentRect.width))});return at.observe(Ie),()=>at.disconnect()},[]);const Qe=(()=>{const Ie={...Y},at=$e.current?getComputedStyle($e.current).getPropertyValue("--cntrl-article-width").trim():"";return at&&(Ie["--cntrl-article-width"]=at),Ie})(),[Ke,De]=d.useState(!1),[it,Zn]=d.useState([]),[Fr,ln]=d.useState(0),[Mr,Jn]=d.useState(null),er=(Ie,at,st)=>{if(n&&!r||m==="off")return;const X=Ie.currentTarget.getBoundingClientRect();Jn({top:X.top,left:X.left,width:X.width,height:X.height}),Zn(at),ln(st),De(!0)};d.useEffect(()=>{if(!Ke||m!=="on"||typeof document>"u")return;const Ie=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ie}},[Ke,m]),d.useEffect(()=>{!n||r||(De(!1),Jn(null))},[n,r]);const Nr=d.useMemo(()=>Cd(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Nr}}),a.jsx("div",{style:Y,children:a.jsx("div",{ref:$e,className:`${s}-wrapper ${s}-type-${p}${He?` ${s}-align-entries`:""} ${We}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:He?0:y.scalingValue(x??0,n),columnGap:y.scalingValue(u.horizontalGap??0,n),width:y.scalingValue(u.wrapperWidth??0,n),...He?{[`--${s}-align-entries-row-gap`]:y.scalingValue(x??0,n)}:{}},children:ve.map((Ie,at)=>{var Ye,dt;const st=ci(Ie.title),X=ci(Ie.subtitle),ue=(((Ye=Ie.link)==null?void 0:Ye.length)??0)>0&&m==="off"?Ie.link:void 0,fe=Math.floor(at/u.columnsCount)===Math.ceil(ve.length/u.columnsCount)-1,we=pe?a.jsxs("div",{className:`${s}-item-text-block`,children:[st&&a.jsx("p",{className:B,style:{width:Be,...G,..._},children:Ie.title}),st&&a.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(L??0,n),width:Ue}}),X&&a.jsx("p",{className:oe,style:{width:Be,...Te,...z},children:Ie.subtitle}),X&&a.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(N??0,n),width:Ue}})]}):null,je=pe?a.jsxs("div",{className:`${s}-item-title-row`,children:[st&&a.jsx("p",{className:B,style:{width:Be,...G,..._},children:Ie.title}),st&&a.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(L??0,n),width:Ue}})]}):null,Ge=pe?a.jsxs("div",{className:`${s}-item-subtitle-row`,children:[X&&a.jsx("p",{className:oe,style:{width:Be,...Te,...z},children:Ie.subtitle}),X&&a.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(N??0,n),width:Ue}})]}):null,Pe=ue?a.jsxs("a",{href:ue,target:"_blank",className:`${s}-item-text-link`,children:[je,Ge]}):a.jsxs(a.Fragment,{children:[je,Ge]}),lt=a.jsx("div",{className:_t,style:mt,children:(((dt=Ie.image)==null?void 0:dt.length)??0)===0?null:w==="off"?(()=>{const Me=Ie.image[0],rt=Ie.image.filter(Je=>!Kt(Je)).map(Je=>Je.url);return a.jsx(di,{media:Me,className:`${s}-item-${Kt(Me)?"video":"image"}`.trim(),style:Ct,onImageClick:Kt(Me)?void 0:Je=>er(Je,rt,0)})})():a.jsxs(a.Fragment,{children:[Et&&a.jsx("div",{className:`${s}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ie.image.map(Me=>Kt(Me)?a.jsx("video",{src:Me.url,muted:!0,playsInline:!0},`sizer-${Me.url}`):a.jsx("img",{src:Me.url,alt:""},`sizer-${Me.url}`))}),a.jsx(Eo,{className:`${s}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:S*1e3,width:"100%",height:"100%",speed:Sd,type:M==="fade"?"fade":"loop",rewind:M==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:M==="fade"?"ltr":v!=="random"?v==="horizontal"?"ltr":"ttb":Vt},onMoved:Me=>{if(v!=="random"||M==="fade")return;const nt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";gt(nt),setTimeout(()=>{Me.refresh()},0)},children:Ie.image.map((Me,nt)=>{const rt=Ie.image.filter(Xe=>!Kt(Xe)),Je=rt.map(Xe=>Xe.url),cn=rt.findIndex(Xe=>Xe.url===Me.url);return a.jsx(_o,{children:a.jsx(di,{media:Me,className:`${s}-item-${Kt(Me)?"video":"image"}`.trim(),style:Ct,onImageClick:Kt(Me)?void 0:Xe=>er(Xe,Je,cn)})},nt)})},`${M}-${Fe}-${v}-${S}-${At}-${c}`)]})}),ct=pe?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":i&&st?"titleMarginTop":void 0,className:i&&st?`${s}-control`:void 0,style:{height:st?y.scalingValue(L??0,n):0,width:Ue}}),a.jsx("p",{className:B,style:{width:Be,...G,..._},children:Ie.title}),a.jsx("div",{"data-controls":i&&X?"subtitleMarginTop":void 0,className:i&&X?`${s}-control`:void 0,style:{height:X?y.scalingValue(N??0,n):0,width:Ue}}),a.jsx("p",{className:oe,style:{width:Be,...Te,...z},children:Ie.subtitle})]});return a.jsx("div",{className:`${s}-item`.trim(),children:a.jsx("div",{className:`${i?`${s}-item-inner`:`${s}-item-inner-hidden`}${He&&fe?` ${s}-item-inner-last-row`:""}`.trim(),style:{width:(T??0)>100?`calc(${y.scalingValue(Fe??0,n)} * (${T} / 100))`:y.scalingValue(Fe??0,n)},children:He?a.jsxs(a.Fragment,{children:[Pe,a.jsx("a",{href:ue,target:"_blank",className:`${s}-item-image-link`,children:lt})]}):a.jsxs("a",{href:ue,target:"_blank",className:`${s}-item-image-link`,children:[we,lt,ct]})})},at)})})}),(!n||r)&&Ke&&typeof document<"u"&&m==="on"&&Ii.createPortal(a.jsx("div",{style:Qe,"data-selection":"none",children:a.jsx($d,{images:it,index:Fr,imageDisplay:wd(C),originRect:Mr,reverseClose:w==="off",onClose:()=>De(!1),onPrev:()=>ln(Ie=>(Ie-1+it.length)%it.length),onNext:()=>ln(Ie=>(Ie+1)%it.length),counterClassName:q,counterStyle:Ee})}),document.body)]})}const Ld={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Pd=["hover","focus","filled","success","error"],Ed=`import { Splide, SplideSlide } from '@splidejs/react-splide';\r
|
|
3849
3849
|
import '@splidejs/react-splide/css/core';\r
|
|
3850
3850
|
import { CommonComponentProps } from '../props';\r
|
|
3851
3851
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
|
|
@@ -5445,7 +5445,7 @@ a.${e}-list-item {
|
|
|
5445
5445
|
overflow-wrap: anywhere;
|
|
5446
5446
|
word-break: break-word;
|
|
5447
5447
|
}
|
|
5448
|
-
`}const Xt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ao=["AColumn","BColumn","CColumn","DColumn","EColumn"],Ht="cutLabel",Io=[...Ao,Ht],Wr=["A","B","C","D","E"];function ha(e){return`${e}ColumnVerticalAlign`}const ao=["Top","Center","Bottom"];function Ro(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const r=t.slice(-1).toUpperCase();return Wr.includes(r)?`Baseline ${r}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Nd(e){const t=Ro(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Hd(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Wr.includes(n)?n:null}function fa(e,t,n){const r=Hd(e);return r?r===t?!1:Nd(n[ha(r)]):!0}function Vn(e){const t=Ro(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Wr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Od(e,t,n){if(ya(e,t,n))return Vn(e);const r=Vn(e);return r.kind==="baseline"?{kind:"top"}:r}function Bd(e){const t=Vn(e);return t.kind==="baseline"?{kind:"top"}:t}function ya(e,t,n){return fa(e,n,t)?Vn(e).kind==="baseline":!1}function Vd(e){const t={};let n=!1;for(const r of Wr){const i=ha(r),l=e[i];if(e.type==="b"){const o=String(l??"Top").trim();o!=="Top"&&o!=="Center"&&o!=="Bottom"&&(t[i]="Top",n=!0);continue}fa(l,r,e)||(t[i]="Top",n=!0)}return n?t:null}function Dd(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function zd(e){const t=Vn(e).kind;return t==="baseline"?"center":t}function jd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function hi(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function qd(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:i}=n.getBoundingClientRect(),l=i-r;return n.remove(),l}function Gr(e,t,n,r){const i=e.titleEl;if(!i)return 0;const l=i.closest(`.${n}`);if(!l)return 0;const o=qd(i,r);if(e.kind==="baseline")return i.getBoundingClientRect().top-t+o;const c=l.getBoundingClientRect(),s=i.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+o}function Kd(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(i=>{const l=i.querySelector(`.${n}`);l&&(l.style.minHeight=`${r}px`,l.style.height=`${r}px`)}),r)}function Ud(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Gd={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function _e(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Yd={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Xd(e){return[_e(e,"textFontFamily"),_e(e,"textFontSettings"),{type:"row",items:[_e(e,"textFontSize"),_e(e,"textLineHeight"),_e(e,"textLetterSpacing"),_e(e,"textWordSpacing")]},_e(e,"textTextAlign"),_e(e,"textTextAppearance"),`${e}VerticalAlign`]}function Qd(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Io.map(e=>[Yd[e],Xd(e)]))}}function Cr(e,t){const n=r=>{const i=_e(t,r);return e[i]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===Ht?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function fi(e,t){var r,i;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((i=e.textFontSettings)==null?void 0:i.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return yt(Ze(n,t))}function yi(e,t,n,r){const i=Cr(e,t),l=i.textFontSize??.01,o=i.textLineHeight;return o!==void 0&&o<l?`${n} ${r}`:n}function vi(e,t,n,r){const i=Cr(e,t),l=i.textFontSize??.01,o=i.textLineHeight;return o===void 0||o>=l?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((l-o)/2,r)}}const vt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],$n=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],wn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Tn=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Zd={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Jd=["hover","focus","filled","success","error"],bi=.004,hn=.004,Yr=hn,xi=12,ko=50,Dn=1440,zn=ko/Dn;function va(e){const t=typeof e=="number"&&e>0?e:Dn;return ko/t}function eu(e,t){const n={position:"absolute",width:xi,height:xi,pointerEvents:"auto"};return t==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:t==="center-x"?{...n,left:"50%",top:`var(--${e}-first-entry-handle-top, 50%)`,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function Rt({P:e,className:t,areaStyle:n,hitPlacement:r,...i}){return a.jsx("div",{className:t,style:{...n,pointerEvents:"none"},"data-controls-center-only-drag":"",...i,children:a.jsx("div",{style:eu(e,r)})})}function tu(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const i=parseFloat(n);if(Number.isFinite(i)&&i>0)return i}const r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const i=parseFloat(r);if(Number.isFinite(i)&&i>0)return i}t=t.parentElement}return Dn}const ba={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function kn(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function nu(e,t=1){const n=t/e;return Object.fromEntries(vt.map(r=>[r,n]))}function ru(){return Object.fromEntries([...$n.map(e=>[e,0]),...wn.map(e=>[e,0])])}function ou(){return Object.fromEntries(Tn.map(e=>[e,0]))}function sr(e){return Object.fromEntries(vt.map(t=>[t,typeof e[t]=="number"?e[t]:ba[t]]))}function xa(e,t,n){const r=e-zn,i=t+n;if(i<=0||i<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const l=r/i;return{paddingLeft:t*l,paddingRight:n*l}}function gr(e,t,n){const r=Wo(e,t,n);if(e<=0)return[];const i=r.slice(0,e-1).reduce((l,o)=>l+o,0);return[...r.slice(0,e-1),Math.max(0,t-i)]}function iu(e,t,n){const r={};for(let i=0;i<e;i+=1){const l=$n[i],o=wn[i],c=typeof n[l]=="number"?n[l]:0,s=typeof n[o]=="number"?n[o]:0,p=xa(t[i]??0,c,s);p.paddingLeft!==c&&(r[l]=p.paddingLeft),p.paddingRight!==s&&(r[o]=p.paddingRight)}return r}function Wo(e,t,n){if(e<=0)return[];const r=vt.slice(0,e).map(p=>n[p]);if(e===1)return r;const i=r.slice(0,e-1),o=i.reduce((p,u)=>p+u,0)+zn;if(t>=o)return r;const c=[...i];let s=o-t;for(let p=c.length-1;p>=0&&s>0;p-=1){const u=c[p]-zn;if(u<=0)continue;const T=Math.min(s,u);c[p]-=T,s-=T}return[...c,r[e-1]]}function au(e,t,n){if(e<=1)return{};const r=Wo(e,t,n),i={};for(let l=0;l<e-1;l+=1){const o=vt[l];r[l]!==n[o]&&(i[o]=r[l])}return i}function Ci(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Xt]}function su(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function lu(e,t,n,r){const i=Math.min(r,e.length,vt.length),l={};for(let o=0;o<i;o+=1){const c=e[o],s=t.indexOf(c);if(s===-1)continue;const p=vt[s],u=$n[s],T=wn[s],x=Tn[s],f=vt[o],m=$n[o],g=wn[o],C=Tn[o],w=n[p],S=n[u],v=n[T],M=n[x];typeof w=="number"&&(l[f]=w),typeof S=="number"&&(l[m]=S),typeof v=="number"&&(l[g]=v),typeof M=="number"&&(l[C]=M)}return l}function Ca(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 cu(e,t){const n=e.columns,r=t.columns;if(typeof n!="number"||n===r)return e;const i=kn(e),l=e.type==="b"||e.type===void 0&&t.type==="b",o={...e,...nu(n,i),...ru()};if(l)for(const c of Tn)typeof t[c]=="number"&&(o[c]=t[c]);else Object.assign(o,ou());return Ca(e,o)?o:e}function du(e,t,n){const r=Vd(e);r&&(e={...e,...r});const i=va(n==null?void 0:n.designWidth),l=e.columns,o=t.columns,c=kn(e),s=kn(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof l=="number"?l:typeof o=="number"?o:Xt.length,T=v=>{if(p)return v;const M=sr({...t,...v}),L=kn(v),N=gr(u,L,M),b=iu(u,N,{...t,...v});return Object.keys(b).length===0?v:{...v,...b}};if(typeof l=="number"&&l!==o)return e;const x=Ci(e),f=Ci(t);if(!su(x,f))return T({...e,...lu(x,f,t,u)});if(c<s&&typeof u=="number"&&!p){const v=sr({...t,...e});return T({...e,...au(u,c,v)})}if(p){const v=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,M=Math.max(0,(c-i)/2);return v>M?{...e,textPaddingLR:M}:e}const m=sr({...t,...e}),g=gr(u,s,sr(t)),w=gr(u,c,m).some((v,M)=>v<(g[M]??v)),S=vt.some(v=>{const M=e[v],L=t[v];return typeof M=="number"&&typeof L=="number"&&M!==L});return w||S?T(e):e}function uu(e,t,n,r){const i=t.slice(0,e).reduce((o,c)=>o+c,0),l=n.slice(e+1,t.length-1).reduce((o,c)=>o+c,0);return Math.max(zn,r-i-l-zn)}function pu(e,t){return Math.random()*(t-e)+e}function mu(e){return Object.fromEntries(vt.map(t=>[t,typeof e[t]=="number"?e[t]:ba[t]]))}function Xr(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function gu(e,t,n,r,i,l){return e.slice(0,t).map((o,c)=>{const s=$n[c],p=wn[c],u=Tn[c];return{key:o,textPrefix:Gd[o],widthKey:vt[c],width:n[vt[c]],paddingLeftKey:s,paddingRightKey:p,paddingBottomKey:u,paddingLeft:r[s],paddingRight:i[p],paddingBottom:l[u]}})}function hu({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:l,layoutId:o,onUpdateSettings:c}){const{prefix:s}=y.useScopedStyles(),p=!!i,{columns:u,type:T,wrapperWidth:x,entriesCount:f,cellMinHeight:m,dividerWidth:g,showVisibility:C,cut:w,showCut:S,cutCellMinHeight:v,cutLabel:M,imageSize:L,imageOnHover:N,entryHoverEffect:b,entryHoverShowOption:P,rowPaddingTop:B,rowPaddingBottom:$,rowPaddingTopB:E,columnsOrder:A,textPaddingLR:W,textColor:j,backgroundColor:te,dividerColor:k,textHoverColor:F,backgroundHoverColor:D,dividerHoverColor:H}=e,[I,K]=d.useState(void 0),[Q,Z]=d.useState(null),R=N==="on"&&(!n||r),ne=(w??0)>0,h=T==="b",ee=d.useRef(null),ge=d.useRef(null),[le,be]=d.useState(null),[re,ce]=d.useState(Dn),V=va(re),U=Math.max(0,((x??0)-V)/2),G=Math.min(W??0,U),se=Math.max(G,hn),ye=((x??0)+V)/2;d.useLayoutEffect(()=>{if(!n){ce(Dn);return}const X=()=>{ce(tu(ee.current))};X();const ue=ee.current;if(!ue)return;const fe=new ResizeObserver(X);fe.observe(ue);let we=ue;for(;we&&!we.style.getPropertyValue("--cntrl-article-width");)we=we.parentElement;return we&&fe.observe(we),()=>fe.disconnect()},[n,o]),d.useEffect(()=>{K(void 0)},[w,S,t,f]),d.useEffect(()=>{n&&!r&&K(void 0)},[n,r]);const Te=y.buildColorVars(s,{textColor:j,backgroundColor:te,dividerColor:k,textHoverColor:F,backgroundHoverColor:D,dividerHoverColor:H},Zd,Jd),Se=l&&l!=="default"?`${s}-state-${l}`:"",Ee=`${!n||r?b==="default"?`${s}-entry-hover-default`:b==="blinds"?`${s}-entry-hover-blinds`:b==="reveal"?`${s}-entry-hover-reveal`:"":""} ${Se}`.trim(),O=b==="reveal"&&(!n||r),oe=(C==null?void 0:C[0])??!1,_=(C==null?void 0:C[1])??!1,z=d.useRef(e),q=d.useRef(o);d.useEffect(()=>{if(!c||!n){z.current=e,q.current=o;return}if(q.current!==o){z.current=e,q.current=o;return}const X=z.current;if(!(X!==e))return;if(typeof X.columns=="number"&&typeof e.columns=="number"&&X.columns!==e.columns){z.current=e;return}const fe=du(e,X,{designWidth:re});z.current=e,Ca(e,fe)&&c(fe)},[e,c,n,o,re]);const Y=d.useMemo(()=>mu(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ae=d.useMemo(()=>Xr(e,$n),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),me=d.useMemo(()=>Xr(e,wn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),We=d.useMemo(()=>Xr(e,Tn),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),he=d.useMemo(()=>Array.isArray(A)&&A.length>0?A:[...Xt],[A]),ve=d.useMemo(()=>gu(he,u,Y,ae,me,We),[he,u,Y,ae,me,We]),Fe=kn(e),ie=d.useMemo(()=>vt.slice(0,u).map(X=>Y[X]),[u,Y]),xe=d.useMemo(()=>Wo(u,Fe,Y),[u,Fe,Y]),Ae=d.useMemo(()=>gr(u,Fe,Y),[u,Fe,Y]),ke=d.useMemo(()=>ve.map((X,ue)=>xa(Ae[ue]??0,X.paddingLeft,X.paddingRight)),[ve,Ae]),Ve=d.useMemo(()=>{const X=f===0?1/0:f;return(t??[]).slice(0,X).map((fe,we)=>({id:we,cells:Object.fromEntries(Xt.map(je=>[je,fe[je]??""])),image:fe.image,link:fe.link}))},[t,f]),tt=ne?I??w:Ve.length,ut=d.useMemo(()=>ne?Ve.slice(0,tt):Ve,[Ve,ne,tt]),pt=ne&&tt<Ve.length,xt=ut.length>1||pt,Et=[oe?`${s}-divider-top`:"",_||xt?`${s}-divider-bottom`:""].filter(Boolean).join(" "),mt=!n||r,_t=()=>{if(!mt)return;const X=I??w;if(!S){K(Ve.length);return}K(Math.min(X+S,Ve.length))},pe=X=>y.scalingValue(X,n??!1),He=h?E??0:B??0,Oe=$??0,Ue=m??0,Ct=He+Ue/2,Vt=Math.max(Oe,Yr),gt=mi(0,ut.length,oe,_,pt,g??0,n??!1).borderTopWidth,At=le!=null?`${le}px`:`calc(${gt} + ${pe(Ct)})`,An=h?"rowPaddingTopB":"rowPaddingTop",$e=ve[0],Qe=ve[ve.length-1],Ke=ke[0],De=ke[ke.length-1],it=$e&&Ke?Math.max(Ke.paddingLeft,hn):0,Zn=Qe&&De?Math.max(De.paddingRight,hn):0,Fr=Fe,ln=X=>{const ue=ee.current;if(!ue)return{x:0,y:0};const fe=ue.getBoundingClientRect();return{x:X.clientX-fe.left+gi,y:X.clientY-fe.top+gi}},Mr=(X,ue)=>{if(!R)return;const fe=X.image;if(!(fe!=null&&fe.url)){Z(null);return}const{x:we,y:je}=ln(ue),Ge=(L==null?void 0:L.min)??80,Pe=(L==null?void 0:L.max)??320,lt=(Q==null?void 0:Q.rowId)===X.id?Q.widthPx:pu(Ge,Pe);Z({rowId:X.id,url:fe.url,objectFit:"contain",isVideo:Rd(fe),widthPx:lt,x:we,y:je})},Jn=X=>{if(!R||!Q)return;const{x:ue,y:fe}=ln(X);Z(we=>!we||we.x===ue&&we.y===fe?we:{...we,x:ue,y:fe})},er=()=>{Z(null)},Nr=X=>{O&&ui(X,s),R&&Z(null)},Ie=X=>{O&&pi(X,s)};d.useLayoutEffect(()=>{if(!p||h){be(null);return}const X=ge.current,ue=X==null?void 0:X.parentElement;if(!X||!ue){be(null);return}const fe=()=>{const je=X.querySelector("[data-list-row]");if(!je){be(null);return}const Ge=ue.getBoundingClientRect(),Pe=je.getBoundingClientRect();be(Pe.top-Ge.top+Pe.height/2)};fe();const we=new ResizeObserver(fe);return we.observe(X),we.observe(ue),()=>we.disconnect()},[p,h,ut,He,Oe,Ue,t,e,ve,Ae,re,g,oe,_,pt]);const at=d.useMemo(()=>!h&&Ao.some(X=>{const ue=X.charAt(0),fe=e[`${X}VerticalAlign`];return ya(fe,e,ue)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);d.useLayoutEffect(()=>{var lt;const X=ee.current;if(!X)return;const ue=()=>{X.querySelectorAll("[data-list-col]").forEach(ct=>{ct.style.transform="";const Ye=ct.querySelector(`.${s}-list-col`);Ye&&(Ye.style.minHeight="",Ye.style.height="");const dt=ct.querySelector(`.${s}-list-col-title`);dt&&(dt.style.transform="")})};if(h||!at){ue();return}const fe=()=>{const ct=Array.from(X.querySelectorAll("[data-list-row]")),Ye=`${s}-list-col`,dt=`${s}-baseline-probe`;ct.forEach(Me=>{Me.querySelectorAll("[data-list-col]").forEach(nt=>{nt.style.transform="";const rt=nt.querySelector(`.${Ye}`);rt&&(rt.style.minHeight="",rt.style.height="");const Je=nt.querySelector(`.${s}-list-col-title`);Je&&(Je.style.transform="")})}),ct.forEach(Me=>{const nt=Array.from(Me.querySelectorAll("[data-list-col]"));Kd(Me,nt,Ye)}),X.offsetHeight,ct.forEach(Me=>{const nt=Array.from(Me.querySelectorAll("[data-list-col]")),rt=Me.getBoundingClientRect().top,Je=new Map,cn=nt.map(ze=>{const dn=ze.querySelector(`.${s}-list-col-title`),un={el:ze,titleEl:dn,letter:ze.getAttribute("data-col-letter")??"",kind:ze.getAttribute("data-valign")??"top",anchor:ze.getAttribute("data-valign-anchor")};return Je.set(un.letter,un),un}),Xe=new Map,tr=(ze,dn)=>{const un=Xe.get(ze.letter);if(un!==void 0)return un;const Fo=ze.anchor?Je.get(ze.anchor):void 0;if(ze.kind!=="baseline"||!Fo||dn.has(ze.letter)){const No=Gr(ze,rt,Ye,dt);return Xe.set(ze.letter,No),No}dn.add(ze.letter);const $a=tr(Fo,dn);dn.delete(ze.letter);const wa=Gr(ze,rt,Ye,dt),Ta=$a-wa;Ud(ze.titleEl,Ta);const Mo=Gr(ze,rt,Ye,dt);return Xe.set(ze.letter,Mo),Mo};cn.forEach(ze=>tr(ze,new Set))})};let we=null;const je=()=>{we===null&&(we=requestAnimationFrame(()=>{we=null,fe()}))};fe();const Ge=new ResizeObserver(()=>je());Ge.observe(X);let Pe=!1;return typeof document<"u"&&((lt=document.fonts)!=null&<.ready)&&document.fonts.ready.then(()=>{Pe||je()}),()=>{Pe=!0,we!==null&&(cancelAnimationFrame(we),we=null),Ge.disconnect(),ue()}},[at,h,e,t,re,ut,Ae]);const st=d.useMemo(()=>Md(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:st}}),a.jsx("div",{style:Te,children:a.jsxs("div",{ref:ee,className:`${s}-wrapper ${Ee}${Et?` ${Et}`:""}${h?` ${s}-type-b`:""}`.trim(),style:{width:y.scalingValue(x??0,n),...!h&&p?{[`--${s}-first-entry-handle-top`]:At}:{}},onMouseMove:R?Jn:void 0,onMouseLeave:R?er:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[ut.map((X,ue)=>{var Ge;const fe=(((Ge=X.link)==null?void 0:Ge.length)??0)>0,we=fe&&(!n||r)?"a":"div",je=mi(ue,ut.length,oe,_,pt,g??0,n??!1);return a.jsxs(we,{ref:ue===0?Pe=>{ge.current=Pe}:void 0,className:`${s}-list-item${fe||P==="always"?` ${s}-list-item-has-link`:""}`,...fe?{href:X.link,target:"_blank"}:{},style:je,onMouseEnter:Pe=>{O&&(fe||P==="always")&&ui(Pe,s),R&&Mr(X,Pe)},onMouseLeave:Pe=>{O&&(fe||P==="always")&&pi(Pe,s)},children:[He>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:pe(He)}}),a.jsxs("div",{className:`${s}-list-cols-row${h?"":` ${s}-list-cols-row-h`}${p&&ue===0&&h?` ${s}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:pe(Ue)},children:[ve.map((Pe,lt)=>{const ct=lt===ve.length-1,Ye=ke[lt],dt=Pe.paddingBottom,Me=Wd(X.cells[Pe.key]),nt=h&&Me&&dt>0,rt=h?{minHeight:pe(Ue)}:{width:pe(Ae[lt])},Je=h?{paddingLeft:pe(G),paddingRight:pe(G)}:{paddingLeft:pe(Ye.paddingLeft),paddingRight:pe(Ye.paddingRight)},cn=Pe.textPrefix.charAt(0),Xe=h?Bd(e[`${Pe.textPrefix}VerticalAlign`]):Od(e[`${Pe.textPrefix}VerticalAlign`],e,cn),tr=h&&Me&&p&&ue===0;return a.jsxs("div",{className:h?`${s}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":cn,"data-valign":Xe.kind,...Xe.kind==="baseline"?{"data-valign-anchor":Xe.anchorLetter}:{}},children:[a.jsx("div",{className:`${s}-list-col${ct?` ${s}-list-col-last`:""}`,style:{...Je,...rt,...h?{justifyContent:hi(Xe.kind)}:{}},"data-test":Pe.width,children:a.jsx("span",{className:yi(e,Pe.textPrefix,`${s}-list-col-title`,`${s}-text-tight-leading`),style:{...fi(Cr(e,Pe.textPrefix),n),...vi(e,Pe.textPrefix,s,n),...h?{}:Dd(Xe.kind)},children:X.cells[Pe.key]??null})}),nt&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:pe(dt)}}),tr&&a.jsx(Rt,{P:s,"data-controls":Pe.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(dt,Yr))}})]},Pe.key)}),p&&ue===0&&h&&a.jsxs(a.Fragment,{children:[a.jsx(Rt,{P:s,"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(Rt,{P:s,"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,Fe-se)),width:pe(se),height:"100%"}})]})]}),!h&&Oe>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:pe(Oe)}}),p&&ue===0&&!h&&a.jsx(Rt,{P:s,"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)}})]},X.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx(Rt,{P:s,"data-controls":An,"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:gt,left:0,width:"100%",height:pe(Math.max(He,Yr))}})},"row-padding-handles"),p&&!h&&$e&&Qe&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(Rt,{P:s,"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(Ae[0]-((Ke==null?void 0:Ke.paddingRight)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:pe(it),height:"100%"}}),a.jsx(Rt,{P:s,"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(Ae[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(Fr-Zn),width:pe(Zn),height:"100%"}})]},"column-edge-padding-handles"),p&&!h&&ve.slice(0,-1).map((X,ue)=>{const fe=ve[ue+1],we=xe.slice(0,ue+1).reduce((ct,Ye)=>ct+Ye,0),je=ke[ue],Ge=ke[ue+1],Pe=Math.max(je.paddingRight,hn),lt=Math.max(Ge.paddingLeft,hn);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(Rt,{P:s,"data-controls":X.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(Ae[ue]-je.paddingLeft),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:pe(we-Pe),width:pe(Pe),height:"100%"}}),a.jsx(Rt,{P:s,"data-controls":fe.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ae[ue+1]-Ge.paddingRight),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:pe(we),width:pe(lt),height:"100%"}})]},`${X.paddingRightKey}-padding`)}),p&&!h&&ve.slice(0,-1).map((X,ue)=>{const fe=uu(ue,xe,ie,Fe),je=xe.slice(0,ue+1).reduce((Ge,Pe)=>Ge+Pe,0)-bi/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":X.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(ko),"data-controls-max-fraction":String(fe),"data-controls-variant":"column-width",className:`${s}-col-resize-handle`,style:{position:"absolute",top:"0px",left:pe(je),width:pe(bi),height:"calc(100%)",pointerEvents:"auto"}})},`${X.widthKey}-junction`)})]}),pt&&(()=>{const X=Cr(e,Ht),ue=zd(e.cutLabelVerticalAlign),fe=X.textTextAlign==="justify"||h;return a.jsx("button",{type:"button",className:`${s}-cut-item`,style:{minHeight:pe(v??0),cursor:mt?"pointer":"default",...Fd(_,g??0,n??!1)},onClick:mt?_t:void 0,onMouseEnter:O||R?Nr:void 0,onMouseLeave:O?Ie:void 0,children:a.jsx("div",{className:`${s}-list-cols-row`,style:{...h?{paddingLeft:pe(G),paddingRight:pe(G)}:{},justifyContent:jd(X.textTextAlign),alignItems:hi(ue)},children:a.jsx("span",{className:yi(e,Ht,`${s}-cut-label`,`${s}-text-tight-leading`),style:{...fi(X,n),...vi(e,Ht,s,n),...fe?{width:"100%"}:{}},children:M})})})})(),R&&Q&&(()=>{const X=mr(Q.widthPx),ue={width:X,height:"auto",maxHeight:X,objectFit:"contain",left:Q.x,top:Q.y,position:"absolute"};return a.jsx(kd,{media:Q,className:Q.isVideo?`${s}-hover-video`:`${s}-hover-image`,style:ue},`${Q.rowId}-${Q.url}`)})()]})})]})}const fu=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';\r
|
|
5448
|
+
`}const Xt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ao=["AColumn","BColumn","CColumn","DColumn","EColumn"],Ht="cutLabel",Io=[...Ao,Ht],Wr=["A","B","C","D","E"];function ha(e){return`${e}ColumnVerticalAlign`}const ao=["Top","Center","Bottom"];function Ro(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const r=t.slice(-1).toUpperCase();return Wr.includes(r)?`Baseline ${r}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Nd(e){const t=Ro(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Hd(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Wr.includes(n)?n:null}function fa(e,t,n){const r=Hd(e);return r?r===t?!1:Nd(n[ha(r)]):!0}function Vn(e){const t=Ro(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Wr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Bd(e,t,n){if(ya(e,t,n))return Vn(e);const r=Vn(e);return r.kind==="baseline"?{kind:"top"}:r}function Od(e){const t=Vn(e);return t.kind==="baseline"?{kind:"top"}:t}function ya(e,t,n){return fa(e,n,t)?Vn(e).kind==="baseline":!1}function Vd(e){const t={};let n=!1;for(const r of Wr){const i=ha(r),l=e[i];if(e.type==="b"){const o=String(l??"Top").trim();o!=="Top"&&o!=="Center"&&o!=="Bottom"&&(t[i]="Top",n=!0);continue}fa(l,r,e)||(t[i]="Top",n=!0)}return n?t:null}function Dd(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function zd(e){const t=Vn(e).kind;return t==="baseline"?"center":t}function jd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function hi(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function qd(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:i}=n.getBoundingClientRect(),l=i-r;return n.remove(),l}function Gr(e,t,n,r){const i=e.titleEl;if(!i)return 0;const l=i.closest(`.${n}`);if(!l)return 0;const o=qd(i,r);if(e.kind==="baseline")return i.getBoundingClientRect().top-t+o;const c=l.getBoundingClientRect(),s=i.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+o}function Kd(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(i=>{const l=i.querySelector(`.${n}`);l&&(l.style.minHeight=`${r}px`,l.style.height=`${r}px`)}),r)}function Ud(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Gd={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function _e(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Yd={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Xd(e){return[_e(e,"textFontFamily"),_e(e,"textFontSettings"),{type:"row",items:[_e(e,"textFontSize"),_e(e,"textLineHeight"),_e(e,"textLetterSpacing"),_e(e,"textWordSpacing")]},_e(e,"textTextAlign"),_e(e,"textTextAppearance"),`${e}VerticalAlign`]}function Qd(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Io.map(e=>[Yd[e],Xd(e)]))}}function Cr(e,t){const n=r=>{const i=_e(t,r);return e[i]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===Ht?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function fi(e,t){var r,i;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((i=e.textFontSettings)==null?void 0:i.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return yt(Ze(n,t))}function yi(e,t,n,r){const i=Cr(e,t),l=i.textFontSize??.01,o=i.textLineHeight;return o!==void 0&&o<l?`${n} ${r}`:n}function vi(e,t,n,r){const i=Cr(e,t),l=i.textFontSize??.01,o=i.textLineHeight;return o===void 0||o>=l?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((l-o)/2,r)}}const vt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],$n=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],wn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Tn=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Zd={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Jd=["hover","focus","filled","success","error"],bi=.004,hn=.004,Yr=hn,xi=12,ko=50,Dn=1440,zn=ko/Dn;function va(e){const t=typeof e=="number"&&e>0?e:Dn;return ko/t}function eu(e,t){const n={position:"absolute",width:xi,height:xi,pointerEvents:"auto"};return t==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:t==="center-x"?{...n,left:"50%",top:`var(--${e}-first-entry-handle-top, 50%)`,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function Rt({P:e,className:t,areaStyle:n,hitPlacement:r,...i}){return a.jsx("div",{className:t,style:{...n,pointerEvents:"none"},"data-controls-center-only-drag":"",...i,children:a.jsx("div",{style:eu(e,r)})})}function tu(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const i=parseFloat(n);if(Number.isFinite(i)&&i>0)return i}const r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const i=parseFloat(r);if(Number.isFinite(i)&&i>0)return i}t=t.parentElement}return Dn}const ba={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function kn(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function nu(e,t=1){const n=t/e;return Object.fromEntries(vt.map(r=>[r,n]))}function ru(){return Object.fromEntries([...$n.map(e=>[e,0]),...wn.map(e=>[e,0])])}function ou(){return Object.fromEntries(Tn.map(e=>[e,0]))}function sr(e){return Object.fromEntries(vt.map(t=>[t,typeof e[t]=="number"?e[t]:ba[t]]))}function xa(e,t,n){const r=e-zn,i=t+n;if(i<=0||i<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const l=r/i;return{paddingLeft:t*l,paddingRight:n*l}}function gr(e,t,n){const r=Wo(e,t,n);if(e<=0)return[];const i=r.slice(0,e-1).reduce((l,o)=>l+o,0);return[...r.slice(0,e-1),Math.max(0,t-i)]}function iu(e,t,n){const r={};for(let i=0;i<e;i+=1){const l=$n[i],o=wn[i],c=typeof n[l]=="number"?n[l]:0,s=typeof n[o]=="number"?n[o]:0,p=xa(t[i]??0,c,s);p.paddingLeft!==c&&(r[l]=p.paddingLeft),p.paddingRight!==s&&(r[o]=p.paddingRight)}return r}function Wo(e,t,n){if(e<=0)return[];const r=vt.slice(0,e).map(p=>n[p]);if(e===1)return r;const i=r.slice(0,e-1),o=i.reduce((p,u)=>p+u,0)+zn;if(t>=o)return r;const c=[...i];let s=o-t;for(let p=c.length-1;p>=0&&s>0;p-=1){const u=c[p]-zn;if(u<=0)continue;const T=Math.min(s,u);c[p]-=T,s-=T}return[...c,r[e-1]]}function au(e,t,n){if(e<=1)return{};const r=Wo(e,t,n),i={};for(let l=0;l<e-1;l+=1){const o=vt[l];r[l]!==n[o]&&(i[o]=r[l])}return i}function Ci(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Xt]}function su(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function lu(e,t,n,r){const i=Math.min(r,e.length,vt.length),l={};for(let o=0;o<i;o+=1){const c=e[o],s=t.indexOf(c);if(s===-1)continue;const p=vt[s],u=$n[s],T=wn[s],x=Tn[s],f=vt[o],m=$n[o],g=wn[o],C=Tn[o],w=n[p],S=n[u],v=n[T],M=n[x];typeof w=="number"&&(l[f]=w),typeof S=="number"&&(l[m]=S),typeof v=="number"&&(l[g]=v),typeof M=="number"&&(l[C]=M)}return l}function Ca(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 cu(e,t){const n=e.columns,r=t.columns;if(typeof n!="number"||n===r)return e;const i=kn(e),l=e.type==="b"||e.type===void 0&&t.type==="b",o={...e,...nu(n,i),...ru()};if(l)for(const c of Tn)typeof t[c]=="number"&&(o[c]=t[c]);else Object.assign(o,ou());return Ca(e,o)?o:e}function du(e,t,n){const r=Vd(e);r&&(e={...e,...r});const i=va(n==null?void 0:n.designWidth),l=e.columns,o=t.columns,c=kn(e),s=kn(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof l=="number"?l:typeof o=="number"?o:Xt.length,T=v=>{if(p)return v;const M=sr({...t,...v}),L=kn(v),N=gr(u,L,M),b=iu(u,N,{...t,...v});return Object.keys(b).length===0?v:{...v,...b}};if(typeof l=="number"&&l!==o)return e;const x=Ci(e),f=Ci(t);if(!su(x,f))return T({...e,...lu(x,f,t,u)});if(c<s&&typeof u=="number"&&!p){const v=sr({...t,...e});return T({...e,...au(u,c,v)})}if(p){const v=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,M=Math.max(0,(c-i)/2);return v>M?{...e,textPaddingLR:M}:e}const m=sr({...t,...e}),g=gr(u,s,sr(t)),w=gr(u,c,m).some((v,M)=>v<(g[M]??v)),S=vt.some(v=>{const M=e[v],L=t[v];return typeof M=="number"&&typeof L=="number"&&M!==L});return w||S?T(e):e}function uu(e,t,n,r){const i=t.slice(0,e).reduce((o,c)=>o+c,0),l=n.slice(e+1,t.length-1).reduce((o,c)=>o+c,0);return Math.max(zn,r-i-l-zn)}function pu(e,t){return Math.random()*(t-e)+e}function mu(e){return Object.fromEntries(vt.map(t=>[t,typeof e[t]=="number"?e[t]:ba[t]]))}function Xr(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function gu(e,t,n,r,i,l){return e.slice(0,t).map((o,c)=>{const s=$n[c],p=wn[c],u=Tn[c];return{key:o,textPrefix:Gd[o],widthKey:vt[c],width:n[vt[c]],paddingLeftKey:s,paddingRightKey:p,paddingBottomKey:u,paddingLeft:r[s],paddingRight:i[p],paddingBottom:l[u]}})}function hu({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:l,layoutId:o,onUpdateSettings:c}){const{prefix:s}=y.useScopedStyles(),p=!!i,{columns:u,type:T,wrapperWidth:x,entriesCount:f,cellMinHeight:m,dividerWidth:g,showVisibility:C,cut:w,showCut:S,cutCellMinHeight:v,cutLabel:M,imageSize:L,imageOnHover:N,entryHoverEffect:b,entryHoverShowOption:P,rowPaddingTop:O,rowPaddingBottom:$,rowPaddingTopB:E,columnsOrder:A,textPaddingLR:W,textColor:j,backgroundColor:te,dividerColor:k,textHoverColor:F,backgroundHoverColor:D,dividerHoverColor:H}=e,[I,K]=d.useState(void 0),[Q,Z]=d.useState(null),R=N==="on"&&(!n||r),ne=(w??0)>0,h=T==="b",ee=d.useRef(null),ge=d.useRef(null),[le,be]=d.useState(null),[re,ce]=d.useState(Dn),V=va(re),U=Math.max(0,((x??0)-V)/2),G=Math.min(W??0,U),se=Math.max(G,hn),ye=((x??0)+V)/2;d.useLayoutEffect(()=>{if(!n){ce(Dn);return}const X=()=>{ce(tu(ee.current))};X();const ue=ee.current;if(!ue)return;const fe=new ResizeObserver(X);fe.observe(ue);let we=ue;for(;we&&!we.style.getPropertyValue("--cntrl-article-width");)we=we.parentElement;return we&&fe.observe(we),()=>fe.disconnect()},[n,o]),d.useEffect(()=>{K(void 0)},[w,S,t,f]),d.useEffect(()=>{n&&!r&&K(void 0)},[n,r]);const Te=y.buildColorVars(s,{textColor:j,backgroundColor:te,dividerColor:k,textHoverColor:F,backgroundHoverColor:D,dividerHoverColor:H},Zd,Jd),Se=l&&l!=="default"?`${s}-state-${l}`:"",Ee=`${!n||r?b==="default"?`${s}-entry-hover-default`:b==="blinds"?`${s}-entry-hover-blinds`:b==="reveal"?`${s}-entry-hover-reveal`:"":""} ${Se}`.trim(),B=b==="reveal"&&(!n||r),oe=(C==null?void 0:C[0])??!1,_=(C==null?void 0:C[1])??!1,z=d.useRef(e),q=d.useRef(o);d.useEffect(()=>{if(!c||!n){z.current=e,q.current=o;return}if(q.current!==o){z.current=e,q.current=o;return}const X=z.current;if(!(X!==e))return;if(typeof X.columns=="number"&&typeof e.columns=="number"&&X.columns!==e.columns){z.current=e;return}const fe=du(e,X,{designWidth:re});z.current=e,Ca(e,fe)&&c(fe)},[e,c,n,o,re]);const Y=d.useMemo(()=>mu(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ae=d.useMemo(()=>Xr(e,$n),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),me=d.useMemo(()=>Xr(e,wn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),We=d.useMemo(()=>Xr(e,Tn),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),he=d.useMemo(()=>Array.isArray(A)&&A.length>0?A:[...Xt],[A]),ve=d.useMemo(()=>gu(he,u,Y,ae,me,We),[he,u,Y,ae,me,We]),Fe=kn(e),ie=d.useMemo(()=>vt.slice(0,u).map(X=>Y[X]),[u,Y]),xe=d.useMemo(()=>Wo(u,Fe,Y),[u,Fe,Y]),Ae=d.useMemo(()=>gr(u,Fe,Y),[u,Fe,Y]),ke=d.useMemo(()=>ve.map((X,ue)=>xa(Ae[ue]??0,X.paddingLeft,X.paddingRight)),[ve,Ae]),Ve=d.useMemo(()=>{const X=f===0?1/0:f;return(t??[]).slice(0,X).map((fe,we)=>({id:we,cells:Object.fromEntries(Xt.map(je=>[je,fe[je]??""])),image:fe.image,link:fe.link}))},[t,f]),tt=ne?I??w:Ve.length,ut=d.useMemo(()=>ne?Ve.slice(0,tt):Ve,[Ve,ne,tt]),pt=ne&&tt<Ve.length,xt=ut.length>1||pt,Et=[oe?`${s}-divider-top`:"",_||xt?`${s}-divider-bottom`:""].filter(Boolean).join(" "),mt=!n||r,_t=()=>{if(!mt)return;const X=I??w;if(!S){K(Ve.length);return}K(Math.min(X+S,Ve.length))},pe=X=>y.scalingValue(X,n??!1),He=h?E??0:O??0,Be=$??0,Ue=m??0,Ct=He+Ue/2,Vt=Math.max(Be,Yr),gt=mi(0,ut.length,oe,_,pt,g??0,n??!1).borderTopWidth,At=le!=null?`${le}px`:`calc(${gt} + ${pe(Ct)})`,An=h?"rowPaddingTopB":"rowPaddingTop",$e=ve[0],Qe=ve[ve.length-1],Ke=ke[0],De=ke[ke.length-1],it=$e&&Ke?Math.max(Ke.paddingLeft,hn):0,Zn=Qe&&De?Math.max(De.paddingRight,hn):0,Fr=Fe,ln=X=>{const ue=ee.current;if(!ue)return{x:0,y:0};const fe=ue.getBoundingClientRect();return{x:X.clientX-fe.left+gi,y:X.clientY-fe.top+gi}},Mr=(X,ue)=>{if(!R)return;const fe=X.image;if(!(fe!=null&&fe.url)){Z(null);return}const{x:we,y:je}=ln(ue),Ge=(L==null?void 0:L.min)??80,Pe=(L==null?void 0:L.max)??320,lt=(Q==null?void 0:Q.rowId)===X.id?Q.widthPx:pu(Ge,Pe);Z({rowId:X.id,url:fe.url,objectFit:"contain",isVideo:Rd(fe),widthPx:lt,x:we,y:je})},Jn=X=>{if(!R||!Q)return;const{x:ue,y:fe}=ln(X);Z(we=>!we||we.x===ue&&we.y===fe?we:{...we,x:ue,y:fe})},er=()=>{Z(null)},Nr=X=>{B&&ui(X,s),R&&Z(null)},Ie=X=>{B&&pi(X,s)};d.useLayoutEffect(()=>{if(!p||h){be(null);return}const X=ge.current,ue=X==null?void 0:X.parentElement;if(!X||!ue){be(null);return}const fe=()=>{const je=X.querySelector("[data-list-row]");if(!je){be(null);return}const Ge=ue.getBoundingClientRect(),Pe=je.getBoundingClientRect();be(Pe.top-Ge.top+Pe.height/2)};fe();const we=new ResizeObserver(fe);return we.observe(X),we.observe(ue),()=>we.disconnect()},[p,h,ut,He,Be,Ue,t,e,ve,Ae,re,g,oe,_,pt]);const at=d.useMemo(()=>!h&&Ao.some(X=>{const ue=X.charAt(0),fe=e[`${X}VerticalAlign`];return ya(fe,e,ue)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);d.useLayoutEffect(()=>{var lt;const X=ee.current;if(!X)return;const ue=()=>{X.querySelectorAll("[data-list-col]").forEach(ct=>{ct.style.transform="";const Ye=ct.querySelector(`.${s}-list-col`);Ye&&(Ye.style.minHeight="",Ye.style.height="");const dt=ct.querySelector(`.${s}-list-col-title`);dt&&(dt.style.transform="")})};if(h||!at){ue();return}const fe=()=>{const ct=Array.from(X.querySelectorAll("[data-list-row]")),Ye=`${s}-list-col`,dt=`${s}-baseline-probe`;ct.forEach(Me=>{Me.querySelectorAll("[data-list-col]").forEach(nt=>{nt.style.transform="";const rt=nt.querySelector(`.${Ye}`);rt&&(rt.style.minHeight="",rt.style.height="");const Je=nt.querySelector(`.${s}-list-col-title`);Je&&(Je.style.transform="")})}),ct.forEach(Me=>{const nt=Array.from(Me.querySelectorAll("[data-list-col]"));Kd(Me,nt,Ye)}),X.offsetHeight,ct.forEach(Me=>{const nt=Array.from(Me.querySelectorAll("[data-list-col]")),rt=Me.getBoundingClientRect().top,Je=new Map,cn=nt.map(ze=>{const dn=ze.querySelector(`.${s}-list-col-title`),un={el:ze,titleEl:dn,letter:ze.getAttribute("data-col-letter")??"",kind:ze.getAttribute("data-valign")??"top",anchor:ze.getAttribute("data-valign-anchor")};return Je.set(un.letter,un),un}),Xe=new Map,tr=(ze,dn)=>{const un=Xe.get(ze.letter);if(un!==void 0)return un;const Fo=ze.anchor?Je.get(ze.anchor):void 0;if(ze.kind!=="baseline"||!Fo||dn.has(ze.letter)){const No=Gr(ze,rt,Ye,dt);return Xe.set(ze.letter,No),No}dn.add(ze.letter);const $a=tr(Fo,dn);dn.delete(ze.letter);const wa=Gr(ze,rt,Ye,dt),Ta=$a-wa;Ud(ze.titleEl,Ta);const Mo=Gr(ze,rt,Ye,dt);return Xe.set(ze.letter,Mo),Mo};cn.forEach(ze=>tr(ze,new Set))})};let we=null;const je=()=>{we===null&&(we=requestAnimationFrame(()=>{we=null,fe()}))};fe();const Ge=new ResizeObserver(()=>je());Ge.observe(X);let Pe=!1;return typeof document<"u"&&((lt=document.fonts)!=null&<.ready)&&document.fonts.ready.then(()=>{Pe||je()}),()=>{Pe=!0,we!==null&&(cancelAnimationFrame(we),we=null),Ge.disconnect(),ue()}},[at,h,e,t,re,ut,Ae]);const st=d.useMemo(()=>Md(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:st}}),a.jsx("div",{style:Te,children:a.jsxs("div",{ref:ee,className:`${s}-wrapper ${Ee}${Et?` ${Et}`:""}${h?` ${s}-type-b`:""}`.trim(),style:{width:y.scalingValue(x??0,n),...!h&&p?{[`--${s}-first-entry-handle-top`]:At}:{}},onMouseMove:R?Jn:void 0,onMouseLeave:R?er:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[ut.map((X,ue)=>{var Ge;const fe=(((Ge=X.link)==null?void 0:Ge.length)??0)>0,we=fe&&(!n||r)?"a":"div",je=mi(ue,ut.length,oe,_,pt,g??0,n??!1);return a.jsxs(we,{ref:ue===0?Pe=>{ge.current=Pe}:void 0,className:`${s}-list-item${fe||P==="always"?` ${s}-list-item-has-link`:""}`,...fe?{href:X.link,target:"_blank"}:{},style:je,onMouseEnter:Pe=>{B&&(fe||P==="always")&&ui(Pe,s),R&&Mr(X,Pe)},onMouseLeave:Pe=>{B&&(fe||P==="always")&&pi(Pe,s)},children:[He>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:pe(He)}}),a.jsxs("div",{className:`${s}-list-cols-row${h?"":` ${s}-list-cols-row-h`}${p&&ue===0&&h?` ${s}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:pe(Ue)},children:[ve.map((Pe,lt)=>{const ct=lt===ve.length-1,Ye=ke[lt],dt=Pe.paddingBottom,Me=Wd(X.cells[Pe.key]),nt=h&&Me&&dt>0,rt=h?{minHeight:pe(Ue)}:{width:pe(Ae[lt])},Je=h?{paddingLeft:pe(G),paddingRight:pe(G)}:{paddingLeft:pe(Ye.paddingLeft),paddingRight:pe(Ye.paddingRight)},cn=Pe.textPrefix.charAt(0),Xe=h?Od(e[`${Pe.textPrefix}VerticalAlign`]):Bd(e[`${Pe.textPrefix}VerticalAlign`],e,cn),tr=h&&Me&&p&&ue===0;return a.jsxs("div",{className:h?`${s}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":cn,"data-valign":Xe.kind,...Xe.kind==="baseline"?{"data-valign-anchor":Xe.anchorLetter}:{}},children:[a.jsx("div",{className:`${s}-list-col${ct?` ${s}-list-col-last`:""}`,style:{...Je,...rt,...h?{justifyContent:hi(Xe.kind)}:{}},"data-test":Pe.width,children:a.jsx("span",{className:yi(e,Pe.textPrefix,`${s}-list-col-title`,`${s}-text-tight-leading`),style:{...fi(Cr(e,Pe.textPrefix),n),...vi(e,Pe.textPrefix,s,n),...h?{}:Dd(Xe.kind)},children:X.cells[Pe.key]??null})}),nt&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:pe(dt)}}),tr&&a.jsx(Rt,{P:s,"data-controls":Pe.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(dt,Yr))}})]},Pe.key)}),p&&ue===0&&h&&a.jsxs(a.Fragment,{children:[a.jsx(Rt,{P:s,"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(Rt,{P:s,"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,Fe-se)),width:pe(se),height:"100%"}})]})]}),!h&&Be>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:pe(Be)}}),p&&ue===0&&!h&&a.jsx(Rt,{P:s,"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)}})]},X.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx(Rt,{P:s,"data-controls":An,"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:gt,left:0,width:"100%",height:pe(Math.max(He,Yr))}})},"row-padding-handles"),p&&!h&&$e&&Qe&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(Rt,{P:s,"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(Ae[0]-((Ke==null?void 0:Ke.paddingRight)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:pe(it),height:"100%"}}),a.jsx(Rt,{P:s,"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(Ae[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(Fr-Zn),width:pe(Zn),height:"100%"}})]},"column-edge-padding-handles"),p&&!h&&ve.slice(0,-1).map((X,ue)=>{const fe=ve[ue+1],we=xe.slice(0,ue+1).reduce((ct,Ye)=>ct+Ye,0),je=ke[ue],Ge=ke[ue+1],Pe=Math.max(je.paddingRight,hn),lt=Math.max(Ge.paddingLeft,hn);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(Rt,{P:s,"data-controls":X.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(Ae[ue]-je.paddingLeft),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:pe(we-Pe),width:pe(Pe),height:"100%"}}),a.jsx(Rt,{P:s,"data-controls":fe.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ae[ue+1]-Ge.paddingRight),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:pe(we),width:pe(lt),height:"100%"}})]},`${X.paddingRightKey}-padding`)}),p&&!h&&ve.slice(0,-1).map((X,ue)=>{const fe=uu(ue,xe,ie,Fe),je=xe.slice(0,ue+1).reduce((Ge,Pe)=>Ge+Pe,0)-bi/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":X.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(ko),"data-controls-max-fraction":String(fe),"data-controls-variant":"column-width",className:`${s}-col-resize-handle`,style:{position:"absolute",top:"0px",left:pe(je),width:pe(bi),height:"calc(100%)",pointerEvents:"auto"}})},`${X.widthKey}-junction`)})]}),pt&&(()=>{const X=Cr(e,Ht),ue=zd(e.cutLabelVerticalAlign),fe=X.textTextAlign==="justify"||h;return a.jsx("button",{type:"button",className:`${s}-cut-item`,style:{minHeight:pe(v??0),cursor:mt?"pointer":"default",...Fd(_,g??0,n??!1)},onClick:mt?_t:void 0,onMouseEnter:B||R?Nr:void 0,onMouseLeave:B?Ie:void 0,children:a.jsx("div",{className:`${s}-list-cols-row`,style:{...h?{paddingLeft:pe(G),paddingRight:pe(G)}:{},justifyContent:jd(X.textTextAlign),alignItems:hi(ue)},children:a.jsx("span",{className:yi(e,Ht,`${s}-cut-label`,`${s}-text-tight-leading`),style:{...fi(X,n),...vi(e,Ht,s,n),...fe?{width:"100%"}:{}},children:M})})})})(),R&&Q&&(()=>{const X=mr(Q.widthPx),ue={width:X,height:"auto",maxHeight:X,objectFit:"contain",left:Q.x,top:Q.y,position:"absolute"};return a.jsx(kd,{media:Q,className:Q.isVideo?`${s}-hover-video`:`${s}-hover-image`,style:ue},`${Q.rowId}-${Q.url}`)})()]})})]})}const fu=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';\r
|
|
5449
5449
|
import { CommonComponentProps } from '../props';\r
|
|
5450
5450
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';\r
|
|
5451
5451
|
import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';\r
|
|
@@ -8650,7 +8650,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8650
8650
|
left: 20px;
|
|
8651
8651
|
transform: translateY(-50%);
|
|
8652
8652
|
}
|
|
8653
|
-
`}function _i(e,t,n,r,i,l,o,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:i??0,wordSpacing:l??0,textAppearance:o,color:c??"#000000"}}function
|
|
8653
|
+
`}function _i(e,t,n,r,i,l,o,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:i??0,wordSpacing:l??0,textAppearance:o,color:c??"#000000"}}function Bu({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:l}){const{prefix:o}=y.useScopedStyles(),c=i??!1,{wrapperWidth:s=1,cellMinHeight:p=0,dividerWidth:u=694e-6,dividerStyle:T="solid",entryHoverEffect:x="default",autoclose:f="off",icon:m,iconMaxWidth:g=.00833,iconPaddingRight:C=0,iconAnimation:w="rotate 45",questionColor:S="#000000",answerColor:v="#000000",dividerColor:M="#0000001F",iconColor:L="#000000",questionHoverColor:N="#666666",iconHoverColor:b="#666666",iconActiveColor:P="#000000",dividerHoverColor:O="#000000",questionFontFamily:$,questionFontSettings:E,questionFontSize:A,questionLineHeight:W,questionLetterSpacing:j,questionWordSpacing:te,questionTextAppearance:k,answerFontFamily:F,answerFontSettings:D,answerFontSize:H,answerLineHeight:I,answerLetterSpacing:K,answerWordSpacing:Q,answerTextAppearance:Z,questionPaddingLeft:R=0,questionPaddingTop:ne=0,questionPaddingBottom:h=0,answerPaddingLeft:ee=0,answerPaddingRight:ge=0,answerPaddingTop:le=0,answerPaddingBottom:be=0}=e,re=t??[],[ce,V]=d.useState(()=>new Set),U=!n||r;d.useEffect(()=>{V(new Set)},[f]),d.useEffect(()=>{n&&!i&&!r&&V(new Set)},[n,i,r]);const G=pe=>y.scalingValue(pe,n??!1),se=Math.max(R,zt),ye=Math.max(ne,zt),Te=Math.max(h,zt),Se=Math.max(ee,zt),Le=Math.max(ge,zt),Ee=Math.max(le,zt),B=Math.max(be,zt),oe=Math.max(0,(s??1)-C-g),_=Math.max(0,(s??1)-ge),z=Math.max(0,(s??1)-ee),q=Math.max(C,zt),Y=Math.max(0,(s??1)-R-g),ae=d.useMemo(()=>ce.size===0?0:Math.min(...ce),[ce]),me=d.useCallback(pe=>ce.has(pe),[ce]),We=U&&x==="default"?`${o}-entry-hover-default`:"",he=m??"",ve=he!=="",Fe=w.replace(/^rotate /,""),ie=`${o}-icon-anim-${Fe}`,xe=yt(Ze(_i($,E,A,W,j,te,k,S),n)),Ae=yt(Ze(_i(F,D,H,I,K,Q,Z,v),n)),ke=Pi(A,W,`${o}-question`,`${o}-text-tight-leading`),Ve=Pi(H,I,`${o}-answer-text`,`${o}-text-tight-leading`),tt=Ei(A,W,o,n),ut=Ei(H,I,o,n),pt=y.buildColorVars(o,{questionColor:S,answerColor:v,dividerColor:M,iconColor:L,questionHoverColor:N,iconHoverColor:b,iconActiveColor:P,dividerHoverColor:O},Fu,Mu),xt=l&&l!=="default"?`${o}-state-${l}`:"",Et=d.useCallback(pe=>{U&&V(He=>{if(He.has(pe)){const Ue=new Set(He);return Ue.delete(pe),Ue}if(f==="on")return new Set([pe]);const Be=new Set(He);return Be.add(pe),Be})},[U,f]),mt=d.useMemo(()=>Hu(o),[o]),_t={[`--${o}-divider-width`]:y.scalingValue(u,n??!1),[`--${o}-divider-style`]:T,[`--${o}-icon-max-width`]:y.scalingValue(g,n??!1),...p>0?{[`--${o}-question-min-height`]:y.scalingValue(p,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:mt}}),a.jsx("div",{style:pt,children:a.jsx("div",{className:`${o}-wrapper${n&&!r?` ${o}-editor`:""} ${We} ${xt}`.trim(),style:{width:y.scalingValue(s,n??!1),maxWidth:"100%",..._t},children:re.map((pe,He)=>{var At;const Be=me(He),Ue=((At=pe.question)==null?void 0:At.trim())??"",Ct=pe.answer,Vt=((Ct==null?void 0:Ct.length)??0)>0,gt=c&&He===ae;return a.jsxs("div",{className:`${o}-item${Be?` ${o}-item-open`:""}`.trim(),"data-faq-item":"",children:[a.jsxs("div",{className:`${o}-question-controls`,children:[gt&&a.jsxs(a.Fragment,{children:[a.jsx(jt,{"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:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:G(ye),zIndex:2}}),a.jsx(jt,{"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(oe),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:G(se),height:"100%",zIndex:2}}),a.jsx(jt,{"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:`${o}-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:`${o}-question-button`,"aria-expanded":Be,style:{...xe,...tt,paddingLeft:G(R),paddingRight:G(C)},onClick:()=>Et(He),children:[ne>0&&a.jsx("span",{className:`${o}-padding-handle`,style:{height:G(ne)},"aria-hidden":"true"}),a.jsxs("span",{className:`${o}-question-row`,children:[a.jsx("span",{className:ke,children:Ue}),Vt&&(ve?a.jsx("span",{className:`${o}-icon ${o}-icon-custom ${ie}`,"aria-hidden":"true",children:a.jsx(Nt,{url:he,fill:L,hoverFill:b,className:`${o}-icon-image`})}):a.jsx("span",{className:`${o}-icon ${o}-icon-default ${ie}`,"aria-hidden":"true"}))]}),h>0&&a.jsx("span",{className:`${o}-padding-handle`,style:{height:G(h)},"aria-hidden":"true"})]}),gt&&a.jsx(jt,{"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:`${o}-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:`${o}-panel`,"aria-hidden":!Be,children:a.jsx("div",{className:`${o}-panel-inner`,children:a.jsxs("div",{className:`${o}-answer-controls`,children:[gt&&a.jsxs(a.Fragment,{children:[a.jsx(jt,{"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:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:G(Ee),zIndex:2}}),a.jsx(jt,{"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:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:G(Se),height:"100%",zIndex:2}}),a.jsx(jt,{"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(z),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:G(Le),height:"100%",zIndex:2}})]}),le>0&&a.jsx("div",{className:`${o}-padding-handle`,style:{height:G(le)}}),a.jsx("div",{className:`${o}-answer`,style:{...Ae,...ut,paddingLeft:G(ee),paddingRight:G(ge)},children:a.jsx("div",{className:Ve,children:a.jsx(Sn,{content:Ct})})}),be>0&&a.jsx("div",{className:`${o}-padding-handle`,style:{height:G(be)}}),gt&&a.jsx(jt,{"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:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:G(B),zIndex:2}})]})})})]},He)})})})]})}const Ou=`import { useCallback, useEffect, useMemo, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';
|
|
8654
8654
|
import { CommonComponentProps } from '../props';
|
|
8655
8655
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
|
|
8656
8656
|
import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
|
|
@@ -9488,4 +9488,4 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
9488
9488
|
</>
|
|
9489
9489
|
);
|
|
9490
9490
|
}
|
|
9491
|
-
`;function qt(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ai={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Vu=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Du={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:"A: 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:"A: 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:"A: 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 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:{...Ai.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:{...Ai.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},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:[...Vu],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},zu={element:Ou,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:Du,sourceCode:Bu},ju=[Fl,Dl,Ac,Oc,Yc,sd,pd,bd,Id,ku,zu];exports.components=ju;exports.isSchemaV1=La;
|
|
9491
|
+
`;function qt(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ai={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Vu=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Du={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 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:{...Ai.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:{...Ai.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:[...Vu],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},zu={element:Bu,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:Du,sourceCode:Ou},ju=[Fl,Dl,Ac,Bc,Yc,sd,pd,bd,Id,ku,zu];exports.components=ju;exports.isSchemaV1=La;
|