@cntrl-site/components 1.0.1-alpha.16 → 1.0.1-alpha.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +14 -11
- package/dist/index.mjs +469 -465
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),D=require("react"),de=require("classnames"),E=require("./useScopedStyles-DpVdqfXj.js"),rr=require("react-dom");function ir(e){return e.type==="object"&&e.version===1}const ar="ControlSlider-module__wrapper___sHEkd",lr="ControlSlider-module__hoverArrow___A-dOH",sr="ControlSlider-module__sliderItem___QQSkR",cr="ControlSlider-module__sliderImage___9hRl-",ur="ControlSlider-module__arrow___05ghY",pr="ControlSlider-module__arrowVertical___tBfVN",dr="ControlSlider-module__nextArrow___-30Yc",gr="ControlSlider-module__arrowInner___aEra3",fr="ControlSlider-module__arrowIcon___S4ztF",mr="ControlSlider-module__arrowImg___2dwJW",yr="ControlSlider-module__mirror___brd6U",hr="ControlSlider-module__pagination___bicLF",vr="ControlSlider-module__paginationInner___bT-P-",br="ControlSlider-module__paginationVertical___zYqKw",Sr="ControlSlider-module__paginationItem___nTRbk",xr="ControlSlider-module__dot___p1Qun",Cr="ControlSlider-module__activeDot___LHFaj",_r="ControlSlider-module__paginationInsideBottom___R3FWn",$r="ControlSlider-module__paginationInsideTop___V-qb-",wr="ControlSlider-module__paginationOutsideBottom___14w8D",Tr="ControlSlider-module__paginationOutsideTop___SCLqB",Er="ControlSlider-module__paginationInsideLeft___yOBRZ",Lr="ControlSlider-module__paginationInsideRight___Rtt3o",Ar="ControlSlider-module__paginationOutsideLeft___lahaw",Ir="ControlSlider-module__paginationOutsideRight___EtuQa",kr="ControlSlider-module__imgWrapper___UjEgB",Fr="ControlSlider-module__captionBlock___dJ6-j",Rr="ControlSlider-module__captionTextWrapper___HFlpf",Vr="ControlSlider-module__captionText___uGBVc",Pr="ControlSlider-module__active___WZK4G",Br="ControlSlider-module__withPointerEvents___t-18M",Or="ControlSlider-module__topLeftAlignment___zjnGM",Nr="ControlSlider-module__topCenterAlignment___gD1xW",Wr="ControlSlider-module__topRightAlignment___NMapS",zr="ControlSlider-module__middleLeftAlignment___OnUrY",jr="ControlSlider-module__middleCenterAlignment___Tdkl0",Mr="ControlSlider-module__middleRightAlignment___wEbfX",Dr="ControlSlider-module__bottomLeftAlignment___cTP2-",Hr="ControlSlider-module__bottomCenterAlignment___c54fB",Ur="ControlSlider-module__bottomRightAlignment___kEwrz",Yr="ControlSlider-module__clickOverlay___DZA28",Gr="ControlSlider-module__contain___pLyq7",qr="ControlSlider-module__cover___KdDat",Y={wrapper:ar,hoverArrow:lr,sliderItem:sr,sliderImage:cr,arrow:ur,arrowVertical:pr,nextArrow:dr,arrowInner:gr,arrowIcon:fr,arrowImg:mr,mirror:yr,pagination:hr,paginationInner:vr,paginationVertical:br,paginationItem:Sr,dot:xr,activeDot:Cr,paginationInsideBottom:_r,paginationInsideTop:$r,paginationOutsideBottom:wr,paginationOutsideTop:Tr,paginationInsideLeft:Er,paginationInsideRight:Lr,paginationOutsideLeft:Ar,paginationOutsideRight:Ir,imgWrapper:kr,captionBlock:Fr,captionTextWrapper:Rr,captionText:Vr,active:Pr,withPointerEvents:Br,topLeftAlignment:Or,topCenterAlignment:Nr,topRightAlignment:Wr,middleLeftAlignment:zr,middleCenterAlignment:jr,middleRightAlignment:Mr,bottomLeftAlignment:Dr,bottomCenterAlignment:Hr,bottomRightAlignment:Ur,clickOverlay:Yr,contain:Gr,cover:qr};function Xr(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 Kr(e,t,n){return t&&Xr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Un="(prefers-reduced-motion: reduce)",ut=1,Jr=2,gt=3,yt=4,At=5,zt=6,Ht=7,Zr={CREATED:ut,MOUNTED:Jr,IDLE:gt,MOVING:yt,SCROLLING:At,DRAGGING:zt,DESTROYED:Ht};function je(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 mo=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,yo=ue(Xt,"function"),qe=ue(Xt,"string"),It=ue(Xt,"undefined");function $n(e){return e===null}function ho(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 jt(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 ho(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function vo(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?vo(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 bo(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 So(e){return Rt(new DOMParser().parseFromString(e,"text/html").body)}function Oe(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function xo(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 Co(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 Qr(e){return""+e+An(Xn[e]=(Xn[e]||0)+1)}function _o(){var e=[];function t(i,c,s,p){r(i,c,function(u,C,h){var g="addEventListener"in u,l=g?u.removeEventListener.bind(u,C,s,p):u.removeListener.bind(u,s);g?u.addEventListener(C,s,p):u.addListener(s),e.push([u,C,h,s,l])})}function n(i,c,s){r(i,c,function(p,u,C){e=e.filter(function(h){return h[0]===p&&h[1]===u&&h[2]===C&&(!s||h[3]===s)?(h[4](),!1):!0})})}function o(i,c,s){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(c,{bubbles:u,detail:s}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(c,u,!1,s)),i.dispatchEvent(p),p}function r(i,c,s){Te(i,function(p){p&&Te(c,function(u){u.split(" ").forEach(function(C){var h=C.split(".");s(p,h[0],h[1])})})})}function a(){e.forEach(function(i){i[4]()}),je(e)}return{bind:t,unbind:n,dispatch:o,destroy:a}}var Je="mounted",vn="ready",Me="move",ht="moved",In="click",$o="active",wo="inactive",To="visible",Eo="hidden",he="refresh",be="updated",ft="resize",Kt="resized",Lo="drag",Ao="dragging",Io="dragged",Jt="scroll",ot="scrolled",ei="overflow",kn="destroy",ko="arrows:mounted",Fo="arrows:updated",Ro="pagination:mounted",Vo="pagination:updated",Fn="navigation:mounted",Rn="autoplay:play",Po="autoplay:playing",Vn="autoplay:pause",Pn="lazyload:loaded",Bo="sk",Oo="sh",Gt="ei";function ge(e){var t=e?e.event.bus:document.createDocumentFragment(),n=_o();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,s=!0,p=0;function u(){if(!s){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||l(),a=r()-(b?i*e:0),s=!1,c=Yn(u)}function h(){s=!0}function g(){a=r(),i=0,n&&n(i)}function l(){c&&cancelAnimationFrame(c),i=0,c=0,s=!0}function d(b){e=b}function T(){return s}return{start:C,rewind:g,pause:h,cancel:l,set:d,isPaused:T}}function ti(e){var t=e;function n(r){t=r}function o(r){return wn(kt(r),t)}return{set:n,is:o}}function ni(e,t){var n=Zt(0,e,null,1);return function(){n.isPaused()&&n.start()}}function oi(e,t,n){var o=e.state,r=n.breakpoints||{},a=n.reducedMotion||{},i=_o(),c=[];function s(){var l=n.mediaQuery==="min";$t(r).sort(function(d,T){return l?+d-+T:+T-+d}).forEach(function(d){u(r[d],"("+(l?"min":"max")+"-width:"+d+"px)")}),u(a,Un),C()}function p(l){l&&i.destroy()}function u(l,d){var T=matchMedia(d);i.bind(T,"change",C),c.push([l,T])}function C(){var l=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"):l?(p(!0),e.mount()):d!==n.direction&&e.refresh()}function h(l){matchMedia(Un).matches&&(l?Ge(n,a):Gn(n,$t(a)))}function g(l,d,T){Ge(n,l),d&&Ge(Object.getPrototypeOf(n),l),(T||!o.is(ut))&&e.emit(be,n)}return{setup:s,destroy:p,reduce:h,set:g}}var Qt="Arrow",en=Qt+"Left",tn=Qt+"Right",No=Qt+"Up",Wo=Qt+"Down",Kn="rtl",nn="ttb",ln={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[No,tn],ArrowRight:[Wo,en]};function ri(e,t,n){function o(a,i,c){c=c||n.direction;var s=c===Kn&&!i?1:c===nn?0:-1;return ln[a]&&ln[a][s]||a.replace(/width|left|right/i,function(p,u){var C=ln[p.toLowerCase()][s]||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 ze="role",dt="tabindex",ii="disabled",ke="aria-",Pt=ke+"controls",zo=ke+"current",Jn=ke+"selected",we=ke+"label",Bn=ke+"labelledby",jo=ke+"hidden",On=ke+"orientation",Lt=ke+"roledescription",Zn=ke+"live",Qn=ke+"busy",eo=ke+"atomic",Nn=[ze,dt,ii,Pt,zo,we,Bn,jo,On,Lt],Ve=Vt+"__",Ze="is-",sn=Vt,to=Ve+"track",ai=Ve+"list",on=Ve+"slide",Mo=on+"--clone",li=on+"__container",Wn=Ve+"arrows",rn=Ve+"arrow",Do=rn+"--prev",Ho=rn+"--next",an=Ve+"pagination",Uo=an+"__page",si=Ve+"progress",ci=si+"__bar",ui=Ve+"toggle",pi=Ve+"spinner",di=Ve+"sr",gi=Ze+"initialized",nt=Ze+"active",Yo=Ze+"prev",Go=Ze+"next",bn=Ze+"visible",Sn=Ze+"loading",qo=Ze+"focus-in",Xo=Ze+"overflow",fi=[nt,bn,Yo,Go,Sn,qo,Xo],mi={slide:on,clone:Mo,arrows:Wn,arrow:rn,prev:Do,next:Ho,pagination:an,page:Uo,spinner:pi};function yi(e,t){if(yo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!_t(n,t);)n=n.parentElement;return n}var hi=5,no=200,Ko="touchstart mousedown",cn="touchmove mousemove",un="touchend touchcancel mouseup click";function vi(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=e.root,c=n.i18n,s={},p=[],u=[],C=[],h,g,l;function d(){_(),z(),y()}function T(){r(he,b),r(he,d),r(be,y),a(document,Ko+" keydown",function(v){l=v.type==="keydown"},{capture:!0}),a(i,"focusin",function(){Ne(i,qo,!!l)})}function b(v){var L=Nn.concat("style");je(p),We(i,u),We(h,C),Re([h,g],L),Re(i,v?L:["style",Lt])}function y(){We(i,u),We(h,C),u=A(sn),C=A(to),Fe(i,u),Fe(h,C),ee(i,we,n.label),ee(i,Bn,n.labelledby)}function _(){h=O("."+to),g=Rt(h,"."+ai),bt(h&&g,"A track/list element is missing."),jt(p,vo(g,"."+on+":not(."+Mo+")")),et({arrows:Wn,pagination:an,prev:Do,next:Ho,bar:ci,toggle:ui},function(v,L){s[L]=O("."+v)}),wt(s,{root:i,track:h,list:g,slides:p})}function z(){var v=i.id||Qr(Vt),L=n.role;i.id=v,h.id=h.id||v+"-track",g.id=g.id||v+"-list",!Ie(i,ze)&&i.tagName!=="SECTION"&&L&&ee(i,ze,L),ee(i,Lt,c.carousel),ee(g,ze,"presentation")}function O(v){var L=xo(i,v);return L&&yi(L,"."+sn)===i?L:void 0}function A(v){return[v+"--"+n.type,v+"--"+n.direction,n.drag&&v+"--draggable",n.isNavigation&&v+"--nav",v===sn&&nt]}return wt(s,{setup:d,mount:T,destroy:b})}var mt="slide",vt="loop",Bt="fade";function bi(e,t,n,o){var r=ge(e),a=r.on,i=r.emit,c=r.bind,s=e.Components,p=e.root,u=e.options,C=u.isNavigation,h=u.updateOnMove,g=u.i18n,l=u.pagination,d=u.slideFocus,T=s.Direction.resolve,b=Ie(o,"style"),y=Ie(o,we),_=n>-1,z=Rt(o,"."+li),O;function A(){_||(o.id=p.id+"-slide"+An(t+1),ee(o,ze,l?"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,Bo,$)),a([ht,Oo,ot],k),a(Fn,R),h&&a(Me,W)}function L(){O=!0,r.destroy(),We(o,fi),Re(o,Nn),ee(o,"style",b),ee(o,we,y||"")}function R(){var w=e.splides.map(function(x){var B=x.splide.Components.Slides.getAt(t);return B?B.slide.id:""}).join(" ");ee(o,we,hn(g.slideX,(_?n:t)+1)),ee(o,Pt,w),ee(o,ze,d?"button":""),d&&Re(o,Lt)}function W(){O||k()}function k(){if(!O){var w=e.index;V(),P(),Ne(o,Yo,t===w-1),Ne(o,Go,t===w+1)}}function V(){var w=H();w!==qn(o,nt)&&(Ne(o,nt,w),ee(o,zo,C&&w||""),i(w?$o:wo,$))}function P(){var w=m(),x=!w&&(!H()||_);if(e.state.is([yt,At])||ee(o,jo,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?To:Eo,$)),!w&&document.activeElement===o){var B=s.Slides.getAt(e.index);B&&bo(B.slide)}}function U(w,x,B){Ae(B&&z||o,w,x)}function H(){var w=e.index;return w===t||u.cloneStatus&&w===n}function m(){if(e.is(Bt))return H();var w=$e(s.Elements.track),x=$e(o),B=T("left",!0),q=T("right",!0);return Yt(w[B])<=Et(x[B])&&Yt(x[q])<=Et(w[q])}function F(w,x){var B=xe(w-t);return!_&&(u.rewind||e.is(vt))&&(B=Xe(B,e.length-B)),B<=x}var $={index:t,slideIndex:n,slide:o,container:z,isClone:_,mount:A,destroy:L,update:k,style:U,isWithin:F};return $}function Si(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=o.bind,c=t.Elements,s=c.slides,p=c.list,u=[];function C(){h(),r(he,g),r(he,h)}function h(){s.forEach(function(k,V){d(k,V,-1)})}function g(){O(function(k){k.destroy()}),je(u)}function l(){O(function(k){k.update()})}function d(k,V,P){var U=bi(e,V,P,k);U.mount(),u.push(U),u.sort(function(H,m){return H.index-m.index})}function T(k){return k?A(function(V){return!V.isClone}):u}function b(k){var V=t.Controller,P=V.toIndex(k),U=V.hasFocus()?1:n.perPage;return A(function(H){return Mt(H.index,P,P+U-1)})}function y(k){return A(k)[0]}function _(k,V){Te(k,function(P){if(qe(P)&&(P=So(P)),ho(P)){var U=s[V];U?Tn(P,U):Ft(p,P),Fe(P,n.classes.slide),L(P,ue(a,ft))}}),a(he)}function z(k){tt(A(k).map(function(V){return V.slide})),a(he)}function O(k,V){T(V).forEach(k)}function A(k){return u.filter(yo(k)?k:function(V){return qe(k)?_t(V.slide,k):wn(kt(k),V.index)})}function v(k,V,P){O(function(U){U.style(k,V,P)})}function L(k,V){var P=En(k,"img"),U=P.length;U?P.forEach(function(H){i(H,"load error",function(){--U||V()})}):V()}function R(k){return k?s.length:u.length}function W(){return u.length>n.perPage}return{mount:C,destroy:g,update:l,register:d,get:T,getIn:b,getAt:y,add:_,remove:z,forEach:O,filter:A,style:v,getLength:R,isEnough:W}}function xi(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=o.emit,c=t.Slides,s=t.Direction.resolve,p=t.Elements,u=p.root,C=p.track,h=p.list,g=c.getAt,l=c.style,d,T,b;function y(){_(),a(window,"resize load",ni(ue(i,ft))),r([be,he],_),r(ft,z)}function _(){d=n.direction===nn,Ae(u,"maxWidth",Qe(n.width)),Ae(C,s("paddingLeft"),O(!1)),Ae(C,s("paddingRight"),O(!0)),z(!0)}function z($){var w=$e(u);($||T.width!==w.width||T.height!==w.height)&&(Ae(C,"height",A()),l(s("marginRight"),Qe(n.gap)),l("width",L()),l("height",R(),!0),T=w,i(Kt),b!==(b=F())&&(Ne(u,Xo,b),i(ei,b)))}function O($){var w=n.padding,x=s($?"right":"left");return w&&Qe(w[x]||(Ct(w)?0:w))||"0px"}function A(){var $="";return d&&($=v(),bt($,"height or heightRatio is missing."),$="calc("+$+" - "+O(!1)+" - "+O(!0)+")"),$}function v(){return Qe(n.height||$e(h).width*n.heightRatio)}function L(){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)[s("width")]}function V($,w){var x=g($||0);return x?$e(x.slide)[s("width")]+(w?0:H()):0}function P($,w){var x=g($);if(x){var B=$e(x.slide)[s("right")],q=$e(h)[s("left")];return xe(B-q)+(w?0:H())}return 0}function U($){return P(e.length-1)-P(0)+V(0,$)}function H(){var $=g(0);return $&&parseFloat(Ae($.slide,s("marginRight")))||0}function m($){return parseFloat(Ae(C,s("padding"+($?"Right":"Left"))))||0}function F(){return e.is(Bt)||U(!0)>k()}return{mount:y,resize:z,listSize:k,slideSize:V,sliderSize:U,totalSize:P,getPadding:m,isOverflow:F}}var Ci=2;function _i(e,t,n){var o=ge(e),r=o.on,a=t.Elements,i=t.Slides,c=t.Direction.resolve,s=[],p;function u(){r(he,C),r([be,ft],g),(p=T())&&(l(p),t.Layout.resize(!0))}function C(){h(),u()}function h(){tt(s),je(s),o.destroy()}function g(){var b=T();p!==b&&(p<b||!b)&&o.emit(he)}function l(b){var y=i.get().slice(),_=y.length;if(_){for(;y.length<b;)jt(y,y);jt(y.slice(-b),y.slice(0,b)).forEach(function(z,O){var A=O<b,v=d(z.slide,O);A?Tn(v,y[0].slide):Ft(a.list,v),jt(s,v),i.register(v,O-b+(A?0:_),z.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*Ci}return b}return{mount:u,destroy:h}}function $i(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=e.state.set,c=t.Layout,s=c.slideSize,p=c.getPadding,u=c.totalSize,C=c.listSize,h=c.sliderSize,g=t.Direction,l=g.resolve,d=g.orient,T=t.Elements,b=T.list,y=T.track,_;function z(){_=t.Transition,r([Je,Kt,be,he],O)}function O(){t.Controller.isBusy()||(t.Scroll.cancel(),v(e.index),t.Slides.update())}function A(x,B,q,oe){x!==B&&$(x>q)&&(k(),L(W(U(),x>q),!0)),i(yt),a(Me,B,q,x),_.start(B,function(){i(gt),a(ht,B,q,x),oe&&oe()})}function v(x){L(P(x,!0))}function L(x,B){if(!e.is(Bt)){var q=B?x:R(x);Ae(b,"transform","translate"+l("X")+"("+q+"px)"),x!==q&&a(Oo)}}function R(x){if(e.is(vt)){var B=V(x),q=B>t.Controller.getEnd(),oe=B<0;(oe||q)&&(x=W(x,q))}return x}function W(x,B){var q=x-F(B),oe=h();return x-=d(oe*(Et(xe(q)/oe)||1))*(B?1:-1),x}function k(){L(U(),!0),_.cancel()}function V(x){for(var B=t.Slides.get(),q=0,oe=1/0,te=0;te<B.length;te++){var se=B[te].index,I=xe(P(se,!0)-x);if(I<=oe)oe=I,q=se;else break}return q}function P(x,B){var q=d(u(x-1)-m(x));return B?H(q):q}function U(){var x=l("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 B=n.focus;return B==="center"?(C()-s(x,!0))/2:+B*s(x)||0}function F(x){return P(x?t.Controller.getEnd():0,!!n.trimSpace)}function $(x){var B=d(W(U(),x));return x?B>=0:B<=b[l("scrollWidth")]-$e(y)[l("width")]}function w(x,B){B=It(B)?U():B;var q=x!==!0&&d(B)<d(F(!1)),oe=x!==!1&&d(B)>d(F(!0));return q||oe}return{mount:z,move:A,jump:v,translate:L,shift:W,cancel:k,toIndex:V,toPosition:P,getPosition:U,getLimit:F,exceededLimit:w,reposition:O}}function wi(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=t.Move,c=i.getPosition,s=i.getLimit,p=i.toPosition,u=t.Slides,C=u.isEnough,h=u.getLength,g=n.omitEnd,l=e.is(vt),d=e.is(mt),T=ue(U,!1),b=ue(U,!0),y=n.start||0,_,z=y,O,A,v;function L(){R(),r([be,he,Gt],R),r(Kt,W)}function R(){O=h(!0),A=n.perMove,v=n.perPage,_=$();var I=st(y,0,g?_:O-1);I!==y&&(y=I,i.reposition())}function W(){_!==$()&&a(Gt)}function k(I,J,ye){if(!se()){var ae=P(I),me=F(ae);me>-1&&(J||me!==y)&&(q(me),i.move(ae,me,z,ye))}}function V(I,J,ye,ae){t.Scroll.scroll(I,J,ye,function(){var me=F(i.toIndex(c()));q(g?Xe(me,_):me),ae&&ae()})}function P(I){var J=y;if(qe(I)){var ye=I.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=l?I:st(I,0,_);return J}function U(I,J){var ye=A||(te()?1:v),ae=H(y+ye*(I?-1:1),y,!(A||te()));return ae===-1&&d&&!Co(c(),s(!I),1)?I?0:_:J?ae:F(ae)}function H(I,J,ye){if(C()||te()){var ae=m(I);ae!==I&&(J=I,I=ae,ye=!1),I<0||I>_?!A&&(Mt(0,I,J,!0)||Mt(_,J,I,!0))?I=w(x(I)):l?I=ye?I<0?-(O%v||v):O:I:n.rewind?I=I<0?_:0:I=-1:ye&&I!==J&&(I=w(x(J)+(I<J?-1:1)))}else I=-1;return I}function m(I){if(d&&n.trimSpace==="move"&&I!==y)for(var J=c();J===p(I,!0)&&Mt(I,0,e.length-1,!n.rewind);)I<y?--I:++I;return I}function F(I){return l?(I+O)%O||0:I}function $(){for(var I=O-(te()||l&&A?1:v);g&&I-- >0;)if(p(O-1,!0)!==p(I,!0)){I++;break}return st(I,0,O-1)}function w(I){return st(te()?I:v*I,0,_)}function x(I){return te()?Xe(I,_):Yt((I>=_?O-1:I)/v)}function B(I){var J=i.toIndex(I);return d?st(J,0,_):J}function q(I){I!==y&&(z=y,y=I)}function oe(I){return I?z:y}function te(){return!It(n.focus)||n.isNavigation}function se(){return e.state.is([yt,At])&&!!n.waitForTransition}return{mount:L,go:k,scroll:V,getNext:T,getPrev:b,getAdjacent:U,getEnd:$,setIndex:q,getIndex:oe,toIndex:w,toPage:x,toDest:B,hasFocus:te,isBusy:se}}var Ti="http://www.w3.org/2000/svg",Ei="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",Ot=40;function Li(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=o.emit,c=n.classes,s=n.i18n,p=t.Elements,u=t.Controller,C=p.arrows,h=p.track,g=C,l=p.prev,d=p.next,T,b,y={};function _(){O(),r(be,z)}function z(){A(),_()}function O(){var V=n.arrows;V&&!(l&&d)&&R(),l&&d&&(wt(y,{prev:l,next:d}),Tt(g,V?"":"none"),Fe(g,b=Wn+"--"+n.direction),V&&(v(),k(),ee([l,d],Pt,h.id),i(ko,l,d)))}function A(){o.destroy(),We(g,b),T?(tt(C?[l,d]:g),l=d=null):Re([l,d],Nn)}function v(){r([Je,ht,he,ot,Gt],k),a(d,"click",ue(L,">")),a(l,"click",ue(L,"<"))}function L(V){u.go(V,!0)}function R(){g=C||pt("div",c.arrows),l=W(!0),d=W(!1),T=!0,Ft(g,[l,d]),!C&&Tn(g,h)}function W(V){var P='<button class="'+c.arrow+" "+(V?c.prev:c.next)+'" type="button"><svg xmlns="'+Ti+'" viewBox="0 0 '+Ot+" "+Ot+'" width="'+Ot+'" height="'+Ot+'" focusable="false"><path d="'+(n.arrowPath||Ei)+'" />';return So(P)}function k(){if(l&&d){var V=e.index,P=u.getPrev(),U=u.getNext(),H=P>-1&&V<P?s.last:s.prev,m=U>-1&&V>U?s.first:s.next;l.disabled=P<0,d.disabled=U<0,ee(l,we,H),ee(d,we,m),i(Fo,l,d,P,U)}}return{arrows:y,mount:_,destroy:A,update:k}}var Ai=Ln+"-interval";function Ii(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),s=c.isPaused,p=t.Elements,u=t.Elements,C=u.root,h=u.toggle,g=n.autoplay,l,d,T=g==="pause";function b(){g&&(y(),h&&ee(h,Pt,p.track.id),T||_(),A())}function y(){n.pauseOnHover&&a(C,"mouseenter mouseleave",function(R){l=R.type==="mouseenter",O()}),n.pauseOnFocus&&a(C,"focusin focusout",function(R){d=R.type==="focusin",O()}),h&&a(h,"click",function(){T?_():z(!0)}),r([Me,Jt,he],c.rewind),r(Me,L)}function _(){s()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),d=l=T=!1,A(),i(Rn))}function z(R){R===void 0&&(R=!0),T=!!R,A(),s()||(c.pause(),i(Vn))}function O(){T||(l||d?z(!1):_())}function A(){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(Po,R)}function L(R){var W=t.Slides.getAt(R);c.set(W&&+Ie(W.slide,Ai)||n.interval)}return{mount:b,destroy:c.cancel,play:_,pause:z,isPaused:s}}function ki(e,t,n){var o=ge(e),r=o.on;function a(){n.cover&&(r(Pn,ue(c,!0)),r([Je,be,he],ue(i,!0)))}function i(s){t.Slides.forEach(function(p){var u=Rt(p.container||p.slide,"img");u&&u.src&&c(s,u,p)})}function c(s,p,u){u.style("background",s?'center/cover no-repeat url("'+p.src+'")':"",!0),Tt(p,s?"none":"")}return{mount:a,destroy:ue(i,!1)}}var Fi=10,Ri=600,Vi=.6,Pi=1.5,Bi=800;function Oi(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=e.state.set,c=t.Move,s=c.getPosition,p=c.getLimit,u=c.exceededLimit,C=c.translate,h=e.is(mt),g,l,d=1;function T(){r(Me,z),r([be,he],O)}function b(v,L,R,W,k){var V=s();if(z(),R&&(!h||!u())){var P=t.Layout.sliderSize(),U=yn(v)*P*Yt(xe(v)/P)||0;v=c.toPosition(t.Controller.toDest(v%P))+U}var H=Co(V,v,1);d=1,L=H?0:L||Ut(xe(v-V)/Pi,Bi),l=W,g=Zt(L,y,ue(_,V,v,k),1),i(At),a(Jt),g.start()}function y(){i(gt),l&&l(),a(ot)}function _(v,L,R,W){var k=s(),V=v+(L-v)*A(W),P=(V-k)*d;C(k+P),h&&!R&&u()&&(d*=Vi,xe(P)<Fi&&b(p(u(!0)),Ri,!1,l,!0))}function z(){g&&g.cancel()}function O(){g&&!g.isPaused()&&(z(),y())}function A(v){var L=n.easingFunc;return L?L(v):1-Math.pow(1-v,4)}return{mount:T,destroy:z,scroll:b,cancel:O}}var ct={passive:!1,capture:!0};function Ni(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=o.bind,c=o.unbind,s=e.state,p=t.Move,u=t.Scroll,C=t.Controller,h=t.Elements.track,g=t.Media.reduce,l=t.Direction,d=l.resolve,T=l.orient,b=p.getPosition,y=p.exceededLimit,_,z,O,A,v,L=!1,R,W,k;function V(){i(h,cn,fn,ct),i(h,un,fn,ct),i(h,Ko,U,ct),i(h,"click",F,{capture:!0}),i(h,"dragstart",Oe),r([Je,be],P)}function P(){var j=n.drag;Be(!j),A=j==="free"}function U(j){if(R=!1,!W){var f=me(j);ae(j.target)&&(f||!j.button)&&(C.isBusy()?Oe(j,!0):(k=f?h:window,v=s.is([yt,At]),O=null,i(k,cn,H,ct),i(k,un,m,ct),p.cancel(),u.cancel(),$(j)))}}function H(j){if(s.is(zt)||(s.set(zt),a(Lo)),j.cancelable)if(v){p.translate(_+ye(te(j)));var f=se(j)>no,M=L!==(L=y());(f||M)&&$(j),R=!0,a(Ao),Oe(j)}else B(j)&&(v=x(j),Oe(j))}function m(j){s.is(zt)&&(s.set(gt),a(Io)),v&&(w(j),Oe(j)),c(k,cn,H),c(k,un,m),v=!1}function F(j){!W&&R&&Oe(j,!0)}function $(j){O=z,z=j,_=b()}function w(j){var f=q(j),M=oe(f),X=n.rewind&&n.rewindByDrag;g(!1),A?C.scroll(M,0,n.snap):e.is(Bt)?C.go(T(yn(f))<0?X?"<":"-":X?">":"+"):e.is(mt)&&L&&X?C.go(y(!0)?">":"<"):C.go(C.toDest(M),!0),g(!0)}function x(j){var f=n.dragMinThreshold,M=Ct(f),X=M&&f.mouse||0,G=(M?f.touch:+f)||10;return xe(te(j))>(me(j)?G:X)}function B(j){return xe(te(j))>xe(te(j,!0))}function q(j){if(e.is(vt)||!L){var f=se(j);if(f&&f<no)return te(j)/f}return 0}function oe(j){return b()+yn(j)*Xe(xe(j)*(n.flickPower||600),A?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function te(j,f){return J(j,f)-J(I(j),f)}function se(j){return mn(j)-mn(I(j))}function I(j){return z===j&&O||z}function J(j,f){return(me(j)?j.changedTouches[0]:j)["page"+d(f?"Y":"X")]}function ye(j){return j/(L&&e.is(mt)?hi:1)}function ae(j){var f=n.noDrag;return!_t(j,"."+Uo+", ."+rn)&&(!f||!_t(j,f))}function me(j){return typeof TouchEvent<"u"&&j instanceof TouchEvent}function Pe(){return v}function Be(j){W=j}return{mount:V,disable:Be,isDragging:Pe}}var Wi={Spacebar:" ",Right:tn,Left:en,Up:No,Down:Wo};function zn(e){return e=qe(e)?e:e.key,Wi[e]||e}var oo="keydown";function zi(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=o.unbind,c=e.root,s=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 l(b){u=b}function d(){var b=u;u=!0,mo(function(){u=b})}function T(b){if(!u){var y=zn(b);y===s(en)?e.go("<"):y===s(tn)&&e.go(">")}}return{mount:C,destroy:g,disable:l}}var St=Ln+"-lazy",Dt=St+"-srcset",ji="["+St+"], ["+Dt+"]";function Mi(e,t,n){var o=ge(e),r=o.on,a=o.off,i=o.bind,c=o.emit,s=n.lazyLoad==="sequential",p=[ht,ot],u=[];function C(){n.lazyLoad&&(h(),r(he,h))}function h(){je(u),g(),s?b():(a(p),r(p,l),l())}function g(){t.Slides.forEach(function(y){En(y.slide,ji).forEach(function(_){var z=Ie(_,St),O=Ie(_,Dt);if(z!==_.src||O!==_.srcset){var A=n.classes.spinner,v=_.parentElement,L=Rt(v,"."+A)||pt("span",A,v);u.push([_,y,L]),_.src||Tt(_,"none")}})})}function l(){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 z=y[0],O=y[1];We(O.slide,Sn),_.type!=="error"&&(tt(y[2]),Tt(z,""),c(Pn,z,O),c(ft)),s&&b()}function b(){u.length&&d(u.shift())}return{mount:C,destroy:ue(je,u),check:l}}function Di(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=o.bind,c=t.Slides,s=t.Elements,p=t.Controller,u=p.hasFocus,C=p.getIndex,h=p.go,g=t.Direction.resolve,l=s.pagination,d=[],T,b;function y(){_(),r([be,he,Gt],y);var W=n.pagination;l&&Tt(l,W?"":"none"),W&&(r([Me,Jt,ot],R),z(),R(),a(Ro,{list:T,items:d},L(e.index)))}function _(){T&&(tt(l?Ke(T.children):T),We(T,b),je(d),T=null),o.destroy()}function z(){var W=e.length,k=n.classes,V=n.i18n,P=n.perPage,U=u()?p.getEnd()+1:Et(W/P);T=l||pt("ul",k.pagination,s.track.parentElement),Fe(T,b=an+"--"+v()),ee(T,ze,"tablist"),ee(T,we,V.select),ee(T,On,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()&&P>1?V.pageX:V.slideX;i(F,"click",ue(O,H)),n.paginationKeyboard&&i(F,"keydown",ue(A,H)),ee(m,ze,"presentation"),ee(F,ze,"tab"),ee(F,Pt,$.join(" ")),ee(F,we,hn(w,H+1)),ee(F,dt,-1),d.push({li:m,button:F,page:H})}}function O(W){h(">"+W,!0)}function A(W,k){var V=d.length,P=zn(k),U=v(),H=-1;P===g(tn,!1,U)?H=++W%V:P===g(en,!1,U)?H=(--W+V)%V:P==="Home"?H=0:P==="End"&&(H=V-1);var m=d[H];m&&(bo(m.button),h(">"+H),Oe(k,!0))}function v(){return n.paginationDirection||n.direction}function L(W){return d[p.toPage(W)]}function R(){var W=L(C(!0)),k=L(C());if(W){var V=W.button;We(V,nt),Re(V,Jn),ee(V,dt,-1)}if(k){var P=k.button;Fe(P,nt),ee(P,Jn,!0),ee(P,dt,"")}a(Vo,{list:T,items:d},W,k)}return{items:d,mount:y,destroy:_,getAt:L,update:R}}var Hi=[" ","Enter"];function Ui(e,t,n){var o=n.isNavigation,r=n.slideFocus,a=[];function i(){e.splides.forEach(function(l){l.isParent||(p(e,l.splide),p(l.splide,e))}),o&&u()}function c(){a.forEach(function(l){l.destroy()}),je(a)}function s(){c(),i()}function p(l,d){var T=ge(l);T.on(Me,function(b,y,_){d.go(d.is(vt)?_:b)}),a.push(T)}function u(){var l=ge(e),d=l.on;d(In,h),d(Bo,g),d([Je,be],C),a.push(l),l.emit(Fn,e.splides)}function C(){ee(t.Elements.list,On,n.direction===nn?"vertical":"")}function h(l){e.go(l.index)}function g(l,d){wn(Hi,zn(d))&&(h(l),Oe(d))}return{setup:ue(t.Media.set,{slideFocus:It(r)?o:r},!0),mount:i,destroy:c,remount:s}}function Yi(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,l=n.wheelSleep||0;xe(u)>g&&h-a>l&&(e.go(C?"<":">"),a=h),s(C)&&Oe(p)}}function s(p){return!n.releaseWheel||e.state.is(yt)||t.Controller.getAdjacent(p)!==-1}return{mount:i}}var Gi=90;function qi(e,t,n){var o=ge(e),r=o.on,a=t.Elements.track,i=n.live&&!n.isNavigation,c=pt("span",di),s=Zt(Gi,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),s.start()):(tt(c),s.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 Xi=Object.freeze({__proto__:null,Media:oi,Direction:ri,Elements:vi,Slides:Si,Layout:xi,Clones:_i,Move:$i,Controller:wi,Arrows:Li,Autoplay:Ii,Cover:ki,Scroll:Oi,Drag:Ni,Keyboard:zi,LazyLoad:Mi,Pagination:Di,Sync:Ui,Wheel:Yi,Live:qi}),Ki={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"},Ji={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:mi,i18n:Ki,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Zi(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,s){o.style("transition","opacity "+n.speed+"ms "+n.easing),mo(s)}return{mount:r,start:i,cancel:fn}}function Qi(e,t,n){var o=t.Move,r=t.Controller,a=t.Scroll,i=t.Elements.list,c=ue(Ae,i,"transition"),s;function p(){ge(e).bind(i,"transitionend",function(g){g.target===i&&s&&(C(),s())})}function u(g,l){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,l):(c("transform "+b+"ms "+n.easing),o.translate(d,!0),s=l):(o.jump(g),l())}function C(){c(""),a.cancel()}function h(g){var l=n.rewindSpeed;if(e.is(mt)&&l){var d=r.getIndex(!0),T=r.getEnd();if(d===0&&g>=T||d>=T&&g===0)return l}return n.speed}return{mount:p,start:u,cancel:C}}var ea=(function(){function e(n,o){this.event=ge(),this.Components={},this.state=ti(ut),this.splides=[],this._o={},this._E={};var r=qe(n)?xo(document,n):n;bt(r,r+" is invalid."),this.root=r,o=Ge({label:Ie(r,we)||"",labelledby:Ie(r,Bn)||""},Ji,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(Bt)?Zi:Qi),this._E=o||this._E;var s=wt({},Xi,this._E,{Transition:this._T});return et(s,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,gi),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&&je(this.splides),a.set(Ht)),this},Kr(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=ea;jn.defaults={};jn.STATES=Zr;var ro=[[Je,"onMounted"],[vn,"onReady"],[Me,"onMove"],[ht,"onMoved"],[In,"onClick"],[$o,"onActive"],[wo,"onInactive"],[To,"onVisible"],[Eo,"onHidden"],[he,"onRefresh"],[be,"onUpdated"],[ft,"onResize"],[Kt,"onResized"],[Lo,"onDrag"],[Ao,"onDragging"],[Io,"onDragged"],[Jt,"onScroll"],[ot,"onScrolled"],[kn,"onDestroy"],[ko,"onArrowsMounted"],[Fo,"onArrowsUpdated"],[Ro,"onPaginationMounted"],[Vo,"onPaginationUpdated"],[Fn,"onNavigationMounted"],[Rn,"onAutoplayPlay"],[Po,"onAutoplayPlaying"],[Vn,"onAutoplayPause"],[Pn,"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 ta(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function na(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 na(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 oa=({children:e,className:t,...n})=>D.createElement("div",{className:Mn("splide__track",t),...n},D.createElement("ul",{className:"splide__list"},e)),Jo=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=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();ta(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(oa,null,o):o)}},Zo=({children:e,className:t,...n})=>D.createElement("li",{className:Mn("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"),E=require("./useScopedStyles-DpVdqfXj.js"),rr=require("react-dom");function ir(e){return e.type==="object"&&e.version===1}const ar="ControlSlider-module__wrapper___sHEkd",lr="ControlSlider-module__hoverArrow___A-dOH",sr="ControlSlider-module__sliderItem___QQSkR",cr="ControlSlider-module__sliderImage___9hRl-",ur="ControlSlider-module__arrow___05ghY",pr="ControlSlider-module__arrowVertical___tBfVN",dr="ControlSlider-module__nextArrow___-30Yc",gr="ControlSlider-module__arrowInner___aEra3",mr="ControlSlider-module__arrowIcon___S4ztF",fr="ControlSlider-module__arrowImg___2dwJW",hr="ControlSlider-module__mirror___brd6U",yr="ControlSlider-module__pagination___bicLF",vr="ControlSlider-module__paginationInner___bT-P-",br="ControlSlider-module__paginationVertical___zYqKw",Sr="ControlSlider-module__paginationItem___nTRbk",xr="ControlSlider-module__dot___p1Qun",Cr="ControlSlider-module__activeDot___LHFaj",_r="ControlSlider-module__paginationInsideBottom___R3FWn",$r="ControlSlider-module__paginationInsideTop___V-qb-",wr="ControlSlider-module__paginationOutsideBottom___14w8D",Tr="ControlSlider-module__paginationOutsideTop___SCLqB",Er="ControlSlider-module__paginationInsideLeft___yOBRZ",Lr="ControlSlider-module__paginationInsideRight___Rtt3o",Ar="ControlSlider-module__paginationOutsideLeft___lahaw",Ir="ControlSlider-module__paginationOutsideRight___EtuQa",kr="ControlSlider-module__imgWrapper___UjEgB",Fr="ControlSlider-module__captionBlock___dJ6-j",Rr="ControlSlider-module__captionTextWrapper___HFlpf",Vr="ControlSlider-module__captionText___uGBVc",Pr="ControlSlider-module__active___WZK4G",Br="ControlSlider-module__withPointerEvents___t-18M",Or="ControlSlider-module__topLeftAlignment___zjnGM",Nr="ControlSlider-module__topCenterAlignment___gD1xW",Wr="ControlSlider-module__topRightAlignment___NMapS",zr="ControlSlider-module__middleLeftAlignment___OnUrY",jr="ControlSlider-module__middleCenterAlignment___Tdkl0",Mr="ControlSlider-module__middleRightAlignment___wEbfX",Dr="ControlSlider-module__bottomLeftAlignment___cTP2-",Hr="ControlSlider-module__bottomCenterAlignment___c54fB",Ur="ControlSlider-module__bottomRightAlignment___kEwrz",Yr="ControlSlider-module__clickOverlay___DZA28",Gr="ControlSlider-module__contain___pLyq7",qr="ControlSlider-module__cover___KdDat",Y={wrapper:ar,hoverArrow:lr,sliderItem:sr,sliderImage:cr,arrow:ur,arrowVertical:pr,nextArrow:dr,arrowInner:gr,arrowIcon:mr,arrowImg:fr,mirror:hr,pagination:yr,paginationInner:vr,paginationVertical:br,paginationItem:Sr,dot:xr,activeDot:Cr,paginationInsideBottom:_r,paginationInsideTop:$r,paginationOutsideBottom:wr,paginationOutsideTop:Tr,paginationInsideLeft:Er,paginationInsideRight:Lr,paginationOutsideLeft:Ar,paginationOutsideRight:Ir,imgWrapper:kr,captionBlock:Fr,captionTextWrapper:Rr,captionText:Vr,active:Pr,withPointerEvents:Br,topLeftAlignment:Or,topCenterAlignment:Nr,topRightAlignment:Wr,middleLeftAlignment:zr,middleCenterAlignment:jr,middleRightAlignment:Mr,bottomLeftAlignment:Dr,bottomCenterAlignment:Hr,bottomRightAlignment:Ur,clickOverlay:Yr,contain:Gr,cover:qr};function Xr(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 Kr(e,t,n){return t&&Xr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Un="(prefers-reduced-motion: reduce)",ut=1,Jr=2,gt=3,ht=4,At=5,zt=6,Ht=7,Zr={CREATED:ut,MOUNTED:Jr,IDLE:gt,MOVING:ht,SCROLLING:At,DRAGGING:zt,DESTROYED:Ht};function je(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 fo=setTimeout,mn=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,ho=ue(Xt,"function"),qe=ue(Xt,"string"),It=ue(Xt,"undefined");function $n(e){return e===null}function yo(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 jt(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 yo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function vo(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?vo(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 bo(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 So(e){return Rt(new DOMParser().parseFromString(e,"text/html").body)}function Oe(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function xo(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 fn(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 Co(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 hn(e){return+(e>0)-+(e<0)}function yn(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 Qr(e){return""+e+An(Xn[e]=(Xn[e]||0)+1)}function _o(){var e=[];function t(i,c,s,p){r(i,c,function(u,C,y){var g="addEventListener"in u,l=g?u.removeEventListener.bind(u,C,s,p):u.removeListener.bind(u,s);g?u.addEventListener(C,s,p):u.addListener(s),e.push([u,C,y,s,l])})}function n(i,c,s){r(i,c,function(p,u,C){e=e.filter(function(y){return y[0]===p&&y[1]===u&&y[2]===C&&(!s||y[3]===s)?(y[4](),!1):!0})})}function o(i,c,s){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(c,{bubbles:u,detail:s}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(c,u,!1,s)),i.dispatchEvent(p),p}function r(i,c,s){Te(i,function(p){p&&Te(c,function(u){u.split(" ").forEach(function(C){var y=C.split(".");s(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 Je="mounted",vn="ready",Me="move",yt="moved",In="click",$o="active",wo="inactive",To="visible",Eo="hidden",ye="refresh",be="updated",mt="resize",Kt="resized",Lo="drag",Ao="dragging",Io="dragged",Jt="scroll",ot="scrolled",ei="overflow",kn="destroy",ko="arrows:mounted",Fo="arrows:updated",Ro="pagination:mounted",Vo="pagination:updated",Fn="navigation:mounted",Rn="autoplay:play",Po="autoplay:playing",Vn="autoplay:pause",Pn="lazyload:loaded",Bo="sk",Oo="sh",Gt="ei";function ge(e){var t=e?e.event.bus:document.createDocumentFragment(),n=_o();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,s=!0,p=0;function u(){if(!s){if(i=e?Xe((r()-a)/e,1):1,n&&n(i),i>=1&&(t(),a=r(),o&&++p>=o))return y();c=Yn(u)}}function C(b){b||l(),a=r()-(b?i*e:0),s=!1,c=Yn(u)}function y(){s=!0}function g(){a=r(),i=0,n&&n(i)}function l(){c&&cancelAnimationFrame(c),i=0,c=0,s=!0}function d(b){e=b}function T(){return s}return{start:C,rewind:g,pause:y,cancel:l,set:d,isPaused:T}}function ti(e){var t=e;function n(r){t=r}function o(r){return wn(kt(r),t)}return{set:n,is:o}}function ni(e,t){var n=Zt(0,e,null,1);return function(){n.isPaused()&&n.start()}}function oi(e,t,n){var o=e.state,r=n.breakpoints||{},a=n.reducedMotion||{},i=_o(),c=[];function s(){var l=n.mediaQuery==="min";$t(r).sort(function(d,T){return l?+d-+T:+T-+d}).forEach(function(d){u(r[d],"("+(l?"min":"max")+"-width:"+d+"px)")}),u(a,Un),C()}function p(l){l&&i.destroy()}function u(l,d){var T=matchMedia(d);i.bind(T,"change",C),c.push([l,T])}function C(){var l=o.is(Ht),d=n.direction,T=c.reduce(function(b,h){return Ge(b,h[1].matches?h[0]:{})},{});Gn(n),g(T),n.destroy?e.destroy(n.destroy==="completely"):l?(p(!0),e.mount()):d!==n.direction&&e.refresh()}function y(l){matchMedia(Un).matches&&(l?Ge(n,a):Gn(n,$t(a)))}function g(l,d,T){Ge(n,l),d&&Ge(Object.getPrototypeOf(n),l),(T||!o.is(ut))&&e.emit(be,n)}return{setup:s,destroy:p,reduce:y,set:g}}var Qt="Arrow",en=Qt+"Left",tn=Qt+"Right",No=Qt+"Up",Wo=Qt+"Down",Kn="rtl",nn="ttb",ln={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[No,tn],ArrowRight:[Wo,en]};function ri(e,t,n){function o(a,i,c){c=c||n.direction;var s=c===Kn&&!i?1:c===nn?0:-1;return ln[a]&&ln[a][s]||a.replace(/width|left|right/i,function(p,u){var C=ln[p.toLowerCase()][s]||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 ze="role",dt="tabindex",ii="disabled",ke="aria-",Pt=ke+"controls",zo=ke+"current",Jn=ke+"selected",we=ke+"label",Bn=ke+"labelledby",jo=ke+"hidden",On=ke+"orientation",Lt=ke+"roledescription",Zn=ke+"live",Qn=ke+"busy",eo=ke+"atomic",Nn=[ze,dt,ii,Pt,zo,we,Bn,jo,On,Lt],Ve=Vt+"__",Ze="is-",sn=Vt,to=Ve+"track",ai=Ve+"list",on=Ve+"slide",Mo=on+"--clone",li=on+"__container",Wn=Ve+"arrows",rn=Ve+"arrow",Do=rn+"--prev",Ho=rn+"--next",an=Ve+"pagination",Uo=an+"__page",si=Ve+"progress",ci=si+"__bar",ui=Ve+"toggle",pi=Ve+"spinner",di=Ve+"sr",gi=Ze+"initialized",nt=Ze+"active",Yo=Ze+"prev",Go=Ze+"next",bn=Ze+"visible",Sn=Ze+"loading",qo=Ze+"focus-in",Xo=Ze+"overflow",mi=[nt,bn,Yo,Go,Sn,qo,Xo],fi={slide:on,clone:Mo,arrows:Wn,arrow:rn,prev:Do,next:Ho,pagination:an,page:Uo,spinner:pi};function hi(e,t){if(ho(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!_t(n,t);)n=n.parentElement;return n}var yi=5,no=200,Ko="touchstart mousedown",cn="touchmove mousemove",un="touchend touchcancel mouseup click";function vi(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=e.root,c=n.i18n,s={},p=[],u=[],C=[],y,g,l;function d(){_(),z(),h()}function T(){r(ye,b),r(ye,d),r(be,h),a(document,Ko+" keydown",function(v){l=v.type==="keydown"},{capture:!0}),a(i,"focusin",function(){Ne(i,qo,!!l)})}function b(v){var L=Nn.concat("style");je(p),We(i,u),We(y,C),Re([y,g],L),Re(i,v?L:["style",Lt])}function h(){We(i,u),We(y,C),u=A(sn),C=A(to),Fe(i,u),Fe(y,C),ee(i,we,n.label),ee(i,Bn,n.labelledby)}function _(){y=O("."+to),g=Rt(y,"."+ai),bt(y&&g,"A track/list element is missing."),jt(p,vo(g,"."+on+":not(."+Mo+")")),et({arrows:Wn,pagination:an,prev:Do,next:Ho,bar:ci,toggle:ui},function(v,L){s[L]=O("."+v)}),wt(s,{root:i,track:y,list:g,slides:p})}function z(){var v=i.id||Qr(Vt),L=n.role;i.id=v,y.id=y.id||v+"-track",g.id=g.id||v+"-list",!Ie(i,ze)&&i.tagName!=="SECTION"&&L&&ee(i,ze,L),ee(i,Lt,c.carousel),ee(g,ze,"presentation")}function O(v){var L=xo(i,v);return L&&hi(L,"."+sn)===i?L:void 0}function A(v){return[v+"--"+n.type,v+"--"+n.direction,n.drag&&v+"--draggable",n.isNavigation&&v+"--nav",v===sn&&nt]}return wt(s,{setup:d,mount:T,destroy:b})}var ft="slide",vt="loop",Bt="fade";function bi(e,t,n,o){var r=ge(e),a=r.on,i=r.emit,c=r.bind,s=e.Components,p=e.root,u=e.options,C=u.isNavigation,y=u.updateOnMove,g=u.i18n,l=u.pagination,d=u.slideFocus,T=s.Direction.resolve,b=Ie(o,"style"),h=Ie(o,we),_=n>-1,z=Rt(o,"."+li),O;function A(){_||(o.id=p.id+"-slide"+An(t+1),ee(o,ze,l?"tabpanel":"group"),ee(o,Lt,g.slide),ee(o,we,h||yn(g.slideLabel,[t+1,e.length]))),v()}function v(){c(o,"click",ue(i,In,$)),c(o,"keydown",ue(i,Bo,$)),a([yt,Oo,ot],k),a(Fn,R),y&&a(Me,W)}function L(){O=!0,r.destroy(),We(o,mi),Re(o,Nn),ee(o,"style",b),ee(o,we,h||"")}function R(){var w=e.splides.map(function(x){var B=x.splide.Components.Slides.getAt(t);return B?B.slide.id:""}).join(" ");ee(o,we,yn(g.slideX,(_?n:t)+1)),ee(o,Pt,w),ee(o,ze,d?"button":""),d&&Re(o,Lt)}function W(){O||k()}function k(){if(!O){var w=e.index;V(),P(),Ne(o,Yo,t===w-1),Ne(o,Go,t===w+1)}}function V(){var w=H();w!==qn(o,nt)&&(Ne(o,nt,w),ee(o,zo,C&&w||""),i(w?$o:wo,$))}function P(){var w=f(),x=!w&&(!H()||_);if(e.state.is([ht,At])||ee(o,jo,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?To:Eo,$)),!w&&document.activeElement===o){var B=s.Slides.getAt(e.index);B&&bo(B.slide)}}function U(w,x,B){Ae(B&&z||o,w,x)}function H(){var w=e.index;return w===t||u.cloneStatus&&w===n}function f(){if(e.is(Bt))return H();var w=$e(s.Elements.track),x=$e(o),B=T("left",!0),q=T("right",!0);return Yt(w[B])<=Et(x[B])&&Yt(x[q])<=Et(w[q])}function F(w,x){var B=xe(w-t);return!_&&(u.rewind||e.is(vt))&&(B=Xe(B,e.length-B)),B<=x}var $={index:t,slideIndex:n,slide:o,container:z,isClone:_,mount:A,destroy:L,update:k,style:U,isWithin:F};return $}function Si(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=o.bind,c=t.Elements,s=c.slides,p=c.list,u=[];function C(){y(),r(ye,g),r(ye,y)}function y(){s.forEach(function(k,V){d(k,V,-1)})}function g(){O(function(k){k.destroy()}),je(u)}function l(){O(function(k){k.update()})}function d(k,V,P){var U=bi(e,V,P,k);U.mount(),u.push(U),u.sort(function(H,f){return H.index-f.index})}function T(k){return k?A(function(V){return!V.isClone}):u}function b(k){var V=t.Controller,P=V.toIndex(k),U=V.hasFocus()?1:n.perPage;return A(function(H){return Mt(H.index,P,P+U-1)})}function h(k){return A(k)[0]}function _(k,V){Te(k,function(P){if(qe(P)&&(P=So(P)),yo(P)){var U=s[V];U?Tn(P,U):Ft(p,P),Fe(P,n.classes.slide),L(P,ue(a,mt))}}),a(ye)}function z(k){tt(A(k).map(function(V){return V.slide})),a(ye)}function O(k,V){T(V).forEach(k)}function A(k){return u.filter(ho(k)?k:function(V){return qe(k)?_t(V.slide,k):wn(kt(k),V.index)})}function v(k,V,P){O(function(U){U.style(k,V,P)})}function L(k,V){var P=En(k,"img"),U=P.length;U?P.forEach(function(H){i(H,"load error",function(){--U||V()})}):V()}function R(k){return k?s.length:u.length}function W(){return u.length>n.perPage}return{mount:C,destroy:g,update:l,register:d,get:T,getIn:b,getAt:h,add:_,remove:z,forEach:O,filter:A,style:v,getLength:R,isEnough:W}}function xi(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=o.emit,c=t.Slides,s=t.Direction.resolve,p=t.Elements,u=p.root,C=p.track,y=p.list,g=c.getAt,l=c.style,d,T,b;function h(){_(),a(window,"resize load",ni(ue(i,mt))),r([be,ye],_),r(mt,z)}function _(){d=n.direction===nn,Ae(u,"maxWidth",Qe(n.width)),Ae(C,s("paddingLeft"),O(!1)),Ae(C,s("paddingRight"),O(!0)),z(!0)}function z($){var w=$e(u);($||T.width!==w.width||T.height!==w.height)&&(Ae(C,"height",A()),l(s("marginRight"),Qe(n.gap)),l("width",L()),l("height",R(),!0),T=w,i(Kt),b!==(b=F())&&(Ne(u,Xo,b),i(ei,b)))}function O($){var w=n.padding,x=s($?"right":"left");return w&&Qe(w[x]||(Ct(w)?0:w))||"0px"}function A(){var $="";return d&&($=v(),bt($,"height or heightRatio is missing."),$="calc("+$+" - "+O(!1)+" - "+O(!0)+")"),$}function v(){return Qe(n.height||$e(y).width*n.heightRatio)}function L(){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(y)[s("width")]}function V($,w){var x=g($||0);return x?$e(x.slide)[s("width")]+(w?0:H()):0}function P($,w){var x=g($);if(x){var B=$e(x.slide)[s("right")],q=$e(y)[s("left")];return xe(B-q)+(w?0:H())}return 0}function U($){return P(e.length-1)-P(0)+V(0,$)}function H(){var $=g(0);return $&&parseFloat(Ae($.slide,s("marginRight")))||0}function f($){return parseFloat(Ae(C,s("padding"+($?"Right":"Left"))))||0}function F(){return e.is(Bt)||U(!0)>k()}return{mount:h,resize:z,listSize:k,slideSize:V,sliderSize:U,totalSize:P,getPadding:f,isOverflow:F}}var Ci=2;function _i(e,t,n){var o=ge(e),r=o.on,a=t.Elements,i=t.Slides,c=t.Direction.resolve,s=[],p;function u(){r(ye,C),r([be,mt],g),(p=T())&&(l(p),t.Layout.resize(!0))}function C(){y(),u()}function y(){tt(s),je(s),o.destroy()}function g(){var b=T();p!==b&&(p<b||!b)&&o.emit(ye)}function l(b){var h=i.get().slice(),_=h.length;if(_){for(;h.length<b;)jt(h,h);jt(h.slice(-b),h.slice(0,b)).forEach(function(z,O){var A=O<b,v=d(z.slide,O);A?Tn(v,h[0].slide):Ft(a.list,v),jt(s,v),i.register(v,O-b+(A?0:_),z.index)})}}function d(b,h){var _=b.cloneNode(!0);return Fe(_,n.classes.clone),_.id=e.root.id+"-clone"+An(h+1),_}function T(){var b=n.clones;if(!e.is(vt))b=0;else if(It(b)){var h=n[c("fixedWidth")]&&t.Layout.slideSize(0),_=h&&Et($e(a.track)[c("width")]/h);b=_||n[c("autoWidth")]&&e.length||n.perPage*Ci}return b}return{mount:u,destroy:y}}function $i(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=e.state.set,c=t.Layout,s=c.slideSize,p=c.getPadding,u=c.totalSize,C=c.listSize,y=c.sliderSize,g=t.Direction,l=g.resolve,d=g.orient,T=t.Elements,b=T.list,h=T.track,_;function z(){_=t.Transition,r([Je,Kt,be,ye],O)}function O(){t.Controller.isBusy()||(t.Scroll.cancel(),v(e.index),t.Slides.update())}function A(x,B,q,oe){x!==B&&$(x>q)&&(k(),L(W(U(),x>q),!0)),i(ht),a(Me,B,q,x),_.start(B,function(){i(gt),a(yt,B,q,x),oe&&oe()})}function v(x){L(P(x,!0))}function L(x,B){if(!e.is(Bt)){var q=B?x:R(x);Ae(b,"transform","translate"+l("X")+"("+q+"px)"),x!==q&&a(Oo)}}function R(x){if(e.is(vt)){var B=V(x),q=B>t.Controller.getEnd(),oe=B<0;(oe||q)&&(x=W(x,q))}return x}function W(x,B){var q=x-F(B),oe=y();return x-=d(oe*(Et(xe(q)/oe)||1))*(B?1:-1),x}function k(){L(U(),!0),_.cancel()}function V(x){for(var B=t.Slides.get(),q=0,oe=1/0,te=0;te<B.length;te++){var se=B[te].index,I=xe(P(se,!0)-x);if(I<=oe)oe=I,q=se;else break}return q}function P(x,B){var q=d(u(x-1)-f(x));return B?H(q):q}function U(){var x=l("left");return $e(b)[x]-$e(h)[x]+d(p(!1))}function H(x){return n.trimSpace&&e.is(ft)&&(x=st(x,0,d(y(!0)-C()))),x}function f(x){var B=n.focus;return B==="center"?(C()-s(x,!0))/2:+B*s(x)||0}function F(x){return P(x?t.Controller.getEnd():0,!!n.trimSpace)}function $(x){var B=d(W(U(),x));return x?B>=0:B<=b[l("scrollWidth")]-$e(h)[l("width")]}function w(x,B){B=It(B)?U():B;var q=x!==!0&&d(B)<d(F(!1)),oe=x!==!1&&d(B)>d(F(!0));return q||oe}return{mount:z,move:A,jump:v,translate:L,shift:W,cancel:k,toIndex:V,toPosition:P,getPosition:U,getLimit:F,exceededLimit:w,reposition:O}}function wi(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=t.Move,c=i.getPosition,s=i.getLimit,p=i.toPosition,u=t.Slides,C=u.isEnough,y=u.getLength,g=n.omitEnd,l=e.is(vt),d=e.is(ft),T=ue(U,!1),b=ue(U,!0),h=n.start||0,_,z=h,O,A,v;function L(){R(),r([be,ye,Gt],R),r(Kt,W)}function R(){O=y(!0),A=n.perMove,v=n.perPage,_=$();var I=st(h,0,g?_:O-1);I!==h&&(h=I,i.reposition())}function W(){_!==$()&&a(Gt)}function k(I,J,he){if(!se()){var ae=P(I),fe=F(ae);fe>-1&&(J||fe!==h)&&(q(fe),i.move(ae,fe,z,he))}}function V(I,J,he,ae){t.Scroll.scroll(I,J,he,function(){var fe=F(i.toIndex(c()));q(g?Xe(fe,_):fe),ae&&ae()})}function P(I){var J=h;if(qe(I)){var he=I.match(/([+\-<>])(\d+)?/)||[],ae=he[1],fe=he[2];ae==="+"||ae==="-"?J=H(h+ +(""+ae+(+fe||1)),h):ae===">"?J=fe?w(+fe):T(!0):ae==="<"&&(J=b(!0))}else J=l?I:st(I,0,_);return J}function U(I,J){var he=A||(te()?1:v),ae=H(h+he*(I?-1:1),h,!(A||te()));return ae===-1&&d&&!Co(c(),s(!I),1)?I?0:_:J?ae:F(ae)}function H(I,J,he){if(C()||te()){var ae=f(I);ae!==I&&(J=I,I=ae,he=!1),I<0||I>_?!A&&(Mt(0,I,J,!0)||Mt(_,J,I,!0))?I=w(x(I)):l?I=he?I<0?-(O%v||v):O:I:n.rewind?I=I<0?_:0:I=-1:he&&I!==J&&(I=w(x(J)+(I<J?-1:1)))}else I=-1;return I}function f(I){if(d&&n.trimSpace==="move"&&I!==h)for(var J=c();J===p(I,!0)&&Mt(I,0,e.length-1,!n.rewind);)I<h?--I:++I;return I}function F(I){return l?(I+O)%O||0:I}function $(){for(var I=O-(te()||l&&A?1:v);g&&I-- >0;)if(p(O-1,!0)!==p(I,!0)){I++;break}return st(I,0,O-1)}function w(I){return st(te()?I:v*I,0,_)}function x(I){return te()?Xe(I,_):Yt((I>=_?O-1:I)/v)}function B(I){var J=i.toIndex(I);return d?st(J,0,_):J}function q(I){I!==h&&(z=h,h=I)}function oe(I){return I?z:h}function te(){return!It(n.focus)||n.isNavigation}function se(){return e.state.is([ht,At])&&!!n.waitForTransition}return{mount:L,go:k,scroll:V,getNext:T,getPrev:b,getAdjacent:U,getEnd:$,setIndex:q,getIndex:oe,toIndex:w,toPage:x,toDest:B,hasFocus:te,isBusy:se}}var Ti="http://www.w3.org/2000/svg",Ei="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",Ot=40;function Li(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=o.emit,c=n.classes,s=n.i18n,p=t.Elements,u=t.Controller,C=p.arrows,y=p.track,g=C,l=p.prev,d=p.next,T,b,h={};function _(){O(),r(be,z)}function z(){A(),_()}function O(){var V=n.arrows;V&&!(l&&d)&&R(),l&&d&&(wt(h,{prev:l,next:d}),Tt(g,V?"":"none"),Fe(g,b=Wn+"--"+n.direction),V&&(v(),k(),ee([l,d],Pt,y.id),i(ko,l,d)))}function A(){o.destroy(),We(g,b),T?(tt(C?[l,d]:g),l=d=null):Re([l,d],Nn)}function v(){r([Je,yt,ye,ot,Gt],k),a(d,"click",ue(L,">")),a(l,"click",ue(L,"<"))}function L(V){u.go(V,!0)}function R(){g=C||pt("div",c.arrows),l=W(!0),d=W(!1),T=!0,Ft(g,[l,d]),!C&&Tn(g,y)}function W(V){var P='<button class="'+c.arrow+" "+(V?c.prev:c.next)+'" type="button"><svg xmlns="'+Ti+'" viewBox="0 0 '+Ot+" "+Ot+'" width="'+Ot+'" height="'+Ot+'" focusable="false"><path d="'+(n.arrowPath||Ei)+'" />';return So(P)}function k(){if(l&&d){var V=e.index,P=u.getPrev(),U=u.getNext(),H=P>-1&&V<P?s.last:s.prev,f=U>-1&&V>U?s.first:s.next;l.disabled=P<0,d.disabled=U<0,ee(l,we,H),ee(d,we,f),i(Fo,l,d,P,U)}}return{arrows:h,mount:_,destroy:A,update:k}}var Ai=Ln+"-interval";function Ii(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),s=c.isPaused,p=t.Elements,u=t.Elements,C=u.root,y=u.toggle,g=n.autoplay,l,d,T=g==="pause";function b(){g&&(h(),y&&ee(y,Pt,p.track.id),T||_(),A())}function h(){n.pauseOnHover&&a(C,"mouseenter mouseleave",function(R){l=R.type==="mouseenter",O()}),n.pauseOnFocus&&a(C,"focusin focusout",function(R){d=R.type==="focusin",O()}),y&&a(y,"click",function(){T?_():z(!0)}),r([Me,Jt,ye],c.rewind),r(Me,L)}function _(){s()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),d=l=T=!1,A(),i(Rn))}function z(R){R===void 0&&(R=!0),T=!!R,A(),s()||(c.pause(),i(Vn))}function O(){T||(l||d?z(!1):_())}function A(){y&&(Ne(y,nt,!T),ee(y,we,n.i18n[T?"play":"pause"]))}function v(R){var W=p.bar;W&&Ae(W,"width",R*100+"%"),i(Po,R)}function L(R){var W=t.Slides.getAt(R);c.set(W&&+Ie(W.slide,Ai)||n.interval)}return{mount:b,destroy:c.cancel,play:_,pause:z,isPaused:s}}function ki(e,t,n){var o=ge(e),r=o.on;function a(){n.cover&&(r(Pn,ue(c,!0)),r([Je,be,ye],ue(i,!0)))}function i(s){t.Slides.forEach(function(p){var u=Rt(p.container||p.slide,"img");u&&u.src&&c(s,u,p)})}function c(s,p,u){u.style("background",s?'center/cover no-repeat url("'+p.src+'")':"",!0),Tt(p,s?"none":"")}return{mount:a,destroy:ue(i,!1)}}var Fi=10,Ri=600,Vi=.6,Pi=1.5,Bi=800;function Oi(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=e.state.set,c=t.Move,s=c.getPosition,p=c.getLimit,u=c.exceededLimit,C=c.translate,y=e.is(ft),g,l,d=1;function T(){r(Me,z),r([be,ye],O)}function b(v,L,R,W,k){var V=s();if(z(),R&&(!y||!u())){var P=t.Layout.sliderSize(),U=hn(v)*P*Yt(xe(v)/P)||0;v=c.toPosition(t.Controller.toDest(v%P))+U}var H=Co(V,v,1);d=1,L=H?0:L||Ut(xe(v-V)/Pi,Bi),l=W,g=Zt(L,h,ue(_,V,v,k),1),i(At),a(Jt),g.start()}function h(){i(gt),l&&l(),a(ot)}function _(v,L,R,W){var k=s(),V=v+(L-v)*A(W),P=(V-k)*d;C(k+P),y&&!R&&u()&&(d*=Vi,xe(P)<Fi&&b(p(u(!0)),Ri,!1,l,!0))}function z(){g&&g.cancel()}function O(){g&&!g.isPaused()&&(z(),h())}function A(v){var L=n.easingFunc;return L?L(v):1-Math.pow(1-v,4)}return{mount:T,destroy:z,scroll:b,cancel:O}}var ct={passive:!1,capture:!0};function Ni(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=o.bind,c=o.unbind,s=e.state,p=t.Move,u=t.Scroll,C=t.Controller,y=t.Elements.track,g=t.Media.reduce,l=t.Direction,d=l.resolve,T=l.orient,b=p.getPosition,h=p.exceededLimit,_,z,O,A,v,L=!1,R,W,k;function V(){i(y,cn,mn,ct),i(y,un,mn,ct),i(y,Ko,U,ct),i(y,"click",F,{capture:!0}),i(y,"dragstart",Oe),r([Je,be],P)}function P(){var j=n.drag;Be(!j),A=j==="free"}function U(j){if(R=!1,!W){var m=fe(j);ae(j.target)&&(m||!j.button)&&(C.isBusy()?Oe(j,!0):(k=m?y:window,v=s.is([ht,At]),O=null,i(k,cn,H,ct),i(k,un,f,ct),p.cancel(),u.cancel(),$(j)))}}function H(j){if(s.is(zt)||(s.set(zt),a(Lo)),j.cancelable)if(v){p.translate(_+he(te(j)));var m=se(j)>no,M=L!==(L=h());(m||M)&&$(j),R=!0,a(Ao),Oe(j)}else B(j)&&(v=x(j),Oe(j))}function f(j){s.is(zt)&&(s.set(gt),a(Io)),v&&(w(j),Oe(j)),c(k,cn,H),c(k,un,f),v=!1}function F(j){!W&&R&&Oe(j,!0)}function $(j){O=z,z=j,_=b()}function w(j){var m=q(j),M=oe(m),X=n.rewind&&n.rewindByDrag;g(!1),A?C.scroll(M,0,n.snap):e.is(Bt)?C.go(T(hn(m))<0?X?"<":"-":X?">":"+"):e.is(ft)&&L&&X?C.go(h(!0)?">":"<"):C.go(C.toDest(M),!0),g(!0)}function x(j){var m=n.dragMinThreshold,M=Ct(m),X=M&&m.mouse||0,G=(M?m.touch:+m)||10;return xe(te(j))>(fe(j)?G:X)}function B(j){return xe(te(j))>xe(te(j,!0))}function q(j){if(e.is(vt)||!L){var m=se(j);if(m&&m<no)return te(j)/m}return 0}function oe(j){return b()+hn(j)*Xe(xe(j)*(n.flickPower||600),A?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function te(j,m){return J(j,m)-J(I(j),m)}function se(j){return fn(j)-fn(I(j))}function I(j){return z===j&&O||z}function J(j,m){return(fe(j)?j.changedTouches[0]:j)["page"+d(m?"Y":"X")]}function he(j){return j/(L&&e.is(ft)?yi:1)}function ae(j){var m=n.noDrag;return!_t(j,"."+Uo+", ."+rn)&&(!m||!_t(j,m))}function fe(j){return typeof TouchEvent<"u"&&j instanceof TouchEvent}function Pe(){return v}function Be(j){W=j}return{mount:V,disable:Be,isDragging:Pe}}var Wi={Spacebar:" ",Right:tn,Left:en,Up:No,Down:Wo};function zn(e){return e=qe(e)?e:e.key,Wi[e]||e}var oo="keydown";function zi(e,t,n){var o=ge(e),r=o.on,a=o.bind,i=o.unbind,c=e.root,s=t.Direction.resolve,p,u;function C(){y(),r(be,g),r(be,y),r(Me,d)}function y(){var b=n.keyboard;b&&(p=b==="global"?window:c,a(p,oo,T))}function g(){i(p,oo)}function l(b){u=b}function d(){var b=u;u=!0,fo(function(){u=b})}function T(b){if(!u){var h=zn(b);h===s(en)?e.go("<"):h===s(tn)&&e.go(">")}}return{mount:C,destroy:g,disable:l}}var St=Ln+"-lazy",Dt=St+"-srcset",ji="["+St+"], ["+Dt+"]";function Mi(e,t,n){var o=ge(e),r=o.on,a=o.off,i=o.bind,c=o.emit,s=n.lazyLoad==="sequential",p=[yt,ot],u=[];function C(){n.lazyLoad&&(y(),r(ye,y))}function y(){je(u),g(),s?b():(a(p),r(p,l),l())}function g(){t.Slides.forEach(function(h){En(h.slide,ji).forEach(function(_){var z=Ie(_,St),O=Ie(_,Dt);if(z!==_.src||O!==_.srcset){var A=n.classes.spinner,v=_.parentElement,L=Rt(v,"."+A)||pt("span",A,v);u.push([_,h,L]),_.src||Tt(_,"none")}})})}function l(){u=u.filter(function(h){var _=n.perPage*((n.preloadPages||1)+1)-1;return h[1].isWithin(e.index,_)?d(h):!0}),u.length||a(p)}function d(h){var _=h[0];Fe(h[1].slide,Sn),i(_,"load error",ue(T,h)),ee(_,"src",Ie(_,St)),ee(_,"srcset",Ie(_,Dt)),Re(_,St),Re(_,Dt)}function T(h,_){var z=h[0],O=h[1];We(O.slide,Sn),_.type!=="error"&&(tt(h[2]),Tt(z,""),c(Pn,z,O),c(mt)),s&&b()}function b(){u.length&&d(u.shift())}return{mount:C,destroy:ue(je,u),check:l}}function Di(e,t,n){var o=ge(e),r=o.on,a=o.emit,i=o.bind,c=t.Slides,s=t.Elements,p=t.Controller,u=p.hasFocus,C=p.getIndex,y=p.go,g=t.Direction.resolve,l=s.pagination,d=[],T,b;function h(){_(),r([be,ye,Gt],h);var W=n.pagination;l&&Tt(l,W?"":"none"),W&&(r([Me,Jt,ot],R),z(),R(),a(Ro,{list:T,items:d},L(e.index)))}function _(){T&&(tt(l?Ke(T.children):T),We(T,b),je(d),T=null),o.destroy()}function z(){var W=e.length,k=n.classes,V=n.i18n,P=n.perPage,U=u()?p.getEnd()+1:Et(W/P);T=l||pt("ul",k.pagination,s.track.parentElement),Fe(T,b=an+"--"+v()),ee(T,ze,"tablist"),ee(T,we,V.select),ee(T,On,v()===nn?"vertical":"");for(var H=0;H<U;H++){var f=pt("li",null,T),F=pt("button",{class:k.page,type:"button"},f),$=c.getIn(H).map(function(x){return x.slide.id}),w=!u()&&P>1?V.pageX:V.slideX;i(F,"click",ue(O,H)),n.paginationKeyboard&&i(F,"keydown",ue(A,H)),ee(f,ze,"presentation"),ee(F,ze,"tab"),ee(F,Pt,$.join(" ")),ee(F,we,yn(w,H+1)),ee(F,dt,-1),d.push({li:f,button:F,page:H})}}function O(W){y(">"+W,!0)}function A(W,k){var V=d.length,P=zn(k),U=v(),H=-1;P===g(tn,!1,U)?H=++W%V:P===g(en,!1,U)?H=(--W+V)%V:P==="Home"?H=0:P==="End"&&(H=V-1);var f=d[H];f&&(bo(f.button),y(">"+H),Oe(k,!0))}function v(){return n.paginationDirection||n.direction}function L(W){return d[p.toPage(W)]}function R(){var W=L(C(!0)),k=L(C());if(W){var V=W.button;We(V,nt),Re(V,Jn),ee(V,dt,-1)}if(k){var P=k.button;Fe(P,nt),ee(P,Jn,!0),ee(P,dt,"")}a(Vo,{list:T,items:d},W,k)}return{items:d,mount:h,destroy:_,getAt:L,update:R}}var Hi=[" ","Enter"];function Ui(e,t,n){var o=n.isNavigation,r=n.slideFocus,a=[];function i(){e.splides.forEach(function(l){l.isParent||(p(e,l.splide),p(l.splide,e))}),o&&u()}function c(){a.forEach(function(l){l.destroy()}),je(a)}function s(){c(),i()}function p(l,d){var T=ge(l);T.on(Me,function(b,h,_){d.go(d.is(vt)?_:b)}),a.push(T)}function u(){var l=ge(e),d=l.on;d(In,y),d(Bo,g),d([Je,be],C),a.push(l),l.emit(Fn,e.splides)}function C(){ee(t.Elements.list,On,n.direction===nn?"vertical":"")}function y(l){e.go(l.index)}function g(l,d){wn(Hi,zn(d))&&(y(l),Oe(d))}return{setup:ue(t.Media.set,{slideFocus:It(r)?o:r},!0),mount:i,destroy:c,remount:s}}function Yi(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,y=fn(p),g=n.wheelMinThreshold||0,l=n.wheelSleep||0;xe(u)>g&&y-a>l&&(e.go(C?"<":">"),a=y),s(C)&&Oe(p)}}function s(p){return!n.releaseWheel||e.state.is(ht)||t.Controller.getAdjacent(p)!==-1}return{mount:i}}var Gi=90;function qi(e,t,n){var o=ge(e),r=o.on,a=t.Elements.track,i=n.live&&!n.isNavigation,c=pt("span",di),s=Zt(Gi,ue(u,!1));function p(){i&&(y(!t.Autoplay.isPaused()),ee(a,eo,!0),c.textContent="…",r(Rn,ue(y,!0)),r(Vn,ue(y,!1)),r([yt,ot],ue(u,!0)))}function u(g){ee(a,Qn,g),g?(Ft(a,c),s.start()):(tt(c),s.cancel())}function C(){Re(a,[Zn,eo,Qn]),tt(c)}function y(g){i&&ee(a,Zn,g?"off":"polite")}return{mount:p,disable:y,destroy:C}}var Xi=Object.freeze({__proto__:null,Media:oi,Direction:ri,Elements:vi,Slides:Si,Layout:xi,Clones:_i,Move:$i,Controller:wi,Arrows:Li,Autoplay:Ii,Cover:ki,Scroll:Oi,Drag:Ni,Keyboard:zi,LazyLoad:Mi,Pagination:Di,Sync:Ui,Wheel:Yi,Live:qi}),Ki={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"},Ji={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:fi,i18n:Ki,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Zi(e,t,n){var o=t.Slides;function r(){ge(e).on([Je,ye],a)}function a(){o.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function i(c,s){o.style("transition","opacity "+n.speed+"ms "+n.easing),fo(s)}return{mount:r,start:i,cancel:mn}}function Qi(e,t,n){var o=t.Move,r=t.Controller,a=t.Scroll,i=t.Elements.list,c=ue(Ae,i,"transition"),s;function p(){ge(e).bind(i,"transitionend",function(g){g.target===i&&s&&(C(),s())})}function u(g,l){var d=o.toPosition(g,!0),T=o.getPosition(),b=y(g);xe(d-T)>=1&&b>=1?n.useScroll?a.scroll(d,b,!1,l):(c("transform "+b+"ms "+n.easing),o.translate(d,!0),s=l):(o.jump(g),l())}function C(){c(""),a.cancel()}function y(g){var l=n.rewindSpeed;if(e.is(ft)&&l){var d=r.getIndex(!0),T=r.getEnd();if(d===0&&g>=T||d>=T&&g===0)return l}return n.speed}return{mount:p,start:u,cancel:C}}var ea=(function(){function e(n,o){this.event=ge(),this.Components={},this.state=ti(ut),this.splides=[],this._o={},this._E={};var r=qe(n)?xo(document,n):n;bt(r,r+" is invalid."),this.root=r,o=Ge({label:Ie(r,we)||"",labelledby:Ie(r,Bn)||""},Ji,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(Bt)?Zi:Qi),this._E=o||this._E;var s=wt({},Xi,this._E,{Transition:this._T});return et(s,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,gi),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(ye),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&&je(this.splides),a.set(Ht)),this},Kr(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=ea;jn.defaults={};jn.STATES=Zr;var ro=[[Je,"onMounted"],[vn,"onReady"],[Me,"onMove"],[yt,"onMoved"],[In,"onClick"],[$o,"onActive"],[wo,"onInactive"],[To,"onVisible"],[Eo,"onHidden"],[ye,"onRefresh"],[be,"onUpdated"],[mt,"onResize"],[Kt,"onResized"],[Lo,"onDrag"],[Ao,"onDragging"],[Io,"onDragged"],[Jt,"onScroll"],[ot,"onScrolled"],[kn,"onDestroy"],[ko,"onArrowsMounted"],[Fo,"onArrowsUpdated"],[Ro,"onPaginationMounted"],[Vo,"onPaginationUpdated"],[Fn,"onNavigationMounted"],[Rn,"onAutoplayPlay"],[Po,"onAutoplayPlaying"],[Vn,"onAutoplayPause"],[Pn,"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 ta(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function na(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 na(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 oa=({children:e,className:t,...n})=>D.createElement("div",{className:Mn("splide__track",t),...n},D.createElement("ul",{className:"splide__list"},e)),Jo=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=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();ta(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(oa,null,o):o)}},Zo=({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 ra="RichTextRenderer-module__link___BWeZ2",ia={link:ra},Qo=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?S.jsx("a",{className:ia.link,href:o.value,target:o.target,children:t(o.children)},r):S.jsx("span",{style:aa(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 aa(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 la="SvgImage-module__svg___q3xE-",sa="SvgImage-module__img___VsTm-",io={svg:la,img:sa},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}})},ca={"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 ua({settings:e,content:t,styles:n,isEditor:o}){const[r,a]=D.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:s,textAlign:p,wordSpacing:u,fontSizeLineHeight:C,textAppearance:h,color:g}=n.imageCaption,[l,d]=D.useState(void 0),[T,b]=D.useState(null),[y,_]=D.useState(0),[z,O]=D.useState(0),{direction:A,transition:v,controls:L,pagination:R,imageCaption:W,triggers:k}=e,V=D.useRef(v.type),{x:P,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||(O(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:l?l.width:"100%",height:l?l.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,ca[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":E.scalingValue(i.width,o),letterSpacing:E.scalingValue(s,o),wordSpacing:E.scalingValue(u,o),textAlign:p,fontSize:E.scalingValue(C.fontSize,o),lineHeight:E.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:E.scalingValue(W.offset.y,o),left:E.scalingValue(W.offset.x,o)},children:S.jsx(Qo,{content:m.imageCaption})})},F))})}),S.jsx(Jo,{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:A==="horiz"||v.type==="fade in"?"ltr":"ttb",pagination:!1,drag:k.triggersList.drag,perPage:1,width:l?l.width:"100%",height:l?l.height:"100%",type:v.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((m,F)=>S.jsx(Zo,{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))},z),L.isActive&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:de(Y.arrow,{[Y.arrowVertical]:A==="vert",[Y.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:S.jsxs("button",{onClick:()=>{H("-1")},className:Y.arrowInner,style:{transform:`translate(${E.scalingValue(P,o)}, ${E.scalingValue(U*(A==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&S.jsx(xt,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:de(Y.arrowImg,Y.mirror)}),!L.arrowsImgUrl&&S.jsx(ao,{color:L.color,className:de(Y.arrowIcon,Y.arrowImg,Y.mirror)})]})}),S.jsx("div",{className:de(Y.arrow,Y.nextArrow,{[Y.arrowVertical]:A==="vert",[Y.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:S.jsxs("button",{className:Y.arrowInner,onClick:()=>H("+1"),style:{transform:`translate(${E.scalingValue(P*(A==="horiz"?-1:1),o)}, ${E.scalingValue(U,o)}) scale(${e.controls.scale/100}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&S.jsx(xt,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:Y.arrowImg}),!L.arrowsImgUrl&&S.jsx(ao,{color:L.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"&&A==="horiz",[Y.paginationInsideTop]:R.position==="inside-2"&&A==="horiz",[Y.paginationOutsideBottom]:R.position==="outside-1"&&A==="horiz",[Y.paginationOutsideTop]:R.position==="outside-2"&&A==="horiz",[Y.paginationInsideLeft]:R.position==="inside-1"&&A==="vert",[Y.paginationInsideRight]:R.position==="inside-2"&&A==="vert",[Y.paginationOutsideLeft]:R.position==="outside-1"&&A==="vert",[Y.paginationOutsideRight]:R.position==="outside-2"&&A==="vert",[Y.paginationVertical]:A==="vert"}),children:S.jsx("div",{className:Y.paginationInner,style:{backgroundColor:R.colors[2],transform:`scale(${R.scale/100}) translate(${E.scalingValue(R.offset.x,o)}, ${E.scalingValue(R.offset.y,o)}) rotate(${A==="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 pa={element:ua,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"outside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},da="ImageRevealSlider-module__imageRevealSlider___UE5Ob",ga="ImageRevealSlider-module__image___Qjt-e",fa="ImageRevealSlider-module__link___N-iLG",ma="ImageRevealSlider-module__cursor___2U03d",at={imageRevealSlider:da,image:ga,link:fa,cursor:ma};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,s=i/2;if(e>=o.x-c&&e<=o.x+c&&t>=o.y-s&&t<=o.y+s)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 ya(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 ha({settings:e,content:t,isEditor:n}){const[o,r]=D.useState(null),[a,i]=D.useState([]),[c,s]=D.useState(0),p=D.useRef(0),[u,C]=D.useState({x:0,y:0}),[h,g]=D.useState(1),[l,d]=D.useState("none"),T=D.useRef({x:0,y:0}),[b,y]=D.useState(!1),{sizeType:_,imageWidth:z,randomRangeImageWidth:O}=e.imageSize,{revealPosition:A,visible:v}=e.position,{cursorType:L,target:R,defaultCursorScale:W,defaultCursor:k,hoverCursorScale:V,hoverCursor:P}=e.cursor;D.useEffect(()=>{if(!o)return;const m=(w,x)=>{const B=o.getBoundingClientRect(),q=w-B.left,oe=x-B.top;if(C({x:q,y:oe}),L==="system"){d("none"),g(1);return}const te=q,se=oe,I=document.elementFromPoint(B.left+te,B.top+se);if(I&&I.closest("a")){d("none"),g(1);return}const J=lo(te,se,a)||R==="area"?{img:P??"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,L,R,P,k,V,W,a]),D.useEffect(()=>{b||(d("none"),g(0))},[b]);const U=async(m,F,$,w={})=>{const{width:x,height:B,finalWidth:q}=await ya(m.image.url,_,z,O);let oe=0,te=0;A==="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),I=Math.min(Math.max(te,B/2),$-B/2);return{id:p.current++,url:m.image.url,link:m.link,name:m.image.name,x:se,y:I,width:q}};D.useEffect(()=>{if(!o||t.length===0)return;const m=o.getBoundingClientRect(),F=m.width,$=m.height,w=[];(async()=>{const B=t[0],q=await U(B,F,$);w.push(q),i(w),s(1)})()},[_,z,O,A,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,B=0;A==="on Click"?(x=$,B=w):A==="same"?(x=F.width/2,B=F.height/2):(x=Math.random()*F.width,B=Math.random()*F.height);const q=t[c],oe=await U(q,F.width,F.height,{x,y:B});i(te=>v==="all"?[...te,oe]:[oe]),s(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:l==="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:l==="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('${l}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const va={element:ha,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{width:"100%",height:"100%"},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},ba="LightBox-module__hidden___9s-9x",Sa="LightBox-module__heroImage___sTxNF",xa="LightBox-module__background___rm9ml",Ca="LightBox-module__editor___4ACaY",_a="LightBox-module__contentStyle___Bgnsq",$a="LightBox-module__imageStyle___tLIlB",wa="LightBox-module__imgWrapper___LuFUp",Ta="LightBox-module__contain___8-yaS",Ea="LightBox-module__cover___hNvOG",La="LightBox-module__caption___b6L2I",Aa="LightBox-module__captionTextInner___rCGNH",Ia="LightBox-module__lightboxSplide___XFuWC",ka="LightBox-module__arrow___iz38X",Fa="LightBox-module__arrowVertical___Zfz81",Ra="LightBox-module__nextArrow___zkAQN",Va="LightBox-module__arrowInner___p48sW",Pa="LightBox-module__arrowIcon___3VaFf",Ba="LightBox-module__arrowImg___pNV88",Oa="LightBox-module__mirror___pjeXc",Na="LightBox-module__thumbsWrapper___GB-nU",Wa="LightBox-module__thumbsContainerVertical___wttk5",za="LightBox-module__thumbsContainer___osSma",ja="LightBox-module__thumbsAlignStart___MO6tY",Ma="LightBox-module__thumbsAlignCenter___Q4sUx",Da="LightBox-module__thumbsAlignEnd___p4y9R",Ha="LightBox-module__thumbItem___HvnF3",Ua="LightBox-module__closeButton___g2khP",Ya="LightBox-module__fadeIn___0m5GW",Ga="LightBox-module__slideInLeft___gPYwC",qa="LightBox-module__slideInRight___S-pPp",Xa="LightBox-module__slideInTop___DFdAj",Ka="LightBox-module__slideInBottom___m27kZ",Ja="LightBox-module__fadeOut___55qBR",Za="LightBox-module__slideOutLeft___NvU7P",Qa="LightBox-module__slideOutRight___SK7eC",el="LightBox-module__slideOutTop___Vgg0z",tl="LightBox-module__slideOutBottom___nJ0Ef",nl="LightBox-module__scaleSlide___vZriG",N={hidden:ba,heroImage:Sa,background:xa,editor:Ca,contentStyle:_a,imageStyle:$a,imgWrapper:wa,contain:Ta,cover:Ea,caption:La,captionTextInner:Aa,lightboxSplide:Ia,arrow:ka,arrowVertical:Fa,nextArrow:Ra,arrowInner:Va,arrowIcon:Pa,arrowImg:Ba,mirror:Oa,thumbsWrapper:Na,thumbsContainerVertical:Wa,thumbsContainer:za,thumbsAlignStart:ja,thumbsAlignCenter:Ma,thumbsAlignEnd:Da,thumbItem:Ha,closeButton:Ua,fadeIn:Ya,slideInLeft:Ga,slideInRight:qa,slideInTop:Xa,slideInBottom:Ka,fadeOut:Ja,slideOutLeft:Za,slideOutRight:Qa,slideOutTop:el,slideOutBottom:tl,scaleSlide:nl},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% + ${E.scalingValue(t.x,n)}), calc(-50% + ${E.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${E.scalingValue(t.x,n)}, calc(-50% + ${E.scalingValue(t.y,n)}))`:a==="center"?o.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), ${E.scalingValue(t.y,n)})`:o.transform=`translate(${E.scalingValue(t.x,n)}, ${E.scalingValue(t.y,n)})`,o};function er(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=er(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,s=a/i;let p,u;s>c?(p=o,u=o/s):(u=r,p=r*s);const C=t.left+n.left,h=t.top+n.top,g=(o-p)/2+C,l=(r-u)/2+h;return{x:g,y:l,width:p,height:u}}function co(e){const t=e.getBoundingClientRect(),n=er(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 ol(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 rl=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:a})=>{const[i,c]=D.useState(!1),{url:s}=e.thumbnailBlock.cover;return D.useEffect(()=>{r==="close"&&c(!1),r==="open"&&c(!0)},[r]),S.jsxs(S.Fragment,{children:[S.jsx("img",{src:s,alt:"Cover",className:N.heroImage,onClick:()=>c(!0)}),S.jsx(il,{isOpen:i,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:a})]})},il=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:a,isEditor:i,metadata:c})=>{var j;const[s,p]=D.useState(0),[u,C]=D.useState(0),[h,g]=D.useState(!1),[l,d]=D.useState(!1),[T,b]=D.useState({}),y=D.useRef(null),_=D.useRef(null),z=D.useRef(null),O=D.useRef(!1),A=D.useRef(null),v=D.useRef(null),L=D.useRef(null),R=D.useRef(null),W=D.useRef(!1),k=D.useRef(null),[V,P]=D.useState(!1),{appear:U,triggers:H,slider:m,thumbnail:F,controls:$,area:w,caption:x,layout:B}=r.lightboxBlock,{appearClass:q,backdropAppearClass:oe,backdropDisappearClass:te,disappearClass:se}=ol(U.type,U.direction),I=(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){P(!1);return}const f=k.current;if(!f)return;const M=()=>{m.direction==="horiz"?P(f.scrollWidth>f.clientWidth):P(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),O.current=!0;const X=G=>{G.target===A.current&&G.animationName&&(A.current&&v.current&&A.current.removeEventListener("animationend",v.current),v.current=null,O.current&&(O.current=!1,t()),g(!1))};A.current&&(v.current=X,A.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"&&s===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[s],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&&z.current){const K=co(z.current);Z=G>=K.left&&G<=K.right&&ne>=K.top&&ne<=K.bottom}else{const K=z.current?so(z.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(z.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),O.current=!1,g(!1),d(!1),b({}),!I)return;const f=new CustomEvent("page-overlay",{detail:{itemId:I}});window.dispatchEvent(f)}return()=>{A.current&&v.current&&(A.current.removeEventListener("animationend",v.current),v.current=null),d(!1)}},[e,I]),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===A.current&&!O.current&&Z.animationName&&(M&&!i&&X>.9&&(document.body.style.backgroundColor=w.color),d(!0),A.current&&L.current&&A.current.removeEventListener("animationend",L.current),L.current=null)};A.current&&(L.current=G,A.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),A.current&&L.current&&(A.current.removeEventListener("animationend",L.current),L.current=null),d(!1)}},[e,i,w.color,m.type]),D.useEffect(()=>{if(!e)return;const f=M=>{var G,ne;if(O.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[s],K=(Z==null?void 0:Z.image.objectFit)==="cover",le=M.changedTouches[0];let fe;if(K&&z.current){const ie=co(z.current);fe=le.clientX>=ie.left&&le.clientX<=ie.right&&le.clientY>=ie.top&&le.clientY<=ie.bottom}else{const ie=z.current?so(z.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(),O.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,s,n]);const Pe=(m.type==="scale"||m.type==="fade")&&m.direction==="vert"&&H.type==="drag";D.useEffect(()=>{var re,De;if(!e||!Pe||!((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,Pe,u]);const Be={backgroundColor:w.color,backdropFilter:`blur(${w.blur}px)`,animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return document.getElementById(a)?rr.createPortal(S.jsxs(S.Fragment,{children:[S.jsx("div",{ref:i?null:A,className:de(N.background,h?te:oe,{[N.editor]:i},{[N.hidden]:!e}),style:{...Be,...l&&!i&&!h?{position:"absolute"}:{}}}),S.jsxs("div",{ref:i?A: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(Jo,{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"&&!Pe,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(B.position,B.offset,i),G=`${E.scalingValue(B.padding.top,i)} ${E.scalingValue(B.padding.right,i)} ${E.scalingValue(B.padding.bottom,i)} ${E.scalingValue(B.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(Zo,{children:S.jsx("div",{className:N.imgWrapper,onClick:ae,children:S.jsx("img",{ref:M===s?z: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(${E.scalingValue($.offset.x,i)}, ${E.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(${E.scalingValue($.offset.x*(m.direction==="horiz"?-1:1),i)}, ${E.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&&((j=n[s])==null?void 0:j.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":E.scalingValue(f.width,i),letterSpacing:E.scalingValue(X,i),wordSpacing:E.scalingValue(ne,i),textAlign:G,fontSize:E.scalingValue(Z.fontSize,i),lineHeight:E.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(Qo,{content:n[s].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:E.scalingValue(F.grid.gap,i),justifyContent:V?"flex-start":ne()},children:n.map((Z,K)=>{const le=K===s,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:E.scalingValue(re,i)}:{width:E.scalingValue(re,i)};const Q=fe.width/fe.height;if(m.direction==="horiz"){const ce=re,Se=ce*Q;return{width:E.scalingValue(Se,i),height:E.scalingValue(ce,i)}}else{const ce=re,Se=ce/Q;return{width:E.scalingValue(ce,i),height:E.scalingValue(Se,i)}}};return S.jsx("button",{className:N.thumbItem,style:{...m.direction==="horiz"&&F.fit!=="fit"?{height:E.scalingValue(re,i)}:{},...m.direction==="vert"&&F.fit!=="fit"?{width:E.scalingValue(re,i)}:{},...F.fit==="cover"?{width:E.scalingValue(re,i),height:E.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 al={element:rl,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function lt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ll(e){return`
|
|
6
|
+
*/const ra="RichTextRenderer-module__link___BWeZ2",ia={link:ra},Qo=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?S.jsx("a",{className:ia.link,href:o.value,target:o.target,children:t(o.children)},r):S.jsx("span",{style:aa(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 aa(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 la="SvgImage-module__svg___q3xE-",sa="SvgImage-module__img___VsTm-",io={svg:la,img:sa},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}})},ca={"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 ua({settings:e,content:t,styles:n,isEditor:o}){const[r,a]=D.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:s,textAlign:p,wordSpacing:u,fontSizeLineHeight:C,textAppearance:y,color:g}=n.imageCaption,[l,d]=D.useState(void 0),[T,b]=D.useState(null),[h,_]=D.useState(0),[z,O]=D.useState(0),{direction:A,transition:v,controls:L,pagination:R,imageCaption:W,triggers:k}=e,V=D.useRef(v.type),{x:P,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[$]=F;d({width:Math.round($.contentRect.width),height:Math.round($.contentRect.height)})});return f.observe(T),()=>f.unobserve(T)},[T]),D.useEffect(()=>{!r||V.current===v.type||(O(f=>f+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:l?l.width:"100%",height:l?l.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((f,F)=>S.jsx("div",{className:de(Y.captionText,ca[W.alignment],{[Y.withPointerEvents]:F===h&&o,[Y.active]:F===h}),style:{fontFamily:c.fontFamily,fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:i.sizing==="auto"?"max-content":E.scalingValue(i.width,o),letterSpacing:E.scalingValue(s,o),wordSpacing:E.scalingValue(u,o),textAlign:p,fontSize:E.scalingValue(C.fontSize,o),lineHeight:E.scalingValue(C.lineHeight,o),textTransform:y.textTransform??"none",textDecoration:y.textDecoration??"none",fontVariant:y.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:E.scalingValue(W.offset.y,o),left:E.scalingValue(W.offset.x,o)},children:S.jsx(Qo,{content:f.imageCaption})})},F))})}),S.jsx(Jo,{onMove:f=>{_(f.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:A==="horiz"||v.type==="fade in"?"ltr":"ttb",pagination:!1,drag:k.triggersList.drag,perPage:1,width:l?l.width:"100%",height:l?l.height:"100%",type:v.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((f,F)=>S.jsx(Zo,{children:S.jsx("div",{className:Y.sliderItem,children:S.jsx("div",{className:Y.imgWrapper,children:S.jsx("img",{className:de(Y.sliderImage,{[Y.contain]:f.image.objectFit==="contain",[Y.cover]:f.image.objectFit==="cover"}),src:f.image.url,alt:f.image.name??""})})})},F))},z),L.isActive&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:de(Y.arrow,{[Y.arrowVertical]:A==="vert",[Y.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:S.jsxs("button",{onClick:()=>{H("-1")},className:Y.arrowInner,style:{transform:`translate(${E.scalingValue(P,o)}, ${E.scalingValue(U*(A==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&S.jsx(xt,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:de(Y.arrowImg,Y.mirror)}),!L.arrowsImgUrl&&S.jsx(ao,{color:L.color,className:de(Y.arrowIcon,Y.arrowImg,Y.mirror)})]})}),S.jsx("div",{className:de(Y.arrow,Y.nextArrow,{[Y.arrowVertical]:A==="vert",[Y.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:S.jsxs("button",{className:Y.arrowInner,onClick:()=>H("+1"),style:{transform:`translate(${E.scalingValue(P*(A==="horiz"?-1:1),o)}, ${E.scalingValue(U,o)}) scale(${e.controls.scale/100}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&S.jsx(xt,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:Y.arrowImg}),!L.arrowsImgUrl&&S.jsx(ao,{color:L.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"&&A==="horiz",[Y.paginationInsideTop]:R.position==="inside-2"&&A==="horiz",[Y.paginationOutsideBottom]:R.position==="outside-1"&&A==="horiz",[Y.paginationOutsideTop]:R.position==="outside-2"&&A==="horiz",[Y.paginationInsideLeft]:R.position==="inside-1"&&A==="vert",[Y.paginationInsideRight]:R.position==="inside-2"&&A==="vert",[Y.paginationOutsideLeft]:R.position==="outside-1"&&A==="vert",[Y.paginationOutsideRight]:R.position==="outside-2"&&A==="vert",[Y.paginationVertical]:A==="vert"}),children:S.jsx("div",{className:Y.paginationInner,style:{backgroundColor:R.colors[2],transform:`scale(${R.scale/100}) translate(${E.scalingValue(R.offset.x,o)}, ${E.scalingValue(R.offset.y,o)}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:t.map((f,F)=>S.jsx("button",{onClick:()=>{r&&r.go(F)},className:de(Y.paginationItem),children:S.jsx("div",{className:de(Y.dot,{[Y.activeDot]:F===h}),style:{backgroundColor:F===h?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 pa={element:ua,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"outside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},da="ImageRevealSlider-module__imageRevealSlider___UE5Ob",ga="ImageRevealSlider-module__image___Qjt-e",ma="ImageRevealSlider-module__link___N-iLG",fa="ImageRevealSlider-module__cursor___2U03d",at={imageRevealSlider:da,image:ga,link:ma,cursor:fa};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,s=i/2;if(e>=o.x-c&&e<=o.x+c&&t>=o.y-s&&t<=o.y+s)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 ha(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 ya({settings:e,content:t,isEditor:n}){const[o,r]=D.useState(null),[a,i]=D.useState([]),[c,s]=D.useState(0),p=D.useRef(0),[u,C]=D.useState({x:0,y:0}),[y,g]=D.useState(1),[l,d]=D.useState("none"),T=D.useRef({x:0,y:0}),[b,h]=D.useState(!1),{sizeType:_,imageWidth:z,randomRangeImageWidth:O}=e.imageSize,{revealPosition:A,visible:v}=e.position,{cursorType:L,target:R,defaultCursorScale:W,defaultCursor:k,hoverCursorScale:V,hoverCursor:P}=e.cursor;D.useEffect(()=>{if(!o)return;const f=(w,x)=>{const B=o.getBoundingClientRect(),q=w-B.left,oe=x-B.top;if(C({x:q,y:oe}),L==="system"){d("none"),g(1);return}const te=q,se=oe,I=document.elementFromPoint(B.left+te,B.top+se);if(I&&I.closest("a")){d("none"),g(1);return}const J=lo(te,se,a)||R==="area"?{img:P??"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},f(w.clientX,w.clientY)},$=()=>{b&&f(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,L,R,P,k,V,W,a]),D.useEffect(()=>{b||(d("none"),g(0))},[b]);const U=async(f,F,$,w={})=>{const{width:x,height:B,finalWidth:q}=await ha(f.image.url,_,z,O);let oe=0,te=0;A==="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),I=Math.min(Math.max(te,B/2),$-B/2);return{id:p.current++,url:f.image.url,link:f.link,name:f.image.name,x:se,y:I,width:q}};D.useEffect(()=>{if(!o||t.length===0)return;const f=o.getBoundingClientRect(),F=f.width,$=f.height,w=[];(async()=>{const B=t[0],q=await U(B,F,$);w.push(q),i(w),s(1)})()},[_,z,O,A,o]),D.useEffect(()=>{v==="last One"&&i(f=>f.length>0?[f[f.length-1]]:[])},[v]);const H=async f=>{if(!o)return;const F=o.getBoundingClientRect(),$=f.clientX-F.left,w=f.clientY-F.top;if(R==="image"&&!lo($,w,a))return;let x=0,B=0;A==="on Click"?(x=$,B=w):A==="same"?(x=F.width/2,B=F.height/2):(x=Math.random()*F.width,B=Math.random()*F.height);const q=t[c],oe=await U(q,F.width,F.height,{x,y:B});i(te=>v==="all"?[...te,oe]:[oe]),s(te=>te>=t.length-1?0:te+1)};return S.jsxs("div",{ref:r,onClick:H,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),className:at.imageRevealSlider,style:{cursor:l==="none"?"default":"none"},children:[a.map(f=>S.jsx("div",{className:at.wrapper,style:{top:`${f.y}px`,left:`${f.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:f.width??"auto",height:"auto",cursor:l==="none"?"default":"none"},children:R==="area"&&f.link?S.jsx("a",{href:f.link,target:"_blank",className:at.link,children:S.jsx("img",{src:f.url,alt:f.name,className:at.image},f.id)}):S.jsx("img",{src:f.url,alt:f.name,className:at.image},f.id)},f.id)),b&&S.jsx("div",{className:at.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${y})`,backgroundImage:`url('${l}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const va={element:ya,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{width:"100%",height:"100%"},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},ba="LightBox-module__hidden___9s-9x",Sa="LightBox-module__heroImage___sTxNF",xa="LightBox-module__background___rm9ml",Ca="LightBox-module__editor___4ACaY",_a="LightBox-module__contentStyle___Bgnsq",$a="LightBox-module__imageStyle___tLIlB",wa="LightBox-module__imgWrapper___LuFUp",Ta="LightBox-module__contain___8-yaS",Ea="LightBox-module__cover___hNvOG",La="LightBox-module__caption___b6L2I",Aa="LightBox-module__captionTextInner___rCGNH",Ia="LightBox-module__lightboxSplide___XFuWC",ka="LightBox-module__arrow___iz38X",Fa="LightBox-module__arrowVertical___Zfz81",Ra="LightBox-module__nextArrow___zkAQN",Va="LightBox-module__arrowInner___p48sW",Pa="LightBox-module__arrowIcon___3VaFf",Ba="LightBox-module__arrowImg___pNV88",Oa="LightBox-module__mirror___pjeXc",Na="LightBox-module__thumbsWrapper___GB-nU",Wa="LightBox-module__thumbsContainerVertical___wttk5",za="LightBox-module__thumbsContainer___osSma",ja="LightBox-module__thumbsAlignStart___MO6tY",Ma="LightBox-module__thumbsAlignCenter___Q4sUx",Da="LightBox-module__thumbsAlignEnd___p4y9R",Ha="LightBox-module__thumbItem___HvnF3",Ua="LightBox-module__closeButton___g2khP",Ya="LightBox-module__fadeIn___0m5GW",Ga="LightBox-module__slideInLeft___gPYwC",qa="LightBox-module__slideInRight___S-pPp",Xa="LightBox-module__slideInTop___DFdAj",Ka="LightBox-module__slideInBottom___m27kZ",Ja="LightBox-module__fadeOut___55qBR",Za="LightBox-module__slideOutLeft___NvU7P",Qa="LightBox-module__slideOutRight___SK7eC",el="LightBox-module__slideOutTop___Vgg0z",tl="LightBox-module__slideOutBottom___nJ0Ef",nl="LightBox-module__scaleSlide___vZriG",N={hidden:ba,heroImage:Sa,background:xa,editor:Ca,contentStyle:_a,imageStyle:$a,imgWrapper:wa,contain:Ta,cover:Ea,caption:La,captionTextInner:Aa,lightboxSplide:Ia,arrow:ka,arrowVertical:Fa,nextArrow:Ra,arrowInner:Va,arrowIcon:Pa,arrowImg:Ba,mirror:Oa,thumbsWrapper:Na,thumbsContainerVertical:Wa,thumbsContainer:za,thumbsAlignStart:ja,thumbsAlignCenter:Ma,thumbsAlignEnd:Da,thumbItem:Ha,closeButton:Ua,fadeIn:Ya,slideInLeft:Ga,slideInRight:qa,slideInTop:Xa,slideInBottom:Ka,fadeOut:Ja,slideOutLeft:Za,slideOutRight:Qa,slideOutTop:el,slideOutBottom:tl,scaleSlide:nl},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% + ${E.scalingValue(t.x,n)}), calc(-50% + ${E.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${E.scalingValue(t.x,n)}, calc(-50% + ${E.scalingValue(t.y,n)}))`:a==="center"?o.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), ${E.scalingValue(t.y,n)})`:o.transform=`translate(${E.scalingValue(t.x,n)}, ${E.scalingValue(t.y,n)})`,o};function er(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=er(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,s=a/i;let p,u;s>c?(p=o,u=o/s):(u=r,p=r*s);const C=t.left+n.left,y=t.top+n.top,g=(o-p)/2+C,l=(r-u)/2+y;return{x:g,y:l,width:p,height:u}}function co(e){const t=e.getBoundingClientRect(),n=er(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 ol(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 rl=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:a})=>{const[i,c]=D.useState(!1),{url:s}=e.thumbnailBlock.cover;return D.useEffect(()=>{r==="close"&&c(!1),r==="open"&&c(!0)},[r]),S.jsxs(S.Fragment,{children:[S.jsx("img",{src:s,alt:"Cover",className:N.heroImage,onClick:()=>c(!0)}),S.jsx(il,{isOpen:i,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:a})]})},il=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:a,isEditor:i,metadata:c})=>{var j;const[s,p]=D.useState(0),[u,C]=D.useState(0),[y,g]=D.useState(!1),[l,d]=D.useState(!1),[T,b]=D.useState({}),h=D.useRef(null),_=D.useRef(null),z=D.useRef(null),O=D.useRef(!1),A=D.useRef(null),v=D.useRef(null),L=D.useRef(null),R=D.useRef(null),W=D.useRef(!1),k=D.useRef(null),[V,P]=D.useState(!1),{appear:U,triggers:H,slider:f,thumbnail:F,controls:$,area:w,caption:x,layout:B}=r.lightboxBlock,{appearClass:q,backdropAppearClass:oe,backdropDisappearClass:te,disappearClass:se}=ol(U.type,U.direction),I=(c==null?void 0:c.itemId)??null;D.useEffect(()=>{const m=()=>{setTimeout(()=>{var X,G;(G=(X=h.current)==null?void 0:X.splide)==null||G.refresh()},16)},M=()=>{C(X=>X+1)};return window.addEventListener("ArticleEditor.Layout:change",m),window.addEventListener("ArticleEditor.ComponentContent:change",M),()=>{window.removeEventListener("ArticleEditor.Layout:change",m),window.removeEventListener("ArticleEditor.ComponentContent:change",M)}},[]),D.useEffect(()=>{if(!e||!F.isActive){P(!1);return}const m=k.current;if(!m)return;const M=()=>{f.direction==="horiz"?P(m.scrollWidth>m.clientWidth):P(m.scrollHeight>m.clientHeight)};M();const X=new ResizeObserver(M);return X.observe(m),()=>X.disconnect()},[e,F.isActive,n.length,T,f.direction]);const J=D.useCallback(()=>{const m=window.matchMedia("(max-width: 768px)").matches,M=uo(w.color);m&&!i&&M>.9&&(document.body.style.backgroundColor=""),g(!0),O.current=!0;const X=G=>{G.target===A.current&&G.animationName&&(A.current&&v.current&&A.current.removeEventListener("animationend",v.current),v.current=null,O.current&&(O.current=!1,t()),g(!1))};A.current&&(v.current=X,A.current.addEventListener("animationend",X))},[t,w.color,i]),he=(m,M,X)=>{var G,ne;if(m){if(H.type==="click"&&H.switch==="image")H.repeat==="close"&&s===n.length-1?J():(G=h.current)==null||G.go("+1");else if(H.type==="click"&&H.switch==="50/50"){const Z=m.getBoundingClientRect(),K=M-Z.left,le=X-Z.top,me=Z.width,ie=Z.height;let re;f.direction==="horiz"?re=K<me/2?"-1":"+1":re=le<ie/2?"-1":"+1",(ne=h.current)==null||ne.go(re)}}},ae=m=>{if(W.current){W.current=!1;return}const M=n[s],X=(M==null?void 0:M.image.objectFit)==="cover";let G,ne;if("changedTouches"in m&&m.changedTouches.length>0)G=m.changedTouches[0].clientX,ne=m.changedTouches[0].clientY;else if("clientX"in m)G=m.clientX,ne=m.clientY;else return;let Z;if(X&&z.current){const K=co(z.current);Z=G>=K.left&&G<=K.right&&ne>=K.top&&ne<=K.bottom}else{const K=z.current?so(z.current):null;if(!K){m.target===m.currentTarget&&J();return}Z=G>=K.x&&G<=K.x+K.width&&ne>=K.y&&ne<=K.y+K.height}Z?he(z.current,G,ne):J()},fe=m=>{const M=m.target;(M.classList.contains(N.thumbsWrapper)||M.classList.contains(N.thumbsContainer))&&ae(m)};D.useEffect(()=>{if(!e)return;const m=M=>{var X,G;if(M.key==="Escape"){J();return}if(M.key==="ArrowRight"){p(ne=>(ne+1)%Math.max(n.length,1)),(X=h.current)==null||X.go("+1");return}M.key==="ArrowLeft"&&(p(ne=>(ne-1+Math.max(n.length,1))%Math.max(n.length,1)),(G=h.current)==null||G.go("-1"))};return window.addEventListener("keydown",m),()=>{window.removeEventListener("keydown",m)}},[e,J,n.length]),D.useEffect(()=>{if(e){if(p(0),C(M=>M+1),O.current=!1,g(!1),d(!1),b({}),!I)return;const m=new CustomEvent("page-overlay",{detail:{itemId:I}});window.dispatchEvent(m)}return()=>{A.current&&v.current&&(A.current.removeEventListener("animationend",v.current),v.current=null),d(!1)}},[e,I]),D.useEffect(()=>{_.current!==null&&_.current!==f.type&&C(m=>m+1),_.current=f.type},[f.type]),D.useEffect(()=>{if(!e)return;const m=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===A.current&&!O.current&&Z.animationName&&(M&&!i&&X>.9&&(document.body.style.backgroundColor=w.color),d(!0),A.current&&L.current&&A.current.removeEventListener("animationend",L.current),L.current=null)};A.current&&(L.current=G,A.current.addEventListener("animationend",G));const ne=Z=>{const K=Z.target;K&&(K.closest(`.${N.thumbsWrapper}`)||K.closest(`.${N.thumbsContainer}`))||f.type!=="slide"&&Z.preventDefault()};return document.addEventListener("touchmove",ne,{passive:!1}),()=>{document.body.style.overflow=m,document.removeEventListener("touchmove",ne),A.current&&L.current&&(A.current.removeEventListener("animationend",L.current),L.current=null),d(!1)}},[e,i,w.color,f.type]),D.useEffect(()=>{if(!e)return;const m=M=>{var G,ne;if(O.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"&&((ne=(G=h.current)==null?void 0:G.splide)!=null&&ne.root)){const Z=h.current.splide.root;if(X&&(Z.contains(X)||Z===X))return}if(M.touches.length===0&&M.changedTouches.length>0){const Z=n[s],K=(Z==null?void 0:Z.image.objectFit)==="cover",le=M.changedTouches[0];let me;if(K&&z.current){const ie=co(z.current);me=le.clientX>=ie.left&&le.clientX<=ie.right&&le.clientY>=ie.top&&le.clientY<=ie.bottom}else{const ie=z.current?so(z.current):null;if(!ie)return;me=le.clientX>=ie.x&&le.clientX<=ie.x+ie.width&&le.clientY>=ie.y&&le.clientY<=ie.y+ie.height}if(!me){M.stopPropagation(),O.current=!0;const ie=re=>{re.stopPropagation(),re.preventDefault(),document.removeEventListener("click",ie,!0)};document.addEventListener("click",ie,!0),J()}}}};return document.addEventListener("touchend",m,{passive:!0}),()=>{document.removeEventListener("touchend",m)}},[e,J,s,n]);const Pe=(f.type==="scale"||f.type==="fade")&&f.direction==="vert"&&H.type==="drag";D.useEffect(()=>{var re,De;if(!e||!Pe||!((De=(re=h.current)==null?void 0:re.splide)!=null&&De.root))return;const m=h.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||!h.current){R.current=null;return}const Se=Math.abs(Q-R.current.x),Ee=Math.abs(ce-R.current.y);Ee>M&&Ee>Se&&h.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)}},me=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 m.addEventListener("pointerdown",me),m.addEventListener("touchstart",ie),()=>{m.removeEventListener("pointerdown",me),m.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,Pe,u]);const Be={backgroundColor:w.color,backdropFilter:`blur(${w.blur}px)`,animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:rr.createPortal(S.jsxs(S.Fragment,{children:[S.jsx("div",{ref:i?null:A,className:de(N.background,y?te:oe,{[N.editor]:i},{[N.hidden]:!e}),style:{...Be,...l&&!i&&!y?{position:"absolute"}:{}}}),S.jsxs("div",{ref:i?A:null,className:de(N.contentStyle,y?se:q,{[N.editor]:i},{[N.hidden]:!e}),style:{animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[S.jsx(Jo,{onMove:m=>p(m.index),ref:h,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"&&!Pe,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((m,M)=>{const X=Nt(B.position,B.offset,i),G=`${E.scalingValue(B.padding.top,i)} ${E.scalingValue(B.padding.right,i)} ${E.scalingValue(B.padding.bottom,i)} ${E.scalingValue(B.padding.left,i)}`,ne=f.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(Zo,{children:S.jsx("div",{className:N.imgWrapper,onClick:ae,children:S.jsx("img",{ref:M===s?z:null,className:de(N.imageStyle,{[N.contain]:m.image.objectFit==="contain",[N.cover]:m.image.objectFit==="cover",[N.scaleSlide]:f.type==="scale"}),src:m.image.url,alt:m.image.name??"",style:{...ne,pointerEvents:m.image.objectFit==="contain"?"none":"auto"}})})},M)})},u),$.isActive&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:de(N.arrow,{[N.arrowVertical]:f.direction==="vert"}),style:{color:$.color,"--arrow-hover-color":$.hover},children:S.jsxs("button",{className:N.arrowInner,style:{transform:`translate(${E.scalingValue($.offset.x,i)}, ${E.scalingValue($.offset.y*(f.direction==="horiz"?1:-1),i)}) scale(${$.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var m;return(m=h.current)==null?void 0:m.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]:f.direction==="vert"}),style:{color:$.color,"--arrow-hover-color":$.hover},children:S.jsxs("button",{className:N.arrowInner,style:{transform:`translate(${E.scalingValue($.offset.x*(f.direction==="horiz"?-1:1),i)}, ${E.scalingValue($.offset.y,i)}) scale(${$.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var m;return(m=h.current)==null?void 0:m.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 m=Nt(w.closeIconAlign,w.closeIconOffset,i),M=`scale(${w.closeIconScale})`,X=m.transform?`${m.transform} ${M}`:M;return S.jsx("button",{className:N.closeButton,style:{...m,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&&((j=n[s])==null?void 0:j.imageCaption)&&(()=>{const{widthSettings:m,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:m.sizing==="auto"?"max-content":E.scalingValue(m.width,i),letterSpacing:E.scalingValue(X,i),wordSpacing:E.scalingValue(ne,i),textAlign:G,fontSize:E.scalingValue(Z.fontSize,i),lineHeight:E.scalingValue(Z.lineHeight,i),textTransform:K.textTransform??"none",textDecoration:K.textDecoration??"none",fontVariant:K.fontVariant??"normal",color:le},onClick:me=>me.stopPropagation(),children:S.jsx("div",{"data-styles":"imageCaption",className:N.captionTextInner,style:{"--link-color":x.linkColor,"--link-hover-color":x.linkHoverColor},children:S.jsx(Qo,{content:n[s].imageCaption})})})})(),F.isActive&&(()=>{const[m,M]=F.position.split("-"),X=f.direction==="horiz"?`${m}-left`:F.position,G=Nt(X,F.offset,i),ne=()=>{if(f.direction==="horiz"){if(M==="left")return"flex-start";if(M==="center")return"center";if(M==="right")return"flex-end"}else{if(m==="top")return"flex-start";if(m==="middle")return"center";if(m==="bottom")return"flex-end"}return"flex-start"};return S.jsx("div",{ref:k,className:N.thumbsWrapper,onClick:Z=>fe(Z),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:de(N.thumbsContainer,{[N.thumbsContainerVertical]:f.direction==="vert",[N.thumbsAlignStart]:F.align==="start",[N.thumbsAlignCenter]:F.align==="center",[N.thumbsAlignEnd]:F.align==="end"}),style:{gap:E.scalingValue(F.grid.gap,i),justifyContent:V?"flex-start":ne()},children:n.map((Z,K)=>{const le=K===s,me=T[K],re=F.grid.size*(le?F.activeState.scale:1),De=()=>{if(F.fit!=="fit")return{};if(!me)return f.direction==="horiz"?{height:E.scalingValue(re,i)}:{width:E.scalingValue(re,i)};const Q=me.width/me.height;if(f.direction==="horiz"){const ce=re,Se=ce*Q;return{width:E.scalingValue(Se,i),height:E.scalingValue(ce,i)}}else{const ce=re,Se=ce/Q;return{width:E.scalingValue(ce,i),height:E.scalingValue(Se,i)}}};return S.jsx("button",{className:N.thumbItem,style:{...f.direction==="horiz"&&F.fit!=="fit"?{height:E.scalingValue(re,i)}:{},...f.direction==="vert"&&F.fit!=="fit"?{width:E.scalingValue(re,i)}:{},...F.fit==="cover"?{width:E.scalingValue(re,i),height:E.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=h.current)==null||ce.go(K)},onMouseEnter:()=>{var Q;F.triggers==="hov"&&((Q=h.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))};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 al={element:rl,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function lt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ll(e){return`
|
|
7
7
|
.${e}-wrapper {
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
position: relative;
|
|
136
136
|
height: auto;
|
|
137
137
|
}
|
|
138
|
-
`}function sl({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=E.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:c=[],buttonLabel:s,gap:p,fieldsGap:u,buttonCorners:C,buttonStroke:
|
|
138
|
+
`}function sl({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=E.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:c=[],buttonLabel:s,gap:p,fieldsGap:u,buttonCorners:C,buttonStroke:y,buttonPadding:g,isButtonFullWidth:l,inputCorners:d,inputStroke:T,inputPadding:b,inputColor:h,inputTextColor:_,inputBorderColor:z,placeholderColor:O,buttonColor:A,buttonTextColor:v,buttonBorderColor:L,labelTextColor:R,successColor:W,errorColor:k,fontFamily:V,inputFontSettings:P,inputFontSize:U,inputLineHeight:H,inputLetterSpacing:f,inputWordSpacing:F,inputTextAppearance:$,buttonFontSettings:w,buttonFontSize:x,buttonLineHeight:B,buttonLetterSpacing:q,buttonWordSpacing:oe,buttonTextAppearance:te,labelFontSettings:se,labelFontSize:I,labelLineHeight:J,labelLetterSpacing:he,labelWordSpacing:ae,labelTextAppearance:fe,successMessage:Pe,errorMessage:Be,stateOverrides:j}=e,m=a==="B",M=c.slice(0,Math.min(i,c.length)),X={fontSettings:{fontFamily:V,fontWeight:(P==null?void 0:P.fontWeight)??400,fontStyle:(P==null?void 0:P.fontStyle)??"normal"},fontSize:U??.01,lineHeight:H,letterSpacing:f??0,wordSpacing:F??0,textAppearance:$},G=dn(X,t),ne=E.scalingValue(T??0,t),Z={...G,borderStyle:"solid",borderRadius:a==="C"?0:E.scalingValue(d??0,t),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ne,borderLeftWidth:0}:{borderWidth:ne},paddingTop:E.scalingValue((b==null?void 0:b.top)??0,t),paddingRight:E.scalingValue((b==null?void 0:b.right)??0,t),paddingBottom:E.scalingValue((b==null?void 0:b.bottom)??0,t),paddingLeft:E.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:B,letterSpacing:q??0,wordSpacing:oe??0,textAppearance:te},le=dn(K,t),me=E.scalingValue(y??0,t),ie={fontSettings:{fontFamily:V,fontWeight:(se==null?void 0:se.fontWeight)??400,fontStyle:(se==null?void 0:se.fontStyle)??"normal"},fontSize:I??.01,lineHeight:J,letterSpacing:he??0,wordSpacing:ae??0,textAppearance:fe},re=dn(ie,t),De=E.buildColorVars(r,{inputColor:h,inputTextColor:_,inputBorderColor:z,placeholderColor:O!=null&&O.trim()?O:"#cccccc",buttonColor:A,buttonTextColor:v,buttonBorderColor:L,labelTextColor:R,successColor:W,errorColor:k},cl,ul,j),[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"?Be:ve,_e=o==="filled"?Object.fromEntries(M.map(pe=>[pe.name,"Filled"])):Q,tr=Ue==="error"?E.getFormFieldValidationError(M,_e):null,nr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),Dn=n==null?void 0:n.submitUrl,Hn=(pe,rt)=>{ce(Ye=>({...Ye,[pe]:rt}))},or=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=E.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} ${nr}`.trim(),style:De,children:[S.jsx("style",{dangerouslySetInnerHTML:{__html:ll(r)}}),S.jsxs("form",{onSubmit:or,className:`${r}-form`,style:{gap:E.scalingValue(p??0,t)},children:[S.jsx("div",{className:`${r}-fields`,style:{gap:E.scalingValue(u??0,t)},children:M.map((pe,rt)=>S.jsxs("div",{className:`${r}-field-group${m?` ${r}-labeled`:""}`,children:[m&&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:E.scalingValue(C??0,t),borderWidth:me,paddingTop:E.scalingValue((g==null?void 0:g.top)??0,t),paddingRight:E.scalingValue((g==null?void 0:g.right)??0,t),paddingBottom:E.scalingValue((g==null?void 0:g.bottom)??0,t),paddingLeft:E.scalingValue((g==null?void 0:g.left)??0,t),...le,...l?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:S.jsx("span",{className:`${r}-overlay-anchor`,style:l?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Se==="submitting"?"...":s})})})]}),Ue==="success"&&S.jsx("p",{className:`${r}-success`,style:{...G,lineHeight:G==null?void 0:G.fontSize},children:Pe}),Ue==="error"&&S.jsx("p",{className:`${r}-error`,style:{...G,lineHeight:G==null?void 0:G.fontSize},role:"alert",children:tr??Ce??Be})]})}const cl={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"},ul=["hover","focus","filled","success","error"];function dn(e,t){var n,o,r;return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:E.scalingValue(e.letterSpacing,t),wordSpacing:E.scalingValue(e.wordSpacing,t),fontSize:E.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?E.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 pl=`import React, { useState } from 'react';
|
|
139
139
|
import { CommonComponentProps } from '../props';
|
|
140
140
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
|
|
141
141
|
|
|
@@ -359,11 +359,14 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
|
|
|
359
359
|
...inputCss,
|
|
360
360
|
borderStyle: 'solid',
|
|
361
361
|
borderRadius: type === 'C' ? 0 : scalingValue(inputCorners ?? 0, isEditor),
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
362
|
+
...(type === 'C'
|
|
363
|
+
? {
|
|
364
|
+
borderTopWidth: 0,
|
|
365
|
+
borderRightWidth: 0,
|
|
366
|
+
borderBottomWidth: strokeForInput,
|
|
367
|
+
borderLeftWidth: 0,
|
|
368
|
+
}
|
|
369
|
+
: { borderWidth: strokeForInput }),
|
|
367
370
|
paddingTop: scalingValue(inputPadding?.top ?? 0, isEditor),
|
|
368
371
|
paddingRight: scalingValue(inputPadding?.right ?? 0, isEditor),
|
|
369
372
|
paddingBottom: scalingValue(inputPadding?.bottom ?? 0, isEditor),
|
|
@@ -708,7 +711,7 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
708
711
|
fontVariant: textStyles.textAppearance?.fontVariant
|
|
709
712
|
};
|
|
710
713
|
}
|
|
711
|
-
`,dl=[{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"}}}},gl=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],fl={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 Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"layout",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"layout",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"layout",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"layout",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"layout",title:"Button Label",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"layout",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"layout",title:"Button Stroke",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:dl,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}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}}]},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:[...gl],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},ml={element:sl,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:fl,sourceCode:pl};function Wt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function yl(e){return`
|
|
714
|
+
`,dl=[{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"}}}},gl=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],ml={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control"},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Button Stroke",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...gn.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...gn.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...gn.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}}},defaults:{fieldsToShow:2,fields:dl,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}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}}]},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:[...gl],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},fl={element:sl,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:ml,sourceCode:pl};function Wt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function hl(e){return`
|
|
712
715
|
.${e}-wrapper {
|
|
713
716
|
display: flex;
|
|
714
717
|
flex-direction: column;
|
|
@@ -871,7 +874,7 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
871
874
|
font-size: ${Wt(14)};
|
|
872
875
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
873
876
|
}
|
|
874
|
-
`}const
|
|
877
|
+
`}const yl=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=E.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonContent:i,submitButtonContent:c,buttonLabel:s,buttonIcon:p,fieldsToShow:u=1,fontFamily:C,input:y,button:g,inputFontSettings:l,inputFontSize:d,inputLineHeight:T,inputLetterSpacing:b,inputWordSpacing:h,inputTextAppearance:_,buttonFontSettings:z,buttonFontSize:O,buttonLineHeight:A,buttonLetterSpacing:v,buttonWordSpacing:L,buttonTextAppearance:R,minHeight:W,corners:k,stroke:V,stateOverrides:P,inputPadding:U,buttonPadding:H,successMessage:f="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,""]))),[B,q]=D.useState("idle"),[oe,te]=D.useState(null),se=o==="success"?"success":o==="error"?"error":B,I=o==="error"?F:oe,J=o==="filled"?Object.fromEntries($.map(ve=>[ve.name,"Filled"])):w,he=se==="error"?E.getFormFieldValidationError($,J):null,ae=o&&o!=="default"?`${r}-state-${o}`:"",fe=$.some(ve=>(J[ve.name]??"").trim().length>0),Pe=ae!==`${r}-state-filled`&&fe?`${r}-state-filled`:"",Be=`${ae} ${Pe}`.trim(),j=n==null?void 0:n.submitUrl,m=i,M=(m==null?void 0:m.mode)==="Icon"||(m==null?void 0:m.mode)==="Label"?m.mode:c==="Icon"?"Icon":"Label",X=m===void 0?s:m.label!==void 0?m.label:s,G=m===void 0?p:m.icon!==void 0?m.icon:p,ne=X??"",Z=G??"",K=M==="Icon",le=ne||"Submit",me=l||d!==void 0||T!==void 0||b!==void 0||h!==void 0||_!==void 0?{fontSettings:{fontFamily:C,fontWeight:(l==null?void 0:l.fontWeight)??400,fontStyle:(l==null?void 0:l.fontStyle)??"normal"},fontSize:d??.01,lineHeight:T,letterSpacing:b??0,wordSpacing:h??0,textAppearance:_,color:e.inputTextColor??"#111111"}:y?{...y,fontSettings:{...y.fontSettings,fontFamily:C??y.fontSettings.fontFamily},color:e.inputTextColor??y.color??"#111111"}:void 0,ie=z||O!==void 0||A!==void 0||v!==void 0||L!==void 0||R!==void 0?{fontSettings:{fontFamily:C,fontWeight:(z==null?void 0:z.fontWeight)??400,fontStyle:(z==null?void 0:z.fontStyle)??"normal"},fontSize:O??.01,lineHeight:A,letterSpacing:v??0,wordSpacing:L??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=me?go(me,t):void 0,De=ie?go(ie,t):void 0,Q=E.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(me==null?void 0:me.color)??"#111111",buttonTextColor:e.buttonTextColor??(ie==null?void 0:ie.color)??"#ffffff"},vl,bl,P),ce={borderRadius:E.scalingValue(k,t),borderWidth:E.scalingValue(V,t),borderStyle:"solid"},Se={borderLeftWidth:E.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(!j||Object.keys(He).length===0)return;const Ue=E.getFormFieldValidationError($,w);if(Ue){q("error"),te(Ue);return}q("submitting"),te(null);try{const Ce=await fetch(j,{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 ${Be}`.trim(),style:Q,children:[S.jsx("style",{dangerouslySetInnerHTML:{__html:hl(r)}}),S.jsxs("form",{onSubmit:Ee,className:`${r}-form`,style:{...ce,height:E.scalingValue(W,t),minHeight:E.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:E.scalingValue(U.right,t),paddingLeft:E.scalingValue(U.left,t),paddingTop:E.scalingValue(U.top,t),paddingBottom:E.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:E.scalingValue(H.right,t),paddingLeft:E.scalingValue(H.left,t),paddingTop:E.scalingValue(H.top,t),paddingBottom:E.scalingValue(H.bottom,t)},children:B==="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:f}),se==="error"&&S.jsx("p",{className:`${r}-error`,style:{...re,lineHeight:re==null?void 0:re.fontSize},role:"alert",children:he??I??F})]})},vl={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"},bl=["hover","focus","filled","success","error"];function go(e,t){var n,o,r;return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:E.scalingValue(e.letterSpacing,t),wordSpacing:E.scalingValue(e.wordSpacing,t),fontSize:E.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?E.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 Sl=`import React, { useState } from 'react';
|
|
875
878
|
import { CommonComponentProps } from '../props';
|
|
876
879
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
|
|
877
880
|
|
|
@@ -1448,4 +1451,4 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
1448
1451
|
fontVariant: textStyles.textAppearance?.fontVariant,
|
|
1449
1452
|
};
|
|
1450
1453
|
}
|
|
1451
|
-
`,xl=[{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."}],
|
|
1454
|
+
`,xl=[{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"}}}},Cl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],_l={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","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:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"range-control"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...mo.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...mo.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:xl,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:.1,stroke:.0026,corners:.192,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},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}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","corners"]},{type:"row",items:[{type:"group",title:"",items:["stroke","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:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","successMessage","errorMessage"]}],paletteBookmark:{items:[...Cl],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},$l={element:yl,id:"oneliner-form",name:"Newsletter Single Line",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.png"},defaultSize:{width:300,height:60},schema:_l,sourceCode:Sl},wl=[pa,va,al,fl,$l];exports.components=wl;exports.isSchemaV1=ir;
|