@cntrl-site/components 1.0.11-alpha.3 → 1.0.11-alpha.4
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 +11 -10
- package/dist/index.mjs +133 -133
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),m=require("react"),ye=require("classnames"),S=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Yr=require("react-dom");function No(e){return e.type==="object"&&e.version===1}const Oo="ControlSlider-module__wrapper___sHEkd",jo="ControlSlider-module__hoverArrow___A-dOH",zo="ControlSlider-module__sliderItem___QQSkR",Bo="ControlSlider-module__sliderImage___9hRl-",Vo="ControlSlider-module__arrow___05ghY",Do="ControlSlider-module__arrowVertical___tBfVN",Go="ControlSlider-module__nextArrow___-30Yc",Uo="ControlSlider-module__arrowInner___aEra3",qo="ControlSlider-module__arrowIcon___S4ztF",Ko="ControlSlider-module__arrowImg___2dwJW",Yo="ControlSlider-module__mirror___brd6U",Xo="ControlSlider-module__pagination___bicLF",Zo="ControlSlider-module__paginationInner___bT-P-",Jo="ControlSlider-module__paginationVertical___zYqKw",Qo="ControlSlider-module__paginationItem___nTRbk",ei="ControlSlider-module__dot___p1Qun",ti="ControlSlider-module__activeDot___LHFaj",ni="ControlSlider-module__paginationInsideBottom___R3FWn",ri="ControlSlider-module__paginationInsideTop___V-qb-",oi="ControlSlider-module__paginationOutsideBottom___14w8D",ii="ControlSlider-module__paginationOutsideTop___SCLqB",ai="ControlSlider-module__paginationInsideLeft___yOBRZ",si="ControlSlider-module__paginationInsideRight___Rtt3o",li="ControlSlider-module__paginationOutsideLeft___lahaw",ci="ControlSlider-module__paginationOutsideRight___EtuQa",ui="ControlSlider-module__imgWrapper___UjEgB",pi="ControlSlider-module__captionBlock___dJ6-j",di="ControlSlider-module__captionTextWrapper___HFlpf",mi="ControlSlider-module__captionText___uGBVc",gi="ControlSlider-module__active___WZK4G",hi="ControlSlider-module__withPointerEvents___t-18M",fi="ControlSlider-module__topLeftAlignment___zjnGM",yi="ControlSlider-module__topCenterAlignment___gD1xW",vi="ControlSlider-module__topRightAlignment___NMapS",bi="ControlSlider-module__middleLeftAlignment___OnUrY",xi="ControlSlider-module__middleCenterAlignment___Tdkl0",Si="ControlSlider-module__middleRightAlignment___wEbfX",Ci="ControlSlider-module__bottomLeftAlignment___cTP2-",wi="ControlSlider-module__bottomCenterAlignment___c54fB",$i="ControlSlider-module__bottomRightAlignment___kEwrz",Ti="ControlSlider-module__clickOverlay___DZA28",_i="ControlSlider-module__contain___pLyq7",Li="ControlSlider-module__cover___KdDat",ee={wrapper:Oo,hoverArrow:jo,sliderItem:zo,sliderImage:Bo,arrow:Vo,arrowVertical:Do,nextArrow:Go,arrowInner:Uo,arrowIcon:qo,arrowImg:Ko,mirror:Yo,pagination:Xo,paginationInner:Zo,paginationVertical:Jo,paginationItem:Qo,dot:ei,activeDot:ti,paginationInsideBottom:ni,paginationInsideTop:ri,paginationOutsideBottom:oi,paginationOutsideTop:ii,paginationInsideLeft:ai,paginationInsideRight:si,paginationOutsideLeft:li,paginationOutsideRight:ci,imgWrapper:ui,captionBlock:pi,captionTextWrapper:di,captionText:mi,active:gi,withPointerEvents:hi,topLeftAlignment:fi,topCenterAlignment:yi,topRightAlignment:vi,middleLeftAlignment:bi,middleCenterAlignment:xi,middleRightAlignment:Si,bottomLeftAlignment:Ci,bottomCenterAlignment:wi,bottomRightAlignment:$i,clickOverlay:Ti,contain:_i,cover:Li};function Ei(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ii(e,t,n){return t&&Ei(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var xr="(prefers-reduced-motion: reduce)",Et=1,Ai=2,kt=3,Rt=4,qt=5,ln=6,mn=7,ki={CREATED:Et,MOUNTED:Ai,IDLE:kt,MOVING:Rt,SCROLLING:qt,DRAGGING:ln,DESTROYED:mn};function at(e){e.length=0}function gt(e,t,n){return Array.prototype.slice.call(e,t,n)}function xe(e){return e.bind.apply(e,[null].concat(gt(arguments,1)))}var Xr=setTimeout,Bn=function(){};function Sr(e){return requestAnimationFrame(e)}function bn(e,t){return typeof t===e}function Ot(e){return!Qn(e)&&bn("object",e)}var Jn=Array.isArray,Zr=xe(bn,"function"),dt=xe(bn,"string"),Kt=xe(bn,"undefined");function Qn(e){return e===null}function Jr(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Yt(e){return Jn(e)?e:[e]}function Ge(e,t){Yt(e).forEach(t)}function er(e,t){return e.indexOf(t)>-1}function cn(e,t){return e.push.apply(e,Yt(t)),e}function nt(e,t,n){e&&Ge(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function Ze(e,t){nt(e,dt(t)?t.split(" "):t,!0)}function Xt(e,t){Ge(t,e.appendChild.bind(e))}function tr(e,t){Ge(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function jt(e,t){return Jr(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Qr(e,t){var n=e?gt(e.children):[];return t?n.filter(function(r){return jt(r,t)}):n}function Zt(e,t){return t?Qr(e,t)[0]:e.firstElementChild}var zt=Object.keys;function bt(e,t,n){return e&&(n?zt(e).reverse():zt(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function Bt(e){return gt(arguments,1).forEach(function(t){bt(t,function(n,r){e[r]=t[r]})}),e}function ut(e){return gt(arguments,1).forEach(function(t){bt(t,function(n,r){Jn(n)?e[r]=n.slice():Ot(n)?e[r]=ut({},Ot(e[r])?e[r]:{},n):e[r]=n})}),e}function Cr(e,t){Ge(t||zt(e),function(n){delete e[n]})}function Je(e,t){Ge(e,function(n){Ge(t,function(r){n&&n.removeAttribute(r)})})}function pe(e,t,n){Ot(t)?bt(t,function(r,o){pe(e,o,r)}):Ge(e,function(r){Qn(n)||n===""?Je(r,t):r.setAttribute(t,String(n))})}function It(e,t,n){var r=document.createElement(e);return t&&(dt(t)?Ze(r,t):pe(r,t)),n&&Xt(n,r),r}function qe(e,t,n){if(Kt(n))return getComputedStyle(e)[t];Qn(n)||(e.style[t]=""+n)}function Vt(e,t){qe(e,"display",t)}function eo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Ke(e,t){return e.getAttribute(t)}function wr(e,t){return e&&e.classList.contains(t)}function Ve(e){return e.getBoundingClientRect()}function St(e){Ge(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function to(e){return Zt(new DOMParser().parseFromString(e,"text/html").body)}function tt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function no(e,t){return e&&e.querySelector(t)}function nr(e,t){return t?gt(e.querySelectorAll(t)):[]}function rt(e,t){nt(e,t,!1)}function Vn(e){return e.timeStamp}function yt(e){return dt(e)?e:e?e+"px":""}var Jt="splide",rr="data-"+Jt;function Ht(e,t){if(!e)throw new Error("["+Jt+"] "+(t||""))}var mt=Math.min,gn=Math.max,hn=Math.floor,Dt=Math.ceil,je=Math.abs;function ro(e,t,n){return je(e-t)<n}function un(e,t,n,r){var o=mt(t,n),s=gn(t,n);return r?o<e&&e<s:o<=e&&e<=s}function Tt(e,t,n){var r=mt(t,n),o=gn(t,n);return mt(gn(r,e),o)}function Dn(e){return+(e>0)-+(e<0)}function Gn(e,t){return Ge(t,function(n){e=e.replace("%s",""+n)}),e}function or(e){return e<10?"0"+e:""+e}var $r={};function Fi(e){return""+e+or($r[e]=($r[e]||0)+1)}function oo(){var e=[];function t(i,l,c,d){o(i,l,function(u,T,C){var h="addEventListener"in u,p=h?u.removeEventListener.bind(u,T,c,d):u.removeListener.bind(u,c);h?u.addEventListener(T,c,d):u.addListener(c),e.push([u,T,C,c,p])})}function n(i,l,c){o(i,l,function(d,u,T){e=e.filter(function(C){return C[0]===d&&C[1]===u&&C[2]===T&&(!c||C[3]===c)?(C[4](),!1):!0})})}function r(i,l,c){var d,u=!0;return typeof CustomEvent=="function"?d=new CustomEvent(l,{bubbles:u,detail:c}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(l,u,!1,c)),i.dispatchEvent(d),d}function o(i,l,c){Ge(i,function(d){d&&Ge(l,function(u){u.split(" ").forEach(function(T){var C=T.split(".");c(d,C[0],C[1])})})})}function s(){e.forEach(function(i){i[4]()}),at(e)}return{bind:t,unbind:n,dispatch:r,destroy:s}}var ht="mounted",Un="ready",st="move",Pt="moved",ir="click",io="active",ao="inactive",so="visible",lo="hidden",Le="refresh",We="updated",Ft="resize",xn="resized",co="drag",uo="dragging",po="dragged",Sn="scroll",wt="scrolled",Wi="overflow",ar="destroy",mo="arrows:mounted",go="arrows:updated",ho="pagination:mounted",fo="pagination:updated",sr="navigation:mounted",lr="autoplay:play",yo="autoplay:playing",cr="autoplay:pause",ur="lazyload:loaded",vo="sk",bo="sh",fn="ei";function $e(e){var t=e?e.event.bus:document.createDocumentFragment(),n=oo();function r(s,i){n.bind(t,Yt(s).join(" "),function(l){i.apply(i,Jn(l.detail)?l.detail:[])})}function o(s){n.dispatch(t,s,gt(arguments,1))}return e&&e.event.on(ar,n.destroy),Bt(n,{bus:t,on:r,off:xe(n.unbind,t),emit:o})}function Cn(e,t,n,r){var o=Date.now,s,i=0,l,c=!0,d=0;function u(){if(!c){if(i=e?mt((o()-s)/e,1):1,n&&n(i),i>=1&&(t(),s=o(),r&&++d>=r))return C();l=Sr(u)}}function T(v){v||p(),s=o()-(v?i*e:0),c=!1,l=Sr(u)}function C(){c=!0}function h(){s=o(),i=0,n&&n(i)}function p(){l&&cancelAnimationFrame(l),i=0,l=0,c=!0}function g(v){e=v}function $(){return c}return{start:T,rewind:h,pause:C,cancel:p,set:g,isPaused:$}}function Ri(e){var t=e;function n(o){t=o}function r(o){return er(Yt(o),t)}return{set:n,is:r}}function Pi(e,t){var n=Cn(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Mi(e,t,n){var r=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},i=oo(),l=[];function c(){var p=n.mediaQuery==="min";zt(o).sort(function(g,$){return p?+g-+$:+$-+g}).forEach(function(g){u(o[g],"("+(p?"min":"max")+"-width:"+g+"px)")}),u(s,xr),T()}function d(p){p&&i.destroy()}function u(p,g){var $=matchMedia(g);i.bind($,"change",T),l.push([p,$])}function T(){var p=r.is(mn),g=n.direction,$=l.reduce(function(v,y){return ut(v,y[1].matches?y[0]:{})},{});Cr(n),h($),n.destroy?e.destroy(n.destroy==="completely"):p?(d(!0),e.mount()):g!==n.direction&&e.refresh()}function C(p){matchMedia(xr).matches&&(p?ut(n,s):Cr(n,zt(s)))}function h(p,g,$){ut(n,p),g&&ut(Object.getPrototypeOf(n),p),($||!r.is(Et))&&e.emit(We,n)}return{setup:c,destroy:d,reduce:C,set:h}}var wn="Arrow",$n=wn+"Left",Tn=wn+"Right",xo=wn+"Up",So=wn+"Down",Tr="rtl",_n="ttb",Mn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[xo,Tn],ArrowRight:[So,$n]};function Hi(e,t,n){function r(s,i,l){l=l||n.direction;var c=l===Tr&&!i?1:l===_n?0:-1;return Mn[s]&&Mn[s][c]||s.replace(/width|left|right/i,function(d,u){var T=Mn[d.toLowerCase()][c]||d;return u>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function o(s){return s*(n.direction===Tr?1:-1)}return{resolve:r,orient:o}}var ot="role",At="tabindex",Ni="disabled",Ye="aria-",Qt=Ye+"controls",Co=Ye+"current",_r=Ye+"selected",De=Ye+"label",pr=Ye+"labelledby",wo=Ye+"hidden",dr=Ye+"orientation",Gt=Ye+"roledescription",Lr=Ye+"live",Er=Ye+"busy",Ir=Ye+"atomic",mr=[ot,At,Ni,Qt,Co,De,pr,wo,dr,Gt],Qe=Jt+"__",ft="is-",Hn=Jt,Ar=Qe+"track",Oi=Qe+"list",Ln=Qe+"slide",$o=Ln+"--clone",ji=Ln+"__container",gr=Qe+"arrows",En=Qe+"arrow",To=En+"--prev",_o=En+"--next",In=Qe+"pagination",Lo=In+"__page",zi=Qe+"progress",Bi=zi+"__bar",Vi=Qe+"toggle",Di=Qe+"spinner",Gi=Qe+"sr",Ui=ft+"initialized",Ct=ft+"active",Eo=ft+"prev",Io=ft+"next",qn=ft+"visible",Kn=ft+"loading",Ao=ft+"focus-in",ko=ft+"overflow",qi=[Ct,qn,Eo,Io,Kn,Ao,ko],Ki={slide:Ln,clone:$o,arrows:gr,arrow:En,prev:To,next:_o,pagination:In,page:Lo,spinner:Di};function Yi(e,t){if(Zr(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!jt(n,t);)n=n.parentElement;return n}var Xi=5,kr=200,Fo="touchstart mousedown",Nn="touchmove mousemove",On="touchend touchcancel mouseup click";function Zi(e,t,n){var r=$e(e),o=r.on,s=r.bind,i=e.root,l=n.i18n,c={},d=[],u=[],T=[],C,h,p;function g(){E(),B(),y()}function $(){o(Le,v),o(Le,g),o(We,y),s(document,Fo+" keydown",function(f){p=f.type==="keydown"},{capture:!0}),s(i,"focusin",function(){nt(i,Ao,!!p)})}function v(f){var x=mr.concat("style");at(d),rt(i,u),rt(C,T),Je([C,h],x),Je(i,f?x:["style",Gt])}function y(){rt(i,u),rt(C,T),u=_(Hn),T=_(Ar),Ze(i,u),Ze(C,T),pe(i,De,n.label),pe(i,pr,n.labelledby)}function E(){C=R("."+Ar),h=Zt(C,"."+Oi),Ht(C&&h,"A track/list element is missing."),cn(d,Qr(h,"."+Ln+":not(."+$o+")")),bt({arrows:gr,pagination:In,prev:To,next:_o,bar:Bi,toggle:Vi},function(f,x){c[x]=R("."+f)}),Bt(c,{root:i,track:C,list:h,slides:d})}function B(){var f=i.id||Fi(Jt),x=n.role;i.id=f,C.id=C.id||f+"-track",h.id=h.id||f+"-list",!Ke(i,ot)&&i.tagName!=="SECTION"&&x&&pe(i,ot,x),pe(i,Gt,l.carousel),pe(h,ot,"presentation")}function R(f){var x=no(i,f);return x&&Yi(x,"."+Hn)===i?x:void 0}function _(f){return[f+"--"+n.type,f+"--"+n.direction,n.drag&&f+"--draggable",n.isNavigation&&f+"--nav",f===Hn&&Ct]}return Bt(c,{setup:g,mount:$,destroy:v})}var Wt="slide",Mt="loop",en="fade";function Ji(e,t,n,r){var o=$e(e),s=o.on,i=o.emit,l=o.bind,c=e.Components,d=e.root,u=e.options,T=u.isNavigation,C=u.updateOnMove,h=u.i18n,p=u.pagination,g=u.slideFocus,$=c.Direction.resolve,v=Ke(r,"style"),y=Ke(r,De),E=n>-1,B=Zt(r,"."+ji),R;function _(){E||(r.id=d.id+"-slide"+or(t+1),pe(r,ot,p?"tabpanel":"group"),pe(r,Gt,h.slide),pe(r,De,y||Gn(h.slideLabel,[t+1,e.length]))),f()}function f(){l(r,"click",xe(i,ir,F)),l(r,"keydown",xe(i,vo,F)),s([Pt,bo,wt],I),s(sr,L),C&&s(st,j)}function x(){R=!0,o.destroy(),rt(r,qi),Je(r,mr),pe(r,"style",v),pe(r,De,y||"")}function L(){var W=e.splides.map(function(A){var N=A.splide.Components.Slides.getAt(t);return N?N.slide.id:""}).join(" ");pe(r,De,Gn(h.slideX,(E?n:t)+1)),pe(r,Qt,W),pe(r,ot,g?"button":""),g&&Je(r,Gt)}function j(){R||I()}function I(){if(!R){var W=e.index;P(),H(),nt(r,Eo,t===W-1),nt(r,Io,t===W+1)}}function P(){var W=D();W!==wr(r,Ct)&&(nt(r,Ct,W),pe(r,Co,T&&W||""),i(W?io:ao,F))}function H(){var W=b(),A=!W&&(!D()||E);if(e.state.is([Rt,qt])||pe(r,wo,A||""),pe(nr(r,u.focusableNodes||""),At,A?-1:""),g&&pe(r,At,A?-1:0),W!==wr(r,qn)&&(nt(r,qn,W),i(W?so:lo,F)),!W&&document.activeElement===r){var N=c.Slides.getAt(e.index);N&&eo(N.slide)}}function z(W,A,N){qe(N&&B||r,W,A)}function D(){var W=e.index;return W===t||u.cloneStatus&&W===n}function b(){if(e.is(en))return D();var W=Ve(c.Elements.track),A=Ve(r),N=$("left",!0),Z=$("right",!0);return hn(W[N])<=Dt(A[N])&&hn(A[Z])<=Dt(W[Z])}function k(W,A){var N=je(W-t);return!E&&(u.rewind||e.is(Mt))&&(N=mt(N,e.length-N)),N<=A}var F={index:t,slideIndex:n,slide:r,container:B,isClone:E,mount:_,destroy:x,update:I,style:z,isWithin:k};return F}function Qi(e,t,n){var r=$e(e),o=r.on,s=r.emit,i=r.bind,l=t.Elements,c=l.slides,d=l.list,u=[];function T(){C(),o(Le,h),o(Le,C)}function C(){c.forEach(function(I,P){g(I,P,-1)})}function h(){R(function(I){I.destroy()}),at(u)}function p(){R(function(I){I.update()})}function g(I,P,H){var z=Ji(e,P,H,I);z.mount(),u.push(z),u.sort(function(D,b){return D.index-b.index})}function $(I){return I?_(function(P){return!P.isClone}):u}function v(I){var P=t.Controller,H=P.toIndex(I),z=P.hasFocus()?1:n.perPage;return _(function(D){return un(D.index,H,H+z-1)})}function y(I){return _(I)[0]}function E(I,P){Ge(I,function(H){if(dt(H)&&(H=to(H)),Jr(H)){var z=c[P];z?tr(H,z):Xt(d,H),Ze(H,n.classes.slide),x(H,xe(s,Ft))}}),s(Le)}function B(I){St(_(I).map(function(P){return P.slide})),s(Le)}function R(I,P){$(P).forEach(I)}function _(I){return u.filter(Zr(I)?I:function(P){return dt(I)?jt(P.slide,I):er(Yt(I),P.index)})}function f(I,P,H){R(function(z){z.style(I,P,H)})}function x(I,P){var H=nr(I,"img"),z=H.length;z?H.forEach(function(D){i(D,"load error",function(){--z||P()})}):P()}function L(I){return I?c.length:u.length}function j(){return u.length>n.perPage}return{mount:T,destroy:h,update:p,register:g,get:$,getIn:v,getAt:y,add:E,remove:B,forEach:R,filter:_,style:f,getLength:L,isEnough:j}}function ea(e,t,n){var r=$e(e),o=r.on,s=r.bind,i=r.emit,l=t.Slides,c=t.Direction.resolve,d=t.Elements,u=d.root,T=d.track,C=d.list,h=l.getAt,p=l.style,g,$,v;function y(){E(),s(window,"resize load",Pi(xe(i,Ft))),o([We,Le],E),o(Ft,B)}function E(){g=n.direction===_n,qe(u,"maxWidth",yt(n.width)),qe(T,c("paddingLeft"),R(!1)),qe(T,c("paddingRight"),R(!0)),B(!0)}function B(F){var W=Ve(u);(F||$.width!==W.width||$.height!==W.height)&&(qe(T,"height",_()),p(c("marginRight"),yt(n.gap)),p("width",x()),p("height",L(),!0),$=W,i(xn),v!==(v=k())&&(nt(u,ko,v),i(Wi,v)))}function R(F){var W=n.padding,A=c(F?"right":"left");return W&&yt(W[A]||(Ot(W)?0:W))||"0px"}function _(){var F="";return g&&(F=f(),Ht(F,"height or heightRatio is missing."),F="calc("+F+" - "+R(!1)+" - "+R(!0)+")"),F}function f(){return yt(n.height||Ve(C).width*n.heightRatio)}function x(){return n.autoWidth?null:yt(n.fixedWidth)||(g?"":j())}function L(){return yt(n.fixedHeight)||(g?n.autoHeight?null:j():f())}function j(){var F=yt(n.gap);return"calc((100%"+(F&&" + "+F)+")/"+(n.perPage||1)+(F&&" - "+F)+")"}function I(){return Ve(C)[c("width")]}function P(F,W){var A=h(F||0);return A?Ve(A.slide)[c("width")]+(W?0:D()):0}function H(F,W){var A=h(F);if(A){var N=Ve(A.slide)[c("right")],Z=Ve(C)[c("left")];return je(N-Z)+(W?0:D())}return 0}function z(F){return H(e.length-1)-H(0)+P(0,F)}function D(){var F=h(0);return F&&parseFloat(qe(F.slide,c("marginRight")))||0}function b(F){return parseFloat(qe(T,c("padding"+(F?"Right":"Left"))))||0}function k(){return e.is(en)||z(!0)>I()}return{mount:y,resize:B,listSize:I,slideSize:P,sliderSize:z,totalSize:H,getPadding:b,isOverflow:k}}var ta=2;function na(e,t,n){var r=$e(e),o=r.on,s=t.Elements,i=t.Slides,l=t.Direction.resolve,c=[],d;function u(){o(Le,T),o([We,Ft],h),(d=$())&&(p(d),t.Layout.resize(!0))}function T(){C(),u()}function C(){St(c),at(c),r.destroy()}function h(){var v=$();d!==v&&(d<v||!v)&&r.emit(Le)}function p(v){var y=i.get().slice(),E=y.length;if(E){for(;y.length<v;)cn(y,y);cn(y.slice(-v),y.slice(0,v)).forEach(function(B,R){var _=R<v,f=g(B.slide,R);_?tr(f,y[0].slide):Xt(s.list,f),cn(c,f),i.register(f,R-v+(_?0:E),B.index)})}}function g(v,y){var E=v.cloneNode(!0);return Ze(E,n.classes.clone),E.id=e.root.id+"-clone"+or(y+1),E}function $(){var v=n.clones;if(!e.is(Mt))v=0;else if(Kt(v)){var y=n[l("fixedWidth")]&&t.Layout.slideSize(0),E=y&&Dt(Ve(s.track)[l("width")]/y);v=E||n[l("autoWidth")]&&e.length||n.perPage*ta}return v}return{mount:u,destroy:C}}function ra(e,t,n){var r=$e(e),o=r.on,s=r.emit,i=e.state.set,l=t.Layout,c=l.slideSize,d=l.getPadding,u=l.totalSize,T=l.listSize,C=l.sliderSize,h=t.Direction,p=h.resolve,g=h.orient,$=t.Elements,v=$.list,y=$.track,E;function B(){E=t.Transition,o([ht,xn,We,Le],R)}function R(){t.Controller.isBusy()||(t.Scroll.cancel(),f(e.index),t.Slides.update())}function _(A,N,Z,le){A!==N&&F(A>Z)&&(I(),x(j(z(),A>Z),!0)),i(Rt),s(st,N,Z,A),E.start(N,function(){i(kt),s(Pt,N,Z,A),le&&le()})}function f(A){x(H(A,!0))}function x(A,N){if(!e.is(en)){var Z=N?A:L(A);qe(v,"transform","translate"+p("X")+"("+Z+"px)"),A!==Z&&s(bo)}}function L(A){if(e.is(Mt)){var N=P(A),Z=N>t.Controller.getEnd(),le=N<0;(le||Z)&&(A=j(A,Z))}return A}function j(A,N){var Z=A-k(N),le=C();return A-=g(le*(Dt(je(Z)/le)||1))*(N?1:-1),A}function I(){x(z(),!0),E.cancel()}function P(A){for(var N=t.Slides.get(),Z=0,le=1/0,ne=0;ne<N.length;ne++){var de=N[ne].index,M=je(H(de,!0)-A);if(M<=le)le=M,Z=de;else break}return Z}function H(A,N){var Z=g(u(A-1)-b(A));return N?D(Z):Z}function z(){var A=p("left");return Ve(v)[A]-Ve(y)[A]+g(d(!1))}function D(A){return n.trimSpace&&e.is(Wt)&&(A=Tt(A,0,g(C(!0)-T()))),A}function b(A){var N=n.focus;return N==="center"?(T()-c(A,!0))/2:+N*c(A)||0}function k(A){return H(A?t.Controller.getEnd():0,!!n.trimSpace)}function F(A){var N=g(j(z(),A));return A?N>=0:N<=v[p("scrollWidth")]-Ve(y)[p("width")]}function W(A,N){N=Kt(N)?z():N;var Z=A!==!0&&g(N)<g(k(!1)),le=A!==!1&&g(N)>g(k(!0));return Z||le}return{mount:B,move:_,jump:f,translate:x,shift:j,cancel:I,toIndex:P,toPosition:H,getPosition:z,getLimit:k,exceededLimit:W,reposition:R}}function oa(e,t,n){var r=$e(e),o=r.on,s=r.emit,i=t.Move,l=i.getPosition,c=i.getLimit,d=i.toPosition,u=t.Slides,T=u.isEnough,C=u.getLength,h=n.omitEnd,p=e.is(Mt),g=e.is(Wt),$=xe(z,!1),v=xe(z,!0),y=n.start||0,E,B=y,R,_,f;function x(){L(),o([We,Le,fn],L),o(xn,j)}function L(){R=C(!0),_=n.perMove,f=n.perPage,E=F();var M=Tt(y,0,h?E:R-1);M!==y&&(y=M,i.reposition())}function j(){E!==F()&&s(fn)}function I(M,te,fe){if(!de()){var me=H(M),ge=k(me);ge>-1&&(te||ge!==y)&&(Z(ge),i.move(me,ge,B,fe))}}function P(M,te,fe,me){t.Scroll.scroll(M,te,fe,function(){var ge=k(i.toIndex(l()));Z(h?mt(ge,E):ge),me&&me()})}function H(M){var te=y;if(dt(M)){var fe=M.match(/([+\-<>])(\d+)?/)||[],me=fe[1],ge=fe[2];me==="+"||me==="-"?te=D(y+ +(""+me+(+ge||1)),y):me===">"?te=ge?W(+ge):$(!0):me==="<"&&(te=v(!0))}else te=p?M:Tt(M,0,E);return te}function z(M,te){var fe=_||(ne()?1:f),me=D(y+fe*(M?-1:1),y,!(_||ne()));return me===-1&&g&&!ro(l(),c(!M),1)?M?0:E:te?me:k(me)}function D(M,te,fe){if(T()||ne()){var me=b(M);me!==M&&(te=M,M=me,fe=!1),M<0||M>E?!_&&(un(0,M,te,!0)||un(E,te,M,!0))?M=W(A(M)):p?M=fe?M<0?-(R%f||f):R:M:n.rewind?M=M<0?E:0:M=-1:fe&&M!==te&&(M=W(A(te)+(M<te?-1:1)))}else M=-1;return M}function b(M){if(g&&n.trimSpace==="move"&&M!==y)for(var te=l();te===d(M,!0)&&un(M,0,e.length-1,!n.rewind);)M<y?--M:++M;return M}function k(M){return p?(M+R)%R||0:M}function F(){for(var M=R-(ne()||p&&_?1:f);h&&M-- >0;)if(d(R-1,!0)!==d(M,!0)){M++;break}return Tt(M,0,R-1)}function W(M){return Tt(ne()?M:f*M,0,E)}function A(M){return ne()?mt(M,E):hn((M>=E?R-1:M)/f)}function N(M){var te=i.toIndex(M);return g?Tt(te,0,E):te}function Z(M){M!==y&&(B=y,y=M)}function le(M){return M?B:y}function ne(){return!Kt(n.focus)||n.isNavigation}function de(){return e.state.is([Rt,qt])&&!!n.waitForTransition}return{mount:x,go:I,scroll:P,getNext:$,getPrev:v,getAdjacent:z,getEnd:F,setIndex:Z,getIndex:le,toIndex:W,toPage:A,toDest:N,hasFocus:ne,isBusy:de}}var ia="http://www.w3.org/2000/svg",aa="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",nn=40;function sa(e,t,n){var r=$e(e),o=r.on,s=r.bind,i=r.emit,l=n.classes,c=n.i18n,d=t.Elements,u=t.Controller,T=d.arrows,C=d.track,h=T,p=d.prev,g=d.next,$,v,y={};function E(){R(),o(We,B)}function B(){_(),E()}function R(){var P=n.arrows;P&&!(p&&g)&&L(),p&&g&&(Bt(y,{prev:p,next:g}),Vt(h,P?"":"none"),Ze(h,v=gr+"--"+n.direction),P&&(f(),I(),pe([p,g],Qt,C.id),i(mo,p,g)))}function _(){r.destroy(),rt(h,v),$?(St(T?[p,g]:h),p=g=null):Je([p,g],mr)}function f(){o([ht,Pt,Le,wt,fn],I),s(g,"click",xe(x,">")),s(p,"click",xe(x,"<"))}function x(P){u.go(P,!0)}function L(){h=T||It("div",l.arrows),p=j(!0),g=j(!1),$=!0,Xt(h,[p,g]),!T&&tr(h,C)}function j(P){var H='<button class="'+l.arrow+" "+(P?l.prev:l.next)+'" type="button"><svg xmlns="'+ia+'" viewBox="0 0 '+nn+" "+nn+'" width="'+nn+'" height="'+nn+'" focusable="false"><path d="'+(n.arrowPath||aa)+'" />';return to(H)}function I(){if(p&&g){var P=e.index,H=u.getPrev(),z=u.getNext(),D=H>-1&&P<H?c.last:c.prev,b=z>-1&&P>z?c.first:c.next;p.disabled=H<0,g.disabled=z<0,pe(p,De,D),pe(g,De,b),i(go,p,g,H,z)}}return{arrows:y,mount:E,destroy:_,update:I}}var la=rr+"-interval";function ca(e,t,n){var r=$e(e),o=r.on,s=r.bind,i=r.emit,l=Cn(n.interval,e.go.bind(e,">"),f),c=l.isPaused,d=t.Elements,u=t.Elements,T=u.root,C=u.toggle,h=n.autoplay,p,g,$=h==="pause";function v(){h&&(y(),C&&pe(C,Qt,d.track.id),$||E(),_())}function y(){n.pauseOnHover&&s(T,"mouseenter mouseleave",function(L){p=L.type==="mouseenter",R()}),n.pauseOnFocus&&s(T,"focusin focusout",function(L){g=L.type==="focusin",R()}),C&&s(C,"click",function(){$?E():B(!0)}),o([st,Sn,Le],l.rewind),o(st,x)}function E(){c()&&t.Slides.isEnough()&&(l.start(!n.resetProgress),g=p=$=!1,_(),i(lr))}function B(L){L===void 0&&(L=!0),$=!!L,_(),c()||(l.pause(),i(cr))}function R(){$||(p||g?B(!1):E())}function _(){C&&(nt(C,Ct,!$),pe(C,De,n.i18n[$?"play":"pause"]))}function f(L){var j=d.bar;j&&qe(j,"width",L*100+"%"),i(yo,L)}function x(L){var j=t.Slides.getAt(L);l.set(j&&+Ke(j.slide,la)||n.interval)}return{mount:v,destroy:l.cancel,play:E,pause:B,isPaused:c}}function ua(e,t,n){var r=$e(e),o=r.on;function s(){n.cover&&(o(ur,xe(l,!0)),o([ht,We,Le],xe(i,!0)))}function i(c){t.Slides.forEach(function(d){var u=Zt(d.container||d.slide,"img");u&&u.src&&l(c,u,d)})}function l(c,d,u){u.style("background",c?'center/cover no-repeat url("'+d.src+'")':"",!0),Vt(d,c?"none":"")}return{mount:s,destroy:xe(i,!1)}}var pa=10,da=600,ma=.6,ga=1.5,ha=800;function fa(e,t,n){var r=$e(e),o=r.on,s=r.emit,i=e.state.set,l=t.Move,c=l.getPosition,d=l.getLimit,u=l.exceededLimit,T=l.translate,C=e.is(Wt),h,p,g=1;function $(){o(st,B),o([We,Le],R)}function v(f,x,L,j,I){var P=c();if(B(),L&&(!C||!u())){var H=t.Layout.sliderSize(),z=Dn(f)*H*hn(je(f)/H)||0;f=l.toPosition(t.Controller.toDest(f%H))+z}var D=ro(P,f,1);g=1,x=D?0:x||gn(je(f-P)/ga,ha),p=j,h=Cn(x,y,xe(E,P,f,I),1),i(qt),s(Sn),h.start()}function y(){i(kt),p&&p(),s(wt)}function E(f,x,L,j){var I=c(),P=f+(x-f)*_(j),H=(P-I)*g;T(I+H),C&&!L&&u()&&(g*=ma,je(H)<pa&&v(d(u(!0)),da,!1,p,!0))}function B(){h&&h.cancel()}function R(){h&&!h.isPaused()&&(B(),y())}function _(f){var x=n.easingFunc;return x?x(f):1-Math.pow(1-f,4)}return{mount:$,destroy:B,scroll:v,cancel:R}}var _t={passive:!1,capture:!0};function ya(e,t,n){var r=$e(e),o=r.on,s=r.emit,i=r.bind,l=r.unbind,c=e.state,d=t.Move,u=t.Scroll,T=t.Controller,C=t.Elements.track,h=t.Media.reduce,p=t.Direction,g=p.resolve,$=p.orient,v=d.getPosition,y=d.exceededLimit,E,B,R,_,f,x=!1,L,j,I;function P(){i(C,Nn,Bn,_t),i(C,On,Bn,_t),i(C,Fo,z,_t),i(C,"click",k,{capture:!0}),i(C,"dragstart",tt),o([ht,We],H)}function H(){var O=n.drag;ie(!O),_=O==="free"}function z(O){if(L=!1,!j){var w=ge(O);me(O.target)&&(w||!O.button)&&(T.isBusy()?tt(O,!0):(I=w?C:window,f=c.is([Rt,qt]),R=null,i(I,Nn,D,_t),i(I,On,b,_t),d.cancel(),u.cancel(),F(O)))}}function D(O){if(c.is(ln)||(c.set(ln),s(co)),O.cancelable)if(f){d.translate(E+fe(ne(O)));var w=de(O)>kr,G=x!==(x=y());(w||G)&&F(O),L=!0,s(uo),tt(O)}else N(O)&&(f=A(O),tt(O))}function b(O){c.is(ln)&&(c.set(kt),s(po)),f&&(W(O),tt(O)),l(I,Nn,D),l(I,On,b),f=!1}function k(O){!j&&L&&tt(O,!0)}function F(O){R=B,B=O,E=v()}function W(O){var w=Z(O),G=le(w),Y=n.rewind&&n.rewindByDrag;h(!1),_?T.scroll(G,0,n.snap):e.is(en)?T.go($(Dn(w))<0?Y?"<":"-":Y?">":"+"):e.is(Wt)&&x&&Y?T.go(y(!0)?">":"<"):T.go(T.toDest(G),!0),h(!0)}function A(O){var w=n.dragMinThreshold,G=Ot(w),Y=G&&w.mouse||0,J=(G?w.touch:+w)||10;return je(ne(O))>(ge(O)?J:Y)}function N(O){return je(ne(O))>je(ne(O,!0))}function Z(O){if(e.is(Mt)||!x){var w=de(O);if(w&&w<kr)return ne(O)/w}return 0}function le(O){return v()+Dn(O)*mt(je(O)*(n.flickPower||600),_?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function ne(O,w){return te(O,w)-te(M(O),w)}function de(O){return Vn(O)-Vn(M(O))}function M(O){return B===O&&R||B}function te(O,w){return(ge(O)?O.changedTouches[0]:O)["page"+g(w?"Y":"X")]}function fe(O){return O/(x&&e.is(Wt)?Xi:1)}function me(O){var w=n.noDrag;return!jt(O,"."+Lo+", ."+En)&&(!w||!jt(O,w))}function ge(O){return typeof TouchEvent<"u"&&O instanceof TouchEvent}function q(){return f}function ie(O){j=O}return{mount:P,disable:ie,isDragging:q}}var va={Spacebar:" ",Right:Tn,Left:$n,Up:xo,Down:So};function hr(e){return e=dt(e)?e:e.key,va[e]||e}var Fr="keydown";function ba(e,t,n){var r=$e(e),o=r.on,s=r.bind,i=r.unbind,l=e.root,c=t.Direction.resolve,d,u;function T(){C(),o(We,h),o(We,C),o(st,g)}function C(){var v=n.keyboard;v&&(d=v==="global"?window:l,s(d,Fr,$))}function h(){i(d,Fr)}function p(v){u=v}function g(){var v=u;u=!0,Xr(function(){u=v})}function $(v){if(!u){var y=hr(v);y===c($n)?e.go("<"):y===c(Tn)&&e.go(">")}}return{mount:T,destroy:h,disable:p}}var Nt=rr+"-lazy",pn=Nt+"-srcset",xa="["+Nt+"], ["+pn+"]";function Sa(e,t,n){var r=$e(e),o=r.on,s=r.off,i=r.bind,l=r.emit,c=n.lazyLoad==="sequential",d=[Pt,wt],u=[];function T(){n.lazyLoad&&(C(),o(Le,C))}function C(){at(u),h(),c?v():(s(d),o(d,p),p())}function h(){t.Slides.forEach(function(y){nr(y.slide,xa).forEach(function(E){var B=Ke(E,Nt),R=Ke(E,pn);if(B!==E.src||R!==E.srcset){var _=n.classes.spinner,f=E.parentElement,x=Zt(f,"."+_)||It("span",_,f);u.push([E,y,x]),E.src||Vt(E,"none")}})})}function p(){u=u.filter(function(y){var E=n.perPage*((n.preloadPages||1)+1)-1;return y[1].isWithin(e.index,E)?g(y):!0}),u.length||s(d)}function g(y){var E=y[0];Ze(y[1].slide,Kn),i(E,"load error",xe($,y)),pe(E,"src",Ke(E,Nt)),pe(E,"srcset",Ke(E,pn)),Je(E,Nt),Je(E,pn)}function $(y,E){var B=y[0],R=y[1];rt(R.slide,Kn),E.type!=="error"&&(St(y[2]),Vt(B,""),l(ur,B,R),l(Ft)),c&&v()}function v(){u.length&&g(u.shift())}return{mount:T,destroy:xe(at,u),check:p}}function Ca(e,t,n){var r=$e(e),o=r.on,s=r.emit,i=r.bind,l=t.Slides,c=t.Elements,d=t.Controller,u=d.hasFocus,T=d.getIndex,C=d.go,h=t.Direction.resolve,p=c.pagination,g=[],$,v;function y(){E(),o([We,Le,fn],y);var j=n.pagination;p&&Vt(p,j?"":"none"),j&&(o([st,Sn,wt],L),B(),L(),s(ho,{list:$,items:g},x(e.index)))}function E(){$&&(St(p?gt($.children):$),rt($,v),at(g),$=null),r.destroy()}function B(){var j=e.length,I=n.classes,P=n.i18n,H=n.perPage,z=u()?d.getEnd()+1:Dt(j/H);$=p||It("ul",I.pagination,c.track.parentElement),Ze($,v=In+"--"+f()),pe($,ot,"tablist"),pe($,De,P.select),pe($,dr,f()===_n?"vertical":"");for(var D=0;D<z;D++){var b=It("li",null,$),k=It("button",{class:I.page,type:"button"},b),F=l.getIn(D).map(function(A){return A.slide.id}),W=!u()&&H>1?P.pageX:P.slideX;i(k,"click",xe(R,D)),n.paginationKeyboard&&i(k,"keydown",xe(_,D)),pe(b,ot,"presentation"),pe(k,ot,"tab"),pe(k,Qt,F.join(" ")),pe(k,De,Gn(W,D+1)),pe(k,At,-1),g.push({li:b,button:k,page:D})}}function R(j){C(">"+j,!0)}function _(j,I){var P=g.length,H=hr(I),z=f(),D=-1;H===h(Tn,!1,z)?D=++j%P:H===h($n,!1,z)?D=(--j+P)%P:H==="Home"?D=0:H==="End"&&(D=P-1);var b=g[D];b&&(eo(b.button),C(">"+D),tt(I,!0))}function f(){return n.paginationDirection||n.direction}function x(j){return g[d.toPage(j)]}function L(){var j=x(T(!0)),I=x(T());if(j){var P=j.button;rt(P,Ct),Je(P,_r),pe(P,At,-1)}if(I){var H=I.button;Ze(H,Ct),pe(H,_r,!0),pe(H,At,"")}s(fo,{list:$,items:g},j,I)}return{items:g,mount:y,destroy:E,getAt:x,update:L}}var wa=[" ","Enter"];function $a(e,t,n){var r=n.isNavigation,o=n.slideFocus,s=[];function i(){e.splides.forEach(function(p){p.isParent||(d(e,p.splide),d(p.splide,e))}),r&&u()}function l(){s.forEach(function(p){p.destroy()}),at(s)}function c(){l(),i()}function d(p,g){var $=$e(p);$.on(st,function(v,y,E){g.go(g.is(Mt)?E:v)}),s.push($)}function u(){var p=$e(e),g=p.on;g(ir,C),g(vo,h),g([ht,We],T),s.push(p),p.emit(sr,e.splides)}function T(){pe(t.Elements.list,dr,n.direction===_n?"vertical":"")}function C(p){e.go(p.index)}function h(p,g){er(wa,hr(g))&&(C(p),tt(g))}return{setup:xe(t.Media.set,{slideFocus:Kt(o)?r:o},!0),mount:i,destroy:l,remount:c}}function Ta(e,t,n){var r=$e(e),o=r.bind,s=0;function i(){n.wheel&&o(t.Elements.track,"wheel",l,_t)}function l(d){if(d.cancelable){var u=d.deltaY,T=u<0,C=Vn(d),h=n.wheelMinThreshold||0,p=n.wheelSleep||0;je(u)>h&&C-s>p&&(e.go(T?"<":">"),s=C),c(T)&&tt(d)}}function c(d){return!n.releaseWheel||e.state.is(Rt)||t.Controller.getAdjacent(d)!==-1}return{mount:i}}var _a=90;function La(e,t,n){var r=$e(e),o=r.on,s=t.Elements.track,i=n.live&&!n.isNavigation,l=It("span",Gi),c=Cn(_a,xe(u,!1));function d(){i&&(C(!t.Autoplay.isPaused()),pe(s,Ir,!0),l.textContent="…",o(lr,xe(C,!0)),o(cr,xe(C,!1)),o([Pt,wt],xe(u,!0)))}function u(h){pe(s,Er,h),h?(Xt(s,l),c.start()):(St(l),c.cancel())}function T(){Je(s,[Lr,Ir,Er]),St(l)}function C(h){i&&pe(s,Lr,h?"off":"polite")}return{mount:d,disable:C,destroy:T}}var Ea=Object.freeze({__proto__:null,Media:Mi,Direction:Hi,Elements:Zi,Slides:Qi,Layout:ea,Clones:na,Move:ra,Controller:oa,Arrows:sa,Autoplay:ca,Cover:ua,Scroll:fa,Drag:ya,Keyboard:ba,LazyLoad:Sa,Pagination:Ca,Sync:$a,Wheel:Ta,Live:La}),Ia={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},Aa={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:Ki,i18n:Ia,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ka(e,t,n){var r=t.Slides;function o(){$e(e).on([ht,Le],s)}function s(){r.forEach(function(l){l.style("transform","translateX(-"+100*l.index+"%)")})}function i(l,c){r.style("transition","opacity "+n.speed+"ms "+n.easing),Xr(c)}return{mount:o,start:i,cancel:Bn}}function Fa(e,t,n){var r=t.Move,o=t.Controller,s=t.Scroll,i=t.Elements.list,l=xe(qe,i,"transition"),c;function d(){$e(e).bind(i,"transitionend",function(h){h.target===i&&c&&(T(),c())})}function u(h,p){var g=r.toPosition(h,!0),$=r.getPosition(),v=C(h);je(g-$)>=1&&v>=1?n.useScroll?s.scroll(g,v,!1,p):(l("transform "+v+"ms "+n.easing),r.translate(g,!0),c=p):(r.jump(h),p())}function T(){l(""),s.cancel()}function C(h){var p=n.rewindSpeed;if(e.is(Wt)&&p){var g=o.getIndex(!0),$=o.getEnd();if(g===0&&h>=$||g>=$&&h===0)return p}return n.speed}return{mount:d,start:u,cancel:T}}var Wa=(function(){function e(n,r){this.event=$e(),this.Components={},this.state=Ri(Et),this.splides=[],this._o={},this._E={};var o=dt(n)?no(document,n):n;Ht(o,o+" is invalid."),this.root=o,r=ut({label:Ke(o,De)||"",labelledby:Ke(o,pr)||""},Aa,e.defaults,r||{});try{ut(r,JSON.parse(Ke(o,rr)))}catch{Ht(!1,"Invalid JSON")}this._o=Object.create(ut({},r))}var t=e.prototype;return t.mount=function(r,o){var s=this,i=this.state,l=this.Components;Ht(i.is([Et,mn]),"Already mounted!"),i.set(Et),this._C=l,this._T=o||this._T||(this.is(en)?ka:Fa),this._E=r||this._E;var c=Bt({},Ea,this._E,{Transition:this._T});return bt(c,function(d,u){var T=d(s,l,s._o);l[u]=T,T.setup&&T.setup()}),bt(l,function(d){d.mount&&d.mount()}),this.emit(ht),Ze(this.root,Ui),i.set(kt),this.emit(Un),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(kt)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,o){return this.event.on(r,o),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var o;return(o=this.event).emit.apply(o,[r].concat(gt(arguments,1))),this},t.add=function(r,o){return this._C.Slides.add(r,o),this},t.remove=function(r){return this._C.Slides.remove(r),this},t.is=function(r){return this._o.type===r},t.refresh=function(){return this.emit(Le),this},t.destroy=function(r){r===void 0&&(r=!0);var o=this.event,s=this.state;return s.is(Et)?$e(this).on(Un,this.destroy.bind(this,r)):(bt(this._C,function(i){i.destroy&&i.destroy(r)},!0),o.emit(ar),o.destroy(),r&&at(this.splides),s.set(mn)),this},Ii(e,[{key:"options",get:function(){return this._o},set:function(r){this._C.Media.set(r,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),fr=Wa;fr.defaults={};fr.STATES=ki;var Wr=[[ht,"onMounted"],[Un,"onReady"],[st,"onMove"],[Pt,"onMoved"],[ir,"onClick"],[io,"onActive"],[ao,"onInactive"],[so,"onVisible"],[lo,"onHidden"],[Le,"onRefresh"],[We,"onUpdated"],[Ft,"onResize"],[xn,"onResized"],[co,"onDrag"],[uo,"onDragging"],[po,"onDragged"],[Sn,"onScroll"],[wt,"onScrolled"],[ar,"onDestroy"],[mo,"onArrowsMounted"],[go,"onArrowsUpdated"],[ho,"onPaginationMounted"],[fo,"onPaginationUpdated"],[sr,"onNavigationMounted"],[lr,"onAutoplayPlay"],[yo,"onAutoplayPlaying"],[cr,"onAutoplayPause"],[ur,"onLazyLoadLoaded"]];function yr(...e){return e.filter(Boolean).join(" ")}function yn(e){return e!==null&&typeof e=="object"}function Yn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!Yn(n,t[r]));if(yn(e)&&yn(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Yn(e[o],t[o]))}return e===t}function Ra(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function Pa(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=n[r];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function Xn(e,t){const n=e;return Pa(t,(r,o)=>{Array.isArray(r)?n[o]=r.slice():yn(r)?n[o]=Xn(yn(n[o])?n[o]:{},r):n[o]=r}),n}var Ma=({children:e,className:t,...n})=>m.createElement("div",{className:yr("splide__track",t),...n},m.createElement("ul",{className:"splide__list"},e)),vr=class extends m.Component{constructor(){super(...arguments),this.splideRef=m.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new fr(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Xn({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!Yn(this.options,e)&&(this.splide.options=e,this.options=Xn({},e));const t=this.getSlides();Ra(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){Wr.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...o)=>{r(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:r,...o}=this.props;return m.createElement(t,{className:yr("splide",e),ref:this.splideRef,...this.omit(o,["options",...Wr.map(s=>s[1])])},n?m.createElement(Ma,null,r):r)}},br=({children:e,className:t,...n})=>m.createElement("li",{className:yr("splide__slide",t),...n},e);/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),m=require("react"),ye=require("classnames"),S=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Yr=require("react-dom");function No(e){return e.type==="object"&&e.version===1}const Oo="ControlSlider-module__wrapper___sHEkd",jo="ControlSlider-module__hoverArrow___A-dOH",zo="ControlSlider-module__sliderItem___QQSkR",Bo="ControlSlider-module__sliderImage___9hRl-",Vo="ControlSlider-module__arrow___05ghY",Do="ControlSlider-module__arrowVertical___tBfVN",Go="ControlSlider-module__nextArrow___-30Yc",Uo="ControlSlider-module__arrowInner___aEra3",qo="ControlSlider-module__arrowIcon___S4ztF",Ko="ControlSlider-module__arrowImg___2dwJW",Yo="ControlSlider-module__mirror___brd6U",Xo="ControlSlider-module__pagination___bicLF",Zo="ControlSlider-module__paginationInner___bT-P-",Jo="ControlSlider-module__paginationVertical___zYqKw",Qo="ControlSlider-module__paginationItem___nTRbk",ei="ControlSlider-module__dot___p1Qun",ti="ControlSlider-module__activeDot___LHFaj",ni="ControlSlider-module__paginationInsideBottom___R3FWn",ri="ControlSlider-module__paginationInsideTop___V-qb-",oi="ControlSlider-module__paginationOutsideBottom___14w8D",ii="ControlSlider-module__paginationOutsideTop___SCLqB",ai="ControlSlider-module__paginationInsideLeft___yOBRZ",si="ControlSlider-module__paginationInsideRight___Rtt3o",li="ControlSlider-module__paginationOutsideLeft___lahaw",ci="ControlSlider-module__paginationOutsideRight___EtuQa",ui="ControlSlider-module__imgWrapper___UjEgB",pi="ControlSlider-module__captionBlock___dJ6-j",di="ControlSlider-module__captionTextWrapper___HFlpf",mi="ControlSlider-module__captionText___uGBVc",gi="ControlSlider-module__active___WZK4G",hi="ControlSlider-module__withPointerEvents___t-18M",fi="ControlSlider-module__topLeftAlignment___zjnGM",yi="ControlSlider-module__topCenterAlignment___gD1xW",vi="ControlSlider-module__topRightAlignment___NMapS",bi="ControlSlider-module__middleLeftAlignment___OnUrY",xi="ControlSlider-module__middleCenterAlignment___Tdkl0",Si="ControlSlider-module__middleRightAlignment___wEbfX",Ci="ControlSlider-module__bottomLeftAlignment___cTP2-",wi="ControlSlider-module__bottomCenterAlignment___c54fB",$i="ControlSlider-module__bottomRightAlignment___kEwrz",Ti="ControlSlider-module__clickOverlay___DZA28",_i="ControlSlider-module__contain___pLyq7",Li="ControlSlider-module__cover___KdDat",ee={wrapper:Oo,hoverArrow:jo,sliderItem:zo,sliderImage:Bo,arrow:Vo,arrowVertical:Do,nextArrow:Go,arrowInner:Uo,arrowIcon:qo,arrowImg:Ko,mirror:Yo,pagination:Xo,paginationInner:Zo,paginationVertical:Jo,paginationItem:Qo,dot:ei,activeDot:ti,paginationInsideBottom:ni,paginationInsideTop:ri,paginationOutsideBottom:oi,paginationOutsideTop:ii,paginationInsideLeft:ai,paginationInsideRight:si,paginationOutsideLeft:li,paginationOutsideRight:ci,imgWrapper:ui,captionBlock:pi,captionTextWrapper:di,captionText:mi,active:gi,withPointerEvents:hi,topLeftAlignment:fi,topCenterAlignment:yi,topRightAlignment:vi,middleLeftAlignment:bi,middleCenterAlignment:xi,middleRightAlignment:Si,bottomLeftAlignment:Ci,bottomCenterAlignment:wi,bottomRightAlignment:$i,clickOverlay:Ti,contain:_i,cover:Li};function Ei(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ii(e,t,n){return t&&Ei(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var xr="(prefers-reduced-motion: reduce)",Et=1,Ai=2,kt=3,Rt=4,qt=5,ln=6,mn=7,ki={CREATED:Et,MOUNTED:Ai,IDLE:kt,MOVING:Rt,SCROLLING:qt,DRAGGING:ln,DESTROYED:mn};function at(e){e.length=0}function gt(e,t,n){return Array.prototype.slice.call(e,t,n)}function xe(e){return e.bind.apply(e,[null].concat(gt(arguments,1)))}var Xr=setTimeout,zn=function(){};function Sr(e){return requestAnimationFrame(e)}function bn(e,t){return typeof t===e}function Ot(e){return!Jn(e)&&bn("object",e)}var Zn=Array.isArray,Zr=xe(bn,"function"),dt=xe(bn,"string"),Kt=xe(bn,"undefined");function Jn(e){return e===null}function Jr(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Yt(e){return Zn(e)?e:[e]}function Ge(e,t){Yt(e).forEach(t)}function Qn(e,t){return e.indexOf(t)>-1}function cn(e,t){return e.push.apply(e,Yt(t)),e}function nt(e,t,n){e&&Ge(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function Ze(e,t){nt(e,dt(t)?t.split(" "):t,!0)}function Xt(e,t){Ge(t,e.appendChild.bind(e))}function er(e,t){Ge(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function jt(e,t){return Jr(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Qr(e,t){var n=e?gt(e.children):[];return t?n.filter(function(r){return jt(r,t)}):n}function Zt(e,t){return t?Qr(e,t)[0]:e.firstElementChild}var zt=Object.keys;function bt(e,t,n){return e&&(n?zt(e).reverse():zt(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function Bt(e){return gt(arguments,1).forEach(function(t){bt(t,function(n,r){e[r]=t[r]})}),e}function ut(e){return gt(arguments,1).forEach(function(t){bt(t,function(n,r){Zn(n)?e[r]=n.slice():Ot(n)?e[r]=ut({},Ot(e[r])?e[r]:{},n):e[r]=n})}),e}function Cr(e,t){Ge(t||zt(e),function(n){delete e[n]})}function Je(e,t){Ge(e,function(n){Ge(t,function(r){n&&n.removeAttribute(r)})})}function pe(e,t,n){Ot(t)?bt(t,function(r,o){pe(e,o,r)}):Ge(e,function(r){Jn(n)||n===""?Je(r,t):r.setAttribute(t,String(n))})}function It(e,t,n){var r=document.createElement(e);return t&&(dt(t)?Ze(r,t):pe(r,t)),n&&Xt(n,r),r}function qe(e,t,n){if(Kt(n))return getComputedStyle(e)[t];Jn(n)||(e.style[t]=""+n)}function Vt(e,t){qe(e,"display",t)}function eo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Ke(e,t){return e.getAttribute(t)}function wr(e,t){return e&&e.classList.contains(t)}function Ve(e){return e.getBoundingClientRect()}function St(e){Ge(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function to(e){return Zt(new DOMParser().parseFromString(e,"text/html").body)}function tt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function no(e,t){return e&&e.querySelector(t)}function tr(e,t){return t?gt(e.querySelectorAll(t)):[]}function rt(e,t){nt(e,t,!1)}function Bn(e){return e.timeStamp}function yt(e){return dt(e)?e:e?e+"px":""}var Jt="splide",nr="data-"+Jt;function Ht(e,t){if(!e)throw new Error("["+Jt+"] "+(t||""))}var mt=Math.min,gn=Math.max,hn=Math.floor,Dt=Math.ceil,je=Math.abs;function ro(e,t,n){return je(e-t)<n}function un(e,t,n,r){var o=mt(t,n),s=gn(t,n);return r?o<e&&e<s:o<=e&&e<=s}function Tt(e,t,n){var r=mt(t,n),o=gn(t,n);return mt(gn(r,e),o)}function Vn(e){return+(e>0)-+(e<0)}function Dn(e,t){return Ge(t,function(n){e=e.replace("%s",""+n)}),e}function rr(e){return e<10?"0"+e:""+e}var $r={};function Fi(e){return""+e+rr($r[e]=($r[e]||0)+1)}function oo(){var e=[];function t(i,l,c,d){o(i,l,function(u,T,C){var h="addEventListener"in u,p=h?u.removeEventListener.bind(u,T,c,d):u.removeListener.bind(u,c);h?u.addEventListener(T,c,d):u.addListener(c),e.push([u,T,C,c,p])})}function n(i,l,c){o(i,l,function(d,u,T){e=e.filter(function(C){return C[0]===d&&C[1]===u&&C[2]===T&&(!c||C[3]===c)?(C[4](),!1):!0})})}function r(i,l,c){var d,u=!0;return typeof CustomEvent=="function"?d=new CustomEvent(l,{bubbles:u,detail:c}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(l,u,!1,c)),i.dispatchEvent(d),d}function o(i,l,c){Ge(i,function(d){d&&Ge(l,function(u){u.split(" ").forEach(function(T){var C=T.split(".");c(d,C[0],C[1])})})})}function s(){e.forEach(function(i){i[4]()}),at(e)}return{bind:t,unbind:n,dispatch:r,destroy:s}}var ht="mounted",Gn="ready",st="move",Pt="moved",or="click",io="active",ao="inactive",so="visible",lo="hidden",Le="refresh",We="updated",Ft="resize",xn="resized",co="drag",uo="dragging",po="dragged",Sn="scroll",wt="scrolled",Wi="overflow",ir="destroy",mo="arrows:mounted",go="arrows:updated",ho="pagination:mounted",fo="pagination:updated",ar="navigation:mounted",sr="autoplay:play",yo="autoplay:playing",lr="autoplay:pause",cr="lazyload:loaded",vo="sk",bo="sh",fn="ei";function $e(e){var t=e?e.event.bus:document.createDocumentFragment(),n=oo();function r(s,i){n.bind(t,Yt(s).join(" "),function(l){i.apply(i,Zn(l.detail)?l.detail:[])})}function o(s){n.dispatch(t,s,gt(arguments,1))}return e&&e.event.on(ir,n.destroy),Bt(n,{bus:t,on:r,off:xe(n.unbind,t),emit:o})}function Cn(e,t,n,r){var o=Date.now,s,i=0,l,c=!0,d=0;function u(){if(!c){if(i=e?mt((o()-s)/e,1):1,n&&n(i),i>=1&&(t(),s=o(),r&&++d>=r))return C();l=Sr(u)}}function T(v){v||p(),s=o()-(v?i*e:0),c=!1,l=Sr(u)}function C(){c=!0}function h(){s=o(),i=0,n&&n(i)}function p(){l&&cancelAnimationFrame(l),i=0,l=0,c=!0}function g(v){e=v}function $(){return c}return{start:T,rewind:h,pause:C,cancel:p,set:g,isPaused:$}}function Ri(e){var t=e;function n(o){t=o}function r(o){return Qn(Yt(o),t)}return{set:n,is:r}}function Pi(e,t){var n=Cn(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Mi(e,t,n){var r=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},i=oo(),l=[];function c(){var p=n.mediaQuery==="min";zt(o).sort(function(g,$){return p?+g-+$:+$-+g}).forEach(function(g){u(o[g],"("+(p?"min":"max")+"-width:"+g+"px)")}),u(s,xr),T()}function d(p){p&&i.destroy()}function u(p,g){var $=matchMedia(g);i.bind($,"change",T),l.push([p,$])}function T(){var p=r.is(mn),g=n.direction,$=l.reduce(function(v,y){return ut(v,y[1].matches?y[0]:{})},{});Cr(n),h($),n.destroy?e.destroy(n.destroy==="completely"):p?(d(!0),e.mount()):g!==n.direction&&e.refresh()}function C(p){matchMedia(xr).matches&&(p?ut(n,s):Cr(n,zt(s)))}function h(p,g,$){ut(n,p),g&&ut(Object.getPrototypeOf(n),p),($||!r.is(Et))&&e.emit(We,n)}return{setup:c,destroy:d,reduce:C,set:h}}var wn="Arrow",$n=wn+"Left",Tn=wn+"Right",xo=wn+"Up",So=wn+"Down",Tr="rtl",_n="ttb",Pn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[xo,Tn],ArrowRight:[So,$n]};function Hi(e,t,n){function r(s,i,l){l=l||n.direction;var c=l===Tr&&!i?1:l===_n?0:-1;return Pn[s]&&Pn[s][c]||s.replace(/width|left|right/i,function(d,u){var T=Pn[d.toLowerCase()][c]||d;return u>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function o(s){return s*(n.direction===Tr?1:-1)}return{resolve:r,orient:o}}var ot="role",At="tabindex",Ni="disabled",Ye="aria-",Qt=Ye+"controls",Co=Ye+"current",_r=Ye+"selected",De=Ye+"label",ur=Ye+"labelledby",wo=Ye+"hidden",pr=Ye+"orientation",Gt=Ye+"roledescription",Lr=Ye+"live",Er=Ye+"busy",Ir=Ye+"atomic",dr=[ot,At,Ni,Qt,Co,De,ur,wo,pr,Gt],Qe=Jt+"__",ft="is-",Mn=Jt,Ar=Qe+"track",Oi=Qe+"list",Ln=Qe+"slide",$o=Ln+"--clone",ji=Ln+"__container",mr=Qe+"arrows",En=Qe+"arrow",To=En+"--prev",_o=En+"--next",In=Qe+"pagination",Lo=In+"__page",zi=Qe+"progress",Bi=zi+"__bar",Vi=Qe+"toggle",Di=Qe+"spinner",Gi=Qe+"sr",Ui=ft+"initialized",Ct=ft+"active",Eo=ft+"prev",Io=ft+"next",Un=ft+"visible",qn=ft+"loading",Ao=ft+"focus-in",ko=ft+"overflow",qi=[Ct,Un,Eo,Io,qn,Ao,ko],Ki={slide:Ln,clone:$o,arrows:mr,arrow:En,prev:To,next:_o,pagination:In,page:Lo,spinner:Di};function Yi(e,t){if(Zr(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!jt(n,t);)n=n.parentElement;return n}var Xi=5,kr=200,Fo="touchstart mousedown",Hn="touchmove mousemove",Nn="touchend touchcancel mouseup click";function Zi(e,t,n){var r=$e(e),o=r.on,s=r.bind,i=e.root,l=n.i18n,c={},d=[],u=[],T=[],C,h,p;function g(){E(),B(),y()}function $(){o(Le,v),o(Le,g),o(We,y),s(document,Fo+" keydown",function(f){p=f.type==="keydown"},{capture:!0}),s(i,"focusin",function(){nt(i,Ao,!!p)})}function v(f){var x=dr.concat("style");at(d),rt(i,u),rt(C,T),Je([C,h],x),Je(i,f?x:["style",Gt])}function y(){rt(i,u),rt(C,T),u=_(Mn),T=_(Ar),Ze(i,u),Ze(C,T),pe(i,De,n.label),pe(i,ur,n.labelledby)}function E(){C=R("."+Ar),h=Zt(C,"."+Oi),Ht(C&&h,"A track/list element is missing."),cn(d,Qr(h,"."+Ln+":not(."+$o+")")),bt({arrows:mr,pagination:In,prev:To,next:_o,bar:Bi,toggle:Vi},function(f,x){c[x]=R("."+f)}),Bt(c,{root:i,track:C,list:h,slides:d})}function B(){var f=i.id||Fi(Jt),x=n.role;i.id=f,C.id=C.id||f+"-track",h.id=h.id||f+"-list",!Ke(i,ot)&&i.tagName!=="SECTION"&&x&&pe(i,ot,x),pe(i,Gt,l.carousel),pe(h,ot,"presentation")}function R(f){var x=no(i,f);return x&&Yi(x,"."+Mn)===i?x:void 0}function _(f){return[f+"--"+n.type,f+"--"+n.direction,n.drag&&f+"--draggable",n.isNavigation&&f+"--nav",f===Mn&&Ct]}return Bt(c,{setup:g,mount:$,destroy:v})}var Wt="slide",Mt="loop",en="fade";function Ji(e,t,n,r){var o=$e(e),s=o.on,i=o.emit,l=o.bind,c=e.Components,d=e.root,u=e.options,T=u.isNavigation,C=u.updateOnMove,h=u.i18n,p=u.pagination,g=u.slideFocus,$=c.Direction.resolve,v=Ke(r,"style"),y=Ke(r,De),E=n>-1,B=Zt(r,"."+ji),R;function _(){E||(r.id=d.id+"-slide"+rr(t+1),pe(r,ot,p?"tabpanel":"group"),pe(r,Gt,h.slide),pe(r,De,y||Dn(h.slideLabel,[t+1,e.length]))),f()}function f(){l(r,"click",xe(i,or,F)),l(r,"keydown",xe(i,vo,F)),s([Pt,bo,wt],I),s(ar,L),C&&s(st,j)}function x(){R=!0,o.destroy(),rt(r,qi),Je(r,dr),pe(r,"style",v),pe(r,De,y||"")}function L(){var W=e.splides.map(function(A){var N=A.splide.Components.Slides.getAt(t);return N?N.slide.id:""}).join(" ");pe(r,De,Dn(h.slideX,(E?n:t)+1)),pe(r,Qt,W),pe(r,ot,g?"button":""),g&&Je(r,Gt)}function j(){R||I()}function I(){if(!R){var W=e.index;P(),H(),nt(r,Eo,t===W-1),nt(r,Io,t===W+1)}}function P(){var W=D();W!==wr(r,Ct)&&(nt(r,Ct,W),pe(r,Co,T&&W||""),i(W?io:ao,F))}function H(){var W=b(),A=!W&&(!D()||E);if(e.state.is([Rt,qt])||pe(r,wo,A||""),pe(tr(r,u.focusableNodes||""),At,A?-1:""),g&&pe(r,At,A?-1:0),W!==wr(r,Un)&&(nt(r,Un,W),i(W?so:lo,F)),!W&&document.activeElement===r){var N=c.Slides.getAt(e.index);N&&eo(N.slide)}}function z(W,A,N){qe(N&&B||r,W,A)}function D(){var W=e.index;return W===t||u.cloneStatus&&W===n}function b(){if(e.is(en))return D();var W=Ve(c.Elements.track),A=Ve(r),N=$("left",!0),Z=$("right",!0);return hn(W[N])<=Dt(A[N])&&hn(A[Z])<=Dt(W[Z])}function k(W,A){var N=je(W-t);return!E&&(u.rewind||e.is(Mt))&&(N=mt(N,e.length-N)),N<=A}var F={index:t,slideIndex:n,slide:r,container:B,isClone:E,mount:_,destroy:x,update:I,style:z,isWithin:k};return F}function Qi(e,t,n){var r=$e(e),o=r.on,s=r.emit,i=r.bind,l=t.Elements,c=l.slides,d=l.list,u=[];function T(){C(),o(Le,h),o(Le,C)}function C(){c.forEach(function(I,P){g(I,P,-1)})}function h(){R(function(I){I.destroy()}),at(u)}function p(){R(function(I){I.update()})}function g(I,P,H){var z=Ji(e,P,H,I);z.mount(),u.push(z),u.sort(function(D,b){return D.index-b.index})}function $(I){return I?_(function(P){return!P.isClone}):u}function v(I){var P=t.Controller,H=P.toIndex(I),z=P.hasFocus()?1:n.perPage;return _(function(D){return un(D.index,H,H+z-1)})}function y(I){return _(I)[0]}function E(I,P){Ge(I,function(H){if(dt(H)&&(H=to(H)),Jr(H)){var z=c[P];z?er(H,z):Xt(d,H),Ze(H,n.classes.slide),x(H,xe(s,Ft))}}),s(Le)}function B(I){St(_(I).map(function(P){return P.slide})),s(Le)}function R(I,P){$(P).forEach(I)}function _(I){return u.filter(Zr(I)?I:function(P){return dt(I)?jt(P.slide,I):Qn(Yt(I),P.index)})}function f(I,P,H){R(function(z){z.style(I,P,H)})}function x(I,P){var H=tr(I,"img"),z=H.length;z?H.forEach(function(D){i(D,"load error",function(){--z||P()})}):P()}function L(I){return I?c.length:u.length}function j(){return u.length>n.perPage}return{mount:T,destroy:h,update:p,register:g,get:$,getIn:v,getAt:y,add:E,remove:B,forEach:R,filter:_,style:f,getLength:L,isEnough:j}}function ea(e,t,n){var r=$e(e),o=r.on,s=r.bind,i=r.emit,l=t.Slides,c=t.Direction.resolve,d=t.Elements,u=d.root,T=d.track,C=d.list,h=l.getAt,p=l.style,g,$,v;function y(){E(),s(window,"resize load",Pi(xe(i,Ft))),o([We,Le],E),o(Ft,B)}function E(){g=n.direction===_n,qe(u,"maxWidth",yt(n.width)),qe(T,c("paddingLeft"),R(!1)),qe(T,c("paddingRight"),R(!0)),B(!0)}function B(F){var W=Ve(u);(F||$.width!==W.width||$.height!==W.height)&&(qe(T,"height",_()),p(c("marginRight"),yt(n.gap)),p("width",x()),p("height",L(),!0),$=W,i(xn),v!==(v=k())&&(nt(u,ko,v),i(Wi,v)))}function R(F){var W=n.padding,A=c(F?"right":"left");return W&&yt(W[A]||(Ot(W)?0:W))||"0px"}function _(){var F="";return g&&(F=f(),Ht(F,"height or heightRatio is missing."),F="calc("+F+" - "+R(!1)+" - "+R(!0)+")"),F}function f(){return yt(n.height||Ve(C).width*n.heightRatio)}function x(){return n.autoWidth?null:yt(n.fixedWidth)||(g?"":j())}function L(){return yt(n.fixedHeight)||(g?n.autoHeight?null:j():f())}function j(){var F=yt(n.gap);return"calc((100%"+(F&&" + "+F)+")/"+(n.perPage||1)+(F&&" - "+F)+")"}function I(){return Ve(C)[c("width")]}function P(F,W){var A=h(F||0);return A?Ve(A.slide)[c("width")]+(W?0:D()):0}function H(F,W){var A=h(F);if(A){var N=Ve(A.slide)[c("right")],Z=Ve(C)[c("left")];return je(N-Z)+(W?0:D())}return 0}function z(F){return H(e.length-1)-H(0)+P(0,F)}function D(){var F=h(0);return F&&parseFloat(qe(F.slide,c("marginRight")))||0}function b(F){return parseFloat(qe(T,c("padding"+(F?"Right":"Left"))))||0}function k(){return e.is(en)||z(!0)>I()}return{mount:y,resize:B,listSize:I,slideSize:P,sliderSize:z,totalSize:H,getPadding:b,isOverflow:k}}var ta=2;function na(e,t,n){var r=$e(e),o=r.on,s=t.Elements,i=t.Slides,l=t.Direction.resolve,c=[],d;function u(){o(Le,T),o([We,Ft],h),(d=$())&&(p(d),t.Layout.resize(!0))}function T(){C(),u()}function C(){St(c),at(c),r.destroy()}function h(){var v=$();d!==v&&(d<v||!v)&&r.emit(Le)}function p(v){var y=i.get().slice(),E=y.length;if(E){for(;y.length<v;)cn(y,y);cn(y.slice(-v),y.slice(0,v)).forEach(function(B,R){var _=R<v,f=g(B.slide,R);_?er(f,y[0].slide):Xt(s.list,f),cn(c,f),i.register(f,R-v+(_?0:E),B.index)})}}function g(v,y){var E=v.cloneNode(!0);return Ze(E,n.classes.clone),E.id=e.root.id+"-clone"+rr(y+1),E}function $(){var v=n.clones;if(!e.is(Mt))v=0;else if(Kt(v)){var y=n[l("fixedWidth")]&&t.Layout.slideSize(0),E=y&&Dt(Ve(s.track)[l("width")]/y);v=E||n[l("autoWidth")]&&e.length||n.perPage*ta}return v}return{mount:u,destroy:C}}function ra(e,t,n){var r=$e(e),o=r.on,s=r.emit,i=e.state.set,l=t.Layout,c=l.slideSize,d=l.getPadding,u=l.totalSize,T=l.listSize,C=l.sliderSize,h=t.Direction,p=h.resolve,g=h.orient,$=t.Elements,v=$.list,y=$.track,E;function B(){E=t.Transition,o([ht,xn,We,Le],R)}function R(){t.Controller.isBusy()||(t.Scroll.cancel(),f(e.index),t.Slides.update())}function _(A,N,Z,le){A!==N&&F(A>Z)&&(I(),x(j(z(),A>Z),!0)),i(Rt),s(st,N,Z,A),E.start(N,function(){i(kt),s(Pt,N,Z,A),le&&le()})}function f(A){x(H(A,!0))}function x(A,N){if(!e.is(en)){var Z=N?A:L(A);qe(v,"transform","translate"+p("X")+"("+Z+"px)"),A!==Z&&s(bo)}}function L(A){if(e.is(Mt)){var N=P(A),Z=N>t.Controller.getEnd(),le=N<0;(le||Z)&&(A=j(A,Z))}return A}function j(A,N){var Z=A-k(N),le=C();return A-=g(le*(Dt(je(Z)/le)||1))*(N?1:-1),A}function I(){x(z(),!0),E.cancel()}function P(A){for(var N=t.Slides.get(),Z=0,le=1/0,ne=0;ne<N.length;ne++){var de=N[ne].index,M=je(H(de,!0)-A);if(M<=le)le=M,Z=de;else break}return Z}function H(A,N){var Z=g(u(A-1)-b(A));return N?D(Z):Z}function z(){var A=p("left");return Ve(v)[A]-Ve(y)[A]+g(d(!1))}function D(A){return n.trimSpace&&e.is(Wt)&&(A=Tt(A,0,g(C(!0)-T()))),A}function b(A){var N=n.focus;return N==="center"?(T()-c(A,!0))/2:+N*c(A)||0}function k(A){return H(A?t.Controller.getEnd():0,!!n.trimSpace)}function F(A){var N=g(j(z(),A));return A?N>=0:N<=v[p("scrollWidth")]-Ve(y)[p("width")]}function W(A,N){N=Kt(N)?z():N;var Z=A!==!0&&g(N)<g(k(!1)),le=A!==!1&&g(N)>g(k(!0));return Z||le}return{mount:B,move:_,jump:f,translate:x,shift:j,cancel:I,toIndex:P,toPosition:H,getPosition:z,getLimit:k,exceededLimit:W,reposition:R}}function oa(e,t,n){var r=$e(e),o=r.on,s=r.emit,i=t.Move,l=i.getPosition,c=i.getLimit,d=i.toPosition,u=t.Slides,T=u.isEnough,C=u.getLength,h=n.omitEnd,p=e.is(Mt),g=e.is(Wt),$=xe(z,!1),v=xe(z,!0),y=n.start||0,E,B=y,R,_,f;function x(){L(),o([We,Le,fn],L),o(xn,j)}function L(){R=C(!0),_=n.perMove,f=n.perPage,E=F();var M=Tt(y,0,h?E:R-1);M!==y&&(y=M,i.reposition())}function j(){E!==F()&&s(fn)}function I(M,te,fe){if(!de()){var me=H(M),ge=k(me);ge>-1&&(te||ge!==y)&&(Z(ge),i.move(me,ge,B,fe))}}function P(M,te,fe,me){t.Scroll.scroll(M,te,fe,function(){var ge=k(i.toIndex(l()));Z(h?mt(ge,E):ge),me&&me()})}function H(M){var te=y;if(dt(M)){var fe=M.match(/([+\-<>])(\d+)?/)||[],me=fe[1],ge=fe[2];me==="+"||me==="-"?te=D(y+ +(""+me+(+ge||1)),y):me===">"?te=ge?W(+ge):$(!0):me==="<"&&(te=v(!0))}else te=p?M:Tt(M,0,E);return te}function z(M,te){var fe=_||(ne()?1:f),me=D(y+fe*(M?-1:1),y,!(_||ne()));return me===-1&&g&&!ro(l(),c(!M),1)?M?0:E:te?me:k(me)}function D(M,te,fe){if(T()||ne()){var me=b(M);me!==M&&(te=M,M=me,fe=!1),M<0||M>E?!_&&(un(0,M,te,!0)||un(E,te,M,!0))?M=W(A(M)):p?M=fe?M<0?-(R%f||f):R:M:n.rewind?M=M<0?E:0:M=-1:fe&&M!==te&&(M=W(A(te)+(M<te?-1:1)))}else M=-1;return M}function b(M){if(g&&n.trimSpace==="move"&&M!==y)for(var te=l();te===d(M,!0)&&un(M,0,e.length-1,!n.rewind);)M<y?--M:++M;return M}function k(M){return p?(M+R)%R||0:M}function F(){for(var M=R-(ne()||p&&_?1:f);h&&M-- >0;)if(d(R-1,!0)!==d(M,!0)){M++;break}return Tt(M,0,R-1)}function W(M){return Tt(ne()?M:f*M,0,E)}function A(M){return ne()?mt(M,E):hn((M>=E?R-1:M)/f)}function N(M){var te=i.toIndex(M);return g?Tt(te,0,E):te}function Z(M){M!==y&&(B=y,y=M)}function le(M){return M?B:y}function ne(){return!Kt(n.focus)||n.isNavigation}function de(){return e.state.is([Rt,qt])&&!!n.waitForTransition}return{mount:x,go:I,scroll:P,getNext:$,getPrev:v,getAdjacent:z,getEnd:F,setIndex:Z,getIndex:le,toIndex:W,toPage:A,toDest:N,hasFocus:ne,isBusy:de}}var ia="http://www.w3.org/2000/svg",aa="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",nn=40;function sa(e,t,n){var r=$e(e),o=r.on,s=r.bind,i=r.emit,l=n.classes,c=n.i18n,d=t.Elements,u=t.Controller,T=d.arrows,C=d.track,h=T,p=d.prev,g=d.next,$,v,y={};function E(){R(),o(We,B)}function B(){_(),E()}function R(){var P=n.arrows;P&&!(p&&g)&&L(),p&&g&&(Bt(y,{prev:p,next:g}),Vt(h,P?"":"none"),Ze(h,v=mr+"--"+n.direction),P&&(f(),I(),pe([p,g],Qt,C.id),i(mo,p,g)))}function _(){r.destroy(),rt(h,v),$?(St(T?[p,g]:h),p=g=null):Je([p,g],dr)}function f(){o([ht,Pt,Le,wt,fn],I),s(g,"click",xe(x,">")),s(p,"click",xe(x,"<"))}function x(P){u.go(P,!0)}function L(){h=T||It("div",l.arrows),p=j(!0),g=j(!1),$=!0,Xt(h,[p,g]),!T&&er(h,C)}function j(P){var H='<button class="'+l.arrow+" "+(P?l.prev:l.next)+'" type="button"><svg xmlns="'+ia+'" viewBox="0 0 '+nn+" "+nn+'" width="'+nn+'" height="'+nn+'" focusable="false"><path d="'+(n.arrowPath||aa)+'" />';return to(H)}function I(){if(p&&g){var P=e.index,H=u.getPrev(),z=u.getNext(),D=H>-1&&P<H?c.last:c.prev,b=z>-1&&P>z?c.first:c.next;p.disabled=H<0,g.disabled=z<0,pe(p,De,D),pe(g,De,b),i(go,p,g,H,z)}}return{arrows:y,mount:E,destroy:_,update:I}}var la=nr+"-interval";function ca(e,t,n){var r=$e(e),o=r.on,s=r.bind,i=r.emit,l=Cn(n.interval,e.go.bind(e,">"),f),c=l.isPaused,d=t.Elements,u=t.Elements,T=u.root,C=u.toggle,h=n.autoplay,p,g,$=h==="pause";function v(){h&&(y(),C&&pe(C,Qt,d.track.id),$||E(),_())}function y(){n.pauseOnHover&&s(T,"mouseenter mouseleave",function(L){p=L.type==="mouseenter",R()}),n.pauseOnFocus&&s(T,"focusin focusout",function(L){g=L.type==="focusin",R()}),C&&s(C,"click",function(){$?E():B(!0)}),o([st,Sn,Le],l.rewind),o(st,x)}function E(){c()&&t.Slides.isEnough()&&(l.start(!n.resetProgress),g=p=$=!1,_(),i(sr))}function B(L){L===void 0&&(L=!0),$=!!L,_(),c()||(l.pause(),i(lr))}function R(){$||(p||g?B(!1):E())}function _(){C&&(nt(C,Ct,!$),pe(C,De,n.i18n[$?"play":"pause"]))}function f(L){var j=d.bar;j&&qe(j,"width",L*100+"%"),i(yo,L)}function x(L){var j=t.Slides.getAt(L);l.set(j&&+Ke(j.slide,la)||n.interval)}return{mount:v,destroy:l.cancel,play:E,pause:B,isPaused:c}}function ua(e,t,n){var r=$e(e),o=r.on;function s(){n.cover&&(o(cr,xe(l,!0)),o([ht,We,Le],xe(i,!0)))}function i(c){t.Slides.forEach(function(d){var u=Zt(d.container||d.slide,"img");u&&u.src&&l(c,u,d)})}function l(c,d,u){u.style("background",c?'center/cover no-repeat url("'+d.src+'")':"",!0),Vt(d,c?"none":"")}return{mount:s,destroy:xe(i,!1)}}var pa=10,da=600,ma=.6,ga=1.5,ha=800;function fa(e,t,n){var r=$e(e),o=r.on,s=r.emit,i=e.state.set,l=t.Move,c=l.getPosition,d=l.getLimit,u=l.exceededLimit,T=l.translate,C=e.is(Wt),h,p,g=1;function $(){o(st,B),o([We,Le],R)}function v(f,x,L,j,I){var P=c();if(B(),L&&(!C||!u())){var H=t.Layout.sliderSize(),z=Vn(f)*H*hn(je(f)/H)||0;f=l.toPosition(t.Controller.toDest(f%H))+z}var D=ro(P,f,1);g=1,x=D?0:x||gn(je(f-P)/ga,ha),p=j,h=Cn(x,y,xe(E,P,f,I),1),i(qt),s(Sn),h.start()}function y(){i(kt),p&&p(),s(wt)}function E(f,x,L,j){var I=c(),P=f+(x-f)*_(j),H=(P-I)*g;T(I+H),C&&!L&&u()&&(g*=ma,je(H)<pa&&v(d(u(!0)),da,!1,p,!0))}function B(){h&&h.cancel()}function R(){h&&!h.isPaused()&&(B(),y())}function _(f){var x=n.easingFunc;return x?x(f):1-Math.pow(1-f,4)}return{mount:$,destroy:B,scroll:v,cancel:R}}var _t={passive:!1,capture:!0};function ya(e,t,n){var r=$e(e),o=r.on,s=r.emit,i=r.bind,l=r.unbind,c=e.state,d=t.Move,u=t.Scroll,T=t.Controller,C=t.Elements.track,h=t.Media.reduce,p=t.Direction,g=p.resolve,$=p.orient,v=d.getPosition,y=d.exceededLimit,E,B,R,_,f,x=!1,L,j,I;function P(){i(C,Hn,zn,_t),i(C,Nn,zn,_t),i(C,Fo,z,_t),i(C,"click",k,{capture:!0}),i(C,"dragstart",tt),o([ht,We],H)}function H(){var O=n.drag;ie(!O),_=O==="free"}function z(O){if(L=!1,!j){var w=ge(O);me(O.target)&&(w||!O.button)&&(T.isBusy()?tt(O,!0):(I=w?C:window,f=c.is([Rt,qt]),R=null,i(I,Hn,D,_t),i(I,Nn,b,_t),d.cancel(),u.cancel(),F(O)))}}function D(O){if(c.is(ln)||(c.set(ln),s(co)),O.cancelable)if(f){d.translate(E+fe(ne(O)));var w=de(O)>kr,G=x!==(x=y());(w||G)&&F(O),L=!0,s(uo),tt(O)}else N(O)&&(f=A(O),tt(O))}function b(O){c.is(ln)&&(c.set(kt),s(po)),f&&(W(O),tt(O)),l(I,Hn,D),l(I,Nn,b),f=!1}function k(O){!j&&L&&tt(O,!0)}function F(O){R=B,B=O,E=v()}function W(O){var w=Z(O),G=le(w),Y=n.rewind&&n.rewindByDrag;h(!1),_?T.scroll(G,0,n.snap):e.is(en)?T.go($(Vn(w))<0?Y?"<":"-":Y?">":"+"):e.is(Wt)&&x&&Y?T.go(y(!0)?">":"<"):T.go(T.toDest(G),!0),h(!0)}function A(O){var w=n.dragMinThreshold,G=Ot(w),Y=G&&w.mouse||0,J=(G?w.touch:+w)||10;return je(ne(O))>(ge(O)?J:Y)}function N(O){return je(ne(O))>je(ne(O,!0))}function Z(O){if(e.is(Mt)||!x){var w=de(O);if(w&&w<kr)return ne(O)/w}return 0}function le(O){return v()+Vn(O)*mt(je(O)*(n.flickPower||600),_?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function ne(O,w){return te(O,w)-te(M(O),w)}function de(O){return Bn(O)-Bn(M(O))}function M(O){return B===O&&R||B}function te(O,w){return(ge(O)?O.changedTouches[0]:O)["page"+g(w?"Y":"X")]}function fe(O){return O/(x&&e.is(Wt)?Xi:1)}function me(O){var w=n.noDrag;return!jt(O,"."+Lo+", ."+En)&&(!w||!jt(O,w))}function ge(O){return typeof TouchEvent<"u"&&O instanceof TouchEvent}function q(){return f}function ie(O){j=O}return{mount:P,disable:ie,isDragging:q}}var va={Spacebar:" ",Right:Tn,Left:$n,Up:xo,Down:So};function gr(e){return e=dt(e)?e:e.key,va[e]||e}var Fr="keydown";function ba(e,t,n){var r=$e(e),o=r.on,s=r.bind,i=r.unbind,l=e.root,c=t.Direction.resolve,d,u;function T(){C(),o(We,h),o(We,C),o(st,g)}function C(){var v=n.keyboard;v&&(d=v==="global"?window:l,s(d,Fr,$))}function h(){i(d,Fr)}function p(v){u=v}function g(){var v=u;u=!0,Xr(function(){u=v})}function $(v){if(!u){var y=gr(v);y===c($n)?e.go("<"):y===c(Tn)&&e.go(">")}}return{mount:T,destroy:h,disable:p}}var Nt=nr+"-lazy",pn=Nt+"-srcset",xa="["+Nt+"], ["+pn+"]";function Sa(e,t,n){var r=$e(e),o=r.on,s=r.off,i=r.bind,l=r.emit,c=n.lazyLoad==="sequential",d=[Pt,wt],u=[];function T(){n.lazyLoad&&(C(),o(Le,C))}function C(){at(u),h(),c?v():(s(d),o(d,p),p())}function h(){t.Slides.forEach(function(y){tr(y.slide,xa).forEach(function(E){var B=Ke(E,Nt),R=Ke(E,pn);if(B!==E.src||R!==E.srcset){var _=n.classes.spinner,f=E.parentElement,x=Zt(f,"."+_)||It("span",_,f);u.push([E,y,x]),E.src||Vt(E,"none")}})})}function p(){u=u.filter(function(y){var E=n.perPage*((n.preloadPages||1)+1)-1;return y[1].isWithin(e.index,E)?g(y):!0}),u.length||s(d)}function g(y){var E=y[0];Ze(y[1].slide,qn),i(E,"load error",xe($,y)),pe(E,"src",Ke(E,Nt)),pe(E,"srcset",Ke(E,pn)),Je(E,Nt),Je(E,pn)}function $(y,E){var B=y[0],R=y[1];rt(R.slide,qn),E.type!=="error"&&(St(y[2]),Vt(B,""),l(cr,B,R),l(Ft)),c&&v()}function v(){u.length&&g(u.shift())}return{mount:T,destroy:xe(at,u),check:p}}function Ca(e,t,n){var r=$e(e),o=r.on,s=r.emit,i=r.bind,l=t.Slides,c=t.Elements,d=t.Controller,u=d.hasFocus,T=d.getIndex,C=d.go,h=t.Direction.resolve,p=c.pagination,g=[],$,v;function y(){E(),o([We,Le,fn],y);var j=n.pagination;p&&Vt(p,j?"":"none"),j&&(o([st,Sn,wt],L),B(),L(),s(ho,{list:$,items:g},x(e.index)))}function E(){$&&(St(p?gt($.children):$),rt($,v),at(g),$=null),r.destroy()}function B(){var j=e.length,I=n.classes,P=n.i18n,H=n.perPage,z=u()?d.getEnd()+1:Dt(j/H);$=p||It("ul",I.pagination,c.track.parentElement),Ze($,v=In+"--"+f()),pe($,ot,"tablist"),pe($,De,P.select),pe($,pr,f()===_n?"vertical":"");for(var D=0;D<z;D++){var b=It("li",null,$),k=It("button",{class:I.page,type:"button"},b),F=l.getIn(D).map(function(A){return A.slide.id}),W=!u()&&H>1?P.pageX:P.slideX;i(k,"click",xe(R,D)),n.paginationKeyboard&&i(k,"keydown",xe(_,D)),pe(b,ot,"presentation"),pe(k,ot,"tab"),pe(k,Qt,F.join(" ")),pe(k,De,Dn(W,D+1)),pe(k,At,-1),g.push({li:b,button:k,page:D})}}function R(j){C(">"+j,!0)}function _(j,I){var P=g.length,H=gr(I),z=f(),D=-1;H===h(Tn,!1,z)?D=++j%P:H===h($n,!1,z)?D=(--j+P)%P:H==="Home"?D=0:H==="End"&&(D=P-1);var b=g[D];b&&(eo(b.button),C(">"+D),tt(I,!0))}function f(){return n.paginationDirection||n.direction}function x(j){return g[d.toPage(j)]}function L(){var j=x(T(!0)),I=x(T());if(j){var P=j.button;rt(P,Ct),Je(P,_r),pe(P,At,-1)}if(I){var H=I.button;Ze(H,Ct),pe(H,_r,!0),pe(H,At,"")}s(fo,{list:$,items:g},j,I)}return{items:g,mount:y,destroy:E,getAt:x,update:L}}var wa=[" ","Enter"];function $a(e,t,n){var r=n.isNavigation,o=n.slideFocus,s=[];function i(){e.splides.forEach(function(p){p.isParent||(d(e,p.splide),d(p.splide,e))}),r&&u()}function l(){s.forEach(function(p){p.destroy()}),at(s)}function c(){l(),i()}function d(p,g){var $=$e(p);$.on(st,function(v,y,E){g.go(g.is(Mt)?E:v)}),s.push($)}function u(){var p=$e(e),g=p.on;g(or,C),g(vo,h),g([ht,We],T),s.push(p),p.emit(ar,e.splides)}function T(){pe(t.Elements.list,pr,n.direction===_n?"vertical":"")}function C(p){e.go(p.index)}function h(p,g){Qn(wa,gr(g))&&(C(p),tt(g))}return{setup:xe(t.Media.set,{slideFocus:Kt(o)?r:o},!0),mount:i,destroy:l,remount:c}}function Ta(e,t,n){var r=$e(e),o=r.bind,s=0;function i(){n.wheel&&o(t.Elements.track,"wheel",l,_t)}function l(d){if(d.cancelable){var u=d.deltaY,T=u<0,C=Bn(d),h=n.wheelMinThreshold||0,p=n.wheelSleep||0;je(u)>h&&C-s>p&&(e.go(T?"<":">"),s=C),c(T)&&tt(d)}}function c(d){return!n.releaseWheel||e.state.is(Rt)||t.Controller.getAdjacent(d)!==-1}return{mount:i}}var _a=90;function La(e,t,n){var r=$e(e),o=r.on,s=t.Elements.track,i=n.live&&!n.isNavigation,l=It("span",Gi),c=Cn(_a,xe(u,!1));function d(){i&&(C(!t.Autoplay.isPaused()),pe(s,Ir,!0),l.textContent="…",o(sr,xe(C,!0)),o(lr,xe(C,!1)),o([Pt,wt],xe(u,!0)))}function u(h){pe(s,Er,h),h?(Xt(s,l),c.start()):(St(l),c.cancel())}function T(){Je(s,[Lr,Ir,Er]),St(l)}function C(h){i&&pe(s,Lr,h?"off":"polite")}return{mount:d,disable:C,destroy:T}}var Ea=Object.freeze({__proto__:null,Media:Mi,Direction:Hi,Elements:Zi,Slides:Qi,Layout:ea,Clones:na,Move:ra,Controller:oa,Arrows:sa,Autoplay:ca,Cover:ua,Scroll:fa,Drag:ya,Keyboard:ba,LazyLoad:Sa,Pagination:Ca,Sync:$a,Wheel:Ta,Live:La}),Ia={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},Aa={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:Ki,i18n:Ia,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ka(e,t,n){var r=t.Slides;function o(){$e(e).on([ht,Le],s)}function s(){r.forEach(function(l){l.style("transform","translateX(-"+100*l.index+"%)")})}function i(l,c){r.style("transition","opacity "+n.speed+"ms "+n.easing),Xr(c)}return{mount:o,start:i,cancel:zn}}function Fa(e,t,n){var r=t.Move,o=t.Controller,s=t.Scroll,i=t.Elements.list,l=xe(qe,i,"transition"),c;function d(){$e(e).bind(i,"transitionend",function(h){h.target===i&&c&&(T(),c())})}function u(h,p){var g=r.toPosition(h,!0),$=r.getPosition(),v=C(h);je(g-$)>=1&&v>=1?n.useScroll?s.scroll(g,v,!1,p):(l("transform "+v+"ms "+n.easing),r.translate(g,!0),c=p):(r.jump(h),p())}function T(){l(""),s.cancel()}function C(h){var p=n.rewindSpeed;if(e.is(Wt)&&p){var g=o.getIndex(!0),$=o.getEnd();if(g===0&&h>=$||g>=$&&h===0)return p}return n.speed}return{mount:d,start:u,cancel:T}}var Wa=(function(){function e(n,r){this.event=$e(),this.Components={},this.state=Ri(Et),this.splides=[],this._o={},this._E={};var o=dt(n)?no(document,n):n;Ht(o,o+" is invalid."),this.root=o,r=ut({label:Ke(o,De)||"",labelledby:Ke(o,ur)||""},Aa,e.defaults,r||{});try{ut(r,JSON.parse(Ke(o,nr)))}catch{Ht(!1,"Invalid JSON")}this._o=Object.create(ut({},r))}var t=e.prototype;return t.mount=function(r,o){var s=this,i=this.state,l=this.Components;Ht(i.is([Et,mn]),"Already mounted!"),i.set(Et),this._C=l,this._T=o||this._T||(this.is(en)?ka:Fa),this._E=r||this._E;var c=Bt({},Ea,this._E,{Transition:this._T});return bt(c,function(d,u){var T=d(s,l,s._o);l[u]=T,T.setup&&T.setup()}),bt(l,function(d){d.mount&&d.mount()}),this.emit(ht),Ze(this.root,Ui),i.set(kt),this.emit(Gn),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(kt)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,o){return this.event.on(r,o),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var o;return(o=this.event).emit.apply(o,[r].concat(gt(arguments,1))),this},t.add=function(r,o){return this._C.Slides.add(r,o),this},t.remove=function(r){return this._C.Slides.remove(r),this},t.is=function(r){return this._o.type===r},t.refresh=function(){return this.emit(Le),this},t.destroy=function(r){r===void 0&&(r=!0);var o=this.event,s=this.state;return s.is(Et)?$e(this).on(Gn,this.destroy.bind(this,r)):(bt(this._C,function(i){i.destroy&&i.destroy(r)},!0),o.emit(ir),o.destroy(),r&&at(this.splides),s.set(mn)),this},Ii(e,[{key:"options",get:function(){return this._o},set:function(r){this._C.Media.set(r,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),hr=Wa;hr.defaults={};hr.STATES=ki;var Wr=[[ht,"onMounted"],[Gn,"onReady"],[st,"onMove"],[Pt,"onMoved"],[or,"onClick"],[io,"onActive"],[ao,"onInactive"],[so,"onVisible"],[lo,"onHidden"],[Le,"onRefresh"],[We,"onUpdated"],[Ft,"onResize"],[xn,"onResized"],[co,"onDrag"],[uo,"onDragging"],[po,"onDragged"],[Sn,"onScroll"],[wt,"onScrolled"],[ir,"onDestroy"],[mo,"onArrowsMounted"],[go,"onArrowsUpdated"],[ho,"onPaginationMounted"],[fo,"onPaginationUpdated"],[ar,"onNavigationMounted"],[sr,"onAutoplayPlay"],[yo,"onAutoplayPlaying"],[lr,"onAutoplayPause"],[cr,"onLazyLoadLoaded"]];function fr(...e){return e.filter(Boolean).join(" ")}function yn(e){return e!==null&&typeof e=="object"}function Kn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!Kn(n,t[r]));if(yn(e)&&yn(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Kn(e[o],t[o]))}return e===t}function Ra(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function Pa(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=n[r];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function Yn(e,t){const n=e;return Pa(t,(r,o)=>{Array.isArray(r)?n[o]=r.slice():yn(r)?n[o]=Yn(yn(n[o])?n[o]:{},r):n[o]=r}),n}var Ma=({children:e,className:t,...n})=>m.createElement("div",{className:fr("splide__track",t),...n},m.createElement("ul",{className:"splide__list"},e)),yr=class extends m.Component{constructor(){super(...arguments),this.splideRef=m.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new hr(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Yn({},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&&!Kn(this.options,e)&&(this.splide.options=e,this.options=Yn({},e));const t=this.getSlides();Ra(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){Wr.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...o)=>{r(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:r,...o}=this.props;return m.createElement(t,{className:fr("splide",e),ref:this.splideRef,...this.omit(o,["options",...Wr.map(s=>s[1])])},n?m.createElement(Ma,null,r):r)}},vr=({children:e,className:t,...n})=>m.createElement("li",{className:fr("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 Ha="RichTextRenderer-module__link___BWeZ2",Na={link:Ha},Oa=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(r=>/^\d/.test(r))},An=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Oa(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function it(e){const{color:t,...n}=e;return n}function Be(e,t){var n,r,o;return{fontFamily:An(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:S.scalingValue(e.letterSpacing,t),wordSpacing:S.scalingValue(e.wordSpacing,t),fontSize:S.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?S.scalingValue(e.lineHeight,t):void 0,textTransform:(n=e.textAppearance)==null?void 0:n.textTransform,textDecoration:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(o=e.textAppearance)==null?void 0:o.fontVariant,color:e.color}}const Ut=({content:e})=>{const t=n=>n.map((r,o)=>r.type==="link"?a.jsx("a",{className:Na.link,href:r.value,target:r.target,children:t(r.children)},o):a.jsx("span",{style:ja(r),children:r.text},o));return a.jsx(a.Fragment,{children:e.map((n,r)=>{const o=n.children;return a.jsx("div",{children:t(o)},r)})})};function ja(e){return{...e.fontFamily&&{fontFamily:An(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 za="SvgImage-module__svg___q3xE-",Ba="SvgImage-module__img___VsTm-",Rr={svg:za,img:Ba},Va=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Da=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,pt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:o})=>{const[s,i]=m.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return m.useEffect(()=>{if(typeof window<"u"&&window.CSS){const l=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(l)}},[]),!Va(e)||!s?a.jsx("img",{src:e,alt:"",className:ye(Rr.img,r),style:o}):a.jsx("span",{"data-supports-mask":s,className:ye(Rr.svg,r),style:{"--svg":Da(e),"--fill":t,"--hover-fill":n,...o??{}}})},Ga={"top-left":ee.topLeftAlignment,"top-center":ee.topCenterAlignment,"top-right":ee.topRightAlignment,"middle-left":ee.middleLeftAlignment,"middle-center":ee.middleCenterAlignment,"middle-right":ee.middleRightAlignment,"bottom-left":ee.bottomLeftAlignment,"bottom-center":ee.bottomCenterAlignment,"bottom-right":ee.bottomRightAlignment};function Ua({settings:e,content:t,styles:n,isEditor:r}){const[o,s]=m.useState(null),{widthSettings:i,fontSettings:l,letterSpacing:c,textAlign:d,wordSpacing:u,fontSizeLineHeight:T,textAppearance:C,color:h}=n.imageCaption,[p,g]=m.useState(void 0),[$,v]=m.useState(null),[y,E]=m.useState(0),[B,R]=m.useState(0),{direction:_,transition:f,controls:x,pagination:L,imageCaption:j,triggers:I}=e,P=m.useRef(f.type),{x:H,y:z}=e.controls.offset,D=b=>{o&&o.go(b)};return m.useEffect(()=>{if(!$)return;const b=new ResizeObserver(k=>{if(!o)return;const[F]=k;g({width:Math.round(F.contentRect.width),height:Math.round(F.contentRect.height)})});return b.observe($),()=>b.unobserve($)},[$]),m.useEffect(()=>{!o||P.current===f.type||(R(b=>b+1),P.current=f.type)},[f.type]),a.jsx("div",{className:ye(ee.wrapper,{[ee.editor]:r}),ref:v,children:a.jsxs("div",{className:ee.sliderInner,style:{width:p?p.width:"100%",height:p?p.height:"100%",backgroundColor:f.backgroundColor&&f.type==="fade in"?f.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:ye(ee.captionBlock),children:a.jsx("div",{className:ee.captionTextWrapper,children:t.map((b,k)=>a.jsx("div",{className:ye(ee.captionText,Ga[j.alignment],{[ee.withPointerEvents]:k===y&&r,[ee.active]:k===y}),style:{fontFamily:An(l.fontFamily),fontWeight:l.fontWeight,fontStyle:l.fontStyle,width:i.sizing==="auto"?"max-content":S.scalingValue(i.width,r),letterSpacing:S.scalingValue(c,r),wordSpacing:S.scalingValue(u,r),textAlign:d,fontSize:S.scalingValue(T.fontSize,r),lineHeight:S.scalingValue(T.lineHeight,r),textTransform:C.textTransform??"none",textDecoration:C.textDecoration??"none",fontVariant:C.fontVariant??"normal",color:h,transitionDuration:f.duration?`${Math.round(parseInt(f.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:ee.captionTextInner,style:{"--link-hover-color":j.linkHoverColor,"--link-color":j.linkColor,position:"relative",top:S.scalingValue(j.offset.y,r),left:S.scalingValue(j.offset.x,r)},children:a.jsx(Ut,{content:b.imageCaption})})},k))})}),a.jsx(vr,{onMove:b=>{E(b.index)},ref:s,options:{arrows:!1,speed:f.duration?parseInt(f.duration):500,autoplay:I.autoPlay!==null,...I.autoPlay!==null&&{interval:parseInt(I.autoPlay)*1e3},direction:_==="horiz"||f.type==="fade in"?"ltr":"ttb",pagination:!1,drag:I.triggersList.drag,perPage:1,width:p?p.width:"100%",height:p?p.height:"100%",type:f.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((b,k)=>a.jsx(br,{children:a.jsx("div",{className:ee.sliderItem,children:a.jsx("div",{className:ee.imgWrapper,children:a.jsx("img",{className:ye(ee.sliderImage,{[ee.contain]:b.image.objectFit==="contain",[ee.cover]:b.image.objectFit==="cover"}),src:b.image.url,alt:b.image.name??""})})})},k))},B),x.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:ye(ee.arrow,{[ee.arrowVertical]:_==="vert",[ee.hoverArrow]:x.show==="on hover"}),style:{color:x.color,"--arrow-hover-color":x.hover},children:a.jsxs("button",{onClick:()=>{D("-1")},className:ee.arrowInner,style:{transform:`translate(${S.scalingValue(H,r)}, ${S.scalingValue(z*(_==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:[x.arrowsImgUrl&&a.jsx(pt,{url:x.arrowsImgUrl,fill:x.color,hoverFill:x.hover,className:ye(ee.arrowImg,ee.mirror)}),!x.arrowsImgUrl&&a.jsx(Pr,{color:x.color,className:ye(ee.arrowIcon,ee.arrowImg,ee.mirror)})]})}),a.jsx("div",{className:ye(ee.arrow,ee.nextArrow,{[ee.arrowVertical]:_==="vert",[ee.hoverArrow]:x.show==="on hover"}),style:{color:x.color,"--arrow-hover-color":x.hover},children:a.jsxs("button",{className:ee.arrowInner,onClick:()=>D("+1"),style:{transform:`translate(${S.scalingValue(H*(_==="horiz"?-1:1),r)}, ${S.scalingValue(z,r)}) scale(${e.controls.scale/100}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:[x.arrowsImgUrl&&a.jsx(pt,{url:x.arrowsImgUrl,fill:x.color,hoverFill:x.hover,className:ee.arrowImg}),!x.arrowsImgUrl&&a.jsx(Pr,{color:x.color,className:ye(ee.arrowIcon,ee.arrowImg)})]})})]}),I.triggersList.click&&a.jsx("div",{className:ee.clickOverlay,onClick:()=>{o&&o.go("+1")}}),L.isActive&&a.jsx("div",{className:ye(ee.pagination,{[ee.paginationInsideBottom]:L.position==="inside-1"&&_==="horiz",[ee.paginationInsideTop]:L.position==="inside-2"&&_==="horiz",[ee.paginationOutsideBottom]:L.position==="outside-1"&&_==="horiz",[ee.paginationOutsideTop]:L.position==="outside-2"&&_==="horiz",[ee.paginationInsideLeft]:L.position==="inside-1"&&_==="vert",[ee.paginationInsideRight]:L.position==="inside-2"&&_==="vert",[ee.paginationOutsideLeft]:L.position==="outside-1"&&_==="vert",[ee.paginationOutsideRight]:L.position==="outside-2"&&_==="vert",[ee.paginationVertical]:_==="vert"}),children:a.jsx("div",{className:ee.paginationInner,style:{backgroundColor:L.colors[2],transform:`scale(${L.scale/100}) translate(${S.scalingValue(L.offset.x,r)}, ${S.scalingValue(L.offset.y,r)}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:t.map((b,k)=>a.jsx("button",{onClick:()=>{o&&o.go(k)},className:ye(ee.paginationItem),children:a.jsx("div",{className:ye(ee.dot,{[ee.activeDot]:k===y}),style:{backgroundColor:k===y?L.colors[0]:L.colors[1],"--pagination-hover-color":L.hover}})},k))})})]})})}function Pr({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const qa={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:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},Ka="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Ya="ImageRevealSlider-module__image___Qjt-e",Xa="ImageRevealSlider-module__link___N-iLG",Za="ImageRevealSlider-module__cursor___2U03d",$t={imageRevealSlider:Ka,image:Ya,link:Xa,cursor:Za};function Mr(e,t,n){for(const r of n){const o=new Image;o.src=r.url;const s=r.width?Number.parseFloat(r.width):o.naturalWidth,i=o.naturalHeight/o.naturalWidth*s,l=s/2,c=i/2;if(e>=r.x-l&&e<=r.x+l&&t>=r.y-c&&t<=r.y+c)return!0}return!1}function jn(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ja(e,t,n,r){let o,s;if(t==="custom"){o=n;const i=await jn(e);s=i.height/i.width*o}else if(t==="random"){o=Math.random()*(r.max-r.min)+r.min;const i=await jn(e);s=i.height/i.width*o}else{const i=await jn(e);o=i.width,s=i.height}return{width:o,height:s,finalWidth:`${o}px`}}function Qa({settings:e,content:t,isEditor:n}){const[r,o]=m.useState(null),[s,i]=m.useState([]),[l,c]=m.useState(0),d=m.useRef(0),[u,T]=m.useState({x:0,y:0}),[C,h]=m.useState(1),[p,g]=m.useState("none"),$=m.useRef({x:0,y:0}),[v,y]=m.useState(!1),{sizeType:E,imageWidth:B,randomRangeImageWidth:R}=e.imageSize,{revealPosition:_,visible:f}=e.position,{cursorType:x,target:L,defaultCursorScale:j,defaultCursor:I,hoverCursorScale:P,hoverCursor:H}=e.cursor;m.useEffect(()=>{if(!r)return;const b=(W,A)=>{const N=r.getBoundingClientRect(),Z=W-N.left,le=A-N.top;if(T({x:Z,y:le}),x==="system"){g("none"),h(1);return}const ne=Z,de=le,M=document.elementFromPoint(N.left+ne,N.top+de);if(M&&M.closest("a")){g("none"),h(1);return}const te=Mr(ne,de,s)||L==="area"?{img:H??"none",scale:P}:{img:I??"none",scale:j};g(te.img),h(te.scale)},k=W=>{W.stopPropagation(),$.current={x:W.clientX,y:W.clientY},b(W.clientX,W.clientY)},F=()=>{v&&b($.current.x,$.current.y)};return r.addEventListener("mousemove",k),window.addEventListener("scroll",F,!0),()=>{r.removeEventListener("mousemove",k),window.removeEventListener("scroll",F,!0)}},[r,v,u,x,L,H,I,P,j,s]),m.useEffect(()=>{v||(g("none"),h(0))},[v]);const z=async(b,k,F,W={})=>{const{width:A,height:N,finalWidth:Z}=await Ja(b.image.url,E,B,R);let le=0,ne=0;_==="same"?(le=k/2,ne=F/2):(le=W.x??Math.random()*k,ne=W.y??Math.random()*F);const de=Math.min(Math.max(le,A/2),k-A/2),M=Math.min(Math.max(ne,N/2),F-N/2);return{id:d.current++,url:b.image.url,link:b.link,name:b.image.name,x:de,y:M,width:Z}};m.useEffect(()=>{if(!r||t.length===0)return;const b=r.getBoundingClientRect(),k=b.width,F=b.height,W=[];(async()=>{const N=t[0],Z=await z(N,k,F);W.push(Z),i(W),c(1)})()},[E,B,R,_,r]),m.useEffect(()=>{f==="last One"&&i(b=>b.length>0?[b[b.length-1]]:[])},[f]);const D=async b=>{if(!r)return;const k=r.getBoundingClientRect(),F=b.clientX-k.left,W=b.clientY-k.top;if(L==="image"&&!Mr(F,W,s))return;let A=0,N=0;_==="on Click"?(A=F,N=W):_==="same"?(A=k.width/2,N=k.height/2):(A=Math.random()*k.width,N=Math.random()*k.height);const Z=t[l],le=await z(Z,k.width,k.height,{x:A,y:N});i(ne=>f==="all"?[...ne,le]:[le]),c(ne=>ne>=t.length-1?0:ne+1)};return a.jsxs("div",{ref:o,onClick:D,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),className:$t.imageRevealSlider,style:{cursor:p==="none"?"default":"none"},children:[s.map(b=>a.jsx("div",{className:$t.wrapper,style:{top:`${b.y}px`,left:`${b.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:b.width??"auto",height:"auto",cursor:p==="none"?"default":"none"},children:L==="area"&&b.link?a.jsx("a",{href:b.link,target:"_blank",className:$t.link,children:a.jsx("img",{src:b.url,alt:b.name,className:$t.image},b.id)}):a.jsx("img",{src:b.url,alt:b.name,className:$t.image},b.id)},b.id)),v&&a.jsx("div",{className:$t.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${C})`,backgroundImage:`url('${p}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const es={element:Qa,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:""}]}}}},ts="LightBox-module__hidden___9s-9x",ns="LightBox-module__heroImage___sTxNF",rs="LightBox-module__background___rm9ml",os="LightBox-module__editor___4ACaY",is="LightBox-module__contentStyle___Bgnsq",as="LightBox-module__imageStyle___tLIlB",ss="LightBox-module__imgWrapper___LuFUp",ls="LightBox-module__contain___8-yaS",cs="LightBox-module__cover___hNvOG",us="LightBox-module__caption___b6L2I",ps="LightBox-module__captionTextInner___rCGNH",ds="LightBox-module__lightboxSplide___XFuWC",ms="LightBox-module__arrow___iz38X",gs="LightBox-module__arrowVertical___Zfz81",hs="LightBox-module__nextArrow___zkAQN",fs="LightBox-module__arrowInner___p48sW",ys="LightBox-module__arrowIcon___3VaFf",vs="LightBox-module__arrowImg___pNV88",bs="LightBox-module__mirror___pjeXc",xs="LightBox-module__thumbsWrapper___GB-nU",Ss="LightBox-module__thumbsContainerVertical___wttk5",Cs="LightBox-module__thumbsContainer___osSma",ws="LightBox-module__thumbsAlignStart___MO6tY",$s="LightBox-module__thumbsAlignCenter___Q4sUx",Ts="LightBox-module__thumbsAlignEnd___p4y9R",_s="LightBox-module__thumbItem___HvnF3",Ls="LightBox-module__closeButton___g2khP",Es="LightBox-module__fadeIn___0m5GW",Is="LightBox-module__slideInLeft___gPYwC",As="LightBox-module__slideInRight___S-pPp",ks="LightBox-module__slideInTop___DFdAj",Fs="LightBox-module__slideInBottom___m27kZ",Ws="LightBox-module__fadeOut___55qBR",Rs="LightBox-module__slideOutLeft___NvU7P",Ps="LightBox-module__slideOutRight___SK7eC",Ms="LightBox-module__slideOutTop___Vgg0z",Hs="LightBox-module__slideOutBottom___nJ0Ef",Ns="LightBox-module__scaleSlide___vZriG",U={hidden:ts,heroImage:ns,background:rs,editor:os,contentStyle:is,imageStyle:as,imgWrapper:ss,contain:ls,cover:cs,caption:us,captionTextInner:ps,lightboxSplide:ds,arrow:ms,arrowVertical:gs,nextArrow:hs,arrowInner:fs,arrowIcon:ys,arrowImg:vs,mirror:bs,thumbsWrapper:xs,thumbsContainerVertical:Ss,thumbsContainer:Cs,thumbsAlignStart:ws,thumbsAlignCenter:$s,thumbsAlignEnd:Ts,thumbItem:_s,closeButton:Ls,fadeIn:Es,slideInLeft:Is,slideInRight:As,slideInTop:ks,slideInBottom:Fs,fadeOut:Ws,slideOutLeft:Rs,slideOutRight:Ps,slideOutTop:Ms,slideOutBottom:Hs,scaleSlide:Ns},rn=(e,t,n)=>{const r={},[o,s]=e.split("-");return o==="top"?(r.top="0",r.bottom="auto"):o==="middle"?(r.top="50%",r.bottom="auto"):o==="bottom"&&(r.top="auto",r.bottom="0"),s==="left"?(r.left="0",r.right="auto"):s==="center"?(r.left="50%",r.right="auto"):s==="right"&&(r.left="auto",r.right="0"),o==="middle"&&s==="center"?r.transform=`translate(calc(-50% + ${S.scalingValue(t.x,n)}), calc(-50% + ${S.scalingValue(t.y,n)}))`:o==="middle"?r.transform=`translate(${S.scalingValue(t.x,n)}, calc(-50% + ${S.scalingValue(t.y,n)}))`:s==="center"?r.transform=`translate(calc(-50% + ${S.scalingValue(t.x,n)}), ${S.scalingValue(t.y,n)})`:r.transform=`translate(${S.scalingValue(t.x,n)}, ${S.scalingValue(t.y,n)})`,r};function Wo(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 Hr(e){const t=e.getBoundingClientRect(),n=Wo(e),r=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,i=e.naturalHeight,l=r/o,c=s/i;let d,u;c>l?(d=r,u=r/c):(u=o,d=o*c);const T=t.left+n.left,C=t.top+n.top,h=(r-d)/2+T,p=(o-u)/2+C;return{x:h,y:p,width:d,height:u}}function Nr(e){const t=e.getBoundingClientRect(),n=Wo(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Or(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(o=>parseFloat(o.trim()));return r.length===4?r[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Os(e,t){const n=(()=>{if(e==="fade in")return U.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return U.slideInLeft;case"right":return U.slideInRight;case"top":return U.slideInTop;case"bottom":return U.slideInBottom;default:return U.slideInRight}return U.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return U.fadeIn;if(e==="slide in")switch(t){case"left":return U.slideInLeft;case"right":return U.slideInRight;case"top":return U.slideInTop;case"bottom":return U.slideInBottom;default:return U.slideInRight}return U.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return U.fadeOut;if(e==="slide in")switch(t){case"left":return U.slideOutLeft;case"right":return U.slideOutRight;case"top":return U.slideOutTop;case"bottom":return U.slideOutBottom;default:return U.slideOutRight}return U.fadeOut})(),s=(()=>{if(e==="fade in")return U.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return U.slideOutLeft;case"right":return U.slideOutRight;case"top":return U.slideOutTop;case"bottom":return U.slideOutBottom;default:return U.slideOutRight}return U.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:o,disappearClass:s}}const js=({settings:e,content:t,styles:n,portalId:r,activeEvent:o,isEditor:s})=>{const[i,l]=m.useState(!1),{url:c}=e.thumbnailBlock.cover;return m.useEffect(()=>{o==="close"&&l(!1),o==="open"&&l(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:c,alt:"Cover",className:U.heroImage,onClick:()=>l(!0)}),a.jsx(zs,{isOpen:i,onClose:()=>l(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:s})]})},zs=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:o,portalId:s,isEditor:i,metadata:l})=>{var O;const[c,d]=m.useState(0),[u,T]=m.useState(0),[C,h]=m.useState(!1),[p,g]=m.useState(!1),[$,v]=m.useState({}),y=m.useRef(null),E=m.useRef(null),B=m.useRef(null),R=m.useRef(!1),_=m.useRef(null),f=m.useRef(null),x=m.useRef(null),L=m.useRef(null),j=m.useRef(!1),I=m.useRef(null),[P,H]=m.useState(!1),{appear:z,triggers:D,slider:b,thumbnail:k,controls:F,area:W,caption:A,layout:N}=o.lightboxBlock,{appearClass:Z,backdropAppearClass:le,backdropDisappearClass:ne,disappearClass:de}=Os(z.type,z.direction),M=(l==null?void 0:l.itemId)??null;m.useEffect(()=>{const w=()=>{setTimeout(()=>{var Y,J;(J=(Y=y.current)==null?void 0:Y.splide)==null||J.refresh()},16)},G=()=>{T(Y=>Y+1)};return window.addEventListener("ArticleEditor.Layout:change",w),window.addEventListener("ArticleEditor.ComponentContent:change",G),()=>{window.removeEventListener("ArticleEditor.Layout:change",w),window.removeEventListener("ArticleEditor.ComponentContent:change",G)}},[]),m.useEffect(()=>{if(!e||!k.isActive){H(!1);return}const w=I.current;if(!w)return;const G=()=>{b.direction==="horiz"?H(w.scrollWidth>w.clientWidth):H(w.scrollHeight>w.clientHeight)};G();const Y=new ResizeObserver(G);return Y.observe(w),()=>Y.disconnect()},[e,k.isActive,n.length,$,b.direction]);const te=m.useCallback(()=>{const w=window.matchMedia("(max-width: 768px)").matches,G=Or(W.color);w&&!i&&G>.9&&(document.body.style.backgroundColor=""),h(!0),R.current=!0;const Y=J=>{J.target===_.current&&J.animationName&&(_.current&&f.current&&_.current.removeEventListener("animationend",f.current),f.current=null,R.current&&(R.current=!1,t()),h(!1))};_.current&&(f.current=Y,_.current.addEventListener("animationend",Y))},[t,W.color,i]),fe=(w,G,Y)=>{var J,ae;if(w){if(D.type==="click"&&D.switch==="image")D.repeat==="close"&&c===n.length-1?te():(J=y.current)==null||J.go("+1");else if(D.type==="click"&&D.switch==="50/50"){const oe=w.getBoundingClientRect(),re=G-oe.left,ce=Y-oe.top,V=oe.width,X=oe.height;let K;b.direction==="horiz"?K=re<V/2?"-1":"+1":K=ce<X/2?"-1":"+1",(ae=y.current)==null||ae.go(K)}}},me=w=>{if(j.current){j.current=!1;return}const G=n[c],Y=(G==null?void 0:G.image.objectFit)==="cover";let J,ae;if("changedTouches"in w&&w.changedTouches.length>0)J=w.changedTouches[0].clientX,ae=w.changedTouches[0].clientY;else if("clientX"in w)J=w.clientX,ae=w.clientY;else return;let oe;if(Y&&B.current){const re=Nr(B.current);oe=J>=re.left&&J<=re.right&&ae>=re.top&&ae<=re.bottom}else{const re=B.current?Hr(B.current):null;if(!re){w.target===w.currentTarget&&te();return}oe=J>=re.x&&J<=re.x+re.width&&ae>=re.y&&ae<=re.y+re.height}oe?fe(B.current,J,ae):te()},ge=w=>{const G=w.target;(G.classList.contains(U.thumbsWrapper)||G.classList.contains(U.thumbsContainer))&&me(w)};m.useEffect(()=>{if(!e)return;const w=G=>{var Y,J;if(G.key==="Escape"){te();return}if(G.key==="ArrowRight"){d(ae=>(ae+1)%Math.max(n.length,1)),(Y=y.current)==null||Y.go("+1");return}G.key==="ArrowLeft"&&(d(ae=>(ae-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=y.current)==null||J.go("-1"))};return window.addEventListener("keydown",w),()=>{window.removeEventListener("keydown",w)}},[e,te,n.length]),m.useEffect(()=>{if(e){if(d(0),T(G=>G+1),R.current=!1,h(!1),g(!1),v({}),!M)return;const w=new CustomEvent("page-overlay",{detail:{itemId:M}});window.dispatchEvent(w)}return()=>{_.current&&f.current&&(_.current.removeEventListener("animationend",f.current),f.current=null),g(!1)}},[e,M]),m.useEffect(()=>{E.current!==null&&E.current!==b.type&&T(w=>w+1),E.current=b.type},[b.type]),m.useEffect(()=>{if(!e)return;const w=document.body.style.overflow,G=window.matchMedia("(max-width: 768px)").matches,Y=Or(W.color);document.body.style.overflow="hidden",g(!1);const J=oe=>{oe.target===_.current&&!R.current&&oe.animationName&&(G&&!i&&Y>.9&&(document.body.style.backgroundColor=W.color),g(!0),_.current&&x.current&&_.current.removeEventListener("animationend",x.current),x.current=null)};_.current&&(x.current=J,_.current.addEventListener("animationend",J));const ae=oe=>{const re=oe.target;re&&(re.closest(`.${U.thumbsWrapper}`)||re.closest(`.${U.thumbsContainer}`))||b.type!=="slide"&&oe.preventDefault()};return document.addEventListener("touchmove",ae,{passive:!1}),()=>{document.body.style.overflow=w,document.removeEventListener("touchmove",ae),_.current&&x.current&&(_.current.removeEventListener("animationend",x.current),x.current=null),g(!1)}},[e,i,W.color,b.type]),m.useEffect(()=>{if(!e)return;const w=G=>{var J,ae;if(R.current){G.stopPropagation();return}if(j.current){j.current=!1;return}const Y=G.target;if(!(Y&&(Y.closest(`.${U.thumbsContainer}`)||Y.closest(`.${U.thumbItem}`)||Y.closest(`.${U.arrow}`)||Y.closest(`.${U.closeButton}`)||Y.closest(`.${U.caption}`)))){if(b.type==="slide"&&D.type==="drag"&&((ae=(J=y.current)==null?void 0:J.splide)!=null&&ae.root)){const oe=y.current.splide.root;if(Y&&(oe.contains(Y)||oe===Y))return}if(G.touches.length===0&&G.changedTouches.length>0){const oe=n[c],re=(oe==null?void 0:oe.image.objectFit)==="cover",ce=G.changedTouches[0];let V;if(re&&B.current){const X=Nr(B.current);V=ce.clientX>=X.left&&ce.clientX<=X.right&&ce.clientY>=X.top&&ce.clientY<=X.bottom}else{const X=B.current?Hr(B.current):null;if(!X)return;V=ce.clientX>=X.x&&ce.clientX<=X.x+X.width&&ce.clientY>=X.y&&ce.clientY<=X.y+X.height}if(!V){G.stopPropagation(),R.current=!0;const X=K=>{K.stopPropagation(),K.preventDefault(),document.removeEventListener("click",X,!0)};document.addEventListener("click",X,!0),te()}}}};return document.addEventListener("touchend",w,{passive:!0}),()=>{document.removeEventListener("touchend",w)}},[e,te,c,n]);const q=(b.type==="scale"||b.type==="fade")&&b.direction==="vert"&&D.type==="drag";m.useEffect(()=>{var K,se;if(!e||!q||!((se=(K=y.current)==null?void 0:K.splide)!=null&&se.root))return;const w=y.current.splide.root,G=30,Y=(Q,ue)=>{if(L.current){const Se=Math.abs(Q-L.current.x),Te=Math.abs(ue-L.current.y);(Se>0||Te>0)&&(j.current=!0)}},J=Q=>{L.current&&(Q.preventDefault(),Y(Q.clientX,Q.clientY))},ae=Q=>{L.current&&Q.touches.length>0&&(Q.preventDefault(),Y(Q.touches[0].clientX,Q.touches[0].clientY))},oe=(Q,ue)=>{if(!L.current||!y.current){L.current=null;return}const Se=Math.abs(Q-L.current.x),Te=Math.abs(ue-L.current.y);Te>G&&Te>Se&&y.current.go(ue<L.current.y?"+1":"-1"),L.current=null},re=Q=>{L.current&&oe(Q.clientX,Q.clientY),document.removeEventListener("pointerup",re),document.removeEventListener("pointercancel",re),document.removeEventListener("pointermove",J)},ce=Q=>{if(L.current){if(Q.changedTouches.length>0){const ue=Q.changedTouches[0];oe(ue.clientX,ue.clientY)}document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),document.removeEventListener("touchmove",ae)}},V=Q=>{L.current={x:Q.clientX,y:Q.clientY},j.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",re),document.addEventListener("pointercancel",re)},X=Q=>{Q.touches.length>0&&(L.current={x:Q.touches[0].clientX,y:Q.touches[0].clientY},j.current=!1,document.addEventListener("touchmove",ae,{passive:!1}),document.addEventListener("touchend",ce),document.addEventListener("touchcancel",ce))};return w.addEventListener("pointerdown",V),w.addEventListener("touchstart",X),()=>{w.removeEventListener("pointerdown",V),w.removeEventListener("touchstart",X),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",re),document.removeEventListener("pointercancel",re),document.removeEventListener("touchmove",ae),document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),L.current=null,j.current=!1}},[e,q,u]);const ie={backgroundColor:W.color,backdropFilter:`blur(${W.blur}px)`,animationDuration:`${parseInt(z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Yr.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:i?null:_,className:ye(U.background,C?ne:le,{[U.editor]:i},{[U.hidden]:!e}),style:{...ie,...p&&!i&&!C?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?_:null,className:ye(U.contentStyle,C?de:Z,{[U.editor]:i},{[U.hidden]:!e}),style:{animationDuration:`${parseInt(z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(vr,{onMove:w=>d(w.index),ref:y,className:U.lightboxSplide,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,direction:b.direction==="horiz"||b.type==="fade"||b.type==="scale"?"ltr":"ttb",pagination:!1,drag:D.type==="drag"&&!q,perPage:1,width:"100%",height:"100%",type:b.type==="fade"||b.type==="scale"?"fade":"loop",padding:0,rewind:D.repeat!=="close",start:0},style:{"--splide-speed":b.duration},children:n.map((w,G)=>{const Y=rn(N.position,N.offset,i),J=`${S.scalingValue(N.padding.top,i)} ${S.scalingValue(N.padding.right,i)} ${S.scalingValue(N.padding.bottom,i)} ${S.scalingValue(N.padding.left,i)}`,ae=b.type==="scale"?(()=>{const{transform:oe,...re}=Y;return{...re,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":oe||"none"}})():{...Y,position:"absolute",padding:J,boxSizing:"border-box"};return a.jsx(br,{children:a.jsx("div",{className:U.imgWrapper,onClick:me,children:a.jsx("img",{ref:G===c?B:null,className:ye(U.imageStyle,{[U.contain]:w.image.objectFit==="contain",[U.cover]:w.image.objectFit==="cover",[U.scaleSlide]:b.type==="scale"}),src:w.image.url,alt:w.image.name??"",style:{...ae,pointerEvents:w.image.objectFit==="contain"?"none":"auto"}})})},G)})},u),F.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:ye(U.arrow,{[U.arrowVertical]:b.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:a.jsxs("button",{className:U.arrowInner,style:{transform:`translate(${S.scalingValue(F.offset.x,i)}, ${S.scalingValue(F.offset.y*(b.direction==="horiz"?1:-1),i)}) scale(${F.scale}) rotate(${b.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var w;return(w=y.current)==null?void 0:w.go("-1")},"aria-label":"Previous",children:[F.arrowsImgUrl&&a.jsx(pt,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:ye(U.arrowImg,U.mirror)}),!F.arrowsImgUrl&&a.jsx(jr,{color:F.color,className:ye(U.arrowIcon,U.arrowImg,U.mirror)})]})}),a.jsx("div",{className:ye(U.arrow,U.nextArrow,{[U.arrowVertical]:b.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:a.jsxs("button",{className:U.arrowInner,style:{transform:`translate(${S.scalingValue(F.offset.x*(b.direction==="horiz"?-1:1),i)}, ${S.scalingValue(F.offset.y,i)}) scale(${F.scale}) rotate(${b.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var w;return(w=y.current)==null?void 0:w.go("+1")},"aria-label":"Next",children:[F.arrowsImgUrl&&a.jsx(pt,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:U.arrowImg}),!F.arrowsImgUrl&&a.jsx(jr,{color:F.color,className:ye(U.arrowIcon,U.arrowImg)})]})})]}),W.closeIconUrl&&(()=>{const w=rn(W.closeIconAlign,W.closeIconOffset,i),G=`scale(${W.closeIconScale})`,Y=w.transform?`${w.transform} ${G}`:G;return a.jsx("button",{className:U.closeButton,style:{...w,transform:Y},onClick:te,"aria-label":"Close lightbox",children:a.jsx(pt,{url:W.closeIconUrl,fill:W.closeIconColor??"#000000",hoverFill:W.closeIconHover??"#cccccc"})})})(),A&&A.isActive&&r.imageCaption&&((O=n[c])==null?void 0:O.imageCaption)&&(()=>{const{widthSettings:w,fontSettings:G,letterSpacing:Y,textAlign:J,wordSpacing:ae,fontSizeLineHeight:oe,textAppearance:re,color:ce}=r.imageCaption;return a.jsx("div",{className:U.caption,style:{...rn(A.alignment,A.offset,i),fontFamily:An(G.fontFamily),fontWeight:G.fontWeight,fontStyle:G.fontStyle,width:w.sizing==="auto"?"max-content":S.scalingValue(w.width,i),letterSpacing:S.scalingValue(Y,i),wordSpacing:S.scalingValue(ae,i),textAlign:J,fontSize:S.scalingValue(oe.fontSize,i),lineHeight:S.scalingValue(oe.lineHeight,i),textTransform:re.textTransform??"none",textDecoration:re.textDecoration??"none",fontVariant:re.fontVariant??"normal",color:ce},onClick:V=>V.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:U.captionTextInner,style:{"--link-color":A.linkColor,"--link-hover-color":A.linkHoverColor},children:a.jsx(Ut,{content:n[c].imageCaption})})})})(),k.isActive&&(()=>{const[w,G]=k.position.split("-"),Y=b.direction==="horiz"?`${w}-left`:k.position,J=rn(Y,k.offset,i),ae=()=>{if(b.direction==="horiz"){if(G==="left")return"flex-start";if(G==="center")return"center";if(G==="right")return"flex-end"}else{if(w==="top")return"flex-start";if(w==="middle")return"center";if(w==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:I,className:U.thumbsWrapper,onClick:oe=>ge(oe),style:{position:i?"absolute":"fixed",...J,...b.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:ye(U.thumbsContainer,{[U.thumbsContainerVertical]:b.direction==="vert",[U.thumbsAlignStart]:k.align==="start",[U.thumbsAlignCenter]:k.align==="center",[U.thumbsAlignEnd]:k.align==="end"}),style:{gap:S.scalingValue(k.grid.gap,i),justifyContent:P?"flex-start":ae()},children:n.map((oe,re)=>{const ce=re===c,V=$[re],K=k.grid.size*(ce?k.activeState.scale:1),se=()=>{if(k.fit!=="fit")return{};if(!V)return b.direction==="horiz"?{height:S.scalingValue(K,i)}:{width:S.scalingValue(K,i)};const Q=V.width/V.height;if(b.direction==="horiz"){const ue=K,Se=ue*Q;return{width:S.scalingValue(Se,i),height:S.scalingValue(ue,i)}}else{const ue=K,Se=ue/Q;return{width:S.scalingValue(ue,i),height:S.scalingValue(Se,i)}}};return a.jsx("button",{className:U.thumbItem,style:{...b.direction==="horiz"&&k.fit!=="fit"?{height:S.scalingValue(K,i)}:{},...b.direction==="vert"&&k.fit!=="fit"?{width:S.scalingValue(K,i)}:{},...k.fit==="cover"?{width:S.scalingValue(K,i),height:S.scalingValue(K,i)}:{},...se(),transition:ce?"all 0.25s ease-out":"none",opacity:ce?k.activeState.opacity/100:k.opacity/100,"--thumb-hover":k.activeState.opacity/100},onClick:Q=>{var ue;Q.stopPropagation(),d(re),(ue=y.current)==null||ue.go(re)},onMouseEnter:()=>{var Q;k.triggers==="hov"&&((Q=y.current)==null||Q.go(re))},children:a.jsx("img",{src:oe.image.url,alt:oe.image.name??"",onLoad:Q=>{const ue=Q.currentTarget;ue.naturalWidth&&ue.naturalHeight&&v(Se=>({...Se,[re]:{width:ue.naturalWidth,height:ue.naturalHeight}}))},style:{objectFit:k.fit==="cover"?"cover":"contain",...k.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...k.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${oe.image.name}-${re}`)})})})})()]})]}),document.getElementById(s))};function jr({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Bs={element:js,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 on(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Vs(e){return`
|
|
6
|
+
*/const Ha="RichTextRenderer-module__link___BWeZ2",Na={link:Ha},Oa=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(r=>/^\d/.test(r))},An=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Oa(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function it(e){const{color:t,...n}=e;return n}function Be(e,t){var n,r,o;return{fontFamily:An(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:S.scalingValue(e.letterSpacing,t),wordSpacing:S.scalingValue(e.wordSpacing,t),fontSize:S.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?S.scalingValue(e.lineHeight,t):void 0,textTransform:(n=e.textAppearance)==null?void 0:n.textTransform,textDecoration:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(o=e.textAppearance)==null?void 0:o.fontVariant,color:e.color}}const Ut=({content:e})=>{const t=n=>n.map((r,o)=>r.type==="link"?a.jsx("a",{className:Na.link,href:r.value,target:r.target,children:t(r.children)},o):a.jsx("span",{style:ja(r),children:r.text},o));return a.jsx(a.Fragment,{children:e.map((n,r)=>{const o=n.children;return a.jsx("div",{children:t(o)},r)})})};function ja(e){return{...e.fontFamily&&{fontFamily:An(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 za="SvgImage-module__svg___q3xE-",Ba="SvgImage-module__img___VsTm-",Rr={svg:za,img:Ba},Va=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Da=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,pt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:o})=>{const[s,i]=m.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return m.useEffect(()=>{if(typeof window<"u"&&window.CSS){const l=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(l)}},[]),!Va(e)||!s?a.jsx("img",{src:e,alt:"",className:ye(Rr.img,r),style:o}):a.jsx("span",{"data-supports-mask":s,className:ye(Rr.svg,r),style:{"--svg":Da(e),"--fill":t,"--hover-fill":n,...o??{}}})},Ga={"top-left":ee.topLeftAlignment,"top-center":ee.topCenterAlignment,"top-right":ee.topRightAlignment,"middle-left":ee.middleLeftAlignment,"middle-center":ee.middleCenterAlignment,"middle-right":ee.middleRightAlignment,"bottom-left":ee.bottomLeftAlignment,"bottom-center":ee.bottomCenterAlignment,"bottom-right":ee.bottomRightAlignment};function Ua({settings:e,content:t,styles:n,isEditor:r}){const[o,s]=m.useState(null),{widthSettings:i,fontSettings:l,letterSpacing:c,textAlign:d,wordSpacing:u,fontSizeLineHeight:T,textAppearance:C,color:h}=n.imageCaption,[p,g]=m.useState(void 0),[$,v]=m.useState(null),[y,E]=m.useState(0),[B,R]=m.useState(0),{direction:_,transition:f,controls:x,pagination:L,imageCaption:j,triggers:I}=e,P=m.useRef(f.type),{x:H,y:z}=e.controls.offset,D=b=>{o&&o.go(b)};return m.useEffect(()=>{if(!$)return;const b=new ResizeObserver(k=>{if(!o)return;const[F]=k;g({width:Math.round(F.contentRect.width),height:Math.round(F.contentRect.height)})});return b.observe($),()=>b.unobserve($)},[$]),m.useEffect(()=>{!o||P.current===f.type||(R(b=>b+1),P.current=f.type)},[f.type]),a.jsx("div",{className:ye(ee.wrapper,{[ee.editor]:r}),ref:v,children:a.jsxs("div",{className:ee.sliderInner,style:{width:p?p.width:"100%",height:p?p.height:"100%",backgroundColor:f.backgroundColor&&f.type==="fade in"?f.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:ye(ee.captionBlock),children:a.jsx("div",{className:ee.captionTextWrapper,children:t.map((b,k)=>a.jsx("div",{className:ye(ee.captionText,Ga[j.alignment],{[ee.withPointerEvents]:k===y&&r,[ee.active]:k===y}),style:{fontFamily:An(l.fontFamily),fontWeight:l.fontWeight,fontStyle:l.fontStyle,width:i.sizing==="auto"?"max-content":S.scalingValue(i.width,r),letterSpacing:S.scalingValue(c,r),wordSpacing:S.scalingValue(u,r),textAlign:d,fontSize:S.scalingValue(T.fontSize,r),lineHeight:S.scalingValue(T.lineHeight,r),textTransform:C.textTransform??"none",textDecoration:C.textDecoration??"none",fontVariant:C.fontVariant??"normal",color:h,transitionDuration:f.duration?`${Math.round(parseInt(f.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:ee.captionTextInner,style:{"--link-hover-color":j.linkHoverColor,"--link-color":j.linkColor,position:"relative",top:S.scalingValue(j.offset.y,r),left:S.scalingValue(j.offset.x,r)},children:a.jsx(Ut,{content:b.imageCaption})})},k))})}),a.jsx(yr,{onMove:b=>{E(b.index)},ref:s,options:{arrows:!1,speed:f.duration?parseInt(f.duration):500,autoplay:I.autoPlay!==null,...I.autoPlay!==null&&{interval:parseInt(I.autoPlay)*1e3},direction:_==="horiz"||f.type==="fade in"?"ltr":"ttb",pagination:!1,drag:I.triggersList.drag,perPage:1,width:p?p.width:"100%",height:p?p.height:"100%",type:f.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((b,k)=>a.jsx(vr,{children:a.jsx("div",{className:ee.sliderItem,children:a.jsx("div",{className:ee.imgWrapper,children:a.jsx("img",{className:ye(ee.sliderImage,{[ee.contain]:b.image.objectFit==="contain",[ee.cover]:b.image.objectFit==="cover"}),src:b.image.url,alt:b.image.name??""})})})},k))},B),x.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:ye(ee.arrow,{[ee.arrowVertical]:_==="vert",[ee.hoverArrow]:x.show==="on hover"}),style:{color:x.color,"--arrow-hover-color":x.hover},children:a.jsxs("button",{onClick:()=>{D("-1")},className:ee.arrowInner,style:{transform:`translate(${S.scalingValue(H,r)}, ${S.scalingValue(z*(_==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:[x.arrowsImgUrl&&a.jsx(pt,{url:x.arrowsImgUrl,fill:x.color,hoverFill:x.hover,className:ye(ee.arrowImg,ee.mirror)}),!x.arrowsImgUrl&&a.jsx(Pr,{color:x.color,className:ye(ee.arrowIcon,ee.arrowImg,ee.mirror)})]})}),a.jsx("div",{className:ye(ee.arrow,ee.nextArrow,{[ee.arrowVertical]:_==="vert",[ee.hoverArrow]:x.show==="on hover"}),style:{color:x.color,"--arrow-hover-color":x.hover},children:a.jsxs("button",{className:ee.arrowInner,onClick:()=>D("+1"),style:{transform:`translate(${S.scalingValue(H*(_==="horiz"?-1:1),r)}, ${S.scalingValue(z,r)}) scale(${e.controls.scale/100}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:[x.arrowsImgUrl&&a.jsx(pt,{url:x.arrowsImgUrl,fill:x.color,hoverFill:x.hover,className:ee.arrowImg}),!x.arrowsImgUrl&&a.jsx(Pr,{color:x.color,className:ye(ee.arrowIcon,ee.arrowImg)})]})})]}),I.triggersList.click&&a.jsx("div",{className:ee.clickOverlay,onClick:()=>{o&&o.go("+1")}}),L.isActive&&a.jsx("div",{className:ye(ee.pagination,{[ee.paginationInsideBottom]:L.position==="inside-1"&&_==="horiz",[ee.paginationInsideTop]:L.position==="inside-2"&&_==="horiz",[ee.paginationOutsideBottom]:L.position==="outside-1"&&_==="horiz",[ee.paginationOutsideTop]:L.position==="outside-2"&&_==="horiz",[ee.paginationInsideLeft]:L.position==="inside-1"&&_==="vert",[ee.paginationInsideRight]:L.position==="inside-2"&&_==="vert",[ee.paginationOutsideLeft]:L.position==="outside-1"&&_==="vert",[ee.paginationOutsideRight]:L.position==="outside-2"&&_==="vert",[ee.paginationVertical]:_==="vert"}),children:a.jsx("div",{className:ee.paginationInner,style:{backgroundColor:L.colors[2],transform:`scale(${L.scale/100}) translate(${S.scalingValue(L.offset.x,r)}, ${S.scalingValue(L.offset.y,r)}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:t.map((b,k)=>a.jsx("button",{onClick:()=>{o&&o.go(k)},className:ye(ee.paginationItem),children:a.jsx("div",{className:ye(ee.dot,{[ee.activeDot]:k===y}),style:{backgroundColor:k===y?L.colors[0]:L.colors[1],"--pagination-hover-color":L.hover}})},k))})})]})})}function Pr({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const qa={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:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},Ka="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Ya="ImageRevealSlider-module__image___Qjt-e",Xa="ImageRevealSlider-module__link___N-iLG",Za="ImageRevealSlider-module__cursor___2U03d",$t={imageRevealSlider:Ka,image:Ya,link:Xa,cursor:Za};function Mr(e,t,n){for(const r of n){const o=new Image;o.src=r.url;const s=r.width?Number.parseFloat(r.width):o.naturalWidth,i=o.naturalHeight/o.naturalWidth*s,l=s/2,c=i/2;if(e>=r.x-l&&e<=r.x+l&&t>=r.y-c&&t<=r.y+c)return!0}return!1}function On(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ja(e,t,n,r){let o,s;if(t==="custom"){o=n;const i=await On(e);s=i.height/i.width*o}else if(t==="random"){o=Math.random()*(r.max-r.min)+r.min;const i=await On(e);s=i.height/i.width*o}else{const i=await On(e);o=i.width,s=i.height}return{width:o,height:s,finalWidth:`${o}px`}}function Qa({settings:e,content:t,isEditor:n}){const[r,o]=m.useState(null),[s,i]=m.useState([]),[l,c]=m.useState(0),d=m.useRef(0),[u,T]=m.useState({x:0,y:0}),[C,h]=m.useState(1),[p,g]=m.useState("none"),$=m.useRef({x:0,y:0}),[v,y]=m.useState(!1),{sizeType:E,imageWidth:B,randomRangeImageWidth:R}=e.imageSize,{revealPosition:_,visible:f}=e.position,{cursorType:x,target:L,defaultCursorScale:j,defaultCursor:I,hoverCursorScale:P,hoverCursor:H}=e.cursor;m.useEffect(()=>{if(!r)return;const b=(W,A)=>{const N=r.getBoundingClientRect(),Z=W-N.left,le=A-N.top;if(T({x:Z,y:le}),x==="system"){g("none"),h(1);return}const ne=Z,de=le,M=document.elementFromPoint(N.left+ne,N.top+de);if(M&&M.closest("a")){g("none"),h(1);return}const te=Mr(ne,de,s)||L==="area"?{img:H??"none",scale:P}:{img:I??"none",scale:j};g(te.img),h(te.scale)},k=W=>{W.stopPropagation(),$.current={x:W.clientX,y:W.clientY},b(W.clientX,W.clientY)},F=()=>{v&&b($.current.x,$.current.y)};return r.addEventListener("mousemove",k),window.addEventListener("scroll",F,!0),()=>{r.removeEventListener("mousemove",k),window.removeEventListener("scroll",F,!0)}},[r,v,u,x,L,H,I,P,j,s]),m.useEffect(()=>{v||(g("none"),h(0))},[v]);const z=async(b,k,F,W={})=>{const{width:A,height:N,finalWidth:Z}=await Ja(b.image.url,E,B,R);let le=0,ne=0;_==="same"?(le=k/2,ne=F/2):(le=W.x??Math.random()*k,ne=W.y??Math.random()*F);const de=Math.min(Math.max(le,A/2),k-A/2),M=Math.min(Math.max(ne,N/2),F-N/2);return{id:d.current++,url:b.image.url,link:b.link,name:b.image.name,x:de,y:M,width:Z}};m.useEffect(()=>{if(!r||t.length===0)return;const b=r.getBoundingClientRect(),k=b.width,F=b.height,W=[];(async()=>{const N=t[0],Z=await z(N,k,F);W.push(Z),i(W),c(1)})()},[E,B,R,_,r]),m.useEffect(()=>{f==="last One"&&i(b=>b.length>0?[b[b.length-1]]:[])},[f]);const D=async b=>{if(!r)return;const k=r.getBoundingClientRect(),F=b.clientX-k.left,W=b.clientY-k.top;if(L==="image"&&!Mr(F,W,s))return;let A=0,N=0;_==="on Click"?(A=F,N=W):_==="same"?(A=k.width/2,N=k.height/2):(A=Math.random()*k.width,N=Math.random()*k.height);const Z=t[l],le=await z(Z,k.width,k.height,{x:A,y:N});i(ne=>f==="all"?[...ne,le]:[le]),c(ne=>ne>=t.length-1?0:ne+1)};return a.jsxs("div",{ref:o,onClick:D,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),className:$t.imageRevealSlider,style:{cursor:p==="none"?"default":"none"},children:[s.map(b=>a.jsx("div",{className:$t.wrapper,style:{top:`${b.y}px`,left:`${b.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:b.width??"auto",height:"auto",cursor:p==="none"?"default":"none"},children:L==="area"&&b.link?a.jsx("a",{href:b.link,target:"_blank",className:$t.link,children:a.jsx("img",{src:b.url,alt:b.name,className:$t.image},b.id)}):a.jsx("img",{src:b.url,alt:b.name,className:$t.image},b.id)},b.id)),v&&a.jsx("div",{className:$t.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${C})`,backgroundImage:`url('${p}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const es={element:Qa,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:""}]}}}},ts="LightBox-module__hidden___9s-9x",ns="LightBox-module__heroImage___sTxNF",rs="LightBox-module__background___rm9ml",os="LightBox-module__editor___4ACaY",is="LightBox-module__contentStyle___Bgnsq",as="LightBox-module__imageStyle___tLIlB",ss="LightBox-module__imgWrapper___LuFUp",ls="LightBox-module__contain___8-yaS",cs="LightBox-module__cover___hNvOG",us="LightBox-module__caption___b6L2I",ps="LightBox-module__captionTextInner___rCGNH",ds="LightBox-module__lightboxSplide___XFuWC",ms="LightBox-module__arrow___iz38X",gs="LightBox-module__arrowVertical___Zfz81",hs="LightBox-module__nextArrow___zkAQN",fs="LightBox-module__arrowInner___p48sW",ys="LightBox-module__arrowIcon___3VaFf",vs="LightBox-module__arrowImg___pNV88",bs="LightBox-module__mirror___pjeXc",xs="LightBox-module__thumbsWrapper___GB-nU",Ss="LightBox-module__thumbsContainerVertical___wttk5",Cs="LightBox-module__thumbsContainer___osSma",ws="LightBox-module__thumbsAlignStart___MO6tY",$s="LightBox-module__thumbsAlignCenter___Q4sUx",Ts="LightBox-module__thumbsAlignEnd___p4y9R",_s="LightBox-module__thumbItem___HvnF3",Ls="LightBox-module__closeButton___g2khP",Es="LightBox-module__fadeIn___0m5GW",Is="LightBox-module__slideInLeft___gPYwC",As="LightBox-module__slideInRight___S-pPp",ks="LightBox-module__slideInTop___DFdAj",Fs="LightBox-module__slideInBottom___m27kZ",Ws="LightBox-module__fadeOut___55qBR",Rs="LightBox-module__slideOutLeft___NvU7P",Ps="LightBox-module__slideOutRight___SK7eC",Ms="LightBox-module__slideOutTop___Vgg0z",Hs="LightBox-module__slideOutBottom___nJ0Ef",Ns="LightBox-module__scaleSlide___vZriG",U={hidden:ts,heroImage:ns,background:rs,editor:os,contentStyle:is,imageStyle:as,imgWrapper:ss,contain:ls,cover:cs,caption:us,captionTextInner:ps,lightboxSplide:ds,arrow:ms,arrowVertical:gs,nextArrow:hs,arrowInner:fs,arrowIcon:ys,arrowImg:vs,mirror:bs,thumbsWrapper:xs,thumbsContainerVertical:Ss,thumbsContainer:Cs,thumbsAlignStart:ws,thumbsAlignCenter:$s,thumbsAlignEnd:Ts,thumbItem:_s,closeButton:Ls,fadeIn:Es,slideInLeft:Is,slideInRight:As,slideInTop:ks,slideInBottom:Fs,fadeOut:Ws,slideOutLeft:Rs,slideOutRight:Ps,slideOutTop:Ms,slideOutBottom:Hs,scaleSlide:Ns},rn=(e,t,n)=>{const r={},[o,s]=e.split("-");return o==="top"?(r.top="0",r.bottom="auto"):o==="middle"?(r.top="50%",r.bottom="auto"):o==="bottom"&&(r.top="auto",r.bottom="0"),s==="left"?(r.left="0",r.right="auto"):s==="center"?(r.left="50%",r.right="auto"):s==="right"&&(r.left="auto",r.right="0"),o==="middle"&&s==="center"?r.transform=`translate(calc(-50% + ${S.scalingValue(t.x,n)}), calc(-50% + ${S.scalingValue(t.y,n)}))`:o==="middle"?r.transform=`translate(${S.scalingValue(t.x,n)}, calc(-50% + ${S.scalingValue(t.y,n)}))`:s==="center"?r.transform=`translate(calc(-50% + ${S.scalingValue(t.x,n)}), ${S.scalingValue(t.y,n)})`:r.transform=`translate(${S.scalingValue(t.x,n)}, ${S.scalingValue(t.y,n)})`,r};function Wo(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 Hr(e){const t=e.getBoundingClientRect(),n=Wo(e),r=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,i=e.naturalHeight,l=r/o,c=s/i;let d,u;c>l?(d=r,u=r/c):(u=o,d=o*c);const T=t.left+n.left,C=t.top+n.top,h=(r-d)/2+T,p=(o-u)/2+C;return{x:h,y:p,width:d,height:u}}function Nr(e){const t=e.getBoundingClientRect(),n=Wo(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Or(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(o=>parseFloat(o.trim()));return r.length===4?r[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Os(e,t){const n=(()=>{if(e==="fade in")return U.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return U.slideInLeft;case"right":return U.slideInRight;case"top":return U.slideInTop;case"bottom":return U.slideInBottom;default:return U.slideInRight}return U.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return U.fadeIn;if(e==="slide in")switch(t){case"left":return U.slideInLeft;case"right":return U.slideInRight;case"top":return U.slideInTop;case"bottom":return U.slideInBottom;default:return U.slideInRight}return U.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return U.fadeOut;if(e==="slide in")switch(t){case"left":return U.slideOutLeft;case"right":return U.slideOutRight;case"top":return U.slideOutTop;case"bottom":return U.slideOutBottom;default:return U.slideOutRight}return U.fadeOut})(),s=(()=>{if(e==="fade in")return U.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return U.slideOutLeft;case"right":return U.slideOutRight;case"top":return U.slideOutTop;case"bottom":return U.slideOutBottom;default:return U.slideOutRight}return U.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:o,disappearClass:s}}const js=({settings:e,content:t,styles:n,portalId:r,activeEvent:o,isEditor:s})=>{const[i,l]=m.useState(!1),{url:c}=e.thumbnailBlock.cover;return m.useEffect(()=>{o==="close"&&l(!1),o==="open"&&l(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:c,alt:"Cover",className:U.heroImage,onClick:()=>l(!0)}),a.jsx(zs,{isOpen:i,onClose:()=>l(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:s})]})},zs=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:o,portalId:s,isEditor:i,metadata:l})=>{var O;const[c,d]=m.useState(0),[u,T]=m.useState(0),[C,h]=m.useState(!1),[p,g]=m.useState(!1),[$,v]=m.useState({}),y=m.useRef(null),E=m.useRef(null),B=m.useRef(null),R=m.useRef(!1),_=m.useRef(null),f=m.useRef(null),x=m.useRef(null),L=m.useRef(null),j=m.useRef(!1),I=m.useRef(null),[P,H]=m.useState(!1),{appear:z,triggers:D,slider:b,thumbnail:k,controls:F,area:W,caption:A,layout:N}=o.lightboxBlock,{appearClass:Z,backdropAppearClass:le,backdropDisappearClass:ne,disappearClass:de}=Os(z.type,z.direction),M=(l==null?void 0:l.itemId)??null;m.useEffect(()=>{const w=()=>{setTimeout(()=>{var Y,J;(J=(Y=y.current)==null?void 0:Y.splide)==null||J.refresh()},16)},G=()=>{T(Y=>Y+1)};return window.addEventListener("ArticleEditor.Layout:change",w),window.addEventListener("ArticleEditor.ComponentContent:change",G),()=>{window.removeEventListener("ArticleEditor.Layout:change",w),window.removeEventListener("ArticleEditor.ComponentContent:change",G)}},[]),m.useEffect(()=>{if(!e||!k.isActive){H(!1);return}const w=I.current;if(!w)return;const G=()=>{b.direction==="horiz"?H(w.scrollWidth>w.clientWidth):H(w.scrollHeight>w.clientHeight)};G();const Y=new ResizeObserver(G);return Y.observe(w),()=>Y.disconnect()},[e,k.isActive,n.length,$,b.direction]);const te=m.useCallback(()=>{const w=window.matchMedia("(max-width: 768px)").matches,G=Or(W.color);w&&!i&&G>.9&&(document.body.style.backgroundColor=""),h(!0),R.current=!0;const Y=J=>{J.target===_.current&&J.animationName&&(_.current&&f.current&&_.current.removeEventListener("animationend",f.current),f.current=null,R.current&&(R.current=!1,t()),h(!1))};_.current&&(f.current=Y,_.current.addEventListener("animationend",Y))},[t,W.color,i]),fe=(w,G,Y)=>{var J,ae;if(w){if(D.type==="click"&&D.switch==="image")D.repeat==="close"&&c===n.length-1?te():(J=y.current)==null||J.go("+1");else if(D.type==="click"&&D.switch==="50/50"){const oe=w.getBoundingClientRect(),re=G-oe.left,ce=Y-oe.top,V=oe.width,X=oe.height;let K;b.direction==="horiz"?K=re<V/2?"-1":"+1":K=ce<X/2?"-1":"+1",(ae=y.current)==null||ae.go(K)}}},me=w=>{if(j.current){j.current=!1;return}const G=n[c],Y=(G==null?void 0:G.image.objectFit)==="cover";let J,ae;if("changedTouches"in w&&w.changedTouches.length>0)J=w.changedTouches[0].clientX,ae=w.changedTouches[0].clientY;else if("clientX"in w)J=w.clientX,ae=w.clientY;else return;let oe;if(Y&&B.current){const re=Nr(B.current);oe=J>=re.left&&J<=re.right&&ae>=re.top&&ae<=re.bottom}else{const re=B.current?Hr(B.current):null;if(!re){w.target===w.currentTarget&&te();return}oe=J>=re.x&&J<=re.x+re.width&&ae>=re.y&&ae<=re.y+re.height}oe?fe(B.current,J,ae):te()},ge=w=>{const G=w.target;(G.classList.contains(U.thumbsWrapper)||G.classList.contains(U.thumbsContainer))&&me(w)};m.useEffect(()=>{if(!e)return;const w=G=>{var Y,J;if(G.key==="Escape"){te();return}if(G.key==="ArrowRight"){d(ae=>(ae+1)%Math.max(n.length,1)),(Y=y.current)==null||Y.go("+1");return}G.key==="ArrowLeft"&&(d(ae=>(ae-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=y.current)==null||J.go("-1"))};return window.addEventListener("keydown",w),()=>{window.removeEventListener("keydown",w)}},[e,te,n.length]),m.useEffect(()=>{if(e){if(d(0),T(G=>G+1),R.current=!1,h(!1),g(!1),v({}),!M)return;const w=new CustomEvent("page-overlay",{detail:{itemId:M}});window.dispatchEvent(w)}return()=>{_.current&&f.current&&(_.current.removeEventListener("animationend",f.current),f.current=null),g(!1)}},[e,M]),m.useEffect(()=>{E.current!==null&&E.current!==b.type&&T(w=>w+1),E.current=b.type},[b.type]),m.useEffect(()=>{if(!e)return;const w=document.body.style.overflow,G=window.matchMedia("(max-width: 768px)").matches,Y=Or(W.color);document.body.style.overflow="hidden",g(!1);const J=oe=>{oe.target===_.current&&!R.current&&oe.animationName&&(G&&!i&&Y>.9&&(document.body.style.backgroundColor=W.color),g(!0),_.current&&x.current&&_.current.removeEventListener("animationend",x.current),x.current=null)};_.current&&(x.current=J,_.current.addEventListener("animationend",J));const ae=oe=>{const re=oe.target;re&&(re.closest(`.${U.thumbsWrapper}`)||re.closest(`.${U.thumbsContainer}`))||b.type!=="slide"&&oe.preventDefault()};return document.addEventListener("touchmove",ae,{passive:!1}),()=>{document.body.style.overflow=w,document.removeEventListener("touchmove",ae),_.current&&x.current&&(_.current.removeEventListener("animationend",x.current),x.current=null),g(!1)}},[e,i,W.color,b.type]),m.useEffect(()=>{if(!e)return;const w=G=>{var J,ae;if(R.current){G.stopPropagation();return}if(j.current){j.current=!1;return}const Y=G.target;if(!(Y&&(Y.closest(`.${U.thumbsContainer}`)||Y.closest(`.${U.thumbItem}`)||Y.closest(`.${U.arrow}`)||Y.closest(`.${U.closeButton}`)||Y.closest(`.${U.caption}`)))){if(b.type==="slide"&&D.type==="drag"&&((ae=(J=y.current)==null?void 0:J.splide)!=null&&ae.root)){const oe=y.current.splide.root;if(Y&&(oe.contains(Y)||oe===Y))return}if(G.touches.length===0&&G.changedTouches.length>0){const oe=n[c],re=(oe==null?void 0:oe.image.objectFit)==="cover",ce=G.changedTouches[0];let V;if(re&&B.current){const X=Nr(B.current);V=ce.clientX>=X.left&&ce.clientX<=X.right&&ce.clientY>=X.top&&ce.clientY<=X.bottom}else{const X=B.current?Hr(B.current):null;if(!X)return;V=ce.clientX>=X.x&&ce.clientX<=X.x+X.width&&ce.clientY>=X.y&&ce.clientY<=X.y+X.height}if(!V){G.stopPropagation(),R.current=!0;const X=K=>{K.stopPropagation(),K.preventDefault(),document.removeEventListener("click",X,!0)};document.addEventListener("click",X,!0),te()}}}};return document.addEventListener("touchend",w,{passive:!0}),()=>{document.removeEventListener("touchend",w)}},[e,te,c,n]);const q=(b.type==="scale"||b.type==="fade")&&b.direction==="vert"&&D.type==="drag";m.useEffect(()=>{var K,se;if(!e||!q||!((se=(K=y.current)==null?void 0:K.splide)!=null&&se.root))return;const w=y.current.splide.root,G=30,Y=(Q,ue)=>{if(L.current){const Se=Math.abs(Q-L.current.x),Te=Math.abs(ue-L.current.y);(Se>0||Te>0)&&(j.current=!0)}},J=Q=>{L.current&&(Q.preventDefault(),Y(Q.clientX,Q.clientY))},ae=Q=>{L.current&&Q.touches.length>0&&(Q.preventDefault(),Y(Q.touches[0].clientX,Q.touches[0].clientY))},oe=(Q,ue)=>{if(!L.current||!y.current){L.current=null;return}const Se=Math.abs(Q-L.current.x),Te=Math.abs(ue-L.current.y);Te>G&&Te>Se&&y.current.go(ue<L.current.y?"+1":"-1"),L.current=null},re=Q=>{L.current&&oe(Q.clientX,Q.clientY),document.removeEventListener("pointerup",re),document.removeEventListener("pointercancel",re),document.removeEventListener("pointermove",J)},ce=Q=>{if(L.current){if(Q.changedTouches.length>0){const ue=Q.changedTouches[0];oe(ue.clientX,ue.clientY)}document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),document.removeEventListener("touchmove",ae)}},V=Q=>{L.current={x:Q.clientX,y:Q.clientY},j.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",re),document.addEventListener("pointercancel",re)},X=Q=>{Q.touches.length>0&&(L.current={x:Q.touches[0].clientX,y:Q.touches[0].clientY},j.current=!1,document.addEventListener("touchmove",ae,{passive:!1}),document.addEventListener("touchend",ce),document.addEventListener("touchcancel",ce))};return w.addEventListener("pointerdown",V),w.addEventListener("touchstart",X),()=>{w.removeEventListener("pointerdown",V),w.removeEventListener("touchstart",X),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",re),document.removeEventListener("pointercancel",re),document.removeEventListener("touchmove",ae),document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),L.current=null,j.current=!1}},[e,q,u]);const ie={backgroundColor:W.color,backdropFilter:`blur(${W.blur}px)`,animationDuration:`${parseInt(z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Yr.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:i?null:_,className:ye(U.background,C?ne:le,{[U.editor]:i},{[U.hidden]:!e}),style:{...ie,...p&&!i&&!C?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?_:null,className:ye(U.contentStyle,C?de:Z,{[U.editor]:i},{[U.hidden]:!e}),style:{animationDuration:`${parseInt(z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(yr,{onMove:w=>d(w.index),ref:y,className:U.lightboxSplide,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,direction:b.direction==="horiz"||b.type==="fade"||b.type==="scale"?"ltr":"ttb",pagination:!1,drag:D.type==="drag"&&!q,perPage:1,width:"100%",height:"100%",type:b.type==="fade"||b.type==="scale"?"fade":"loop",padding:0,rewind:D.repeat!=="close",start:0},style:{"--splide-speed":b.duration},children:n.map((w,G)=>{const Y=rn(N.position,N.offset,i),J=`${S.scalingValue(N.padding.top,i)} ${S.scalingValue(N.padding.right,i)} ${S.scalingValue(N.padding.bottom,i)} ${S.scalingValue(N.padding.left,i)}`,ae=b.type==="scale"?(()=>{const{transform:oe,...re}=Y;return{...re,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":oe||"none"}})():{...Y,position:"absolute",padding:J,boxSizing:"border-box"};return a.jsx(vr,{children:a.jsx("div",{className:U.imgWrapper,onClick:me,children:a.jsx("img",{ref:G===c?B:null,className:ye(U.imageStyle,{[U.contain]:w.image.objectFit==="contain",[U.cover]:w.image.objectFit==="cover",[U.scaleSlide]:b.type==="scale"}),src:w.image.url,alt:w.image.name??"",style:{...ae,pointerEvents:w.image.objectFit==="contain"?"none":"auto"}})})},G)})},u),F.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:ye(U.arrow,{[U.arrowVertical]:b.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:a.jsxs("button",{className:U.arrowInner,style:{transform:`translate(${S.scalingValue(F.offset.x,i)}, ${S.scalingValue(F.offset.y*(b.direction==="horiz"?1:-1),i)}) scale(${F.scale}) rotate(${b.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var w;return(w=y.current)==null?void 0:w.go("-1")},"aria-label":"Previous",children:[F.arrowsImgUrl&&a.jsx(pt,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:ye(U.arrowImg,U.mirror)}),!F.arrowsImgUrl&&a.jsx(jr,{color:F.color,className:ye(U.arrowIcon,U.arrowImg,U.mirror)})]})}),a.jsx("div",{className:ye(U.arrow,U.nextArrow,{[U.arrowVertical]:b.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:a.jsxs("button",{className:U.arrowInner,style:{transform:`translate(${S.scalingValue(F.offset.x*(b.direction==="horiz"?-1:1),i)}, ${S.scalingValue(F.offset.y,i)}) scale(${F.scale}) rotate(${b.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var w;return(w=y.current)==null?void 0:w.go("+1")},"aria-label":"Next",children:[F.arrowsImgUrl&&a.jsx(pt,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:U.arrowImg}),!F.arrowsImgUrl&&a.jsx(jr,{color:F.color,className:ye(U.arrowIcon,U.arrowImg)})]})})]}),W.closeIconUrl&&(()=>{const w=rn(W.closeIconAlign,W.closeIconOffset,i),G=`scale(${W.closeIconScale})`,Y=w.transform?`${w.transform} ${G}`:G;return a.jsx("button",{className:U.closeButton,style:{...w,transform:Y},onClick:te,"aria-label":"Close lightbox",children:a.jsx(pt,{url:W.closeIconUrl,fill:W.closeIconColor??"#000000",hoverFill:W.closeIconHover??"#cccccc"})})})(),A&&A.isActive&&r.imageCaption&&((O=n[c])==null?void 0:O.imageCaption)&&(()=>{const{widthSettings:w,fontSettings:G,letterSpacing:Y,textAlign:J,wordSpacing:ae,fontSizeLineHeight:oe,textAppearance:re,color:ce}=r.imageCaption;return a.jsx("div",{className:U.caption,style:{...rn(A.alignment,A.offset,i),fontFamily:An(G.fontFamily),fontWeight:G.fontWeight,fontStyle:G.fontStyle,width:w.sizing==="auto"?"max-content":S.scalingValue(w.width,i),letterSpacing:S.scalingValue(Y,i),wordSpacing:S.scalingValue(ae,i),textAlign:J,fontSize:S.scalingValue(oe.fontSize,i),lineHeight:S.scalingValue(oe.lineHeight,i),textTransform:re.textTransform??"none",textDecoration:re.textDecoration??"none",fontVariant:re.fontVariant??"normal",color:ce},onClick:V=>V.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:U.captionTextInner,style:{"--link-color":A.linkColor,"--link-hover-color":A.linkHoverColor},children:a.jsx(Ut,{content:n[c].imageCaption})})})})(),k.isActive&&(()=>{const[w,G]=k.position.split("-"),Y=b.direction==="horiz"?`${w}-left`:k.position,J=rn(Y,k.offset,i),ae=()=>{if(b.direction==="horiz"){if(G==="left")return"flex-start";if(G==="center")return"center";if(G==="right")return"flex-end"}else{if(w==="top")return"flex-start";if(w==="middle")return"center";if(w==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:I,className:U.thumbsWrapper,onClick:oe=>ge(oe),style:{position:i?"absolute":"fixed",...J,...b.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:ye(U.thumbsContainer,{[U.thumbsContainerVertical]:b.direction==="vert",[U.thumbsAlignStart]:k.align==="start",[U.thumbsAlignCenter]:k.align==="center",[U.thumbsAlignEnd]:k.align==="end"}),style:{gap:S.scalingValue(k.grid.gap,i),justifyContent:P?"flex-start":ae()},children:n.map((oe,re)=>{const ce=re===c,V=$[re],K=k.grid.size*(ce?k.activeState.scale:1),se=()=>{if(k.fit!=="fit")return{};if(!V)return b.direction==="horiz"?{height:S.scalingValue(K,i)}:{width:S.scalingValue(K,i)};const Q=V.width/V.height;if(b.direction==="horiz"){const ue=K,Se=ue*Q;return{width:S.scalingValue(Se,i),height:S.scalingValue(ue,i)}}else{const ue=K,Se=ue/Q;return{width:S.scalingValue(ue,i),height:S.scalingValue(Se,i)}}};return a.jsx("button",{className:U.thumbItem,style:{...b.direction==="horiz"&&k.fit!=="fit"?{height:S.scalingValue(K,i)}:{},...b.direction==="vert"&&k.fit!=="fit"?{width:S.scalingValue(K,i)}:{},...k.fit==="cover"?{width:S.scalingValue(K,i),height:S.scalingValue(K,i)}:{},...se(),transition:ce?"all 0.25s ease-out":"none",opacity:ce?k.activeState.opacity/100:k.opacity/100,"--thumb-hover":k.activeState.opacity/100},onClick:Q=>{var ue;Q.stopPropagation(),d(re),(ue=y.current)==null||ue.go(re)},onMouseEnter:()=>{var Q;k.triggers==="hov"&&((Q=y.current)==null||Q.go(re))},children:a.jsx("img",{src:oe.image.url,alt:oe.image.name??"",onLoad:Q=>{const ue=Q.currentTarget;ue.naturalWidth&&ue.naturalHeight&&v(Se=>({...Se,[re]:{width:ue.naturalWidth,height:ue.naturalHeight}}))},style:{objectFit:k.fit==="cover"?"cover":"contain",...k.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...k.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${oe.image.name}-${re}`)})})})})()]})]}),document.getElementById(s))};function jr({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Bs={element:js,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 on(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Vs(e){return`
|
|
7
7
|
.${e}-wrapper {
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
position: relative;
|
|
140
140
|
height: auto;
|
|
141
141
|
}
|
|
142
|
-
`}function Ds({settings:e,isEditor:t,metadata:n,activeEvent:r}){const{prefix:o}=S.useScopedStyles(),{type:s="A",fieldsToShow:i=2,fields:l=[],buttonLabel:c,gap:d,fieldsGap:u,buttonCorners:T,buttonStroke:C,buttonPadding:h,isButtonFullWidth:p,inputCorners:g,inputStroke:$,inputPadding:v,inputColor:y,inputTextColor:E,inputBorderColor:B,placeholderColor:R,buttonColor:_,buttonTextColor:f,buttonBorderColor:x,labelTextColor:L,successColor:j,errorColor:I,fontFamily:P,inputFontSettings:H,inputFontSize:z,inputLineHeight:D,inputLetterSpacing:b,inputWordSpacing:k,inputTextAppearance:F,buttonFontSettings:W,buttonFontSize:A,buttonLineHeight:N,buttonLetterSpacing:Z,buttonWordSpacing:le,buttonTextAppearance:ne,labelFontSettings:de,labelFontSize:M,labelLineHeight:te,labelLetterSpacing:fe,labelWordSpacing:me,labelTextAppearance:ge,statusFontSettings:q,statusFontSize:ie,statusLineHeight:O,statusLetterSpacing:w,statusWordSpacing:G,statusTextAppearance:Y,successMessage:J,errorMessage:ae,stateOverrides:oe}=e,re=s==="B",ce=l.slice(0,Math.min(i,l.length)),V={fontSettings:{fontFamily:P,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:z??.01,lineHeight:D,letterSpacing:b??0,wordSpacing:k??0,textAppearance:F,color:E},X=it(Be(V,t)),K=S.scalingValue($??0,t),se=S.scalingValue((D??z??.01)+((v==null?void 0:v.top)??0)+((v==null?void 0:v.bottom)??0)+(s==="C"?$??0:($??0)*2),t),Q={...X,borderStyle:"solid",borderRadius:s==="C"?0:S.scalingValue(g??0,t),...s==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:K,borderLeftWidth:0}:{borderWidth:K},paddingTop:S.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:S.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:S.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:S.scalingValue((v==null?void 0:v.left)??0,t),height:se,minHeight:se},ue={fontSettings:{fontFamily:P,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:A??.01,lineHeight:N,letterSpacing:Z??0,wordSpacing:le??0,textAppearance:ne,color:f},Se=it(Be(ue,t)),Te=S.scalingValue(C??0,t),Re={fontSettings:{fontFamily:P,fontWeight:(de==null?void 0:de.fontWeight)??400,fontStyle:(de==null?void 0:de.fontStyle)??"normal"},fontSize:M??.01,lineHeight:te,letterSpacing:fe??0,wordSpacing:me??0,textAppearance:ge,color:L},Pe=Be(Re,t),ve={fontSettings:{fontFamily:P,fontWeight:(q==null?void 0:q.fontWeight)??400,fontStyle:(q==null?void 0:q.fontStyle)??"normal"},fontSize:ie??.01,lineHeight:O,letterSpacing:w??0,wordSpacing:G??0,textAppearance:Y,color:j},Ee=it(Be(ve,t)),Ie=S.buildColorVars(o,{inputColor:y,inputTextColor:E,inputBorderColor:B,placeholderColor:R!=null&&R.trim()?R:"#cccccc",buttonColor:_,buttonTextColor:f,buttonBorderColor:x,labelTextColor:L,successColor:j,errorColor:I},Gs,Us,oe),[Ce,Me]=m.useState(()=>Object.fromEntries(ce.map(he=>[he.name,""]))),[be,He]=m.useState("idle"),[_e,ke]=m.useState(null),ze=r==="success"?"success":r==="error"?"error":be,Xe=r==="error"?ae:_e,lt=r==="filled",et=m.useMemo(()=>{if(!lt)return Ce;let he=null;for(const Fe of ce)(Ce[Fe.name]??"").trim().length>0||(he=he??{...Ce},he[Fe.name]="Filled");return he??Ce},[Ce,lt,ce]),kn=ze==="error"?S.getFormFieldValidationError(ce,et):null,
|
|
142
|
+
`}function Ds({settings:e,isEditor:t,metadata:n,activeEvent:r}){const{prefix:o}=S.useScopedStyles(),{type:s="A",fieldsToShow:i=2,fields:l=[],buttonLabel:c,gap:d,fieldsGap:u,buttonCorners:T,buttonStroke:C,buttonPadding:h,isButtonFullWidth:p,inputCorners:g,inputStroke:$,inputPadding:v,inputColor:y,inputTextColor:E,inputBorderColor:B,placeholderColor:R,buttonColor:_,buttonTextColor:f,buttonBorderColor:x,labelTextColor:L,successColor:j,errorColor:I,fontFamily:P,inputFontSettings:H,inputFontSize:z,inputLineHeight:D,inputLetterSpacing:b,inputWordSpacing:k,inputTextAppearance:F,buttonFontSettings:W,buttonFontSize:A,buttonLineHeight:N,buttonLetterSpacing:Z,buttonWordSpacing:le,buttonTextAppearance:ne,labelFontSettings:de,labelFontSize:M,labelLineHeight:te,labelLetterSpacing:fe,labelWordSpacing:me,labelTextAppearance:ge,statusFontSettings:q,statusFontSize:ie,statusLineHeight:O,statusLetterSpacing:w,statusWordSpacing:G,statusTextAppearance:Y,successMessage:J,errorMessage:ae,stateOverrides:oe}=e,re=s==="B",ce=l.slice(0,Math.min(i,l.length)),V={fontSettings:{fontFamily:P,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:z??.01,lineHeight:D,letterSpacing:b??0,wordSpacing:k??0,textAppearance:F,color:E},X=it(Be(V,t)),K=S.scalingValue($??0,t),se=S.scalingValue((D??z??.01)+((v==null?void 0:v.top)??0)+((v==null?void 0:v.bottom)??0)+(s==="C"?$??0:($??0)*2),t),Q={...X,borderStyle:"solid",borderRadius:s==="C"?0:S.scalingValue(g??0,t),...s==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:K,borderLeftWidth:0}:{borderWidth:K},paddingTop:S.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:S.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:S.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:S.scalingValue((v==null?void 0:v.left)??0,t),height:se,minHeight:se},ue={fontSettings:{fontFamily:P,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:A??.01,lineHeight:N,letterSpacing:Z??0,wordSpacing:le??0,textAppearance:ne,color:f},Se=it(Be(ue,t)),Te=S.scalingValue(C??0,t),Re={fontSettings:{fontFamily:P,fontWeight:(de==null?void 0:de.fontWeight)??400,fontStyle:(de==null?void 0:de.fontStyle)??"normal"},fontSize:M??.01,lineHeight:te,letterSpacing:fe??0,wordSpacing:me??0,textAppearance:ge,color:L},Pe=Be(Re,t),ve={fontSettings:{fontFamily:P,fontWeight:(q==null?void 0:q.fontWeight)??400,fontStyle:(q==null?void 0:q.fontStyle)??"normal"},fontSize:ie??.01,lineHeight:O,letterSpacing:w??0,wordSpacing:G??0,textAppearance:Y,color:j},Ee=it(Be(ve,t)),Ie=S.buildColorVars(o,{inputColor:y,inputTextColor:E,inputBorderColor:B,placeholderColor:R!=null&&R.trim()?R:"#cccccc",buttonColor:_,buttonTextColor:f,buttonBorderColor:x,labelTextColor:L,successColor:j,errorColor:I},Gs,Us,oe),[Ce,Me]=m.useState(()=>Object.fromEntries(ce.map(he=>[he.name,""]))),[be,He]=m.useState("idle"),[_e,ke]=m.useState(null),ze=r==="success"?"success":r==="error"?"error":be,Xe=r==="error"?ae:_e,lt=r==="filled",et=m.useMemo(()=>{if(!lt)return Ce;let he=null;for(const Fe of ce)(Ce[Fe.name]??"").trim().length>0||(he=he??{...Ce},he[Fe.name]="Filled");return he??Ce},[Ce,lt,ce]),kn=ze==="error"?S.getFormFieldValidationError(ce,et):null,Fn=`${r&&r!=="default"?`${o}-state-${r}`:""}`.trim(),tn=n==null?void 0:n.submitUrl,we=(he,Fe)=>{Me(Ne=>({...Ne,[he]:Fe}))},Ae=async he=>{he.preventDefault();const Fe=Object.fromEntries(ce.map(Oe=>{var Ue;return[Oe.name,((Ue=Ce[Oe.name])==null?void 0:Ue.trim())??""]}).filter(([,Oe])=>Oe));if(!tn){He("error"),ke("No integrations were found for this form.");return}if(Object.keys(Fe).length===0)return;const Ne=S.getFormFieldValidationError(ce,Ce);if(Ne){He("error"),ke(Ne);return}He("submitting"),ke(null);try{const Oe=await fetch(tn,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Fe)});if(!Oe.ok){const Ue=await Oe.text();throw new Error(Ue||`Request failed: ${Oe.status}`)}He("success"),Me(Object.fromEntries(ce.map(Ue=>[Ue.name,""])))}catch(Oe){He("error"),ke(Oe instanceof Error?Oe.message:"Something went wrong")}};return a.jsxs("div",{className:`${o}-wrapper ${o}-type-${s} ${Fn}`.trim(),style:Ie,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Vs(o)}}),a.jsxs("form",{onSubmit:Ae,className:`${o}-form`,style:{gap:S.scalingValue(d??0,t)},children:[a.jsx("div",{className:`${o}-fields`,style:{gap:S.scalingValue(u??0,t)},children:ce.map((he,Fe)=>a.jsxs("div",{className:`${o}-field-group${re?` ${o}-labeled`:""}`,children:[re&&a.jsx("span",{className:`${o}-field-label`,style:Pe?{...Pe,lineHeight:Pe.fontSize}:void 0,children:he.label||he.name}),he.type==="textarea"?a.jsx("textarea",{name:he.name,autoComplete:"off",value:et[he.name]??"",onChange:Ne=>we(he.name,Ne.target.value),placeholder:he.placeholder,className:`${o}-input`,style:Q,rows:1,"data-filled":lt||(et[he.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:he.type==="phone"?"tel":he.type==="email"?"email":"text",name:he.name,autoComplete:"off",value:et[he.name]??"",onChange:Ne=>we(he.name,Ne.target.value),placeholder:he.placeholder,required:he.isRequired??he.type==="email",className:`${o}-input`,style:Q,"data-filled":lt||(et[he.name]??"").trim().length>0})]},Fe))}),a.jsx("div",{className:`${o}-overlay-anchor`,children:a.jsx("button",{type:"submit",className:`${o}-button`,style:{borderStyle:"solid",borderRadius:S.scalingValue(T??0,t),borderWidth:Te,paddingTop:S.scalingValue((h==null?void 0:h.top)??0,t),paddingRight:S.scalingValue((h==null?void 0:h.right)??0,t),paddingBottom:S.scalingValue((h==null?void 0:h.bottom)??0,t),paddingLeft:S.scalingValue((h==null?void 0:h.left)??0,t),...Se,...p?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${o}-overlay-anchor`,style:p?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:be==="submitting"?"...":c})})})]}),ze==="success"&&a.jsx("p",{className:`${o}-success`,style:{...Ee},children:J}),ze==="error"&&a.jsx("p",{className:`${o}-error`,style:{...Ee},role:"alert",children:kn??Xe??ae})]})}const Gs={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"},Us=["hover","focus","filled","success","error"],qs=`import React, { useMemo, useState } from 'react';\r
|
|
143
143
|
import { CommonComponentProps } from '../props';\r
|
|
144
144
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
|
|
145
145
|
import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';\r
|
|
@@ -1503,7 +1503,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {\r
|
|
|
1503
1503
|
};\r
|
|
1504
1504
|
\r
|
|
1505
1505
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
|
|
1506
|
-
`,rl="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),ol=[{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."}],zn={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},il=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],al={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke",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:{...zn.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:{...zn.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...zn.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:ol,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:rl},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:0,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:0,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...il],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"]},sl={element:Qs,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:al,sourceCode:nl};function zr(e){return`
|
|
1506
|
+
`,rl="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),ol=[{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."}],jn={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},il=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],al={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke",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:{...jn.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:{...jn.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...jn.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:ol,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:rl},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:0,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:0,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...il],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"]},sl={element:Qs,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:al,sourceCode:nl};function zr(e){return`
|
|
1507
1507
|
.${e}-marquee-wrapper {
|
|
1508
1508
|
overflow: hidden;
|
|
1509
1509
|
width: 100%;
|
|
@@ -2890,7 +2890,7 @@ type TestimonialsSettings = {\r
|
|
|
2890
2890
|
pointer-events: auto;
|
|
2891
2891
|
z-index: 10;
|
|
2892
2892
|
}
|
|
2893
|
-
`}const ct=500,vt="cubic-bezier(0.22, 1, 0.36, 1)";function Cl({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:o,onClose:s,onPrev:i,onNext:l}){const c=m.useRef(null),d=m.useRef(null),[u,T]=m.useState(null),[C,h]=m.useState(r?"opening":"open"),[p,g]=m.useState(!0),$=m.useRef(t),v=m.useCallback(()=>{const f=c.current,x=d.current;if(!f||!x)return;const L=f.getBoundingClientRect(),j=L.width,I=L.height,P=x.naturalWidth,H=x.naturalHeight;if(!j||!I||!P||!H)return;if(n==="Cover"){T({width:j,height:I,left:L.left,top:L.top});return}const z=P/H,D=j/I;if(z>D){const b=j/z;T({width:j,height:b,left:L.left,top:L.top+(I-b)/2})}else{const b=I*z;T({width:b,height:I,left:L.left+(j-b)/2,top:L.top})}},[n]);m.useEffect(()=>{v();const f=c.current;if(!f)return;const x=new ResizeObserver(()=>v());return x.observe(f),()=>x.disconnect()},[v,t]),m.useEffect(()=>{if(C!=="opening"||!u)return;const f={id:0};return f.id=requestAnimationFrame(()=>{f.id=requestAnimationFrame(()=>h("open"))}),()=>cancelAnimationFrame(f.id)},[C,u]),m.useEffect(()=>{if(C!=="closing")return;const f=setTimeout(()=>s(),ct);return()=>clearTimeout(f)},[C,s]),m.useEffect(()=>{$.current!==t&&g(!1),$.current=t},[t]);const y=()=>{C!=="closing"&&h("closing")},E=C==="open",B=C==="closing",R=B&&o&&!!r,_=C==="opening"?r??u:R?r:u;return a.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:y,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:E?1:0,transition:`opacity ${ct}ms ${vt}`,pointerEvents:"none"}}),a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:c,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",color:"#E6E6E6",letterSpacing:"-0.6px",lineHeight:"16px",opacity:E?1:0,transition:`opacity ${ct}ms ${vt}`,fontFamily:bl()},children:e.length>1&&a.jsxs(a.Fragment,{children:[a.jsx("p",{children:t+1}),a.jsx("p",{children:"/"}),a.jsx("p",{children:e.length})]})})]}),_&&a.jsx("img",{ref:d,src:e[t],onLoad:v,style:{position:"fixed",top:_.top,left:_.left,width:_.width,height:_.height,objectFit:n==="Cover"?"cover":"contain",opacity:B&&!R?0:1,transition:B&&!R?`opacity ${ct}ms ${vt}`:R||p?`top ${ct}ms ${vt}, left ${ct}ms ${vt}, width ${ct}ms ${vt}, height ${ct}ms ${vt}`:"none",pointerEvents:"none",zIndex:9998}}),E&&u&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{position:"fixed",top:u.top,left:u.left,width:u.width/2,height:u.height,cursor:"w-resize",zIndex:9999},onClick:f=>{f.stopPropagation(),i()}}),a.jsx("div",{style:{position:"fixed",top:u.top,left:u.left+u.width/2,width:u.width/2,height:u.height,cursor:"e-resize",zIndex:9999},onClick:f=>{f.stopPropagation(),l()}})]})]})}function wl({settings:e,content:t,isEditor:n,isPreviewMode:r,metadata:o,activeEvent:s,layoutId:i}){const{prefix:l}=S.useScopedStyles(),{type:c="A",gridLayout:d,textBoxWidth:u,verticalGap:T,entriesCount:C,lightbox:h,imageDisplay:p,slider:g,sliderTiming:$,direction:v,transition:y,titleMarginTop:E,subtitleMarginTop:B,titleColor:R,subtitleColor:_,titleFontFamily:f,titleFontSettings:x,titleFontSize:L,titleLineHeight:j,titleLetterSpacing:I,titleWordSpacing:P,titleTextAppearance:H,subtitleFontFamily:z,subtitleFontSettings:D,subtitleFontSize:b,subtitleLineHeight:k,subtitleLetterSpacing:F,subtitleWordSpacing:W,subtitleTextAppearance:A}=e,N={fontSettings:{fontFamily:f,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:L??.01,lineHeight:j,letterSpacing:I??0,wordSpacing:P??0,textAppearance:H,color:R},le={...it(Be(N,n))},ne={fontSettings:{fontFamily:z,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:b??.01,lineHeight:k,letterSpacing:F??0,wordSpacing:W??0,textAppearance:A,color:_},M={...it(Be(ne,n))},te=S.buildColorVars(l,{titleColor:R,subtitleColor:_},$l,Tl),me=`${s&&s!=="default"?`${l}-state-${s}`:""}`.trim(),ge=C===0?1/0:C,q=(t??[]).slice(0,ge),ie=d.entryWidth??.2,O=(p==null?void 0:p.display)==="Cover",w=(p==null?void 0:p.ratioValue)??"1:1",G=(p==null?void 0:p.reversed)??!1,[Y,J]=w.split(":").map(Number),ae=G?J:Y,oe=G?Y:J,re=`${ae} / ${oe}`,ce=ae>=oe,V={objectFit:O?"cover":"contain",...O&&{aspectRatio:re,width:ce?"100%":"auto",height:ce?"auto":"100%"}},[X,K]=m.useState("ltr"),[se,Q]=m.useState(0),ue=m.useRef(null);m.useEffect(()=>{const be=ue.current;if(!be)return;const He=new ResizeObserver(_e=>{Q(Math.round(_e[0].contentRect.width))});return He.observe(be),()=>He.disconnect()},[]);const[Se,Te]=m.useState(!1),[Re,Pe]=m.useState([]),[ve,Ee]=m.useState(0),[Ie,Ce]=m.useState(null),Me=(be,He,_e)=>{if(h==="Off")return;const ke=be.currentTarget.getBoundingClientRect();Ce({top:ke.top,left:ke.left,width:ke.width,height:ke.height}),Pe(He),Ee(_e),Te(!0)};return m.useEffect(()=>{if(!Se||h!=="On"||typeof document>"u")return;const be=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=be}},[Se,h]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Sl(l)}}),a.jsx("div",{style:te,children:a.jsx("div",{ref:ue,className:`${l}-wrapper ${l}-type-${c} ${me}`.trim(),style:{gridTemplateColumns:`repeat(${d.columnsCount}, minmax(0, 1fr))`,rowGap:S.scalingValue(T??0,n),columnGap:S.scalingValue(d.horizontalGap??0,n),width:S.scalingValue(d.wrapperWidth??0,n)},children:q.map((be,He)=>{var _e,ke;return a.jsx("div",{className:`${l}-item`.trim(),children:a.jsx("div",{className:r?`${l}-item-inner`:`${l}-item-inner-hidden`,style:{width:(u??0)>100?`calc(${S.scalingValue(ie??0,n)} * (${u} / 100))`:S.scalingValue(ie??0,n)},children:a.jsxs("a",{href:(((_e=be.link)==null?void 0:_e.length)??0)>0&&h==="Off"?be.link:void 0,target:"_blank",className:`${l}-item-image-link`,children:[a.jsx("div",{className:`${l}-item-image-wrapper`,style:{width:S.scalingValue(ie??0,n),height:S.scalingValue(ie??0,n)},children:(((ke=be.image)==null?void 0:ke.length)??0)===0?null:g==="Off"?a.jsx("img",{src:be.image[0].url,alt:be.image[0].name,className:`${l}-item-image`.trim(),style:V,onClick:ze=>Me(ze,be.image.map(Xe=>Xe.url),0)}):a.jsx(
|
|
2893
|
+
`}const ct=500,vt="cubic-bezier(0.22, 1, 0.36, 1)";function Cl({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:o,onClose:s,onPrev:i,onNext:l}){const c=m.useRef(null),d=m.useRef(null),[u,T]=m.useState(null),[C,h]=m.useState(r?"opening":"open"),[p,g]=m.useState(!0),$=m.useRef(t),v=m.useCallback(()=>{const f=c.current,x=d.current;if(!f||!x)return;const L=f.getBoundingClientRect(),j=L.width,I=L.height,P=x.naturalWidth,H=x.naturalHeight;if(!j||!I||!P||!H)return;if(n==="Cover"){T({width:j,height:I,left:L.left,top:L.top});return}const z=P/H,D=j/I;if(z>D){const b=j/z;T({width:j,height:b,left:L.left,top:L.top+(I-b)/2})}else{const b=I*z;T({width:b,height:I,left:L.left+(j-b)/2,top:L.top})}},[n]);m.useEffect(()=>{v();const f=c.current;if(!f)return;const x=new ResizeObserver(()=>v());return x.observe(f),()=>x.disconnect()},[v,t]),m.useEffect(()=>{if(C!=="opening"||!u)return;const f={id:0};return f.id=requestAnimationFrame(()=>{f.id=requestAnimationFrame(()=>h("open"))}),()=>cancelAnimationFrame(f.id)},[C,u]),m.useEffect(()=>{if(C!=="closing")return;const f=setTimeout(()=>s(),ct);return()=>clearTimeout(f)},[C,s]),m.useEffect(()=>{$.current!==t&&g(!1),$.current=t},[t]);const y=()=>{C!=="closing"&&h("closing")},E=C==="open",B=C==="closing",R=B&&o&&!!r,_=C==="opening"?r??u:R?r:u;return a.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:y,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:E?1:0,transition:`opacity ${ct}ms ${vt}`,pointerEvents:"none"}}),a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:c,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",color:"#E6E6E6",letterSpacing:"-0.6px",lineHeight:"16px",opacity:E?1:0,transition:`opacity ${ct}ms ${vt}`,fontFamily:bl()},children:e.length>1&&a.jsxs(a.Fragment,{children:[a.jsx("p",{children:t+1}),a.jsx("p",{children:"/"}),a.jsx("p",{children:e.length})]})})]}),_&&a.jsx("img",{ref:d,src:e[t],onLoad:v,style:{position:"fixed",top:_.top,left:_.left,width:_.width,height:_.height,objectFit:n==="Cover"?"cover":"contain",opacity:B&&!R?0:1,transition:B&&!R?`opacity ${ct}ms ${vt}`:R||p?`top ${ct}ms ${vt}, left ${ct}ms ${vt}, width ${ct}ms ${vt}, height ${ct}ms ${vt}`:"none",pointerEvents:"none",zIndex:9998}}),E&&u&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{position:"fixed",top:u.top,left:u.left,width:u.width/2,height:u.height,cursor:"w-resize",zIndex:9999},onClick:f=>{f.stopPropagation(),i()}}),a.jsx("div",{style:{position:"fixed",top:u.top,left:u.left+u.width/2,width:u.width/2,height:u.height,cursor:"e-resize",zIndex:9999},onClick:f=>{f.stopPropagation(),l()}})]})]})}function wl({settings:e,content:t,isEditor:n,isPreviewMode:r,metadata:o,activeEvent:s,layoutId:i}){const{prefix:l}=S.useScopedStyles(),{type:c="A",gridLayout:d,textBoxWidth:u,verticalGap:T,entriesCount:C,lightbox:h,imageDisplay:p,slider:g,sliderTiming:$,direction:v,transition:y,titleMarginTop:E,subtitleMarginTop:B,titleColor:R,subtitleColor:_,titleFontFamily:f,titleFontSettings:x,titleFontSize:L,titleLineHeight:j,titleLetterSpacing:I,titleWordSpacing:P,titleTextAppearance:H,subtitleFontFamily:z,subtitleFontSettings:D,subtitleFontSize:b,subtitleLineHeight:k,subtitleLetterSpacing:F,subtitleWordSpacing:W,subtitleTextAppearance:A}=e,N={fontSettings:{fontFamily:f,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:L??.01,lineHeight:j,letterSpacing:I??0,wordSpacing:P??0,textAppearance:H,color:R},le={...it(Be(N,n))},ne={fontSettings:{fontFamily:z,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:b??.01,lineHeight:k,letterSpacing:F??0,wordSpacing:W??0,textAppearance:A,color:_},M={...it(Be(ne,n))},te=S.buildColorVars(l,{titleColor:R,subtitleColor:_},$l,Tl),me=`${s&&s!=="default"?`${l}-state-${s}`:""}`.trim(),ge=C===0?1/0:C,q=(t??[]).slice(0,ge),ie=d.entryWidth??.2,O=(p==null?void 0:p.display)==="Cover",w=(p==null?void 0:p.ratioValue)??"1:1",G=(p==null?void 0:p.reversed)??!1,[Y,J]=w.split(":").map(Number),ae=G?J:Y,oe=G?Y:J,re=`${ae} / ${oe}`,ce=ae>=oe,V={objectFit:O?"cover":"contain",...O&&{aspectRatio:re,width:ce?"100%":"auto",height:ce?"auto":"100%"}},[X,K]=m.useState("ltr"),[se,Q]=m.useState(0),ue=m.useRef(null);m.useEffect(()=>{const be=ue.current;if(!be)return;const He=new ResizeObserver(_e=>{Q(Math.round(_e[0].contentRect.width))});return He.observe(be),()=>He.disconnect()},[]);const[Se,Te]=m.useState(!1),[Re,Pe]=m.useState([]),[ve,Ee]=m.useState(0),[Ie,Ce]=m.useState(null),Me=(be,He,_e)=>{if(h==="Off")return;const ke=be.currentTarget.getBoundingClientRect();Ce({top:ke.top,left:ke.left,width:ke.width,height:ke.height}),Pe(He),Ee(_e),Te(!0)};return m.useEffect(()=>{if(!Se||h!=="On"||typeof document>"u")return;const be=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=be}},[Se,h]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Sl(l)}}),a.jsx("div",{style:te,children:a.jsx("div",{ref:ue,className:`${l}-wrapper ${l}-type-${c} ${me}`.trim(),style:{gridTemplateColumns:`repeat(${d.columnsCount}, minmax(0, 1fr))`,rowGap:S.scalingValue(T??0,n),columnGap:S.scalingValue(d.horizontalGap??0,n),width:S.scalingValue(d.wrapperWidth??0,n)},children:q.map((be,He)=>{var _e,ke;return a.jsx("div",{className:`${l}-item`.trim(),children:a.jsx("div",{className:r?`${l}-item-inner`:`${l}-item-inner-hidden`,style:{width:(u??0)>100?`calc(${S.scalingValue(ie??0,n)} * (${u} / 100))`:S.scalingValue(ie??0,n)},children:a.jsxs("a",{href:(((_e=be.link)==null?void 0:_e.length)??0)>0&&h==="Off"?be.link:void 0,target:"_blank",className:`${l}-item-image-link`,children:[a.jsx("div",{className:`${l}-item-image-wrapper`,style:{width:S.scalingValue(ie??0,n),height:S.scalingValue(ie??0,n)},children:(((ke=be.image)==null?void 0:ke.length)??0)===0?null:g==="Off"?a.jsx("img",{src:be.image[0].url,alt:be.image[0].name,className:`${l}-item-image`.trim(),style:V,onClick:ze=>Me(ze,be.image.map(Xe=>Xe.url),0)}):a.jsx(yr,{className:`${l}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:$*1e3,width:"100%",height:"100%",speed:500,type:y==="Fade"?"fade":"loop",rewind:y==="Fade",pauseOnHover:!1,pauseOnFocus:!1,direction:y==="Fade"?"ltr":v!=="Random"?v==="Horizontal"?"ltr":"ttb":X},onMoved:ze=>{if(v!=="Random"||y==="Fade")return;const Xe=Math.random()>.5?Math.random()>.5?"rtl":"ltr":Math.random()>.5?"btt":"ttb";K(Xe),setTimeout(()=>{ze.refresh()},0)},children:be.image.map((ze,Xe)=>a.jsx(vr,{children:a.jsx("img",{src:ze.url,alt:ze.name,className:`${l}-item-image`.trim(),style:V,onClick:lt=>Me(lt,be.image.map(et=>et.url),Xe)})},Xe))},`${y}-${ie}-${v}-${$}-${se}-${i}`)}),a.jsx("div",{"data-controls":"titleMarginTop",className:`${l}-control`,style:{height:S.scalingValue(E??0,n),width:S.scalingValue(ie*u/100,n)}}),a.jsx("p",{className:`${l}-item-title`.trim(),style:{width:`calc(${S.scalingValue(ie??0,n)} * (${u} / 100))`,...le},children:be.title}),c==="B"&&a.jsx("div",{"data-controls":"subtitleMarginTop",className:`${l}-control`,style:{height:S.scalingValue(B??0,n),width:S.scalingValue(ie*u/100,n)}}),c==="B"&&a.jsx("p",{className:`${l}-item-subtitle`.trim(),style:{width:`calc(${S.scalingValue(ie??0,n)} * (${u} / 100))`,...M},children:be.subtitle})]})})},He)})})}),Se&&typeof document&&document.getElementById("grid-component-lightbox-portal")&&h==="On"&&Yr.createPortal(a.jsx("div",{"data-selection":"none",children:a.jsx(Cl,{images:Re,index:ve,imageDisplay:p.display,originRect:Ie,reverseClose:g==="Off",onClose:()=>Te(!1),onPrev:()=>Ee(be=>(be-1+Re.length)%Re.length),onNext:()=>Ee(be=>(be+1)%Re.length)})}),document.body)]})}const $l={titleColor:"title-color",subtitleColor:"subtitle-color"},Tl=["hover","focus","filled","success","error"],_l=`import { Splide, SplideSlide } from '@splidejs/react-splide';\r
|
|
2894
2894
|
import '@splidejs/react-splide/css/core';\r
|
|
2895
2895
|
import { CommonComponentProps } from '../props';\r
|
|
2896
2896
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
|
|
@@ -3570,7 +3570,8 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
|
|
|
3570
3570
|
}
|
|
3571
3571
|
|
|
3572
3572
|
.${e}-list-item {
|
|
3573
|
-
display:
|
|
3573
|
+
display: flex;
|
|
3574
|
+
align-items: stretch;
|
|
3574
3575
|
width: 100%;
|
|
3575
3576
|
overflow: visible;
|
|
3576
3577
|
position: relative;
|
|
@@ -3732,7 +3733,7 @@ a.${e}-list-item {
|
|
|
3732
3733
|
overflow-wrap: anywhere;
|
|
3733
3734
|
word-break: break-word;
|
|
3734
3735
|
}
|
|
3735
|
-
`}const Gr=["AColumn","BColumn","CColumn","DColumn","EColumn"],xt=["AColumnWidth","BColumn","CColumn","DColumn","EColumn"],Ur=.004,qr=.004,Kr=.004,Ro=50,kl=1440,vn=Ro/kl,Lt={AColumnWidth:.02,BColumn:.02,CColumn:.02,DColumn:.02,EColumn:.02};function
|
|
3736
|
+
`}const Gr=["AColumn","BColumn","CColumn","DColumn","EColumn"],xt=["AColumnWidth","BColumn","CColumn","DColumn","EColumn"],Ur=.004,qr=.004,Kr=.004,Ro=50,kl=1440,vn=Ro/kl,Lt={AColumnWidth:.02,BColumn:.02,CColumn:.02,DColumn:.02,EColumn:.02};function Xn(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1,n=typeof e.wrapperPaddingLeft=="number"?e.wrapperPaddingLeft:0,r=typeof e.wrapperPaddingRight=="number"?e.wrapperPaddingRight:0;return Math.max(0,t-n-r)}function Fl(e,t=1){const n=t/e;return Object.fromEntries(xt.map(r=>[r,n]))}function Wl(e){return Object.fromEntries(xt.map(t=>[t,typeof e[t]=="number"?e[t]:Lt[t]]))}function Po(e,t,n){if(e<=0)return[];const r=xt.slice(0,e).map(d=>n[d]);if(e===1)return r;const o=r.slice(0,e-1),i=o.reduce((d,u)=>d+u,0)+vn;if(t>=i)return r;const l=[...o];let c=i-t;for(let d=l.length-1;d>=0&&c>0;d-=1){const u=l[d]-vn;if(u<=0)continue;const T=Math.min(c,u);l[d]-=T,c-=T}return[...l,r[e-1]]}function Rl(e,t,n){if(e<=1)return{};const r=Po(e,t,n),o={};for(let s=0;s<e-1;s+=1){const i=xt[s];r[s]!==n[i]&&(o[i]=r[s])}return o}function Pl(e,t){const n=e.columns,r=t.columns,o=Xn(e),s=Xn(t);if(typeof n=="number"&&n!==r)return{...e,...Fl(n,o)};if(o<s){const i=typeof n=="number"?n:typeof r=="number"?r:void 0;if(typeof i=="number"){const l=Wl({...t,...e});return{...e,...Rl(i,o,l)}}}return e}function Ml(e,t,n,r){const o=t.slice(0,e).reduce((i,l)=>i+l,0),s=n.slice(e+1,t.length-1).reduce((i,l)=>i+l,0);return Math.max(vn,r-o-s-vn)}function Hl(e,t){return Math.random()*(t-e)+e}function Nl({settings:e,content:t,isEditor:n,isPreviewMode:r,metadata:o,activeEvent:s,layoutId:i,onUpdateSettings:l}){const{prefix:c}=S.useScopedStyles(),{columns:d,wrapperWidth:u,entriesCount:T,cellMinHeight:C,dividerWidth:h,cut:p,showCut:g,cutCellMinHeight:$,cutLabel:v,imageSize:y,imageOnHover:E,entryHoverEffect:B,rowPaddingTop:R,rowPaddingBottom:_,wrapperPaddingLeft:f,wrapperPaddingRight:x,AColumnWidth:L,BColumn:j,CColumn:I,DColumn:P,EColumn:H,columnsOrder:z,textColor:D,textFontFamily:b,textFontSettings:k,textFontSize:F,textLineHeight:W,textLetterSpacing:A,textWordSpacing:N,textTextAppearance:Z,backgroundColor:le,dividerColor:ne,textHoverColor:de,backgroundHoverColor:M,dividerHoverColor:te}=e,[fe,me]=m.useState(void 0),[ge,q]=m.useState(null),ie=E==="On",O=(p??0)>0;m.useEffect(()=>{me(void 0)},[p,g,t,T]);const w=F??.01,G=w*1.2,Y=Math.max(W??w,G),J={fontSettings:{fontFamily:b,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:w,lineHeight:Y,letterSpacing:A??0,wordSpacing:N??0,textAppearance:Z,color:D},oe={...it(Be(J,n))},re=S.buildColorVars(c,{textColor:D,backgroundColor:le,dividerColor:ne,textHoverColor:de,backgroundHoverColor:M,dividerHoverColor:te},Ol,jl),ce=s&&s!=="default"?`${c}-state-${s}`:"",X=`${B==="Default"?`${c}-entry-hover-default`:B==="Blinds"?`${c}-entry-hover-blinds`:""} ${ce}`.trim(),K=m.useRef(null),se=m.useRef(e);m.useEffect(()=>{if(!l||!n){se.current=e;return}const we=se.current,Ae=Pl(e,we);se.current=e,Ae!==e&&l(Ae)},[e,l,n]);const Q={AColumnWidth:L??Lt.AColumnWidth,BColumn:j??Lt.BColumn,CColumn:I??Lt.CColumn,DColumn:P??Lt.DColumn,EColumn:H??Lt.EColumn},ue=m.useMemo(()=>Array.isArray(z)&&z.length>0?z:[...Gr],[z]),Se=m.useMemo(()=>ue.slice(0,d).map((we,Ae)=>({key:we,widthKey:xt[Ae],width:Q[xt[Ae]]})),[d,ue,L,j,I,P,H]),Te=f??0,Re=x??0,Pe=Xn(e),ve=m.useMemo(()=>xt.slice(0,d).map(we=>Q[we]),[d,L,j,I,P,H]),Ee=m.useMemo(()=>Po(d,Pe,Q),[d,Pe,L,j,I,P,H]),Ie=m.useMemo(()=>{const we=T===0?1/0:T;return(t??[]).slice(0,we).map((he,Fe)=>({id:Fe,cells:Object.fromEntries(Gr.map(Ne=>[Ne,he[Ne]??""])),image:he.image,link:he.link}))},[t,T]),Ce=O?fe??p:Ie.length,Me=m.useMemo(()=>O?Ie.slice(0,Ce):Ie,[Ie,O,Ce]),be=O&&Ce<Ie.length,He=()=>{const we=fe??p;if(!g){me(Ie.length);return}me(Math.min(we+g,Ie.length))},_e=we=>S.scalingValue(we,n??!1),ke=R??0,ze=_??0,Xe=Math.max(ke,qr),lt=Math.max(ze,qr),et=Math.max(Te,Kr),kn=Math.max(Re,Kr),br={paddingLeft:_e(Te),paddingRight:_e(Re)},Fn=we=>{if(!ie)return;const Ae=we.image;if(!(Ae!=null&&Ae.url)){q(null);return}if((ge==null?void 0:ge.rowId)===we.id)return;const he=(y==null?void 0:y.min)??80,Fe=(y==null?void 0:y.max)??320;q({rowId:we.id,url:Ae.url,objectFit:Ae.objectFit??"cover",widthPx:Hl(he,Fe)})},tn=()=>{q(null)};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Al(c)}}),a.jsx("div",{style:re,children:a.jsxs("div",{ref:K,className:`${c}-wrapper ${X}`.trim(),style:{width:S.scalingValue(u??0,n)},onMouseLeave:ie?tn:void 0,children:[n&&a.jsx("div",{"data-controls":"wrapperPaddingLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-no-highlight":"",className:`${c}-wrapper-padding-handle`,style:{position:"absolute",top:0,left:0,width:_e(et),height:"100%",pointerEvents:"auto",zIndex:4}}),n&&a.jsx("div",{"data-controls":"wrapperPaddingRight","data-controls-axis":"x","data-controls-reverse":"","data-controls-min":"0","data-controls-no-highlight":"",className:`${c}-wrapper-padding-handle`,style:{position:"absolute",top:0,right:0,width:_e(kn),height:"100%",pointerEvents:"auto",zIndex:4}}),a.jsxs("div",{style:{width:"100%"},children:[Me.map((we,Ae)=>{var Oe;const he=(((Oe=we.link)==null?void 0:Oe.length)??0)>0,Fe=he?"a":"div",Ne={paddingTop:_e(ke),paddingBottom:_e(ze),borderBottomWidth:S.scalingValue(h??0,n),...Ae===0?{borderTopWidth:S.scalingValue(h??0,n)}:{}};return a.jsxs(Fe,{className:`${c}-list-item`,...he?{href:we.link,target:"_blank"}:{},style:Ne,onMouseEnter:ie?()=>Fn(we):void 0,children:[n&&a.jsx("div",{"data-controls":"rowPaddingTop","data-controls-axis":"y","data-controls-min":"0","data-controls-no-highlight":"",className:`${c}-row-padding-handle`,style:{position:"absolute",top:0,left:0,width:"100%",height:_e(Xe),pointerEvents:"auto",zIndex:3}}),a.jsx("div",{className:`${c}-list-cols-row`,style:{minHeight:_e(C??0)},children:Se.map((Ue,Wn)=>{const Rn=Wn===Se.length-1,Mo=Ee[Wn],Ho=Ml(Wn,Ee,ve,Pe);return a.jsxs("div",{className:`${c}-list-col${Rn?` ${c}-list-col-last`:""}`,style:Rn?void 0:{width:_e(Mo)},"data-test":Ue.width,children:[a.jsx("span",{className:`${c}-list-col-title`,style:oe,children:we.cells[Ue.key]??null}),n&&!Rn&&a.jsx("div",{"data-controls":Ue.widthKey,"data-controls-axis":"x","data-controls-min":String(Ro),"data-controls-max-fraction":String(Ho),"data-controls-no-highlight":"",className:`${c}-col-resize-handle`,style:{position:"absolute",top:0,left:`calc(100% - ${_e(Ur/2)})`,width:_e(Ur),height:"100%",pointerEvents:"auto",zIndex:2}})]},Ue.key)})}),n&&a.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-min":"0","data-controls-no-highlight":"",className:`${c}-row-padding-handle`,style:{position:"absolute",bottom:0,left:0,width:"100%",height:_e(lt),pointerEvents:"auto",zIndex:3}})]},we.id)}),be&&a.jsx("div",{className:`${c}-cut-item`,style:{minHeight:_e($??0),borderBottomWidth:S.scalingValue(h??0,n)},children:a.jsx("div",{className:`${c}-list-cols-row`,style:{...br,justifyContent:"center"},children:a.jsx("button",{type:"button",className:`${c}-cut-label`,style:oe,onClick:He,children:v})})})]}),ie&&ge&&a.jsx("img",{className:`${c}-hover-image`,src:ge.url,alt:"",style:{width:dn(ge.widthPx),objectFit:ge.objectFit}})]})})]})}const Ol={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},jl=["hover","focus","filled","success","error"],zl=`import { Splide, SplideSlide } from '@splidejs/react-splide';\r
|
|
3736
3737
|
import '@splidejs/react-splide/css/core';\r
|
|
3737
3738
|
import { CommonComponentProps } from '../props';\r
|
|
3738
3739
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';\r
|
|
@@ -3765,7 +3766,8 @@ function getCSS(P: string): string {\r
|
|
|
3765
3766
|
}\r
|
|
3766
3767
|
\r
|
|
3767
3768
|
.\${P}-list-item {\r
|
|
3768
|
-
display:
|
|
3769
|
+
display: flex;\r
|
|
3770
|
+
align-items: stretch;\r
|
|
3769
3771
|
width: 100%;\r
|
|
3770
3772
|
overflow: visible;\r
|
|
3771
3773
|
position: relative;\r
|
|
@@ -4468,7 +4470,6 @@ export function List({ settings, content, isEditor, isPreviewMode, metadata, act
|
|
|
4468
4470
|
const hasLink = (row.link?.length ?? 0) > 0;\r
|
|
4469
4471
|
const RowElement = hasLink ? 'a' : 'div';\r
|
|
4470
4472
|
const rowStyle = {\r
|
|
4471
|
-
minHeight: scaled(cellMinHeight ?? 0),\r
|
|
4472
4473
|
paddingTop: scaled(resolvedRowPaddingTop),\r
|
|
4473
4474
|
paddingBottom: scaled(resolvedRowPaddingBottom),\r
|
|
4474
4475
|
borderBottomWidth: scalingValue(dividerWidth ?? 0, isEditor),\r
|
|
@@ -4501,7 +4502,7 @@ export function List({ settings, content, isEditor, isPreviewMode, metadata, act
|
|
|
4501
4502
|
}}\r
|
|
4502
4503
|
/>\r
|
|
4503
4504
|
)}\r
|
|
4504
|
-
<div className={\`\${P}-list-cols-row\`} style={
|
|
4505
|
+
<div className={\`\${P}-list-cols-row\`} style={{ minHeight: scaled(cellMinHeight ?? 0) }}>\r
|
|
4505
4506
|
{listColumns.map((col, colIndex) => {\r
|
|
4506
4507
|
const isLastColumn = colIndex === listColumns.length - 1;\r
|
|
4507
4508
|
const columnWidth = resolvedColumnWidths[colIndex];\r
|