@cntrl-site/components 1.0.1-alpha.13 → 1.0.1-alpha.14

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 +27 -20
  2. package/dist/index.mjs +1168 -1159
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),D=require("react"),pe=require("classnames"),I=require("./useScopedStyles-Bibm8h9Z.js"),ar=require("react-dom");function lr(e){return e.type==="object"&&e.version===1}const sr="ControlSlider-module__wrapper___sHEkd",cr="ControlSlider-module__hoverArrow___A-dOH",ur="ControlSlider-module__sliderItem___QQSkR",pr="ControlSlider-module__sliderImage___9hRl-",dr="ControlSlider-module__arrow___05ghY",gr="ControlSlider-module__arrowVertical___tBfVN",fr="ControlSlider-module__nextArrow___-30Yc",mr="ControlSlider-module__arrowInner___aEra3",yr="ControlSlider-module__arrowIcon___S4ztF",hr="ControlSlider-module__arrowImg___2dwJW",vr="ControlSlider-module__mirror___brd6U",br="ControlSlider-module__pagination___bicLF",Sr="ControlSlider-module__paginationInner___bT-P-",xr="ControlSlider-module__paginationVertical___zYqKw",Cr="ControlSlider-module__paginationItem___nTRbk",$r="ControlSlider-module__dot___p1Qun",_r="ControlSlider-module__activeDot___LHFaj",wr="ControlSlider-module__paginationInsideBottom___R3FWn",Tr="ControlSlider-module__paginationInsideTop___V-qb-",Er="ControlSlider-module__paginationOutsideBottom___14w8D",Lr="ControlSlider-module__paginationOutsideTop___SCLqB",Ar="ControlSlider-module__paginationInsideLeft___yOBRZ",Ir="ControlSlider-module__paginationInsideRight___Rtt3o",kr="ControlSlider-module__paginationOutsideLeft___lahaw",Fr="ControlSlider-module__paginationOutsideRight___EtuQa",Rr="ControlSlider-module__imgWrapper___UjEgB",Vr="ControlSlider-module__captionBlock___dJ6-j",Or="ControlSlider-module__captionTextWrapper___HFlpf",Pr="ControlSlider-module__captionText___uGBVc",Br="ControlSlider-module__active___WZK4G",Nr="ControlSlider-module__withPointerEvents___t-18M",Wr="ControlSlider-module__topLeftAlignment___zjnGM",jr="ControlSlider-module__topCenterAlignment___gD1xW",zr="ControlSlider-module__topRightAlignment___NMapS",Mr="ControlSlider-module__middleLeftAlignment___OnUrY",Dr="ControlSlider-module__middleCenterAlignment___Tdkl0",Hr="ControlSlider-module__middleRightAlignment___wEbfX",Ur="ControlSlider-module__bottomLeftAlignment___cTP2-",Yr="ControlSlider-module__bottomCenterAlignment___c54fB",Gr="ControlSlider-module__bottomRightAlignment___kEwrz",qr="ControlSlider-module__clickOverlay___DZA28",Xr="ControlSlider-module__contain___pLyq7",Kr="ControlSlider-module__cover___KdDat",Y={wrapper:sr,hoverArrow:cr,sliderItem:ur,sliderImage:pr,arrow:dr,arrowVertical:gr,nextArrow:fr,arrowInner:mr,arrowIcon:yr,arrowImg:hr,mirror:vr,pagination:br,paginationInner:Sr,paginationVertical:xr,paginationItem:Cr,dot:$r,activeDot:_r,paginationInsideBottom:wr,paginationInsideTop:Tr,paginationOutsideBottom:Er,paginationOutsideTop:Lr,paginationInsideLeft:Ar,paginationInsideRight:Ir,paginationOutsideLeft:kr,paginationOutsideRight:Fr,imgWrapper:Rr,captionBlock:Vr,captionTextWrapper:Or,captionText:Pr,active:Br,withPointerEvents:Nr,topLeftAlignment:Wr,topCenterAlignment:jr,topRightAlignment:zr,middleLeftAlignment:Mr,middleCenterAlignment:Dr,middleRightAlignment:Hr,bottomLeftAlignment:Ur,bottomCenterAlignment:Yr,bottomRightAlignment:Gr,clickOverlay:qr,contain:Xr,cover:Kr};function Jr(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 Zr(e,t,n){return t&&Jr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Hn="(prefers-reduced-motion: reduce)",lt=1,Qr=2,ut=3,gt=4,Tt=5,Bt=6,zt=7,ei={CREATED:lt,MOUNTED:Qr,IDLE:ut,MOVING:gt,SCROLLING:Tt,DRAGGING:Bt,DESTROYED:zt};function je(e){e.length=0}function Ge(e,t,n){return Array.prototype.slice.call(e,t,n)}function se(e){return e.bind.apply(e,[null].concat(Ge(arguments,1)))}var yo=setTimeout,gn=function(){};function Un(e){return requestAnimationFrame(e)}function Yt(e,t){return typeof t===e}function bt(e){return!$n(e)&&Yt("object",e)}var Cn=Array.isArray,ho=se(Yt,"function"),Ue=se(Yt,"string"),Et=se(Yt,"undefined");function $n(e){return e===null}function vo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Lt(e){return Cn(e)?e:[e]}function Te(e,t){Lt(e).forEach(t)}function _n(e,t){return e.indexOf(t)>-1}function Nt(e,t){return e.push.apply(e,Lt(t)),e}function Be(e,t,n){e&&Te(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function Fe(e,t){Be(e,Ue(t)?t.split(" "):t,!0)}function At(e,t){Te(t,e.appendChild.bind(e))}function wn(e,t){Te(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function St(e,t){return vo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function bo(e,t){var n=e?Ge(e.children):[];return t?n.filter(function(o){return St(o,t)}):n}function It(e,t){return t?bo(e,t)[0]:e.firstElementChild}var xt=Object.keys;function Je(e,t,n){return e&&(n?xt(e).reverse():xt(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function Ct(e){return Ge(arguments,1).forEach(function(t){Je(t,function(n,o){e[o]=t[o]})}),e}function He(e){return Ge(arguments,1).forEach(function(t){Je(t,function(n,o){Cn(n)?e[o]=n.slice():bt(n)?e[o]=He({},bt(e[o])?e[o]:{},n):e[o]=n})}),e}function Yn(e,t){Te(t||xt(e),function(n){delete e[n]})}function Re(e,t){Te(e,function(n){Te(t,function(o){n&&n.removeAttribute(o)})})}function ee(e,t,n){bt(t)?Je(t,function(o,r){ee(e,r,o)}):Te(e,function(o){$n(n)||n===""?Re(o,t):o.setAttribute(t,String(n))})}function st(e,t,n){var o=document.createElement(e);return t&&(Ue(t)?Fe(o,t):ee(o,t)),n&&At(n,o),o}function Le(e,t,n){if(Et(n))return getComputedStyle(e)[t];$n(n)||(e.style[t]=""+n)}function $t(e,t){Le(e,"display",t)}function So(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Ae(e,t){return e.getAttribute(t)}function Gn(e,t){return e&&e.classList.contains(t)}function _e(e){return e.getBoundingClientRect()}function Ze(e){Te(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function xo(e){return It(new DOMParser().parseFromString(e,"text/html").body)}function Pe(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Co(e,t){return e&&e.querySelector(t)}function Tn(e,t){return t?Ge(e.querySelectorAll(t)):[]}function Ne(e,t){Be(e,t,!1)}function fn(e){return e.timeStamp}function Ke(e){return Ue(e)?e:e?e+"px":""}var kt="splide",En="data-"+kt;function yt(e,t){if(!e)throw new Error("["+kt+"] "+(t||""))}var Ye=Math.min,Mt=Math.max,Dt=Math.floor,_t=Math.ceil,Ce=Math.abs;function $o(e,t,n){return Ce(e-t)<n}function Wt(e,t,n,o){var r=Ye(t,n),a=Mt(t,n);return o?r<e&&e<a:r<=e&&e<=a}function it(e,t,n){var o=Ye(t,n),r=Mt(t,n);return Ye(Mt(o,e),r)}function mn(e){return+(e>0)-+(e<0)}function yn(e,t){return Te(t,function(n){e=e.replace("%s",""+n)}),e}function Ln(e){return e<10?"0"+e:""+e}var qn={};function ti(e){return""+e+Ln(qn[e]=(qn[e]||0)+1)}function _o(){var e=[];function t(i,c,l,p){r(i,c,function(u,C,y){var g="addEventListener"in u,s=g?u.removeEventListener.bind(u,C,l,p):u.removeListener.bind(u,l);g?u.addEventListener(C,l,p):u.addListener(l),e.push([u,C,y,l,s])})}function n(i,c,l){r(i,c,function(p,u,C){e=e.filter(function(y){return y[0]===p&&y[1]===u&&y[2]===C&&(!l||y[3]===l)?(y[4](),!1):!0})})}function o(i,c,l){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(c,{bubbles:u,detail:l}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(c,u,!1,l)),i.dispatchEvent(p),p}function r(i,c,l){Te(i,function(p){p&&Te(c,function(u){u.split(" ").forEach(function(C){var y=C.split(".");l(p,y[0],y[1])})})})}function a(){e.forEach(function(i){i[4]()}),je(e)}return{bind:t,unbind:n,dispatch:o,destroy:a}}var qe="mounted",hn="ready",ze="move",ft="moved",An="click",wo="active",To="inactive",Eo="visible",Lo="hidden",he="refresh",Se="updated",pt="resize",Gt="resized",Ao="drag",Io="dragging",ko="dragged",qt="scroll",et="scrolled",ni="overflow",In="destroy",Fo="arrows:mounted",Ro="arrows:updated",Vo="pagination:mounted",Oo="pagination:updated",kn="navigation:mounted",Fn="autoplay:play",Po="autoplay:playing",Rn="autoplay:pause",Vn="lazyload:loaded",Bo="sk",No="sh",Ht="ei";function de(e){var t=e?e.event.bus:document.createDocumentFragment(),n=_o();function o(a,i){n.bind(t,Lt(a).join(" "),function(c){i.apply(i,Cn(c.detail)?c.detail:[])})}function r(a){n.dispatch(t,a,Ge(arguments,1))}return e&&e.event.on(In,n.destroy),Ct(n,{bus:t,on:o,off:se(n.unbind,t),emit:r})}function Xt(e,t,n,o){var r=Date.now,a,i=0,c,l=!0,p=0;function u(){if(!l){if(i=e?Ye((r()-a)/e,1):1,n&&n(i),i>=1&&(t(),a=r(),o&&++p>=o))return y();c=Un(u)}}function C(v){v||s(),a=r()-(v?i*e:0),l=!1,c=Un(u)}function y(){l=!0}function g(){a=r(),i=0,n&&n(i)}function s(){c&&cancelAnimationFrame(c),i=0,c=0,l=!0}function d(v){e=v}function T(){return l}return{start:C,rewind:g,pause:y,cancel:s,set:d,isPaused:T}}function oi(e){var t=e;function n(r){t=r}function o(r){return _n(Lt(r),t)}return{set:n,is:o}}function ri(e,t){var n=Xt(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ii(e,t,n){var o=e.state,r=n.breakpoints||{},a=n.reducedMotion||{},i=_o(),c=[];function l(){var s=n.mediaQuery==="min";xt(r).sort(function(d,T){return s?+d-+T:+T-+d}).forEach(function(d){u(r[d],"("+(s?"min":"max")+"-width:"+d+"px)")}),u(a,Hn),C()}function p(s){s&&i.destroy()}function u(s,d){var T=matchMedia(d);i.bind(T,"change",C),c.push([s,T])}function C(){var s=o.is(zt),d=n.direction,T=c.reduce(function(v,m){return He(v,m[1].matches?m[0]:{})},{});Yn(n),g(T),n.destroy?e.destroy(n.destroy==="completely"):s?(p(!0),e.mount()):d!==n.direction&&e.refresh()}function y(s){matchMedia(Hn).matches&&(s?He(n,a):Yn(n,xt(a)))}function g(s,d,T){He(n,s),d&&He(Object.getPrototypeOf(n),s),(T||!o.is(lt))&&e.emit(Se,n)}return{setup:l,destroy:p,reduce:y,set:g}}var Kt="Arrow",Jt=Kt+"Left",Zt=Kt+"Right",Wo=Kt+"Up",jo=Kt+"Down",Xn="rtl",Qt="ttb",an={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Wo,Zt],ArrowRight:[jo,Jt]};function ai(e,t,n){function o(a,i,c){c=c||n.direction;var l=c===Xn&&!i?1:c===Qt?0:-1;return an[a]&&an[a][l]||a.replace(/width|left|right/i,function(p,u){var C=an[p.toLowerCase()][l]||p;return u>0?C.charAt(0).toUpperCase()+C.slice(1):C})}function r(a){return a*(n.direction===Xn?1:-1)}return{resolve:o,orient:r}}var We="role",ct="tabindex",li="disabled",Ie="aria-",Ft=Ie+"controls",zo=Ie+"current",Kn=Ie+"selected",we=Ie+"label",On=Ie+"labelledby",Mo=Ie+"hidden",Pn=Ie+"orientation",wt=Ie+"roledescription",Jn=Ie+"live",Zn=Ie+"busy",Qn=Ie+"atomic",Bn=[We,ct,li,Ft,zo,we,On,Mo,Pn,wt],Ve=kt+"__",Xe="is-",ln=kt,eo=Ve+"track",si=Ve+"list",en=Ve+"slide",Do=en+"--clone",ci=en+"__container",Nn=Ve+"arrows",tn=Ve+"arrow",Ho=tn+"--prev",Uo=tn+"--next",nn=Ve+"pagination",Yo=nn+"__page",ui=Ve+"progress",pi=ui+"__bar",di=Ve+"toggle",gi=Ve+"spinner",fi=Ve+"sr",mi=Xe+"initialized",Qe=Xe+"active",Go=Xe+"prev",qo=Xe+"next",vn=Xe+"visible",bn=Xe+"loading",Xo=Xe+"focus-in",Ko=Xe+"overflow",yi=[Qe,vn,Go,qo,bn,Xo,Ko],hi={slide:en,clone:Do,arrows:Nn,arrow:tn,prev:Ho,next:Uo,pagination:nn,page:Yo,spinner:gi};function vi(e,t){if(ho(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!St(n,t);)n=n.parentElement;return n}var bi=5,to=200,Jo="touchstart mousedown",sn="touchmove mousemove",cn="touchend touchcancel mouseup click";function Si(e,t,n){var o=de(e),r=o.on,a=o.bind,i=e.root,c=n.i18n,l={},p=[],u=[],C=[],y,g,s;function d(){$(),j(),m()}function T(){r(he,v),r(he,d),r(Se,m),a(document,Jo+" keydown",function(h){s=h.type==="keydown"},{capture:!0}),a(i,"focusin",function(){Be(i,Xo,!!s)})}function v(h){var E=Bn.concat("style");je(p),Ne(i,u),Ne(y,C),Re([y,g],E),Re(i,h?E:["style",wt])}function m(){Ne(i,u),Ne(y,C),u=L(ln),C=L(eo),Fe(i,u),Fe(y,C),ee(i,we,n.label),ee(i,On,n.labelledby)}function $(){y=B("."+eo),g=It(y,"."+si),yt(y&&g,"A track/list element is missing."),Nt(p,bo(g,"."+en+":not(."+Do+")")),Je({arrows:Nn,pagination:nn,prev:Ho,next:Uo,bar:pi,toggle:di},function(h,E){l[E]=B("."+h)}),Ct(l,{root:i,track:y,list:g,slides:p})}function j(){var h=i.id||ti(kt),E=n.role;i.id=h,y.id=y.id||h+"-track",g.id=g.id||h+"-list",!Ae(i,We)&&i.tagName!=="SECTION"&&E&&ee(i,We,E),ee(i,wt,c.carousel),ee(g,We,"presentation")}function B(h){var E=Co(i,h);return E&&vi(E,"."+ln)===i?E:void 0}function L(h){return[h+"--"+n.type,h+"--"+n.direction,n.drag&&h+"--draggable",n.isNavigation&&h+"--nav",h===ln&&Qe]}return Ct(l,{setup:d,mount:T,destroy:v})}var dt="slide",mt="loop",Rt="fade";function xi(e,t,n,o){var r=de(e),a=r.on,i=r.emit,c=r.bind,l=e.Components,p=e.root,u=e.options,C=u.isNavigation,y=u.updateOnMove,g=u.i18n,s=u.pagination,d=u.slideFocus,T=l.Direction.resolve,v=Ae(o,"style"),m=Ae(o,we),$=n>-1,j=It(o,"."+ci),B;function L(){$||(o.id=p.id+"-slide"+Ln(t+1),ee(o,We,s?"tabpanel":"group"),ee(o,wt,g.slide),ee(o,we,m||yn(g.slideLabel,[t+1,e.length]))),h()}function h(){c(o,"click",se(i,An,w)),c(o,"keydown",se(i,Bo,w)),a([ft,No,et],k),a(kn,R),y&&a(ze,W)}function E(){B=!0,r.destroy(),Ne(o,yi),Re(o,Bn),ee(o,"style",v),ee(o,we,m||"")}function R(){var _=e.splides.map(function(x){var P=x.splide.Components.Slides.getAt(t);return P?P.slide.id:""}).join(" ");ee(o,we,yn(g.slideX,($?n:t)+1)),ee(o,Ft,_),ee(o,We,d?"button":""),d&&Re(o,wt)}function W(){B||k()}function k(){if(!B){var _=e.index;V(),O(),Be(o,Go,t===_-1),Be(o,qo,t===_+1)}}function V(){var _=H();_!==Gn(o,Qe)&&(Be(o,Qe,_),ee(o,zo,C&&_||""),i(_?wo:To,w))}function O(){var _=f(),x=!_&&(!H()||$);if(e.state.is([gt,Tt])||ee(o,Mo,x||""),ee(Tn(o,u.focusableNodes||""),ct,x?-1:""),d&&ee(o,ct,x?-1:0),_!==Gn(o,vn)&&(Be(o,vn,_),i(_?Eo:Lo,w)),!_&&document.activeElement===o){var P=l.Slides.getAt(e.index);P&&So(P.slide)}}function U(_,x,P){Le(P&&j||o,_,x)}function H(){var _=e.index;return _===t||u.cloneStatus&&_===n}function f(){if(e.is(Rt))return H();var _=_e(l.Elements.track),x=_e(o),P=T("left",!0),q=T("right",!0);return Dt(_[P])<=_t(x[P])&&Dt(x[q])<=_t(_[q])}function F(_,x){var P=Ce(_-t);return!$&&(u.rewind||e.is(mt))&&(P=Ye(P,e.length-P)),P<=x}var w={index:t,slideIndex:n,slide:o,container:j,isClone:$,mount:L,destroy:E,update:k,style:U,isWithin:F};return w}function Ci(e,t,n){var o=de(e),r=o.on,a=o.emit,i=o.bind,c=t.Elements,l=c.slides,p=c.list,u=[];function C(){y(),r(he,g),r(he,y)}function y(){l.forEach(function(k,V){d(k,V,-1)})}function g(){B(function(k){k.destroy()}),je(u)}function s(){B(function(k){k.update()})}function d(k,V,O){var U=xi(e,V,O,k);U.mount(),u.push(U),u.sort(function(H,f){return H.index-f.index})}function T(k){return k?L(function(V){return!V.isClone}):u}function v(k){var V=t.Controller,O=V.toIndex(k),U=V.hasFocus()?1:n.perPage;return L(function(H){return Wt(H.index,O,O+U-1)})}function m(k){return L(k)[0]}function $(k,V){Te(k,function(O){if(Ue(O)&&(O=xo(O)),vo(O)){var U=l[V];U?wn(O,U):At(p,O),Fe(O,n.classes.slide),E(O,se(a,pt))}}),a(he)}function j(k){Ze(L(k).map(function(V){return V.slide})),a(he)}function B(k,V){T(V).forEach(k)}function L(k){return u.filter(ho(k)?k:function(V){return Ue(k)?St(V.slide,k):_n(Lt(k),V.index)})}function h(k,V,O){B(function(U){U.style(k,V,O)})}function E(k,V){var O=Tn(k,"img"),U=O.length;U?O.forEach(function(H){i(H,"load error",function(){--U||V()})}):V()}function R(k){return k?l.length:u.length}function W(){return u.length>n.perPage}return{mount:C,destroy:g,update:s,register:d,get:T,getIn:v,getAt:m,add:$,remove:j,forEach:B,filter:L,style:h,getLength:R,isEnough:W}}function $i(e,t,n){var o=de(e),r=o.on,a=o.bind,i=o.emit,c=t.Slides,l=t.Direction.resolve,p=t.Elements,u=p.root,C=p.track,y=p.list,g=c.getAt,s=c.style,d,T,v;function m(){$(),a(window,"resize load",ri(se(i,pt))),r([Se,he],$),r(pt,j)}function $(){d=n.direction===Qt,Le(u,"maxWidth",Ke(n.width)),Le(C,l("paddingLeft"),B(!1)),Le(C,l("paddingRight"),B(!0)),j(!0)}function j(w){var _=_e(u);(w||T.width!==_.width||T.height!==_.height)&&(Le(C,"height",L()),s(l("marginRight"),Ke(n.gap)),s("width",E()),s("height",R(),!0),T=_,i(Gt),v!==(v=F())&&(Be(u,Ko,v),i(ni,v)))}function B(w){var _=n.padding,x=l(w?"right":"left");return _&&Ke(_[x]||(bt(_)?0:_))||"0px"}function L(){var w="";return d&&(w=h(),yt(w,"height or heightRatio is missing."),w="calc("+w+" - "+B(!1)+" - "+B(!0)+")"),w}function h(){return Ke(n.height||_e(y).width*n.heightRatio)}function E(){return n.autoWidth?null:Ke(n.fixedWidth)||(d?"":W())}function R(){return Ke(n.fixedHeight)||(d?n.autoHeight?null:W():h())}function W(){var w=Ke(n.gap);return"calc((100%"+(w&&" + "+w)+")/"+(n.perPage||1)+(w&&" - "+w)+")"}function k(){return _e(y)[l("width")]}function V(w,_){var x=g(w||0);return x?_e(x.slide)[l("width")]+(_?0:H()):0}function O(w,_){var x=g(w);if(x){var P=_e(x.slide)[l("right")],q=_e(y)[l("left")];return Ce(P-q)+(_?0:H())}return 0}function U(w){return O(e.length-1)-O(0)+V(0,w)}function H(){var w=g(0);return w&&parseFloat(Le(w.slide,l("marginRight")))||0}function f(w){return parseFloat(Le(C,l("padding"+(w?"Right":"Left"))))||0}function F(){return e.is(Rt)||U(!0)>k()}return{mount:m,resize:j,listSize:k,slideSize:V,sliderSize:U,totalSize:O,getPadding:f,isOverflow:F}}var _i=2;function wi(e,t,n){var o=de(e),r=o.on,a=t.Elements,i=t.Slides,c=t.Direction.resolve,l=[],p;function u(){r(he,C),r([Se,pt],g),(p=T())&&(s(p),t.Layout.resize(!0))}function C(){y(),u()}function y(){Ze(l),je(l),o.destroy()}function g(){var v=T();p!==v&&(p<v||!v)&&o.emit(he)}function s(v){var m=i.get().slice(),$=m.length;if($){for(;m.length<v;)Nt(m,m);Nt(m.slice(-v),m.slice(0,v)).forEach(function(j,B){var L=B<v,h=d(j.slide,B);L?wn(h,m[0].slide):At(a.list,h),Nt(l,h),i.register(h,B-v+(L?0:$),j.index)})}}function d(v,m){var $=v.cloneNode(!0);return Fe($,n.classes.clone),$.id=e.root.id+"-clone"+Ln(m+1),$}function T(){var v=n.clones;if(!e.is(mt))v=0;else if(Et(v)){var m=n[c("fixedWidth")]&&t.Layout.slideSize(0),$=m&&_t(_e(a.track)[c("width")]/m);v=$||n[c("autoWidth")]&&e.length||n.perPage*_i}return v}return{mount:u,destroy:y}}function Ti(e,t,n){var o=de(e),r=o.on,a=o.emit,i=e.state.set,c=t.Layout,l=c.slideSize,p=c.getPadding,u=c.totalSize,C=c.listSize,y=c.sliderSize,g=t.Direction,s=g.resolve,d=g.orient,T=t.Elements,v=T.list,m=T.track,$;function j(){$=t.Transition,r([qe,Gt,Se,he],B)}function B(){t.Controller.isBusy()||(t.Scroll.cancel(),h(e.index),t.Slides.update())}function L(x,P,q,ie){x!==P&&w(x>q)&&(k(),E(W(U(),x>q),!0)),i(gt),a(ze,P,q,x),$.start(P,function(){i(ut),a(ft,P,q,x),ie&&ie()})}function h(x){E(O(x,!0))}function E(x,P){if(!e.is(Rt)){var q=P?x:R(x);Le(v,"transform","translate"+s("X")+"("+q+"px)"),x!==q&&a(No)}}function R(x){if(e.is(mt)){var P=V(x),q=P>t.Controller.getEnd(),ie=P<0;(ie||q)&&(x=W(x,q))}return x}function W(x,P){var q=x-F(P),ie=y();return x-=d(ie*(_t(Ce(q)/ie)||1))*(P?1:-1),x}function k(){E(U(),!0),$.cancel()}function V(x){for(var P=t.Slides.get(),q=0,ie=1/0,ne=0;ne<P.length;ne++){var le=P[ne].index,A=Ce(O(le,!0)-x);if(A<=ie)ie=A,q=le;else break}return q}function O(x,P){var q=d(u(x-1)-f(x));return P?H(q):q}function U(){var x=s("left");return _e(v)[x]-_e(m)[x]+d(p(!1))}function H(x){return n.trimSpace&&e.is(dt)&&(x=it(x,0,d(y(!0)-C()))),x}function f(x){var P=n.focus;return P==="center"?(C()-l(x,!0))/2:+P*l(x)||0}function F(x){return O(x?t.Controller.getEnd():0,!!n.trimSpace)}function w(x){var P=d(W(U(),x));return x?P>=0:P<=v[s("scrollWidth")]-_e(m)[s("width")]}function _(x,P){P=Et(P)?U():P;var q=x!==!0&&d(P)<d(F(!1)),ie=x!==!1&&d(P)>d(F(!0));return q||ie}return{mount:j,move:L,jump:h,translate:E,shift:W,cancel:k,toIndex:V,toPosition:O,getPosition:U,getLimit:F,exceededLimit:_,reposition:B}}function Ei(e,t,n){var o=de(e),r=o.on,a=o.emit,i=t.Move,c=i.getPosition,l=i.getLimit,p=i.toPosition,u=t.Slides,C=u.isEnough,y=u.getLength,g=n.omitEnd,s=e.is(mt),d=e.is(dt),T=se(U,!1),v=se(U,!0),m=n.start||0,$,j=m,B,L,h;function E(){R(),r([Se,he,Ht],R),r(Gt,W)}function R(){B=y(!0),L=n.perMove,h=n.perPage,$=w();var A=it(m,0,g?$:B-1);A!==m&&(m=A,i.reposition())}function W(){$!==w()&&a(Ht)}function k(A,Z,ye){if(!le()){var ae=O(A),ge=F(ae);ge>-1&&(Z||ge!==m)&&(q(ge),i.move(ae,ge,j,ye))}}function V(A,Z,ye,ae){t.Scroll.scroll(A,Z,ye,function(){var ge=F(i.toIndex(c()));q(g?Ye(ge,$):ge),ae&&ae()})}function O(A){var Z=m;if(Ue(A)){var ye=A.match(/([+\-<>])(\d+)?/)||[],ae=ye[1],ge=ye[2];ae==="+"||ae==="-"?Z=H(m+ +(""+ae+(+ge||1)),m):ae===">"?Z=ge?_(+ge):T(!0):ae==="<"&&(Z=v(!0))}else Z=s?A:it(A,0,$);return Z}function U(A,Z){var ye=L||(ne()?1:h),ae=H(m+ye*(A?-1:1),m,!(L||ne()));return ae===-1&&d&&!$o(c(),l(!A),1)?A?0:$:Z?ae:F(ae)}function H(A,Z,ye){if(C()||ne()){var ae=f(A);ae!==A&&(Z=A,A=ae,ye=!1),A<0||A>$?!L&&(Wt(0,A,Z,!0)||Wt($,Z,A,!0))?A=_(x(A)):s?A=ye?A<0?-(B%h||h):B:A:n.rewind?A=A<0?$:0:A=-1:ye&&A!==Z&&(A=_(x(Z)+(A<Z?-1:1)))}else A=-1;return A}function f(A){if(d&&n.trimSpace==="move"&&A!==m)for(var Z=c();Z===p(A,!0)&&Wt(A,0,e.length-1,!n.rewind);)A<m?--A:++A;return A}function F(A){return s?(A+B)%B||0:A}function w(){for(var A=B-(ne()||s&&L?1:h);g&&A-- >0;)if(p(B-1,!0)!==p(A,!0)){A++;break}return it(A,0,B-1)}function _(A){return it(ne()?A:h*A,0,$)}function x(A){return ne()?Ye(A,$):Dt((A>=$?B-1:A)/h)}function P(A){var Z=i.toIndex(A);return d?it(Z,0,$):Z}function q(A){A!==m&&(j=m,m=A)}function ie(A){return A?j:m}function ne(){return!Et(n.focus)||n.isNavigation}function le(){return e.state.is([gt,Tt])&&!!n.waitForTransition}return{mount:E,go:k,scroll:V,getNext:T,getPrev:v,getAdjacent:U,getEnd:w,setIndex:q,getIndex:ie,toIndex:_,toPage:x,toDest:P,hasFocus:ne,isBusy:le}}var Li="http://www.w3.org/2000/svg",Ai="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",Vt=40;function Ii(e,t,n){var o=de(e),r=o.on,a=o.bind,i=o.emit,c=n.classes,l=n.i18n,p=t.Elements,u=t.Controller,C=p.arrows,y=p.track,g=C,s=p.prev,d=p.next,T,v,m={};function $(){B(),r(Se,j)}function j(){L(),$()}function B(){var V=n.arrows;V&&!(s&&d)&&R(),s&&d&&(Ct(m,{prev:s,next:d}),$t(g,V?"":"none"),Fe(g,v=Nn+"--"+n.direction),V&&(h(),k(),ee([s,d],Ft,y.id),i(Fo,s,d)))}function L(){o.destroy(),Ne(g,v),T?(Ze(C?[s,d]:g),s=d=null):Re([s,d],Bn)}function h(){r([qe,ft,he,et,Ht],k),a(d,"click",se(E,">")),a(s,"click",se(E,"<"))}function E(V){u.go(V,!0)}function R(){g=C||st("div",c.arrows),s=W(!0),d=W(!1),T=!0,At(g,[s,d]),!C&&wn(g,y)}function W(V){var O='<button class="'+c.arrow+" "+(V?c.prev:c.next)+'" type="button"><svg xmlns="'+Li+'" viewBox="0 0 '+Vt+" "+Vt+'" width="'+Vt+'" height="'+Vt+'" focusable="false"><path d="'+(n.arrowPath||Ai)+'" />';return xo(O)}function k(){if(s&&d){var V=e.index,O=u.getPrev(),U=u.getNext(),H=O>-1&&V<O?l.last:l.prev,f=U>-1&&V>U?l.first:l.next;s.disabled=O<0,d.disabled=U<0,ee(s,we,H),ee(d,we,f),i(Ro,s,d,O,U)}}return{arrows:m,mount:$,destroy:L,update:k}}var ki=En+"-interval";function Fi(e,t,n){var o=de(e),r=o.on,a=o.bind,i=o.emit,c=Xt(n.interval,e.go.bind(e,">"),h),l=c.isPaused,p=t.Elements,u=t.Elements,C=u.root,y=u.toggle,g=n.autoplay,s,d,T=g==="pause";function v(){g&&(m(),y&&ee(y,Ft,p.track.id),T||$(),L())}function m(){n.pauseOnHover&&a(C,"mouseenter mouseleave",function(R){s=R.type==="mouseenter",B()}),n.pauseOnFocus&&a(C,"focusin focusout",function(R){d=R.type==="focusin",B()}),y&&a(y,"click",function(){T?$():j(!0)}),r([ze,qt,he],c.rewind),r(ze,E)}function $(){l()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),d=s=T=!1,L(),i(Fn))}function j(R){R===void 0&&(R=!0),T=!!R,L(),l()||(c.pause(),i(Rn))}function B(){T||(s||d?j(!1):$())}function L(){y&&(Be(y,Qe,!T),ee(y,we,n.i18n[T?"play":"pause"]))}function h(R){var W=p.bar;W&&Le(W,"width",R*100+"%"),i(Po,R)}function E(R){var W=t.Slides.getAt(R);c.set(W&&+Ae(W.slide,ki)||n.interval)}return{mount:v,destroy:c.cancel,play:$,pause:j,isPaused:l}}function Ri(e,t,n){var o=de(e),r=o.on;function a(){n.cover&&(r(Vn,se(c,!0)),r([qe,Se,he],se(i,!0)))}function i(l){t.Slides.forEach(function(p){var u=It(p.container||p.slide,"img");u&&u.src&&c(l,u,p)})}function c(l,p,u){u.style("background",l?'center/cover no-repeat url("'+p.src+'")':"",!0),$t(p,l?"none":"")}return{mount:a,destroy:se(i,!1)}}var Vi=10,Oi=600,Pi=.6,Bi=1.5,Ni=800;function Wi(e,t,n){var o=de(e),r=o.on,a=o.emit,i=e.state.set,c=t.Move,l=c.getPosition,p=c.getLimit,u=c.exceededLimit,C=c.translate,y=e.is(dt),g,s,d=1;function T(){r(ze,j),r([Se,he],B)}function v(h,E,R,W,k){var V=l();if(j(),R&&(!y||!u())){var O=t.Layout.sliderSize(),U=mn(h)*O*Dt(Ce(h)/O)||0;h=c.toPosition(t.Controller.toDest(h%O))+U}var H=$o(V,h,1);d=1,E=H?0:E||Mt(Ce(h-V)/Bi,Ni),s=W,g=Xt(E,m,se($,V,h,k),1),i(Tt),a(qt),g.start()}function m(){i(ut),s&&s(),a(et)}function $(h,E,R,W){var k=l(),V=h+(E-h)*L(W),O=(V-k)*d;C(k+O),y&&!R&&u()&&(d*=Pi,Ce(O)<Vi&&v(p(u(!0)),Oi,!1,s,!0))}function j(){g&&g.cancel()}function B(){g&&!g.isPaused()&&(j(),m())}function L(h){var E=n.easingFunc;return E?E(h):1-Math.pow(1-h,4)}return{mount:T,destroy:j,scroll:v,cancel:B}}var at={passive:!1,capture:!0};function ji(e,t,n){var o=de(e),r=o.on,a=o.emit,i=o.bind,c=o.unbind,l=e.state,p=t.Move,u=t.Scroll,C=t.Controller,y=t.Elements.track,g=t.Media.reduce,s=t.Direction,d=s.resolve,T=s.orient,v=p.getPosition,m=p.exceededLimit,$,j,B,L,h,E=!1,R,W,k;function V(){i(y,sn,gn,at),i(y,cn,gn,at),i(y,Jo,U,at),i(y,"click",F,{capture:!0}),i(y,"dragstart",Pe),r([qe,Se],O)}function O(){var z=n.drag;Oe(!z),L=z==="free"}function U(z){if(R=!1,!W){var b=ge(z);ae(z.target)&&(b||!z.button)&&(C.isBusy()?Pe(z,!0):(k=b?y:window,h=l.is([gt,Tt]),B=null,i(k,sn,H,at),i(k,cn,f,at),p.cancel(),u.cancel(),w(z)))}}function H(z){if(l.is(Bt)||(l.set(Bt),a(Ao)),z.cancelable)if(h){p.translate($+ye(ne(z)));var b=le(z)>to,M=E!==(E=m());(b||M)&&w(z),R=!0,a(Io),Pe(z)}else P(z)&&(h=x(z),Pe(z))}function f(z){l.is(Bt)&&(l.set(ut),a(ko)),h&&(_(z),Pe(z)),c(k,sn,H),c(k,cn,f),h=!1}function F(z){!W&&R&&Pe(z,!0)}function w(z){B=j,j=z,$=v()}function _(z){var b=q(z),M=ie(b),X=n.rewind&&n.rewindByDrag;g(!1),L?C.scroll(M,0,n.snap):e.is(Rt)?C.go(T(mn(b))<0?X?"<":"-":X?">":"+"):e.is(dt)&&E&&X?C.go(m(!0)?">":"<"):C.go(C.toDest(M),!0),g(!0)}function x(z){var b=n.dragMinThreshold,M=bt(b),X=M&&b.mouse||0,G=(M?b.touch:+b)||10;return Ce(ne(z))>(ge(z)?G:X)}function P(z){return Ce(ne(z))>Ce(ne(z,!0))}function q(z){if(e.is(mt)||!E){var b=le(z);if(b&&b<to)return ne(z)/b}return 0}function ie(z){return v()+mn(z)*Ye(Ce(z)*(n.flickPower||600),L?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function ne(z,b){return Z(z,b)-Z(A(z),b)}function le(z){return fn(z)-fn(A(z))}function A(z){return j===z&&B||j}function Z(z,b){return(ge(z)?z.changedTouches[0]:z)["page"+d(b?"Y":"X")]}function ye(z){return z/(E&&e.is(dt)?bi:1)}function ae(z){var b=n.noDrag;return!St(z,"."+Yo+", ."+tn)&&(!b||!St(z,b))}function ge(z){return typeof TouchEvent<"u"&&z instanceof TouchEvent}function me(){return h}function Oe(z){W=z}return{mount:V,disable:Oe,isDragging:me}}var zi={Spacebar:" ",Right:Zt,Left:Jt,Up:Wo,Down:jo};function Wn(e){return e=Ue(e)?e:e.key,zi[e]||e}var no="keydown";function Mi(e,t,n){var o=de(e),r=o.on,a=o.bind,i=o.unbind,c=e.root,l=t.Direction.resolve,p,u;function C(){y(),r(Se,g),r(Se,y),r(ze,d)}function y(){var v=n.keyboard;v&&(p=v==="global"?window:c,a(p,no,T))}function g(){i(p,no)}function s(v){u=v}function d(){var v=u;u=!0,yo(function(){u=v})}function T(v){if(!u){var m=Wn(v);m===l(Jt)?e.go("<"):m===l(Zt)&&e.go(">")}}return{mount:C,destroy:g,disable:s}}var ht=En+"-lazy",jt=ht+"-srcset",Di="["+ht+"], ["+jt+"]";function Hi(e,t,n){var o=de(e),r=o.on,a=o.off,i=o.bind,c=o.emit,l=n.lazyLoad==="sequential",p=[ft,et],u=[];function C(){n.lazyLoad&&(y(),r(he,y))}function y(){je(u),g(),l?v():(a(p),r(p,s),s())}function g(){t.Slides.forEach(function(m){Tn(m.slide,Di).forEach(function($){var j=Ae($,ht),B=Ae($,jt);if(j!==$.src||B!==$.srcset){var L=n.classes.spinner,h=$.parentElement,E=It(h,"."+L)||st("span",L,h);u.push([$,m,E]),$.src||$t($,"none")}})})}function s(){u=u.filter(function(m){var $=n.perPage*((n.preloadPages||1)+1)-1;return m[1].isWithin(e.index,$)?d(m):!0}),u.length||a(p)}function d(m){var $=m[0];Fe(m[1].slide,bn),i($,"load error",se(T,m)),ee($,"src",Ae($,ht)),ee($,"srcset",Ae($,jt)),Re($,ht),Re($,jt)}function T(m,$){var j=m[0],B=m[1];Ne(B.slide,bn),$.type!=="error"&&(Ze(m[2]),$t(j,""),c(Vn,j,B),c(pt)),l&&v()}function v(){u.length&&d(u.shift())}return{mount:C,destroy:se(je,u),check:s}}function Ui(e,t,n){var o=de(e),r=o.on,a=o.emit,i=o.bind,c=t.Slides,l=t.Elements,p=t.Controller,u=p.hasFocus,C=p.getIndex,y=p.go,g=t.Direction.resolve,s=l.pagination,d=[],T,v;function m(){$(),r([Se,he,Ht],m);var W=n.pagination;s&&$t(s,W?"":"none"),W&&(r([ze,qt,et],R),j(),R(),a(Vo,{list:T,items:d},E(e.index)))}function $(){T&&(Ze(s?Ge(T.children):T),Ne(T,v),je(d),T=null),o.destroy()}function j(){var W=e.length,k=n.classes,V=n.i18n,O=n.perPage,U=u()?p.getEnd()+1:_t(W/O);T=s||st("ul",k.pagination,l.track.parentElement),Fe(T,v=nn+"--"+h()),ee(T,We,"tablist"),ee(T,we,V.select),ee(T,Pn,h()===Qt?"vertical":"");for(var H=0;H<U;H++){var f=st("li",null,T),F=st("button",{class:k.page,type:"button"},f),w=c.getIn(H).map(function(x){return x.slide.id}),_=!u()&&O>1?V.pageX:V.slideX;i(F,"click",se(B,H)),n.paginationKeyboard&&i(F,"keydown",se(L,H)),ee(f,We,"presentation"),ee(F,We,"tab"),ee(F,Ft,w.join(" ")),ee(F,we,yn(_,H+1)),ee(F,ct,-1),d.push({li:f,button:F,page:H})}}function B(W){y(">"+W,!0)}function L(W,k){var V=d.length,O=Wn(k),U=h(),H=-1;O===g(Zt,!1,U)?H=++W%V:O===g(Jt,!1,U)?H=(--W+V)%V:O==="Home"?H=0:O==="End"&&(H=V-1);var f=d[H];f&&(So(f.button),y(">"+H),Pe(k,!0))}function h(){return n.paginationDirection||n.direction}function E(W){return d[p.toPage(W)]}function R(){var W=E(C(!0)),k=E(C());if(W){var V=W.button;Ne(V,Qe),Re(V,Kn),ee(V,ct,-1)}if(k){var O=k.button;Fe(O,Qe),ee(O,Kn,!0),ee(O,ct,"")}a(Oo,{list:T,items:d},W,k)}return{items:d,mount:m,destroy:$,getAt:E,update:R}}var Yi=[" ","Enter"];function Gi(e,t,n){var o=n.isNavigation,r=n.slideFocus,a=[];function i(){e.splides.forEach(function(s){s.isParent||(p(e,s.splide),p(s.splide,e))}),o&&u()}function c(){a.forEach(function(s){s.destroy()}),je(a)}function l(){c(),i()}function p(s,d){var T=de(s);T.on(ze,function(v,m,$){d.go(d.is(mt)?$:v)}),a.push(T)}function u(){var s=de(e),d=s.on;d(An,y),d(Bo,g),d([qe,Se],C),a.push(s),s.emit(kn,e.splides)}function C(){ee(t.Elements.list,Pn,n.direction===Qt?"vertical":"")}function y(s){e.go(s.index)}function g(s,d){_n(Yi,Wn(d))&&(y(s),Pe(d))}return{setup:se(t.Media.set,{slideFocus:Et(r)?o:r},!0),mount:i,destroy:c,remount:l}}function qi(e,t,n){var o=de(e),r=o.bind,a=0;function i(){n.wheel&&r(t.Elements.track,"wheel",c,at)}function c(p){if(p.cancelable){var u=p.deltaY,C=u<0,y=fn(p),g=n.wheelMinThreshold||0,s=n.wheelSleep||0;Ce(u)>g&&y-a>s&&(e.go(C?"<":">"),a=y),l(C)&&Pe(p)}}function l(p){return!n.releaseWheel||e.state.is(gt)||t.Controller.getAdjacent(p)!==-1}return{mount:i}}var Xi=90;function Ki(e,t,n){var o=de(e),r=o.on,a=t.Elements.track,i=n.live&&!n.isNavigation,c=st("span",fi),l=Xt(Xi,se(u,!1));function p(){i&&(y(!t.Autoplay.isPaused()),ee(a,Qn,!0),c.textContent="…",r(Fn,se(y,!0)),r(Rn,se(y,!1)),r([ft,et],se(u,!0)))}function u(g){ee(a,Zn,g),g?(At(a,c),l.start()):(Ze(c),l.cancel())}function C(){Re(a,[Jn,Qn,Zn]),Ze(c)}function y(g){i&&ee(a,Jn,g?"off":"polite")}return{mount:p,disable:y,destroy:C}}var Ji=Object.freeze({__proto__:null,Media:ii,Direction:ai,Elements:Si,Slides:Ci,Layout:$i,Clones:wi,Move:Ti,Controller:Ei,Arrows:Ii,Autoplay:Fi,Cover:Ri,Scroll:Wi,Drag:ji,Keyboard:Mi,LazyLoad:Hi,Pagination:Ui,Sync:Gi,Wheel:qi,Live:Ki}),Zi={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"},Qi={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:hi,i18n:Zi,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ea(e,t,n){var o=t.Slides;function r(){de(e).on([qe,he],a)}function a(){o.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function i(c,l){o.style("transition","opacity "+n.speed+"ms "+n.easing),yo(l)}return{mount:r,start:i,cancel:gn}}function ta(e,t,n){var o=t.Move,r=t.Controller,a=t.Scroll,i=t.Elements.list,c=se(Le,i,"transition"),l;function p(){de(e).bind(i,"transitionend",function(g){g.target===i&&l&&(C(),l())})}function u(g,s){var d=o.toPosition(g,!0),T=o.getPosition(),v=y(g);Ce(d-T)>=1&&v>=1?n.useScroll?a.scroll(d,v,!1,s):(c("transform "+v+"ms "+n.easing),o.translate(d,!0),l=s):(o.jump(g),s())}function C(){c(""),a.cancel()}function y(g){var s=n.rewindSpeed;if(e.is(dt)&&s){var d=r.getIndex(!0),T=r.getEnd();if(d===0&&g>=T||d>=T&&g===0)return s}return n.speed}return{mount:p,start:u,cancel:C}}var na=(function(){function e(n,o){this.event=de(),this.Components={},this.state=oi(lt),this.splides=[],this._o={},this._E={};var r=Ue(n)?Co(document,n):n;yt(r,r+" is invalid."),this.root=r,o=He({label:Ae(r,we)||"",labelledby:Ae(r,On)||""},Qi,e.defaults,o||{});try{He(o,JSON.parse(Ae(r,En)))}catch{yt(!1,"Invalid JSON")}this._o=Object.create(He({},o))}var t=e.prototype;return t.mount=function(o,r){var a=this,i=this.state,c=this.Components;yt(i.is([lt,zt]),"Already mounted!"),i.set(lt),this._C=c,this._T=r||this._T||(this.is(Rt)?ea:ta),this._E=o||this._E;var l=Ct({},Ji,this._E,{Transition:this._T});return Je(l,function(p,u){var C=p(a,c,a._o);c[u]=C,C.setup&&C.setup()}),Je(c,function(p){p.mount&&p.mount()}),this.emit(qe),Fe(this.root,mi),i.set(ut),this.emit(hn),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(ut)&&(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(Ge(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(he),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,a=this.state;return a.is(lt)?de(this).on(hn,this.destroy.bind(this,o)):(Je(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(In),r.destroy(),o&&je(this.splides),a.set(zt)),this},Zr(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})(),jn=na;jn.defaults={};jn.STATES=ei;var oo=[[qe,"onMounted"],[hn,"onReady"],[ze,"onMove"],[ft,"onMoved"],[An,"onClick"],[wo,"onActive"],[To,"onInactive"],[Eo,"onVisible"],[Lo,"onHidden"],[he,"onRefresh"],[Se,"onUpdated"],[pt,"onResize"],[Gt,"onResized"],[Ao,"onDrag"],[Io,"onDragging"],[ko,"onDragged"],[qt,"onScroll"],[et,"onScrolled"],[In,"onDestroy"],[Fo,"onArrowsMounted"],[Ro,"onArrowsUpdated"],[Vo,"onPaginationMounted"],[Oo,"onPaginationUpdated"],[kn,"onNavigationMounted"],[Fn,"onAutoplayPlay"],[Po,"onAutoplayPlaying"],[Rn,"onAutoplayPause"],[Vn,"onLazyLoadLoaded"]];function zn(...e){return e.filter(Boolean).join(" ")}function Ut(e){return e!==null&&typeof e=="object"}function Sn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!Sn(n,t[o]));if(Ut(e)&&Ut(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!Sn(e[r],t[r]))}return e===t}function oa(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function ra(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 xn(e,t){const n=e;return ra(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():Ut(o)?n[r]=xn(Ut(n[r])?n[r]:{},o):n[r]=o}),n}var ia=({children:e,className:t,...n})=>D.createElement("div",{className:zn("splide__track",t),...n},D.createElement("ul",{className:"splide__list"},e)),Zo=class extends D.Component{constructor(){super(...arguments),this.splideRef=D.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new jn(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=xn({},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&&!Sn(this.options,e)&&(this.splide.options=e,this.options=xn({},e));const t=this.getSlides();oa(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){oo.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 D.createElement(t,{className:zn("splide",e),ref:this.splideRef,...this.omit(r,["options",...oo.map(a=>a[1])])},n?D.createElement(ia,null,o):o)}},Qo=({children:e,className:t,...n})=>D.createElement("li",{className:zn("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),D=require("react"),de=require("classnames"),I=require("./useScopedStyles-Bibm8h9Z.js"),ar=require("react-dom");function lr(e){return e.type==="object"&&e.version===1}const sr="ControlSlider-module__wrapper___sHEkd",cr="ControlSlider-module__hoverArrow___A-dOH",ur="ControlSlider-module__sliderItem___QQSkR",pr="ControlSlider-module__sliderImage___9hRl-",dr="ControlSlider-module__arrow___05ghY",gr="ControlSlider-module__arrowVertical___tBfVN",fr="ControlSlider-module__nextArrow___-30Yc",mr="ControlSlider-module__arrowInner___aEra3",yr="ControlSlider-module__arrowIcon___S4ztF",hr="ControlSlider-module__arrowImg___2dwJW",vr="ControlSlider-module__mirror___brd6U",br="ControlSlider-module__pagination___bicLF",Sr="ControlSlider-module__paginationInner___bT-P-",xr="ControlSlider-module__paginationVertical___zYqKw",Cr="ControlSlider-module__paginationItem___nTRbk",$r="ControlSlider-module__dot___p1Qun",_r="ControlSlider-module__activeDot___LHFaj",wr="ControlSlider-module__paginationInsideBottom___R3FWn",Tr="ControlSlider-module__paginationInsideTop___V-qb-",Er="ControlSlider-module__paginationOutsideBottom___14w8D",Lr="ControlSlider-module__paginationOutsideTop___SCLqB",Ar="ControlSlider-module__paginationInsideLeft___yOBRZ",Ir="ControlSlider-module__paginationInsideRight___Rtt3o",kr="ControlSlider-module__paginationOutsideLeft___lahaw",Fr="ControlSlider-module__paginationOutsideRight___EtuQa",Rr="ControlSlider-module__imgWrapper___UjEgB",Vr="ControlSlider-module__captionBlock___dJ6-j",Or="ControlSlider-module__captionTextWrapper___HFlpf",Pr="ControlSlider-module__captionText___uGBVc",Br="ControlSlider-module__active___WZK4G",Nr="ControlSlider-module__withPointerEvents___t-18M",Wr="ControlSlider-module__topLeftAlignment___zjnGM",jr="ControlSlider-module__topCenterAlignment___gD1xW",zr="ControlSlider-module__topRightAlignment___NMapS",Mr="ControlSlider-module__middleLeftAlignment___OnUrY",Dr="ControlSlider-module__middleCenterAlignment___Tdkl0",Hr="ControlSlider-module__middleRightAlignment___wEbfX",Ur="ControlSlider-module__bottomLeftAlignment___cTP2-",Yr="ControlSlider-module__bottomCenterAlignment___c54fB",Gr="ControlSlider-module__bottomRightAlignment___kEwrz",qr="ControlSlider-module__clickOverlay___DZA28",Xr="ControlSlider-module__contain___pLyq7",Kr="ControlSlider-module__cover___KdDat",Y={wrapper:sr,hoverArrow:cr,sliderItem:ur,sliderImage:pr,arrow:dr,arrowVertical:gr,nextArrow:fr,arrowInner:mr,arrowIcon:yr,arrowImg:hr,mirror:vr,pagination:br,paginationInner:Sr,paginationVertical:xr,paginationItem:Cr,dot:$r,activeDot:_r,paginationInsideBottom:wr,paginationInsideTop:Tr,paginationOutsideBottom:Er,paginationOutsideTop:Lr,paginationInsideLeft:Ar,paginationInsideRight:Ir,paginationOutsideLeft:kr,paginationOutsideRight:Fr,imgWrapper:Rr,captionBlock:Vr,captionTextWrapper:Or,captionText:Pr,active:Br,withPointerEvents:Nr,topLeftAlignment:Wr,topCenterAlignment:jr,topRightAlignment:zr,middleLeftAlignment:Mr,middleCenterAlignment:Dr,middleRightAlignment:Hr,bottomLeftAlignment:Ur,bottomCenterAlignment:Yr,bottomRightAlignment:Gr,clickOverlay:qr,contain:Xr,cover:Kr};function Jr(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 Zr(e,t,n){return t&&Jr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Un="(prefers-reduced-motion: reduce)",ut=1,Qr=2,gt=3,yt=4,At=5,jt=6,Ht=7,ei={CREATED:ut,MOUNTED:Qr,IDLE:gt,MOVING:yt,SCROLLING:At,DRAGGING:jt,DESTROYED:Ht};function ze(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 ho=setTimeout,fn=function(){};function Yn(e){return requestAnimationFrame(e)}function Xt(e,t){return typeof t===e}function Ct(e){return!_n(e)&&Xt("object",e)}var $n=Array.isArray,vo=ue(Xt,"function"),qe=ue(Xt,"string"),It=ue(Xt,"undefined");function _n(e){return e===null}function bo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function kt(e){return $n(e)?e:[e]}function Te(e,t){kt(e).forEach(t)}function wn(e,t){return e.indexOf(t)>-1}function zt(e,t){return e.push.apply(e,kt(t)),e}function Ne(e,t,n){e&&Te(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function Fe(e,t){Ne(e,qe(t)?t.split(" "):t,!0)}function Ft(e,t){Te(t,e.appendChild.bind(e))}function Tn(e,t){Te(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function $t(e,t){return bo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function So(e,t){var n=e?Ke(e.children):[];return t?n.filter(function(o){return $t(o,t)}):n}function Rt(e,t){return t?So(e,t)[0]:e.firstElementChild}var _t=Object.keys;function et(e,t,n){return e&&(n?_t(e).reverse():_t(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function wt(e){return Ke(arguments,1).forEach(function(t){et(t,function(n,o){e[o]=t[o]})}),e}function Ge(e){return Ke(arguments,1).forEach(function(t){et(t,function(n,o){$n(n)?e[o]=n.slice():Ct(n)?e[o]=Ge({},Ct(e[o])?e[o]:{},n):e[o]=n})}),e}function Gn(e,t){Te(t||_t(e),function(n){delete e[n]})}function Re(e,t){Te(e,function(n){Te(t,function(o){n&&n.removeAttribute(o)})})}function ee(e,t,n){Ct(t)?et(t,function(o,r){ee(e,r,o)}):Te(e,function(o){_n(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):ee(o,t)),n&&Ft(n,o),o}function Ae(e,t,n){if(It(n))return getComputedStyle(e)[t];_n(n)||(e.style[t]=""+n)}function Tt(e,t){Ae(e,"display",t)}function xo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Ie(e,t){return e.getAttribute(t)}function qn(e,t){return e&&e.classList.contains(t)}function _e(e){return e.getBoundingClientRect()}function tt(e){Te(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Co(e){return Rt(new DOMParser().parseFromString(e,"text/html").body)}function Be(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function $o(e,t){return e&&e.querySelector(t)}function En(e,t){return t?Ke(e.querySelectorAll(t)):[]}function We(e,t){Ne(e,t,!1)}function mn(e){return e.timeStamp}function Qe(e){return qe(e)?e:e?e+"px":""}var Vt="splide",Ln="data-"+Vt;function bt(e,t){if(!e)throw new Error("["+Vt+"] "+(t||""))}var Xe=Math.min,Ut=Math.max,Yt=Math.floor,Et=Math.ceil,xe=Math.abs;function _o(e,t,n){return xe(e-t)<n}function Mt(e,t,n,o){var r=Xe(t,n),a=Ut(t,n);return o?r<e&&e<a:r<=e&&e<=a}function st(e,t,n){var o=Xe(t,n),r=Ut(t,n);return Xe(Ut(o,e),r)}function yn(e){return+(e>0)-+(e<0)}function hn(e,t){return Te(t,function(n){e=e.replace("%s",""+n)}),e}function An(e){return e<10?"0"+e:""+e}var Xn={};function ti(e){return""+e+An(Xn[e]=(Xn[e]||0)+1)}function wo(){var e=[];function t(i,c,l,p){r(i,c,function(u,C,h){var g="addEventListener"in u,s=g?u.removeEventListener.bind(u,C,l,p):u.removeListener.bind(u,l);g?u.addEventListener(C,l,p):u.addListener(l),e.push([u,C,h,l,s])})}function n(i,c,l){r(i,c,function(p,u,C){e=e.filter(function(h){return h[0]===p&&h[1]===u&&h[2]===C&&(!l||h[3]===l)?(h[4](),!1):!0})})}function o(i,c,l){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(c,{bubbles:u,detail:l}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(c,u,!1,l)),i.dispatchEvent(p),p}function r(i,c,l){Te(i,function(p){p&&Te(c,function(u){u.split(" ").forEach(function(C){var h=C.split(".");l(p,h[0],h[1])})})})}function a(){e.forEach(function(i){i[4]()}),ze(e)}return{bind:t,unbind:n,dispatch:o,destroy:a}}var Je="mounted",vn="ready",Me="move",ht="moved",In="click",To="active",Eo="inactive",Lo="visible",Ao="hidden",he="refresh",be="updated",ft="resize",Kt="resized",Io="drag",ko="dragging",Fo="dragged",Jt="scroll",ot="scrolled",ni="overflow",kn="destroy",Ro="arrows:mounted",Vo="arrows:updated",Oo="pagination:mounted",Po="pagination:updated",Fn="navigation:mounted",Rn="autoplay:play",Bo="autoplay:playing",Vn="autoplay:pause",On="lazyload:loaded",No="sk",Wo="sh",Gt="ei";function ge(e){var t=e?e.event.bus:document.createDocumentFragment(),n=wo();function o(a,i){n.bind(t,kt(a).join(" "),function(c){i.apply(i,$n(c.detail)?c.detail:[])})}function r(a){n.dispatch(t,a,Ke(arguments,1))}return e&&e.event.on(kn,n.destroy),wt(n,{bus:t,on:o,off:ue(n.unbind,t),emit:r})}function Zt(e,t,n,o){var r=Date.now,a,i=0,c,l=!0,p=0;function u(){if(!l){if(i=e?Xe((r()-a)/e,1):1,n&&n(i),i>=1&&(t(),a=r(),o&&++p>=o))return h();c=Yn(u)}}function C(b){b||s(),a=r()-(b?i*e:0),l=!1,c=Yn(u)}function h(){l=!0}function g(){a=r(),i=0,n&&n(i)}function s(){c&&cancelAnimationFrame(c),i=0,c=0,l=!0}function d(b){e=b}function T(){return l}return{start:C,rewind:g,pause:h,cancel:s,set:d,isPaused:T}}function oi(e){var t=e;function n(r){t=r}function o(r){return wn(kt(r),t)}return{set:n,is:o}}function ri(e,t){var n=Zt(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ii(e,t,n){var o=e.state,r=n.breakpoints||{},a=n.reducedMotion||{},i=wo(),c=[];function l(){var s=n.mediaQuery==="min";_t(r).sort(function(d,T){return s?+d-+T:+T-+d}).forEach(function(d){u(r[d],"("+(s?"min":"max")+"-width:"+d+"px)")}),u(a,Un),C()}function p(s){s&&i.destroy()}function u(s,d){var T=matchMedia(d);i.bind(T,"change",C),c.push([s,T])}function C(){var s=o.is(Ht),d=n.direction,T=c.reduce(function(b,y){return Ge(b,y[1].matches?y[0]:{})},{});Gn(n),g(T),n.destroy?e.destroy(n.destroy==="completely"):s?(p(!0),e.mount()):d!==n.direction&&e.refresh()}function h(s){matchMedia(Un).matches&&(s?Ge(n,a):Gn(n,_t(a)))}function g(s,d,T){Ge(n,s),d&&Ge(Object.getPrototypeOf(n),s),(T||!o.is(ut))&&e.emit(be,n)}return{setup:l,destroy:p,reduce:h,set:g}}var Qt="Arrow",en=Qt+"Left",tn=Qt+"Right",jo=Qt+"Up",zo=Qt+"Down",Kn="rtl",nn="ttb",ln={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[jo,tn],ArrowRight:[zo,en]};function ai(e,t,n){function o(a,i,c){c=c||n.direction;var l=c===Kn&&!i?1:c===nn?0:-1;return ln[a]&&ln[a][l]||a.replace(/width|left|right/i,function(p,u){var C=ln[p.toLowerCase()][l]||p;return u>0?C.charAt(0).toUpperCase()+C.slice(1):C})}function r(a){return a*(n.direction===Kn?1:-1)}return{resolve:o,orient:r}}var je="role",dt="tabindex",li="disabled",ke="aria-",Ot=ke+"controls",Mo=ke+"current",Jn=ke+"selected",we=ke+"label",Pn=ke+"labelledby",Do=ke+"hidden",Bn=ke+"orientation",Lt=ke+"roledescription",Zn=ke+"live",Qn=ke+"busy",eo=ke+"atomic",Nn=[je,dt,li,Ot,Mo,we,Pn,Do,Bn,Lt],Ve=Vt+"__",Ze="is-",sn=Vt,to=Ve+"track",si=Ve+"list",on=Ve+"slide",Ho=on+"--clone",ci=on+"__container",Wn=Ve+"arrows",rn=Ve+"arrow",Uo=rn+"--prev",Yo=rn+"--next",an=Ve+"pagination",Go=an+"__page",ui=Ve+"progress",pi=ui+"__bar",di=Ve+"toggle",gi=Ve+"spinner",fi=Ve+"sr",mi=Ze+"initialized",nt=Ze+"active",qo=Ze+"prev",Xo=Ze+"next",bn=Ze+"visible",Sn=Ze+"loading",Ko=Ze+"focus-in",Jo=Ze+"overflow",yi=[nt,bn,qo,Xo,Sn,Ko,Jo],hi={slide:on,clone:Ho,arrows:Wn,arrow:rn,prev:Uo,next:Yo,pagination:an,page:Go,spinner:gi};function vi(e,t){if(vo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!$t(n,t);)n=n.parentElement;return n}var bi=5,no=200,Zo="touchstart mousedown",cn="touchmove mousemove",un="touchend touchcancel mouseup click";function Si(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=e.root,c=n.i18n,l={},p=[],u=[],C=[],h,g,s;function d(){$(),j(),y()}function T(){r(he,b),r(he,d),r(be,y),a(document,Zo+" keydown",function(v){s=v.type==="keydown"},{capture:!0}),a(i,"focusin",function(){Ne(i,Ko,!!s)})}function b(v){var E=Nn.concat("style");ze(p),We(i,u),We(h,C),Re([h,g],E),Re(i,v?E:["style",Lt])}function y(){We(i,u),We(h,C),u=L(sn),C=L(to),Fe(i,u),Fe(h,C),ee(i,we,n.label),ee(i,Pn,n.labelledby)}function $(){h=B("."+to),g=Rt(h,"."+si),bt(h&&g,"A track/list element is missing."),zt(p,So(g,"."+on+":not(."+Ho+")")),et({arrows:Wn,pagination:an,prev:Uo,next:Yo,bar:pi,toggle:di},function(v,E){l[E]=B("."+v)}),wt(l,{root:i,track:h,list:g,slides:p})}function j(){var v=i.id||ti(Vt),E=n.role;i.id=v,h.id=h.id||v+"-track",g.id=g.id||v+"-list",!Ie(i,je)&&i.tagName!=="SECTION"&&E&&ee(i,je,E),ee(i,Lt,c.carousel),ee(g,je,"presentation")}function B(v){var E=$o(i,v);return E&&vi(E,"."+sn)===i?E:void 0}function L(v){return[v+"--"+n.type,v+"--"+n.direction,n.drag&&v+"--draggable",n.isNavigation&&v+"--nav",v===sn&&nt]}return wt(l,{setup:d,mount:T,destroy:b})}var mt="slide",vt="loop",Pt="fade";function xi(e,t,n,o){var r=ge(e),a=r.on,i=r.emit,c=r.bind,l=e.Components,p=e.root,u=e.options,C=u.isNavigation,h=u.updateOnMove,g=u.i18n,s=u.pagination,d=u.slideFocus,T=l.Direction.resolve,b=Ie(o,"style"),y=Ie(o,we),$=n>-1,j=Rt(o,"."+ci),B;function L(){$||(o.id=p.id+"-slide"+An(t+1),ee(o,je,s?"tabpanel":"group"),ee(o,Lt,g.slide),ee(o,we,y||hn(g.slideLabel,[t+1,e.length]))),v()}function v(){c(o,"click",ue(i,In,_)),c(o,"keydown",ue(i,No,_)),a([ht,Wo,ot],k),a(Fn,R),h&&a(Me,W)}function E(){B=!0,r.destroy(),We(o,yi),Re(o,Nn),ee(o,"style",b),ee(o,we,y||"")}function R(){var w=e.splides.map(function(x){var P=x.splide.Components.Slides.getAt(t);return P?P.slide.id:""}).join(" ");ee(o,we,hn(g.slideX,($?n:t)+1)),ee(o,Ot,w),ee(o,je,d?"button":""),d&&Re(o,Lt)}function W(){B||k()}function k(){if(!B){var w=e.index;V(),O(),Ne(o,qo,t===w-1),Ne(o,Xo,t===w+1)}}function V(){var w=H();w!==qn(o,nt)&&(Ne(o,nt,w),ee(o,Mo,C&&w||""),i(w?To:Eo,_))}function O(){var w=m(),x=!w&&(!H()||$);if(e.state.is([yt,At])||ee(o,Do,x||""),ee(En(o,u.focusableNodes||""),dt,x?-1:""),d&&ee(o,dt,x?-1:0),w!==qn(o,bn)&&(Ne(o,bn,w),i(w?Lo:Ao,_)),!w&&document.activeElement===o){var P=l.Slides.getAt(e.index);P&&xo(P.slide)}}function U(w,x,P){Ae(P&&j||o,w,x)}function H(){var w=e.index;return w===t||u.cloneStatus&&w===n}function m(){if(e.is(Pt))return H();var w=_e(l.Elements.track),x=_e(o),P=T("left",!0),q=T("right",!0);return Yt(w[P])<=Et(x[P])&&Yt(x[q])<=Et(w[q])}function F(w,x){var P=xe(w-t);return!$&&(u.rewind||e.is(vt))&&(P=Xe(P,e.length-P)),P<=x}var _={index:t,slideIndex:n,slide:o,container:j,isClone:$,mount:L,destroy:E,update:k,style:U,isWithin:F};return _}function Ci(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=o.bind,c=t.Elements,l=c.slides,p=c.list,u=[];function C(){h(),r(he,g),r(he,h)}function h(){l.forEach(function(k,V){d(k,V,-1)})}function g(){B(function(k){k.destroy()}),ze(u)}function s(){B(function(k){k.update()})}function d(k,V,O){var U=xi(e,V,O,k);U.mount(),u.push(U),u.sort(function(H,m){return H.index-m.index})}function T(k){return k?L(function(V){return!V.isClone}):u}function b(k){var V=t.Controller,O=V.toIndex(k),U=V.hasFocus()?1:n.perPage;return L(function(H){return Mt(H.index,O,O+U-1)})}function y(k){return L(k)[0]}function $(k,V){Te(k,function(O){if(qe(O)&&(O=Co(O)),bo(O)){var U=l[V];U?Tn(O,U):Ft(p,O),Fe(O,n.classes.slide),E(O,ue(a,ft))}}),a(he)}function j(k){tt(L(k).map(function(V){return V.slide})),a(he)}function B(k,V){T(V).forEach(k)}function L(k){return u.filter(vo(k)?k:function(V){return qe(k)?$t(V.slide,k):wn(kt(k),V.index)})}function v(k,V,O){B(function(U){U.style(k,V,O)})}function E(k,V){var O=En(k,"img"),U=O.length;U?O.forEach(function(H){i(H,"load error",function(){--U||V()})}):V()}function R(k){return k?l.length:u.length}function W(){return u.length>n.perPage}return{mount:C,destroy:g,update:s,register:d,get:T,getIn:b,getAt:y,add:$,remove:j,forEach:B,filter:L,style:v,getLength:R,isEnough:W}}function $i(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=o.emit,c=t.Slides,l=t.Direction.resolve,p=t.Elements,u=p.root,C=p.track,h=p.list,g=c.getAt,s=c.style,d,T,b;function y(){$(),a(window,"resize load",ri(ue(i,ft))),r([be,he],$),r(ft,j)}function $(){d=n.direction===nn,Ae(u,"maxWidth",Qe(n.width)),Ae(C,l("paddingLeft"),B(!1)),Ae(C,l("paddingRight"),B(!0)),j(!0)}function j(_){var w=_e(u);(_||T.width!==w.width||T.height!==w.height)&&(Ae(C,"height",L()),s(l("marginRight"),Qe(n.gap)),s("width",E()),s("height",R(),!0),T=w,i(Kt),b!==(b=F())&&(Ne(u,Jo,b),i(ni,b)))}function B(_){var w=n.padding,x=l(_?"right":"left");return w&&Qe(w[x]||(Ct(w)?0:w))||"0px"}function L(){var _="";return d&&(_=v(),bt(_,"height or heightRatio is missing."),_="calc("+_+" - "+B(!1)+" - "+B(!0)+")"),_}function v(){return Qe(n.height||_e(h).width*n.heightRatio)}function E(){return n.autoWidth?null:Qe(n.fixedWidth)||(d?"":W())}function R(){return Qe(n.fixedHeight)||(d?n.autoHeight?null:W():v())}function W(){var _=Qe(n.gap);return"calc((100%"+(_&&" + "+_)+")/"+(n.perPage||1)+(_&&" - "+_)+")"}function k(){return _e(h)[l("width")]}function V(_,w){var x=g(_||0);return x?_e(x.slide)[l("width")]+(w?0:H()):0}function O(_,w){var x=g(_);if(x){var P=_e(x.slide)[l("right")],q=_e(h)[l("left")];return xe(P-q)+(w?0:H())}return 0}function U(_){return O(e.length-1)-O(0)+V(0,_)}function H(){var _=g(0);return _&&parseFloat(Ae(_.slide,l("marginRight")))||0}function m(_){return parseFloat(Ae(C,l("padding"+(_?"Right":"Left"))))||0}function F(){return e.is(Pt)||U(!0)>k()}return{mount:y,resize:j,listSize:k,slideSize:V,sliderSize:U,totalSize:O,getPadding:m,isOverflow:F}}var _i=2;function wi(e,t,n){var o=ge(e),r=o.on,a=t.Elements,i=t.Slides,c=t.Direction.resolve,l=[],p;function u(){r(he,C),r([be,ft],g),(p=T())&&(s(p),t.Layout.resize(!0))}function C(){h(),u()}function h(){tt(l),ze(l),o.destroy()}function g(){var b=T();p!==b&&(p<b||!b)&&o.emit(he)}function s(b){var y=i.get().slice(),$=y.length;if($){for(;y.length<b;)zt(y,y);zt(y.slice(-b),y.slice(0,b)).forEach(function(j,B){var L=B<b,v=d(j.slide,B);L?Tn(v,y[0].slide):Ft(a.list,v),zt(l,v),i.register(v,B-b+(L?0:$),j.index)})}}function d(b,y){var $=b.cloneNode(!0);return Fe($,n.classes.clone),$.id=e.root.id+"-clone"+An(y+1),$}function T(){var b=n.clones;if(!e.is(vt))b=0;else if(It(b)){var y=n[c("fixedWidth")]&&t.Layout.slideSize(0),$=y&&Et(_e(a.track)[c("width")]/y);b=$||n[c("autoWidth")]&&e.length||n.perPage*_i}return b}return{mount:u,destroy:h}}function Ti(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=e.state.set,c=t.Layout,l=c.slideSize,p=c.getPadding,u=c.totalSize,C=c.listSize,h=c.sliderSize,g=t.Direction,s=g.resolve,d=g.orient,T=t.Elements,b=T.list,y=T.track,$;function j(){$=t.Transition,r([Je,Kt,be,he],B)}function B(){t.Controller.isBusy()||(t.Scroll.cancel(),v(e.index),t.Slides.update())}function L(x,P,q,oe){x!==P&&_(x>q)&&(k(),E(W(U(),x>q),!0)),i(yt),a(Me,P,q,x),$.start(P,function(){i(gt),a(ht,P,q,x),oe&&oe()})}function v(x){E(O(x,!0))}function E(x,P){if(!e.is(Pt)){var q=P?x:R(x);Ae(b,"transform","translate"+s("X")+"("+q+"px)"),x!==q&&a(Wo)}}function R(x){if(e.is(vt)){var P=V(x),q=P>t.Controller.getEnd(),oe=P<0;(oe||q)&&(x=W(x,q))}return x}function W(x,P){var q=x-F(P),oe=h();return x-=d(oe*(Et(xe(q)/oe)||1))*(P?1:-1),x}function k(){E(U(),!0),$.cancel()}function V(x){for(var P=t.Slides.get(),q=0,oe=1/0,te=0;te<P.length;te++){var se=P[te].index,A=xe(O(se,!0)-x);if(A<=oe)oe=A,q=se;else break}return q}function O(x,P){var q=d(u(x-1)-m(x));return P?H(q):q}function U(){var x=s("left");return _e(b)[x]-_e(y)[x]+d(p(!1))}function H(x){return n.trimSpace&&e.is(mt)&&(x=st(x,0,d(h(!0)-C()))),x}function m(x){var P=n.focus;return P==="center"?(C()-l(x,!0))/2:+P*l(x)||0}function F(x){return O(x?t.Controller.getEnd():0,!!n.trimSpace)}function _(x){var P=d(W(U(),x));return x?P>=0:P<=b[s("scrollWidth")]-_e(y)[s("width")]}function w(x,P){P=It(P)?U():P;var q=x!==!0&&d(P)<d(F(!1)),oe=x!==!1&&d(P)>d(F(!0));return q||oe}return{mount:j,move:L,jump:v,translate:E,shift:W,cancel:k,toIndex:V,toPosition:O,getPosition:U,getLimit:F,exceededLimit:w,reposition:B}}function Ei(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=t.Move,c=i.getPosition,l=i.getLimit,p=i.toPosition,u=t.Slides,C=u.isEnough,h=u.getLength,g=n.omitEnd,s=e.is(vt),d=e.is(mt),T=ue(U,!1),b=ue(U,!0),y=n.start||0,$,j=y,B,L,v;function E(){R(),r([be,he,Gt],R),r(Kt,W)}function R(){B=h(!0),L=n.perMove,v=n.perPage,$=_();var A=st(y,0,g?$:B-1);A!==y&&(y=A,i.reposition())}function W(){$!==_()&&a(Gt)}function k(A,J,ye){if(!se()){var ae=O(A),me=F(ae);me>-1&&(J||me!==y)&&(q(me),i.move(ae,me,j,ye))}}function V(A,J,ye,ae){t.Scroll.scroll(A,J,ye,function(){var me=F(i.toIndex(c()));q(g?Xe(me,$):me),ae&&ae()})}function O(A){var J=y;if(qe(A)){var ye=A.match(/([+\-<>])(\d+)?/)||[],ae=ye[1],me=ye[2];ae==="+"||ae==="-"?J=H(y+ +(""+ae+(+me||1)),y):ae===">"?J=me?w(+me):T(!0):ae==="<"&&(J=b(!0))}else J=s?A:st(A,0,$);return J}function U(A,J){var ye=L||(te()?1:v),ae=H(y+ye*(A?-1:1),y,!(L||te()));return ae===-1&&d&&!_o(c(),l(!A),1)?A?0:$:J?ae:F(ae)}function H(A,J,ye){if(C()||te()){var ae=m(A);ae!==A&&(J=A,A=ae,ye=!1),A<0||A>$?!L&&(Mt(0,A,J,!0)||Mt($,J,A,!0))?A=w(x(A)):s?A=ye?A<0?-(B%v||v):B:A:n.rewind?A=A<0?$:0:A=-1:ye&&A!==J&&(A=w(x(J)+(A<J?-1:1)))}else A=-1;return A}function m(A){if(d&&n.trimSpace==="move"&&A!==y)for(var J=c();J===p(A,!0)&&Mt(A,0,e.length-1,!n.rewind);)A<y?--A:++A;return A}function F(A){return s?(A+B)%B||0:A}function _(){for(var A=B-(te()||s&&L?1:v);g&&A-- >0;)if(p(B-1,!0)!==p(A,!0)){A++;break}return st(A,0,B-1)}function w(A){return st(te()?A:v*A,0,$)}function x(A){return te()?Xe(A,$):Yt((A>=$?B-1:A)/v)}function P(A){var J=i.toIndex(A);return d?st(J,0,$):J}function q(A){A!==y&&(j=y,y=A)}function oe(A){return A?j:y}function te(){return!It(n.focus)||n.isNavigation}function se(){return e.state.is([yt,At])&&!!n.waitForTransition}return{mount:E,go:k,scroll:V,getNext:T,getPrev:b,getAdjacent:U,getEnd:_,setIndex:q,getIndex:oe,toIndex:w,toPage:x,toDest:P,hasFocus:te,isBusy:se}}var Li="http://www.w3.org/2000/svg",Ai="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",Bt=40;function Ii(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=o.emit,c=n.classes,l=n.i18n,p=t.Elements,u=t.Controller,C=p.arrows,h=p.track,g=C,s=p.prev,d=p.next,T,b,y={};function $(){B(),r(be,j)}function j(){L(),$()}function B(){var V=n.arrows;V&&!(s&&d)&&R(),s&&d&&(wt(y,{prev:s,next:d}),Tt(g,V?"":"none"),Fe(g,b=Wn+"--"+n.direction),V&&(v(),k(),ee([s,d],Ot,h.id),i(Ro,s,d)))}function L(){o.destroy(),We(g,b),T?(tt(C?[s,d]:g),s=d=null):Re([s,d],Nn)}function v(){r([Je,ht,he,ot,Gt],k),a(d,"click",ue(E,">")),a(s,"click",ue(E,"<"))}function E(V){u.go(V,!0)}function R(){g=C||pt("div",c.arrows),s=W(!0),d=W(!1),T=!0,Ft(g,[s,d]),!C&&Tn(g,h)}function W(V){var O='<button class="'+c.arrow+" "+(V?c.prev:c.next)+'" type="button"><svg xmlns="'+Li+'" viewBox="0 0 '+Bt+" "+Bt+'" width="'+Bt+'" height="'+Bt+'" focusable="false"><path d="'+(n.arrowPath||Ai)+'" />';return Co(O)}function k(){if(s&&d){var V=e.index,O=u.getPrev(),U=u.getNext(),H=O>-1&&V<O?l.last:l.prev,m=U>-1&&V>U?l.first:l.next;s.disabled=O<0,d.disabled=U<0,ee(s,we,H),ee(d,we,m),i(Vo,s,d,O,U)}}return{arrows:y,mount:$,destroy:L,update:k}}var ki=Ln+"-interval";function Fi(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=o.emit,c=Zt(n.interval,e.go.bind(e,">"),v),l=c.isPaused,p=t.Elements,u=t.Elements,C=u.root,h=u.toggle,g=n.autoplay,s,d,T=g==="pause";function b(){g&&(y(),h&&ee(h,Ot,p.track.id),T||$(),L())}function y(){n.pauseOnHover&&a(C,"mouseenter mouseleave",function(R){s=R.type==="mouseenter",B()}),n.pauseOnFocus&&a(C,"focusin focusout",function(R){d=R.type==="focusin",B()}),h&&a(h,"click",function(){T?$():j(!0)}),r([Me,Jt,he],c.rewind),r(Me,E)}function $(){l()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),d=s=T=!1,L(),i(Rn))}function j(R){R===void 0&&(R=!0),T=!!R,L(),l()||(c.pause(),i(Vn))}function B(){T||(s||d?j(!1):$())}function L(){h&&(Ne(h,nt,!T),ee(h,we,n.i18n[T?"play":"pause"]))}function v(R){var W=p.bar;W&&Ae(W,"width",R*100+"%"),i(Bo,R)}function E(R){var W=t.Slides.getAt(R);c.set(W&&+Ie(W.slide,ki)||n.interval)}return{mount:b,destroy:c.cancel,play:$,pause:j,isPaused:l}}function Ri(e,t,n){var o=ge(e),r=o.on;function a(){n.cover&&(r(On,ue(c,!0)),r([Je,be,he],ue(i,!0)))}function i(l){t.Slides.forEach(function(p){var u=Rt(p.container||p.slide,"img");u&&u.src&&c(l,u,p)})}function c(l,p,u){u.style("background",l?'center/cover no-repeat url("'+p.src+'")':"",!0),Tt(p,l?"none":"")}return{mount:a,destroy:ue(i,!1)}}var Vi=10,Oi=600,Pi=.6,Bi=1.5,Ni=800;function Wi(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=e.state.set,c=t.Move,l=c.getPosition,p=c.getLimit,u=c.exceededLimit,C=c.translate,h=e.is(mt),g,s,d=1;function T(){r(Me,j),r([be,he],B)}function b(v,E,R,W,k){var V=l();if(j(),R&&(!h||!u())){var O=t.Layout.sliderSize(),U=yn(v)*O*Yt(xe(v)/O)||0;v=c.toPosition(t.Controller.toDest(v%O))+U}var H=_o(V,v,1);d=1,E=H?0:E||Ut(xe(v-V)/Bi,Ni),s=W,g=Zt(E,y,ue($,V,v,k),1),i(At),a(Jt),g.start()}function y(){i(gt),s&&s(),a(ot)}function $(v,E,R,W){var k=l(),V=v+(E-v)*L(W),O=(V-k)*d;C(k+O),h&&!R&&u()&&(d*=Pi,xe(O)<Vi&&b(p(u(!0)),Oi,!1,s,!0))}function j(){g&&g.cancel()}function B(){g&&!g.isPaused()&&(j(),y())}function L(v){var E=n.easingFunc;return E?E(v):1-Math.pow(1-v,4)}return{mount:T,destroy:j,scroll:b,cancel:B}}var ct={passive:!1,capture:!0};function ji(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=o.bind,c=o.unbind,l=e.state,p=t.Move,u=t.Scroll,C=t.Controller,h=t.Elements.track,g=t.Media.reduce,s=t.Direction,d=s.resolve,T=s.orient,b=p.getPosition,y=p.exceededLimit,$,j,B,L,v,E=!1,R,W,k;function V(){i(h,cn,fn,ct),i(h,un,fn,ct),i(h,Zo,U,ct),i(h,"click",F,{capture:!0}),i(h,"dragstart",Be),r([Je,be],O)}function O(){var z=n.drag;Pe(!z),L=z==="free"}function U(z){if(R=!1,!W){var f=me(z);ae(z.target)&&(f||!z.button)&&(C.isBusy()?Be(z,!0):(k=f?h:window,v=l.is([yt,At]),B=null,i(k,cn,H,ct),i(k,un,m,ct),p.cancel(),u.cancel(),_(z)))}}function H(z){if(l.is(jt)||(l.set(jt),a(Io)),z.cancelable)if(v){p.translate($+ye(te(z)));var f=se(z)>no,M=E!==(E=y());(f||M)&&_(z),R=!0,a(ko),Be(z)}else P(z)&&(v=x(z),Be(z))}function m(z){l.is(jt)&&(l.set(gt),a(Fo)),v&&(w(z),Be(z)),c(k,cn,H),c(k,un,m),v=!1}function F(z){!W&&R&&Be(z,!0)}function _(z){B=j,j=z,$=b()}function w(z){var f=q(z),M=oe(f),X=n.rewind&&n.rewindByDrag;g(!1),L?C.scroll(M,0,n.snap):e.is(Pt)?C.go(T(yn(f))<0?X?"<":"-":X?">":"+"):e.is(mt)&&E&&X?C.go(y(!0)?">":"<"):C.go(C.toDest(M),!0),g(!0)}function x(z){var f=n.dragMinThreshold,M=Ct(f),X=M&&f.mouse||0,G=(M?f.touch:+f)||10;return xe(te(z))>(me(z)?G:X)}function P(z){return xe(te(z))>xe(te(z,!0))}function q(z){if(e.is(vt)||!E){var f=se(z);if(f&&f<no)return te(z)/f}return 0}function oe(z){return b()+yn(z)*Xe(xe(z)*(n.flickPower||600),L?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function te(z,f){return J(z,f)-J(A(z),f)}function se(z){return mn(z)-mn(A(z))}function A(z){return j===z&&B||j}function J(z,f){return(me(z)?z.changedTouches[0]:z)["page"+d(f?"Y":"X")]}function ye(z){return z/(E&&e.is(mt)?bi:1)}function ae(z){var f=n.noDrag;return!$t(z,"."+Go+", ."+rn)&&(!f||!$t(z,f))}function me(z){return typeof TouchEvent<"u"&&z instanceof TouchEvent}function Oe(){return v}function Pe(z){W=z}return{mount:V,disable:Pe,isDragging:Oe}}var zi={Spacebar:" ",Right:tn,Left:en,Up:jo,Down:zo};function jn(e){return e=qe(e)?e:e.key,zi[e]||e}var oo="keydown";function Mi(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=o.unbind,c=e.root,l=t.Direction.resolve,p,u;function C(){h(),r(be,g),r(be,h),r(Me,d)}function h(){var b=n.keyboard;b&&(p=b==="global"?window:c,a(p,oo,T))}function g(){i(p,oo)}function s(b){u=b}function d(){var b=u;u=!0,ho(function(){u=b})}function T(b){if(!u){var y=jn(b);y===l(en)?e.go("<"):y===l(tn)&&e.go(">")}}return{mount:C,destroy:g,disable:s}}var St=Ln+"-lazy",Dt=St+"-srcset",Di="["+St+"], ["+Dt+"]";function Hi(e,t,n){var o=ge(e),r=o.on,a=o.off,i=o.bind,c=o.emit,l=n.lazyLoad==="sequential",p=[ht,ot],u=[];function C(){n.lazyLoad&&(h(),r(he,h))}function h(){ze(u),g(),l?b():(a(p),r(p,s),s())}function g(){t.Slides.forEach(function(y){En(y.slide,Di).forEach(function($){var j=Ie($,St),B=Ie($,Dt);if(j!==$.src||B!==$.srcset){var L=n.classes.spinner,v=$.parentElement,E=Rt(v,"."+L)||pt("span",L,v);u.push([$,y,E]),$.src||Tt($,"none")}})})}function s(){u=u.filter(function(y){var $=n.perPage*((n.preloadPages||1)+1)-1;return y[1].isWithin(e.index,$)?d(y):!0}),u.length||a(p)}function d(y){var $=y[0];Fe(y[1].slide,Sn),i($,"load error",ue(T,y)),ee($,"src",Ie($,St)),ee($,"srcset",Ie($,Dt)),Re($,St),Re($,Dt)}function T(y,$){var j=y[0],B=y[1];We(B.slide,Sn),$.type!=="error"&&(tt(y[2]),Tt(j,""),c(On,j,B),c(ft)),l&&b()}function b(){u.length&&d(u.shift())}return{mount:C,destroy:ue(ze,u),check:s}}function Ui(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=o.bind,c=t.Slides,l=t.Elements,p=t.Controller,u=p.hasFocus,C=p.getIndex,h=p.go,g=t.Direction.resolve,s=l.pagination,d=[],T,b;function y(){$(),r([be,he,Gt],y);var W=n.pagination;s&&Tt(s,W?"":"none"),W&&(r([Me,Jt,ot],R),j(),R(),a(Oo,{list:T,items:d},E(e.index)))}function $(){T&&(tt(s?Ke(T.children):T),We(T,b),ze(d),T=null),o.destroy()}function j(){var W=e.length,k=n.classes,V=n.i18n,O=n.perPage,U=u()?p.getEnd()+1:Et(W/O);T=s||pt("ul",k.pagination,l.track.parentElement),Fe(T,b=an+"--"+v()),ee(T,je,"tablist"),ee(T,we,V.select),ee(T,Bn,v()===nn?"vertical":"");for(var H=0;H<U;H++){var m=pt("li",null,T),F=pt("button",{class:k.page,type:"button"},m),_=c.getIn(H).map(function(x){return x.slide.id}),w=!u()&&O>1?V.pageX:V.slideX;i(F,"click",ue(B,H)),n.paginationKeyboard&&i(F,"keydown",ue(L,H)),ee(m,je,"presentation"),ee(F,je,"tab"),ee(F,Ot,_.join(" ")),ee(F,we,hn(w,H+1)),ee(F,dt,-1),d.push({li:m,button:F,page:H})}}function B(W){h(">"+W,!0)}function L(W,k){var V=d.length,O=jn(k),U=v(),H=-1;O===g(tn,!1,U)?H=++W%V:O===g(en,!1,U)?H=(--W+V)%V:O==="Home"?H=0:O==="End"&&(H=V-1);var m=d[H];m&&(xo(m.button),h(">"+H),Be(k,!0))}function v(){return n.paginationDirection||n.direction}function E(W){return d[p.toPage(W)]}function R(){var W=E(C(!0)),k=E(C());if(W){var V=W.button;We(V,nt),Re(V,Jn),ee(V,dt,-1)}if(k){var O=k.button;Fe(O,nt),ee(O,Jn,!0),ee(O,dt,"")}a(Po,{list:T,items:d},W,k)}return{items:d,mount:y,destroy:$,getAt:E,update:R}}var Yi=[" ","Enter"];function Gi(e,t,n){var o=n.isNavigation,r=n.slideFocus,a=[];function i(){e.splides.forEach(function(s){s.isParent||(p(e,s.splide),p(s.splide,e))}),o&&u()}function c(){a.forEach(function(s){s.destroy()}),ze(a)}function l(){c(),i()}function p(s,d){var T=ge(s);T.on(Me,function(b,y,$){d.go(d.is(vt)?$:b)}),a.push(T)}function u(){var s=ge(e),d=s.on;d(In,h),d(No,g),d([Je,be],C),a.push(s),s.emit(Fn,e.splides)}function C(){ee(t.Elements.list,Bn,n.direction===nn?"vertical":"")}function h(s){e.go(s.index)}function g(s,d){wn(Yi,jn(d))&&(h(s),Be(d))}return{setup:ue(t.Media.set,{slideFocus:It(r)?o:r},!0),mount:i,destroy:c,remount:l}}function qi(e,t,n){var o=ge(e),r=o.bind,a=0;function i(){n.wheel&&r(t.Elements.track,"wheel",c,ct)}function c(p){if(p.cancelable){var u=p.deltaY,C=u<0,h=mn(p),g=n.wheelMinThreshold||0,s=n.wheelSleep||0;xe(u)>g&&h-a>s&&(e.go(C?"<":">"),a=h),l(C)&&Be(p)}}function l(p){return!n.releaseWheel||e.state.is(yt)||t.Controller.getAdjacent(p)!==-1}return{mount:i}}var Xi=90;function Ki(e,t,n){var o=ge(e),r=o.on,a=t.Elements.track,i=n.live&&!n.isNavigation,c=pt("span",fi),l=Zt(Xi,ue(u,!1));function p(){i&&(h(!t.Autoplay.isPaused()),ee(a,eo,!0),c.textContent="…",r(Rn,ue(h,!0)),r(Vn,ue(h,!1)),r([ht,ot],ue(u,!0)))}function u(g){ee(a,Qn,g),g?(Ft(a,c),l.start()):(tt(c),l.cancel())}function C(){Re(a,[Zn,eo,Qn]),tt(c)}function h(g){i&&ee(a,Zn,g?"off":"polite")}return{mount:p,disable:h,destroy:C}}var Ji=Object.freeze({__proto__:null,Media:ii,Direction:ai,Elements:Si,Slides:Ci,Layout:$i,Clones:wi,Move:Ti,Controller:Ei,Arrows:Ii,Autoplay:Fi,Cover:Ri,Scroll:Wi,Drag:ji,Keyboard:Mi,LazyLoad:Hi,Pagination:Ui,Sync:Gi,Wheel:qi,Live:Ki}),Zi={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"},Qi={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:hi,i18n:Zi,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ea(e,t,n){var o=t.Slides;function r(){ge(e).on([Je,he],a)}function a(){o.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function i(c,l){o.style("transition","opacity "+n.speed+"ms "+n.easing),ho(l)}return{mount:r,start:i,cancel:fn}}function ta(e,t,n){var o=t.Move,r=t.Controller,a=t.Scroll,i=t.Elements.list,c=ue(Ae,i,"transition"),l;function p(){ge(e).bind(i,"transitionend",function(g){g.target===i&&l&&(C(),l())})}function u(g,s){var d=o.toPosition(g,!0),T=o.getPosition(),b=h(g);xe(d-T)>=1&&b>=1?n.useScroll?a.scroll(d,b,!1,s):(c("transform "+b+"ms "+n.easing),o.translate(d,!0),l=s):(o.jump(g),s())}function C(){c(""),a.cancel()}function h(g){var s=n.rewindSpeed;if(e.is(mt)&&s){var d=r.getIndex(!0),T=r.getEnd();if(d===0&&g>=T||d>=T&&g===0)return s}return n.speed}return{mount:p,start:u,cancel:C}}var na=(function(){function e(n,o){this.event=ge(),this.Components={},this.state=oi(ut),this.splides=[],this._o={},this._E={};var r=qe(n)?$o(document,n):n;bt(r,r+" is invalid."),this.root=r,o=Ge({label:Ie(r,we)||"",labelledby:Ie(r,Pn)||""},Qi,e.defaults,o||{});try{Ge(o,JSON.parse(Ie(r,Ln)))}catch{bt(!1,"Invalid JSON")}this._o=Object.create(Ge({},o))}var t=e.prototype;return t.mount=function(o,r){var a=this,i=this.state,c=this.Components;bt(i.is([ut,Ht]),"Already mounted!"),i.set(ut),this._C=c,this._T=r||this._T||(this.is(Pt)?ea:ta),this._E=o||this._E;var l=wt({},Ji,this._E,{Transition:this._T});return et(l,function(p,u){var C=p(a,c,a._o);c[u]=C,C.setup&&C.setup()}),et(c,function(p){p.mount&&p.mount()}),this.emit(Je),Fe(this.root,mi),i.set(gt),this.emit(vn),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(gt)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},t.go=function(o){return this._C.Controller.go(o),this},t.on=function(o,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(he),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,a=this.state;return a.is(ut)?ge(this).on(vn,this.destroy.bind(this,o)):(et(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(kn),r.destroy(),o&&ze(this.splides),a.set(Ht)),this},Zr(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})(),zn=na;zn.defaults={};zn.STATES=ei;var ro=[[Je,"onMounted"],[vn,"onReady"],[Me,"onMove"],[ht,"onMoved"],[In,"onClick"],[To,"onActive"],[Eo,"onInactive"],[Lo,"onVisible"],[Ao,"onHidden"],[he,"onRefresh"],[be,"onUpdated"],[ft,"onResize"],[Kt,"onResized"],[Io,"onDrag"],[ko,"onDragging"],[Fo,"onDragged"],[Jt,"onScroll"],[ot,"onScrolled"],[kn,"onDestroy"],[Ro,"onArrowsMounted"],[Vo,"onArrowsUpdated"],[Oo,"onPaginationMounted"],[Po,"onPaginationUpdated"],[Fn,"onNavigationMounted"],[Rn,"onAutoplayPlay"],[Bo,"onAutoplayPlaying"],[Vn,"onAutoplayPause"],[On,"onLazyLoadLoaded"]];function Mn(...e){return e.filter(Boolean).join(" ")}function qt(e){return e!==null&&typeof e=="object"}function xn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!xn(n,t[o]));if(qt(e)&&qt(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!xn(e[r],t[r]))}return e===t}function oa(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function ra(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 Cn(e,t){const n=e;return ra(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():qt(o)?n[r]=Cn(qt(n[r])?n[r]:{},o):n[r]=o}),n}var ia=({children:e,className:t,...n})=>D.createElement("div",{className:Mn("splide__track",t),...n},D.createElement("ul",{className:"splide__list"},e)),Qo=class extends D.Component{constructor(){super(...arguments),this.splideRef=D.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new zn(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Cn({},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&&!xn(this.options,e)&&(this.splide.options=e,this.options=Cn({},e));const t=this.getSlides();oa(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){ro.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 D.createElement(t,{className:Mn("splide",e),ref:this.splideRef,...this.omit(r,["options",...ro.map(a=>a[1])])},n?D.createElement(ia,null,o):o)}},er=({children:e,className:t,...n})=>D.createElement("li",{className:Mn("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 aa="RichTextRenderer-module__link___BWeZ2",la={link:aa},er=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?S.jsx("a",{className:la.link,href:o.value,target:o.target,children:t(o.children)},r):S.jsx("span",{style:sa(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 sa(e){return{...e.fontFamily&&{fontFamily:e.fontFamily},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const ca="SvgImage-module__svg___q3xE-",ua="SvgImage-module__img___VsTm-",ro={svg:ca,img:ua},vt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o=""})=>{const[r,a]=D.useState(!0);return D.useEffect(()=>{if(typeof window<"u"&&window.CSS){const i=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');a(i)}},[]),!e.endsWith(".svg")||!r?S.jsx("img",{src:e,alt:"",className:pe(ro.img,o)}):S.jsx("span",{"data-supports-mask":r,className:pe(ro.svg,o),style:{"--svg":`url(${e})`,"--fill":t,"--hover-fill":n}})},pa={"top-left":Y.topLeftAlignment,"top-center":Y.topCenterAlignment,"top-right":Y.topRightAlignment,"middle-left":Y.middleLeftAlignment,"middle-center":Y.middleCenterAlignment,"middle-right":Y.middleRightAlignment,"bottom-left":Y.bottomLeftAlignment,"bottom-center":Y.bottomCenterAlignment,"bottom-right":Y.bottomRightAlignment};function da({settings:e,content:t,styles:n,isEditor:o}){const[r,a]=D.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:l,textAlign:p,wordSpacing:u,fontSizeLineHeight:C,textAppearance:y,color:g}=n.imageCaption,[s,d]=D.useState(void 0),[T,v]=D.useState(null),[m,$]=D.useState(0),[j,B]=D.useState(0),{direction:L,transition:h,controls:E,pagination:R,imageCaption:W,triggers:k}=e,V=D.useRef(h.type),{x:O,y:U}=e.controls.offset,H=f=>{r&&r.go(f)};return D.useEffect(()=>{if(!T)return;const f=new ResizeObserver(F=>{if(!r)return;const[w]=F;d({width:Math.round(w.contentRect.width),height:Math.round(w.contentRect.height)})});return f.observe(T),()=>f.unobserve(T)},[T]),D.useEffect(()=>{!r||V.current===h.type||(B(f=>f+1),V.current=h.type)},[h.type]),S.jsx("div",{className:pe(Y.wrapper,{[Y.editor]:o}),ref:v,children:S.jsxs("div",{className:Y.sliderInner,style:{width:s?s.width:"100%",height:s?s.height:"100%",backgroundColor:h.backgroundColor&&h.type==="fade in"?h.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&S.jsx("div",{className:pe(Y.captionBlock),children:S.jsx("div",{className:Y.captionTextWrapper,children:t.map((f,F)=>S.jsx("div",{className:pe(Y.captionText,pa[W.alignment],{[Y.withPointerEvents]:F===m&&o,[Y.active]:F===m}),style:{fontFamily:c.fontFamily,fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:i.sizing==="auto"?"max-content":I.scalingValue(i.width,o),letterSpacing:I.scalingValue(l,o),wordSpacing:I.scalingValue(u,o),textAlign:p,fontSize:I.scalingValue(C.fontSize,o),lineHeight:I.scalingValue(C.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:Y.captionTextInner,style:{"--link-hover-color":W.linkHoverColor,"--link-color":W.linkColor,position:"relative",top:I.scalingValue(W.offset.y,o),left:I.scalingValue(W.offset.x,o)},children:S.jsx(er,{content:f.imageCaption})})},F))})}),S.jsx(Zo,{onMove:f=>{$(f.index)},ref:a,options:{arrows:!1,speed:h.duration?parseInt(h.duration):500,autoplay:k.autoPlay!==null,...k.autoPlay!==null&&{interval:parseInt(k.autoPlay)*1e3},direction:L==="horiz"||h.type==="fade in"?"ltr":"ttb",pagination:!1,drag:k.triggersList.drag,perPage:1,width:s?s.width:"100%",height:s?s.height:"100%",type:h.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((f,F)=>S.jsx(Qo,{children:S.jsx("div",{className:Y.sliderItem,children:S.jsx("div",{className:Y.imgWrapper,children:S.jsx("img",{className:pe(Y.sliderImage,{[Y.contain]:f.image.objectFit==="contain",[Y.cover]:f.image.objectFit==="cover"}),src:f.image.url,alt:f.image.name??""})})})},F))},j),E.isActive&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:pe(Y.arrow,{[Y.arrowVertical]:L==="vert",[Y.hoverArrow]:E.show==="on hover"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:S.jsxs("button",{onClick:()=>{H("-1")},className:Y.arrowInner,style:{transform:`translate(${I.scalingValue(O,o)}, ${I.scalingValue(U*(L==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:[E.arrowsImgUrl&&S.jsx(vt,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:pe(Y.arrowImg,Y.mirror)}),!E.arrowsImgUrl&&S.jsx(io,{color:E.color,className:pe(Y.arrowIcon,Y.arrowImg,Y.mirror)})]})}),S.jsx("div",{className:pe(Y.arrow,Y.nextArrow,{[Y.arrowVertical]:L==="vert",[Y.hoverArrow]:E.show==="on hover"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:S.jsxs("button",{className:Y.arrowInner,onClick:()=>H("+1"),style:{transform:`translate(${I.scalingValue(O*(L==="horiz"?-1:1),o)}, ${I.scalingValue(U,o)}) scale(${e.controls.scale/100}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:[E.arrowsImgUrl&&S.jsx(vt,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:Y.arrowImg}),!E.arrowsImgUrl&&S.jsx(io,{color:E.color,className:pe(Y.arrowIcon,Y.arrowImg)})]})})]}),k.triggersList.click&&S.jsx("div",{className:Y.clickOverlay,onClick:()=>{r&&r.go("+1")}}),R.isActive&&S.jsx("div",{className:pe(Y.pagination,{[Y.paginationInsideBottom]:R.position==="inside-1"&&L==="horiz",[Y.paginationInsideTop]:R.position==="inside-2"&&L==="horiz",[Y.paginationOutsideBottom]:R.position==="outside-1"&&L==="horiz",[Y.paginationOutsideTop]:R.position==="outside-2"&&L==="horiz",[Y.paginationInsideLeft]:R.position==="inside-1"&&L==="vert",[Y.paginationInsideRight]:R.position==="inside-2"&&L==="vert",[Y.paginationOutsideLeft]:R.position==="outside-1"&&L==="vert",[Y.paginationOutsideRight]:R.position==="outside-2"&&L==="vert",[Y.paginationVertical]:L==="vert"}),children:S.jsx("div",{className:Y.paginationInner,style:{backgroundColor:R.colors[2],transform:`scale(${R.scale/100}) translate(${I.scalingValue(R.offset.x,o)}, ${I.scalingValue(R.offset.y,o)}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:t.map((f,F)=>S.jsx("button",{onClick:()=>{r&&r.go(F)},className:pe(Y.paginationItem),children:S.jsx("div",{className:pe(Y.dot,{[Y.activeDot]:F===m}),style:{backgroundColor:F===m?R.colors[0]:R.colors[1],"--pagination-hover-color":R.hover}})},F))})})]})})}function io({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 ga={element:da,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},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,defaultWidth:500},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{minWidth:58,maxWidth:108,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",minWidth:300,maxWidth:550}}},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"]}},fa="ImageRevealSlider-module__imageRevealSlider___UE5Ob",ma="ImageRevealSlider-module__image___Qjt-e",ya="ImageRevealSlider-module__link___N-iLG",ha="ImageRevealSlider-module__cursor___2U03d",ot={imageRevealSlider:fa,image:ma,link:ya,cursor:ha};function ao(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const a=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*a,c=a/2,l=i/2;if(e>=o.x-c&&e<=o.x+c&&t>=o.y-l&&t<=o.y+l)return!0}return!1}function un(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function va(e,t,n,o){let r,a;if(t==="custom"){r=n;const i=await un(e);a=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await un(e);a=i.height/i.width*r}else{const i=await un(e);r=i.width,a=i.height}return{width:r,height:a,finalWidth:`${r}px`}}function ba({settings:e,content:t,isEditor:n}){const[o,r]=D.useState(null),[a,i]=D.useState([]),[c,l]=D.useState(0),p=D.useRef(0),[u,C]=D.useState({x:0,y:0}),[y,g]=D.useState(1),[s,d]=D.useState("none"),T=D.useRef({x:0,y:0}),[v,m]=D.useState(!1),{sizeType:$,imageWidth:j,randomRangeImageWidth:B}=e.imageSize,{revealPosition:L,visible:h}=e.position,{cursorType:E,target:R,defaultCursorScale:W,defaultCursor:k,hoverCursorScale:V,hoverCursor:O}=e.cursor;D.useEffect(()=>{if(!o)return;const f=(_,x)=>{const P=o.getBoundingClientRect(),q=_-P.left,ie=x-P.top;if(C({x:q,y:ie}),E==="system"){d("none"),g(1);return}const ne=q,le=ie,A=document.elementFromPoint(P.left+ne,P.top+le);if(A&&A.closest("a")){d("none"),g(1);return}const Z=ao(ne,le,a)||R==="area"?{img:O??"none",scale:V}:{img:k??"none",scale:W};d(Z.img),g(Z.scale)},F=_=>{_.stopPropagation(),T.current={x:_.clientX,y:_.clientY},f(_.clientX,_.clientY)},w=()=>{v&&f(T.current.x,T.current.y)};return o.addEventListener("mousemove",F),window.addEventListener("scroll",w,!0),()=>{o.removeEventListener("mousemove",F),window.removeEventListener("scroll",w,!0)}},[o,v,u,E,R,O,k,V,W,a]),D.useEffect(()=>{v||(d("none"),g(0))},[v]);const U=async(f,F,w,_={})=>{const{width:x,height:P,finalWidth:q}=await va(f.image.url,$,j,B);let ie=0,ne=0;L==="same"?(ie=F/2,ne=w/2):(ie=_.x??Math.random()*F,ne=_.y??Math.random()*w);const le=Math.min(Math.max(ie,x/2),F-x/2),A=Math.min(Math.max(ne,P/2),w-P/2);return{id:p.current++,url:f.image.url,link:f.link,name:f.image.name,x:le,y:A,width:q}};D.useEffect(()=>{if(!o||t.length===0)return;const f=o.getBoundingClientRect(),F=f.width,w=f.height,_=[];(async()=>{const P=t[0],q=await U(P,F,w);_.push(q),i(_),l(1)})()},[$,j,B,L,o]),D.useEffect(()=>{h==="last One"&&i(f=>f.length>0?[f[f.length-1]]:[])},[h]);const H=async f=>{if(!o)return;const F=o.getBoundingClientRect(),w=f.clientX-F.left,_=f.clientY-F.top;if(R==="image"&&!ao(w,_,a))return;let x=0,P=0;L==="on Click"?(x=w,P=_):L==="same"?(x=F.width/2,P=F.height/2):(x=Math.random()*F.width,P=Math.random()*F.height);const q=t[c],ie=await U(q,F.width,F.height,{x,y:P});i(ne=>h==="all"?[...ne,ie]:[ie]),l(ne=>ne>=t.length-1?0:ne+1)};return S.jsxs("div",{ref:r,onClick:H,onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),className:ot.imageRevealSlider,style:{cursor:s==="none"?"default":"none"},children:[a.map(f=>S.jsx("div",{className:ot.wrapper,style:{top:`${f.y}px`,left:`${f.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:f.width??"auto",height:"auto",cursor:s==="none"?"default":"none"},children:R==="area"&&f.link?S.jsx("a",{href:f.link,target:"_blank",className:ot.link,children:S.jsx("img",{src:f.url,alt:f.name,className:ot.image},f.id)}):S.jsx("img",{src:f.url,alt:f.name,className:ot.image},f.id)},f.id)),v&&S.jsx("div",{className:ot.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${y})`,backgroundImage:`url('${s}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Sa={element:ba,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{width:"100%",height:"100%"},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,defaultWidth:500},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,minWidth:58,maxWidth:108,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",minWidth:300,maxWidth:550}}},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:""}]}}}},xa="LightBox-module__hidden___9s-9x",Ca="LightBox-module__heroImage___sTxNF",$a="LightBox-module__background___rm9ml",_a="LightBox-module__editor___4ACaY",wa="LightBox-module__contentStyle___Bgnsq",Ta="LightBox-module__imageStyle___tLIlB",Ea="LightBox-module__imgWrapper___LuFUp",La="LightBox-module__contain___8-yaS",Aa="LightBox-module__cover___hNvOG",Ia="LightBox-module__caption___b6L2I",ka="LightBox-module__captionTextInner___rCGNH",Fa="LightBox-module__lightboxSplide___XFuWC",Ra="LightBox-module__arrow___iz38X",Va="LightBox-module__arrowVertical___Zfz81",Oa="LightBox-module__nextArrow___zkAQN",Pa="LightBox-module__arrowInner___p48sW",Ba="LightBox-module__arrowIcon___3VaFf",Na="LightBox-module__arrowImg___pNV88",Wa="LightBox-module__mirror___pjeXc",ja="LightBox-module__thumbsWrapper___GB-nU",za="LightBox-module__thumbsContainerVertical___wttk5",Ma="LightBox-module__thumbsContainer___osSma",Da="LightBox-module__thumbsAlignStart___MO6tY",Ha="LightBox-module__thumbsAlignCenter___Q4sUx",Ua="LightBox-module__thumbsAlignEnd___p4y9R",Ya="LightBox-module__thumbItem___HvnF3",Ga="LightBox-module__closeButton___g2khP",qa="LightBox-module__fadeIn___0m5GW",Xa="LightBox-module__slideInLeft___gPYwC",Ka="LightBox-module__slideInRight___S-pPp",Ja="LightBox-module__slideInTop___DFdAj",Za="LightBox-module__slideInBottom___m27kZ",Qa="LightBox-module__fadeOut___55qBR",el="LightBox-module__slideOutLeft___NvU7P",tl="LightBox-module__slideOutRight___SK7eC",nl="LightBox-module__slideOutTop___Vgg0z",ol="LightBox-module__slideOutBottom___nJ0Ef",rl="LightBox-module__scaleSlide___vZriG",N={hidden:xa,heroImage:Ca,background:$a,editor:_a,contentStyle:wa,imageStyle:Ta,imgWrapper:Ea,contain:La,cover:Aa,caption:Ia,captionTextInner:ka,lightboxSplide:Fa,arrow:Ra,arrowVertical:Va,nextArrow:Oa,arrowInner:Pa,arrowIcon:Ba,arrowImg:Na,mirror:Wa,thumbsWrapper:ja,thumbsContainerVertical:za,thumbsContainer:Ma,thumbsAlignStart:Da,thumbsAlignCenter:Ha,thumbsAlignEnd:Ua,thumbItem:Ya,closeButton:Ga,fadeIn:qa,slideInLeft:Xa,slideInRight:Ka,slideInTop:Ja,slideInBottom:Za,fadeOut:Qa,slideOutLeft:el,slideOutRight:tl,slideOutTop:nl,slideOutBottom:ol,scaleSlide:rl},Ot=(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 tr(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 lo(e){const t=e.getBoundingClientRect(),n=tr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,i=e.naturalHeight,c=o/r,l=a/i;let p,u;l>c?(p=o,u=o/l):(u=r,p=r*l);const C=t.left+n.left,y=t.top+n.top,g=(o-p)/2+C,s=(r-u)/2+y;return{x:g,y:s,width:p,height:u}}function so(e){const t=e.getBoundingClientRect(),n=tr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function co(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 il(e,t){const n=(()=>{if(e==="fade in")return N.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return N.slideInLeft;case"right":return N.slideInRight;case"top":return N.slideInTop;case"bottom":return N.slideInBottom;default:return N.slideInRight}return N.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return N.fadeIn;if(e==="slide in")switch(t){case"left":return N.slideInLeft;case"right":return N.slideInRight;case"top":return N.slideInTop;case"bottom":return N.slideInBottom;default:return N.slideInRight}return N.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return N.fadeOut;if(e==="slide in")switch(t){case"left":return N.slideOutLeft;case"right":return N.slideOutRight;case"top":return N.slideOutTop;case"bottom":return N.slideOutBottom;default:return N.slideOutRight}return N.fadeOut})(),a=(()=>{if(e==="fade in")return N.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return N.slideOutLeft;case"right":return N.slideOutRight;case"top":return N.slideOutTop;case"bottom":return N.slideOutBottom;default:return N.slideOutRight}return N.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:a}}const al=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:a})=>{const[i,c]=D.useState(!1),{url:l}=e.thumbnailBlock.cover;return D.useEffect(()=>{r==="close"&&c(!1),r==="open"&&c(!0)},[r]),S.jsxs(S.Fragment,{children:[S.jsx("img",{src:l,alt:"Cover",className:N.heroImage,onClick:()=>c(!0)}),S.jsx(ll,{isOpen:i,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:a})]})},ll=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:a,isEditor:i,metadata:c})=>{var z;const[l,p]=D.useState(0),[u,C]=D.useState(0),[y,g]=D.useState(!1),[s,d]=D.useState(!1),[T,v]=D.useState({}),m=D.useRef(null),$=D.useRef(null),j=D.useRef(null),B=D.useRef(!1),L=D.useRef(null),h=D.useRef(null),E=D.useRef(null),R=D.useRef(null),W=D.useRef(!1),k=D.useRef(null),[V,O]=D.useState(!1),{appear:U,triggers:H,slider:f,thumbnail:F,controls:w,area:_,caption:x,layout:P}=r.lightboxBlock,{appearClass:q,backdropAppearClass:ie,backdropDisappearClass:ne,disappearClass:le}=il(U.type,U.direction),A=(c==null?void 0:c.itemId)??null;D.useEffect(()=>{const b=()=>{setTimeout(()=>{var X,G;(G=(X=m.current)==null?void 0:X.splide)==null||G.refresh()},16)},M=()=>{C(X=>X+1)};return window.addEventListener("ArticleEditor.Layout:change",b),window.addEventListener("ArticleEditor.ComponentContent:change",M),()=>{window.removeEventListener("ArticleEditor.Layout:change",b),window.removeEventListener("ArticleEditor.ComponentContent:change",M)}},[]),D.useEffect(()=>{if(!e||!F.isActive){O(!1);return}const b=k.current;if(!b)return;const M=()=>{f.direction==="horiz"?O(b.scrollWidth>b.clientWidth):O(b.scrollHeight>b.clientHeight)};M();const X=new ResizeObserver(M);return X.observe(b),()=>X.disconnect()},[e,F.isActive,n.length,T,f.direction]);const Z=D.useCallback(()=>{const b=window.matchMedia("(max-width: 768px)").matches,M=co(_.color);b&&!i&&M>.9&&(document.body.style.backgroundColor=""),g(!0),B.current=!0;const X=G=>{G.target===L.current&&G.animationName&&(L.current&&h.current&&L.current.removeEventListener("animationend",h.current),h.current=null,B.current&&(B.current=!1,t()),g(!1))};L.current&&(h.current=X,L.current.addEventListener("animationend",X))},[t,_.color,i]),ye=(b,M,X)=>{var G,oe;if(b){if(H.type==="click"&&H.switch==="image")H.repeat==="close"&&l===n.length-1?Z():(G=m.current)==null||G.go("+1");else if(H.type==="click"&&H.switch==="50/50"){const J=b.getBoundingClientRect(),K=M-J.left,re=X-J.top,ve=J.width,ce=J.height;let ue;f.direction==="horiz"?ue=K<ve/2?"-1":"+1":ue=re<ce/2?"-1":"+1",(oe=m.current)==null||oe.go(ue)}}},ae=b=>{if(W.current){W.current=!1;return}const M=n[l],X=(M==null?void 0:M.image.objectFit)==="cover";let G,oe;if("changedTouches"in b&&b.changedTouches.length>0)G=b.changedTouches[0].clientX,oe=b.changedTouches[0].clientY;else if("clientX"in b)G=b.clientX,oe=b.clientY;else return;let J;if(X&&j.current){const K=so(j.current);J=G>=K.left&&G<=K.right&&oe>=K.top&&oe<=K.bottom}else{const K=j.current?lo(j.current):null;if(!K){b.target===b.currentTarget&&Z();return}J=G>=K.x&&G<=K.x+K.width&&oe>=K.y&&oe<=K.y+K.height}J?ye(j.current,G,oe):Z()},ge=b=>{const M=b.target;(M.classList.contains(N.thumbsWrapper)||M.classList.contains(N.thumbsContainer))&&ae(b)};D.useEffect(()=>{if(!e)return;const b=M=>{var X,G;if(M.key==="Escape"){Z();return}if(M.key==="ArrowRight"){p(oe=>(oe+1)%Math.max(n.length,1)),(X=m.current)==null||X.go("+1");return}M.key==="ArrowLeft"&&(p(oe=>(oe-1+Math.max(n.length,1))%Math.max(n.length,1)),(G=m.current)==null||G.go("-1"))};return window.addEventListener("keydown",b),()=>{window.removeEventListener("keydown",b)}},[e,Z,n.length]),D.useEffect(()=>{if(e){if(p(0),C(M=>M+1),B.current=!1,g(!1),d(!1),v({}),!A)return;const b=new CustomEvent("page-overlay",{detail:{itemId:A}});window.dispatchEvent(b)}return()=>{L.current&&h.current&&(L.current.removeEventListener("animationend",h.current),h.current=null),d(!1)}},[e,A]),D.useEffect(()=>{$.current!==null&&$.current!==f.type&&C(b=>b+1),$.current=f.type},[f.type]),D.useEffect(()=>{if(!e)return;const b=document.body.style.overflow,M=window.matchMedia("(max-width: 768px)").matches,X=co(_.color);document.body.style.overflow="hidden",d(!1);const G=J=>{J.target===L.current&&!B.current&&J.animationName&&(M&&!i&&X>.9&&(document.body.style.backgroundColor=_.color),d(!0),L.current&&E.current&&L.current.removeEventListener("animationend",E.current),E.current=null)};L.current&&(E.current=G,L.current.addEventListener("animationend",G));const oe=J=>{const K=J.target;K&&(K.closest(`.${N.thumbsWrapper}`)||K.closest(`.${N.thumbsContainer}`))||f.type!=="slide"&&J.preventDefault()};return document.addEventListener("touchmove",oe,{passive:!1}),()=>{document.body.style.overflow=b,document.removeEventListener("touchmove",oe),L.current&&E.current&&(L.current.removeEventListener("animationend",E.current),E.current=null),d(!1)}},[e,i,_.color,f.type]),D.useEffect(()=>{if(!e)return;const b=M=>{var G,oe;if(B.current){M.stopPropagation();return}if(W.current){W.current=!1;return}const X=M.target;if(!(X&&(X.closest(`.${N.thumbsContainer}`)||X.closest(`.${N.thumbItem}`)))){if(f.type==="slide"&&H.type==="drag"&&((oe=(G=m.current)==null?void 0:G.splide)!=null&&oe.root)){const J=m.current.splide.root;if(X&&(J.contains(X)||J===X))return}if(M.touches.length===0&&M.changedTouches.length>0){const J=n[l],K=(J==null?void 0:J.image.objectFit)==="cover",re=M.changedTouches[0];let ve;if(K&&j.current){const ce=so(j.current);ve=re.clientX>=ce.left&&re.clientX<=ce.right&&re.clientY>=ce.top&&re.clientY<=ce.bottom}else{const ce=j.current?lo(j.current):null;if(!ce)return;ve=re.clientX>=ce.x&&re.clientX<=ce.x+ce.width&&re.clientY>=ce.y&&re.clientY<=ce.y+ce.height}if(!ve){M.stopPropagation(),B.current=!0;const ce=ue=>{ue.stopPropagation(),ue.preventDefault(),document.removeEventListener("click",ce,!0)};document.addEventListener("click",ce,!0),Z()}}}};return document.addEventListener("touchend",b,{passive:!0}),()=>{document.removeEventListener("touchend",b)}},[e,Z,l,n]);const me=(f.type==="scale"||f.type==="fade")&&f.direction==="vert"&&H.type==="drag";D.useEffect(()=>{var ue,Me;if(!e||!me||!((Me=(ue=m.current)==null?void 0:ue.splide)!=null&&Me.root))return;const b=m.current.splide.root,M=30,X=(Q,te)=>{if(R.current){const be=Math.abs(Q-R.current.x),xe=Math.abs(te-R.current.y);(be>0||xe>0)&&(W.current=!0)}},G=Q=>{R.current&&(Q.preventDefault(),X(Q.clientX,Q.clientY))},oe=Q=>{R.current&&Q.touches.length>0&&(Q.preventDefault(),X(Q.touches[0].clientX,Q.touches[0].clientY))},J=(Q,te)=>{if(!R.current||!m.current){R.current=null;return}const be=Math.abs(Q-R.current.x),xe=Math.abs(te-R.current.y);xe>M&&xe>be&&m.current.go(te<R.current.y?"+1":"-1"),R.current=null},K=Q=>{R.current&&J(Q.clientX,Q.clientY),document.removeEventListener("pointerup",K),document.removeEventListener("pointercancel",K),document.removeEventListener("pointermove",G)},re=Q=>{if(R.current){if(Q.changedTouches.length>0){const te=Q.changedTouches[0];J(te.clientX,te.clientY)}document.removeEventListener("touchend",re),document.removeEventListener("touchcancel",re),document.removeEventListener("touchmove",oe)}},ve=Q=>{R.current={x:Q.clientX,y:Q.clientY},W.current=!1,document.addEventListener("pointermove",G,{passive:!1}),document.addEventListener("pointerup",K),document.addEventListener("pointercancel",K)},ce=Q=>{Q.touches.length>0&&(R.current={x:Q.touches[0].clientX,y:Q.touches[0].clientY},W.current=!1,document.addEventListener("touchmove",oe,{passive:!1}),document.addEventListener("touchend",re),document.addEventListener("touchcancel",re))};return b.addEventListener("pointerdown",ve),b.addEventListener("touchstart",ce),()=>{b.removeEventListener("pointerdown",ve),b.removeEventListener("touchstart",ce),document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",K),document.removeEventListener("pointercancel",K),document.removeEventListener("touchmove",oe),document.removeEventListener("touchend",re),document.removeEventListener("touchcancel",re),R.current=null,W.current=!1}},[e,me,u]);const Oe={backgroundColor:_.color,backdropFilter:`blur(${_.blur}px)`,animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return document.getElementById(a)?ar.createPortal(S.jsxs(S.Fragment,{children:[S.jsx("div",{ref:i?null:L,className:pe(N.background,y?ne:ie,{[N.editor]:i},{[N.hidden]:!e}),style:{...Oe,...s&&!i&&!y?{position:"absolute"}:{}}}),S.jsxs("div",{ref:i?L:null,className:pe(N.contentStyle,y?le:q,{[N.editor]:i},{[N.hidden]:!e}),style:{animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[S.jsx(Zo,{onMove:b=>p(b.index),ref:m,className:N.lightboxSplide,options:{arrows:!1,speed:f.duration?parseInt(f.duration):500,direction:f.direction==="horiz"||f.type==="fade"||f.type==="scale"?"ltr":"ttb",pagination:!1,drag:H.type==="drag"&&!me,perPage:1,width:"100%",height:"100%",type:f.type==="fade"||f.type==="scale"?"fade":"loop",padding:0,rewind:H.repeat!=="close",start:0},style:{"--splide-speed":f.duration},children:n.map((b,M)=>{const X=Ot(P.position,P.offset,i),G=`${I.scalingValue(P.padding.top,i)} ${I.scalingValue(P.padding.right,i)} ${I.scalingValue(P.padding.bottom,i)} ${I.scalingValue(P.padding.left,i)}`,oe=f.type==="scale"?(()=>{const{transform:J,...K}=X;return{...K,position:"absolute",padding:G,boxSizing:"border-box","--position-transform":J||"none"}})():{...X,position:"absolute",padding:G,boxSizing:"border-box"};return S.jsx(Qo,{children:S.jsx("div",{className:N.imgWrapper,onClick:ae,children:S.jsx("img",{ref:M===l?j:null,className:pe(N.imageStyle,{[N.contain]:b.image.objectFit==="contain",[N.cover]:b.image.objectFit==="cover",[N.scaleSlide]:f.type==="scale"}),src:b.image.url,alt:b.image.name??"",style:{...oe,pointerEvents:b.image.objectFit==="contain"?"none":"auto"}})})},M)})},u),w.isActive&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:pe(N.arrow,{[N.arrowVertical]:f.direction==="vert"}),style:{color:w.color,"--arrow-hover-color":w.hover},children:S.jsxs("button",{className:N.arrowInner,style:{transform:`translate(${I.scalingValue(w.offset.x,i)}, ${I.scalingValue(w.offset.y*(f.direction==="horiz"?1:-1),i)}) scale(${w.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var b;return(b=m.current)==null?void 0:b.go("-1")},"aria-label":"Previous",children:[w.arrowsImgUrl&&S.jsx(vt,{url:w.arrowsImgUrl,fill:w.color,hoverFill:w.hover,className:pe(N.arrowImg,N.mirror)}),!w.arrowsImgUrl&&S.jsx(uo,{color:w.color,className:pe(N.arrowIcon,N.arrowImg,N.mirror)})]})}),S.jsx("div",{className:pe(N.arrow,N.nextArrow,{[N.arrowVertical]:f.direction==="vert"}),style:{color:w.color,"--arrow-hover-color":w.hover},children:S.jsxs("button",{className:N.arrowInner,style:{transform:`translate(${I.scalingValue(w.offset.x*(f.direction==="horiz"?-1:1),i)}, ${I.scalingValue(w.offset.y,i)}) scale(${w.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var b;return(b=m.current)==null?void 0:b.go("+1")},"aria-label":"Next",children:[w.arrowsImgUrl&&S.jsx(vt,{url:w.arrowsImgUrl,fill:w.color,hoverFill:w.hover,className:N.arrowImg}),!w.arrowsImgUrl&&S.jsx(uo,{color:w.color,className:pe(N.arrowIcon,N.arrowImg)})]})})]}),_.closeIconUrl&&(()=>{const b=Ot(_.closeIconAlign,_.closeIconOffset,i),M=`scale(${_.closeIconScale})`,X=b.transform?`${b.transform} ${M}`:M;return S.jsx("button",{className:N.closeButton,style:{...b,transform:X},onClick:Z,"aria-label":"Close lightbox",children:S.jsx(vt,{url:_.closeIconUrl,fill:_.closeIconColor??"#000000",hoverFill:_.closeIconHover??"#cccccc"})})})(),x&&x.isActive&&o.imageCaption&&((z=n[l])==null?void 0:z.imageCaption)&&(()=>{const{widthSettings:b,fontSettings:M,letterSpacing:X,textAlign:G,wordSpacing:oe,fontSizeLineHeight:J,textAppearance:K,color:re}=o.imageCaption;return S.jsx("div",{className:N.caption,style:{...Ot(x.alignment,x.offset,i),fontFamily:M.fontFamily,fontWeight:M.fontWeight,fontStyle:M.fontStyle,width:b.sizing==="auto"?"max-content":I.scalingValue(b.width,i),letterSpacing:I.scalingValue(X,i),wordSpacing:I.scalingValue(oe,i),textAlign:G,fontSize:I.scalingValue(J.fontSize,i),lineHeight:I.scalingValue(J.lineHeight,i),textTransform:K.textTransform??"none",textDecoration:K.textDecoration??"none",fontVariant:K.fontVariant??"normal",color:re},onClick:ve=>ve.stopPropagation(),children:S.jsx("div",{"data-styles":"imageCaption",className:N.captionTextInner,style:{"--link-color":x.linkColor,"--link-hover-color":x.linkHoverColor},children:S.jsx(er,{content:n[l].imageCaption})})})})(),F.isActive&&(()=>{const[b,M]=F.position.split("-"),X=f.direction==="horiz"?`${b}-left`:F.position,G=Ot(X,F.offset,i),oe=()=>{if(f.direction==="horiz"){if(M==="left")return"flex-start";if(M==="center")return"center";if(M==="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:k,className:N.thumbsWrapper,onClick:J=>ge(J),style:{position:i?"absolute":"fixed",...G,...f.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:S.jsx("div",{className:pe(N.thumbsContainer,{[N.thumbsContainerVertical]:f.direction==="vert",[N.thumbsAlignStart]:F.align==="start",[N.thumbsAlignCenter]:F.align==="center",[N.thumbsAlignEnd]:F.align==="end"}),style:{gap:I.scalingValue(F.grid.gap,i),justifyContent:V?"flex-start":oe()},children:n.map((J,K)=>{const re=K===l,ve=T[K],ue=F.grid.size*(re?F.activeState.scale:1),Me=()=>{if(F.fit!=="fit")return{};if(!ve)return f.direction==="horiz"?{height:I.scalingValue(ue,i)}:{width:I.scalingValue(ue,i)};const Q=ve.width/ve.height;if(f.direction==="horiz"){const te=ue,be=te*Q;return{width:I.scalingValue(be,i),height:I.scalingValue(te,i)}}else{const te=ue,be=te/Q;return{width:I.scalingValue(te,i),height:I.scalingValue(be,i)}}};return S.jsx("button",{className:N.thumbItem,style:{...f.direction==="horiz"&&F.fit!=="fit"?{height:I.scalingValue(ue,i)}:{},...f.direction==="vert"&&F.fit!=="fit"?{width:I.scalingValue(ue,i)}:{},...F.fit==="cover"?{width:I.scalingValue(ue,i),height:I.scalingValue(ue,i)}:{},...Me(),transition:re?"all 0.25s ease-out":"none",opacity:re?F.activeState.opacity/100:F.opacity/100,"--thumb-hover":F.activeState.opacity/100},onClick:Q=>{var te;Q.stopPropagation(),p(K),(te=m.current)==null||te.go(K)},onMouseEnter:()=>{var Q;F.triggers==="hov"&&((Q=m.current)==null||Q.go(K))},children:S.jsx("img",{src:J.image.url,alt:J.image.name??"",onLoad:Q=>{const te=Q.currentTarget;te.naturalWidth&&te.naturalHeight&&v(be=>({...be,[K]:{width:te.naturalWidth,height:te.naturalHeight}}))},style:{objectFit:F.fit==="cover"?"cover":"contain",...F.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...F.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${J.image.name}-${K}`)})})})})()]})]}),document.getElementById(a)):null};function uo({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 sl={element:al,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},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,defaultWidth:500},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",minWidth:58,maxWidth:108},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",minWidth:300,maxWidth:550}}},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 rt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function cl(e){return`
6
+ */const aa="RichTextRenderer-module__link___BWeZ2",la={link:aa},tr=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?S.jsx("a",{className:la.link,href:o.value,target:o.target,children:t(o.children)},r):S.jsx("span",{style:sa(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 sa(e){return{...e.fontFamily&&{fontFamily:e.fontFamily},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const ca="SvgImage-module__svg___q3xE-",ua="SvgImage-module__img___VsTm-",io={svg:ca,img:ua},xt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o=""})=>{const[r,a]=D.useState(!0);return D.useEffect(()=>{if(typeof window<"u"&&window.CSS){const i=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');a(i)}},[]),!e.endsWith(".svg")||!r?S.jsx("img",{src:e,alt:"",className:de(io.img,o)}):S.jsx("span",{"data-supports-mask":r,className:de(io.svg,o),style:{"--svg":`url(${e})`,"--fill":t,"--hover-fill":n}})},pa={"top-left":Y.topLeftAlignment,"top-center":Y.topCenterAlignment,"top-right":Y.topRightAlignment,"middle-left":Y.middleLeftAlignment,"middle-center":Y.middleCenterAlignment,"middle-right":Y.middleRightAlignment,"bottom-left":Y.bottomLeftAlignment,"bottom-center":Y.bottomCenterAlignment,"bottom-right":Y.bottomRightAlignment};function da({settings:e,content:t,styles:n,isEditor:o}){const[r,a]=D.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:l,textAlign:p,wordSpacing:u,fontSizeLineHeight:C,textAppearance:h,color:g}=n.imageCaption,[s,d]=D.useState(void 0),[T,b]=D.useState(null),[y,$]=D.useState(0),[j,B]=D.useState(0),{direction:L,transition:v,controls:E,pagination:R,imageCaption:W,triggers:k}=e,V=D.useRef(v.type),{x:O,y:U}=e.controls.offset,H=m=>{r&&r.go(m)};return D.useEffect(()=>{if(!T)return;const m=new ResizeObserver(F=>{if(!r)return;const[_]=F;d({width:Math.round(_.contentRect.width),height:Math.round(_.contentRect.height)})});return m.observe(T),()=>m.unobserve(T)},[T]),D.useEffect(()=>{!r||V.current===v.type||(B(m=>m+1),V.current=v.type)},[v.type]),S.jsx("div",{className:de(Y.wrapper,{[Y.editor]:o}),ref:b,children:S.jsxs("div",{className:Y.sliderInner,style:{width:s?s.width:"100%",height:s?s.height:"100%",backgroundColor:v.backgroundColor&&v.type==="fade in"?v.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&S.jsx("div",{className:de(Y.captionBlock),children:S.jsx("div",{className:Y.captionTextWrapper,children:t.map((m,F)=>S.jsx("div",{className:de(Y.captionText,pa[W.alignment],{[Y.withPointerEvents]:F===y&&o,[Y.active]:F===y}),style:{fontFamily:c.fontFamily,fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:i.sizing==="auto"?"max-content":I.scalingValue(i.width,o),letterSpacing:I.scalingValue(l,o),wordSpacing:I.scalingValue(u,o),textAlign:p,fontSize:I.scalingValue(C.fontSize,o),lineHeight:I.scalingValue(C.lineHeight,o),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:g,transitionDuration:v.duration?`${Math.round(parseInt(v.duration)/2)}ms`:"500ms"},children:S.jsx("div",{"data-styles":"imageCaption",className:Y.captionTextInner,style:{"--link-hover-color":W.linkHoverColor,"--link-color":W.linkColor,position:"relative",top:I.scalingValue(W.offset.y,o),left:I.scalingValue(W.offset.x,o)},children:S.jsx(tr,{content:m.imageCaption})})},F))})}),S.jsx(Qo,{onMove:m=>{$(m.index)},ref:a,options:{arrows:!1,speed:v.duration?parseInt(v.duration):500,autoplay:k.autoPlay!==null,...k.autoPlay!==null&&{interval:parseInt(k.autoPlay)*1e3},direction:L==="horiz"||v.type==="fade in"?"ltr":"ttb",pagination:!1,drag:k.triggersList.drag,perPage:1,width:s?s.width:"100%",height:s?s.height:"100%",type:v.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((m,F)=>S.jsx(er,{children:S.jsx("div",{className:Y.sliderItem,children:S.jsx("div",{className:Y.imgWrapper,children:S.jsx("img",{className:de(Y.sliderImage,{[Y.contain]:m.image.objectFit==="contain",[Y.cover]:m.image.objectFit==="cover"}),src:m.image.url,alt:m.image.name??""})})})},F))},j),E.isActive&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:de(Y.arrow,{[Y.arrowVertical]:L==="vert",[Y.hoverArrow]:E.show==="on hover"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:S.jsxs("button",{onClick:()=>{H("-1")},className:Y.arrowInner,style:{transform:`translate(${I.scalingValue(O,o)}, ${I.scalingValue(U*(L==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:[E.arrowsImgUrl&&S.jsx(xt,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:de(Y.arrowImg,Y.mirror)}),!E.arrowsImgUrl&&S.jsx(ao,{color:E.color,className:de(Y.arrowIcon,Y.arrowImg,Y.mirror)})]})}),S.jsx("div",{className:de(Y.arrow,Y.nextArrow,{[Y.arrowVertical]:L==="vert",[Y.hoverArrow]:E.show==="on hover"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:S.jsxs("button",{className:Y.arrowInner,onClick:()=>H("+1"),style:{transform:`translate(${I.scalingValue(O*(L==="horiz"?-1:1),o)}, ${I.scalingValue(U,o)}) scale(${e.controls.scale/100}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:[E.arrowsImgUrl&&S.jsx(xt,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:Y.arrowImg}),!E.arrowsImgUrl&&S.jsx(ao,{color:E.color,className:de(Y.arrowIcon,Y.arrowImg)})]})})]}),k.triggersList.click&&S.jsx("div",{className:Y.clickOverlay,onClick:()=>{r&&r.go("+1")}}),R.isActive&&S.jsx("div",{className:de(Y.pagination,{[Y.paginationInsideBottom]:R.position==="inside-1"&&L==="horiz",[Y.paginationInsideTop]:R.position==="inside-2"&&L==="horiz",[Y.paginationOutsideBottom]:R.position==="outside-1"&&L==="horiz",[Y.paginationOutsideTop]:R.position==="outside-2"&&L==="horiz",[Y.paginationInsideLeft]:R.position==="inside-1"&&L==="vert",[Y.paginationInsideRight]:R.position==="inside-2"&&L==="vert",[Y.paginationOutsideLeft]:R.position==="outside-1"&&L==="vert",[Y.paginationOutsideRight]:R.position==="outside-2"&&L==="vert",[Y.paginationVertical]:L==="vert"}),children:S.jsx("div",{className:Y.paginationInner,style:{backgroundColor:R.colors[2],transform:`scale(${R.scale/100}) translate(${I.scalingValue(R.offset.x,o)}, ${I.scalingValue(R.offset.y,o)}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:t.map((m,F)=>S.jsx("button",{onClick:()=>{r&&r.go(F)},className:de(Y.paginationItem),children:S.jsx("div",{className:de(Y.dot,{[Y.activeDot]:F===y}),style:{backgroundColor:F===y?R.colors[0]:R.colors[1],"--pagination-hover-color":R.hover}})},F))})})]})})}function ao({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 ga={element:da,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},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,defaultWidth:500},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{minWidth:58,maxWidth:108,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",minWidth:300,maxWidth:550}}},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"]}},fa="ImageRevealSlider-module__imageRevealSlider___UE5Ob",ma="ImageRevealSlider-module__image___Qjt-e",ya="ImageRevealSlider-module__link___N-iLG",ha="ImageRevealSlider-module__cursor___2U03d",at={imageRevealSlider:fa,image:ma,link:ya,cursor:ha};function lo(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const a=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*a,c=a/2,l=i/2;if(e>=o.x-c&&e<=o.x+c&&t>=o.y-l&&t<=o.y+l)return!0}return!1}function pn(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function va(e,t,n,o){let r,a;if(t==="custom"){r=n;const i=await pn(e);a=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await pn(e);a=i.height/i.width*r}else{const i=await pn(e);r=i.width,a=i.height}return{width:r,height:a,finalWidth:`${r}px`}}function ba({settings:e,content:t,isEditor:n}){const[o,r]=D.useState(null),[a,i]=D.useState([]),[c,l]=D.useState(0),p=D.useRef(0),[u,C]=D.useState({x:0,y:0}),[h,g]=D.useState(1),[s,d]=D.useState("none"),T=D.useRef({x:0,y:0}),[b,y]=D.useState(!1),{sizeType:$,imageWidth:j,randomRangeImageWidth:B}=e.imageSize,{revealPosition:L,visible:v}=e.position,{cursorType:E,target:R,defaultCursorScale:W,defaultCursor:k,hoverCursorScale:V,hoverCursor:O}=e.cursor;D.useEffect(()=>{if(!o)return;const m=(w,x)=>{const P=o.getBoundingClientRect(),q=w-P.left,oe=x-P.top;if(C({x:q,y:oe}),E==="system"){d("none"),g(1);return}const te=q,se=oe,A=document.elementFromPoint(P.left+te,P.top+se);if(A&&A.closest("a")){d("none"),g(1);return}const J=lo(te,se,a)||R==="area"?{img:O??"none",scale:V}:{img:k??"none",scale:W};d(J.img),g(J.scale)},F=w=>{w.stopPropagation(),T.current={x:w.clientX,y:w.clientY},m(w.clientX,w.clientY)},_=()=>{b&&m(T.current.x,T.current.y)};return o.addEventListener("mousemove",F),window.addEventListener("scroll",_,!0),()=>{o.removeEventListener("mousemove",F),window.removeEventListener("scroll",_,!0)}},[o,b,u,E,R,O,k,V,W,a]),D.useEffect(()=>{b||(d("none"),g(0))},[b]);const U=async(m,F,_,w={})=>{const{width:x,height:P,finalWidth:q}=await va(m.image.url,$,j,B);let oe=0,te=0;L==="same"?(oe=F/2,te=_/2):(oe=w.x??Math.random()*F,te=w.y??Math.random()*_);const se=Math.min(Math.max(oe,x/2),F-x/2),A=Math.min(Math.max(te,P/2),_-P/2);return{id:p.current++,url:m.image.url,link:m.link,name:m.image.name,x:se,y:A,width:q}};D.useEffect(()=>{if(!o||t.length===0)return;const m=o.getBoundingClientRect(),F=m.width,_=m.height,w=[];(async()=>{const P=t[0],q=await U(P,F,_);w.push(q),i(w),l(1)})()},[$,j,B,L,o]),D.useEffect(()=>{v==="last One"&&i(m=>m.length>0?[m[m.length-1]]:[])},[v]);const H=async m=>{if(!o)return;const F=o.getBoundingClientRect(),_=m.clientX-F.left,w=m.clientY-F.top;if(R==="image"&&!lo(_,w,a))return;let x=0,P=0;L==="on Click"?(x=_,P=w):L==="same"?(x=F.width/2,P=F.height/2):(x=Math.random()*F.width,P=Math.random()*F.height);const q=t[c],oe=await U(q,F.width,F.height,{x,y:P});i(te=>v==="all"?[...te,oe]:[oe]),l(te=>te>=t.length-1?0:te+1)};return S.jsxs("div",{ref:r,onClick:H,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),className:at.imageRevealSlider,style:{cursor:s==="none"?"default":"none"},children:[a.map(m=>S.jsx("div",{className:at.wrapper,style:{top:`${m.y}px`,left:`${m.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:m.width??"auto",height:"auto",cursor:s==="none"?"default":"none"},children:R==="area"&&m.link?S.jsx("a",{href:m.link,target:"_blank",className:at.link,children:S.jsx("img",{src:m.url,alt:m.name,className:at.image},m.id)}):S.jsx("img",{src:m.url,alt:m.name,className:at.image},m.id)},m.id)),b&&S.jsx("div",{className:at.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${h})`,backgroundImage:`url('${s}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Sa={element:ba,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{width:"100%",height:"100%"},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,defaultWidth:500},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,minWidth:58,maxWidth:108,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",minWidth:300,maxWidth:550}}},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:""}]}}}},xa="LightBox-module__hidden___9s-9x",Ca="LightBox-module__heroImage___sTxNF",$a="LightBox-module__background___rm9ml",_a="LightBox-module__editor___4ACaY",wa="LightBox-module__contentStyle___Bgnsq",Ta="LightBox-module__imageStyle___tLIlB",Ea="LightBox-module__imgWrapper___LuFUp",La="LightBox-module__contain___8-yaS",Aa="LightBox-module__cover___hNvOG",Ia="LightBox-module__caption___b6L2I",ka="LightBox-module__captionTextInner___rCGNH",Fa="LightBox-module__lightboxSplide___XFuWC",Ra="LightBox-module__arrow___iz38X",Va="LightBox-module__arrowVertical___Zfz81",Oa="LightBox-module__nextArrow___zkAQN",Pa="LightBox-module__arrowInner___p48sW",Ba="LightBox-module__arrowIcon___3VaFf",Na="LightBox-module__arrowImg___pNV88",Wa="LightBox-module__mirror___pjeXc",ja="LightBox-module__thumbsWrapper___GB-nU",za="LightBox-module__thumbsContainerVertical___wttk5",Ma="LightBox-module__thumbsContainer___osSma",Da="LightBox-module__thumbsAlignStart___MO6tY",Ha="LightBox-module__thumbsAlignCenter___Q4sUx",Ua="LightBox-module__thumbsAlignEnd___p4y9R",Ya="LightBox-module__thumbItem___HvnF3",Ga="LightBox-module__closeButton___g2khP",qa="LightBox-module__fadeIn___0m5GW",Xa="LightBox-module__slideInLeft___gPYwC",Ka="LightBox-module__slideInRight___S-pPp",Ja="LightBox-module__slideInTop___DFdAj",Za="LightBox-module__slideInBottom___m27kZ",Qa="LightBox-module__fadeOut___55qBR",el="LightBox-module__slideOutLeft___NvU7P",tl="LightBox-module__slideOutRight___SK7eC",nl="LightBox-module__slideOutTop___Vgg0z",ol="LightBox-module__slideOutBottom___nJ0Ef",rl="LightBox-module__scaleSlide___vZriG",N={hidden:xa,heroImage:Ca,background:$a,editor:_a,contentStyle:wa,imageStyle:Ta,imgWrapper:Ea,contain:La,cover:Aa,caption:Ia,captionTextInner:ka,lightboxSplide:Fa,arrow:Ra,arrowVertical:Va,nextArrow:Oa,arrowInner:Pa,arrowIcon:Ba,arrowImg:Na,mirror:Wa,thumbsWrapper:ja,thumbsContainerVertical:za,thumbsContainer:Ma,thumbsAlignStart:Da,thumbsAlignCenter:Ha,thumbsAlignEnd:Ua,thumbItem:Ya,closeButton:Ga,fadeIn:qa,slideInLeft:Xa,slideInRight:Ka,slideInTop:Ja,slideInBottom:Za,fadeOut:Qa,slideOutLeft:el,slideOutRight:tl,slideOutTop:nl,slideOutBottom:ol,scaleSlide:rl},Nt=(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 nr(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 so(e){const t=e.getBoundingClientRect(),n=nr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,i=e.naturalHeight,c=o/r,l=a/i;let p,u;l>c?(p=o,u=o/l):(u=r,p=r*l);const C=t.left+n.left,h=t.top+n.top,g=(o-p)/2+C,s=(r-u)/2+h;return{x:g,y:s,width:p,height:u}}function co(e){const t=e.getBoundingClientRect(),n=nr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function uo(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 il(e,t){const n=(()=>{if(e==="fade in")return N.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return N.slideInLeft;case"right":return N.slideInRight;case"top":return N.slideInTop;case"bottom":return N.slideInBottom;default:return N.slideInRight}return N.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return N.fadeIn;if(e==="slide in")switch(t){case"left":return N.slideInLeft;case"right":return N.slideInRight;case"top":return N.slideInTop;case"bottom":return N.slideInBottom;default:return N.slideInRight}return N.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return N.fadeOut;if(e==="slide in")switch(t){case"left":return N.slideOutLeft;case"right":return N.slideOutRight;case"top":return N.slideOutTop;case"bottom":return N.slideOutBottom;default:return N.slideOutRight}return N.fadeOut})(),a=(()=>{if(e==="fade in")return N.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return N.slideOutLeft;case"right":return N.slideOutRight;case"top":return N.slideOutTop;case"bottom":return N.slideOutBottom;default:return N.slideOutRight}return N.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:a}}const al=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:a})=>{const[i,c]=D.useState(!1),{url:l}=e.thumbnailBlock.cover;return D.useEffect(()=>{r==="close"&&c(!1),r==="open"&&c(!0)},[r]),S.jsxs(S.Fragment,{children:[S.jsx("img",{src:l,alt:"Cover",className:N.heroImage,onClick:()=>c(!0)}),S.jsx(ll,{isOpen:i,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:a})]})},ll=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:a,isEditor:i,metadata:c})=>{var z;const[l,p]=D.useState(0),[u,C]=D.useState(0),[h,g]=D.useState(!1),[s,d]=D.useState(!1),[T,b]=D.useState({}),y=D.useRef(null),$=D.useRef(null),j=D.useRef(null),B=D.useRef(!1),L=D.useRef(null),v=D.useRef(null),E=D.useRef(null),R=D.useRef(null),W=D.useRef(!1),k=D.useRef(null),[V,O]=D.useState(!1),{appear:U,triggers:H,slider:m,thumbnail:F,controls:_,area:w,caption:x,layout:P}=r.lightboxBlock,{appearClass:q,backdropAppearClass:oe,backdropDisappearClass:te,disappearClass:se}=il(U.type,U.direction),A=(c==null?void 0:c.itemId)??null;D.useEffect(()=>{const f=()=>{setTimeout(()=>{var X,G;(G=(X=y.current)==null?void 0:X.splide)==null||G.refresh()},16)},M=()=>{C(X=>X+1)};return window.addEventListener("ArticleEditor.Layout:change",f),window.addEventListener("ArticleEditor.ComponentContent:change",M),()=>{window.removeEventListener("ArticleEditor.Layout:change",f),window.removeEventListener("ArticleEditor.ComponentContent:change",M)}},[]),D.useEffect(()=>{if(!e||!F.isActive){O(!1);return}const f=k.current;if(!f)return;const M=()=>{m.direction==="horiz"?O(f.scrollWidth>f.clientWidth):O(f.scrollHeight>f.clientHeight)};M();const X=new ResizeObserver(M);return X.observe(f),()=>X.disconnect()},[e,F.isActive,n.length,T,m.direction]);const J=D.useCallback(()=>{const f=window.matchMedia("(max-width: 768px)").matches,M=uo(w.color);f&&!i&&M>.9&&(document.body.style.backgroundColor=""),g(!0),B.current=!0;const X=G=>{G.target===L.current&&G.animationName&&(L.current&&v.current&&L.current.removeEventListener("animationend",v.current),v.current=null,B.current&&(B.current=!1,t()),g(!1))};L.current&&(v.current=X,L.current.addEventListener("animationend",X))},[t,w.color,i]),ye=(f,M,X)=>{var G,ne;if(f){if(H.type==="click"&&H.switch==="image")H.repeat==="close"&&l===n.length-1?J():(G=y.current)==null||G.go("+1");else if(H.type==="click"&&H.switch==="50/50"){const Z=f.getBoundingClientRect(),K=M-Z.left,le=X-Z.top,fe=Z.width,ie=Z.height;let re;m.direction==="horiz"?re=K<fe/2?"-1":"+1":re=le<ie/2?"-1":"+1",(ne=y.current)==null||ne.go(re)}}},ae=f=>{if(W.current){W.current=!1;return}const M=n[l],X=(M==null?void 0:M.image.objectFit)==="cover";let G,ne;if("changedTouches"in f&&f.changedTouches.length>0)G=f.changedTouches[0].clientX,ne=f.changedTouches[0].clientY;else if("clientX"in f)G=f.clientX,ne=f.clientY;else return;let Z;if(X&&j.current){const K=co(j.current);Z=G>=K.left&&G<=K.right&&ne>=K.top&&ne<=K.bottom}else{const K=j.current?so(j.current):null;if(!K){f.target===f.currentTarget&&J();return}Z=G>=K.x&&G<=K.x+K.width&&ne>=K.y&&ne<=K.y+K.height}Z?ye(j.current,G,ne):J()},me=f=>{const M=f.target;(M.classList.contains(N.thumbsWrapper)||M.classList.contains(N.thumbsContainer))&&ae(f)};D.useEffect(()=>{if(!e)return;const f=M=>{var X,G;if(M.key==="Escape"){J();return}if(M.key==="ArrowRight"){p(ne=>(ne+1)%Math.max(n.length,1)),(X=y.current)==null||X.go("+1");return}M.key==="ArrowLeft"&&(p(ne=>(ne-1+Math.max(n.length,1))%Math.max(n.length,1)),(G=y.current)==null||G.go("-1"))};return window.addEventListener("keydown",f),()=>{window.removeEventListener("keydown",f)}},[e,J,n.length]),D.useEffect(()=>{if(e){if(p(0),C(M=>M+1),B.current=!1,g(!1),d(!1),b({}),!A)return;const f=new CustomEvent("page-overlay",{detail:{itemId:A}});window.dispatchEvent(f)}return()=>{L.current&&v.current&&(L.current.removeEventListener("animationend",v.current),v.current=null),d(!1)}},[e,A]),D.useEffect(()=>{$.current!==null&&$.current!==m.type&&C(f=>f+1),$.current=m.type},[m.type]),D.useEffect(()=>{if(!e)return;const f=document.body.style.overflow,M=window.matchMedia("(max-width: 768px)").matches,X=uo(w.color);document.body.style.overflow="hidden",d(!1);const G=Z=>{Z.target===L.current&&!B.current&&Z.animationName&&(M&&!i&&X>.9&&(document.body.style.backgroundColor=w.color),d(!0),L.current&&E.current&&L.current.removeEventListener("animationend",E.current),E.current=null)};L.current&&(E.current=G,L.current.addEventListener("animationend",G));const ne=Z=>{const K=Z.target;K&&(K.closest(`.${N.thumbsWrapper}`)||K.closest(`.${N.thumbsContainer}`))||m.type!=="slide"&&Z.preventDefault()};return document.addEventListener("touchmove",ne,{passive:!1}),()=>{document.body.style.overflow=f,document.removeEventListener("touchmove",ne),L.current&&E.current&&(L.current.removeEventListener("animationend",E.current),E.current=null),d(!1)}},[e,i,w.color,m.type]),D.useEffect(()=>{if(!e)return;const f=M=>{var G,ne;if(B.current){M.stopPropagation();return}if(W.current){W.current=!1;return}const X=M.target;if(!(X&&(X.closest(`.${N.thumbsContainer}`)||X.closest(`.${N.thumbItem}`)))){if(m.type==="slide"&&H.type==="drag"&&((ne=(G=y.current)==null?void 0:G.splide)!=null&&ne.root)){const Z=y.current.splide.root;if(X&&(Z.contains(X)||Z===X))return}if(M.touches.length===0&&M.changedTouches.length>0){const Z=n[l],K=(Z==null?void 0:Z.image.objectFit)==="cover",le=M.changedTouches[0];let fe;if(K&&j.current){const ie=co(j.current);fe=le.clientX>=ie.left&&le.clientX<=ie.right&&le.clientY>=ie.top&&le.clientY<=ie.bottom}else{const ie=j.current?so(j.current):null;if(!ie)return;fe=le.clientX>=ie.x&&le.clientX<=ie.x+ie.width&&le.clientY>=ie.y&&le.clientY<=ie.y+ie.height}if(!fe){M.stopPropagation(),B.current=!0;const ie=re=>{re.stopPropagation(),re.preventDefault(),document.removeEventListener("click",ie,!0)};document.addEventListener("click",ie,!0),J()}}}};return document.addEventListener("touchend",f,{passive:!0}),()=>{document.removeEventListener("touchend",f)}},[e,J,l,n]);const Oe=(m.type==="scale"||m.type==="fade")&&m.direction==="vert"&&H.type==="drag";D.useEffect(()=>{var re,De;if(!e||!Oe||!((De=(re=y.current)==null?void 0:re.splide)!=null&&De.root))return;const f=y.current.splide.root,M=30,X=(Q,ce)=>{if(R.current){const Se=Math.abs(Q-R.current.x),Ee=Math.abs(ce-R.current.y);(Se>0||Ee>0)&&(W.current=!0)}},G=Q=>{R.current&&(Q.preventDefault(),X(Q.clientX,Q.clientY))},ne=Q=>{R.current&&Q.touches.length>0&&(Q.preventDefault(),X(Q.touches[0].clientX,Q.touches[0].clientY))},Z=(Q,ce)=>{if(!R.current||!y.current){R.current=null;return}const Se=Math.abs(Q-R.current.x),Ee=Math.abs(ce-R.current.y);Ee>M&&Ee>Se&&y.current.go(ce<R.current.y?"+1":"-1"),R.current=null},K=Q=>{R.current&&Z(Q.clientX,Q.clientY),document.removeEventListener("pointerup",K),document.removeEventListener("pointercancel",K),document.removeEventListener("pointermove",G)},le=Q=>{if(R.current){if(Q.changedTouches.length>0){const ce=Q.changedTouches[0];Z(ce.clientX,ce.clientY)}document.removeEventListener("touchend",le),document.removeEventListener("touchcancel",le),document.removeEventListener("touchmove",ne)}},fe=Q=>{R.current={x:Q.clientX,y:Q.clientY},W.current=!1,document.addEventListener("pointermove",G,{passive:!1}),document.addEventListener("pointerup",K),document.addEventListener("pointercancel",K)},ie=Q=>{Q.touches.length>0&&(R.current={x:Q.touches[0].clientX,y:Q.touches[0].clientY},W.current=!1,document.addEventListener("touchmove",ne,{passive:!1}),document.addEventListener("touchend",le),document.addEventListener("touchcancel",le))};return f.addEventListener("pointerdown",fe),f.addEventListener("touchstart",ie),()=>{f.removeEventListener("pointerdown",fe),f.removeEventListener("touchstart",ie),document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",K),document.removeEventListener("pointercancel",K),document.removeEventListener("touchmove",ne),document.removeEventListener("touchend",le),document.removeEventListener("touchcancel",le),R.current=null,W.current=!1}},[e,Oe,u]);const Pe={backgroundColor:w.color,backdropFilter:`blur(${w.blur}px)`,animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return document.getElementById(a)?ar.createPortal(S.jsxs(S.Fragment,{children:[S.jsx("div",{ref:i?null:L,className:de(N.background,h?te:oe,{[N.editor]:i},{[N.hidden]:!e}),style:{...Pe,...s&&!i&&!h?{position:"absolute"}:{}}}),S.jsxs("div",{ref:i?L:null,className:de(N.contentStyle,h?se:q,{[N.editor]:i},{[N.hidden]:!e}),style:{animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[S.jsx(Qo,{onMove:f=>p(f.index),ref:y,className:N.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"&&!Oe,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((f,M)=>{const X=Nt(P.position,P.offset,i),G=`${I.scalingValue(P.padding.top,i)} ${I.scalingValue(P.padding.right,i)} ${I.scalingValue(P.padding.bottom,i)} ${I.scalingValue(P.padding.left,i)}`,ne=m.type==="scale"?(()=>{const{transform:Z,...K}=X;return{...K,position:"absolute",padding:G,boxSizing:"border-box","--position-transform":Z||"none"}})():{...X,position:"absolute",padding:G,boxSizing:"border-box"};return S.jsx(er,{children:S.jsx("div",{className:N.imgWrapper,onClick:ae,children:S.jsx("img",{ref:M===l?j:null,className:de(N.imageStyle,{[N.contain]:f.image.objectFit==="contain",[N.cover]:f.image.objectFit==="cover",[N.scaleSlide]:m.type==="scale"}),src:f.image.url,alt:f.image.name??"",style:{...ne,pointerEvents:f.image.objectFit==="contain"?"none":"auto"}})})},M)})},u),_.isActive&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:de(N.arrow,{[N.arrowVertical]:m.direction==="vert"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:S.jsxs("button",{className:N.arrowInner,style:{transform:`translate(${I.scalingValue(_.offset.x,i)}, ${I.scalingValue(_.offset.y*(m.direction==="horiz"?1:-1),i)}) scale(${_.scale}) rotate(${m.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var f;return(f=y.current)==null?void 0:f.go("-1")},"aria-label":"Previous",children:[_.arrowsImgUrl&&S.jsx(xt,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:de(N.arrowImg,N.mirror)}),!_.arrowsImgUrl&&S.jsx(po,{color:_.color,className:de(N.arrowIcon,N.arrowImg,N.mirror)})]})}),S.jsx("div",{className:de(N.arrow,N.nextArrow,{[N.arrowVertical]:m.direction==="vert"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:S.jsxs("button",{className:N.arrowInner,style:{transform:`translate(${I.scalingValue(_.offset.x*(m.direction==="horiz"?-1:1),i)}, ${I.scalingValue(_.offset.y,i)}) scale(${_.scale}) rotate(${m.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var f;return(f=y.current)==null?void 0:f.go("+1")},"aria-label":"Next",children:[_.arrowsImgUrl&&S.jsx(xt,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:N.arrowImg}),!_.arrowsImgUrl&&S.jsx(po,{color:_.color,className:de(N.arrowIcon,N.arrowImg)})]})})]}),w.closeIconUrl&&(()=>{const f=Nt(w.closeIconAlign,w.closeIconOffset,i),M=`scale(${w.closeIconScale})`,X=f.transform?`${f.transform} ${M}`:M;return S.jsx("button",{className:N.closeButton,style:{...f,transform:X},onClick:J,"aria-label":"Close lightbox",children:S.jsx(xt,{url:w.closeIconUrl,fill:w.closeIconColor??"#000000",hoverFill:w.closeIconHover??"#cccccc"})})})(),x&&x.isActive&&o.imageCaption&&((z=n[l])==null?void 0:z.imageCaption)&&(()=>{const{widthSettings:f,fontSettings:M,letterSpacing:X,textAlign:G,wordSpacing:ne,fontSizeLineHeight:Z,textAppearance:K,color:le}=o.imageCaption;return S.jsx("div",{className:N.caption,style:{...Nt(x.alignment,x.offset,i),fontFamily:M.fontFamily,fontWeight:M.fontWeight,fontStyle:M.fontStyle,width:f.sizing==="auto"?"max-content":I.scalingValue(f.width,i),letterSpacing:I.scalingValue(X,i),wordSpacing:I.scalingValue(ne,i),textAlign:G,fontSize:I.scalingValue(Z.fontSize,i),lineHeight:I.scalingValue(Z.lineHeight,i),textTransform:K.textTransform??"none",textDecoration:K.textDecoration??"none",fontVariant:K.fontVariant??"normal",color:le},onClick:fe=>fe.stopPropagation(),children:S.jsx("div",{"data-styles":"imageCaption",className:N.captionTextInner,style:{"--link-color":x.linkColor,"--link-hover-color":x.linkHoverColor},children:S.jsx(tr,{content:n[l].imageCaption})})})})(),F.isActive&&(()=>{const[f,M]=F.position.split("-"),X=m.direction==="horiz"?`${f}-left`:F.position,G=Nt(X,F.offset,i),ne=()=>{if(m.direction==="horiz"){if(M==="left")return"flex-start";if(M==="center")return"center";if(M==="right")return"flex-end"}else{if(f==="top")return"flex-start";if(f==="middle")return"center";if(f==="bottom")return"flex-end"}return"flex-start"};return S.jsx("div",{ref:k,className:N.thumbsWrapper,onClick:Z=>me(Z),style:{position:i?"absolute":"fixed",...G,...m.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:S.jsx("div",{className:de(N.thumbsContainer,{[N.thumbsContainerVertical]:m.direction==="vert",[N.thumbsAlignStart]:F.align==="start",[N.thumbsAlignCenter]:F.align==="center",[N.thumbsAlignEnd]:F.align==="end"}),style:{gap:I.scalingValue(F.grid.gap,i),justifyContent:V?"flex-start":ne()},children:n.map((Z,K)=>{const le=K===l,fe=T[K],re=F.grid.size*(le?F.activeState.scale:1),De=()=>{if(F.fit!=="fit")return{};if(!fe)return m.direction==="horiz"?{height:I.scalingValue(re,i)}:{width:I.scalingValue(re,i)};const Q=fe.width/fe.height;if(m.direction==="horiz"){const ce=re,Se=ce*Q;return{width:I.scalingValue(Se,i),height:I.scalingValue(ce,i)}}else{const ce=re,Se=ce/Q;return{width:I.scalingValue(ce,i),height:I.scalingValue(Se,i)}}};return S.jsx("button",{className:N.thumbItem,style:{...m.direction==="horiz"&&F.fit!=="fit"?{height:I.scalingValue(re,i)}:{},...m.direction==="vert"&&F.fit!=="fit"?{width:I.scalingValue(re,i)}:{},...F.fit==="cover"?{width:I.scalingValue(re,i),height:I.scalingValue(re,i)}:{},...De(),transition:le?"all 0.25s ease-out":"none",opacity:le?F.activeState.opacity/100:F.opacity/100,"--thumb-hover":F.activeState.opacity/100},onClick:Q=>{var ce;Q.stopPropagation(),p(K),(ce=y.current)==null||ce.go(K)},onMouseEnter:()=>{var Q;F.triggers==="hov"&&((Q=y.current)==null||Q.go(K))},children:S.jsx("img",{src:Z.image.url,alt:Z.image.name??"",onLoad:Q=>{const ce=Q.currentTarget;ce.naturalWidth&&ce.naturalHeight&&b(Se=>({...Se,[K]:{width:ce.naturalWidth,height:ce.naturalHeight}}))},style:{objectFit:F.fit==="cover"?"cover":"contain",...F.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...F.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Z.image.name}-${K}`)})})})})()]})]}),document.getElementById(a)):null};function po({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 sl={element:al,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},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,defaultWidth:500},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",minWidth:58,maxWidth:108},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",minWidth:300,maxWidth:550}}},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 lt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function cl(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${rt(48)};
11
+ min-height: ${lt(48)};
12
12
  }
13
13
  .${e}-wrapper.${e}-type-C .${e}-input:focus-visible,
14
14
  .${e}-wrapper.${e}-type-C .${e}-button:focus-visible {
@@ -32,7 +32,7 @@
32
32
  min-width: 0;
33
33
  }
34
34
  .${e}-field-group.${e}-labeled {
35
- gap: ${rt(4)};
35
+ gap: ${lt(4)};
36
36
  }
37
37
  .${e}-field-label {
38
38
  white-space: nowrap;
@@ -69,7 +69,7 @@
69
69
  color: var(--${e}-focus-input-text-color, var(--${e}-input-text-color));
70
70
  border-color: var(--${e}-focus-input-border-color, var(--${e}-input-border-color));
71
71
  }
72
- .${e}-wrapper.${e}-state-filled .${e}-input {
72
+ .${e}-input[data-filled="true"] {
73
73
  background-color: var(--${e}-filled-input-color, var(--${e}-input-color));
74
74
  color: var(--${e}-filled-input-text-color, var(--${e}-input-text-color));
75
75
  border-color: var(--${e}-filled-input-border-color, var(--${e}-input-border-color));
@@ -123,20 +123,20 @@
123
123
  outline: 1px solid var(--${e}-focus-button-border-color, var(--${e}-button-border-color));
124
124
  }
125
125
  .${e}-success {
126
- margin-top: ${rt(8)};
127
- font-size: ${rt(14)};
126
+ margin-top: ${lt(8)};
127
+ font-size: ${lt(14)};
128
128
  color: var(--${e}-success-success-color, var(--${e}-success-color));
129
129
  }
130
130
  .${e}-error {
131
- margin-top: ${rt(8)};
132
- font-size: ${rt(14)};
131
+ margin-top: ${lt(8)};
132
+ font-size: ${lt(14)};
133
133
  color: var(--${e}-error-error-color, var(--${e}-error-color));
134
134
  }
135
135
  .${e}-overlay-anchor {
136
136
  position: relative;
137
137
  height: auto;
138
138
  }
139
- `}function ul({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=I.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:c=[],buttonLabel:l,gap:p,fieldsGap:u,buttonCorners:C,buttonStroke:y,buttonPadding:g,isButtonFullWidth:s,inputCorners:d,inputStroke:T,inputPadding:v,inputColor:m,inputTextColor:$,inputBorderColor:j,placeholderColor:B,buttonColor:L,buttonTextColor:h,buttonBorderColor:E,labelTextColor:R,successColor:W,errorColor:k,fontFamily:V,inputFontSettings:O,inputFontSize:U,inputLineHeight:H,inputLetterSpacing:f,inputWordSpacing:F,inputTextAppearance:w,buttonFontSettings:_,buttonFontSize:x,buttonLineHeight:P,buttonLetterSpacing:q,buttonWordSpacing:ie,buttonTextAppearance:ne,labelFontSettings:le,labelFontSize:A,labelLineHeight:Z,labelLetterSpacing:ye,labelWordSpacing:ae,labelTextAppearance:ge,successMessage:me,errorMessage:Oe,stateOverrides:z}=e,b=a==="B",M=c.slice(0,Math.min(i,c.length)),X={fontSettings:{fontFamily:V,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:U??.01,lineHeight:H,letterSpacing:f??0,wordSpacing:F??0,textAppearance:w},G=pn(X,t),oe=I.scalingValue(T??0,t),J={...G,borderStyle:"solid",borderRadius:a==="C"?0:I.scalingValue(d??0,t),borderWidth:a==="C"?void 0:oe,borderTopWidth:a==="C"?0:void 0,borderRightWidth:a==="C"?0:void 0,borderBottomWidth:a==="C"?oe:void 0,borderLeftWidth:a==="C"?0:void 0,paddingTop:I.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:I.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:I.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:I.scalingValue((v==null?void 0:v.left)??0,t)},K={fontSettings:{fontFamily:V,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:x??.01,lineHeight:P,letterSpacing:q??0,wordSpacing:ie??0,textAppearance:ne},re=pn(K,t),ve=I.scalingValue(y??0,t),ce={fontSettings:{fontFamily:V,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:A??.01,lineHeight:Z,letterSpacing:ye??0,wordSpacing:ae??0,textAppearance:ge},ue=pn(ce,t),Me=dl(r,{inputColor:m,inputTextColor:$,inputBorderColor:j,placeholderColor:B!=null&&B.trim()?B:"#cccccc",buttonColor:L,buttonTextColor:h,buttonBorderColor:E,labelTextColor:R,successColor:W,errorColor:k},z),[Q,te]=D.useState(()=>Object.fromEntries(M.map(fe=>[fe.name,""]))),[be,xe]=D.useState("idle"),[$e,ke]=D.useState(null),on=o==="success"?"success":o==="error"?"error":be,nr=o==="error"?Oe:$e,rn=o==="filled"?Object.fromEntries(M.map(fe=>[fe.name,"Filled"])):Q,or=on==="error"?I.getFormFieldValidationError(M,rn):null,rr=o&&o!=="default"?`${r}-state-${o}`:"",Mn=n==null?void 0:n.submitUrl,Dn=(fe,tt)=>{te(De=>({...De,[fe]:tt}))},ir=async fe=>{fe.preventDefault();const tt=Object.fromEntries(M.map(Ee=>{var nt;return[Ee.name,((nt=Q[Ee.name])==null?void 0:nt.trim())??""]}).filter(([,Ee])=>Ee));if(!Mn||Object.keys(tt).length===0)return;const De=I.getFormFieldValidationError(M,Q);if(De){xe("error"),ke(De);return}xe("submitting"),ke(null);try{const Ee=await fetch(Mn,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(tt)});if(!Ee.ok){const nt=await Ee.text();throw new Error(nt||`Request failed: ${Ee.status}`)}xe("success"),te(Object.fromEntries(M.map(nt=>[nt.name,""])))}catch(Ee){xe("error"),ke(Ee instanceof Error?Ee.message:"Something went wrong")}};return S.jsxs("div",{className:`${r}-wrapper ${r}-type-${a} ${rr}`.trim(),style:Me,children:[S.jsx("style",{children:cl(r)}),S.jsxs("form",{onSubmit:ir,className:`${r}-form`,style:{gap:I.scalingValue(p??0,t)},children:[S.jsx("div",{className:`${r}-fields`,style:{gap:I.scalingValue(u??0,t)},children:M.map((fe,tt)=>S.jsxs("div",{className:`${r}-field-group${b?` ${r}-labeled`:""}`,children:[b&&S.jsx("span",{className:`${r}-field-label`,style:ue?{...ue,lineHeight:ue.fontSize}:void 0,children:fe.label||fe.name}),fe.type==="textarea"?S.jsx("textarea",{name:fe.name,autoComplete:"off",value:rn[fe.name]??"",onChange:De=>Dn(fe.name,De.target.value),placeholder:fe.placeholder,className:`${r}-input`,style:J,rows:1,"data-field-type":"textarea"}):S.jsx("input",{type:fe.type==="phone"?"tel":fe.type==="email"?"email":"text",name:fe.name,autoComplete:"off",value:rn[fe.name]??"",onChange:De=>Dn(fe.name,De.target.value),placeholder:fe.placeholder,required:fe.type==="email",className:`${r}-input`,style:J})]},tt))}),S.jsx("div",{className:`${r}-overlay-anchor`,children:S.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:I.scalingValue(C??0,t),borderWidth:ve,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),...re,...s?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:S.jsx("span",{className:`${r}-overlay-anchor`,style:s?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:be==="submitting"?"...":l})})})]}),on==="success"&&S.jsx("p",{className:`${r}-success`,style:{...G,lineHeight:G==null?void 0:G.fontSize},children:me}),on==="error"&&S.jsx("p",{className:`${r}-error`,style:{...G,lineHeight:G==null?void 0:G.fontSize},role:"alert",children:or??nr??Oe})]})}const po={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"},pl=["hover","focus","filled","success","error"];function dl(e,t,n){const o={};for(const[r,a]of Object.entries(po))o[`--${e}-${a}`]=t[r];if(n)for(const r of pl){const a=n[r];if(a)for(const[i,c]of Object.entries(po)){const l=a[i];l!==void 0&&(o[`--${e}-${r}-${c}`]=l)}}return o}function pn(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}}const gl=`import React, { useState } from 'react';
139
+ `}function ul({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=I.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:c=[],buttonLabel:l,gap:p,fieldsGap:u,buttonCorners:C,buttonStroke:h,buttonPadding:g,isButtonFullWidth:s,inputCorners:d,inputStroke:T,inputPadding:b,inputColor:y,inputTextColor:$,inputBorderColor:j,placeholderColor:B,buttonColor:L,buttonTextColor:v,buttonBorderColor:E,labelTextColor:R,successColor:W,errorColor:k,fontFamily:V,inputFontSettings:O,inputFontSize:U,inputLineHeight:H,inputLetterSpacing:m,inputWordSpacing:F,inputTextAppearance:_,buttonFontSettings:w,buttonFontSize:x,buttonLineHeight:P,buttonLetterSpacing:q,buttonWordSpacing:oe,buttonTextAppearance:te,labelFontSettings:se,labelFontSize:A,labelLineHeight:J,labelLetterSpacing:ye,labelWordSpacing:ae,labelTextAppearance:me,successMessage:Oe,errorMessage:Pe,stateOverrides:z}=e,f=a==="B",M=c.slice(0,Math.min(i,c.length)),X={fontSettings:{fontFamily:V,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:U??.01,lineHeight:H,letterSpacing:m??0,wordSpacing:F??0,textAppearance:_},G=dn(X,t),ne=I.scalingValue(T??0,t),Z={...G,borderStyle:"solid",borderRadius:a==="C"?0:I.scalingValue(d??0,t),borderWidth:a==="C"?void 0:ne,borderTopWidth:a==="C"?0:void 0,borderRightWidth:a==="C"?0:void 0,borderBottomWidth:a==="C"?ne:void 0,borderLeftWidth:a==="C"?0:void 0,paddingTop:I.scalingValue((b==null?void 0:b.top)??0,t),paddingRight:I.scalingValue((b==null?void 0:b.right)??0,t),paddingBottom:I.scalingValue((b==null?void 0:b.bottom)??0,t),paddingLeft:I.scalingValue((b==null?void 0:b.left)??0,t)},K={fontSettings:{fontFamily:V,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:x??.01,lineHeight:P,letterSpacing:q??0,wordSpacing:oe??0,textAppearance:te},le=dn(K,t),fe=I.scalingValue(h??0,t),ie={fontSettings:{fontFamily:V,fontWeight:(se==null?void 0:se.fontWeight)??400,fontStyle:(se==null?void 0:se.fontStyle)??"normal"},fontSize:A??.01,lineHeight:J,letterSpacing:ye??0,wordSpacing:ae??0,textAppearance:me},re=dn(ie,t),De=dl(r,{inputColor:y,inputTextColor:$,inputBorderColor:j,placeholderColor:B!=null&&B.trim()?B:"#cccccc",buttonColor:L,buttonTextColor:v,buttonBorderColor:E,labelTextColor:R,successColor:W,errorColor:k},z),[Q,ce]=D.useState(()=>Object.fromEntries(M.map(pe=>[pe.name,""]))),[Se,Ee]=D.useState("idle"),[ve,He]=D.useState(null),Ue=o==="success"?"success":o==="error"?"error":Se,Ce=o==="error"?Pe:ve,$e=o==="filled"?Object.fromEntries(M.map(pe=>[pe.name,"Filled"])):Q,or=Ue==="error"?I.getFormFieldValidationError(M,$e):null,rr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),Dn=n==null?void 0:n.submitUrl,Hn=(pe,rt)=>{ce(Ye=>({...Ye,[pe]:rt}))},ir=async pe=>{pe.preventDefault();const rt=Object.fromEntries(M.map(Le=>{var it;return[Le.name,((it=Q[Le.name])==null?void 0:it.trim())??""]}).filter(([,Le])=>Le));if(!Dn||Object.keys(rt).length===0)return;const Ye=I.getFormFieldValidationError(M,Q);if(Ye){Ee("error"),He(Ye);return}Ee("submitting"),He(null);try{const Le=await fetch(Dn,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(rt)});if(!Le.ok){const it=await Le.text();throw new Error(it||`Request failed: ${Le.status}`)}Ee("success"),ce(Object.fromEntries(M.map(it=>[it.name,""])))}catch(Le){Ee("error"),He(Le instanceof Error?Le.message:"Something went wrong")}};return S.jsxs("div",{className:`${r}-wrapper ${r}-type-${a} ${rr}`.trim(),style:De,children:[S.jsx("style",{children:cl(r)}),S.jsxs("form",{onSubmit:ir,className:`${r}-form`,style:{gap:I.scalingValue(p??0,t)},children:[S.jsx("div",{className:`${r}-fields`,style:{gap:I.scalingValue(u??0,t)},children:M.map((pe,rt)=>S.jsxs("div",{className:`${r}-field-group${f?` ${r}-labeled`:""}`,children:[f&&S.jsx("span",{className:`${r}-field-label`,style:re?{...re,lineHeight:re.fontSize}:void 0,children:pe.label||pe.name}),pe.type==="textarea"?S.jsx("textarea",{name:pe.name,autoComplete:"off",value:$e[pe.name]??"",onChange:Ye=>Hn(pe.name,Ye.target.value),placeholder:pe.placeholder,className:`${r}-input`,style:Z,rows:1,"data-filled":($e[pe.name]??"").trim().length>0,"data-field-type":"textarea"}):S.jsx("input",{type:pe.type==="phone"?"tel":pe.type==="email"?"email":"text",name:pe.name,autoComplete:"off",value:$e[pe.name]??"",onChange:Ye=>Hn(pe.name,Ye.target.value),placeholder:pe.placeholder,required:pe.type==="email",className:`${r}-input`,style:Z,"data-filled":($e[pe.name]??"").trim().length>0})]},rt))}),S.jsx("div",{className:`${r}-overlay-anchor`,children:S.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:I.scalingValue(C??0,t),borderWidth:fe,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),...le,...s?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:S.jsx("span",{className:`${r}-overlay-anchor`,style:s?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Se==="submitting"?"...":l})})})]}),Ue==="success"&&S.jsx("p",{className:`${r}-success`,style:{...G,lineHeight:G==null?void 0:G.fontSize},children:Oe}),Ue==="error"&&S.jsx("p",{className:`${r}-error`,style:{...G,lineHeight:G==null?void 0:G.fontSize},role:"alert",children:or??Ce??Pe})]})}const go={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"},pl=["hover","focus","filled","success","error"];function dl(e,t,n){const o={};for(const[r,a]of Object.entries(go))o[`--${e}-${a}`]=t[r];if(n)for(const r of pl){const a=n[r];if(a)for(const[i,c]of Object.entries(go)){const l=a[i];l!==void 0&&(o[`--${e}-${r}-${c}`]=l)}}return o}function dn(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}}const gl=`import React, { useState } from 'react';
140
140
  import { CommonComponentProps } from '../props';
141
141
  import { getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
142
142
 
@@ -211,7 +211,7 @@ function getCSS(P: string): string {
211
211
  color: var(--\${P}-focus-input-text-color, var(--\${P}-input-text-color));
212
212
  border-color: var(--\${P}-focus-input-border-color, var(--\${P}-input-border-color));
213
213
  }
214
- .\${P}-wrapper.\${P}-state-filled .\${P}-input {
214
+ .\${P}-input[data-filled="true"] {
215
215
  background-color: var(--\${P}-filled-input-color, var(--\${P}-input-color));
216
216
  color: var(--\${P}-filled-input-text-color, var(--\${P}-input-text-color));
217
217
  border-color: var(--\${P}-filled-input-border-color, var(--\${P}-input-border-color));
@@ -434,6 +434,7 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
434
434
  ? getFormFieldValidationError(visibleFields, displayValues)
435
435
  : null;
436
436
  const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';
437
+ const wrapperStateClasses = \`\${stateClass}\`.trim();
437
438
 
438
439
  const submitUrl = metadata?.submitUrl as string | undefined;
439
440
  const handleFieldChange = (name: string, value: string) => {
@@ -477,7 +478,7 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
477
478
  };
478
479
 
479
480
  return (
480
- <div className={\`\${P}-wrapper \${P}-type-\${type} \${stateClass}\`.trim()} style={colorVars}>
481
+ <div className={\`\${P}-wrapper \${P}-type-\${type} \${wrapperStateClasses}\`.trim()} style={colorVars}>
481
482
  <style>{getCSS(P)}</style>
482
483
  <form
483
484
  onSubmit={handleSubmit}
@@ -505,6 +506,7 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
505
506
  className={\`\${P}-input\`}
506
507
  style={inputFieldCss}
507
508
  rows={1}
509
+ data-filled={((displayValues[field.name] ?? '') as string).trim().length > 0}
508
510
  data-field-type="textarea"
509
511
  />
510
512
  ) : (
@@ -518,6 +520,7 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
518
520
  required={field.type === 'email'}
519
521
  className={\`\${P}-input\`}
520
522
  style={inputFieldCss}
523
+ data-filled={((displayValues[field.name] ?? '') as string).trim().length > 0}
521
524
  />
522
525
  )}
523
526
  </div>
@@ -731,7 +734,7 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
731
734
  fontVariant: textStyles.textAppearance?.fontVariant
732
735
  };
733
736
  }
734
- `,fl=[{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"}],dn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},ml=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],yl={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:"layout",title:"Input Color",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"layout",title:"Input Text Color",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"layout",title:"Input Border Color",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"layout",title:"Placeholder Color",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"layout",title:"Button Color",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"layout",title:"Button Text Color",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"layout",title:"Full Width",display:{type:"toggle",enum:["Full Width","Off"]}},buttonBorderColor:{type:"string",scope:"layout",title:"Button Border Color",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"layout",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"layout",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"layout",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"layout"},fontFamily:{type:"string",scope:"layout",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...dn.fontSettings,scope:"layout",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:{...dn.fontSettings,scope:"layout",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:{...dn.fontSettings,scope:"layout",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}}},defaults:{fieldsToShow:2,fields:fl,type:"A",inputColor:"#FFFFFF",inputTextColor:"#999999",inputBorderColor:"#0A00F8",placeholderColor:"#0A00F8",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{},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"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:.0026,buttonCorners:.192,inputStroke:.0026,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.0373,inputLineHeight:.0373,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:.0015,buttonCorners:.05,inputStroke:.0015,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}},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}}]},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"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...ml],panelIds:["general","typeStyle"],stateItems:{default:["inputColor","inputBorderColor","placeholderColor","placeholderTextColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor"],filled:["inputColor","inputTextColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},hl={element:ul,id:"form",name:"Newsletter Stacked",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.png"},version:1,defaultSize:{width:400,height:42},schema:yl,sourceCode:gl};function Pt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function vl(e){return`
737
+ `,fl=[{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"}],gn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},ml=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],yl={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:"layout",title:"Input Color",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"layout",title:"Input Text Color",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"layout",title:"Input Border Color",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"layout",title:"Placeholder Color",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"layout",title:"Button Color",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"layout",title:"Button Text Color",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"layout",title:"Full Width",display:{type:"toggle",enum:["Full Width","Off"]}},buttonBorderColor:{type:"string",scope:"layout",title:"Button Border Color",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"layout",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"layout",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"layout",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"layout"},fontFamily:{type:"string",scope:"layout",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...gn.fontSettings,scope:"layout",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:{...gn.fontSettings,scope:"layout",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:{...gn.fontSettings,scope:"layout",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}}},defaults:{fieldsToShow:2,fields:fl,type:"A",inputColor:"#FFFFFF",inputTextColor:"#999999",inputBorderColor:"#0A00F8",placeholderColor:"#0A00F8",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{},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"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:.0026,buttonCorners:.192,inputStroke:.0026,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.0373,inputLineHeight:.0373,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:.0015,buttonCorners:.05,inputStroke:.0015,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}},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}}]},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"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...ml],panelIds:["general","typeStyle"],stateItems:{default:["inputColor","inputBorderColor","placeholderColor","placeholderTextColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonColor","buttonTextColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonColor","buttonTextColor","buttonBorderColor"],filled:["inputColor","inputTextColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},hl={element:ul,id:"form",name:"Newsletter Stacked",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.png"},version:1,defaultSize:{width:400,height:42},schema:yl,sourceCode:gl};function Wt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function vl(e){return`
735
738
  .${e}-wrapper {
736
739
  display: flex;
737
740
  flex-direction: column;
@@ -885,16 +888,16 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
885
888
  align-items: center;
886
889
  }
887
890
  .${e}-success {
888
- margin-top: ${Pt(8)};
889
- font-size: ${Pt(14)};
891
+ margin-top: ${Wt(8)};
892
+ font-size: ${Wt(14)};
890
893
  color: var(--${e}-success-success-color, var(--${e}-success-color));
891
894
  }
892
895
  .${e}-error {
893
- margin-top: ${Pt(8)};
894
- font-size: ${Pt(14)};
896
+ margin-top: ${Wt(8)};
897
+ font-size: ${Wt(14)};
895
898
  color: var(--${e}-error-error-color, var(--${e}-error-color));
896
899
  }
897
- `}const bl=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=I.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonContent:i,submitButtonContent:c,buttonLabel:l,buttonIcon:p,fieldsToShow:u=1,fontFamily:C,input:y,button:g,inputFontSettings:s,inputFontSize:d,inputLineHeight:T,inputLetterSpacing:v,inputWordSpacing:m,inputTextAppearance:$,buttonFontSettings:j,buttonFontSize:B,buttonLineHeight:L,buttonLetterSpacing:h,buttonWordSpacing:E,buttonTextAppearance:R,minHeight:W,corners:k,stroke:V,stateOverrides:O,inputPadding:U,buttonPadding:H,successMessage:f="Thanks for subscribing!",errorMessage:F="Please, fill all required fields."}=e,w=a.slice(0,Math.min(u,a.length)),[_,x]=D.useState(()=>Object.fromEntries(w.map(te=>[te.name,""]))),[P,q]=D.useState("idle"),[ie,ne]=D.useState(null),le=o==="success"?"success":o==="error"?"error":P,A=o==="error"?F:ie,Z=o==="filled"?Object.fromEntries(w.map(te=>[te.name,"Filled"])):_,ye=le==="error"?I.getFormFieldValidationError(w,Z):null,ae=o&&o!=="default"?`${r}-state-${o}`:"",ge=n==null?void 0:n.submitUrl,me=i,Oe=(me==null?void 0:me.mode)==="Icon"||(me==null?void 0:me.mode)==="Label"?me.mode:c==="Icon"?"Icon":"Label",z=me===void 0?l:me.label!==void 0?me.label:l,b=me===void 0?p:me.icon!==void 0?me.icon:p,M=z??"",X=b??"",G=Oe==="Icon",oe=M||"Submit",J=s||d!==void 0||T!==void 0||v!==void 0||m!==void 0||$!==void 0?{fontSettings:{fontFamily:C,fontWeight:(s==null?void 0:s.fontWeight)??400,fontStyle:(s==null?void 0:s.fontStyle)??"normal"},fontSize:d??.01,lineHeight:T,letterSpacing:v??0,wordSpacing:m??0,textAppearance:$,color:e.inputTextColor??"#111111"}:y?{...y,fontSettings:{...y.fontSettings,fontFamily:C??y.fontSettings.fontFamily},color:e.inputTextColor??y.color??"#111111"}:void 0,K=j||B!==void 0||L!==void 0||h!==void 0||E!==void 0||R!==void 0?{fontSettings:{fontFamily:C,fontWeight:(j==null?void 0:j.fontWeight)??400,fontStyle:(j==null?void 0:j.fontStyle)??"normal"},fontSize:B??.01,lineHeight:L,letterSpacing:h??0,wordSpacing:E??0,textAppearance:R,color:e.buttonTextColor??"#ffffff"}:g?{...g,fontSettings:{...g.fontSettings,fontFamily:C??g.fontSettings.fontFamily},color:e.buttonTextColor??g.color??"#ffffff"}:void 0,re=J?fo(J,t):void 0,ve=K?fo(K,t):void 0,ce=xl(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(J==null?void 0:J.color)??"#111111",buttonTextColor:e.buttonTextColor??(K==null?void 0:K.color)??"#ffffff"},O),ue={borderRadius:I.scalingValue(k,t),borderWidth:I.scalingValue(V,t),borderStyle:"solid"},Me={borderLeftWidth:I.scalingValue(V,t)},Q=async te=>{te.preventDefault();const be=Object.fromEntries(w.map($e=>{var ke;return[$e.name,((ke=_[$e.name])==null?void 0:ke.trim())??""]}).filter(([,$e])=>$e));if(!ge||Object.keys(be).length===0)return;const xe=I.getFormFieldValidationError(w,_);if(xe){q("error"),ne(xe);return}q("submitting"),ne(null);try{const $e=await fetch(ge,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(be)});if(!$e.ok){const ke=await $e.text();throw new Error(ke||`Request failed: ${$e.status}`)}q("success"),x(Object.fromEntries(w.map(ke=>[ke.name,""])))}catch($e){q("error"),ne($e instanceof Error?$e.message:"Something went wrong")}};return S.jsxs("div",{className:`${r}-wrapper ${ae}`.trim(),style:ce,children:[S.jsx("style",{children:vl(r)}),S.jsxs("form",{onSubmit:Q,className:`${r}-form`,style:{...ue,height:I.scalingValue(W,t),minHeight:I.scalingValue(W,t)},children:[S.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:w.map(te=>S.jsx("input",{type:te.type==="email"?"email":te.type==="phone"?"tel":"text",name:te.name,autoComplete:"off",value:Z[te.name]??"",onChange:be=>x(xe=>({...xe,[te.name]:be.target.value})),placeholder:te.placeholder,required:te.type==="email",className:`${r}-input`,style:{...re,paddingRight:I.scalingValue(U.right,t),paddingLeft:I.scalingValue(U.left,t),paddingTop:I.scalingValue(U.top,t),paddingBottom:I.scalingValue(U.bottom,t)}},te.name))}),S.jsx("div",{className:`${r}-overlayAnchor`,children:S.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":oe,style:{...ve,...Me,paddingRight:I.scalingValue(H.right,t),paddingLeft:I.scalingValue(H.left,t),paddingTop:I.scalingValue(H.top,t),paddingBottom:I.scalingValue(H.bottom,t)},children:P==="submitting"?"...":G?X?S.jsx("img",{src:X,alt:"",draggable:!1}):null:M})})]}),le==="success"&&S.jsx("p",{className:`${r}-success`,style:{...re,lineHeight:re==null?void 0:re.fontSize},children:f}),le==="error"&&S.jsx("p",{className:`${r}-error`,style:{...re,lineHeight:re==null?void 0:re.fontSize},role:"alert",children:ye??A??F})]})},go={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"},Sl=["hover","focus","filled","success","error"];function xl(e,t,n){const o={};for(const[r,a]of Object.entries(go))o[`--${e}-${a}`]=t[r];if(n)for(const r of Sl){const a=n[r];if(a)for(const[i,c]of Object.entries(go)){const l=a[i];l!==void 0&&(o[`--${e}-${r}-${c}`]=l)}}return o}function fo(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}}const Cl=`import React, { useState } from 'react';
900
+ `}const bl=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=I.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonContent:i,submitButtonContent:c,buttonLabel:l,buttonIcon:p,fieldsToShow:u=1,fontFamily:C,input:h,button:g,inputFontSettings:s,inputFontSize:d,inputLineHeight:T,inputLetterSpacing:b,inputWordSpacing:y,inputTextAppearance:$,buttonFontSettings:j,buttonFontSize:B,buttonLineHeight:L,buttonLetterSpacing:v,buttonWordSpacing:E,buttonTextAppearance:R,minHeight:W,corners:k,stroke:V,stateOverrides:O,inputPadding:U,buttonPadding:H,successMessage:m="Thanks for subscribing!",errorMessage:F="Please, fill all required fields."}=e,_=a.slice(0,Math.min(u,a.length)),[w,x]=D.useState(()=>Object.fromEntries(_.map(ve=>[ve.name,""]))),[P,q]=D.useState("idle"),[oe,te]=D.useState(null),se=o==="success"?"success":o==="error"?"error":P,A=o==="error"?F:oe,J=o==="filled"?Object.fromEntries(_.map(ve=>[ve.name,"Filled"])):w,ye=se==="error"?I.getFormFieldValidationError(_,J):null,ae=o&&o!=="default"?`${r}-state-${o}`:"",me=_.some(ve=>(J[ve.name]??"").trim().length>0),Oe=ae!==`${r}-state-filled`&&me?`${r}-state-filled`:"",Pe=`${ae} ${Oe}`.trim(),z=n==null?void 0:n.submitUrl,f=i,M=(f==null?void 0:f.mode)==="Icon"||(f==null?void 0:f.mode)==="Label"?f.mode:c==="Icon"?"Icon":"Label",X=f===void 0?l:f.label!==void 0?f.label:l,G=f===void 0?p:f.icon!==void 0?f.icon:p,ne=X??"",Z=G??"",K=M==="Icon",le=ne||"Submit",fe=s||d!==void 0||T!==void 0||b!==void 0||y!==void 0||$!==void 0?{fontSettings:{fontFamily:C,fontWeight:(s==null?void 0:s.fontWeight)??400,fontStyle:(s==null?void 0:s.fontStyle)??"normal"},fontSize:d??.01,lineHeight:T,letterSpacing:b??0,wordSpacing:y??0,textAppearance:$,color:e.inputTextColor??"#111111"}:h?{...h,fontSettings:{...h.fontSettings,fontFamily:C??h.fontSettings.fontFamily},color:e.inputTextColor??h.color??"#111111"}:void 0,ie=j||B!==void 0||L!==void 0||v!==void 0||E!==void 0||R!==void 0?{fontSettings:{fontFamily:C,fontWeight:(j==null?void 0:j.fontWeight)??400,fontStyle:(j==null?void 0:j.fontStyle)??"normal"},fontSize:B??.01,lineHeight:L,letterSpacing:v??0,wordSpacing:E??0,textAppearance:R,color:e.buttonTextColor??"#ffffff"}:g?{...g,fontSettings:{...g.fontSettings,fontFamily:C??g.fontSettings.fontFamily},color:e.buttonTextColor??g.color??"#ffffff"}:void 0,re=fe?mo(fe,t):void 0,De=ie?mo(ie,t):void 0,Q=xl(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(fe==null?void 0:fe.color)??"#111111",buttonTextColor:e.buttonTextColor??(ie==null?void 0:ie.color)??"#ffffff"},O),ce={borderRadius:I.scalingValue(k,t),borderWidth:I.scalingValue(V,t),borderStyle:"solid"},Se={borderLeftWidth:I.scalingValue(V,t)},Ee=async ve=>{ve.preventDefault();const He=Object.fromEntries(_.map(Ce=>{var $e;return[Ce.name,(($e=w[Ce.name])==null?void 0:$e.trim())??""]}).filter(([,Ce])=>Ce));if(!z||Object.keys(He).length===0)return;const Ue=I.getFormFieldValidationError(_,w);if(Ue){q("error"),te(Ue);return}q("submitting"),te(null);try{const Ce=await fetch(z,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(He)});if(!Ce.ok){const $e=await Ce.text();throw new Error($e||`Request failed: ${Ce.status}`)}q("success"),x(Object.fromEntries(_.map($e=>[$e.name,""])))}catch(Ce){q("error"),te(Ce instanceof Error?Ce.message:"Something went wrong")}};return S.jsxs("div",{className:`${r}-wrapper ${Pe}`.trim(),style:Q,children:[S.jsx("style",{children:vl(r)}),S.jsxs("form",{onSubmit:Ee,className:`${r}-form`,style:{...ce,height:I.scalingValue(W,t),minHeight:I.scalingValue(W,t)},children:[S.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:_.map(ve=>S.jsx("input",{type:ve.type==="email"?"email":ve.type==="phone"?"tel":"text",name:ve.name,autoComplete:"off",value:J[ve.name]??"",onChange:He=>x(Ue=>({...Ue,[ve.name]:He.target.value})),placeholder:ve.placeholder,required:ve.type==="email",className:`${r}-input`,style:{...re,paddingRight:I.scalingValue(U.right,t),paddingLeft:I.scalingValue(U.left,t),paddingTop:I.scalingValue(U.top,t),paddingBottom:I.scalingValue(U.bottom,t)}},ve.name))}),S.jsx("div",{className:`${r}-overlayAnchor`,children:S.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":le,style:{...De,...Se,paddingRight:I.scalingValue(H.right,t),paddingLeft:I.scalingValue(H.left,t),paddingTop:I.scalingValue(H.top,t),paddingBottom:I.scalingValue(H.bottom,t)},children:P==="submitting"?"...":K?Z?S.jsx("img",{src:Z,alt:"",draggable:!1}):null:ne})})]}),se==="success"&&S.jsx("p",{className:`${r}-success`,style:{...re,lineHeight:re==null?void 0:re.fontSize},children:m}),se==="error"&&S.jsx("p",{className:`${r}-error`,style:{...re,lineHeight:re==null?void 0:re.fontSize},role:"alert",children:ye??A??F})]})},fo={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"},Sl=["hover","focus","filled","success","error"];function xl(e,t,n){const o={};for(const[r,a]of Object.entries(fo))o[`--${e}-${a}`]=t[r];if(n)for(const r of Sl){const a=n[r];if(a)for(const[i,c]of Object.entries(fo)){const l=a[i];l!==void 0&&(o[`--${e}-${r}-${c}`]=l)}}return o}function mo(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}}const Cl=`import React, { useState } from 'react';
898
901
  import { CommonComponentProps } from '../props';
899
902
  import { getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
900
903
 
@@ -1129,6 +1132,10 @@ export const OnelinerForm = ({ settings, isEditor, metadata, activeEvent }: Onel
1129
1132
  ? getFormFieldValidationError(visibleFields, displayValues)
1130
1133
  : null;
1131
1134
  const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';
1135
+ const hasFilledFieldValue = visibleFields.some((f) => (displayValues[f.name] ?? '').trim().length > 0);
1136
+ const filledStateClass =
1137
+ stateClass !== \`\${P}-state-filled\` && hasFilledFieldValue ? \`\${P}-state-filled\` : '';
1138
+ const wrapperStateClasses = \`\${stateClass} \${filledStateClass}\`.trim();
1132
1139
 
1133
1140
  const submitUrl = metadata?.submitUrl as string | undefined;
1134
1141
  const bc = buttonContentFromSettings;
@@ -1269,7 +1276,7 @@ export const OnelinerForm = ({ settings, isEditor, metadata, activeEvent }: Onel
1269
1276
  };
1270
1277
 
1271
1278
  return (
1272
- <div className={\`\${P}-wrapper \${stateClass}\`.trim()} style={colorVars}>
1279
+ <div className={\`\${P}-wrapper \${wrapperStateClasses}\`.trim()} style={colorVars}>
1273
1280
  <style>{getCSS(P)}</style>
1274
1281
  <form
1275
1282
  onSubmit={handleSubmit}
@@ -1491,4 +1498,4 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
1491
1498
  fontVariant: textStyles.textAppearance?.fontVariant,
1492
1499
  };
1493
1500
  }
1494
- `,$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."}],mo={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},_l=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],wl={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"layout",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","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonContent:{type:"object",scope:"common",display:{type:"button-content-switch"},properties:{mode:{type:"string",enum:["Label","Icon"]},label:{type:["string","null"],title:"Label",message:"Subscribe",display:{type:"text-input"}},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},fontFamily:{type:"string",scope:"layout",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:"layout",title:"Border Color",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"layout",title:"Input Color",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"layout",title:"Input Text Color",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"layout",title:"Placeholder Color",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"layout",title:"Button Color",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"layout",title:"Button Text Color",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"layout",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"layout",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"layout",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"layout",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"layout"},inputFontSettings:{...mo.fontSettings,scope:"layout",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:{...mo.fontSettings,scope:"layout",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"}}},defaults:{fields:$l,fieldsToShow:1,buttonContent:{mode:"Icon",label:"Submit",icon:"https://cdn.cntrl.site/component-assets/arrow.svg"},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#0A00F8",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{},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"}},layoutDefaults:{m:{minHeight:.028,stroke:.0026,corners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.0373,inputLineHeight:.0373,buttonFontSize:.0373,buttonLineHeight:.0373},d:{minHeight:.028,stroke:.0015,corners:.05,buttonPadding:{right:.01,left:.01,top:.005,bottom:.005},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01}}},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","buttonContent"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["buttonPadding"]}}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"Input",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"Button",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","successMessage","errorMessage"]}],paletteBookmark:{items:[..._l],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","inputColor","placeholderColor","buttonColor","buttonTextColor"],hover:["strokeColor","inputColor","placeholderColor","buttonColor","buttonTextColor"],focus:["strokeColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Tl={element:bl,id:"oneliner-form",name:"Newsletter Single Line",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.png"},defaultSize:{width:"30%",height:60},schema:wl,sourceCode:Cl},El=[ga,Sa,sl,hl,Tl];exports.components=El;exports.isSchemaV1=lr;
1501
+ `,$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."}],yo={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},_l=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],wl={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"layout",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","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonContent:{type:"object",scope:"common",display:{type:"button-content-switch"},properties:{mode:{type:"string",enum:["Label","Icon"]},label:{type:["string","null"],title:"Label",message:"Subscribe",display:{type:"text-input"}},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},fontFamily:{type:"string",scope:"layout",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:"layout",title:"Border Color",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"layout",title:"Input Color",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"layout",title:"Input Text Color",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"layout",title:"Placeholder Color",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"layout",title:"Button Color",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"layout",title:"Button Text Color",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"layout",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"layout",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"layout",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"layout",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"layout"},inputFontSettings:{...yo.fontSettings,scope:"layout",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:{...yo.fontSettings,scope:"layout",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"}}},defaults:{fields:$l,fieldsToShow:1,buttonContent:{mode:"Icon",label:"Submit",icon:"https://cdn.cntrl.site/component-assets/arrow.svg"},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#0A00F8",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{},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"}},layoutDefaults:{m:{minHeight:.028,stroke:.0026,corners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.0373,inputLineHeight:.0373,buttonFontSize:.0373,buttonLineHeight:.0373},d:{minHeight:.028,stroke:.0015,corners:.05,buttonPadding:{right:.01,left:.01,top:.005,bottom:.005},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01}}},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","buttonContent"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["buttonPadding"]}}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"Input",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"Button",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","successMessage","errorMessage"]}],paletteBookmark:{items:[..._l],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","inputColor","placeholderColor","buttonColor","buttonTextColor"],hover:["strokeColor","inputColor","placeholderColor","buttonColor","buttonTextColor"],focus:["strokeColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Tl={element:bl,id:"oneliner-form",name:"Newsletter Single Line",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.png"},defaultSize:{width:"30%",height:60},schema:wl,sourceCode:Cl},El=[ga,Sa,sl,hl,Tl];exports.components=El;exports.isSchemaV1=lr;