@cntrl-site/components 1.0.12-alpha.20 → 1.0.12-alpha.22
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/Components/Grid/Grid.d.ts +10 -10
- package/dist/Components/List/List.d.ts +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +613 -349
- package/dist/index.mjs +4196 -3930
- package/dist/types/Component.d.ts +7 -4
- package/package.json +1 -1
- package/dist/Components/utils/getMainFontBaseOnSystem.d.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),u=require("react"),Ee=require("classnames"),E=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),go=require("react-dom");function la(e){return e.type==="object"&&e.version===1}const ca="ControlSlider-module__wrapper___sHEkd",da="ControlSlider-module__hoverArrow___A-dOH",ua="ControlSlider-module__sliderItem___QQSkR",pa="ControlSlider-module__sliderImage___9hRl-",ma="ControlSlider-module__arrow___05ghY",ga="ControlSlider-module__arrowVertical___tBfVN",ha="ControlSlider-module__nextArrow___-30Yc",fa="ControlSlider-module__arrowInner___aEra3",ya="ControlSlider-module__arrowIcon___S4ztF",va="ControlSlider-module__arrowImg___2dwJW",ba="ControlSlider-module__mirror___brd6U",xa="ControlSlider-module__pagination___bicLF",Ca="ControlSlider-module__paginationInner___bT-P-",Sa="ControlSlider-module__paginationVertical___zYqKw",wa="ControlSlider-module__paginationItem___nTRbk",$a="ControlSlider-module__dot___p1Qun",Ta="ControlSlider-module__activeDot___LHFaj",La="ControlSlider-module__paginationInsideBottom___R3FWn",Ea="ControlSlider-module__paginationInsideTop___V-qb-",Pa="ControlSlider-module__paginationOutsideBottom___14w8D",_a="ControlSlider-module__paginationOutsideTop___SCLqB",Aa="ControlSlider-module__paginationInsideLeft___yOBRZ",Ra="ControlSlider-module__paginationInsideRight___Rtt3o",Ia="ControlSlider-module__paginationOutsideLeft___lahaw",Wa="ControlSlider-module__paginationOutsideRight___EtuQa",ka="ControlSlider-module__imgWrapper___UjEgB",Fa="ControlSlider-module__captionBlock___dJ6-j",Ma="ControlSlider-module__captionTextWrapper___HFlpf",Na="ControlSlider-module__captionText___uGBVc",Ha="ControlSlider-module__active___WZK4G",Oa="ControlSlider-module__withPointerEvents___t-18M",Ba="ControlSlider-module__topLeftAlignment___zjnGM",Va="ControlSlider-module__topCenterAlignment___gD1xW",Da="ControlSlider-module__topRightAlignment___NMapS",za="ControlSlider-module__middleLeftAlignment___OnUrY",ja="ControlSlider-module__middleCenterAlignment___Tdkl0",Ka="ControlSlider-module__middleRightAlignment___wEbfX",Ua="ControlSlider-module__bottomLeftAlignment___cTP2-",qa="ControlSlider-module__bottomCenterAlignment___c54fB",Ga="ControlSlider-module__bottomRightAlignment___kEwrz",Ya="ControlSlider-module__clickOverlay___DZA28",Xa="ControlSlider-module__contain___pLyq7",Za="ControlSlider-module__cover___KdDat",le={wrapper:ca,hoverArrow:da,sliderItem:ua,sliderImage:pa,arrow:ma,arrowVertical:ga,nextArrow:ha,arrowInner:fa,arrowIcon:ya,arrowImg:va,mirror:ba,pagination:xa,paginationInner:Ca,paginationVertical:Sa,paginationItem:wa,dot:$a,activeDot:Ta,paginationInsideBottom:La,paginationInsideTop:Ea,paginationOutsideBottom:Pa,paginationOutsideTop:_a,paginationInsideLeft:Aa,paginationInsideRight:Ra,paginationOutsideLeft:Ia,paginationOutsideRight:Wa,imgWrapper:ka,captionBlock:Fa,captionTextWrapper:Ma,captionText:Na,active:Ha,withPointerEvents:Oa,topLeftAlignment:Ba,topCenterAlignment:Va,topRightAlignment:Da,middleLeftAlignment:za,middleCenterAlignment:ja,middleRightAlignment:Ka,bottomLeftAlignment:Ua,bottomCenterAlignment:qa,bottomRightAlignment:Ga,clickOverlay:Ya,contain:Xa,cover:Za};function Ja(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 Qa(e,t,n){return t&&Ja(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ei="(prefers-reduced-motion: reduce)",on=1,es=2,ln=3,gn=4,kn=5,er=6,lr=7,ts={CREATED:on,MOUNTED:es,IDLE:ln,MOVING:gn,SCROLLING:kn,DRAGGING:er,DESTROYED:lr};function Et(e){e.length=0}function Ot(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ae(e){return e.bind.apply(e,[null].concat(Ot(arguments,1)))}var ho=setTimeout,Dr=function(){};function Pi(e){return requestAnimationFrame(e)}function gr(e,t){return typeof t===e}function wn(e){return!Qr(e)&&gr("object",e)}var Jr=Array.isArray,fo=Ae(gr,"function"),Mt=Ae(gr,"string"),Fn=Ae(gr,"undefined");function Qr(e){return e===null}function yo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Mn(e){return Jr(e)?e:[e]}function ct(e,t){Mn(e).forEach(t)}function ei(e,t){return e.indexOf(t)>-1}function tr(e,t){return e.push.apply(e,Mn(t)),e}function wt(e,t,n){e&&ct(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function ft(e,t){wt(e,Mt(t)?t.split(" "):t,!0)}function Nn(e,t){ct(t,e.appendChild.bind(e))}function ti(e,t){ct(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function $n(e,t){return yo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function vo(e,t){var n=e?Ot(e.children):[];return t?n.filter(function(r){return $n(r,t)}):n}function Hn(e,t){return t?vo(e,t)[0]:e.firstElementChild}var Tn=Object.keys;function qt(e,t,n){return e&&(n?Tn(e).reverse():Tn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function Ln(e){return Ot(arguments,1).forEach(function(t){qt(t,function(n,r){e[r]=t[r]})}),e}function kt(e){return Ot(arguments,1).forEach(function(t){qt(t,function(n,r){Jr(n)?e[r]=n.slice():wn(n)?e[r]=kt({},wn(e[r])?e[r]:{},n):e[r]=n})}),e}function _i(e,t){ct(t||Tn(e),function(n){delete e[n]})}function yt(e,t){ct(e,function(n){ct(t,function(r){n&&n.removeAttribute(r)})})}function ge(e,t,n){wn(t)?qt(t,function(r,i){ge(e,i,r)}):ct(e,function(r){Qr(n)||n===""?yt(r,t):r.setAttribute(t,String(n))})}function an(e,t,n){var r=document.createElement(e);return t&&(Mt(t)?ft(r,t):ge(r,t)),n&&Nn(n,r),r}function ut(e,t,n){if(Fn(n))return getComputedStyle(e)[t];Qr(n)||(e.style[t]=""+n)}function En(e,t){ut(e,"display",t)}function bo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function pt(e,t){return e.getAttribute(t)}function Ai(e,t){return e&&e.classList.contains(t)}function at(e){return e.getBoundingClientRect()}function Gt(e){ct(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function xo(e){return Hn(new DOMParser().parseFromString(e,"text/html").body)}function St(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Co(e,t){return e&&e.querySelector(t)}function ni(e,t){return t?Ot(e.querySelectorAll(t)):[]}function $t(e,t){wt(e,t,!1)}function zr(e){return e.timeStamp}function jt(e){return Mt(e)?e:e?e+"px":""}var On="splide",ri="data-"+On;function Cn(e,t){if(!e)throw new Error("["+On+"] "+(t||""))}var Nt=Math.min,cr=Math.max,dr=Math.floor,Pn=Math.ceil,tt=Math.abs;function So(e,t,n){return tt(e-t)<n}function nr(e,t,n,r){var i=Nt(t,n),a=cr(t,n);return r?i<e&&e<a:i<=e&&e<=a}function tn(e,t,n){var r=Nt(t,n),i=cr(t,n);return Nt(cr(r,e),i)}function jr(e){return+(e>0)-+(e<0)}function Kr(e,t){return ct(t,function(n){e=e.replace("%s",""+n)}),e}function ii(e){return e<10?"0"+e:""+e}var Ri={};function ns(e){return""+e+ii(Ri[e]=(Ri[e]||0)+1)}function wo(){var e=[];function t(s,c,o,d){i(s,c,function(p,T,S){var v="addEventListener"in p,g=v?p.removeEventListener.bind(p,T,o,d):p.removeListener.bind(p,o);v?p.addEventListener(T,o,d):p.addListener(o),e.push([p,T,S,o,g])})}function n(s,c,o){i(s,c,function(d,p,T){e=e.filter(function(S){return S[0]===d&&S[1]===p&&S[2]===T&&(!o||S[3]===o)?(S[4](),!1):!0})})}function r(s,c,o){var d,p=!0;return typeof CustomEvent=="function"?d=new CustomEvent(c,{bubbles:p,detail:o}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(c,p,!1,o)),s.dispatchEvent(d),d}function i(s,c,o){ct(s,function(d){d&&ct(c,function(p){p.split(" ").forEach(function(T){var S=T.split(".");o(d,S[0],S[1])})})})}function a(){e.forEach(function(s){s[4]()}),Et(e)}return{bind:t,unbind:n,dispatch:r,destroy:a}}var Bt="mounted",Ur="ready",Pt="move",hn="moved",oi="click",$o="active",To="inactive",Lo="visible",Eo="hidden",Be="refresh",Je="updated",cn="resize",hr="resized",Po="drag",_o="dragging",Ao="dragged",fr="scroll",Xt="scrolled",rs="overflow",ai="destroy",Ro="arrows:mounted",Io="arrows:updated",Wo="pagination:mounted",ko="pagination:updated",si="navigation:mounted",li="autoplay:play",Fo="autoplay:playing",ci="autoplay:pause",di="lazyload:loaded",Mo="sk",No="sh",ur="ei";function Oe(e){var t=e?e.event.bus:document.createDocumentFragment(),n=wo();function r(a,s){n.bind(t,Mn(a).join(" "),function(c){s.apply(s,Jr(c.detail)?c.detail:[])})}function i(a){n.dispatch(t,a,Ot(arguments,1))}return e&&e.event.on(ai,n.destroy),Ln(n,{bus:t,on:r,off:Ae(n.unbind,t),emit:i})}function yr(e,t,n,r){var i=Date.now,a,s=0,c,o=!0,d=0;function p(){if(!o){if(s=e?Nt((i()-a)/e,1):1,n&&n(s),s>=1&&(t(),a=i(),r&&++d>=r))return S();c=Pi(p)}}function T(b){b||g(),a=i()-(b?s*e:0),o=!1,c=Pi(p)}function S(){o=!0}function v(){a=i(),s=0,n&&n(s)}function g(){c&&cancelAnimationFrame(c),s=0,c=0,o=!0}function m(b){e=b}function R(){return o}return{start:T,rewind:v,pause:S,cancel:g,set:m,isPaused:R}}function is(e){var t=e;function n(i){t=i}function r(i){return ei(Mn(i),t)}return{set:n,is:r}}function os(e,t){var n=yr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function as(e,t,n){var r=e.state,i=n.breakpoints||{},a=n.reducedMotion||{},s=wo(),c=[];function o(){var g=n.mediaQuery==="min";Tn(i).sort(function(m,R){return g?+m-+R:+R-+m}).forEach(function(m){p(i[m],"("+(g?"min":"max")+"-width:"+m+"px)")}),p(a,Ei),T()}function d(g){g&&s.destroy()}function p(g,m){var R=matchMedia(m);s.bind(R,"change",T),c.push([g,R])}function T(){var g=r.is(lr),m=n.direction,R=c.reduce(function(b,x){return kt(b,x[1].matches?x[0]:{})},{});_i(n),v(R),n.destroy?e.destroy(n.destroy==="completely"):g?(d(!0),e.mount()):m!==n.direction&&e.refresh()}function S(g){matchMedia(Ei).matches&&(g?kt(n,a):_i(n,Tn(a)))}function v(g,m,R){kt(n,g),m&&kt(Object.getPrototypeOf(n),g),(R||!r.is(on))&&e.emit(Je,n)}return{setup:o,destroy:d,reduce:S,set:v}}var vr="Arrow",br=vr+"Left",xr=vr+"Right",Ho=vr+"Up",Oo=vr+"Down",Ii="rtl",Cr="ttb",_r={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Ho,xr],ArrowRight:[Oo,br]};function ss(e,t,n){function r(a,s,c){c=c||n.direction;var o=c===Ii&&!s?1:c===Cr?0:-1;return _r[a]&&_r[a][o]||a.replace(/width|left|right/i,function(d,p){var T=_r[d.toLowerCase()][o]||d;return p>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function i(a){return a*(n.direction===Ii?1:-1)}return{resolve:r,orient:i}}var Tt="role",sn="tabindex",ls="disabled",mt="aria-",Bn=mt+"controls",Bo=mt+"current",Wi=mt+"selected",st=mt+"label",ui=mt+"labelledby",Vo=mt+"hidden",pi=mt+"orientation",_n=mt+"roledescription",ki=mt+"live",Fi=mt+"busy",Mi=mt+"atomic",mi=[Tt,sn,ls,Bn,Bo,st,ui,Vo,pi,_n],vt=On+"__",Vt="is-",Ar=On,Ni=vt+"track",cs=vt+"list",Sr=vt+"slide",Do=Sr+"--clone",ds=Sr+"__container",gi=vt+"arrows",wr=vt+"arrow",zo=wr+"--prev",jo=wr+"--next",$r=vt+"pagination",Ko=$r+"__page",us=vt+"progress",ps=us+"__bar",ms=vt+"toggle",gs=vt+"spinner",hs=vt+"sr",fs=Vt+"initialized",Yt=Vt+"active",Uo=Vt+"prev",qo=Vt+"next",qr=Vt+"visible",Gr=Vt+"loading",Go=Vt+"focus-in",Yo=Vt+"overflow",ys=[Yt,qr,Uo,qo,Gr,Go,Yo],vs={slide:Sr,clone:Do,arrows:gi,arrow:wr,prev:zo,next:jo,pagination:$r,page:Ko,spinner:gs};function bs(e,t){if(fo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!$n(n,t);)n=n.parentElement;return n}var xs=5,Hi=200,Xo="touchstart mousedown",Rr="touchmove mousemove",Ir="touchend touchcancel mouseup click";function Cs(e,t,n){var r=Oe(e),i=r.on,a=r.bind,s=e.root,c=n.i18n,o={},d=[],p=[],T=[],S,v,g;function m(){y(),O(),x()}function R(){i(Be,b),i(Be,m),i(Je,x),a(document,Xo+" keydown",function(L){g=L.type==="keydown"},{capture:!0}),a(s,"focusin",function(){wt(s,Go,!!g)})}function b(L){var I=mi.concat("style");Et(d),$t(s,p),$t(S,T),yt([S,v],I),yt(s,L?I:["style",_n])}function x(){$t(s,p),$t(S,T),p=A(Ar),T=A(Ni),ft(s,p),ft(S,T),ge(s,st,n.label),ge(s,ui,n.labelledby)}function y(){S=P("."+Ni),v=Hn(S,"."+cs),Cn(S&&v,"A track/list element is missing."),tr(d,vo(v,"."+Sr+":not(."+Do+")")),qt({arrows:gi,pagination:$r,prev:zo,next:jo,bar:ps,toggle:ms},function(L,I){o[I]=P("."+L)}),Ln(o,{root:s,track:S,list:v,slides:d})}function O(){var L=s.id||ns(On),I=n.role;s.id=L,S.id=S.id||L+"-track",v.id=v.id||L+"-list",!pt(s,Tt)&&s.tagName!=="SECTION"&&I&&ge(s,Tt,I),ge(s,_n,c.carousel),ge(v,Tt,"presentation")}function P(L){var I=Co(s,L);return I&&bs(I,"."+Ar)===s?I:void 0}function A(L){return[L+"--"+n.type,L+"--"+n.direction,n.drag&&L+"--draggable",n.isNavigation&&L+"--nav",L===Ar&&Yt]}return Ln(o,{setup:m,mount:R,destroy:b})}var dn="slide",fn="loop",Vn="fade";function Ss(e,t,n,r){var i=Oe(e),a=i.on,s=i.emit,c=i.bind,o=e.Components,d=e.root,p=e.options,T=p.isNavigation,S=p.updateOnMove,v=p.i18n,g=p.pagination,m=p.slideFocus,R=o.Direction.resolve,b=pt(r,"style"),x=pt(r,st),y=n>-1,O=Hn(r,"."+ds),P;function A(){y||(r.id=d.id+"-slide"+ii(t+1),ge(r,Tt,g?"tabpanel":"group"),ge(r,_n,v.slide),ge(r,st,x||Kr(v.slideLabel,[t+1,e.length]))),L()}function L(){c(r,"click",Ae(s,oi,H)),c(r,"keydown",Ae(s,Mo,H)),a([hn,No,Xt],w),a(si,_),S&&a(Pt,N)}function I(){P=!0,i.destroy(),$t(r,ys),yt(r,mi),ge(r,"style",b),ge(r,st,x||"")}function _(){var M=e.splides.map(function(k){var D=k.splide.Components.Slides.getAt(t);return D?D.slide.id:""}).join(" ");ge(r,st,Kr(v.slideX,(y?n:t)+1)),ge(r,Bn,M),ge(r,Tt,m?"button":""),m&&yt(r,_n)}function N(){P||w()}function w(){if(!P){var M=e.index;B(),V(),wt(r,Uo,t===M-1),wt(r,qo,t===M+1)}}function B(){var M=Y();M!==Ai(r,Yt)&&(wt(r,Yt,M),ge(r,Bo,T&&M||""),s(M?$o:To,H))}function V(){var M=$(),k=!M&&(!Y()||y);if(e.state.is([gn,kn])||ge(r,Vo,k||""),ge(ni(r,p.focusableNodes||""),sn,k?-1:""),m&&ge(r,sn,k?-1:0),M!==Ai(r,qr)&&(wt(r,qr,M),s(M?Lo:Eo,H)),!M&&document.activeElement===r){var D=o.Slides.getAt(e.index);D&&bo(D.slide)}}function q(M,k,D){ut(D&&O||r,M,k)}function Y(){var M=e.index;return M===t||p.cloneStatus&&M===n}function $(){if(e.is(Vn))return Y();var M=at(o.Elements.track),k=at(r),D=R("left",!0),Q=R("right",!0);return dr(M[D])<=Pn(k[D])&&dr(k[Q])<=Pn(M[Q])}function W(M,k){var D=tt(M-t);return!y&&(p.rewind||e.is(fn))&&(D=Nt(D,e.length-D)),D<=k}var H={index:t,slideIndex:n,slide:r,container:O,isClone:y,mount:A,destroy:I,update:w,style:q,isWithin:W};return H}function ws(e,t,n){var r=Oe(e),i=r.on,a=r.emit,s=r.bind,c=t.Elements,o=c.slides,d=c.list,p=[];function T(){S(),i(Be,v),i(Be,S)}function S(){o.forEach(function(w,B){m(w,B,-1)})}function v(){P(function(w){w.destroy()}),Et(p)}function g(){P(function(w){w.update()})}function m(w,B,V){var q=Ss(e,B,V,w);q.mount(),p.push(q),p.sort(function(Y,$){return Y.index-$.index})}function R(w){return w?A(function(B){return!B.isClone}):p}function b(w){var B=t.Controller,V=B.toIndex(w),q=B.hasFocus()?1:n.perPage;return A(function(Y){return nr(Y.index,V,V+q-1)})}function x(w){return A(w)[0]}function y(w,B){ct(w,function(V){if(Mt(V)&&(V=xo(V)),yo(V)){var q=o[B];q?ti(V,q):Nn(d,V),ft(V,n.classes.slide),I(V,Ae(a,cn))}}),a(Be)}function O(w){Gt(A(w).map(function(B){return B.slide})),a(Be)}function P(w,B){R(B).forEach(w)}function A(w){return p.filter(fo(w)?w:function(B){return Mt(w)?$n(B.slide,w):ei(Mn(w),B.index)})}function L(w,B,V){P(function(q){q.style(w,B,V)})}function I(w,B){var V=ni(w,"img"),q=V.length;q?V.forEach(function(Y){s(Y,"load error",function(){--q||B()})}):B()}function _(w){return w?o.length:p.length}function N(){return p.length>n.perPage}return{mount:T,destroy:v,update:g,register:m,get:R,getIn:b,getAt:x,add:y,remove:O,forEach:P,filter:A,style:L,getLength:_,isEnough:N}}function $s(e,t,n){var r=Oe(e),i=r.on,a=r.bind,s=r.emit,c=t.Slides,o=t.Direction.resolve,d=t.Elements,p=d.root,T=d.track,S=d.list,v=c.getAt,g=c.style,m,R,b;function x(){y(),a(window,"resize load",os(Ae(s,cn))),i([Je,Be],y),i(cn,O)}function y(){m=n.direction===Cr,ut(p,"maxWidth",jt(n.width)),ut(T,o("paddingLeft"),P(!1)),ut(T,o("paddingRight"),P(!0)),O(!0)}function O(H){var M=at(p);(H||R.width!==M.width||R.height!==M.height)&&(ut(T,"height",A()),g(o("marginRight"),jt(n.gap)),g("width",I()),g("height",_(),!0),R=M,s(hr),b!==(b=W())&&(wt(p,Yo,b),s(rs,b)))}function P(H){var M=n.padding,k=o(H?"right":"left");return M&&jt(M[k]||(wn(M)?0:M))||"0px"}function A(){var H="";return m&&(H=L(),Cn(H,"height or heightRatio is missing."),H="calc("+H+" - "+P(!1)+" - "+P(!0)+")"),H}function L(){return jt(n.height||at(S).width*n.heightRatio)}function I(){return n.autoWidth?null:jt(n.fixedWidth)||(m?"":N())}function _(){return jt(n.fixedHeight)||(m?n.autoHeight?null:N():L())}function N(){var H=jt(n.gap);return"calc((100%"+(H&&" + "+H)+")/"+(n.perPage||1)+(H&&" - "+H)+")"}function w(){return at(S)[o("width")]}function B(H,M){var k=v(H||0);return k?at(k.slide)[o("width")]+(M?0:Y()):0}function V(H,M){var k=v(H);if(k){var D=at(k.slide)[o("right")],Q=at(S)[o("left")];return tt(D-Q)+(M?0:Y())}return 0}function q(H){return V(e.length-1)-V(0)+B(0,H)}function Y(){var H=v(0);return H&&parseFloat(ut(H.slide,o("marginRight")))||0}function $(H){return parseFloat(ut(T,o("padding"+(H?"Right":"Left"))))||0}function W(){return e.is(Vn)||q(!0)>w()}return{mount:x,resize:O,listSize:w,slideSize:B,sliderSize:q,totalSize:V,getPadding:$,isOverflow:W}}var Ts=2;function Ls(e,t,n){var r=Oe(e),i=r.on,a=t.Elements,s=t.Slides,c=t.Direction.resolve,o=[],d;function p(){i(Be,T),i([Je,cn],v),(d=R())&&(g(d),t.Layout.resize(!0))}function T(){S(),p()}function S(){Gt(o),Et(o),r.destroy()}function v(){var b=R();d!==b&&(d<b||!b)&&r.emit(Be)}function g(b){var x=s.get().slice(),y=x.length;if(y){for(;x.length<b;)tr(x,x);tr(x.slice(-b),x.slice(0,b)).forEach(function(O,P){var A=P<b,L=m(O.slide,P);A?ti(L,x[0].slide):Nn(a.list,L),tr(o,L),s.register(L,P-b+(A?0:y),O.index)})}}function m(b,x){var y=b.cloneNode(!0);return ft(y,n.classes.clone),y.id=e.root.id+"-clone"+ii(x+1),y}function R(){var b=n.clones;if(!e.is(fn))b=0;else if(Fn(b)){var x=n[c("fixedWidth")]&&t.Layout.slideSize(0),y=x&&Pn(at(a.track)[c("width")]/x);b=y||n[c("autoWidth")]&&e.length||n.perPage*Ts}return b}return{mount:p,destroy:S}}function Es(e,t,n){var r=Oe(e),i=r.on,a=r.emit,s=e.state.set,c=t.Layout,o=c.slideSize,d=c.getPadding,p=c.totalSize,T=c.listSize,S=c.sliderSize,v=t.Direction,g=v.resolve,m=v.orient,R=t.Elements,b=R.list,x=R.track,y;function O(){y=t.Transition,i([Bt,hr,Je,Be],P)}function P(){t.Controller.isBusy()||(t.Scroll.cancel(),L(e.index),t.Slides.update())}function A(k,D,Q,re){k!==D&&H(k>Q)&&(w(),I(N(q(),k>Q),!0)),s(gn),a(Pt,D,Q,k),y.start(D,function(){s(ln),a(hn,D,Q,k),re&&re()})}function L(k){I(V(k,!0))}function I(k,D){if(!e.is(Vn)){var Q=D?k:_(k);ut(b,"transform","translate"+g("X")+"("+Q+"px)"),k!==Q&&a(No)}}function _(k){if(e.is(fn)){var D=B(k),Q=D>t.Controller.getEnd(),re=D<0;(re||Q)&&(k=N(k,Q))}return k}function N(k,D){var Q=k-W(D),re=S();return k-=m(re*(Pn(tt(Q)/re)||1))*(D?1:-1),k}function w(){I(q(),!0),y.cancel()}function B(k){for(var D=t.Slides.get(),Q=0,re=1/0,ie=0;ie<D.length;ie++){var ce=D[ie].index,C=tt(V(ce,!0)-k);if(C<=re)re=C,Q=ce;else break}return Q}function V(k,D){var Q=m(p(k-1)-$(k));return D?Y(Q):Q}function q(){var k=g("left");return at(b)[k]-at(x)[k]+m(d(!1))}function Y(k){return n.trimSpace&&e.is(dn)&&(k=tn(k,0,m(S(!0)-T()))),k}function $(k){var D=n.focus;return D==="center"?(T()-o(k,!0))/2:+D*o(k)||0}function W(k){return V(k?t.Controller.getEnd():0,!!n.trimSpace)}function H(k){var D=m(N(q(),k));return k?D>=0:D<=b[g("scrollWidth")]-at(x)[g("width")]}function M(k,D){D=Fn(D)?q():D;var Q=k!==!0&&m(D)<m(W(!1)),re=k!==!1&&m(D)>m(W(!0));return Q||re}return{mount:O,move:A,jump:L,translate:I,shift:N,cancel:w,toIndex:B,toPosition:V,getPosition:q,getLimit:W,exceededLimit:M,reposition:P}}function Ps(e,t,n){var r=Oe(e),i=r.on,a=r.emit,s=t.Move,c=s.getPosition,o=s.getLimit,d=s.toPosition,p=t.Slides,T=p.isEnough,S=p.getLength,v=n.omitEnd,g=e.is(fn),m=e.is(dn),R=Ae(q,!1),b=Ae(q,!0),x=n.start||0,y,O=x,P,A,L;function I(){_(),i([Je,Be,ur],_),i(hr,N)}function _(){P=S(!0),A=n.perMove,L=n.perPage,y=H();var C=tn(x,0,v?y:P-1);C!==x&&(x=C,s.reposition())}function N(){y!==H()&&a(ur)}function w(C,oe,Pe){if(!ce()){var ue=V(C),ye=W(ue);ye>-1&&(oe||ye!==x)&&(Q(ye),s.move(ue,ye,O,Pe))}}function B(C,oe,Pe,ue){t.Scroll.scroll(C,oe,Pe,function(){var ye=W(s.toIndex(c()));Q(v?Nt(ye,y):ye),ue&&ue()})}function V(C){var oe=x;if(Mt(C)){var Pe=C.match(/([+\-<>])(\d+)?/)||[],ue=Pe[1],ye=Pe[2];ue==="+"||ue==="-"?oe=Y(x+ +(""+ue+(+ye||1)),x):ue===">"?oe=ye?M(+ye):R(!0):ue==="<"&&(oe=b(!0))}else oe=g?C:tn(C,0,y);return oe}function q(C,oe){var Pe=A||(ie()?1:L),ue=Y(x+Pe*(C?-1:1),x,!(A||ie()));return ue===-1&&m&&!So(c(),o(!C),1)?C?0:y:oe?ue:W(ue)}function Y(C,oe,Pe){if(T()||ie()){var ue=$(C);ue!==C&&(oe=C,C=ue,Pe=!1),C<0||C>y?!A&&(nr(0,C,oe,!0)||nr(y,oe,C,!0))?C=M(k(C)):g?C=Pe?C<0?-(P%L||L):P:C:n.rewind?C=C<0?y:0:C=-1:Pe&&C!==oe&&(C=M(k(oe)+(C<oe?-1:1)))}else C=-1;return C}function $(C){if(m&&n.trimSpace==="move"&&C!==x)for(var oe=c();oe===d(C,!0)&&nr(C,0,e.length-1,!n.rewind);)C<x?--C:++C;return C}function W(C){return g?(C+P)%P||0:C}function H(){for(var C=P-(ie()||g&&A?1:L);v&&C-- >0;)if(d(P-1,!0)!==d(C,!0)){C++;break}return tn(C,0,P-1)}function M(C){return tn(ie()?C:L*C,0,y)}function k(C){return ie()?Nt(C,y):dr((C>=y?P-1:C)/L)}function D(C){var oe=s.toIndex(C);return m?tn(oe,0,y):oe}function Q(C){C!==x&&(O=x,x=C)}function re(C){return C?O:x}function ie(){return!Fn(n.focus)||n.isNavigation}function ce(){return e.state.is([gn,kn])&&!!n.waitForTransition}return{mount:I,go:w,scroll:B,getNext:R,getPrev:b,getAdjacent:q,getEnd:H,setIndex:Q,getIndex:re,toIndex:M,toPage:k,toDest:D,hasFocus:ie,isBusy:ce}}var _s="http://www.w3.org/2000/svg",As="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",qn=40;function Rs(e,t,n){var r=Oe(e),i=r.on,a=r.bind,s=r.emit,c=n.classes,o=n.i18n,d=t.Elements,p=t.Controller,T=d.arrows,S=d.track,v=T,g=d.prev,m=d.next,R,b,x={};function y(){P(),i(Je,O)}function O(){A(),y()}function P(){var B=n.arrows;B&&!(g&&m)&&_(),g&&m&&(Ln(x,{prev:g,next:m}),En(v,B?"":"none"),ft(v,b=gi+"--"+n.direction),B&&(L(),w(),ge([g,m],Bn,S.id),s(Ro,g,m)))}function A(){r.destroy(),$t(v,b),R?(Gt(T?[g,m]:v),g=m=null):yt([g,m],mi)}function L(){i([Bt,hn,Be,Xt,ur],w),a(m,"click",Ae(I,">")),a(g,"click",Ae(I,"<"))}function I(B){p.go(B,!0)}function _(){v=T||an("div",c.arrows),g=N(!0),m=N(!1),R=!0,Nn(v,[g,m]),!T&&ti(v,S)}function N(B){var V='<button class="'+c.arrow+" "+(B?c.prev:c.next)+'" type="button"><svg xmlns="'+_s+'" viewBox="0 0 '+qn+" "+qn+'" width="'+qn+'" height="'+qn+'" focusable="false"><path d="'+(n.arrowPath||As)+'" />';return xo(V)}function w(){if(g&&m){var B=e.index,V=p.getPrev(),q=p.getNext(),Y=V>-1&&B<V?o.last:o.prev,$=q>-1&&B>q?o.first:o.next;g.disabled=V<0,m.disabled=q<0,ge(g,st,Y),ge(m,st,$),s(Io,g,m,V,q)}}return{arrows:x,mount:y,destroy:A,update:w}}var Is=ri+"-interval";function Ws(e,t,n){var r=Oe(e),i=r.on,a=r.bind,s=r.emit,c=yr(n.interval,e.go.bind(e,">"),L),o=c.isPaused,d=t.Elements,p=t.Elements,T=p.root,S=p.toggle,v=n.autoplay,g,m,R=v==="pause";function b(){v&&(x(),S&&ge(S,Bn,d.track.id),R||y(),A())}function x(){n.pauseOnHover&&a(T,"mouseenter mouseleave",function(_){g=_.type==="mouseenter",P()}),n.pauseOnFocus&&a(T,"focusin focusout",function(_){m=_.type==="focusin",P()}),S&&a(S,"click",function(){R?y():O(!0)}),i([Pt,fr,Be],c.rewind),i(Pt,I)}function y(){o()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),m=g=R=!1,A(),s(li))}function O(_){_===void 0&&(_=!0),R=!!_,A(),o()||(c.pause(),s(ci))}function P(){R||(g||m?O(!1):y())}function A(){S&&(wt(S,Yt,!R),ge(S,st,n.i18n[R?"play":"pause"]))}function L(_){var N=d.bar;N&&ut(N,"width",_*100+"%"),s(Fo,_)}function I(_){var N=t.Slides.getAt(_);c.set(N&&+pt(N.slide,Is)||n.interval)}return{mount:b,destroy:c.cancel,play:y,pause:O,isPaused:o}}function ks(e,t,n){var r=Oe(e),i=r.on;function a(){n.cover&&(i(di,Ae(c,!0)),i([Bt,Je,Be],Ae(s,!0)))}function s(o){t.Slides.forEach(function(d){var p=Hn(d.container||d.slide,"img");p&&p.src&&c(o,p,d)})}function c(o,d,p){p.style("background",o?'center/cover no-repeat url("'+d.src+'")':"",!0),En(d,o?"none":"")}return{mount:a,destroy:Ae(s,!1)}}var Fs=10,Ms=600,Ns=.6,Hs=1.5,Os=800;function Bs(e,t,n){var r=Oe(e),i=r.on,a=r.emit,s=e.state.set,c=t.Move,o=c.getPosition,d=c.getLimit,p=c.exceededLimit,T=c.translate,S=e.is(dn),v,g,m=1;function R(){i(Pt,O),i([Je,Be],P)}function b(L,I,_,N,w){var B=o();if(O(),_&&(!S||!p())){var V=t.Layout.sliderSize(),q=jr(L)*V*dr(tt(L)/V)||0;L=c.toPosition(t.Controller.toDest(L%V))+q}var Y=So(B,L,1);m=1,I=Y?0:I||cr(tt(L-B)/Hs,Os),g=N,v=yr(I,x,Ae(y,B,L,w),1),s(kn),a(fr),v.start()}function x(){s(ln),g&&g(),a(Xt)}function y(L,I,_,N){var w=o(),B=L+(I-L)*A(N),V=(B-w)*m;T(w+V),S&&!_&&p()&&(m*=Ns,tt(V)<Fs&&b(d(p(!0)),Ms,!1,g,!0))}function O(){v&&v.cancel()}function P(){v&&!v.isPaused()&&(O(),x())}function A(L){var I=n.easingFunc;return I?I(L):1-Math.pow(1-L,4)}return{mount:R,destroy:O,scroll:b,cancel:P}}var nn={passive:!1,capture:!0};function Vs(e,t,n){var r=Oe(e),i=r.on,a=r.emit,s=r.bind,c=r.unbind,o=e.state,d=t.Move,p=t.Scroll,T=t.Controller,S=t.Elements.track,v=t.Media.reduce,g=t.Direction,m=g.resolve,R=g.orient,b=d.getPosition,x=d.exceededLimit,y,O,P,A,L,I=!1,_,N,w;function B(){s(S,Rr,Dr,nn),s(S,Ir,Dr,nn),s(S,Xo,q,nn),s(S,"click",W,{capture:!0}),s(S,"dragstart",St),i([Bt,Je],V)}function V(){var h=n.drag;ne(!h),A=h==="free"}function q(h){if(_=!1,!N){var f=ye(h);ue(h.target)&&(f||!h.button)&&(T.isBusy()?St(h,!0):(w=f?S:window,L=o.is([gn,kn]),P=null,s(w,Rr,Y,nn),s(w,Ir,$,nn),d.cancel(),p.cancel(),H(h)))}}function Y(h){if(o.is(er)||(o.set(er),a(Po)),h.cancelable)if(L){d.translate(y+Pe(ie(h)));var f=ce(h)>Hi,F=I!==(I=x());(f||F)&&H(h),_=!0,a(_o),St(h)}else D(h)&&(L=k(h),St(h))}function $(h){o.is(er)&&(o.set(ln),a(Ao)),L&&(M(h),St(h)),c(w,Rr,Y),c(w,Ir,$),L=!1}function W(h){!N&&_&&St(h,!0)}function H(h){P=O,O=h,y=b()}function M(h){var f=Q(h),F=re(f),z=n.rewind&&n.rewindByDrag;v(!1),A?T.scroll(F,0,n.snap):e.is(Vn)?T.go(R(jr(f))<0?z?"<":"-":z?">":"+"):e.is(dn)&&I&&z?T.go(x(!0)?">":"<"):T.go(T.toDest(F),!0),v(!0)}function k(h){var f=n.dragMinThreshold,F=wn(f),z=F&&f.mouse||0,G=(F?f.touch:+f)||10;return tt(ie(h))>(ye(h)?G:z)}function D(h){return tt(ie(h))>tt(ie(h,!0))}function Q(h){if(e.is(fn)||!I){var f=ce(h);if(f&&f<Hi)return ie(h)/f}return 0}function re(h){return b()+jr(h)*Nt(tt(h)*(n.flickPower||600),A?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function ie(h,f){return oe(h,f)-oe(C(h),f)}function ce(h){return zr(h)-zr(C(h))}function C(h){return O===h&&P||O}function oe(h,f){return(ye(h)?h.changedTouches[0]:h)["page"+m(f?"Y":"X")]}function Pe(h){return h/(I&&e.is(dn)?xs:1)}function ue(h){var f=n.noDrag;return!$n(h,"."+Ko+", ."+wr)&&(!f||!$n(h,f))}function ye(h){return typeof TouchEvent<"u"&&h instanceof TouchEvent}function Re(){return L}function ne(h){N=h}return{mount:B,disable:ne,isDragging:Re}}var Ds={Spacebar:" ",Right:xr,Left:br,Up:Ho,Down:Oo};function hi(e){return e=Mt(e)?e:e.key,Ds[e]||e}var Oi="keydown";function zs(e,t,n){var r=Oe(e),i=r.on,a=r.bind,s=r.unbind,c=e.root,o=t.Direction.resolve,d,p;function T(){S(),i(Je,v),i(Je,S),i(Pt,m)}function S(){var b=n.keyboard;b&&(d=b==="global"?window:c,a(d,Oi,R))}function v(){s(d,Oi)}function g(b){p=b}function m(){var b=p;p=!0,ho(function(){p=b})}function R(b){if(!p){var x=hi(b);x===o(br)?e.go("<"):x===o(xr)&&e.go(">")}}return{mount:T,destroy:v,disable:g}}var Sn=ri+"-lazy",rr=Sn+"-srcset",js="["+Sn+"], ["+rr+"]";function Ks(e,t,n){var r=Oe(e),i=r.on,a=r.off,s=r.bind,c=r.emit,o=n.lazyLoad==="sequential",d=[hn,Xt],p=[];function T(){n.lazyLoad&&(S(),i(Be,S))}function S(){Et(p),v(),o?b():(a(d),i(d,g),g())}function v(){t.Slides.forEach(function(x){ni(x.slide,js).forEach(function(y){var O=pt(y,Sn),P=pt(y,rr);if(O!==y.src||P!==y.srcset){var A=n.classes.spinner,L=y.parentElement,I=Hn(L,"."+A)||an("span",A,L);p.push([y,x,I]),y.src||En(y,"none")}})})}function g(){p=p.filter(function(x){var y=n.perPage*((n.preloadPages||1)+1)-1;return x[1].isWithin(e.index,y)?m(x):!0}),p.length||a(d)}function m(x){var y=x[0];ft(x[1].slide,Gr),s(y,"load error",Ae(R,x)),ge(y,"src",pt(y,Sn)),ge(y,"srcset",pt(y,rr)),yt(y,Sn),yt(y,rr)}function R(x,y){var O=x[0],P=x[1];$t(P.slide,Gr),y.type!=="error"&&(Gt(x[2]),En(O,""),c(di,O,P),c(cn)),o&&b()}function b(){p.length&&m(p.shift())}return{mount:T,destroy:Ae(Et,p),check:g}}function Us(e,t,n){var r=Oe(e),i=r.on,a=r.emit,s=r.bind,c=t.Slides,o=t.Elements,d=t.Controller,p=d.hasFocus,T=d.getIndex,S=d.go,v=t.Direction.resolve,g=o.pagination,m=[],R,b;function x(){y(),i([Je,Be,ur],x);var N=n.pagination;g&&En(g,N?"":"none"),N&&(i([Pt,fr,Xt],_),O(),_(),a(Wo,{list:R,items:m},I(e.index)))}function y(){R&&(Gt(g?Ot(R.children):R),$t(R,b),Et(m),R=null),r.destroy()}function O(){var N=e.length,w=n.classes,B=n.i18n,V=n.perPage,q=p()?d.getEnd()+1:Pn(N/V);R=g||an("ul",w.pagination,o.track.parentElement),ft(R,b=$r+"--"+L()),ge(R,Tt,"tablist"),ge(R,st,B.select),ge(R,pi,L()===Cr?"vertical":"");for(var Y=0;Y<q;Y++){var $=an("li",null,R),W=an("button",{class:w.page,type:"button"},$),H=c.getIn(Y).map(function(k){return k.slide.id}),M=!p()&&V>1?B.pageX:B.slideX;s(W,"click",Ae(P,Y)),n.paginationKeyboard&&s(W,"keydown",Ae(A,Y)),ge($,Tt,"presentation"),ge(W,Tt,"tab"),ge(W,Bn,H.join(" ")),ge(W,st,Kr(M,Y+1)),ge(W,sn,-1),m.push({li:$,button:W,page:Y})}}function P(N){S(">"+N,!0)}function A(N,w){var B=m.length,V=hi(w),q=L(),Y=-1;V===v(xr,!1,q)?Y=++N%B:V===v(br,!1,q)?Y=(--N+B)%B:V==="Home"?Y=0:V==="End"&&(Y=B-1);var $=m[Y];$&&(bo($.button),S(">"+Y),St(w,!0))}function L(){return n.paginationDirection||n.direction}function I(N){return m[d.toPage(N)]}function _(){var N=I(T(!0)),w=I(T());if(N){var B=N.button;$t(B,Yt),yt(B,Wi),ge(B,sn,-1)}if(w){var V=w.button;ft(V,Yt),ge(V,Wi,!0),ge(V,sn,"")}a(ko,{list:R,items:m},N,w)}return{items:m,mount:x,destroy:y,getAt:I,update:_}}var qs=[" ","Enter"];function Gs(e,t,n){var r=n.isNavigation,i=n.slideFocus,a=[];function s(){e.splides.forEach(function(g){g.isParent||(d(e,g.splide),d(g.splide,e))}),r&&p()}function c(){a.forEach(function(g){g.destroy()}),Et(a)}function o(){c(),s()}function d(g,m){var R=Oe(g);R.on(Pt,function(b,x,y){m.go(m.is(fn)?y:b)}),a.push(R)}function p(){var g=Oe(e),m=g.on;m(oi,S),m(Mo,v),m([Bt,Je],T),a.push(g),g.emit(si,e.splides)}function T(){ge(t.Elements.list,pi,n.direction===Cr?"vertical":"")}function S(g){e.go(g.index)}function v(g,m){ei(qs,hi(m))&&(S(g),St(m))}return{setup:Ae(t.Media.set,{slideFocus:Fn(i)?r:i},!0),mount:s,destroy:c,remount:o}}function Ys(e,t,n){var r=Oe(e),i=r.bind,a=0;function s(){n.wheel&&i(t.Elements.track,"wheel",c,nn)}function c(d){if(d.cancelable){var p=d.deltaY,T=p<0,S=zr(d),v=n.wheelMinThreshold||0,g=n.wheelSleep||0;tt(p)>v&&S-a>g&&(e.go(T?"<":">"),a=S),o(T)&&St(d)}}function o(d){return!n.releaseWheel||e.state.is(gn)||t.Controller.getAdjacent(d)!==-1}return{mount:s}}var Xs=90;function Zs(e,t,n){var r=Oe(e),i=r.on,a=t.Elements.track,s=n.live&&!n.isNavigation,c=an("span",hs),o=yr(Xs,Ae(p,!1));function d(){s&&(S(!t.Autoplay.isPaused()),ge(a,Mi,!0),c.textContent="…",i(li,Ae(S,!0)),i(ci,Ae(S,!1)),i([hn,Xt],Ae(p,!0)))}function p(v){ge(a,Fi,v),v?(Nn(a,c),o.start()):(Gt(c),o.cancel())}function T(){yt(a,[ki,Mi,Fi]),Gt(c)}function S(v){s&&ge(a,ki,v?"off":"polite")}return{mount:d,disable:S,destroy:T}}var Js=Object.freeze({__proto__:null,Media:as,Direction:ss,Elements:Cs,Slides:ws,Layout:$s,Clones:Ls,Move:Es,Controller:Ps,Arrows:Rs,Autoplay:Ws,Cover:ks,Scroll:Bs,Drag:Vs,Keyboard:zs,LazyLoad:Ks,Pagination:Us,Sync:Gs,Wheel:Ys,Live:Zs}),Qs={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"},el={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:vs,i18n:Qs,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function tl(e,t,n){var r=t.Slides;function i(){Oe(e).on([Bt,Be],a)}function a(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function s(c,o){r.style("transition","opacity "+n.speed+"ms "+n.easing),ho(o)}return{mount:i,start:s,cancel:Dr}}function nl(e,t,n){var r=t.Move,i=t.Controller,a=t.Scroll,s=t.Elements.list,c=Ae(ut,s,"transition"),o;function d(){Oe(e).bind(s,"transitionend",function(v){v.target===s&&o&&(T(),o())})}function p(v,g){var m=r.toPosition(v,!0),R=r.getPosition(),b=S(v);tt(m-R)>=1&&b>=1?n.useScroll?a.scroll(m,b,!1,g):(c("transform "+b+"ms "+n.easing),r.translate(m,!0),o=g):(r.jump(v),g())}function T(){c(""),a.cancel()}function S(v){var g=n.rewindSpeed;if(e.is(dn)&&g){var m=i.getIndex(!0),R=i.getEnd();if(m===0&&v>=R||m>=R&&v===0)return g}return n.speed}return{mount:d,start:p,cancel:T}}var rl=(function(){function e(n,r){this.event=Oe(),this.Components={},this.state=is(on),this.splides=[],this._o={},this._E={};var i=Mt(n)?Co(document,n):n;Cn(i,i+" is invalid."),this.root=i,r=kt({label:pt(i,st)||"",labelledby:pt(i,ui)||""},el,e.defaults,r||{});try{kt(r,JSON.parse(pt(i,ri)))}catch{Cn(!1,"Invalid JSON")}this._o=Object.create(kt({},r))}var t=e.prototype;return t.mount=function(r,i){var a=this,s=this.state,c=this.Components;Cn(s.is([on,lr]),"Already mounted!"),s.set(on),this._C=c,this._T=i||this._T||(this.is(Vn)?tl:nl),this._E=r||this._E;var o=Ln({},Js,this._E,{Transition:this._T});return qt(o,function(d,p){var T=d(a,c,a._o);c[p]=T,T.setup&&T.setup()}),qt(c,function(d){d.mount&&d.mount()}),this.emit(Bt),ft(this.root,fs),s.set(ln),this.emit(Ur),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(ln)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,i){return this.event.on(r,i),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var i;return(i=this.event).emit.apply(i,[r].concat(Ot(arguments,1))),this},t.add=function(r,i){return this._C.Slides.add(r,i),this},t.remove=function(r){return this._C.Slides.remove(r),this},t.is=function(r){return this._o.type===r},t.refresh=function(){return this.emit(Be),this},t.destroy=function(r){r===void 0&&(r=!0);var i=this.event,a=this.state;return a.is(on)?Oe(this).on(Ur,this.destroy.bind(this,r)):(qt(this._C,function(s){s.destroy&&s.destroy(r)},!0),i.emit(ai),i.destroy(),r&&Et(this.splides),a.set(lr)),this},Qa(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})(),fi=rl;fi.defaults={};fi.STATES=ts;var Bi=[[Bt,"onMounted"],[Ur,"onReady"],[Pt,"onMove"],[hn,"onMoved"],[oi,"onClick"],[$o,"onActive"],[To,"onInactive"],[Lo,"onVisible"],[Eo,"onHidden"],[Be,"onRefresh"],[Je,"onUpdated"],[cn,"onResize"],[hr,"onResized"],[Po,"onDrag"],[_o,"onDragging"],[Ao,"onDragged"],[fr,"onScroll"],[Xt,"onScrolled"],[ai,"onDestroy"],[Ro,"onArrowsMounted"],[Io,"onArrowsUpdated"],[Wo,"onPaginationMounted"],[ko,"onPaginationUpdated"],[si,"onNavigationMounted"],[li,"onAutoplayPlay"],[Fo,"onAutoplayPlaying"],[ci,"onAutoplayPause"],[di,"onLazyLoadLoaded"]];function yi(...e){return e.filter(Boolean).join(" ")}function pr(e){return e!==null&&typeof e=="object"}function Yr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!Yr(n,t[r]));if(pr(e)&&pr(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(i=>!Object.prototype.hasOwnProperty.call(t,i)||!Yr(e[i],t[i]))}return e===t}function il(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function ol(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const i=n[r];if(i!=="__proto__"&&t(e[i],i)===!1)break}}return e}function Xr(e,t){const n=e;return ol(t,(r,i)=>{Array.isArray(r)?n[i]=r.slice():pr(r)?n[i]=Xr(pr(n[i])?n[i]:{},r):n[i]=r}),n}var al=({children:e,className:t,...n})=>u.createElement("div",{className:yi("splide__track",t),...n},u.createElement("ul",{className:"splide__list"},e)),vi=class extends u.Component{constructor(){super(...arguments),this.splideRef=u.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new fi(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Xr({},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&&!Yr(this.options,e)&&(this.splide.options=e,this.options=Xr({},e));const t=this.getSlides();il(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){Bi.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...i)=>{r(e,...i)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:r,...i}=this.props;return u.createElement(t,{className:yi("splide",e),ref:this.splideRef,...this.omit(i,["options",...Bi.map(a=>a[1])])},n?u.createElement(al,null,r):r)}},bi=({children:e,className:t,...n})=>u.createElement("li",{className:yi("splide__slide",t),...n},e);/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),u=require("react"),Le=require("classnames"),w=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),So=require("react-dom");function fa(e){return e.type==="object"&&e.version===1}const ya="ControlSlider-module__wrapper___sHEkd",va="ControlSlider-module__hoverArrow___A-dOH",ba="ControlSlider-module__sliderItem___QQSkR",xa="ControlSlider-module__sliderImage___9hRl-",Ca="ControlSlider-module__arrow___05ghY",Sa="ControlSlider-module__arrowVertical___tBfVN",$a="ControlSlider-module__nextArrow___-30Yc",wa="ControlSlider-module__arrowInner___aEra3",Ta="ControlSlider-module__arrowIcon___S4ztF",La="ControlSlider-module__arrowImg___2dwJW",Ea="ControlSlider-module__mirror___brd6U",Pa="ControlSlider-module__pagination___bicLF",_a="ControlSlider-module__paginationInner___bT-P-",Aa="ControlSlider-module__paginationVertical___zYqKw",Ra="ControlSlider-module__paginationItem___nTRbk",Ia="ControlSlider-module__dot___p1Qun",ka="ControlSlider-module__activeDot___LHFaj",Wa="ControlSlider-module__paginationInsideBottom___R3FWn",Ma="ControlSlider-module__paginationInsideTop___V-qb-",Fa="ControlSlider-module__paginationOutsideBottom___14w8D",Na="ControlSlider-module__paginationOutsideTop___SCLqB",Ha="ControlSlider-module__paginationInsideLeft___yOBRZ",Ba="ControlSlider-module__paginationInsideRight___Rtt3o",Oa="ControlSlider-module__paginationOutsideLeft___lahaw",Va="ControlSlider-module__paginationOutsideRight___EtuQa",Da="ControlSlider-module__imgWrapper___UjEgB",ja="ControlSlider-module__captionBlock___dJ6-j",za="ControlSlider-module__captionTextWrapper___HFlpf",Ka="ControlSlider-module__captionText___uGBVc",Ua="ControlSlider-module__active___WZK4G",qa="ControlSlider-module__withPointerEvents___t-18M",Ga="ControlSlider-module__topLeftAlignment___zjnGM",Ya="ControlSlider-module__topCenterAlignment___gD1xW",Xa="ControlSlider-module__topRightAlignment___NMapS",Za="ControlSlider-module__middleLeftAlignment___OnUrY",Ja="ControlSlider-module__middleCenterAlignment___Tdkl0",Qa="ControlSlider-module__middleRightAlignment___wEbfX",es="ControlSlider-module__bottomLeftAlignment___cTP2-",ts="ControlSlider-module__bottomCenterAlignment___c54fB",ns="ControlSlider-module__bottomRightAlignment___kEwrz",rs="ControlSlider-module__clickOverlay___DZA28",is="ControlSlider-module__contain___pLyq7",os="ControlSlider-module__cover___KdDat",se={wrapper:ya,hoverArrow:va,sliderItem:ba,sliderImage:xa,arrow:Ca,arrowVertical:Sa,nextArrow:$a,arrowInner:wa,arrowIcon:Ta,arrowImg:La,mirror:Ea,pagination:Pa,paginationInner:_a,paginationVertical:Aa,paginationItem:Ra,dot:Ia,activeDot:ka,paginationInsideBottom:Wa,paginationInsideTop:Ma,paginationOutsideBottom:Fa,paginationOutsideTop:Na,paginationInsideLeft:Ha,paginationInsideRight:Ba,paginationOutsideLeft:Oa,paginationOutsideRight:Va,imgWrapper:Da,captionBlock:ja,captionTextWrapper:za,captionText:Ka,active:Ua,withPointerEvents:qa,topLeftAlignment:Ga,topCenterAlignment:Ya,topRightAlignment:Xa,middleLeftAlignment:Za,middleCenterAlignment:Ja,middleRightAlignment:Qa,bottomLeftAlignment:es,bottomCenterAlignment:ts,bottomRightAlignment:ns,clickOverlay:rs,contain:is,cover:os};function as(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 ss(e,t,n){return t&&as(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Wi="(prefers-reduced-motion: reduce)",un=1,ls=2,gn=3,xn=4,On=5,or=6,mr=7,cs={CREATED:un,MOUNTED:ls,IDLE:gn,MOVING:xn,SCROLLING:On,DRAGGING:or,DESTROYED:mr};function kt(e){e.length=0}function Dt(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ae(e){return e.bind.apply(e,[null].concat(Dt(arguments,1)))}var $o=setTimeout,Gr=function(){};function Mi(e){return requestAnimationFrame(e)}function br(e,t){return typeof t===e}function _n(e){return!oi(e)&&br("object",e)}var ii=Array.isArray,wo=Ae(br,"function"),Bt=Ae(br,"string"),Vn=Ae(br,"undefined");function oi(e){return e===null}function To(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Dn(e){return ii(e)?e:[e]}function gt(e,t){Dn(e).forEach(t)}function ai(e,t){return e.indexOf(t)>-1}function ar(e,t){return e.push.apply(e,Dn(t)),e}function _t(e,t,n){e&>(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function St(e,t){_t(e,Bt(t)?t.split(" "):t,!0)}function jn(e,t){gt(t,e.appendChild.bind(e))}function si(e,t){gt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function An(e,t){return To(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Lo(e,t){var n=e?Dt(e.children):[];return t?n.filter(function(r){return An(r,t)}):n}function zn(e,t){return t?Lo(e,t)[0]:e.firstElementChild}var Rn=Object.keys;function Zt(e,t,n){return e&&(n?Rn(e).reverse():Rn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function In(e){return Dt(arguments,1).forEach(function(t){Zt(t,function(n,r){e[r]=t[r]})}),e}function Nt(e){return Dt(arguments,1).forEach(function(t){Zt(t,function(n,r){ii(n)?e[r]=n.slice():_n(n)?e[r]=Nt({},_n(e[r])?e[r]:{},n):e[r]=n})}),e}function Fi(e,t){gt(t||Rn(e),function(n){delete e[n]})}function $t(e,t){gt(e,function(n){gt(t,function(r){n&&n.removeAttribute(r)})})}function fe(e,t,n){_n(t)?Zt(t,function(r,i){fe(e,i,r)}):gt(e,function(r){oi(n)||n===""?$t(r,t):r.setAttribute(t,String(n))})}function pn(e,t,n){var r=document.createElement(e);return t&&(Bt(t)?St(r,t):fe(r,t)),n&&jn(n,r),r}function ht(e,t,n){if(Vn(n))return getComputedStyle(e)[t];oi(n)||(e.style[t]=""+n)}function kn(e,t){ht(e,"display",t)}function Eo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function ft(e,t){return e.getAttribute(t)}function Ni(e,t){return e&&e.classList.contains(t)}function ut(e){return e.getBoundingClientRect()}function Jt(e){gt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Po(e){return zn(new DOMParser().parseFromString(e,"text/html").body)}function Pt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function _o(e,t){return e&&e.querySelector(t)}function li(e,t){return t?Dt(e.querySelectorAll(t)):[]}function At(e,t){_t(e,t,!1)}function Yr(e){return e.timeStamp}function Gt(e){return Bt(e)?e:e?e+"px":""}var Kn="splide",ci="data-"+Kn;function En(e,t){if(!e)throw new Error("["+Kn+"] "+(t||""))}var Ot=Math.min,gr=Math.max,hr=Math.floor,Wn=Math.ceil,tt=Math.abs;function Ao(e,t,n){return tt(e-t)<n}function sr(e,t,n,r){var i=Ot(t,n),a=gr(t,n);return r?i<e&&e<a:i<=e&&e<=a}function ln(e,t,n){var r=Ot(t,n),i=gr(t,n);return Ot(gr(r,e),i)}function Xr(e){return+(e>0)-+(e<0)}function Zr(e,t){return gt(t,function(n){e=e.replace("%s",""+n)}),e}function di(e){return e<10?"0"+e:""+e}var Hi={};function ds(e){return""+e+di(Hi[e]=(Hi[e]||0)+1)}function Ro(){var e=[];function t(s,c,o,d){i(s,c,function(p,T,x){var y="addEventListener"in p,g=y?p.removeEventListener.bind(p,T,o,d):p.removeListener.bind(p,o);y?p.addEventListener(T,o,d):p.addListener(o),e.push([p,T,x,o,g])})}function n(s,c,o){i(s,c,function(d,p,T){e=e.filter(function(x){return x[0]===d&&x[1]===p&&x[2]===T&&(!o||x[3]===o)?(x[4](),!1):!0})})}function r(s,c,o){var d,p=!0;return typeof CustomEvent=="function"?d=new CustomEvent(c,{bubbles:p,detail:o}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(c,p,!1,o)),s.dispatchEvent(d),d}function i(s,c,o){gt(s,function(d){d&>(c,function(p){p.split(" ").forEach(function(T){var x=T.split(".");o(d,x[0],x[1])})})})}function a(){e.forEach(function(s){s[4]()}),kt(e)}return{bind:t,unbind:n,dispatch:r,destroy:a}}var jt="mounted",Jr="ready",Wt="move",Cn="moved",ui="click",Io="active",ko="inactive",Wo="visible",Mo="hidden",Oe="refresh",Ze="updated",hn="resize",xr="resized",Fo="drag",No="dragging",Ho="dragged",Cr="scroll",en="scrolled",us="overflow",pi="destroy",Bo="arrows:mounted",Oo="arrows:updated",Vo="pagination:mounted",Do="pagination:updated",mi="navigation:mounted",gi="autoplay:play",jo="autoplay:playing",hi="autoplay:pause",fi="lazyload:loaded",zo="sk",Ko="sh",fr="ei";function We(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Ro();function r(a,s){n.bind(t,Dn(a).join(" "),function(c){s.apply(s,ii(c.detail)?c.detail:[])})}function i(a){n.dispatch(t,a,Dt(arguments,1))}return e&&e.event.on(pi,n.destroy),In(n,{bus:t,on:r,off:Ae(n.unbind,t),emit:i})}function Sr(e,t,n,r){var i=Date.now,a,s=0,c,o=!0,d=0;function p(){if(!o){if(s=e?Ot((i()-a)/e,1):1,n&&n(s),s>=1&&(t(),a=i(),r&&++d>=r))return x();c=Mi(p)}}function T(C){C||g(),a=i()-(C?s*e:0),o=!1,c=Mi(p)}function x(){o=!0}function y(){a=i(),s=0,n&&n(s)}function g(){c&&cancelAnimationFrame(c),s=0,c=0,o=!0}function h(C){e=C}function P(){return o}return{start:T,rewind:y,pause:x,cancel:g,set:h,isPaused:P}}function ps(e){var t=e;function n(i){t=i}function r(i){return ai(Dn(i),t)}return{set:n,is:r}}function ms(e,t){var n=Sr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function gs(e,t,n){var r=e.state,i=n.breakpoints||{},a=n.reducedMotion||{},s=Ro(),c=[];function o(){var g=n.mediaQuery==="min";Rn(i).sort(function(h,P){return g?+h-+P:+P-+h}).forEach(function(h){p(i[h],"("+(g?"min":"max")+"-width:"+h+"px)")}),p(a,Wi),T()}function d(g){g&&s.destroy()}function p(g,h){var P=matchMedia(h);s.bind(P,"change",T),c.push([g,P])}function T(){var g=r.is(mr),h=n.direction,P=c.reduce(function(C,f){return Nt(C,f[1].matches?f[0]:{})},{});Fi(n),y(P),n.destroy?e.destroy(n.destroy==="completely"):g?(d(!0),e.mount()):h!==n.direction&&e.refresh()}function x(g){matchMedia(Wi).matches&&(g?Nt(n,a):Fi(n,Rn(a)))}function y(g,h,P){Nt(n,g),h&&Nt(Object.getPrototypeOf(n),g),(P||!r.is(un))&&e.emit(Ze,n)}return{setup:o,destroy:d,reduce:x,set:y}}var $r="Arrow",wr=$r+"Left",Tr=$r+"Right",Uo=$r+"Up",qo=$r+"Down",Bi="rtl",Lr="ttb",Mr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Uo,Tr],ArrowRight:[qo,wr]};function hs(e,t,n){function r(a,s,c){c=c||n.direction;var o=c===Bi&&!s?1:c===Lr?0:-1;return Mr[a]&&Mr[a][o]||a.replace(/width|left|right/i,function(d,p){var T=Mr[d.toLowerCase()][o]||d;return p>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function i(a){return a*(n.direction===Bi?1:-1)}return{resolve:r,orient:i}}var Rt="role",mn="tabindex",fs="disabled",yt="aria-",Un=yt+"controls",Go=yt+"current",Oi=yt+"selected",pt=yt+"label",yi=yt+"labelledby",Yo=yt+"hidden",vi=yt+"orientation",Mn=yt+"roledescription",Vi=yt+"live",Di=yt+"busy",ji=yt+"atomic",bi=[Rt,mn,fs,Un,Go,pt,yi,Yo,vi,Mn],wt=Kn+"__",zt="is-",Fr=Kn,zi=wt+"track",ys=wt+"list",Er=wt+"slide",Xo=Er+"--clone",vs=Er+"__container",xi=wt+"arrows",Pr=wt+"arrow",Zo=Pr+"--prev",Jo=Pr+"--next",_r=wt+"pagination",Qo=_r+"__page",bs=wt+"progress",xs=bs+"__bar",Cs=wt+"toggle",Ss=wt+"spinner",$s=wt+"sr",ws=zt+"initialized",Qt=zt+"active",ea=zt+"prev",ta=zt+"next",Qr=zt+"visible",ei=zt+"loading",na=zt+"focus-in",ra=zt+"overflow",Ts=[Qt,Qr,ea,ta,ei,na,ra],Ls={slide:Er,clone:Xo,arrows:xi,arrow:Pr,prev:Zo,next:Jo,pagination:_r,page:Qo,spinner:Ss};function Es(e,t){if(wo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!An(n,t);)n=n.parentElement;return n}var Ps=5,Ki=200,ia="touchstart mousedown",Nr="touchmove mousemove",Hr="touchend touchcancel mouseup click";function _s(e,t,n){var r=We(e),i=r.on,a=r.bind,s=e.root,c=n.i18n,o={},d=[],p=[],T=[],x,y,g;function h(){b(),M(),f()}function P(){i(Oe,C),i(Oe,h),i(Ze,f),a(document,ia+" keydown",function(S){g=S.type==="keydown"},{capture:!0}),a(s,"focusin",function(){_t(s,na,!!g)})}function C(S){var A=bi.concat("style");kt(d),At(s,p),At(x,T),$t([x,y],A),$t(s,S?A:["style",Mn])}function f(){At(s,p),At(x,T),p=E(Fr),T=E(zi),St(s,p),St(x,T),fe(s,pt,n.label),fe(s,yi,n.labelledby)}function b(){x=_("."+zi),y=zn(x,"."+ys),En(x&&y,"A track/list element is missing."),ar(d,Lo(y,"."+Er+":not(."+Xo+")")),Zt({arrows:xi,pagination:_r,prev:Zo,next:Jo,bar:xs,toggle:Cs},function(S,A){o[A]=_("."+S)}),In(o,{root:s,track:x,list:y,slides:d})}function M(){var S=s.id||ds(Kn),A=n.role;s.id=S,x.id=x.id||S+"-track",y.id=y.id||S+"-list",!ft(s,Rt)&&s.tagName!=="SECTION"&&A&&fe(s,Rt,A),fe(s,Mn,c.carousel),fe(y,Rt,"presentation")}function _(S){var A=_o(s,S);return A&&Es(A,"."+Fr)===s?A:void 0}function E(S){return[S+"--"+n.type,S+"--"+n.direction,n.drag&&S+"--draggable",n.isNavigation&&S+"--nav",S===Fr&&Qt]}return In(o,{setup:h,mount:P,destroy:C})}var fn="slide",Sn="loop",qn="fade";function As(e,t,n,r){var i=We(e),a=i.on,s=i.emit,c=i.bind,o=e.Components,d=e.root,p=e.options,T=p.isNavigation,x=p.updateOnMove,y=p.i18n,g=p.pagination,h=p.slideFocus,P=o.Direction.resolve,C=ft(r,"style"),f=ft(r,pt),b=n>-1,M=zn(r,"."+vs),_;function E(){b||(r.id=d.id+"-slide"+di(t+1),fe(r,Rt,g?"tabpanel":"group"),fe(r,Mn,y.slide),fe(r,pt,f||Zr(y.slideLabel,[t+1,e.length]))),S()}function S(){c(r,"click",Ae(s,ui,B)),c(r,"keydown",Ae(s,zo,B)),a([Cn,Ko,en],$),a(mi,I),x&&a(Wt,k)}function A(){_=!0,i.destroy(),At(r,Ts),$t(r,bi),fe(r,"style",C),fe(r,pt,f||"")}function I(){var F=e.splides.map(function(W){var j=W.splide.Components.Slides.getAt(t);return j?j.slide.id:""}).join(" ");fe(r,pt,Zr(y.slideX,(b?n:t)+1)),fe(r,Un,F),fe(r,Rt,h?"button":""),h&&$t(r,Mn)}function k(){_||$()}function $(){if(!_){var F=e.index;O(),V(),_t(r,ea,t===F-1),_t(r,ta,t===F+1)}}function O(){var F=Y();F!==Ni(r,Qt)&&(_t(r,Qt,F),fe(r,Go,T&&F||""),s(F?Io:ko,B))}function V(){var F=L(),W=!F&&(!Y()||b);if(e.state.is([xn,On])||fe(r,Yo,W||""),fe(li(r,p.focusableNodes||""),mn,W?-1:""),h&&fe(r,mn,W?-1:0),F!==Ni(r,Qr)&&(_t(r,Qr,F),s(F?Wo:Mo,B)),!F&&document.activeElement===r){var j=o.Slides.getAt(e.index);j&&Eo(j.slide)}}function q(F,W,j){ht(j&&M||r,F,W)}function Y(){var F=e.index;return F===t||p.cloneStatus&&F===n}function L(){if(e.is(qn))return Y();var F=ut(o.Elements.track),W=ut(r),j=P("left",!0),Q=P("right",!0);return hr(F[j])<=Wn(W[j])&&hr(W[Q])<=Wn(F[Q])}function R(F,W){var j=tt(F-t);return!b&&(p.rewind||e.is(Sn))&&(j=Ot(j,e.length-j)),j<=W}var B={index:t,slideIndex:n,slide:r,container:M,isClone:b,mount:E,destroy:A,update:$,style:q,isWithin:R};return B}function Rs(e,t,n){var r=We(e),i=r.on,a=r.emit,s=r.bind,c=t.Elements,o=c.slides,d=c.list,p=[];function T(){x(),i(Oe,y),i(Oe,x)}function x(){o.forEach(function($,O){h($,O,-1)})}function y(){_(function($){$.destroy()}),kt(p)}function g(){_(function($){$.update()})}function h($,O,V){var q=As(e,O,V,$);q.mount(),p.push(q),p.sort(function(Y,L){return Y.index-L.index})}function P($){return $?E(function(O){return!O.isClone}):p}function C($){var O=t.Controller,V=O.toIndex($),q=O.hasFocus()?1:n.perPage;return E(function(Y){return sr(Y.index,V,V+q-1)})}function f($){return E($)[0]}function b($,O){gt($,function(V){if(Bt(V)&&(V=Po(V)),To(V)){var q=o[O];q?si(V,q):jn(d,V),St(V,n.classes.slide),A(V,Ae(a,hn))}}),a(Oe)}function M($){Jt(E($).map(function(O){return O.slide})),a(Oe)}function _($,O){P(O).forEach($)}function E($){return p.filter(wo($)?$:function(O){return Bt($)?An(O.slide,$):ai(Dn($),O.index)})}function S($,O,V){_(function(q){q.style($,O,V)})}function A($,O){var V=li($,"img"),q=V.length;q?V.forEach(function(Y){s(Y,"load error",function(){--q||O()})}):O()}function I($){return $?o.length:p.length}function k(){return p.length>n.perPage}return{mount:T,destroy:y,update:g,register:h,get:P,getIn:C,getAt:f,add:b,remove:M,forEach:_,filter:E,style:S,getLength:I,isEnough:k}}function Is(e,t,n){var r=We(e),i=r.on,a=r.bind,s=r.emit,c=t.Slides,o=t.Direction.resolve,d=t.Elements,p=d.root,T=d.track,x=d.list,y=c.getAt,g=c.style,h,P,C;function f(){b(),a(window,"resize load",ms(Ae(s,hn))),i([Ze,Oe],b),i(hn,M)}function b(){h=n.direction===Lr,ht(p,"maxWidth",Gt(n.width)),ht(T,o("paddingLeft"),_(!1)),ht(T,o("paddingRight"),_(!0)),M(!0)}function M(B){var F=ut(p);(B||P.width!==F.width||P.height!==F.height)&&(ht(T,"height",E()),g(o("marginRight"),Gt(n.gap)),g("width",A()),g("height",I(),!0),P=F,s(xr),C!==(C=R())&&(_t(p,ra,C),s(us,C)))}function _(B){var F=n.padding,W=o(B?"right":"left");return F&&Gt(F[W]||(_n(F)?0:F))||"0px"}function E(){var B="";return h&&(B=S(),En(B,"height or heightRatio is missing."),B="calc("+B+" - "+_(!1)+" - "+_(!0)+")"),B}function S(){return Gt(n.height||ut(x).width*n.heightRatio)}function A(){return n.autoWidth?null:Gt(n.fixedWidth)||(h?"":k())}function I(){return Gt(n.fixedHeight)||(h?n.autoHeight?null:k():S())}function k(){var B=Gt(n.gap);return"calc((100%"+(B&&" + "+B)+")/"+(n.perPage||1)+(B&&" - "+B)+")"}function $(){return ut(x)[o("width")]}function O(B,F){var W=y(B||0);return W?ut(W.slide)[o("width")]+(F?0:Y()):0}function V(B,F){var W=y(B);if(W){var j=ut(W.slide)[o("right")],Q=ut(x)[o("left")];return tt(j-Q)+(F?0:Y())}return 0}function q(B){return V(e.length-1)-V(0)+O(0,B)}function Y(){var B=y(0);return B&&parseFloat(ht(B.slide,o("marginRight")))||0}function L(B){return parseFloat(ht(T,o("padding"+(B?"Right":"Left"))))||0}function R(){return e.is(qn)||q(!0)>$()}return{mount:f,resize:M,listSize:$,slideSize:O,sliderSize:q,totalSize:V,getPadding:L,isOverflow:R}}var ks=2;function Ws(e,t,n){var r=We(e),i=r.on,a=t.Elements,s=t.Slides,c=t.Direction.resolve,o=[],d;function p(){i(Oe,T),i([Ze,hn],y),(d=P())&&(g(d),t.Layout.resize(!0))}function T(){x(),p()}function x(){Jt(o),kt(o),r.destroy()}function y(){var C=P();d!==C&&(d<C||!C)&&r.emit(Oe)}function g(C){var f=s.get().slice(),b=f.length;if(b){for(;f.length<C;)ar(f,f);ar(f.slice(-C),f.slice(0,C)).forEach(function(M,_){var E=_<C,S=h(M.slide,_);E?si(S,f[0].slide):jn(a.list,S),ar(o,S),s.register(S,_-C+(E?0:b),M.index)})}}function h(C,f){var b=C.cloneNode(!0);return St(b,n.classes.clone),b.id=e.root.id+"-clone"+di(f+1),b}function P(){var C=n.clones;if(!e.is(Sn))C=0;else if(Vn(C)){var f=n[c("fixedWidth")]&&t.Layout.slideSize(0),b=f&&Wn(ut(a.track)[c("width")]/f);C=b||n[c("autoWidth")]&&e.length||n.perPage*ks}return C}return{mount:p,destroy:x}}function Ms(e,t,n){var r=We(e),i=r.on,a=r.emit,s=e.state.set,c=t.Layout,o=c.slideSize,d=c.getPadding,p=c.totalSize,T=c.listSize,x=c.sliderSize,y=t.Direction,g=y.resolve,h=y.orient,P=t.Elements,C=P.list,f=P.track,b;function M(){b=t.Transition,i([jt,xr,Ze,Oe],_)}function _(){t.Controller.isBusy()||(t.Scroll.cancel(),S(e.index),t.Slides.update())}function E(W,j,Q,oe){W!==j&&B(W>Q)&&($(),A(k(q(),W>Q),!0)),s(xn),a(Wt,j,Q,W),b.start(j,function(){s(gn),a(Cn,j,Q,W),oe&&oe()})}function S(W){A(V(W,!0))}function A(W,j){if(!e.is(qn)){var Q=j?W:I(W);ht(C,"transform","translate"+g("X")+"("+Q+"px)"),W!==Q&&a(Ko)}}function I(W){if(e.is(Sn)){var j=O(W),Q=j>t.Controller.getEnd(),oe=j<0;(oe||Q)&&(W=k(W,Q))}return W}function k(W,j){var Q=W-R(j),oe=x();return W-=h(oe*(Wn(tt(Q)/oe)||1))*(j?1:-1),W}function $(){A(q(),!0),b.cancel()}function O(W){for(var j=t.Slides.get(),Q=0,oe=1/0,te=0;te<j.length;te++){var ce=j[te].index,v=tt(V(ce,!0)-W);if(v<=oe)oe=v,Q=ce;else break}return Q}function V(W,j){var Q=h(p(W-1)-L(W));return j?Y(Q):Q}function q(){var W=g("left");return ut(C)[W]-ut(f)[W]+h(d(!1))}function Y(W){return n.trimSpace&&e.is(fn)&&(W=ln(W,0,h(x(!0)-T()))),W}function L(W){var j=n.focus;return j==="center"?(T()-o(W,!0))/2:+j*o(W)||0}function R(W){return V(W?t.Controller.getEnd():0,!!n.trimSpace)}function B(W){var j=h(k(q(),W));return W?j>=0:j<=C[g("scrollWidth")]-ut(f)[g("width")]}function F(W,j){j=Vn(j)?q():j;var Q=W!==!0&&h(j)<h(R(!1)),oe=W!==!1&&h(j)>h(R(!0));return Q||oe}return{mount:M,move:E,jump:S,translate:A,shift:k,cancel:$,toIndex:O,toPosition:V,getPosition:q,getLimit:R,exceededLimit:F,reposition:_}}function Fs(e,t,n){var r=We(e),i=r.on,a=r.emit,s=t.Move,c=s.getPosition,o=s.getLimit,d=s.toPosition,p=t.Slides,T=p.isEnough,x=p.getLength,y=n.omitEnd,g=e.is(Sn),h=e.is(fn),P=Ae(q,!1),C=Ae(q,!0),f=n.start||0,b,M=f,_,E,S;function A(){I(),i([Ze,Oe,fr],I),i(xr,k)}function I(){_=x(!0),E=n.perMove,S=n.perPage,b=B();var v=ln(f,0,y?b:_-1);v!==f&&(f=v,s.reposition())}function k(){b!==B()&&a(fr)}function $(v,ie,$e){if(!ce()){var de=V(v),ye=R(de);ye>-1&&(ie||ye!==f)&&(Q(ye),s.move(de,ye,M,$e))}}function O(v,ie,$e,de){t.Scroll.scroll(v,ie,$e,function(){var ye=R(s.toIndex(c()));Q(y?Ot(ye,b):ye),de&&de()})}function V(v){var ie=f;if(Bt(v)){var $e=v.match(/([+\-<>])(\d+)?/)||[],de=$e[1],ye=$e[2];de==="+"||de==="-"?ie=Y(f+ +(""+de+(+ye||1)),f):de===">"?ie=ye?F(+ye):P(!0):de==="<"&&(ie=C(!0))}else ie=g?v:ln(v,0,b);return ie}function q(v,ie){var $e=E||(te()?1:S),de=Y(f+$e*(v?-1:1),f,!(E||te()));return de===-1&&h&&!Ao(c(),o(!v),1)?v?0:b:ie?de:R(de)}function Y(v,ie,$e){if(T()||te()){var de=L(v);de!==v&&(ie=v,v=de,$e=!1),v<0||v>b?!E&&(sr(0,v,ie,!0)||sr(b,ie,v,!0))?v=F(W(v)):g?v=$e?v<0?-(_%S||S):_:v:n.rewind?v=v<0?b:0:v=-1:$e&&v!==ie&&(v=F(W(ie)+(v<ie?-1:1)))}else v=-1;return v}function L(v){if(h&&n.trimSpace==="move"&&v!==f)for(var ie=c();ie===d(v,!0)&&sr(v,0,e.length-1,!n.rewind);)v<f?--v:++v;return v}function R(v){return g?(v+_)%_||0:v}function B(){for(var v=_-(te()||g&&E?1:S);y&&v-- >0;)if(d(_-1,!0)!==d(v,!0)){v++;break}return ln(v,0,_-1)}function F(v){return ln(te()?v:S*v,0,b)}function W(v){return te()?Ot(v,b):hr((v>=b?_-1:v)/S)}function j(v){var ie=s.toIndex(v);return h?ln(ie,0,b):ie}function Q(v){v!==f&&(M=f,f=v)}function oe(v){return v?M:f}function te(){return!Vn(n.focus)||n.isNavigation}function ce(){return e.state.is([xn,On])&&!!n.waitForTransition}return{mount:A,go:$,scroll:O,getNext:P,getPrev:C,getAdjacent:q,getEnd:B,setIndex:Q,getIndex:oe,toIndex:F,toPage:W,toDest:j,hasFocus:te,isBusy:ce}}var Ns="http://www.w3.org/2000/svg",Hs="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",Jn=40;function Bs(e,t,n){var r=We(e),i=r.on,a=r.bind,s=r.emit,c=n.classes,o=n.i18n,d=t.Elements,p=t.Controller,T=d.arrows,x=d.track,y=T,g=d.prev,h=d.next,P,C,f={};function b(){_(),i(Ze,M)}function M(){E(),b()}function _(){var O=n.arrows;O&&!(g&&h)&&I(),g&&h&&(In(f,{prev:g,next:h}),kn(y,O?"":"none"),St(y,C=xi+"--"+n.direction),O&&(S(),$(),fe([g,h],Un,x.id),s(Bo,g,h)))}function E(){r.destroy(),At(y,C),P?(Jt(T?[g,h]:y),g=h=null):$t([g,h],bi)}function S(){i([jt,Cn,Oe,en,fr],$),a(h,"click",Ae(A,">")),a(g,"click",Ae(A,"<"))}function A(O){p.go(O,!0)}function I(){y=T||pn("div",c.arrows),g=k(!0),h=k(!1),P=!0,jn(y,[g,h]),!T&&si(y,x)}function k(O){var V='<button class="'+c.arrow+" "+(O?c.prev:c.next)+'" type="button"><svg xmlns="'+Ns+'" viewBox="0 0 '+Jn+" "+Jn+'" width="'+Jn+'" height="'+Jn+'" focusable="false"><path d="'+(n.arrowPath||Hs)+'" />';return Po(V)}function $(){if(g&&h){var O=e.index,V=p.getPrev(),q=p.getNext(),Y=V>-1&&O<V?o.last:o.prev,L=q>-1&&O>q?o.first:o.next;g.disabled=V<0,h.disabled=q<0,fe(g,pt,Y),fe(h,pt,L),s(Oo,g,h,V,q)}}return{arrows:f,mount:b,destroy:E,update:$}}var Os=ci+"-interval";function Vs(e,t,n){var r=We(e),i=r.on,a=r.bind,s=r.emit,c=Sr(n.interval,e.go.bind(e,">"),S),o=c.isPaused,d=t.Elements,p=t.Elements,T=p.root,x=p.toggle,y=n.autoplay,g,h,P=y==="pause";function C(){y&&(f(),x&&fe(x,Un,d.track.id),P||b(),E())}function f(){n.pauseOnHover&&a(T,"mouseenter mouseleave",function(I){g=I.type==="mouseenter",_()}),n.pauseOnFocus&&a(T,"focusin focusout",function(I){h=I.type==="focusin",_()}),x&&a(x,"click",function(){P?b():M(!0)}),i([Wt,Cr,Oe],c.rewind),i(Wt,A)}function b(){o()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),h=g=P=!1,E(),s(gi))}function M(I){I===void 0&&(I=!0),P=!!I,E(),o()||(c.pause(),s(hi))}function _(){P||(g||h?M(!1):b())}function E(){x&&(_t(x,Qt,!P),fe(x,pt,n.i18n[P?"play":"pause"]))}function S(I){var k=d.bar;k&&ht(k,"width",I*100+"%"),s(jo,I)}function A(I){var k=t.Slides.getAt(I);c.set(k&&+ft(k.slide,Os)||n.interval)}return{mount:C,destroy:c.cancel,play:b,pause:M,isPaused:o}}function Ds(e,t,n){var r=We(e),i=r.on;function a(){n.cover&&(i(fi,Ae(c,!0)),i([jt,Ze,Oe],Ae(s,!0)))}function s(o){t.Slides.forEach(function(d){var p=zn(d.container||d.slide,"img");p&&p.src&&c(o,p,d)})}function c(o,d,p){p.style("background",o?'center/cover no-repeat url("'+d.src+'")':"",!0),kn(d,o?"none":"")}return{mount:a,destroy:Ae(s,!1)}}var js=10,zs=600,Ks=.6,Us=1.5,qs=800;function Gs(e,t,n){var r=We(e),i=r.on,a=r.emit,s=e.state.set,c=t.Move,o=c.getPosition,d=c.getLimit,p=c.exceededLimit,T=c.translate,x=e.is(fn),y,g,h=1;function P(){i(Wt,M),i([Ze,Oe],_)}function C(S,A,I,k,$){var O=o();if(M(),I&&(!x||!p())){var V=t.Layout.sliderSize(),q=Xr(S)*V*hr(tt(S)/V)||0;S=c.toPosition(t.Controller.toDest(S%V))+q}var Y=Ao(O,S,1);h=1,A=Y?0:A||gr(tt(S-O)/Us,qs),g=k,y=Sr(A,f,Ae(b,O,S,$),1),s(On),a(Cr),y.start()}function f(){s(gn),g&&g(),a(en)}function b(S,A,I,k){var $=o(),O=S+(A-S)*E(k),V=(O-$)*h;T($+V),x&&!I&&p()&&(h*=Ks,tt(V)<js&&C(d(p(!0)),zs,!1,g,!0))}function M(){y&&y.cancel()}function _(){y&&!y.isPaused()&&(M(),f())}function E(S){var A=n.easingFunc;return A?A(S):1-Math.pow(1-S,4)}return{mount:P,destroy:M,scroll:C,cancel:_}}var cn={passive:!1,capture:!0};function Ys(e,t,n){var r=We(e),i=r.on,a=r.emit,s=r.bind,c=r.unbind,o=e.state,d=t.Move,p=t.Scroll,T=t.Controller,x=t.Elements.track,y=t.Media.reduce,g=t.Direction,h=g.resolve,P=g.orient,C=d.getPosition,f=d.exceededLimit,b,M,_,E,S,A=!1,I,k,$;function O(){s(x,Nr,Gr,cn),s(x,Hr,Gr,cn),s(x,ia,q,cn),s(x,"click",R,{capture:!0}),s(x,"dragstart",Pt),i([jt,Ze],V)}function V(){var N=n.drag;re(!N),E=N==="free"}function q(N){if(I=!1,!k){var m=ye(N);de(N.target)&&(m||!N.button)&&(T.isBusy()?Pt(N,!0):($=m?x:window,S=o.is([xn,On]),_=null,s($,Nr,Y,cn),s($,Hr,L,cn),d.cancel(),p.cancel(),B(N)))}}function Y(N){if(o.is(or)||(o.set(or),a(Fo)),N.cancelable)if(S){d.translate(b+$e(te(N)));var m=ce(N)>Ki,H=A!==(A=f());(m||H)&&B(N),I=!0,a(No),Pt(N)}else j(N)&&(S=W(N),Pt(N))}function L(N){o.is(or)&&(o.set(gn),a(Ho)),S&&(F(N),Pt(N)),c($,Nr,Y),c($,Hr,L),S=!1}function R(N){!k&&I&&Pt(N,!0)}function B(N){_=M,M=N,b=C()}function F(N){var m=Q(N),H=oe(m),D=n.rewind&&n.rewindByDrag;y(!1),E?T.scroll(H,0,n.snap):e.is(qn)?T.go(P(Xr(m))<0?D?"<":"-":D?">":"+"):e.is(fn)&&A&&D?T.go(f(!0)?">":"<"):T.go(T.toDest(H),!0),y(!0)}function W(N){var m=n.dragMinThreshold,H=_n(m),D=H&&m.mouse||0,U=(H?m.touch:+m)||10;return tt(te(N))>(ye(N)?U:D)}function j(N){return tt(te(N))>tt(te(N,!0))}function Q(N){if(e.is(Sn)||!A){var m=ce(N);if(m&&m<Ki)return te(N)/m}return 0}function oe(N){return C()+Xr(N)*Ot(tt(N)*(n.flickPower||600),E?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function te(N,m){return ie(N,m)-ie(v(N),m)}function ce(N){return Yr(N)-Yr(v(N))}function v(N){return M===N&&_||M}function ie(N,m){return(ye(N)?N.changedTouches[0]:N)["page"+h(m?"Y":"X")]}function $e(N){return N/(A&&e.is(fn)?Ps:1)}function de(N){var m=n.noDrag;return!An(N,"."+Qo+", ."+Pr)&&(!m||!An(N,m))}function ye(N){return typeof TouchEvent<"u"&&N instanceof TouchEvent}function Re(){return S}function re(N){k=N}return{mount:O,disable:re,isDragging:Re}}var Xs={Spacebar:" ",Right:Tr,Left:wr,Up:Uo,Down:qo};function Ci(e){return e=Bt(e)?e:e.key,Xs[e]||e}var Ui="keydown";function Zs(e,t,n){var r=We(e),i=r.on,a=r.bind,s=r.unbind,c=e.root,o=t.Direction.resolve,d,p;function T(){x(),i(Ze,y),i(Ze,x),i(Wt,h)}function x(){var C=n.keyboard;C&&(d=C==="global"?window:c,a(d,Ui,P))}function y(){s(d,Ui)}function g(C){p=C}function h(){var C=p;p=!0,$o(function(){p=C})}function P(C){if(!p){var f=Ci(C);f===o(wr)?e.go("<"):f===o(Tr)&&e.go(">")}}return{mount:T,destroy:y,disable:g}}var Pn=ci+"-lazy",lr=Pn+"-srcset",Js="["+Pn+"], ["+lr+"]";function Qs(e,t,n){var r=We(e),i=r.on,a=r.off,s=r.bind,c=r.emit,o=n.lazyLoad==="sequential",d=[Cn,en],p=[];function T(){n.lazyLoad&&(x(),i(Oe,x))}function x(){kt(p),y(),o?C():(a(d),i(d,g),g())}function y(){t.Slides.forEach(function(f){li(f.slide,Js).forEach(function(b){var M=ft(b,Pn),_=ft(b,lr);if(M!==b.src||_!==b.srcset){var E=n.classes.spinner,S=b.parentElement,A=zn(S,"."+E)||pn("span",E,S);p.push([b,f,A]),b.src||kn(b,"none")}})})}function g(){p=p.filter(function(f){var b=n.perPage*((n.preloadPages||1)+1)-1;return f[1].isWithin(e.index,b)?h(f):!0}),p.length||a(d)}function h(f){var b=f[0];St(f[1].slide,ei),s(b,"load error",Ae(P,f)),fe(b,"src",ft(b,Pn)),fe(b,"srcset",ft(b,lr)),$t(b,Pn),$t(b,lr)}function P(f,b){var M=f[0],_=f[1];At(_.slide,ei),b.type!=="error"&&(Jt(f[2]),kn(M,""),c(fi,M,_),c(hn)),o&&C()}function C(){p.length&&h(p.shift())}return{mount:T,destroy:Ae(kt,p),check:g}}function el(e,t,n){var r=We(e),i=r.on,a=r.emit,s=r.bind,c=t.Slides,o=t.Elements,d=t.Controller,p=d.hasFocus,T=d.getIndex,x=d.go,y=t.Direction.resolve,g=o.pagination,h=[],P,C;function f(){b(),i([Ze,Oe,fr],f);var k=n.pagination;g&&kn(g,k?"":"none"),k&&(i([Wt,Cr,en],I),M(),I(),a(Vo,{list:P,items:h},A(e.index)))}function b(){P&&(Jt(g?Dt(P.children):P),At(P,C),kt(h),P=null),r.destroy()}function M(){var k=e.length,$=n.classes,O=n.i18n,V=n.perPage,q=p()?d.getEnd()+1:Wn(k/V);P=g||pn("ul",$.pagination,o.track.parentElement),St(P,C=_r+"--"+S()),fe(P,Rt,"tablist"),fe(P,pt,O.select),fe(P,vi,S()===Lr?"vertical":"");for(var Y=0;Y<q;Y++){var L=pn("li",null,P),R=pn("button",{class:$.page,type:"button"},L),B=c.getIn(Y).map(function(W){return W.slide.id}),F=!p()&&V>1?O.pageX:O.slideX;s(R,"click",Ae(_,Y)),n.paginationKeyboard&&s(R,"keydown",Ae(E,Y)),fe(L,Rt,"presentation"),fe(R,Rt,"tab"),fe(R,Un,B.join(" ")),fe(R,pt,Zr(F,Y+1)),fe(R,mn,-1),h.push({li:L,button:R,page:Y})}}function _(k){x(">"+k,!0)}function E(k,$){var O=h.length,V=Ci($),q=S(),Y=-1;V===y(Tr,!1,q)?Y=++k%O:V===y(wr,!1,q)?Y=(--k+O)%O:V==="Home"?Y=0:V==="End"&&(Y=O-1);var L=h[Y];L&&(Eo(L.button),x(">"+Y),Pt($,!0))}function S(){return n.paginationDirection||n.direction}function A(k){return h[d.toPage(k)]}function I(){var k=A(T(!0)),$=A(T());if(k){var O=k.button;At(O,Qt),$t(O,Oi),fe(O,mn,-1)}if($){var V=$.button;St(V,Qt),fe(V,Oi,!0),fe(V,mn,"")}a(Do,{list:P,items:h},k,$)}return{items:h,mount:f,destroy:b,getAt:A,update:I}}var tl=[" ","Enter"];function nl(e,t,n){var r=n.isNavigation,i=n.slideFocus,a=[];function s(){e.splides.forEach(function(g){g.isParent||(d(e,g.splide),d(g.splide,e))}),r&&p()}function c(){a.forEach(function(g){g.destroy()}),kt(a)}function o(){c(),s()}function d(g,h){var P=We(g);P.on(Wt,function(C,f,b){h.go(h.is(Sn)?b:C)}),a.push(P)}function p(){var g=We(e),h=g.on;h(ui,x),h(zo,y),h([jt,Ze],T),a.push(g),g.emit(mi,e.splides)}function T(){fe(t.Elements.list,vi,n.direction===Lr?"vertical":"")}function x(g){e.go(g.index)}function y(g,h){ai(tl,Ci(h))&&(x(g),Pt(h))}return{setup:Ae(t.Media.set,{slideFocus:Vn(i)?r:i},!0),mount:s,destroy:c,remount:o}}function rl(e,t,n){var r=We(e),i=r.bind,a=0;function s(){n.wheel&&i(t.Elements.track,"wheel",c,cn)}function c(d){if(d.cancelable){var p=d.deltaY,T=p<0,x=Yr(d),y=n.wheelMinThreshold||0,g=n.wheelSleep||0;tt(p)>y&&x-a>g&&(e.go(T?"<":">"),a=x),o(T)&&Pt(d)}}function o(d){return!n.releaseWheel||e.state.is(xn)||t.Controller.getAdjacent(d)!==-1}return{mount:s}}var il=90;function ol(e,t,n){var r=We(e),i=r.on,a=t.Elements.track,s=n.live&&!n.isNavigation,c=pn("span",$s),o=Sr(il,Ae(p,!1));function d(){s&&(x(!t.Autoplay.isPaused()),fe(a,ji,!0),c.textContent="…",i(gi,Ae(x,!0)),i(hi,Ae(x,!1)),i([Cn,en],Ae(p,!0)))}function p(y){fe(a,Di,y),y?(jn(a,c),o.start()):(Jt(c),o.cancel())}function T(){$t(a,[Vi,ji,Di]),Jt(c)}function x(y){s&&fe(a,Vi,y?"off":"polite")}return{mount:d,disable:x,destroy:T}}var al=Object.freeze({__proto__:null,Media:gs,Direction:hs,Elements:_s,Slides:Rs,Layout:Is,Clones:Ws,Move:Ms,Controller:Fs,Arrows:Bs,Autoplay:Vs,Cover:Ds,Scroll:Gs,Drag:Ys,Keyboard:Zs,LazyLoad:Qs,Pagination:el,Sync:nl,Wheel:rl,Live:ol}),sl={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"},ll={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:Ls,i18n:sl,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function cl(e,t,n){var r=t.Slides;function i(){We(e).on([jt,Oe],a)}function a(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function s(c,o){r.style("transition","opacity "+n.speed+"ms "+n.easing),$o(o)}return{mount:i,start:s,cancel:Gr}}function dl(e,t,n){var r=t.Move,i=t.Controller,a=t.Scroll,s=t.Elements.list,c=Ae(ht,s,"transition"),o;function d(){We(e).bind(s,"transitionend",function(y){y.target===s&&o&&(T(),o())})}function p(y,g){var h=r.toPosition(y,!0),P=r.getPosition(),C=x(y);tt(h-P)>=1&&C>=1?n.useScroll?a.scroll(h,C,!1,g):(c("transform "+C+"ms "+n.easing),r.translate(h,!0),o=g):(r.jump(y),g())}function T(){c(""),a.cancel()}function x(y){var g=n.rewindSpeed;if(e.is(fn)&&g){var h=i.getIndex(!0),P=i.getEnd();if(h===0&&y>=P||h>=P&&y===0)return g}return n.speed}return{mount:d,start:p,cancel:T}}var ul=(function(){function e(n,r){this.event=We(),this.Components={},this.state=ps(un),this.splides=[],this._o={},this._E={};var i=Bt(n)?_o(document,n):n;En(i,i+" is invalid."),this.root=i,r=Nt({label:ft(i,pt)||"",labelledby:ft(i,yi)||""},ll,e.defaults,r||{});try{Nt(r,JSON.parse(ft(i,ci)))}catch{En(!1,"Invalid JSON")}this._o=Object.create(Nt({},r))}var t=e.prototype;return t.mount=function(r,i){var a=this,s=this.state,c=this.Components;En(s.is([un,mr]),"Already mounted!"),s.set(un),this._C=c,this._T=i||this._T||(this.is(qn)?cl:dl),this._E=r||this._E;var o=In({},al,this._E,{Transition:this._T});return Zt(o,function(d,p){var T=d(a,c,a._o);c[p]=T,T.setup&&T.setup()}),Zt(c,function(d){d.mount&&d.mount()}),this.emit(jt),St(this.root,ws),s.set(gn),this.emit(Jr),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(gn)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,i){return this.event.on(r,i),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var i;return(i=this.event).emit.apply(i,[r].concat(Dt(arguments,1))),this},t.add=function(r,i){return this._C.Slides.add(r,i),this},t.remove=function(r){return this._C.Slides.remove(r),this},t.is=function(r){return this._o.type===r},t.refresh=function(){return this.emit(Oe),this},t.destroy=function(r){r===void 0&&(r=!0);var i=this.event,a=this.state;return a.is(un)?We(this).on(Jr,this.destroy.bind(this,r)):(Zt(this._C,function(s){s.destroy&&s.destroy(r)},!0),i.emit(pi),i.destroy(),r&&kt(this.splides),a.set(mr)),this},ss(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})(),Si=ul;Si.defaults={};Si.STATES=cs;var qi=[[jt,"onMounted"],[Jr,"onReady"],[Wt,"onMove"],[Cn,"onMoved"],[ui,"onClick"],[Io,"onActive"],[ko,"onInactive"],[Wo,"onVisible"],[Mo,"onHidden"],[Oe,"onRefresh"],[Ze,"onUpdated"],[hn,"onResize"],[xr,"onResized"],[Fo,"onDrag"],[No,"onDragging"],[Ho,"onDragged"],[Cr,"onScroll"],[en,"onScrolled"],[pi,"onDestroy"],[Bo,"onArrowsMounted"],[Oo,"onArrowsUpdated"],[Vo,"onPaginationMounted"],[Do,"onPaginationUpdated"],[mi,"onNavigationMounted"],[gi,"onAutoplayPlay"],[jo,"onAutoplayPlaying"],[hi,"onAutoplayPause"],[fi,"onLazyLoadLoaded"]];function $i(...e){return e.filter(Boolean).join(" ")}function yr(e){return e!==null&&typeof e=="object"}function ti(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!ti(n,t[r]));if(yr(e)&&yr(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(i=>!Object.prototype.hasOwnProperty.call(t,i)||!ti(e[i],t[i]))}return e===t}function pl(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function ml(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const i=n[r];if(i!=="__proto__"&&t(e[i],i)===!1)break}}return e}function ni(e,t){const n=e;return ml(t,(r,i)=>{Array.isArray(r)?n[i]=r.slice():yr(r)?n[i]=ni(yr(n[i])?n[i]:{},r):n[i]=r}),n}var gl=({children:e,className:t,...n})=>u.createElement("div",{className:$i("splide__track",t),...n},u.createElement("ul",{className:"splide__list"},e)),wi=class extends u.Component{constructor(){super(...arguments),this.splideRef=u.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new Si(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=ni({},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&&!ti(this.options,e)&&(this.splide.options=e,this.options=ni({},e));const t=this.getSlides();pl(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){qi.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...i)=>{r(e,...i)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:r,...i}=this.props;return u.createElement(t,{className:$i("splide",e),ref:this.splideRef,...this.omit(i,["options",...qi.map(a=>a[1])])},n?u.createElement(gl,null,r):r)}},Ti=({children:e,className:t,...n})=>u.createElement("li",{className:$i("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 sl="RichTextRenderer-module__link___BWeZ2",ll={link:sl},cl=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))},Tr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>cl(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function ht(e){const{color:t,...n}=e;return n}function nt(e,t){var i,a,s;const{fontSize:n,lineHeight:r}=e;return{fontFamily:Tr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:E.scalingValue(e.letterSpacing,t),wordSpacing:E.scalingValue(e.wordSpacing,t),fontSize:E.scalingValue(n,t),lineHeight:r!==void 0?E.scalingValue(r,t):void 0,textTransform:(i=e.textAppearance)==null?void 0:i.textTransform,textDecoration:(a=e.textAppearance)==null?void 0:a.textDecoration,fontVariant:(s=e.textAppearance)==null?void 0:s.fontVariant,textAlign:e.textAlign,color:e.color}}const An=({content:e})=>{const t=n=>n.map((r,i)=>r.type==="link"?l.jsx("a",{className:ll.link,href:r.value,target:r.target,children:t(r.children)},i):l.jsx("span",{style:dl(r),children:r.text},i));return l.jsx(l.Fragment,{children:e.map((n,r)=>{const i=n.children;return l.jsx("div",{children:t(i)},r)})})};function dl(e){return{...e.fontFamily&&{fontFamily:Tr(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 ul="SvgImage-module__svg___q3xE-",pl="SvgImage-module__img___VsTm-",Vi={svg:ul,img:pl},ml=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},gl=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Ft=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:i})=>{const[a,s]=u.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return u.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');s(c)}},[]),!ml(e)||!a?l.jsx("img",{src:e,alt:"",className:Ee(Vi.img,r),style:i}):l.jsx("span",{"data-supports-mask":a,className:Ee(Vi.svg,r),style:{"--svg":gl(e),"--fill":t,"--hover-fill":n,...i??{}}})},hl={"top-left":le.topLeftAlignment,"top-center":le.topCenterAlignment,"top-right":le.topRightAlignment,"middle-left":le.middleLeftAlignment,"middle-center":le.middleCenterAlignment,"middle-right":le.middleRightAlignment,"bottom-left":le.bottomLeftAlignment,"bottom-center":le.bottomCenterAlignment,"bottom-right":le.bottomRightAlignment};function fl({settings:e,content:t,styles:n,isEditor:r}){const[i,a]=u.useState(null),{widthSettings:s,fontSettings:c,letterSpacing:o,textAlign:d,wordSpacing:p,fontSizeLineHeight:T,textAppearance:S,color:v}=n.imageCaption,[g,m]=u.useState(void 0),[R,b]=u.useState(null),[x,y]=u.useState(0),[O,P]=u.useState(0),{direction:A,transition:L,controls:I,pagination:_,imageCaption:N,triggers:w}=e,B=u.useRef(L.type),{x:V,y:q}=e.controls.offset,Y=$=>{i&&i.go($)};return u.useEffect(()=>{if(!R)return;const $=new ResizeObserver(W=>{if(!i)return;const[H]=W;m({width:Math.round(H.contentRect.width),height:Math.round(H.contentRect.height)})});return $.observe(R),()=>$.unobserve(R)},[R]),u.useEffect(()=>{!i||B.current===L.type||(P($=>$+1),B.current=L.type)},[L.type]),l.jsx("div",{className:Ee(le.wrapper,{[le.editor]:r}),ref:b,children:l.jsxs("div",{className:le.sliderInner,style:{width:g?g.width:"100%",height:g?g.height:"100%",backgroundColor:L.backgroundColor&&L.type==="fade in"?L.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:Ee(le.captionBlock),children:l.jsx("div",{className:le.captionTextWrapper,children:t.map(($,W)=>l.jsx("div",{className:Ee(le.captionText,hl[N.alignment],{[le.withPointerEvents]:W===x&&r,[le.active]:W===x}),style:{fontFamily:Tr(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:s.sizing==="auto"?"max-content":E.scalingValue(s.width,r),letterSpacing:E.scalingValue(o,r),wordSpacing:E.scalingValue(p,r),textAlign:d,fontSize:E.scalingValue(T.fontSize,r),lineHeight:E.scalingValue(T.lineHeight,r),textTransform:S.textTransform??"none",textDecoration:S.textDecoration??"none",fontVariant:S.fontVariant??"normal",color:v,transitionDuration:L.duration?`${Math.round(parseInt(L.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:le.captionTextInner,style:{"--link-hover-color":N.linkHoverColor,"--link-color":N.linkColor,position:"relative",top:E.scalingValue(N.offset.y,r),left:E.scalingValue(N.offset.x,r)},children:l.jsx(An,{content:$.imageCaption})})},W))})}),l.jsx(vi,{onMove:$=>{y($.index)},ref:a,options:{arrows:!1,speed:L.duration?parseInt(L.duration):500,autoplay:w.autoPlay!==null,...w.autoPlay!==null&&{interval:parseInt(w.autoPlay)*1e3},direction:A==="horiz"||L.type==="fade in"?"ltr":"ttb",pagination:!1,drag:w.triggersList.drag,perPage:1,width:g?g.width:"100%",height:g?g.height:"100%",type:L.type==="fade in"?"fade":"loop",rewind:!0},children:t.map(($,W)=>l.jsx(bi,{children:l.jsx("div",{className:le.sliderItem,children:l.jsx("div",{className:le.imgWrapper,children:l.jsx("img",{className:Ee(le.sliderImage,{[le.contain]:$.image.objectFit==="contain",[le.cover]:$.image.objectFit==="cover"}),src:$.image.url,alt:$.image.name??""})})})},W))},O),I.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Ee(le.arrow,{[le.arrowVertical]:A==="vert",[le.hoverArrow]:I.show==="on hover"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:l.jsxs("button",{onClick:()=>{Y("-1")},className:le.arrowInner,style:{transform:`translate(${E.scalingValue(V,r)}, ${E.scalingValue(q*(A==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:[I.arrowsImgUrl&&l.jsx(Ft,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:Ee(le.arrowImg,le.mirror)}),!I.arrowsImgUrl&&l.jsx(Di,{color:I.color,className:Ee(le.arrowIcon,le.arrowImg,le.mirror)})]})}),l.jsx("div",{className:Ee(le.arrow,le.nextArrow,{[le.arrowVertical]:A==="vert",[le.hoverArrow]:I.show==="on hover"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:l.jsxs("button",{className:le.arrowInner,onClick:()=>Y("+1"),style:{transform:`translate(${E.scalingValue(V*(A==="horiz"?-1:1),r)}, ${E.scalingValue(q,r)}) scale(${e.controls.scale/100}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:[I.arrowsImgUrl&&l.jsx(Ft,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:le.arrowImg}),!I.arrowsImgUrl&&l.jsx(Di,{color:I.color,className:Ee(le.arrowIcon,le.arrowImg)})]})})]}),w.triggersList.click&&l.jsx("div",{className:le.clickOverlay,onClick:()=>{i&&i.go("+1")}}),_.isActive&&l.jsx("div",{className:Ee(le.pagination,{[le.paginationInsideBottom]:_.position==="inside-1"&&A==="horiz",[le.paginationInsideTop]:_.position==="inside-2"&&A==="horiz",[le.paginationOutsideBottom]:_.position==="outside-1"&&A==="horiz",[le.paginationOutsideTop]:_.position==="outside-2"&&A==="horiz",[le.paginationInsideLeft]:_.position==="inside-1"&&A==="vert",[le.paginationInsideRight]:_.position==="inside-2"&&A==="vert",[le.paginationOutsideLeft]:_.position==="outside-1"&&A==="vert",[le.paginationOutsideRight]:_.position==="outside-2"&&A==="vert",[le.paginationVertical]:A==="vert"}),children:l.jsx("div",{className:le.paginationInner,style:{backgroundColor:_.colors[2],transform:`scale(${_.scale/100}) translate(${E.scalingValue(_.offset.x,r)}, ${E.scalingValue(_.offset.y,r)}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:t.map(($,W)=>l.jsx("button",{onClick:()=>{i&&i.go(W)},className:Ee(le.paginationItem),children:l.jsx("div",{className:Ee(le.dot,{[le.activeDot]:W===x}),style:{backgroundColor:W===x?_.colors[0]:_.colors[1],"--pagination-hover-color":_.hover}})},W))})})]})})}function Di({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const yl={element:fl,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},vl="ImageRevealSlider-module__imageRevealSlider___UE5Ob",bl="ImageRevealSlider-module__image___Qjt-e",xl="ImageRevealSlider-module__link___N-iLG",Cl="ImageRevealSlider-module__cursor___2U03d",en={imageRevealSlider:vl,image:bl,link:xl,cursor:Cl};function zi(e,t,n){for(const r of n){const i=new Image;i.src=r.url;const a=r.width?Number.parseFloat(r.width):i.naturalWidth,s=i.naturalHeight/i.naturalWidth*a,c=a/2,o=s/2;if(e>=r.x-c&&e<=r.x+c&&t>=r.y-o&&t<=r.y+o)return!0}return!1}function Wr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Sl(e,t,n,r){let i,a;if(t==="custom"){i=n;const s=await Wr(e);a=s.height/s.width*i}else if(t==="random"){i=Math.random()*(r.max-r.min)+r.min;const s=await Wr(e);a=s.height/s.width*i}else{const s=await Wr(e);i=s.width,a=s.height}return{width:i,height:a,finalWidth:`${i}px`}}function wl({settings:e,content:t,isEditor:n}){const[r,i]=u.useState(null),[a,s]=u.useState([]),[c,o]=u.useState(0),d=u.useRef(0),[p,T]=u.useState({x:0,y:0}),[S,v]=u.useState(1),[g,m]=u.useState("none"),R=u.useRef({x:0,y:0}),[b,x]=u.useState(!1),{sizeType:y,imageWidth:O,randomRangeImageWidth:P}=e.imageSize,{revealPosition:A,visible:L}=e.position,{cursorType:I,target:_,defaultCursorScale:N,defaultCursor:w,hoverCursorScale:B,hoverCursor:V}=e.cursor;u.useEffect(()=>{if(!r)return;const $=(M,k)=>{const D=r.getBoundingClientRect(),Q=M-D.left,re=k-D.top;if(T({x:Q,y:re}),I==="system"){m("none"),v(1);return}const ie=Q,ce=re,C=document.elementFromPoint(D.left+ie,D.top+ce);if(C&&C.closest("a")){m("none"),v(1);return}const oe=zi(ie,ce,a)||_==="area"?{img:V??"none",scale:B}:{img:w??"none",scale:N};m(oe.img),v(oe.scale)},W=M=>{M.stopPropagation(),R.current={x:M.clientX,y:M.clientY},$(M.clientX,M.clientY)},H=()=>{b&&$(R.current.x,R.current.y)};return r.addEventListener("mousemove",W),window.addEventListener("scroll",H,!0),()=>{r.removeEventListener("mousemove",W),window.removeEventListener("scroll",H,!0)}},[r,b,p,I,_,V,w,B,N,a]),u.useEffect(()=>{b||(m("none"),v(0))},[b]);const q=async($,W,H,M={})=>{const{width:k,height:D,finalWidth:Q}=await Sl($.image.url,y,O,P);let re=0,ie=0;A==="same"?(re=W/2,ie=H/2):(re=M.x??Math.random()*W,ie=M.y??Math.random()*H);const ce=Math.min(Math.max(re,k/2),W-k/2),C=Math.min(Math.max(ie,D/2),H-D/2);return{id:d.current++,url:$.image.url,link:$.link,name:$.image.name,x:ce,y:C,width:Q}};u.useEffect(()=>{if(!r||t.length===0)return;const $=r.getBoundingClientRect(),W=$.width,H=$.height,M=[];(async()=>{const D=t[0],Q=await q(D,W,H);M.push(Q),s(M),o(1)})()},[y,O,P,A,r]),u.useEffect(()=>{L==="last One"&&s($=>$.length>0?[$[$.length-1]]:[])},[L]);const Y=async $=>{if(!r)return;const W=r.getBoundingClientRect(),H=$.clientX-W.left,M=$.clientY-W.top;if(_==="image"&&!zi(H,M,a))return;let k=0,D=0;A==="on Click"?(k=H,D=M):A==="same"?(k=W.width/2,D=W.height/2):(k=Math.random()*W.width,D=Math.random()*W.height);const Q=t[c],re=await q(Q,W.width,W.height,{x:k,y:D});s(ie=>L==="all"?[...ie,re]:[re]),o(ie=>ie>=t.length-1?0:ie+1)};return l.jsxs("div",{ref:i,onClick:Y,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),className:en.imageRevealSlider,style:{cursor:g==="none"?"default":"none"},children:[a.map($=>l.jsx("div",{className:en.wrapper,style:{top:`${$.y}px`,left:`${$.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:$.width??"auto",height:"auto",cursor:g==="none"?"default":"none"},children:_==="area"&&$.link?l.jsx("a",{href:$.link,target:"_blank",className:en.link,children:l.jsx("img",{src:$.url,alt:$.name,className:en.image},$.id)}):l.jsx("img",{src:$.url,alt:$.name,className:en.image},$.id)},$.id)),b&&l.jsx("div",{className:en.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${S})`,backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const $l={element:wl,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},Tl="LightBox-module__hidden___9s-9x",Ll="LightBox-module__heroImage___sTxNF",El="LightBox-module__background___rm9ml",Pl="LightBox-module__editor___4ACaY",_l="LightBox-module__contentStyle___Bgnsq",Al="LightBox-module__imageStyle___tLIlB",Rl="LightBox-module__imgWrapper___LuFUp",Il="LightBox-module__contain___8-yaS",Wl="LightBox-module__cover___hNvOG",kl="LightBox-module__caption___b6L2I",Fl="LightBox-module__captionTextInner___rCGNH",Ml="LightBox-module__lightboxSplide___XFuWC",Nl="LightBox-module__arrow___iz38X",Hl="LightBox-module__arrowVertical___Zfz81",Ol="LightBox-module__nextArrow___zkAQN",Bl="LightBox-module__arrowInner___p48sW",Vl="LightBox-module__arrowIcon___3VaFf",Dl="LightBox-module__arrowImg___pNV88",zl="LightBox-module__mirror___pjeXc",jl="LightBox-module__thumbsWrapper___GB-nU",Kl="LightBox-module__thumbsContainerVertical___wttk5",Ul="LightBox-module__thumbsContainer___osSma",ql="LightBox-module__thumbsAlignStart___MO6tY",Gl="LightBox-module__thumbsAlignCenter___Q4sUx",Yl="LightBox-module__thumbsAlignEnd___p4y9R",Xl="LightBox-module__thumbItem___HvnF3",Zl="LightBox-module__closeButton___g2khP",Jl="LightBox-module__fadeIn___0m5GW",Ql="LightBox-module__slideInLeft___gPYwC",ec="LightBox-module__slideInRight___S-pPp",tc="LightBox-module__slideInTop___DFdAj",nc="LightBox-module__slideInBottom___m27kZ",rc="LightBox-module__fadeOut___55qBR",ic="LightBox-module__slideOutLeft___NvU7P",oc="LightBox-module__slideOutRight___SK7eC",ac="LightBox-module__slideOutTop___Vgg0z",sc="LightBox-module__slideOutBottom___nJ0Ef",lc="LightBox-module__scaleSlide___vZriG",X={hidden:Tl,heroImage:Ll,background:El,editor:Pl,contentStyle:_l,imageStyle:Al,imgWrapper:Rl,contain:Il,cover:Wl,caption:kl,captionTextInner:Fl,lightboxSplide:Ml,arrow:Nl,arrowVertical:Hl,nextArrow:Ol,arrowInner:Bl,arrowIcon:Vl,arrowImg:Dl,mirror:zl,thumbsWrapper:jl,thumbsContainerVertical:Kl,thumbsContainer:Ul,thumbsAlignStart:ql,thumbsAlignCenter:Gl,thumbsAlignEnd:Yl,thumbItem:Xl,closeButton:Zl,fadeIn:Jl,slideInLeft:Ql,slideInRight:ec,slideInTop:tc,slideInBottom:nc,fadeOut:rc,slideOutLeft:ic,slideOutRight:oc,slideOutTop:ac,slideOutBottom:sc,scaleSlide:lc},Gn=(e,t,n)=>{const r={},[i,a]=e.split("-");return i==="top"?(r.top="0",r.bottom="auto"):i==="middle"?(r.top="50%",r.bottom="auto"):i==="bottom"&&(r.top="auto",r.bottom="0"),a==="left"?(r.left="0",r.right="auto"):a==="center"?(r.left="50%",r.right="auto"):a==="right"&&(r.left="auto",r.right="0"),i==="middle"&&a==="center"?r.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), calc(-50% + ${E.scalingValue(t.y,n)}))`:i==="middle"?r.transform=`translate(${E.scalingValue(t.x,n)}, calc(-50% + ${E.scalingValue(t.y,n)}))`:a==="center"?r.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), ${E.scalingValue(t.y,n)})`:r.transform=`translate(${E.scalingValue(t.x,n)}, ${E.scalingValue(t.y,n)})`,r};function Zo(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 ji(e){const t=e.getBoundingClientRect(),n=Zo(e),r=Math.max(0,t.width-n.left-n.right),i=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,s=e.naturalHeight,c=r/i,o=a/s;let d,p;o>c?(d=r,p=r/o):(p=i,d=i*o);const T=t.left+n.left,S=t.top+n.top,v=(r-d)/2+T,g=(i-p)/2+S;return{x:v,y:g,width:d,height:p}}function Ki(e){const t=e.getBoundingClientRect(),n=Zo(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Ui(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(i=>parseFloat(i.trim()));return r.length===4?r[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function cc(e,t){const n=(()=>{if(e==="fade in")return X.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return X.slideInLeft;case"right":return X.slideInRight;case"top":return X.slideInTop;case"bottom":return X.slideInBottom;default:return X.slideInRight}return X.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return X.fadeIn;if(e==="slide in")switch(t){case"left":return X.slideInLeft;case"right":return X.slideInRight;case"top":return X.slideInTop;case"bottom":return X.slideInBottom;default:return X.slideInRight}return X.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return X.fadeOut;if(e==="slide in")switch(t){case"left":return X.slideOutLeft;case"right":return X.slideOutRight;case"top":return X.slideOutTop;case"bottom":return X.slideOutBottom;default:return X.slideOutRight}return X.fadeOut})(),a=(()=>{if(e==="fade in")return X.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return X.slideOutLeft;case"right":return X.slideOutRight;case"top":return X.slideOutTop;case"bottom":return X.slideOutBottom;default:return X.slideOutRight}return X.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:i,disappearClass:a}}const dc=({settings:e,content:t,styles:n,portalId:r,activeEvent:i,isEditor:a,isPreviewMode:s})=>{const[c,o]=u.useState(!1),{url:d}=e.thumbnailBlock.cover;return u.useEffect(()=>{i==="close"&&o(!1),i==="open"&&o(!0)},[i]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:d,alt:"Cover",className:X.heroImage,onClick:()=>o(!0)}),l.jsx(uc,{isOpen:c,onClose:()=>o(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:a})]})},uc=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:i,portalId:a,isEditor:s,metadata:c})=>{var h;const[o,d]=u.useState(0),[p,T]=u.useState(0),[S,v]=u.useState(!1),[g,m]=u.useState(!1),[R,b]=u.useState({}),x=u.useRef(null),y=u.useRef(null),O=u.useRef(null),P=u.useRef(!1),A=u.useRef(null),L=u.useRef(null),I=u.useRef(null),_=u.useRef(null),N=u.useRef(!1),w=u.useRef(null),[B,V]=u.useState(!1),{appear:q,triggers:Y,slider:$,thumbnail:W,controls:H,area:M,caption:k,layout:D}=i.lightboxBlock,{appearClass:Q,backdropAppearClass:re,backdropDisappearClass:ie,disappearClass:ce}=cc(q.type,q.direction),C=(c==null?void 0:c.itemId)??null;u.useEffect(()=>{const f=()=>{setTimeout(()=>{var z,G;(G=(z=x.current)==null?void 0:z.splide)==null||G.refresh()},16)},F=()=>{T(z=>z+1)};return window.addEventListener("ArticleEditor.Layout:change",f),window.addEventListener("ArticleEditor.ComponentContent:change",F),()=>{window.removeEventListener("ArticleEditor.Layout:change",f),window.removeEventListener("ArticleEditor.ComponentContent:change",F)}},[]),u.useEffect(()=>{if(!e||!W.isActive){V(!1);return}const f=w.current;if(!f)return;const F=()=>{$.direction==="horiz"?V(f.scrollWidth>f.clientWidth):V(f.scrollHeight>f.clientHeight)};F();const z=new ResizeObserver(F);return z.observe(f),()=>z.disconnect()},[e,W.isActive,n.length,R,$.direction]);const oe=u.useCallback(()=>{const f=window.matchMedia("(max-width: 768px)").matches,F=Ui(M.color);f&&!s&&F>.9&&(document.body.style.backgroundColor=""),v(!0),P.current=!0;const z=G=>{G.target===A.current&&G.animationName&&(A.current&&L.current&&A.current.removeEventListener("animationend",L.current),L.current=null,P.current&&(P.current=!1,t()),v(!1))};A.current&&(L.current=z,A.current.addEventListener("animationend",z))},[t,M.color,s]),Pe=(f,F,z)=>{var G,ee;if(f){if(Y.type==="click"&&Y.switch==="image")Y.repeat==="close"&&o===n.length-1?oe():(G=x.current)==null||G.go("+1");else if(Y.type==="click"&&Y.switch==="50/50"){const te=f.getBoundingClientRect(),Z=F-te.left,pe=z-te.top,Ce=te.width,he=te.height;let fe;$.direction==="horiz"?fe=Z<Ce/2?"-1":"+1":fe=pe<he/2?"-1":"+1",(ee=x.current)==null||ee.go(fe)}}},ue=f=>{if(N.current){N.current=!1;return}const F=n[o],z=(F==null?void 0:F.image.objectFit)==="cover";let G,ee;if("changedTouches"in f&&f.changedTouches.length>0)G=f.changedTouches[0].clientX,ee=f.changedTouches[0].clientY;else if("clientX"in f)G=f.clientX,ee=f.clientY;else return;let te;if(z&&O.current){const Z=Ki(O.current);te=G>=Z.left&&G<=Z.right&&ee>=Z.top&&ee<=Z.bottom}else{const Z=O.current?ji(O.current):null;if(!Z){f.target===f.currentTarget&&oe();return}te=G>=Z.x&&G<=Z.x+Z.width&&ee>=Z.y&&ee<=Z.y+Z.height}te?Pe(O.current,G,ee):oe()},ye=f=>{const F=f.target;(F.classList.contains(X.thumbsWrapper)||F.classList.contains(X.thumbsContainer))&&ue(f)};u.useEffect(()=>{if(!e)return;const f=F=>{var z,G;if(F.key==="Escape"){oe();return}if(F.key==="ArrowRight"){d(ee=>(ee+1)%Math.max(n.length,1)),(z=x.current)==null||z.go("+1");return}F.key==="ArrowLeft"&&(d(ee=>(ee-1+Math.max(n.length,1))%Math.max(n.length,1)),(G=x.current)==null||G.go("-1"))};return window.addEventListener("keydown",f),()=>{window.removeEventListener("keydown",f)}},[e,oe,n.length]),u.useEffect(()=>{if(e){if(d(0),T(F=>F+1),P.current=!1,v(!1),m(!1),b({}),!C)return;const f=new CustomEvent("page-overlay",{detail:{itemId:C}});window.dispatchEvent(f)}return()=>{A.current&&L.current&&(A.current.removeEventListener("animationend",L.current),L.current=null),m(!1)}},[e,C]),u.useEffect(()=>{y.current!==null&&y.current!==$.type&&T(f=>f+1),y.current=$.type},[$.type]),u.useEffect(()=>{if(!e)return;const f=document.body.style.overflow,F=window.matchMedia("(max-width: 768px)").matches,z=Ui(M.color);document.body.style.overflow="hidden",m(!1);const G=te=>{te.target===A.current&&!P.current&&te.animationName&&(F&&!s&&z>.9&&(document.body.style.backgroundColor=M.color),m(!0),A.current&&I.current&&A.current.removeEventListener("animationend",I.current),I.current=null)};A.current&&(I.current=G,A.current.addEventListener("animationend",G));const ee=te=>{const Z=te.target;Z&&(Z.closest(`.${X.thumbsWrapper}`)||Z.closest(`.${X.thumbsContainer}`))||$.type!=="slide"&&te.preventDefault()};return document.addEventListener("touchmove",ee,{passive:!1}),()=>{document.body.style.overflow=f,document.removeEventListener("touchmove",ee),A.current&&I.current&&(A.current.removeEventListener("animationend",I.current),I.current=null),m(!1)}},[e,s,M.color,$.type]),u.useEffect(()=>{if(!e)return;const f=F=>{var G,ee;if(P.current){F.stopPropagation();return}if(N.current){N.current=!1;return}const z=F.target;if(!(z&&(z.closest(`.${X.thumbsContainer}`)||z.closest(`.${X.thumbItem}`)||z.closest(`.${X.arrow}`)||z.closest(`.${X.closeButton}`)||z.closest(`.${X.caption}`)))){if($.type==="slide"&&Y.type==="drag"&&((ee=(G=x.current)==null?void 0:G.splide)!=null&&ee.root)){const te=x.current.splide.root;if(z&&(te.contains(z)||te===z))return}if(F.touches.length===0&&F.changedTouches.length>0){const te=n[o],Z=(te==null?void 0:te.image.objectFit)==="cover",pe=F.changedTouches[0];let Ce;if(Z&&O.current){const he=Ki(O.current);Ce=pe.clientX>=he.left&&pe.clientX<=he.right&&pe.clientY>=he.top&&pe.clientY<=he.bottom}else{const he=O.current?ji(O.current):null;if(!he)return;Ce=pe.clientX>=he.x&&pe.clientX<=he.x+he.width&&pe.clientY>=he.y&&pe.clientY<=he.y+he.height}if(!Ce){F.stopPropagation(),P.current=!0;const he=fe=>{fe.stopPropagation(),fe.preventDefault(),document.removeEventListener("click",he,!0)};document.addEventListener("click",he,!0),oe()}}}};return document.addEventListener("touchend",f,{passive:!0}),()=>{document.removeEventListener("touchend",f)}},[e,oe,o,n]);const Re=($.type==="scale"||$.type==="fade")&&$.direction==="vert"&&Y.type==="drag";u.useEffect(()=>{var fe,K;if(!e||!Re||!((K=(fe=x.current)==null?void 0:fe.splide)!=null&&K.root))return;const f=x.current.splide.root,F=30,z=(U,j)=>{if(_.current){const de=Math.abs(U-_.current.x),Le=Math.abs(j-_.current.y);(de>0||Le>0)&&(N.current=!0)}},G=U=>{_.current&&(U.preventDefault(),z(U.clientX,U.clientY))},ee=U=>{_.current&&U.touches.length>0&&(U.preventDefault(),z(U.touches[0].clientX,U.touches[0].clientY))},te=(U,j)=>{if(!_.current||!x.current){_.current=null;return}const de=Math.abs(U-_.current.x),Le=Math.abs(j-_.current.y);Le>F&&Le>de&&x.current.go(j<_.current.y?"+1":"-1"),_.current=null},Z=U=>{_.current&&te(U.clientX,U.clientY),document.removeEventListener("pointerup",Z),document.removeEventListener("pointercancel",Z),document.removeEventListener("pointermove",G)},pe=U=>{if(_.current){if(U.changedTouches.length>0){const j=U.changedTouches[0];te(j.clientX,j.clientY)}document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),document.removeEventListener("touchmove",ee)}},Ce=U=>{_.current={x:U.clientX,y:U.clientY},N.current=!1,document.addEventListener("pointermove",G,{passive:!1}),document.addEventListener("pointerup",Z),document.addEventListener("pointercancel",Z)},he=U=>{U.touches.length>0&&(_.current={x:U.touches[0].clientX,y:U.touches[0].clientY},N.current=!1,document.addEventListener("touchmove",ee,{passive:!1}),document.addEventListener("touchend",pe),document.addEventListener("touchcancel",pe))};return f.addEventListener("pointerdown",Ce),f.addEventListener("touchstart",he),()=>{f.removeEventListener("pointerdown",Ce),f.removeEventListener("touchstart",he),document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",Z),document.removeEventListener("pointercancel",Z),document.removeEventListener("touchmove",ee),document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),_.current=null,N.current=!1}},[e,Re,p]);const ne={backgroundColor:M.color,backdropFilter:`blur(${M.blur}px)`,animationDuration:`${parseInt(q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:go.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:s?null:A,className:Ee(X.background,S?ie:re,{[X.editor]:s},{[X.hidden]:!e}),style:{...ne,...g&&!s&&!S?{position:"absolute"}:{}}}),l.jsxs("div",{ref:s?A:null,className:Ee(X.contentStyle,S?ce:Q,{[X.editor]:s},{[X.hidden]:!e}),style:{animationDuration:`${parseInt(q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(vi,{onMove:f=>d(f.index),ref:x,className:X.lightboxSplide,options:{arrows:!1,speed:$.duration?parseInt($.duration):500,direction:$.direction==="horiz"||$.type==="fade"||$.type==="scale"?"ltr":"ttb",pagination:!1,drag:Y.type==="drag"&&!Re,perPage:1,width:"100%",height:"100%",type:$.type==="fade"||$.type==="scale"?"fade":"loop",padding:0,rewind:Y.repeat!=="close",start:0},style:{"--splide-speed":$.duration},children:n.map((f,F)=>{const z=Gn(D.position,D.offset,s),G=`${E.scalingValue(D.padding.top,s)} ${E.scalingValue(D.padding.right,s)} ${E.scalingValue(D.padding.bottom,s)} ${E.scalingValue(D.padding.left,s)}`,ee=$.type==="scale"?(()=>{const{transform:te,...Z}=z;return{...Z,position:"absolute",padding:G,boxSizing:"border-box","--position-transform":te||"none"}})():{...z,position:"absolute",padding:G,boxSizing:"border-box"};return l.jsx(bi,{children:l.jsx("div",{className:X.imgWrapper,onClick:ue,children:l.jsx("img",{ref:F===o?O:null,className:Ee(X.imageStyle,{[X.contain]:f.image.objectFit==="contain",[X.cover]:f.image.objectFit==="cover",[X.scaleSlide]:$.type==="scale"}),src:f.image.url,alt:f.image.name??"",style:{...ee,pointerEvents:f.image.objectFit==="contain"?"none":"auto"}})})},F)})},p),H.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Ee(X.arrow,{[X.arrowVertical]:$.direction==="vert"}),style:{color:H.color,"--arrow-hover-color":H.hover},children:l.jsxs("button",{className:X.arrowInner,style:{transform:`translate(${E.scalingValue(H.offset.x,s)}, ${E.scalingValue(H.offset.y*($.direction==="horiz"?1:-1),s)}) scale(${H.scale}) rotate(${$.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var f;return(f=x.current)==null?void 0:f.go("-1")},"aria-label":"Previous",children:[H.arrowsImgUrl&&l.jsx(Ft,{url:H.arrowsImgUrl,fill:H.color,hoverFill:H.hover,className:Ee(X.arrowImg,X.mirror)}),!H.arrowsImgUrl&&l.jsx(qi,{color:H.color,className:Ee(X.arrowIcon,X.arrowImg,X.mirror)})]})}),l.jsx("div",{className:Ee(X.arrow,X.nextArrow,{[X.arrowVertical]:$.direction==="vert"}),style:{color:H.color,"--arrow-hover-color":H.hover},children:l.jsxs("button",{className:X.arrowInner,style:{transform:`translate(${E.scalingValue(H.offset.x*($.direction==="horiz"?-1:1),s)}, ${E.scalingValue(H.offset.y,s)}) scale(${H.scale}) rotate(${$.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var f;return(f=x.current)==null?void 0:f.go("+1")},"aria-label":"Next",children:[H.arrowsImgUrl&&l.jsx(Ft,{url:H.arrowsImgUrl,fill:H.color,hoverFill:H.hover,className:X.arrowImg}),!H.arrowsImgUrl&&l.jsx(qi,{color:H.color,className:Ee(X.arrowIcon,X.arrowImg)})]})})]}),M.closeIconUrl&&(()=>{const f=Gn(M.closeIconAlign,M.closeIconOffset,s),F=`scale(${M.closeIconScale})`,z=f.transform?`${f.transform} ${F}`:F;return l.jsx("button",{className:X.closeButton,style:{...f,transform:z},onClick:oe,"aria-label":"Close lightbox",children:l.jsx(Ft,{url:M.closeIconUrl,fill:M.closeIconColor??"#000000",hoverFill:M.closeIconHover??"#cccccc"})})})(),k&&k.isActive&&r.imageCaption&&((h=n[o])==null?void 0:h.imageCaption)&&(()=>{const{widthSettings:f,fontSettings:F,letterSpacing:z,textAlign:G,wordSpacing:ee,fontSizeLineHeight:te,textAppearance:Z,color:pe}=r.imageCaption;return l.jsx("div",{className:X.caption,style:{...Gn(k.alignment,k.offset,s),fontFamily:Tr(F.fontFamily),fontWeight:F.fontWeight,fontStyle:F.fontStyle,width:f.sizing==="auto"?"max-content":E.scalingValue(f.width,s),letterSpacing:E.scalingValue(z,s),wordSpacing:E.scalingValue(ee,s),textAlign:G,fontSize:E.scalingValue(te.fontSize,s),lineHeight:E.scalingValue(te.lineHeight,s),textTransform:Z.textTransform??"none",textDecoration:Z.textDecoration??"none",fontVariant:Z.fontVariant??"normal",color:pe},onClick:Ce=>Ce.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:X.captionTextInner,style:{"--link-color":k.linkColor,"--link-hover-color":k.linkHoverColor},children:l.jsx(An,{content:n[o].imageCaption})})})})(),W.isActive&&(()=>{const[f,F]=W.position.split("-"),z=$.direction==="horiz"?`${f}-left`:W.position,G=Gn(z,W.offset,s),ee=()=>{if($.direction==="horiz"){if(F==="left")return"flex-start";if(F==="center")return"center";if(F==="right")return"flex-end"}else{if(f==="top")return"flex-start";if(f==="middle")return"center";if(f==="bottom")return"flex-end"}return"flex-start"};return l.jsx("div",{ref:w,className:X.thumbsWrapper,onClick:te=>ye(te),style:{position:s?"absolute":"fixed",...G,...$.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:Ee(X.thumbsContainer,{[X.thumbsContainerVertical]:$.direction==="vert",[X.thumbsAlignStart]:W.align==="start",[X.thumbsAlignCenter]:W.align==="center",[X.thumbsAlignEnd]:W.align==="end"}),style:{gap:E.scalingValue(W.grid.gap,s),justifyContent:B?"flex-start":ee()},children:n.map((te,Z)=>{const pe=Z===o,Ce=R[Z],fe=W.grid.size*(pe?W.activeState.scale:1),K=()=>{if(W.fit!=="fit")return{};if(!Ce)return $.direction==="horiz"?{height:E.scalingValue(fe,s)}:{width:E.scalingValue(fe,s)};const U=Ce.width/Ce.height;if($.direction==="horiz"){const j=fe,de=j*U;return{width:E.scalingValue(de,s),height:E.scalingValue(j,s)}}else{const j=fe,de=j/U;return{width:E.scalingValue(j,s),height:E.scalingValue(de,s)}}};return l.jsx("button",{className:X.thumbItem,style:{...$.direction==="horiz"&&W.fit!=="fit"?{height:E.scalingValue(fe,s)}:{},...$.direction==="vert"&&W.fit!=="fit"?{width:E.scalingValue(fe,s)}:{},...W.fit==="cover"?{width:E.scalingValue(fe,s),height:E.scalingValue(fe,s)}:{},...K(),transition:pe?"all 0.25s ease-out":"none",opacity:pe?W.activeState.opacity/100:W.opacity/100,"--thumb-hover":W.activeState.opacity/100},onClick:U=>{var j;U.stopPropagation(),d(Z),(j=x.current)==null||j.go(Z)},onMouseEnter:()=>{var U;W.triggers==="hov"&&((U=x.current)==null||U.go(Z))},children:l.jsx("img",{src:te.image.url,alt:te.image.name??"",onLoad:U=>{const j=U.currentTarget;j.naturalWidth&&j.naturalHeight&&b(de=>({...de,[Z]:{width:j.naturalWidth,height:j.naturalHeight}}))},style:{objectFit:W.fit==="cover"?"cover":"contain",...W.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...W.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${te.image.name}-${Z}`)})})})})()]})]}),document.getElementById(a))};function qi({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.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 pc={element:dc,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Yn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function mc(e){return`
|
|
6
|
+
*/const hl="RichTextRenderer-module__link___BWeZ2",fl={link:hl},yl=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))},Ar=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>yl(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function Ct(e){const{color:t,...n}=e;return n}function nt(e,t){var i,a,s;const{fontSize:n,lineHeight:r}=e;return{fontFamily:Ar(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:w.scalingValue(e.letterSpacing,t),wordSpacing:w.scalingValue(e.wordSpacing,t),fontSize:w.scalingValue(n,t),lineHeight:r!==void 0?w.scalingValue(r,t):void 0,textTransform:(i=e.textAppearance)==null?void 0:i.textTransform,textDecoration:(a=e.textAppearance)==null?void 0:a.textDecoration,fontVariant:(s=e.textAppearance)==null?void 0:s.fontVariant,textAlign:e.textAlign,color:e.color}}const Fn=({content:e})=>{const t=n=>n.map((r,i)=>r.type==="link"?l.jsx("a",{className:fl.link,href:r.value,target:r.target,children:t(r.children)},i):l.jsx("span",{style:vl(r),children:r.text},i));return l.jsx(l.Fragment,{children:e.map((n,r)=>{const i=n.children;return l.jsx("div",{children:t(i)},r)})})};function vl(e){return{...e.fontFamily&&{fontFamily:Ar(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 bl="SvgImage-module__svg___q3xE-",xl="SvgImage-module__img___VsTm-",Gi={svg:bl,img:xl},Cl=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Sl=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Ht=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:i})=>{const[a,s]=u.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return u.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');s(c)}},[]),!Cl(e)||!a?l.jsx("img",{src:e,alt:"",className:Le(Gi.img,r),style:i}):l.jsx("span",{"data-supports-mask":a,className:Le(Gi.svg,r),style:{"--svg":Sl(e),"--fill":t,"--hover-fill":n,...i??{}}})},$l={"top-left":se.topLeftAlignment,"top-center":se.topCenterAlignment,"top-right":se.topRightAlignment,"middle-left":se.middleLeftAlignment,"middle-center":se.middleCenterAlignment,"middle-right":se.middleRightAlignment,"bottom-left":se.bottomLeftAlignment,"bottom-center":se.bottomCenterAlignment,"bottom-right":se.bottomRightAlignment};function wl({settings:e,content:t,styles:n,isEditor:r}){const[i,a]=u.useState(null),{widthSettings:s,fontSettings:c,letterSpacing:o,textAlign:d,wordSpacing:p,fontSizeLineHeight:T,textAppearance:x,color:y}=n.imageCaption,[g,h]=u.useState(void 0),[P,C]=u.useState(null),[f,b]=u.useState(0),[M,_]=u.useState(0),{direction:E,transition:S,controls:A,pagination:I,imageCaption:k,triggers:$}=e,O=u.useRef(S.type),{x:V,y:q}=e.controls.offset,Y=L=>{i&&i.go(L)};return u.useEffect(()=>{if(!P)return;const L=new ResizeObserver(R=>{if(!i)return;const[B]=R;h({width:Math.round(B.contentRect.width),height:Math.round(B.contentRect.height)})});return L.observe(P),()=>L.unobserve(P)},[P]),u.useEffect(()=>{!i||O.current===S.type||(_(L=>L+1),O.current=S.type)},[S.type]),l.jsx("div",{className:Le(se.wrapper,{[se.editor]:r}),ref:C,children:l.jsxs("div",{className:se.sliderInner,style:{width:g?g.width:"100%",height:g?g.height:"100%",backgroundColor:S.backgroundColor&&S.type==="fade in"?S.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:Le(se.captionBlock),children:l.jsx("div",{className:se.captionTextWrapper,children:t.map((L,R)=>l.jsx("div",{className:Le(se.captionText,$l[k.alignment],{[se.withPointerEvents]:R===f&&r,[se.active]:R===f}),style:{fontFamily:Ar(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:s.sizing==="auto"?"max-content":w.scalingValue(s.width,r),letterSpacing:w.scalingValue(o,r),wordSpacing:w.scalingValue(p,r),textAlign:d,fontSize:w.scalingValue(T.fontSize,r),lineHeight:w.scalingValue(T.lineHeight,r),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:y,transitionDuration:S.duration?`${Math.round(parseInt(S.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:se.captionTextInner,style:{"--link-hover-color":k.linkHoverColor,"--link-color":k.linkColor,position:"relative",top:w.scalingValue(k.offset.y,r),left:w.scalingValue(k.offset.x,r)},children:l.jsx(Fn,{content:L.imageCaption})})},R))})}),l.jsx(wi,{onMove:L=>{b(L.index)},ref:a,options:{arrows:!1,speed:S.duration?parseInt(S.duration):500,autoplay:$.autoPlay!==null,...$.autoPlay!==null&&{interval:parseInt($.autoPlay)*1e3},direction:E==="horiz"||S.type==="fade in"?"ltr":"ttb",pagination:!1,drag:$.triggersList.drag,perPage:1,width:g?g.width:"100%",height:g?g.height:"100%",type:S.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((L,R)=>l.jsx(Ti,{children:l.jsx("div",{className:se.sliderItem,children:l.jsx("div",{className:se.imgWrapper,children:l.jsx("img",{className:Le(se.sliderImage,{[se.contain]:L.image.objectFit==="contain",[se.cover]:L.image.objectFit==="cover"}),src:L.image.url,alt:L.image.name??""})})})},R))},M),A.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Le(se.arrow,{[se.arrowVertical]:E==="vert",[se.hoverArrow]:A.show==="on hover"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:l.jsxs("button",{onClick:()=>{Y("-1")},className:se.arrowInner,style:{transform:`translate(${w.scalingValue(V,r)}, ${w.scalingValue(q*(E==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:[A.arrowsImgUrl&&l.jsx(Ht,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:Le(se.arrowImg,se.mirror)}),!A.arrowsImgUrl&&l.jsx(Yi,{color:A.color,className:Le(se.arrowIcon,se.arrowImg,se.mirror)})]})}),l.jsx("div",{className:Le(se.arrow,se.nextArrow,{[se.arrowVertical]:E==="vert",[se.hoverArrow]:A.show==="on hover"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:l.jsxs("button",{className:se.arrowInner,onClick:()=>Y("+1"),style:{transform:`translate(${w.scalingValue(V*(E==="horiz"?-1:1),r)}, ${w.scalingValue(q,r)}) scale(${e.controls.scale/100}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:[A.arrowsImgUrl&&l.jsx(Ht,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:se.arrowImg}),!A.arrowsImgUrl&&l.jsx(Yi,{color:A.color,className:Le(se.arrowIcon,se.arrowImg)})]})})]}),$.triggersList.click&&l.jsx("div",{className:se.clickOverlay,onClick:()=>{i&&i.go("+1")}}),I.isActive&&l.jsx("div",{className:Le(se.pagination,{[se.paginationInsideBottom]:I.position==="inside-1"&&E==="horiz",[se.paginationInsideTop]:I.position==="inside-2"&&E==="horiz",[se.paginationOutsideBottom]:I.position==="outside-1"&&E==="horiz",[se.paginationOutsideTop]:I.position==="outside-2"&&E==="horiz",[se.paginationInsideLeft]:I.position==="inside-1"&&E==="vert",[se.paginationInsideRight]:I.position==="inside-2"&&E==="vert",[se.paginationOutsideLeft]:I.position==="outside-1"&&E==="vert",[se.paginationOutsideRight]:I.position==="outside-2"&&E==="vert",[se.paginationVertical]:E==="vert"}),children:l.jsx("div",{className:se.paginationInner,style:{backgroundColor:I.colors[2],transform:`scale(${I.scale/100}) translate(${w.scalingValue(I.offset.x,r)}, ${w.scalingValue(I.offset.y,r)}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:t.map((L,R)=>l.jsx("button",{onClick:()=>{i&&i.go(R)},className:Le(se.paginationItem),children:l.jsx("div",{className:Le(se.dot,{[se.activeDot]:R===f}),style:{backgroundColor:R===f?I.colors[0]:I.colors[1],"--pagination-hover-color":I.hover}})},R))})})]})})}function Yi({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.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 Tl={element:wl,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},Ll="ImageRevealSlider-module__imageRevealSlider___UE5Ob",El="ImageRevealSlider-module__image___Qjt-e",Pl="ImageRevealSlider-module__link___N-iLG",_l="ImageRevealSlider-module__cursor___2U03d",sn={imageRevealSlider:Ll,image:El,link:Pl,cursor:_l};function Xi(e,t,n){for(const r of n){const i=new Image;i.src=r.url;const a=r.width?Number.parseFloat(r.width):i.naturalWidth,s=i.naturalHeight/i.naturalWidth*a,c=a/2,o=s/2;if(e>=r.x-c&&e<=r.x+c&&t>=r.y-o&&t<=r.y+o)return!0}return!1}function Br(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Al(e,t,n,r){let i,a;if(t==="custom"){i=n;const s=await Br(e);a=s.height/s.width*i}else if(t==="random"){i=Math.random()*(r.max-r.min)+r.min;const s=await Br(e);a=s.height/s.width*i}else{const s=await Br(e);i=s.width,a=s.height}return{width:i,height:a,finalWidth:`${i}px`}}function Rl({settings:e,content:t,isEditor:n}){const[r,i]=u.useState(null),[a,s]=u.useState([]),[c,o]=u.useState(0),d=u.useRef(0),[p,T]=u.useState({x:0,y:0}),[x,y]=u.useState(1),[g,h]=u.useState("none"),P=u.useRef({x:0,y:0}),[C,f]=u.useState(!1),{sizeType:b,imageWidth:M,randomRangeImageWidth:_}=e.imageSize,{revealPosition:E,visible:S}=e.position,{cursorType:A,target:I,defaultCursorScale:k,defaultCursor:$,hoverCursorScale:O,hoverCursor:V}=e.cursor;u.useEffect(()=>{if(!r)return;const L=(F,W)=>{const j=r.getBoundingClientRect(),Q=F-j.left,oe=W-j.top;if(T({x:Q,y:oe}),A==="system"){h("none"),y(1);return}const te=Q,ce=oe,v=document.elementFromPoint(j.left+te,j.top+ce);if(v&&v.closest("a")){h("none"),y(1);return}const ie=Xi(te,ce,a)||I==="area"?{img:V??"none",scale:O}:{img:$??"none",scale:k};h(ie.img),y(ie.scale)},R=F=>{F.stopPropagation(),P.current={x:F.clientX,y:F.clientY},L(F.clientX,F.clientY)},B=()=>{C&&L(P.current.x,P.current.y)};return r.addEventListener("mousemove",R),window.addEventListener("scroll",B,!0),()=>{r.removeEventListener("mousemove",R),window.removeEventListener("scroll",B,!0)}},[r,C,p,A,I,V,$,O,k,a]),u.useEffect(()=>{C||(h("none"),y(0))},[C]);const q=async(L,R,B,F={})=>{const{width:W,height:j,finalWidth:Q}=await Al(L.image.url,b,M,_);let oe=0,te=0;E==="same"?(oe=R/2,te=B/2):(oe=F.x??Math.random()*R,te=F.y??Math.random()*B);const ce=Math.min(Math.max(oe,W/2),R-W/2),v=Math.min(Math.max(te,j/2),B-j/2);return{id:d.current++,url:L.image.url,link:L.link,name:L.image.name,x:ce,y:v,width:Q}};u.useEffect(()=>{if(!r||t.length===0)return;const L=r.getBoundingClientRect(),R=L.width,B=L.height,F=[];(async()=>{const j=t[0],Q=await q(j,R,B);F.push(Q),s(F),o(1)})()},[b,M,_,E,r]),u.useEffect(()=>{S==="last One"&&s(L=>L.length>0?[L[L.length-1]]:[])},[S]);const Y=async L=>{if(!r)return;const R=r.getBoundingClientRect(),B=L.clientX-R.left,F=L.clientY-R.top;if(I==="image"&&!Xi(B,F,a))return;let W=0,j=0;E==="on Click"?(W=B,j=F):E==="same"?(W=R.width/2,j=R.height/2):(W=Math.random()*R.width,j=Math.random()*R.height);const Q=t[c],oe=await q(Q,R.width,R.height,{x:W,y:j});s(te=>S==="all"?[...te,oe]:[oe]),o(te=>te>=t.length-1?0:te+1)};return l.jsxs("div",{ref:i,onClick:Y,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:sn.imageRevealSlider,style:{cursor:g==="none"?"default":"none"},children:[a.map(L=>l.jsx("div",{className:sn.wrapper,style:{top:`${L.y}px`,left:`${L.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:L.width??"auto",height:"auto",cursor:g==="none"?"default":"none"},children:I==="area"&&L.link?l.jsx("a",{href:L.link,target:"_blank",className:sn.link,children:l.jsx("img",{src:L.url,alt:L.name,className:sn.image},L.id)}):l.jsx("img",{src:L.url,alt:L.name,className:sn.image},L.id)},L.id)),C&&l.jsx("div",{className:sn.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Il={element:Rl,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},kl="LightBox-module__hidden___9s-9x",Wl="LightBox-module__heroImage___sTxNF",Ml="LightBox-module__background___rm9ml",Fl="LightBox-module__editor___4ACaY",Nl="LightBox-module__contentStyle___Bgnsq",Hl="LightBox-module__imageStyle___tLIlB",Bl="LightBox-module__imgWrapper___LuFUp",Ol="LightBox-module__contain___8-yaS",Vl="LightBox-module__cover___hNvOG",Dl="LightBox-module__caption___b6L2I",jl="LightBox-module__captionTextInner___rCGNH",zl="LightBox-module__lightboxSplide___XFuWC",Kl="LightBox-module__arrow___iz38X",Ul="LightBox-module__arrowVertical___Zfz81",ql="LightBox-module__nextArrow___zkAQN",Gl="LightBox-module__arrowInner___p48sW",Yl="LightBox-module__arrowIcon___3VaFf",Xl="LightBox-module__arrowImg___pNV88",Zl="LightBox-module__mirror___pjeXc",Jl="LightBox-module__thumbsWrapper___GB-nU",Ql="LightBox-module__thumbsContainerVertical___wttk5",ec="LightBox-module__thumbsContainer___osSma",tc="LightBox-module__thumbsAlignStart___MO6tY",nc="LightBox-module__thumbsAlignCenter___Q4sUx",rc="LightBox-module__thumbsAlignEnd___p4y9R",ic="LightBox-module__thumbItem___HvnF3",oc="LightBox-module__closeButton___g2khP",ac="LightBox-module__fadeIn___0m5GW",sc="LightBox-module__slideInLeft___gPYwC",lc="LightBox-module__slideInRight___S-pPp",cc="LightBox-module__slideInTop___DFdAj",dc="LightBox-module__slideInBottom___m27kZ",uc="LightBox-module__fadeOut___55qBR",pc="LightBox-module__slideOutLeft___NvU7P",mc="LightBox-module__slideOutRight___SK7eC",gc="LightBox-module__slideOutTop___Vgg0z",hc="LightBox-module__slideOutBottom___nJ0Ef",fc="LightBox-module__scaleSlide___vZriG",Z={hidden:kl,heroImage:Wl,background:Ml,editor:Fl,contentStyle:Nl,imageStyle:Hl,imgWrapper:Bl,contain:Ol,cover:Vl,caption:Dl,captionTextInner:jl,lightboxSplide:zl,arrow:Kl,arrowVertical:Ul,nextArrow:ql,arrowInner:Gl,arrowIcon:Yl,arrowImg:Xl,mirror:Zl,thumbsWrapper:Jl,thumbsContainerVertical:Ql,thumbsContainer:ec,thumbsAlignStart:tc,thumbsAlignCenter:nc,thumbsAlignEnd:rc,thumbItem:ic,closeButton:oc,fadeIn:ac,slideInLeft:sc,slideInRight:lc,slideInTop:cc,slideInBottom:dc,fadeOut:uc,slideOutLeft:pc,slideOutRight:mc,slideOutTop:gc,slideOutBottom:hc,scaleSlide:fc},Qn=(e,t,n)=>{const r={},[i,a]=e.split("-");return i==="top"?(r.top="0",r.bottom="auto"):i==="middle"?(r.top="50%",r.bottom="auto"):i==="bottom"&&(r.top="auto",r.bottom="0"),a==="left"?(r.left="0",r.right="auto"):a==="center"?(r.left="50%",r.right="auto"):a==="right"&&(r.left="auto",r.right="0"),i==="middle"&&a==="center"?r.transform=`translate(calc(-50% + ${w.scalingValue(t.x,n)}), calc(-50% + ${w.scalingValue(t.y,n)}))`:i==="middle"?r.transform=`translate(${w.scalingValue(t.x,n)}, calc(-50% + ${w.scalingValue(t.y,n)}))`:a==="center"?r.transform=`translate(calc(-50% + ${w.scalingValue(t.x,n)}), ${w.scalingValue(t.y,n)})`:r.transform=`translate(${w.scalingValue(t.x,n)}, ${w.scalingValue(t.y,n)})`,r};function oa(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 Zi(e){const t=e.getBoundingClientRect(),n=oa(e),r=Math.max(0,t.width-n.left-n.right),i=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,s=e.naturalHeight,c=r/i,o=a/s;let d,p;o>c?(d=r,p=r/o):(p=i,d=i*o);const T=t.left+n.left,x=t.top+n.top,y=(r-d)/2+T,g=(i-p)/2+x;return{x:y,y:g,width:d,height:p}}function Ji(e){const t=e.getBoundingClientRect(),n=oa(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Qi(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(i=>parseFloat(i.trim()));return r.length===4?r[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function yc(e,t){const n=(()=>{if(e==="fade in")return Z.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Z.slideInLeft;case"right":return Z.slideInRight;case"top":return Z.slideInTop;case"bottom":return Z.slideInBottom;default:return Z.slideInRight}return Z.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return Z.fadeIn;if(e==="slide in")switch(t){case"left":return Z.slideInLeft;case"right":return Z.slideInRight;case"top":return Z.slideInTop;case"bottom":return Z.slideInBottom;default:return Z.slideInRight}return Z.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Z.fadeOut;if(e==="slide in")switch(t){case"left":return Z.slideOutLeft;case"right":return Z.slideOutRight;case"top":return Z.slideOutTop;case"bottom":return Z.slideOutBottom;default:return Z.slideOutRight}return Z.fadeOut})(),a=(()=>{if(e==="fade in")return Z.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Z.slideOutLeft;case"right":return Z.slideOutRight;case"top":return Z.slideOutTop;case"bottom":return Z.slideOutBottom;default:return Z.slideOutRight}return Z.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:i,disappearClass:a}}const vc=({settings:e,content:t,styles:n,portalId:r,activeEvent:i,isEditor:a,isPreviewMode:s})=>{const[c,o]=u.useState(!1),{url:d}=e.thumbnailBlock.cover;return u.useEffect(()=>{i==="close"&&o(!1),i==="open"&&o(!0)},[i]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:d,alt:"Cover",className:Z.heroImage,onClick:()=>o(!0)}),l.jsx(bc,{isOpen:c,onClose:()=>o(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:a})]})},bc=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:i,portalId:a,isEditor:s,metadata:c})=>{var N;const[o,d]=u.useState(0),[p,T]=u.useState(0),[x,y]=u.useState(!1),[g,h]=u.useState(!1),[P,C]=u.useState({}),f=u.useRef(null),b=u.useRef(null),M=u.useRef(null),_=u.useRef(!1),E=u.useRef(null),S=u.useRef(null),A=u.useRef(null),I=u.useRef(null),k=u.useRef(!1),$=u.useRef(null),[O,V]=u.useState(!1),{appear:q,triggers:Y,slider:L,thumbnail:R,controls:B,area:F,caption:W,layout:j}=i.lightboxBlock,{appearClass:Q,backdropAppearClass:oe,backdropDisappearClass:te,disappearClass:ce}=yc(q.type,q.direction),v=(c==null?void 0:c.itemId)??null;u.useEffect(()=>{const m=()=>{setTimeout(()=>{var D,U;(U=(D=f.current)==null?void 0:D.splide)==null||U.refresh()},16)},H=()=>{T(D=>D+1)};return window.addEventListener("ArticleEditor.Layout:change",m),window.addEventListener("ArticleEditor.ComponentContent:change",H),()=>{window.removeEventListener("ArticleEditor.Layout:change",m),window.removeEventListener("ArticleEditor.ComponentContent:change",H)}},[]),u.useEffect(()=>{if(!e||!R.isActive){V(!1);return}const m=$.current;if(!m)return;const H=()=>{L.direction==="horiz"?V(m.scrollWidth>m.clientWidth):V(m.scrollHeight>m.clientHeight)};H();const D=new ResizeObserver(H);return D.observe(m),()=>D.disconnect()},[e,R.isActive,n.length,P,L.direction]);const ie=u.useCallback(()=>{const m=window.matchMedia("(max-width: 768px)").matches,H=Qi(F.color);m&&!s&&H>.9&&(document.body.style.backgroundColor=""),y(!0),_.current=!0;const D=U=>{U.target===E.current&&U.animationName&&(E.current&&S.current&&E.current.removeEventListener("animationend",S.current),S.current=null,_.current&&(_.current=!1,t()),y(!1))};E.current&&(S.current=D,E.current.addEventListener("animationend",D))},[t,F.color,s]),$e=(m,H,D)=>{var U,ne;if(m){if(Y.type==="click"&&Y.switch==="image")Y.repeat==="close"&&o===n.length-1?ie():(U=f.current)==null||U.go("+1");else if(Y.type==="click"&&Y.switch==="50/50"){const ee=m.getBoundingClientRect(),J=H-ee.left,ae=D-ee.top,ge=ee.width,me=ee.height;let he;L.direction==="horiz"?he=J<ge/2?"-1":"+1":he=ae<me/2?"-1":"+1",(ne=f.current)==null||ne.go(he)}}},de=m=>{if(k.current){k.current=!1;return}const H=n[o],D=(H==null?void 0:H.image.objectFit)==="cover";let U,ne;if("changedTouches"in m&&m.changedTouches.length>0)U=m.changedTouches[0].clientX,ne=m.changedTouches[0].clientY;else if("clientX"in m)U=m.clientX,ne=m.clientY;else return;let ee;if(D&&M.current){const J=Ji(M.current);ee=U>=J.left&&U<=J.right&&ne>=J.top&&ne<=J.bottom}else{const J=M.current?Zi(M.current):null;if(!J){m.target===m.currentTarget&&ie();return}ee=U>=J.x&&U<=J.x+J.width&&ne>=J.y&&ne<=J.y+J.height}ee?$e(M.current,U,ne):ie()},ye=m=>{const H=m.target;(H.classList.contains(Z.thumbsWrapper)||H.classList.contains(Z.thumbsContainer))&&de(m)};u.useEffect(()=>{if(!e)return;const m=H=>{var D,U;if(H.key==="Escape"){ie();return}if(H.key==="ArrowRight"){d(ne=>(ne+1)%Math.max(n.length,1)),(D=f.current)==null||D.go("+1");return}H.key==="ArrowLeft"&&(d(ne=>(ne-1+Math.max(n.length,1))%Math.max(n.length,1)),(U=f.current)==null||U.go("-1"))};return window.addEventListener("keydown",m),()=>{window.removeEventListener("keydown",m)}},[e,ie,n.length]),u.useEffect(()=>{if(e){if(d(0),T(H=>H+1),_.current=!1,y(!1),h(!1),C({}),!v)return;const m=new CustomEvent("page-overlay",{detail:{itemId:v}});window.dispatchEvent(m)}return()=>{E.current&&S.current&&(E.current.removeEventListener("animationend",S.current),S.current=null),h(!1)}},[e,v]),u.useEffect(()=>{b.current!==null&&b.current!==L.type&&T(m=>m+1),b.current=L.type},[L.type]),u.useEffect(()=>{if(!e)return;const m=document.body.style.overflow,H=window.matchMedia("(max-width: 768px)").matches,D=Qi(F.color);document.body.style.overflow="hidden",h(!1);const U=ee=>{ee.target===E.current&&!_.current&&ee.animationName&&(H&&!s&&D>.9&&(document.body.style.backgroundColor=F.color),h(!0),E.current&&A.current&&E.current.removeEventListener("animationend",A.current),A.current=null)};E.current&&(A.current=U,E.current.addEventListener("animationend",U));const ne=ee=>{const J=ee.target;J&&(J.closest(`.${Z.thumbsWrapper}`)||J.closest(`.${Z.thumbsContainer}`))||L.type!=="slide"&&ee.preventDefault()};return document.addEventListener("touchmove",ne,{passive:!1}),()=>{document.body.style.overflow=m,document.removeEventListener("touchmove",ne),E.current&&A.current&&(E.current.removeEventListener("animationend",A.current),A.current=null),h(!1)}},[e,s,F.color,L.type]),u.useEffect(()=>{if(!e)return;const m=H=>{var U,ne;if(_.current){H.stopPropagation();return}if(k.current){k.current=!1;return}const D=H.target;if(!(D&&(D.closest(`.${Z.thumbsContainer}`)||D.closest(`.${Z.thumbItem}`)||D.closest(`.${Z.arrow}`)||D.closest(`.${Z.closeButton}`)||D.closest(`.${Z.caption}`)))){if(L.type==="slide"&&Y.type==="drag"&&((ne=(U=f.current)==null?void 0:U.splide)!=null&&ne.root)){const ee=f.current.splide.root;if(D&&(ee.contains(D)||ee===D))return}if(H.touches.length===0&&H.changedTouches.length>0){const ee=n[o],J=(ee==null?void 0:ee.image.objectFit)==="cover",ae=H.changedTouches[0];let ge;if(J&&M.current){const me=Ji(M.current);ge=ae.clientX>=me.left&&ae.clientX<=me.right&&ae.clientY>=me.top&&ae.clientY<=me.bottom}else{const me=M.current?Zi(M.current):null;if(!me)return;ge=ae.clientX>=me.x&&ae.clientX<=me.x+me.width&&ae.clientY>=me.y&&ae.clientY<=me.y+me.height}if(!ge){H.stopPropagation(),_.current=!0;const me=he=>{he.stopPropagation(),he.preventDefault(),document.removeEventListener("click",me,!0)};document.addEventListener("click",me,!0),ie()}}}};return document.addEventListener("touchend",m,{passive:!0}),()=>{document.removeEventListener("touchend",m)}},[e,ie,o,n]);const Re=(L.type==="scale"||L.type==="fade")&&L.direction==="vert"&&Y.type==="drag";u.useEffect(()=>{var he,K;if(!e||!Re||!((K=(he=f.current)==null?void 0:he.splide)!=null&&K.root))return;const m=f.current.splide.root,H=30,D=(G,z)=>{if(I.current){const le=Math.abs(G-I.current.x),we=Math.abs(z-I.current.y);(le>0||we>0)&&(k.current=!0)}},U=G=>{I.current&&(G.preventDefault(),D(G.clientX,G.clientY))},ne=G=>{I.current&&G.touches.length>0&&(G.preventDefault(),D(G.touches[0].clientX,G.touches[0].clientY))},ee=(G,z)=>{if(!I.current||!f.current){I.current=null;return}const le=Math.abs(G-I.current.x),we=Math.abs(z-I.current.y);we>H&&we>le&&f.current.go(z<I.current.y?"+1":"-1"),I.current=null},J=G=>{I.current&&ee(G.clientX,G.clientY),document.removeEventListener("pointerup",J),document.removeEventListener("pointercancel",J),document.removeEventListener("pointermove",U)},ae=G=>{if(I.current){if(G.changedTouches.length>0){const z=G.changedTouches[0];ee(z.clientX,z.clientY)}document.removeEventListener("touchend",ae),document.removeEventListener("touchcancel",ae),document.removeEventListener("touchmove",ne)}},ge=G=>{I.current={x:G.clientX,y:G.clientY},k.current=!1,document.addEventListener("pointermove",U,{passive:!1}),document.addEventListener("pointerup",J),document.addEventListener("pointercancel",J)},me=G=>{G.touches.length>0&&(I.current={x:G.touches[0].clientX,y:G.touches[0].clientY},k.current=!1,document.addEventListener("touchmove",ne,{passive:!1}),document.addEventListener("touchend",ae),document.addEventListener("touchcancel",ae))};return m.addEventListener("pointerdown",ge),m.addEventListener("touchstart",me),()=>{m.removeEventListener("pointerdown",ge),m.removeEventListener("touchstart",me),document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",J),document.removeEventListener("pointercancel",J),document.removeEventListener("touchmove",ne),document.removeEventListener("touchend",ae),document.removeEventListener("touchcancel",ae),I.current=null,k.current=!1}},[e,Re,p]);const re={backgroundColor:F.color,backdropFilter:`blur(${F.blur}px)`,animationDuration:`${parseInt(q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:So.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:s?null:E,className:Le(Z.background,x?te:oe,{[Z.editor]:s},{[Z.hidden]:!e}),style:{...re,...g&&!s&&!x?{position:"absolute"}:{}}}),l.jsxs("div",{ref:s?E:null,className:Le(Z.contentStyle,x?ce:Q,{[Z.editor]:s},{[Z.hidden]:!e}),style:{animationDuration:`${parseInt(q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(wi,{onMove:m=>d(m.index),ref:f,className:Z.lightboxSplide,options:{arrows:!1,speed:L.duration?parseInt(L.duration):500,direction:L.direction==="horiz"||L.type==="fade"||L.type==="scale"?"ltr":"ttb",pagination:!1,drag:Y.type==="drag"&&!Re,perPage:1,width:"100%",height:"100%",type:L.type==="fade"||L.type==="scale"?"fade":"loop",padding:0,rewind:Y.repeat!=="close",start:0},style:{"--splide-speed":L.duration},children:n.map((m,H)=>{const D=Qn(j.position,j.offset,s),U=`${w.scalingValue(j.padding.top,s)} ${w.scalingValue(j.padding.right,s)} ${w.scalingValue(j.padding.bottom,s)} ${w.scalingValue(j.padding.left,s)}`,ne=L.type==="scale"?(()=>{const{transform:ee,...J}=D;return{...J,position:"absolute",padding:U,boxSizing:"border-box","--position-transform":ee||"none"}})():{...D,position:"absolute",padding:U,boxSizing:"border-box"};return l.jsx(Ti,{children:l.jsx("div",{className:Z.imgWrapper,onClick:de,children:l.jsx("img",{ref:H===o?M:null,className:Le(Z.imageStyle,{[Z.contain]:m.image.objectFit==="contain",[Z.cover]:m.image.objectFit==="cover",[Z.scaleSlide]:L.type==="scale"}),src:m.image.url,alt:m.image.name??"",style:{...ne,pointerEvents:m.image.objectFit==="contain"?"none":"auto"}})})},H)})},p),B.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Le(Z.arrow,{[Z.arrowVertical]:L.direction==="vert"}),style:{color:B.color,"--arrow-hover-color":B.hover},children:l.jsxs("button",{className:Z.arrowInner,style:{transform:`translate(${w.scalingValue(B.offset.x,s)}, ${w.scalingValue(B.offset.y*(L.direction==="horiz"?1:-1),s)}) scale(${B.scale}) rotate(${L.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var m;return(m=f.current)==null?void 0:m.go("-1")},"aria-label":"Previous",children:[B.arrowsImgUrl&&l.jsx(Ht,{url:B.arrowsImgUrl,fill:B.color,hoverFill:B.hover,className:Le(Z.arrowImg,Z.mirror)}),!B.arrowsImgUrl&&l.jsx(eo,{color:B.color,className:Le(Z.arrowIcon,Z.arrowImg,Z.mirror)})]})}),l.jsx("div",{className:Le(Z.arrow,Z.nextArrow,{[Z.arrowVertical]:L.direction==="vert"}),style:{color:B.color,"--arrow-hover-color":B.hover},children:l.jsxs("button",{className:Z.arrowInner,style:{transform:`translate(${w.scalingValue(B.offset.x*(L.direction==="horiz"?-1:1),s)}, ${w.scalingValue(B.offset.y,s)}) scale(${B.scale}) rotate(${L.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var m;return(m=f.current)==null?void 0:m.go("+1")},"aria-label":"Next",children:[B.arrowsImgUrl&&l.jsx(Ht,{url:B.arrowsImgUrl,fill:B.color,hoverFill:B.hover,className:Z.arrowImg}),!B.arrowsImgUrl&&l.jsx(eo,{color:B.color,className:Le(Z.arrowIcon,Z.arrowImg)})]})})]}),F.closeIconUrl&&(()=>{const m=Qn(F.closeIconAlign,F.closeIconOffset,s),H=`scale(${F.closeIconScale})`,D=m.transform?`${m.transform} ${H}`:H;return l.jsx("button",{className:Z.closeButton,style:{...m,transform:D},onClick:ie,"aria-label":"Close lightbox",children:l.jsx(Ht,{url:F.closeIconUrl,fill:F.closeIconColor??"#000000",hoverFill:F.closeIconHover??"#cccccc"})})})(),W&&W.isActive&&r.imageCaption&&((N=n[o])==null?void 0:N.imageCaption)&&(()=>{const{widthSettings:m,fontSettings:H,letterSpacing:D,textAlign:U,wordSpacing:ne,fontSizeLineHeight:ee,textAppearance:J,color:ae}=r.imageCaption;return l.jsx("div",{className:Z.caption,style:{...Qn(W.alignment,W.offset,s),fontFamily:Ar(H.fontFamily),fontWeight:H.fontWeight,fontStyle:H.fontStyle,width:m.sizing==="auto"?"max-content":w.scalingValue(m.width,s),letterSpacing:w.scalingValue(D,s),wordSpacing:w.scalingValue(ne,s),textAlign:U,fontSize:w.scalingValue(ee.fontSize,s),lineHeight:w.scalingValue(ee.lineHeight,s),textTransform:J.textTransform??"none",textDecoration:J.textDecoration??"none",fontVariant:J.fontVariant??"normal",color:ae},onClick:ge=>ge.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:Z.captionTextInner,style:{"--link-color":W.linkColor,"--link-hover-color":W.linkHoverColor},children:l.jsx(Fn,{content:n[o].imageCaption})})})})(),R.isActive&&(()=>{const[m,H]=R.position.split("-"),D=L.direction==="horiz"?`${m}-left`:R.position,U=Qn(D,R.offset,s),ne=()=>{if(L.direction==="horiz"){if(H==="left")return"flex-start";if(H==="center")return"center";if(H==="right")return"flex-end"}else{if(m==="top")return"flex-start";if(m==="middle")return"center";if(m==="bottom")return"flex-end"}return"flex-start"};return l.jsx("div",{ref:$,className:Z.thumbsWrapper,onClick:ee=>ye(ee),style:{position:s?"absolute":"fixed",...U,...L.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:Le(Z.thumbsContainer,{[Z.thumbsContainerVertical]:L.direction==="vert",[Z.thumbsAlignStart]:R.align==="start",[Z.thumbsAlignCenter]:R.align==="center",[Z.thumbsAlignEnd]:R.align==="end"}),style:{gap:w.scalingValue(R.grid.gap,s),justifyContent:O?"flex-start":ne()},children:n.map((ee,J)=>{const ae=J===o,ge=P[J],he=R.grid.size*(ae?R.activeState.scale:1),K=()=>{if(R.fit!=="fit")return{};if(!ge)return L.direction==="horiz"?{height:w.scalingValue(he,s)}:{width:w.scalingValue(he,s)};const G=ge.width/ge.height;if(L.direction==="horiz"){const z=he,le=z*G;return{width:w.scalingValue(le,s),height:w.scalingValue(z,s)}}else{const z=he,le=z/G;return{width:w.scalingValue(z,s),height:w.scalingValue(le,s)}}};return l.jsx("button",{className:Z.thumbItem,style:{...L.direction==="horiz"&&R.fit!=="fit"?{height:w.scalingValue(he,s)}:{},...L.direction==="vert"&&R.fit!=="fit"?{width:w.scalingValue(he,s)}:{},...R.fit==="cover"?{width:w.scalingValue(he,s),height:w.scalingValue(he,s)}:{},...K(),transition:ae?"all 0.25s ease-out":"none",opacity:ae?R.activeState.opacity/100:R.opacity/100,"--thumb-hover":R.activeState.opacity/100},onClick:G=>{var z;G.stopPropagation(),d(J),(z=f.current)==null||z.go(J)},onMouseEnter:()=>{var G;R.triggers==="hov"&&((G=f.current)==null||G.go(J))},children:l.jsx("img",{src:ee.image.url,alt:ee.image.name??"",onLoad:G=>{const z=G.currentTarget;z.naturalWidth&&z.naturalHeight&&C(le=>({...le,[J]:{width:z.naturalWidth,height:z.naturalHeight}}))},style:{objectFit:R.fit==="cover"?"cover":"contain",...R.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...R.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ee.image.name}-${J}`)})})})})()]})]}),document.getElementById(a))};function eo({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.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 xc={element:vc,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function er(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cc(e){return`
|
|
7
7
|
.${e}-wrapper {
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
10
10
|
width: 100%;
|
|
11
|
-
min-height: ${
|
|
11
|
+
min-height: ${er(48)};
|
|
12
12
|
}
|
|
13
13
|
.${e}-wrapper.${e}-type-C .${e}-input:focus-visible,
|
|
14
14
|
.${e}-wrapper.${e}-type-C .${e}-button:focus-visible {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
min-width: 0;
|
|
33
33
|
}
|
|
34
34
|
.${e}-field-group.${e}-labeled {
|
|
35
|
-
gap: ${
|
|
35
|
+
gap: ${er(4)};
|
|
36
36
|
}
|
|
37
37
|
.${e}-field-label {
|
|
38
38
|
white-space: nowrap;
|
|
@@ -128,11 +128,11 @@
|
|
|
128
128
|
outline: none;
|
|
129
129
|
}
|
|
130
130
|
.${e}-success {
|
|
131
|
-
margin-top: ${
|
|
131
|
+
margin-top: ${er(8)};
|
|
132
132
|
color: var(--${e}-success-success-color, var(--${e}-success-color));
|
|
133
133
|
}
|
|
134
134
|
.${e}-error {
|
|
135
|
-
margin-top: ${
|
|
135
|
+
margin-top: ${er(8)};
|
|
136
136
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
137
137
|
}
|
|
138
138
|
.${e}-overlay-anchor {
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
pointer-events: auto;
|
|
156
156
|
z-index: 10;
|
|
157
157
|
}
|
|
158
|
-
`}function
|
|
158
|
+
`}function Sc({settings:e,isEditor:t,isEditMode:n,isPreviewMode:r,metadata:i,activeEvent:a}){const s=!!n,c=r&&t||!t,{prefix:o}=w.useScopedStyles(),{type:d="A",fieldsToShow:p=2,fields:T=[],buttonLabel:x,gap:y,fieldsGap:g,buttonCorners:h,buttonStroke:P,buttonPadding:C,isButtonFullWidth:f,inputCorners:b,inputStroke:M,inputPadding:_,inputColor:E,inputTextColor:S,inputBorderColor:A,placeholderColor:I,buttonColor:k,buttonTextColor:$,buttonBorderColor:O,labelTextColor:V,successColor:q,errorColor:Y,fontFamily:L,inputFontSettings:R,inputFontSize:B,inputLineHeight:F,inputLetterSpacing:W,inputWordSpacing:j,inputTextAppearance:Q,buttonFontSettings:oe,buttonFontSize:te,buttonLineHeight:ce,buttonLetterSpacing:v,buttonWordSpacing:ie,buttonTextAppearance:$e,labelFontSettings:de,labelFontSize:ye,labelLineHeight:Re,labelLetterSpacing:re,labelWordSpacing:N,labelTextAppearance:m,statusFontSettings:H,statusFontSize:D,statusLineHeight:U,statusLetterSpacing:ne,statusWordSpacing:ee,statusTextAppearance:J,successMessage:ae,errorMessage:ge,stateOverrides:me}=e,he=d==="B",K=T.slice(0,Math.min(p,T.length)),G={fontSettings:{fontFamily:L,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:B??.01,lineHeight:F,letterSpacing:W??0,wordSpacing:j??0,textAppearance:Q,color:S},z=Ct(nt(G,t)),le=w.scalingValue(M??0,t),we=w.scalingValue((F??B??.01)+((_==null?void 0:_.top)??0)+((_==null?void 0:_.bottom)??0)+(d==="C"?M??0:(M??0)*2),t),ke={...z,borderStyle:"solid",borderRadius:d==="C"?0:w.scalingValue(b??0,t),...d==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:le,borderLeftWidth:0}:{borderWidth:le},paddingTop:w.scalingValue((_==null?void 0:_.top)??0,t),paddingRight:w.scalingValue((_==null?void 0:_.right)??0,t),paddingBottom:w.scalingValue((_==null?void 0:_.bottom)??0,t),paddingLeft:w.scalingValue((_==null?void 0:_.left)??0,t),height:we,minHeight:we},Je={fontSettings:{fontFamily:L,fontWeight:(oe==null?void 0:oe.fontWeight)??400,fontStyle:(oe==null?void 0:oe.fontStyle)??"normal"},fontSize:te??.01,lineHeight:ce,letterSpacing:v??0,wordSpacing:ie??0,textAppearance:$e,color:$},Pe=Ct(nt(Je,t)),Me=w.scalingValue(P??0,t),Ee={fontSettings:{fontFamily:L,fontWeight:(de==null?void 0:de.fontWeight)??400,fontStyle:(de==null?void 0:de.fontStyle)??"normal"},fontSize:ye??.01,lineHeight:Re,letterSpacing:re??0,wordSpacing:N??0,textAppearance:m,color:V},je=nt(Ee,t),He={fontSettings:{fontFamily:L,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:D??.01,lineHeight:U,letterSpacing:ne??0,wordSpacing:ee??0,textAppearance:J,color:q},Ie=Ct(nt(He,t)),Ve=w.buildColorVars(o,{inputColor:E,inputTextColor:S,inputBorderColor:A,placeholderColor:I!=null&&I.trim()?I:"#cccccc",buttonColor:k,buttonTextColor:$,buttonBorderColor:O,labelTextColor:V,successColor:q,errorColor:Y},$c,wc,me),[dt,vt]=u.useState(()=>Object.fromEntries(K.map(be=>[be.name,""]))),[bt,Tt]=u.useState("idle"),[Kt,xt]=u.useState(null),Ut=a==="success"?"success":a==="error"?"error":bt,ve=a==="error"?ge:Kt,Ge=a==="filled",ze=u.useMemo(()=>{if(!Ge)return dt;let be=null;for(const Ye of K)(dt[Ye.name]??"").trim().length>0||(be=be??{...dt},be[Ye.name]="Filled");return be??dt},[dt,Ge,K]),rt=Ut==="error"?w.getFormFieldValidationError(K,ze):null,Tn=`${a&&a!=="default"?`${o}-state-${a}`:""}`.trim(),qt=i==null?void 0:i.submitUrl,tn=(be,Ye)=>{vt(De=>({...De,[be]:Ye}))},Ln=async be=>{if(be.preventDefault(),!c)return;const Ye=Object.fromEntries(K.map(Fe=>{var it;return[Fe.name,((it=dt[Fe.name])==null?void 0:it.trim())??""]}).filter(([,Fe])=>Fe));if(!qt){Tt("error"),xt("No integrations were found for this form.");return}if(Object.keys(Ye).length===0)return;const De=w.getFormFieldValidationError(K,dt);if(De){Tt("error"),xt(De);return}Tt("submitting"),xt(null);try{const Fe=await fetch(qt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ye)});if(!Fe.ok){const it=await Fe.text();throw new Error(it||`Request failed: ${Fe.status}`)}Tt("success"),vt(Object.fromEntries(K.map(it=>[it.name,""])))}catch(Fe){Tt("error"),xt(Fe instanceof Error?Fe.message:"Something went wrong")}};return l.jsxs("div",{className:`${o}-wrapper ${o}-type-${d} ${Tn}`.trim(),style:Ve,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Cc(o)}}),l.jsxs("form",{onSubmit:Ln,className:`${o}-form`,children:[l.jsx("div",{className:`${o}-fields`,children:K.map((be,Ye)=>l.jsxs(u.Fragment,{children:[Ye>0&&l.jsx("div",{"data-controls":s?"fieldsGap":void 0,className:s?`${o}-control`:void 0,style:{height:w.scalingValue(g??0,t)}}),l.jsxs("div",{className:`${o}-field-group${he?` ${o}-labeled`:""}`,children:[he&&l.jsx("span",{className:`${o}-field-label`,style:je?{...je,lineHeight:je.fontSize}:void 0,children:be.label||be.name}),be.type==="textarea"?l.jsx("textarea",{name:be.name,autoComplete:"off",value:ze[be.name]??"",onChange:De=>tn(be.name,De.target.value),placeholder:be.placeholder,className:`${o}-input`,style:ke,rows:1,"data-filled":Ge||(ze[be.name]??"").trim().length>0,"data-field-type":"textarea"}):l.jsx("input",{type:be.type==="phone"?"tel":be.type==="email"?"email":"text",name:be.name,autoComplete:"off",value:ze[be.name]??"",onChange:De=>tn(be.name,De.target.value),placeholder:be.placeholder,required:be.isRequired??be.type==="email",className:`${o}-input`,style:ke,"data-filled":Ge||(ze[be.name]??"").trim().length>0})]})]},Ye))}),l.jsx("div",{"data-controls":s?"gap":void 0,className:s?`${o}-control`:void 0,style:{height:w.scalingValue(y??0,t)}}),l.jsx("div",{className:`${o}-overlay-anchor`,children:l.jsx("button",{type:c?"submit":"button",className:`${o}-button`,style:{borderStyle:"solid",borderRadius:w.scalingValue(h??0,t),borderWidth:Me,paddingTop:w.scalingValue((C==null?void 0:C.top)??0,t),paddingRight:w.scalingValue((C==null?void 0:C.right)??0,t),paddingBottom:w.scalingValue((C==null?void 0:C.bottom)??0,t),paddingLeft:w.scalingValue((C==null?void 0:C.left)??0,t),pointerEvents:c?"auto":void 0,...Pe,...f?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:l.jsx("span",{className:`${o}-overlay-anchor`,style:f?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:bt==="submitting"?"...":x})})})]}),Ut==="success"&&l.jsx("p",{className:`${o}-success`,style:{...Ie},children:ae}),Ut==="error"&&l.jsx("p",{className:`${o}-error`,style:{...Ie},role:"alert",children:rt??ve??ge})]})}const $c={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},wc=["hover","focus","filled","success","error"],Tc=`import React, { useMemo, useState } from 'react';\r
|
|
159
159
|
import { CommonComponentProps } from '../props';\r
|
|
160
160
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
|
|
161
161
|
import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';\r
|
|
@@ -789,7 +789,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {\r
|
|
|
789
789
|
};\r
|
|
790
790
|
\r
|
|
791
791
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
|
|
792
|
-
`,vc=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Xn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},bc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],xc={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Xn.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Xn.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Xn.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Xn.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:vc,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...bc],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Cc={element:gc,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300,height:42},t:{width:346,height:42},m:{width:300,height:42}},schema:xc,sourceCode:yc};function Zn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Sc(e){return`
|
|
792
|
+
`,Lc=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],tr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ec=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Pc={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...tr.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...tr.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...tr.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...tr.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:Lc,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Ec],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},_c={element:Sc,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300,height:42},t:{width:346,height:42},m:{width:300,height:42}},schema:Pc,sourceCode:Tc};function nr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ac(e){return`
|
|
793
793
|
.${e}-wrapper {
|
|
794
794
|
display: flex;
|
|
795
795
|
flex-direction: column;
|
|
@@ -971,16 +971,16 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
|
|
|
971
971
|
align-items: center;
|
|
972
972
|
}
|
|
973
973
|
.${e}-success {
|
|
974
|
-
margin-top: ${
|
|
975
|
-
font-size: ${
|
|
974
|
+
margin-top: ${nr(8)};
|
|
975
|
+
font-size: ${nr(14)};
|
|
976
976
|
color: var(--${e}-success-success-color, var(--${e}-success-color));
|
|
977
977
|
}
|
|
978
978
|
.${e}-error {
|
|
979
|
-
margin-top: ${
|
|
980
|
-
font-size: ${
|
|
979
|
+
margin-top: ${nr(8)};
|
|
980
|
+
font-size: ${nr(14)};
|
|
981
981
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
982
982
|
}
|
|
983
|
-
`}const
|
|
983
|
+
`}const Rc=({settings:e,isEditor:t,isPreviewMode:n,metadata:r,activeEvent:i})=>{const{prefix:a}=w.useScopedStyles(),s=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:o,buttonLabel:d,fieldsToShow:p=1,fontFamily:T,inputFontSettings:x,inputFontSize:y,inputLineHeight:g,inputLetterSpacing:h,inputWordSpacing:P,inputTextAppearance:C,buttonFontSettings:f,buttonFontSize:b,buttonLineHeight:M,buttonLetterSpacing:_,buttonWordSpacing:E,buttonTextAppearance:S,statusFontSettings:A,statusFontSize:I,statusLineHeight:k,statusLetterSpacing:$,statusWordSpacing:O,statusTextAppearance:V,iconMaxWidth:q,minHeight:Y,corners:L,stroke:R,stateOverrides:B,inputPadding:F,buttonPadding:W,successMessage:j="Thanks for subscribing!",errorMessage:Q="Please, fill all required fields."}=e,oe=c.slice(0,Math.min(p,c.length)),[te,ce]=u.useState(()=>Object.fromEntries(oe.map(Ee=>[Ee.name,""]))),[v,ie]=u.useState("idle"),[$e,de]=u.useState(null),ye=i==="success"?"success":i==="error"?"error":v,Re=i==="error"?Q:$e,re=i==="filled",N=u.useMemo(()=>{if(!re)return te;let Ee=null;for(const je of oe)(te[je.name]??"").trim().length>0||(Ee=Ee??{...te},Ee[je.name]="Filled");return Ee??te},[re,te,oe]),m=ye==="error"?w.getFormFieldValidationError(oe,N):null,H=i&&i!=="default"?`${a}-state-${i}`:"",D=oe.some(Ee=>(N[Ee.name]??"").trim().length>0),U=H!==`${a}-state-filled`&&D?`${a}-state-filled`:"",ne=`${H} ${U}`.trim(),ee=r==null?void 0:r.submitUrl,J=d??"",ae=(o==null?void 0:o.icon)??"",ge=(o==null?void 0:o.mode)==="On",me=J||"Submit",he={fontSettings:{fontFamily:T,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:y??.01,lineHeight:g,letterSpacing:h??0,wordSpacing:P??0,textAppearance:C,color:e.inputTextColor??"#111111"},K={fontSettings:{fontFamily:T,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:b??.01,lineHeight:M,letterSpacing:_??0,wordSpacing:E??0,textAppearance:S,color:e.buttonTextColor??"#ffffff"},G={fontSettings:{fontFamily:T,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:I??.01,lineHeight:k,letterSpacing:$??0,wordSpacing:O??0,textAppearance:V,color:e.successColor??"#22c55e"},z=Ct(nt(he,t)),le=Ct(nt(K,t)),we=Ct(nt(G,t)),ke=w.buildColorVars(a,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(he==null?void 0:he.color)??"#111111",buttonTextColor:e.buttonTextColor??(K==null?void 0:K.color)??"#ffffff"},Ic,kc,B),Je={borderRadius:w.scalingValue(L,t),borderWidth:w.scalingValue(R,t),borderStyle:"solid"},Pe={borderLeftWidth:w.scalingValue(R,t)},Me=async Ee=>{if(Ee.preventDefault(),!s)return;const je=Object.fromEntries(oe.map(Ie=>{var Ve;return[Ie.name,((Ve=te[Ie.name])==null?void 0:Ve.trim())??""]}).filter(([,Ie])=>Ie));if(!ee){ie("error"),de("No integrations were found for this form.");return}if(Object.keys(je).length===0)return;const He=w.getFormFieldValidationError(oe,te);if(He){ie("error"),de(He);return}ie("submitting"),de(null);try{const Ie=await fetch(ee,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(je)});if(!Ie.ok){const Ve=await Ie.text();throw new Error(Ve||`Request failed: ${Ie.status}`)}ie("success"),ce(Object.fromEntries(oe.map(Ve=>[Ve.name,""])))}catch(Ie){ie("error"),de(Ie instanceof Error?Ie.message:"Something went wrong")}};return l.jsxs("div",{className:`${a}-wrapper ${ne}`.trim(),style:ke,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Ac(a)}}),l.jsxs("form",{onSubmit:Me,className:`${a}-form`,style:{...Je,height:w.scalingValue(Y,t),minHeight:w.scalingValue(Y,t)},children:[l.jsx("div",{className:`${a}-inputWrap ${a}-overlayAnchor`,style:{flex:1,minWidth:0},children:oe.map(Ee=>l.jsx("input",{type:Ee.type==="email"?"email":Ee.type==="phone"?"tel":"text",name:Ee.name,autoComplete:"off",value:N[Ee.name]??"",onChange:je=>ce(He=>({...He,[Ee.name]:je.target.value})),placeholder:Ee.placeholder,required:Ee.isRequired??Ee.type==="email",className:`${a}-input`,style:{...z,paddingRight:w.scalingValue(F.right,t),paddingLeft:w.scalingValue(F.left,t),paddingTop:w.scalingValue(F.top,t),paddingBottom:w.scalingValue(F.bottom,t)}},Ee.name))}),l.jsx("div",{className:`${a}-overlayAnchor`,children:l.jsx("button",{type:s?"submit":"button",className:`${a}-submitBtn`,"aria-label":me,style:{...le,...Pe,paddingRight:w.scalingValue(W.right,t),paddingLeft:w.scalingValue(W.left,t),paddingTop:w.scalingValue(W.top,t),paddingBottom:w.scalingValue(W.bottom,t),pointerEvents:s?"auto":void 0},children:v==="submitting"?"...":ge?ae&&l.jsx(Ht,{url:ae,className:`${a}-submitBtnIcon`,style:{maxWidth:w.scalingValue(q??0,t)},fill:`var(--${a}-button-text-color)`,hoverFill:`var(--${a}-button-text-color)`}):J})})]}),ye==="success"&&l.jsx("p",{className:`${a}-success`,style:{...we},children:j}),ye==="error"&&l.jsx("p",{className:`${a}-error`,style:{...we},role:"alert",children:m??Re??Q})]})},Ic={strokeColor:"stroke-color",inputColor:"input-color",placeholderColor:"placeholder-color",buttonColor:"button-color",inputTextColor:"input-text-color",buttonTextColor:"button-text-color",successColor:"success-color",errorColor:"error-color"},kc=["hover","focus","filled","success","error"],Wc=`import React, { useMemo, useState } from 'react';\r
|
|
984
984
|
import { CommonComponentProps } from '../props';\r
|
|
985
985
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
|
|
986
986
|
import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';\r
|
|
@@ -1557,7 +1557,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {\r
|
|
|
1557
1557
|
};\r
|
|
1558
1558
|
\r
|
|
1559
1559
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
|
|
1560
|
-
`,Ec="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>'),Pc=[{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."}],kr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},_c=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Ac={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 All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},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:{...kr.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:{...kr.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:{...kr.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:Pc,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Ec},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",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:.001,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:.001,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:[..._c],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"]},Rc={element:wc,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Ac,sourceCode:Lc};function Gi(e){return`
|
|
1560
|
+
`,Mc="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>'),Fc=[{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."}],Or={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Nc=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Hc={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 All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},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:{...Or.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:{...Or.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:{...Or.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:Fc,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Mc},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",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:.001,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:.001,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:[...Nc],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"]},Bc={element:Rc,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Hc,sourceCode:Wc};function Oc(e){return`
|
|
1561
1561
|
.${e}-marquee-wrapper {
|
|
1562
1562
|
overflow: hidden;
|
|
1563
1563
|
width: 100%;
|
|
@@ -1689,7 +1689,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
|
|
|
1689
1689
|
.${e}-image-hover-grayscale:hover img {
|
|
1690
1690
|
filter: grayscale(100%);
|
|
1691
1691
|
}
|
|
1692
|
-
`}const
|
|
1692
|
+
`}const Vc=30,Dc=20,Vr=2,jc=2,zc=(e,t)=>Array.from({length:t},()=>e).flat(),Kc=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},Uc=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>Kc(r,e))},qc=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:i,imageHoverClass:a,isFirstSet:s,scaled:c,onFirstSetImageDone:o})=>{var S,A,I;const d=u.useRef(null);u.useLayoutEffect(()=>{if(!s)return;const k=d.current;k!=null&&k.complete&&(o==null||o())},[s,(S=e.image)==null?void 0:S.url,o]);const p=n.display==="Cover",T=n.ratioValue??"1:1",x=n.reversed??!1,[y,g]=T.split(":").map(Number),C=(x?g:y)/(x?y:g);let f=r,b=f/C;b>i&&(b=i,f=b*C);const M=c(f),_=c(b),E=((A=e.image)==null?void 0:A.url)&&l.jsx("img",{ref:d,src:e.image.url,alt:((I=e.image)==null?void 0:I.name)??"",style:p?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:c(r),objectFit:"contain"},onLoad:s?o:void 0,onError:s?o:void 0});return l.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...p?{width:M}:{width:"fit-content",maxWidth:c(r),minWidth:0}},children:l.jsx("div",{className:a,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...p?{width:M,height:_,overflow:"hidden"}:{width:"fit-content",maxWidth:c(r),height:c(i)}},children:E&&e.link?l.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Le(`${t}-marquee-link`,!p&&`${t}-marquee-link-contain`),children:E}):E})})},Gc=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:a}=w.useScopedStyles(),s=u.useMemo(()=>Oc(a),[a]),{speed:c,direction:o,pauseOnHover:d,gap:p,imageMaxWidth:T,imageMaxHeight:x,imageFit:y,hoverEffect:g}=e,h=!!i,P=!n||!!r,C=P&&g!=="off"&&g!=="randomize"?`${a}-image-hover-${g}`:void 0,f=n?!!r:!0,M=((t==null?void 0:t.length)??0)>0&&(f||!!n),_=Math.max(0,c)*Vc,E=m=>w.scalingValue(m,n??!1),S=u.useRef(null),A=u.useRef(null),I=u.useRef(null),[k,$]=u.useState(0),[O,V]=u.useState(0),q=f&&d==="on",[Y,L]=u.useState(!1),[R,B]=u.useState({}),F=u.useRef(R);F.current=R;const W=u.useRef(null),j=u.useRef(0),Q=u.useRef(null),oe=u.useMemo(()=>(t??[]).map(m=>{var H;return((H=m.image)==null?void 0:H.url)??""}).join("\0"),[t]),[te,ce]=u.useState(Vr),v=u.useMemo(()=>{const m=t??[];return!f||m.length===0?m:zc(m,te)},[t,f,te]),ie=u.useMemo(()=>v.filter(m=>{var H;return!!((H=m.image)!=null&&H.url)}).length,[v]),$e=M?jc:1;u.useLayoutEffect(()=>{j.current=0,B({}),W.current=null,ce(Vr),$(0)},[oe]),u.useEffect(()=>{if(!P||g!=="randomize")return;const m=S.current;if(!m)return;const H=ee=>{B(J=>{let ae=null;for(const ge of ee)ge in J&&(Uc(m,ge)||(ae||(ae={...J}),delete ae[ge]));return ae??J})},D=new IntersectionObserver(ee=>{const J=new Set;for(const ae of ee){const ge=ae.target.dataset.marqueeItemIndex,me=ge!==void 0?Number(ge):NaN;Number.isNaN(me)||J.add(me)}J.size>0&&H(J)},{root:m,threshold:0});Object.keys(R).forEach(ee=>{const J=Number(ee);m.querySelectorAll(`[data-marquee-item-index="${J}"]`).forEach(ae=>D.observe(ae))});let U=0;const ne=()=>{const ee=Object.keys(F.current);ee.length!==0&&(H(ee.map(Number)),U=requestAnimationFrame(ne))};return Object.keys(F.current).length>0&&(U=requestAnimationFrame(ne)),()=>{cancelAnimationFrame(U),D.disconnect()}},[g,R,P]),u.useLayoutEffect(()=>{if(!M)return;const m=S.current,H=I.current;if(!m||!H)return;let D=0;const U=()=>{const J=m.getBoundingClientRect().width,ae=H.getBoundingClientRect().width,ge=W.current,me=typeof ge=="number"&&Math.abs(ge-ae)<=.25;if(W.current=ae,f&&ae>0&&te>0){const he=ae/te;if(he>0&&J>0){const K=Math.max(Vr,Math.ceil(J/he)+1);if(K!==te){ce(K);return}}}if(ae>0&&k<=0){$(ae);return}me&&ae!==k?$(ae):!me&&k<=0&&(cancelAnimationFrame(D),D=requestAnimationFrame(U))},ne=()=>{cancelAnimationFrame(D),D=requestAnimationFrame(U)};Q.current=ne,ne();const ee=new ResizeObserver(ne);return ee.observe(m),ee.observe(H),()=>{Q.current=null,cancelAnimationFrame(D),ee.disconnect()}},[f,M,k,oe,te]),u.useLayoutEffect(()=>{const m=A.current;if(!M||!m)return;const H=k>0?k:0,D=H>0&&_>0?H/_*1e3:0,U=`${Math.max(0,D)/1e3}s`;m.style.setProperty("--marquee-distance",`${H}px`),m.style.setProperty("--marquee-duration",U)},[f,M,_,k]),u.useLayoutEffect(()=>{if(!M){V(0);return}if(k<=0){V(0);return}const m=A.current;if(!m)return;const H=()=>{const U=m.getBoundingClientRect().height;V(U>0?U:0)};H();const D=new ResizeObserver(H);return D.observe(m),()=>D.disconnect()},[M,$e,v,n,p,T,x,k,y,R]);const de=()=>{q&&L(!0)},ye=()=>{q&&L(!1)},Re=u.useCallback(()=>{var m;j.current=Math.min(ie,j.current+1),(m=Q.current)==null||m.call(Q)},[ie]),re=u.useCallback((m,H)=>{B(D=>{const U=D[m]??H,ne=(t??[]).filter(J=>J!==U);if(ne.length===0)return D;const ee=ne[Math.floor(Math.random()*ne.length)];return{...D,[m]:ee}})},[t]),N=(m,H,D,U)=>{const ne=P&&g==="randomize"&&y.display==="Cover"?R[D]??m:m,ee=`max(${E(p)}, ${Dc}px)`,J=`calc(-0.5 * (${ee} + ${E(p)}))`;return l.jsxs("div",{className:`${a}-marquee-card`,"data-marquee-item-index":D,onMouseEnter:P&&g==="randomize"&&y.display==="Cover"?()=>re(D,m):void 0,children:[l.jsx(qc,{item:ne,prefix:a,imageFit:y,imageMaxWidth:T,imageMaxHeight:x,imageHoverClass:C,isEditor:n,isFirstSet:U,scaled:E,onFirstSetImageDone:Re}),h&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${a}-gap-control`,style:{position:"absolute",top:0,right:J,width:ee,height:"100%"}})]},`${H}-${D}`)};if(M){const m=f?q&&Y?"paused":"running":"paused";return l.jsxs("div",{ref:S,className:Le(`${a}-wrapper`,`${a}-marquee-wrapper`),"aria-label":"Marquee",style:k>0&&O>0?{height:O}:void 0,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),l.jsx("div",{ref:A,className:`${a}-marquee-track`,"data-direction":o,onMouseEnter:de,onMouseLeave:ye,style:{"--marquee-play-state":m},children:Array.from({length:$e},(H,D)=>l.jsx("div",{ref:D===0?I:void 0,className:Le(`${a}-marquee-row`,`${a}-marquee-set`),style:{gap:E(p),paddingRight:E(p)},"aria-hidden":D>0,children:v.map((U,ne)=>N(U,D,ne,D===0))},`set-${D}`))},"marquee-track")]})}return l.jsxs("div",{ref:S,className:`${a}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),l.jsx("div",{className:Le(`${a}-marquee-row`,`${a}-marquee-static`),style:{gap:E(p),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((m,H)=>N(m,0,H))},"marquee-static")]})},Yc=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
|
|
1693
1693
|
import cn from 'classnames';\r
|
|
1694
1694
|
import { CommonComponentProps } from '../props';\r
|
|
1695
1695
|
import { scalingValue } from '../utils/scalingValue';\r
|
|
@@ -1979,6 +1979,7 @@ const MarqueeItemCard = ({\r
|
|
|
1979
1979
|
\r
|
|
1980
1980
|
export const Marquee = ({ settings, content, isEditor, isPreviewMode, isEditMode }: MarqueeProps) => {\r
|
|
1981
1981
|
const { prefix: P } = useScopedStyles();\r
|
|
1982
|
+
const scopedCss = useMemo(() => getCSS(P), [P]);\r
|
|
1982
1983
|
const { speed, direction, pauseOnHover, gap, imageMaxWidth, imageMaxHeight, imageFit, hoverEffect } = settings;\r
|
|
1983
1984
|
const showControls = Boolean(isEditMode);\r
|
|
1984
1985
|
const showHoverEffects = !isEditor || Boolean(isPreviewMode);\r
|
|
@@ -2241,7 +2242,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode, isEditMode
|
|
|
2241
2242
|
aria-label="Marquee"\r
|
|
2242
2243
|
style={setWidth > 0 && trackHeight > 0 ? { height: trackHeight } : undefined}\r
|
|
2243
2244
|
>\r
|
|
2244
|
-
<style dangerouslySetInnerHTML={{ __html:
|
|
2245
|
+
<style dangerouslySetInnerHTML={{ __html: scopedCss }} />\r
|
|
2245
2246
|
<div\r
|
|
2246
2247
|
key="marquee-track"\r
|
|
2247
2248
|
ref={trackRef}\r
|
|
@@ -2274,7 +2275,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode, isEditMode
|
|
|
2274
2275
|
\r
|
|
2275
2276
|
return (\r
|
|
2276
2277
|
<div ref={wrapperRef} className={\`\${P}-wrapper\`}>\r
|
|
2277
|
-
<style dangerouslySetInnerHTML={{ __html:
|
|
2278
|
+
<style dangerouslySetInnerHTML={{ __html: scopedCss }} />\r
|
|
2278
2279
|
<div\r
|
|
2279
2280
|
key="marquee-static"\r
|
|
2280
2281
|
className={cn(\`\${P}-marquee-row\`, \`\${P}-marquee-static\`)}\r
|
|
@@ -2319,7 +2320,7 @@ type MarqueeProps = {\r
|
|
|
2319
2320
|
isPreviewMode?: boolean;\r
|
|
2320
2321
|
isEditMode?: boolean;\r
|
|
2321
2322
|
} & CommonComponentProps;\r
|
|
2322
|
-
`,
|
|
2323
|
+
`,Xc={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,max:400,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,max:400,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"Fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.15,imageMaxHeight:.1}},displayRules:[{if:{name:"imageFit.display",value:"Cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["direction"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZNCQFC3T744H0KX6R3FR.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZRTSS60YBFT6Y37ZX00T.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ9M9YJPQ5JWKCHDEW5M1GJD.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S04EHBXQS1T4KVAMZNZQM.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S08Q40WHD39024VNDWF2Q.jpeg",name:""},link:""}]}},Zc={element:Gc,id:"marquee",name:"Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:140},m:{width:390,height:80}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:Xc,sourceCode:Yc,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function to(e){return`
|
|
2323
2324
|
.${e}-marquee-wrapper {
|
|
2324
2325
|
overflow: hidden;
|
|
2325
2326
|
width: 100%;
|
|
@@ -2406,7 +2407,7 @@ type MarqueeProps = {\r
|
|
|
2406
2407
|
pointer-events: auto;
|
|
2407
2408
|
z-index: 10;
|
|
2408
2409
|
}
|
|
2409
|
-
`}const
|
|
2410
|
+
`}const Jc=30,no=2,Qc=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:a}=w.useScopedStyles(),{autoplay:s,align:c,speed:o,direction:d,pauseOnHover:p,gap:T,cardWidth:x,corners:y,stroke:g,strokeColor:h,bgColor:P,padding:C,logoMarginTop:f,logoWidth:b,logoHeight:M,captionMarginTop:_}=e,E=!!i,S=((t==null?void 0:t.length)??0)>0,A=s==="on"&&(!n||!!r),I=S&&(A||!!n),k=Math.max(0,o)*Jc,$=K=>w.scalingValue(K,n??!1),O=u.useRef(null),V=u.useRef(null),q=u.useRef(null),[Y,L]=u.useState(0),[R,B]=u.useState(0),[F,W]=u.useState(0),j=A&&p==="on",[Q,oe]=u.useState(!1),te=u.useRef(null),[ce,v]=u.useState(0),[ie,$e]=u.useState(0),de=u.useRef(null),ye=K=>{var z,le,we,ke,Je;return{fontSettings:{fontFamily:(e==null?void 0:e[`${K}FontFamily`])??"Arial",fontWeight:((z=e==null?void 0:e[`${K}FontSettings`])==null?void 0:z.fontWeight)??400,fontStyle:((le=e==null?void 0:e[`${K}FontSettings`])==null?void 0:le.fontStyle)??"normal"},textAppearance:{textTransform:((we=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:we.textTransform)??"none",textDecoration:((ke=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:ke.textDecoration)??"none",fontVariant:((Je=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:Je.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${K}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${K}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${K}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${K}LineHeight`])??.01,color:(e==null?void 0:e[`${K}Color`])??"#000000"}},Re=ye("text"),re=ye("caption"),N=u.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(K=>{var G,z;return(((G=K.text)==null?void 0:G.length)??0)>0||(((z=K.caption)==null?void 0:z.length)??0)>0}),[t]),m=u.useMemo(()=>!I||(t==null?void 0:t.length)===0?1:R<=0||Y<=0?no:Math.max(no,Math.ceil(Y/R)+1),[I,t==null?void 0:t.length,R,Y]);u.useLayoutEffect(()=>{if(!I)return;const K=O.current,G=q.current;if(!K||!G)return;let z=0;const le=()=>{const Je=K.getBoundingClientRect().width,Pe=G.getBoundingClientRect().width,Me=de.current,Ee=typeof Me=="number"&&Math.abs(Me-Pe)<=.25;if(de.current=Pe,L(Je),typeof Pe=="number"&&Pe>0&&R<=0){B(Pe);return}Ee&&Pe!==R?B(Pe):!Ee&&R<=0&&(cancelAnimationFrame(z),z=requestAnimationFrame(le))},we=()=>{cancelAnimationFrame(z),z=requestAnimationFrame(le)};we();const ke=new ResizeObserver(we);return ke.observe(K),ke.observe(G),()=>{cancelAnimationFrame(z),ke.disconnect()}},[A,I,R]),u.useLayoutEffect(()=>{const K=V.current;if(!I||!K)return;const G=R>0?R:0,z=G>0&&k>0?G/k*1e3:0,le=`${Math.max(0,z)/1e3}s`;K.style.setProperty("--marquee-distance",`${G}px`),K.style.setProperty("--marquee-duration",le)},[A,I,k,R]),u.useLayoutEffect(()=>{if(!I){W(0);return}const K=q.current,G=V.current;if(!K||!G)return;const z=()=>{let we=0;for(let ke=0;ke<K.children.length;ke++){const Pe=K.children[ke].firstElementChild;Pe&&(we=Math.max(we,Pe.offsetHeight))}we<=0&&(we=G.offsetHeight),W(we>0?we:0)};z();const le=new ResizeObserver(z);return le.observe(K),le.observe(G),()=>{le.disconnect()}},[I,m,t,n,T,x,C,g,y,b,M,ce,ie]);const H=()=>{j&&oe(!0)},D=()=>{j&&oe(!1)},U=u.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),ne=u.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]),ee=u.useCallback((K,G,z,le)=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:U,width:"100%"},children:[l.jsx("div",{"data-controls":E?le==null?void 0:le.controlsName:void 0,"data-controls-axis":E?"y":void 0,className:E?`${a}-control`:void 0,style:{height:$((le==null?void 0:le.marginTop)??0)}}),l.jsx("div",{...le!=null&&le.dataMeasureKind?{"data-testimonial-measure":le.dataMeasureKind}:{},style:{...nt(K,n),textAlign:ne,pointerEvents:"auto",...typeof(le==null?void 0:le.minHeightPx)=="number"&&le.minHeightPx>0?{minHeight:le.minHeightPx}:{}},children:l.jsx(Fn,{content:G})})]},z),[U,ne,n,E,a,$]),J=u.useCallback((K,G,z)=>{var le,we,ke;return l.jsxs("div",{style:{padding:`${$(C.top)} ${$(C.right)} ${$(C.bottom)} ${$(C.left)}`,width:$(x+g*2),height:"100%",borderRadius:$(y),border:`${$(g)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[l.jsx("div",{className:`${a}-cover`,style:{background:P}}),l.jsxs("div",{className:`${a}-elements-overlay`,style:{alignItems:U,textAlign:ne},children:[K.text&&ee(Re,K.text,"text",z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(z==null?void 0:z.textMinHeightPx)=="number"&&z.textMinHeightPx>0?{minHeightPx:z.textMinHeightPx}:void 0),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:U,width:"100%"},children:[l.jsx("div",{"data-controls":E&&!(z!=null&&z.dataMeasureAttrs)?"logoMarginTop":void 0,className:E&&!(z!=null&&z.dataMeasureAttrs)?`${a}-control`:void 0,style:{height:$(f)}}),l.jsx("div",{style:{width:$(b),height:$(M)},children:((le=K.logo)==null?void 0:le.url)&&l.jsx("img",{src:K.logo.url,alt:((we=K.logo)==null?void 0:we.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((ke=K.logo)==null?void 0:ke.objectFit)||"contain"}})})]}),K.caption&&ee(re,K.caption,"caption",{...z!=null&&z.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:_,...z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(z==null?void 0:z.captionMinHeightPx)=="number"&&z.captionMinHeightPx>0?{minHeightPx:z.captionMinHeightPx}:{}})]})]},G)},[P,_,re,x,y,M,f,b,U,ne,C.bottom,C.left,C.right,C.top,ee,g,h,Re,n,E,a]),ae=u.useCallback(K=>{v(K.maxTextPx),$e(K.maxCaptionPx)},[]);u.useLayoutEffect(()=>{if(!N){ae({maxTextPx:0,maxCaptionPx:0});return}const K=te.current;if(!K)return;const G=()=>{w.readTestimonialTextMeasure(K,ae)};G();const z=new ResizeObserver(G);return z.observe(K),()=>{z.disconnect()}},[N,ae,t,J]);const ge=N?{textMinHeightPx:ce,captionMinHeightPx:ie}:void 0,me=N?l.jsx("div",{ref:te,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((K,G)=>J(K,`measure-${G}`,{dataMeasureAttrs:!0}))}):null,he=(K,G)=>l.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[J(K,`card-${G}`,ge),E&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(T)})`,width:$(T),height:"100%",pointerEvents:"auto",zIndex:2}})]},G);if(I){const K=A?j&&Q?"paused":"running":"paused";return l.jsxs("div",{ref:O,className:Le(`${a}-wrapper`,`${a}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...F>0?{height:F}:{}},children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:to(a)}}),me,l.jsx("div",{ref:V,className:`${a}-marquee-track`,"data-direction":d,onMouseEnter:H,onMouseLeave:D,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":K},children:Array.from({length:m},(G,z)=>l.jsx("div",{ref:z===0?q:void 0,className:`${a}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(T),paddingRight:$(T)},"aria-hidden":z>0,children:t==null?void 0:t.map((le,we)=>he(le,`${z}-${we}`))},`set-${z}`))})]})}return l.jsxs("div",{className:`${a}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:to(a)}}),me,l.jsx("div",{style:{gap:$(T),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((K,G)=>he(K,G))})]})},ed=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
|
|
2410
2411
|
import cn from 'classnames';\r
|
|
2411
2412
|
import { CommonComponentProps } from '../props';\r
|
|
2412
2413
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';\r
|
|
@@ -3022,7 +3023,7 @@ type TestimonialsSettings = {\r
|
|
|
3022
3023
|
logoHeight: number;\r
|
|
3023
3024
|
captionMarginTop: number;\r
|
|
3024
3025
|
};\r
|
|
3025
|
-
`,
|
|
3026
|
+
`,ro={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},td={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...ro.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...ro.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{autoplay:"on",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},nd={element:Qc,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:td,sourceCode:ed,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function rd(e){return`
|
|
3026
3027
|
.${e}-container {
|
|
3027
3028
|
position: relative;
|
|
3028
3029
|
overflow-x: clip;
|
|
@@ -3146,7 +3147,7 @@ type TestimonialsSettings = {\r
|
|
|
3146
3147
|
width: 100%;
|
|
3147
3148
|
height: 100%;
|
|
3148
3149
|
}
|
|
3149
|
-
`}const
|
|
3150
|
+
`}const id=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:a}=w.useScopedStyles(),s=t||[],{autoplay:c,delay:o,align:d,width:p,imageMarginTop:T,textMarginTop:x,captionMarginTop:y,imageWidth:g,imageHeight:h,controlsWidth:P,controlsColor:C,controlsHoverColor:f}=e,b=c==="on"&&r,[M,_]=u.useState(0),[E,S]=u.useState(null),[A,I]=u.useState(!1),k=u.useRef(null),$=u.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),O=u.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);u.useEffect(()=>{_(0),S(null),I(!1)},[s.length]);const V=s[M],q=E===null?null:s[E],Y=re=>{var m,H,D,U,ne;return{fontSettings:{fontFamily:(e==null?void 0:e[`${re}FontFamily`])??"Arial",fontWeight:((m=e==null?void 0:e[`${re}FontSettings`])==null?void 0:m.fontWeight)??400,fontStyle:((H=e==null?void 0:e[`${re}FontSettings`])==null?void 0:H.fontStyle)??"normal"},textAppearance:{textTransform:((D=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:D.textTransform)??"none",textDecoration:((U=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:U.textDecoration)??"none",fontVariant:((ne=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:ne.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${re}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${re}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${re}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${re}WordSpacing`])??0,color:(e==null?void 0:e[`${re}Color`])??"#000000"}},L=Y("text"),R=Y("caption"),B=s.length>1&&s.some(re=>{var N,m;return(((N=re.text)==null?void 0:N.length)??0)>0||(((m=re.caption)==null?void 0:m.length)??0)>0}),F=u.useRef(null),[W,j]=u.useState(0),[Q,oe]=u.useState(0),te=e.controls??{mode:"Off",icon:null},ce=s.length>1,v=u.useCallback((re,N)=>!ce||N===re?re:(k.current&&window.clearTimeout(k.current),S(re),I(!0),k.current=window.setTimeout(()=>{S(null),I(!1),k.current=null},300),N),[ce]),ie=u.useCallback(()=>{ce&&_(re=>v(re,(re-1+s.length)%s.length))},[ce,v,s.length]),$e=u.useCallback(()=>{ce&&_(re=>v(re,(re+1)%s.length))},[ce,v,s.length]);u.useEffect(()=>{if(!b||!ce)return;const re=Math.max(300,Number.isFinite(o*1e3)?o*1e3:0),N=window.setInterval(()=>{_(m=>v(m,(m+1)%s.length))},re);return()=>{window.clearInterval(N)}},[b,ce,v,s.length,o]),u.useEffect(()=>()=>{k.current&&window.clearTimeout(k.current)},[]);const de=(re,N)=>{var ne,ee,J,ae;const m=N==null?void 0:N.textMinHeightPx,H=N==null?void 0:N.captionMinHeightPx,D=N==null?void 0:N.dataMeasureAttrs,U=i&&!(N!=null&&N.dataMeasureAttrs)&&!(N!=null&&N.hideControls);return l.jsxs(l.Fragment,{children:[re.text&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[l.jsx("div",{"data-controls":U?"textMarginTop":void 0,className:U?`${a}-control`:void 0,style:{height:w.scalingValue(x??0,n??!1)}}),l.jsx("div",{...D&&{"data-testimonial-measure":"text"},style:{...nt(L,n),...m&&m>0?{minHeight:m}:{},textAlign:O,pointerEvents:"auto"},children:l.jsx(Fn,{content:re.text})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[l.jsx("div",{"data-controls":U?"imageMarginTop":void 0,className:U?`${a}-control`:void 0,style:{height:w.scalingValue(T??0,n??!1)}}),l.jsx("div",{style:{width:w.scalingValue(g??0,n??!1),height:w.scalingValue(h??0,n??!1)},children:((ne=re.image)==null?void 0:ne.url)&&l.jsx("img",{src:(ee=re.image)==null?void 0:ee.url,alt:((J=re.image)==null?void 0:J.name)??"",className:`${a}-icon`,style:{objectFit:((ae=re.image)==null?void 0:ae.objectFit)||"contain"}})})]}),re.caption&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[l.jsx("div",{"data-controls":U?"captionMarginTop":void 0,className:U?`${a}-control`:void 0,style:{height:w.scalingValue(y??0,n??!1)}}),l.jsx("div",{...D?{"data-testimonial-measure":"caption"}:{},style:{...nt(R,n),...H&&H>0?{minHeight:H}:{},textAlign:O,pointerEvents:"auto"},children:l.jsx(Fn,{content:re.caption})})]})]})},ye=u.useCallback(re=>{j(re.maxTextPx),oe(re.maxCaptionPx)},[]);if(u.useLayoutEffect(()=>{if(!B){ye({maxTextPx:0,maxCaptionPx:0});return}const re=F.current;if(!re)return;const N=()=>{w.readTestimonialTextMeasure(re,ye)};N();const m=new ResizeObserver(N);return m.observe(re),()=>{m.disconnect()}},[B,ye,t]),!V)return l.jsx(l.Fragment,{});const Re=B?{textMinHeightPx:W,captionMinHeightPx:Q}:void 0;return l.jsx(l.Fragment,{children:l.jsxs("div",{className:`${a}-container`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:rd(a)}}),l.jsxs("div",{className:`${a}-wrapper`,style:{width:w.scalingValue(p??0,n??!1),alignItems:$},children:[B&&l.jsx("div",{ref:F,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((re,N)=>l.jsx("div",{style:{width:"100%"},children:de(re,{dataMeasureAttrs:!0})},N))}),l.jsxs("div",{className:`${a}-fade-stack`,children:[q&&A&&l.jsx("div",{className:Le(`${a}-fade-item-prev`,`${a}-fade-out`),children:de(q,{...Re,hideControls:!0})}),l.jsx("div",{className:Le(`${a}-fade-item-current`,A?`${a}-fade-in`:void 0),children:de(V,Re)})]})]}),te.mode==="On"&&l.jsxs("div",{className:`${a}-controls`,children:[l.jsx("div",{className:`${a}-arrow`,style:{width:w.scalingValue(P??.02,n??!1),height:w.scalingValue(P??.02,n??!1),"--arrow-hover-color":f},children:l.jsx("button",{type:"button",className:`${a}-arrow-inner`,onClick:ie,disabled:!ce,"aria-label":"Previous testimonial",children:te.icon&&l.jsx(Ht,{url:te.icon,fill:C,hoverFill:f,className:Le(`${a}-arrow-img`,`${a}-mirror`)})})}),l.jsx("div",{className:Le(`${a}-arrow`,`${a}-next-arrow`),style:{width:w.scalingValue(P??.02,n??!1),height:w.scalingValue(P??.02,n??!1),"--arrow-hover-color":f},children:l.jsx("button",{type:"button",className:`${a}-arrow-inner`,onClick:$e,disabled:!ce,"aria-label":"Next testimonial",children:te.icon&&l.jsx(Ht,{url:te.icon,fill:C,hoverFill:f,className:`${a}-arrow-img`})})})]})]})})},od=`import cn from 'classnames';\r
|
|
3150
3151
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
|
|
3151
3152
|
import { CommonComponentProps } from '../props';\r
|
|
3152
3153
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';\r
|
|
@@ -3641,11 +3642,11 @@ type TestimonialsSettings = {\r
|
|
|
3641
3642
|
icon?: string | null;\r
|
|
3642
3643
|
};\r
|
|
3643
3644
|
};\r
|
|
3644
|
-
`,
|
|
3645
|
+
`,ad="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" 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" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),io={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},sd={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},delay:{type:"number",scope:"layout",title:"Delay(s)",display:{type:"percentage-input"},step:1,min:1,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...io.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...io.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{autoplay:"on",controls:{mode:"On",icon:ad},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:3,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{delay:3,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","delay"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},ld={element:id,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:sd,sourceCode:od,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function cd(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function oo(e){return((e==null?void 0:e.trim().length)??0)>0}function Dr(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function jr(e,t,n,r){const i=e??.01;return t===void 0||t>=i?{}:{[`--${n}-title-leading-gap`]:w.scalingValue((i-t)/2,r)}}function dd(e){return`
|
|
3645
3646
|
.${e}-wrapper {
|
|
3646
3647
|
display: grid;
|
|
3647
3648
|
align-items: start;
|
|
3648
|
-
min-height: ${
|
|
3649
|
+
min-height: ${cd(48)};
|
|
3649
3650
|
}
|
|
3650
3651
|
.${e}-item {
|
|
3651
3652
|
display: flex;
|
|
@@ -3766,20 +3767,20 @@ type TestimonialsSettings = {\r
|
|
|
3766
3767
|
.${e}-show-text-hover .${e}-item-inner-hidden:hover .${e}-item-subtitle {
|
|
3767
3768
|
opacity: 1;
|
|
3768
3769
|
}
|
|
3769
|
-
.${e}-type-
|
|
3770
|
-
.${e}-type-
|
|
3771
|
-
.${e}-type-
|
|
3772
|
-
.${e}-type-
|
|
3770
|
+
.${e}-type-b .${e}-item-inner,
|
|
3771
|
+
.${e}-type-b .${e}-item-inner-hidden,
|
|
3772
|
+
.${e}-type-c .${e}-item-inner,
|
|
3773
|
+
.${e}-type-c .${e}-item-inner-hidden {
|
|
3773
3774
|
align-items: flex-start;
|
|
3774
3775
|
}
|
|
3775
|
-
.${e}-type-
|
|
3776
|
-
.${e}-type-
|
|
3776
|
+
.${e}-type-b .${e}-item-image-link,
|
|
3777
|
+
.${e}-type-c .${e}-item-image-link {
|
|
3777
3778
|
align-items: flex-start;
|
|
3778
3779
|
}
|
|
3779
|
-
.${e}-type-
|
|
3780
|
-
.${e}-type-
|
|
3781
|
-
.${e}-type-
|
|
3782
|
-
.${e}-type-
|
|
3780
|
+
.${e}-type-b .${e}-item-title,
|
|
3781
|
+
.${e}-type-b .${e}-item-subtitle,
|
|
3782
|
+
.${e}-type-c .${e}-item-title,
|
|
3783
|
+
.${e}-type-c .${e}-item-subtitle {
|
|
3783
3784
|
text-align: left;
|
|
3784
3785
|
}
|
|
3785
3786
|
.${e}-item-text-block {
|
|
@@ -3789,6 +3790,38 @@ type TestimonialsSettings = {\r
|
|
|
3789
3790
|
width: 100%;
|
|
3790
3791
|
flex-shrink: 0;
|
|
3791
3792
|
}
|
|
3793
|
+
.${e}-align-entries .${e}-item {
|
|
3794
|
+
display: contents;
|
|
3795
|
+
}
|
|
3796
|
+
.${e}-align-entries .${e}-item-inner,
|
|
3797
|
+
.${e}-align-entries .${e}-item-inner-hidden {
|
|
3798
|
+
display: grid;
|
|
3799
|
+
grid-template-rows: subgrid;
|
|
3800
|
+
grid-row: span 3;
|
|
3801
|
+
justify-self: center;
|
|
3802
|
+
margin-bottom: var(--${e}-align-entries-row-gap, 0);
|
|
3803
|
+
}
|
|
3804
|
+
.${e}-align-entries .${e}-item-inner-last-row {
|
|
3805
|
+
margin-bottom: 0;
|
|
3806
|
+
}
|
|
3807
|
+
.${e}-align-entries .${e}-item-text-link {
|
|
3808
|
+
display: contents;
|
|
3809
|
+
}
|
|
3810
|
+
.${e}-align-entries .${e}-item-title-row,
|
|
3811
|
+
.${e}-align-entries .${e}-item-subtitle-row {
|
|
3812
|
+
display: flex;
|
|
3813
|
+
flex-direction: column;
|
|
3814
|
+
align-items: flex-start;
|
|
3815
|
+
width: 100%;
|
|
3816
|
+
min-height: 100%;
|
|
3817
|
+
}
|
|
3818
|
+
.${e}-align-entries .${e}-item-image-link {
|
|
3819
|
+
width: 100%;
|
|
3820
|
+
height: auto;
|
|
3821
|
+
display: flex;
|
|
3822
|
+
flex-direction: column;
|
|
3823
|
+
align-items: flex-start;
|
|
3824
|
+
}
|
|
3792
3825
|
.${e}-lightbox-counter {
|
|
3793
3826
|
margin: 0;
|
|
3794
3827
|
color: var(--${e}-lightbox-counter-color);
|
|
@@ -3811,11 +3844,11 @@ type TestimonialsSettings = {\r
|
|
|
3811
3844
|
pointer-events: auto;
|
|
3812
3845
|
z-index: 10;
|
|
3813
3846
|
}
|
|
3814
|
-
`}const xt=500,nd=750,It="cubic-bezier(0.22, 1, 0.36, 1)";function Wt(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function eo({media:e,className:t,style:n,onImageClick:r}){return Wt(e)?l.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):l.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:r})}function rd({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:i,onClose:a,onPrev:s,onNext:c,counterClassName:o,counterStyle:d}){const p=n==="Cover",T=u.useRef(null),S=u.useRef(null),[v,g]=u.useState(null),[m,R]=u.useState(r?"opening":"open"),[b,x]=u.useState(!0),y=u.useRef(t),O=u.useCallback(()=>{const N=T.current,w=S.current;if(!N||!w)return;const B=N.getBoundingClientRect(),V=B.width,q=B.height,Y=w.naturalWidth,$=w.naturalHeight;if(!V||!q||!Y||!$)return;if(n==="Cover"){g({width:V,height:q,left:B.left,top:B.top});return}const W=Y/$,H=V/q;if(W>H){const M=V/W;g({width:V,height:M,left:B.left,top:B.top+(q-M)/2})}else{const M=q*W;g({width:M,height:q,left:B.left+(V-M)/2,top:B.top})}},[n]);u.useEffect(()=>{O();const N=T.current;if(!N)return;const w=new ResizeObserver(()=>O());return w.observe(N),()=>w.disconnect()},[O,t]),u.useEffect(()=>{if(m!=="opening"||!v)return;const N={id:0};return N.id=requestAnimationFrame(()=>{N.id=requestAnimationFrame(()=>R("open"))}),()=>cancelAnimationFrame(N.id)},[m,v]),u.useEffect(()=>{if(m!=="closing")return;const N=setTimeout(()=>a(),xt);return()=>clearTimeout(N)},[m,a]),u.useEffect(()=>{y.current!==t&&x(!1),y.current=t},[t]),u.useEffect(()=>{const N=w=>{w.key==="Escape"&&(w.preventDefault(),w.stopPropagation(),m!=="closing"&&R("closing"))};return window.addEventListener("keydown",N,!0),()=>window.removeEventListener("keydown",N,!0)},[m]);const P=()=>{m!=="closing"&&R("closing")},A=m==="open",L=m==="closing",I=L&&i&&!!r,_=m==="opening"?r??v:I?r:v;return l.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:P,children:[l.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:A?1:0,transition:`opacity ${xt}ms ${It}`,pointerEvents:"none"}}),l.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:T,style:{position:"absolute",inset:0}}),l.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:A?1:0,transition:`opacity ${xt}ms ${It}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&l.jsxs("p",{className:o,style:d,children:[t+1," / ",e.length]})})]}):l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{height:"10%"}}),l.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:l.jsx("div",{ref:T,style:{width:"100%",height:"100%"}})}),l.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:A?1:0,transition:`opacity ${xt}ms ${It}`},children:e.length>1&&l.jsxs("p",{className:o,style:d,children:[t+1," / ",e.length]})})]})}),_&&l.jsx("img",{ref:S,src:e[t],onLoad:O,style:{position:"fixed",top:_.top,left:_.left,width:_.width,height:_.height,objectFit:n==="Cover"?"cover":"contain",opacity:L&&!I?0:1,transition:L&&!I?`opacity ${xt}ms ${It}`:I||b?`top ${xt}ms ${It}, left ${xt}ms ${It}, width ${xt}ms ${It}, height ${xt}ms ${It}`:"none",pointerEvents:"none",zIndex:9998}}),A&&v&&l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{position:"fixed",top:v.top,left:v.left,width:v.width/2,height:v.height,cursor:"w-resize",zIndex:9999},onClick:N=>{N.stopPropagation(),s()}}),l.jsx("div",{style:{position:"fixed",top:v.top,left:v.left+v.width/2,width:v.width/2,height:v.height,cursor:"e-resize",zIndex:9999},onClick:N=>{N.stopPropagation(),c()}})]})]})}function id(e){return typeof e=="string"?e==="Cover"?"Cover":"Fit":(e==null?void 0:e.display)==="Cover"?"Cover":"Fit"}function od({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,metadata:a,activeEvent:s,layoutId:c}){const{prefix:o}=E.useScopedStyles(),{type:d="A",gridLayout:p,textBoxWidth:T,verticalGap:S,entriesCount:v,lightbox:g,imageDisplay:m,lightboxImageDisplay:R,slider:b,sliderTiming:x,direction:y,transition:O,titleMarginTop:P,subtitleMarginTop:A,titleColor:L,subtitleColor:I,lightboxCounterColor:_,titleFontFamily:N,titleFontSettings:w,titleFontSize:B,titleLineHeight:V,titleLetterSpacing:q,titleWordSpacing:Y,titleTextAppearance:$,subtitleFontFamily:W,subtitleFontSettings:H,subtitleFontSize:M,subtitleLineHeight:k,subtitleLetterSpacing:D,subtitleWordSpacing:Q,subtitleTextAppearance:re,lightboxCounterFontFamily:ie,lightboxCounterFontSettings:ce,lightboxCounterFontSize:C,lightboxCounterLineHeight:oe,lightboxCounterLetterSpacing:Pe,lightboxCounterWordSpacing:ue,lightboxCounterTextAppearance:ye,showText:Re="Always",alignEntries:ne="Off"}=e,h={fontSettings:{fontFamily:N,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:B??.01,lineHeight:V,letterSpacing:q??0,wordSpacing:Y??0,textAppearance:$,color:L},F={...ht(nt(h,n))},z={fontSettings:{fontFamily:W,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:M??.01,lineHeight:k,letterSpacing:D??0,wordSpacing:Q??0,textAppearance:re,color:I},ee={...ht(nt(z,n))},te={fontSettings:{fontFamily:ie,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:C??.01,lineHeight:oe,letterSpacing:Pe??0,wordSpacing:ue??0,textAppearance:ye,color:_},pe={...ht(nt(te,n)),...Nr(C,oe,o,n)},Ce=Mr(B,V,`${o}-item-title`,`${o}-text-tight-leading`),he=Mr(M,k,`${o}-item-subtitle`,`${o}-text-tight-leading`),fe=Nr(B,V,o,n),K=Nr(M,k,o,n),U=Mr(C,oe,`${o}-lightbox-counter`,`${o}-text-tight-leading`),j=E.buildColorVars(o,{titleColor:L,subtitleColor:I,lightboxCounterColor:_},ad,sd),Me=`${s&&s!=="default"?`${o}-state-${s}`:""}${Re==="On hover"&&!!r?` ${o}-show-text-hover`:""}`.trim(),Fe=v===0?1/0:v,Ie=(t??[]).slice(0,Fe),qe=p.entryWidth??.2,$e=(m==null?void 0:m.display)==="Cover",Ne=(m==null?void 0:m.ratioValue)??"1:1",je=(m==null?void 0:m.reversed)??!1,[We,Ge]=Ne.split(":").map(Number),Zt=`${je?Ge:We} / ${je?We:Ge}`,gt=E.scalingValue(qe??0,n),_t=!$e&&b!=="Off",At={width:gt,...$e?{aspectRatio:Zt,height:"auto",overflow:"hidden"}:{height:"auto"}},Se=`${o}-item-image-wrapper${_t?` ${o}-item-image-wrapper-fit-slider`:""}`.trim(),dt=d==="C",rt=dt&&ne==="On",Xe=`calc(${E.scalingValue(qe??0,n)} * (${T} / 100))`,Rt=E.scalingValue(qe*T/100,n),vn=$e?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Jt,Qt]=u.useState("ltr"),[Dt,zt]=u.useState(0),ve=u.useRef(null);u.useEffect(()=>{const be=ve.current;if(!be)return;const J=new ResizeObserver(ae=>{zt(Math.round(ae[0].contentRect.width))});return J.observe(be),()=>J.disconnect()},[]),u.useLayoutEffect(()=>{var we;const be=ve.current;if(!be)return;const J=()=>{be.querySelectorAll("[data-grid-text-block]").forEach(me=>{me.style.minHeight=""})};if(!rt){J();return}const ae=p.columnsCount,se=()=>{J();const me=Array.from(be.querySelectorAll(`.${o}-item`));for(let ke=0;ke<me.length;ke+=ae){const et=me.slice(ke,ke+ae).map(ot=>ot.querySelector("[data-grid-text-block]")).filter(ot=>ot!==null);if(et.length===0)continue;const Ue=Math.max(...et.map(ot=>ot.offsetHeight));et.forEach(ot=>{ot.style.minHeight=`${Ue}px`})}};se();const xe=new ResizeObserver(()=>se());xe.observe(be);let He=!1;return typeof document<"u"&&((we=document.fonts)!=null&&we.ready)&&document.fonts.ready.then(()=>{He||se()}),()=>{He=!0,xe.disconnect(),J()}},[o,rt,Ie,p.columnsCount,P,A,Dt]);const ze=(()=>{const be={...j},J=ve.current?getComputedStyle(ve.current).getPropertyValue("--cntrl-article-width").trim():"";return J&&(be["--cntrl-article-width"]=J),be})(),[Ve,Ke]=u.useState(!1),[Qe,Er]=u.useState([]),[Dn,bn]=u.useState(0),[Pr,zn]=u.useState(null),jn=(be,J,ae)=>{if(n&&!r||g==="Off")return;const se=be.currentTarget.getBoundingClientRect();zn({top:se.top,left:se.left,width:se.width,height:se.height}),Er(J),bn(ae),Ke(!0)};return u.useEffect(()=>{if(!Ve||g!=="On"||typeof document>"u")return;const be=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=be}},[Ve,g]),u.useEffect(()=>{!n||r||(Ke(!1),zn(null))},[n,r]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:td(o)}}),l.jsx("div",{style:j,children:l.jsx("div",{ref:ve,className:`${o}-wrapper ${o}-type-${d}${rt?` ${o}-align-entries`:""} ${Me}`.trim(),style:{gridTemplateColumns:`repeat(${p.columnsCount}, minmax(0, 1fr))`,rowGap:E.scalingValue(S??0,n),columnGap:E.scalingValue(p.horizontalGap??0,n),width:E.scalingValue(p.wrapperWidth??0,n)},children:Ie.map((be,J)=>{var xe,He;const ae=Qi(be.title),se=Qi(be.subtitle);return l.jsx("div",{className:`${o}-item`.trim(),children:l.jsx("div",{className:i?`${o}-item-inner`:`${o}-item-inner-hidden`,style:{width:(T??0)>100?`calc(${E.scalingValue(qe??0,n)} * (${T} / 100))`:E.scalingValue(qe??0,n)},children:l.jsxs("a",{href:(((xe=be.link)==null?void 0:xe.length)??0)>0&&g==="Off"?be.link:void 0,target:"_blank",className:`${o}-item-image-link`,children:[dt&&l.jsxs("div",{className:`${o}-item-text-block`,"data-grid-text-block":!0,children:[ae&&l.jsx("p",{className:Ce,style:{width:Xe,...F,...fe},children:be.title}),ae&&l.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:E.scalingValue(P??0,n),width:Rt}}),se&&l.jsx("p",{className:he,style:{width:Xe,...ee,...K},children:be.subtitle}),se&&l.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:E.scalingValue(A??0,n),width:Rt}})]}),l.jsx("div",{className:Se,style:At,children:(((He=be.image)==null?void 0:He.length)??0)===0?null:b==="Off"?(()=>{const we=be.image[0],ke=be.image.filter(De=>!Wt(De)).map(De=>De.url);return l.jsx(eo,{media:we,className:`${o}-item-${Wt(we)?"video":"image"}`.trim(),style:vn,onImageClick:Wt(we)?void 0:De=>jn(De,ke,0)})})():l.jsxs(l.Fragment,{children:[_t&&l.jsx("div",{className:`${o}-item-image-wrapper-sizer`,"aria-hidden":"true",children:be.image.map(we=>Wt(we)?l.jsx("video",{src:we.url,muted:!0,playsInline:!0},`sizer-${we.url}`):l.jsx("img",{src:we.url,alt:""},`sizer-${we.url}`))}),l.jsx(vi,{className:`${o}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:x*1e3,width:"100%",height:"100%",speed:nd,type:O==="Fade"?"fade":"loop",rewind:O==="Fade",pauseOnHover:!1,pauseOnFocus:!1,direction:O==="Fade"?"ltr":y!=="Random"?y==="Horizontal"?"ltr":"ttb":Jt},onMoved:we=>{if(y!=="Random"||O==="Fade")return;const me=Math.random()>.5?Math.random()>.5?"rtl":"ltr":Math.random()>.5?"btt":"ttb";Qt(me),setTimeout(()=>{we.refresh()},0)},children:be.image.map((we,me)=>{const ke=be.image.filter(Ue=>!Wt(Ue)),De=ke.map(Ue=>Ue.url),et=ke.findIndex(Ue=>Ue.url===we.url);return l.jsx(bi,{children:l.jsx(eo,{media:we,className:`${o}-item-${Wt(we)?"video":"image"}`.trim(),style:vn,onImageClick:Wt(we)?void 0:Ue=>jn(Ue,De,et)})},me)})},`${O}-${qe}-${y}-${x}-${Dt}-${c}`)]})}),!dt&&l.jsxs(l.Fragment,{children:[l.jsx("div",{"data-controls":i&&ae?"titleMarginTop":void 0,className:i&&ae?`${o}-control`:void 0,style:{height:ae?E.scalingValue(P??0,n):0,width:Rt}}),l.jsx("p",{className:Ce,style:{width:Xe,...F,...fe},children:be.title}),l.jsx("div",{"data-controls":i&&se?"subtitleMarginTop":void 0,className:i&&se?`${o}-control`:void 0,style:{height:se?E.scalingValue(A??0,n):0,width:Rt}}),l.jsx("p",{className:he,style:{width:Xe,...ee,...K},children:be.subtitle})]})]})})},J)})})}),(!n||r)&&Ve&&typeof document<"u"&&g==="On"&&go.createPortal(l.jsx("div",{style:ze,"data-selection":"none",children:l.jsx(rd,{images:Qe,index:Dn,imageDisplay:id(R),originRect:Pr,reverseClose:b==="Off",onClose:()=>Ke(!1),onPrev:()=>bn(be=>(be-1+Qe.length)%Qe.length),onNext:()=>bn(be=>(be+1)%Qe.length),counterClassName:U,counterStyle:pe})}),document.body)]})}const ad={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},sd=["hover","focus","filled","success","error"],ld=`import { Splide, SplideSlide } from '@splidejs/react-splide';
|
|
3847
|
+
`}const Lt=500,ud=750,Mt="cubic-bezier(0.22, 1, 0.36, 1)";function Ft(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function ao({media:e,className:t,style:n,onImageClick:r}){return Ft(e)?l.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):l.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:r})}function pd({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:i,onClose:a,onPrev:s,onNext:c,counterClassName:o,counterStyle:d}){const p=n==="cover",T=u.useRef(null),x=u.useRef(null),[y,g]=u.useState(null),[h,P]=u.useState(r?"opening":"open"),[C,f]=u.useState(!0),b=u.useRef(t),M=u.useCallback(()=>{const k=T.current,$=x.current;if(!k||!$)return;const O=k.getBoundingClientRect(),V=O.width,q=O.height,Y=$.naturalWidth,L=$.naturalHeight;if(!V||!q||!Y||!L)return;if(n==="cover"){g({width:V,height:q,left:O.left,top:O.top});return}const R=Y/L,B=V/q;if(R>B){const F=V/R;g({width:V,height:F,left:O.left,top:O.top+(q-F)/2})}else{const F=q*R;g({width:F,height:q,left:O.left+(V-F)/2,top:O.top})}},[n]);u.useEffect(()=>{M();const k=T.current;if(!k)return;const $=new ResizeObserver(()=>M());return $.observe(k),()=>$.disconnect()},[M,t]),u.useEffect(()=>{h==="opening"&&y&&P("open")},[h,y]),u.useEffect(()=>{if(h!=="closing")return;const k=setTimeout(()=>a(),Lt);return()=>clearTimeout(k)},[h,a]),u.useEffect(()=>{b.current!==t&&f(!1),b.current=t},[t]),u.useEffect(()=>{const k=$=>{$.key==="Escape"&&($.preventDefault(),$.stopPropagation(),h!=="closing"&&P("closing"))};return window.addEventListener("keydown",k,!0),()=>window.removeEventListener("keydown",k,!0)},[h]);const _=()=>{h!=="closing"&&P("closing")},E=h==="open",S=h==="closing",A=S&&i&&!!r,I=h==="opening"?r??y:A?r:y;return l.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:_,children:[l.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:E?1:0,transition:`opacity ${Lt}ms ${Mt}`,pointerEvents:"none"}}),l.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:T,style:{position:"absolute",inset:0}}),l.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:E?1:0,transition:`opacity ${Lt}ms ${Mt}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&l.jsxs("p",{className:o,style:d,children:[t+1," / ",e.length]})})]}):l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{height:"10%"}}),l.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:l.jsx("div",{ref:T,style:{width:"100%",height:"100%"}})}),l.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:E?1:0,transition:`opacity ${Lt}ms ${Mt}`},children:e.length>1&&l.jsxs("p",{className:o,style:d,children:[t+1," / ",e.length]})})]})}),I&&l.jsx("img",{ref:x,src:e[t],onLoad:M,style:{position:"fixed",top:I.top,left:I.left,width:I.width,height:I.height,objectFit:n==="cover"?"cover":"contain",opacity:S&&!A?0:1,transition:S&&!A?`opacity ${Lt}ms ${Mt}`:A||C?`top ${Lt}ms ${Mt}, left ${Lt}ms ${Mt}, width ${Lt}ms ${Mt}, height ${Lt}ms ${Mt}`:"none",pointerEvents:"none",zIndex:9998}}),E&&y&&l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{position:"fixed",top:y.top,left:y.left,width:y.width/2,height:y.height,cursor:"w-resize",zIndex:9999},onClick:k=>{k.stopPropagation(),s()}}),l.jsx("div",{style:{position:"fixed",top:y.top,left:y.left+y.width/2,width:y.width/2,height:y.height,cursor:"e-resize",zIndex:9999},onClick:k=>{k.stopPropagation(),c()}})]})]})}function md(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function gd({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,metadata:a,activeEvent:s,layoutId:c}){const{prefix:o}=w.useScopedStyles(),{type:d="a",gridLayout:p,textBoxWidth:T=100,verticalGap:x,entriesCount:y,lightbox:g,imageDisplay:h,lightboxImageDisplay:P,slider:C,sliderTiming:f,direction:b,transition:M,titleMarginTop:_,subtitleMarginTop:E,titleColor:S,subtitleColor:A,lightboxCounterColor:I,titleFontFamily:k,titleFontSettings:$,titleFontSize:O,titleLineHeight:V,titleLetterSpacing:q,titleWordSpacing:Y,titleTextAppearance:L,subtitleFontFamily:R,subtitleFontSettings:B,subtitleFontSize:F,subtitleLineHeight:W,subtitleLetterSpacing:j,subtitleWordSpacing:Q,subtitleTextAppearance:oe,lightboxCounterFontFamily:te,lightboxCounterFontSettings:ce,lightboxCounterFontSize:v,lightboxCounterLineHeight:ie,lightboxCounterLetterSpacing:$e,lightboxCounterWordSpacing:de,lightboxCounterTextAppearance:ye,showText:Re="always",alignEntries:re="off"}=e,N={fontSettings:{fontFamily:k,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:O??.01,lineHeight:V,letterSpacing:q??0,wordSpacing:Y??0,textAppearance:L,color:S},H={...Ct(nt(N,n))},D={fontSettings:{fontFamily:R,fontWeight:(B==null?void 0:B.fontWeight)??400,fontStyle:(B==null?void 0:B.fontStyle)??"normal"},fontSize:F??.01,lineHeight:W,letterSpacing:j??0,wordSpacing:Q??0,textAppearance:oe,color:A},ne={...Ct(nt(D,n))},ee={fontSettings:{fontFamily:te,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:v??.01,lineHeight:ie,letterSpacing:$e??0,wordSpacing:de??0,textAppearance:ye,color:I},ae={...Ct(nt(ee,n)),...jr(v,ie,o,n)},ge=Dr(O,V,`${o}-item-title`,`${o}-text-tight-leading`),me=Dr(F,W,`${o}-item-subtitle`,`${o}-text-tight-leading`),he=jr(O,V,o,n),K=jr(F,W,o,n),G=Dr(v,ie,`${o}-lightbox-counter`,`${o}-text-tight-leading`),z=w.buildColorVars(o,{titleColor:S,subtitleColor:A,lightboxCounterColor:I},hd,fd),ke=`${s&&s!=="default"?`${o}-state-${s}`:""}${Re==="on hover"&&(!n||r)?` ${o}-show-text-hover`:""}`.trim(),Je=y===0?1/0:y,Pe=(t??[]).slice(0,Je),Me=p.entryWidth??.2,Ee=(h==null?void 0:h.display)==="cover",je=(h==null?void 0:h.ratioValue)??"1:1",He=(h==null?void 0:h.reversed)??!1,[Ie,Ve]=je.split(":").map(Number),bt=`${He?Ve:Ie} / ${He?Ie:Ve}`,Tt=w.scalingValue(Me??0,n),Kt=!Ee&&C!=="off",xt={width:Tt,...Ee?{aspectRatio:bt,height:"auto",overflow:"hidden"}:{height:"auto"}},Ut=`${o}-item-image-wrapper${Kt?` ${o}-item-image-wrapper-fit-slider`:""}`.trim(),ve=d==="c",Ge=ve&&re==="on",ze=`calc(${w.scalingValue(Me??0,n)} * (${T} / 100))`,rt=w.scalingValue(Me*T/100,n),wn=Ee?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Tn,qt]=u.useState("ltr"),[tn,Ln]=u.useState(0),be=u.useRef(null);u.useEffect(()=>{const Te=be.current;if(!Te)return;const ot=new ResizeObserver(at=>{Ln(Math.round(at[0].contentRect.width))});return ot.observe(Te),()=>ot.disconnect()},[]);const Ye=(()=>{const Te={...z},ot=be.current?getComputedStyle(be.current).getPropertyValue("--cntrl-article-width").trim():"";return ot&&(Te["--cntrl-article-width"]=ot),Te})(),[De,Fe]=u.useState(!1),[it,Gn]=u.useState([]),[Ir,nn]=u.useState(0),[kr,Yn]=u.useState(null),Xn=(Te,ot,at)=>{if(n&&!r||g==="off")return;const X=Te.currentTarget.getBoundingClientRect();Yn({top:X.top,left:X.left,width:X.width,height:X.height}),Gn(ot),nn(at),Fe(!0)};u.useEffect(()=>{if(!De||g!=="on"||typeof document>"u")return;const Te=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Te}},[De,g]),u.useEffect(()=>{!n||r||(Fe(!1),Yn(null))},[n,r]);const Wr=u.useMemo(()=>dd(o),[o]);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Wr}}),l.jsx("div",{style:z,children:l.jsx("div",{ref:be,className:`${o}-wrapper ${o}-type-${d}${Ge?` ${o}-align-entries`:""} ${ke}`.trim(),style:{gridTemplateColumns:`repeat(${p.columnsCount}, minmax(0, 1fr))`,rowGap:Ge?0:w.scalingValue(x??0,n),columnGap:w.scalingValue(p.horizontalGap??0,n),width:w.scalingValue(p.wrapperWidth??0,n),...Ge?{[`--${o}-align-entries-row-gap`]:w.scalingValue(x??0,n)}:{}},children:Pe.map((Te,ot)=>{var Ue,ct;const at=oo(Te.title),X=oo(Te.subtitle),ue=(((Ue=Te.link)==null?void 0:Ue.length)??0)>0&&g==="off"?Te.link:void 0,pe=Math.floor(ot/p.columnsCount)===Math.ceil(Pe.length/p.columnsCount)-1,xe=ve?l.jsxs("div",{className:`${o}-item-text-block`,children:[at&&l.jsx("p",{className:ge,style:{width:ze,...H,...he},children:Te.title}),at&&l.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:w.scalingValue(_??0,n),width:rt}}),X&&l.jsx("p",{className:me,style:{width:ze,...ne,...K},children:Te.subtitle}),X&&l.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:w.scalingValue(E??0,n),width:rt}})]}):null,Be=ve?l.jsxs("div",{className:`${o}-item-title-row`,children:[at&&l.jsx("p",{className:ge,style:{width:ze,...H,...he},children:Te.title}),at&&l.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:w.scalingValue(_??0,n),width:rt}})]}):null,Ke=ve?l.jsxs("div",{className:`${o}-item-subtitle-row`,children:[X&&l.jsx("p",{className:me,style:{width:ze,...ne,...K},children:Te.subtitle}),X&&l.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:w.scalingValue(E??0,n),width:rt}})]}):null,Ce=ue?l.jsxs("a",{href:ue,target:"_blank",className:`${o}-item-text-link`,children:[Be,Ke]}):l.jsxs(l.Fragment,{children:[Be,Ke]}),st=l.jsx("div",{className:Ut,style:xt,children:(((ct=Te.image)==null?void 0:ct.length)??0)===0?null:C==="off"?(()=>{const _e=Te.image[0],et=Te.image.filter(Xe=>!Ft(Xe)).map(Xe=>Xe.url);return l.jsx(ao,{media:_e,className:`${o}-item-${Ft(_e)?"video":"image"}`.trim(),style:wn,onImageClick:Ft(_e)?void 0:Xe=>Xn(Xe,et,0)})})():l.jsxs(l.Fragment,{children:[Kt&&l.jsx("div",{className:`${o}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Te.image.map(_e=>Ft(_e)?l.jsx("video",{src:_e.url,muted:!0,playsInline:!0},`sizer-${_e.url}`):l.jsx("img",{src:_e.url,alt:""},`sizer-${_e.url}`))}),l.jsx(wi,{className:`${o}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:f*1e3,width:"100%",height:"100%",speed:ud,type:M==="fade"?"fade":"loop",rewind:M==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:M==="fade"?"ltr":b!=="random"?b==="horizontal"?"ltr":"ttb":Tn},onMoved:_e=>{if(b!=="random"||M==="fade")return;const Qe=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";qt(Qe),setTimeout(()=>{_e.refresh()},0)},children:Te.image.map((_e,Qe)=>{const et=Te.image.filter(qe=>!Ft(qe)),Xe=et.map(qe=>qe.url),rn=et.findIndex(qe=>qe.url===_e.url);return l.jsx(Ti,{children:l.jsx(ao,{media:_e,className:`${o}-item-${Ft(_e)?"video":"image"}`.trim(),style:wn,onImageClick:Ft(_e)?void 0:qe=>Xn(qe,Xe,rn)})},Qe)})},`${M}-${Me}-${b}-${f}-${tn}-${c}`)]})}),lt=ve?null:l.jsxs(l.Fragment,{children:[l.jsx("div",{"data-controls":i&&at?"titleMarginTop":void 0,className:i&&at?`${o}-control`:void 0,style:{height:at?w.scalingValue(_??0,n):0,width:rt}}),l.jsx("p",{className:ge,style:{width:ze,...H,...he},children:Te.title}),l.jsx("div",{"data-controls":i&&X?"subtitleMarginTop":void 0,className:i&&X?`${o}-control`:void 0,style:{height:X?w.scalingValue(E??0,n):0,width:rt}}),l.jsx("p",{className:me,style:{width:ze,...ne,...K},children:Te.subtitle})]});return l.jsx("div",{className:`${o}-item`.trim(),children:l.jsx("div",{className:`${i?`${o}-item-inner`:`${o}-item-inner-hidden`}${Ge&&pe?` ${o}-item-inner-last-row`:""}`.trim(),style:{width:(T??0)>100?`calc(${w.scalingValue(Me??0,n)} * (${T} / 100))`:w.scalingValue(Me??0,n)},children:Ge?l.jsxs(l.Fragment,{children:[Ce,l.jsx("a",{href:ue,target:"_blank",className:`${o}-item-image-link`,children:st})]}):l.jsxs("a",{href:ue,target:"_blank",className:`${o}-item-image-link`,children:[xe,st,lt]})})},ot)})})}),(!n||r)&&De&&typeof document<"u"&&g==="on"&&So.createPortal(l.jsx("div",{style:Ye,"data-selection":"none",children:l.jsx(pd,{images:it,index:Ir,imageDisplay:md(P),originRect:kr,reverseClose:C==="off",onClose:()=>Fe(!1),onPrev:()=>nn(Te=>(Te-1+it.length)%it.length),onNext:()=>nn(Te=>(Te+1)%it.length),counterClassName:G,counterStyle:ae})}),document.body)]})}const hd={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},fd=["hover","focus","filled","success","error"],yd=`import { Splide, SplideSlide } from '@splidejs/react-splide';
|
|
3815
3848
|
import '@splidejs/react-splide/css/core';
|
|
3816
3849
|
import { CommonComponentProps } from '../props';
|
|
3817
3850
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
|
|
3818
|
-
import { useCallback, useEffect,
|
|
3851
|
+
import { useCallback, useEffect, useRef, useState, useMemo } from 'react';
|
|
3819
3852
|
import { createPortal } from 'react-dom';
|
|
3820
3853
|
import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
|
|
3821
3854
|
|
|
@@ -3984,20 +4017,20 @@ function getCSS(P: string): string {
|
|
|
3984
4017
|
.\${P}-show-text-hover .\${P}-item-inner-hidden:hover .\${P}-item-subtitle {
|
|
3985
4018
|
opacity: 1;
|
|
3986
4019
|
}
|
|
3987
|
-
.\${P}-type-
|
|
3988
|
-
.\${P}-type-
|
|
3989
|
-
.\${P}-type-
|
|
3990
|
-
.\${P}-type-
|
|
4020
|
+
.\${P}-type-b .\${P}-item-inner,
|
|
4021
|
+
.\${P}-type-b .\${P}-item-inner-hidden,
|
|
4022
|
+
.\${P}-type-c .\${P}-item-inner,
|
|
4023
|
+
.\${P}-type-c .\${P}-item-inner-hidden {
|
|
3991
4024
|
align-items: flex-start;
|
|
3992
4025
|
}
|
|
3993
|
-
.\${P}-type-
|
|
3994
|
-
.\${P}-type-
|
|
4026
|
+
.\${P}-type-b .\${P}-item-image-link,
|
|
4027
|
+
.\${P}-type-c .\${P}-item-image-link {
|
|
3995
4028
|
align-items: flex-start;
|
|
3996
4029
|
}
|
|
3997
|
-
.\${P}-type-
|
|
3998
|
-
.\${P}-type-
|
|
3999
|
-
.\${P}-type-
|
|
4000
|
-
.\${P}-type-
|
|
4030
|
+
.\${P}-type-b .\${P}-item-title,
|
|
4031
|
+
.\${P}-type-b .\${P}-item-subtitle,
|
|
4032
|
+
.\${P}-type-c .\${P}-item-title,
|
|
4033
|
+
.\${P}-type-c .\${P}-item-subtitle {
|
|
4001
4034
|
text-align: left;
|
|
4002
4035
|
}
|
|
4003
4036
|
.\${P}-item-text-block {
|
|
@@ -4007,6 +4040,38 @@ function getCSS(P: string): string {
|
|
|
4007
4040
|
width: 100%;
|
|
4008
4041
|
flex-shrink: 0;
|
|
4009
4042
|
}
|
|
4043
|
+
.\${P}-align-entries .\${P}-item {
|
|
4044
|
+
display: contents;
|
|
4045
|
+
}
|
|
4046
|
+
.\${P}-align-entries .\${P}-item-inner,
|
|
4047
|
+
.\${P}-align-entries .\${P}-item-inner-hidden {
|
|
4048
|
+
display: grid;
|
|
4049
|
+
grid-template-rows: subgrid;
|
|
4050
|
+
grid-row: span 3;
|
|
4051
|
+
justify-self: center;
|
|
4052
|
+
margin-bottom: var(--\${P}-align-entries-row-gap, 0);
|
|
4053
|
+
}
|
|
4054
|
+
.\${P}-align-entries .\${P}-item-inner-last-row {
|
|
4055
|
+
margin-bottom: 0;
|
|
4056
|
+
}
|
|
4057
|
+
.\${P}-align-entries .\${P}-item-text-link {
|
|
4058
|
+
display: contents;
|
|
4059
|
+
}
|
|
4060
|
+
.\${P}-align-entries .\${P}-item-title-row,
|
|
4061
|
+
.\${P}-align-entries .\${P}-item-subtitle-row {
|
|
4062
|
+
display: flex;
|
|
4063
|
+
flex-direction: column;
|
|
4064
|
+
align-items: flex-start;
|
|
4065
|
+
width: 100%;
|
|
4066
|
+
min-height: 100%;
|
|
4067
|
+
}
|
|
4068
|
+
.\${P}-align-entries .\${P}-item-image-link {
|
|
4069
|
+
width: 100%;
|
|
4070
|
+
height: auto;
|
|
4071
|
+
display: flex;
|
|
4072
|
+
flex-direction: column;
|
|
4073
|
+
align-items: flex-start;
|
|
4074
|
+
}
|
|
4010
4075
|
.\${P}-lightbox-counter {
|
|
4011
4076
|
margin: 0;
|
|
4012
4077
|
color: var(--\${P}-lightbox-counter-color);
|
|
@@ -4048,7 +4113,7 @@ type AnimRect = { top: number; left: number; width: number; height: number };
|
|
|
4048
4113
|
type LightboxProps = {
|
|
4049
4114
|
images: string[];
|
|
4050
4115
|
index: number;
|
|
4051
|
-
imageDisplay: '
|
|
4116
|
+
imageDisplay: 'fit' | 'cover';
|
|
4052
4117
|
originRect: AnimRect | null;
|
|
4053
4118
|
reverseClose: boolean;
|
|
4054
4119
|
onClose: () => void;
|
|
@@ -4111,7 +4176,7 @@ function GridMediaItem({
|
|
|
4111
4176
|
}
|
|
4112
4177
|
|
|
4113
4178
|
function Lightbox({ images, index, imageDisplay, originRect, reverseClose, onClose, onPrev, onNext, counterClassName, counterStyle }: LightboxProps) {
|
|
4114
|
-
const isCover = imageDisplay === '
|
|
4179
|
+
const isCover = imageDisplay === 'cover';
|
|
4115
4180
|
const ghostRef = useRef<HTMLDivElement>(null);
|
|
4116
4181
|
const imgRef = useRef<HTMLImageElement>(null);
|
|
4117
4182
|
const [finalRect, setFinalRect] = useState<AnimRect | null>(null);
|
|
@@ -4129,7 +4194,7 @@ function Lightbox({ images, index, imageDisplay, originRect, reverseClose, onClo
|
|
|
4129
4194
|
const nw = img.naturalWidth;
|
|
4130
4195
|
const nh = img.naturalHeight;
|
|
4131
4196
|
if (!cw || !ch || !nw || !nh) return;
|
|
4132
|
-
if (imageDisplay === '
|
|
4197
|
+
if (imageDisplay === 'cover') {
|
|
4133
4198
|
setFinalRect({ width: cw, height: ch, left: cb.left, top: cb.top });
|
|
4134
4199
|
return;
|
|
4135
4200
|
}
|
|
@@ -4154,12 +4219,7 @@ function Lightbox({ images, index, imageDisplay, originRect, reverseClose, onClo
|
|
|
4154
4219
|
}, [computeFinalRect, index]);
|
|
4155
4220
|
|
|
4156
4221
|
useEffect(() => {
|
|
4157
|
-
if (phase
|
|
4158
|
-
const handle = { id: 0 };
|
|
4159
|
-
handle.id = requestAnimationFrame(() => {
|
|
4160
|
-
handle.id = requestAnimationFrame(() => setPhase('open'));
|
|
4161
|
-
});
|
|
4162
|
-
return () => cancelAnimationFrame(handle.id);
|
|
4222
|
+
if (phase === 'opening' && finalRect) setPhase('open');
|
|
4163
4223
|
}, [phase, finalRect]);
|
|
4164
4224
|
|
|
4165
4225
|
useEffect(() => {
|
|
@@ -4306,7 +4366,7 @@ function Lightbox({ images, index, imageDisplay, originRect, reverseClose, onClo
|
|
|
4306
4366
|
left: animatedRect.left,
|
|
4307
4367
|
width: animatedRect.width,
|
|
4308
4368
|
height: animatedRect.height,
|
|
4309
|
-
objectFit: imageDisplay === '
|
|
4369
|
+
objectFit: imageDisplay === 'cover' ? 'cover' : 'contain',
|
|
4310
4370
|
opacity: isClosing && !reverseAnimateClose ? 0 : 1,
|
|
4311
4371
|
transition: isClosing && !reverseAnimateClose
|
|
4312
4372
|
? \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
|
|
@@ -4359,19 +4419,19 @@ function Lightbox({ images, index, imageDisplay, originRect, reverseClose, onClo
|
|
|
4359
4419
|
|
|
4360
4420
|
function resolveLightboxImageDisplay(
|
|
4361
4421
|
value: GridSettings['lightboxImageDisplay'],
|
|
4362
|
-
): '
|
|
4422
|
+
): 'fit' | 'cover' {
|
|
4363
4423
|
if (typeof value === 'string') {
|
|
4364
|
-
return value === '
|
|
4424
|
+
return value === 'cover' ? 'cover' : 'fit';
|
|
4365
4425
|
}
|
|
4366
|
-
return value?.display === '
|
|
4426
|
+
return value?.display === 'cover' ? 'cover' : 'fit';
|
|
4367
4427
|
}
|
|
4368
4428
|
|
|
4369
4429
|
export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, metadata, activeEvent, layoutId }: GridProps) {
|
|
4370
4430
|
const { prefix: P } = useScopedStyles();
|
|
4371
4431
|
const {
|
|
4372
|
-
type = '
|
|
4432
|
+
type = 'a',
|
|
4373
4433
|
gridLayout,
|
|
4374
|
-
textBoxWidth,
|
|
4434
|
+
textBoxWidth = 100,
|
|
4375
4435
|
verticalGap,
|
|
4376
4436
|
entriesCount,
|
|
4377
4437
|
lightbox,
|
|
@@ -4407,8 +4467,8 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
4407
4467
|
lightboxCounterLetterSpacing,
|
|
4408
4468
|
lightboxCounterWordSpacing,
|
|
4409
4469
|
lightboxCounterTextAppearance,
|
|
4410
|
-
showText = '
|
|
4411
|
-
alignEntries = '
|
|
4470
|
+
showText = 'always',
|
|
4471
|
+
alignEntries = 'off',
|
|
4412
4472
|
} = settings;
|
|
4413
4473
|
|
|
4414
4474
|
const resolvedTitleTextStyle: TextStyles = {
|
|
@@ -4494,7 +4554,7 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
4494
4554
|
}, COLOR_VAR_MAP, STATE_KEYS);
|
|
4495
4555
|
|
|
4496
4556
|
const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';
|
|
4497
|
-
const showTextOnHover = showText === '
|
|
4557
|
+
const showTextOnHover = showText === 'on hover' && (!isEditor || isPreviewMode);
|
|
4498
4558
|
const wrapperStateClasses = \`\${stateClass}\${showTextOnHover ? \` \${P}-show-text-hover\` : ''}\`.trim();
|
|
4499
4559
|
|
|
4500
4560
|
const resEntriesCount = entriesCount === 0 ? Infinity : entriesCount;
|
|
@@ -4503,7 +4563,7 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
4503
4563
|
|
|
4504
4564
|
const size = gridLayout.entryWidth ?? 0.2;
|
|
4505
4565
|
|
|
4506
|
-
const isCover = imageDisplay?.display === '
|
|
4566
|
+
const isCover = imageDisplay?.display === 'cover';
|
|
4507
4567
|
const ratioValue = imageDisplay?.ratioValue ?? '1:1';
|
|
4508
4568
|
const ratioReversed = imageDisplay?.reversed ?? false;
|
|
4509
4569
|
const [rW, rH] = ratioValue.split(':').map(Number);
|
|
@@ -4512,7 +4572,7 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
4512
4572
|
const aspectRatio = \`\${effW} / \${effH}\`;
|
|
4513
4573
|
|
|
4514
4574
|
const imageWrapperWidth = scalingValue(size ?? 0, isEditor);
|
|
4515
|
-
const isFitSlider = !isCover && slider !== '
|
|
4575
|
+
const isFitSlider = !isCover && slider !== 'off';
|
|
4516
4576
|
|
|
4517
4577
|
const imageWrapperStyle: React.CSSProperties = {
|
|
4518
4578
|
width: imageWrapperWidth,
|
|
@@ -4522,8 +4582,8 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
4522
4582
|
};
|
|
4523
4583
|
|
|
4524
4584
|
const imageWrapperClassName = \`\${P}-item-image-wrapper\${isFitSlider ? \` \${P}-item-image-wrapper-fit-slider\` : ''}\`.trim();
|
|
4525
|
-
const isTypeC = type === '
|
|
4526
|
-
const shouldAlignEntries = isTypeC && alignEntries === '
|
|
4585
|
+
const isTypeC = type === 'c';
|
|
4586
|
+
const shouldAlignEntries = isTypeC && alignEntries === 'on';
|
|
4527
4587
|
const textBoxWidthStyle = \`calc(\${scalingValue(size ?? 0, isEditor)} * (\${textBoxWidth} / 100))\`;
|
|
4528
4588
|
const controlWidthStyle = scalingValue(size * textBoxWidth / 100, isEditor);
|
|
4529
4589
|
|
|
@@ -4557,66 +4617,6 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
4557
4617
|
return () => ro.disconnect();
|
|
4558
4618
|
}, []);
|
|
4559
4619
|
|
|
4560
|
-
useLayoutEffect(() => {
|
|
4561
|
-
const container = containerRef.current;
|
|
4562
|
-
if (!container) return;
|
|
4563
|
-
|
|
4564
|
-
const clearAlignedHeights = () => {
|
|
4565
|
-
container.querySelectorAll<HTMLElement>('[data-grid-text-block]').forEach((el) => {
|
|
4566
|
-
el.style.minHeight = '';
|
|
4567
|
-
});
|
|
4568
|
-
};
|
|
4569
|
-
|
|
4570
|
-
if (!shouldAlignEntries) {
|
|
4571
|
-
clearAlignedHeights();
|
|
4572
|
-
return;
|
|
4573
|
-
}
|
|
4574
|
-
|
|
4575
|
-
const columnsCount = gridLayout.columnsCount;
|
|
4576
|
-
const applyAlignedHeights = () => {
|
|
4577
|
-
clearAlignedHeights();
|
|
4578
|
-
const itemEls = Array.from(container.querySelectorAll<HTMLElement>(\`.\${P}-item\`));
|
|
4579
|
-
for (let rowStart = 0; rowStart < itemEls.length; rowStart += columnsCount) {
|
|
4580
|
-
const rowItems = itemEls.slice(rowStart, rowStart + columnsCount);
|
|
4581
|
-
const textBlocks = rowItems
|
|
4582
|
-
.map((itemEl) => itemEl.querySelector<HTMLElement>('[data-grid-text-block]'))
|
|
4583
|
-
.filter((el): el is HTMLElement => el !== null);
|
|
4584
|
-
if (textBlocks.length === 0) continue;
|
|
4585
|
-
|
|
4586
|
-
const maxTextHeight = Math.max(...textBlocks.map((el) => el.offsetHeight));
|
|
4587
|
-
textBlocks.forEach((el) => {
|
|
4588
|
-
el.style.minHeight = \`\${maxTextHeight}px\`;
|
|
4589
|
-
});
|
|
4590
|
-
}
|
|
4591
|
-
};
|
|
4592
|
-
|
|
4593
|
-
applyAlignedHeights();
|
|
4594
|
-
|
|
4595
|
-
const observer = new ResizeObserver(() => applyAlignedHeights());
|
|
4596
|
-
observer.observe(container);
|
|
4597
|
-
|
|
4598
|
-
let cancelled = false;
|
|
4599
|
-
if (typeof document !== 'undefined' && document.fonts?.ready) {
|
|
4600
|
-
document.fonts.ready.then(() => {
|
|
4601
|
-
if (!cancelled) applyAlignedHeights();
|
|
4602
|
-
});
|
|
4603
|
-
}
|
|
4604
|
-
|
|
4605
|
-
return () => {
|
|
4606
|
-
cancelled = true;
|
|
4607
|
-
observer.disconnect();
|
|
4608
|
-
clearAlignedHeights();
|
|
4609
|
-
};
|
|
4610
|
-
}, [
|
|
4611
|
-
P,
|
|
4612
|
-
shouldAlignEntries,
|
|
4613
|
-
cropContent,
|
|
4614
|
-
gridLayout.columnsCount,
|
|
4615
|
-
titleMarginTop,
|
|
4616
|
-
subtitleMarginTop,
|
|
4617
|
-
containerWidth,
|
|
4618
|
-
]);
|
|
4619
|
-
|
|
4620
4620
|
const lightboxPortalStyle = (() => {
|
|
4621
4621
|
const style: Record<string, string> = { ...(colorVars as Record<string, string>) };
|
|
4622
4622
|
const articleWidth = containerRef.current
|
|
@@ -4635,7 +4635,7 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
4635
4635
|
|
|
4636
4636
|
const openLightbox = (e: React.MouseEvent<HTMLImageElement>, urls: string[], idx: number) => {
|
|
4637
4637
|
if (isEditor && !isPreviewMode) return;
|
|
4638
|
-
if (lightbox === '
|
|
4638
|
+
if (lightbox === 'off') return;
|
|
4639
4639
|
const r = e.currentTarget.getBoundingClientRect();
|
|
4640
4640
|
setLightboxOriginRect({ top: r.top, left: r.left, width: r.width, height: r.height });
|
|
4641
4641
|
setLightboxImages(urls);
|
|
@@ -4644,7 +4644,7 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
4644
4644
|
};
|
|
4645
4645
|
|
|
4646
4646
|
useEffect(() => {
|
|
4647
|
-
if (!lightboxOpen || lightbox !== '
|
|
4647
|
+
if (!lightboxOpen || lightbox !== 'on') return;
|
|
4648
4648
|
if (typeof document === 'undefined') return;
|
|
4649
4649
|
const prevOverflow = document.body.style.overflow;
|
|
4650
4650
|
document.body.style.overflow = 'hidden';
|
|
@@ -4659,190 +4659,271 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
4659
4659
|
setLightboxOriginRect(null);
|
|
4660
4660
|
}, [isEditor, isPreviewMode]);
|
|
4661
4661
|
|
|
4662
|
+
const scopedCss = useMemo(() => getCSS(P), [P]);
|
|
4663
|
+
|
|
4662
4664
|
return (
|
|
4663
4665
|
<>
|
|
4664
|
-
<style dangerouslySetInnerHTML={{ __html:
|
|
4666
|
+
<style dangerouslySetInnerHTML={{ __html: scopedCss }} />
|
|
4665
4667
|
<div style={colorVars}>
|
|
4666
4668
|
<div
|
|
4667
4669
|
ref={containerRef}
|
|
4668
4670
|
className={\`\${P}-wrapper \${P}-type-\${type}\${shouldAlignEntries ? \` \${P}-align-entries\` : ''} \${wrapperStateClasses}\`.trim()}
|
|
4669
4671
|
style={{
|
|
4670
4672
|
gridTemplateColumns: \`repeat(\${gridLayout.columnsCount}, minmax(0, 1fr))\`,
|
|
4671
|
-
rowGap: scalingValue(verticalGap ?? 0, isEditor),
|
|
4673
|
+
rowGap: shouldAlignEntries ? 0 : scalingValue(verticalGap ?? 0, isEditor),
|
|
4672
4674
|
columnGap: scalingValue(gridLayout.horizontalGap ?? 0, isEditor),
|
|
4673
|
-
width: scalingValue(gridLayout.wrapperWidth ?? 0, isEditor)
|
|
4675
|
+
width: scalingValue(gridLayout.wrapperWidth ?? 0, isEditor),
|
|
4676
|
+
...(shouldAlignEntries
|
|
4677
|
+
? { [\`--\${P}-align-entries-row-gap\`]: scalingValue(verticalGap ?? 0, isEditor) }
|
|
4678
|
+
: {}),
|
|
4674
4679
|
}}>
|
|
4675
4680
|
{cropContent.map((item: any, index: number) => {
|
|
4676
4681
|
const hasTitle = hasText(item.title);
|
|
4677
4682
|
const hasSubtitle = hasText(item.subtitle);
|
|
4683
|
+
const itemLink = (item.link?.length ?? 0) > 0 && lightbox === 'off' ? item.link : undefined;
|
|
4684
|
+
const isLastRow = Math.floor(index / gridLayout.columnsCount)
|
|
4685
|
+
=== Math.ceil(cropContent.length / gridLayout.columnsCount) - 1;
|
|
4686
|
+
|
|
4687
|
+
const typeCTextBlock = isTypeC ? (
|
|
4688
|
+
<div className={\`\${P}-item-text-block\`}>
|
|
4689
|
+
{hasTitle && (
|
|
4690
|
+
<p className={titleTextClassName} style={{ width: textBoxWidthStyle, ...titleFieldCss, ...titleTextLeadingVars }}>
|
|
4691
|
+
{item.title}
|
|
4692
|
+
</p>
|
|
4693
|
+
)}
|
|
4694
|
+
{hasTitle && (
|
|
4695
|
+
<div
|
|
4696
|
+
data-controls={isEditMode ? 'titleMarginTop' : undefined}
|
|
4697
|
+
className={isEditMode ? \`\${P}-control\` : undefined}
|
|
4698
|
+
style={{
|
|
4699
|
+
height: scalingValue(titleMarginTop ?? 0, isEditor),
|
|
4700
|
+
width: controlWidthStyle,
|
|
4701
|
+
}}
|
|
4702
|
+
/>
|
|
4703
|
+
)}
|
|
4704
|
+
{hasSubtitle && (
|
|
4705
|
+
<p className={subtitleTextClassName} style={{ width: textBoxWidthStyle, ...subtitleFieldCss, ...subtitleTextLeadingVars }}>
|
|
4706
|
+
{item.subtitle}
|
|
4707
|
+
</p>
|
|
4708
|
+
)}
|
|
4709
|
+
{hasSubtitle && (
|
|
4710
|
+
<div
|
|
4711
|
+
data-controls={isEditMode ? 'subtitleMarginTop' : undefined}
|
|
4712
|
+
className={isEditMode ? \`\${P}-control\` : undefined}
|
|
4713
|
+
style={{
|
|
4714
|
+
height: scalingValue(subtitleMarginTop ?? 0, isEditor),
|
|
4715
|
+
width: controlWidthStyle,
|
|
4716
|
+
}}
|
|
4717
|
+
/>
|
|
4718
|
+
)}
|
|
4719
|
+
</div>
|
|
4720
|
+
) : null;
|
|
4721
|
+
|
|
4722
|
+
const titleRow = isTypeC ? (
|
|
4723
|
+
<div className={\`\${P}-item-title-row\`}>
|
|
4724
|
+
{hasTitle && (
|
|
4725
|
+
<p className={titleTextClassName} style={{ width: textBoxWidthStyle, ...titleFieldCss, ...titleTextLeadingVars }}>
|
|
4726
|
+
{item.title}
|
|
4727
|
+
</p>
|
|
4728
|
+
)}
|
|
4729
|
+
{hasTitle && (
|
|
4730
|
+
<div
|
|
4731
|
+
data-controls={isEditMode ? 'titleMarginTop' : undefined}
|
|
4732
|
+
className={isEditMode ? \`\${P}-control\` : undefined}
|
|
4733
|
+
style={{
|
|
4734
|
+
height: scalingValue(titleMarginTop ?? 0, isEditor),
|
|
4735
|
+
width: controlWidthStyle,
|
|
4736
|
+
}}
|
|
4737
|
+
/>
|
|
4738
|
+
)}
|
|
4739
|
+
</div>
|
|
4740
|
+
) : null;
|
|
4741
|
+
|
|
4742
|
+
const subtitleRow = isTypeC ? (
|
|
4743
|
+
<div className={\`\${P}-item-subtitle-row\`}>
|
|
4744
|
+
{hasSubtitle && (
|
|
4745
|
+
<p className={subtitleTextClassName} style={{ width: textBoxWidthStyle, ...subtitleFieldCss, ...subtitleTextLeadingVars }}>
|
|
4746
|
+
{item.subtitle}
|
|
4747
|
+
</p>
|
|
4748
|
+
)}
|
|
4749
|
+
{hasSubtitle && (
|
|
4750
|
+
<div
|
|
4751
|
+
data-controls={isEditMode ? 'subtitleMarginTop' : undefined}
|
|
4752
|
+
className={isEditMode ? \`\${P}-control\` : undefined}
|
|
4753
|
+
style={{
|
|
4754
|
+
height: scalingValue(subtitleMarginTop ?? 0, isEditor),
|
|
4755
|
+
width: controlWidthStyle,
|
|
4756
|
+
}}
|
|
4757
|
+
/>
|
|
4758
|
+
)}
|
|
4759
|
+
</div>
|
|
4760
|
+
) : null;
|
|
4761
|
+
|
|
4762
|
+
const alignedTextRows = itemLink ? (
|
|
4763
|
+
<a href={itemLink} target="_blank" className={\`\${P}-item-text-link\`}>
|
|
4764
|
+
{titleRow}
|
|
4765
|
+
{subtitleRow}
|
|
4766
|
+
</a>
|
|
4767
|
+
) : (
|
|
4768
|
+
<>
|
|
4769
|
+
{titleRow}
|
|
4770
|
+
{subtitleRow}
|
|
4771
|
+
</>
|
|
4772
|
+
);
|
|
4678
4773
|
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
{
|
|
4694
|
-
|
|
4695
|
-
)}
|
|
4696
|
-
{hasTitle && (
|
|
4697
|
-
<div
|
|
4698
|
-
data-controls={isEditMode ? 'titleMarginTop' : undefined}
|
|
4699
|
-
className={isEditMode ? \`\${P}-control\` : undefined}
|
|
4700
|
-
style={{
|
|
4701
|
-
height: scalingValue(titleMarginTop ?? 0, isEditor),
|
|
4702
|
-
width: controlWidthStyle,
|
|
4703
|
-
}}
|
|
4774
|
+
const imageContent = (
|
|
4775
|
+
<div className={imageWrapperClassName} style={imageWrapperStyle}>
|
|
4776
|
+
{(item.image?.length ?? 0) === 0
|
|
4777
|
+
? null
|
|
4778
|
+
: slider === 'off'
|
|
4779
|
+
?
|
|
4780
|
+
(() => {
|
|
4781
|
+
const media = item.image[0] as GridMedia;
|
|
4782
|
+
const imageOnly = item.image.filter((entry: GridMedia) => !isVideoMedia(entry));
|
|
4783
|
+
const imageUrls = imageOnly.map((entry: GridMedia) => entry.url);
|
|
4784
|
+
return (
|
|
4785
|
+
<GridMediaItem
|
|
4786
|
+
media={media}
|
|
4787
|
+
className={\`\${P}-item-\${isVideoMedia(media) ? 'video' : 'image'}\`.trim()}
|
|
4788
|
+
style={imageStyle}
|
|
4789
|
+
onImageClick={isVideoMedia(media) ? undefined : (e) => openLightbox(e, imageUrls, 0)}
|
|
4704
4790
|
/>
|
|
4705
|
-
)
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4791
|
+
);
|
|
4792
|
+
})()
|
|
4793
|
+
:
|
|
4794
|
+
<>
|
|
4795
|
+
{isFitSlider && (
|
|
4796
|
+
<div className={\`\${P}-item-image-wrapper-sizer\`} aria-hidden="true">
|
|
4797
|
+
{item.image.map((media: GridMedia) => (
|
|
4798
|
+
isVideoMedia(media) ? (
|
|
4799
|
+
<video key={\`sizer-\${media.url}\`} src={media.url} muted playsInline />
|
|
4800
|
+
) : (
|
|
4801
|
+
<img key={\`sizer-\${media.url}\`} src={media.url} alt="" />
|
|
4802
|
+
)
|
|
4803
|
+
))}
|
|
4804
|
+
</div>
|
|
4805
|
+
)}
|
|
4806
|
+
<Splide
|
|
4807
|
+
key={\`\${transition}-\${size}-\${direction}-\${sliderTiming}-\${containerWidth}-\${layoutId}\`}
|
|
4808
|
+
className={\`\${P}-item-slider\`}
|
|
4809
|
+
options={{
|
|
4810
|
+
arrows: false,
|
|
4811
|
+
pagination: false,
|
|
4812
|
+
drag: false,
|
|
4813
|
+
perPage: 1,
|
|
4814
|
+
autoplay: true,
|
|
4815
|
+
interval: sliderTiming * 1000,
|
|
4816
|
+
width: '100%',
|
|
4817
|
+
height: '100%',
|
|
4818
|
+
speed: SLIDER_TRANSITION_MS,
|
|
4819
|
+
type: transition === 'fade' ? 'fade' : 'loop',
|
|
4820
|
+
rewind: transition === 'fade',
|
|
4821
|
+
pauseOnHover: false,
|
|
4822
|
+
pauseOnFocus: false,
|
|
4823
|
+
direction: transition === 'fade' ? 'ltr' : direction !== 'random'
|
|
4824
|
+
? direction === 'horizontal'
|
|
4825
|
+
? 'ltr'
|
|
4826
|
+
: 'ttb'
|
|
4827
|
+
: dir as 'ltr' | 'ttb' | 'rtl',
|
|
4828
|
+
}}
|
|
4829
|
+
onMoved={(splide) => {
|
|
4830
|
+
if (direction !== 'random' || transition === 'fade') return;
|
|
4831
|
+
const next = Math.random() > 0.5 ? Math.random() > 0.5 ? 'rtl' : 'ltr' : 'ttb';
|
|
4832
|
+
setDir(next);
|
|
4833
|
+
|
|
4834
|
+
setTimeout(() => {
|
|
4835
|
+
splide.refresh();
|
|
4836
|
+
}, 0);
|
|
4837
|
+
}}
|
|
4838
|
+
>
|
|
4839
|
+
{item.image.map((media: GridMedia, imgIndex: number) => {
|
|
4840
|
+
const imageOnly = item.image.filter((entry: GridMedia) => !isVideoMedia(entry));
|
|
4841
|
+
const imageUrls = imageOnly.map((entry: GridMedia) => entry.url);
|
|
4842
|
+
const imageIndex = imageOnly.findIndex((entry: GridMedia) => entry.url === media.url);
|
|
4843
|
+
return (
|
|
4844
|
+
<SplideSlide key={imgIndex}>
|
|
4733
4845
|
<GridMediaItem
|
|
4734
4846
|
media={media}
|
|
4735
4847
|
className={\`\${P}-item-\${isVideoMedia(media) ? 'video' : 'image'}\`.trim()}
|
|
4736
4848
|
style={imageStyle}
|
|
4737
|
-
onImageClick={isVideoMedia(media) ? undefined : (e) => openLightbox(e, imageUrls,
|
|
4849
|
+
onImageClick={isVideoMedia(media) ? undefined : (e) => openLightbox(e, imageUrls, imageIndex)}
|
|
4738
4850
|
/>
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
{isFitSlider && (
|
|
4744
|
-
<div className={\`\${P}-item-image-wrapper-sizer\`} aria-hidden="true">
|
|
4745
|
-
{item.image.map((media: GridMedia) => (
|
|
4746
|
-
isVideoMedia(media) ? (
|
|
4747
|
-
<video key={\`sizer-\${media.url}\`} src={media.url} muted playsInline />
|
|
4748
|
-
) : (
|
|
4749
|
-
<img key={\`sizer-\${media.url}\`} src={media.url} alt="" />
|
|
4750
|
-
)
|
|
4751
|
-
))}
|
|
4752
|
-
</div>
|
|
4753
|
-
)}
|
|
4754
|
-
<Splide
|
|
4755
|
-
key={\`\${transition}-\${size}-\${direction}-\${sliderTiming}-\${containerWidth}-\${layoutId}\`}
|
|
4756
|
-
className={\`\${P}-item-slider\`}
|
|
4757
|
-
options={{
|
|
4758
|
-
arrows: false,
|
|
4759
|
-
pagination: false,
|
|
4760
|
-
drag: false,
|
|
4761
|
-
perPage: 1,
|
|
4762
|
-
autoplay: true,
|
|
4763
|
-
interval: sliderTiming * 1000,
|
|
4764
|
-
width: '100%',
|
|
4765
|
-
height: '100%',
|
|
4766
|
-
speed: SLIDER_TRANSITION_MS,
|
|
4767
|
-
type: transition === 'Fade' ? 'fade' : 'loop',
|
|
4768
|
-
rewind: transition === 'Fade',
|
|
4769
|
-
pauseOnHover: false,
|
|
4770
|
-
pauseOnFocus: false,
|
|
4771
|
-
direction: transition === 'Fade' ? 'ltr' : direction !== 'Random'
|
|
4772
|
-
? direction === 'Horizontal'
|
|
4773
|
-
? 'ltr'
|
|
4774
|
-
: 'ttb'
|
|
4775
|
-
: dir as 'ltr' | 'ttb' | 'rtl',
|
|
4776
|
-
}}
|
|
4777
|
-
onMoved={(splide) => {
|
|
4778
|
-
if (direction !== 'Random' || transition === 'Fade') return;
|
|
4779
|
-
const next = Math.random() > 0.5 ? Math.random() > 0.5 ? 'rtl' : 'ltr' : Math.random() > 0.5 ? 'btt' : 'ttb';
|
|
4780
|
-
setDir(next);
|
|
4781
|
-
|
|
4782
|
-
setTimeout(() => {
|
|
4783
|
-
splide.refresh();
|
|
4784
|
-
}, 0);
|
|
4785
|
-
}}
|
|
4786
|
-
>
|
|
4787
|
-
{item.image.map((media: GridMedia, imgIndex: number) => {
|
|
4788
|
-
const imageOnly = item.image.filter((entry: GridMedia) => !isVideoMedia(entry));
|
|
4789
|
-
const imageUrls = imageOnly.map((entry: GridMedia) => entry.url);
|
|
4790
|
-
const imageIndex = imageOnly.findIndex((entry: GridMedia) => entry.url === media.url);
|
|
4791
|
-
return (
|
|
4792
|
-
<SplideSlide key={imgIndex}>
|
|
4793
|
-
<GridMediaItem
|
|
4794
|
-
media={media}
|
|
4795
|
-
className={\`\${P}-item-\${isVideoMedia(media) ? 'video' : 'image'}\`.trim()}
|
|
4796
|
-
style={imageStyle}
|
|
4797
|
-
onImageClick={isVideoMedia(media) ? undefined : (e) => openLightbox(e, imageUrls, imageIndex)}
|
|
4798
|
-
/>
|
|
4799
|
-
</SplideSlide>
|
|
4800
|
-
);
|
|
4801
|
-
})}
|
|
4802
|
-
</Splide>
|
|
4803
|
-
</>
|
|
4804
|
-
}
|
|
4805
|
-
</div>
|
|
4806
|
-
{!isTypeC && (
|
|
4807
|
-
<>
|
|
4808
|
-
<div
|
|
4809
|
-
data-controls={isEditMode && hasTitle ? 'titleMarginTop' : undefined}
|
|
4810
|
-
className={isEditMode && hasTitle ? \`\${P}-control\` : undefined}
|
|
4811
|
-
style={{
|
|
4812
|
-
height: hasTitle ? scalingValue(titleMarginTop ?? 0, isEditor) : 0,
|
|
4813
|
-
width: controlWidthStyle,
|
|
4814
|
-
}}
|
|
4815
|
-
/>
|
|
4816
|
-
<p
|
|
4817
|
-
className={titleTextClassName}
|
|
4818
|
-
style={{ width: textBoxWidthStyle, ...titleFieldCss, ...titleTextLeadingVars }}
|
|
4819
|
-
>
|
|
4820
|
-
{item.title}
|
|
4821
|
-
</p>
|
|
4822
|
-
<div
|
|
4823
|
-
data-controls={isEditMode && hasSubtitle ? 'subtitleMarginTop' : undefined}
|
|
4824
|
-
className={isEditMode && hasSubtitle ? \`\${P}-control\` : undefined}
|
|
4825
|
-
style={{
|
|
4826
|
-
height: hasSubtitle ? scalingValue(subtitleMarginTop ?? 0, isEditor) : 0,
|
|
4827
|
-
width: controlWidthStyle,
|
|
4828
|
-
}}
|
|
4829
|
-
/>
|
|
4830
|
-
<p
|
|
4831
|
-
className={subtitleTextClassName}
|
|
4832
|
-
style={{ width: textBoxWidthStyle, ...subtitleFieldCss, ...subtitleTextLeadingVars }}
|
|
4833
|
-
>
|
|
4834
|
-
{item.subtitle}
|
|
4835
|
-
</p>
|
|
4851
|
+
</SplideSlide>
|
|
4852
|
+
);
|
|
4853
|
+
})}
|
|
4854
|
+
</Splide>
|
|
4836
4855
|
</>
|
|
4837
|
-
|
|
4838
|
-
|
|
4856
|
+
}
|
|
4857
|
+
</div>
|
|
4858
|
+
);
|
|
4859
|
+
|
|
4860
|
+
const typeABText = !isTypeC ? (
|
|
4861
|
+
<>
|
|
4862
|
+
<div
|
|
4863
|
+
data-controls={isEditMode && hasTitle ? 'titleMarginTop' : undefined}
|
|
4864
|
+
className={isEditMode && hasTitle ? \`\${P}-control\` : undefined}
|
|
4865
|
+
style={{
|
|
4866
|
+
height: hasTitle ? scalingValue(titleMarginTop ?? 0, isEditor) : 0,
|
|
4867
|
+
width: controlWidthStyle,
|
|
4868
|
+
}}
|
|
4869
|
+
/>
|
|
4870
|
+
<p
|
|
4871
|
+
className={titleTextClassName}
|
|
4872
|
+
style={{ width: textBoxWidthStyle, ...titleFieldCss, ...titleTextLeadingVars }}
|
|
4873
|
+
>
|
|
4874
|
+
{item.title}
|
|
4875
|
+
</p>
|
|
4876
|
+
<div
|
|
4877
|
+
data-controls={isEditMode && hasSubtitle ? 'subtitleMarginTop' : undefined}
|
|
4878
|
+
className={isEditMode && hasSubtitle ? \`\${P}-control\` : undefined}
|
|
4879
|
+
style={{
|
|
4880
|
+
height: hasSubtitle ? scalingValue(subtitleMarginTop ?? 0, isEditor) : 0,
|
|
4881
|
+
width: controlWidthStyle,
|
|
4882
|
+
}}
|
|
4883
|
+
/>
|
|
4884
|
+
<p
|
|
4885
|
+
className={subtitleTextClassName}
|
|
4886
|
+
style={{ width: textBoxWidthStyle, ...subtitleFieldCss, ...subtitleTextLeadingVars }}
|
|
4887
|
+
>
|
|
4888
|
+
{item.subtitle}
|
|
4889
|
+
</p>
|
|
4890
|
+
</>
|
|
4891
|
+
) : null;
|
|
4892
|
+
|
|
4893
|
+
return (
|
|
4894
|
+
<div
|
|
4895
|
+
key={index}
|
|
4896
|
+
className={\`\${P}-item\`.trim()}
|
|
4897
|
+
>
|
|
4898
|
+
<div
|
|
4899
|
+
className={\`\${isEditMode
|
|
4900
|
+
? \`\${P}-item-inner\`
|
|
4901
|
+
: \`\${P}-item-inner-hidden\`}\${shouldAlignEntries && isLastRow ? \` \${P}-item-inner-last-row\` : ''}\`.trim()}
|
|
4902
|
+
style={{ width: (textBoxWidth ?? 0) > 100
|
|
4903
|
+
? \`calc(\${scalingValue(size ?? 0, isEditor)} * (\${textBoxWidth} / 100))\`
|
|
4904
|
+
: scalingValue(size ?? 0, isEditor) }}
|
|
4905
|
+
>
|
|
4906
|
+
{shouldAlignEntries ? (
|
|
4907
|
+
<>
|
|
4908
|
+
{alignedTextRows}
|
|
4909
|
+
<a href={itemLink} target="_blank" className={\`\${P}-item-image-link\`}>
|
|
4910
|
+
{imageContent}
|
|
4911
|
+
</a>
|
|
4912
|
+
</>
|
|
4913
|
+
) : (
|
|
4914
|
+
<a href={itemLink} target="_blank" className={\`\${P}-item-image-link\`}>
|
|
4915
|
+
{typeCTextBlock}
|
|
4916
|
+
{imageContent}
|
|
4917
|
+
{typeABText}
|
|
4918
|
+
</a>
|
|
4919
|
+
)}
|
|
4839
4920
|
</div>
|
|
4840
4921
|
</div>
|
|
4841
4922
|
);
|
|
4842
4923
|
})}
|
|
4843
4924
|
</div>
|
|
4844
4925
|
</div>
|
|
4845
|
-
{(!isEditor || isPreviewMode) && lightboxOpen && typeof document !== 'undefined' && lightbox === '
|
|
4926
|
+
{(!isEditor || isPreviewMode) && lightboxOpen && typeof document !== 'undefined' && lightbox === 'on' &&
|
|
4846
4927
|
createPortal(
|
|
4847
4928
|
<div style={lightboxPortalStyle} data-selection="none">
|
|
4848
4929
|
<Lightbox
|
|
@@ -4850,7 +4931,7 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
4850
4931
|
index={lightboxIndex}
|
|
4851
4932
|
imageDisplay={resolveLightboxImageDisplay(lightboxImageDisplay)}
|
|
4852
4933
|
originRect={lightboxOriginRect}
|
|
4853
|
-
reverseClose={slider === '
|
|
4934
|
+
reverseClose={slider === 'off'}
|
|
4854
4935
|
onClose={() => setLightboxOpen(false)}
|
|
4855
4936
|
onPrev={() => setLightboxIndex((prev) => (prev - 1 + lightboxImages.length) % lightboxImages.length)}
|
|
4856
4937
|
onNext={() => setLightboxIndex((prev) => (prev + 1) % lightboxImages.length)}
|
|
@@ -4873,24 +4954,24 @@ type GridLayoutConfig = {
|
|
|
4873
4954
|
};
|
|
4874
4955
|
|
|
4875
4956
|
type GridSettings = {
|
|
4876
|
-
type: '
|
|
4957
|
+
type: 'a' | 'b' | 'c';
|
|
4877
4958
|
gridLayout: GridLayoutConfig;
|
|
4878
4959
|
textBoxWidth: number;
|
|
4879
4960
|
verticalGap: number;
|
|
4880
4961
|
entriesCount: number;
|
|
4881
|
-
lightbox: '
|
|
4962
|
+
lightbox: 'on' | 'off';
|
|
4882
4963
|
imageDisplay: {
|
|
4883
|
-
display: '
|
|
4964
|
+
display: 'fit' | 'cover';
|
|
4884
4965
|
ratioValue: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
|
|
4885
4966
|
reversed: boolean;
|
|
4886
4967
|
};
|
|
4887
|
-
lightboxImageDisplay?: '
|
|
4888
|
-
slider: '
|
|
4968
|
+
lightboxImageDisplay?: 'fit' | 'cover' | { display?: 'fit' | 'cover' };
|
|
4969
|
+
slider: 'on' | 'off';
|
|
4889
4970
|
sliderTiming: number;
|
|
4890
|
-
direction: '
|
|
4891
|
-
transition: '
|
|
4892
|
-
showText: '
|
|
4893
|
-
alignEntries: '
|
|
4971
|
+
direction: 'horizontal' | 'vertical' | 'random',
|
|
4972
|
+
transition: 'fade' | 'slide',
|
|
4973
|
+
showText: 'always' | 'on hover';
|
|
4974
|
+
alignEntries: 'on' | 'off';
|
|
4894
4975
|
titleMarginTop: number;
|
|
4895
4976
|
subtitleMarginTop: number;
|
|
4896
4977
|
titleColor: string;
|
|
@@ -4931,11 +5012,11 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
|
|
|
4931
5012
|
};
|
|
4932
5013
|
|
|
4933
5014
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
4934
|
-
`,Hr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},cd=["titleColor","subtitleColor","lightboxCounterColor"],dd={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"BIRD'S EYE VIEW OVER THE OLD TOWN",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:"Grid-1.png",objectFit:"cover"}],link:""},{title:"DOORS OF MATERA",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:"Grid-2.png",objectFit:"cover"}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:"Grid-3.png",objectFit:"cover"}],link:""},{title:"OLD CITY THROUGH THE CRACKS",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:"Grid-4.png",objectFit:"cover"}],link:""},{title:"PRIVATE STONE GARDENS",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:"Grid-5.png",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",name:"Grid-6.png",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",name:"Grid-7.png",objectFit:"cover"}],link:""},{title:"EXITING THE OLD TOWN",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",name:"Grid-8.png",objectFit:"cover"}],link:""},{title:"LAUNDRY UNDER THE SUN",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",name:"Grid-9.png",objectFit:"cover"}],link:""},{title:"CITY GATES VIEW",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",name:"Grid-10.png",objectFit:"cover"}],link:""},{title:"FORTIFICATIONS AROUND THE CITY",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",name:"Grid-11.png",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["Always","On hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["On","Off"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["On","Off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["Fit","Cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["On","Off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["Horizontal","Vertical","Random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["Fade","Slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Color",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Color",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Lightbox Counter Color",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Hr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...Hr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Hr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"On",imageDisplay:{display:"Cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"Fit",slider:"On",sliderTiming:3,direction:"Horizontal",transition:"Fade",showText:"Always",alignEntries:"On",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Affigere-Regular",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"C",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"C",gridLayout:{entryWidth:.1736,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:100,verticalGap:.0694,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:55e-5,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"Fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"Off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"type",value:"A"},then:{name:"properties.alignEntries.display.visible",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.alignEntries.display.visible",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap","showText"]},{type:"row",title:"",items:["alignEntries"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:[{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...cd],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},ud={element:od,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:dd,sourceCode:ld};function ir(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function pd(e){return String(e??"").trim().length>0}function to(e,t,n,r,i,a,s){const c=E.scalingValue(a,s),o=E.scalingValue(0,s),d=e===0,p=e===t-1&&!i;return{borderTopWidth:d&&n?c:o,borderBottomWidth:!p||r?c:o}}function md(e,t,n){const r=E.scalingValue(t,n),i=E.scalingValue(0,n);return{borderTopWidth:i,borderBottomWidth:e?r:i}}const no=10;function gd(e){return`
|
|
5015
|
+
`,zr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},vd=["titleColor","subtitleColor","lightboxCounterColor"],bd={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"bird's eye view over the old town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",objectFit:"cover"}],link:""},{title:"doors of matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",objectFit:"cover"}],link:""},{title:"cattedrale di santa maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",objectFit:"cover"}],link:""},{title:"old city through the cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",objectFit:"cover"}],link:""},{title:"private stone gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",objectFit:"cover"}],link:""},{title:"exiting the old town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",objectFit:"cover"}],link:""},{title:"laundry under the sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",objectFit:"cover"}],link:""},{title:"city gates view",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",objectFit:"cover"}],link:""},{title:"fortifications around the city",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Color",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Color",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Lightbox Counter Color",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Affigere-Regular",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"c",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"c",gridLayout:{entryWidth:.1736,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:100,verticalGap:.0694,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:55e-5,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignEntries.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.alignEntries.display.visible",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap","showText"]},{type:"row",title:"",items:["alignEntries"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:[{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...vd],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},xd={element:gd,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:bd,sourceCode:yd};function cr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cd(e){return String(e??"").trim().length>0}function so(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),i=e.clientY-r.top>r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,i)}function lo(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),i=e.clientY<r.top+r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,i)}function co(e,t,n,r,i,a,s){const c=w.scalingValue(a,s),o=w.scalingValue(0,s),d=e===0,p=e===t-1&&!i;return{borderTopWidth:d&&n?c:o,borderBottomWidth:!p||r?c:o}}function Sd(e,t,n){const r=w.scalingValue(t,n),i=w.scalingValue(0,n);return{borderTopWidth:i,borderBottomWidth:e?r:i}}const uo=10;function $d(e){return`
|
|
4935
5016
|
.${e}-wrapper {
|
|
4936
5017
|
display: grid;
|
|
4937
5018
|
align-items: start;
|
|
4938
|
-
min-height: ${
|
|
5019
|
+
min-height: ${cr(48)};
|
|
4939
5020
|
position: relative;
|
|
4940
5021
|
overflow: visible;
|
|
4941
5022
|
box-sizing: border-box;
|
|
@@ -5057,7 +5138,7 @@ a.${e}-list-item {
|
|
|
5057
5138
|
flex-shrink: 0;
|
|
5058
5139
|
overflow: visible;
|
|
5059
5140
|
box-sizing: border-box;
|
|
5060
|
-
min-width: ${
|
|
5141
|
+
min-width: ${cr(50)};
|
|
5061
5142
|
position: relative;
|
|
5062
5143
|
display: flex;
|
|
5063
5144
|
align-items: flex-start;
|
|
@@ -5065,7 +5146,7 @@ a.${e}-list-item {
|
|
|
5065
5146
|
|
|
5066
5147
|
.${e}-list-col-last {
|
|
5067
5148
|
flex: 1 1 auto;
|
|
5068
|
-
min-width: ${
|
|
5149
|
+
min-width: ${cr(50)};
|
|
5069
5150
|
}
|
|
5070
5151
|
|
|
5071
5152
|
.${e}-list-col-title {
|
|
@@ -5176,15 +5257,19 @@ a.${e}-list-item {
|
|
|
5176
5257
|
|
|
5177
5258
|
.${e}-wrapper.${e}-entry-hover-default .${e}-list-item-has-link,
|
|
5178
5259
|
.${e}-wrapper.${e}-entry-hover-blinds .${e}-list-item-has-link,
|
|
5260
|
+
.${e}-wrapper.${e}-entry-hover-reveal .${e}-list-item-has-link,
|
|
5179
5261
|
.${e}-wrapper.${e}-entry-hover-default .${e}-cut-item,
|
|
5180
|
-
.${e}-wrapper.${e}-entry-hover-blinds .${e}-cut-item
|
|
5262
|
+
.${e}-wrapper.${e}-entry-hover-blinds .${e}-cut-item,
|
|
5263
|
+
.${e}-wrapper.${e}-entry-hover-reveal .${e}-cut-item {
|
|
5181
5264
|
transition: background-color 250ms, border-color 250ms;
|
|
5182
5265
|
}
|
|
5183
5266
|
|
|
5184
5267
|
.${e}-wrapper.${e}-entry-hover-default .${e}-list-item-has-link .${e}-list-col-title,
|
|
5185
5268
|
.${e}-wrapper.${e}-entry-hover-blinds .${e}-list-item-has-link .${e}-list-col-title,
|
|
5269
|
+
.${e}-wrapper.${e}-entry-hover-reveal .${e}-list-item-has-link .${e}-list-col-title,
|
|
5186
5270
|
.${e}-wrapper.${e}-entry-hover-default .${e}-cut-label,
|
|
5187
|
-
.${e}-wrapper.${e}-entry-hover-blinds .${e}-cut-label
|
|
5271
|
+
.${e}-wrapper.${e}-entry-hover-blinds .${e}-cut-label,
|
|
5272
|
+
.${e}-wrapper.${e}-entry-hover-reveal .${e}-cut-label {
|
|
5188
5273
|
transition: color 250ms;
|
|
5189
5274
|
}
|
|
5190
5275
|
|
|
@@ -5206,21 +5291,31 @@ a.${e}-list-item {
|
|
|
5206
5291
|
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-blinds .${e}-list-item:has(+ .${e}-cut-item:hover),
|
|
5207
5292
|
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-blinds.${e}-state-hover .${e}-list-item-has-link,
|
|
5208
5293
|
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-blinds .${e}-cut-item:hover,
|
|
5209
|
-
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-blinds.${e}-state-hover .${e}-cut-item
|
|
5294
|
+
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-blinds.${e}-state-hover .${e}-cut-item,
|
|
5295
|
+
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-reveal .${e}-list-item-has-link:hover,
|
|
5296
|
+
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-reveal .${e}-list-item:has(+ .${e}-list-item-has-link:hover),
|
|
5297
|
+
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-reveal .${e}-list-item:has(+ .${e}-cut-item:hover),
|
|
5298
|
+
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-reveal.${e}-state-hover .${e}-list-item-has-link,
|
|
5299
|
+
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-reveal .${e}-cut-item:hover,
|
|
5300
|
+
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-reveal.${e}-state-hover .${e}-cut-item {
|
|
5210
5301
|
border-bottom-color: var(--${e}-divider-hover-color);
|
|
5211
5302
|
}
|
|
5212
5303
|
|
|
5213
5304
|
.${e}-wrapper.${e}-divider-top:not(.${e}-divider-bottom).${e}-entry-hover-default .${e}-list-item-has-link:hover:first-child,
|
|
5214
5305
|
.${e}-wrapper.${e}-divider-top:not(.${e}-divider-bottom).${e}-entry-hover-default.${e}-state-hover .${e}-list-item-has-link:first-child,
|
|
5215
5306
|
.${e}-wrapper.${e}-divider-top:not(.${e}-divider-bottom).${e}-entry-hover-blinds .${e}-list-item-has-link:hover:first-child,
|
|
5216
|
-
.${e}-wrapper.${e}-divider-top:not(.${e}-divider-bottom).${e}-entry-hover-blinds.${e}-state-hover .${e}-list-item-has-link:first-child
|
|
5307
|
+
.${e}-wrapper.${e}-divider-top:not(.${e}-divider-bottom).${e}-entry-hover-blinds.${e}-state-hover .${e}-list-item-has-link:first-child,
|
|
5308
|
+
.${e}-wrapper.${e}-divider-top:not(.${e}-divider-bottom).${e}-entry-hover-reveal .${e}-list-item-has-link:hover:first-child,
|
|
5309
|
+
.${e}-wrapper.${e}-divider-top:not(.${e}-divider-bottom).${e}-entry-hover-reveal.${e}-state-hover .${e}-list-item-has-link:first-child {
|
|
5217
5310
|
border-top-color: var(--${e}-divider-hover-color);
|
|
5218
5311
|
}
|
|
5219
5312
|
|
|
5220
5313
|
.${e}-wrapper.${e}-divider-top.${e}-divider-bottom.${e}-entry-hover-default .${e}-list-item-has-link:hover:first-child,
|
|
5221
5314
|
.${e}-wrapper.${e}-divider-top.${e}-divider-bottom.${e}-entry-hover-default.${e}-state-hover .${e}-list-item-has-link:first-child,
|
|
5222
5315
|
.${e}-wrapper.${e}-divider-top.${e}-divider-bottom.${e}-entry-hover-blinds .${e}-list-item-has-link:hover:first-child,
|
|
5223
|
-
.${e}-wrapper.${e}-divider-top.${e}-divider-bottom.${e}-entry-hover-blinds.${e}-state-hover .${e}-list-item-has-link:first-child
|
|
5316
|
+
.${e}-wrapper.${e}-divider-top.${e}-divider-bottom.${e}-entry-hover-blinds.${e}-state-hover .${e}-list-item-has-link:first-child,
|
|
5317
|
+
.${e}-wrapper.${e}-divider-top.${e}-divider-bottom.${e}-entry-hover-reveal .${e}-list-item-has-link:hover:first-child,
|
|
5318
|
+
.${e}-wrapper.${e}-divider-top.${e}-divider-bottom.${e}-entry-hover-reveal.${e}-state-hover .${e}-list-item-has-link:first-child {
|
|
5224
5319
|
border-top-color: var(--${e}-divider-hover-color);
|
|
5225
5320
|
}
|
|
5226
5321
|
|
|
@@ -5231,7 +5326,11 @@ a.${e}-list-item {
|
|
|
5231
5326
|
.${e}-wrapper.${e}-entry-hover-blinds .${e}-list-item-has-link:hover .${e}-list-col-title,
|
|
5232
5327
|
.${e}-wrapper.${e}-entry-hover-blinds.${e}-state-hover .${e}-list-item-has-link .${e}-list-col-title,
|
|
5233
5328
|
.${e}-wrapper.${e}-entry-hover-blinds .${e}-cut-item:hover .${e}-cut-label,
|
|
5234
|
-
.${e}-wrapper.${e}-entry-hover-blinds.${e}-state-hover .${e}-cut-item .${e}-cut-label
|
|
5329
|
+
.${e}-wrapper.${e}-entry-hover-blinds.${e}-state-hover .${e}-cut-item .${e}-cut-label,
|
|
5330
|
+
.${e}-wrapper.${e}-entry-hover-reveal .${e}-list-item-has-link:hover .${e}-list-col-title,
|
|
5331
|
+
.${e}-wrapper.${e}-entry-hover-reveal.${e}-state-hover .${e}-list-item-has-link .${e}-list-col-title,
|
|
5332
|
+
.${e}-wrapper.${e}-entry-hover-reveal .${e}-cut-item:hover .${e}-cut-label,
|
|
5333
|
+
.${e}-wrapper.${e}-entry-hover-reveal.${e}-state-hover .${e}-cut-item .${e}-cut-label {
|
|
5235
5334
|
color: var(--${e}-text-hover-color);
|
|
5236
5335
|
}
|
|
5237
5336
|
|
|
@@ -5243,7 +5342,8 @@ a.${e}-list-item {
|
|
|
5243
5342
|
background: var(--${e}-background-hover-color);
|
|
5244
5343
|
transform: scaleY(0);
|
|
5245
5344
|
transform-origin: center center;
|
|
5246
|
-
|
|
5345
|
+
opacity: 0;
|
|
5346
|
+
transition: opacity 150ms, transform 0s 250ms;
|
|
5247
5347
|
z-index: 0;
|
|
5248
5348
|
pointer-events: none;
|
|
5249
5349
|
}
|
|
@@ -5259,6 +5359,47 @@ a.${e}-list-item {
|
|
|
5259
5359
|
.${e}-wrapper.${e}-entry-hover-blinds .${e}-cut-item:hover::before,
|
|
5260
5360
|
.${e}-wrapper.${e}-entry-hover-blinds.${e}-state-hover .${e}-cut-item::before {
|
|
5261
5361
|
transform: scaleY(1);
|
|
5362
|
+
opacity: 1;
|
|
5363
|
+
transition: transform 250ms, opacity 250ms;
|
|
5364
|
+
}
|
|
5365
|
+
|
|
5366
|
+
.${e}-wrapper.${e}-entry-hover-reveal .${e}-list-item-has-link::before,
|
|
5367
|
+
.${e}-wrapper.${e}-entry-hover-reveal .${e}-cut-item::before {
|
|
5368
|
+
content: '';
|
|
5369
|
+
position: absolute;
|
|
5370
|
+
inset: 0;
|
|
5371
|
+
background: var(--${e}-background-hover-color);
|
|
5372
|
+
transform: scaleY(0);
|
|
5373
|
+
transform-origin: bottom center;
|
|
5374
|
+
transition: transform 120ms;
|
|
5375
|
+
z-index: 0;
|
|
5376
|
+
pointer-events: none;
|
|
5377
|
+
}
|
|
5378
|
+
|
|
5379
|
+
.${e}-wrapper.${e}-entry-hover-reveal .${e}-list-col,
|
|
5380
|
+
.${e}-wrapper.${e}-entry-hover-reveal .${e}-cut-label {
|
|
5381
|
+
position: relative;
|
|
5382
|
+
z-index: 1;
|
|
5383
|
+
}
|
|
5384
|
+
|
|
5385
|
+
.${e}-wrapper.${e}-entry-hover-reveal .${e}-list-item-has-link:hover::before,
|
|
5386
|
+
.${e}-wrapper.${e}-entry-hover-reveal.${e}-state-hover .${e}-list-item-has-link::before,
|
|
5387
|
+
.${e}-wrapper.${e}-entry-hover-reveal .${e}-cut-item:hover::before,
|
|
5388
|
+
.${e}-wrapper.${e}-entry-hover-reveal.${e}-state-hover .${e}-cut-item::before {
|
|
5389
|
+
transform: scaleY(1);
|
|
5390
|
+
transform-origin: top center;
|
|
5391
|
+
}
|
|
5392
|
+
|
|
5393
|
+
.${e}-wrapper.${e}-entry-hover-reveal .${e}-list-item-has-link.${e}-reveal-from-bottom::before,
|
|
5394
|
+
.${e}-wrapper.${e}-entry-hover-reveal .${e}-cut-item.${e}-reveal-from-bottom::before {
|
|
5395
|
+
transform-origin: top center;
|
|
5396
|
+
}
|
|
5397
|
+
|
|
5398
|
+
.${e}-wrapper.${e}-entry-hover-reveal .${e}-list-item-has-link.${e}-reveal-from-bottom:hover::before,
|
|
5399
|
+
.${e}-wrapper.${e}-entry-hover-reveal .${e}-list-item-has-link.${e}-reveal-from-bottom.${e}-state-hover::before,
|
|
5400
|
+
.${e}-wrapper.${e}-entry-hover-reveal .${e}-cut-item.${e}-reveal-from-bottom:hover::before,
|
|
5401
|
+
.${e}-wrapper.${e}-entry-hover-reveal .${e}-cut-item.${e}-reveal-from-bottom.${e}-state-hover::before {
|
|
5402
|
+
transform-origin: bottom center;
|
|
5262
5403
|
}
|
|
5263
5404
|
|
|
5264
5405
|
.${e}-cut-item {
|
|
@@ -5302,7 +5443,7 @@ a.${e}-list-item {
|
|
|
5302
5443
|
overflow-wrap: anywhere;
|
|
5303
5444
|
word-break: break-word;
|
|
5304
5445
|
}
|
|
5305
|
-
`}const Ht=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],xi=["AColumn","BColumn","CColumn","DColumn","EColumn"],Lt="cutLabel",Ci=[...xi,Lt],Lr=["A","B","C","D","E"];function Jo(e){return`${e}ColumnVerticalAlign`}const Zr=["Top","Center","Bottom"];function Si(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const r=t.slice(-1).toUpperCase();return Lr.includes(r)?`Baseline ${r}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function hd(e){const t=Si(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function fd(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Lr.includes(n)?n:null}function Qo(e,t,n){const r=fd(e);return r?r===t?!1:hd(n[Jo(r)]):!0}function Rn(e){const t=Si(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Lr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function yd(e,t,n){if(ea(e,t,n))return Rn(e);const r=Rn(e);return r.kind==="baseline"?{kind:"top"}:r}function vd(e){const t=Rn(e);return t.kind==="baseline"?{kind:"top"}:t}function ea(e,t,n){return Qo(e,n,t)?Rn(e).kind==="baseline":!1}function bd(e){const t={};let n=!1;for(const r of Lr){const i=Jo(r),a=e[i];if(e.type==="B"){const s=String(a??"Top").trim();s!=="Top"&&s!=="Center"&&s!=="Bottom"&&(t[i]="Top",n=!0);continue}Qo(a,r,e)||(t[i]="Top",n=!0)}return n?t:null}function xd(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Cd(e){const t=Rn(e).kind;return t==="baseline"?"center":t}function Sd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function ro(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function wd(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:i}=n.getBoundingClientRect(),a=i-r;return n.remove(),a}function Or(e,t,n,r){const i=e.titleEl;if(!i)return 0;const a=i.closest(`.${n}`);if(!a)return 0;const s=wd(i,r);if(e.kind==="baseline")return i.getBoundingClientRect().top-t+s;const c=a.getBoundingClientRect(),o=i.getBoundingClientRect().height;let d=0;return e.kind==="center"?d=(c.height-o)/2:e.kind==="bottom"&&(d=c.height-o),c.top-t+d+s}function $d(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(i=>{const a=i.querySelector(`.${n}`);a&&(a.style.minHeight=`${r}px`,a.style.height=`${r}px`)}),e.offsetHeight,r)}function Td(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Ld={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Te(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Ed={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Pd(e){return[Te(e,"textFontFamily"),Te(e,"textFontSettings"),{type:"row",items:[Te(e,"textFontSize"),Te(e,"textLineHeight"),Te(e,"textLetterSpacing"),Te(e,"textWordSpacing")]},Te(e,"textTextAlign"),Te(e,"textTextAppearance"),`${e}VerticalAlign`]}function _d(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Ci.map(e=>[Ed[e],Pd(e)]))}}function mr(e,t){const n=r=>{const i=Te(t,r);return e[i]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===Lt?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function io(e,t){var r,i;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((i=e.textFontSettings)==null?void 0:i.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return ht(nt(n,t))}function oo(e,t,n,r){const i=mr(e,t),a=i.textFontSize??.01,s=i.textLineHeight;return s!==void 0&&s<a?`${n} ${r}`:n}function ao(e,t,n,r){const i=mr(e,t),a=i.textFontSize??.01,s=i.textLineHeight;return s===void 0||s>=a?{}:{[`--${n}-title-leading-gap`]:E.scalingValue((a-s)/2,r)}}const lt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],un=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],pn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],mn=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Ad={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Rd=["hover","focus","filled","success","error"],so=.004,rn=.004,Br=rn,lo=12,wi=50,In=1440,Wn=wi/In;function ta(e){const t=typeof e=="number"&&e>0?e:In;return wi/t}function Id(e,t){const n={position:"absolute",width:lo,height:lo,pointerEvents:"auto"};return t==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:t==="center-x"?{...n,left:"50%",top:`var(--${e}-first-entry-handle-top, 50%)`,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function Ct({P:e,className:t,areaStyle:n,hitPlacement:r,...i}){return l.jsx("div",{className:t,style:{...n,pointerEvents:"none"},...i,children:l.jsx("div",{style:Id(e,r)})})}function Wd(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const i=parseFloat(n);if(Number.isFinite(i)&&i>0)return i}const r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const i=parseFloat(r);if(Number.isFinite(i)&&i>0)return i}t=t.parentElement}return In}const na={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function or(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function kd(e,t=1){const n=t/e;return Object.fromEntries(lt.map(r=>[r,n]))}function Fd(){return Object.fromEntries([...un.map(e=>[e,0]),...pn.map(e=>[e,0])])}function Md(){return Object.fromEntries(mn.map(e=>[e,0]))}function Jn(e){return Object.fromEntries(lt.map(t=>[t,typeof e[t]=="number"?e[t]:na[t]]))}function ra(e,t,n){const r=e-Wn,i=t+n;if(i<=0||i<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const a=r/i;return{paddingLeft:t*a,paddingRight:n*a}}function ar(e,t,n){const r=$i(e,t,n);if(e<=0)return[];const i=r.slice(0,e-1).reduce((a,s)=>a+s,0);return[...r.slice(0,e-1),Math.max(0,t-i)]}function Nd(e,t,n){const r={};for(let i=0;i<e;i+=1){const a=un[i],s=pn[i],c=typeof n[a]=="number"?n[a]:0,o=typeof n[s]=="number"?n[s]:0,d=ra(t[i]??0,c,o);d.paddingLeft!==c&&(r[a]=d.paddingLeft),d.paddingRight!==o&&(r[s]=d.paddingRight)}return r}function $i(e,t,n){if(e<=0)return[];const r=lt.slice(0,e).map(d=>n[d]);if(e===1)return r;const i=r.slice(0,e-1),s=i.reduce((d,p)=>d+p,0)+Wn;if(t>=s)return r;const c=[...i];let o=s-t;for(let d=c.length-1;d>=0&&o>0;d-=1){const p=c[d]-Wn;if(p<=0)continue;const T=Math.min(o,p);c[d]-=T,o-=T}return[...c,r[e-1]]}function Hd(e,t,n){if(e<=1)return{};const r=$i(e,t,n),i={};for(let a=0;a<e-1;a+=1){const s=lt[a];r[a]!==n[s]&&(i[s]=r[a])}return i}function co(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Ht]}function Od(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function Bd(e,t,n,r){const i=Math.min(r,e.length,lt.length),a={};for(let s=0;s<i;s+=1){const c=e[s],o=t.indexOf(c);if(o===-1)continue;const d=lt[o],p=un[o],T=pn[o],S=mn[o],v=lt[s],g=un[s],m=pn[s],R=mn[s],b=n[d],x=n[p],y=n[T],O=n[S];typeof b=="number"&&(a[v]=b),typeof x=="number"&&(a[g]=x),typeof y=="number"&&(a[m]=y),typeof O=="number"&&(a[R]=O)}return a}function Vd(e,t,n){const r=bd(e);r&&(e={...e,...r});const i=ta(n==null?void 0:n.designWidth),a=e.columns,s=t.columns,c=or(e),o=or(t),d=e.type==="B"||e.type===void 0&&t.type==="B",p=typeof a=="number"?a:typeof s=="number"?s:Ht.length,T=y=>{if(d)return y;const O=Jn({...t,...y}),P=or(y),A=ar(p,P,O),L=Nd(p,A,{...t,...y});return Object.keys(L).length===0?y:{...y,...L}};if(typeof a=="number"&&a!==s){const y={...e,...kd(a,c),...Fd()};if(d)for(const O of mn)typeof t[O]=="number"&&(y[O]=t[O]);else Object.assign(y,Md());return y}const S=co(e),v=co(t);if(!Od(S,v))return T({...e,...Bd(S,v,t,p)});if(c<o&&typeof p=="number"&&!d){const y=Jn({...t,...e});return T({...e,...Hd(p,c,y)})}if(d){const y=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,O=Math.max(0,(c-i)/2);return y>O?{...e,textPaddingLR:O}:e}const g=Jn({...t,...e}),m=ar(p,o,Jn(t)),b=ar(p,c,g).some((y,O)=>y<(m[O]??y)),x=lt.some(y=>{const O=e[y],P=t[y];return typeof O=="number"&&typeof P=="number"&&O!==P});return b||x?T(e):e}function Dd(e,t,n,r){const i=t.slice(0,e).reduce((s,c)=>s+c,0),a=n.slice(e+1,t.length-1).reduce((s,c)=>s+c,0);return Math.max(Wn,r-i-a-Wn)}function zd(e,t){return Math.random()*(t-e)+e}function jd(e){return Object.fromEntries(lt.map(t=>[t,typeof e[t]=="number"?e[t]:na[t]]))}function Vr(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function Kd(e,t,n,r,i,a){return e.slice(0,t).map((s,c)=>{const o=un[c],d=pn[c],p=mn[c];return{key:s,textPrefix:Ld[s],widthKey:lt[c],width:n[lt[c]],paddingLeftKey:o,paddingRightKey:d,paddingBottomKey:p,paddingLeft:r[o],paddingRight:i[d],paddingBottom:a[p]}})}function Ud({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:a,layoutId:s,onUpdateSettings:c}){const{prefix:o}=E.useScopedStyles(),d=!!i,{columns:p,type:T,wrapperWidth:S,entriesCount:v,cellMinHeight:g,dividerWidth:m,showVisibility:R,cut:b,showCut:x,cutCellMinHeight:y,cutLabel:O,imageSize:P,imageOnHover:A,entryHoverEffect:L,entryHoverShowOption:I,rowPaddingTop:_,rowPaddingBottom:N,rowPaddingTopB:w,columnsOrder:B,textPaddingLR:V,textColor:q,backgroundColor:Y,dividerColor:$,textHoverColor:W,backgroundHoverColor:H,dividerHoverColor:M}=e,[k,D]=u.useState(void 0),[Q,re]=u.useState(null),ie=A==="On"&&(!n||r),ce=(b??0)>0,C=T==="B",oe=u.useRef(null),Pe=u.useRef(null),[ue,ye]=u.useState(null),[Re,ne]=u.useState(In),h=ta(Re),f=Math.max(0,((S??0)-h)/2),F=Math.min(V??0,f),z=Math.max(F,rn),G=((S??0)+h)/2;u.useLayoutEffect(()=>{if(!n){ne(In);return}const J=()=>{ne(Wd(oe.current))};J();const ae=oe.current;if(!ae)return;const se=new ResizeObserver(J);se.observe(ae);let xe=ae;for(;xe&&!xe.style.getPropertyValue("--cntrl-article-width");)xe=xe.parentElement;return xe&&se.observe(xe),()=>se.disconnect()},[n,s]),u.useEffect(()=>{D(void 0)},[b,x,t,v]),u.useEffect(()=>{n&&!r&&D(void 0)},[n,r]);const ee=E.buildColorVars(o,{textColor:q,backgroundColor:Y,dividerColor:$,textHoverColor:W,backgroundHoverColor:H,dividerHoverColor:M},Ad,Rd),te=a&&a!=="default"?`${o}-state-${a}`:"",pe=`${!n||r?L==="Default"?`${o}-entry-hover-default`:L==="Blinds"?`${o}-entry-hover-blinds`:"":""} ${te}`.trim(),Ce=(R==null?void 0:R[0])??!1,he=(R==null?void 0:R[1])??!1,fe=u.useRef(e),K=u.useRef(s);u.useEffect(()=>{if(!c||!n){fe.current=e,K.current=s;return}if(K.current!==s){fe.current=e,K.current=s;return}const J=fe.current;if(!(J!==e))return;const se=Vd(e,J,{designWidth:Re});fe.current=e,se!==e&&c(se)},[e,c,n,s,Re]);const U=u.useMemo(()=>jd(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),j=u.useMemo(()=>Vr(e,un),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),de=u.useMemo(()=>Vr(e,pn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Le=u.useMemo(()=>Vr(e,mn),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Me=u.useMemo(()=>Array.isArray(B)&&B.length>0?B:[...Ht],[B]),Fe=u.useMemo(()=>Kd(Me,p,U,j,de,Le),[Me,p,U,j,de,Le]),Ie=or(e),qe=u.useMemo(()=>lt.slice(0,p).map(J=>U[J]),[p,U]),$e=u.useMemo(()=>$i(p,Ie,U),[p,Ie,U]),Ne=u.useMemo(()=>ar(p,Ie,U),[p,Ie,U]),je=u.useMemo(()=>Fe.map((J,ae)=>ra(Ne[ae]??0,J.paddingLeft,J.paddingRight)),[Fe,Ne]),We=u.useMemo(()=>{const J=v===0?1/0:v;return(t??[]).slice(0,J).map((se,xe)=>({id:xe,cells:Object.fromEntries(Ht.map(He=>[He,se[He]??""])),image:se.image,link:se.link}))},[t,v]),Ge=ce?k??b:We.length,Ye=u.useMemo(()=>ce?We.slice(0,Ge):We,[We,ce,Ge]),bt=ce&&Ge<We.length,Zt=Ye.length>1||bt,gt=[Ce?`${o}-divider-top`:"",he||Zt?`${o}-divider-bottom`:""].filter(Boolean).join(" "),_t=!n||r,At=()=>{if(!_t)return;const J=k??b;if(!x){D(We.length);return}D(Math.min(J+x,We.length))},Se=J=>E.scalingValue(J,n??!1),dt=C?w??0:_??0,rt=N??0,Xe=g??0,Rt=dt+Xe/2,vn=Math.max(rt,Br),Jt=to(0,Ye.length,Ce,he,bt,m??0,n??!1).borderTopWidth,Qt=ue!=null?`${ue}px`:`calc(${Jt} + ${Se(Rt)})`,Dt=C?"rowPaddingTopB":"rowPaddingTop",zt=Fe[0],ve=Fe[Fe.length-1],ze=je[0],Ve=je[je.length-1],Ke=zt&&ze?Math.max(ze.paddingLeft,rn):0,Qe=ve&&Ve?Math.max(Ve.paddingRight,rn):0,Er=Ie,Dn=J=>{const ae=oe.current;if(!ae)return{x:0,y:0};const se=ae.getBoundingClientRect();return{x:J.clientX-se.left+no,y:J.clientY-se.top+no}},bn=(J,ae)=>{if(!ie)return;const se=J.image;if(!(se!=null&&se.url)){re(null);return}const{x:xe,y:He}=Dn(ae),we=(P==null?void 0:P.min)??80,me=(P==null?void 0:P.max)??320,ke=(Q==null?void 0:Q.rowId)===J.id?Q.widthPx:zd(we,me);re({rowId:J.id,url:se.url,objectFit:se.objectFit??"cover",widthPx:ke,x:xe,y:He})},Pr=J=>{if(!ie||!Q)return;const{x:ae,y:se}=Dn(J);re(xe=>!xe||xe.x===ae&&xe.y===se?xe:{...xe,x:ae,y:se})},zn=()=>{re(null)},jn=()=>{ie&&re(null)};u.useLayoutEffect(()=>{if(!d||C){ye(null);return}const J=Pe.current,ae=J==null?void 0:J.parentElement;if(!J||!ae){ye(null);return}const se=()=>{const He=J.querySelector("[data-list-row]");if(!He){ye(null);return}const we=ae.getBoundingClientRect(),me=He.getBoundingClientRect();ye(me.top-we.top+me.height/2)};se();const xe=new ResizeObserver(se);return xe.observe(J),xe.observe(ae),()=>xe.disconnect()},[d,C,Ye,dt,rt,Xe,t,e,Fe,Ne,Re,m,Ce,he,bt]);const be=u.useMemo(()=>!C&&xi.some(J=>{const ae=J.charAt(0),se=e[`${J}VerticalAlign`];return ea(se,e,ae)}),[C,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);return u.useLayoutEffect(()=>{var we;const J=oe.current;if(!J)return;const ae=()=>{J.querySelectorAll("[data-list-col]").forEach(me=>{me.style.transform="";const ke=me.querySelector(`.${o}-list-col`);ke&&(ke.style.minHeight="",ke.style.height="");const De=me.querySelector(`.${o}-list-col-title`);De&&(De.style.transform="")})};if(C||!be){ae();return}const se=()=>{J.querySelectorAll("[data-list-row]").forEach(me=>{const ke=Array.from(me.querySelectorAll("[data-list-col]"));ke.forEach(_e=>{_e.style.transform="";const it=_e.querySelector(`.${o}-list-col`);it&&(it.style.minHeight="",it.style.height="");const Ze=_e.querySelector(`.${o}-list-col-title`);Ze&&(Ze.style.transform="")}),$d(me,ke,`${o}-list-col`),me.offsetHeight;const De=me.getBoundingClientRect().top,et=`${o}-baseline-probe`,Ue=new Map,ot=ke.map(_e=>{const it=_e.querySelector(`.${o}-list-col-title`),Ze={el:_e,titleEl:it,letter:_e.getAttribute("data-col-letter")??"",kind:_e.getAttribute("data-valign")??"top",anchor:_e.getAttribute("data-valign-anchor")};return Ue.set(Ze.letter,Ze),Ze}),xn=new Map,Kn=(_e,it)=>{const Ze=xn.get(_e.letter);if(Ze!==void 0)return Ze;const Un=_e.anchor?Ue.get(_e.anchor):void 0;if(_e.kind!=="baseline"||!Un||it.has(_e.letter)){const Li=Or(_e,De,`${o}-list-col`,et);return xn.set(_e.letter,Li),Li}it.add(_e.letter);const oa=Kn(Un,it);it.delete(_e.letter);const aa=Or(_e,De,`${o}-list-col`,et),sa=oa-aa;Td(_e.titleEl,sa);const Ti=Or(_e,De,`${o}-list-col`,et);return xn.set(_e.letter,Ti),Ti};ot.forEach(_e=>Kn(_e,new Set))})};se();const xe=new ResizeObserver(()=>se());xe.observe(J);let He=!1;return typeof document<"u"&&((we=document.fonts)!=null&&we.ready)&&document.fonts.ready.then(()=>{He||se()}),()=>{He=!0,xe.disconnect(),ae()}},[be,C,e,t,Re,Ye,Ne]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:gd(o)}}),l.jsx("div",{style:ee,children:l.jsxs("div",{ref:oe,className:`${o}-wrapper ${pe}${gt?` ${gt}`:""}${C?` ${o}-type-b`:""}`.trim(),style:{width:E.scalingValue(S??0,n),...!C&&d?{[`--${o}-first-entry-handle-top`]:Qt}:{}},onMouseMove:ie?Pr:void 0,onMouseLeave:ie?zn:void 0,children:[l.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ye.map((J,ae)=>{var we;const se=(((we=J.link)==null?void 0:we.length)??0)>0,xe=se&&r?"a":"div",He=to(ae,Ye.length,Ce,he,bt,m??0,n??!1);return l.jsxs(xe,{ref:ae===0?me=>{Pe.current=me}:void 0,className:`${o}-list-item${se||I==="Always"?` ${o}-list-item-has-link`:""}`,...se?{href:J.link,target:"_blank"}:{},style:He,onMouseEnter:ie?me=>bn(J,me):void 0,children:[dt>0&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:Se(dt)}}),l.jsxs("div",{className:`${o}-list-cols-row${C?"":` ${o}-list-cols-row-h`}${d&&ae===0&&C?` ${o}-list-cols-row-controls`:""}`,...C?{}:{"data-list-row":""},style:C?void 0:{minHeight:Se(Xe)},children:[Fe.map((me,ke)=>{const De=ke===Fe.length-1,et=je[ke],Ue=me.paddingBottom,ot=pd(J.cells[me.key]),xn=C&&ot&&Ue>0,Kn=C?{minHeight:Se(Xe)}:{width:Se(Ne[ke])},_e=C?{paddingLeft:Se(F),paddingRight:Se(F)}:{paddingLeft:Se(et.paddingLeft),paddingRight:Se(et.paddingRight)},it=me.textPrefix.charAt(0),Ze=C?vd(e[`${me.textPrefix}VerticalAlign`]):yd(e[`${me.textPrefix}VerticalAlign`],e,it),Un=C&&ot&&d&&ae===0;return l.jsxs("div",{className:C?`${o}-list-col-wrap`:void 0,...C?{}:{"data-list-col":"","data-col-letter":it,"data-valign":Ze.kind,...Ze.kind==="baseline"?{"data-valign-anchor":Ze.anchorLetter}:{}},children:[l.jsx("div",{className:`${o}-list-col${De?` ${o}-list-col-last`:""}`,style:{..._e,...Kn,...C?{justifyContent:ro(Ze.kind)}:{}},"data-test":me.width,children:l.jsx("span",{className:oo(e,me.textPrefix,`${o}-list-col-title`,`${o}-text-tight-leading`),style:{...io(mr(e,me.textPrefix),n),...ao(e,me.textPrefix,o,n),...C?{}:xd(Ze.kind)},children:J.cells[me.key]??null})}),xn&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:Se(Ue)}}),Un&&l.jsx(Ct,{P:o,"data-controls":me.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Se(Math.max(Ue,Br))}})]},me.key)}),d&&ae===0&&C&&l.jsxs(l.Fragment,{children:[l.jsx(Ct,{P:o,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(G),className:`${o}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:Se(z),height:"100%"}}),l.jsx(Ct,{P:o,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(G),className:`${o}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:Se(Math.max(z,Ie-z)),width:Se(z),height:"100%"}})]})]}),!C&&rt>0&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:Se(rt)}}),d&&ae===0&&!C&&l.jsx(Ct,{P:o,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Se(vn)}})]},J.id)}),d&&l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx(Ct,{P:o,"data-controls":Dt,"data-controls-static-handle":"",...C?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:C?"center":"left-y",areaStyle:{position:"absolute",top:Jt,left:0,width:"100%",height:Se(Math.max(dt,Br))}})},"row-padding-handles"),d&&!C&&zt&&ve&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(Ct,{P:o,"data-controls":zt.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ne[0]-((ze==null?void 0:ze.paddingRight)??0)),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:Se(Ke),height:"100%"}}),l.jsx(Ct,{P:o,"data-controls":ve.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ne[Fe.length-1]-((Ve==null?void 0:Ve.paddingLeft)??0)),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Se(Er-Qe),width:Se(Qe),height:"100%"}})]},"column-edge-padding-handles"),d&&!C&&Fe.slice(0,-1).map((J,ae)=>{const se=Fe[ae+1],xe=$e.slice(0,ae+1).reduce((De,et)=>De+et,0),He=je[ae],we=je[ae+1],me=Math.max(He.paddingRight,rn),ke=Math.max(we.paddingLeft,rn);return l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(Ct,{P:o,"data-controls":J.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ne[ae]-He.paddingLeft),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Se(xe-me),width:Se(me),height:"100%"}}),l.jsx(Ct,{P:o,"data-controls":se.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ne[ae+1]-we.paddingRight),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Se(xe),width:Se(ke),height:"100%"}})]},`${J.paddingRightKey}-padding`)}),d&&!C&&Fe.slice(0,-1).map((J,ae)=>{const se=Dd(ae,$e,qe,Ie),He=$e.slice(0,ae+1).reduce((we,me)=>we+me,0)-so/2;return l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx("div",{"data-controls":J.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(wi),"data-controls-max-fraction":String(se),"data-controls-variant":"column-width",className:`${o}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Se(He),width:Se(so),height:"calc(100%)",pointerEvents:"auto"}})},`${J.widthKey}-junction`)})]}),bt&&(()=>{const J=mr(e,Lt),ae=Cd(e.cutLabelVerticalAlign),se=J.textTextAlign==="justify"||C;return l.jsx("button",{type:"button",className:`${o}-cut-item`,style:{minHeight:Se(y??0),cursor:_t?"pointer":"default",...md(he,m??0,n??!1)},onClick:_t?At:void 0,onMouseEnter:ie?jn:void 0,children:l.jsx("div",{className:`${o}-list-cols-row`,style:{...C?{paddingLeft:Se(F),paddingRight:Se(F)}:{},justifyContent:Sd(J.textTextAlign),alignItems:ro(ae)},children:l.jsx("span",{className:oo(e,Lt,`${o}-cut-label`,`${o}-text-tight-leading`),style:{...io(J,n),...ao(e,Lt,o,n),...se?{width:"100%"}:{}},children:O})})})})(),ie&&Q&&l.jsx("img",{className:`${o}-hover-image`,src:Q.url,alt:"",style:{width:ir(Q.widthPx),objectFit:Q.objectFit,left:Q.x,top:Q.y}})]})})]})}const qd=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';
|
|
5446
|
+
`}const Vt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Li=["AColumn","BColumn","CColumn","DColumn","EColumn"],It="cutLabel",Ei=[...Li,It],Rr=["A","B","C","D","E"];function aa(e){return`${e}ColumnVerticalAlign`}const ri=["Top","Center","Bottom"];function Pi(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const r=t.slice(-1).toUpperCase();return Rr.includes(r)?`Baseline ${r}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function wd(e){const t=Pi(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Td(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Rr.includes(n)?n:null}function sa(e,t,n){const r=Td(e);return r?r===t?!1:wd(n[aa(r)]):!0}function Nn(e){const t=Pi(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Rr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Ld(e,t,n){if(la(e,t,n))return Nn(e);const r=Nn(e);return r.kind==="baseline"?{kind:"top"}:r}function Ed(e){const t=Nn(e);return t.kind==="baseline"?{kind:"top"}:t}function la(e,t,n){return sa(e,n,t)?Nn(e).kind==="baseline":!1}function Pd(e){const t={};let n=!1;for(const r of Rr){const i=aa(r),a=e[i];if(e.type==="b"){const s=String(a??"Top").trim();s!=="Top"&&s!=="Center"&&s!=="Bottom"&&(t[i]="Top",n=!0);continue}sa(a,r,e)||(t[i]="Top",n=!0)}return n?t:null}function _d(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Ad(e){const t=Nn(e).kind;return t==="baseline"?"center":t}function Rd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function po(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Id(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:i}=n.getBoundingClientRect(),a=i-r;return n.remove(),a}function Kr(e,t,n,r){const i=e.titleEl;if(!i)return 0;const a=i.closest(`.${n}`);if(!a)return 0;const s=Id(i,r);if(e.kind==="baseline")return i.getBoundingClientRect().top-t+s;const c=a.getBoundingClientRect(),o=i.getBoundingClientRect().height;let d=0;return e.kind==="center"?d=(c.height-o)/2:e.kind==="bottom"&&(d=c.height-o),c.top-t+d+s}function kd(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(i=>{const a=i.querySelector(`.${n}`);a&&(a.style.minHeight=`${r}px`,a.style.height=`${r}px`)}),r)}function Wd(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Md={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Se(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Fd={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Nd(e){return[Se(e,"textFontFamily"),Se(e,"textFontSettings"),{type:"row",items:[Se(e,"textFontSize"),Se(e,"textLineHeight"),Se(e,"textLetterSpacing"),Se(e,"textWordSpacing")]},Se(e,"textTextAlign"),Se(e,"textTextAppearance"),`${e}VerticalAlign`]}function Hd(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Ei.map(e=>[Fd[e],Nd(e)]))}}function vr(e,t){const n=r=>{const i=Se(t,r);return e[i]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===It?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function mo(e,t){var r,i;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((i=e.textFontSettings)==null?void 0:i.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return Ct(nt(n,t))}function go(e,t,n,r){const i=vr(e,t),a=i.textFontSize??.01,s=i.textLineHeight;return s!==void 0&&s<a?`${n} ${r}`:n}function ho(e,t,n,r){const i=vr(e,t),a=i.textFontSize??.01,s=i.textLineHeight;return s===void 0||s>=a?{}:{[`--${n}-title-leading-gap`]:w.scalingValue((a-s)/2,r)}}const mt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],yn=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],vn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],bn=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Bd={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Od=["hover","focus","filled","success","error"],fo=.004,dn=.004,Ur=dn,yo=12,_i=50,Hn=1440,Bn=_i/Hn;function ca(e){const t=typeof e=="number"&&e>0?e:Hn;return _i/t}function Vd(e,t){const n={position:"absolute",width:yo,height:yo,pointerEvents:"auto"};return t==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:t==="center-x"?{...n,left:"50%",top:`var(--${e}-first-entry-handle-top, 50%)`,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function Et({P:e,className:t,areaStyle:n,hitPlacement:r,...i}){return l.jsx("div",{className:t,style:{...n,pointerEvents:"none"},...i,children:l.jsx("div",{style:Vd(e,r)})})}function Dd(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const i=parseFloat(n);if(Number.isFinite(i)&&i>0)return i}const r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const i=parseFloat(r);if(Number.isFinite(i)&&i>0)return i}t=t.parentElement}return Hn}const da={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function dr(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function jd(e,t=1){const n=t/e;return Object.fromEntries(mt.map(r=>[r,n]))}function zd(){return Object.fromEntries([...yn.map(e=>[e,0]),...vn.map(e=>[e,0])])}function Kd(){return Object.fromEntries(bn.map(e=>[e,0]))}function rr(e){return Object.fromEntries(mt.map(t=>[t,typeof e[t]=="number"?e[t]:da[t]]))}function ua(e,t,n){const r=e-Bn,i=t+n;if(i<=0||i<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const a=r/i;return{paddingLeft:t*a,paddingRight:n*a}}function ur(e,t,n){const r=Ai(e,t,n);if(e<=0)return[];const i=r.slice(0,e-1).reduce((a,s)=>a+s,0);return[...r.slice(0,e-1),Math.max(0,t-i)]}function Ud(e,t,n){const r={};for(let i=0;i<e;i+=1){const a=yn[i],s=vn[i],c=typeof n[a]=="number"?n[a]:0,o=typeof n[s]=="number"?n[s]:0,d=ua(t[i]??0,c,o);d.paddingLeft!==c&&(r[a]=d.paddingLeft),d.paddingRight!==o&&(r[s]=d.paddingRight)}return r}function Ai(e,t,n){if(e<=0)return[];const r=mt.slice(0,e).map(d=>n[d]);if(e===1)return r;const i=r.slice(0,e-1),s=i.reduce((d,p)=>d+p,0)+Bn;if(t>=s)return r;const c=[...i];let o=s-t;for(let d=c.length-1;d>=0&&o>0;d-=1){const p=c[d]-Bn;if(p<=0)continue;const T=Math.min(o,p);c[d]-=T,o-=T}return[...c,r[e-1]]}function qd(e,t,n){if(e<=1)return{};const r=Ai(e,t,n),i={};for(let a=0;a<e-1;a+=1){const s=mt[a];r[a]!==n[s]&&(i[s]=r[a])}return i}function vo(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Vt]}function Gd(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function Yd(e,t,n,r){const i=Math.min(r,e.length,mt.length),a={};for(let s=0;s<i;s+=1){const c=e[s],o=t.indexOf(c);if(o===-1)continue;const d=mt[o],p=yn[o],T=vn[o],x=bn[o],y=mt[s],g=yn[s],h=vn[s],P=bn[s],C=n[d],f=n[p],b=n[T],M=n[x];typeof C=="number"&&(a[y]=C),typeof f=="number"&&(a[g]=f),typeof b=="number"&&(a[h]=b),typeof M=="number"&&(a[P]=M)}return a}function Xd(e,t,n){const r=Pd(e);r&&(e={...e,...r});const i=ca(n==null?void 0:n.designWidth),a=e.columns,s=t.columns,c=dr(e),o=dr(t),d=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof a=="number"?a:typeof s=="number"?s:Vt.length,T=b=>{if(d)return b;const M=rr({...t,...b}),_=dr(b),E=ur(p,_,M),S=Ud(p,E,{...t,...b});return Object.keys(S).length===0?b:{...b,...S}};if(typeof a=="number"&&a!==s){const b={...e,...jd(a,c),...zd()};if(d)for(const M of bn)typeof t[M]=="number"&&(b[M]=t[M]);else Object.assign(b,Kd());return b}const x=vo(e),y=vo(t);if(!Gd(x,y))return T({...e,...Yd(x,y,t,p)});if(c<o&&typeof p=="number"&&!d){const b=rr({...t,...e});return T({...e,...qd(p,c,b)})}if(d){const b=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,M=Math.max(0,(c-i)/2);return b>M?{...e,textPaddingLR:M}:e}const g=rr({...t,...e}),h=ur(p,o,rr(t)),C=ur(p,c,g).some((b,M)=>b<(h[M]??b)),f=mt.some(b=>{const M=e[b],_=t[b];return typeof M=="number"&&typeof _=="number"&&M!==_});return C||f?T(e):e}function Zd(e,t,n,r){const i=t.slice(0,e).reduce((s,c)=>s+c,0),a=n.slice(e+1,t.length-1).reduce((s,c)=>s+c,0);return Math.max(Bn,r-i-a-Bn)}function Jd(e,t){return Math.random()*(t-e)+e}function Qd(e){return Object.fromEntries(mt.map(t=>[t,typeof e[t]=="number"?e[t]:da[t]]))}function qr(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function eu(e,t,n,r,i,a){return e.slice(0,t).map((s,c)=>{const o=yn[c],d=vn[c],p=bn[c];return{key:s,textPrefix:Md[s],widthKey:mt[c],width:n[mt[c]],paddingLeftKey:o,paddingRightKey:d,paddingBottomKey:p,paddingLeft:r[o],paddingRight:i[d],paddingBottom:a[p]}})}function tu({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:a,layoutId:s,onUpdateSettings:c}){const{prefix:o}=w.useScopedStyles(),d=!!i,{columns:p,type:T,wrapperWidth:x,entriesCount:y,cellMinHeight:g,dividerWidth:h,showVisibility:P,cut:C,showCut:f,cutCellMinHeight:b,cutLabel:M,imageSize:_,imageOnHover:E,entryHoverEffect:S,entryHoverShowOption:A,rowPaddingTop:I,rowPaddingBottom:k,rowPaddingTopB:$,columnsOrder:O,textPaddingLR:V,textColor:q,backgroundColor:Y,dividerColor:L,textHoverColor:R,backgroundHoverColor:B,dividerHoverColor:F}=e,[W,j]=u.useState(void 0),[Q,oe]=u.useState(null),te=E==="on"&&(!n||r),ce=(C??0)>0,v=T==="b",ie=u.useRef(null),$e=u.useRef(null),[de,ye]=u.useState(null),[Re,re]=u.useState(Hn),N=ca(Re),m=Math.max(0,((x??0)-N)/2),H=Math.min(V??0,m),D=Math.max(H,dn),U=((x??0)+N)/2;u.useLayoutEffect(()=>{if(!n){re(Hn);return}const X=()=>{re(Dd(ie.current))};X();const ue=ie.current;if(!ue)return;const pe=new ResizeObserver(X);pe.observe(ue);let xe=ue;for(;xe&&!xe.style.getPropertyValue("--cntrl-article-width");)xe=xe.parentElement;return xe&&pe.observe(xe),()=>pe.disconnect()},[n,s]),u.useEffect(()=>{j(void 0)},[C,f,t,y]),u.useEffect(()=>{n&&!r&&j(void 0)},[n,r]);const ne=w.buildColorVars(o,{textColor:q,backgroundColor:Y,dividerColor:L,textHoverColor:R,backgroundHoverColor:B,dividerHoverColor:F},Bd,Od),ee=a&&a!=="default"?`${o}-state-${a}`:"",ae=`${!n||r?S==="default"?`${o}-entry-hover-default`:S==="blinds"?`${o}-entry-hover-blinds`:S==="reveal"?`${o}-entry-hover-reveal`:"":""} ${ee}`.trim(),ge=S==="reveal"&&(!n||r),me=(P==null?void 0:P[0])??!1,he=(P==null?void 0:P[1])??!1,K=u.useRef(e),G=u.useRef(s);u.useEffect(()=>{if(!c||!n){K.current=e,G.current=s;return}if(G.current!==s){K.current=e,G.current=s;return}const X=K.current;if(!(X!==e))return;const pe=Xd(e,X,{designWidth:Re});K.current=e,pe!==e&&c(pe)},[e,c,n,s,Re]);const z=u.useMemo(()=>Qd(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),le=u.useMemo(()=>qr(e,yn),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),we=u.useMemo(()=>qr(e,vn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),ke=u.useMemo(()=>qr(e,bn),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Je=u.useMemo(()=>Array.isArray(O)&&O.length>0?O:[...Vt],[O]),Pe=u.useMemo(()=>eu(Je,p,z,le,we,ke),[Je,p,z,le,we,ke]),Me=dr(e),Ee=u.useMemo(()=>mt.slice(0,p).map(X=>z[X]),[p,z]),je=u.useMemo(()=>Ai(p,Me,z),[p,Me,z]),He=u.useMemo(()=>ur(p,Me,z),[p,Me,z]),Ie=u.useMemo(()=>Pe.map((X,ue)=>ua(He[ue]??0,X.paddingLeft,X.paddingRight)),[Pe,He]),Ve=u.useMemo(()=>{const X=y===0?1/0:y;return(t??[]).slice(0,X).map((pe,xe)=>({id:xe,cells:Object.fromEntries(Vt.map(Be=>[Be,pe[Be]??""])),image:pe.image,link:pe.link}))},[t,y]),dt=ce?W??C:Ve.length,vt=u.useMemo(()=>ce?Ve.slice(0,dt):Ve,[Ve,ce,dt]),bt=ce&&dt<Ve.length,Tt=vt.length>1||bt,Kt=[me?`${o}-divider-top`:"",he||Tt?`${o}-divider-bottom`:""].filter(Boolean).join(" "),xt=!n||r,Ut=()=>{if(!xt)return;const X=W??C;if(!f){j(Ve.length);return}j(Math.min(X+f,Ve.length))},ve=X=>w.scalingValue(X,n??!1),Ge=v?$??0:I??0,ze=k??0,rt=g??0,wn=Ge+rt/2,Tn=Math.max(ze,Ur),qt=co(0,vt.length,me,he,bt,h??0,n??!1).borderTopWidth,tn=de!=null?`${de}px`:`calc(${qt} + ${ve(wn)})`,Ln=v?"rowPaddingTopB":"rowPaddingTop",be=Pe[0],Ye=Pe[Pe.length-1],De=Ie[0],Fe=Ie[Ie.length-1],it=be&&De?Math.max(De.paddingLeft,dn):0,Gn=Ye&&Fe?Math.max(Fe.paddingRight,dn):0,Ir=Me,nn=X=>{const ue=ie.current;if(!ue)return{x:0,y:0};const pe=ue.getBoundingClientRect();return{x:X.clientX-pe.left+uo,y:X.clientY-pe.top+uo}},kr=(X,ue)=>{if(!te)return;const pe=X.image;if(!(pe!=null&&pe.url)){oe(null);return}const{x:xe,y:Be}=nn(ue),Ke=(_==null?void 0:_.min)??80,Ce=(_==null?void 0:_.max)??320,st=(Q==null?void 0:Q.rowId)===X.id?Q.widthPx:Jd(Ke,Ce);oe({rowId:X.id,url:pe.url,objectFit:pe.objectFit??"cover",widthPx:st,x:xe,y:Be})},Yn=X=>{if(!te||!Q)return;const{x:ue,y:pe}=nn(X);oe(xe=>!xe||xe.x===ue&&xe.y===pe?xe:{...xe,x:ue,y:pe})},Xn=()=>{oe(null)},Wr=X=>{ge&&so(X,o),te&&oe(null)},Te=X=>{ge&&lo(X,o)};u.useLayoutEffect(()=>{if(!d||v){ye(null);return}const X=$e.current,ue=X==null?void 0:X.parentElement;if(!X||!ue){ye(null);return}const pe=()=>{const Be=X.querySelector("[data-list-row]");if(!Be){ye(null);return}const Ke=ue.getBoundingClientRect(),Ce=Be.getBoundingClientRect();ye(Ce.top-Ke.top+Ce.height/2)};pe();const xe=new ResizeObserver(pe);return xe.observe(X),xe.observe(ue),()=>xe.disconnect()},[d,v,vt,Ge,ze,rt,t,e,Pe,He,Re,h,me,he,bt]);const ot=u.useMemo(()=>!v&&Li.some(X=>{const ue=X.charAt(0),pe=e[`${X}VerticalAlign`];return la(pe,e,ue)}),[v,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);u.useLayoutEffect(()=>{var st;const X=ie.current;if(!X)return;const ue=()=>{X.querySelectorAll("[data-list-col]").forEach(lt=>{lt.style.transform="";const Ue=lt.querySelector(`.${o}-list-col`);Ue&&(Ue.style.minHeight="",Ue.style.height="");const ct=lt.querySelector(`.${o}-list-col-title`);ct&&(ct.style.transform="")})};if(v||!ot){ue();return}const pe=()=>{const lt=Array.from(X.querySelectorAll("[data-list-row]")),Ue=`${o}-list-col`,ct=`${o}-baseline-probe`;lt.forEach(_e=>{_e.querySelectorAll("[data-list-col]").forEach(Qe=>{Qe.style.transform="";const et=Qe.querySelector(`.${Ue}`);et&&(et.style.minHeight="",et.style.height="");const Xe=Qe.querySelector(`.${o}-list-col-title`);Xe&&(Xe.style.transform="")})}),lt.forEach(_e=>{const Qe=Array.from(_e.querySelectorAll("[data-list-col]"));kd(_e,Qe,Ue)}),X.offsetHeight,lt.forEach(_e=>{const Qe=Array.from(_e.querySelectorAll("[data-list-col]")),et=_e.getBoundingClientRect().top,Xe=new Map,rn=Qe.map(Ne=>{const on=Ne.querySelector(`.${o}-list-col-title`),an={el:Ne,titleEl:on,letter:Ne.getAttribute("data-col-letter")??"",kind:Ne.getAttribute("data-valign")??"top",anchor:Ne.getAttribute("data-valign-anchor")};return Xe.set(an.letter,an),an}),qe=new Map,Zn=(Ne,on)=>{const an=qe.get(Ne.letter);if(an!==void 0)return an;const Ri=Ne.anchor?Xe.get(Ne.anchor):void 0;if(Ne.kind!=="baseline"||!Ri||on.has(Ne.letter)){const ki=Kr(Ne,et,Ue,ct);return qe.set(Ne.letter,ki),ki}on.add(Ne.letter);const ma=Zn(Ri,on);on.delete(Ne.letter);const ga=Kr(Ne,et,Ue,ct),ha=ma-ga;Wd(Ne.titleEl,ha);const Ii=Kr(Ne,et,Ue,ct);return qe.set(Ne.letter,Ii),Ii};rn.forEach(Ne=>Zn(Ne,new Set))})};let xe=null;const Be=()=>{xe===null&&(xe=requestAnimationFrame(()=>{xe=null,pe()}))};pe();const Ke=new ResizeObserver(()=>Be());Ke.observe(X);let Ce=!1;return typeof document<"u"&&((st=document.fonts)!=null&&st.ready)&&document.fonts.ready.then(()=>{Ce||Be()}),()=>{Ce=!0,xe!==null&&(cancelAnimationFrame(xe),xe=null),Ke.disconnect(),ue()}},[ot,v,e,t,Re,vt,He]);const at=u.useMemo(()=>$d(o),[o]);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:at}}),l.jsx("div",{style:ne,children:l.jsxs("div",{ref:ie,className:`${o}-wrapper ${ae}${Kt?` ${Kt}`:""}${v?` ${o}-type-b`:""}`.trim(),style:{width:w.scalingValue(x??0,n),...!v&&d?{[`--${o}-first-entry-handle-top`]:tn}:{}},onMouseMove:te?Yn:void 0,onMouseLeave:te?Xn:void 0,children:[l.jsxs("div",{style:{width:"100%",position:"relative"},children:[vt.map((X,ue)=>{var Ke;const pe=(((Ke=X.link)==null?void 0:Ke.length)??0)>0,xe=pe&&(!n||r)?"a":"div",Be=co(ue,vt.length,me,he,bt,h??0,n??!1);return l.jsxs(xe,{ref:ue===0?Ce=>{$e.current=Ce}:void 0,className:`${o}-list-item${pe||A==="always"?` ${o}-list-item-has-link`:""}`,...pe?{href:X.link,target:"_blank"}:{},style:Be,onMouseEnter:Ce=>{ge&&(pe||A==="always")&&so(Ce,o),te&&kr(X,Ce)},onMouseLeave:Ce=>{ge&&(pe||A==="always")&&lo(Ce,o)},children:[Ge>0&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:ve(Ge)}}),l.jsxs("div",{className:`${o}-list-cols-row${v?"":` ${o}-list-cols-row-h`}${d&&ue===0&&v?` ${o}-list-cols-row-controls`:""}`,...v?{}:{"data-list-row":""},style:v?void 0:{minHeight:ve(rt)},children:[Pe.map((Ce,st)=>{const lt=st===Pe.length-1,Ue=Ie[st],ct=Ce.paddingBottom,_e=Cd(X.cells[Ce.key]),Qe=v&&_e&&ct>0,et=v?{minHeight:ve(rt)}:{width:ve(He[st])},Xe=v?{paddingLeft:ve(H),paddingRight:ve(H)}:{paddingLeft:ve(Ue.paddingLeft),paddingRight:ve(Ue.paddingRight)},rn=Ce.textPrefix.charAt(0),qe=v?Ed(e[`${Ce.textPrefix}VerticalAlign`]):Ld(e[`${Ce.textPrefix}VerticalAlign`],e,rn),Zn=v&&_e&&d&&ue===0;return l.jsxs("div",{className:v?`${o}-list-col-wrap`:void 0,...v?{}:{"data-list-col":"","data-col-letter":rn,"data-valign":qe.kind,...qe.kind==="baseline"?{"data-valign-anchor":qe.anchorLetter}:{}},children:[l.jsx("div",{className:`${o}-list-col${lt?` ${o}-list-col-last`:""}`,style:{...Xe,...et,...v?{justifyContent:po(qe.kind)}:{}},"data-test":Ce.width,children:l.jsx("span",{className:go(e,Ce.textPrefix,`${o}-list-col-title`,`${o}-text-tight-leading`),style:{...mo(vr(e,Ce.textPrefix),n),...ho(e,Ce.textPrefix,o,n),...v?{}:_d(qe.kind)},children:X.cells[Ce.key]??null})}),Qe&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:ve(ct)}}),Zn&&l.jsx(Et,{P:o,"data-controls":Ce.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(Math.max(ct,Ur))}})]},Ce.key)}),d&&ue===0&&v&&l.jsxs(l.Fragment,{children:[l.jsx(Et,{P:o,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(U),className:`${o}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:ve(D),height:"100%"}}),l.jsx(Et,{P:o,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(U),className:`${o}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:ve(Math.max(D,Me-D)),width:ve(D),height:"100%"}})]})]}),!v&&ze>0&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:ve(ze)}}),d&&ue===0&&!v&&l.jsx(Et,{P:o,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(Tn)}})]},X.id)}),d&&l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx(Et,{P:o,"data-controls":Ln,"data-controls-static-handle":"",...v?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:v?"center":"left-y",areaStyle:{position:"absolute",top:qt,left:0,width:"100%",height:ve(Math.max(Ge,Ur))}})},"row-padding-handles"),d&&!v&&be&&Ye&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(Et,{P:o,"data-controls":be.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(He[0]-((De==null?void 0:De.paddingRight)??0)),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ve(it),height:"100%"}}),l.jsx(Et,{P:o,"data-controls":Ye.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(He[Pe.length-1]-((Fe==null?void 0:Fe.paddingLeft)??0)),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(Ir-Gn),width:ve(Gn),height:"100%"}})]},"column-edge-padding-handles"),d&&!v&&Pe.slice(0,-1).map((X,ue)=>{const pe=Pe[ue+1],xe=je.slice(0,ue+1).reduce((lt,Ue)=>lt+Ue,0),Be=Ie[ue],Ke=Ie[ue+1],Ce=Math.max(Be.paddingRight,dn),st=Math.max(Ke.paddingLeft,dn);return l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(Et,{P:o,"data-controls":X.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(He[ue]-Be.paddingLeft),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(xe-Ce),width:ve(Ce),height:"100%"}}),l.jsx(Et,{P:o,"data-controls":pe.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(He[ue+1]-Ke.paddingRight),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(xe),width:ve(st),height:"100%"}})]},`${X.paddingRightKey}-padding`)}),d&&!v&&Pe.slice(0,-1).map((X,ue)=>{const pe=Zd(ue,je,Ee,Me),Be=je.slice(0,ue+1).reduce((Ke,Ce)=>Ke+Ce,0)-fo/2;return l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx("div",{"data-controls":X.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(_i),"data-controls-max-fraction":String(pe),"data-controls-variant":"column-width",className:`${o}-col-resize-handle`,style:{position:"absolute",top:"0px",left:ve(Be),width:ve(fo),height:"calc(100%)",pointerEvents:"auto"}})},`${X.widthKey}-junction`)})]}),bt&&(()=>{const X=vr(e,It),ue=Ad(e.cutLabelVerticalAlign),pe=X.textTextAlign==="justify"||v;return l.jsx("button",{type:"button",className:`${o}-cut-item`,style:{minHeight:ve(b??0),cursor:xt?"pointer":"default",...Sd(he,h??0,n??!1)},onClick:xt?Ut:void 0,onMouseEnter:ge||te?Wr:void 0,onMouseLeave:ge?Te:void 0,children:l.jsx("div",{className:`${o}-list-cols-row`,style:{...v?{paddingLeft:ve(H),paddingRight:ve(H)}:{},justifyContent:Rd(X.textTextAlign),alignItems:po(ue)},children:l.jsx("span",{className:go(e,It,`${o}-cut-label`,`${o}-text-tight-leading`),style:{...mo(X,n),...ho(e,It,o,n),...pe?{width:"100%"}:{}},children:M})})})})(),te&&Q&&l.jsx("img",{className:`${o}-hover-image`,src:Q.url,alt:"",style:{width:cr(Q.widthPx),objectFit:Q.objectFit,left:Q.x,top:Q.y}})]})})]})}const nu=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';
|
|
5306
5447
|
import { CommonComponentProps } from '../props';
|
|
5307
5448
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
|
|
5308
5449
|
import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
|
|
@@ -5381,11 +5522,11 @@ type ListColumnVerticalAlignUpdates = {
|
|
|
5381
5522
|
|
|
5382
5523
|
export type ListSettings = {
|
|
5383
5524
|
columns: number;
|
|
5384
|
-
type: '
|
|
5525
|
+
type: 'a' | 'b';
|
|
5385
5526
|
wrapperWidth: number;
|
|
5386
5527
|
entriesCount: number;
|
|
5387
5528
|
cellMinHeight: number;
|
|
5388
|
-
imageOnHover: '
|
|
5529
|
+
imageOnHover: 'on' | 'off';
|
|
5389
5530
|
imageSize?: { min: number; max: number };
|
|
5390
5531
|
dividerWidth: number;
|
|
5391
5532
|
showVisibility: boolean[];
|
|
@@ -5393,8 +5534,8 @@ export type ListSettings = {
|
|
|
5393
5534
|
showCut: number;
|
|
5394
5535
|
cutCellMinHeight: number;
|
|
5395
5536
|
cutLabel: string;
|
|
5396
|
-
entryHoverEffect: '
|
|
5397
|
-
entryHoverShowOption: '
|
|
5537
|
+
entryHoverEffect: 'none' | 'default' | 'blinds' | 'reveal';
|
|
5538
|
+
entryHoverShowOption: 'always' | 'link only';
|
|
5398
5539
|
rowPaddingTop: number;
|
|
5399
5540
|
rowPaddingBottom: number;
|
|
5400
5541
|
rowPaddingTopB: number;
|
|
@@ -5477,6 +5618,20 @@ function hasListColumnText(value: React.ReactNode): boolean {
|
|
|
5477
5618
|
return String(value ?? '').trim().length > 0;
|
|
5478
5619
|
}
|
|
5479
5620
|
|
|
5621
|
+
function setRevealOpenDirectionFromMouseEnter(event: React.MouseEvent<HTMLElement>, prefix: string): void {
|
|
5622
|
+
const el = event.currentTarget;
|
|
5623
|
+
const rect = el.getBoundingClientRect();
|
|
5624
|
+
const fromBottom = event.clientY - rect.top > rect.height / 2;
|
|
5625
|
+
el.classList.toggle(\`\${prefix}-reveal-from-bottom\`, fromBottom);
|
|
5626
|
+
}
|
|
5627
|
+
|
|
5628
|
+
function setRevealCloseDirectionFromMouseLeave(event: React.MouseEvent<HTMLElement>, prefix: string): void {
|
|
5629
|
+
const el = event.currentTarget;
|
|
5630
|
+
const rect = el.getBoundingClientRect();
|
|
5631
|
+
const exitToTop = event.clientY < rect.top + rect.height / 2;
|
|
5632
|
+
el.classList.toggle(\`\${prefix}-reveal-from-bottom\`, exitToTop);
|
|
5633
|
+
}
|
|
5634
|
+
|
|
5480
5635
|
function getEntryDividerWidths(
|
|
5481
5636
|
rowIdx: number,
|
|
5482
5637
|
rowCount: number,
|
|
@@ -5760,15 +5915,19 @@ a.\${P}-list-item {
|
|
|
5760
5915
|
|
|
5761
5916
|
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-list-item-has-link,
|
|
5762
5917
|
.\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-list-item-has-link,
|
|
5918
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-list-item-has-link,
|
|
5763
5919
|
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-cut-item,
|
|
5764
|
-
.\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-cut-item
|
|
5920
|
+
.\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-cut-item,
|
|
5921
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-cut-item {
|
|
5765
5922
|
transition: background-color 250ms, border-color 250ms;
|
|
5766
5923
|
}
|
|
5767
5924
|
|
|
5768
5925
|
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-list-item-has-link .\${P}-list-col-title,
|
|
5769
5926
|
.\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-list-item-has-link .\${P}-list-col-title,
|
|
5927
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-list-item-has-link .\${P}-list-col-title,
|
|
5770
5928
|
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-cut-label,
|
|
5771
|
-
.\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-cut-label
|
|
5929
|
+
.\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-cut-label,
|
|
5930
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-cut-label {
|
|
5772
5931
|
transition: color 250ms;
|
|
5773
5932
|
}
|
|
5774
5933
|
|
|
@@ -5790,21 +5949,31 @@ a.\${P}-list-item {
|
|
|
5790
5949
|
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-blinds .\${P}-list-item:has(+ .\${P}-cut-item:hover),
|
|
5791
5950
|
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-list-item-has-link,
|
|
5792
5951
|
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-blinds .\${P}-cut-item:hover,
|
|
5793
|
-
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-cut-item
|
|
5952
|
+
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-cut-item,
|
|
5953
|
+
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-reveal .\${P}-list-item-has-link:hover,
|
|
5954
|
+
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-reveal .\${P}-list-item:has(+ .\${P}-list-item-has-link:hover),
|
|
5955
|
+
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-reveal .\${P}-list-item:has(+ .\${P}-cut-item:hover),
|
|
5956
|
+
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-reveal.\${P}-state-hover .\${P}-list-item-has-link,
|
|
5957
|
+
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-reveal .\${P}-cut-item:hover,
|
|
5958
|
+
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-reveal.\${P}-state-hover .\${P}-cut-item {
|
|
5794
5959
|
border-bottom-color: var(--\${P}-divider-hover-color);
|
|
5795
5960
|
}
|
|
5796
5961
|
|
|
5797
5962
|
.\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom).\${P}-entry-hover-default .\${P}-list-item-has-link:hover:first-child,
|
|
5798
5963
|
.\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom).\${P}-entry-hover-default.\${P}-state-hover .\${P}-list-item-has-link:first-child,
|
|
5799
5964
|
.\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom).\${P}-entry-hover-blinds .\${P}-list-item-has-link:hover:first-child,
|
|
5800
|
-
.\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom).\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-list-item-has-link:first-child
|
|
5965
|
+
.\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom).\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-list-item-has-link:first-child,
|
|
5966
|
+
.\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom).\${P}-entry-hover-reveal .\${P}-list-item-has-link:hover:first-child,
|
|
5967
|
+
.\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom).\${P}-entry-hover-reveal.\${P}-state-hover .\${P}-list-item-has-link:first-child {
|
|
5801
5968
|
border-top-color: var(--\${P}-divider-hover-color);
|
|
5802
5969
|
}
|
|
5803
5970
|
|
|
5804
5971
|
.\${P}-wrapper.\${P}-divider-top.\${P}-divider-bottom.\${P}-entry-hover-default .\${P}-list-item-has-link:hover:first-child,
|
|
5805
5972
|
.\${P}-wrapper.\${P}-divider-top.\${P}-divider-bottom.\${P}-entry-hover-default.\${P}-state-hover .\${P}-list-item-has-link:first-child,
|
|
5806
5973
|
.\${P}-wrapper.\${P}-divider-top.\${P}-divider-bottom.\${P}-entry-hover-blinds .\${P}-list-item-has-link:hover:first-child,
|
|
5807
|
-
.\${P}-wrapper.\${P}-divider-top.\${P}-divider-bottom.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-list-item-has-link:first-child
|
|
5974
|
+
.\${P}-wrapper.\${P}-divider-top.\${P}-divider-bottom.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-list-item-has-link:first-child,
|
|
5975
|
+
.\${P}-wrapper.\${P}-divider-top.\${P}-divider-bottom.\${P}-entry-hover-reveal .\${P}-list-item-has-link:hover:first-child,
|
|
5976
|
+
.\${P}-wrapper.\${P}-divider-top.\${P}-divider-bottom.\${P}-entry-hover-reveal.\${P}-state-hover .\${P}-list-item-has-link:first-child {
|
|
5808
5977
|
border-top-color: var(--\${P}-divider-hover-color);
|
|
5809
5978
|
}
|
|
5810
5979
|
|
|
@@ -5815,7 +5984,11 @@ a.\${P}-list-item {
|
|
|
5815
5984
|
.\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-list-item-has-link:hover .\${P}-list-col-title,
|
|
5816
5985
|
.\${P}-wrapper.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-list-item-has-link .\${P}-list-col-title,
|
|
5817
5986
|
.\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-cut-item:hover .\${P}-cut-label,
|
|
5818
|
-
.\${P}-wrapper.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-cut-item .\${P}-cut-label
|
|
5987
|
+
.\${P}-wrapper.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-cut-item .\${P}-cut-label,
|
|
5988
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-list-item-has-link:hover .\${P}-list-col-title,
|
|
5989
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal.\${P}-state-hover .\${P}-list-item-has-link .\${P}-list-col-title,
|
|
5990
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-cut-item:hover .\${P}-cut-label,
|
|
5991
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal.\${P}-state-hover .\${P}-cut-item .\${P}-cut-label {
|
|
5819
5992
|
color: var(--\${P}-text-hover-color);
|
|
5820
5993
|
}
|
|
5821
5994
|
|
|
@@ -5827,7 +6000,8 @@ a.\${P}-list-item {
|
|
|
5827
6000
|
background: var(--\${P}-background-hover-color);
|
|
5828
6001
|
transform: scaleY(0);
|
|
5829
6002
|
transform-origin: center center;
|
|
5830
|
-
|
|
6003
|
+
opacity: 0;
|
|
6004
|
+
transition: opacity 150ms, transform 0s 250ms;
|
|
5831
6005
|
z-index: 0;
|
|
5832
6006
|
pointer-events: none;
|
|
5833
6007
|
}
|
|
@@ -5843,6 +6017,47 @@ a.\${P}-list-item {
|
|
|
5843
6017
|
.\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-cut-item:hover::before,
|
|
5844
6018
|
.\${P}-wrapper.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-cut-item::before {
|
|
5845
6019
|
transform: scaleY(1);
|
|
6020
|
+
opacity: 1;
|
|
6021
|
+
transition: transform 250ms, opacity 250ms;
|
|
6022
|
+
}
|
|
6023
|
+
|
|
6024
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-list-item-has-link::before,
|
|
6025
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-cut-item::before {
|
|
6026
|
+
content: '';
|
|
6027
|
+
position: absolute;
|
|
6028
|
+
inset: 0;
|
|
6029
|
+
background: var(--\${P}-background-hover-color);
|
|
6030
|
+
transform: scaleY(0);
|
|
6031
|
+
transform-origin: bottom center;
|
|
6032
|
+
transition: transform 120ms;
|
|
6033
|
+
z-index: 0;
|
|
6034
|
+
pointer-events: none;
|
|
6035
|
+
}
|
|
6036
|
+
|
|
6037
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-list-col,
|
|
6038
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-cut-label {
|
|
6039
|
+
position: relative;
|
|
6040
|
+
z-index: 1;
|
|
6041
|
+
}
|
|
6042
|
+
|
|
6043
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-list-item-has-link:hover::before,
|
|
6044
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal.\${P}-state-hover .\${P}-list-item-has-link::before,
|
|
6045
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-cut-item:hover::before,
|
|
6046
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal.\${P}-state-hover .\${P}-cut-item::before {
|
|
6047
|
+
transform: scaleY(1);
|
|
6048
|
+
transform-origin: top center;
|
|
6049
|
+
}
|
|
6050
|
+
|
|
6051
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-list-item-has-link.\${P}-reveal-from-bottom::before,
|
|
6052
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-cut-item.\${P}-reveal-from-bottom::before {
|
|
6053
|
+
transform-origin: top center;
|
|
6054
|
+
}
|
|
6055
|
+
|
|
6056
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-list-item-has-link.\${P}-reveal-from-bottom:hover::before,
|
|
6057
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-list-item-has-link.\${P}-reveal-from-bottom.\${P}-state-hover::before,
|
|
6058
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-cut-item.\${P}-reveal-from-bottom:hover::before,
|
|
6059
|
+
.\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-cut-item.\${P}-reveal-from-bottom.\${P}-state-hover::before {
|
|
6060
|
+
transform-origin: bottom center;
|
|
5846
6061
|
}
|
|
5847
6062
|
|
|
5848
6063
|
.\${P}-cut-item {
|
|
@@ -6048,7 +6263,7 @@ function getListColumnVerticalAlignSanitizeUpdates(
|
|
|
6048
6263
|
const key = getListColumnVerticalAlignSettingKey(letter) as ListColumnVerticalAlignKey;
|
|
6049
6264
|
const value = settings[key];
|
|
6050
6265
|
|
|
6051
|
-
if (settings.type === '
|
|
6266
|
+
if (settings.type === 'b') {
|
|
6052
6267
|
const raw = String(value ?? 'Top').trim();
|
|
6053
6268
|
if (raw !== 'Top' && raw !== 'Center' && raw !== 'Bottom') {
|
|
6054
6269
|
updates[key] = 'Top';
|
|
@@ -6181,7 +6396,6 @@ function syncRowListColHeights(
|
|
|
6181
6396
|
}
|
|
6182
6397
|
});
|
|
6183
6398
|
|
|
6184
|
-
void rowEl.offsetHeight;
|
|
6185
6399
|
return rowHeight;
|
|
6186
6400
|
}
|
|
6187
6401
|
|
|
@@ -6840,8 +7054,8 @@ export function applyListSettingsChange(
|
|
|
6840
7054
|
const prevColumns = prevSettings.columns;
|
|
6841
7055
|
const nextContentWidth = getListEffectiveContentWidth(nextSettings);
|
|
6842
7056
|
const prevContentWidth = getListEffectiveContentWidth(prevSettings);
|
|
6843
|
-
const isVerticalLayout = nextSettings.type === '
|
|
6844
|
-
|| (nextSettings.type === undefined && prevSettings.type === '
|
|
7057
|
+
const isVerticalLayout = nextSettings.type === 'b'
|
|
7058
|
+
|| (nextSettings.type === undefined && prevSettings.type === 'b');
|
|
6845
7059
|
const columns =
|
|
6846
7060
|
typeof nextColumns === 'number'
|
|
6847
7061
|
? nextColumns
|
|
@@ -7067,9 +7281,9 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
7067
7281
|
|
|
7068
7282
|
const [visibleRowCount, setVisibleRowCount] = useState<number | undefined>(undefined);
|
|
7069
7283
|
const [hoverImage, setHoverImage] = useState<HoverImageState | null>(null);
|
|
7070
|
-
const showHoverImage = imageOnHover === '
|
|
7284
|
+
const showHoverImage = imageOnHover === 'on' && (!isEditor || isPreviewMode);
|
|
7071
7285
|
const cutEnabled = (cut ?? 0) > 0;
|
|
7072
|
-
const isVerticalLayout = type === '
|
|
7286
|
+
const isVerticalLayout = type === 'b';
|
|
7073
7287
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
7074
7288
|
const firstEntryRef = useRef<HTMLElement | null>(null);
|
|
7075
7289
|
const [firstEntryHandleTopPx, setFirstEntryHandleTopPx] = useState<number | null>(null);
|
|
@@ -7132,14 +7346,17 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
7132
7346
|
}, COLOR_VAR_MAP, STATE_KEYS);
|
|
7133
7347
|
|
|
7134
7348
|
const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';
|
|
7135
|
-
const entryHoverClass = (!isEditor || isPreviewMode)
|
|
7136
|
-
|
|
7349
|
+
const entryHoverClass = (!isEditor || isPreviewMode)
|
|
7350
|
+
? entryHoverEffect === 'default'
|
|
7137
7351
|
? \`\${P}-entry-hover-default\`
|
|
7138
|
-
: entryHoverEffect === '
|
|
7352
|
+
: entryHoverEffect === 'blinds'
|
|
7139
7353
|
? \`\${P}-entry-hover-blinds\`
|
|
7140
|
-
: ''
|
|
7141
|
-
|
|
7354
|
+
: entryHoverEffect === 'reveal'
|
|
7355
|
+
? \`\${P}-entry-hover-reveal\`
|
|
7356
|
+
: ''
|
|
7357
|
+
: '';
|
|
7142
7358
|
const wrapperStateClasses = \`\${entryHoverClass} \${stateClass}\`.trim();
|
|
7359
|
+
const revealHoverActive = entryHoverEffect === 'reveal' && (!isEditor || isPreviewMode);
|
|
7143
7360
|
const showDividerTop = showVisibility?.[0] ?? false;
|
|
7144
7361
|
const showDividerBottom = showVisibility?.[1] ?? false;
|
|
7145
7362
|
|
|
@@ -7405,11 +7622,20 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
7405
7622
|
setHoverImage(null);
|
|
7406
7623
|
};
|
|
7407
7624
|
|
|
7408
|
-
const handleCutItemMouseEnter = () => {
|
|
7625
|
+
const handleCutItemMouseEnter = (event: React.MouseEvent<HTMLButtonElement>) => {
|
|
7626
|
+
if (revealHoverActive) {
|
|
7627
|
+
setRevealOpenDirectionFromMouseEnter(event, P);
|
|
7628
|
+
}
|
|
7409
7629
|
if (!showHoverImage) return;
|
|
7410
7630
|
setHoverImage(null);
|
|
7411
7631
|
};
|
|
7412
7632
|
|
|
7633
|
+
const handleCutItemMouseLeave = (event: React.MouseEvent<HTMLButtonElement>) => {
|
|
7634
|
+
if (revealHoverActive) {
|
|
7635
|
+
setRevealCloseDirectionFromMouseLeave(event, P);
|
|
7636
|
+
}
|
|
7637
|
+
};
|
|
7638
|
+
|
|
7413
7639
|
useLayoutEffect(() => {
|
|
7414
7640
|
if (!showControls || isVerticalLayout) {
|
|
7415
7641
|
setFirstEntryHandleTopPx(null);
|
|
@@ -7503,11 +7729,14 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
7503
7729
|
}
|
|
7504
7730
|
|
|
7505
7731
|
const applyBaselines = () => {
|
|
7506
|
-
container.querySelectorAll<HTMLElement>('[data-list-row]')
|
|
7507
|
-
|
|
7508
|
-
|
|
7732
|
+
const rows = Array.from(container.querySelectorAll<HTMLElement>('[data-list-row]'));
|
|
7733
|
+
const listColClassName = \`\${P}-list-col\`;
|
|
7734
|
+
const probeClassName = \`\${P}-baseline-probe\`;
|
|
7735
|
+
|
|
7736
|
+
rows.forEach((rowEl) => {
|
|
7737
|
+
rowEl.querySelectorAll<HTMLElement>('[data-list-col]').forEach((el) => {
|
|
7509
7738
|
el.style.transform = '';
|
|
7510
|
-
const listCol = el.querySelector<HTMLElement>(\`.\${
|
|
7739
|
+
const listCol = el.querySelector<HTMLElement>(\`.\${listColClassName}\`);
|
|
7511
7740
|
if (listCol) {
|
|
7512
7741
|
listCol.style.minHeight = '';
|
|
7513
7742
|
listCol.style.height = '';
|
|
@@ -7517,9 +7746,17 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
7517
7746
|
title.style.transform = '';
|
|
7518
7747
|
}
|
|
7519
7748
|
});
|
|
7749
|
+
});
|
|
7750
|
+
|
|
7751
|
+
rows.forEach((rowEl) => {
|
|
7752
|
+
const cols = Array.from(rowEl.querySelectorAll<HTMLElement>('[data-list-col]'));
|
|
7753
|
+
syncRowListColHeights(rowEl, cols, listColClassName);
|
|
7754
|
+
});
|
|
7520
7755
|
|
|
7521
|
-
|
|
7522
|
-
|
|
7756
|
+
void container.offsetHeight;
|
|
7757
|
+
|
|
7758
|
+
rows.forEach((rowEl) => {
|
|
7759
|
+
const cols = Array.from(rowEl.querySelectorAll<HTMLElement>('[data-list-col]'));
|
|
7523
7760
|
const rowTop = rowEl.getBoundingClientRect().top;
|
|
7524
7761
|
|
|
7525
7762
|
type ColInfo = {
|
|
@@ -7530,7 +7767,6 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
7530
7767
|
anchor: string | null;
|
|
7531
7768
|
};
|
|
7532
7769
|
|
|
7533
|
-
const probeClassName = \`\${P}-baseline-probe\`;
|
|
7534
7770
|
const byLetter = new Map<string, ColInfo>();
|
|
7535
7771
|
const infos: ColInfo[] = cols.map((el) => {
|
|
7536
7772
|
const titleEl = el.querySelector<HTMLElement>(\`.\${P}-list-col-title\`);
|
|
@@ -7555,7 +7791,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
7555
7791
|
const baseline = measureColumnFirstLineBaselineOffset(
|
|
7556
7792
|
info,
|
|
7557
7793
|
rowTop,
|
|
7558
|
-
|
|
7794
|
+
listColClassName,
|
|
7559
7795
|
probeClassName,
|
|
7560
7796
|
);
|
|
7561
7797
|
finalBaseline.set(info.letter, baseline);
|
|
@@ -7569,7 +7805,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
7569
7805
|
const followerNatural = measureColumnFirstLineBaselineOffset(
|
|
7570
7806
|
info,
|
|
7571
7807
|
rowTop,
|
|
7572
|
-
|
|
7808
|
+
listColClassName,
|
|
7573
7809
|
probeClassName,
|
|
7574
7810
|
);
|
|
7575
7811
|
const shift = anchorBaseline - followerNatural;
|
|
@@ -7578,7 +7814,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
7578
7814
|
const result = measureColumnFirstLineBaselineOffset(
|
|
7579
7815
|
info,
|
|
7580
7816
|
rowTop,
|
|
7581
|
-
|
|
7817
|
+
listColClassName,
|
|
7582
7818
|
probeClassName,
|
|
7583
7819
|
);
|
|
7584
7820
|
finalBaseline.set(info.letter, result);
|
|
@@ -7589,20 +7825,33 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
7589
7825
|
});
|
|
7590
7826
|
};
|
|
7591
7827
|
|
|
7828
|
+
let rafId: number | null = null;
|
|
7829
|
+
const scheduleApplyBaselines = () => {
|
|
7830
|
+
if (rafId !== null) return;
|
|
7831
|
+
rafId = requestAnimationFrame(() => {
|
|
7832
|
+
rafId = null;
|
|
7833
|
+
applyBaselines();
|
|
7834
|
+
});
|
|
7835
|
+
};
|
|
7836
|
+
|
|
7592
7837
|
applyBaselines();
|
|
7593
7838
|
|
|
7594
|
-
const observer = new ResizeObserver(() =>
|
|
7839
|
+
const observer = new ResizeObserver(() => scheduleApplyBaselines());
|
|
7595
7840
|
observer.observe(container);
|
|
7596
7841
|
|
|
7597
7842
|
let cancelled = false;
|
|
7598
7843
|
if (typeof document !== 'undefined' && document.fonts?.ready) {
|
|
7599
7844
|
document.fonts.ready.then(() => {
|
|
7600
|
-
if (!cancelled)
|
|
7845
|
+
if (!cancelled) scheduleApplyBaselines();
|
|
7601
7846
|
});
|
|
7602
7847
|
}
|
|
7603
7848
|
|
|
7604
7849
|
return () => {
|
|
7605
7850
|
cancelled = true;
|
|
7851
|
+
if (rafId !== null) {
|
|
7852
|
+
cancelAnimationFrame(rafId);
|
|
7853
|
+
rafId = null;
|
|
7854
|
+
}
|
|
7606
7855
|
observer.disconnect();
|
|
7607
7856
|
clearBaselineStyles();
|
|
7608
7857
|
};
|
|
@@ -7616,9 +7865,11 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
7616
7865
|
effectiveColumnWidths,
|
|
7617
7866
|
]);
|
|
7618
7867
|
|
|
7868
|
+
const scopedCss = useMemo(() => getCSS(P), [P]);
|
|
7869
|
+
|
|
7619
7870
|
return (
|
|
7620
7871
|
<>
|
|
7621
|
-
<style dangerouslySetInnerHTML={{ __html:
|
|
7872
|
+
<style dangerouslySetInnerHTML={{ __html: scopedCss }} />
|
|
7622
7873
|
<div style={colorVars}>
|
|
7623
7874
|
<div
|
|
7624
7875
|
ref={containerRef}
|
|
@@ -7635,7 +7886,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
7635
7886
|
<div style={{ width: '100%', position: 'relative' }}>
|
|
7636
7887
|
{visibleRows.map((row, rowIdx) => {
|
|
7637
7888
|
const hasLink = (row.link?.length ?? 0) > 0;
|
|
7638
|
-
const RowElement = hasLink && isPreviewMode ? 'a' : 'div';
|
|
7889
|
+
const RowElement = hasLink && (!isEditor || isPreviewMode) ? 'a' : 'div';
|
|
7639
7890
|
const rowStyle = getEntryDividerWidths(
|
|
7640
7891
|
rowIdx,
|
|
7641
7892
|
visibleRows.length,
|
|
@@ -7650,10 +7901,22 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
7650
7901
|
<RowElement
|
|
7651
7902
|
key={row.id}
|
|
7652
7903
|
ref={rowIdx === 0 ? (el: HTMLElement | null) => { firstEntryRef.current = el; } : undefined}
|
|
7653
|
-
className={\`\${P}-list-item\${hasLink || entryHoverShowOption === '
|
|
7904
|
+
className={\`\${P}-list-item\${hasLink || entryHoverShowOption === 'always' ? \` \${P}-list-item-has-link\` : ''}\`}
|
|
7654
7905
|
{...(hasLink ? { href: row.link, target: '_blank' } : {})}
|
|
7655
7906
|
style={rowStyle}
|
|
7656
|
-
onMouseEnter={
|
|
7907
|
+
onMouseEnter={(event) => {
|
|
7908
|
+
if (revealHoverActive && (hasLink || entryHoverShowOption === 'always')) {
|
|
7909
|
+
setRevealOpenDirectionFromMouseEnter(event, P);
|
|
7910
|
+
}
|
|
7911
|
+
if (showHoverImage) {
|
|
7912
|
+
handleRowMouseEnter(row, event);
|
|
7913
|
+
}
|
|
7914
|
+
}}
|
|
7915
|
+
onMouseLeave={(event) => {
|
|
7916
|
+
if (revealHoverActive && (hasLink || entryHoverShowOption === 'always')) {
|
|
7917
|
+
setRevealCloseDirectionFromMouseLeave(event, P);
|
|
7918
|
+
}
|
|
7919
|
+
}}
|
|
7657
7920
|
>
|
|
7658
7921
|
{resolvedRowPaddingTop > 0 && (
|
|
7659
7922
|
<div
|
|
@@ -8025,7 +8288,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8025
8288
|
),
|
|
8026
8289
|
}}
|
|
8027
8290
|
onClick={cutItemClickable ? handleShowMore : undefined}
|
|
8028
|
-
onMouseEnter={showHoverImage ? handleCutItemMouseEnter : undefined}
|
|
8291
|
+
onMouseEnter={revealHoverActive || showHoverImage ? handleCutItemMouseEnter : undefined}
|
|
8292
|
+
onMouseLeave={revealHoverActive ? handleCutItemMouseLeave : undefined}
|
|
8029
8293
|
>
|
|
8030
8294
|
<div
|
|
8031
8295
|
className={\`\${P}-list-cols-row\`}
|
|
@@ -8077,4 +8341,4 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8077
8341
|
</>
|
|
8078
8342
|
);
|
|
8079
8343
|
}
|
|
8080
|
-
`,yn=["A","B","C","D","E"],uo=[...Zr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Kt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",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"]}}}};function Gd(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Qn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Yd(){return Object.fromEntries(yn.map((e,t)=>{const n=Ht[t],r=`${e} column`;return[n,Gd(r)]}))}function Xd(){const e={};for(const t of yn)e[`${t}ColumnWidth`]=Qn(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Qn(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Qn(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Qn(`${t} column padding bottom`);return e}function po(e={}){const{typeBDefaults:t,...n}=e,r={wrapperWidth:1,columnsOrder:[...Ht]};for(const a of yn)r[`${a}ColumnWidth`]=a==="A"?.0798:.32,r[`${a}ColumnPaddingLeft`]=0,r[`${a}ColumnPaddingRight`]=0,r[`${a}ColumnPaddingBottom`]=0;const i=n.type==="B"&&t?t:{};return{...r,...i,...n}}function Zd(e){const t={};if(e===Lt)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Zr]},enum:[...Zr]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...uo],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...uo]}}return t[Te(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Te(e,"textFontSettings")]={...Kt.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Te(e,"textFontSize")]={...Kt.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Te(e,"textLineHeight")]={...Kt.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Te(e,"textLetterSpacing")]={...Kt.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Te(e,"textWordSpacing")]={...Kt.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Te(e,"textTextAlign")]={...Kt.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Te(e,"textTextAppearance")]={...Kt.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Jd=Ci.reduce((e,t)=>({...e,...Zd(t)}),{});function Qd(e){return{verticalAlign:e===Lt?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Lt?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function eu(e,t={}){var n;return{...Qd(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const mo=new Set(["textFontFamily","textFontSettings"]);function tu(e,t,n){const r=a=>n===void 0?!0:n==="common"?mo.has(a):!mo.has(a),i={};return r("verticalAlign")&&t.verticalAlign!==void 0&&(i[`${e}VerticalAlign`]=Si(t.verticalAlign)),r("textFontFamily")&&t.textFontFamily!==void 0&&(i[Te(e,"textFontFamily")]=t.textFontFamily),r("textFontSettings")&&t.textFontSettings!==void 0&&(i[Te(e,"textFontSettings")]=t.textFontSettings),r("textFontSize")&&t.textFontSize!==void 0&&(i[Te(e,"textFontSize")]=t.textFontSize),r("textLineHeight")&&t.textLineHeight!==void 0&&(i[Te(e,"textLineHeight")]=t.textLineHeight),r("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(i[Te(e,"textLetterSpacing")]=t.textLetterSpacing),r("textWordSpacing")&&t.textWordSpacing!==void 0&&(i[Te(e,"textWordSpacing")]=t.textWordSpacing),r("textTextAlign")&&t.textTextAlign!==void 0&&(i[Te(e,"textTextAlign")]=t.textTextAlign),r("textTextAppearance")&&t.textTextAppearance!==void 0&&(i[Te(e,"textTextAppearance")]=t.textTextAppearance),i}function sr(e={},t){return Ci.reduce((n,r)=>({...n,...tu(r,eu(r,e),t)}),{})}const nu=sr(),ru=_d();function ia(e){return[Te(e,"textFontFamily"),Te(e,"textFontSettings"),Te(e,"textFontSize"),Te(e,"textLineHeight"),Te(e,"textLetterSpacing"),Te(e,"textWordSpacing"),Te(e,"textTextAlign"),Te(e,"textTextAppearance"),`${e}VerticalAlign`]}function iu(){const e=[];return xi.forEach((t,n)=>{const r=Ht[n],i=ia(t);for(let a=1;a<Ht.length;a+=1){const s=[{name:"columns",value:a},...Array.from({length:a},(c,o)=>({name:`columnsOrder.${o}`,value:r,isNotEqual:!0}))];i.forEach(c=>{e.push({if:s,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const ou=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"],au=["cutLabel","cutCellMinHeight","showCut"],su=ia(Lt),lu=[...au,...su],cu=[...yn.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Ut=[{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(1).webp",name:"List-1.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(2).webp",name:"List-2.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(3).webp",name:"List-3.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(4).webp",name:"List-4.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(5).webp",name:"List-5.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(6).webp",name:"List-6.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(7).webp",name:"List-7.png"}],du=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Ut[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Ut[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Ut[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Ut[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Ut[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Ut[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Ut[6],link:""}],uu=[...yn.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],pu={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Yd(),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:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:du},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["On","Off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["Top","Bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Cut",display:{type:"toggle-numeric-input",enum:["Off","On"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["None","Default","Blinds"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["Always","Link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["All","Custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...Xd(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},...Jd,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"On",entryHoverEffect:"Default",entryHoverShowOption:"Always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...nu,...sr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:po({columns:3,type:"B",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...sr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:po({columns:4,type:"A",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...sr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:0,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...iu(),...lu.map(e=>({if:{name:"cut",value:0},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"A"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...cu.map(e=>({if:{name:"type",value:"B"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"A"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...yn.map(e=>({if:{name:"type",value:"A"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...uu]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:[{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[ru]}],paletteBookmark:{items:[...ou],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},mu={element:Ud,id:"list",name:"Default List",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png "},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:pu,sourceCode:qd},gu=[yl,$l,pc,Cc,Rc,Dc,qc,Qc,ud,mu];exports.components=gu;exports.isSchemaV1=la;
|
|
8344
|
+
`,$n=["A","B","C","D","E"],bo=[...ri,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Yt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",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"]}}}};function ru(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function ir(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function iu(){return Object.fromEntries($n.map((e,t)=>{const n=Vt[t],r=`${e} column`;return[n,ru(r)]}))}function ou(){const e={};for(const t of $n)e[`${t}ColumnWidth`]=ir(`${t} column width`),e[`${t}ColumnPaddingLeft`]=ir(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=ir(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=ir(`${t} column padding bottom`);return e}function xo(e={}){const{typeBDefaults:t,...n}=e,r={wrapperWidth:1,columnsOrder:[...Vt]};for(const a of $n)r[`${a}ColumnWidth`]=a==="A"?.0798:.32,r[`${a}ColumnPaddingLeft`]=0,r[`${a}ColumnPaddingRight`]=0,r[`${a}ColumnPaddingBottom`]=0;const i=n.type==="b"&&t?t:{};return{...r,...i,...n}}function au(e){const t={};if(e===It)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...ri]},enum:[...ri]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...bo],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...bo]}}return t[Se(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Se(e,"textFontSettings")]={...Yt.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Se(e,"textFontSize")]={...Yt.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Se(e,"textLineHeight")]={...Yt.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Se(e,"textLetterSpacing")]={...Yt.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Se(e,"textWordSpacing")]={...Yt.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Se(e,"textTextAlign")]={...Yt.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Se(e,"textTextAppearance")]={...Yt.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const su=Ei.reduce((e,t)=>({...e,...au(t)}),{});function lu(e){return{verticalAlign:e===It?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===It?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function cu(e,t={}){var n;return{...lu(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Co=new Set(["textFontFamily","textFontSettings"]);function du(e,t,n){const r=a=>n===void 0?!0:n==="common"?Co.has(a):!Co.has(a),i={};return r("verticalAlign")&&t.verticalAlign!==void 0&&(i[`${e}VerticalAlign`]=Pi(t.verticalAlign)),r("textFontFamily")&&t.textFontFamily!==void 0&&(i[Se(e,"textFontFamily")]=t.textFontFamily),r("textFontSettings")&&t.textFontSettings!==void 0&&(i[Se(e,"textFontSettings")]=t.textFontSettings),r("textFontSize")&&t.textFontSize!==void 0&&(i[Se(e,"textFontSize")]=t.textFontSize),r("textLineHeight")&&t.textLineHeight!==void 0&&(i[Se(e,"textLineHeight")]=t.textLineHeight),r("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(i[Se(e,"textLetterSpacing")]=t.textLetterSpacing),r("textWordSpacing")&&t.textWordSpacing!==void 0&&(i[Se(e,"textWordSpacing")]=t.textWordSpacing),r("textTextAlign")&&t.textTextAlign!==void 0&&(i[Se(e,"textTextAlign")]=t.textTextAlign),r("textTextAppearance")&&t.textTextAppearance!==void 0&&(i[Se(e,"textTextAppearance")]=t.textTextAppearance),i}function pr(e={},t){return Ei.reduce((n,r)=>({...n,...du(r,cu(r,e),t)}),{})}const uu=pr(),pu=Hd();function pa(e){return[Se(e,"textFontFamily"),Se(e,"textFontSettings"),Se(e,"textFontSize"),Se(e,"textLineHeight"),Se(e,"textLetterSpacing"),Se(e,"textWordSpacing"),Se(e,"textTextAlign"),Se(e,"textTextAppearance"),`${e}VerticalAlign`]}function mu(){const e=[];return Li.forEach((t,n)=>{const r=Vt[n],i=pa(t);for(let a=1;a<Vt.length;a+=1){const s=[{name:"columns",value:a},...Array.from({length:a},(c,o)=>({name:`columnsOrder.${o}`,value:r,isNotEqual:!0}))];i.forEach(c=>{e.push({if:s,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const gu=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"],hu=["cutLabel","cutCellMinHeight","showCut"],fu=pa(It),yu=[...hu,...fu],vu=[...$n.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Xt=[{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(1).webp"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(2).webp"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(3).webp"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(4).webp"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(5).webp"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(6).webp"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(7).webp"}],bu=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Xt[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Xt[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Xt[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Xt[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Xt[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Xt[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Xt[6],link:""}],xu=[...$n.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Cu={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...iu(),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:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:bu},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Cut",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...ou(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},...su,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...uu,...pr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:xo({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...pr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:xo({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...pr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:0,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...mu(),...yu.map(e=>({if:{name:"cut",value:0},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...vu.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...$n.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...xu]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:[{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[pu]}],paletteBookmark:{items:[...gu],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Su={element:tu,id:"list",name:"Default List",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Cu,sourceCode:nu},$u=[Tl,Il,xc,_c,Bc,Zc,nd,ld,xd,Su];exports.components=$u;exports.isSchemaV1=fa;
|