@cntrl-site/components 1.0.6-alpha.0 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +15 -6
  2. package/dist/index.mjs +1068 -1054
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),j=require("react"),ge=require("classnames"),F=require("./useScopedStyles-DpVdqfXj.js"),gr=require("react-dom");function mr(e){return e.type==="object"&&e.version===1}const fr="ControlSlider-module__wrapper___sHEkd",hr="ControlSlider-module__hoverArrow___A-dOH",yr="ControlSlider-module__sliderItem___QQSkR",vr="ControlSlider-module__sliderImage___9hRl-",br="ControlSlider-module__arrow___05ghY",Sr="ControlSlider-module__arrowVertical___tBfVN",xr="ControlSlider-module__nextArrow___-30Yc",Cr="ControlSlider-module__arrowInner___aEra3",$r="ControlSlider-module__arrowIcon___S4ztF",_r="ControlSlider-module__arrowImg___2dwJW",wr="ControlSlider-module__mirror___brd6U",Tr="ControlSlider-module__pagination___bicLF",Er="ControlSlider-module__paginationInner___bT-P-",Lr="ControlSlider-module__paginationVertical___zYqKw",Ar="ControlSlider-module__paginationItem___nTRbk",Ir="ControlSlider-module__dot___p1Qun",kr="ControlSlider-module__activeDot___LHFaj",Fr="ControlSlider-module__paginationInsideBottom___R3FWn",Rr="ControlSlider-module__paginationInsideTop___V-qb-",Pr="ControlSlider-module__paginationOutsideBottom___14w8D",Vr="ControlSlider-module__paginationOutsideTop___SCLqB",Br="ControlSlider-module__paginationInsideLeft___yOBRZ",Or="ControlSlider-module__paginationInsideRight___Rtt3o",Wr="ControlSlider-module__paginationOutsideLeft___lahaw",Nr="ControlSlider-module__paginationOutsideRight___EtuQa",zr="ControlSlider-module__imgWrapper___UjEgB",jr="ControlSlider-module__captionBlock___dJ6-j",Mr="ControlSlider-module__captionTextWrapper___HFlpf",Hr="ControlSlider-module__captionText___uGBVc",Dr="ControlSlider-module__active___WZK4G",Ur="ControlSlider-module__withPointerEvents___t-18M",Gr="ControlSlider-module__topLeftAlignment___zjnGM",Yr="ControlSlider-module__topCenterAlignment___gD1xW",qr="ControlSlider-module__topRightAlignment___NMapS",Xr="ControlSlider-module__middleLeftAlignment___OnUrY",Kr="ControlSlider-module__middleCenterAlignment___Tdkl0",Jr="ControlSlider-module__middleRightAlignment___wEbfX",Zr="ControlSlider-module__bottomLeftAlignment___cTP2-",Qr="ControlSlider-module__bottomCenterAlignment___c54fB",ei="ControlSlider-module__bottomRightAlignment___kEwrz",ti="ControlSlider-module__clickOverlay___DZA28",ni="ControlSlider-module__contain___pLyq7",oi="ControlSlider-module__cover___KdDat",G={wrapper:fr,hoverArrow:hr,sliderItem:yr,sliderImage:vr,arrow:br,arrowVertical:Sr,nextArrow:xr,arrowInner:Cr,arrowIcon:$r,arrowImg:_r,mirror:wr,pagination:Tr,paginationInner:Er,paginationVertical:Lr,paginationItem:Ar,dot:Ir,activeDot:kr,paginationInsideBottom:Fr,paginationInsideTop:Rr,paginationOutsideBottom:Pr,paginationOutsideTop:Vr,paginationInsideLeft:Br,paginationInsideRight:Or,paginationOutsideLeft:Wr,paginationOutsideRight:Nr,imgWrapper:zr,captionBlock:jr,captionTextWrapper:Mr,captionText:Hr,active:Dr,withPointerEvents:Ur,topLeftAlignment:Gr,topCenterAlignment:Yr,topRightAlignment:qr,middleLeftAlignment:Xr,middleCenterAlignment:Kr,middleRightAlignment:Jr,bottomLeftAlignment:Zr,bottomCenterAlignment:Qr,bottomRightAlignment:ei,clickOverlay:ti,contain:ni,cover:oi};function ri(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ii(e,t,n){return t&&ri(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var eo="(prefers-reduced-motion: reduce)",ut=1,ai=2,ft=3,vt=4,Rt=5,qt=6,Zt=7,li={CREATED:ut,MOUNTED:ai,IDLE:ft,MOVING:vt,SCROLLING:Rt,DRAGGING:qt,DESTROYED:Zt};function De(e){e.length=0}function Je(e,t,n){return Array.prototype.slice.call(e,t,n)}function ue(e){return e.bind.apply(e,[null].concat(Je(arguments,1)))}var Co=setTimeout,$n=function(){};function to(e){return requestAnimationFrame(e)}function on(e,t){return typeof t===e}function Tt(e){return!Rn(e)&&on("object",e)}var Fn=Array.isArray,$o=ue(on,"function"),Xe=ue(on,"string"),Pt=ue(on,"undefined");function Rn(e){return e===null}function _o(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Vt(e){return Fn(e)?e:[e]}function Ee(e,t){Vt(e).forEach(t)}function Pn(e,t){return e.indexOf(t)>-1}function Xt(e,t){return e.push.apply(e,Vt(t)),e}function je(e,t,n){e&&Ee(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function Fe(e,t){je(e,Xe(t)?t.split(" "):t,!0)}function Bt(e,t){Ee(t,e.appendChild.bind(e))}function Vn(e,t){Ee(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function Et(e,t){return _o(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function wo(e,t){var n=e?Je(e.children):[];return t?n.filter(function(o){return Et(o,t)}):n}function Ot(e,t){return t?wo(e,t)[0]:e.firstElementChild}var Lt=Object.keys;function nt(e,t,n){return e&&(n?Lt(e).reverse():Lt(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function At(e){return Je(arguments,1).forEach(function(t){nt(t,function(n,o){e[o]=t[o]})}),e}function qe(e){return Je(arguments,1).forEach(function(t){nt(t,function(n,o){Fn(n)?e[o]=n.slice():Tt(n)?e[o]=qe({},Tt(e[o])?e[o]:{},n):e[o]=n})}),e}function no(e,t){Ee(t||Lt(e),function(n){delete e[n]})}function Re(e,t){Ee(e,function(n){Ee(t,function(o){n&&n.removeAttribute(o)})})}function Z(e,t,n){Tt(t)?nt(t,function(o,r){Z(e,r,o)}):Ee(e,function(o){Rn(n)||n===""?Re(o,t):o.setAttribute(t,String(n))})}function pt(e,t,n){var o=document.createElement(e);return t&&(Xe(t)?Fe(o,t):Z(o,t)),n&&Bt(n,o),o}function Ae(e,t,n){if(Pt(n))return getComputedStyle(e)[t];Rn(n)||(e.style[t]=""+n)}function It(e,t){Ae(e,"display",t)}function To(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Ie(e,t){return e.getAttribute(t)}function oo(e,t){return e&&e.classList.contains(t)}function we(e){return e.getBoundingClientRect()}function ot(e){Ee(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Eo(e){return Ot(new DOMParser().parseFromString(e,"text/html").body)}function ze(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Lo(e,t){return e&&e.querySelector(t)}function Bn(e,t){return t?Je(e.querySelectorAll(t)):[]}function Me(e,t){je(e,t,!1)}function _n(e){return e.timeStamp}function et(e){return Xe(e)?e:e?e+"px":""}var Wt="splide",On="data-"+Wt;function _t(e,t){if(!e)throw new Error("["+Wt+"] "+(t||""))}var Ke=Math.min,Qt=Math.max,en=Math.floor,kt=Math.ceil,Ce=Math.abs;function Ao(e,t,n){return Ce(e-t)<n}function Kt(e,t,n,o){var r=Ke(t,n),a=Qt(t,n);return o?r<e&&e<a:r<=e&&e<=a}function st(e,t,n){var o=Ke(t,n),r=Qt(t,n);return Ke(Qt(o,e),r)}function wn(e){return+(e>0)-+(e<0)}function Tn(e,t){return Ee(t,function(n){e=e.replace("%s",""+n)}),e}function Wn(e){return e<10?"0"+e:""+e}var ro={};function si(e){return""+e+Wn(ro[e]=(ro[e]||0)+1)}function Io(){var e=[];function t(i,l,s,p){r(i,l,function(c,_,y){var g="addEventListener"in c,u=g?c.removeEventListener.bind(c,_,s,p):c.removeListener.bind(c,s);g?c.addEventListener(_,s,p):c.addListener(s),e.push([c,_,y,s,u])})}function n(i,l,s){r(i,l,function(p,c,_){e=e.filter(function(y){return y[0]===p&&y[1]===c&&y[2]===_&&(!s||y[3]===s)?(y[4](),!1):!0})})}function o(i,l,s){var p,c=!0;return typeof CustomEvent=="function"?p=new CustomEvent(l,{bubbles:c,detail:s}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(l,c,!1,s)),i.dispatchEvent(p),p}function r(i,l,s){Ee(i,function(p){p&&Ee(l,function(c){c.split(" ").forEach(function(_){var y=_.split(".");s(p,y[0],y[1])})})})}function a(){e.forEach(function(i){i[4]()}),De(e)}return{bind:t,unbind:n,dispatch:o,destroy:a}}var Ze="mounted",En="ready",Ue="move",bt="moved",Nn="click",ko="active",Fo="inactive",Ro="visible",Po="hidden",ve="refresh",Se="updated",ht="resize",rn="resized",Vo="drag",Bo="dragging",Oo="dragged",an="scroll",it="scrolled",ci="overflow",zn="destroy",Wo="arrows:mounted",No="arrows:updated",zo="pagination:mounted",jo="pagination:updated",jn="navigation:mounted",Mn="autoplay:play",Mo="autoplay:playing",Hn="autoplay:pause",Dn="lazyload:loaded",Ho="sk",Do="sh",tn="ei";function me(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Io();function o(a,i){n.bind(t,Vt(a).join(" "),function(l){i.apply(i,Fn(l.detail)?l.detail:[])})}function r(a){n.dispatch(t,a,Je(arguments,1))}return e&&e.event.on(zn,n.destroy),At(n,{bus:t,on:o,off:ue(n.unbind,t),emit:r})}function ln(e,t,n,o){var r=Date.now,a,i=0,l,s=!0,p=0;function c(){if(!s){if(i=e?Ke((r()-a)/e,1):1,n&&n(i),i>=1&&(t(),a=r(),o&&++p>=o))return y();l=to(c)}}function _(v){v||u(),a=r()-(v?i*e:0),s=!1,l=to(c)}function y(){s=!0}function g(){a=r(),i=0,n&&n(i)}function u(){l&&cancelAnimationFrame(l),i=0,l=0,s=!0}function d(v){e=v}function C(){return s}return{start:_,rewind:g,pause:y,cancel:u,set:d,isPaused:C}}function ui(e){var t=e;function n(r){t=r}function o(r){return Pn(Vt(r),t)}return{set:n,is:o}}function pi(e,t){var n=ln(0,e,null,1);return function(){n.isPaused()&&n.start()}}function di(e,t,n){var o=e.state,r=n.breakpoints||{},a=n.reducedMotion||{},i=Io(),l=[];function s(){var u=n.mediaQuery==="min";Lt(r).sort(function(d,C){return u?+d-+C:+C-+d}).forEach(function(d){c(r[d],"("+(u?"min":"max")+"-width:"+d+"px)")}),c(a,eo),_()}function p(u){u&&i.destroy()}function c(u,d){var C=matchMedia(d);i.bind(C,"change",_),l.push([u,C])}function _(){var u=o.is(Zt),d=n.direction,C=l.reduce(function(v,f){return qe(v,f[1].matches?f[0]:{})},{});no(n),g(C),n.destroy?e.destroy(n.destroy==="completely"):u?(p(!0),e.mount()):d!==n.direction&&e.refresh()}function y(u){matchMedia(eo).matches&&(u?qe(n,a):no(n,Lt(a)))}function g(u,d,C){qe(n,u),d&&qe(Object.getPrototypeOf(n),u),(C||!o.is(ut))&&e.emit(Se,n)}return{setup:s,destroy:p,reduce:y,set:g}}var sn="Arrow",cn=sn+"Left",un=sn+"Right",Uo=sn+"Up",Go=sn+"Down",io="rtl",pn="ttb",yn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Uo,un],ArrowRight:[Go,cn]};function gi(e,t,n){function o(a,i,l){l=l||n.direction;var s=l===io&&!i?1:l===pn?0:-1;return yn[a]&&yn[a][s]||a.replace(/width|left|right/i,function(p,c){var _=yn[p.toLowerCase()][s]||p;return c>0?_.charAt(0).toUpperCase()+_.slice(1):_})}function r(a){return a*(n.direction===io?1:-1)}return{resolve:o,orient:r}}var He="role",dt="tabindex",mi="disabled",ke="aria-",Nt=ke+"controls",Yo=ke+"current",ao=ke+"selected",Te=ke+"label",Un=ke+"labelledby",qo=ke+"hidden",Gn=ke+"orientation",Ft=ke+"roledescription",lo=ke+"live",so=ke+"busy",co=ke+"atomic",Yn=[He,dt,mi,Nt,Yo,Te,Un,qo,Gn,Ft],Pe=Wt+"__",Qe="is-",vn=Wt,uo=Pe+"track",fi=Pe+"list",dn=Pe+"slide",Xo=dn+"--clone",hi=dn+"__container",qn=Pe+"arrows",gn=Pe+"arrow",Ko=gn+"--prev",Jo=gn+"--next",mn=Pe+"pagination",Zo=mn+"__page",yi=Pe+"progress",vi=yi+"__bar",bi=Pe+"toggle",Si=Pe+"spinner",xi=Pe+"sr",Ci=Qe+"initialized",rt=Qe+"active",Qo=Qe+"prev",er=Qe+"next",Ln=Qe+"visible",An=Qe+"loading",tr=Qe+"focus-in",nr=Qe+"overflow",$i=[rt,Ln,Qo,er,An,tr,nr],_i={slide:dn,clone:Xo,arrows:qn,arrow:gn,prev:Ko,next:Jo,pagination:mn,page:Zo,spinner:Si};function wi(e,t){if($o(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Et(n,t);)n=n.parentElement;return n}var Ti=5,po=200,or="touchstart mousedown",bn="touchmove mousemove",Sn="touchend touchcancel mouseup click";function Ei(e,t,n){var o=me(e),r=o.on,a=o.bind,i=e.root,l=n.i18n,s={},p=[],c=[],_=[],y,g,u;function d(){$(),M(),f()}function C(){r(ve,v),r(ve,d),r(Se,f),a(document,or+" keydown",function(h){u=h.type==="keydown"},{capture:!0}),a(i,"focusin",function(){je(i,tr,!!u)})}function v(h){var L=Yn.concat("style");De(p),Me(i,c),Me(y,_),Re([y,g],L),Re(i,h?L:["style",Ft])}function f(){Me(i,c),Me(y,_),c=w(vn),_=w(uo),Fe(i,c),Fe(y,_),Z(i,Te,n.label),Z(i,Un,n.labelledby)}function $(){y=O("."+uo),g=Ot(y,"."+fi),_t(y&&g,"A track/list element is missing."),Xt(p,wo(g,"."+dn+":not(."+Xo+")")),nt({arrows:qn,pagination:mn,prev:Ko,next:Jo,bar:vi,toggle:bi},function(h,L){s[L]=O("."+h)}),At(s,{root:i,track:y,list:g,slides:p})}function M(){var h=i.id||si(Wt),L=n.role;i.id=h,y.id=y.id||h+"-track",g.id=g.id||h+"-list",!Ie(i,He)&&i.tagName!=="SECTION"&&L&&Z(i,He,L),Z(i,Ft,l.carousel),Z(g,He,"presentation")}function O(h){var L=Lo(i,h);return L&&wi(L,"."+vn)===i?L:void 0}function w(h){return[h+"--"+n.type,h+"--"+n.direction,n.drag&&h+"--draggable",n.isNavigation&&h+"--nav",h===vn&&rt]}return At(s,{setup:d,mount:C,destroy:v})}var yt="slide",St="loop",zt="fade";function Li(e,t,n,o){var r=me(e),a=r.on,i=r.emit,l=r.bind,s=e.Components,p=e.root,c=e.options,_=c.isNavigation,y=c.updateOnMove,g=c.i18n,u=c.pagination,d=c.slideFocus,C=s.Direction.resolve,v=Ie(o,"style"),f=Ie(o,Te),$=n>-1,M=Ot(o,"."+hi),O;function w(){$||(o.id=p.id+"-slide"+Wn(t+1),Z(o,He,u?"tabpanel":"group"),Z(o,Ft,g.slide),Z(o,Te,f||Tn(g.slideLabel,[t+1,e.length]))),h()}function h(){l(o,"click",ue(i,Nn,E)),l(o,"keydown",ue(i,Ho,E)),a([bt,Do,it],R),a(jn,P),y&&a(Ue,N)}function L(){O=!0,r.destroy(),Me(o,$i),Re(o,Yn),Z(o,"style",v),Z(o,Te,f||"")}function P(){var T=e.splides.map(function(x){var k=x.splide.Components.Slides.getAt(t);return k?k.slide.id:""}).join(" ");Z(o,Te,Tn(g.slideX,($?n:t)+1)),Z(o,Nt,T),Z(o,He,d?"button":""),d&&Re(o,Ft)}function N(){O||R()}function R(){if(!O){var T=e.index;V(),B(),je(o,Qo,t===T-1),je(o,er,t===T+1)}}function V(){var T=H();T!==oo(o,rt)&&(je(o,rt,T),Z(o,Yo,_&&T||""),i(T?ko:Fo,E))}function B(){var T=m(),x=!T&&(!H()||$);if(e.state.is([vt,Rt])||Z(o,qo,x||""),Z(Bn(o,c.focusableNodes||""),dt,x?-1:""),d&&Z(o,dt,x?-1:0),T!==oo(o,Ln)&&(je(o,Ln,T),i(T?Ro:Po,E)),!T&&document.activeElement===o){var k=s.Slides.getAt(e.index);k&&To(k.slide)}}function U(T,x,k){Ae(k&&M||o,T,x)}function H(){var T=e.index;return T===t||c.cloneStatus&&T===n}function m(){if(e.is(zt))return H();var T=we(s.Elements.track),x=we(o),k=C("left",!0),Y=C("right",!0);return en(T[k])<=kt(x[k])&&en(x[Y])<=kt(T[Y])}function I(T,x){var k=Ce(T-t);return!$&&(c.rewind||e.is(St))&&(k=Ke(k,e.length-k)),k<=x}var E={index:t,slideIndex:n,slide:o,container:M,isClone:$,mount:w,destroy:L,update:R,style:U,isWithin:I};return E}function Ai(e,t,n){var o=me(e),r=o.on,a=o.emit,i=o.bind,l=t.Elements,s=l.slides,p=l.list,c=[];function _(){y(),r(ve,g),r(ve,y)}function y(){s.forEach(function(R,V){d(R,V,-1)})}function g(){O(function(R){R.destroy()}),De(c)}function u(){O(function(R){R.update()})}function d(R,V,B){var U=Li(e,V,B,R);U.mount(),c.push(U),c.sort(function(H,m){return H.index-m.index})}function C(R){return R?w(function(V){return!V.isClone}):c}function v(R){var V=t.Controller,B=V.toIndex(R),U=V.hasFocus()?1:n.perPage;return w(function(H){return Kt(H.index,B,B+U-1)})}function f(R){return w(R)[0]}function $(R,V){Ee(R,function(B){if(Xe(B)&&(B=Eo(B)),_o(B)){var U=s[V];U?Vn(B,U):Bt(p,B),Fe(B,n.classes.slide),L(B,ue(a,ht))}}),a(ve)}function M(R){ot(w(R).map(function(V){return V.slide})),a(ve)}function O(R,V){C(V).forEach(R)}function w(R){return c.filter($o(R)?R:function(V){return Xe(R)?Et(V.slide,R):Pn(Vt(R),V.index)})}function h(R,V,B){O(function(U){U.style(R,V,B)})}function L(R,V){var B=Bn(R,"img"),U=B.length;U?B.forEach(function(H){i(H,"load error",function(){--U||V()})}):V()}function P(R){return R?s.length:c.length}function N(){return c.length>n.perPage}return{mount:_,destroy:g,update:u,register:d,get:C,getIn:v,getAt:f,add:$,remove:M,forEach:O,filter:w,style:h,getLength:P,isEnough:N}}function Ii(e,t,n){var o=me(e),r=o.on,a=o.bind,i=o.emit,l=t.Slides,s=t.Direction.resolve,p=t.Elements,c=p.root,_=p.track,y=p.list,g=l.getAt,u=l.style,d,C,v;function f(){$(),a(window,"resize load",pi(ue(i,ht))),r([Se,ve],$),r(ht,M)}function $(){d=n.direction===pn,Ae(c,"maxWidth",et(n.width)),Ae(_,s("paddingLeft"),O(!1)),Ae(_,s("paddingRight"),O(!0)),M(!0)}function M(E){var T=we(c);(E||C.width!==T.width||C.height!==T.height)&&(Ae(_,"height",w()),u(s("marginRight"),et(n.gap)),u("width",L()),u("height",P(),!0),C=T,i(rn),v!==(v=I())&&(je(c,nr,v),i(ci,v)))}function O(E){var T=n.padding,x=s(E?"right":"left");return T&&et(T[x]||(Tt(T)?0:T))||"0px"}function w(){var E="";return d&&(E=h(),_t(E,"height or heightRatio is missing."),E="calc("+E+" - "+O(!1)+" - "+O(!0)+")"),E}function h(){return et(n.height||we(y).width*n.heightRatio)}function L(){return n.autoWidth?null:et(n.fixedWidth)||(d?"":N())}function P(){return et(n.fixedHeight)||(d?n.autoHeight?null:N():h())}function N(){var E=et(n.gap);return"calc((100%"+(E&&" + "+E)+")/"+(n.perPage||1)+(E&&" - "+E)+")"}function R(){return we(y)[s("width")]}function V(E,T){var x=g(E||0);return x?we(x.slide)[s("width")]+(T?0:H()):0}function B(E,T){var x=g(E);if(x){var k=we(x.slide)[s("right")],Y=we(y)[s("left")];return Ce(k-Y)+(T?0:H())}return 0}function U(E){return B(e.length-1)-B(0)+V(0,E)}function H(){var E=g(0);return E&&parseFloat(Ae(E.slide,s("marginRight")))||0}function m(E){return parseFloat(Ae(_,s("padding"+(E?"Right":"Left"))))||0}function I(){return e.is(zt)||U(!0)>R()}return{mount:f,resize:M,listSize:R,slideSize:V,sliderSize:U,totalSize:B,getPadding:m,isOverflow:I}}var ki=2;function Fi(e,t,n){var o=me(e),r=o.on,a=t.Elements,i=t.Slides,l=t.Direction.resolve,s=[],p;function c(){r(ve,_),r([Se,ht],g),(p=C())&&(u(p),t.Layout.resize(!0))}function _(){y(),c()}function y(){ot(s),De(s),o.destroy()}function g(){var v=C();p!==v&&(p<v||!v)&&o.emit(ve)}function u(v){var f=i.get().slice(),$=f.length;if($){for(;f.length<v;)Xt(f,f);Xt(f.slice(-v),f.slice(0,v)).forEach(function(M,O){var w=O<v,h=d(M.slide,O);w?Vn(h,f[0].slide):Bt(a.list,h),Xt(s,h),i.register(h,O-v+(w?0:$),M.index)})}}function d(v,f){var $=v.cloneNode(!0);return Fe($,n.classes.clone),$.id=e.root.id+"-clone"+Wn(f+1),$}function C(){var v=n.clones;if(!e.is(St))v=0;else if(Pt(v)){var f=n[l("fixedWidth")]&&t.Layout.slideSize(0),$=f&&kt(we(a.track)[l("width")]/f);v=$||n[l("autoWidth")]&&e.length||n.perPage*ki}return v}return{mount:c,destroy:y}}function Ri(e,t,n){var o=me(e),r=o.on,a=o.emit,i=e.state.set,l=t.Layout,s=l.slideSize,p=l.getPadding,c=l.totalSize,_=l.listSize,y=l.sliderSize,g=t.Direction,u=g.resolve,d=g.orient,C=t.Elements,v=C.list,f=C.track,$;function M(){$=t.Transition,r([Ze,rn,Se,ve],O)}function O(){t.Controller.isBusy()||(t.Scroll.cancel(),h(e.index),t.Slides.update())}function w(x,k,Y,re){x!==k&&E(x>Y)&&(R(),L(N(U(),x>Y),!0)),i(vt),a(Ue,k,Y,x),$.start(k,function(){i(ft),a(bt,k,Y,x),re&&re()})}function h(x){L(B(x,!0))}function L(x,k){if(!e.is(zt)){var Y=k?x:P(x);Ae(v,"transform","translate"+u("X")+"("+Y+"px)"),x!==Y&&a(Do)}}function P(x){if(e.is(St)){var k=V(x),Y=k>t.Controller.getEnd(),re=k<0;(re||Y)&&(x=N(x,Y))}return x}function N(x,k){var Y=x-I(k),re=y();return x-=d(re*(kt(Ce(Y)/re)||1))*(k?1:-1),x}function R(){L(U(),!0),$.cancel()}function V(x){for(var k=t.Slides.get(),Y=0,re=1/0,te=0;te<k.length;te++){var ie=k[te].index,A=Ce(B(ie,!0)-x);if(A<=re)re=A,Y=ie;else break}return Y}function B(x,k){var Y=d(c(x-1)-m(x));return k?H(Y):Y}function U(){var x=u("left");return we(v)[x]-we(f)[x]+d(p(!1))}function H(x){return n.trimSpace&&e.is(yt)&&(x=st(x,0,d(y(!0)-_()))),x}function m(x){var k=n.focus;return k==="center"?(_()-s(x,!0))/2:+k*s(x)||0}function I(x){return B(x?t.Controller.getEnd():0,!!n.trimSpace)}function E(x){var k=d(N(U(),x));return x?k>=0:k<=v[u("scrollWidth")]-we(f)[u("width")]}function T(x,k){k=Pt(k)?U():k;var Y=x!==!0&&d(k)<d(I(!1)),re=x!==!1&&d(k)>d(I(!0));return Y||re}return{mount:M,move:w,jump:h,translate:L,shift:N,cancel:R,toIndex:V,toPosition:B,getPosition:U,getLimit:I,exceededLimit:T,reposition:O}}function Pi(e,t,n){var o=me(e),r=o.on,a=o.emit,i=t.Move,l=i.getPosition,s=i.getLimit,p=i.toPosition,c=t.Slides,_=c.isEnough,y=c.getLength,g=n.omitEnd,u=e.is(St),d=e.is(yt),C=ue(U,!1),v=ue(U,!0),f=n.start||0,$,M=f,O,w,h;function L(){P(),r([Se,ve,tn],P),r(rn,N)}function P(){O=y(!0),w=n.perMove,h=n.perPage,$=E();var A=st(f,0,g?$:O-1);A!==f&&(f=A,i.reposition())}function N(){$!==E()&&a(tn)}function R(A,K,fe){if(!ie()){var se=B(A),he=I(se);he>-1&&(K||he!==f)&&(Y(he),i.move(se,he,M,fe))}}function V(A,K,fe,se){t.Scroll.scroll(A,K,fe,function(){var he=I(i.toIndex(l()));Y(g?Ke(he,$):he),se&&se()})}function B(A){var K=f;if(Xe(A)){var fe=A.match(/([+\-<>])(\d+)?/)||[],se=fe[1],he=fe[2];se==="+"||se==="-"?K=H(f+ +(""+se+(+he||1)),f):se===">"?K=he?T(+he):C(!0):se==="<"&&(K=v(!0))}else K=u?A:st(A,0,$);return K}function U(A,K){var fe=w||(te()?1:h),se=H(f+fe*(A?-1:1),f,!(w||te()));return se===-1&&d&&!Ao(l(),s(!A),1)?A?0:$:K?se:I(se)}function H(A,K,fe){if(_()||te()){var se=m(A);se!==A&&(K=A,A=se,fe=!1),A<0||A>$?!w&&(Kt(0,A,K,!0)||Kt($,K,A,!0))?A=T(x(A)):u?A=fe?A<0?-(O%h||h):O:A:n.rewind?A=A<0?$:0:A=-1:fe&&A!==K&&(A=T(x(K)+(A<K?-1:1)))}else A=-1;return A}function m(A){if(d&&n.trimSpace==="move"&&A!==f)for(var K=l();K===p(A,!0)&&Kt(A,0,e.length-1,!n.rewind);)A<f?--A:++A;return A}function I(A){return u?(A+O)%O||0:A}function E(){for(var A=O-(te()||u&&w?1:h);g&&A-- >0;)if(p(O-1,!0)!==p(A,!0)){A++;break}return st(A,0,O-1)}function T(A){return st(te()?A:h*A,0,$)}function x(A){return te()?Ke(A,$):en((A>=$?O-1:A)/h)}function k(A){var K=i.toIndex(A);return d?st(K,0,$):K}function Y(A){A!==f&&(M=f,f=A)}function re(A){return A?M:f}function te(){return!Pt(n.focus)||n.isNavigation}function ie(){return e.state.is([vt,Rt])&&!!n.waitForTransition}return{mount:L,go:R,scroll:V,getNext:C,getPrev:v,getAdjacent:U,getEnd:E,setIndex:Y,getIndex:re,toIndex:T,toPage:x,toDest:k,hasFocus:te,isBusy:ie}}var Vi="http://www.w3.org/2000/svg",Bi="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",Ht=40;function Oi(e,t,n){var o=me(e),r=o.on,a=o.bind,i=o.emit,l=n.classes,s=n.i18n,p=t.Elements,c=t.Controller,_=p.arrows,y=p.track,g=_,u=p.prev,d=p.next,C,v,f={};function $(){O(),r(Se,M)}function M(){w(),$()}function O(){var V=n.arrows;V&&!(u&&d)&&P(),u&&d&&(At(f,{prev:u,next:d}),It(g,V?"":"none"),Fe(g,v=qn+"--"+n.direction),V&&(h(),R(),Z([u,d],Nt,y.id),i(Wo,u,d)))}function w(){o.destroy(),Me(g,v),C?(ot(_?[u,d]:g),u=d=null):Re([u,d],Yn)}function h(){r([Ze,bt,ve,it,tn],R),a(d,"click",ue(L,">")),a(u,"click",ue(L,"<"))}function L(V){c.go(V,!0)}function P(){g=_||pt("div",l.arrows),u=N(!0),d=N(!1),C=!0,Bt(g,[u,d]),!_&&Vn(g,y)}function N(V){var B='<button class="'+l.arrow+" "+(V?l.prev:l.next)+'" type="button"><svg xmlns="'+Vi+'" viewBox="0 0 '+Ht+" "+Ht+'" width="'+Ht+'" height="'+Ht+'" focusable="false"><path d="'+(n.arrowPath||Bi)+'" />';return Eo(B)}function R(){if(u&&d){var V=e.index,B=c.getPrev(),U=c.getNext(),H=B>-1&&V<B?s.last:s.prev,m=U>-1&&V>U?s.first:s.next;u.disabled=B<0,d.disabled=U<0,Z(u,Te,H),Z(d,Te,m),i(No,u,d,B,U)}}return{arrows:f,mount:$,destroy:w,update:R}}var Wi=On+"-interval";function Ni(e,t,n){var o=me(e),r=o.on,a=o.bind,i=o.emit,l=ln(n.interval,e.go.bind(e,">"),h),s=l.isPaused,p=t.Elements,c=t.Elements,_=c.root,y=c.toggle,g=n.autoplay,u,d,C=g==="pause";function v(){g&&(f(),y&&Z(y,Nt,p.track.id),C||$(),w())}function f(){n.pauseOnHover&&a(_,"mouseenter mouseleave",function(P){u=P.type==="mouseenter",O()}),n.pauseOnFocus&&a(_,"focusin focusout",function(P){d=P.type==="focusin",O()}),y&&a(y,"click",function(){C?$():M(!0)}),r([Ue,an,ve],l.rewind),r(Ue,L)}function $(){s()&&t.Slides.isEnough()&&(l.start(!n.resetProgress),d=u=C=!1,w(),i(Mn))}function M(P){P===void 0&&(P=!0),C=!!P,w(),s()||(l.pause(),i(Hn))}function O(){C||(u||d?M(!1):$())}function w(){y&&(je(y,rt,!C),Z(y,Te,n.i18n[C?"play":"pause"]))}function h(P){var N=p.bar;N&&Ae(N,"width",P*100+"%"),i(Mo,P)}function L(P){var N=t.Slides.getAt(P);l.set(N&&+Ie(N.slide,Wi)||n.interval)}return{mount:v,destroy:l.cancel,play:$,pause:M,isPaused:s}}function zi(e,t,n){var o=me(e),r=o.on;function a(){n.cover&&(r(Dn,ue(l,!0)),r([Ze,Se,ve],ue(i,!0)))}function i(s){t.Slides.forEach(function(p){var c=Ot(p.container||p.slide,"img");c&&c.src&&l(s,c,p)})}function l(s,p,c){c.style("background",s?'center/cover no-repeat url("'+p.src+'")':"",!0),It(p,s?"none":"")}return{mount:a,destroy:ue(i,!1)}}var ji=10,Mi=600,Hi=.6,Di=1.5,Ui=800;function Gi(e,t,n){var o=me(e),r=o.on,a=o.emit,i=e.state.set,l=t.Move,s=l.getPosition,p=l.getLimit,c=l.exceededLimit,_=l.translate,y=e.is(yt),g,u,d=1;function C(){r(Ue,M),r([Se,ve],O)}function v(h,L,P,N,R){var V=s();if(M(),P&&(!y||!c())){var B=t.Layout.sliderSize(),U=wn(h)*B*en(Ce(h)/B)||0;h=l.toPosition(t.Controller.toDest(h%B))+U}var H=Ao(V,h,1);d=1,L=H?0:L||Qt(Ce(h-V)/Di,Ui),u=N,g=ln(L,f,ue($,V,h,R),1),i(Rt),a(an),g.start()}function f(){i(ft),u&&u(),a(it)}function $(h,L,P,N){var R=s(),V=h+(L-h)*w(N),B=(V-R)*d;_(R+B),y&&!P&&c()&&(d*=Hi,Ce(B)<ji&&v(p(c(!0)),Mi,!1,u,!0))}function M(){g&&g.cancel()}function O(){g&&!g.isPaused()&&(M(),f())}function w(h){var L=n.easingFunc;return L?L(h):1-Math.pow(1-h,4)}return{mount:C,destroy:M,scroll:v,cancel:O}}var ct={passive:!1,capture:!0};function Yi(e,t,n){var o=me(e),r=o.on,a=o.emit,i=o.bind,l=o.unbind,s=e.state,p=t.Move,c=t.Scroll,_=t.Controller,y=t.Elements.track,g=t.Media.reduce,u=t.Direction,d=u.resolve,C=u.orient,v=p.getPosition,f=p.exceededLimit,$,M,O,w,h,L=!1,P,N,R;function V(){i(y,bn,$n,ct),i(y,Sn,$n,ct),i(y,or,U,ct),i(y,"click",I,{capture:!0}),i(y,"dragstart",ze),r([Ze,Se],B)}function B(){var z=n.drag;Ge(!z),w=z==="free"}function U(z){if(P=!1,!N){var b=he(z);se(z.target)&&(b||!z.button)&&(_.isBusy()?ze(z,!0):(R=b?y:window,h=s.is([vt,Rt]),O=null,i(R,bn,H,ct),i(R,Sn,m,ct),p.cancel(),c.cancel(),E(z)))}}function H(z){if(s.is(qt)||(s.set(qt),a(Vo)),z.cancelable)if(h){p.translate($+fe(te(z)));var b=ie(z)>po,D=L!==(L=f());(b||D)&&E(z),P=!0,a(Bo),ze(z)}else k(z)&&(h=x(z),ze(z))}function m(z){s.is(qt)&&(s.set(ft),a(Oo)),h&&(T(z),ze(z)),l(R,bn,H),l(R,Sn,m),h=!1}function I(z){!N&&P&&ze(z,!0)}function E(z){O=M,M=z,$=v()}function T(z){var b=Y(z),D=re(b),q=n.rewind&&n.rewindByDrag;g(!1),w?_.scroll(D,0,n.snap):e.is(zt)?_.go(C(wn(b))<0?q?"<":"-":q?">":"+"):e.is(yt)&&L&&q?_.go(f(!0)?">":"<"):_.go(_.toDest(D),!0),g(!0)}function x(z){var b=n.dragMinThreshold,D=Tt(b),q=D&&b.mouse||0,J=(D?b.touch:+b)||10;return Ce(te(z))>(he(z)?J:q)}function k(z){return Ce(te(z))>Ce(te(z,!0))}function Y(z){if(e.is(St)||!L){var b=ie(z);if(b&&b<po)return te(z)/b}return 0}function re(z){return v()+wn(z)*Ke(Ce(z)*(n.flickPower||600),w?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function te(z,b){return K(z,b)-K(A(z),b)}function ie(z){return _n(z)-_n(A(z))}function A(z){return M===z&&O||M}function K(z,b){return(he(z)?z.changedTouches[0]:z)["page"+d(b?"Y":"X")]}function fe(z){return z/(L&&e.is(yt)?Ti:1)}function se(z){var b=n.noDrag;return!Et(z,"."+Zo+", ."+gn)&&(!b||!Et(z,b))}function he(z){return typeof TouchEvent<"u"&&z instanceof TouchEvent}function be(){return h}function Ge(z){N=z}return{mount:V,disable:Ge,isDragging:be}}var qi={Spacebar:" ",Right:un,Left:cn,Up:Uo,Down:Go};function Xn(e){return e=Xe(e)?e:e.key,qi[e]||e}var go="keydown";function Xi(e,t,n){var o=me(e),r=o.on,a=o.bind,i=o.unbind,l=e.root,s=t.Direction.resolve,p,c;function _(){y(),r(Se,g),r(Se,y),r(Ue,d)}function y(){var v=n.keyboard;v&&(p=v==="global"?window:l,a(p,go,C))}function g(){i(p,go)}function u(v){c=v}function d(){var v=c;c=!0,Co(function(){c=v})}function C(v){if(!c){var f=Xn(v);f===s(cn)?e.go("<"):f===s(un)&&e.go(">")}}return{mount:_,destroy:g,disable:u}}var wt=On+"-lazy",Jt=wt+"-srcset",Ki="["+wt+"], ["+Jt+"]";function Ji(e,t,n){var o=me(e),r=o.on,a=o.off,i=o.bind,l=o.emit,s=n.lazyLoad==="sequential",p=[bt,it],c=[];function _(){n.lazyLoad&&(y(),r(ve,y))}function y(){De(c),g(),s?v():(a(p),r(p,u),u())}function g(){t.Slides.forEach(function(f){Bn(f.slide,Ki).forEach(function($){var M=Ie($,wt),O=Ie($,Jt);if(M!==$.src||O!==$.srcset){var w=n.classes.spinner,h=$.parentElement,L=Ot(h,"."+w)||pt("span",w,h);c.push([$,f,L]),$.src||It($,"none")}})})}function u(){c=c.filter(function(f){var $=n.perPage*((n.preloadPages||1)+1)-1;return f[1].isWithin(e.index,$)?d(f):!0}),c.length||a(p)}function d(f){var $=f[0];Fe(f[1].slide,An),i($,"load error",ue(C,f)),Z($,"src",Ie($,wt)),Z($,"srcset",Ie($,Jt)),Re($,wt),Re($,Jt)}function C(f,$){var M=f[0],O=f[1];Me(O.slide,An),$.type!=="error"&&(ot(f[2]),It(M,""),l(Dn,M,O),l(ht)),s&&v()}function v(){c.length&&d(c.shift())}return{mount:_,destroy:ue(De,c),check:u}}function Zi(e,t,n){var o=me(e),r=o.on,a=o.emit,i=o.bind,l=t.Slides,s=t.Elements,p=t.Controller,c=p.hasFocus,_=p.getIndex,y=p.go,g=t.Direction.resolve,u=s.pagination,d=[],C,v;function f(){$(),r([Se,ve,tn],f);var N=n.pagination;u&&It(u,N?"":"none"),N&&(r([Ue,an,it],P),M(),P(),a(zo,{list:C,items:d},L(e.index)))}function $(){C&&(ot(u?Je(C.children):C),Me(C,v),De(d),C=null),o.destroy()}function M(){var N=e.length,R=n.classes,V=n.i18n,B=n.perPage,U=c()?p.getEnd()+1:kt(N/B);C=u||pt("ul",R.pagination,s.track.parentElement),Fe(C,v=mn+"--"+h()),Z(C,He,"tablist"),Z(C,Te,V.select),Z(C,Gn,h()===pn?"vertical":"");for(var H=0;H<U;H++){var m=pt("li",null,C),I=pt("button",{class:R.page,type:"button"},m),E=l.getIn(H).map(function(x){return x.slide.id}),T=!c()&&B>1?V.pageX:V.slideX;i(I,"click",ue(O,H)),n.paginationKeyboard&&i(I,"keydown",ue(w,H)),Z(m,He,"presentation"),Z(I,He,"tab"),Z(I,Nt,E.join(" ")),Z(I,Te,Tn(T,H+1)),Z(I,dt,-1),d.push({li:m,button:I,page:H})}}function O(N){y(">"+N,!0)}function w(N,R){var V=d.length,B=Xn(R),U=h(),H=-1;B===g(un,!1,U)?H=++N%V:B===g(cn,!1,U)?H=(--N+V)%V:B==="Home"?H=0:B==="End"&&(H=V-1);var m=d[H];m&&(To(m.button),y(">"+H),ze(R,!0))}function h(){return n.paginationDirection||n.direction}function L(N){return d[p.toPage(N)]}function P(){var N=L(_(!0)),R=L(_());if(N){var V=N.button;Me(V,rt),Re(V,ao),Z(V,dt,-1)}if(R){var B=R.button;Fe(B,rt),Z(B,ao,!0),Z(B,dt,"")}a(jo,{list:C,items:d},N,R)}return{items:d,mount:f,destroy:$,getAt:L,update:P}}var Qi=[" ","Enter"];function ea(e,t,n){var o=n.isNavigation,r=n.slideFocus,a=[];function i(){e.splides.forEach(function(u){u.isParent||(p(e,u.splide),p(u.splide,e))}),o&&c()}function l(){a.forEach(function(u){u.destroy()}),De(a)}function s(){l(),i()}function p(u,d){var C=me(u);C.on(Ue,function(v,f,$){d.go(d.is(St)?$:v)}),a.push(C)}function c(){var u=me(e),d=u.on;d(Nn,y),d(Ho,g),d([Ze,Se],_),a.push(u),u.emit(jn,e.splides)}function _(){Z(t.Elements.list,Gn,n.direction===pn?"vertical":"")}function y(u){e.go(u.index)}function g(u,d){Pn(Qi,Xn(d))&&(y(u),ze(d))}return{setup:ue(t.Media.set,{slideFocus:Pt(r)?o:r},!0),mount:i,destroy:l,remount:s}}function ta(e,t,n){var o=me(e),r=o.bind,a=0;function i(){n.wheel&&r(t.Elements.track,"wheel",l,ct)}function l(p){if(p.cancelable){var c=p.deltaY,_=c<0,y=_n(p),g=n.wheelMinThreshold||0,u=n.wheelSleep||0;Ce(c)>g&&y-a>u&&(e.go(_?"<":">"),a=y),s(_)&&ze(p)}}function s(p){return!n.releaseWheel||e.state.is(vt)||t.Controller.getAdjacent(p)!==-1}return{mount:i}}var na=90;function oa(e,t,n){var o=me(e),r=o.on,a=t.Elements.track,i=n.live&&!n.isNavigation,l=pt("span",xi),s=ln(na,ue(c,!1));function p(){i&&(y(!t.Autoplay.isPaused()),Z(a,co,!0),l.textContent="…",r(Mn,ue(y,!0)),r(Hn,ue(y,!1)),r([bt,it],ue(c,!0)))}function c(g){Z(a,so,g),g?(Bt(a,l),s.start()):(ot(l),s.cancel())}function _(){Re(a,[lo,co,so]),ot(l)}function y(g){i&&Z(a,lo,g?"off":"polite")}return{mount:p,disable:y,destroy:_}}var ra=Object.freeze({__proto__:null,Media:di,Direction:gi,Elements:Ei,Slides:Ai,Layout:Ii,Clones:Fi,Move:Ri,Controller:Pi,Arrows:Oi,Autoplay:Ni,Cover:zi,Scroll:Gi,Drag:Yi,Keyboard:Xi,LazyLoad:Ji,Pagination:Zi,Sync:ea,Wheel:ta,Live:oa}),ia={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"},aa={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:_i,i18n:ia,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function la(e,t,n){var o=t.Slides;function r(){me(e).on([Ze,ve],a)}function a(){o.forEach(function(l){l.style("transform","translateX(-"+100*l.index+"%)")})}function i(l,s){o.style("transition","opacity "+n.speed+"ms "+n.easing),Co(s)}return{mount:r,start:i,cancel:$n}}function sa(e,t,n){var o=t.Move,r=t.Controller,a=t.Scroll,i=t.Elements.list,l=ue(Ae,i,"transition"),s;function p(){me(e).bind(i,"transitionend",function(g){g.target===i&&s&&(_(),s())})}function c(g,u){var d=o.toPosition(g,!0),C=o.getPosition(),v=y(g);Ce(d-C)>=1&&v>=1?n.useScroll?a.scroll(d,v,!1,u):(l("transform "+v+"ms "+n.easing),o.translate(d,!0),s=u):(o.jump(g),u())}function _(){l(""),a.cancel()}function y(g){var u=n.rewindSpeed;if(e.is(yt)&&u){var d=r.getIndex(!0),C=r.getEnd();if(d===0&&g>=C||d>=C&&g===0)return u}return n.speed}return{mount:p,start:c,cancel:_}}var ca=(function(){function e(n,o){this.event=me(),this.Components={},this.state=ui(ut),this.splides=[],this._o={},this._E={};var r=Xe(n)?Lo(document,n):n;_t(r,r+" is invalid."),this.root=r,o=qe({label:Ie(r,Te)||"",labelledby:Ie(r,Un)||""},aa,e.defaults,o||{});try{qe(o,JSON.parse(Ie(r,On)))}catch{_t(!1,"Invalid JSON")}this._o=Object.create(qe({},o))}var t=e.prototype;return t.mount=function(o,r){var a=this,i=this.state,l=this.Components;_t(i.is([ut,Zt]),"Already mounted!"),i.set(ut),this._C=l,this._T=r||this._T||(this.is(zt)?la:sa),this._E=o||this._E;var s=At({},ra,this._E,{Transition:this._T});return nt(s,function(p,c){var _=p(a,l,a._o);l[c]=_,_.setup&&_.setup()}),nt(l,function(p){p.mount&&p.mount()}),this.emit(Ze),Fe(this.root,Ci),i.set(ft),this.emit(En),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(ft)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},t.go=function(o){return this._C.Controller.go(o),this},t.on=function(o,r){return this.event.on(o,r),this},t.off=function(o){return this.event.off(o),this},t.emit=function(o){var r;return(r=this.event).emit.apply(r,[o].concat(Je(arguments,1))),this},t.add=function(o,r){return this._C.Slides.add(o,r),this},t.remove=function(o){return this._C.Slides.remove(o),this},t.is=function(o){return this._o.type===o},t.refresh=function(){return this.emit(ve),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,a=this.state;return a.is(ut)?me(this).on(En,this.destroy.bind(this,o)):(nt(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(zn),r.destroy(),o&&De(this.splides),a.set(Zt)),this},ii(e,[{key:"options",get:function(){return this._o},set:function(o){this._C.Media.set(o,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Kn=ca;Kn.defaults={};Kn.STATES=li;var mo=[[Ze,"onMounted"],[En,"onReady"],[Ue,"onMove"],[bt,"onMoved"],[Nn,"onClick"],[ko,"onActive"],[Fo,"onInactive"],[Ro,"onVisible"],[Po,"onHidden"],[ve,"onRefresh"],[Se,"onUpdated"],[ht,"onResize"],[rn,"onResized"],[Vo,"onDrag"],[Bo,"onDragging"],[Oo,"onDragged"],[an,"onScroll"],[it,"onScrolled"],[zn,"onDestroy"],[Wo,"onArrowsMounted"],[No,"onArrowsUpdated"],[zo,"onPaginationMounted"],[jo,"onPaginationUpdated"],[jn,"onNavigationMounted"],[Mn,"onAutoplayPlay"],[Mo,"onAutoplayPlaying"],[Hn,"onAutoplayPause"],[Dn,"onLazyLoadLoaded"]];function Jn(...e){return e.filter(Boolean).join(" ")}function nn(e){return e!==null&&typeof e=="object"}function In(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!In(n,t[o]));if(nn(e)&&nn(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!In(e[r],t[r]))}return e===t}function ua(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function pa(e,t){if(e){const n=Object.keys(e);for(let o=0;o<n.length;o++){const r=n[o];if(r!=="__proto__"&&t(e[r],r)===!1)break}}return e}function kn(e,t){const n=e;return pa(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():nn(o)?n[r]=kn(nn(n[r])?n[r]:{},o):n[r]=o}),n}var da=({children:e,className:t,...n})=>j.createElement("div",{className:Jn("splide__track",t),...n},j.createElement("ul",{className:"splide__list"},e)),rr=class extends j.Component{constructor(){super(...arguments),this.splideRef=j.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new Kn(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=kn({},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&&!In(this.options,e)&&(this.splide.options=e,this.options=kn({},e));const t=this.getSlides();ua(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){mo.forEach(([t,n])=>{const o=this.props[n];typeof o=="function"&&e.on(t,(...r)=>{o(e,...r)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:o,...r}=this.props;return j.createElement(t,{className:Jn("splide",e),ref:this.splideRef,...this.omit(r,["options",...mo.map(a=>a[1])])},n?j.createElement(da,null,o):o)}},ir=({children:e,className:t,...n})=>j.createElement("li",{className:Jn("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),j=require("react"),de=require("classnames"),I=require("./useScopedStyles-DpVdqfXj.js"),mr=require("react-dom");function fr(e){return e.type==="object"&&e.version===1}const hr="ControlSlider-module__wrapper___sHEkd",yr="ControlSlider-module__hoverArrow___A-dOH",vr="ControlSlider-module__sliderItem___QQSkR",br="ControlSlider-module__sliderImage___9hRl-",Sr="ControlSlider-module__arrow___05ghY",xr="ControlSlider-module__arrowVertical___tBfVN",Cr="ControlSlider-module__nextArrow___-30Yc",$r="ControlSlider-module__arrowInner___aEra3",_r="ControlSlider-module__arrowIcon___S4ztF",wr="ControlSlider-module__arrowImg___2dwJW",Tr="ControlSlider-module__mirror___brd6U",Er="ControlSlider-module__pagination___bicLF",Lr="ControlSlider-module__paginationInner___bT-P-",Ar="ControlSlider-module__paginationVertical___zYqKw",Ir="ControlSlider-module__paginationItem___nTRbk",kr="ControlSlider-module__dot___p1Qun",Fr="ControlSlider-module__activeDot___LHFaj",Rr="ControlSlider-module__paginationInsideBottom___R3FWn",Br="ControlSlider-module__paginationInsideTop___V-qb-",Vr="ControlSlider-module__paginationOutsideBottom___14w8D",Pr="ControlSlider-module__paginationOutsideTop___SCLqB",Or="ControlSlider-module__paginationInsideLeft___yOBRZ",Wr="ControlSlider-module__paginationInsideRight___Rtt3o",Nr="ControlSlider-module__paginationOutsideLeft___lahaw",zr="ControlSlider-module__paginationOutsideRight___EtuQa",jr="ControlSlider-module__imgWrapper___UjEgB",Mr="ControlSlider-module__captionBlock___dJ6-j",Hr="ControlSlider-module__captionTextWrapper___HFlpf",Dr="ControlSlider-module__captionText___uGBVc",Ur="ControlSlider-module__active___WZK4G",Gr="ControlSlider-module__withPointerEvents___t-18M",Yr="ControlSlider-module__topLeftAlignment___zjnGM",qr="ControlSlider-module__topCenterAlignment___gD1xW",Xr="ControlSlider-module__topRightAlignment___NMapS",Kr="ControlSlider-module__middleLeftAlignment___OnUrY",Jr="ControlSlider-module__middleCenterAlignment___Tdkl0",Zr="ControlSlider-module__middleRightAlignment___wEbfX",Qr="ControlSlider-module__bottomLeftAlignment___cTP2-",ei="ControlSlider-module__bottomCenterAlignment___c54fB",ti="ControlSlider-module__bottomRightAlignment___kEwrz",ni="ControlSlider-module__clickOverlay___DZA28",oi="ControlSlider-module__contain___pLyq7",ri="ControlSlider-module__cover___KdDat",G={wrapper:hr,hoverArrow:yr,sliderItem:vr,sliderImage:br,arrow:Sr,arrowVertical:xr,nextArrow:Cr,arrowInner:$r,arrowIcon:_r,arrowImg:wr,mirror:Tr,pagination:Er,paginationInner:Lr,paginationVertical:Ar,paginationItem:Ir,dot:kr,activeDot:Fr,paginationInsideBottom:Rr,paginationInsideTop:Br,paginationOutsideBottom:Vr,paginationOutsideTop:Pr,paginationInsideLeft:Or,paginationInsideRight:Wr,paginationOutsideLeft:Nr,paginationOutsideRight:zr,imgWrapper:jr,captionBlock:Mr,captionTextWrapper:Hr,captionText:Dr,active:Ur,withPointerEvents:Gr,topLeftAlignment:Yr,topCenterAlignment:qr,topRightAlignment:Xr,middleLeftAlignment:Kr,middleCenterAlignment:Jr,middleRightAlignment:Zr,bottomLeftAlignment:Qr,bottomCenterAlignment:ei,bottomRightAlignment:ti,clickOverlay:ni,contain:oi,cover:ri};function ii(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ai(e,t,n){return t&&ii(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var to="(prefers-reduced-motion: reduce)",ut=1,li=2,ft=3,vt=4,Rt=5,qt=6,Zt=7,si={CREATED:ut,MOUNTED:li,IDLE:ft,MOVING:vt,SCROLLING:Rt,DRAGGING:qt,DESTROYED:Zt};function He(e){e.length=0}function Ke(e,t,n){return Array.prototype.slice.call(e,t,n)}function ue(e){return e.bind.apply(e,[null].concat(Ke(arguments,1)))}var $o=setTimeout,$n=function(){};function no(e){return requestAnimationFrame(e)}function on(e,t){return typeof t===e}function Tt(e){return!Rn(e)&&on("object",e)}var Fn=Array.isArray,_o=ue(on,"function"),qe=ue(on,"string"),Bt=ue(on,"undefined");function Rn(e){return e===null}function wo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Vt(e){return Fn(e)?e:[e]}function Te(e,t){Vt(e).forEach(t)}function Bn(e,t){return e.indexOf(t)>-1}function Xt(e,t){return e.push.apply(e,Vt(t)),e}function ze(e,t,n){e&&Te(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function Fe(e,t){ze(e,qe(t)?t.split(" "):t,!0)}function Pt(e,t){Te(t,e.appendChild.bind(e))}function Vn(e,t){Te(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function Et(e,t){return wo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function To(e,t){var n=e?Ke(e.children):[];return t?n.filter(function(o){return Et(o,t)}):n}function Ot(e,t){return t?To(e,t)[0]:e.firstElementChild}var Lt=Object.keys;function nt(e,t,n){return e&&(n?Lt(e).reverse():Lt(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function At(e){return Ke(arguments,1).forEach(function(t){nt(t,function(n,o){e[o]=t[o]})}),e}function Ye(e){return Ke(arguments,1).forEach(function(t){nt(t,function(n,o){Fn(n)?e[o]=n.slice():Tt(n)?e[o]=Ye({},Tt(e[o])?e[o]:{},n):e[o]=n})}),e}function oo(e,t){Te(t||Lt(e),function(n){delete e[n]})}function Re(e,t){Te(e,function(n){Te(t,function(o){n&&n.removeAttribute(o)})})}function Z(e,t,n){Tt(t)?nt(t,function(o,r){Z(e,r,o)}):Te(e,function(o){Rn(n)||n===""?Re(o,t):o.setAttribute(t,String(n))})}function pt(e,t,n){var o=document.createElement(e);return t&&(qe(t)?Fe(o,t):Z(o,t)),n&&Pt(n,o),o}function Le(e,t,n){if(Bt(n))return getComputedStyle(e)[t];Rn(n)||(e.style[t]=""+n)}function It(e,t){Le(e,"display",t)}function Eo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Ae(e,t){return e.getAttribute(t)}function ro(e,t){return e&&e.classList.contains(t)}function _e(e){return e.getBoundingClientRect()}function ot(e){Te(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Lo(e){return Ot(new DOMParser().parseFromString(e,"text/html").body)}function Ne(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Ao(e,t){return e&&e.querySelector(t)}function Pn(e,t){return t?Ke(e.querySelectorAll(t)):[]}function je(e,t){ze(e,t,!1)}function _n(e){return e.timeStamp}function et(e){return qe(e)?e:e?e+"px":""}var Wt="splide",On="data-"+Wt;function _t(e,t){if(!e)throw new Error("["+Wt+"] "+(t||""))}var Xe=Math.min,Qt=Math.max,en=Math.floor,kt=Math.ceil,Ce=Math.abs;function Io(e,t,n){return Ce(e-t)<n}function Kt(e,t,n,o){var r=Xe(t,n),a=Qt(t,n);return o?r<e&&e<a:r<=e&&e<=a}function st(e,t,n){var o=Xe(t,n),r=Qt(t,n);return Xe(Qt(o,e),r)}function wn(e){return+(e>0)-+(e<0)}function Tn(e,t){return Te(t,function(n){e=e.replace("%s",""+n)}),e}function Wn(e){return e<10?"0"+e:""+e}var io={};function ci(e){return""+e+Wn(io[e]=(io[e]||0)+1)}function ko(){var e=[];function t(i,l,s,p){r(i,l,function(c,_,v){var g="addEventListener"in c,u=g?c.removeEventListener.bind(c,_,s,p):c.removeListener.bind(c,s);g?c.addEventListener(_,s,p):c.addListener(s),e.push([c,_,v,s,u])})}function n(i,l,s){r(i,l,function(p,c,_){e=e.filter(function(v){return v[0]===p&&v[1]===c&&v[2]===_&&(!s||v[3]===s)?(v[4](),!1):!0})})}function o(i,l,s){var p,c=!0;return typeof CustomEvent=="function"?p=new CustomEvent(l,{bubbles:c,detail:s}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(l,c,!1,s)),i.dispatchEvent(p),p}function r(i,l,s){Te(i,function(p){p&&Te(l,function(c){c.split(" ").forEach(function(_){var v=_.split(".");s(p,v[0],v[1])})})})}function a(){e.forEach(function(i){i[4]()}),He(e)}return{bind:t,unbind:n,dispatch:o,destroy:a}}var Je="mounted",En="ready",De="move",bt="moved",Nn="click",Fo="active",Ro="inactive",Bo="visible",Vo="hidden",ve="refresh",xe="updated",ht="resize",rn="resized",Po="drag",Oo="dragging",Wo="dragged",an="scroll",it="scrolled",ui="overflow",zn="destroy",No="arrows:mounted",zo="arrows:updated",jo="pagination:mounted",Mo="pagination:updated",jn="navigation:mounted",Mn="autoplay:play",Ho="autoplay:playing",Hn="autoplay:pause",Dn="lazyload:loaded",Do="sk",Uo="sh",tn="ei";function ge(e){var t=e?e.event.bus:document.createDocumentFragment(),n=ko();function o(a,i){n.bind(t,Vt(a).join(" "),function(l){i.apply(i,Fn(l.detail)?l.detail:[])})}function r(a){n.dispatch(t,a,Ke(arguments,1))}return e&&e.event.on(zn,n.destroy),At(n,{bus:t,on:o,off:ue(n.unbind,t),emit:r})}function ln(e,t,n,o){var r=Date.now,a,i=0,l,s=!0,p=0;function c(){if(!s){if(i=e?Xe((r()-a)/e,1):1,n&&n(i),i>=1&&(t(),a=r(),o&&++p>=o))return v();l=no(c)}}function _(f){f||u(),a=r()-(f?i*e:0),s=!1,l=no(c)}function v(){s=!0}function g(){a=r(),i=0,n&&n(i)}function u(){l&&cancelAnimationFrame(l),i=0,l=0,s=!0}function d(f){e=f}function x(){return s}return{start:_,rewind:g,pause:v,cancel:u,set:d,isPaused:x}}function pi(e){var t=e;function n(r){t=r}function o(r){return Bn(Vt(r),t)}return{set:n,is:o}}function di(e,t){var n=ln(0,e,null,1);return function(){n.isPaused()&&n.start()}}function gi(e,t,n){var o=e.state,r=n.breakpoints||{},a=n.reducedMotion||{},i=ko(),l=[];function s(){var u=n.mediaQuery==="min";Lt(r).sort(function(d,x){return u?+d-+x:+x-+d}).forEach(function(d){c(r[d],"("+(u?"min":"max")+"-width:"+d+"px)")}),c(a,to),_()}function p(u){u&&i.destroy()}function c(u,d){var x=matchMedia(d);i.bind(x,"change",_),l.push([u,x])}function _(){var u=o.is(Zt),d=n.direction,x=l.reduce(function(f,h){return Ye(f,h[1].matches?h[0]:{})},{});oo(n),g(x),n.destroy?e.destroy(n.destroy==="completely"):u?(p(!0),e.mount()):d!==n.direction&&e.refresh()}function v(u){matchMedia(to).matches&&(u?Ye(n,a):oo(n,Lt(a)))}function g(u,d,x){Ye(n,u),d&&Ye(Object.getPrototypeOf(n),u),(x||!o.is(ut))&&e.emit(xe,n)}return{setup:s,destroy:p,reduce:v,set:g}}var sn="Arrow",cn=sn+"Left",un=sn+"Right",Go=sn+"Up",Yo=sn+"Down",ao="rtl",pn="ttb",yn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Go,un],ArrowRight:[Yo,cn]};function mi(e,t,n){function o(a,i,l){l=l||n.direction;var s=l===ao&&!i?1:l===pn?0:-1;return yn[a]&&yn[a][s]||a.replace(/width|left|right/i,function(p,c){var _=yn[p.toLowerCase()][s]||p;return c>0?_.charAt(0).toUpperCase()+_.slice(1):_})}function r(a){return a*(n.direction===ao?1:-1)}return{resolve:o,orient:r}}var Me="role",dt="tabindex",fi="disabled",Ie="aria-",Nt=Ie+"controls",qo=Ie+"current",lo=Ie+"selected",we=Ie+"label",Un=Ie+"labelledby",Xo=Ie+"hidden",Gn=Ie+"orientation",Ft=Ie+"roledescription",so=Ie+"live",co=Ie+"busy",uo=Ie+"atomic",Yn=[Me,dt,fi,Nt,qo,we,Un,Xo,Gn,Ft],Be=Wt+"__",Ze="is-",vn=Wt,po=Be+"track",hi=Be+"list",dn=Be+"slide",Ko=dn+"--clone",yi=dn+"__container",qn=Be+"arrows",gn=Be+"arrow",Jo=gn+"--prev",Zo=gn+"--next",mn=Be+"pagination",Qo=mn+"__page",vi=Be+"progress",bi=vi+"__bar",Si=Be+"toggle",xi=Be+"spinner",Ci=Be+"sr",$i=Ze+"initialized",rt=Ze+"active",er=Ze+"prev",tr=Ze+"next",Ln=Ze+"visible",An=Ze+"loading",nr=Ze+"focus-in",or=Ze+"overflow",_i=[rt,Ln,er,tr,An,nr,or],wi={slide:dn,clone:Ko,arrows:qn,arrow:gn,prev:Jo,next:Zo,pagination:mn,page:Qo,spinner:xi};function Ti(e,t){if(_o(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Et(n,t);)n=n.parentElement;return n}var Ei=5,go=200,rr="touchstart mousedown",bn="touchmove mousemove",Sn="touchend touchcancel mouseup click";function Li(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=e.root,l=n.i18n,s={},p=[],c=[],_=[],v,g,u;function d(){$(),M(),h()}function x(){r(ve,f),r(ve,d),r(xe,h),a(document,rr+" keydown",function(y){u=y.type==="keydown"},{capture:!0}),a(i,"focusin",function(){ze(i,nr,!!u)})}function f(y){var L=Yn.concat("style");He(p),je(i,c),je(v,_),Re([v,g],L),Re(i,y?L:["style",Ft])}function h(){je(i,c),je(v,_),c=w(vn),_=w(po),Fe(i,c),Fe(v,_),Z(i,we,n.label),Z(i,Un,n.labelledby)}function $(){v=O("."+po),g=Ot(v,"."+hi),_t(v&&g,"A track/list element is missing."),Xt(p,To(g,"."+dn+":not(."+Ko+")")),nt({arrows:qn,pagination:mn,prev:Jo,next:Zo,bar:bi,toggle:Si},function(y,L){s[L]=O("."+y)}),At(s,{root:i,track:v,list:g,slides:p})}function M(){var y=i.id||ci(Wt),L=n.role;i.id=y,v.id=v.id||y+"-track",g.id=g.id||y+"-list",!Ae(i,Me)&&i.tagName!=="SECTION"&&L&&Z(i,Me,L),Z(i,Ft,l.carousel),Z(g,Me,"presentation")}function O(y){var L=Ao(i,y);return L&&Ti(L,"."+vn)===i?L:void 0}function w(y){return[y+"--"+n.type,y+"--"+n.direction,n.drag&&y+"--draggable",n.isNavigation&&y+"--nav",y===vn&&rt]}return At(s,{setup:d,mount:x,destroy:f})}var yt="slide",St="loop",zt="fade";function Ai(e,t,n,o){var r=ge(e),a=r.on,i=r.emit,l=r.bind,s=e.Components,p=e.root,c=e.options,_=c.isNavigation,v=c.updateOnMove,g=c.i18n,u=c.pagination,d=c.slideFocus,x=s.Direction.resolve,f=Ae(o,"style"),h=Ae(o,we),$=n>-1,M=Ot(o,"."+yi),O;function w(){$||(o.id=p.id+"-slide"+Wn(t+1),Z(o,Me,u?"tabpanel":"group"),Z(o,Ft,g.slide),Z(o,we,h||Tn(g.slideLabel,[t+1,e.length]))),y()}function y(){l(o,"click",ue(i,Nn,E)),l(o,"keydown",ue(i,Do,E)),a([bt,Uo,it],R),a(jn,B),v&&a(De,N)}function L(){O=!0,r.destroy(),je(o,_i),Re(o,Yn),Z(o,"style",f),Z(o,we,h||"")}function B(){var T=e.splides.map(function(C){var F=C.splide.Components.Slides.getAt(t);return F?F.slide.id:""}).join(" ");Z(o,we,Tn(g.slideX,($?n:t)+1)),Z(o,Nt,T),Z(o,Me,d?"button":""),d&&Re(o,Ft)}function N(){O||R()}function R(){if(!O){var T=e.index;V(),P(),ze(o,er,t===T-1),ze(o,tr,t===T+1)}}function V(){var T=H();T!==ro(o,rt)&&(ze(o,rt,T),Z(o,qo,_&&T||""),i(T?Fo:Ro,E))}function P(){var T=m(),C=!T&&(!H()||$);if(e.state.is([vt,Rt])||Z(o,Xo,C||""),Z(Pn(o,c.focusableNodes||""),dt,C?-1:""),d&&Z(o,dt,C?-1:0),T!==ro(o,Ln)&&(ze(o,Ln,T),i(T?Bo:Vo,E)),!T&&document.activeElement===o){var F=s.Slides.getAt(e.index);F&&Eo(F.slide)}}function U(T,C,F){Le(F&&M||o,T,C)}function H(){var T=e.index;return T===t||c.cloneStatus&&T===n}function m(){if(e.is(zt))return H();var T=_e(s.Elements.track),C=_e(o),F=x("left",!0),Y=x("right",!0);return en(T[F])<=kt(C[F])&&en(C[Y])<=kt(T[Y])}function k(T,C){var F=Ce(T-t);return!$&&(c.rewind||e.is(St))&&(F=Xe(F,e.length-F)),F<=C}var E={index:t,slideIndex:n,slide:o,container:M,isClone:$,mount:w,destroy:L,update:R,style:U,isWithin:k};return E}function Ii(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=o.bind,l=t.Elements,s=l.slides,p=l.list,c=[];function _(){v(),r(ve,g),r(ve,v)}function v(){s.forEach(function(R,V){d(R,V,-1)})}function g(){O(function(R){R.destroy()}),He(c)}function u(){O(function(R){R.update()})}function d(R,V,P){var U=Ai(e,V,P,R);U.mount(),c.push(U),c.sort(function(H,m){return H.index-m.index})}function x(R){return R?w(function(V){return!V.isClone}):c}function f(R){var V=t.Controller,P=V.toIndex(R),U=V.hasFocus()?1:n.perPage;return w(function(H){return Kt(H.index,P,P+U-1)})}function h(R){return w(R)[0]}function $(R,V){Te(R,function(P){if(qe(P)&&(P=Lo(P)),wo(P)){var U=s[V];U?Vn(P,U):Pt(p,P),Fe(P,n.classes.slide),L(P,ue(a,ht))}}),a(ve)}function M(R){ot(w(R).map(function(V){return V.slide})),a(ve)}function O(R,V){x(V).forEach(R)}function w(R){return c.filter(_o(R)?R:function(V){return qe(R)?Et(V.slide,R):Bn(Vt(R),V.index)})}function y(R,V,P){O(function(U){U.style(R,V,P)})}function L(R,V){var P=Pn(R,"img"),U=P.length;U?P.forEach(function(H){i(H,"load error",function(){--U||V()})}):V()}function B(R){return R?s.length:c.length}function N(){return c.length>n.perPage}return{mount:_,destroy:g,update:u,register:d,get:x,getIn:f,getAt:h,add:$,remove:M,forEach:O,filter:w,style:y,getLength:B,isEnough:N}}function ki(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=o.emit,l=t.Slides,s=t.Direction.resolve,p=t.Elements,c=p.root,_=p.track,v=p.list,g=l.getAt,u=l.style,d,x,f;function h(){$(),a(window,"resize load",di(ue(i,ht))),r([xe,ve],$),r(ht,M)}function $(){d=n.direction===pn,Le(c,"maxWidth",et(n.width)),Le(_,s("paddingLeft"),O(!1)),Le(_,s("paddingRight"),O(!0)),M(!0)}function M(E){var T=_e(c);(E||x.width!==T.width||x.height!==T.height)&&(Le(_,"height",w()),u(s("marginRight"),et(n.gap)),u("width",L()),u("height",B(),!0),x=T,i(rn),f!==(f=k())&&(ze(c,or,f),i(ui,f)))}function O(E){var T=n.padding,C=s(E?"right":"left");return T&&et(T[C]||(Tt(T)?0:T))||"0px"}function w(){var E="";return d&&(E=y(),_t(E,"height or heightRatio is missing."),E="calc("+E+" - "+O(!1)+" - "+O(!0)+")"),E}function y(){return et(n.height||_e(v).width*n.heightRatio)}function L(){return n.autoWidth?null:et(n.fixedWidth)||(d?"":N())}function B(){return et(n.fixedHeight)||(d?n.autoHeight?null:N():y())}function N(){var E=et(n.gap);return"calc((100%"+(E&&" + "+E)+")/"+(n.perPage||1)+(E&&" - "+E)+")"}function R(){return _e(v)[s("width")]}function V(E,T){var C=g(E||0);return C?_e(C.slide)[s("width")]+(T?0:H()):0}function P(E,T){var C=g(E);if(C){var F=_e(C.slide)[s("right")],Y=_e(v)[s("left")];return Ce(F-Y)+(T?0:H())}return 0}function U(E){return P(e.length-1)-P(0)+V(0,E)}function H(){var E=g(0);return E&&parseFloat(Le(E.slide,s("marginRight")))||0}function m(E){return parseFloat(Le(_,s("padding"+(E?"Right":"Left"))))||0}function k(){return e.is(zt)||U(!0)>R()}return{mount:h,resize:M,listSize:R,slideSize:V,sliderSize:U,totalSize:P,getPadding:m,isOverflow:k}}var Fi=2;function Ri(e,t,n){var o=ge(e),r=o.on,a=t.Elements,i=t.Slides,l=t.Direction.resolve,s=[],p;function c(){r(ve,_),r([xe,ht],g),(p=x())&&(u(p),t.Layout.resize(!0))}function _(){v(),c()}function v(){ot(s),He(s),o.destroy()}function g(){var f=x();p!==f&&(p<f||!f)&&o.emit(ve)}function u(f){var h=i.get().slice(),$=h.length;if($){for(;h.length<f;)Xt(h,h);Xt(h.slice(-f),h.slice(0,f)).forEach(function(M,O){var w=O<f,y=d(M.slide,O);w?Vn(y,h[0].slide):Pt(a.list,y),Xt(s,y),i.register(y,O-f+(w?0:$),M.index)})}}function d(f,h){var $=f.cloneNode(!0);return Fe($,n.classes.clone),$.id=e.root.id+"-clone"+Wn(h+1),$}function x(){var f=n.clones;if(!e.is(St))f=0;else if(Bt(f)){var h=n[l("fixedWidth")]&&t.Layout.slideSize(0),$=h&&kt(_e(a.track)[l("width")]/h);f=$||n[l("autoWidth")]&&e.length||n.perPage*Fi}return f}return{mount:c,destroy:v}}function Bi(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=e.state.set,l=t.Layout,s=l.slideSize,p=l.getPadding,c=l.totalSize,_=l.listSize,v=l.sliderSize,g=t.Direction,u=g.resolve,d=g.orient,x=t.Elements,f=x.list,h=x.track,$;function M(){$=t.Transition,r([Je,rn,xe,ve],O)}function O(){t.Controller.isBusy()||(t.Scroll.cancel(),y(e.index),t.Slides.update())}function w(C,F,Y,re){C!==F&&E(C>Y)&&(R(),L(N(U(),C>Y),!0)),i(vt),a(De,F,Y,C),$.start(F,function(){i(ft),a(bt,F,Y,C),re&&re()})}function y(C){L(P(C,!0))}function L(C,F){if(!e.is(zt)){var Y=F?C:B(C);Le(f,"transform","translate"+u("X")+"("+Y+"px)"),C!==Y&&a(Uo)}}function B(C){if(e.is(St)){var F=V(C),Y=F>t.Controller.getEnd(),re=F<0;(re||Y)&&(C=N(C,Y))}return C}function N(C,F){var Y=C-k(F),re=v();return C-=d(re*(kt(Ce(Y)/re)||1))*(F?1:-1),C}function R(){L(U(),!0),$.cancel()}function V(C){for(var F=t.Slides.get(),Y=0,re=1/0,te=0;te<F.length;te++){var ie=F[te].index,A=Ce(P(ie,!0)-C);if(A<=re)re=A,Y=ie;else break}return Y}function P(C,F){var Y=d(c(C-1)-m(C));return F?H(Y):Y}function U(){var C=u("left");return _e(f)[C]-_e(h)[C]+d(p(!1))}function H(C){return n.trimSpace&&e.is(yt)&&(C=st(C,0,d(v(!0)-_()))),C}function m(C){var F=n.focus;return F==="center"?(_()-s(C,!0))/2:+F*s(C)||0}function k(C){return P(C?t.Controller.getEnd():0,!!n.trimSpace)}function E(C){var F=d(N(U(),C));return C?F>=0:F<=f[u("scrollWidth")]-_e(h)[u("width")]}function T(C,F){F=Bt(F)?U():F;var Y=C!==!0&&d(F)<d(k(!1)),re=C!==!1&&d(F)>d(k(!0));return Y||re}return{mount:M,move:w,jump:y,translate:L,shift:N,cancel:R,toIndex:V,toPosition:P,getPosition:U,getLimit:k,exceededLimit:T,reposition:O}}function Vi(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=t.Move,l=i.getPosition,s=i.getLimit,p=i.toPosition,c=t.Slides,_=c.isEnough,v=c.getLength,g=n.omitEnd,u=e.is(St),d=e.is(yt),x=ue(U,!1),f=ue(U,!0),h=n.start||0,$,M=h,O,w,y;function L(){B(),r([xe,ve,tn],B),r(rn,N)}function B(){O=v(!0),w=n.perMove,y=n.perPage,$=E();var A=st(h,0,g?$:O-1);A!==h&&(h=A,i.reposition())}function N(){$!==E()&&a(tn)}function R(A,K,me){if(!ie()){var se=P(A),fe=k(se);fe>-1&&(K||fe!==h)&&(Y(fe),i.move(se,fe,M,me))}}function V(A,K,me,se){t.Scroll.scroll(A,K,me,function(){var fe=k(i.toIndex(l()));Y(g?Xe(fe,$):fe),se&&se()})}function P(A){var K=h;if(qe(A)){var me=A.match(/([+\-<>])(\d+)?/)||[],se=me[1],fe=me[2];se==="+"||se==="-"?K=H(h+ +(""+se+(+fe||1)),h):se===">"?K=fe?T(+fe):x(!0):se==="<"&&(K=f(!0))}else K=u?A:st(A,0,$);return K}function U(A,K){var me=w||(te()?1:y),se=H(h+me*(A?-1:1),h,!(w||te()));return se===-1&&d&&!Io(l(),s(!A),1)?A?0:$:K?se:k(se)}function H(A,K,me){if(_()||te()){var se=m(A);se!==A&&(K=A,A=se,me=!1),A<0||A>$?!w&&(Kt(0,A,K,!0)||Kt($,K,A,!0))?A=T(C(A)):u?A=me?A<0?-(O%y||y):O:A:n.rewind?A=A<0?$:0:A=-1:me&&A!==K&&(A=T(C(K)+(A<K?-1:1)))}else A=-1;return A}function m(A){if(d&&n.trimSpace==="move"&&A!==h)for(var K=l();K===p(A,!0)&&Kt(A,0,e.length-1,!n.rewind);)A<h?--A:++A;return A}function k(A){return u?(A+O)%O||0:A}function E(){for(var A=O-(te()||u&&w?1:y);g&&A-- >0;)if(p(O-1,!0)!==p(A,!0)){A++;break}return st(A,0,O-1)}function T(A){return st(te()?A:y*A,0,$)}function C(A){return te()?Xe(A,$):en((A>=$?O-1:A)/y)}function F(A){var K=i.toIndex(A);return d?st(K,0,$):K}function Y(A){A!==h&&(M=h,h=A)}function re(A){return A?M:h}function te(){return!Bt(n.focus)||n.isNavigation}function ie(){return e.state.is([vt,Rt])&&!!n.waitForTransition}return{mount:L,go:R,scroll:V,getNext:x,getPrev:f,getAdjacent:U,getEnd:E,setIndex:Y,getIndex:re,toIndex:T,toPage:C,toDest:F,hasFocus:te,isBusy:ie}}var Pi="http://www.w3.org/2000/svg",Oi="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",Ht=40;function Wi(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=o.emit,l=n.classes,s=n.i18n,p=t.Elements,c=t.Controller,_=p.arrows,v=p.track,g=_,u=p.prev,d=p.next,x,f,h={};function $(){O(),r(xe,M)}function M(){w(),$()}function O(){var V=n.arrows;V&&!(u&&d)&&B(),u&&d&&(At(h,{prev:u,next:d}),It(g,V?"":"none"),Fe(g,f=qn+"--"+n.direction),V&&(y(),R(),Z([u,d],Nt,v.id),i(No,u,d)))}function w(){o.destroy(),je(g,f),x?(ot(_?[u,d]:g),u=d=null):Re([u,d],Yn)}function y(){r([Je,bt,ve,it,tn],R),a(d,"click",ue(L,">")),a(u,"click",ue(L,"<"))}function L(V){c.go(V,!0)}function B(){g=_||pt("div",l.arrows),u=N(!0),d=N(!1),x=!0,Pt(g,[u,d]),!_&&Vn(g,v)}function N(V){var P='<button class="'+l.arrow+" "+(V?l.prev:l.next)+'" type="button"><svg xmlns="'+Pi+'" viewBox="0 0 '+Ht+" "+Ht+'" width="'+Ht+'" height="'+Ht+'" focusable="false"><path d="'+(n.arrowPath||Oi)+'" />';return Lo(P)}function R(){if(u&&d){var V=e.index,P=c.getPrev(),U=c.getNext(),H=P>-1&&V<P?s.last:s.prev,m=U>-1&&V>U?s.first:s.next;u.disabled=P<0,d.disabled=U<0,Z(u,we,H),Z(d,we,m),i(zo,u,d,P,U)}}return{arrows:h,mount:$,destroy:w,update:R}}var Ni=On+"-interval";function zi(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=o.emit,l=ln(n.interval,e.go.bind(e,">"),y),s=l.isPaused,p=t.Elements,c=t.Elements,_=c.root,v=c.toggle,g=n.autoplay,u,d,x=g==="pause";function f(){g&&(h(),v&&Z(v,Nt,p.track.id),x||$(),w())}function h(){n.pauseOnHover&&a(_,"mouseenter mouseleave",function(B){u=B.type==="mouseenter",O()}),n.pauseOnFocus&&a(_,"focusin focusout",function(B){d=B.type==="focusin",O()}),v&&a(v,"click",function(){x?$():M(!0)}),r([De,an,ve],l.rewind),r(De,L)}function $(){s()&&t.Slides.isEnough()&&(l.start(!n.resetProgress),d=u=x=!1,w(),i(Mn))}function M(B){B===void 0&&(B=!0),x=!!B,w(),s()||(l.pause(),i(Hn))}function O(){x||(u||d?M(!1):$())}function w(){v&&(ze(v,rt,!x),Z(v,we,n.i18n[x?"play":"pause"]))}function y(B){var N=p.bar;N&&Le(N,"width",B*100+"%"),i(Ho,B)}function L(B){var N=t.Slides.getAt(B);l.set(N&&+Ae(N.slide,Ni)||n.interval)}return{mount:f,destroy:l.cancel,play:$,pause:M,isPaused:s}}function ji(e,t,n){var o=ge(e),r=o.on;function a(){n.cover&&(r(Dn,ue(l,!0)),r([Je,xe,ve],ue(i,!0)))}function i(s){t.Slides.forEach(function(p){var c=Ot(p.container||p.slide,"img");c&&c.src&&l(s,c,p)})}function l(s,p,c){c.style("background",s?'center/cover no-repeat url("'+p.src+'")':"",!0),It(p,s?"none":"")}return{mount:a,destroy:ue(i,!1)}}var Mi=10,Hi=600,Di=.6,Ui=1.5,Gi=800;function Yi(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=e.state.set,l=t.Move,s=l.getPosition,p=l.getLimit,c=l.exceededLimit,_=l.translate,v=e.is(yt),g,u,d=1;function x(){r(De,M),r([xe,ve],O)}function f(y,L,B,N,R){var V=s();if(M(),B&&(!v||!c())){var P=t.Layout.sliderSize(),U=wn(y)*P*en(Ce(y)/P)||0;y=l.toPosition(t.Controller.toDest(y%P))+U}var H=Io(V,y,1);d=1,L=H?0:L||Qt(Ce(y-V)/Ui,Gi),u=N,g=ln(L,h,ue($,V,y,R),1),i(Rt),a(an),g.start()}function h(){i(ft),u&&u(),a(it)}function $(y,L,B,N){var R=s(),V=y+(L-y)*w(N),P=(V-R)*d;_(R+P),v&&!B&&c()&&(d*=Di,Ce(P)<Mi&&f(p(c(!0)),Hi,!1,u,!0))}function M(){g&&g.cancel()}function O(){g&&!g.isPaused()&&(M(),h())}function w(y){var L=n.easingFunc;return L?L(y):1-Math.pow(1-y,4)}return{mount:x,destroy:M,scroll:f,cancel:O}}var ct={passive:!1,capture:!0};function qi(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=o.bind,l=o.unbind,s=e.state,p=t.Move,c=t.Scroll,_=t.Controller,v=t.Elements.track,g=t.Media.reduce,u=t.Direction,d=u.resolve,x=u.orient,f=p.getPosition,h=p.exceededLimit,$,M,O,w,y,L=!1,B,N,R;function V(){i(v,bn,$n,ct),i(v,Sn,$n,ct),i(v,rr,U,ct),i(v,"click",k,{capture:!0}),i(v,"dragstart",Ne),r([Je,xe],P)}function P(){var z=n.drag;Ue(!z),w=z==="free"}function U(z){if(B=!1,!N){var b=fe(z);se(z.target)&&(b||!z.button)&&(_.isBusy()?Ne(z,!0):(R=b?v:window,y=s.is([vt,Rt]),O=null,i(R,bn,H,ct),i(R,Sn,m,ct),p.cancel(),c.cancel(),E(z)))}}function H(z){if(s.is(qt)||(s.set(qt),a(Po)),z.cancelable)if(y){p.translate($+me(te(z)));var b=ie(z)>go,D=L!==(L=h());(b||D)&&E(z),B=!0,a(Oo),Ne(z)}else F(z)&&(y=C(z),Ne(z))}function m(z){s.is(qt)&&(s.set(ft),a(Wo)),y&&(T(z),Ne(z)),l(R,bn,H),l(R,Sn,m),y=!1}function k(z){!N&&B&&Ne(z,!0)}function E(z){O=M,M=z,$=f()}function T(z){var b=Y(z),D=re(b),q=n.rewind&&n.rewindByDrag;g(!1),w?_.scroll(D,0,n.snap):e.is(zt)?_.go(x(wn(b))<0?q?"<":"-":q?">":"+"):e.is(yt)&&L&&q?_.go(h(!0)?">":"<"):_.go(_.toDest(D),!0),g(!0)}function C(z){var b=n.dragMinThreshold,D=Tt(b),q=D&&b.mouse||0,J=(D?b.touch:+b)||10;return Ce(te(z))>(fe(z)?J:q)}function F(z){return Ce(te(z))>Ce(te(z,!0))}function Y(z){if(e.is(St)||!L){var b=ie(z);if(b&&b<go)return te(z)/b}return 0}function re(z){return f()+wn(z)*Xe(Ce(z)*(n.flickPower||600),w?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function te(z,b){return K(z,b)-K(A(z),b)}function ie(z){return _n(z)-_n(A(z))}function A(z){return M===z&&O||M}function K(z,b){return(fe(z)?z.changedTouches[0]:z)["page"+d(b?"Y":"X")]}function me(z){return z/(L&&e.is(yt)?Ei:1)}function se(z){var b=n.noDrag;return!Et(z,"."+Qo+", ."+gn)&&(!b||!Et(z,b))}function fe(z){return typeof TouchEvent<"u"&&z instanceof TouchEvent}function Se(){return y}function Ue(z){N=z}return{mount:V,disable:Ue,isDragging:Se}}var Xi={Spacebar:" ",Right:un,Left:cn,Up:Go,Down:Yo};function Xn(e){return e=qe(e)?e:e.key,Xi[e]||e}var mo="keydown";function Ki(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=o.unbind,l=e.root,s=t.Direction.resolve,p,c;function _(){v(),r(xe,g),r(xe,v),r(De,d)}function v(){var f=n.keyboard;f&&(p=f==="global"?window:l,a(p,mo,x))}function g(){i(p,mo)}function u(f){c=f}function d(){var f=c;c=!0,$o(function(){c=f})}function x(f){if(!c){var h=Xn(f);h===s(cn)?e.go("<"):h===s(un)&&e.go(">")}}return{mount:_,destroy:g,disable:u}}var wt=On+"-lazy",Jt=wt+"-srcset",Ji="["+wt+"], ["+Jt+"]";function Zi(e,t,n){var o=ge(e),r=o.on,a=o.off,i=o.bind,l=o.emit,s=n.lazyLoad==="sequential",p=[bt,it],c=[];function _(){n.lazyLoad&&(v(),r(ve,v))}function v(){He(c),g(),s?f():(a(p),r(p,u),u())}function g(){t.Slides.forEach(function(h){Pn(h.slide,Ji).forEach(function($){var M=Ae($,wt),O=Ae($,Jt);if(M!==$.src||O!==$.srcset){var w=n.classes.spinner,y=$.parentElement,L=Ot(y,"."+w)||pt("span",w,y);c.push([$,h,L]),$.src||It($,"none")}})})}function u(){c=c.filter(function(h){var $=n.perPage*((n.preloadPages||1)+1)-1;return h[1].isWithin(e.index,$)?d(h):!0}),c.length||a(p)}function d(h){var $=h[0];Fe(h[1].slide,An),i($,"load error",ue(x,h)),Z($,"src",Ae($,wt)),Z($,"srcset",Ae($,Jt)),Re($,wt),Re($,Jt)}function x(h,$){var M=h[0],O=h[1];je(O.slide,An),$.type!=="error"&&(ot(h[2]),It(M,""),l(Dn,M,O),l(ht)),s&&f()}function f(){c.length&&d(c.shift())}return{mount:_,destroy:ue(He,c),check:u}}function Qi(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=o.bind,l=t.Slides,s=t.Elements,p=t.Controller,c=p.hasFocus,_=p.getIndex,v=p.go,g=t.Direction.resolve,u=s.pagination,d=[],x,f;function h(){$(),r([xe,ve,tn],h);var N=n.pagination;u&&It(u,N?"":"none"),N&&(r([De,an,it],B),M(),B(),a(jo,{list:x,items:d},L(e.index)))}function $(){x&&(ot(u?Ke(x.children):x),je(x,f),He(d),x=null),o.destroy()}function M(){var N=e.length,R=n.classes,V=n.i18n,P=n.perPage,U=c()?p.getEnd()+1:kt(N/P);x=u||pt("ul",R.pagination,s.track.parentElement),Fe(x,f=mn+"--"+y()),Z(x,Me,"tablist"),Z(x,we,V.select),Z(x,Gn,y()===pn?"vertical":"");for(var H=0;H<U;H++){var m=pt("li",null,x),k=pt("button",{class:R.page,type:"button"},m),E=l.getIn(H).map(function(C){return C.slide.id}),T=!c()&&P>1?V.pageX:V.slideX;i(k,"click",ue(O,H)),n.paginationKeyboard&&i(k,"keydown",ue(w,H)),Z(m,Me,"presentation"),Z(k,Me,"tab"),Z(k,Nt,E.join(" ")),Z(k,we,Tn(T,H+1)),Z(k,dt,-1),d.push({li:m,button:k,page:H})}}function O(N){v(">"+N,!0)}function w(N,R){var V=d.length,P=Xn(R),U=y(),H=-1;P===g(un,!1,U)?H=++N%V:P===g(cn,!1,U)?H=(--N+V)%V:P==="Home"?H=0:P==="End"&&(H=V-1);var m=d[H];m&&(Eo(m.button),v(">"+H),Ne(R,!0))}function y(){return n.paginationDirection||n.direction}function L(N){return d[p.toPage(N)]}function B(){var N=L(_(!0)),R=L(_());if(N){var V=N.button;je(V,rt),Re(V,lo),Z(V,dt,-1)}if(R){var P=R.button;Fe(P,rt),Z(P,lo,!0),Z(P,dt,"")}a(Mo,{list:x,items:d},N,R)}return{items:d,mount:h,destroy:$,getAt:L,update:B}}var ea=[" ","Enter"];function ta(e,t,n){var o=n.isNavigation,r=n.slideFocus,a=[];function i(){e.splides.forEach(function(u){u.isParent||(p(e,u.splide),p(u.splide,e))}),o&&c()}function l(){a.forEach(function(u){u.destroy()}),He(a)}function s(){l(),i()}function p(u,d){var x=ge(u);x.on(De,function(f,h,$){d.go(d.is(St)?$:f)}),a.push(x)}function c(){var u=ge(e),d=u.on;d(Nn,v),d(Do,g),d([Je,xe],_),a.push(u),u.emit(jn,e.splides)}function _(){Z(t.Elements.list,Gn,n.direction===pn?"vertical":"")}function v(u){e.go(u.index)}function g(u,d){Bn(ea,Xn(d))&&(v(u),Ne(d))}return{setup:ue(t.Media.set,{slideFocus:Bt(r)?o:r},!0),mount:i,destroy:l,remount:s}}function na(e,t,n){var o=ge(e),r=o.bind,a=0;function i(){n.wheel&&r(t.Elements.track,"wheel",l,ct)}function l(p){if(p.cancelable){var c=p.deltaY,_=c<0,v=_n(p),g=n.wheelMinThreshold||0,u=n.wheelSleep||0;Ce(c)>g&&v-a>u&&(e.go(_?"<":">"),a=v),s(_)&&Ne(p)}}function s(p){return!n.releaseWheel||e.state.is(vt)||t.Controller.getAdjacent(p)!==-1}return{mount:i}}var oa=90;function ra(e,t,n){var o=ge(e),r=o.on,a=t.Elements.track,i=n.live&&!n.isNavigation,l=pt("span",Ci),s=ln(oa,ue(c,!1));function p(){i&&(v(!t.Autoplay.isPaused()),Z(a,uo,!0),l.textContent="…",r(Mn,ue(v,!0)),r(Hn,ue(v,!1)),r([bt,it],ue(c,!0)))}function c(g){Z(a,co,g),g?(Pt(a,l),s.start()):(ot(l),s.cancel())}function _(){Re(a,[so,uo,co]),ot(l)}function v(g){i&&Z(a,so,g?"off":"polite")}return{mount:p,disable:v,destroy:_}}var ia=Object.freeze({__proto__:null,Media:gi,Direction:mi,Elements:Li,Slides:Ii,Layout:ki,Clones:Ri,Move:Bi,Controller:Vi,Arrows:Wi,Autoplay:zi,Cover:ji,Scroll:Yi,Drag:qi,Keyboard:Ki,LazyLoad:Zi,Pagination:Qi,Sync:ta,Wheel:na,Live:ra}),aa={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"},la={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:wi,i18n:aa,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function sa(e,t,n){var o=t.Slides;function r(){ge(e).on([Je,ve],a)}function a(){o.forEach(function(l){l.style("transform","translateX(-"+100*l.index+"%)")})}function i(l,s){o.style("transition","opacity "+n.speed+"ms "+n.easing),$o(s)}return{mount:r,start:i,cancel:$n}}function ca(e,t,n){var o=t.Move,r=t.Controller,a=t.Scroll,i=t.Elements.list,l=ue(Le,i,"transition"),s;function p(){ge(e).bind(i,"transitionend",function(g){g.target===i&&s&&(_(),s())})}function c(g,u){var d=o.toPosition(g,!0),x=o.getPosition(),f=v(g);Ce(d-x)>=1&&f>=1?n.useScroll?a.scroll(d,f,!1,u):(l("transform "+f+"ms "+n.easing),o.translate(d,!0),s=u):(o.jump(g),u())}function _(){l(""),a.cancel()}function v(g){var u=n.rewindSpeed;if(e.is(yt)&&u){var d=r.getIndex(!0),x=r.getEnd();if(d===0&&g>=x||d>=x&&g===0)return u}return n.speed}return{mount:p,start:c,cancel:_}}var ua=(function(){function e(n,o){this.event=ge(),this.Components={},this.state=pi(ut),this.splides=[],this._o={},this._E={};var r=qe(n)?Ao(document,n):n;_t(r,r+" is invalid."),this.root=r,o=Ye({label:Ae(r,we)||"",labelledby:Ae(r,Un)||""},la,e.defaults,o||{});try{Ye(o,JSON.parse(Ae(r,On)))}catch{_t(!1,"Invalid JSON")}this._o=Object.create(Ye({},o))}var t=e.prototype;return t.mount=function(o,r){var a=this,i=this.state,l=this.Components;_t(i.is([ut,Zt]),"Already mounted!"),i.set(ut),this._C=l,this._T=r||this._T||(this.is(zt)?sa:ca),this._E=o||this._E;var s=At({},ia,this._E,{Transition:this._T});return nt(s,function(p,c){var _=p(a,l,a._o);l[c]=_,_.setup&&_.setup()}),nt(l,function(p){p.mount&&p.mount()}),this.emit(Je),Fe(this.root,$i),i.set(ft),this.emit(En),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(ft)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},t.go=function(o){return this._C.Controller.go(o),this},t.on=function(o,r){return this.event.on(o,r),this},t.off=function(o){return this.event.off(o),this},t.emit=function(o){var r;return(r=this.event).emit.apply(r,[o].concat(Ke(arguments,1))),this},t.add=function(o,r){return this._C.Slides.add(o,r),this},t.remove=function(o){return this._C.Slides.remove(o),this},t.is=function(o){return this._o.type===o},t.refresh=function(){return this.emit(ve),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,a=this.state;return a.is(ut)?ge(this).on(En,this.destroy.bind(this,o)):(nt(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(zn),r.destroy(),o&&He(this.splides),a.set(Zt)),this},ai(e,[{key:"options",get:function(){return this._o},set:function(o){this._C.Media.set(o,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Kn=ua;Kn.defaults={};Kn.STATES=si;var fo=[[Je,"onMounted"],[En,"onReady"],[De,"onMove"],[bt,"onMoved"],[Nn,"onClick"],[Fo,"onActive"],[Ro,"onInactive"],[Bo,"onVisible"],[Vo,"onHidden"],[ve,"onRefresh"],[xe,"onUpdated"],[ht,"onResize"],[rn,"onResized"],[Po,"onDrag"],[Oo,"onDragging"],[Wo,"onDragged"],[an,"onScroll"],[it,"onScrolled"],[zn,"onDestroy"],[No,"onArrowsMounted"],[zo,"onArrowsUpdated"],[jo,"onPaginationMounted"],[Mo,"onPaginationUpdated"],[jn,"onNavigationMounted"],[Mn,"onAutoplayPlay"],[Ho,"onAutoplayPlaying"],[Hn,"onAutoplayPause"],[Dn,"onLazyLoadLoaded"]];function Jn(...e){return e.filter(Boolean).join(" ")}function nn(e){return e!==null&&typeof e=="object"}function In(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!In(n,t[o]));if(nn(e)&&nn(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!In(e[r],t[r]))}return e===t}function pa(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function da(e,t){if(e){const n=Object.keys(e);for(let o=0;o<n.length;o++){const r=n[o];if(r!=="__proto__"&&t(e[r],r)===!1)break}}return e}function kn(e,t){const n=e;return da(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():nn(o)?n[r]=kn(nn(n[r])?n[r]:{},o):n[r]=o}),n}var ga=({children:e,className:t,...n})=>j.createElement("div",{className:Jn("splide__track",t),...n},j.createElement("ul",{className:"splide__list"},e)),ir=class extends j.Component{constructor(){super(...arguments),this.splideRef=j.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new Kn(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=kn({},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&&!In(this.options,e)&&(this.splide.options=e,this.options=kn({},e));const t=this.getSlides();pa(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){fo.forEach(([t,n])=>{const o=this.props[n];typeof o=="function"&&e.on(t,(...r)=>{o(e,...r)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:o,...r}=this.props;return j.createElement(t,{className:Jn("splide",e),ref:this.splideRef,...this.omit(r,["options",...fo.map(a=>a[1])])},n?j.createElement(ga,null,o):o)}},ar=({children:e,className:t,...n})=>j.createElement("li",{className:Jn("splide__slide",t),...n},e);/*!
2
2
  * Splide.js
3
3
  * Version : 4.1.3
4
4
  * License : MIT
5
5
  * Copyright: 2022 Naotoshi Fujita
6
- */const ga="RichTextRenderer-module__link___BWeZ2",ma={link:ga},ar=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?S.jsx("a",{className:ma.link,href:o.value,target:o.target,children:t(o.children)},r):S.jsx("span",{style:fa(o),children:o.text},r));return S.jsx(S.Fragment,{children:e.map((n,o)=>{const r=n.children;return S.jsx("div",{children:t(r)},o)})})};function fa(e){return{...e.fontFamily&&{fontFamily:e.fontFamily},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const ha="SvgImage-module__svg___q3xE-",ya="SvgImage-module__img___VsTm-",fo={svg:ha,img:ya},va=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},ba=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,gt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[a,i]=j.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return j.useEffect(()=>{if(typeof window<"u"&&window.CSS){const l=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(l)}},[]),!va(e)||!a?S.jsx("img",{src:e,alt:"",className:ge(fo.img,o),style:r}):S.jsx("span",{"data-supports-mask":a,className:ge(fo.svg,o),style:{"--svg":ba(e),"--fill":t,"--hover-fill":n,...r??{}}})},Sa={"top-left":G.topLeftAlignment,"top-center":G.topCenterAlignment,"top-right":G.topRightAlignment,"middle-left":G.middleLeftAlignment,"middle-center":G.middleCenterAlignment,"middle-right":G.middleRightAlignment,"bottom-left":G.bottomLeftAlignment,"bottom-center":G.bottomCenterAlignment,"bottom-right":G.bottomRightAlignment};function xa({settings:e,content:t,styles:n,isEditor:o}){const[r,a]=j.useState(null),{widthSettings:i,fontSettings:l,letterSpacing:s,textAlign:p,wordSpacing:c,fontSizeLineHeight:_,textAppearance:y,color:g}=n.imageCaption,[u,d]=j.useState(void 0),[C,v]=j.useState(null),[f,$]=j.useState(0),[M,O]=j.useState(0),{direction:w,transition:h,controls:L,pagination:P,imageCaption:N,triggers:R}=e,V=j.useRef(h.type),{x:B,y:U}=e.controls.offset,H=m=>{r&&r.go(m)};return j.useEffect(()=>{if(!C)return;const m=new ResizeObserver(I=>{if(!r)return;const[E]=I;d({width:Math.round(E.contentRect.width),height:Math.round(E.contentRect.height)})});return m.observe(C),()=>m.unobserve(C)},[C]),j.useEffect(()=>{!r||V.current===h.type||(O(m=>m+1),V.current=h.type)},[h.type]),S.jsx("div",{className:ge(G.wrapper,{[G.editor]:o}),ref:v,children:S.jsxs("div",{className:G.sliderInner,style:{width:u?u.width:"100%",height:u?u.height:"100%",backgroundColor:h.backgroundColor&&h.type==="fade in"?h.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&S.jsx("div",{className:ge(G.captionBlock),children:S.jsx("div",{className:G.captionTextWrapper,children:t.map((m,I)=>S.jsx("div",{className:ge(G.captionText,Sa[N.alignment],{[G.withPointerEvents]:I===f&&o,[G.active]:I===f}),style:{fontFamily:l.fontFamily,fontWeight:l.fontWeight,fontStyle:l.fontStyle,width:i.sizing==="auto"?"max-content":F.scalingValue(i.width,o),letterSpacing:F.scalingValue(s,o),wordSpacing:F.scalingValue(c,o),textAlign:p,fontSize:F.scalingValue(_.fontSize,o),lineHeight:F.scalingValue(_.lineHeight,o),textTransform:y.textTransform??"none",textDecoration:y.textDecoration??"none",fontVariant:y.fontVariant??"normal",color:g,transitionDuration:h.duration?`${Math.round(parseInt(h.duration)/2)}ms`:"500ms"},children:S.jsx("div",{"data-styles":"imageCaption",className:G.captionTextInner,style:{"--link-hover-color":N.linkHoverColor,"--link-color":N.linkColor,position:"relative",top:F.scalingValue(N.offset.y,o),left:F.scalingValue(N.offset.x,o)},children:S.jsx(ar,{content:m.imageCaption})})},I))})}),S.jsx(rr,{onMove:m=>{$(m.index)},ref:a,options:{arrows:!1,speed:h.duration?parseInt(h.duration):500,autoplay:R.autoPlay!==null,...R.autoPlay!==null&&{interval:parseInt(R.autoPlay)*1e3},direction:w==="horiz"||h.type==="fade in"?"ltr":"ttb",pagination:!1,drag:R.triggersList.drag,perPage:1,width:u?u.width:"100%",height:u?u.height:"100%",type:h.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((m,I)=>S.jsx(ir,{children:S.jsx("div",{className:G.sliderItem,children:S.jsx("div",{className:G.imgWrapper,children:S.jsx("img",{className:ge(G.sliderImage,{[G.contain]:m.image.objectFit==="contain",[G.cover]:m.image.objectFit==="cover"}),src:m.image.url,alt:m.image.name??""})})})},I))},M),L.isActive&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:ge(G.arrow,{[G.arrowVertical]:w==="vert",[G.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:S.jsxs("button",{onClick:()=>{H("-1")},className:G.arrowInner,style:{transform:`translate(${F.scalingValue(B,o)}, ${F.scalingValue(U*(w==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${w==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&S.jsx(gt,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:ge(G.arrowImg,G.mirror)}),!L.arrowsImgUrl&&S.jsx(ho,{color:L.color,className:ge(G.arrowIcon,G.arrowImg,G.mirror)})]})}),S.jsx("div",{className:ge(G.arrow,G.nextArrow,{[G.arrowVertical]:w==="vert",[G.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:S.jsxs("button",{className:G.arrowInner,onClick:()=>H("+1"),style:{transform:`translate(${F.scalingValue(B*(w==="horiz"?-1:1),o)}, ${F.scalingValue(U,o)}) scale(${e.controls.scale/100}) rotate(${w==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&S.jsx(gt,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:G.arrowImg}),!L.arrowsImgUrl&&S.jsx(ho,{color:L.color,className:ge(G.arrowIcon,G.arrowImg)})]})})]}),R.triggersList.click&&S.jsx("div",{className:G.clickOverlay,onClick:()=>{r&&r.go("+1")}}),P.isActive&&S.jsx("div",{className:ge(G.pagination,{[G.paginationInsideBottom]:P.position==="inside-1"&&w==="horiz",[G.paginationInsideTop]:P.position==="inside-2"&&w==="horiz",[G.paginationOutsideBottom]:P.position==="outside-1"&&w==="horiz",[G.paginationOutsideTop]:P.position==="outside-2"&&w==="horiz",[G.paginationInsideLeft]:P.position==="inside-1"&&w==="vert",[G.paginationInsideRight]:P.position==="inside-2"&&w==="vert",[G.paginationOutsideLeft]:P.position==="outside-1"&&w==="vert",[G.paginationOutsideRight]:P.position==="outside-2"&&w==="vert",[G.paginationVertical]:w==="vert"}),children:S.jsx("div",{className:G.paginationInner,style:{backgroundColor:P.colors[2],transform:`scale(${P.scale/100}) translate(${F.scalingValue(P.offset.x,o)}, ${F.scalingValue(P.offset.y,o)}) rotate(${w==="horiz"?"0deg":"90deg"})`},children:t.map((m,I)=>S.jsx("button",{onClick:()=>{r&&r.go(I)},className:ge(G.paginationItem),children:S.jsx("div",{className:ge(G.dot,{[G.activeDot]:I===f}),style:{backgroundColor:I===f?P.colors[0]:P.colors[1],"--pagination-hover-color":P.hover}})},I))})})]})})}function ho({color:e,className:t}){return S.jsx("svg",{viewBox:"0 0 10 18",className:t,children:S.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:S.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ca={element:xa,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"outside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},$a="ImageRevealSlider-module__imageRevealSlider___UE5Ob",_a="ImageRevealSlider-module__image___Qjt-e",wa="ImageRevealSlider-module__link___N-iLG",Ta="ImageRevealSlider-module__cursor___2U03d",lt={imageRevealSlider:$a,image:_a,link:wa,cursor:Ta};function yo(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const a=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*a,l=a/2,s=i/2;if(e>=o.x-l&&e<=o.x+l&&t>=o.y-s&&t<=o.y+s)return!0}return!1}function xn(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ea(e,t,n,o){let r,a;if(t==="custom"){r=n;const i=await xn(e);a=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await xn(e);a=i.height/i.width*r}else{const i=await xn(e);r=i.width,a=i.height}return{width:r,height:a,finalWidth:`${r}px`}}function La({settings:e,content:t,isEditor:n}){const[o,r]=j.useState(null),[a,i]=j.useState([]),[l,s]=j.useState(0),p=j.useRef(0),[c,_]=j.useState({x:0,y:0}),[y,g]=j.useState(1),[u,d]=j.useState("none"),C=j.useRef({x:0,y:0}),[v,f]=j.useState(!1),{sizeType:$,imageWidth:M,randomRangeImageWidth:O}=e.imageSize,{revealPosition:w,visible:h}=e.position,{cursorType:L,target:P,defaultCursorScale:N,defaultCursor:R,hoverCursorScale:V,hoverCursor:B}=e.cursor;j.useEffect(()=>{if(!o)return;const m=(T,x)=>{const k=o.getBoundingClientRect(),Y=T-k.left,re=x-k.top;if(_({x:Y,y:re}),L==="system"){d("none"),g(1);return}const te=Y,ie=re,A=document.elementFromPoint(k.left+te,k.top+ie);if(A&&A.closest("a")){d("none"),g(1);return}const K=yo(te,ie,a)||P==="area"?{img:B??"none",scale:V}:{img:R??"none",scale:N};d(K.img),g(K.scale)},I=T=>{T.stopPropagation(),C.current={x:T.clientX,y:T.clientY},m(T.clientX,T.clientY)},E=()=>{v&&m(C.current.x,C.current.y)};return o.addEventListener("mousemove",I),window.addEventListener("scroll",E,!0),()=>{o.removeEventListener("mousemove",I),window.removeEventListener("scroll",E,!0)}},[o,v,c,L,P,B,R,V,N,a]),j.useEffect(()=>{v||(d("none"),g(0))},[v]);const U=async(m,I,E,T={})=>{const{width:x,height:k,finalWidth:Y}=await Ea(m.image.url,$,M,O);let re=0,te=0;w==="same"?(re=I/2,te=E/2):(re=T.x??Math.random()*I,te=T.y??Math.random()*E);const ie=Math.min(Math.max(re,x/2),I-x/2),A=Math.min(Math.max(te,k/2),E-k/2);return{id:p.current++,url:m.image.url,link:m.link,name:m.image.name,x:ie,y:A,width:Y}};j.useEffect(()=>{if(!o||t.length===0)return;const m=o.getBoundingClientRect(),I=m.width,E=m.height,T=[];(async()=>{const k=t[0],Y=await U(k,I,E);T.push(Y),i(T),s(1)})()},[$,M,O,w,o]),j.useEffect(()=>{h==="last One"&&i(m=>m.length>0?[m[m.length-1]]:[])},[h]);const H=async m=>{if(!o)return;const I=o.getBoundingClientRect(),E=m.clientX-I.left,T=m.clientY-I.top;if(P==="image"&&!yo(E,T,a))return;let x=0,k=0;w==="on Click"?(x=E,k=T):w==="same"?(x=I.width/2,k=I.height/2):(x=Math.random()*I.width,k=Math.random()*I.height);const Y=t[l],re=await U(Y,I.width,I.height,{x,y:k});i(te=>h==="all"?[...te,re]:[re]),s(te=>te>=t.length-1?0:te+1)};return S.jsxs("div",{ref:r,onClick:H,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:lt.imageRevealSlider,style:{cursor:u==="none"?"default":"none"},children:[a.map(m=>S.jsx("div",{className:lt.wrapper,style:{top:`${m.y}px`,left:`${m.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:m.width??"auto",height:"auto",cursor:u==="none"?"default":"none"},children:P==="area"&&m.link?S.jsx("a",{href:m.link,target:"_blank",className:lt.link,children:S.jsx("img",{src:m.url,alt:m.name,className:lt.image},m.id)}):S.jsx("img",{src:m.url,alt:m.name,className:lt.image},m.id)},m.id)),v&&S.jsx("div",{className:lt.cursor,style:{left:`${c.x}px`,top:`${c.y}px`,transform:`translate(-50%, -50%) scale(${y})`,backgroundImage:`url('${u}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Aa={element:La,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{width:"100%",height:"100%"},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},Ia="LightBox-module__hidden___9s-9x",ka="LightBox-module__heroImage___sTxNF",Fa="LightBox-module__background___rm9ml",Ra="LightBox-module__editor___4ACaY",Pa="LightBox-module__contentStyle___Bgnsq",Va="LightBox-module__imageStyle___tLIlB",Ba="LightBox-module__imgWrapper___LuFUp",Oa="LightBox-module__contain___8-yaS",Wa="LightBox-module__cover___hNvOG",Na="LightBox-module__caption___b6L2I",za="LightBox-module__captionTextInner___rCGNH",ja="LightBox-module__lightboxSplide___XFuWC",Ma="LightBox-module__arrow___iz38X",Ha="LightBox-module__arrowVertical___Zfz81",Da="LightBox-module__nextArrow___zkAQN",Ua="LightBox-module__arrowInner___p48sW",Ga="LightBox-module__arrowIcon___3VaFf",Ya="LightBox-module__arrowImg___pNV88",qa="LightBox-module__mirror___pjeXc",Xa="LightBox-module__thumbsWrapper___GB-nU",Ka="LightBox-module__thumbsContainerVertical___wttk5",Ja="LightBox-module__thumbsContainer___osSma",Za="LightBox-module__thumbsAlignStart___MO6tY",Qa="LightBox-module__thumbsAlignCenter___Q4sUx",el="LightBox-module__thumbsAlignEnd___p4y9R",tl="LightBox-module__thumbItem___HvnF3",nl="LightBox-module__closeButton___g2khP",ol="LightBox-module__fadeIn___0m5GW",rl="LightBox-module__slideInLeft___gPYwC",il="LightBox-module__slideInRight___S-pPp",al="LightBox-module__slideInTop___DFdAj",ll="LightBox-module__slideInBottom___m27kZ",sl="LightBox-module__fadeOut___55qBR",cl="LightBox-module__slideOutLeft___NvU7P",ul="LightBox-module__slideOutRight___SK7eC",pl="LightBox-module__slideOutTop___Vgg0z",dl="LightBox-module__slideOutBottom___nJ0Ef",gl="LightBox-module__scaleSlide___vZriG",W={hidden:Ia,heroImage:ka,background:Fa,editor:Ra,contentStyle:Pa,imageStyle:Va,imgWrapper:Ba,contain:Oa,cover:Wa,caption:Na,captionTextInner:za,lightboxSplide:ja,arrow:Ma,arrowVertical:Ha,nextArrow:Da,arrowInner:Ua,arrowIcon:Ga,arrowImg:Ya,mirror:qa,thumbsWrapper:Xa,thumbsContainerVertical:Ka,thumbsContainer:Ja,thumbsAlignStart:Za,thumbsAlignCenter:Qa,thumbsAlignEnd:el,thumbItem:tl,closeButton:nl,fadeIn:ol,slideInLeft:rl,slideInRight:il,slideInTop:al,slideInBottom:ll,fadeOut:sl,slideOutLeft:cl,slideOutRight:ul,slideOutTop:pl,slideOutBottom:dl,scaleSlide:gl},Dt=(e,t,n)=>{const o={},[r,a]=e.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),a==="left"?(o.left="0",o.right="auto"):a==="center"?(o.left="50%",o.right="auto"):a==="right"&&(o.left="auto",o.right="0"),r==="middle"&&a==="center"?o.transform=`translate(calc(-50% + ${F.scalingValue(t.x,n)}), calc(-50% + ${F.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${F.scalingValue(t.x,n)}, calc(-50% + ${F.scalingValue(t.y,n)}))`:a==="center"?o.transform=`translate(calc(-50% + ${F.scalingValue(t.x,n)}), ${F.scalingValue(t.y,n)})`:o.transform=`translate(${F.scalingValue(t.x,n)}, ${F.scalingValue(t.y,n)})`,o};function lr(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 vo(e){const t=e.getBoundingClientRect(),n=lr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,i=e.naturalHeight,l=o/r,s=a/i;let p,c;s>l?(p=o,c=o/s):(c=r,p=r*s);const _=t.left+n.left,y=t.top+n.top,g=(o-p)/2+_,u=(r-c)/2+y;return{x:g,y:u,width:p,height:c}}function bo(e){const t=e.getBoundingClientRect(),n=lr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function So(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const o=t[1].split(",").map(r=>parseFloat(r.trim()));return o.length===4?o[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const o=n[1].substring(6,8);return parseInt(o,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function ml(e,t){const n=(()=>{if(e==="fade in")return W.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return W.slideInLeft;case"right":return W.slideInRight;case"top":return W.slideInTop;case"bottom":return W.slideInBottom;default:return W.slideInRight}return W.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return W.fadeIn;if(e==="slide in")switch(t){case"left":return W.slideInLeft;case"right":return W.slideInRight;case"top":return W.slideInTop;case"bottom":return W.slideInBottom;default:return W.slideInRight}return W.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return W.fadeOut;if(e==="slide in")switch(t){case"left":return W.slideOutLeft;case"right":return W.slideOutRight;case"top":return W.slideOutTop;case"bottom":return W.slideOutBottom;default:return W.slideOutRight}return W.fadeOut})(),a=(()=>{if(e==="fade in")return W.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return W.slideOutLeft;case"right":return W.slideOutRight;case"top":return W.slideOutTop;case"bottom":return W.slideOutBottom;default:return W.slideOutRight}return W.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:a}}const fl=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:a})=>{const[i,l]=j.useState(!1),{url:s}=e.thumbnailBlock.cover;return j.useEffect(()=>{r==="close"&&l(!1),r==="open"&&l(!0)},[r]),S.jsxs(S.Fragment,{children:[S.jsx("img",{src:s,alt:"Cover",className:W.heroImage,onClick:()=>l(!0)}),S.jsx(hl,{isOpen:i,onClose:()=>l(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:a})]})},hl=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:a,isEditor:i,metadata:l})=>{var z;const[s,p]=j.useState(0),[c,_]=j.useState(0),[y,g]=j.useState(!1),[u,d]=j.useState(!1),[C,v]=j.useState({}),f=j.useRef(null),$=j.useRef(null),M=j.useRef(null),O=j.useRef(!1),w=j.useRef(null),h=j.useRef(null),L=j.useRef(null),P=j.useRef(null),N=j.useRef(!1),R=j.useRef(null),[V,B]=j.useState(!1),{appear:U,triggers:H,slider:m,thumbnail:I,controls:E,area:T,caption:x,layout:k}=r.lightboxBlock,{appearClass:Y,backdropAppearClass:re,backdropDisappearClass:te,disappearClass:ie}=ml(U.type,U.direction),A=(l==null?void 0:l.itemId)??null;j.useEffect(()=>{const b=()=>{setTimeout(()=>{var q,J;(J=(q=f.current)==null?void 0:q.splide)==null||J.refresh()},16)},D=()=>{_(q=>q+1)};return window.addEventListener("ArticleEditor.Layout:change",b),window.addEventListener("ArticleEditor.ComponentContent:change",D),()=>{window.removeEventListener("ArticleEditor.Layout:change",b),window.removeEventListener("ArticleEditor.ComponentContent:change",D)}},[]),j.useEffect(()=>{if(!e||!I.isActive){B(!1);return}const b=R.current;if(!b)return;const D=()=>{m.direction==="horiz"?B(b.scrollWidth>b.clientWidth):B(b.scrollHeight>b.clientHeight)};D();const q=new ResizeObserver(D);return q.observe(b),()=>q.disconnect()},[e,I.isActive,n.length,C,m.direction]);const K=j.useCallback(()=>{const b=window.matchMedia("(max-width: 768px)").matches,D=So(T.color);b&&!i&&D>.9&&(document.body.style.backgroundColor=""),g(!0),O.current=!0;const q=J=>{J.target===w.current&&J.animationName&&(w.current&&h.current&&w.current.removeEventListener("animationend",h.current),h.current=null,O.current&&(O.current=!1,t()),g(!1))};w.current&&(h.current=q,w.current.addEventListener("animationend",q))},[t,T.color,i]),fe=(b,D,q)=>{var J,ne;if(b){if(H.type==="click"&&H.switch==="image")H.repeat==="close"&&s===n.length-1?K():(J=f.current)==null||J.go("+1");else if(H.type==="click"&&H.switch==="50/50"){const Q=b.getBoundingClientRect(),X=D-Q.left,oe=q-Q.top,ye=Q.width,ae=Q.height;let pe;m.direction==="horiz"?pe=X<ye/2?"-1":"+1":pe=oe<ae/2?"-1":"+1",(ne=f.current)==null||ne.go(pe)}}},se=b=>{if(N.current){N.current=!1;return}const D=n[s],q=(D==null?void 0:D.image.objectFit)==="cover";let J,ne;if("changedTouches"in b&&b.changedTouches.length>0)J=b.changedTouches[0].clientX,ne=b.changedTouches[0].clientY;else if("clientX"in b)J=b.clientX,ne=b.clientY;else return;let Q;if(q&&M.current){const X=bo(M.current);Q=J>=X.left&&J<=X.right&&ne>=X.top&&ne<=X.bottom}else{const X=M.current?vo(M.current):null;if(!X){b.target===b.currentTarget&&K();return}Q=J>=X.x&&J<=X.x+X.width&&ne>=X.y&&ne<=X.y+X.height}Q?fe(M.current,J,ne):K()},he=b=>{const D=b.target;(D.classList.contains(W.thumbsWrapper)||D.classList.contains(W.thumbsContainer))&&se(b)};j.useEffect(()=>{if(!e)return;const b=D=>{var q,J;if(D.key==="Escape"){K();return}if(D.key==="ArrowRight"){p(ne=>(ne+1)%Math.max(n.length,1)),(q=f.current)==null||q.go("+1");return}D.key==="ArrowLeft"&&(p(ne=>(ne-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=f.current)==null||J.go("-1"))};return window.addEventListener("keydown",b),()=>{window.removeEventListener("keydown",b)}},[e,K,n.length]),j.useEffect(()=>{if(e){if(p(0),_(D=>D+1),O.current=!1,g(!1),d(!1),v({}),!A)return;const b=new CustomEvent("page-overlay",{detail:{itemId:A}});window.dispatchEvent(b)}return()=>{w.current&&h.current&&(w.current.removeEventListener("animationend",h.current),h.current=null),d(!1)}},[e,A]),j.useEffect(()=>{$.current!==null&&$.current!==m.type&&_(b=>b+1),$.current=m.type},[m.type]),j.useEffect(()=>{if(!e)return;const b=document.body.style.overflow,D=window.matchMedia("(max-width: 768px)").matches,q=So(T.color);document.body.style.overflow="hidden",d(!1);const J=Q=>{Q.target===w.current&&!O.current&&Q.animationName&&(D&&!i&&q>.9&&(document.body.style.backgroundColor=T.color),d(!0),w.current&&L.current&&w.current.removeEventListener("animationend",L.current),L.current=null)};w.current&&(L.current=J,w.current.addEventListener("animationend",J));const ne=Q=>{const X=Q.target;X&&(X.closest(`.${W.thumbsWrapper}`)||X.closest(`.${W.thumbsContainer}`))||m.type!=="slide"&&Q.preventDefault()};return document.addEventListener("touchmove",ne,{passive:!1}),()=>{document.body.style.overflow=b,document.removeEventListener("touchmove",ne),w.current&&L.current&&(w.current.removeEventListener("animationend",L.current),L.current=null),d(!1)}},[e,i,T.color,m.type]),j.useEffect(()=>{if(!e)return;const b=D=>{var J,ne;if(O.current){D.stopPropagation();return}if(N.current){N.current=!1;return}const q=D.target;if(!(q&&(q.closest(`.${W.thumbsContainer}`)||q.closest(`.${W.thumbItem}`)))){if(m.type==="slide"&&H.type==="drag"&&((ne=(J=f.current)==null?void 0:J.splide)!=null&&ne.root)){const Q=f.current.splide.root;if(q&&(Q.contains(q)||Q===q))return}if(D.touches.length===0&&D.changedTouches.length>0){const Q=n[s],X=(Q==null?void 0:Q.image.objectFit)==="cover",oe=D.changedTouches[0];let ye;if(X&&M.current){const ae=bo(M.current);ye=oe.clientX>=ae.left&&oe.clientX<=ae.right&&oe.clientY>=ae.top&&oe.clientY<=ae.bottom}else{const ae=M.current?vo(M.current):null;if(!ae)return;ye=oe.clientX>=ae.x&&oe.clientX<=ae.x+ae.width&&oe.clientY>=ae.y&&oe.clientY<=ae.y+ae.height}if(!ye){D.stopPropagation(),O.current=!0;const ae=pe=>{pe.stopPropagation(),pe.preventDefault(),document.removeEventListener("click",ae,!0)};document.addEventListener("click",ae,!0),K()}}}};return document.addEventListener("touchend",b,{passive:!0}),()=>{document.removeEventListener("touchend",b)}},[e,K,s,n]);const be=(m.type==="scale"||m.type==="fade")&&m.direction==="vert"&&H.type==="drag";j.useEffect(()=>{var pe,Ve;if(!e||!be||!((Ve=(pe=f.current)==null?void 0:pe.splide)!=null&&Ve.root))return;const b=f.current.splide.root,D=30,q=(ee,ce)=>{if(P.current){const $e=Math.abs(ee-P.current.x),Ye=Math.abs(ce-P.current.y);($e>0||Ye>0)&&(N.current=!0)}},J=ee=>{P.current&&(ee.preventDefault(),q(ee.clientX,ee.clientY))},ne=ee=>{P.current&&ee.touches.length>0&&(ee.preventDefault(),q(ee.touches[0].clientX,ee.touches[0].clientY))},Q=(ee,ce)=>{if(!P.current||!f.current){P.current=null;return}const $e=Math.abs(ee-P.current.x),Ye=Math.abs(ce-P.current.y);Ye>D&&Ye>$e&&f.current.go(ce<P.current.y?"+1":"-1"),P.current=null},X=ee=>{P.current&&Q(ee.clientX,ee.clientY),document.removeEventListener("pointerup",X),document.removeEventListener("pointercancel",X),document.removeEventListener("pointermove",J)},oe=ee=>{if(P.current){if(ee.changedTouches.length>0){const ce=ee.changedTouches[0];Q(ce.clientX,ce.clientY)}document.removeEventListener("touchend",oe),document.removeEventListener("touchcancel",oe),document.removeEventListener("touchmove",ne)}},ye=ee=>{P.current={x:ee.clientX,y:ee.clientY},N.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",X),document.addEventListener("pointercancel",X)},ae=ee=>{ee.touches.length>0&&(P.current={x:ee.touches[0].clientX,y:ee.touches[0].clientY},N.current=!1,document.addEventListener("touchmove",ne,{passive:!1}),document.addEventListener("touchend",oe),document.addEventListener("touchcancel",oe))};return b.addEventListener("pointerdown",ye),b.addEventListener("touchstart",ae),()=>{b.removeEventListener("pointerdown",ye),b.removeEventListener("touchstart",ae),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",X),document.removeEventListener("pointercancel",X),document.removeEventListener("touchmove",ne),document.removeEventListener("touchend",oe),document.removeEventListener("touchcancel",oe),P.current=null,N.current=!1}},[e,be,c]);const Ge={backgroundColor:T.color,backdropFilter:`blur(${T.blur}px)`,animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:gr.createPortal(S.jsxs(S.Fragment,{children:[S.jsx("div",{ref:i?null:w,className:ge(W.background,y?te:re,{[W.editor]:i},{[W.hidden]:!e}),style:{...Ge,...u&&!i&&!y?{position:"absolute"}:{}}}),S.jsxs("div",{ref:i?w:null,className:ge(W.contentStyle,y?ie:Y,{[W.editor]:i},{[W.hidden]:!e}),style:{animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[S.jsx(rr,{onMove:b=>p(b.index),ref:f,className:W.lightboxSplide,options:{arrows:!1,speed:m.duration?parseInt(m.duration):500,direction:m.direction==="horiz"||m.type==="fade"||m.type==="scale"?"ltr":"ttb",pagination:!1,drag:H.type==="drag"&&!be,perPage:1,width:"100%",height:"100%",type:m.type==="fade"||m.type==="scale"?"fade":"loop",padding:0,rewind:H.repeat!=="close",start:0},style:{"--splide-speed":m.duration},children:n.map((b,D)=>{const q=Dt(k.position,k.offset,i),J=`${F.scalingValue(k.padding.top,i)} ${F.scalingValue(k.padding.right,i)} ${F.scalingValue(k.padding.bottom,i)} ${F.scalingValue(k.padding.left,i)}`,ne=m.type==="scale"?(()=>{const{transform:Q,...X}=q;return{...X,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":Q||"none"}})():{...q,position:"absolute",padding:J,boxSizing:"border-box"};return S.jsx(ir,{children:S.jsx("div",{className:W.imgWrapper,onClick:se,children:S.jsx("img",{ref:D===s?M:null,className:ge(W.imageStyle,{[W.contain]:b.image.objectFit==="contain",[W.cover]:b.image.objectFit==="cover",[W.scaleSlide]:m.type==="scale"}),src:b.image.url,alt:b.image.name??"",style:{...ne,pointerEvents:b.image.objectFit==="contain"?"none":"auto"}})})},D)})},c),E.isActive&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:ge(W.arrow,{[W.arrowVertical]:m.direction==="vert"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:S.jsxs("button",{className:W.arrowInner,style:{transform:`translate(${F.scalingValue(E.offset.x,i)}, ${F.scalingValue(E.offset.y*(m.direction==="horiz"?1:-1),i)}) scale(${E.scale}) rotate(${m.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var b;return(b=f.current)==null?void 0:b.go("-1")},"aria-label":"Previous",children:[E.arrowsImgUrl&&S.jsx(gt,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:ge(W.arrowImg,W.mirror)}),!E.arrowsImgUrl&&S.jsx(xo,{color:E.color,className:ge(W.arrowIcon,W.arrowImg,W.mirror)})]})}),S.jsx("div",{className:ge(W.arrow,W.nextArrow,{[W.arrowVertical]:m.direction==="vert"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:S.jsxs("button",{className:W.arrowInner,style:{transform:`translate(${F.scalingValue(E.offset.x*(m.direction==="horiz"?-1:1),i)}, ${F.scalingValue(E.offset.y,i)}) scale(${E.scale}) rotate(${m.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var b;return(b=f.current)==null?void 0:b.go("+1")},"aria-label":"Next",children:[E.arrowsImgUrl&&S.jsx(gt,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:W.arrowImg}),!E.arrowsImgUrl&&S.jsx(xo,{color:E.color,className:ge(W.arrowIcon,W.arrowImg)})]})})]}),T.closeIconUrl&&(()=>{const b=Dt(T.closeIconAlign,T.closeIconOffset,i),D=`scale(${T.closeIconScale})`,q=b.transform?`${b.transform} ${D}`:D;return S.jsx("button",{className:W.closeButton,style:{...b,transform:q},onClick:K,"aria-label":"Close lightbox",children:S.jsx(gt,{url:T.closeIconUrl,fill:T.closeIconColor??"#000000",hoverFill:T.closeIconHover??"#cccccc"})})})(),x&&x.isActive&&o.imageCaption&&((z=n[s])==null?void 0:z.imageCaption)&&(()=>{const{widthSettings:b,fontSettings:D,letterSpacing:q,textAlign:J,wordSpacing:ne,fontSizeLineHeight:Q,textAppearance:X,color:oe}=o.imageCaption;return S.jsx("div",{className:W.caption,style:{...Dt(x.alignment,x.offset,i),fontFamily:D.fontFamily,fontWeight:D.fontWeight,fontStyle:D.fontStyle,width:b.sizing==="auto"?"max-content":F.scalingValue(b.width,i),letterSpacing:F.scalingValue(q,i),wordSpacing:F.scalingValue(ne,i),textAlign:J,fontSize:F.scalingValue(Q.fontSize,i),lineHeight:F.scalingValue(Q.lineHeight,i),textTransform:X.textTransform??"none",textDecoration:X.textDecoration??"none",fontVariant:X.fontVariant??"normal",color:oe},onClick:ye=>ye.stopPropagation(),children:S.jsx("div",{"data-styles":"imageCaption",className:W.captionTextInner,style:{"--link-color":x.linkColor,"--link-hover-color":x.linkHoverColor},children:S.jsx(ar,{content:n[s].imageCaption})})})})(),I.isActive&&(()=>{const[b,D]=I.position.split("-"),q=m.direction==="horiz"?`${b}-left`:I.position,J=Dt(q,I.offset,i),ne=()=>{if(m.direction==="horiz"){if(D==="left")return"flex-start";if(D==="center")return"center";if(D==="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 S.jsx("div",{ref:R,className:W.thumbsWrapper,onClick:Q=>he(Q),style:{position:i?"absolute":"fixed",...J,...m.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:S.jsx("div",{className:ge(W.thumbsContainer,{[W.thumbsContainerVertical]:m.direction==="vert",[W.thumbsAlignStart]:I.align==="start",[W.thumbsAlignCenter]:I.align==="center",[W.thumbsAlignEnd]:I.align==="end"}),style:{gap:F.scalingValue(I.grid.gap,i),justifyContent:V?"flex-start":ne()},children:n.map((Q,X)=>{const oe=X===s,ye=C[X],pe=I.grid.size*(oe?I.activeState.scale:1),Ve=()=>{if(I.fit!=="fit")return{};if(!ye)return m.direction==="horiz"?{height:F.scalingValue(pe,i)}:{width:F.scalingValue(pe,i)};const ee=ye.width/ye.height;if(m.direction==="horiz"){const ce=pe,$e=ce*ee;return{width:F.scalingValue($e,i),height:F.scalingValue(ce,i)}}else{const ce=pe,$e=ce/ee;return{width:F.scalingValue(ce,i),height:F.scalingValue($e,i)}}};return S.jsx("button",{className:W.thumbItem,style:{...m.direction==="horiz"&&I.fit!=="fit"?{height:F.scalingValue(pe,i)}:{},...m.direction==="vert"&&I.fit!=="fit"?{width:F.scalingValue(pe,i)}:{},...I.fit==="cover"?{width:F.scalingValue(pe,i),height:F.scalingValue(pe,i)}:{},...Ve(),transition:oe?"all 0.25s ease-out":"none",opacity:oe?I.activeState.opacity/100:I.opacity/100,"--thumb-hover":I.activeState.opacity/100},onClick:ee=>{var ce;ee.stopPropagation(),p(X),(ce=f.current)==null||ce.go(X)},onMouseEnter:()=>{var ee;I.triggers==="hov"&&((ee=f.current)==null||ee.go(X))},children:S.jsx("img",{src:Q.image.url,alt:Q.image.name??"",onLoad:ee=>{const ce=ee.currentTarget;ce.naturalWidth&&ce.naturalHeight&&v($e=>({...$e,[X]:{width:ce.naturalWidth,height:ce.naturalHeight}}))},style:{objectFit:I.fit==="cover"?"cover":"contain",...I.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...I.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Q.image.name}-${X}`)})})})})()]})]}),document.getElementById(a))};function xo({color:e,className:t}){return S.jsx("svg",{viewBox:"0 0 10 18",className:t,children:S.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:S.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const yl={element:fl,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function mt(e){const{color:t,...n}=e;return n}function tt(e,t){var n,o,r;return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:F.scalingValue(e.letterSpacing,t),wordSpacing:F.scalingValue(e.wordSpacing,t),fontSize:F.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?F.scalingValue(e.lineHeight,t):void 0,textTransform:(n=e.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=e.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=e.textAppearance)==null?void 0:r.fontVariant,color:e.color}}function Ut(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function vl(e){return`
6
+ */const ma="RichTextRenderer-module__link___BWeZ2",fa={link:ma},lr=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?S.jsx("a",{className:fa.link,href:o.value,target:o.target,children:t(o.children)},r):S.jsx("span",{style:ha(o),children:o.text},r));return S.jsx(S.Fragment,{children:e.map((n,o)=>{const r=n.children;return S.jsx("div",{children:t(r)},o)})})};function ha(e){return{...e.fontFamily&&{fontFamily:e.fontFamily},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const ya="SvgImage-module__svg___q3xE-",va="SvgImage-module__img___VsTm-",ho={svg:ya,img:va},ba=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Sa=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,gt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[a,i]=j.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return j.useEffect(()=>{if(typeof window<"u"&&window.CSS){const l=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(l)}},[]),!ba(e)||!a?S.jsx("img",{src:e,alt:"",className:de(ho.img,o),style:r}):S.jsx("span",{"data-supports-mask":a,className:de(ho.svg,o),style:{"--svg":Sa(e),"--fill":t,"--hover-fill":n,...r??{}}})},xa={"top-left":G.topLeftAlignment,"top-center":G.topCenterAlignment,"top-right":G.topRightAlignment,"middle-left":G.middleLeftAlignment,"middle-center":G.middleCenterAlignment,"middle-right":G.middleRightAlignment,"bottom-left":G.bottomLeftAlignment,"bottom-center":G.bottomCenterAlignment,"bottom-right":G.bottomRightAlignment};function Ca({settings:e,content:t,styles:n,isEditor:o}){const[r,a]=j.useState(null),{widthSettings:i,fontSettings:l,letterSpacing:s,textAlign:p,wordSpacing:c,fontSizeLineHeight:_,textAppearance:v,color:g}=n.imageCaption,[u,d]=j.useState(void 0),[x,f]=j.useState(null),[h,$]=j.useState(0),[M,O]=j.useState(0),{direction:w,transition:y,controls:L,pagination:B,imageCaption:N,triggers:R}=e,V=j.useRef(y.type),{x:P,y:U}=e.controls.offset,H=m=>{r&&r.go(m)};return j.useEffect(()=>{if(!x)return;const m=new ResizeObserver(k=>{if(!r)return;const[E]=k;d({width:Math.round(E.contentRect.width),height:Math.round(E.contentRect.height)})});return m.observe(x),()=>m.unobserve(x)},[x]),j.useEffect(()=>{!r||V.current===y.type||(O(m=>m+1),V.current=y.type)},[y.type]),S.jsx("div",{className:de(G.wrapper,{[G.editor]:o}),ref:f,children:S.jsxs("div",{className:G.sliderInner,style:{width:u?u.width:"100%",height:u?u.height:"100%",backgroundColor:y.backgroundColor&&y.type==="fade in"?y.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&S.jsx("div",{className:de(G.captionBlock),children:S.jsx("div",{className:G.captionTextWrapper,children:t.map((m,k)=>S.jsx("div",{className:de(G.captionText,xa[N.alignment],{[G.withPointerEvents]:k===h&&o,[G.active]:k===h}),style:{fontFamily:l.fontFamily,fontWeight:l.fontWeight,fontStyle:l.fontStyle,width:i.sizing==="auto"?"max-content":I.scalingValue(i.width,o),letterSpacing:I.scalingValue(s,o),wordSpacing:I.scalingValue(c,o),textAlign:p,fontSize:I.scalingValue(_.fontSize,o),lineHeight:I.scalingValue(_.lineHeight,o),textTransform:v.textTransform??"none",textDecoration:v.textDecoration??"none",fontVariant:v.fontVariant??"normal",color:g,transitionDuration:y.duration?`${Math.round(parseInt(y.duration)/2)}ms`:"500ms"},children:S.jsx("div",{"data-styles":"imageCaption",className:G.captionTextInner,style:{"--link-hover-color":N.linkHoverColor,"--link-color":N.linkColor,position:"relative",top:I.scalingValue(N.offset.y,o),left:I.scalingValue(N.offset.x,o)},children:S.jsx(lr,{content:m.imageCaption})})},k))})}),S.jsx(ir,{onMove:m=>{$(m.index)},ref:a,options:{arrows:!1,speed:y.duration?parseInt(y.duration):500,autoplay:R.autoPlay!==null,...R.autoPlay!==null&&{interval:parseInt(R.autoPlay)*1e3},direction:w==="horiz"||y.type==="fade in"?"ltr":"ttb",pagination:!1,drag:R.triggersList.drag,perPage:1,width:u?u.width:"100%",height:u?u.height:"100%",type:y.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((m,k)=>S.jsx(ar,{children:S.jsx("div",{className:G.sliderItem,children:S.jsx("div",{className:G.imgWrapper,children:S.jsx("img",{className:de(G.sliderImage,{[G.contain]:m.image.objectFit==="contain",[G.cover]:m.image.objectFit==="cover"}),src:m.image.url,alt:m.image.name??""})})})},k))},M),L.isActive&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:de(G.arrow,{[G.arrowVertical]:w==="vert",[G.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:S.jsxs("button",{onClick:()=>{H("-1")},className:G.arrowInner,style:{transform:`translate(${I.scalingValue(P,o)}, ${I.scalingValue(U*(w==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${w==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&S.jsx(gt,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:de(G.arrowImg,G.mirror)}),!L.arrowsImgUrl&&S.jsx(yo,{color:L.color,className:de(G.arrowIcon,G.arrowImg,G.mirror)})]})}),S.jsx("div",{className:de(G.arrow,G.nextArrow,{[G.arrowVertical]:w==="vert",[G.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:S.jsxs("button",{className:G.arrowInner,onClick:()=>H("+1"),style:{transform:`translate(${I.scalingValue(P*(w==="horiz"?-1:1),o)}, ${I.scalingValue(U,o)}) scale(${e.controls.scale/100}) rotate(${w==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&S.jsx(gt,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:G.arrowImg}),!L.arrowsImgUrl&&S.jsx(yo,{color:L.color,className:de(G.arrowIcon,G.arrowImg)})]})})]}),R.triggersList.click&&S.jsx("div",{className:G.clickOverlay,onClick:()=>{r&&r.go("+1")}}),B.isActive&&S.jsx("div",{className:de(G.pagination,{[G.paginationInsideBottom]:B.position==="inside-1"&&w==="horiz",[G.paginationInsideTop]:B.position==="inside-2"&&w==="horiz",[G.paginationOutsideBottom]:B.position==="outside-1"&&w==="horiz",[G.paginationOutsideTop]:B.position==="outside-2"&&w==="horiz",[G.paginationInsideLeft]:B.position==="inside-1"&&w==="vert",[G.paginationInsideRight]:B.position==="inside-2"&&w==="vert",[G.paginationOutsideLeft]:B.position==="outside-1"&&w==="vert",[G.paginationOutsideRight]:B.position==="outside-2"&&w==="vert",[G.paginationVertical]:w==="vert"}),children:S.jsx("div",{className:G.paginationInner,style:{backgroundColor:B.colors[2],transform:`scale(${B.scale/100}) translate(${I.scalingValue(B.offset.x,o)}, ${I.scalingValue(B.offset.y,o)}) rotate(${w==="horiz"?"0deg":"90deg"})`},children:t.map((m,k)=>S.jsx("button",{onClick:()=>{r&&r.go(k)},className:de(G.paginationItem),children:S.jsx("div",{className:de(G.dot,{[G.activeDot]:k===h}),style:{backgroundColor:k===h?B.colors[0]:B.colors[1],"--pagination-hover-color":B.hover}})},k))})})]})})}function yo({color:e,className:t}){return S.jsx("svg",{viewBox:"0 0 10 18",className:t,children:S.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:S.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const $a={element:Ca,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"outside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},_a="ImageRevealSlider-module__imageRevealSlider___UE5Ob",wa="ImageRevealSlider-module__image___Qjt-e",Ta="ImageRevealSlider-module__link___N-iLG",Ea="ImageRevealSlider-module__cursor___2U03d",lt={imageRevealSlider:_a,image:wa,link:Ta,cursor:Ea};function vo(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const a=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*a,l=a/2,s=i/2;if(e>=o.x-l&&e<=o.x+l&&t>=o.y-s&&t<=o.y+s)return!0}return!1}function xn(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function La(e,t,n,o){let r,a;if(t==="custom"){r=n;const i=await xn(e);a=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await xn(e);a=i.height/i.width*r}else{const i=await xn(e);r=i.width,a=i.height}return{width:r,height:a,finalWidth:`${r}px`}}function Aa({settings:e,content:t,isEditor:n}){const[o,r]=j.useState(null),[a,i]=j.useState([]),[l,s]=j.useState(0),p=j.useRef(0),[c,_]=j.useState({x:0,y:0}),[v,g]=j.useState(1),[u,d]=j.useState("none"),x=j.useRef({x:0,y:0}),[f,h]=j.useState(!1),{sizeType:$,imageWidth:M,randomRangeImageWidth:O}=e.imageSize,{revealPosition:w,visible:y}=e.position,{cursorType:L,target:B,defaultCursorScale:N,defaultCursor:R,hoverCursorScale:V,hoverCursor:P}=e.cursor;j.useEffect(()=>{if(!o)return;const m=(T,C)=>{const F=o.getBoundingClientRect(),Y=T-F.left,re=C-F.top;if(_({x:Y,y:re}),L==="system"){d("none"),g(1);return}const te=Y,ie=re,A=document.elementFromPoint(F.left+te,F.top+ie);if(A&&A.closest("a")){d("none"),g(1);return}const K=vo(te,ie,a)||B==="area"?{img:P??"none",scale:V}:{img:R??"none",scale:N};d(K.img),g(K.scale)},k=T=>{T.stopPropagation(),x.current={x:T.clientX,y:T.clientY},m(T.clientX,T.clientY)},E=()=>{f&&m(x.current.x,x.current.y)};return o.addEventListener("mousemove",k),window.addEventListener("scroll",E,!0),()=>{o.removeEventListener("mousemove",k),window.removeEventListener("scroll",E,!0)}},[o,f,c,L,B,P,R,V,N,a]),j.useEffect(()=>{f||(d("none"),g(0))},[f]);const U=async(m,k,E,T={})=>{const{width:C,height:F,finalWidth:Y}=await La(m.image.url,$,M,O);let re=0,te=0;w==="same"?(re=k/2,te=E/2):(re=T.x??Math.random()*k,te=T.y??Math.random()*E);const ie=Math.min(Math.max(re,C/2),k-C/2),A=Math.min(Math.max(te,F/2),E-F/2);return{id:p.current++,url:m.image.url,link:m.link,name:m.image.name,x:ie,y:A,width:Y}};j.useEffect(()=>{if(!o||t.length===0)return;const m=o.getBoundingClientRect(),k=m.width,E=m.height,T=[];(async()=>{const F=t[0],Y=await U(F,k,E);T.push(Y),i(T),s(1)})()},[$,M,O,w,o]),j.useEffect(()=>{y==="last One"&&i(m=>m.length>0?[m[m.length-1]]:[])},[y]);const H=async m=>{if(!o)return;const k=o.getBoundingClientRect(),E=m.clientX-k.left,T=m.clientY-k.top;if(B==="image"&&!vo(E,T,a))return;let C=0,F=0;w==="on Click"?(C=E,F=T):w==="same"?(C=k.width/2,F=k.height/2):(C=Math.random()*k.width,F=Math.random()*k.height);const Y=t[l],re=await U(Y,k.width,k.height,{x:C,y:F});i(te=>y==="all"?[...te,re]:[re]),s(te=>te>=t.length-1?0:te+1)};return S.jsxs("div",{ref:r,onClick:H,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),className:lt.imageRevealSlider,style:{cursor:u==="none"?"default":"none"},children:[a.map(m=>S.jsx("div",{className:lt.wrapper,style:{top:`${m.y}px`,left:`${m.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:m.width??"auto",height:"auto",cursor:u==="none"?"default":"none"},children:B==="area"&&m.link?S.jsx("a",{href:m.link,target:"_blank",className:lt.link,children:S.jsx("img",{src:m.url,alt:m.name,className:lt.image},m.id)}):S.jsx("img",{src:m.url,alt:m.name,className:lt.image},m.id)},m.id)),f&&S.jsx("div",{className:lt.cursor,style:{left:`${c.x}px`,top:`${c.y}px`,transform:`translate(-50%, -50%) scale(${v})`,backgroundImage:`url('${u}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Ia={element:Aa,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{width:"100%",height:"100%"},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},ka="LightBox-module__hidden___9s-9x",Fa="LightBox-module__heroImage___sTxNF",Ra="LightBox-module__background___rm9ml",Ba="LightBox-module__editor___4ACaY",Va="LightBox-module__contentStyle___Bgnsq",Pa="LightBox-module__imageStyle___tLIlB",Oa="LightBox-module__imgWrapper___LuFUp",Wa="LightBox-module__contain___8-yaS",Na="LightBox-module__cover___hNvOG",za="LightBox-module__caption___b6L2I",ja="LightBox-module__captionTextInner___rCGNH",Ma="LightBox-module__lightboxSplide___XFuWC",Ha="LightBox-module__arrow___iz38X",Da="LightBox-module__arrowVertical___Zfz81",Ua="LightBox-module__nextArrow___zkAQN",Ga="LightBox-module__arrowInner___p48sW",Ya="LightBox-module__arrowIcon___3VaFf",qa="LightBox-module__arrowImg___pNV88",Xa="LightBox-module__mirror___pjeXc",Ka="LightBox-module__thumbsWrapper___GB-nU",Ja="LightBox-module__thumbsContainerVertical___wttk5",Za="LightBox-module__thumbsContainer___osSma",Qa="LightBox-module__thumbsAlignStart___MO6tY",el="LightBox-module__thumbsAlignCenter___Q4sUx",tl="LightBox-module__thumbsAlignEnd___p4y9R",nl="LightBox-module__thumbItem___HvnF3",ol="LightBox-module__closeButton___g2khP",rl="LightBox-module__fadeIn___0m5GW",il="LightBox-module__slideInLeft___gPYwC",al="LightBox-module__slideInRight___S-pPp",ll="LightBox-module__slideInTop___DFdAj",sl="LightBox-module__slideInBottom___m27kZ",cl="LightBox-module__fadeOut___55qBR",ul="LightBox-module__slideOutLeft___NvU7P",pl="LightBox-module__slideOutRight___SK7eC",dl="LightBox-module__slideOutTop___Vgg0z",gl="LightBox-module__slideOutBottom___nJ0Ef",ml="LightBox-module__scaleSlide___vZriG",W={hidden:ka,heroImage:Fa,background:Ra,editor:Ba,contentStyle:Va,imageStyle:Pa,imgWrapper:Oa,contain:Wa,cover:Na,caption:za,captionTextInner:ja,lightboxSplide:Ma,arrow:Ha,arrowVertical:Da,nextArrow:Ua,arrowInner:Ga,arrowIcon:Ya,arrowImg:qa,mirror:Xa,thumbsWrapper:Ka,thumbsContainerVertical:Ja,thumbsContainer:Za,thumbsAlignStart:Qa,thumbsAlignCenter:el,thumbsAlignEnd:tl,thumbItem:nl,closeButton:ol,fadeIn:rl,slideInLeft:il,slideInRight:al,slideInTop:ll,slideInBottom:sl,fadeOut:cl,slideOutLeft:ul,slideOutRight:pl,slideOutTop:dl,slideOutBottom:gl,scaleSlide:ml},Dt=(e,t,n)=>{const o={},[r,a]=e.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),a==="left"?(o.left="0",o.right="auto"):a==="center"?(o.left="50%",o.right="auto"):a==="right"&&(o.left="auto",o.right="0"),r==="middle"&&a==="center"?o.transform=`translate(calc(-50% + ${I.scalingValue(t.x,n)}), calc(-50% + ${I.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${I.scalingValue(t.x,n)}, calc(-50% + ${I.scalingValue(t.y,n)}))`:a==="center"?o.transform=`translate(calc(-50% + ${I.scalingValue(t.x,n)}), ${I.scalingValue(t.y,n)})`:o.transform=`translate(${I.scalingValue(t.x,n)}, ${I.scalingValue(t.y,n)})`,o};function sr(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 bo(e){const t=e.getBoundingClientRect(),n=sr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,i=e.naturalHeight,l=o/r,s=a/i;let p,c;s>l?(p=o,c=o/s):(c=r,p=r*s);const _=t.left+n.left,v=t.top+n.top,g=(o-p)/2+_,u=(r-c)/2+v;return{x:g,y:u,width:p,height:c}}function So(e){const t=e.getBoundingClientRect(),n=sr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function xo(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const o=t[1].split(",").map(r=>parseFloat(r.trim()));return o.length===4?o[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const o=n[1].substring(6,8);return parseInt(o,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function fl(e,t){const n=(()=>{if(e==="fade in")return W.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return W.slideInLeft;case"right":return W.slideInRight;case"top":return W.slideInTop;case"bottom":return W.slideInBottom;default:return W.slideInRight}return W.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return W.fadeIn;if(e==="slide in")switch(t){case"left":return W.slideInLeft;case"right":return W.slideInRight;case"top":return W.slideInTop;case"bottom":return W.slideInBottom;default:return W.slideInRight}return W.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return W.fadeOut;if(e==="slide in")switch(t){case"left":return W.slideOutLeft;case"right":return W.slideOutRight;case"top":return W.slideOutTop;case"bottom":return W.slideOutBottom;default:return W.slideOutRight}return W.fadeOut})(),a=(()=>{if(e==="fade in")return W.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return W.slideOutLeft;case"right":return W.slideOutRight;case"top":return W.slideOutTop;case"bottom":return W.slideOutBottom;default:return W.slideOutRight}return W.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:a}}const hl=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:a})=>{const[i,l]=j.useState(!1),{url:s}=e.thumbnailBlock.cover;return j.useEffect(()=>{r==="close"&&l(!1),r==="open"&&l(!0)},[r]),S.jsxs(S.Fragment,{children:[S.jsx("img",{src:s,alt:"Cover",className:W.heroImage,onClick:()=>l(!0)}),S.jsx(yl,{isOpen:i,onClose:()=>l(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:a})]})},yl=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:a,isEditor:i,metadata:l})=>{var z;const[s,p]=j.useState(0),[c,_]=j.useState(0),[v,g]=j.useState(!1),[u,d]=j.useState(!1),[x,f]=j.useState({}),h=j.useRef(null),$=j.useRef(null),M=j.useRef(null),O=j.useRef(!1),w=j.useRef(null),y=j.useRef(null),L=j.useRef(null),B=j.useRef(null),N=j.useRef(!1),R=j.useRef(null),[V,P]=j.useState(!1),{appear:U,triggers:H,slider:m,thumbnail:k,controls:E,area:T,caption:C,layout:F}=r.lightboxBlock,{appearClass:Y,backdropAppearClass:re,backdropDisappearClass:te,disappearClass:ie}=fl(U.type,U.direction),A=(l==null?void 0:l.itemId)??null;j.useEffect(()=>{const b=()=>{setTimeout(()=>{var q,J;(J=(q=h.current)==null?void 0:q.splide)==null||J.refresh()},16)},D=()=>{_(q=>q+1)};return window.addEventListener("ArticleEditor.Layout:change",b),window.addEventListener("ArticleEditor.ComponentContent:change",D),()=>{window.removeEventListener("ArticleEditor.Layout:change",b),window.removeEventListener("ArticleEditor.ComponentContent:change",D)}},[]),j.useEffect(()=>{if(!e||!k.isActive){P(!1);return}const b=R.current;if(!b)return;const D=()=>{m.direction==="horiz"?P(b.scrollWidth>b.clientWidth):P(b.scrollHeight>b.clientHeight)};D();const q=new ResizeObserver(D);return q.observe(b),()=>q.disconnect()},[e,k.isActive,n.length,x,m.direction]);const K=j.useCallback(()=>{const b=window.matchMedia("(max-width: 768px)").matches,D=xo(T.color);b&&!i&&D>.9&&(document.body.style.backgroundColor=""),g(!0),O.current=!0;const q=J=>{J.target===w.current&&J.animationName&&(w.current&&y.current&&w.current.removeEventListener("animationend",y.current),y.current=null,O.current&&(O.current=!1,t()),g(!1))};w.current&&(y.current=q,w.current.addEventListener("animationend",q))},[t,T.color,i]),me=(b,D,q)=>{var J,ne;if(b){if(H.type==="click"&&H.switch==="image")H.repeat==="close"&&s===n.length-1?K():(J=h.current)==null||J.go("+1");else if(H.type==="click"&&H.switch==="50/50"){const Q=b.getBoundingClientRect(),X=D-Q.left,oe=q-Q.top,ye=Q.width,ae=Q.height;let pe;m.direction==="horiz"?pe=X<ye/2?"-1":"+1":pe=oe<ae/2?"-1":"+1",(ne=h.current)==null||ne.go(pe)}}},se=b=>{if(N.current){N.current=!1;return}const D=n[s],q=(D==null?void 0:D.image.objectFit)==="cover";let J,ne;if("changedTouches"in b&&b.changedTouches.length>0)J=b.changedTouches[0].clientX,ne=b.changedTouches[0].clientY;else if("clientX"in b)J=b.clientX,ne=b.clientY;else return;let Q;if(q&&M.current){const X=So(M.current);Q=J>=X.left&&J<=X.right&&ne>=X.top&&ne<=X.bottom}else{const X=M.current?bo(M.current):null;if(!X){b.target===b.currentTarget&&K();return}Q=J>=X.x&&J<=X.x+X.width&&ne>=X.y&&ne<=X.y+X.height}Q?me(M.current,J,ne):K()},fe=b=>{const D=b.target;(D.classList.contains(W.thumbsWrapper)||D.classList.contains(W.thumbsContainer))&&se(b)};j.useEffect(()=>{if(!e)return;const b=D=>{var q,J;if(D.key==="Escape"){K();return}if(D.key==="ArrowRight"){p(ne=>(ne+1)%Math.max(n.length,1)),(q=h.current)==null||q.go("+1");return}D.key==="ArrowLeft"&&(p(ne=>(ne-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=h.current)==null||J.go("-1"))};return window.addEventListener("keydown",b),()=>{window.removeEventListener("keydown",b)}},[e,K,n.length]),j.useEffect(()=>{if(e){if(p(0),_(D=>D+1),O.current=!1,g(!1),d(!1),f({}),!A)return;const b=new CustomEvent("page-overlay",{detail:{itemId:A}});window.dispatchEvent(b)}return()=>{w.current&&y.current&&(w.current.removeEventListener("animationend",y.current),y.current=null),d(!1)}},[e,A]),j.useEffect(()=>{$.current!==null&&$.current!==m.type&&_(b=>b+1),$.current=m.type},[m.type]),j.useEffect(()=>{if(!e)return;const b=document.body.style.overflow,D=window.matchMedia("(max-width: 768px)").matches,q=xo(T.color);document.body.style.overflow="hidden",d(!1);const J=Q=>{Q.target===w.current&&!O.current&&Q.animationName&&(D&&!i&&q>.9&&(document.body.style.backgroundColor=T.color),d(!0),w.current&&L.current&&w.current.removeEventListener("animationend",L.current),L.current=null)};w.current&&(L.current=J,w.current.addEventListener("animationend",J));const ne=Q=>{const X=Q.target;X&&(X.closest(`.${W.thumbsWrapper}`)||X.closest(`.${W.thumbsContainer}`))||m.type!=="slide"&&Q.preventDefault()};return document.addEventListener("touchmove",ne,{passive:!1}),()=>{document.body.style.overflow=b,document.removeEventListener("touchmove",ne),w.current&&L.current&&(w.current.removeEventListener("animationend",L.current),L.current=null),d(!1)}},[e,i,T.color,m.type]),j.useEffect(()=>{if(!e)return;const b=D=>{var J,ne;if(O.current){D.stopPropagation();return}if(N.current){N.current=!1;return}const q=D.target;if(!(q&&(q.closest(`.${W.thumbsContainer}`)||q.closest(`.${W.thumbItem}`)))){if(m.type==="slide"&&H.type==="drag"&&((ne=(J=h.current)==null?void 0:J.splide)!=null&&ne.root)){const Q=h.current.splide.root;if(q&&(Q.contains(q)||Q===q))return}if(D.touches.length===0&&D.changedTouches.length>0){const Q=n[s],X=(Q==null?void 0:Q.image.objectFit)==="cover",oe=D.changedTouches[0];let ye;if(X&&M.current){const ae=So(M.current);ye=oe.clientX>=ae.left&&oe.clientX<=ae.right&&oe.clientY>=ae.top&&oe.clientY<=ae.bottom}else{const ae=M.current?bo(M.current):null;if(!ae)return;ye=oe.clientX>=ae.x&&oe.clientX<=ae.x+ae.width&&oe.clientY>=ae.y&&oe.clientY<=ae.y+ae.height}if(!ye){D.stopPropagation(),O.current=!0;const ae=pe=>{pe.stopPropagation(),pe.preventDefault(),document.removeEventListener("click",ae,!0)};document.addEventListener("click",ae,!0),K()}}}};return document.addEventListener("touchend",b,{passive:!0}),()=>{document.removeEventListener("touchend",b)}},[e,K,s,n]);const Se=(m.type==="scale"||m.type==="fade")&&m.direction==="vert"&&H.type==="drag";j.useEffect(()=>{var pe,Ve;if(!e||!Se||!((Ve=(pe=h.current)==null?void 0:pe.splide)!=null&&Ve.root))return;const b=h.current.splide.root,D=30,q=(ee,ce)=>{if(B.current){const $e=Math.abs(ee-B.current.x),Ge=Math.abs(ce-B.current.y);($e>0||Ge>0)&&(N.current=!0)}},J=ee=>{B.current&&(ee.preventDefault(),q(ee.clientX,ee.clientY))},ne=ee=>{B.current&&ee.touches.length>0&&(ee.preventDefault(),q(ee.touches[0].clientX,ee.touches[0].clientY))},Q=(ee,ce)=>{if(!B.current||!h.current){B.current=null;return}const $e=Math.abs(ee-B.current.x),Ge=Math.abs(ce-B.current.y);Ge>D&&Ge>$e&&h.current.go(ce<B.current.y?"+1":"-1"),B.current=null},X=ee=>{B.current&&Q(ee.clientX,ee.clientY),document.removeEventListener("pointerup",X),document.removeEventListener("pointercancel",X),document.removeEventListener("pointermove",J)},oe=ee=>{if(B.current){if(ee.changedTouches.length>0){const ce=ee.changedTouches[0];Q(ce.clientX,ce.clientY)}document.removeEventListener("touchend",oe),document.removeEventListener("touchcancel",oe),document.removeEventListener("touchmove",ne)}},ye=ee=>{B.current={x:ee.clientX,y:ee.clientY},N.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",X),document.addEventListener("pointercancel",X)},ae=ee=>{ee.touches.length>0&&(B.current={x:ee.touches[0].clientX,y:ee.touches[0].clientY},N.current=!1,document.addEventListener("touchmove",ne,{passive:!1}),document.addEventListener("touchend",oe),document.addEventListener("touchcancel",oe))};return b.addEventListener("pointerdown",ye),b.addEventListener("touchstart",ae),()=>{b.removeEventListener("pointerdown",ye),b.removeEventListener("touchstart",ae),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",X),document.removeEventListener("pointercancel",X),document.removeEventListener("touchmove",ne),document.removeEventListener("touchend",oe),document.removeEventListener("touchcancel",oe),B.current=null,N.current=!1}},[e,Se,c]);const Ue={backgroundColor:T.color,backdropFilter:`blur(${T.blur}px)`,animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:mr.createPortal(S.jsxs(S.Fragment,{children:[S.jsx("div",{ref:i?null:w,className:de(W.background,v?te:re,{[W.editor]:i},{[W.hidden]:!e}),style:{...Ue,...u&&!i&&!v?{position:"absolute"}:{}}}),S.jsxs("div",{ref:i?w:null,className:de(W.contentStyle,v?ie:Y,{[W.editor]:i},{[W.hidden]:!e}),style:{animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[S.jsx(ir,{onMove:b=>p(b.index),ref:h,className:W.lightboxSplide,options:{arrows:!1,speed:m.duration?parseInt(m.duration):500,direction:m.direction==="horiz"||m.type==="fade"||m.type==="scale"?"ltr":"ttb",pagination:!1,drag:H.type==="drag"&&!Se,perPage:1,width:"100%",height:"100%",type:m.type==="fade"||m.type==="scale"?"fade":"loop",padding:0,rewind:H.repeat!=="close",start:0},style:{"--splide-speed":m.duration},children:n.map((b,D)=>{const q=Dt(F.position,F.offset,i),J=`${I.scalingValue(F.padding.top,i)} ${I.scalingValue(F.padding.right,i)} ${I.scalingValue(F.padding.bottom,i)} ${I.scalingValue(F.padding.left,i)}`,ne=m.type==="scale"?(()=>{const{transform:Q,...X}=q;return{...X,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":Q||"none"}})():{...q,position:"absolute",padding:J,boxSizing:"border-box"};return S.jsx(ar,{children:S.jsx("div",{className:W.imgWrapper,onClick:se,children:S.jsx("img",{ref:D===s?M:null,className:de(W.imageStyle,{[W.contain]:b.image.objectFit==="contain",[W.cover]:b.image.objectFit==="cover",[W.scaleSlide]:m.type==="scale"}),src:b.image.url,alt:b.image.name??"",style:{...ne,pointerEvents:b.image.objectFit==="contain"?"none":"auto"}})})},D)})},c),E.isActive&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:de(W.arrow,{[W.arrowVertical]:m.direction==="vert"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:S.jsxs("button",{className:W.arrowInner,style:{transform:`translate(${I.scalingValue(E.offset.x,i)}, ${I.scalingValue(E.offset.y*(m.direction==="horiz"?1:-1),i)}) scale(${E.scale}) rotate(${m.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var b;return(b=h.current)==null?void 0:b.go("-1")},"aria-label":"Previous",children:[E.arrowsImgUrl&&S.jsx(gt,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:de(W.arrowImg,W.mirror)}),!E.arrowsImgUrl&&S.jsx(Co,{color:E.color,className:de(W.arrowIcon,W.arrowImg,W.mirror)})]})}),S.jsx("div",{className:de(W.arrow,W.nextArrow,{[W.arrowVertical]:m.direction==="vert"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:S.jsxs("button",{className:W.arrowInner,style:{transform:`translate(${I.scalingValue(E.offset.x*(m.direction==="horiz"?-1:1),i)}, ${I.scalingValue(E.offset.y,i)}) scale(${E.scale}) rotate(${m.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var b;return(b=h.current)==null?void 0:b.go("+1")},"aria-label":"Next",children:[E.arrowsImgUrl&&S.jsx(gt,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:W.arrowImg}),!E.arrowsImgUrl&&S.jsx(Co,{color:E.color,className:de(W.arrowIcon,W.arrowImg)})]})})]}),T.closeIconUrl&&(()=>{const b=Dt(T.closeIconAlign,T.closeIconOffset,i),D=`scale(${T.closeIconScale})`,q=b.transform?`${b.transform} ${D}`:D;return S.jsx("button",{className:W.closeButton,style:{...b,transform:q},onClick:K,"aria-label":"Close lightbox",children:S.jsx(gt,{url:T.closeIconUrl,fill:T.closeIconColor??"#000000",hoverFill:T.closeIconHover??"#cccccc"})})})(),C&&C.isActive&&o.imageCaption&&((z=n[s])==null?void 0:z.imageCaption)&&(()=>{const{widthSettings:b,fontSettings:D,letterSpacing:q,textAlign:J,wordSpacing:ne,fontSizeLineHeight:Q,textAppearance:X,color:oe}=o.imageCaption;return S.jsx("div",{className:W.caption,style:{...Dt(C.alignment,C.offset,i),fontFamily:D.fontFamily,fontWeight:D.fontWeight,fontStyle:D.fontStyle,width:b.sizing==="auto"?"max-content":I.scalingValue(b.width,i),letterSpacing:I.scalingValue(q,i),wordSpacing:I.scalingValue(ne,i),textAlign:J,fontSize:I.scalingValue(Q.fontSize,i),lineHeight:I.scalingValue(Q.lineHeight,i),textTransform:X.textTransform??"none",textDecoration:X.textDecoration??"none",fontVariant:X.fontVariant??"normal",color:oe},onClick:ye=>ye.stopPropagation(),children:S.jsx("div",{"data-styles":"imageCaption",className:W.captionTextInner,style:{"--link-color":C.linkColor,"--link-hover-color":C.linkHoverColor},children:S.jsx(lr,{content:n[s].imageCaption})})})})(),k.isActive&&(()=>{const[b,D]=k.position.split("-"),q=m.direction==="horiz"?`${b}-left`:k.position,J=Dt(q,k.offset,i),ne=()=>{if(m.direction==="horiz"){if(D==="left")return"flex-start";if(D==="center")return"center";if(D==="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 S.jsx("div",{ref:R,className:W.thumbsWrapper,onClick:Q=>fe(Q),style:{position:i?"absolute":"fixed",...J,...m.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:S.jsx("div",{className:de(W.thumbsContainer,{[W.thumbsContainerVertical]:m.direction==="vert",[W.thumbsAlignStart]:k.align==="start",[W.thumbsAlignCenter]:k.align==="center",[W.thumbsAlignEnd]:k.align==="end"}),style:{gap:I.scalingValue(k.grid.gap,i),justifyContent:V?"flex-start":ne()},children:n.map((Q,X)=>{const oe=X===s,ye=x[X],pe=k.grid.size*(oe?k.activeState.scale:1),Ve=()=>{if(k.fit!=="fit")return{};if(!ye)return m.direction==="horiz"?{height:I.scalingValue(pe,i)}:{width:I.scalingValue(pe,i)};const ee=ye.width/ye.height;if(m.direction==="horiz"){const ce=pe,$e=ce*ee;return{width:I.scalingValue($e,i),height:I.scalingValue(ce,i)}}else{const ce=pe,$e=ce/ee;return{width:I.scalingValue(ce,i),height:I.scalingValue($e,i)}}};return S.jsx("button",{className:W.thumbItem,style:{...m.direction==="horiz"&&k.fit!=="fit"?{height:I.scalingValue(pe,i)}:{},...m.direction==="vert"&&k.fit!=="fit"?{width:I.scalingValue(pe,i)}:{},...k.fit==="cover"?{width:I.scalingValue(pe,i),height:I.scalingValue(pe,i)}:{},...Ve(),transition:oe?"all 0.25s ease-out":"none",opacity:oe?k.activeState.opacity/100:k.opacity/100,"--thumb-hover":k.activeState.opacity/100},onClick:ee=>{var ce;ee.stopPropagation(),p(X),(ce=h.current)==null||ce.go(X)},onMouseEnter:()=>{var ee;k.triggers==="hov"&&((ee=h.current)==null||ee.go(X))},children:S.jsx("img",{src:Q.image.url,alt:Q.image.name??"",onLoad:ee=>{const ce=ee.currentTarget;ce.naturalWidth&&ce.naturalHeight&&f($e=>({...$e,[X]:{width:ce.naturalWidth,height:ce.naturalHeight}}))},style:{objectFit:k.fit==="cover"?"cover":"contain",...k.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...k.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Q.image.name}-${X}`)})})})})()]})]}),document.getElementById(a))};function Co({color:e,className:t}){return S.jsx("svg",{viewBox:"0 0 10 18",className:t,children:S.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:S.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const vl={element:hl,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function mt(e){const{color:t,...n}=e;return n}function tt(e,t){var n,o,r;return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:I.scalingValue(e.letterSpacing,t),wordSpacing:I.scalingValue(e.wordSpacing,t),fontSize:I.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?I.scalingValue(e.lineHeight,t):void 0,textTransform:(n=e.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=e.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=e.textAppearance)==null?void 0:r.fontVariant,color:e.color}}function Ut(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function bl(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
@@ -139,7 +139,7 @@
139
139
  position: relative;
140
140
  height: auto;
141
141
  }
142
- `}function bl({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=F.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:l=[],buttonLabel:s,gap:p,fieldsGap:c,buttonCorners:_,buttonStroke:y,buttonPadding:g,isButtonFullWidth:u,inputCorners:d,inputStroke:C,inputPadding:v,inputColor:f,inputTextColor:$,inputBorderColor:M,placeholderColor:O,buttonColor:w,buttonTextColor:h,buttonBorderColor:L,labelTextColor:P,successColor:N,errorColor:R,fontFamily:V,inputFontSettings:B,inputFontSize:U,inputLineHeight:H,inputLetterSpacing:m,inputWordSpacing:I,inputTextAppearance:E,buttonFontSettings:T,buttonFontSize:x,buttonLineHeight:k,buttonLetterSpacing:Y,buttonWordSpacing:re,buttonTextAppearance:te,labelFontSettings:ie,labelFontSize:A,labelLineHeight:K,labelLetterSpacing:fe,labelWordSpacing:se,labelTextAppearance:he,statusFontSettings:be,statusFontSize:Ge,statusLineHeight:z,statusLetterSpacing:b,statusWordSpacing:D,statusTextAppearance:q,successMessage:J,errorMessage:ne,stateOverrides:Q}=e,X=a==="B",oe=l.slice(0,Math.min(i,l.length)),ye={fontSettings:{fontFamily:V,fontWeight:(B==null?void 0:B.fontWeight)??400,fontStyle:(B==null?void 0:B.fontStyle)??"normal"},fontSize:U??.01,lineHeight:H,letterSpacing:m??0,wordSpacing:I??0,textAppearance:E,color:$},ae=mt(tt(ye,t)),pe=F.scalingValue(C??0,t),Ve={...ae,borderStyle:"solid",borderRadius:a==="C"?0:F.scalingValue(d??0,t),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:pe,borderLeftWidth:0}:{borderWidth:pe},paddingTop:F.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:F.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:F.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:F.scalingValue((v==null?void 0:v.left)??0,t)},ee={fontSettings:{fontFamily:V,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:x??.01,lineHeight:k,letterSpacing:Y??0,wordSpacing:re??0,textAppearance:te,color:h},ce=mt(tt(ee,t)),$e=F.scalingValue(y??0,t),Ye={fontSettings:{fontFamily:V,fontWeight:(ie==null?void 0:ie.fontWeight)??400,fontStyle:(ie==null?void 0:ie.fontStyle)??"normal"},fontSize:A??.01,lineHeight:K,letterSpacing:fe??0,wordSpacing:se??0,textAppearance:he,color:P},xt=tt(Ye,t),fn={fontSettings:{fontFamily:V,fontWeight:(be==null?void 0:be.fontWeight)??400,fontStyle:(be==null?void 0:be.fontStyle)??"normal"},fontSize:Ge??.01,lineHeight:z,letterSpacing:b??0,wordSpacing:D??0,textAppearance:q,color:N},de=mt(tt(fn,t)),Be=F.buildColorVars(r,{inputColor:f,inputTextColor:$,inputBorderColor:M,placeholderColor:O!=null&&O.trim()?O:"#cccccc",buttonColor:w,buttonTextColor:h,buttonBorderColor:L,labelTextColor:P,successColor:N,errorColor:R},Sl,xl,Q),[_e,xe]=j.useState(()=>Object.fromEntries(oe.map(le=>[le.name,""]))),[Oe,Ct]=j.useState("idle"),[sr,jt]=j.useState(null),hn=o==="success"?"success":o==="error"?"error":Oe,cr=o==="error"?ne:sr,Mt=o==="filled",$t=j.useMemo(()=>{if(!Mt)return _e;let le=null;for(const We of oe)(_e[We.name]??"").trim().length>0||(le=le??{..._e},le[We.name]="Filled");return le??_e},[_e,Mt,oe]),ur=hn==="error"?F.getFormFieldValidationError(oe,$t):null,pr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),Zn=n==null?void 0:n.submitUrl,Qn=(le,We)=>{xe(Ne=>({...Ne,[le]:We}))},dr=async le=>{le.preventDefault();const We=Object.fromEntries(oe.map(Le=>{var at;return[Le.name,((at=_e[Le.name])==null?void 0:at.trim())??""]}).filter(([,Le])=>Le));if(!Zn){Ct("error"),jt("No integrations were found for this form.");return}if(Object.keys(We).length===0)return;const Ne=F.getFormFieldValidationError(oe,_e);if(Ne){Ct("error"),jt(Ne);return}Ct("submitting"),jt(null);try{const Le=await fetch(Zn,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(We)});if(!Le.ok){const at=await Le.text();throw new Error(at||`Request failed: ${Le.status}`)}Ct("success"),xe(Object.fromEntries(oe.map(at=>[at.name,""])))}catch(Le){Ct("error"),jt(Le instanceof Error?Le.message:"Something went wrong")}};return S.jsxs("div",{className:`${r}-wrapper ${r}-type-${a} ${pr}`.trim(),style:Be,children:[S.jsx("style",{dangerouslySetInnerHTML:{__html:vl(r)}}),S.jsxs("form",{onSubmit:dr,className:`${r}-form`,style:{gap:F.scalingValue(p??0,t)},children:[S.jsx("div",{className:`${r}-fields`,style:{gap:F.scalingValue(c??0,t)},children:oe.map((le,We)=>S.jsxs("div",{className:`${r}-field-group${X?` ${r}-labeled`:""}`,children:[X&&S.jsx("span",{className:`${r}-field-label`,style:xt?{...xt,lineHeight:xt.fontSize}:void 0,children:le.label||le.name}),le.type==="textarea"?S.jsx("textarea",{name:le.name,autoComplete:"off",value:$t[le.name]??"",onChange:Ne=>Qn(le.name,Ne.target.value),placeholder:le.placeholder,className:`${r}-input`,style:Ve,rows:1,"data-filled":Mt||($t[le.name]??"").trim().length>0,"data-field-type":"textarea"}):S.jsx("input",{type:le.type==="phone"?"tel":le.type==="email"?"email":"text",name:le.name,autoComplete:"off",value:$t[le.name]??"",onChange:Ne=>Qn(le.name,Ne.target.value),placeholder:le.placeholder,required:le.isRequired??le.type==="email",className:`${r}-input`,style:Ve,"data-filled":Mt||($t[le.name]??"").trim().length>0})]},We))}),S.jsx("div",{className:`${r}-overlay-anchor`,children:S.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:F.scalingValue(_??0,t),borderWidth:$e,paddingTop:F.scalingValue((g==null?void 0:g.top)??0,t),paddingRight:F.scalingValue((g==null?void 0:g.right)??0,t),paddingBottom:F.scalingValue((g==null?void 0:g.bottom)??0,t),paddingLeft:F.scalingValue((g==null?void 0:g.left)??0,t),...ce,...u?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:S.jsx("span",{className:`${r}-overlay-anchor`,style:u?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Oe==="submitting"?"...":s})})})]}),hn==="success"&&S.jsx("p",{className:`${r}-success`,style:{...de},children:J}),hn==="error"&&S.jsx("p",{className:`${r}-error`,style:{...de},role:"alert",children:ur??cr??ne})]})}const Sl={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},xl=["hover","focus","filled","success","error"],Cl=`import React, { useMemo, useState } from 'react';
142
+ `}function Sl({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=I.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:l=[],buttonLabel:s,gap:p,fieldsGap:c,buttonCorners:_,buttonStroke:v,buttonPadding:g,isButtonFullWidth:u,inputCorners:d,inputStroke:x,inputPadding:f,inputColor:h,inputTextColor:$,inputBorderColor:M,placeholderColor:O,buttonColor:w,buttonTextColor:y,buttonBorderColor:L,labelTextColor:B,successColor:N,errorColor:R,fontFamily:V,inputFontSettings:P,inputFontSize:U,inputLineHeight:H,inputLetterSpacing:m,inputWordSpacing:k,inputTextAppearance:E,buttonFontSettings:T,buttonFontSize:C,buttonLineHeight:F,buttonLetterSpacing:Y,buttonWordSpacing:re,buttonTextAppearance:te,labelFontSettings:ie,labelFontSize:A,labelLineHeight:K,labelLetterSpacing:me,labelWordSpacing:se,labelTextAppearance:fe,statusFontSettings:Se,statusFontSize:Ue,statusLineHeight:z,statusLetterSpacing:b,statusWordSpacing:D,statusTextAppearance:q,successMessage:J,errorMessage:ne,stateOverrides:Q}=e,X=a==="B",oe=l.slice(0,Math.min(i,l.length)),ye={fontSettings:{fontFamily:V,fontWeight:(P==null?void 0:P.fontWeight)??400,fontStyle:(P==null?void 0:P.fontStyle)??"normal"},fontSize:U??.01,lineHeight:H,letterSpacing:m??0,wordSpacing:k??0,textAppearance:E,color:$},ae=mt(tt(ye,t)),pe=I.scalingValue(x??0,t),Ve=I.scalingValue((H??U??.01)+((f==null?void 0:f.top)??0)+((f==null?void 0:f.bottom)??0)+(a==="C"?x??0:(x??0)*2),t),ee={...ae,borderStyle:"solid",borderRadius:a==="C"?0:I.scalingValue(d??0,t),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:pe,borderLeftWidth:0}:{borderWidth:pe},paddingTop:I.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:I.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:I.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:I.scalingValue((f==null?void 0:f.left)??0,t),height:Ve,minHeight:Ve},ce={fontSettings:{fontFamily:V,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:C??.01,lineHeight:F,letterSpacing:Y??0,wordSpacing:re??0,textAppearance:te,color:y},$e=mt(tt(ce,t)),Ge=I.scalingValue(v??0,t),fn={fontSettings:{fontFamily:V,fontWeight:(ie==null?void 0:ie.fontWeight)??400,fontStyle:(ie==null?void 0:ie.fontStyle)??"normal"},fontSize:A??.01,lineHeight:K,letterSpacing:me??0,wordSpacing:se??0,textAppearance:fe,color:B},xt=tt(fn,t),he={fontSettings:{fontFamily:V,fontWeight:(Se==null?void 0:Se.fontWeight)??400,fontStyle:(Se==null?void 0:Se.fontStyle)??"normal"},fontSize:Ue??.01,lineHeight:z,letterSpacing:b??0,wordSpacing:D??0,textAppearance:q,color:N},ke=mt(tt(he,t)),Qe=I.buildColorVars(r,{inputColor:h,inputTextColor:$,inputBorderColor:M,placeholderColor:O!=null&&O.trim()?O:"#cccccc",buttonColor:w,buttonTextColor:y,buttonBorderColor:L,labelTextColor:B,successColor:N,errorColor:R},xl,Cl,Q),[be,Pe]=j.useState(()=>Object.fromEntries(oe.map(le=>[le.name,""]))),[Zn,Ct]=j.useState("idle"),[cr,jt]=j.useState(null),hn=o==="success"?"success":o==="error"?"error":Zn,ur=o==="error"?ne:cr,Mt=o==="filled",$t=j.useMemo(()=>{if(!Mt)return be;let le=null;for(const Oe of oe)(be[Oe.name]??"").trim().length>0||(le=le??{...be},le[Oe.name]="Filled");return le??be},[be,Mt,oe]),pr=hn==="error"?I.getFormFieldValidationError(oe,$t):null,dr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),Qn=n==null?void 0:n.submitUrl,eo=(le,Oe)=>{Pe(We=>({...We,[le]:Oe}))},gr=async le=>{le.preventDefault();const Oe=Object.fromEntries(oe.map(Ee=>{var at;return[Ee.name,((at=be[Ee.name])==null?void 0:at.trim())??""]}).filter(([,Ee])=>Ee));if(!Qn){Ct("error"),jt("No integrations were found for this form.");return}if(Object.keys(Oe).length===0)return;const We=I.getFormFieldValidationError(oe,be);if(We){Ct("error"),jt(We);return}Ct("submitting"),jt(null);try{const Ee=await fetch(Qn,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Oe)});if(!Ee.ok){const at=await Ee.text();throw new Error(at||`Request failed: ${Ee.status}`)}Ct("success"),Pe(Object.fromEntries(oe.map(at=>[at.name,""])))}catch(Ee){Ct("error"),jt(Ee instanceof Error?Ee.message:"Something went wrong")}};return S.jsxs("div",{className:`${r}-wrapper ${r}-type-${a} ${dr}`.trim(),style:Qe,children:[S.jsx("style",{dangerouslySetInnerHTML:{__html:bl(r)}}),S.jsxs("form",{onSubmit:gr,className:`${r}-form`,style:{gap:I.scalingValue(p??0,t)},children:[S.jsx("div",{className:`${r}-fields`,style:{gap:I.scalingValue(c??0,t)},children:oe.map((le,Oe)=>S.jsxs("div",{className:`${r}-field-group${X?` ${r}-labeled`:""}`,children:[X&&S.jsx("span",{className:`${r}-field-label`,style:xt?{...xt,lineHeight:xt.fontSize}:void 0,children:le.label||le.name}),le.type==="textarea"?S.jsx("textarea",{name:le.name,autoComplete:"off",value:$t[le.name]??"",onChange:We=>eo(le.name,We.target.value),placeholder:le.placeholder,className:`${r}-input`,style:ee,rows:1,"data-filled":Mt||($t[le.name]??"").trim().length>0,"data-field-type":"textarea"}):S.jsx("input",{type:le.type==="phone"?"tel":le.type==="email"?"email":"text",name:le.name,autoComplete:"off",value:$t[le.name]??"",onChange:We=>eo(le.name,We.target.value),placeholder:le.placeholder,required:le.isRequired??le.type==="email",className:`${r}-input`,style:ee,"data-filled":Mt||($t[le.name]??"").trim().length>0})]},Oe))}),S.jsx("div",{className:`${r}-overlay-anchor`,children:S.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:I.scalingValue(_??0,t),borderWidth:Ge,paddingTop:I.scalingValue((g==null?void 0:g.top)??0,t),paddingRight:I.scalingValue((g==null?void 0:g.right)??0,t),paddingBottom:I.scalingValue((g==null?void 0:g.bottom)??0,t),paddingLeft:I.scalingValue((g==null?void 0:g.left)??0,t),...$e,...u?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:S.jsx("span",{className:`${r}-overlay-anchor`,style:u?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Zn==="submitting"?"...":s})})})]}),hn==="success"&&S.jsx("p",{className:`${r}-success`,style:{...ke},children:J}),hn==="error"&&S.jsx("p",{className:`${r}-error`,style:{...ke},role:"alert",children:pr??ur??ne})]})}const xl={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"},Cl=["hover","focus","filled","success","error"],$l=`import React, { useMemo, useState } from 'react';
143
143
  import { CommonComponentProps } from '../props';
144
144
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
145
145
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -370,6 +370,13 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
370
370
  };
371
371
  const inputTypographyCss = omitTextColors(textStylesToCss(resolvedInputTextStyle, isEditor));
372
372
  const strokeForInput = scalingValue(inputStroke ?? 0, isEditor);
373
+ const inputBaseHeight = scalingValue(
374
+ (inputLineHeight ?? inputFontSize ?? 0.01) +
375
+ (inputPadding?.top ?? 0) +
376
+ (inputPadding?.bottom ?? 0) +
377
+ (type === 'C' ? (inputStroke ?? 0) : (inputStroke ?? 0) * 2),
378
+ isEditor,
379
+ );
373
380
  const inputFieldCss = {
374
381
  ...inputTypographyCss,
375
382
  borderStyle: 'solid',
@@ -386,6 +393,8 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
386
393
  paddingRight: scalingValue(inputPadding?.right ?? 0, isEditor),
387
394
  paddingBottom: scalingValue(inputPadding?.bottom ?? 0, isEditor),
388
395
  paddingLeft: scalingValue(inputPadding?.left ?? 0, isEditor),
396
+ height: inputBaseHeight,
397
+ minHeight: inputBaseHeight,
389
398
  } as React.CSSProperties;
390
399
 
391
400
  const resolvedButtonTextStyle: TextStyles = {
@@ -731,7 +740,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
731
740
  };
732
741
 
733
742
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
734
- `,$l=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Gt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},_l=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],wl={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control"},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Button Stroke",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Gt.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Gt.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Gt.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Gt.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:$l,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.visible",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.visible",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.visible",value:!1}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{type:"group",title:"",items:["fieldsGap","inputStroke","inputCorners"]},{type:"group",title:"",items:["inputPadding"]}]},{type:"group",title:"Button",items:[{type:"row",items:["isButtonFullWidth"]},{type:"row",items:[{type:"group",title:"",items:["gap","buttonStroke","buttonCorners"]},{type:"group",title:"",items:["buttonPadding"]}]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[..._l],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"]},Tl={element:bl,id:"form",name:"Newsletter Stacked",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.jpg"},version:1,defaultSize:{width:300,height:42},schema:wl,sourceCode:Cl};function Yt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function El(e){return`
743
+ `,_l=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Gt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},wl=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Tl={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Button Stroke",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Gt.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Gt.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Gt.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Gt.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:_l,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{type:"group",title:"",items:["fieldsGap","inputStroke","inputCorners"]},{type:"group",title:"",items:["inputPadding"]}]},{type:"group",title:"Button",items:[{type:"row",items:["isButtonFullWidth"]},{type:"row",items:[{type:"group",title:"",items:["gap","buttonStroke","buttonCorners"]},{type:"group",title:"",items:["buttonPadding"]}]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...wl],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"]},El={element:Sl,id:"form",name:"Newsletter Stacked",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.jpg"},version:1,defaultSize:{width:300,height:42},schema:Tl,sourceCode:$l};function Yt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ll(e){return`
735
744
  .${e}-wrapper {
736
745
  display: flex;
737
746
  flex-direction: column;
@@ -922,7 +931,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
922
931
  font-size: ${Yt(14)};
923
932
  color: var(--${e}-error-error-color, var(--${e}-error-color));
924
933
  }
925
- `}const Ll=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=F.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:l,fieldsToShow:s=1,fontFamily:p,inputFontSettings:c,inputFontSize:_,inputLineHeight:y,inputLetterSpacing:g,inputWordSpacing:u,inputTextAppearance:d,buttonFontSettings:C,buttonFontSize:v,buttonLineHeight:f,buttonLetterSpacing:$,buttonWordSpacing:M,buttonTextAppearance:O,statusFontSettings:w,statusFontSize:h,statusLineHeight:L,statusLetterSpacing:P,statusWordSpacing:N,statusTextAppearance:R,iconMaxWidth:V,minHeight:B,corners:U,stroke:H,stateOverrides:m,inputPadding:I,buttonPadding:E,successMessage:T="Thanks for subscribing!",errorMessage:x="Please, fill all required fields."}=e,k=a.slice(0,Math.min(s,a.length)),[Y,re]=j.useState(()=>Object.fromEntries(k.map(de=>[de.name,""]))),[te,ie]=j.useState("idle"),[A,K]=j.useState(null),fe=o==="success"?"success":o==="error"?"error":te,se=o==="error"?x:A,he=o==="filled",be=j.useMemo(()=>{if(!he)return Y;let de=null;for(const Be of k)(Y[Be.name]??"").trim().length>0||(de=de??{...Y},de[Be.name]="Filled");return de??Y},[he,Y,k]),Ge=fe==="error"?F.getFormFieldValidationError(k,be):null,z=o&&o!=="default"?`${r}-state-${o}`:"",b=k.some(de=>(be[de.name]??"").trim().length>0),D=z!==`${r}-state-filled`&&b?`${r}-state-filled`:"",q=`${z} ${D}`.trim(),J=n==null?void 0:n.submitUrl,ne=l??"",Q=(i==null?void 0:i.icon)??"",X=(i==null?void 0:i.mode)==="On",oe=ne||"Submit",ye={fontSettings:{fontFamily:p,fontWeight:(c==null?void 0:c.fontWeight)??400,fontStyle:(c==null?void 0:c.fontStyle)??"normal"},fontSize:_??.01,lineHeight:y,letterSpacing:g??0,wordSpacing:u??0,textAppearance:d,color:e.inputTextColor??"#111111"},ae={fontSettings:{fontFamily:p,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:v??.01,lineHeight:f,letterSpacing:$??0,wordSpacing:M??0,textAppearance:O,color:e.buttonTextColor??"#ffffff"},pe={fontSettings:{fontFamily:p,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:h??.01,lineHeight:L,letterSpacing:P??0,wordSpacing:N??0,textAppearance:R,color:e.successColor??"#22c55e"},Ve=mt(tt(ye,t)),ee=mt(tt(ae,t)),ce=mt(tt(pe,t)),$e=F.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(ye==null?void 0:ye.color)??"#111111",buttonTextColor:e.buttonTextColor??(ae==null?void 0:ae.color)??"#ffffff"},Al,Il,m),Ye={borderRadius:F.scalingValue(U,t),borderWidth:F.scalingValue(H,t),borderStyle:"solid"},xt={borderLeftWidth:F.scalingValue(H,t)},fn=async de=>{de.preventDefault();const Be=Object.fromEntries(k.map(xe=>{var Oe;return[xe.name,((Oe=Y[xe.name])==null?void 0:Oe.trim())??""]}).filter(([,xe])=>xe));if(!J){ie("error"),K("No integrations were found for this form.");return}if(Object.keys(Be).length===0)return;const _e=F.getFormFieldValidationError(k,Y);if(_e){ie("error"),K(_e);return}ie("submitting"),K(null);try{const xe=await fetch(J,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Be)});if(!xe.ok){const Oe=await xe.text();throw new Error(Oe||`Request failed: ${xe.status}`)}ie("success"),re(Object.fromEntries(k.map(Oe=>[Oe.name,""])))}catch(xe){ie("error"),K(xe instanceof Error?xe.message:"Something went wrong")}};return S.jsxs("div",{className:`${r}-wrapper ${q}`.trim(),style:$e,children:[S.jsx("style",{dangerouslySetInnerHTML:{__html:El(r)}}),S.jsxs("form",{onSubmit:fn,className:`${r}-form`,style:{...Ye,height:F.scalingValue(B,t),minHeight:F.scalingValue(B,t)},children:[S.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:k.map(de=>S.jsx("input",{type:de.type==="email"?"email":de.type==="phone"?"tel":"text",name:de.name,autoComplete:"off",value:be[de.name]??"",onChange:Be=>re(_e=>({..._e,[de.name]:Be.target.value})),placeholder:de.placeholder,required:de.isRequired??de.type==="email",className:`${r}-input`,style:{...Ve,paddingRight:F.scalingValue(I.right,t),paddingLeft:F.scalingValue(I.left,t),paddingTop:F.scalingValue(I.top,t),paddingBottom:F.scalingValue(I.bottom,t)}},de.name))}),S.jsx("div",{className:`${r}-overlayAnchor`,children:S.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":oe,style:{...ee,...xt,paddingRight:F.scalingValue(E.right,t),paddingLeft:F.scalingValue(E.left,t),paddingTop:F.scalingValue(E.top,t),paddingBottom:F.scalingValue(E.bottom,t)},children:te==="submitting"?"...":X?Q&&S.jsx(gt,{url:Q,className:`${r}-submitBtnIcon`,style:{maxWidth:F.scalingValue(V??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):ne})})]}),fe==="success"&&S.jsx("p",{className:`${r}-success`,style:{...ce},children:T}),fe==="error"&&S.jsx("p",{className:`${r}-error`,style:{...ce},role:"alert",children:Ge??se??x})]})},Al={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"},Il=["hover","focus","filled","success","error"],kl=`import React, { useMemo, useState } from 'react';
934
+ `}const Al=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=I.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:l,fieldsToShow:s=1,fontFamily:p,inputFontSettings:c,inputFontSize:_,inputLineHeight:v,inputLetterSpacing:g,inputWordSpacing:u,inputTextAppearance:d,buttonFontSettings:x,buttonFontSize:f,buttonLineHeight:h,buttonLetterSpacing:$,buttonWordSpacing:M,buttonTextAppearance:O,statusFontSettings:w,statusFontSize:y,statusLineHeight:L,statusLetterSpacing:B,statusWordSpacing:N,statusTextAppearance:R,iconMaxWidth:V,minHeight:P,corners:U,stroke:H,stateOverrides:m,inputPadding:k,buttonPadding:E,successMessage:T="Thanks for subscribing!",errorMessage:C="Please, fill all required fields."}=e,F=a.slice(0,Math.min(s,a.length)),[Y,re]=j.useState(()=>Object.fromEntries(F.map(he=>[he.name,""]))),[te,ie]=j.useState("idle"),[A,K]=j.useState(null),me=o==="success"?"success":o==="error"?"error":te,se=o==="error"?C:A,fe=o==="filled",Se=j.useMemo(()=>{if(!fe)return Y;let he=null;for(const ke of F)(Y[ke.name]??"").trim().length>0||(he=he??{...Y},he[ke.name]="Filled");return he??Y},[fe,Y,F]),Ue=me==="error"?I.getFormFieldValidationError(F,Se):null,z=o&&o!=="default"?`${r}-state-${o}`:"",b=F.some(he=>(Se[he.name]??"").trim().length>0),D=z!==`${r}-state-filled`&&b?`${r}-state-filled`:"",q=`${z} ${D}`.trim(),J=n==null?void 0:n.submitUrl,ne=l??"",Q=(i==null?void 0:i.icon)??"",X=(i==null?void 0:i.mode)==="On",oe=ne||"Submit",ye={fontSettings:{fontFamily:p,fontWeight:(c==null?void 0:c.fontWeight)??400,fontStyle:(c==null?void 0:c.fontStyle)??"normal"},fontSize:_??.01,lineHeight:v,letterSpacing:g??0,wordSpacing:u??0,textAppearance:d,color:e.inputTextColor??"#111111"},ae={fontSettings:{fontFamily:p,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:f??.01,lineHeight:h,letterSpacing:$??0,wordSpacing:M??0,textAppearance:O,color:e.buttonTextColor??"#ffffff"},pe={fontSettings:{fontFamily:p,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:y??.01,lineHeight:L,letterSpacing:B??0,wordSpacing:N??0,textAppearance:R,color:e.successColor??"#22c55e"},Ve=mt(tt(ye,t)),ee=mt(tt(ae,t)),ce=mt(tt(pe,t)),$e=I.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(ye==null?void 0:ye.color)??"#111111",buttonTextColor:e.buttonTextColor??(ae==null?void 0:ae.color)??"#ffffff"},Il,kl,m),Ge={borderRadius:I.scalingValue(U,t),borderWidth:I.scalingValue(H,t),borderStyle:"solid"},fn={borderLeftWidth:I.scalingValue(H,t)},xt=async he=>{he.preventDefault();const ke=Object.fromEntries(F.map(be=>{var Pe;return[be.name,((Pe=Y[be.name])==null?void 0:Pe.trim())??""]}).filter(([,be])=>be));if(!J){ie("error"),K("No integrations were found for this form.");return}if(Object.keys(ke).length===0)return;const Qe=I.getFormFieldValidationError(F,Y);if(Qe){ie("error"),K(Qe);return}ie("submitting"),K(null);try{const be=await fetch(J,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ke)});if(!be.ok){const Pe=await be.text();throw new Error(Pe||`Request failed: ${be.status}`)}ie("success"),re(Object.fromEntries(F.map(Pe=>[Pe.name,""])))}catch(be){ie("error"),K(be instanceof Error?be.message:"Something went wrong")}};return S.jsxs("div",{className:`${r}-wrapper ${q}`.trim(),style:$e,children:[S.jsx("style",{dangerouslySetInnerHTML:{__html:Ll(r)}}),S.jsxs("form",{onSubmit:xt,className:`${r}-form`,style:{...Ge,height:I.scalingValue(P,t),minHeight:I.scalingValue(P,t)},children:[S.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:F.map(he=>S.jsx("input",{type:he.type==="email"?"email":he.type==="phone"?"tel":"text",name:he.name,autoComplete:"off",value:Se[he.name]??"",onChange:ke=>re(Qe=>({...Qe,[he.name]:ke.target.value})),placeholder:he.placeholder,required:he.isRequired??he.type==="email",className:`${r}-input`,style:{...Ve,paddingRight:I.scalingValue(k.right,t),paddingLeft:I.scalingValue(k.left,t),paddingTop:I.scalingValue(k.top,t),paddingBottom:I.scalingValue(k.bottom,t)}},he.name))}),S.jsx("div",{className:`${r}-overlayAnchor`,children:S.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":oe,style:{...ee,...fn,paddingRight:I.scalingValue(E.right,t),paddingLeft:I.scalingValue(E.left,t),paddingTop:I.scalingValue(E.top,t),paddingBottom:I.scalingValue(E.bottom,t)},children:te==="submitting"?"...":X?Q&&S.jsx(gt,{url:Q,className:`${r}-submitBtnIcon`,style:{maxWidth:I.scalingValue(V??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):ne})})]}),me==="success"&&S.jsx("p",{className:`${r}-success`,style:{...ce},children:T}),me==="error"&&S.jsx("p",{className:`${r}-error`,style:{...ce},role:"alert",children:Ue??se??C})]})},Il={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"},kl=["hover","focus","filled","success","error"],Fl=`import React, { useMemo, useState } from 'react';
926
935
  import { CommonComponentProps } from '../props';
927
936
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
928
937
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -1494,4 +1503,4 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
1494
1503
  };
1495
1504
 
1496
1505
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1497
- `,Fl="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),Rl=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],Cn={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Pl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Vl={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"range-control"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...Cn.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Cn.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...Cn.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:Rl,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Fl},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:0,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:0,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","corners"]},{type:"row",items:[{type:"group",title:"",items:["stroke","buttonIcon"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["buttonPadding"]}}]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Pl],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Bl={element:Ll,id:"oneliner-form",name:"Newsletter Single Line",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Vl,sourceCode:kl},Ol=[Ca,Aa,yl,Tl,Bl];exports.components=Ol;exports.isSchemaV1=mr;
1506
+ `,Rl="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),Bl=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],Cn={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Vl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Pl={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"range-control"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...Cn.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Cn.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...Cn.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:Bl,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Rl},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:0,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:0,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","corners"]},{type:"row",items:[{type:"group",title:"",items:["stroke","buttonIcon"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["buttonPadding"]}}]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Vl],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Ol={element:Al,id:"oneliner-form",name:"Newsletter Single Line",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Pl,sourceCode:Fl},Wl=[$a,Ia,vl,El,Ol];exports.components=Wl;exports.isSchemaV1=fr;