@cntrl-site/components 1.0.17-8 → 1.0.17-9
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/FAQ/FAQ.d.ts +1 -63
- package/dist/Components/FAQ/FAQConstants.d.ts +5 -0
- package/dist/Components/FAQ/FAQStyles.d.ts +1 -0
- package/dist/Components/FAQ/FAQTypes.d.ts +63 -0
- package/dist/Components/FAQ/FAQTypography.d.ts +6 -0
- package/dist/Components/helpers/PaddingControl/PaddingControl.d.ts +9 -0
- package/dist/index.js +81 -509
- package/dist/index.mjs +2088 -2538
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),d=require("react"),Re=require("classnames"),y=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Ii=require("react-dom");function La(e){return e.type==="object"&&e.version===1}const Pa="ControlSlider-module__wrapper___sHEkd",Ea="ControlSlider-module__hoverArrow___A-dOH",_a="ControlSlider-module__sliderItem___QQSkR",Aa="ControlSlider-module__sliderImage___9hRl-",Ia="ControlSlider-module__arrow___05ghY",Ra="ControlSlider-module__arrowVertical___tBfVN",ka="ControlSlider-module__nextArrow___-30Yc",Wa="ControlSlider-module__arrowInner___aEra3",Fa="ControlSlider-module__arrowIcon___S4ztF",Ma="ControlSlider-module__arrowImg___2dwJW",Na="ControlSlider-module__mirror___brd6U",Ha="ControlSlider-module__pagination___bicLF",Ba="ControlSlider-module__paginationInner___bT-P-",Oa="ControlSlider-module__paginationVertical___zYqKw",Va="ControlSlider-module__paginationItem___nTRbk",Da="ControlSlider-module__dot___p1Qun",za="ControlSlider-module__activeDot___LHFaj",ja="ControlSlider-module__paginationInsideBottom___R3FWn",qa="ControlSlider-module__paginationInsideTop___V-qb-",Ka="ControlSlider-module__paginationOutsideBottom___14w8D",Ua="ControlSlider-module__paginationOutsideTop___SCLqB",Ga="ControlSlider-module__paginationInsideLeft___yOBRZ",Ya="ControlSlider-module__paginationInsideRight___Rtt3o",Xa="ControlSlider-module__paginationOutsideLeft___lahaw",Qa="ControlSlider-module__paginationOutsideRight___EtuQa",Za="ControlSlider-module__imgWrapper___UjEgB",Ja="ControlSlider-module__captionBlock___dJ6-j",es="ControlSlider-module__captionTextWrapper___HFlpf",ts="ControlSlider-module__captionText___uGBVc",ns="ControlSlider-module__active___WZK4G",rs="ControlSlider-module__withPointerEvents___t-18M",os="ControlSlider-module__topLeftAlignment___zjnGM",is="ControlSlider-module__topCenterAlignment___gD1xW",as="ControlSlider-module__topRightAlignment___NMapS",ss="ControlSlider-module__middleLeftAlignment___OnUrY",ls="ControlSlider-module__middleCenterAlignment___Tdkl0",cs="ControlSlider-module__middleRightAlignment___wEbfX",ds="ControlSlider-module__bottomLeftAlignment___cTP2-",us="ControlSlider-module__bottomCenterAlignment___c54fB",ps="ControlSlider-module__bottomRightAlignment___kEwrz",ms="ControlSlider-module__clickOverlay___DZA28",gs="ControlSlider-module__contain___pLyq7",hs="ControlSlider-module__cover___KdDat",de={wrapper:Pa,hoverArrow:Ea,sliderItem:_a,sliderImage:Aa,arrow:Ia,arrowVertical:Ra,nextArrow:ka,arrowInner:Wa,arrowIcon:Fa,arrowImg:Ma,mirror:Na,pagination:Ha,paginationInner:Ba,paginationVertical:Oa,paginationItem:Va,dot:Da,activeDot:za,paginationInsideBottom:ja,paginationInsideTop:qa,paginationOutsideBottom:Ka,paginationOutsideTop:Ua,paginationInsideLeft:Ga,paginationInsideRight:Ya,paginationOutsideLeft:Xa,paginationOutsideRight:Qa,imgWrapper:Za,captionBlock:Ja,captionTextWrapper:es,captionText:ts,active:ns,withPointerEvents:rs,topLeftAlignment:os,topCenterAlignment:is,topRightAlignment:as,middleLeftAlignment:ss,middleCenterAlignment:ls,middleRightAlignment:cs,bottomLeftAlignment:ds,bottomCenterAlignment:us,bottomRightAlignment:ps,clickOverlay:ms,contain:gs,cover:hs};function fs(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 ys(e,t,n){return t&&fs(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ho="(prefers-reduced-motion: reduce)",fn=1,vs=2,bn=3,Ln=4,jn=5,cr=6,fr=7,bs={CREATED:fn,MOUNTED:vs,IDLE:bn,MOVING:Ln,SCROLLING:jn,DRAGGING:cr,DESTROYED:fr};function Bt(e){e.length=0}function Qt(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ne(e){return e.bind.apply(e,[null].concat(Qt(arguments,1)))}var Ri=setTimeout,Qr=function(){};function Bo(e){return requestAnimationFrame(e)}function Sr(e,t){return typeof t===e}function Wn(e){return!lo(e)&&Sr("object",e)}var so=Array.isArray,ki=Ne(Sr,"function"),Gt=Ne(Sr,"string"),qn=Ne(Sr,"undefined");function lo(e){return e===null}function Wi(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Kn(e){return so(e)?e:[e]}function bt(e,t){Kn(e).forEach(t)}function co(e,t){return e.indexOf(t)>-1}function dr(e,t){return e.push.apply(e,Kn(t)),e}function Wt(e,t,n){e&&bt(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function Tt(e,t){Wt(e,Gt(t)?t.split(" "):t,!0)}function Un(e,t){bt(t,e.appendChild.bind(e))}function uo(e,t){bt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function Fn(e,t){return Wi(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Fi(e,t){var n=e?Qt(e.children):[];return t?n.filter(function(r){return Fn(r,t)}):n}function Gn(e,t){return t?Fi(e,t)[0]:e.firstElementChild}var Mn=Object.keys;function rn(e,t,n){return e&&(n?Mn(e).reverse():Mn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function Nn(e){return Qt(arguments,1).forEach(function(t){rn(t,function(n,r){e[r]=t[r]})}),e}function Ut(e){return Qt(arguments,1).forEach(function(t){rn(t,function(n,r){so(n)?e[r]=n.slice():Wn(n)?e[r]=Ut({},Wn(e[r])?e[r]:{},n):e[r]=n})}),e}function Oo(e,t){bt(t||Mn(e),function(n){delete e[n]})}function Lt(e,t){bt(e,function(n){bt(t,function(r){n&&n.removeAttribute(r)})})}function Ce(e,t,n){Wn(t)?rn(t,function(r,i){Ce(e,i,r)}):bt(e,function(r){lo(n)||n===""?Lt(r,t):r.setAttribute(t,String(n))})}function yn(e,t,n){var r=document.createElement(e);return t&&(Gt(t)?Tt(r,t):Ce(r,t)),n&&Un(n,r),r}function St(e,t,n){if(qn(n))return getComputedStyle(e)[t];lo(n)||(e.style[t]=""+n)}function Hn(e,t){St(e,"display",t)}function Mi(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function $t(e,t){return e.getAttribute(t)}function Vo(e,t){return e&&e.classList.contains(t)}function ht(e){return e.getBoundingClientRect()}function on(e){bt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Ni(e){return Gn(new DOMParser().parseFromString(e,"text/html").body)}function kt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Hi(e,t){return e&&e.querySelector(t)}function po(e,t){return t?Qt(e.querySelectorAll(t)):[]}function Ft(e,t){Wt(e,t,!1)}function Zr(e){return e.timeStamp}function en(e){return Gt(e)?e:e?e+"px":""}var Yn="splide",mo="data-"+Yn;function In(e,t){if(!e)throw new Error("["+Yn+"] "+(t||""))}var Yt=Math.min,yr=Math.max,vr=Math.floor,Bn=Math.ceil,ot=Math.abs;function Bi(e,t,n){return ot(e-t)<n}function ur(e,t,n,r){var i=Yt(t,n),l=yr(t,n);return r?i<e&&e<l:i<=e&&e<=l}function mn(e,t,n){var r=Yt(t,n),i=yr(t,n);return Yt(yr(r,e),i)}function Jr(e){return+(e>0)-+(e<0)}function eo(e,t){return bt(t,function(n){e=e.replace("%s",""+n)}),e}function go(e){return e<10?"0"+e:""+e}var Do={};function xs(e){return""+e+go(Do[e]=(Do[e]||0)+1)}function Oi(){var e=[];function t(o,c,s,p){i(o,c,function(u,T,x){var f="addEventListener"in u,m=f?u.removeEventListener.bind(u,T,s,p):u.removeListener.bind(u,s);f?u.addEventListener(T,s,p):u.addListener(s),e.push([u,T,x,s,m])})}function n(o,c,s){i(o,c,function(p,u,T){e=e.filter(function(x){return x[0]===p&&x[1]===u&&x[2]===T&&(!s||x[3]===s)?(x[4](),!1):!0})})}function r(o,c,s){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(c,{bubbles:u,detail:s}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(c,u,!1,s)),o.dispatchEvent(p),p}function i(o,c,s){bt(o,function(p){p&&bt(c,function(u){u.split(" ").forEach(function(T){var x=T.split(".");s(p,x[0],x[1])})})})}function l(){e.forEach(function(o){o[4]()}),Bt(e)}return{bind:t,unbind:n,dispatch:r,destroy:l}}var Zt="mounted",to="ready",Ot="move",Pn="moved",ho="click",Vi="active",Di="inactive",zi="visible",ji="hidden",qe="refresh",et="updated",xn="resize",$r="resized",qi="drag",Ki="dragging",Ui="dragged",wr="scroll",sn="scrolled",Cs="overflow",fo="destroy",Gi="arrows:mounted",Yi="arrows:updated",Xi="pagination:mounted",Qi="pagination:updated",yo="navigation:mounted",vo="autoplay:play",Zi="autoplay:playing",bo="autoplay:pause",xo="lazyload:loaded",Ji="sk",ea="sh",br="ei";function Oe(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Oi();function r(l,o){n.bind(t,Kn(l).join(" "),function(c){o.apply(o,so(c.detail)?c.detail:[])})}function i(l){n.dispatch(t,l,Qt(arguments,1))}return e&&e.event.on(fo,n.destroy),Nn(n,{bus:t,on:r,off:Ne(n.unbind,t),emit:i})}function Tr(e,t,n,r){var i=Date.now,l,o=0,c,s=!0,p=0;function u(){if(!s){if(o=e?Yt((i()-l)/e,1):1,n&&n(o),o>=1&&(t(),l=i(),r&&++p>=r))return x();c=Bo(u)}}function T(w){w||m(),l=i()-(w?o*e:0),s=!1,c=Bo(u)}function x(){s=!0}function f(){l=i(),o=0,n&&n(o)}function m(){c&&cancelAnimationFrame(c),o=0,c=0,s=!0}function g(w){e=w}function C(){return s}return{start:T,rewind:f,pause:x,cancel:m,set:g,isPaused:C}}function Ss(e){var t=e;function n(i){t=i}function r(i){return co(Kn(i),t)}return{set:n,is:r}}function $s(e,t){var n=Tr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ws(e,t,n){var r=e.state,i=n.breakpoints||{},l=n.reducedMotion||{},o=Oi(),c=[];function s(){var m=n.mediaQuery==="min";Mn(i).sort(function(g,C){return m?+g-+C:+C-+g}).forEach(function(g){u(i[g],"("+(m?"min":"max")+"-width:"+g+"px)")}),u(l,Ho),T()}function p(m){m&&o.destroy()}function u(m,g){var C=matchMedia(g);o.bind(C,"change",T),c.push([m,C])}function T(){var m=r.is(fr),g=n.direction,C=c.reduce(function(w,S){return Ut(w,S[1].matches?S[0]:{})},{});Oo(n),f(C),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):g!==n.direction&&e.refresh()}function x(m){matchMedia(Ho).matches&&(m?Ut(n,l):Oo(n,Mn(l)))}function f(m,g,C){Ut(n,m),g&&Ut(Object.getPrototypeOf(n),m),(C||!r.is(fn))&&e.emit(et,n)}return{setup:s,destroy:p,reduce:x,set:f}}var Lr="Arrow",Pr=Lr+"Left",Er=Lr+"Right",ta=Lr+"Up",na=Lr+"Down",zo="rtl",_r="ttb",Hr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[ta,Er],ArrowRight:[na,Pr]};function Ts(e,t,n){function r(l,o,c){c=c||n.direction;var s=c===zo&&!o?1:c===_r?0:-1;return Hr[l]&&Hr[l][s]||l.replace(/width|left|right/i,function(p,u){var T=Hr[p.toLowerCase()][s]||p;return u>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function i(l){return l*(n.direction===zo?1:-1)}return{resolve:r,orient:i}}var Mt="role",vn="tabindex",Ls="disabled",wt="aria-",Xn=wt+"controls",ra=wt+"current",jo=wt+"selected",ft=wt+"label",Co=wt+"labelledby",oa=wt+"hidden",So=wt+"orientation",On=wt+"roledescription",qo=wt+"live",Ko=wt+"busy",Uo=wt+"atomic",$o=[Mt,vn,Ls,Xn,ra,ft,Co,oa,So,On],Pt=Yn+"__",Jt="is-",Br=Yn,Go=Pt+"track",Ps=Pt+"list",Ar=Pt+"slide",ia=Ar+"--clone",Es=Ar+"__container",wo=Pt+"arrows",Ir=Pt+"arrow",aa=Ir+"--prev",sa=Ir+"--next",Rr=Pt+"pagination",la=Rr+"__page",_s=Pt+"progress",As=_s+"__bar",Is=Pt+"toggle",Rs=Pt+"spinner",ks=Pt+"sr",Ws=Jt+"initialized",an=Jt+"active",ca=Jt+"prev",da=Jt+"next",no=Jt+"visible",ro=Jt+"loading",ua=Jt+"focus-in",pa=Jt+"overflow",Fs=[an,no,ca,da,ro,ua,pa],Ms={slide:Ar,clone:ia,arrows:wo,arrow:Ir,prev:aa,next:sa,pagination:Rr,page:la,spinner:Rs};function Ns(e,t){if(ki(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Fn(n,t);)n=n.parentElement;return n}var Hs=5,Yo=200,ma="touchstart mousedown",Or="touchmove mousemove",Vr="touchend touchcancel mouseup click";function Bs(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=e.root,c=n.i18n,s={},p=[],u=[],T=[],x,f,m;function g(){v(),M(),S()}function C(){i(qe,w),i(qe,g),i(et,S),l(document,ma+" keydown",function(b){m=b.type==="keydown"},{capture:!0}),l(o,"focusin",function(){Wt(o,ua,!!m)})}function w(b){var P=$o.concat("style");Bt(p),Ft(o,u),Ft(x,T),Lt([x,f],P),Lt(o,b?P:["style",On])}function S(){Ft(o,u),Ft(x,T),u=N(Br),T=N(Go),Tt(o,u),Tt(x,T),Ce(o,ft,n.label),Ce(o,Co,n.labelledby)}function v(){x=L("."+Go),f=Gn(x,"."+Ps),In(x&&f,"A track/list element is missing."),dr(p,Fi(f,"."+Ar+":not(."+ia+")")),rn({arrows:wo,pagination:Rr,prev:aa,next:sa,bar:As,toggle:Is},function(b,P){s[P]=L("."+b)}),Nn(s,{root:o,track:x,list:f,slides:p})}function M(){var b=o.id||xs(Yn),P=n.role;o.id=b,x.id=x.id||b+"-track",f.id=f.id||b+"-list",!$t(o,Mt)&&o.tagName!=="SECTION"&&P&&Ce(o,Mt,P),Ce(o,On,c.carousel),Ce(f,Mt,"presentation")}function L(b){var P=Hi(o,b);return P&&Ns(P,"."+Br)===o?P:void 0}function N(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===Br&&an]}return Nn(s,{setup:g,mount:C,destroy:w})}var Cn="slide",En="loop",Qn="fade";function Os(e,t,n,r){var i=Oe(e),l=i.on,o=i.emit,c=i.bind,s=e.Components,p=e.root,u=e.options,T=u.isNavigation,x=u.updateOnMove,f=u.i18n,m=u.pagination,g=u.slideFocus,C=s.Direction.resolve,w=$t(r,"style"),S=$t(r,ft),v=n>-1,M=Gn(r,"."+Es),L;function N(){v||(r.id=p.id+"-slide"+go(t+1),Ce(r,Mt,m?"tabpanel":"group"),Ce(r,On,f.slide),Ce(r,ft,S||eo(f.slideLabel,[t+1,e.length]))),b()}function b(){c(r,"click",Ne(o,ho,D)),c(r,"keydown",Ne(o,Ji,D)),l([Pn,ea,sn],E),l(yo,O),x&&l(Ot,$)}function P(){L=!0,i.destroy(),Ft(r,Fs),Lt(r,$o),Ce(r,"style",w),Ce(r,ft,S||"")}function O(){var H=e.splides.map(function(I){var K=I.splide.Components.Slides.getAt(t);return K?K.slide.id:""}).join(" ");Ce(r,ft,eo(f.slideX,(v?n:t)+1)),Ce(r,Xn,H),Ce(r,Mt,g?"button":""),g&&Lt(r,On)}function $(){L||E()}function E(){if(!L){var H=e.index;A(),W(),Wt(r,ca,t===H-1),Wt(r,da,t===H+1)}}function A(){var H=te();H!==Vo(r,an)&&(Wt(r,an,H),Ce(r,ra,T&&H||""),o(H?Vi:Di,D))}function W(){var H=k(),I=!H&&(!te()||v);if(e.state.is([Ln,jn])||Ce(r,oa,I||""),Ce(po(r,u.focusableNodes||""),vn,I?-1:""),g&&Ce(r,vn,I?-1:0),H!==Vo(r,no)&&(Wt(r,no,H),o(H?zi:ji,D)),!H&&document.activeElement===r){var K=s.Slides.getAt(e.index);K&&Mi(K.slide)}}function j(H,I,K){St(K&&M||r,H,I)}function te(){var H=e.index;return H===t||u.cloneStatus&&H===n}function k(){if(e.is(Qn))return te();var H=ht(s.Elements.track),I=ht(r),K=C("left",!0),Q=C("right",!0);return vr(H[K])<=Bn(I[K])&&vr(I[Q])<=Bn(H[Q])}function F(H,I){var K=ot(H-t);return!v&&(u.rewind||e.is(En))&&(K=Yt(K,e.length-K)),K<=I}var D={index:t,slideIndex:n,slide:r,container:M,isClone:v,mount:N,destroy:P,update:E,style:j,isWithin:F};return D}function Vs(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=r.bind,c=t.Elements,s=c.slides,p=c.list,u=[];function T(){x(),i(qe,f),i(qe,x)}function x(){s.forEach(function(E,A){g(E,A,-1)})}function f(){L(function(E){E.destroy()}),Bt(u)}function m(){L(function(E){E.update()})}function g(E,A,W){var j=Os(e,A,W,E);j.mount(),u.push(j),u.sort(function(te,k){return te.index-k.index})}function C(E){return E?N(function(A){return!A.isClone}):u}function w(E){var A=t.Controller,W=A.toIndex(E),j=A.hasFocus()?1:n.perPage;return N(function(te){return ur(te.index,W,W+j-1)})}function S(E){return N(E)[0]}function v(E,A){bt(E,function(W){if(Gt(W)&&(W=Ni(W)),Wi(W)){var j=s[A];j?uo(W,j):Un(p,W),Tt(W,n.classes.slide),P(W,Ne(l,xn))}}),l(qe)}function M(E){on(N(E).map(function(A){return A.slide})),l(qe)}function L(E,A){C(A).forEach(E)}function N(E){return u.filter(ki(E)?E:function(A){return Gt(E)?Fn(A.slide,E):co(Kn(E),A.index)})}function b(E,A,W){L(function(j){j.style(E,A,W)})}function P(E,A){var W=po(E,"img"),j=W.length;j?W.forEach(function(te){o(te,"load error",function(){--j||A()})}):A()}function O(E){return E?s.length:u.length}function $(){return u.length>n.perPage}return{mount:T,destroy:f,update:m,register:g,get:C,getIn:w,getAt:S,add:v,remove:M,forEach:L,filter:N,style:b,getLength:O,isEnough:$}}function Ds(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=r.emit,c=t.Slides,s=t.Direction.resolve,p=t.Elements,u=p.root,T=p.track,x=p.list,f=c.getAt,m=c.style,g,C,w;function S(){v(),l(window,"resize load",$s(Ne(o,xn))),i([et,qe],v),i(xn,M)}function v(){g=n.direction===_r,St(u,"maxWidth",en(n.width)),St(T,s("paddingLeft"),L(!1)),St(T,s("paddingRight"),L(!0)),M(!0)}function M(D){var H=ht(u);(D||C.width!==H.width||C.height!==H.height)&&(St(T,"height",N()),m(s("marginRight"),en(n.gap)),m("width",P()),m("height",O(),!0),C=H,o($r),w!==(w=F())&&(Wt(u,pa,w),o(Cs,w)))}function L(D){var H=n.padding,I=s(D?"right":"left");return H&&en(H[I]||(Wn(H)?0:H))||"0px"}function N(){var D="";return g&&(D=b(),In(D,"height or heightRatio is missing."),D="calc("+D+" - "+L(!1)+" - "+L(!0)+")"),D}function b(){return en(n.height||ht(x).width*n.heightRatio)}function P(){return n.autoWidth?null:en(n.fixedWidth)||(g?"":$())}function O(){return en(n.fixedHeight)||(g?n.autoHeight?null:$():b())}function $(){var D=en(n.gap);return"calc((100%"+(D&&" + "+D)+")/"+(n.perPage||1)+(D&&" - "+D)+")"}function E(){return ht(x)[s("width")]}function A(D,H){var I=f(D||0);return I?ht(I.slide)[s("width")]+(H?0:te()):0}function W(D,H){var I=f(D);if(I){var K=ht(I.slide)[s("right")],Q=ht(x)[s("left")];return ot(K-Q)+(H?0:te())}return 0}function j(D){return W(e.length-1)-W(0)+A(0,D)}function te(){var D=f(0);return D&&parseFloat(St(D.slide,s("marginRight")))||0}function k(D){return parseFloat(St(T,s("padding"+(D?"Right":"Left"))))||0}function F(){return e.is(Qn)||j(!0)>E()}return{mount:S,resize:M,listSize:E,slideSize:A,sliderSize:j,totalSize:W,getPadding:k,isOverflow:F}}var zs=2;function js(e,t,n){var r=Oe(e),i=r.on,l=t.Elements,o=t.Slides,c=t.Direction.resolve,s=[],p;function u(){i(qe,T),i([et,xn],f),(p=C())&&(m(p),t.Layout.resize(!0))}function T(){x(),u()}function x(){on(s),Bt(s),r.destroy()}function f(){var w=C();p!==w&&(p<w||!w)&&r.emit(qe)}function m(w){var S=o.get().slice(),v=S.length;if(v){for(;S.length<w;)dr(S,S);dr(S.slice(-w),S.slice(0,w)).forEach(function(M,L){var N=L<w,b=g(M.slide,L);N?uo(b,S[0].slide):Un(l.list,b),dr(s,b),o.register(b,L-w+(N?0:v),M.index)})}}function g(w,S){var v=w.cloneNode(!0);return Tt(v,n.classes.clone),v.id=e.root.id+"-clone"+go(S+1),v}function C(){var w=n.clones;if(!e.is(En))w=0;else if(qn(w)){var S=n[c("fixedWidth")]&&t.Layout.slideSize(0),v=S&&Bn(ht(l.track)[c("width")]/S);w=v||n[c("autoWidth")]&&e.length||n.perPage*zs}return w}return{mount:u,destroy:x}}function qs(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=e.state.set,c=t.Layout,s=c.slideSize,p=c.getPadding,u=c.totalSize,T=c.listSize,x=c.sliderSize,f=t.Direction,m=f.resolve,g=f.orient,C=t.Elements,w=C.list,S=C.track,v;function M(){v=t.Transition,i([Zt,$r,et,qe],L)}function L(){t.Controller.isBusy()||(t.Scroll.cancel(),b(e.index),t.Slides.update())}function N(I,K,Q,Z){I!==K&&D(I>Q)&&(E(),P($(j(),I>Q),!0)),o(Ln),l(Ot,K,Q,I),v.start(K,function(){o(bn),l(Pn,K,Q,I),Z&&Z()})}function b(I){P(W(I,!0))}function P(I,K){if(!e.is(Qn)){var Q=K?I:O(I);St(w,"transform","translate"+m("X")+"("+Q+"px)"),I!==Q&&l(ea)}}function O(I){if(e.is(En)){var K=A(I),Q=K>t.Controller.getEnd(),Z=K<0;(Z||Q)&&(I=$(I,Q))}return I}function $(I,K){var Q=I-F(K),Z=x();return I-=g(Z*(Bn(ot(Q)/Z)||1))*(K?1:-1),I}function E(){P(j(),!0),v.cancel()}function A(I){for(var K=t.Slides.get(),Q=0,Z=1/0,R=0;R<K.length;R++){var ne=K[R].index,h=ot(W(ne,!0)-I);if(h<=Z)Z=h,Q=ne;else break}return Q}function W(I,K){var Q=g(u(I-1)-k(I));return K?te(Q):Q}function j(){var I=m("left");return ht(w)[I]-ht(S)[I]+g(p(!1))}function te(I){return n.trimSpace&&e.is(Cn)&&(I=mn(I,0,g(x(!0)-T()))),I}function k(I){var K=n.focus;return K==="center"?(T()-s(I,!0))/2:+K*s(I)||0}function F(I){return W(I?t.Controller.getEnd():0,!!n.trimSpace)}function D(I){var K=g($(j(),I));return I?K>=0:K<=w[m("scrollWidth")]-ht(S)[m("width")]}function H(I,K){K=qn(K)?j():K;var Q=I!==!0&&g(K)<g(F(!1)),Z=I!==!1&&g(K)>g(F(!0));return Q||Z}return{mount:M,move:N,jump:b,translate:P,shift:$,cancel:E,toIndex:A,toPosition:W,getPosition:j,getLimit:F,exceededLimit:H,reposition:L}}function Ks(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=t.Move,c=o.getPosition,s=o.getLimit,p=o.toPosition,u=t.Slides,T=u.isEnough,x=u.getLength,f=n.omitEnd,m=e.is(En),g=e.is(Cn),C=Ne(j,!1),w=Ne(j,!0),S=n.start||0,v,M=S,L,N,b;function P(){O(),i([et,qe,br],O),i($r,$)}function O(){L=x(!0),N=n.perMove,b=n.perPage,v=D();var h=mn(S,0,f?v:L-1);h!==S&&(S=h,o.reposition())}function $(){v!==D()&&l(br)}function E(h,ee,ge){if(!ne()){var le=W(h),be=F(le);be>-1&&(ee||be!==S)&&(Q(be),o.move(le,be,M,ge))}}function A(h,ee,ge,le){t.Scroll.scroll(h,ee,ge,function(){var be=F(o.toIndex(c()));Q(f?Yt(be,v):be),le&&le()})}function W(h){var ee=S;if(Gt(h)){var ge=h.match(/([+\-<>])(\d+)?/)||[],le=ge[1],be=ge[2];le==="+"||le==="-"?ee=te(S+ +(""+le+(+be||1)),S):le===">"?ee=be?H(+be):C(!0):le==="<"&&(ee=w(!0))}else ee=m?h:mn(h,0,v);return ee}function j(h,ee){var ge=N||(R()?1:b),le=te(S+ge*(h?-1:1),S,!(N||R()));return le===-1&&g&&!Bi(c(),s(!h),1)?h?0:v:ee?le:F(le)}function te(h,ee,ge){if(T()||R()){var le=k(h);le!==h&&(ee=h,h=le,ge=!1),h<0||h>v?!N&&(ur(0,h,ee,!0)||ur(v,ee,h,!0))?h=H(I(h)):m?h=ge?h<0?-(L%b||b):L:h:n.rewind?h=h<0?v:0:h=-1:ge&&h!==ee&&(h=H(I(ee)+(h<ee?-1:1)))}else h=-1;return h}function k(h){if(g&&n.trimSpace==="move"&&h!==S)for(var ee=c();ee===p(h,!0)&&ur(h,0,e.length-1,!n.rewind);)h<S?--h:++h;return h}function F(h){return m?(h+L)%L||0:h}function D(){for(var h=L-(R()||m&&N?1:b);f&&h-- >0;)if(p(L-1,!0)!==p(h,!0)){h++;break}return mn(h,0,L-1)}function H(h){return mn(R()?h:b*h,0,v)}function I(h){return R()?Yt(h,v):vr((h>=v?L-1:h)/b)}function K(h){var ee=o.toIndex(h);return g?mn(ee,0,v):ee}function Q(h){h!==S&&(M=S,S=h)}function Z(h){return h?M:S}function R(){return!qn(n.focus)||n.isNavigation}function ne(){return e.state.is([Ln,jn])&&!!n.waitForTransition}return{mount:P,go:E,scroll:A,getNext:C,getPrev:w,getAdjacent:j,getEnd:D,setIndex:Q,getIndex:Z,toIndex:H,toPage:I,toDest:K,hasFocus:R,isBusy:ne}}var Us="http://www.w3.org/2000/svg",Gs="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",nr=40;function Ys(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=r.emit,c=n.classes,s=n.i18n,p=t.Elements,u=t.Controller,T=p.arrows,x=p.track,f=T,m=p.prev,g=p.next,C,w,S={};function v(){L(),i(et,M)}function M(){N(),v()}function L(){var A=n.arrows;A&&!(m&&g)&&O(),m&&g&&(Nn(S,{prev:m,next:g}),Hn(f,A?"":"none"),Tt(f,w=wo+"--"+n.direction),A&&(b(),E(),Ce([m,g],Xn,x.id),o(Gi,m,g)))}function N(){r.destroy(),Ft(f,w),C?(on(T?[m,g]:f),m=g=null):Lt([m,g],$o)}function b(){i([Zt,Pn,qe,sn,br],E),l(g,"click",Ne(P,">")),l(m,"click",Ne(P,"<"))}function P(A){u.go(A,!0)}function O(){f=T||yn("div",c.arrows),m=$(!0),g=$(!1),C=!0,Un(f,[m,g]),!T&&uo(f,x)}function $(A){var W='<button class="'+c.arrow+" "+(A?c.prev:c.next)+'" type="button"><svg xmlns="'+Us+'" viewBox="0 0 '+nr+" "+nr+'" width="'+nr+'" height="'+nr+'" focusable="false"><path d="'+(n.arrowPath||Gs)+'" />';return Ni(W)}function E(){if(m&&g){var A=e.index,W=u.getPrev(),j=u.getNext(),te=W>-1&&A<W?s.last:s.prev,k=j>-1&&A>j?s.first:s.next;m.disabled=W<0,g.disabled=j<0,Ce(m,ft,te),Ce(g,ft,k),o(Yi,m,g,W,j)}}return{arrows:S,mount:v,destroy:N,update:E}}var Xs=mo+"-interval";function Qs(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=r.emit,c=Tr(n.interval,e.go.bind(e,">"),b),s=c.isPaused,p=t.Elements,u=t.Elements,T=u.root,x=u.toggle,f=n.autoplay,m,g,C=f==="pause";function w(){f&&(S(),x&&Ce(x,Xn,p.track.id),C||v(),N())}function S(){n.pauseOnHover&&l(T,"mouseenter mouseleave",function(O){m=O.type==="mouseenter",L()}),n.pauseOnFocus&&l(T,"focusin focusout",function(O){g=O.type==="focusin",L()}),x&&l(x,"click",function(){C?v():M(!0)}),i([Ot,wr,qe],c.rewind),i(Ot,P)}function v(){s()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),g=m=C=!1,N(),o(vo))}function M(O){O===void 0&&(O=!0),C=!!O,N(),s()||(c.pause(),o(bo))}function L(){C||(m||g?M(!1):v())}function N(){x&&(Wt(x,an,!C),Ce(x,ft,n.i18n[C?"play":"pause"]))}function b(O){var $=p.bar;$&&St($,"width",O*100+"%"),o(Zi,O)}function P(O){var $=t.Slides.getAt(O);c.set($&&+$t($.slide,Xs)||n.interval)}return{mount:w,destroy:c.cancel,play:v,pause:M,isPaused:s}}function Zs(e,t,n){var r=Oe(e),i=r.on;function l(){n.cover&&(i(xo,Ne(c,!0)),i([Zt,et,qe],Ne(o,!0)))}function o(s){t.Slides.forEach(function(p){var u=Gn(p.container||p.slide,"img");u&&u.src&&c(s,u,p)})}function c(s,p,u){u.style("background",s?'center/cover no-repeat url("'+p.src+'")':"",!0),Hn(p,s?"none":"")}return{mount:l,destroy:Ne(o,!1)}}var Js=10,el=600,tl=.6,nl=1.5,rl=800;function ol(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=e.state.set,c=t.Move,s=c.getPosition,p=c.getLimit,u=c.exceededLimit,T=c.translate,x=e.is(Cn),f,m,g=1;function C(){i(Ot,M),i([et,qe],L)}function w(b,P,O,$,E){var A=s();if(M(),O&&(!x||!u())){var W=t.Layout.sliderSize(),j=Jr(b)*W*vr(ot(b)/W)||0;b=c.toPosition(t.Controller.toDest(b%W))+j}var te=Bi(A,b,1);g=1,P=te?0:P||yr(ot(b-A)/nl,rl),m=$,f=Tr(P,S,Ne(v,A,b,E),1),o(jn),l(wr),f.start()}function S(){o(bn),m&&m(),l(sn)}function v(b,P,O,$){var E=s(),A=b+(P-b)*N($),W=(A-E)*g;T(E+W),x&&!O&&u()&&(g*=tl,ot(W)<Js&&w(p(u(!0)),el,!1,m,!0))}function M(){f&&f.cancel()}function L(){f&&!f.isPaused()&&(M(),S())}function N(b){var P=n.easingFunc;return P?P(b):1-Math.pow(1-b,4)}return{mount:C,destroy:M,scroll:w,cancel:L}}var gn={passive:!1,capture:!0};function il(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=r.bind,c=r.unbind,s=e.state,p=t.Move,u=t.Scroll,T=t.Controller,x=t.Elements.track,f=t.Media.reduce,m=t.Direction,g=m.resolve,C=m.orient,w=p.getPosition,S=p.exceededLimit,v,M,L,N,b,P=!1,O,$,E;function A(){o(x,Or,Qr,gn),o(x,Vr,Qr,gn),o(x,ma,j,gn),o(x,"click",F,{capture:!0}),o(x,"dragstart",kt),i([Zt,et],W)}function W(){var V=n.drag;ce(!V),N=V==="free"}function j(V){if(O=!1,!$){var U=be(V);le(V.target)&&(U||!V.button)&&(T.isBusy()?kt(V,!0):(E=U?x:window,b=s.is([Ln,jn]),L=null,o(E,Or,te,gn),o(E,Vr,k,gn),p.cancel(),u.cancel(),D(V)))}}function te(V){if(s.is(cr)||(s.set(cr),l(qi)),V.cancelable)if(b){p.translate(v+ge(R(V)));var U=ne(V)>Yo,G=P!==(P=S());(U||G)&&D(V),O=!0,l(Ki),kt(V)}else K(V)&&(b=I(V),kt(V))}function k(V){s.is(cr)&&(s.set(bn),l(Ui)),b&&(H(V),kt(V)),c(E,Or,te),c(E,Vr,k),b=!1}function F(V){!$&&O&&kt(V,!0)}function D(V){L=M,M=V,v=w()}function H(V){var U=Q(V),G=Z(U),se=n.rewind&&n.rewindByDrag;f(!1),N?T.scroll(G,0,n.snap):e.is(Qn)?T.go(C(Jr(U))<0?se?"<":"-":se?">":"+"):e.is(Cn)&&P&&se?T.go(S(!0)?">":"<"):T.go(T.toDest(G),!0),f(!0)}function I(V){var U=n.dragMinThreshold,G=Wn(U),se=G&&U.mouse||0,ye=(G?U.touch:+U)||10;return ot(R(V))>(be(V)?ye:se)}function K(V){return ot(R(V))>ot(R(V,!0))}function Q(V){if(e.is(En)||!P){var U=ne(V);if(U&&U<Yo)return R(V)/U}return 0}function Z(V){return w()+Jr(V)*Yt(ot(V)*(n.flickPower||600),N?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function R(V,U){return ee(V,U)-ee(h(V),U)}function ne(V){return Zr(V)-Zr(h(V))}function h(V){return M===V&&L||M}function ee(V,U){return(be(V)?V.changedTouches[0]:V)["page"+g(U?"Y":"X")]}function ge(V){return V/(P&&e.is(Cn)?Hs:1)}function le(V){var U=n.noDrag;return!Fn(V,"."+la+", ."+Ir)&&(!U||!Fn(V,U))}function be(V){return typeof TouchEvent<"u"&&V instanceof TouchEvent}function re(){return b}function ce(V){$=V}return{mount:A,disable:ce,isDragging:re}}var al={Spacebar:" ",Right:Er,Left:Pr,Up:ta,Down:na};function To(e){return e=Gt(e)?e:e.key,al[e]||e}var Xo="keydown";function sl(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=r.unbind,c=e.root,s=t.Direction.resolve,p,u;function T(){x(),i(et,f),i(et,x),i(Ot,g)}function x(){var w=n.keyboard;w&&(p=w==="global"?window:c,l(p,Xo,C))}function f(){o(p,Xo)}function m(w){u=w}function g(){var w=u;u=!0,Ri(function(){u=w})}function C(w){if(!u){var S=To(w);S===s(Pr)?e.go("<"):S===s(Er)&&e.go(">")}}return{mount:T,destroy:f,disable:m}}var Rn=mo+"-lazy",pr=Rn+"-srcset",ll="["+Rn+"], ["+pr+"]";function cl(e,t,n){var r=Oe(e),i=r.on,l=r.off,o=r.bind,c=r.emit,s=n.lazyLoad==="sequential",p=[Pn,sn],u=[];function T(){n.lazyLoad&&(x(),i(qe,x))}function x(){Bt(u),f(),s?w():(l(p),i(p,m),m())}function f(){t.Slides.forEach(function(S){po(S.slide,ll).forEach(function(v){var M=$t(v,Rn),L=$t(v,pr);if(M!==v.src||L!==v.srcset){var N=n.classes.spinner,b=v.parentElement,P=Gn(b,"."+N)||yn("span",N,b);u.push([v,S,P]),v.src||Hn(v,"none")}})})}function m(){u=u.filter(function(S){var v=n.perPage*((n.preloadPages||1)+1)-1;return S[1].isWithin(e.index,v)?g(S):!0}),u.length||l(p)}function g(S){var v=S[0];Tt(S[1].slide,ro),o(v,"load error",Ne(C,S)),Ce(v,"src",$t(v,Rn)),Ce(v,"srcset",$t(v,pr)),Lt(v,Rn),Lt(v,pr)}function C(S,v){var M=S[0],L=S[1];Ft(L.slide,ro),v.type!=="error"&&(on(S[2]),Hn(M,""),c(xo,M,L),c(xn)),s&&w()}function w(){u.length&&g(u.shift())}return{mount:T,destroy:Ne(Bt,u),check:m}}function dl(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=r.bind,c=t.Slides,s=t.Elements,p=t.Controller,u=p.hasFocus,T=p.getIndex,x=p.go,f=t.Direction.resolve,m=s.pagination,g=[],C,w;function S(){v(),i([et,qe,br],S);var $=n.pagination;m&&Hn(m,$?"":"none"),$&&(i([Ot,wr,sn],O),M(),O(),l(Xi,{list:C,items:g},P(e.index)))}function v(){C&&(on(m?Qt(C.children):C),Ft(C,w),Bt(g),C=null),r.destroy()}function M(){var $=e.length,E=n.classes,A=n.i18n,W=n.perPage,j=u()?p.getEnd()+1:Bn($/W);C=m||yn("ul",E.pagination,s.track.parentElement),Tt(C,w=Rr+"--"+b()),Ce(C,Mt,"tablist"),Ce(C,ft,A.select),Ce(C,So,b()===_r?"vertical":"");for(var te=0;te<j;te++){var k=yn("li",null,C),F=yn("button",{class:E.page,type:"button"},k),D=c.getIn(te).map(function(I){return I.slide.id}),H=!u()&&W>1?A.pageX:A.slideX;o(F,"click",Ne(L,te)),n.paginationKeyboard&&o(F,"keydown",Ne(N,te)),Ce(k,Mt,"presentation"),Ce(F,Mt,"tab"),Ce(F,Xn,D.join(" ")),Ce(F,ft,eo(H,te+1)),Ce(F,vn,-1),g.push({li:k,button:F,page:te})}}function L($){x(">"+$,!0)}function N($,E){var A=g.length,W=To(E),j=b(),te=-1;W===f(Er,!1,j)?te=++$%A:W===f(Pr,!1,j)?te=(--$+A)%A:W==="Home"?te=0:W==="End"&&(te=A-1);var k=g[te];k&&(Mi(k.button),x(">"+te),kt(E,!0))}function b(){return n.paginationDirection||n.direction}function P($){return g[p.toPage($)]}function O(){var $=P(T(!0)),E=P(T());if($){var A=$.button;Ft(A,an),Lt(A,jo),Ce(A,vn,-1)}if(E){var W=E.button;Tt(W,an),Ce(W,jo,!0),Ce(W,vn,"")}l(Qi,{list:C,items:g},$,E)}return{items:g,mount:S,destroy:v,getAt:P,update:O}}var ul=[" ","Enter"];function pl(e,t,n){var r=n.isNavigation,i=n.slideFocus,l=[];function o(){e.splides.forEach(function(m){m.isParent||(p(e,m.splide),p(m.splide,e))}),r&&u()}function c(){l.forEach(function(m){m.destroy()}),Bt(l)}function s(){c(),o()}function p(m,g){var C=Oe(m);C.on(Ot,function(w,S,v){g.go(g.is(En)?v:w)}),l.push(C)}function u(){var m=Oe(e),g=m.on;g(ho,x),g(Ji,f),g([Zt,et],T),l.push(m),m.emit(yo,e.splides)}function T(){Ce(t.Elements.list,So,n.direction===_r?"vertical":"")}function x(m){e.go(m.index)}function f(m,g){co(ul,To(g))&&(x(m),kt(g))}return{setup:Ne(t.Media.set,{slideFocus:qn(i)?r:i},!0),mount:o,destroy:c,remount:s}}function ml(e,t,n){var r=Oe(e),i=r.bind,l=0;function o(){n.wheel&&i(t.Elements.track,"wheel",c,gn)}function c(p){if(p.cancelable){var u=p.deltaY,T=u<0,x=Zr(p),f=n.wheelMinThreshold||0,m=n.wheelSleep||0;ot(u)>f&&x-l>m&&(e.go(T?"<":">"),l=x),s(T)&&kt(p)}}function s(p){return!n.releaseWheel||e.state.is(Ln)||t.Controller.getAdjacent(p)!==-1}return{mount:o}}var gl=90;function hl(e,t,n){var r=Oe(e),i=r.on,l=t.Elements.track,o=n.live&&!n.isNavigation,c=yn("span",ks),s=Tr(gl,Ne(u,!1));function p(){o&&(x(!t.Autoplay.isPaused()),Ce(l,Uo,!0),c.textContent="…",i(vo,Ne(x,!0)),i(bo,Ne(x,!1)),i([Pn,sn],Ne(u,!0)))}function u(f){Ce(l,Ko,f),f?(Un(l,c),s.start()):(on(c),s.cancel())}function T(){Lt(l,[qo,Uo,Ko]),on(c)}function x(f){o&&Ce(l,qo,f?"off":"polite")}return{mount:p,disable:x,destroy:T}}var fl=Object.freeze({__proto__:null,Media:ws,Direction:Ts,Elements:Bs,Slides:Vs,Layout:Ds,Clones:js,Move:qs,Controller:Ks,Arrows:Ys,Autoplay:Qs,Cover:Zs,Scroll:ol,Drag:il,Keyboard:sl,LazyLoad:cl,Pagination:dl,Sync:pl,Wheel:ml,Live:hl}),yl={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"},vl={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:Ms,i18n:yl,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function bl(e,t,n){var r=t.Slides;function i(){Oe(e).on([Zt,qe],l)}function l(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function o(c,s){r.style("transition","opacity "+n.speed+"ms "+n.easing),Ri(s)}return{mount:i,start:o,cancel:Qr}}function xl(e,t,n){var r=t.Move,i=t.Controller,l=t.Scroll,o=t.Elements.list,c=Ne(St,o,"transition"),s;function p(){Oe(e).bind(o,"transitionend",function(f){f.target===o&&s&&(T(),s())})}function u(f,m){var g=r.toPosition(f,!0),C=r.getPosition(),w=x(f);ot(g-C)>=1&&w>=1?n.useScroll?l.scroll(g,w,!1,m):(c("transform "+w+"ms "+n.easing),r.translate(g,!0),s=m):(r.jump(f),m())}function T(){c(""),l.cancel()}function x(f){var m=n.rewindSpeed;if(e.is(Cn)&&m){var g=i.getIndex(!0),C=i.getEnd();if(g===0&&f>=C||g>=C&&f===0)return m}return n.speed}return{mount:p,start:u,cancel:T}}var Cl=(function(){function e(n,r){this.event=Oe(),this.Components={},this.state=Ss(fn),this.splides=[],this._o={},this._E={};var i=Gt(n)?Hi(document,n):n;In(i,i+" is invalid."),this.root=i,r=Ut({label:$t(i,ft)||"",labelledby:$t(i,Co)||""},vl,e.defaults,r||{});try{Ut(r,JSON.parse($t(i,mo)))}catch{In(!1,"Invalid JSON")}this._o=Object.create(Ut({},r))}var t=e.prototype;return t.mount=function(r,i){var l=this,o=this.state,c=this.Components;In(o.is([fn,fr]),"Already mounted!"),o.set(fn),this._C=c,this._T=i||this._T||(this.is(Qn)?bl:xl),this._E=r||this._E;var s=Nn({},fl,this._E,{Transition:this._T});return rn(s,function(p,u){var T=p(l,c,l._o);c[u]=T,T.setup&&T.setup()}),rn(c,function(p){p.mount&&p.mount()}),this.emit(Zt),Tt(this.root,Ws),o.set(bn),this.emit(to),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(bn)&&(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(Qt(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(qe),this},t.destroy=function(r){r===void 0&&(r=!0);var i=this.event,l=this.state;return l.is(fn)?Oe(this).on(to,this.destroy.bind(this,r)):(rn(this._C,function(o){o.destroy&&o.destroy(r)},!0),i.emit(fo),i.destroy(),r&&Bt(this.splides),l.set(fr)),this},ys(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})(),Lo=Cl;Lo.defaults={};Lo.STATES=bs;var Qo=[[Zt,"onMounted"],[to,"onReady"],[Ot,"onMove"],[Pn,"onMoved"],[ho,"onClick"],[Vi,"onActive"],[Di,"onInactive"],[zi,"onVisible"],[ji,"onHidden"],[qe,"onRefresh"],[et,"onUpdated"],[xn,"onResize"],[$r,"onResized"],[qi,"onDrag"],[Ki,"onDragging"],[Ui,"onDragged"],[wr,"onScroll"],[sn,"onScrolled"],[fo,"onDestroy"],[Gi,"onArrowsMounted"],[Yi,"onArrowsUpdated"],[Xi,"onPaginationMounted"],[Qi,"onPaginationUpdated"],[yo,"onNavigationMounted"],[vo,"onAutoplayPlay"],[Zi,"onAutoplayPlaying"],[bo,"onAutoplayPause"],[xo,"onLazyLoadLoaded"]];function Po(...e){return e.filter(Boolean).join(" ")}function xr(e){return e!==null&&typeof e=="object"}function oo(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!oo(n,t[r]));if(xr(e)&&xr(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(i=>!Object.prototype.hasOwnProperty.call(t,i)||!oo(e[i],t[i]))}return e===t}function Sl(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function $l(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 io(e,t){const n=e;return $l(t,(r,i)=>{Array.isArray(r)?n[i]=r.slice():xr(r)?n[i]=io(xr(n[i])?n[i]:{},r):n[i]=r}),n}var wl=({children:e,className:t,...n})=>d.createElement("div",{className:Po("splide__track",t),...n},d.createElement("ul",{className:"splide__list"},e)),Eo=class extends d.Component{constructor(){super(...arguments),this.splideRef=d.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new Lo(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=io({},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&&!oo(this.options,e)&&(this.splide.options=e,this.options=io({},e));const t=this.getSlides();Sl(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){Qo.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 d.createElement(t,{className:Po("splide",e),ref:this.splideRef,...this.omit(i,["options",...Qo.map(l=>l[1])])},n?d.createElement(wl,null,r):r)}},_o=({children:e,className:t,...n})=>d.createElement("li",{className:Po("splide__slide",t),...n},e);/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),d=require("react"),Pe=require("classnames"),y=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),_o=require("react-dom");function wa(e){return e.type==="object"&&e.version===1}const Ta="ControlSlider-module__wrapper___sHEkd",La="ControlSlider-module__hoverArrow___A-dOH",Ea="ControlSlider-module__sliderItem___QQSkR",Pa="ControlSlider-module__sliderImage___9hRl-",_a="ControlSlider-module__arrow___05ghY",Aa="ControlSlider-module__arrowVertical___tBfVN",Ia="ControlSlider-module__nextArrow___-30Yc",Ra="ControlSlider-module__arrowInner___aEra3",ka="ControlSlider-module__arrowIcon___S4ztF",Wa="ControlSlider-module__arrowImg___2dwJW",Ma="ControlSlider-module__mirror___brd6U",Fa="ControlSlider-module__pagination___bicLF",Ha="ControlSlider-module__paginationInner___bT-P-",Na="ControlSlider-module__paginationVertical___zYqKw",Ba="ControlSlider-module__paginationItem___nTRbk",Oa="ControlSlider-module__dot___p1Qun",Va="ControlSlider-module__activeDot___LHFaj",Da="ControlSlider-module__paginationInsideBottom___R3FWn",za="ControlSlider-module__paginationInsideTop___V-qb-",ja="ControlSlider-module__paginationOutsideBottom___14w8D",qa="ControlSlider-module__paginationOutsideTop___SCLqB",Ka="ControlSlider-module__paginationInsideLeft___yOBRZ",Ua="ControlSlider-module__paginationInsideRight___Rtt3o",Ga="ControlSlider-module__paginationOutsideLeft___lahaw",Ya="ControlSlider-module__paginationOutsideRight___EtuQa",Xa="ControlSlider-module__imgWrapper___UjEgB",Za="ControlSlider-module__captionBlock___dJ6-j",Qa="ControlSlider-module__captionTextWrapper___HFlpf",Ja="ControlSlider-module__captionText___uGBVc",es="ControlSlider-module__active___WZK4G",ts="ControlSlider-module__withPointerEvents___t-18M",ns="ControlSlider-module__topLeftAlignment___zjnGM",rs="ControlSlider-module__topCenterAlignment___gD1xW",is="ControlSlider-module__topRightAlignment___NMapS",os="ControlSlider-module__middleLeftAlignment___OnUrY",as="ControlSlider-module__middleCenterAlignment___Tdkl0",ss="ControlSlider-module__middleRightAlignment___wEbfX",ls="ControlSlider-module__bottomLeftAlignment___cTP2-",cs="ControlSlider-module__bottomCenterAlignment___c54fB",ds="ControlSlider-module__bottomRightAlignment___kEwrz",us="ControlSlider-module__clickOverlay___DZA28",ps="ControlSlider-module__contain___pLyq7",ms="ControlSlider-module__cover___KdDat",de={wrapper:Ta,hoverArrow:La,sliderItem:Ea,sliderImage:Pa,arrow:_a,arrowVertical:Aa,nextArrow:Ia,arrowInner:Ra,arrowIcon:ka,arrowImg:Wa,mirror:Ma,pagination:Fa,paginationInner:Ha,paginationVertical:Na,paginationItem:Ba,dot:Oa,activeDot:Va,paginationInsideBottom:Da,paginationInsideTop:za,paginationOutsideBottom:ja,paginationOutsideTop:qa,paginationInsideLeft:Ka,paginationInsideRight:Ua,paginationOutsideLeft:Ga,paginationOutsideRight:Ya,imgWrapper:Xa,captionBlock:Za,captionTextWrapper:Qa,captionText:Ja,active:es,withPointerEvents:ts,topLeftAlignment:ns,topCenterAlignment:rs,topRightAlignment:is,middleLeftAlignment:os,middleCenterAlignment:as,middleRightAlignment:ss,bottomLeftAlignment:ls,bottomCenterAlignment:cs,bottomRightAlignment:ds,clickOverlay:us,contain:ps,cover:ms};function gs(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 hs(e,t,n){return t&&gs(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Fi="(prefers-reduced-motion: reduce)",fn=1,fs=2,bn=3,Ln=4,zn=5,lr=6,hr=7,ys={CREATED:fn,MOUNTED:fs,IDLE:bn,MOVING:Ln,SCROLLING:zn,DRAGGING:lr,DESTROYED:hr};function Bt(e){e.length=0}function Zt(e,t,n){return Array.prototype.slice.call(e,t,n)}function He(e){return e.bind.apply(e,[null].concat(Zt(arguments,1)))}var Ao=setTimeout,Xr=function(){};function Hi(e){return requestAnimationFrame(e)}function Cr(e,t){return typeof t===e}function kn(e){return!si(e)&&Cr("object",e)}var ai=Array.isArray,Io=He(Cr,"function"),Gt=He(Cr,"string"),jn=He(Cr,"undefined");function si(e){return e===null}function Ro(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function qn(e){return ai(e)?e:[e]}function bt(e,t){qn(e).forEach(t)}function li(e,t){return e.indexOf(t)>-1}function cr(e,t){return e.push.apply(e,qn(t)),e}function Wt(e,t,n){e&&bt(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function Lt(e,t){Wt(e,Gt(t)?t.split(" "):t,!0)}function Kn(e,t){bt(t,e.appendChild.bind(e))}function ci(e,t){bt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function Wn(e,t){return Ro(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ko(e,t){var n=e?Zt(e.children):[];return t?n.filter(function(r){return Wn(r,t)}):n}function Un(e,t){return t?ko(e,t)[0]:e.firstElementChild}var Mn=Object.keys;function rn(e,t,n){return e&&(n?Mn(e).reverse():Mn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function Fn(e){return Zt(arguments,1).forEach(function(t){rn(t,function(n,r){e[r]=t[r]})}),e}function Ut(e){return Zt(arguments,1).forEach(function(t){rn(t,function(n,r){ai(n)?e[r]=n.slice():kn(n)?e[r]=Ut({},kn(e[r])?e[r]:{},n):e[r]=n})}),e}function Ni(e,t){bt(t||Mn(e),function(n){delete e[n]})}function Et(e,t){bt(e,function(n){bt(t,function(r){n&&n.removeAttribute(r)})})}function Ce(e,t,n){kn(t)?rn(t,function(r,o){Ce(e,o,r)}):bt(e,function(r){si(n)||n===""?Et(r,t):r.setAttribute(t,String(n))})}function yn(e,t,n){var r=document.createElement(e);return t&&(Gt(t)?Lt(r,t):Ce(r,t)),n&&Kn(n,r),r}function $t(e,t,n){if(jn(n))return getComputedStyle(e)[t];si(n)||(e.style[t]=""+n)}function Hn(e,t){$t(e,"display",t)}function Wo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function wt(e,t){return e.getAttribute(t)}function Bi(e,t){return e&&e.classList.contains(t)}function ht(e){return e.getBoundingClientRect()}function on(e){bt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Mo(e){return Un(new DOMParser().parseFromString(e,"text/html").body)}function kt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Fo(e,t){return e&&e.querySelector(t)}function di(e,t){return t?Zt(e.querySelectorAll(t)):[]}function Mt(e,t){Wt(e,t,!1)}function Zr(e){return e.timeStamp}function en(e){return Gt(e)?e:e?e+"px":""}var Gn="splide",ui="data-"+Gn;function An(e,t){if(!e)throw new Error("["+Gn+"] "+(t||""))}var Yt=Math.min,fr=Math.max,yr=Math.floor,Nn=Math.ceil,ot=Math.abs;function Ho(e,t,n){return ot(e-t)<n}function dr(e,t,n,r){var o=Yt(t,n),l=fr(t,n);return r?o<e&&e<l:o<=e&&e<=l}function mn(e,t,n){var r=Yt(t,n),o=fr(t,n);return Yt(fr(r,e),o)}function Qr(e){return+(e>0)-+(e<0)}function Jr(e,t){return bt(t,function(n){e=e.replace("%s",""+n)}),e}function pi(e){return e<10?"0"+e:""+e}var Oi={};function vs(e){return""+e+pi(Oi[e]=(Oi[e]||0)+1)}function No(){var e=[];function t(i,c,s,p){o(i,c,function(u,T,x){var f="addEventListener"in u,m=f?u.removeEventListener.bind(u,T,s,p):u.removeListener.bind(u,s);f?u.addEventListener(T,s,p):u.addListener(s),e.push([u,T,x,s,m])})}function n(i,c,s){o(i,c,function(p,u,T){e=e.filter(function(x){return x[0]===p&&x[1]===u&&x[2]===T&&(!s||x[3]===s)?(x[4](),!1):!0})})}function r(i,c,s){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(c,{bubbles:u,detail:s}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(c,u,!1,s)),i.dispatchEvent(p),p}function o(i,c,s){bt(i,function(p){p&&bt(c,function(u){u.split(" ").forEach(function(T){var x=T.split(".");s(p,x[0],x[1])})})})}function l(){e.forEach(function(i){i[4]()}),Bt(e)}return{bind:t,unbind:n,dispatch:r,destroy:l}}var Qt="mounted",ei="ready",Ot="move",En="moved",mi="click",Bo="active",Oo="inactive",Vo="visible",Do="hidden",qe="refresh",tt="updated",xn="resize",Sr="resized",zo="drag",jo="dragging",qo="dragged",$r="scroll",sn="scrolled",bs="overflow",gi="destroy",Ko="arrows:mounted",Uo="arrows:updated",Go="pagination:mounted",Yo="pagination:updated",hi="navigation:mounted",fi="autoplay:play",Xo="autoplay:playing",yi="autoplay:pause",vi="lazyload:loaded",Zo="sk",Qo="sh",vr="ei";function Oe(e){var t=e?e.event.bus:document.createDocumentFragment(),n=No();function r(l,i){n.bind(t,qn(l).join(" "),function(c){i.apply(i,ai(c.detail)?c.detail:[])})}function o(l){n.dispatch(t,l,Zt(arguments,1))}return e&&e.event.on(gi,n.destroy),Fn(n,{bus:t,on:r,off:He(n.unbind,t),emit:o})}function wr(e,t,n,r){var o=Date.now,l,i=0,c,s=!0,p=0;function u(){if(!s){if(i=e?Yt((o()-l)/e,1):1,n&&n(i),i>=1&&(t(),l=o(),r&&++p>=r))return x();c=Hi(u)}}function T(w){w||m(),l=o()-(w?i*e:0),s=!1,c=Hi(u)}function x(){s=!0}function f(){l=o(),i=0,n&&n(i)}function m(){c&&cancelAnimationFrame(c),i=0,c=0,s=!0}function g(w){e=w}function C(){return s}return{start:T,rewind:f,pause:x,cancel:m,set:g,isPaused:C}}function xs(e){var t=e;function n(o){t=o}function r(o){return li(qn(o),t)}return{set:n,is:r}}function Cs(e,t){var n=wr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Ss(e,t,n){var r=e.state,o=n.breakpoints||{},l=n.reducedMotion||{},i=No(),c=[];function s(){var m=n.mediaQuery==="min";Mn(o).sort(function(g,C){return m?+g-+C:+C-+g}).forEach(function(g){u(o[g],"("+(m?"min":"max")+"-width:"+g+"px)")}),u(l,Fi),T()}function p(m){m&&i.destroy()}function u(m,g){var C=matchMedia(g);i.bind(C,"change",T),c.push([m,C])}function T(){var m=r.is(hr),g=n.direction,C=c.reduce(function(w,S){return Ut(w,S[1].matches?S[0]:{})},{});Ni(n),f(C),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):g!==n.direction&&e.refresh()}function x(m){matchMedia(Fi).matches&&(m?Ut(n,l):Ni(n,Mn(l)))}function f(m,g,C){Ut(n,m),g&&Ut(Object.getPrototypeOf(n),m),(C||!r.is(fn))&&e.emit(tt,n)}return{setup:s,destroy:p,reduce:x,set:f}}var Tr="Arrow",Lr=Tr+"Left",Er=Tr+"Right",Jo=Tr+"Up",ea=Tr+"Down",Vi="rtl",Pr="ttb",Hr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Jo,Er],ArrowRight:[ea,Lr]};function $s(e,t,n){function r(l,i,c){c=c||n.direction;var s=c===Vi&&!i?1:c===Pr?0:-1;return Hr[l]&&Hr[l][s]||l.replace(/width|left|right/i,function(p,u){var T=Hr[p.toLowerCase()][s]||p;return u>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function o(l){return l*(n.direction===Vi?1:-1)}return{resolve:r,orient:o}}var Ft="role",vn="tabindex",ws="disabled",Tt="aria-",Yn=Tt+"controls",ta=Tt+"current",Di=Tt+"selected",ft=Tt+"label",bi=Tt+"labelledby",na=Tt+"hidden",xi=Tt+"orientation",Bn=Tt+"roledescription",zi=Tt+"live",ji=Tt+"busy",qi=Tt+"atomic",Ci=[Ft,vn,ws,Yn,ta,ft,bi,na,xi,Bn],Pt=Gn+"__",Jt="is-",Nr=Gn,Ki=Pt+"track",Ts=Pt+"list",_r=Pt+"slide",ra=_r+"--clone",Ls=_r+"__container",Si=Pt+"arrows",Ar=Pt+"arrow",ia=Ar+"--prev",oa=Ar+"--next",Ir=Pt+"pagination",aa=Ir+"__page",Es=Pt+"progress",Ps=Es+"__bar",_s=Pt+"toggle",As=Pt+"spinner",Is=Pt+"sr",Rs=Jt+"initialized",an=Jt+"active",sa=Jt+"prev",la=Jt+"next",ti=Jt+"visible",ni=Jt+"loading",ca=Jt+"focus-in",da=Jt+"overflow",ks=[an,ti,sa,la,ni,ca,da],Ws={slide:_r,clone:ra,arrows:Si,arrow:Ar,prev:ia,next:oa,pagination:Ir,page:aa,spinner:As};function Ms(e,t){if(Io(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Wn(n,t);)n=n.parentElement;return n}var Fs=5,Ui=200,ua="touchstart mousedown",Br="touchmove mousemove",Or="touchend touchcancel mouseup click";function Hs(e,t,n){var r=Oe(e),o=r.on,l=r.bind,i=e.root,c=n.i18n,s={},p=[],u=[],T=[],x,f,m;function g(){v(),F(),S()}function C(){o(qe,w),o(qe,g),o(tt,S),l(document,ua+" keydown",function(b){m=b.type==="keydown"},{capture:!0}),l(i,"focusin",function(){Wt(i,ca,!!m)})}function w(b){var E=Ci.concat("style");Bt(p),Mt(i,u),Mt(x,T),Et([x,f],E),Et(i,b?E:["style",Bn])}function S(){Mt(i,u),Mt(x,T),u=H(Nr),T=H(Ki),Lt(i,u),Lt(x,T),Ce(i,ft,n.label),Ce(i,bi,n.labelledby)}function v(){x=L("."+Ki),f=Un(x,"."+Ts),An(x&&f,"A track/list element is missing."),cr(p,ko(f,"."+_r+":not(."+ra+")")),rn({arrows:Si,pagination:Ir,prev:ia,next:oa,bar:Ps,toggle:_s},function(b,E){s[E]=L("."+b)}),Fn(s,{root:i,track:x,list:f,slides:p})}function F(){var b=i.id||vs(Gn),E=n.role;i.id=b,x.id=x.id||b+"-track",f.id=f.id||b+"-list",!wt(i,Ft)&&i.tagName!=="SECTION"&&E&&Ce(i,Ft,E),Ce(i,Bn,c.carousel),Ce(f,Ft,"presentation")}function L(b){var E=Fo(i,b);return E&&Ms(E,"."+Nr)===i?E:void 0}function H(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===Nr&&an]}return Fn(s,{setup:g,mount:C,destroy:w})}var Cn="slide",Pn="loop",Xn="fade";function Ns(e,t,n,r){var o=Oe(e),l=o.on,i=o.emit,c=o.bind,s=e.Components,p=e.root,u=e.options,T=u.isNavigation,x=u.updateOnMove,f=u.i18n,m=u.pagination,g=u.slideFocus,C=s.Direction.resolve,w=wt(r,"style"),S=wt(r,ft),v=n>-1,F=Un(r,"."+Ls),L;function H(){v||(r.id=p.id+"-slide"+pi(t+1),Ce(r,Ft,m?"tabpanel":"group"),Ce(r,Bn,f.slide),Ce(r,ft,S||Jr(f.slideLabel,[t+1,e.length]))),b()}function b(){c(r,"click",He(i,mi,D)),c(r,"keydown",He(i,Zo,D)),l([En,Qo,sn],P),l(hi,O),x&&l(Ot,$)}function E(){L=!0,o.destroy(),Mt(r,ks),Et(r,Ci),Ce(r,"style",w),Ce(r,ft,S||"")}function O(){var N=e.splides.map(function(I){var K=I.splide.Components.Slides.getAt(t);return K?K.slide.id:""}).join(" ");Ce(r,ft,Jr(f.slideX,(v?n:t)+1)),Ce(r,Yn,N),Ce(r,Ft,g?"button":""),g&&Et(r,Bn)}function $(){L||P()}function P(){if(!L){var N=e.index;A(),W(),Wt(r,sa,t===N-1),Wt(r,la,t===N+1)}}function A(){var N=te();N!==Bi(r,an)&&(Wt(r,an,N),Ce(r,ta,T&&N||""),i(N?Bo:Oo,D))}function W(){var N=k(),I=!N&&(!te()||v);if(e.state.is([Ln,zn])||Ce(r,na,I||""),Ce(di(r,u.focusableNodes||""),vn,I?-1:""),g&&Ce(r,vn,I?-1:0),N!==Bi(r,ti)&&(Wt(r,ti,N),i(N?Vo:Do,D)),!N&&document.activeElement===r){var K=s.Slides.getAt(e.index);K&&Wo(K.slide)}}function j(N,I,K){$t(K&&F||r,N,I)}function te(){var N=e.index;return N===t||u.cloneStatus&&N===n}function k(){if(e.is(Xn))return te();var N=ht(s.Elements.track),I=ht(r),K=C("left",!0),Z=C("right",!0);return yr(N[K])<=Nn(I[K])&&yr(I[Z])<=Nn(N[Z])}function M(N,I){var K=ot(N-t);return!v&&(u.rewind||e.is(Pn))&&(K=Yt(K,e.length-K)),K<=I}var D={index:t,slideIndex:n,slide:r,container:F,isClone:v,mount:H,destroy:E,update:P,style:j,isWithin:M};return D}function Bs(e,t,n){var r=Oe(e),o=r.on,l=r.emit,i=r.bind,c=t.Elements,s=c.slides,p=c.list,u=[];function T(){x(),o(qe,f),o(qe,x)}function x(){s.forEach(function(P,A){g(P,A,-1)})}function f(){L(function(P){P.destroy()}),Bt(u)}function m(){L(function(P){P.update()})}function g(P,A,W){var j=Ns(e,A,W,P);j.mount(),u.push(j),u.sort(function(te,k){return te.index-k.index})}function C(P){return P?H(function(A){return!A.isClone}):u}function w(P){var A=t.Controller,W=A.toIndex(P),j=A.hasFocus()?1:n.perPage;return H(function(te){return dr(te.index,W,W+j-1)})}function S(P){return H(P)[0]}function v(P,A){bt(P,function(W){if(Gt(W)&&(W=Mo(W)),Ro(W)){var j=s[A];j?ci(W,j):Kn(p,W),Lt(W,n.classes.slide),E(W,He(l,xn))}}),l(qe)}function F(P){on(H(P).map(function(A){return A.slide})),l(qe)}function L(P,A){C(A).forEach(P)}function H(P){return u.filter(Io(P)?P:function(A){return Gt(P)?Wn(A.slide,P):li(qn(P),A.index)})}function b(P,A,W){L(function(j){j.style(P,A,W)})}function E(P,A){var W=di(P,"img"),j=W.length;j?W.forEach(function(te){i(te,"load error",function(){--j||A()})}):A()}function O(P){return P?s.length:u.length}function $(){return u.length>n.perPage}return{mount:T,destroy:f,update:m,register:g,get:C,getIn:w,getAt:S,add:v,remove:F,forEach:L,filter:H,style:b,getLength:O,isEnough:$}}function Os(e,t,n){var r=Oe(e),o=r.on,l=r.bind,i=r.emit,c=t.Slides,s=t.Direction.resolve,p=t.Elements,u=p.root,T=p.track,x=p.list,f=c.getAt,m=c.style,g,C,w;function S(){v(),l(window,"resize load",Cs(He(i,xn))),o([tt,qe],v),o(xn,F)}function v(){g=n.direction===Pr,$t(u,"maxWidth",en(n.width)),$t(T,s("paddingLeft"),L(!1)),$t(T,s("paddingRight"),L(!0)),F(!0)}function F(D){var N=ht(u);(D||C.width!==N.width||C.height!==N.height)&&($t(T,"height",H()),m(s("marginRight"),en(n.gap)),m("width",E()),m("height",O(),!0),C=N,i(Sr),w!==(w=M())&&(Wt(u,da,w),i(bs,w)))}function L(D){var N=n.padding,I=s(D?"right":"left");return N&&en(N[I]||(kn(N)?0:N))||"0px"}function H(){var D="";return g&&(D=b(),An(D,"height or heightRatio is missing."),D="calc("+D+" - "+L(!1)+" - "+L(!0)+")"),D}function b(){return en(n.height||ht(x).width*n.heightRatio)}function E(){return n.autoWidth?null:en(n.fixedWidth)||(g?"":$())}function O(){return en(n.fixedHeight)||(g?n.autoHeight?null:$():b())}function $(){var D=en(n.gap);return"calc((100%"+(D&&" + "+D)+")/"+(n.perPage||1)+(D&&" - "+D)+")"}function P(){return ht(x)[s("width")]}function A(D,N){var I=f(D||0);return I?ht(I.slide)[s("width")]+(N?0:te()):0}function W(D,N){var I=f(D);if(I){var K=ht(I.slide)[s("right")],Z=ht(x)[s("left")];return ot(K-Z)+(N?0:te())}return 0}function j(D){return W(e.length-1)-W(0)+A(0,D)}function te(){var D=f(0);return D&&parseFloat($t(D.slide,s("marginRight")))||0}function k(D){return parseFloat($t(T,s("padding"+(D?"Right":"Left"))))||0}function M(){return e.is(Xn)||j(!0)>P()}return{mount:S,resize:F,listSize:P,slideSize:A,sliderSize:j,totalSize:W,getPadding:k,isOverflow:M}}var Vs=2;function Ds(e,t,n){var r=Oe(e),o=r.on,l=t.Elements,i=t.Slides,c=t.Direction.resolve,s=[],p;function u(){o(qe,T),o([tt,xn],f),(p=C())&&(m(p),t.Layout.resize(!0))}function T(){x(),u()}function x(){on(s),Bt(s),r.destroy()}function f(){var w=C();p!==w&&(p<w||!w)&&r.emit(qe)}function m(w){var S=i.get().slice(),v=S.length;if(v){for(;S.length<w;)cr(S,S);cr(S.slice(-w),S.slice(0,w)).forEach(function(F,L){var H=L<w,b=g(F.slide,L);H?ci(b,S[0].slide):Kn(l.list,b),cr(s,b),i.register(b,L-w+(H?0:v),F.index)})}}function g(w,S){var v=w.cloneNode(!0);return Lt(v,n.classes.clone),v.id=e.root.id+"-clone"+pi(S+1),v}function C(){var w=n.clones;if(!e.is(Pn))w=0;else if(jn(w)){var S=n[c("fixedWidth")]&&t.Layout.slideSize(0),v=S&&Nn(ht(l.track)[c("width")]/S);w=v||n[c("autoWidth")]&&e.length||n.perPage*Vs}return w}return{mount:u,destroy:x}}function zs(e,t,n){var r=Oe(e),o=r.on,l=r.emit,i=e.state.set,c=t.Layout,s=c.slideSize,p=c.getPadding,u=c.totalSize,T=c.listSize,x=c.sliderSize,f=t.Direction,m=f.resolve,g=f.orient,C=t.Elements,w=C.list,S=C.track,v;function F(){v=t.Transition,o([Qt,Sr,tt,qe],L)}function L(){t.Controller.isBusy()||(t.Scroll.cancel(),b(e.index),t.Slides.update())}function H(I,K,Z,Q){I!==K&&D(I>Z)&&(P(),E($(j(),I>Z),!0)),i(Ln),l(Ot,K,Z,I),v.start(K,function(){i(bn),l(En,K,Z,I),Q&&Q()})}function b(I){E(W(I,!0))}function E(I,K){if(!e.is(Xn)){var Z=K?I:O(I);$t(w,"transform","translate"+m("X")+"("+Z+"px)"),I!==Z&&l(Qo)}}function O(I){if(e.is(Pn)){var K=A(I),Z=K>t.Controller.getEnd(),Q=K<0;(Q||Z)&&(I=$(I,Z))}return I}function $(I,K){var Z=I-M(K),Q=x();return I-=g(Q*(Nn(ot(Z)/Q)||1))*(K?1:-1),I}function P(){E(j(),!0),v.cancel()}function A(I){for(var K=t.Slides.get(),Z=0,Q=1/0,R=0;R<K.length;R++){var ne=K[R].index,h=ot(W(ne,!0)-I);if(h<=Q)Q=h,Z=ne;else break}return Z}function W(I,K){var Z=g(u(I-1)-k(I));return K?te(Z):Z}function j(){var I=m("left");return ht(w)[I]-ht(S)[I]+g(p(!1))}function te(I){return n.trimSpace&&e.is(Cn)&&(I=mn(I,0,g(x(!0)-T()))),I}function k(I){var K=n.focus;return K==="center"?(T()-s(I,!0))/2:+K*s(I)||0}function M(I){return W(I?t.Controller.getEnd():0,!!n.trimSpace)}function D(I){var K=g($(j(),I));return I?K>=0:K<=w[m("scrollWidth")]-ht(S)[m("width")]}function N(I,K){K=jn(K)?j():K;var Z=I!==!0&&g(K)<g(M(!1)),Q=I!==!1&&g(K)>g(M(!0));return Z||Q}return{mount:F,move:H,jump:b,translate:E,shift:$,cancel:P,toIndex:A,toPosition:W,getPosition:j,getLimit:M,exceededLimit:N,reposition:L}}function js(e,t,n){var r=Oe(e),o=r.on,l=r.emit,i=t.Move,c=i.getPosition,s=i.getLimit,p=i.toPosition,u=t.Slides,T=u.isEnough,x=u.getLength,f=n.omitEnd,m=e.is(Pn),g=e.is(Cn),C=He(j,!1),w=He(j,!0),S=n.start||0,v,F=S,L,H,b;function E(){O(),o([tt,qe,vr],O),o(Sr,$)}function O(){L=x(!0),H=n.perMove,b=n.perPage,v=D();var h=mn(S,0,f?v:L-1);h!==S&&(S=h,i.reposition())}function $(){v!==D()&&l(vr)}function P(h,ee,ge){if(!ne()){var le=W(h),be=M(le);be>-1&&(ee||be!==S)&&(Z(be),i.move(le,be,F,ge))}}function A(h,ee,ge,le){t.Scroll.scroll(h,ee,ge,function(){var be=M(i.toIndex(c()));Z(f?Yt(be,v):be),le&&le()})}function W(h){var ee=S;if(Gt(h)){var ge=h.match(/([+\-<>])(\d+)?/)||[],le=ge[1],be=ge[2];le==="+"||le==="-"?ee=te(S+ +(""+le+(+be||1)),S):le===">"?ee=be?N(+be):C(!0):le==="<"&&(ee=w(!0))}else ee=m?h:mn(h,0,v);return ee}function j(h,ee){var ge=H||(R()?1:b),le=te(S+ge*(h?-1:1),S,!(H||R()));return le===-1&&g&&!Ho(c(),s(!h),1)?h?0:v:ee?le:M(le)}function te(h,ee,ge){if(T()||R()){var le=k(h);le!==h&&(ee=h,h=le,ge=!1),h<0||h>v?!H&&(dr(0,h,ee,!0)||dr(v,ee,h,!0))?h=N(I(h)):m?h=ge?h<0?-(L%b||b):L:h:n.rewind?h=h<0?v:0:h=-1:ge&&h!==ee&&(h=N(I(ee)+(h<ee?-1:1)))}else h=-1;return h}function k(h){if(g&&n.trimSpace==="move"&&h!==S)for(var ee=c();ee===p(h,!0)&&dr(h,0,e.length-1,!n.rewind);)h<S?--h:++h;return h}function M(h){return m?(h+L)%L||0:h}function D(){for(var h=L-(R()||m&&H?1:b);f&&h-- >0;)if(p(L-1,!0)!==p(h,!0)){h++;break}return mn(h,0,L-1)}function N(h){return mn(R()?h:b*h,0,v)}function I(h){return R()?Yt(h,v):yr((h>=v?L-1:h)/b)}function K(h){var ee=i.toIndex(h);return g?mn(ee,0,v):ee}function Z(h){h!==S&&(F=S,S=h)}function Q(h){return h?F:S}function R(){return!jn(n.focus)||n.isNavigation}function ne(){return e.state.is([Ln,zn])&&!!n.waitForTransition}return{mount:E,go:P,scroll:A,getNext:C,getPrev:w,getAdjacent:j,getEnd:D,setIndex:Z,getIndex:Q,toIndex:N,toPage:I,toDest:K,hasFocus:R,isBusy:ne}}var qs="http://www.w3.org/2000/svg",Ks="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",tr=40;function Us(e,t,n){var r=Oe(e),o=r.on,l=r.bind,i=r.emit,c=n.classes,s=n.i18n,p=t.Elements,u=t.Controller,T=p.arrows,x=p.track,f=T,m=p.prev,g=p.next,C,w,S={};function v(){L(),o(tt,F)}function F(){H(),v()}function L(){var A=n.arrows;A&&!(m&&g)&&O(),m&&g&&(Fn(S,{prev:m,next:g}),Hn(f,A?"":"none"),Lt(f,w=Si+"--"+n.direction),A&&(b(),P(),Ce([m,g],Yn,x.id),i(Ko,m,g)))}function H(){r.destroy(),Mt(f,w),C?(on(T?[m,g]:f),m=g=null):Et([m,g],Ci)}function b(){o([Qt,En,qe,sn,vr],P),l(g,"click",He(E,">")),l(m,"click",He(E,"<"))}function E(A){u.go(A,!0)}function O(){f=T||yn("div",c.arrows),m=$(!0),g=$(!1),C=!0,Kn(f,[m,g]),!T&&ci(f,x)}function $(A){var W='<button class="'+c.arrow+" "+(A?c.prev:c.next)+'" type="button"><svg xmlns="'+qs+'" viewBox="0 0 '+tr+" "+tr+'" width="'+tr+'" height="'+tr+'" focusable="false"><path d="'+(n.arrowPath||Ks)+'" />';return Mo(W)}function P(){if(m&&g){var A=e.index,W=u.getPrev(),j=u.getNext(),te=W>-1&&A<W?s.last:s.prev,k=j>-1&&A>j?s.first:s.next;m.disabled=W<0,g.disabled=j<0,Ce(m,ft,te),Ce(g,ft,k),i(Uo,m,g,W,j)}}return{arrows:S,mount:v,destroy:H,update:P}}var Gs=ui+"-interval";function Ys(e,t,n){var r=Oe(e),o=r.on,l=r.bind,i=r.emit,c=wr(n.interval,e.go.bind(e,">"),b),s=c.isPaused,p=t.Elements,u=t.Elements,T=u.root,x=u.toggle,f=n.autoplay,m,g,C=f==="pause";function w(){f&&(S(),x&&Ce(x,Yn,p.track.id),C||v(),H())}function S(){n.pauseOnHover&&l(T,"mouseenter mouseleave",function(O){m=O.type==="mouseenter",L()}),n.pauseOnFocus&&l(T,"focusin focusout",function(O){g=O.type==="focusin",L()}),x&&l(x,"click",function(){C?v():F(!0)}),o([Ot,$r,qe],c.rewind),o(Ot,E)}function v(){s()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),g=m=C=!1,H(),i(fi))}function F(O){O===void 0&&(O=!0),C=!!O,H(),s()||(c.pause(),i(yi))}function L(){C||(m||g?F(!1):v())}function H(){x&&(Wt(x,an,!C),Ce(x,ft,n.i18n[C?"play":"pause"]))}function b(O){var $=p.bar;$&&$t($,"width",O*100+"%"),i(Xo,O)}function E(O){var $=t.Slides.getAt(O);c.set($&&+wt($.slide,Gs)||n.interval)}return{mount:w,destroy:c.cancel,play:v,pause:F,isPaused:s}}function Xs(e,t,n){var r=Oe(e),o=r.on;function l(){n.cover&&(o(vi,He(c,!0)),o([Qt,tt,qe],He(i,!0)))}function i(s){t.Slides.forEach(function(p){var u=Un(p.container||p.slide,"img");u&&u.src&&c(s,u,p)})}function c(s,p,u){u.style("background",s?'center/cover no-repeat url("'+p.src+'")':"",!0),Hn(p,s?"none":"")}return{mount:l,destroy:He(i,!1)}}var Zs=10,Qs=600,Js=.6,el=1.5,tl=800;function nl(e,t,n){var r=Oe(e),o=r.on,l=r.emit,i=e.state.set,c=t.Move,s=c.getPosition,p=c.getLimit,u=c.exceededLimit,T=c.translate,x=e.is(Cn),f,m,g=1;function C(){o(Ot,F),o([tt,qe],L)}function w(b,E,O,$,P){var A=s();if(F(),O&&(!x||!u())){var W=t.Layout.sliderSize(),j=Qr(b)*W*yr(ot(b)/W)||0;b=c.toPosition(t.Controller.toDest(b%W))+j}var te=Ho(A,b,1);g=1,E=te?0:E||fr(ot(b-A)/el,tl),m=$,f=wr(E,S,He(v,A,b,P),1),i(zn),l($r),f.start()}function S(){i(bn),m&&m(),l(sn)}function v(b,E,O,$){var P=s(),A=b+(E-b)*H($),W=(A-P)*g;T(P+W),x&&!O&&u()&&(g*=Js,ot(W)<Zs&&w(p(u(!0)),Qs,!1,m,!0))}function F(){f&&f.cancel()}function L(){f&&!f.isPaused()&&(F(),S())}function H(b){var E=n.easingFunc;return E?E(b):1-Math.pow(1-b,4)}return{mount:C,destroy:F,scroll:w,cancel:L}}var gn={passive:!1,capture:!0};function rl(e,t,n){var r=Oe(e),o=r.on,l=r.emit,i=r.bind,c=r.unbind,s=e.state,p=t.Move,u=t.Scroll,T=t.Controller,x=t.Elements.track,f=t.Media.reduce,m=t.Direction,g=m.resolve,C=m.orient,w=p.getPosition,S=p.exceededLimit,v,F,L,H,b,E=!1,O,$,P;function A(){i(x,Br,Xr,gn),i(x,Or,Xr,gn),i(x,ua,j,gn),i(x,"click",M,{capture:!0}),i(x,"dragstart",kt),o([Qt,tt],W)}function W(){var V=n.drag;ce(!V),H=V==="free"}function j(V){if(O=!1,!$){var U=be(V);le(V.target)&&(U||!V.button)&&(T.isBusy()?kt(V,!0):(P=U?x:window,b=s.is([Ln,zn]),L=null,i(P,Br,te,gn),i(P,Or,k,gn),p.cancel(),u.cancel(),D(V)))}}function te(V){if(s.is(lr)||(s.set(lr),l(zo)),V.cancelable)if(b){p.translate(v+ge(R(V)));var U=ne(V)>Ui,G=E!==(E=S());(U||G)&&D(V),O=!0,l(jo),kt(V)}else K(V)&&(b=I(V),kt(V))}function k(V){s.is(lr)&&(s.set(bn),l(qo)),b&&(N(V),kt(V)),c(P,Br,te),c(P,Or,k),b=!1}function M(V){!$&&O&&kt(V,!0)}function D(V){L=F,F=V,v=w()}function N(V){var U=Z(V),G=Q(U),se=n.rewind&&n.rewindByDrag;f(!1),H?T.scroll(G,0,n.snap):e.is(Xn)?T.go(C(Qr(U))<0?se?"<":"-":se?">":"+"):e.is(Cn)&&E&&se?T.go(S(!0)?">":"<"):T.go(T.toDest(G),!0),f(!0)}function I(V){var U=n.dragMinThreshold,G=kn(U),se=G&&U.mouse||0,ye=(G?U.touch:+U)||10;return ot(R(V))>(be(V)?ye:se)}function K(V){return ot(R(V))>ot(R(V,!0))}function Z(V){if(e.is(Pn)||!E){var U=ne(V);if(U&&U<Ui)return R(V)/U}return 0}function Q(V){return w()+Qr(V)*Yt(ot(V)*(n.flickPower||600),H?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function R(V,U){return ee(V,U)-ee(h(V),U)}function ne(V){return Zr(V)-Zr(h(V))}function h(V){return F===V&&L||F}function ee(V,U){return(be(V)?V.changedTouches[0]:V)["page"+g(U?"Y":"X")]}function ge(V){return V/(E&&e.is(Cn)?Fs:1)}function le(V){var U=n.noDrag;return!Wn(V,"."+aa+", ."+Ar)&&(!U||!Wn(V,U))}function be(V){return typeof TouchEvent<"u"&&V instanceof TouchEvent}function re(){return b}function ce(V){$=V}return{mount:A,disable:ce,isDragging:re}}var il={Spacebar:" ",Right:Er,Left:Lr,Up:Jo,Down:ea};function $i(e){return e=Gt(e)?e:e.key,il[e]||e}var Gi="keydown";function ol(e,t,n){var r=Oe(e),o=r.on,l=r.bind,i=r.unbind,c=e.root,s=t.Direction.resolve,p,u;function T(){x(),o(tt,f),o(tt,x),o(Ot,g)}function x(){var w=n.keyboard;w&&(p=w==="global"?window:c,l(p,Gi,C))}function f(){i(p,Gi)}function m(w){u=w}function g(){var w=u;u=!0,Ao(function(){u=w})}function C(w){if(!u){var S=$i(w);S===s(Lr)?e.go("<"):S===s(Er)&&e.go(">")}}return{mount:T,destroy:f,disable:m}}var In=ui+"-lazy",ur=In+"-srcset",al="["+In+"], ["+ur+"]";function sl(e,t,n){var r=Oe(e),o=r.on,l=r.off,i=r.bind,c=r.emit,s=n.lazyLoad==="sequential",p=[En,sn],u=[];function T(){n.lazyLoad&&(x(),o(qe,x))}function x(){Bt(u),f(),s?w():(l(p),o(p,m),m())}function f(){t.Slides.forEach(function(S){di(S.slide,al).forEach(function(v){var F=wt(v,In),L=wt(v,ur);if(F!==v.src||L!==v.srcset){var H=n.classes.spinner,b=v.parentElement,E=Un(b,"."+H)||yn("span",H,b);u.push([v,S,E]),v.src||Hn(v,"none")}})})}function m(){u=u.filter(function(S){var v=n.perPage*((n.preloadPages||1)+1)-1;return S[1].isWithin(e.index,v)?g(S):!0}),u.length||l(p)}function g(S){var v=S[0];Lt(S[1].slide,ni),i(v,"load error",He(C,S)),Ce(v,"src",wt(v,In)),Ce(v,"srcset",wt(v,ur)),Et(v,In),Et(v,ur)}function C(S,v){var F=S[0],L=S[1];Mt(L.slide,ni),v.type!=="error"&&(on(S[2]),Hn(F,""),c(vi,F,L),c(xn)),s&&w()}function w(){u.length&&g(u.shift())}return{mount:T,destroy:He(Bt,u),check:m}}function ll(e,t,n){var r=Oe(e),o=r.on,l=r.emit,i=r.bind,c=t.Slides,s=t.Elements,p=t.Controller,u=p.hasFocus,T=p.getIndex,x=p.go,f=t.Direction.resolve,m=s.pagination,g=[],C,w;function S(){v(),o([tt,qe,vr],S);var $=n.pagination;m&&Hn(m,$?"":"none"),$&&(o([Ot,$r,sn],O),F(),O(),l(Go,{list:C,items:g},E(e.index)))}function v(){C&&(on(m?Zt(C.children):C),Mt(C,w),Bt(g),C=null),r.destroy()}function F(){var $=e.length,P=n.classes,A=n.i18n,W=n.perPage,j=u()?p.getEnd()+1:Nn($/W);C=m||yn("ul",P.pagination,s.track.parentElement),Lt(C,w=Ir+"--"+b()),Ce(C,Ft,"tablist"),Ce(C,ft,A.select),Ce(C,xi,b()===Pr?"vertical":"");for(var te=0;te<j;te++){var k=yn("li",null,C),M=yn("button",{class:P.page,type:"button"},k),D=c.getIn(te).map(function(I){return I.slide.id}),N=!u()&&W>1?A.pageX:A.slideX;i(M,"click",He(L,te)),n.paginationKeyboard&&i(M,"keydown",He(H,te)),Ce(k,Ft,"presentation"),Ce(M,Ft,"tab"),Ce(M,Yn,D.join(" ")),Ce(M,ft,Jr(N,te+1)),Ce(M,vn,-1),g.push({li:k,button:M,page:te})}}function L($){x(">"+$,!0)}function H($,P){var A=g.length,W=$i(P),j=b(),te=-1;W===f(Er,!1,j)?te=++$%A:W===f(Lr,!1,j)?te=(--$+A)%A:W==="Home"?te=0:W==="End"&&(te=A-1);var k=g[te];k&&(Wo(k.button),x(">"+te),kt(P,!0))}function b(){return n.paginationDirection||n.direction}function E($){return g[p.toPage($)]}function O(){var $=E(T(!0)),P=E(T());if($){var A=$.button;Mt(A,an),Et(A,Di),Ce(A,vn,-1)}if(P){var W=P.button;Lt(W,an),Ce(W,Di,!0),Ce(W,vn,"")}l(Yo,{list:C,items:g},$,P)}return{items:g,mount:S,destroy:v,getAt:E,update:O}}var cl=[" ","Enter"];function dl(e,t,n){var r=n.isNavigation,o=n.slideFocus,l=[];function i(){e.splides.forEach(function(m){m.isParent||(p(e,m.splide),p(m.splide,e))}),r&&u()}function c(){l.forEach(function(m){m.destroy()}),Bt(l)}function s(){c(),i()}function p(m,g){var C=Oe(m);C.on(Ot,function(w,S,v){g.go(g.is(Pn)?v:w)}),l.push(C)}function u(){var m=Oe(e),g=m.on;g(mi,x),g(Zo,f),g([Qt,tt],T),l.push(m),m.emit(hi,e.splides)}function T(){Ce(t.Elements.list,xi,n.direction===Pr?"vertical":"")}function x(m){e.go(m.index)}function f(m,g){li(cl,$i(g))&&(x(m),kt(g))}return{setup:He(t.Media.set,{slideFocus:jn(o)?r:o},!0),mount:i,destroy:c,remount:s}}function ul(e,t,n){var r=Oe(e),o=r.bind,l=0;function i(){n.wheel&&o(t.Elements.track,"wheel",c,gn)}function c(p){if(p.cancelable){var u=p.deltaY,T=u<0,x=Zr(p),f=n.wheelMinThreshold||0,m=n.wheelSleep||0;ot(u)>f&&x-l>m&&(e.go(T?"<":">"),l=x),s(T)&&kt(p)}}function s(p){return!n.releaseWheel||e.state.is(Ln)||t.Controller.getAdjacent(p)!==-1}return{mount:i}}var pl=90;function ml(e,t,n){var r=Oe(e),o=r.on,l=t.Elements.track,i=n.live&&!n.isNavigation,c=yn("span",Is),s=wr(pl,He(u,!1));function p(){i&&(x(!t.Autoplay.isPaused()),Ce(l,qi,!0),c.textContent="…",o(fi,He(x,!0)),o(yi,He(x,!1)),o([En,sn],He(u,!0)))}function u(f){Ce(l,ji,f),f?(Kn(l,c),s.start()):(on(c),s.cancel())}function T(){Et(l,[zi,qi,ji]),on(c)}function x(f){i&&Ce(l,zi,f?"off":"polite")}return{mount:p,disable:x,destroy:T}}var gl=Object.freeze({__proto__:null,Media:Ss,Direction:$s,Elements:Hs,Slides:Bs,Layout:Os,Clones:Ds,Move:zs,Controller:js,Arrows:Us,Autoplay:Ys,Cover:Xs,Scroll:nl,Drag:rl,Keyboard:ol,LazyLoad:sl,Pagination:ll,Sync:dl,Wheel:ul,Live:ml}),hl={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"},fl={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:Ws,i18n:hl,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function yl(e,t,n){var r=t.Slides;function o(){Oe(e).on([Qt,qe],l)}function l(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function i(c,s){r.style("transition","opacity "+n.speed+"ms "+n.easing),Ao(s)}return{mount:o,start:i,cancel:Xr}}function vl(e,t,n){var r=t.Move,o=t.Controller,l=t.Scroll,i=t.Elements.list,c=He($t,i,"transition"),s;function p(){Oe(e).bind(i,"transitionend",function(f){f.target===i&&s&&(T(),s())})}function u(f,m){var g=r.toPosition(f,!0),C=r.getPosition(),w=x(f);ot(g-C)>=1&&w>=1?n.useScroll?l.scroll(g,w,!1,m):(c("transform "+w+"ms "+n.easing),r.translate(g,!0),s=m):(r.jump(f),m())}function T(){c(""),l.cancel()}function x(f){var m=n.rewindSpeed;if(e.is(Cn)&&m){var g=o.getIndex(!0),C=o.getEnd();if(g===0&&f>=C||g>=C&&f===0)return m}return n.speed}return{mount:p,start:u,cancel:T}}var bl=(function(){function e(n,r){this.event=Oe(),this.Components={},this.state=xs(fn),this.splides=[],this._o={},this._E={};var o=Gt(n)?Fo(document,n):n;An(o,o+" is invalid."),this.root=o,r=Ut({label:wt(o,ft)||"",labelledby:wt(o,bi)||""},fl,e.defaults,r||{});try{Ut(r,JSON.parse(wt(o,ui)))}catch{An(!1,"Invalid JSON")}this._o=Object.create(Ut({},r))}var t=e.prototype;return t.mount=function(r,o){var l=this,i=this.state,c=this.Components;An(i.is([fn,hr]),"Already mounted!"),i.set(fn),this._C=c,this._T=o||this._T||(this.is(Xn)?yl:vl),this._E=r||this._E;var s=Fn({},gl,this._E,{Transition:this._T});return rn(s,function(p,u){var T=p(l,c,l._o);c[u]=T,T.setup&&T.setup()}),rn(c,function(p){p.mount&&p.mount()}),this.emit(Qt),Lt(this.root,Rs),i.set(bn),this.emit(ei),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(bn)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,o){return this.event.on(r,o),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var o;return(o=this.event).emit.apply(o,[r].concat(Zt(arguments,1))),this},t.add=function(r,o){return this._C.Slides.add(r,o),this},t.remove=function(r){return this._C.Slides.remove(r),this},t.is=function(r){return this._o.type===r},t.refresh=function(){return this.emit(qe),this},t.destroy=function(r){r===void 0&&(r=!0);var o=this.event,l=this.state;return l.is(fn)?Oe(this).on(ei,this.destroy.bind(this,r)):(rn(this._C,function(i){i.destroy&&i.destroy(r)},!0),o.emit(gi),o.destroy(),r&&Bt(this.splides),l.set(hr)),this},hs(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})(),wi=bl;wi.defaults={};wi.STATES=ys;var Yi=[[Qt,"onMounted"],[ei,"onReady"],[Ot,"onMove"],[En,"onMoved"],[mi,"onClick"],[Bo,"onActive"],[Oo,"onInactive"],[Vo,"onVisible"],[Do,"onHidden"],[qe,"onRefresh"],[tt,"onUpdated"],[xn,"onResize"],[Sr,"onResized"],[zo,"onDrag"],[jo,"onDragging"],[qo,"onDragged"],[$r,"onScroll"],[sn,"onScrolled"],[gi,"onDestroy"],[Ko,"onArrowsMounted"],[Uo,"onArrowsUpdated"],[Go,"onPaginationMounted"],[Yo,"onPaginationUpdated"],[hi,"onNavigationMounted"],[fi,"onAutoplayPlay"],[Xo,"onAutoplayPlaying"],[yi,"onAutoplayPause"],[vi,"onLazyLoadLoaded"]];function Ti(...e){return e.filter(Boolean).join(" ")}function br(e){return e!==null&&typeof e=="object"}function ri(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!ri(n,t[r]));if(br(e)&&br(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!ri(e[o],t[o]))}return e===t}function xl(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function Cl(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=n[r];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function ii(e,t){const n=e;return Cl(t,(r,o)=>{Array.isArray(r)?n[o]=r.slice():br(r)?n[o]=ii(br(n[o])?n[o]:{},r):n[o]=r}),n}var Sl=({children:e,className:t,...n})=>d.createElement("div",{className:Ti("splide__track",t),...n},d.createElement("ul",{className:"splide__list"},e)),Li=class extends d.Component{constructor(){super(...arguments),this.splideRef=d.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new wi(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=ii({},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&&!ri(this.options,e)&&(this.splide.options=e,this.options=ii({},e));const t=this.getSlides();xl(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){Yi.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...o)=>{r(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:r,...o}=this.props;return d.createElement(t,{className:Ti("splide",e),ref:this.splideRef,...this.omit(o,["options",...Yi.map(l=>l[1])])},n?d.createElement(Sl,null,r):r)}},Ei=({children:e,className:t,...n})=>d.createElement("li",{className:Ti("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 Tl="RichTextRenderer-module__link___BWeZ2",Ll={link:Tl},Pl=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))},kr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Pl(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function yt(e){const{color:t,...n}=e;return n}function Ze(e,t){var i,l,o;const{fontSize:n,lineHeight:r}=e;return{fontFamily:kr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:y.scalingValue(e.letterSpacing,t),wordSpacing:y.scalingValue(e.wordSpacing,t),fontSize:y.scalingValue(n,t),lineHeight:r!==void 0?y.scalingValue(r,t):void 0,textTransform:(i=e.textAppearance)==null?void 0:i.textTransform,textDecoration:(l=e.textAppearance)==null?void 0:l.textDecoration,fontVariant:(o=e.textAppearance)==null?void 0:o.fontVariant,textAlign:e.textAlign,color:e.color}}const Sn=({content:e})=>{const t=n=>n.map((r,i)=>r.type==="link"?a.jsx("a",{className:Ll.link,href:r.value,target:r.target,children:t(r.children)},i):a.jsx("span",{style:El(r),children:r.text},i));return a.jsx(a.Fragment,{children:e.map((n,r)=>{const i=n.children;return a.jsx("div",{children:t(i)},r)})})};function El(e){return{...e.fontFamily&&{fontFamily:kr(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 _l="SvgImage-module__svg___q3xE-",Al="SvgImage-module__img___VsTm-",Zo={svg:_l,img:Al},Il=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Rl=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Nt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:i})=>{const[l,o]=d.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return d.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');o(c)}},[]),!Il(e)||!l?a.jsx("img",{src:e,alt:"",className:Re(Zo.img,r),style:i}):a.jsx("span",{"data-supports-mask":l,className:Re(Zo.svg,r),style:{"--svg":Rl(e),"--fill":t,"--hover-fill":n,...i??{}}})},kl={"top-left":de.topLeftAlignment,"top-center":de.topCenterAlignment,"top-right":de.topRightAlignment,"middle-left":de.middleLeftAlignment,"middle-center":de.middleCenterAlignment,"middle-right":de.middleRightAlignment,"bottom-left":de.bottomLeftAlignment,"bottom-center":de.bottomCenterAlignment,"bottom-right":de.bottomRightAlignment};function Wl({settings:e,content:t,styles:n,isEditor:r}){const[i,l]=d.useState(null),{widthSettings:o,fontSettings:c,letterSpacing:s,textAlign:p,wordSpacing:u,fontSizeLineHeight:T,textAppearance:x,color:f}=n.imageCaption??{},[m,g]=d.useState(void 0),[C,w]=d.useState(null),[S,v]=d.useState(0),[M,L]=d.useState(0),{direction:N,transition:b,controls:P,pagination:O,imageCaption:$,triggers:E}=e,A=d.useRef(b.type),{x:W,y:j}=e.controls.offset,te=k=>{i&&i.go(k)};return d.useEffect(()=>{if(!C)return;const k=new ResizeObserver(F=>{if(!i)return;const[D]=F;g({width:Math.round(D.contentRect.width),height:Math.round(D.contentRect.height)})});return k.observe(C),()=>k.unobserve(C)},[C]),d.useEffect(()=>{!i||A.current===b.type||(L(k=>k+1),A.current=b.type)},[b.type]),a.jsx("div",{className:Re(de.wrapper,{[de.editor]:r}),ref:w,children:a.jsxs("div",{className:de.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Re(de.captionBlock),children:a.jsx("div",{className:de.captionTextWrapper,children:t.map((k,F)=>a.jsx("div",{className:Re(de.captionText,kl[$.alignment],{[de.withPointerEvents]:F===S&&r,[de.active]:F===S}),style:{fontFamily:kr(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:o.sizing==="auto"?"max-content":y.scalingValue(o.width,r),letterSpacing:y.scalingValue(s,r),wordSpacing:y.scalingValue(u,r),textAlign:p,fontSize:y.scalingValue(T.fontSize,r),lineHeight:y.scalingValue(T.lineHeight,r),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:f,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:de.captionTextInner,style:{"--link-hover-color":$.linkHoverColor,"--link-color":$.linkColor,position:"relative",top:y.scalingValue($.offset.y,r),left:y.scalingValue($.offset.x,r)},children:a.jsx(Sn,{content:k.imageCaption})})},F))})}),a.jsx(Eo,{onMove:k=>{v(k.index)},ref:l,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:E.autoPlay!==null,...E.autoPlay!==null&&{interval:parseInt(E.autoPlay)*1e3},direction:N==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:E.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((k,F)=>a.jsx(_o,{children:a.jsx("div",{className:de.sliderItem,children:a.jsx("div",{className:de.imgWrapper,children:a.jsx("img",{className:Re(de.sliderImage,{[de.contain]:k.image.objectFit==="contain",[de.cover]:k.image.objectFit==="cover"}),src:k.image.url,alt:k.image.name??""})})})},F))},M),P.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Re(de.arrow,{[de.arrowVertical]:N==="vert",[de.hoverArrow]:P.show==="on hover"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:a.jsxs("button",{onClick:()=>{te("-1")},className:de.arrowInner,style:{transform:`translate(${y.scalingValue(W,r)}, ${y.scalingValue(j*(N==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:[P.arrowsImgUrl&&a.jsx(Nt,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:Re(de.arrowImg,de.mirror)}),!P.arrowsImgUrl&&a.jsx(Jo,{color:P.color,className:Re(de.arrowIcon,de.arrowImg,de.mirror)})]})}),a.jsx("div",{className:Re(de.arrow,de.nextArrow,{[de.arrowVertical]:N==="vert",[de.hoverArrow]:P.show==="on hover"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:a.jsxs("button",{className:de.arrowInner,onClick:()=>te("+1"),style:{transform:`translate(${y.scalingValue(W*(N==="horiz"?-1:1),r)}, ${y.scalingValue(j,r)}) scale(${e.controls.scale/100}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:[P.arrowsImgUrl&&a.jsx(Nt,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:de.arrowImg}),!P.arrowsImgUrl&&a.jsx(Jo,{color:P.color,className:Re(de.arrowIcon,de.arrowImg)})]})})]}),E.triggersList.click&&a.jsx("div",{className:de.clickOverlay,onClick:()=>{i&&i.go("+1")}}),O.isActive&&a.jsx("div",{className:Re(de.pagination,{[de.paginationInsideBottom]:O.position==="inside-1"&&N==="horiz",[de.paginationInsideTop]:O.position==="inside-2"&&N==="horiz",[de.paginationOutsideBottom]:O.position==="outside-1"&&N==="horiz",[de.paginationOutsideTop]:O.position==="outside-2"&&N==="horiz",[de.paginationInsideLeft]:O.position==="inside-1"&&N==="vert",[de.paginationInsideRight]:O.position==="inside-2"&&N==="vert",[de.paginationOutsideLeft]:O.position==="outside-1"&&N==="vert",[de.paginationOutsideRight]:O.position==="outside-2"&&N==="vert",[de.paginationVertical]:N==="vert"}),children:a.jsx("div",{className:de.paginationInner,style:{backgroundColor:O.colors[2],transform:`scale(${O.scale/100}) translate(${y.scalingValue(O.offset.x,r)}, ${y.scalingValue(O.offset.y,r)}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:t.map((k,F)=>a.jsx("button",{onClick:()=>{i&&i.go(F)},className:Re(de.paginationItem),children:a.jsx("div",{className:Re(de.dot,{[de.activeDot]:F===S}),style:{backgroundColor:F===S?O.colors[0]:O.colors[1],"--pagination-hover-color":O.hover}})},F))})})]})})}function Jo({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Fl={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"]}},Ml="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Nl="ImageRevealSlider-module__image___Qjt-e",Hl="ImageRevealSlider-module__link___N-iLG",Bl="ImageRevealSlider-module__cursor___2U03d",pn={imageRevealSlider:Ml,image:Nl,link:Hl,cursor:Bl};function ei(e,t,n){for(const r of n){const i=new Image;i.src=r.url;const l=r.width?Number.parseFloat(r.width):i.naturalWidth,o=i.naturalHeight/i.naturalWidth*l,c=l/2,s=o/2;if(e>=r.x-c&&e<=r.x+c&&t>=r.y-s&&t<=r.y+s)return!0}return!1}function Dr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ol(e,t,n,r){let i,l;if(t==="custom"){i=n;const o=await Dr(e);l=o.height/o.width*i}else if(t==="random"){i=Math.random()*(r.max-r.min)+r.min;const o=await Dr(e);l=o.height/o.width*i}else{const o=await Dr(e);i=o.width,l=o.height}return{width:i,height:l,finalWidth:`${i}px`}}function Vl({settings:e,content:t,isEditor:n}){const[r,i]=d.useState(null),[l,o]=d.useState([]),[c,s]=d.useState(0),p=d.useRef(0),[u,T]=d.useState({x:0,y:0}),[x,f]=d.useState(1),[m,g]=d.useState("none"),C=d.useRef({x:0,y:0}),[w,S]=d.useState(!1),{sizeType:v,imageWidth:M,randomRangeImageWidth:L}=e.imageSize,{revealPosition:N,visible:b}=e.position,{cursorType:P,target:O,defaultCursorScale:$,defaultCursor:E,hoverCursorScale:A,hoverCursor:W}=e.cursor;d.useEffect(()=>{if(!r)return;const k=(H,I)=>{const K=r.getBoundingClientRect(),Q=H-K.left,Z=I-K.top;if(T({x:Q,y:Z}),P==="system"){g("none"),f(1);return}const R=Q,ne=Z,h=document.elementFromPoint(K.left+R,K.top+ne);if(h&&h.closest("a")){g("none"),f(1);return}const ee=ei(R,ne,l)||O==="area"?{img:W??"none",scale:A}:{img:E??"none",scale:$};g(ee.img),f(ee.scale)},F=H=>{H.stopPropagation(),C.current={x:H.clientX,y:H.clientY},k(H.clientX,H.clientY)},D=()=>{w&&k(C.current.x,C.current.y)};return r.addEventListener("mousemove",F),window.addEventListener("scroll",D,!0),()=>{r.removeEventListener("mousemove",F),window.removeEventListener("scroll",D,!0)}},[r,w,u,P,O,W,E,A,$,l]),d.useEffect(()=>{w||(g("none"),f(0))},[w]);const j=async(k,F,D,H={})=>{const{width:I,height:K,finalWidth:Q}=await Ol(k.image.url,v,M,L);let Z=0,R=0;N==="same"?(Z=F/2,R=D/2):(Z=H.x??Math.random()*F,R=H.y??Math.random()*D);const ne=Math.min(Math.max(Z,I/2),F-I/2),h=Math.min(Math.max(R,K/2),D-K/2);return{id:p.current++,url:k.image.url,link:k.link,name:k.image.name,x:ne,y:h,width:Q}};d.useEffect(()=>{if(!r||t.length===0)return;const k=r.getBoundingClientRect(),F=k.width,D=k.height,H=[];(async()=>{const K=t[0],Q=await j(K,F,D);H.push(Q),o(H),s(1)})()},[v,M,L,N,r]),d.useEffect(()=>{b==="last One"&&o(k=>k.length>0?[k[k.length-1]]:[])},[b]);const te=async k=>{if(!r)return;const F=r.getBoundingClientRect(),D=k.clientX-F.left,H=k.clientY-F.top;if(O==="image"&&!ei(D,H,l))return;let I=0,K=0;N==="on Click"?(I=D,K=H):N==="same"?(I=F.width/2,K=F.height/2):(I=Math.random()*F.width,K=Math.random()*F.height);const Q=t[c],Z=await j(Q,F.width,F.height,{x:I,y:K});o(R=>b==="all"?[...R,Z]:[Z]),s(R=>R>=t.length-1?0:R+1)};return a.jsxs("div",{ref:i,onClick:te,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),className:pn.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[l.map(k=>a.jsx("div",{className:pn.wrapper,style:{top:`${k.y}px`,left:`${k.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:k.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:O==="area"&&k.link?a.jsx("a",{href:k.link,target:"_blank",className:pn.link,children:a.jsx("img",{src:k.url,alt:k.name,className:pn.image},k.id)}):a.jsx("img",{src:k.url,alt:k.name,className:pn.image},k.id)},k.id)),w&&a.jsx("div",{className:pn.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Dl={element:Vl,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:""}]}}}},zl="LightBox-module__hidden___9s-9x",jl="LightBox-module__heroImage___sTxNF",ql="LightBox-module__background___rm9ml",Kl="LightBox-module__editor___4ACaY",Ul="LightBox-module__contentStyle___Bgnsq",Gl="LightBox-module__imageStyle___tLIlB",Yl="LightBox-module__imgWrapper___LuFUp",Xl="LightBox-module__contain___8-yaS",Ql="LightBox-module__cover___hNvOG",Zl="LightBox-module__caption___b6L2I",Jl="LightBox-module__captionTextInner___rCGNH",ec="LightBox-module__lightboxSplide___XFuWC",tc="LightBox-module__arrow___iz38X",nc="LightBox-module__arrowVertical___Zfz81",rc="LightBox-module__nextArrow___zkAQN",oc="LightBox-module__arrowInner___p48sW",ic="LightBox-module__arrowIcon___3VaFf",ac="LightBox-module__arrowImg___pNV88",sc="LightBox-module__mirror___pjeXc",lc="LightBox-module__thumbsWrapper___GB-nU",cc="LightBox-module__thumbsContainerVertical___wttk5",dc="LightBox-module__thumbsContainer___osSma",uc="LightBox-module__thumbsAlignStart___MO6tY",pc="LightBox-module__thumbsAlignCenter___Q4sUx",mc="LightBox-module__thumbsAlignEnd___p4y9R",gc="LightBox-module__thumbItem___HvnF3",hc="LightBox-module__closeButton___g2khP",fc="LightBox-module__fadeIn___0m5GW",yc="LightBox-module__slideInLeft___gPYwC",vc="LightBox-module__slideInRight___S-pPp",bc="LightBox-module__slideInTop___DFdAj",xc="LightBox-module__slideInBottom___m27kZ",Cc="LightBox-module__fadeOut___55qBR",Sc="LightBox-module__slideOutLeft___NvU7P",$c="LightBox-module__slideOutRight___SK7eC",wc="LightBox-module__slideOutTop___Vgg0z",Tc="LightBox-module__slideOutBottom___nJ0Ef",Lc="LightBox-module__scaleSlide___vZriG",J={hidden:zl,heroImage:jl,background:ql,editor:Kl,contentStyle:Ul,imageStyle:Gl,imgWrapper:Yl,contain:Xl,cover:Ql,caption:Zl,captionTextInner:Jl,lightboxSplide:ec,arrow:tc,arrowVertical:nc,nextArrow:rc,arrowInner:oc,arrowIcon:ic,arrowImg:ac,mirror:sc,thumbsWrapper:lc,thumbsContainerVertical:cc,thumbsContainer:dc,thumbsAlignStart:uc,thumbsAlignCenter:pc,thumbsAlignEnd:mc,thumbItem:gc,closeButton:hc,fadeIn:fc,slideInLeft:yc,slideInRight:vc,slideInTop:bc,slideInBottom:xc,fadeOut:Cc,slideOutLeft:Sc,slideOutRight:$c,slideOutTop:wc,slideOutBottom:Tc,scaleSlide:Lc},rr=(e,t,n)=>{const r={},[i,l]=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"),l==="left"?(r.left="0",r.right="auto"):l==="center"?(r.left="50%",r.right="auto"):l==="right"&&(r.left="auto",r.right="0"),i==="middle"&&l==="center"?r.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), calc(-50% + ${y.scalingValue(t.y,n)}))`:i==="middle"?r.transform=`translate(${y.scalingValue(t.x,n)}, calc(-50% + ${y.scalingValue(t.y,n)}))`:l==="center"?r.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), ${y.scalingValue(t.y,n)})`:r.transform=`translate(${y.scalingValue(t.x,n)}, ${y.scalingValue(t.y,n)})`,r};function ga(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 ti(e){const t=e.getBoundingClientRect(),n=ga(e),r=Math.max(0,t.width-n.left-n.right),i=Math.max(0,t.height-n.top-n.bottom),l=e.naturalWidth,o=e.naturalHeight,c=r/i,s=l/o;let p,u;s>c?(p=r,u=r/s):(u=i,p=i*s);const T=t.left+n.left,x=t.top+n.top,f=(r-p)/2+T,m=(i-u)/2+x;return{x:f,y:m,width:p,height:u}}function ni(e){const t=e.getBoundingClientRect(),n=ga(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function ri(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 Pc(e,t){const n=(()=>{if(e==="fade in")return J.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return J.slideInLeft;case"right":return J.slideInRight;case"top":return J.slideInTop;case"bottom":return J.slideInBottom;default:return J.slideInRight}return J.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return J.fadeIn;if(e==="slide in")switch(t){case"left":return J.slideInLeft;case"right":return J.slideInRight;case"top":return J.slideInTop;case"bottom":return J.slideInBottom;default:return J.slideInRight}return J.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return J.fadeOut;if(e==="slide in")switch(t){case"left":return J.slideOutLeft;case"right":return J.slideOutRight;case"top":return J.slideOutTop;case"bottom":return J.slideOutBottom;default:return J.slideOutRight}return J.fadeOut})(),l=(()=>{if(e==="fade in")return J.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return J.slideOutLeft;case"right":return J.slideOutRight;case"top":return J.slideOutTop;case"bottom":return J.slideOutBottom;default:return J.slideOutRight}return J.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:i,disappearClass:l}}const Ec=({settings:e,content:t,styles:n,portalId:r,activeEvent:i,isEditor:l,isPreviewMode:o})=>{const[c,s]=d.useState(!1),{url:p}=e.thumbnailBlock.cover;return d.useEffect(()=>{i==="close"&&s(!1),i==="open"&&s(!0)},[i]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:p,alt:"Cover",className:J.heroImage,onClick:()=>s(!0)}),a.jsx(_c,{isOpen:c,onClose:()=>s(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:l})]})},_c=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:i,portalId:l,isEditor:o,metadata:c})=>{var Ee;const{widthSettings:s,fontSettings:p,letterSpacing:u,textAlign:T,wordSpacing:x,fontSizeLineHeight:f,textAppearance:m,color:g}=r.imageCaption??{},[C,w]=d.useState(0),[S,v]=d.useState(0),[M,L]=d.useState(!1),[N,b]=d.useState(!1),[P,O]=d.useState({}),$=d.useRef(null),E=d.useRef(null),A=d.useRef(null),W=d.useRef(!1),j=d.useRef(null),te=d.useRef(null),k=d.useRef(null),F=d.useRef(null),D=d.useRef(!1),H=d.useRef(null),[I,K]=d.useState(!1),{appear:Q,triggers:Z,slider:R,thumbnail:ne,controls:h,area:ee,caption:ge,layout:le}=i.lightboxBlock,{appearClass:be,backdropAppearClass:re,backdropDisappearClass:ce,disappearClass:V}=Pc(Q.type,Q.direction),U=(c==null?void 0:c.itemId)??null;d.useEffect(()=>{const B=()=>{setTimeout(()=>{var _,z;(z=(_=$.current)==null?void 0:_.splide)==null||z.refresh()},16)},oe=()=>{v(_=>_+1)};return window.addEventListener("ArticleEditor.Layout:change",B),window.addEventListener("ArticleEditor.ComponentContent:change",oe),()=>{window.removeEventListener("ArticleEditor.Layout:change",B),window.removeEventListener("ArticleEditor.ComponentContent:change",oe)}},[]),d.useEffect(()=>{if(!e||!ne.isActive){K(!1);return}const B=H.current;if(!B)return;const oe=()=>{R.direction==="horiz"?K(B.scrollWidth>B.clientWidth):K(B.scrollHeight>B.clientHeight)};oe();const _=new ResizeObserver(oe);return _.observe(B),()=>_.disconnect()},[e,ne.isActive,n.length,P,R.direction]);const G=d.useCallback(()=>{const B=window.matchMedia("(max-width: 768px)").matches,oe=ri(ee.color);B&&!o&&oe>.9&&(document.body.style.backgroundColor=""),L(!0),W.current=!0;const _=z=>{z.target===j.current&&z.animationName&&(j.current&&te.current&&j.current.removeEventListener("animationend",te.current),te.current=null,W.current&&(W.current=!1,t()),L(!1))};j.current&&(te.current=_,j.current.addEventListener("animationend",_))},[t,ee.color,o]),se=(B,oe,_)=>{var z,q;if(B){if(Z.type==="click"&&Z.switch==="image")Z.repeat==="close"&&C===n.length-1?G():(z=$.current)==null||z.go("+1");else if(Z.type==="click"&&Z.switch==="50/50"){const Y=B.getBoundingClientRect(),ae=oe-Y.left,me=_-Y.top,We=Y.width,he=Y.height;let ve;R.direction==="horiz"?ve=ae<We/2?"-1":"+1":ve=me<he/2?"-1":"+1",(q=$.current)==null||q.go(ve)}}},ye=B=>{if(D.current){D.current=!1;return}const oe=n[C],_=(oe==null?void 0:oe.image.objectFit)==="cover";let z,q;if("changedTouches"in B&&B.changedTouches.length>0)z=B.changedTouches[0].clientX,q=B.changedTouches[0].clientY;else if("clientX"in B)z=B.clientX,q=B.clientY;else return;let Y;if(_&&A.current){const ae=ni(A.current);Y=z>=ae.left&&z<=ae.right&&q>=ae.top&&q<=ae.bottom}else{const ae=A.current?ti(A.current):null;if(!ae){B.target===B.currentTarget&&G();return}Y=z>=ae.x&&z<=ae.x+ae.width&&q>=ae.y&&q<=ae.y+ae.height}Y?se(A.current,z,q):G()},Te=B=>{const oe=B.target;(oe.classList.contains(J.thumbsWrapper)||oe.classList.contains(J.thumbsContainer))&&ye(B)};d.useEffect(()=>{if(!e)return;const B=oe=>{var _,z;if(oe.key==="Escape"){G();return}if(oe.key==="ArrowRight"){w(q=>(q+1)%Math.max(n.length,1)),(_=$.current)==null||_.go("+1");return}oe.key==="ArrowLeft"&&(w(q=>(q-1+Math.max(n.length,1))%Math.max(n.length,1)),(z=$.current)==null||z.go("-1"))};return window.addEventListener("keydown",B),()=>{window.removeEventListener("keydown",B)}},[e,G,n.length]),d.useEffect(()=>{if(e){if(w(0),v(oe=>oe+1),W.current=!1,L(!1),b(!1),O({}),!U)return;const B=new CustomEvent("page-overlay",{detail:{itemId:U}});window.dispatchEvent(B)}return()=>{j.current&&te.current&&(j.current.removeEventListener("animationend",te.current),te.current=null),b(!1)}},[e,U]),d.useEffect(()=>{E.current!==null&&E.current!==R.type&&v(B=>B+1),E.current=R.type},[R.type]),d.useEffect(()=>{if(!e)return;const B=document.body.style.overflow,oe=window.matchMedia("(max-width: 768px)").matches,_=ri(ee.color);document.body.style.overflow="hidden",b(!1);const z=Y=>{Y.target===j.current&&!W.current&&Y.animationName&&(oe&&!o&&_>.9&&(document.body.style.backgroundColor=ee.color),b(!0),j.current&&k.current&&j.current.removeEventListener("animationend",k.current),k.current=null)};j.current&&(k.current=z,j.current.addEventListener("animationend",z));const q=Y=>{const ae=Y.target;ae&&(ae.closest(`.${J.thumbsWrapper}`)||ae.closest(`.${J.thumbsContainer}`))||R.type!=="slide"&&Y.preventDefault()};return document.addEventListener("touchmove",q,{passive:!1}),()=>{document.body.style.overflow=B,document.removeEventListener("touchmove",q),j.current&&k.current&&(j.current.removeEventListener("animationend",k.current),k.current=null),b(!1)}},[e,o,ee.color,R.type]),d.useEffect(()=>{if(!e)return;const B=oe=>{var z,q;if(W.current){oe.stopPropagation();return}if(D.current){D.current=!1;return}const _=oe.target;if(!(_&&(_.closest(`.${J.thumbsContainer}`)||_.closest(`.${J.thumbItem}`)||_.closest(`.${J.arrow}`)||_.closest(`.${J.closeButton}`)||_.closest(`.${J.caption}`)))){if(R.type==="slide"&&Z.type==="drag"&&((q=(z=$.current)==null?void 0:z.splide)!=null&&q.root)){const Y=$.current.splide.root;if(_&&(Y.contains(_)||Y===_))return}if(oe.touches.length===0&&oe.changedTouches.length>0){const Y=n[C],ae=(Y==null?void 0:Y.image.objectFit)==="cover",me=oe.changedTouches[0];let We;if(ae&&A.current){const he=ni(A.current);We=me.clientX>=he.left&&me.clientX<=he.right&&me.clientY>=he.top&&me.clientY<=he.bottom}else{const he=A.current?ti(A.current):null;if(!he)return;We=me.clientX>=he.x&&me.clientX<=he.x+he.width&&me.clientY>=he.y&&me.clientY<=he.y+he.height}if(!We){oe.stopPropagation(),W.current=!0;const he=ve=>{ve.stopPropagation(),ve.preventDefault(),document.removeEventListener("click",he,!0)};document.addEventListener("click",he,!0),G()}}}};return document.addEventListener("touchend",B,{passive:!0}),()=>{document.removeEventListener("touchend",B)}},[e,G,C,n]);const Se=(R.type==="scale"||R.type==="fade")&&R.direction==="vert"&&Z.type==="drag";d.useEffect(()=>{var ve,Fe;if(!e||!Se||!((Fe=(ve=$.current)==null?void 0:ve.splide)!=null&&Fe.root))return;const B=$.current.splide.root,oe=30,_=(ie,xe)=>{if(F.current){const Ae=Math.abs(ie-F.current.x),ke=Math.abs(xe-F.current.y);(Ae>0||ke>0)&&(D.current=!0)}},z=ie=>{F.current&&(ie.preventDefault(),_(ie.clientX,ie.clientY))},q=ie=>{F.current&&ie.touches.length>0&&(ie.preventDefault(),_(ie.touches[0].clientX,ie.touches[0].clientY))},Y=(ie,xe)=>{if(!F.current||!$.current){F.current=null;return}const Ae=Math.abs(ie-F.current.x),ke=Math.abs(xe-F.current.y);ke>oe&&ke>Ae&&$.current.go(xe<F.current.y?"+1":"-1"),F.current=null},ae=ie=>{F.current&&Y(ie.clientX,ie.clientY),document.removeEventListener("pointerup",ae),document.removeEventListener("pointercancel",ae),document.removeEventListener("pointermove",z)},me=ie=>{if(F.current){if(ie.changedTouches.length>0){const xe=ie.changedTouches[0];Y(xe.clientX,xe.clientY)}document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),document.removeEventListener("touchmove",q)}},We=ie=>{F.current={x:ie.clientX,y:ie.clientY},D.current=!1,document.addEventListener("pointermove",z,{passive:!1}),document.addEventListener("pointerup",ae),document.addEventListener("pointercancel",ae)},he=ie=>{ie.touches.length>0&&(F.current={x:ie.touches[0].clientX,y:ie.touches[0].clientY},D.current=!1,document.addEventListener("touchmove",q,{passive:!1}),document.addEventListener("touchend",me),document.addEventListener("touchcancel",me))};return B.addEventListener("pointerdown",We),B.addEventListener("touchstart",he),()=>{B.removeEventListener("pointerdown",We),B.removeEventListener("touchstart",he),document.removeEventListener("pointermove",z),document.removeEventListener("pointerup",ae),document.removeEventListener("pointercancel",ae),document.removeEventListener("touchmove",q),document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),F.current=null,D.current=!1}},[e,Se,S]);const Le={backgroundColor:ee.color,backdropFilter:`blur(${ee.blur}px)`,animationDuration:`${parseInt(Q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:Ii.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:o?null:j,className:Re(J.background,M?ce:re,{[J.editor]:o},{[J.hidden]:!e}),style:{...Le,...N&&!o&&!M?{position:"absolute"}:{}}}),a.jsxs("div",{ref:o?j:null,className:Re(J.contentStyle,M?V:be,{[J.editor]:o},{[J.hidden]:!e}),style:{animationDuration:`${parseInt(Q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Eo,{onMove:B=>w(B.index),ref:$,className:J.lightboxSplide,options:{arrows:!1,speed:R.duration?parseInt(R.duration):500,direction:R.direction==="horiz"||R.type==="fade"||R.type==="scale"?"ltr":"ttb",pagination:!1,drag:Z.type==="drag"&&!Se,perPage:1,width:"100%",height:"100%",type:R.type==="fade"||R.type==="scale"?"fade":"loop",padding:0,rewind:Z.repeat!=="close",start:0},style:{"--splide-speed":R.duration},children:n.map((B,oe)=>{const _=rr(le.position,le.offset,o),z=`${y.scalingValue(le.padding.top,o)} ${y.scalingValue(le.padding.right,o)} ${y.scalingValue(le.padding.bottom,o)} ${y.scalingValue(le.padding.left,o)}`,q=R.type==="scale"?(()=>{const{transform:Y,...ae}=_;return{...ae,position:"absolute",padding:z,boxSizing:"border-box","--position-transform":Y||"none"}})():{..._,position:"absolute",padding:z,boxSizing:"border-box"};return a.jsx(_o,{children:a.jsx("div",{className:J.imgWrapper,onClick:ye,children:a.jsx("img",{ref:oe===C?A:null,className:Re(J.imageStyle,{[J.contain]:B.image.objectFit==="contain",[J.cover]:B.image.objectFit==="cover",[J.scaleSlide]:R.type==="scale"}),src:B.image.url,alt:B.image.name??"",style:{...q,pointerEvents:B.image.objectFit==="contain"?"none":"auto"}})})},oe)})},S),h.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Re(J.arrow,{[J.arrowVertical]:R.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:a.jsxs("button",{className:J.arrowInner,style:{transform:`translate(${y.scalingValue(h.offset.x,o)}, ${y.scalingValue(h.offset.y*(R.direction==="horiz"?1:-1),o)}) scale(${h.scale}) rotate(${R.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var B;return(B=$.current)==null?void 0:B.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&a.jsx(Nt,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:Re(J.arrowImg,J.mirror)}),!h.arrowsImgUrl&&a.jsx(oi,{color:h.color,className:Re(J.arrowIcon,J.arrowImg,J.mirror)})]})}),a.jsx("div",{className:Re(J.arrow,J.nextArrow,{[J.arrowVertical]:R.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:a.jsxs("button",{className:J.arrowInner,style:{transform:`translate(${y.scalingValue(h.offset.x*(R.direction==="horiz"?-1:1),o)}, ${y.scalingValue(h.offset.y,o)}) scale(${h.scale}) rotate(${R.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var B;return(B=$.current)==null?void 0:B.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&a.jsx(Nt,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:J.arrowImg}),!h.arrowsImgUrl&&a.jsx(oi,{color:h.color,className:Re(J.arrowIcon,J.arrowImg)})]})})]}),ee.closeIconUrl&&(()=>{const B=rr(ee.closeIconAlign,ee.closeIconOffset,o),oe=`scale(${ee.closeIconScale})`,_=B.transform?`${B.transform} ${oe}`:oe;return a.jsx("button",{className:J.closeButton,style:{...B,transform:_},onClick:G,"aria-label":"Close lightbox",children:a.jsx(Nt,{url:ee.closeIconUrl,fill:ee.closeIconColor??"#000000",hoverFill:ee.closeIconHover??"#cccccc"})})})(),ge&&ge.isActive&&r.imageCaption&&((Ee=n[C])==null?void 0:Ee.imageCaption)&&a.jsx("div",{className:J.caption,style:{...rr(ge.alignment,ge.offset,o),fontFamily:kr(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:s.sizing==="auto"?"max-content":y.scalingValue(s.width,o),letterSpacing:y.scalingValue(u,o),wordSpacing:y.scalingValue(x,o),textAlign:T,fontSize:y.scalingValue(f.fontSize,o),lineHeight:y.scalingValue(f.lineHeight,o),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:g},onClick:B=>B.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:J.captionTextInner,style:{"--link-color":ge.linkColor,"--link-hover-color":ge.linkHoverColor},children:a.jsx(Sn,{content:n[C].imageCaption})})}),ne.isActive&&(()=>{const[B,oe]=ne.position.split("-"),_=R.direction==="horiz"?`${B}-left`:ne.position,z=rr(_,ne.offset,o),q=()=>{if(R.direction==="horiz"){if(oe==="left")return"flex-start";if(oe==="center")return"center";if(oe==="right")return"flex-end"}else{if(B==="top")return"flex-start";if(B==="middle")return"center";if(B==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:H,className:J.thumbsWrapper,onClick:Y=>Te(Y),style:{position:o?"absolute":"fixed",...z,...R.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Re(J.thumbsContainer,{[J.thumbsContainerVertical]:R.direction==="vert",[J.thumbsAlignStart]:ne.align==="start",[J.thumbsAlignCenter]:ne.align==="center",[J.thumbsAlignEnd]:ne.align==="end"}),style:{gap:y.scalingValue(ne.grid.gap,o),justifyContent:I?"flex-start":q()},children:n.map((Y,ae)=>{const me=ae===C,We=P[ae],ve=ne.grid.size*(me?ne.activeState.scale:1),Fe=()=>{if(ne.fit!=="fit")return{};if(!We)return R.direction==="horiz"?{height:y.scalingValue(ve,o)}:{width:y.scalingValue(ve,o)};const ie=We.width/We.height;if(R.direction==="horiz"){const xe=ve,Ae=xe*ie;return{width:y.scalingValue(Ae,o),height:y.scalingValue(xe,o)}}else{const xe=ve,Ae=xe/ie;return{width:y.scalingValue(xe,o),height:y.scalingValue(Ae,o)}}};return a.jsx("button",{className:J.thumbItem,style:{...R.direction==="horiz"&&ne.fit!=="fit"?{height:y.scalingValue(ve,o)}:{},...R.direction==="vert"&&ne.fit!=="fit"?{width:y.scalingValue(ve,o)}:{},...ne.fit==="cover"?{width:y.scalingValue(ve,o),height:y.scalingValue(ve,o)}:{},...Fe(),transition:me?"all 0.25s ease-out":"none",opacity:me?ne.activeState.opacity/100:ne.opacity/100,"--thumb-hover":ne.activeState.opacity/100},onClick:ie=>{var xe;ie.stopPropagation(),w(ae),(xe=$.current)==null||xe.go(ae)},onMouseEnter:()=>{var ie;ne.triggers==="hov"&&((ie=$.current)==null||ie.go(ae))},children:a.jsx("img",{src:Y.image.url,alt:Y.image.name??"",onLoad:ie=>{const xe=ie.currentTarget;xe.naturalWidth&&xe.naturalHeight&&O(Ae=>({...Ae,[ae]:{width:xe.naturalWidth,height:xe.naturalHeight}}))},style:{objectFit:ne.fit==="cover"?"cover":"contain",...ne.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ne.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Y.image.name}-${ae}`)})})})})()]})]}),document.getElementById(l))};function oi({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ac={element:Ec,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 or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ic(e){return`
|
|
6
|
+
*/const $l="RichTextRenderer-module__link___BWeZ2",wl={link:$l},Tl=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))},Rr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Tl(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function yt(e){const{color:t,...n}=e;return n}function Je(e,t){var o,l,i;const{fontSize:n,lineHeight:r}=e;return{fontFamily:Rr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:y.scalingValue(e.letterSpacing,t),wordSpacing:y.scalingValue(e.wordSpacing,t),fontSize:y.scalingValue(n,t),lineHeight:r!==void 0?y.scalingValue(r,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(l=e.textAppearance)==null?void 0:l.textDecoration,fontVariant:(i=e.textAppearance)==null?void 0:i.fontVariant,textAlign:e.textAlign,color:e.color}}const Sn=({content:e})=>{const t=n=>n.map((r,o)=>r.type==="link"?a.jsx("a",{className:wl.link,href:r.value,target:r.target,children:t(r.children)},o):a.jsx("span",{style:Ll(r),children:r.text},o));return a.jsx(a.Fragment,{children:e.map((n,r)=>{const o=n.children;return a.jsx("div",{children:t(o)},r)})})};function Ll(e){return{...e.fontFamily&&{fontFamily:Rr(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 El="SvgImage-module__svg___q3xE-",Pl="SvgImage-module__img___VsTm-",Xi={svg:El,img:Pl},_l=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Al=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Ht=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:o})=>{const[l,i]=d.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return d.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(c)}},[]),!_l(e)||!l?a.jsx("img",{src:e,alt:"",className:Pe(Xi.img,r),style:o}):a.jsx("span",{"data-supports-mask":l,className:Pe(Xi.svg,r),style:{"--svg":Al(e),"--fill":t,"--hover-fill":n,...o??{}}})},Il={"top-left":de.topLeftAlignment,"top-center":de.topCenterAlignment,"top-right":de.topRightAlignment,"middle-left":de.middleLeftAlignment,"middle-center":de.middleCenterAlignment,"middle-right":de.middleRightAlignment,"bottom-left":de.bottomLeftAlignment,"bottom-center":de.bottomCenterAlignment,"bottom-right":de.bottomRightAlignment};function Rl({settings:e,content:t,styles:n,isEditor:r}){const[o,l]=d.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:s,textAlign:p,wordSpacing:u,fontSizeLineHeight:T,textAppearance:x,color:f}=n.imageCaption??{},[m,g]=d.useState(void 0),[C,w]=d.useState(null),[S,v]=d.useState(0),[F,L]=d.useState(0),{direction:H,transition:b,controls:E,pagination:O,imageCaption:$,triggers:P}=e,A=d.useRef(b.type),{x:W,y:j}=e.controls.offset,te=k=>{o&&o.go(k)};return d.useEffect(()=>{if(!C)return;const k=new ResizeObserver(M=>{if(!o)return;const[D]=M;g({width:Math.round(D.contentRect.width),height:Math.round(D.contentRect.height)})});return k.observe(C),()=>k.unobserve(C)},[C]),d.useEffect(()=>{!o||A.current===b.type||(L(k=>k+1),A.current=b.type)},[b.type]),a.jsx("div",{className:Pe(de.wrapper,{[de.editor]:r}),ref:w,children:a.jsxs("div",{className:de.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Pe(de.captionBlock),children:a.jsx("div",{className:de.captionTextWrapper,children:t.map((k,M)=>a.jsx("div",{className:Pe(de.captionText,Il[$.alignment],{[de.withPointerEvents]:M===S&&r,[de.active]:M===S}),style:{fontFamily:Rr(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:i.sizing==="auto"?"max-content":y.scalingValue(i.width,r),letterSpacing:y.scalingValue(s,r),wordSpacing:y.scalingValue(u,r),textAlign:p,fontSize:y.scalingValue(T.fontSize,r),lineHeight:y.scalingValue(T.lineHeight,r),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:f,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:de.captionTextInner,style:{"--link-hover-color":$.linkHoverColor,"--link-color":$.linkColor,position:"relative",top:y.scalingValue($.offset.y,r),left:y.scalingValue($.offset.x,r)},children:a.jsx(Sn,{content:k.imageCaption})})},M))})}),a.jsx(Li,{onMove:k=>{v(k.index)},ref:l,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:P.autoPlay!==null,...P.autoPlay!==null&&{interval:parseInt(P.autoPlay)*1e3},direction:H==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:P.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((k,M)=>a.jsx(Ei,{children:a.jsx("div",{className:de.sliderItem,children:a.jsx("div",{className:de.imgWrapper,children:a.jsx("img",{className:Pe(de.sliderImage,{[de.contain]:k.image.objectFit==="contain",[de.cover]:k.image.objectFit==="cover"}),src:k.image.url,alt:k.image.name??""})})})},M))},F),E.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Pe(de.arrow,{[de.arrowVertical]:H==="vert",[de.hoverArrow]:E.show==="on hover"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:a.jsxs("button",{onClick:()=>{te("-1")},className:de.arrowInner,style:{transform:`translate(${y.scalingValue(W,r)}, ${y.scalingValue(j*(H==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${H==="horiz"?"0deg":"90deg"})`},children:[E.arrowsImgUrl&&a.jsx(Ht,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:Pe(de.arrowImg,de.mirror)}),!E.arrowsImgUrl&&a.jsx(Zi,{color:E.color,className:Pe(de.arrowIcon,de.arrowImg,de.mirror)})]})}),a.jsx("div",{className:Pe(de.arrow,de.nextArrow,{[de.arrowVertical]:H==="vert",[de.hoverArrow]:E.show==="on hover"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:a.jsxs("button",{className:de.arrowInner,onClick:()=>te("+1"),style:{transform:`translate(${y.scalingValue(W*(H==="horiz"?-1:1),r)}, ${y.scalingValue(j,r)}) scale(${e.controls.scale/100}) rotate(${H==="horiz"?"0deg":"90deg"})`},children:[E.arrowsImgUrl&&a.jsx(Ht,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:de.arrowImg}),!E.arrowsImgUrl&&a.jsx(Zi,{color:E.color,className:Pe(de.arrowIcon,de.arrowImg)})]})})]}),P.triggersList.click&&a.jsx("div",{className:de.clickOverlay,onClick:()=>{o&&o.go("+1")}}),O.isActive&&a.jsx("div",{className:Pe(de.pagination,{[de.paginationInsideBottom]:O.position==="inside-1"&&H==="horiz",[de.paginationInsideTop]:O.position==="inside-2"&&H==="horiz",[de.paginationOutsideBottom]:O.position==="outside-1"&&H==="horiz",[de.paginationOutsideTop]:O.position==="outside-2"&&H==="horiz",[de.paginationInsideLeft]:O.position==="inside-1"&&H==="vert",[de.paginationInsideRight]:O.position==="inside-2"&&H==="vert",[de.paginationOutsideLeft]:O.position==="outside-1"&&H==="vert",[de.paginationOutsideRight]:O.position==="outside-2"&&H==="vert",[de.paginationVertical]:H==="vert"}),children:a.jsx("div",{className:de.paginationInner,style:{backgroundColor:O.colors[2],transform:`scale(${O.scale/100}) translate(${y.scalingValue(O.offset.x,r)}, ${y.scalingValue(O.offset.y,r)}) rotate(${H==="horiz"?"0deg":"90deg"})`},children:t.map((k,M)=>a.jsx("button",{onClick:()=>{o&&o.go(M)},className:Pe(de.paginationItem),children:a.jsx("div",{className:Pe(de.dot,{[de.activeDot]:M===S}),style:{backgroundColor:M===S?O.colors[0]:O.colors[1],"--pagination-hover-color":O.hover}})},M))})})]})})}function Zi({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const kl={element:Rl,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"]}},Wl="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Ml="ImageRevealSlider-module__image___Qjt-e",Fl="ImageRevealSlider-module__link___N-iLG",Hl="ImageRevealSlider-module__cursor___2U03d",pn={imageRevealSlider:Wl,image:Ml,link:Fl,cursor:Hl};function Qi(e,t,n){for(const r of n){const o=new Image;o.src=r.url;const l=r.width?Number.parseFloat(r.width):o.naturalWidth,i=o.naturalHeight/o.naturalWidth*l,c=l/2,s=i/2;if(e>=r.x-c&&e<=r.x+c&&t>=r.y-s&&t<=r.y+s)return!0}return!1}function Vr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Nl(e,t,n,r){let o,l;if(t==="custom"){o=n;const i=await Vr(e);l=i.height/i.width*o}else if(t==="random"){o=Math.random()*(r.max-r.min)+r.min;const i=await Vr(e);l=i.height/i.width*o}else{const i=await Vr(e);o=i.width,l=i.height}return{width:o,height:l,finalWidth:`${o}px`}}function Bl({settings:e,content:t,isEditor:n}){const[r,o]=d.useState(null),[l,i]=d.useState([]),[c,s]=d.useState(0),p=d.useRef(0),[u,T]=d.useState({x:0,y:0}),[x,f]=d.useState(1),[m,g]=d.useState("none"),C=d.useRef({x:0,y:0}),[w,S]=d.useState(!1),{sizeType:v,imageWidth:F,randomRangeImageWidth:L}=e.imageSize,{revealPosition:H,visible:b}=e.position,{cursorType:E,target:O,defaultCursorScale:$,defaultCursor:P,hoverCursorScale:A,hoverCursor:W}=e.cursor;d.useEffect(()=>{if(!r)return;const k=(N,I)=>{const K=r.getBoundingClientRect(),Z=N-K.left,Q=I-K.top;if(T({x:Z,y:Q}),E==="system"){g("none"),f(1);return}const R=Z,ne=Q,h=document.elementFromPoint(K.left+R,K.top+ne);if(h&&h.closest("a")){g("none"),f(1);return}const ee=Qi(R,ne,l)||O==="area"?{img:W??"none",scale:A}:{img:P??"none",scale:$};g(ee.img),f(ee.scale)},M=N=>{N.stopPropagation(),C.current={x:N.clientX,y:N.clientY},k(N.clientX,N.clientY)},D=()=>{w&&k(C.current.x,C.current.y)};return r.addEventListener("mousemove",M),window.addEventListener("scroll",D,!0),()=>{r.removeEventListener("mousemove",M),window.removeEventListener("scroll",D,!0)}},[r,w,u,E,O,W,P,A,$,l]),d.useEffect(()=>{w||(g("none"),f(0))},[w]);const j=async(k,M,D,N={})=>{const{width:I,height:K,finalWidth:Z}=await Nl(k.image.url,v,F,L);let Q=0,R=0;H==="same"?(Q=M/2,R=D/2):(Q=N.x??Math.random()*M,R=N.y??Math.random()*D);const ne=Math.min(Math.max(Q,I/2),M-I/2),h=Math.min(Math.max(R,K/2),D-K/2);return{id:p.current++,url:k.image.url,link:k.link,name:k.image.name,x:ne,y:h,width:Z}};d.useEffect(()=>{if(!r||t.length===0)return;const k=r.getBoundingClientRect(),M=k.width,D=k.height,N=[];(async()=>{const K=t[0],Z=await j(K,M,D);N.push(Z),i(N),s(1)})()},[v,F,L,H,r]),d.useEffect(()=>{b==="last One"&&i(k=>k.length>0?[k[k.length-1]]:[])},[b]);const te=async k=>{if(!r)return;const M=r.getBoundingClientRect(),D=k.clientX-M.left,N=k.clientY-M.top;if(O==="image"&&!Qi(D,N,l))return;let I=0,K=0;H==="on Click"?(I=D,K=N):H==="same"?(I=M.width/2,K=M.height/2):(I=Math.random()*M.width,K=Math.random()*M.height);const Z=t[c],Q=await j(Z,M.width,M.height,{x:I,y:K});i(R=>b==="all"?[...R,Q]:[Q]),s(R=>R>=t.length-1?0:R+1)};return a.jsxs("div",{ref:o,onClick:te,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),className:pn.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[l.map(k=>a.jsx("div",{className:pn.wrapper,style:{top:`${k.y}px`,left:`${k.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:k.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:O==="area"&&k.link?a.jsx("a",{href:k.link,target:"_blank",className:pn.link,children:a.jsx("img",{src:k.url,alt:k.name,className:pn.image},k.id)}):a.jsx("img",{src:k.url,alt:k.name,className:pn.image},k.id)},k.id)),w&&a.jsx("div",{className:pn.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Ol={element:Bl,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:""}]}}}},Vl="LightBox-module__hidden___9s-9x",Dl="LightBox-module__heroImage___sTxNF",zl="LightBox-module__background___rm9ml",jl="LightBox-module__editor___4ACaY",ql="LightBox-module__contentStyle___Bgnsq",Kl="LightBox-module__imageStyle___tLIlB",Ul="LightBox-module__imgWrapper___LuFUp",Gl="LightBox-module__contain___8-yaS",Yl="LightBox-module__cover___hNvOG",Xl="LightBox-module__caption___b6L2I",Zl="LightBox-module__captionTextInner___rCGNH",Ql="LightBox-module__lightboxSplide___XFuWC",Jl="LightBox-module__arrow___iz38X",ec="LightBox-module__arrowVertical___Zfz81",tc="LightBox-module__nextArrow___zkAQN",nc="LightBox-module__arrowInner___p48sW",rc="LightBox-module__arrowIcon___3VaFf",ic="LightBox-module__arrowImg___pNV88",oc="LightBox-module__mirror___pjeXc",ac="LightBox-module__thumbsWrapper___GB-nU",sc="LightBox-module__thumbsContainerVertical___wttk5",lc="LightBox-module__thumbsContainer___osSma",cc="LightBox-module__thumbsAlignStart___MO6tY",dc="LightBox-module__thumbsAlignCenter___Q4sUx",uc="LightBox-module__thumbsAlignEnd___p4y9R",pc="LightBox-module__thumbItem___HvnF3",mc="LightBox-module__closeButton___g2khP",gc="LightBox-module__fadeIn___0m5GW",hc="LightBox-module__slideInLeft___gPYwC",fc="LightBox-module__slideInRight___S-pPp",yc="LightBox-module__slideInTop___DFdAj",vc="LightBox-module__slideInBottom___m27kZ",bc="LightBox-module__fadeOut___55qBR",xc="LightBox-module__slideOutLeft___NvU7P",Cc="LightBox-module__slideOutRight___SK7eC",Sc="LightBox-module__slideOutTop___Vgg0z",$c="LightBox-module__slideOutBottom___nJ0Ef",wc="LightBox-module__scaleSlide___vZriG",J={hidden:Vl,heroImage:Dl,background:zl,editor:jl,contentStyle:ql,imageStyle:Kl,imgWrapper:Ul,contain:Gl,cover:Yl,caption:Xl,captionTextInner:Zl,lightboxSplide:Ql,arrow:Jl,arrowVertical:ec,nextArrow:tc,arrowInner:nc,arrowIcon:rc,arrowImg:ic,mirror:oc,thumbsWrapper:ac,thumbsContainerVertical:sc,thumbsContainer:lc,thumbsAlignStart:cc,thumbsAlignCenter:dc,thumbsAlignEnd:uc,thumbItem:pc,closeButton:mc,fadeIn:gc,slideInLeft:hc,slideInRight:fc,slideInTop:yc,slideInBottom:vc,fadeOut:bc,slideOutLeft:xc,slideOutRight:Cc,slideOutTop:Sc,slideOutBottom:$c,scaleSlide:wc},nr=(e,t,n)=>{const r={},[o,l]=e.split("-");return o==="top"?(r.top="0",r.bottom="auto"):o==="middle"?(r.top="50%",r.bottom="auto"):o==="bottom"&&(r.top="auto",r.bottom="0"),l==="left"?(r.left="0",r.right="auto"):l==="center"?(r.left="50%",r.right="auto"):l==="right"&&(r.left="auto",r.right="0"),o==="middle"&&l==="center"?r.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), calc(-50% + ${y.scalingValue(t.y,n)}))`:o==="middle"?r.transform=`translate(${y.scalingValue(t.x,n)}, calc(-50% + ${y.scalingValue(t.y,n)}))`:l==="center"?r.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), ${y.scalingValue(t.y,n)})`:r.transform=`translate(${y.scalingValue(t.x,n)}, ${y.scalingValue(t.y,n)})`,r};function pa(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=pa(e),r=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),l=e.naturalWidth,i=e.naturalHeight,c=r/o,s=l/i;let p,u;s>c?(p=r,u=r/s):(u=o,p=o*s);const T=t.left+n.left,x=t.top+n.top,f=(r-p)/2+T,m=(o-u)/2+x;return{x:f,y:m,width:p,height:u}}function eo(e){const t=e.getBoundingClientRect(),n=pa(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function to(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(o=>parseFloat(o.trim()));return r.length===4?r[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Tc(e,t){const n=(()=>{if(e==="fade in")return J.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return J.slideInLeft;case"right":return J.slideInRight;case"top":return J.slideInTop;case"bottom":return J.slideInBottom;default:return J.slideInRight}return J.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return J.fadeIn;if(e==="slide in")switch(t){case"left":return J.slideInLeft;case"right":return J.slideInRight;case"top":return J.slideInTop;case"bottom":return J.slideInBottom;default:return J.slideInRight}return J.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return J.fadeOut;if(e==="slide in")switch(t){case"left":return J.slideOutLeft;case"right":return J.slideOutRight;case"top":return J.slideOutTop;case"bottom":return J.slideOutBottom;default:return J.slideOutRight}return J.fadeOut})(),l=(()=>{if(e==="fade in")return J.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return J.slideOutLeft;case"right":return J.slideOutRight;case"top":return J.slideOutTop;case"bottom":return J.slideOutBottom;default:return J.slideOutRight}return J.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:o,disappearClass:l}}const Lc=({settings:e,content:t,styles:n,portalId:r,activeEvent:o,isEditor:l,isPreviewMode:i})=>{const[c,s]=d.useState(!1),{url:p}=e.thumbnailBlock.cover;return d.useEffect(()=>{o==="close"&&s(!1),o==="open"&&s(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:p,alt:"Cover",className:J.heroImage,onClick:()=>s(!0)}),a.jsx(Ec,{isOpen:c,onClose:()=>s(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:l})]})},Ec=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:o,portalId:l,isEditor:i,metadata:c})=>{var _e;const{widthSettings:s,fontSettings:p,letterSpacing:u,textAlign:T,wordSpacing:x,fontSizeLineHeight:f,textAppearance:m,color:g}=r.imageCaption??{},[C,w]=d.useState(0),[S,v]=d.useState(0),[F,L]=d.useState(!1),[H,b]=d.useState(!1),[E,O]=d.useState({}),$=d.useRef(null),P=d.useRef(null),A=d.useRef(null),W=d.useRef(!1),j=d.useRef(null),te=d.useRef(null),k=d.useRef(null),M=d.useRef(null),D=d.useRef(!1),N=d.useRef(null),[I,K]=d.useState(!1),{appear:Z,triggers:Q,slider:R,thumbnail:ne,controls:h,area:ee,caption:ge,layout:le}=o.lightboxBlock,{appearClass:be,backdropAppearClass:re,backdropDisappearClass:ce,disappearClass:V}=Tc(Z.type,Z.direction),U=(c==null?void 0:c.itemId)??null;d.useEffect(()=>{const B=()=>{setTimeout(()=>{var _,z;(z=(_=$.current)==null?void 0:_.splide)==null||z.refresh()},16)},ie=()=>{v(_=>_+1)};return window.addEventListener("ArticleEditor.Layout:change",B),window.addEventListener("ArticleEditor.ComponentContent:change",ie),()=>{window.removeEventListener("ArticleEditor.Layout:change",B),window.removeEventListener("ArticleEditor.ComponentContent:change",ie)}},[]),d.useEffect(()=>{if(!e||!ne.isActive){K(!1);return}const B=N.current;if(!B)return;const ie=()=>{R.direction==="horiz"?K(B.scrollWidth>B.clientWidth):K(B.scrollHeight>B.clientHeight)};ie();const _=new ResizeObserver(ie);return _.observe(B),()=>_.disconnect()},[e,ne.isActive,n.length,E,R.direction]);const G=d.useCallback(()=>{const B=window.matchMedia("(max-width: 768px)").matches,ie=to(ee.color);B&&!i&&ie>.9&&(document.body.style.backgroundColor=""),L(!0),W.current=!0;const _=z=>{z.target===j.current&&z.animationName&&(j.current&&te.current&&j.current.removeEventListener("animationend",te.current),te.current=null,W.current&&(W.current=!1,t()),L(!1))};j.current&&(te.current=_,j.current.addEventListener("animationend",_))},[t,ee.color,i]),se=(B,ie,_)=>{var z,q;if(B){if(Q.type==="click"&&Q.switch==="image")Q.repeat==="close"&&C===n.length-1?G():(z=$.current)==null||z.go("+1");else if(Q.type==="click"&&Q.switch==="50/50"){const Y=B.getBoundingClientRect(),ae=ie-Y.left,me=_-Y.top,We=Y.width,he=Y.height;let ve;R.direction==="horiz"?ve=ae<We/2?"-1":"+1":ve=me<he/2?"-1":"+1",(q=$.current)==null||q.go(ve)}}},ye=B=>{if(D.current){D.current=!1;return}const ie=n[C],_=(ie==null?void 0:ie.image.objectFit)==="cover";let z,q;if("changedTouches"in B&&B.changedTouches.length>0)z=B.changedTouches[0].clientX,q=B.changedTouches[0].clientY;else if("clientX"in B)z=B.clientX,q=B.clientY;else return;let Y;if(_&&A.current){const ae=eo(A.current);Y=z>=ae.left&&z<=ae.right&&q>=ae.top&&q<=ae.bottom}else{const ae=A.current?Ji(A.current):null;if(!ae){B.target===B.currentTarget&&G();return}Y=z>=ae.x&&z<=ae.x+ae.width&&q>=ae.y&&q<=ae.y+ae.height}Y?se(A.current,z,q):G()},Te=B=>{const ie=B.target;(ie.classList.contains(J.thumbsWrapper)||ie.classList.contains(J.thumbsContainer))&&ye(B)};d.useEffect(()=>{if(!e)return;const B=ie=>{var _,z;if(ie.key==="Escape"){G();return}if(ie.key==="ArrowRight"){w(q=>(q+1)%Math.max(n.length,1)),(_=$.current)==null||_.go("+1");return}ie.key==="ArrowLeft"&&(w(q=>(q-1+Math.max(n.length,1))%Math.max(n.length,1)),(z=$.current)==null||z.go("-1"))};return window.addEventListener("keydown",B),()=>{window.removeEventListener("keydown",B)}},[e,G,n.length]),d.useEffect(()=>{if(e){if(w(0),v(ie=>ie+1),W.current=!1,L(!1),b(!1),O({}),!U)return;const B=new CustomEvent("page-overlay",{detail:{itemId:U}});window.dispatchEvent(B)}return()=>{j.current&&te.current&&(j.current.removeEventListener("animationend",te.current),te.current=null),b(!1)}},[e,U]),d.useEffect(()=>{P.current!==null&&P.current!==R.type&&v(B=>B+1),P.current=R.type},[R.type]),d.useEffect(()=>{if(!e)return;const B=document.body.style.overflow,ie=window.matchMedia("(max-width: 768px)").matches,_=to(ee.color);document.body.style.overflow="hidden",b(!1);const z=Y=>{Y.target===j.current&&!W.current&&Y.animationName&&(ie&&!i&&_>.9&&(document.body.style.backgroundColor=ee.color),b(!0),j.current&&k.current&&j.current.removeEventListener("animationend",k.current),k.current=null)};j.current&&(k.current=z,j.current.addEventListener("animationend",z));const q=Y=>{const ae=Y.target;ae&&(ae.closest(`.${J.thumbsWrapper}`)||ae.closest(`.${J.thumbsContainer}`))||R.type!=="slide"&&Y.preventDefault()};return document.addEventListener("touchmove",q,{passive:!1}),()=>{document.body.style.overflow=B,document.removeEventListener("touchmove",q),j.current&&k.current&&(j.current.removeEventListener("animationend",k.current),k.current=null),b(!1)}},[e,i,ee.color,R.type]),d.useEffect(()=>{if(!e)return;const B=ie=>{var z,q;if(W.current){ie.stopPropagation();return}if(D.current){D.current=!1;return}const _=ie.target;if(!(_&&(_.closest(`.${J.thumbsContainer}`)||_.closest(`.${J.thumbItem}`)||_.closest(`.${J.arrow}`)||_.closest(`.${J.closeButton}`)||_.closest(`.${J.caption}`)))){if(R.type==="slide"&&Q.type==="drag"&&((q=(z=$.current)==null?void 0:z.splide)!=null&&q.root)){const Y=$.current.splide.root;if(_&&(Y.contains(_)||Y===_))return}if(ie.touches.length===0&&ie.changedTouches.length>0){const Y=n[C],ae=(Y==null?void 0:Y.image.objectFit)==="cover",me=ie.changedTouches[0];let We;if(ae&&A.current){const he=eo(A.current);We=me.clientX>=he.left&&me.clientX<=he.right&&me.clientY>=he.top&&me.clientY<=he.bottom}else{const he=A.current?Ji(A.current):null;if(!he)return;We=me.clientX>=he.x&&me.clientX<=he.x+he.width&&me.clientY>=he.y&&me.clientY<=he.y+he.height}if(!We){ie.stopPropagation(),W.current=!0;const he=ve=>{ve.stopPropagation(),ve.preventDefault(),document.removeEventListener("click",he,!0)};document.addEventListener("click",he,!0),G()}}}};return document.addEventListener("touchend",B,{passive:!0}),()=>{document.removeEventListener("touchend",B)}},[e,G,C,n]);const Se=(R.type==="scale"||R.type==="fade")&&R.direction==="vert"&&Q.type==="drag";d.useEffect(()=>{var ve,Me;if(!e||!Se||!((Me=(ve=$.current)==null?void 0:ve.splide)!=null&&Me.root))return;const B=$.current.splide.root,ie=30,_=(oe,xe)=>{if(M.current){const Ie=Math.abs(oe-M.current.x),ke=Math.abs(xe-M.current.y);(Ie>0||ke>0)&&(D.current=!0)}},z=oe=>{M.current&&(oe.preventDefault(),_(oe.clientX,oe.clientY))},q=oe=>{M.current&&oe.touches.length>0&&(oe.preventDefault(),_(oe.touches[0].clientX,oe.touches[0].clientY))},Y=(oe,xe)=>{if(!M.current||!$.current){M.current=null;return}const Ie=Math.abs(oe-M.current.x),ke=Math.abs(xe-M.current.y);ke>ie&&ke>Ie&&$.current.go(xe<M.current.y?"+1":"-1"),M.current=null},ae=oe=>{M.current&&Y(oe.clientX,oe.clientY),document.removeEventListener("pointerup",ae),document.removeEventListener("pointercancel",ae),document.removeEventListener("pointermove",z)},me=oe=>{if(M.current){if(oe.changedTouches.length>0){const xe=oe.changedTouches[0];Y(xe.clientX,xe.clientY)}document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),document.removeEventListener("touchmove",q)}},We=oe=>{M.current={x:oe.clientX,y:oe.clientY},D.current=!1,document.addEventListener("pointermove",z,{passive:!1}),document.addEventListener("pointerup",ae),document.addEventListener("pointercancel",ae)},he=oe=>{oe.touches.length>0&&(M.current={x:oe.touches[0].clientX,y:oe.touches[0].clientY},D.current=!1,document.addEventListener("touchmove",q,{passive:!1}),document.addEventListener("touchend",me),document.addEventListener("touchcancel",me))};return B.addEventListener("pointerdown",We),B.addEventListener("touchstart",he),()=>{B.removeEventListener("pointerdown",We),B.removeEventListener("touchstart",he),document.removeEventListener("pointermove",z),document.removeEventListener("pointerup",ae),document.removeEventListener("pointercancel",ae),document.removeEventListener("touchmove",q),document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),M.current=null,D.current=!1}},[e,Se,S]);const Le={backgroundColor:ee.color,backdropFilter:`blur(${ee.blur}px)`,animationDuration:`${parseInt(Z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:_o.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:i?null:j,className:Pe(J.background,F?ce:re,{[J.editor]:i},{[J.hidden]:!e}),style:{...Le,...H&&!i&&!F?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?j:null,className:Pe(J.contentStyle,F?V:be,{[J.editor]:i},{[J.hidden]:!e}),style:{animationDuration:`${parseInt(Z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Li,{onMove:B=>w(B.index),ref:$,className:J.lightboxSplide,options:{arrows:!1,speed:R.duration?parseInt(R.duration):500,direction:R.direction==="horiz"||R.type==="fade"||R.type==="scale"?"ltr":"ttb",pagination:!1,drag:Q.type==="drag"&&!Se,perPage:1,width:"100%",height:"100%",type:R.type==="fade"||R.type==="scale"?"fade":"loop",padding:0,rewind:Q.repeat!=="close",start:0},style:{"--splide-speed":R.duration},children:n.map((B,ie)=>{const _=nr(le.position,le.offset,i),z=`${y.scalingValue(le.padding.top,i)} ${y.scalingValue(le.padding.right,i)} ${y.scalingValue(le.padding.bottom,i)} ${y.scalingValue(le.padding.left,i)}`,q=R.type==="scale"?(()=>{const{transform:Y,...ae}=_;return{...ae,position:"absolute",padding:z,boxSizing:"border-box","--position-transform":Y||"none"}})():{..._,position:"absolute",padding:z,boxSizing:"border-box"};return a.jsx(Ei,{children:a.jsx("div",{className:J.imgWrapper,onClick:ye,children:a.jsx("img",{ref:ie===C?A:null,className:Pe(J.imageStyle,{[J.contain]:B.image.objectFit==="contain",[J.cover]:B.image.objectFit==="cover",[J.scaleSlide]:R.type==="scale"}),src:B.image.url,alt:B.image.name??"",style:{...q,pointerEvents:B.image.objectFit==="contain"?"none":"auto"}})})},ie)})},S),h.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Pe(J.arrow,{[J.arrowVertical]:R.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:a.jsxs("button",{className:J.arrowInner,style:{transform:`translate(${y.scalingValue(h.offset.x,i)}, ${y.scalingValue(h.offset.y*(R.direction==="horiz"?1:-1),i)}) scale(${h.scale}) rotate(${R.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var B;return(B=$.current)==null?void 0:B.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&a.jsx(Ht,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:Pe(J.arrowImg,J.mirror)}),!h.arrowsImgUrl&&a.jsx(no,{color:h.color,className:Pe(J.arrowIcon,J.arrowImg,J.mirror)})]})}),a.jsx("div",{className:Pe(J.arrow,J.nextArrow,{[J.arrowVertical]:R.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:a.jsxs("button",{className:J.arrowInner,style:{transform:`translate(${y.scalingValue(h.offset.x*(R.direction==="horiz"?-1:1),i)}, ${y.scalingValue(h.offset.y,i)}) scale(${h.scale}) rotate(${R.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var B;return(B=$.current)==null?void 0:B.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&a.jsx(Ht,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:J.arrowImg}),!h.arrowsImgUrl&&a.jsx(no,{color:h.color,className:Pe(J.arrowIcon,J.arrowImg)})]})})]}),ee.closeIconUrl&&(()=>{const B=nr(ee.closeIconAlign,ee.closeIconOffset,i),ie=`scale(${ee.closeIconScale})`,_=B.transform?`${B.transform} ${ie}`:ie;return a.jsx("button",{className:J.closeButton,style:{...B,transform:_},onClick:G,"aria-label":"Close lightbox",children:a.jsx(Ht,{url:ee.closeIconUrl,fill:ee.closeIconColor??"#000000",hoverFill:ee.closeIconHover??"#cccccc"})})})(),ge&&ge.isActive&&r.imageCaption&&((_e=n[C])==null?void 0:_e.imageCaption)&&a.jsx("div",{className:J.caption,style:{...nr(ge.alignment,ge.offset,i),fontFamily:Rr(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:s.sizing==="auto"?"max-content":y.scalingValue(s.width,i),letterSpacing:y.scalingValue(u,i),wordSpacing:y.scalingValue(x,i),textAlign:T,fontSize:y.scalingValue(f.fontSize,i),lineHeight:y.scalingValue(f.lineHeight,i),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:g},onClick:B=>B.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:J.captionTextInner,style:{"--link-color":ge.linkColor,"--link-hover-color":ge.linkHoverColor},children:a.jsx(Sn,{content:n[C].imageCaption})})}),ne.isActive&&(()=>{const[B,ie]=ne.position.split("-"),_=R.direction==="horiz"?`${B}-left`:ne.position,z=nr(_,ne.offset,i),q=()=>{if(R.direction==="horiz"){if(ie==="left")return"flex-start";if(ie==="center")return"center";if(ie==="right")return"flex-end"}else{if(B==="top")return"flex-start";if(B==="middle")return"center";if(B==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:N,className:J.thumbsWrapper,onClick:Y=>Te(Y),style:{position:i?"absolute":"fixed",...z,...R.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Pe(J.thumbsContainer,{[J.thumbsContainerVertical]:R.direction==="vert",[J.thumbsAlignStart]:ne.align==="start",[J.thumbsAlignCenter]:ne.align==="center",[J.thumbsAlignEnd]:ne.align==="end"}),style:{gap:y.scalingValue(ne.grid.gap,i),justifyContent:I?"flex-start":q()},children:n.map((Y,ae)=>{const me=ae===C,We=E[ae],ve=ne.grid.size*(me?ne.activeState.scale:1),Me=()=>{if(ne.fit!=="fit")return{};if(!We)return R.direction==="horiz"?{height:y.scalingValue(ve,i)}:{width:y.scalingValue(ve,i)};const oe=We.width/We.height;if(R.direction==="horiz"){const xe=ve,Ie=xe*oe;return{width:y.scalingValue(Ie,i),height:y.scalingValue(xe,i)}}else{const xe=ve,Ie=xe/oe;return{width:y.scalingValue(xe,i),height:y.scalingValue(Ie,i)}}};return a.jsx("button",{className:J.thumbItem,style:{...R.direction==="horiz"&&ne.fit!=="fit"?{height:y.scalingValue(ve,i)}:{},...R.direction==="vert"&&ne.fit!=="fit"?{width:y.scalingValue(ve,i)}:{},...ne.fit==="cover"?{width:y.scalingValue(ve,i),height:y.scalingValue(ve,i)}:{},...Me(),transition:me?"all 0.25s ease-out":"none",opacity:me?ne.activeState.opacity/100:ne.opacity/100,"--thumb-hover":ne.activeState.opacity/100},onClick:oe=>{var xe;oe.stopPropagation(),w(ae),(xe=$.current)==null||xe.go(ae)},onMouseEnter:()=>{var oe;ne.triggers==="hov"&&((oe=$.current)==null||oe.go(ae))},children:a.jsx("img",{src:Y.image.url,alt:Y.image.name??"",onLoad:oe=>{const xe=oe.currentTarget;xe.naturalWidth&&xe.naturalHeight&&O(Ie=>({...Ie,[ae]:{width:xe.naturalWidth,height:xe.naturalHeight}}))},style:{objectFit:ne.fit==="cover"?"cover":"contain",...ne.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ne.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Y.image.name}-${ae}`)})})})})()]})]}),document.getElementById(l))};function no({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Pc={element:Lc,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 rr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function _c(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: ${rr(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: ${rr(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: ${rr(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: ${rr(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 Ac({settings:e,isEditor:t,isEditMode:n,isPreviewMode:r,metadata:o,activeEvent:l}){const i=!!n,c=r&&t||!t,{prefix:s}=y.useScopedStyles(),{type:p="A",fieldsToShow:u=2,fields:T=[],buttonLabel:x,gap:f,fieldsGap:m,buttonCorners:g,buttonStroke:C,buttonPadding:w,isButtonFullWidth:S,inputCorners:v,inputStroke:F,inputPadding:L,inputColor:H,inputTextColor:b,inputBorderColor:E,placeholderColor:O,buttonColor:$,buttonTextColor:P,buttonBorderColor:A,labelTextColor:W,successColor:j,errorColor:te,fontFamily:k,inputFontSettings:M,inputFontSize:D,inputLineHeight:N,inputLetterSpacing:I,inputWordSpacing:K,inputTextAppearance:Z,buttonFontSettings:Q,buttonFontSize:R,buttonLineHeight:ne,buttonLetterSpacing:h,buttonWordSpacing:ee,buttonTextAppearance:ge,labelFontSettings:le,labelFontSize:be,labelLineHeight:re,labelLetterSpacing:ce,labelWordSpacing:V,labelTextAppearance:U,statusFontSettings:G,statusFontSize:se,statusLineHeight:ye,statusLetterSpacing:Te,statusWordSpacing:Se,statusTextAppearance:Le,successMessage:_e,errorMessage:B,stateOverrides:ie}=e,_=p==="B",z=T.slice(0,Math.min(u,T.length)),q={fontSettings:{fontFamily:k,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:D??.01,lineHeight:N,letterSpacing:I??0,wordSpacing:K??0,textAppearance:Z,color:b},Y=yt(Je(q,t)),ae=y.scalingValue(F??0,t),me=y.scalingValue((N??D??.01)+((L==null?void 0:L.top)??0)+((L==null?void 0:L.bottom)??0)+(p==="C"?F??0:(F??0)*2),t),We={...Y,borderStyle:"solid",borderRadius:p==="C"?0:y.scalingValue(v??0,t),...p==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ae,borderLeftWidth:0}:{borderWidth:ae},paddingTop:y.scalingValue((L==null?void 0:L.top)??0,t),paddingRight:y.scalingValue((L==null?void 0:L.right)??0,t),paddingBottom:y.scalingValue((L==null?void 0:L.bottom)??0,t),paddingLeft:y.scalingValue((L==null?void 0:L.left)??0,t),height:me,minHeight:me},he={fontSettings:{fontFamily:k,fontWeight:(Q==null?void 0:Q.fontWeight)??400,fontStyle:(Q==null?void 0:Q.fontStyle)??"normal"},fontSize:R??.01,lineHeight:ne,letterSpacing:h??0,wordSpacing:ee??0,textAppearance:ge,color:P},ve=yt(Je(he,t)),Me=y.scalingValue(C??0,t),oe={fontSettings:{fontFamily:k,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:be??.01,lineHeight:re,letterSpacing:ce??0,wordSpacing:V??0,textAppearance:U,color:W},xe=Je(oe,t),Ie={fontSettings:{fontFamily:k,fontWeight:(G==null?void 0:G.fontWeight)??400,fontStyle:(G==null?void 0:G.fontStyle)??"normal"},fontSize:se??.01,lineHeight:ye,letterSpacing:Te??0,wordSpacing:Se??0,textAppearance:Le,color:j},ke=yt(Je(Ie,t)),Ve=y.buildColorVars(s,{inputColor:H,inputTextColor:b,inputBorderColor:E,placeholderColor:O!=null&&O.trim()?O:"#cccccc",buttonColor:$,buttonTextColor:P,buttonBorderColor:A,labelTextColor:W,successColor:j,errorColor:te},Ic,Rc,ie),[nt,pt]=d.useState(()=>Object.fromEntries(z.map($e=>[$e.name,""]))),[mt,xt]=d.useState("idle"),[_t,gt]=d.useState(null),At=l==="success"?"success":l==="error"?"error":mt,pe=l==="error"?B:_t,Ne=l==="filled",Be=d.useMemo(()=>{if(!Ne)return nt;let $e=null;for(const Qe of z)(nt[Qe.name]??"").trim().length>0||($e=$e??{...nt},$e[Qe.name]="Filled");return $e??nt},[nt,Ne,z]),Ue=At==="error"?y.getFormFieldValidationError(z,Be):null,Vt=`${l&&l!=="default"?`${s}-state-${l}`:""}`.trim(),St=o==null?void 0:o.submitUrl,It=($e,Qe)=>{pt(Ke=>({...Ke,[$e]:Qe}))},Dt=async $e=>{if($e.preventDefault(),!c)return;const Qe=Object.fromEntries(z.map(De=>{var at;return[De.name,((at=nt[De.name])==null?void 0:at.trim())??""]}).filter(([,De])=>De));if(!St){xt("error"),gt("No integrations were found for this form.");return}if(Object.keys(Qe).length===0)return;const Ke=y.getFormFieldValidationError(z,nt);if(Ke){xt("error"),gt(Ke);return}xt("submitting"),gt(null);try{const De=await fetch(St,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Qe)});if(!De.ok){const at=await De.text();throw new Error(at||`Request failed: ${De.status}`)}xt("success"),pt(Object.fromEntries(z.map(at=>[at.name,""])))}catch(De){xt("error"),gt(De instanceof Error?De.message:"Something went wrong")}};return a.jsxs("div",{className:`${s}-wrapper ${s}-type-${p} ${Vt}`.trim(),style:Ve,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_c(s)}}),a.jsxs("form",{onSubmit:Dt,className:`${s}-form`,children:[a.jsx("div",{className:`${s}-fields`,children:z.map(($e,Qe)=>a.jsxs(d.Fragment,{children:[Qe>0&&a.jsx("div",{"data-controls":i?"fieldsGap":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(m??0,t)}}),a.jsxs("div",{className:`${s}-field-group${_?` ${s}-labeled`:""}`,children:[_&&a.jsx("span",{className:`${s}-field-label`,style:xe?{...xe,lineHeight:xe.fontSize}:void 0,children:$e.label||$e.name}),$e.type==="textarea"?a.jsx("textarea",{name:$e.name,autoComplete:"off",value:Be[$e.name]??"",onChange:Ke=>It($e.name,Ke.target.value),placeholder:$e.placeholder,className:`${s}-input`,style:We,rows:1,"data-filled":Ne||(Be[$e.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:$e.type==="phone"?"tel":$e.type==="email"?"email":"text",name:$e.name,autoComplete:"off",value:Be[$e.name]??"",onChange:Ke=>It($e.name,Ke.target.value),placeholder:$e.placeholder,required:$e.isRequired??$e.type==="email",className:`${s}-input`,style:We,"data-filled":Ne||(Be[$e.name]??"").trim().length>0})]})]},Qe))}),a.jsx("div",{"data-controls":i?"gap":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(f??0,t)}}),a.jsx("div",{className:`${s}-overlay-anchor`,children:a.jsx("button",{type:c?"submit":"button",className:`${s}-button`,style:{borderStyle:"solid",borderRadius:y.scalingValue(g??0,t),borderWidth:Me,paddingTop:y.scalingValue((w==null?void 0:w.top)??0,t),paddingRight:y.scalingValue((w==null?void 0:w.right)??0,t),paddingBottom:y.scalingValue((w==null?void 0:w.bottom)??0,t),paddingLeft:y.scalingValue((w==null?void 0:w.left)??0,t),pointerEvents:c?"auto":void 0,...ve,...S?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${s}-overlay-anchor`,style:S?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:mt==="submitting"?"...":x})})})]}),At==="success"&&a.jsx("p",{className:`${s}-success`,style:{...ke},children:_e}),At==="error"&&a.jsx("p",{className:`${s}-error`,style:{...ke},role:"alert",children:Ue??pe??B})]})}const Ic={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"},Rc=["hover","focus","filled","success","error"],kc=`import React, { useMemo, useState } from 'react';
|
|
159
159
|
import { CommonComponentProps } from '../props';
|
|
160
160
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
|
|
161
161
|
import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
|
|
@@ -789,7 +789,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
|
|
|
789
789
|
};
|
|
790
790
|
|
|
791
791
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
792
|
-
`,Mc=[{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"}],ir={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Nc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Hc={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},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:{...ir.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:{...ir.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:{...ir.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:{...ir.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:Mc,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"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","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:["__componentName__","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:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Nc],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"]},Bc={element:Rc,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:Hc,sourceCode:Fc};function ar(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Oc(e){return`
|
|
792
|
+
`,Wc=[{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"}],ir={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Mc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Fc={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},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:{...ir.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:{...ir.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:{...ir.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:{...ir.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:Wc,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"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","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:["__componentName__","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:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Mc],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"]},Hc={element:Ac,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:Fc,sourceCode:kc};function or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Nc(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;
|
|
|
971
971
|
align-items: center;
|
|
972
972
|
}
|
|
973
973
|
.${e}-success {
|
|
974
|
-
margin-top: ${
|
|
975
|
-
font-size: ${
|
|
974
|
+
margin-top: ${or(8)};
|
|
975
|
+
font-size: ${or(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: ${or(8)};
|
|
980
|
+
font-size: ${or(14)};
|
|
981
981
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
982
982
|
}
|
|
983
|
-
`}const
|
|
983
|
+
`}const Bc=({settings:e,isEditor:t,isPreviewMode:n,metadata:r,activeEvent:o})=>{const{prefix:l}=y.useScopedStyles(),i=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:s,buttonLabel:p,fieldsToShow:u=1,fontFamily:T,inputFontSettings:x,inputFontSize:f,inputLineHeight:m,inputLetterSpacing:g,inputWordSpacing:C,inputTextAppearance:w,buttonFontSettings:S,buttonFontSize:v,buttonLineHeight:F,buttonLetterSpacing:L,buttonWordSpacing:H,buttonTextAppearance:b,statusFontSettings:E,statusFontSize:O,statusLineHeight:$,statusLetterSpacing:P,statusWordSpacing:A,statusTextAppearance:W,iconMaxWidth:j,minHeight:te,corners:k,stroke:M,stateOverrides:D,inputPadding:N,buttonPadding:I,successMessage:K="Thanks for subscribing!",errorMessage:Z="Please, fill all required fields."}=e,Q=c.slice(0,Math.min(u,c.length)),[R,ne]=d.useState(()=>Object.fromEntries(Q.map(oe=>[oe.name,""]))),[h,ee]=d.useState("idle"),[ge,le]=d.useState(null),be=o==="success"?"success":o==="error"?"error":h,re=o==="error"?Z:ge,ce=o==="filled",V=d.useMemo(()=>{if(!ce)return R;let oe=null;for(const xe of Q)(R[xe.name]??"").trim().length>0||(oe=oe??{...R},oe[xe.name]="Filled");return oe??R},[ce,R,Q]),U=be==="error"?y.getFormFieldValidationError(Q,V):null,G=o&&o!=="default"?`${l}-state-${o}`:"",se=Q.some(oe=>(V[oe.name]??"").trim().length>0),ye=G!==`${l}-state-filled`&&se?`${l}-state-filled`:"",Te=`${G} ${ye}`.trim(),Se=r==null?void 0:r.submitUrl,Le=p??"",_e=(s==null?void 0:s.icon)??"",B=(s==null?void 0:s.mode)==="On",ie=Le||"Submit",_={fontSettings:{fontFamily:T,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:f??.01,lineHeight:m,letterSpacing:g??0,wordSpacing:C??0,textAppearance:w,color:e.inputTextColor??"#111111"},z={fontSettings:{fontFamily:T,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:v??.01,lineHeight:F,letterSpacing:L??0,wordSpacing:H??0,textAppearance:b,color:e.buttonTextColor??"#ffffff"},q={fontSettings:{fontFamily:T,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:O??.01,lineHeight:$,letterSpacing:P??0,wordSpacing:A??0,textAppearance:W,color:e.successColor??"#22c55e"},Y=yt(Je(_,t)),ae=yt(Je(z,t)),me=yt(Je(q,t)),We=y.buildColorVars(l,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(_==null?void 0:_.color)??"#111111",buttonTextColor:e.buttonTextColor??(z==null?void 0:z.color)??"#ffffff"},Oc,Vc,D),he={borderRadius:y.scalingValue(k,t),borderWidth:y.scalingValue(M,t),borderStyle:"solid"},ve={borderLeftWidth:y.scalingValue(M,t)},Me=async oe=>{if(oe.preventDefault(),!i)return;const xe=Object.fromEntries(Q.map(ke=>{var Ve;return[ke.name,((Ve=R[ke.name])==null?void 0:Ve.trim())??""]}).filter(([,ke])=>ke));if(!Se){ee("error"),le("No integrations were found for this form.");return}if(Object.keys(xe).length===0)return;const Ie=y.getFormFieldValidationError(Q,R);if(Ie){ee("error"),le(Ie);return}ee("submitting"),le(null);try{const ke=await fetch(Se,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(xe)});if(!ke.ok){const Ve=await ke.text();throw new Error(Ve||`Request failed: ${ke.status}`)}ee("success"),ne(Object.fromEntries(Q.map(Ve=>[Ve.name,""])))}catch(ke){ee("error"),le(ke instanceof Error?ke.message:"Something went wrong")}};return a.jsxs("div",{className:`${l}-wrapper ${Te}`.trim(),style:We,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Nc(l)}}),a.jsxs("form",{onSubmit:Me,className:`${l}-form`,style:{...he,height:y.scalingValue(te,t),minHeight:y.scalingValue(te,t)},children:[a.jsx("div",{className:`${l}-inputWrap ${l}-overlayAnchor`,style:{flex:1,minWidth:0},children:Q.map(oe=>a.jsx("input",{type:oe.type==="email"?"email":oe.type==="phone"?"tel":"text",name:oe.name,autoComplete:"off",value:V[oe.name]??"",onChange:xe=>ne(Ie=>({...Ie,[oe.name]:xe.target.value})),placeholder:oe.placeholder,required:oe.isRequired??oe.type==="email",className:`${l}-input`,style:{...Y,paddingRight:y.scalingValue(N.right,t),paddingLeft:y.scalingValue(N.left,t),paddingTop:y.scalingValue(N.top,t),paddingBottom:y.scalingValue(N.bottom,t)}},oe.name))}),a.jsx("div",{className:`${l}-overlayAnchor`,children:a.jsx("button",{type:i?"submit":"button",className:`${l}-submitBtn`,"aria-label":ie,style:{...ae,...ve,paddingRight:y.scalingValue(I.right,t),paddingLeft:y.scalingValue(I.left,t),paddingTop:y.scalingValue(I.top,t),paddingBottom:y.scalingValue(I.bottom,t),pointerEvents:i?"auto":void 0},children:h==="submitting"?"...":B?_e&&a.jsx(Ht,{url:_e,className:`${l}-submitBtnIcon`,style:{maxWidth:y.scalingValue(j??0,t)},fill:`var(--${l}-button-text-color)`,hoverFill:`var(--${l}-button-text-color)`}):Le})})]}),be==="success"&&a.jsx("p",{className:`${l}-success`,style:{...me},children:K}),be==="error"&&a.jsx("p",{className:`${l}-error`,style:{...me},role:"alert",children:U??re??Z})]})},Oc={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"},Vc=["hover","focus","filled","success","error"],Dc=`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
|
-
`,qc="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>'),Kc=[{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."}],zr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Uc=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Gc={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},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:{...zr.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:{...zr.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:{...zr.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:Kc,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:qc},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__"]},{type:"row",items:["fieldsToShow","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:["__componentName__","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:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Uc],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"]},Yc={element:Vc,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:Gc,sourceCode:jc};function Xc(e){return`
|
|
1560
|
+
`,zc="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>'),jc=[{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."}],Dr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},qc=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Kc={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},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:{...Dr.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:{...Dr.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:{...Dr.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:jc,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:zc},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__"]},{type:"row",items:["fieldsToShow","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:["__componentName__","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:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...qc],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"]},Uc={element:Bc,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:Kc,sourceCode:Dc};function Gc(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 Yc=30,Xc=20,zr=2,Zc=2,Qc=(e,t)=>Array.from({length:t},()=>e).flat(),Jc=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},ed=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>Jc(r,e))},td=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:o,imageHoverClass:l,isFirstSet:i,scaled:c,onFirstSetImageDone:s})=>{var b,E,O;const p=d.useRef(null);d.useLayoutEffect(()=>{if(!i)return;const $=p.current;$!=null&&$.complete&&(s==null||s())},[i,(b=e.image)==null?void 0:b.url,s]);const u=n.display==="Cover",T=n.ratioValue??"1:1",x=n.reversed??!1,[f,m]=T.split(":").map(Number),w=(x?m:f)/(x?f:m);let S=r,v=S/w;v>o&&(v=o,S=v*w);const F=c(S),L=c(v),H=((E=e.image)==null?void 0:E.url)&&a.jsx("img",{ref:p,src:e.image.url,alt:((O=e.image)==null?void 0:O.name)??"",style:u?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:c(r),objectFit:"contain"},onLoad:i?s:void 0,onError:i?s:void 0});return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:F}:{width:"fit-content",maxWidth:c(r),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...u?{width:F,height:L,overflow:"hidden"}:{width:"fit-content",maxWidth:c(r),height:c(o)}},children:H&&e.link?a.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Pe(`${t}-marquee-link`,!u&&`${t}-marquee-link-contain`),children:H}):H})})},nd=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o})=>{const{prefix:l}=y.useScopedStyles(),i=d.useMemo(()=>Gc(l),[l]),{speed:c,direction:s,pauseOnHover:p,gap:u,imageMaxWidth:T,imageMaxHeight:x,imageFit:f,hoverEffect:m}=e,g=!!o,C=!n||!!r,w=C&&m!=="off"&&m!=="randomize"?`${l}-image-hover-${m}`:void 0,S=n?!!r:!0,F=((t==null?void 0:t.length)??0)>0&&(S||!!n),L=Math.max(0,c)*Yc,H=U=>y.scalingValue(U,n??!1),b=d.useRef(null),E=d.useRef(null),O=d.useRef(null),[$,P]=d.useState(0),[A,W]=d.useState(0),j=S&&p==="on",[te,k]=d.useState(!1),[M,D]=d.useState({}),N=d.useRef(M);N.current=M;const I=d.useRef(null),K=d.useRef(0),Z=d.useRef(null),Q=d.useMemo(()=>(t??[]).map(U=>{var G;return((G=U.image)==null?void 0:G.url)??""}).join("\0"),[t]),[R,ne]=d.useState(zr),h=d.useMemo(()=>{const U=t??[];return!S||U.length===0?U:Qc(U,R)},[t,S,R]),ee=d.useMemo(()=>h.filter(U=>{var G;return!!((G=U.image)!=null&&G.url)}).length,[h]),ge=F?Zc:1;d.useLayoutEffect(()=>{K.current=0,D({}),I.current=null,ne(zr),P(0)},[Q]),d.useEffect(()=>{if(!C||m!=="randomize")return;const U=b.current;if(!U)return;const G=Se=>{D(Le=>{let _e=null;for(const B of Se)B in Le&&(ed(U,B)||(_e||(_e={...Le}),delete _e[B]));return _e??Le})},se=new IntersectionObserver(Se=>{const Le=new Set;for(const _e of Se){const B=_e.target.dataset.marqueeItemIndex,ie=B!==void 0?Number(B):NaN;Number.isNaN(ie)||Le.add(ie)}Le.size>0&&G(Le)},{root:U,threshold:0});Object.keys(M).forEach(Se=>{const Le=Number(Se);U.querySelectorAll(`[data-marquee-item-index="${Le}"]`).forEach(_e=>se.observe(_e))});let ye=0;const Te=()=>{const Se=Object.keys(N.current);Se.length!==0&&(G(Se.map(Number)),ye=requestAnimationFrame(Te))};return Object.keys(N.current).length>0&&(ye=requestAnimationFrame(Te)),()=>{cancelAnimationFrame(ye),se.disconnect()}},[m,M,C]),d.useLayoutEffect(()=>{if(!F)return;const U=b.current,G=O.current;if(!U||!G)return;let se=0;const ye=()=>{const Le=U.getBoundingClientRect().width,_e=G.getBoundingClientRect().width,B=I.current,ie=typeof B=="number"&&Math.abs(B-_e)<=.25;if(I.current=_e,S&&_e>0&&R>0){const _=_e/R;if(_>0&&Le>0){const z=Math.max(zr,Math.ceil(Le/_)+1);if(z!==R){ne(z);return}}}if(_e>0&&$<=0){P(_e);return}ie&&_e!==$?P(_e):!ie&&$<=0&&(cancelAnimationFrame(se),se=requestAnimationFrame(ye))},Te=()=>{cancelAnimationFrame(se),se=requestAnimationFrame(ye)};Z.current=Te,Te();const Se=new ResizeObserver(Te);return Se.observe(U),Se.observe(G),()=>{Z.current=null,cancelAnimationFrame(se),Se.disconnect()}},[S,F,$,Q,R]),d.useLayoutEffect(()=>{const U=E.current;if(!F||!U)return;const G=$>0?$:0,se=G>0&&L>0?G/L*1e3:0,ye=`${Math.max(0,se)/1e3}s`;U.style.setProperty("--marquee-distance",`${G}px`),U.style.setProperty("--marquee-duration",ye)},[S,F,L,$]),d.useLayoutEffect(()=>{if(!F){W(0);return}if($<=0){W(0);return}const U=E.current;if(!U)return;const G=()=>{const ye=U.getBoundingClientRect().height;W(ye>0?ye:0)};G();const se=new ResizeObserver(G);return se.observe(U),()=>se.disconnect()},[F,ge,h,n,u,T,x,$,f,M]);const le=()=>{j&&k(!0)},be=()=>{j&&k(!1)},re=d.useCallback(()=>{var U;K.current=Math.min(ee,K.current+1),(U=Z.current)==null||U.call(Z)},[ee]),ce=d.useCallback((U,G)=>{D(se=>{const ye=se[U]??G,Te=(t??[]).filter(Le=>Le!==ye);if(Te.length===0)return se;const Se=Te[Math.floor(Math.random()*Te.length)];return{...se,[U]:Se}})},[t]),V=(U,G,se,ye)=>{const Te=C&&m==="randomize"&&f.display==="Cover"?M[se]??U:U,Se=`max(${H(u)}, ${Xc}px)`,Le=`calc(-0.5 * (${Se} + ${H(u)}))`;return a.jsxs("div",{className:`${l}-marquee-card`,"data-marquee-item-index":se,onMouseEnter:C&&m==="randomize"&&f.display==="Cover"?()=>ce(se,U):void 0,children:[a.jsx(td,{item:Te,prefix:l,imageFit:f,imageMaxWidth:T,imageMaxHeight:x,imageHoverClass:w,isEditor:n,isFirstSet:ye,scaled:H,onFirstSetImageDone:re}),g&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${l}-gap-control`,style:{position:"absolute",top:0,right:Le,width:Se,height:"100%"}})]},`${G}-${se}`)};if(F){const U=S?j&&te?"paused":"running":"paused";return a.jsxs("div",{ref:b,className:Pe(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Marquee",style:$>0&&A>0?{height:A}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:i}}),a.jsx("div",{ref:E,className:`${l}-marquee-track`,"data-direction":s,onMouseEnter:le,onMouseLeave:be,style:{"--marquee-play-state":U},children:Array.from({length:ge},(G,se)=>a.jsx("div",{ref:se===0?O:void 0,className:Pe(`${l}-marquee-row`,`${l}-marquee-set`),style:{gap:H(u),paddingRight:H(u)},"aria-hidden":se>0,children:h.map((ye,Te)=>V(ye,se,Te,se===0))},`set-${se}`))},"marquee-track")]})}return a.jsxs("div",{ref:b,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:i}}),a.jsx("div",{className:Pe(`${l}-marquee-row`,`${l}-marquee-static`),style:{gap:H(u),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((U,G)=>V(U,0,G))},"marquee-static")]})},rd=`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
|
|
@@ -2320,7 +2320,7 @@ type MarqueeProps = {\r
|
|
|
2320
2320
|
isPreviewMode?: boolean;\r
|
|
2321
2321
|
isEditMode?: boolean;\r
|
|
2322
2322
|
} & CommonComponentProps;\r
|
|
2323
|
-
`,
|
|
2323
|
+
`,id={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,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,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,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:.208,imageMaxHeight:.278}},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:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{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/component-assets/grid(1).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:""},link:""}]}},od={element:nd,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:400},m:{width:390,height:80}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:id,sourceCode:rd,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function ro(e){return`
|
|
2324
2324
|
.${e}-marquee-wrapper {
|
|
2325
2325
|
overflow: hidden;
|
|
2326
2326
|
width: 100%;
|
|
@@ -2407,7 +2407,7 @@ type MarqueeProps = {\r
|
|
|
2407
2407
|
pointer-events: auto;
|
|
2408
2408
|
z-index: 10;
|
|
2409
2409
|
}
|
|
2410
|
-
`}const
|
|
2410
|
+
`}const ad=30,io=2,sd=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o})=>{const{prefix:l}=y.useScopedStyles(),{align:i,speed:c,direction:s,pauseOnHover:p,gap:u,cardWidth:T,corners:x,stroke:f,strokeColor:m,bgColor:g,padding:C,logoMarginTop:w,logoWidth:S,logoHeight:v,captionMarginTop:F}=e,L=!!o,H=((t==null?void 0:t.length)??0)>0,b=c>0&&(!n||r),E=H&&(b||n),O=Math.max(0,c)*ad,$=_=>y.scalingValue(_,n??!1),P=d.useRef(null),A=d.useRef(null),W=d.useRef(null),[j,te]=d.useState(0),[k,M]=d.useState(0),[D,N]=d.useState(0),I=b&&p==="on",[K,Z]=d.useState(!1),Q=d.useRef(null),[R,ne]=d.useState(0),[h,ee]=d.useState(0),ge=d.useRef(null),le=_=>{var q,Y,ae,me,We;return{fontSettings:{fontFamily:(e==null?void 0:e[`${_}FontFamily`])??"Arial",fontWeight:((q=e==null?void 0:e[`${_}FontSettings`])==null?void 0:q.fontWeight)??400,fontStyle:((Y=e==null?void 0:e[`${_}FontSettings`])==null?void 0:Y.fontStyle)??"normal"},textAppearance:{textTransform:((ae=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:ae.textTransform)??"none",textDecoration:((me=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:me.textDecoration)??"none",fontVariant:((We=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:We.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${_}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${_}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${_}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${_}LineHeight`])??.01,color:(e==null?void 0:e[`${_}Color`])??"#000000"}},be=le("text"),re=le("caption"),ce=d.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(_=>{var z,q;return(((z=_.text)==null?void 0:z.length)??0)>0||(((q=_.caption)==null?void 0:q.length)??0)>0}),[t]),V=d.useMemo(()=>!E||(t==null?void 0:t.length)===0?1:k<=0||j<=0?io:Math.max(io,Math.ceil(j/k)+1),[E,t==null?void 0:t.length,k,j]);d.useLayoutEffect(()=>{if(!E)return;const _=P.current,z=W.current;if(!_||!z)return;let q=0;const Y=()=>{const We=_.getBoundingClientRect().width,he=z.getBoundingClientRect().width,ve=ge.current,Me=typeof ve=="number"&&Math.abs(ve-he)<=.25;if(ge.current=he,te(We),typeof he=="number"&&he>0&&k<=0){M(he);return}Me&&he!==k?M(he):!Me&&k<=0&&(cancelAnimationFrame(q),q=requestAnimationFrame(Y))},ae=()=>{cancelAnimationFrame(q),q=requestAnimationFrame(Y)};ae();const me=new ResizeObserver(ae);return me.observe(_),me.observe(z),()=>{cancelAnimationFrame(q),me.disconnect()}},[b,E,k]),d.useLayoutEffect(()=>{const _=A.current;if(!E||!_)return;const z=k>0?k:0,q=z>0&&O>0?z/O*1e3:0,Y=`${Math.max(0,q)/1e3}s`;_.style.setProperty("--marquee-distance",`${z}px`),_.style.setProperty("--marquee-duration",Y)},[b,E,O,k]),d.useLayoutEffect(()=>{if(!E){N(0);return}const _=W.current,z=A.current;if(!_||!z)return;const q=()=>{let ae=0;for(let me=0;me<_.children.length;me++){const he=_.children[me].firstElementChild;he&&(ae=Math.max(ae,he.offsetHeight))}ae<=0&&(ae=z.offsetHeight),N(ae>0?ae:0)};q();const Y=new ResizeObserver(q);return Y.observe(_),Y.observe(z),()=>{Y.disconnect()}},[E,V,t,n,u,T,C,f,x,S,v,R,h]);const U=()=>{I&&Z(!0)},G=()=>{I&&Z(!1)},se=d.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),ye=d.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),Te=d.useCallback((_,z,q,Y)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[a.jsx("div",{"data-controls":L?Y==null?void 0:Y.controlsName:void 0,"data-controls-axis":L?"y":void 0,className:L?`${l}-control`:void 0,style:{height:$((Y==null?void 0:Y.marginTop)??0)}}),a.jsx("div",{...Y!=null&&Y.dataMeasureKind?{"data-testimonial-measure":Y.dataMeasureKind}:{},style:{...Je(_,n),textAlign:ye,pointerEvents:"auto",...typeof(Y==null?void 0:Y.minHeightPx)=="number"&&Y.minHeightPx>0?{minHeight:Y.minHeightPx}:{}},children:a.jsx(Sn,{content:z})})]},q),[se,ye,n,L,l,$]),Se=d.useCallback((_,z,q)=>{var Y,ae,me;return a.jsxs("div",{style:{padding:`${$(C.top)} ${$(C.right)} ${$(C.bottom)} ${$(C.left)}`,width:$(T+f*2),height:"100%",borderRadius:$(x),border:`${$(f)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${l}-cover`,style:{background:g}}),a.jsxs("div",{className:`${l}-elements-overlay`,style:{alignItems:se,textAlign:ye},children:[_.text&&Te(be,_.text,"text",q!=null&&q.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(q==null?void 0:q.textMinHeightPx)=="number"&&q.textMinHeightPx>0?{minHeightPx:q.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[a.jsx("div",{"data-controls":L&&!(q!=null&&q.dataMeasureAttrs)?"logoMarginTop":void 0,className:L&&!(q!=null&&q.dataMeasureAttrs)?`${l}-control`:void 0,style:{height:$(w)}}),a.jsx("div",{style:{width:$(S),height:$(v)},children:((Y=_.logo)==null?void 0:Y.url)&&a.jsx("img",{src:_.logo.url,alt:((ae=_.logo)==null?void 0:ae.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((me=_.logo)==null?void 0:me.objectFit)||"contain"}})})]}),_.caption&&Te(re,_.caption,"caption",{...q!=null&&q.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:F,...q!=null&&q.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(q==null?void 0:q.captionMinHeightPx)=="number"&&q.captionMinHeightPx>0?{minHeightPx:q.captionMinHeightPx}:{}})]})]},z)},[g,F,re,T,x,v,w,S,se,ye,C.bottom,C.left,C.right,C.top,Te,f,m,be,n,L,l]),Le=d.useCallback(_=>{ne(_.maxTextPx),ee(_.maxCaptionPx)},[]);d.useLayoutEffect(()=>{if(!ce){Le({maxTextPx:0,maxCaptionPx:0});return}const _=Q.current;if(!_)return;const z=()=>{y.readTestimonialTextMeasure(_,Le)};z();const q=new ResizeObserver(z);return q.observe(_),()=>{q.disconnect()}},[ce,Le,t,Se]);const _e=ce?{textMinHeightPx:R,captionMinHeightPx:h}:void 0,B=ce?a.jsx("div",{ref:Q,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((_,z)=>Se(_,`measure-${z}`,{dataMeasureAttrs:!0}))}):null,ie=(_,z)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Se(_,`card-${z}`,_e),L&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(u)})`,width:$(u),height:"100%",pointerEvents:"auto",zIndex:2}})]},z);if(E){const _=b?I&&K?"paused":"running":"paused";return a.jsxs("div",{ref:P,className:Pe(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...D>0?{height:D}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ro(l)}}),B,a.jsx("div",{ref:A,className:`${l}-marquee-track`,"data-direction":s,onMouseEnter:U,onMouseLeave:G,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":_},children:Array.from({length:V},(z,q)=>a.jsx("div",{ref:q===0?W:void 0,className:`${l}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(u),paddingRight:$(u)},"aria-hidden":q>0,children:t==null?void 0:t.map((Y,ae)=>ie(Y,`${q}-${ae}`))},`set-${q}`))})]})}return a.jsxs("div",{className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ro(l)}}),B,a.jsx("div",{style:{gap:$(u),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((_,z)=>ie(_,z))})]})},ld=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
2411
2411
|
import cn from 'classnames';
|
|
2412
2412
|
import { CommonComponentProps } from '../props';
|
|
2413
2413
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
@@ -3022,7 +3022,7 @@ type TestimonialsSettings = {
|
|
|
3022
3022
|
logoHeight: number;
|
|
3023
3023
|
captionMarginTop: number;
|
|
3024
3024
|
};
|
|
3025
|
-
`,
|
|
3025
|
+
`,oo={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},cd={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,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-cycle",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:{...oo.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:{...oo.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:{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__","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__"]},{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:["__componentName__",{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"}]}]}]}},dd={element:sd,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:cd,sourceCode:ld,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function ud(e){return`
|
|
3026
3026
|
.${e}-container {
|
|
3027
3027
|
position: relative;
|
|
3028
3028
|
overflow-x: clip;
|
|
@@ -3146,7 +3146,7 @@ type TestimonialsSettings = {
|
|
|
3146
3146
|
width: 100%;
|
|
3147
3147
|
height: 100%;
|
|
3148
3148
|
}
|
|
3149
|
-
`}const
|
|
3149
|
+
`}const pd=3e3,md=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o})=>{const{prefix:l}=y.useScopedStyles(),i=t||[],{speed:c,align:s,width:p,imageMarginTop:u,textMarginTop:T,captionMarginTop:x,imageWidth:f,imageHeight:m,controlsWidth:g,controlsColor:C,controlsHoverColor:w}=e,S=c>0&&(!n||!!r),[v,F]=d.useState(0),[L,H]=d.useState(null),[b,E]=d.useState(!1),O=d.useRef(null),$=d.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),P=d.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]);d.useEffect(()=>{F(0),H(null),E(!1)},[i.length]);const A=i[v],W=L===null?null:i[L],j=re=>{var V,U,G,se,ye;return{fontSettings:{fontFamily:(e==null?void 0:e[`${re}FontFamily`])??"Arial",fontWeight:((V=e==null?void 0:e[`${re}FontSettings`])==null?void 0:V.fontWeight)??400,fontStyle:((U=e==null?void 0:e[`${re}FontSettings`])==null?void 0:U.fontStyle)??"normal"},textAppearance:{textTransform:((G=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:G.textTransform)??"none",textDecoration:((se=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:se.textDecoration)??"none",fontVariant:((ye=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:ye.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"}},te=j("text"),k=j("caption"),M=i.length>1&&i.some(re=>{var ce,V;return(((ce=re.text)==null?void 0:ce.length)??0)>0||(((V=re.caption)==null?void 0:V.length)??0)>0}),D=d.useRef(null),[N,I]=d.useState(0),[K,Z]=d.useState(0),Q=e.controls??{mode:"Off",icon:null},R=i.length>1,ne=d.useCallback((re,ce)=>!R||ce===re?re:(O.current&&window.clearTimeout(O.current),H(re),E(!0),O.current=window.setTimeout(()=>{H(null),E(!1),O.current=null},300),ce),[R]),h=d.useCallback(()=>{R&&F(re=>ne(re,(re-1+i.length)%i.length))},[R,ne,i.length]),ee=d.useCallback(()=>{R&&F(re=>ne(re,(re+1)%i.length))},[R,ne,i.length]);d.useEffect(()=>{if(!S||!R)return;const re=Math.max(300,pd/c),ce=window.setInterval(()=>{F(V=>ne(V,(V+1)%i.length))},re);return()=>{window.clearInterval(ce)}},[S,R,ne,i.length,c]),d.useEffect(()=>()=>{O.current&&window.clearTimeout(O.current)},[]);const ge=(re,ce)=>{var ye,Te,Se,Le;const V=ce==null?void 0:ce.textMinHeightPx,U=ce==null?void 0:ce.captionMinHeightPx,G=ce==null?void 0:ce.dataMeasureAttrs,se=o&&!(ce!=null&&ce.dataMeasureAttrs)&&!(ce!=null&&ce.hideControls);return a.jsxs(a.Fragment,{children:[re.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":se?"textMarginTop":void 0,className:se?`${l}-control`:void 0,style:{height:y.scalingValue(T??0,n??!1)}}),a.jsx("div",{...G&&{"data-testimonial-measure":"text"},style:{...Je(te,n),...V&&V>0?{minHeight:V}:{},textAlign:P,pointerEvents:"auto"},children:a.jsx(Sn,{content:re.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":se?"imageMarginTop":void 0,className:se?`${l}-control`:void 0,style:{height:y.scalingValue(u??0,n??!1)}}),a.jsx("div",{style:{width:y.scalingValue(f??0,n??!1),height:y.scalingValue(m??0,n??!1)},children:((ye=re.image)==null?void 0:ye.url)&&a.jsx("img",{src:(Te=re.image)==null?void 0:Te.url,alt:((Se=re.image)==null?void 0:Se.name)??"",className:`${l}-icon`,style:{objectFit:((Le=re.image)==null?void 0:Le.objectFit)||"contain"}})})]}),re.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":se?"captionMarginTop":void 0,className:se?`${l}-control`:void 0,style:{height:y.scalingValue(x??0,n??!1)}}),a.jsx("div",{...G?{"data-testimonial-measure":"caption"}:{},style:{...Je(k,n),...U&&U>0?{minHeight:U}:{},textAlign:P,pointerEvents:"auto"},children:a.jsx(Sn,{content:re.caption})})]})]})},le=d.useCallback(re=>{I(re.maxTextPx),Z(re.maxCaptionPx)},[]);if(d.useLayoutEffect(()=>{if(!M){le({maxTextPx:0,maxCaptionPx:0});return}const re=D.current;if(!re)return;const ce=()=>{y.readTestimonialTextMeasure(re,le)};ce();const V=new ResizeObserver(ce);return V.observe(re),()=>{V.disconnect()}},[M,le,t]),!A)return a.jsx(a.Fragment,{});const be=M?{textMinHeightPx:N,captionMinHeightPx:K}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${l}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ud(l)}}),a.jsxs("div",{className:`${l}-wrapper`,style:{width:y.scalingValue(p??0,n??!1),alignItems:$},children:[M&&a.jsx("div",{ref:D,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:i.map((re,ce)=>a.jsx("div",{style:{width:"100%"},children:ge(re,{dataMeasureAttrs:!0})},ce))}),a.jsxs("div",{className:`${l}-fade-stack`,children:[W&&b&&a.jsx("div",{className:Pe(`${l}-fade-item-prev`,`${l}-fade-out`),children:ge(W,{...be,hideControls:!0})}),a.jsx("div",{className:Pe(`${l}-fade-item-current`,b?`${l}-fade-in`:void 0),children:ge(A,be)})]})]}),Q.mode==="On"&&a.jsxs("div",{className:`${l}-controls`,children:[a.jsx("div",{className:`${l}-arrow`,style:{width:y.scalingValue(g??.02,n??!1),height:y.scalingValue(g??.02,n??!1),"--arrow-hover-color":w},children:a.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:h,disabled:!R,"aria-label":"Previous testimonial",children:Q.icon&&a.jsx(Ht,{url:Q.icon,fill:C,hoverFill:w,className:Pe(`${l}-arrow-img`,`${l}-mirror`)})})}),a.jsx("div",{className:Pe(`${l}-arrow`,`${l}-next-arrow`),style:{width:y.scalingValue(g??.02,n??!1),height:y.scalingValue(g??.02,n??!1),"--arrow-hover-color":w},children:a.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:ee,disabled:!R,"aria-label":"Next testimonial",children:Q.icon&&a.jsx(Ht,{url:Q.icon,fill:C,hoverFill:w,className:`${l}-arrow-img`})})})]})]})})},gd=`import cn from 'classnames';\r
|
|
3150
3150
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
|
|
3151
3151
|
import { CommonComponentProps } from '../props';\r
|
|
3152
3152
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';\r
|
|
@@ -3642,11 +3642,11 @@ type TestimonialsSettings = {\r
|
|
|
3642
3642
|
icon?: string | null;\r
|
|
3643
3643
|
};\r
|
|
3644
3644
|
};\r
|
|
3645
|
-
`,
|
|
3645
|
+
`,hd="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>'),ao={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},fd={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,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:{...ao.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:{...ao.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:{controls:{mode:"On",icon:hd},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:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{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"}]}]}]}},yd={element:md,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:fd,sourceCode:gd,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function vd(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function so(e){return((e==null?void 0:e.trim().length)??0)>0}function jr(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function qr(e,t,n,r){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((o-t)/2,r)}}function bd(e){return`
|
|
3646
3646
|
.${e}-wrapper {
|
|
3647
3647
|
display: grid;
|
|
3648
3648
|
align-items: start;
|
|
3649
|
-
min-height: ${
|
|
3649
|
+
min-height: ${vd(48)};
|
|
3650
3650
|
}
|
|
3651
3651
|
.${e}-item {
|
|
3652
3652
|
display: flex;
|
|
@@ -3845,7 +3845,7 @@ type TestimonialsSettings = {\r
|
|
|
3845
3845
|
pointer-events: auto;
|
|
3846
3846
|
z-index: 10;
|
|
3847
3847
|
}
|
|
3848
|
-
`}const It=500,Sd=750,Dt="cubic-bezier(0.22, 1, 0.36, 1)";function Kt(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function di({media:e,className:t,style:n,onImageClick:r}){return Kt(e)?a.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:r})}function $d({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:i,onClose:l,onPrev:o,onNext:c,counterClassName:s,counterStyle:p}){const u=n==="cover",T=d.useRef(null),x=d.useRef(null),[f,m]=d.useState(null),[g,C]=d.useState(r?"opening":"open"),[w,S]=d.useState(!0),v=d.useRef(t),M=d.useCallback(()=>{const $=T.current,E=x.current;if(!$||!E)return;const A=$.getBoundingClientRect(),W=A.width,j=A.height,te=E.naturalWidth,k=E.naturalHeight;if(!W||!j||!te||!k)return;if(n==="cover"){m({width:W,height:j,left:A.left,top:A.top});return}const F=te/k,D=W/j;if(F>D){const H=W/F;m({width:W,height:H,left:A.left,top:A.top+(j-H)/2})}else{const H=j*F;m({width:H,height:j,left:A.left+(W-H)/2,top:A.top})}},[n]);d.useEffect(()=>{M();const $=T.current;if(!$)return;const E=new ResizeObserver(()=>M());return E.observe($),()=>E.disconnect()},[M,t]),d.useEffect(()=>{g==="opening"&&f&&C("open")},[g,f]),d.useEffect(()=>{if(g!=="closing")return;const $=setTimeout(()=>l(),It);return()=>clearTimeout($)},[g,l]),d.useEffect(()=>{v.current!==t&&S(!1),v.current=t},[t]),d.useEffect(()=>{const $=E=>{E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),g!=="closing"&&C("closing"))};return window.addEventListener("keydown",$,!0),()=>window.removeEventListener("keydown",$,!0)},[g]);const L=()=>{g!=="closing"&&C("closing")},N=g==="open",b=g==="closing",P=b&&i&&!!r,O=g==="opening"?r??f:P?r:f;return a.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:L,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:N?1:0,transition:`opacity ${It}ms ${Dt}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:T,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:N?1:0,transition:`opacity ${It}ms ${Dt}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:T,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:N?1:0,transition:`opacity ${It}ms ${Dt}`},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]})}),O&&a.jsx("img",{ref:x,src:e[t],onLoad:M,style:{position:"fixed",top:O.top,left:O.left,width:O.width,height:O.height,objectFit:n==="cover"?"cover":"contain",opacity:b&&!P?0:1,transition:b&&!P?`opacity ${It}ms ${Dt}`:P||w?`top ${It}ms ${Dt}, left ${It}ms ${Dt}, width ${It}ms ${Dt}, height ${It}ms ${Dt}`:"none",pointerEvents:"none",zIndex:9998}}),N&&f&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{position:"fixed",top:f.top,left:f.left,width:f.width/2,height:f.height,cursor:"w-resize",zIndex:9999},onClick:$=>{$.stopPropagation(),o()}}),a.jsx("div",{style:{position:"fixed",top:f.top,left:f.left+f.width/2,width:f.width/2,height:f.height,cursor:"e-resize",zIndex:9999},onClick:$=>{$.stopPropagation(),c()}})]})]})}function wd(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Td({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,metadata:l,activeEvent:o,layoutId:c}){const{prefix:s}=y.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:T=100,verticalGap:x,entriesCount:f,lightbox:m,imageDisplay:g,lightboxImageDisplay:C,slider:w,sliderTiming:S,direction:v,transition:M,titleMarginTop:L,subtitleMarginTop:N,titleColor:b,subtitleColor:P,lightboxCounterColor:O,titleFontFamily:$,titleFontSettings:E,titleFontSize:A,titleLineHeight:W,titleLetterSpacing:j,titleWordSpacing:te,titleTextAppearance:k,subtitleFontFamily:F,subtitleFontSettings:D,subtitleFontSize:H,subtitleLineHeight:I,subtitleLetterSpacing:K,subtitleWordSpacing:Q,subtitleTextAppearance:Z,lightboxCounterFontFamily:R,lightboxCounterFontSettings:ne,lightboxCounterFontSize:h,lightboxCounterLineHeight:ee,lightboxCounterLetterSpacing:ge,lightboxCounterWordSpacing:le,lightboxCounterTextAppearance:be,showText:re="always",alignEntries:ce="off"}=e,V={fontSettings:{fontFamily:$,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:A??.01,lineHeight:W,letterSpacing:j??0,wordSpacing:te??0,textAppearance:k,color:b},G={...yt(Ze(V,n))},se={fontSettings:{fontFamily:F,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:H??.01,lineHeight:I,letterSpacing:K??0,wordSpacing:Q??0,textAppearance:Z,color:P},Te={...yt(Ze(se,n))},Se={fontSettings:{fontFamily:R,fontWeight:(ne==null?void 0:ne.fontWeight)??400,fontStyle:(ne==null?void 0:ne.fontStyle)??"normal"},fontSize:h??.01,lineHeight:ee,letterSpacing:ge??0,wordSpacing:le??0,textAppearance:be,color:O},Ee={...yt(Ze(Se,n)),...Kr(h,ee,s,n)},B=qr(A,W,`${s}-item-title`,`${s}-text-tight-leading`),oe=qr(H,I,`${s}-item-subtitle`,`${s}-text-tight-leading`),_=Kr(A,W,s,n),z=Kr(H,I,s,n),q=qr(h,ee,`${s}-lightbox-counter`,`${s}-text-tight-leading`),Y=y.buildColorVars(s,{titleColor:b,subtitleColor:P,lightboxCounterColor:O},Ld,Pd),We=`${o&&o!=="default"?`${s}-state-${o}`:""}${re==="on hover"&&(!n||r)?` ${s}-show-text-hover`:""}`.trim(),he=f===0?1/0:f,ve=(t??[]).slice(0,he),Fe=u.entryWidth??.2,ie=(g==null?void 0:g.display)==="cover",xe=(g==null?void 0:g.ratioValue)??"1:1",Ae=(g==null?void 0:g.reversed)??!1,[ke,Ve]=xe.split(":").map(Number),pt=`${Ae?Ve:ke} / ${Ae?ke:Ve}`,xt=y.scalingValue(Fe??0,n),Et=!ie&&w!=="off",mt={width:xt,...ie?{aspectRatio:pt,height:"auto",overflow:"hidden"}:{height:"auto"}},_t=`${s}-item-image-wrapper${Et?` ${s}-item-image-wrapper-fit-slider`:""}`.trim(),pe=p==="c",He=pe&&ce==="on",Be=`calc(${y.scalingValue(Fe??0,n)} * (${T} / 100))`,Ue=y.scalingValue(Fe*T/100,n),Ct=ie?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Vt,gt]=d.useState("ltr"),[At,An]=d.useState(0),$e=d.useRef(null);d.useEffect(()=>{const Ie=$e.current;if(!Ie)return;const at=new ResizeObserver(st=>{An(Math.round(st[0].contentRect.width))});return at.observe(Ie),()=>at.disconnect()},[]);const Qe=(()=>{const Ie={...Y},at=$e.current?getComputedStyle($e.current).getPropertyValue("--cntrl-article-width").trim():"";return at&&(Ie["--cntrl-article-width"]=at),Ie})(),[Ke,De]=d.useState(!1),[it,Zn]=d.useState([]),[Fr,ln]=d.useState(0),[Mr,Jn]=d.useState(null),er=(Ie,at,st)=>{if(n&&!r||m==="off")return;const X=Ie.currentTarget.getBoundingClientRect();Jn({top:X.top,left:X.left,width:X.width,height:X.height}),Zn(at),ln(st),De(!0)};d.useEffect(()=>{if(!Ke||m!=="on"||typeof document>"u")return;const Ie=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ie}},[Ke,m]),d.useEffect(()=>{!n||r||(De(!1),Jn(null))},[n,r]);const Nr=d.useMemo(()=>Cd(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Nr}}),a.jsx("div",{style:Y,children:a.jsx("div",{ref:$e,className:`${s}-wrapper ${s}-type-${p}${He?` ${s}-align-entries`:""} ${We}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:He?0:y.scalingValue(x??0,n),columnGap:y.scalingValue(u.horizontalGap??0,n),width:y.scalingValue(u.wrapperWidth??0,n),...He?{[`--${s}-align-entries-row-gap`]:y.scalingValue(x??0,n)}:{}},children:ve.map((Ie,at)=>{var Ye,dt;const st=ci(Ie.title),X=ci(Ie.subtitle),ue=(((Ye=Ie.link)==null?void 0:Ye.length)??0)>0&&m==="off"?Ie.link:void 0,fe=Math.floor(at/u.columnsCount)===Math.ceil(ve.length/u.columnsCount)-1,we=pe?a.jsxs("div",{className:`${s}-item-text-block`,children:[st&&a.jsx("p",{className:B,style:{width:Be,...G,..._},children:Ie.title}),st&&a.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(L??0,n),width:Ue}}),X&&a.jsx("p",{className:oe,style:{width:Be,...Te,...z},children:Ie.subtitle}),X&&a.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(N??0,n),width:Ue}})]}):null,je=pe?a.jsxs("div",{className:`${s}-item-title-row`,children:[st&&a.jsx("p",{className:B,style:{width:Be,...G,..._},children:Ie.title}),st&&a.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(L??0,n),width:Ue}})]}):null,Ge=pe?a.jsxs("div",{className:`${s}-item-subtitle-row`,children:[X&&a.jsx("p",{className:oe,style:{width:Be,...Te,...z},children:Ie.subtitle}),X&&a.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(N??0,n),width:Ue}})]}):null,Pe=ue?a.jsxs("a",{href:ue,target:"_blank",className:`${s}-item-text-link`,children:[je,Ge]}):a.jsxs(a.Fragment,{children:[je,Ge]}),lt=a.jsx("div",{className:_t,style:mt,children:(((dt=Ie.image)==null?void 0:dt.length)??0)===0?null:w==="off"?(()=>{const Me=Ie.image[0],rt=Ie.image.filter(Je=>!Kt(Je)).map(Je=>Je.url);return a.jsx(di,{media:Me,className:`${s}-item-${Kt(Me)?"video":"image"}`.trim(),style:Ct,onImageClick:Kt(Me)?void 0:Je=>er(Je,rt,0)})})():a.jsxs(a.Fragment,{children:[Et&&a.jsx("div",{className:`${s}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ie.image.map(Me=>Kt(Me)?a.jsx("video",{src:Me.url,muted:!0,playsInline:!0},`sizer-${Me.url}`):a.jsx("img",{src:Me.url,alt:""},`sizer-${Me.url}`))}),a.jsx(Eo,{className:`${s}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:S*1e3,width:"100%",height:"100%",speed:Sd,type:M==="fade"?"fade":"loop",rewind:M==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:M==="fade"?"ltr":v!=="random"?v==="horizontal"?"ltr":"ttb":Vt},onMoved:Me=>{if(v!=="random"||M==="fade")return;const nt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";gt(nt),setTimeout(()=>{Me.refresh()},0)},children:Ie.image.map((Me,nt)=>{const rt=Ie.image.filter(Xe=>!Kt(Xe)),Je=rt.map(Xe=>Xe.url),cn=rt.findIndex(Xe=>Xe.url===Me.url);return a.jsx(_o,{children:a.jsx(di,{media:Me,className:`${s}-item-${Kt(Me)?"video":"image"}`.trim(),style:Ct,onImageClick:Kt(Me)?void 0:Xe=>er(Xe,Je,cn)})},nt)})},`${M}-${Fe}-${v}-${S}-${At}-${c}`)]})}),ct=pe?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":i&&st?"titleMarginTop":void 0,className:i&&st?`${s}-control`:void 0,style:{height:st?y.scalingValue(L??0,n):0,width:Ue}}),a.jsx("p",{className:B,style:{width:Be,...G,..._},children:Ie.title}),a.jsx("div",{"data-controls":i&&X?"subtitleMarginTop":void 0,className:i&&X?`${s}-control`:void 0,style:{height:X?y.scalingValue(N??0,n):0,width:Ue}}),a.jsx("p",{className:oe,style:{width:Be,...Te,...z},children:Ie.subtitle})]});return a.jsx("div",{className:`${s}-item`.trim(),children:a.jsx("div",{className:`${i?`${s}-item-inner`:`${s}-item-inner-hidden`}${He&&fe?` ${s}-item-inner-last-row`:""}`.trim(),style:{width:(T??0)>100?`calc(${y.scalingValue(Fe??0,n)} * (${T} / 100))`:y.scalingValue(Fe??0,n)},children:He?a.jsxs(a.Fragment,{children:[Pe,a.jsx("a",{href:ue,target:"_blank",className:`${s}-item-image-link`,children:lt})]}):a.jsxs("a",{href:ue,target:"_blank",className:`${s}-item-image-link`,children:[we,lt,ct]})})},at)})})}),(!n||r)&&Ke&&typeof document<"u"&&m==="on"&&Ii.createPortal(a.jsx("div",{style:Qe,"data-selection":"none",children:a.jsx($d,{images:it,index:Fr,imageDisplay:wd(C),originRect:Mr,reverseClose:w==="off",onClose:()=>De(!1),onPrev:()=>ln(Ie=>(Ie-1+it.length)%it.length),onNext:()=>ln(Ie=>(Ie+1)%it.length),counterClassName:q,counterStyle:Ee})}),document.body)]})}const Ld={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Pd=["hover","focus","filled","success","error"],Ed=`import { Splide, SplideSlide } from '@splidejs/react-splide';\r
|
|
3848
|
+
`}const Rt=500,xd=750,zt="cubic-bezier(0.22, 1, 0.36, 1)";function Kt(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function lo({media:e,className:t,style:n,onImageClick:r}){return Kt(e)?a.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:r})}function Cd({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:o,onClose:l,onPrev:i,onNext:c,counterClassName:s,counterStyle:p}){const u=n==="cover",T=d.useRef(null),x=d.useRef(null),[f,m]=d.useState(null),[g,C]=d.useState(r?"opening":"open"),[w,S]=d.useState(!0),v=d.useRef(t),F=d.useCallback(()=>{const $=T.current,P=x.current;if(!$||!P)return;const A=$.getBoundingClientRect(),W=A.width,j=A.height,te=P.naturalWidth,k=P.naturalHeight;if(!W||!j||!te||!k)return;if(n==="cover"){m({width:W,height:j,left:A.left,top:A.top});return}const M=te/k,D=W/j;if(M>D){const N=W/M;m({width:W,height:N,left:A.left,top:A.top+(j-N)/2})}else{const N=j*M;m({width:N,height:j,left:A.left+(W-N)/2,top:A.top})}},[n]);d.useEffect(()=>{F();const $=T.current;if(!$)return;const P=new ResizeObserver(()=>F());return P.observe($),()=>P.disconnect()},[F,t]),d.useEffect(()=>{g==="opening"&&f&&C("open")},[g,f]),d.useEffect(()=>{if(g!=="closing")return;const $=setTimeout(()=>l(),Rt);return()=>clearTimeout($)},[g,l]),d.useEffect(()=>{v.current!==t&&S(!1),v.current=t},[t]),d.useEffect(()=>{const $=P=>{P.key==="Escape"&&(P.preventDefault(),P.stopPropagation(),g!=="closing"&&C("closing"))};return window.addEventListener("keydown",$,!0),()=>window.removeEventListener("keydown",$,!0)},[g]);const L=()=>{g!=="closing"&&C("closing")},H=g==="open",b=g==="closing",E=b&&o&&!!r,O=g==="opening"?r??f:E?r:f;return a.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:L,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:H?1:0,transition:`opacity ${Rt}ms ${zt}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:T,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:H?1:0,transition:`opacity ${Rt}ms ${zt}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:T,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:H?1:0,transition:`opacity ${Rt}ms ${zt}`},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]})}),O&&a.jsx("img",{ref:x,src:e[t],onLoad:F,style:{position:"fixed",top:O.top,left:O.left,width:O.width,height:O.height,objectFit:n==="cover"?"cover":"contain",opacity:b&&!E?0:1,transition:b&&!E?`opacity ${Rt}ms ${zt}`:E||w?`top ${Rt}ms ${zt}, left ${Rt}ms ${zt}, width ${Rt}ms ${zt}, height ${Rt}ms ${zt}`:"none",pointerEvents:"none",zIndex:9998}}),H&&f&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{position:"fixed",top:f.top,left:f.left,width:f.width/2,height:f.height,cursor:"w-resize",zIndex:9999},onClick:$=>{$.stopPropagation(),i()}}),a.jsx("div",{style:{position:"fixed",top:f.top,left:f.left+f.width/2,width:f.width/2,height:f.height,cursor:"e-resize",zIndex:9999},onClick:$=>{$.stopPropagation(),c()}})]})]})}function Sd(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function $d({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o,metadata:l,activeEvent:i,layoutId:c}){const{prefix:s}=y.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:T=100,verticalGap:x,entriesCount:f,lightbox:m,imageDisplay:g,lightboxImageDisplay:C,slider:w,sliderTiming:S,direction:v,transition:F,titleMarginTop:L,subtitleMarginTop:H,titleColor:b,subtitleColor:E,lightboxCounterColor:O,titleFontFamily:$,titleFontSettings:P,titleFontSize:A,titleLineHeight:W,titleLetterSpacing:j,titleWordSpacing:te,titleTextAppearance:k,subtitleFontFamily:M,subtitleFontSettings:D,subtitleFontSize:N,subtitleLineHeight:I,subtitleLetterSpacing:K,subtitleWordSpacing:Z,subtitleTextAppearance:Q,lightboxCounterFontFamily:R,lightboxCounterFontSettings:ne,lightboxCounterFontSize:h,lightboxCounterLineHeight:ee,lightboxCounterLetterSpacing:ge,lightboxCounterWordSpacing:le,lightboxCounterTextAppearance:be,showText:re="always",alignEntries:ce="off"}=e,V={fontSettings:{fontFamily:$,fontWeight:(P==null?void 0:P.fontWeight)??400,fontStyle:(P==null?void 0:P.fontStyle)??"normal"},fontSize:A??.01,lineHeight:W,letterSpacing:j??0,wordSpacing:te??0,textAppearance:k,color:b},G={...yt(Je(V,n))},se={fontSettings:{fontFamily:M,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:N??.01,lineHeight:I,letterSpacing:K??0,wordSpacing:Z??0,textAppearance:Q,color:E},Te={...yt(Je(se,n))},Se={fontSettings:{fontFamily:R,fontWeight:(ne==null?void 0:ne.fontWeight)??400,fontStyle:(ne==null?void 0:ne.fontStyle)??"normal"},fontSize:h??.01,lineHeight:ee,letterSpacing:ge??0,wordSpacing:le??0,textAppearance:be,color:O},_e={...yt(Je(Se,n)),...qr(h,ee,s,n)},B=jr(A,W,`${s}-item-title`,`${s}-text-tight-leading`),ie=jr(N,I,`${s}-item-subtitle`,`${s}-text-tight-leading`),_=qr(A,W,s,n),z=qr(N,I,s,n),q=jr(h,ee,`${s}-lightbox-counter`,`${s}-text-tight-leading`),Y=y.buildColorVars(s,{titleColor:b,subtitleColor:E,lightboxCounterColor:O},wd,Td),We=`${i&&i!=="default"?`${s}-state-${i}`:""}${re==="on hover"&&(!n||r)?` ${s}-show-text-hover`:""}`.trim(),he=f===0?1/0:f,ve=(t??[]).slice(0,he),Me=u.entryWidth??.2,oe=(g==null?void 0:g.display)==="cover",xe=(g==null?void 0:g.ratioValue)??"1:1",Ie=(g==null?void 0:g.reversed)??!1,[ke,Ve]=xe.split(":").map(Number),mt=`${Ie?Ve:ke} / ${Ie?ke:Ve}`,xt=y.scalingValue(Me??0,n),_t=!oe&&w!=="off",gt={width:xt,...oe?{aspectRatio:mt,height:"auto",overflow:"hidden"}:{height:"auto"}},At=`${s}-item-image-wrapper${_t?` ${s}-item-image-wrapper-fit-slider`:""}`.trim(),pe=p==="c",Ne=pe&&ce==="on",Be=`calc(${y.scalingValue(Me??0,n)} * (${T} / 100))`,Ue=y.scalingValue(Me*T/100,n),Ct=oe?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Vt,St]=d.useState("ltr"),[It,Dt]=d.useState(0),$e=d.useRef(null);d.useEffect(()=>{const Re=$e.current;if(!Re)return;const st=new ResizeObserver(lt=>{Dt(Math.round(lt[0].contentRect.width))});return st.observe(Re),()=>st.disconnect()},[]);const Qe=(()=>{const Re={...Y},st=$e.current?getComputedStyle($e.current).getPropertyValue("--cntrl-article-width").trim():"";return st&&(Re["--cntrl-article-width"]=st),Re})(),[Ke,De]=d.useState(!1),[at,Zn]=d.useState([]),[Wr,ln]=d.useState(0),[Mr,Qn]=d.useState(null),Jn=(Re,st,lt)=>{if(n&&!r||m==="off")return;const X=Re.currentTarget.getBoundingClientRect();Qn({top:X.top,left:X.left,width:X.width,height:X.height}),Zn(st),ln(lt),De(!0)};d.useEffect(()=>{if(!Ke||m!=="on"||typeof document>"u")return;const Re=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Re}},[Ke,m]),d.useEffect(()=>{!n||r||(De(!1),Qn(null))},[n,r]);const Fr=d.useMemo(()=>bd(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Fr}}),a.jsx("div",{style:Y,children:a.jsx("div",{ref:$e,className:`${s}-wrapper ${s}-type-${p}${Ne?` ${s}-align-entries`:""} ${We}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:Ne?0:y.scalingValue(x??0,n),columnGap:y.scalingValue(u.horizontalGap??0,n),width:y.scalingValue(u.wrapperWidth??0,n),...Ne?{[`--${s}-align-entries-row-gap`]:y.scalingValue(x??0,n)}:{}},children:ve.map((Re,st)=>{var Ye,ut;const lt=so(Re.title),X=so(Re.subtitle),ue=(((Ye=Re.link)==null?void 0:Ye.length)??0)>0&&m==="off"?Re.link:void 0,fe=Math.floor(st/u.columnsCount)===Math.ceil(ve.length/u.columnsCount)-1,we=pe?a.jsxs("div",{className:`${s}-item-text-block`,children:[lt&&a.jsx("p",{className:B,style:{width:Be,...G,..._},children:Re.title}),lt&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:y.scalingValue(L??0,n),width:Ue}}),X&&a.jsx("p",{className:ie,style:{width:Be,...Te,...z},children:Re.subtitle}),X&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:y.scalingValue(H??0,n),width:Ue}})]}):null,je=pe?a.jsxs("div",{className:`${s}-item-title-row`,children:[lt&&a.jsx("p",{className:B,style:{width:Be,...G,..._},children:Re.title}),lt&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:y.scalingValue(L??0,n),width:Ue}})]}):null,Ge=pe?a.jsxs("div",{className:`${s}-item-subtitle-row`,children:[X&&a.jsx("p",{className:ie,style:{width:Be,...Te,...z},children:Re.subtitle}),X&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:y.scalingValue(H??0,n),width:Ue}})]}):null,Ee=ue?a.jsxs("a",{href:ue,target:"_blank",className:`${s}-item-text-link`,children:[je,Ge]}):a.jsxs(a.Fragment,{children:[je,Ge]}),ct=a.jsx("div",{className:At,style:gt,children:(((ut=Re.image)==null?void 0:ut.length)??0)===0?null:w==="off"?(()=>{const Fe=Re.image[0],it=Re.image.filter(et=>!Kt(et)).map(et=>et.url);return a.jsx(lo,{media:Fe,className:`${s}-item-${Kt(Fe)?"video":"image"}`.trim(),style:Ct,onImageClick:Kt(Fe)?void 0:et=>Jn(et,it,0)})})():a.jsxs(a.Fragment,{children:[_t&&a.jsx("div",{className:`${s}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Re.image.map(Fe=>Kt(Fe)?a.jsx("video",{src:Fe.url,muted:!0,playsInline:!0},`sizer-${Fe.url}`):a.jsx("img",{src:Fe.url,alt:""},`sizer-${Fe.url}`))}),a.jsx(Li,{className:`${s}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:S*1e3,width:"100%",height:"100%",speed:xd,type:F==="fade"?"fade":"loop",rewind:F==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:F==="fade"?"ltr":v!=="random"?v==="horizontal"?"ltr":"ttb":Vt},onMoved:Fe=>{if(v!=="random"||F==="fade")return;const rt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";St(rt),setTimeout(()=>{Fe.refresh()},0)},children:Re.image.map((Fe,rt)=>{const it=Re.image.filter(Xe=>!Kt(Xe)),et=it.map(Xe=>Xe.url),cn=it.findIndex(Xe=>Xe.url===Fe.url);return a.jsx(Ei,{children:a.jsx(lo,{media:Fe,className:`${s}-item-${Kt(Fe)?"video":"image"}`.trim(),style:Ct,onImageClick:Kt(Fe)?void 0:Xe=>Jn(Xe,et,cn)})},rt)})},`${F}-${Me}-${v}-${S}-${It}-${c}`)]})}),dt=pe?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&<?"titleMarginTop":void 0,className:o&<?`${s}-control`:void 0,style:{height:lt?y.scalingValue(L??0,n):0,width:Ue}}),a.jsx("p",{className:B,style:{width:Be,...G,..._},children:Re.title}),a.jsx("div",{"data-controls":o&&X?"subtitleMarginTop":void 0,className:o&&X?`${s}-control`:void 0,style:{height:X?y.scalingValue(H??0,n):0,width:Ue}}),a.jsx("p",{className:ie,style:{width:Be,...Te,...z},children:Re.subtitle})]});return a.jsx("div",{className:`${s}-item`.trim(),children:a.jsx("div",{className:`${o?`${s}-item-inner`:`${s}-item-inner-hidden`}${Ne&&fe?` ${s}-item-inner-last-row`:""}`.trim(),style:{width:(T??0)>100?`calc(${y.scalingValue(Me??0,n)} * (${T} / 100))`:y.scalingValue(Me??0,n)},children:Ne?a.jsxs(a.Fragment,{children:[Ee,a.jsx("a",{href:ue,target:"_blank",className:`${s}-item-image-link`,children:ct})]}):a.jsxs("a",{href:ue,target:"_blank",className:`${s}-item-image-link`,children:[we,ct,dt]})})},st)})})}),(!n||r)&&Ke&&typeof document<"u"&&m==="on"&&_o.createPortal(a.jsx("div",{style:Qe,"data-selection":"none",children:a.jsx(Cd,{images:at,index:Wr,imageDisplay:Sd(C),originRect:Mr,reverseClose:w==="off",onClose:()=>De(!1),onPrev:()=>ln(Re=>(Re-1+at.length)%at.length),onNext:()=>ln(Re=>(Re+1)%at.length),counterClassName:q,counterStyle:_e})}),document.body)]})}const wd={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Td=["hover","focus","filled","success","error"],Ld=`import { Splide, SplideSlide } from '@splidejs/react-splide';\r
|
|
3849
3849
|
import '@splidejs/react-splide/css/core';\r
|
|
3850
3850
|
import { CommonComponentProps } from '../props';\r
|
|
3851
3851
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
|
|
@@ -5014,11 +5014,11 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {\r
|
|
|
5014
5014
|
};\r
|
|
5015
5015
|
\r
|
|
5016
5016
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
|
|
5017
|
-
`,Ur={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},_d=["titleColor","subtitleColor","lightboxCounterColor"],Ad={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:"Flying 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:"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:"Leaving 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:"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:"Citygates 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:"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 Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Ur.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:{...Ur.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:{...Ur.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:"Arial",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:"a",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:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,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:-.00118,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:["__componentName__","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:["__componentName__",{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:["__componentName__",{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:[..._d],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Id={element:Td,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:Ad,sourceCode:Ed};function Rd(e){if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function kd({media:e,className:t,style:n}){const r=d.useRef(null);return d.useEffect(()=>{if(!e.isVideo)return;const i=r.current;if(!i)return;const l=i.play();l&&l.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:r,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function mr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Wd(e){return String(e??"").trim().length>0}function ui(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 pi(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 mi(e,t,n,r,i,l,o){const c=y.scalingValue(l,o),s=y.scalingValue(0,o),p=e===0,u=e===t-1&&!i;return{borderTopWidth:p&&n?c:s,borderBottomWidth:!u||r?c:s}}function Fd(e,t,n){const r=y.scalingValue(t,n),i=y.scalingValue(0,n);return{borderTopWidth:i,borderBottomWidth:e?r:i}}const gi=10;function Md(e){return`
|
|
5017
|
+
`,Kr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ed=["titleColor","subtitleColor","lightboxCounterColor"],Pd={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:"Flying 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:"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:"Leaving 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:"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:"Citygates 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:"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 Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Kr.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:{...Kr.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:{...Kr.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:"Arial",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:"a",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:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,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:-.00118,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:["__componentName__","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:["__componentName__",{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:["__componentName__",{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:[...Ed],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},_d={element:$d,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:Pd,sourceCode:Ld},co=12;function Ad(e,t="50%"){const n={position:"absolute",width:co,height:co,pointerEvents:"auto"};return e==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:e==="center-x"?{...n,left:"50%",top:t,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function Ze({className:e,areaStyle:t,hitPlacement:n,centerXHitTop:r,...o}){return a.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...o,children:a.jsx("div",{style:Ad(n,r)})})}function Id(e){if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function Rd({media:e,className:t,style:n}){const r=d.useRef(null);return d.useEffect(()=>{if(!e.isVideo)return;const o=r.current;if(!o)return;const l=o.play();l&&l.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:r,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function pr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function kd(e){return String(e??"").trim().length>0}function uo(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),o=e.clientY-r.top>r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function po(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),o=e.clientY<r.top+r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function mo(e,t,n,r,o,l,i){const c=y.scalingValue(l,i),s=y.scalingValue(0,i),p=e===0,u=e===t-1&&!o;return{borderTopWidth:p&&n?c:s,borderBottomWidth:!u||r?c:s}}function Wd(e,t,n){const r=y.scalingValue(t,n),o=y.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?r:o}}const go=10;function Md(e){return`
|
|
5018
5018
|
.${e}-wrapper {
|
|
5019
5019
|
display: grid;
|
|
5020
5020
|
align-items: start;
|
|
5021
|
-
min-height: ${
|
|
5021
|
+
min-height: ${pr(48)};
|
|
5022
5022
|
position: relative;
|
|
5023
5023
|
overflow: visible;
|
|
5024
5024
|
box-sizing: border-box;
|
|
@@ -5140,7 +5140,7 @@ a.${e}-list-item {
|
|
|
5140
5140
|
flex-shrink: 0;
|
|
5141
5141
|
overflow: visible;
|
|
5142
5142
|
box-sizing: border-box;
|
|
5143
|
-
min-width: ${
|
|
5143
|
+
min-width: ${pr(50)};
|
|
5144
5144
|
position: relative;
|
|
5145
5145
|
display: flex;
|
|
5146
5146
|
align-items: flex-start;
|
|
@@ -5148,7 +5148,7 @@ a.${e}-list-item {
|
|
|
5148
5148
|
|
|
5149
5149
|
.${e}-list-col-last {
|
|
5150
5150
|
flex: 1 1 auto;
|
|
5151
|
-
min-width: ${
|
|
5151
|
+
min-width: ${pr(50)};
|
|
5152
5152
|
}
|
|
5153
5153
|
|
|
5154
5154
|
.${e}-list-col-title {
|
|
@@ -5445,10 +5445,11 @@ a.${e}-list-item {
|
|
|
5445
5445
|
overflow-wrap: anywhere;
|
|
5446
5446
|
word-break: break-word;
|
|
5447
5447
|
}
|
|
5448
|
-
`}const Xt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ao=["AColumn","BColumn","CColumn","DColumn","EColumn"],Ht="cutLabel",Io=[...Ao,Ht],Wr=["A","B","C","D","E"];function ha(e){return`${e}ColumnVerticalAlign`}const ao=["Top","Center","Bottom"];function Ro(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const r=t.slice(-1).toUpperCase();return Wr.includes(r)?`Baseline ${r}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Nd(e){const t=Ro(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Hd(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Wr.includes(n)?n:null}function fa(e,t,n){const r=Hd(e);return r?r===t?!1:Nd(n[ha(r)]):!0}function Vn(e){const t=Ro(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Wr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Bd(e,t,n){if(ya(e,t,n))return Vn(e);const r=Vn(e);return r.kind==="baseline"?{kind:"top"}:r}function Od(e){const t=Vn(e);return t.kind==="baseline"?{kind:"top"}:t}function ya(e,t,n){return fa(e,n,t)?Vn(e).kind==="baseline":!1}function Vd(e){const t={};let n=!1;for(const r of Wr){const i=ha(r),l=e[i];if(e.type==="b"){const o=String(l??"Top").trim();o!=="Top"&&o!=="Center"&&o!=="Bottom"&&(t[i]="Top",n=!0);continue}fa(l,r,e)||(t[i]="Top",n=!0)}return n?t:null}function Dd(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function zd(e){const t=Vn(e).kind;return t==="baseline"?"center":t}function jd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function hi(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function qd(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(),l=i-r;return n.remove(),l}function Gr(e,t,n,r){const i=e.titleEl;if(!i)return 0;const l=i.closest(`.${n}`);if(!l)return 0;const o=qd(i,r);if(e.kind==="baseline")return i.getBoundingClientRect().top-t+o;const c=l.getBoundingClientRect(),s=i.getBoundingClientRect().height;let p=0;return e.kind==="center"?p=(c.height-s)/2:e.kind==="bottom"&&(p=c.height-s),c.top-t+p+o}function Kd(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(i=>{const l=i.querySelector(`.${n}`);l&&(l.style.minHeight=`${r}px`,l.style.height=`${r}px`)}),r)}function Ud(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Gd={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function _e(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Yd={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Xd(e){return[_e(e,"textFontFamily"),_e(e,"textFontSettings"),{type:"row",items:[_e(e,"textFontSize"),_e(e,"textLineHeight"),_e(e,"textLetterSpacing"),_e(e,"textWordSpacing")]},_e(e,"textTextAlign"),_e(e,"textTextAppearance"),`${e}VerticalAlign`]}function Qd(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Io.map(e=>[Yd[e],Xd(e)]))}}function Cr(e,t){const n=r=>{const i=_e(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===Ht?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function fi(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 yt(Ze(n,t))}function yi(e,t,n,r){const i=Cr(e,t),l=i.textFontSize??.01,o=i.textLineHeight;return o!==void 0&&o<l?`${n} ${r}`:n}function vi(e,t,n,r){const i=Cr(e,t),l=i.textFontSize??.01,o=i.textLineHeight;return o===void 0||o>=l?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((l-o)/2,r)}}const vt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],$n=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],wn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Tn=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Zd={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Jd=["hover","focus","filled","success","error"],bi=.004,hn=.004,Yr=hn,xi=12,ko=50,Dn=1440,zn=ko/Dn;function va(e){const t=typeof e=="number"&&e>0?e:Dn;return ko/t}function eu(e,t){const n={position:"absolute",width:xi,height:xi,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 Rt({P:e,className:t,areaStyle:n,hitPlacement:r,...i}){return a.jsx("div",{className:t,style:{...n,pointerEvents:"none"},"data-controls-center-only-drag":"",...i,children:a.jsx("div",{style:eu(e,r)})})}function tu(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 Dn}const ba={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function kn(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function nu(e,t=1){const n=t/e;return Object.fromEntries(vt.map(r=>[r,n]))}function ru(){return Object.fromEntries([...$n.map(e=>[e,0]),...wn.map(e=>[e,0])])}function ou(){return Object.fromEntries(Tn.map(e=>[e,0]))}function sr(e){return Object.fromEntries(vt.map(t=>[t,typeof e[t]=="number"?e[t]:ba[t]]))}function xa(e,t,n){const r=e-zn,i=t+n;if(i<=0||i<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const l=r/i;return{paddingLeft:t*l,paddingRight:n*l}}function gr(e,t,n){const r=Wo(e,t,n);if(e<=0)return[];const i=r.slice(0,e-1).reduce((l,o)=>l+o,0);return[...r.slice(0,e-1),Math.max(0,t-i)]}function iu(e,t,n){const r={};for(let i=0;i<e;i+=1){const l=$n[i],o=wn[i],c=typeof n[l]=="number"?n[l]:0,s=typeof n[o]=="number"?n[o]:0,p=xa(t[i]??0,c,s);p.paddingLeft!==c&&(r[l]=p.paddingLeft),p.paddingRight!==s&&(r[o]=p.paddingRight)}return r}function Wo(e,t,n){if(e<=0)return[];const r=vt.slice(0,e).map(p=>n[p]);if(e===1)return r;const i=r.slice(0,e-1),o=i.reduce((p,u)=>p+u,0)+zn;if(t>=o)return r;const c=[...i];let s=o-t;for(let p=c.length-1;p>=0&&s>0;p-=1){const u=c[p]-zn;if(u<=0)continue;const T=Math.min(s,u);c[p]-=T,s-=T}return[...c,r[e-1]]}function au(e,t,n){if(e<=1)return{};const r=Wo(e,t,n),i={};for(let l=0;l<e-1;l+=1){const o=vt[l];r[l]!==n[o]&&(i[o]=r[l])}return i}function Ci(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Xt]}function su(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function lu(e,t,n,r){const i=Math.min(r,e.length,vt.length),l={};for(let o=0;o<i;o+=1){const c=e[o],s=t.indexOf(c);if(s===-1)continue;const p=vt[s],u=$n[s],T=wn[s],x=Tn[s],f=vt[o],m=$n[o],g=wn[o],C=Tn[o],w=n[p],S=n[u],v=n[T],M=n[x];typeof w=="number"&&(l[f]=w),typeof S=="number"&&(l[m]=S),typeof v=="number"&&(l[g]=v),typeof M=="number"&&(l[C]=M)}return l}function Ca(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const r of n)if(e[r]!==t[r])return!0;return!1}function cu(e,t){const n=e.columns,r=t.columns;if(typeof n!="number"||n===r)return e;const i=kn(e),l=e.type==="b"||e.type===void 0&&t.type==="b",o={...e,...nu(n,i),...ru()};if(l)for(const c of Tn)typeof t[c]=="number"&&(o[c]=t[c]);else Object.assign(o,ou());return Ca(e,o)?o:e}function du(e,t,n){const r=Vd(e);r&&(e={...e,...r});const i=va(n==null?void 0:n.designWidth),l=e.columns,o=t.columns,c=kn(e),s=kn(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof l=="number"?l:typeof o=="number"?o:Xt.length,T=v=>{if(p)return v;const M=sr({...t,...v}),L=kn(v),N=gr(u,L,M),b=iu(u,N,{...t,...v});return Object.keys(b).length===0?v:{...v,...b}};if(typeof l=="number"&&l!==o)return e;const x=Ci(e),f=Ci(t);if(!su(x,f))return T({...e,...lu(x,f,t,u)});if(c<s&&typeof u=="number"&&!p){const v=sr({...t,...e});return T({...e,...au(u,c,v)})}if(p){const v=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,M=Math.max(0,(c-i)/2);return v>M?{...e,textPaddingLR:M}:e}const m=sr({...t,...e}),g=gr(u,s,sr(t)),w=gr(u,c,m).some((v,M)=>v<(g[M]??v)),S=vt.some(v=>{const M=e[v],L=t[v];return typeof M=="number"&&typeof L=="number"&&M!==L});return w||S?T(e):e}function uu(e,t,n,r){const i=t.slice(0,e).reduce((o,c)=>o+c,0),l=n.slice(e+1,t.length-1).reduce((o,c)=>o+c,0);return Math.max(zn,r-i-l-zn)}function pu(e,t){return Math.random()*(t-e)+e}function mu(e){return Object.fromEntries(vt.map(t=>[t,typeof e[t]=="number"?e[t]:ba[t]]))}function Xr(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function gu(e,t,n,r,i,l){return e.slice(0,t).map((o,c)=>{const s=$n[c],p=wn[c],u=Tn[c];return{key:o,textPrefix:Gd[o],widthKey:vt[c],width:n[vt[c]],paddingLeftKey:s,paddingRightKey:p,paddingBottomKey:u,paddingLeft:r[s],paddingRight:i[p],paddingBottom:l[u]}})}function hu({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:l,layoutId:o,onUpdateSettings:c}){const{prefix:s}=y.useScopedStyles(),p=!!i,{columns:u,type:T,wrapperWidth:x,entriesCount:f,cellMinHeight:m,dividerWidth:g,showVisibility:C,cut:w,showCut:S,cutCellMinHeight:v,cutLabel:M,imageSize:L,imageOnHover:N,entryHoverEffect:b,entryHoverShowOption:P,rowPaddingTop:O,rowPaddingBottom:$,rowPaddingTopB:E,columnsOrder:A,textPaddingLR:W,textColor:j,backgroundColor:te,dividerColor:k,textHoverColor:F,backgroundHoverColor:D,dividerHoverColor:H}=e,[I,K]=d.useState(void 0),[Q,Z]=d.useState(null),R=N==="on"&&(!n||r),ne=(w??0)>0,h=T==="b",ee=d.useRef(null),ge=d.useRef(null),[le,be]=d.useState(null),[re,ce]=d.useState(Dn),V=va(re),U=Math.max(0,((x??0)-V)/2),G=Math.min(W??0,U),se=Math.max(G,hn),ye=((x??0)+V)/2;d.useLayoutEffect(()=>{if(!n){ce(Dn);return}const X=()=>{ce(tu(ee.current))};X();const ue=ee.current;if(!ue)return;const fe=new ResizeObserver(X);fe.observe(ue);let we=ue;for(;we&&!we.style.getPropertyValue("--cntrl-article-width");)we=we.parentElement;return we&&fe.observe(we),()=>fe.disconnect()},[n,o]),d.useEffect(()=>{K(void 0)},[w,S,t,f]),d.useEffect(()=>{n&&!r&&K(void 0)},[n,r]);const Te=y.buildColorVars(s,{textColor:j,backgroundColor:te,dividerColor:k,textHoverColor:F,backgroundHoverColor:D,dividerHoverColor:H},Zd,Jd),Se=l&&l!=="default"?`${s}-state-${l}`:"",Ee=`${!n||r?b==="default"?`${s}-entry-hover-default`:b==="blinds"?`${s}-entry-hover-blinds`:b==="reveal"?`${s}-entry-hover-reveal`:"":""} ${Se}`.trim(),B=b==="reveal"&&(!n||r),oe=(C==null?void 0:C[0])??!1,_=(C==null?void 0:C[1])??!1,z=d.useRef(e),q=d.useRef(o);d.useEffect(()=>{if(!c||!n){z.current=e,q.current=o;return}if(q.current!==o){z.current=e,q.current=o;return}const X=z.current;if(!(X!==e))return;if(typeof X.columns=="number"&&typeof e.columns=="number"&&X.columns!==e.columns){z.current=e;return}const fe=du(e,X,{designWidth:re});z.current=e,Ca(e,fe)&&c(fe)},[e,c,n,o,re]);const Y=d.useMemo(()=>mu(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ae=d.useMemo(()=>Xr(e,$n),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),me=d.useMemo(()=>Xr(e,wn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),We=d.useMemo(()=>Xr(e,Tn),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),he=d.useMemo(()=>Array.isArray(A)&&A.length>0?A:[...Xt],[A]),ve=d.useMemo(()=>gu(he,u,Y,ae,me,We),[he,u,Y,ae,me,We]),Fe=kn(e),ie=d.useMemo(()=>vt.slice(0,u).map(X=>Y[X]),[u,Y]),xe=d.useMemo(()=>Wo(u,Fe,Y),[u,Fe,Y]),Ae=d.useMemo(()=>gr(u,Fe,Y),[u,Fe,Y]),ke=d.useMemo(()=>ve.map((X,ue)=>xa(Ae[ue]??0,X.paddingLeft,X.paddingRight)),[ve,Ae]),Ve=d.useMemo(()=>{const X=f===0?1/0:f;return(t??[]).slice(0,X).map((fe,we)=>({id:we,cells:Object.fromEntries(Xt.map(je=>[je,fe[je]??""])),image:fe.image,link:fe.link}))},[t,f]),tt=ne?I??w:Ve.length,ut=d.useMemo(()=>ne?Ve.slice(0,tt):Ve,[Ve,ne,tt]),pt=ne&&tt<Ve.length,xt=ut.length>1||pt,Et=[oe?`${s}-divider-top`:"",_||xt?`${s}-divider-bottom`:""].filter(Boolean).join(" "),mt=!n||r,_t=()=>{if(!mt)return;const X=I??w;if(!S){K(Ve.length);return}K(Math.min(X+S,Ve.length))},pe=X=>y.scalingValue(X,n??!1),He=h?E??0:O??0,Be=$??0,Ue=m??0,Ct=He+Ue/2,Vt=Math.max(Be,Yr),gt=mi(0,ut.length,oe,_,pt,g??0,n??!1).borderTopWidth,At=le!=null?`${le}px`:`calc(${gt} + ${pe(Ct)})`,An=h?"rowPaddingTopB":"rowPaddingTop",$e=ve[0],Qe=ve[ve.length-1],Ke=ke[0],De=ke[ke.length-1],it=$e&&Ke?Math.max(Ke.paddingLeft,hn):0,Zn=Qe&&De?Math.max(De.paddingRight,hn):0,Fr=Fe,ln=X=>{const ue=ee.current;if(!ue)return{x:0,y:0};const fe=ue.getBoundingClientRect();return{x:X.clientX-fe.left+gi,y:X.clientY-fe.top+gi}},Mr=(X,ue)=>{if(!R)return;const fe=X.image;if(!(fe!=null&&fe.url)){Z(null);return}const{x:we,y:je}=ln(ue),Ge=(L==null?void 0:L.min)??80,Pe=(L==null?void 0:L.max)??320,lt=(Q==null?void 0:Q.rowId)===X.id?Q.widthPx:pu(Ge,Pe);Z({rowId:X.id,url:fe.url,objectFit:"contain",isVideo:Rd(fe),widthPx:lt,x:we,y:je})},Jn=X=>{if(!R||!Q)return;const{x:ue,y:fe}=ln(X);Z(we=>!we||we.x===ue&&we.y===fe?we:{...we,x:ue,y:fe})},er=()=>{Z(null)},Nr=X=>{B&&ui(X,s),R&&Z(null)},Ie=X=>{B&&pi(X,s)};d.useLayoutEffect(()=>{if(!p||h){be(null);return}const X=ge.current,ue=X==null?void 0:X.parentElement;if(!X||!ue){be(null);return}const fe=()=>{const je=X.querySelector("[data-list-row]");if(!je){be(null);return}const Ge=ue.getBoundingClientRect(),Pe=je.getBoundingClientRect();be(Pe.top-Ge.top+Pe.height/2)};fe();const we=new ResizeObserver(fe);return we.observe(X),we.observe(ue),()=>we.disconnect()},[p,h,ut,He,Be,Ue,t,e,ve,Ae,re,g,oe,_,pt]);const at=d.useMemo(()=>!h&&Ao.some(X=>{const ue=X.charAt(0),fe=e[`${X}VerticalAlign`];return ya(fe,e,ue)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);d.useLayoutEffect(()=>{var lt;const X=ee.current;if(!X)return;const ue=()=>{X.querySelectorAll("[data-list-col]").forEach(ct=>{ct.style.transform="";const Ye=ct.querySelector(`.${s}-list-col`);Ye&&(Ye.style.minHeight="",Ye.style.height="");const dt=ct.querySelector(`.${s}-list-col-title`);dt&&(dt.style.transform="")})};if(h||!at){ue();return}const fe=()=>{const ct=Array.from(X.querySelectorAll("[data-list-row]")),Ye=`${s}-list-col`,dt=`${s}-baseline-probe`;ct.forEach(Me=>{Me.querySelectorAll("[data-list-col]").forEach(nt=>{nt.style.transform="";const rt=nt.querySelector(`.${Ye}`);rt&&(rt.style.minHeight="",rt.style.height="");const Je=nt.querySelector(`.${s}-list-col-title`);Je&&(Je.style.transform="")})}),ct.forEach(Me=>{const nt=Array.from(Me.querySelectorAll("[data-list-col]"));Kd(Me,nt,Ye)}),X.offsetHeight,ct.forEach(Me=>{const nt=Array.from(Me.querySelectorAll("[data-list-col]")),rt=Me.getBoundingClientRect().top,Je=new Map,cn=nt.map(ze=>{const dn=ze.querySelector(`.${s}-list-col-title`),un={el:ze,titleEl:dn,letter:ze.getAttribute("data-col-letter")??"",kind:ze.getAttribute("data-valign")??"top",anchor:ze.getAttribute("data-valign-anchor")};return Je.set(un.letter,un),un}),Xe=new Map,tr=(ze,dn)=>{const un=Xe.get(ze.letter);if(un!==void 0)return un;const Fo=ze.anchor?Je.get(ze.anchor):void 0;if(ze.kind!=="baseline"||!Fo||dn.has(ze.letter)){const No=Gr(ze,rt,Ye,dt);return Xe.set(ze.letter,No),No}dn.add(ze.letter);const $a=tr(Fo,dn);dn.delete(ze.letter);const wa=Gr(ze,rt,Ye,dt),Ta=$a-wa;Ud(ze.titleEl,Ta);const Mo=Gr(ze,rt,Ye,dt);return Xe.set(ze.letter,Mo),Mo};cn.forEach(ze=>tr(ze,new Set))})};let we=null;const je=()=>{we===null&&(we=requestAnimationFrame(()=>{we=null,fe()}))};fe();const Ge=new ResizeObserver(()=>je());Ge.observe(X);let Pe=!1;return typeof document<"u"&&((lt=document.fonts)!=null&<.ready)&&document.fonts.ready.then(()=>{Pe||je()}),()=>{Pe=!0,we!==null&&(cancelAnimationFrame(we),we=null),Ge.disconnect(),ue()}},[at,h,e,t,re,ut,Ae]);const st=d.useMemo(()=>Md(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:st}}),a.jsx("div",{style:Te,children:a.jsxs("div",{ref:ee,className:`${s}-wrapper ${Ee}${Et?` ${Et}`:""}${h?` ${s}-type-b`:""}`.trim(),style:{width:y.scalingValue(x??0,n),...!h&&p?{[`--${s}-first-entry-handle-top`]:At}:{}},onMouseMove:R?Jn:void 0,onMouseLeave:R?er:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[ut.map((X,ue)=>{var Ge;const fe=(((Ge=X.link)==null?void 0:Ge.length)??0)>0,we=fe&&(!n||r)?"a":"div",je=mi(ue,ut.length,oe,_,pt,g??0,n??!1);return a.jsxs(we,{ref:ue===0?Pe=>{ge.current=Pe}:void 0,className:`${s}-list-item${fe||P==="always"?` ${s}-list-item-has-link`:""}`,...fe?{href:X.link,target:"_blank"}:{},style:je,onMouseEnter:Pe=>{B&&(fe||P==="always")&&ui(Pe,s),R&&Mr(X,Pe)},onMouseLeave:Pe=>{B&&(fe||P==="always")&&pi(Pe,s)},children:[He>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:pe(He)}}),a.jsxs("div",{className:`${s}-list-cols-row${h?"":` ${s}-list-cols-row-h`}${p&&ue===0&&h?` ${s}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:pe(Ue)},children:[ve.map((Pe,lt)=>{const ct=lt===ve.length-1,Ye=ke[lt],dt=Pe.paddingBottom,Me=Wd(X.cells[Pe.key]),nt=h&&Me&&dt>0,rt=h?{minHeight:pe(Ue)}:{width:pe(Ae[lt])},Je=h?{paddingLeft:pe(G),paddingRight:pe(G)}:{paddingLeft:pe(Ye.paddingLeft),paddingRight:pe(Ye.paddingRight)},cn=Pe.textPrefix.charAt(0),Xe=h?Od(e[`${Pe.textPrefix}VerticalAlign`]):Bd(e[`${Pe.textPrefix}VerticalAlign`],e,cn),tr=h&&Me&&p&&ue===0;return a.jsxs("div",{className:h?`${s}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":cn,"data-valign":Xe.kind,...Xe.kind==="baseline"?{"data-valign-anchor":Xe.anchorLetter}:{}},children:[a.jsx("div",{className:`${s}-list-col${ct?` ${s}-list-col-last`:""}`,style:{...Je,...rt,...h?{justifyContent:hi(Xe.kind)}:{}},"data-test":Pe.width,children:a.jsx("span",{className:yi(e,Pe.textPrefix,`${s}-list-col-title`,`${s}-text-tight-leading`),style:{...fi(Cr(e,Pe.textPrefix),n),...vi(e,Pe.textPrefix,s,n),...h?{}:Dd(Xe.kind)},children:X.cells[Pe.key]??null})}),nt&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:pe(dt)}}),tr&&a.jsx(Rt,{P:s,"data-controls":Pe.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:pe(Math.max(dt,Yr))}})]},Pe.key)}),p&&ue===0&&h&&a.jsxs(a.Fragment,{children:[a.jsx(Rt,{P:s,"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(ye),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:pe(se),height:"100%"}}),a.jsx(Rt,{P:s,"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(ye),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:pe(Math.max(se,Fe-se)),width:pe(se),height:"100%"}})]})]}),!h&&Be>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:pe(Be)}}),p&&ue===0&&!h&&a.jsx(Rt,{P:s,"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:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:pe(Vt)}})]},X.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx(Rt,{P:s,"data-controls":An,"data-controls-static-handle":"",...h?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:h?"center":"left-y",areaStyle:{position:"absolute",top:gt,left:0,width:"100%",height:pe(Math.max(He,Yr))}})},"row-padding-handles"),p&&!h&&$e&&Qe&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(Rt,{P:s,"data-controls":$e.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ae[0]-((Ke==null?void 0:Ke.paddingRight)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:pe(it),height:"100%"}}),a.jsx(Rt,{P:s,"data-controls":Qe.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(Ae[ve.length-1]-((De==null?void 0:De.paddingLeft)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:pe(Fr-Zn),width:pe(Zn),height:"100%"}})]},"column-edge-padding-handles"),p&&!h&&ve.slice(0,-1).map((X,ue)=>{const fe=ve[ue+1],we=xe.slice(0,ue+1).reduce((ct,Ye)=>ct+Ye,0),je=ke[ue],Ge=ke[ue+1],Pe=Math.max(je.paddingRight,hn),lt=Math.max(Ge.paddingLeft,hn);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(Rt,{P:s,"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(Ae[ue]-je.paddingLeft),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:pe(we-Pe),width:pe(Pe),height:"100%"}}),a.jsx(Rt,{P:s,"data-controls":fe.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ae[ue+1]-Ge.paddingRight),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:pe(we),width:pe(lt),height:"100%"}})]},`${X.paddingRightKey}-padding`)}),p&&!h&&ve.slice(0,-1).map((X,ue)=>{const fe=uu(ue,xe,ie,Fe),je=xe.slice(0,ue+1).reduce((Ge,Pe)=>Ge+Pe,0)-bi/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":X.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(ko),"data-controls-max-fraction":String(fe),"data-controls-variant":"column-width",className:`${s}-col-resize-handle`,style:{position:"absolute",top:"0px",left:pe(je),width:pe(bi),height:"calc(100%)",pointerEvents:"auto"}})},`${X.widthKey}-junction`)})]}),pt&&(()=>{const X=Cr(e,Ht),ue=zd(e.cutLabelVerticalAlign),fe=X.textTextAlign==="justify"||h;return a.jsx("button",{type:"button",className:`${s}-cut-item`,style:{minHeight:pe(v??0),cursor:mt?"pointer":"default",...Fd(_,g??0,n??!1)},onClick:mt?_t:void 0,onMouseEnter:B||R?Nr:void 0,onMouseLeave:B?Ie:void 0,children:a.jsx("div",{className:`${s}-list-cols-row`,style:{...h?{paddingLeft:pe(G),paddingRight:pe(G)}:{},justifyContent:jd(X.textTextAlign),alignItems:hi(ue)},children:a.jsx("span",{className:yi(e,Ht,`${s}-cut-label`,`${s}-text-tight-leading`),style:{...fi(X,n),...vi(e,Ht,s,n),...fe?{width:"100%"}:{}},children:M})})})})(),R&&Q&&(()=>{const X=mr(Q.widthPx),ue={width:X,height:"auto",maxHeight:X,objectFit:"contain",left:Q.x,top:Q.y,position:"absolute"};return a.jsx(kd,{media:Q,className:Q.isVideo?`${s}-hover-video`:`${s}-hover-image`,style:ue},`${Q.rowId}-${Q.url}`)})()]})})]})}const fu=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';\r
|
|
5448
|
+
`}const Xt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Pi=["AColumn","BColumn","CColumn","DColumn","EColumn"],Nt="cutLabel",_i=[...Pi,Nt],kr=["A","B","C","D","E"];function ma(e){return`${e}ColumnVerticalAlign`}const oi=["Top","Center","Bottom"];function Ai(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const r=t.slice(-1).toUpperCase();return kr.includes(r)?`Baseline ${r}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Fd(e){const t=Ai(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Hd(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return kr.includes(n)?n:null}function ga(e,t,n){const r=Hd(e);return r?r===t?!1:Fd(n[ma(r)]):!0}function On(e){const t=Ai(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return kr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Nd(e,t,n){if(ha(e,t,n))return On(e);const r=On(e);return r.kind==="baseline"?{kind:"top"}:r}function Bd(e){const t=On(e);return t.kind==="baseline"?{kind:"top"}:t}function ha(e,t,n){return ga(e,n,t)?On(e).kind==="baseline":!1}function Od(e){const t={};let n=!1;for(const r of kr){const o=ma(r),l=e[o];if(e.type==="b"){const i=String(l??"Top").trim();i!=="Top"&&i!=="Center"&&i!=="Bottom"&&(t[o]="Top",n=!0);continue}ga(l,r,e)||(t[o]="Top",n=!0)}return n?t:null}function Vd(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Dd(e){const t=On(e).kind;return t==="baseline"?"center":t}function zd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function ho(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function jd(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),l=o-r;return n.remove(),l}function Ur(e,t,n,r){const o=e.titleEl;if(!o)return 0;const l=o.closest(`.${n}`);if(!l)return 0;const i=jd(o,r);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+i;const c=l.getBoundingClientRect(),s=o.getBoundingClientRect().height;let p=0;return e.kind==="center"?p=(c.height-s)/2:e.kind==="bottom"&&(p=c.height-s),c.top-t+p+i}function qd(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(o=>{const l=o.querySelector(`.${n}`);l&&(l.style.minHeight=`${r}px`,l.style.height=`${r}px`)}),r)}function Kd(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Ud={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Ae(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Gd={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Yd(e){return[Ae(e,"textFontFamily"),Ae(e,"textFontSettings"),{type:"row",items:[Ae(e,"textFontSize"),Ae(e,"textLineHeight"),Ae(e,"textLetterSpacing"),Ae(e,"textWordSpacing")]},Ae(e,"textTextAlign"),Ae(e,"textTextAppearance"),`${e}VerticalAlign`]}function Xd(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(_i.map(e=>[Gd[e],Yd(e)]))}}function xr(e,t){const n=r=>{const o=Ae(t,r);return e[o]};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===Nt?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function fo(e,t){var r,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.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 yt(Je(n,t))}function yo(e,t,n,r){const o=xr(e,t),l=o.textFontSize??.01,i=o.textLineHeight;return i!==void 0&&i<l?`${n} ${r}`:n}function vo(e,t,n,r){const o=xr(e,t),l=o.textFontSize??.01,i=o.textLineHeight;return i===void 0||i>=l?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((l-i)/2,r)}}const vt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],$n=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],wn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Tn=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Zd={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Qd=["hover","focus","filled","success","error"],bo=.004,hn=.004,Gr=hn,Ii=50,Vn=1440,Dn=Ii/Vn;function fa(e){const t=typeof e=="number"&&e>0?e:Vn;return Ii/t}function Jd(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const o=parseFloat(r);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return Vn}const ya={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Rn(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function eu(e,t=1){const n=t/e;return Object.fromEntries(vt.map(r=>[r,n]))}function tu(){return Object.fromEntries([...$n.map(e=>[e,0]),...wn.map(e=>[e,0])])}function nu(){return Object.fromEntries(Tn.map(e=>[e,0]))}function ar(e){return Object.fromEntries(vt.map(t=>[t,typeof e[t]=="number"?e[t]:ya[t]]))}function va(e,t,n){const r=e-Dn,o=t+n;if(o<=0||o<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const l=r/o;return{paddingLeft:t*l,paddingRight:n*l}}function mr(e,t,n){const r=Ri(e,t,n);if(e<=0)return[];const o=r.slice(0,e-1).reduce((l,i)=>l+i,0);return[...r.slice(0,e-1),Math.max(0,t-o)]}function ru(e,t,n){const r={};for(let o=0;o<e;o+=1){const l=$n[o],i=wn[o],c=typeof n[l]=="number"?n[l]:0,s=typeof n[i]=="number"?n[i]:0,p=va(t[o]??0,c,s);p.paddingLeft!==c&&(r[l]=p.paddingLeft),p.paddingRight!==s&&(r[i]=p.paddingRight)}return r}function Ri(e,t,n){if(e<=0)return[];const r=vt.slice(0,e).map(p=>n[p]);if(e===1)return r;const o=r.slice(0,e-1),i=o.reduce((p,u)=>p+u,0)+Dn;if(t>=i)return r;const c=[...o];let s=i-t;for(let p=c.length-1;p>=0&&s>0;p-=1){const u=c[p]-Dn;if(u<=0)continue;const T=Math.min(s,u);c[p]-=T,s-=T}return[...c,r[e-1]]}function iu(e,t,n){if(e<=1)return{};const r=Ri(e,t,n),o={};for(let l=0;l<e-1;l+=1){const i=vt[l];r[l]!==n[i]&&(o[i]=r[l])}return o}function xo(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Xt]}function ou(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function au(e,t,n,r){const o=Math.min(r,e.length,vt.length),l={};for(let i=0;i<o;i+=1){const c=e[i],s=t.indexOf(c);if(s===-1)continue;const p=vt[s],u=$n[s],T=wn[s],x=Tn[s],f=vt[i],m=$n[i],g=wn[i],C=Tn[i],w=n[p],S=n[u],v=n[T],F=n[x];typeof w=="number"&&(l[f]=w),typeof S=="number"&&(l[m]=S),typeof v=="number"&&(l[g]=v),typeof F=="number"&&(l[C]=F)}return l}function ba(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const r of n)if(e[r]!==t[r])return!0;return!1}function su(e,t){const n=e.columns,r=t.columns;if(typeof n!="number"||n===r)return e;const o=Rn(e),l=e.type==="b"||e.type===void 0&&t.type==="b",i={...e,...eu(n,o),...tu()};if(l)for(const c of Tn)typeof t[c]=="number"&&(i[c]=t[c]);else Object.assign(i,nu());return ba(e,i)?i:e}function lu(e,t,n){const r=Od(e);r&&(e={...e,...r});const o=fa(n==null?void 0:n.designWidth),l=e.columns,i=t.columns,c=Rn(e),s=Rn(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof l=="number"?l:typeof i=="number"?i:Xt.length,T=v=>{if(p)return v;const F=ar({...t,...v}),L=Rn(v),H=mr(u,L,F),b=ru(u,H,{...t,...v});return Object.keys(b).length===0?v:{...v,...b}};if(typeof l=="number"&&l!==i)return e;const x=xo(e),f=xo(t);if(!ou(x,f))return T({...e,...au(x,f,t,u)});if(c<s&&typeof u=="number"&&!p){const v=ar({...t,...e});return T({...e,...iu(u,c,v)})}if(p){const v=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,F=Math.max(0,(c-o)/2);return v>F?{...e,textPaddingLR:F}:e}const m=ar({...t,...e}),g=mr(u,s,ar(t)),w=mr(u,c,m).some((v,F)=>v<(g[F]??v)),S=vt.some(v=>{const F=e[v],L=t[v];return typeof F=="number"&&typeof L=="number"&&F!==L});return w||S?T(e):e}function cu(e,t,n,r){const o=t.slice(0,e).reduce((i,c)=>i+c,0),l=n.slice(e+1,t.length-1).reduce((i,c)=>i+c,0);return Math.max(Dn,r-o-l-Dn)}function du(e,t){return Math.random()*(t-e)+e}function uu(e){return Object.fromEntries(vt.map(t=>[t,typeof e[t]=="number"?e[t]:ya[t]]))}function Yr(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function pu(e,t,n,r,o,l){return e.slice(0,t).map((i,c)=>{const s=$n[c],p=wn[c],u=Tn[c];return{key:i,textPrefix:Ud[i],widthKey:vt[c],width:n[vt[c]],paddingLeftKey:s,paddingRightKey:p,paddingBottomKey:u,paddingLeft:r[s],paddingRight:o[p],paddingBottom:l[u]}})}function mu({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o,activeEvent:l,layoutId:i,onUpdateSettings:c}){const{prefix:s}=y.useScopedStyles(),p=!!o,{columns:u,type:T,wrapperWidth:x,entriesCount:f,cellMinHeight:m,dividerWidth:g,showVisibility:C,cut:w,showCut:S,cutCellMinHeight:v,cutLabel:F,imageSize:L,imageOnHover:H,entryHoverEffect:b,entryHoverShowOption:E,rowPaddingTop:O,rowPaddingBottom:$,rowPaddingTopB:P,columnsOrder:A,textPaddingLR:W,textColor:j,backgroundColor:te,dividerColor:k,textHoverColor:M,backgroundHoverColor:D,dividerHoverColor:N}=e,[I,K]=d.useState(void 0),[Z,Q]=d.useState(null),R=H==="on"&&(!n||r),ne=(w??0)>0,h=T==="b",ee=d.useRef(null),ge=d.useRef(null),[le,be]=d.useState(null),[re,ce]=d.useState(Vn),V=fa(re),U=Math.max(0,((x??0)-V)/2),G=Math.min(W??0,U),se=Math.max(G,hn),ye=((x??0)+V)/2;d.useLayoutEffect(()=>{if(!n){ce(Vn);return}const X=()=>{ce(Jd(ee.current))};X();const ue=ee.current;if(!ue)return;const fe=new ResizeObserver(X);fe.observe(ue);let we=ue;for(;we&&!we.style.getPropertyValue("--cntrl-article-width");)we=we.parentElement;return we&&fe.observe(we),()=>fe.disconnect()},[n,i]),d.useEffect(()=>{K(void 0)},[w,S,t,f]),d.useEffect(()=>{n&&!r&&K(void 0)},[n,r]);const Te=y.buildColorVars(s,{textColor:j,backgroundColor:te,dividerColor:k,textHoverColor:M,backgroundHoverColor:D,dividerHoverColor:N},Zd,Qd),Se=l&&l!=="default"?`${s}-state-${l}`:"",_e=`${!n||r?b==="default"?`${s}-entry-hover-default`:b==="blinds"?`${s}-entry-hover-blinds`:b==="reveal"?`${s}-entry-hover-reveal`:"":""} ${Se}`.trim(),B=b==="reveal"&&(!n||r),ie=(C==null?void 0:C[0])??!1,_=(C==null?void 0:C[1])??!1,z=d.useRef(e),q=d.useRef(i);d.useEffect(()=>{if(!c||!n){z.current=e,q.current=i;return}if(q.current!==i){z.current=e,q.current=i;return}const X=z.current;if(!(X!==e))return;if(typeof X.columns=="number"&&typeof e.columns=="number"&&X.columns!==e.columns){z.current=e;return}const fe=lu(e,X,{designWidth:re});z.current=e,ba(e,fe)&&c(fe)},[e,c,n,i,re]);const Y=d.useMemo(()=>uu(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ae=d.useMemo(()=>Yr(e,$n),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),me=d.useMemo(()=>Yr(e,wn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),We=d.useMemo(()=>Yr(e,Tn),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),he=d.useMemo(()=>Array.isArray(A)&&A.length>0?A:[...Xt],[A]),ve=d.useMemo(()=>pu(he,u,Y,ae,me,We),[he,u,Y,ae,me,We]),Me=Rn(e),oe=d.useMemo(()=>vt.slice(0,u).map(X=>Y[X]),[u,Y]),xe=d.useMemo(()=>Ri(u,Me,Y),[u,Me,Y]),Ie=d.useMemo(()=>mr(u,Me,Y),[u,Me,Y]),ke=d.useMemo(()=>ve.map((X,ue)=>va(Ie[ue]??0,X.paddingLeft,X.paddingRight)),[ve,Ie]),Ve=d.useMemo(()=>{const X=f===0?1/0:f;return(t??[]).slice(0,X).map((fe,we)=>({id:we,cells:Object.fromEntries(Xt.map(je=>[je,fe[je]??""])),image:fe.image,link:fe.link}))},[t,f]),nt=ne?I??w:Ve.length,pt=d.useMemo(()=>ne?Ve.slice(0,nt):Ve,[Ve,ne,nt]),mt=ne&&nt<Ve.length,xt=pt.length>1||mt,_t=[ie?`${s}-divider-top`:"",_||xt?`${s}-divider-bottom`:""].filter(Boolean).join(" "),gt=!n||r,At=()=>{if(!gt)return;const X=I??w;if(!S){K(Ve.length);return}K(Math.min(X+S,Ve.length))},pe=X=>y.scalingValue(X,n??!1),Ne=h?P??0:O??0,Be=$??0,Ue=m??0,Ct=Ne+Ue/2,Vt=Math.max(Be,Gr),St=mo(0,pt.length,ie,_,mt,g??0,n??!1).borderTopWidth,It=le!=null?`${le}px`:`calc(${St} + ${pe(Ct)})`,Dt=h?"rowPaddingTopB":"rowPaddingTop",$e=ve[0],Qe=ve[ve.length-1],Ke=ke[0],De=ke[ke.length-1],at=$e&&Ke?Math.max(Ke.paddingLeft,hn):0,Zn=Qe&&De?Math.max(De.paddingRight,hn):0,Wr=Me,ln=X=>{const ue=ee.current;if(!ue)return{x:0,y:0};const fe=ue.getBoundingClientRect();return{x:X.clientX-fe.left+go,y:X.clientY-fe.top+go}},Mr=(X,ue)=>{if(!R)return;const fe=X.image;if(!(fe!=null&&fe.url)){Q(null);return}const{x:we,y:je}=ln(ue),Ge=(L==null?void 0:L.min)??80,Ee=(L==null?void 0:L.max)??320,ct=(Z==null?void 0:Z.rowId)===X.id?Z.widthPx:du(Ge,Ee);Q({rowId:X.id,url:fe.url,objectFit:"contain",isVideo:Id(fe),widthPx:ct,x:we,y:je})},Qn=X=>{if(!R||!Z)return;const{x:ue,y:fe}=ln(X);Q(we=>!we||we.x===ue&&we.y===fe?we:{...we,x:ue,y:fe})},Jn=()=>{Q(null)},Fr=X=>{B&&uo(X,s),R&&Q(null)},Re=X=>{B&&po(X,s)};d.useLayoutEffect(()=>{if(!p||h){be(null);return}const X=ge.current,ue=X==null?void 0:X.parentElement;if(!X||!ue){be(null);return}const fe=()=>{const je=X.querySelector("[data-list-row]");if(!je){be(null);return}const Ge=ue.getBoundingClientRect(),Ee=je.getBoundingClientRect();be(Ee.top-Ge.top+Ee.height/2)};fe();const we=new ResizeObserver(fe);return we.observe(X),we.observe(ue),()=>we.disconnect()},[p,h,pt,Ne,Be,Ue,t,e,ve,Ie,re,g,ie,_,mt]);const st=d.useMemo(()=>!h&&Pi.some(X=>{const ue=X.charAt(0),fe=e[`${X}VerticalAlign`];return ha(fe,e,ue)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);d.useLayoutEffect(()=>{var ct;const X=ee.current;if(!X)return;const ue=()=>{X.querySelectorAll("[data-list-col]").forEach(dt=>{dt.style.transform="";const Ye=dt.querySelector(`.${s}-list-col`);Ye&&(Ye.style.minHeight="",Ye.style.height="");const ut=dt.querySelector(`.${s}-list-col-title`);ut&&(ut.style.transform="")})};if(h||!st){ue();return}const fe=()=>{const dt=Array.from(X.querySelectorAll("[data-list-row]")),Ye=`${s}-list-col`,ut=`${s}-baseline-probe`;dt.forEach(Fe=>{Fe.querySelectorAll("[data-list-col]").forEach(rt=>{rt.style.transform="";const it=rt.querySelector(`.${Ye}`);it&&(it.style.minHeight="",it.style.height="");const et=rt.querySelector(`.${s}-list-col-title`);et&&(et.style.transform="")})}),dt.forEach(Fe=>{const rt=Array.from(Fe.querySelectorAll("[data-list-col]"));qd(Fe,rt,Ye)}),X.offsetHeight,dt.forEach(Fe=>{const rt=Array.from(Fe.querySelectorAll("[data-list-col]")),it=Fe.getBoundingClientRect().top,et=new Map,cn=rt.map(ze=>{const dn=ze.querySelector(`.${s}-list-col-title`),un={el:ze,titleEl:dn,letter:ze.getAttribute("data-col-letter")??"",kind:ze.getAttribute("data-valign")??"top",anchor:ze.getAttribute("data-valign-anchor")};return et.set(un.letter,un),un}),Xe=new Map,er=(ze,dn)=>{const un=Xe.get(ze.letter);if(un!==void 0)return un;const ki=ze.anchor?et.get(ze.anchor):void 0;if(ze.kind!=="baseline"||!ki||dn.has(ze.letter)){const Mi=Ur(ze,it,Ye,ut);return Xe.set(ze.letter,Mi),Mi}dn.add(ze.letter);const Ca=er(ki,dn);dn.delete(ze.letter);const Sa=Ur(ze,it,Ye,ut),$a=Ca-Sa;Kd(ze.titleEl,$a);const Wi=Ur(ze,it,Ye,ut);return Xe.set(ze.letter,Wi),Wi};cn.forEach(ze=>er(ze,new Set))})};let we=null;const je=()=>{we===null&&(we=requestAnimationFrame(()=>{we=null,fe()}))};fe();const Ge=new ResizeObserver(()=>je());Ge.observe(X);let Ee=!1;return typeof document<"u"&&((ct=document.fonts)!=null&&ct.ready)&&document.fonts.ready.then(()=>{Ee||je()}),()=>{Ee=!0,we!==null&&(cancelAnimationFrame(we),we=null),Ge.disconnect(),ue()}},[st,h,e,t,re,pt,Ie]);const lt=d.useMemo(()=>Md(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:lt}}),a.jsx("div",{style:Te,children:a.jsxs("div",{ref:ee,className:`${s}-wrapper ${_e}${_t?` ${_t}`:""}${h?` ${s}-type-b`:""}`.trim(),style:{width:y.scalingValue(x??0,n),...!h&&p?{[`--${s}-first-entry-handle-top`]:It}:{}},onMouseMove:R?Qn:void 0,onMouseLeave:R?Jn:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[pt.map((X,ue)=>{var Ge;const fe=(((Ge=X.link)==null?void 0:Ge.length)??0)>0,we=fe&&(!n||r)?"a":"div",je=mo(ue,pt.length,ie,_,mt,g??0,n??!1);return a.jsxs(we,{ref:ue===0?Ee=>{ge.current=Ee}:void 0,className:`${s}-list-item${fe||E==="always"?` ${s}-list-item-has-link`:""}`,...fe?{href:X.link,target:"_blank"}:{},style:je,onMouseEnter:Ee=>{B&&(fe||E==="always")&&uo(Ee,s),R&&Mr(X,Ee)},onMouseLeave:Ee=>{B&&(fe||E==="always")&&po(Ee,s)},children:[Ne>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:pe(Ne)}}),a.jsxs("div",{className:`${s}-list-cols-row${h?"":` ${s}-list-cols-row-h`}${p&&ue===0&&h?` ${s}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:pe(Ue)},children:[ve.map((Ee,ct)=>{const dt=ct===ve.length-1,Ye=ke[ct],ut=Ee.paddingBottom,Fe=kd(X.cells[Ee.key]),rt=h&&Fe&&ut>0,it=h?{minHeight:pe(Ue)}:{width:pe(Ie[ct])},et=h?{paddingLeft:pe(G),paddingRight:pe(G)}:{paddingLeft:pe(Ye.paddingLeft),paddingRight:pe(Ye.paddingRight)},cn=Ee.textPrefix.charAt(0),Xe=h?Bd(e[`${Ee.textPrefix}VerticalAlign`]):Nd(e[`${Ee.textPrefix}VerticalAlign`],e,cn),er=h&&Fe&&p&&ue===0;return a.jsxs("div",{className:h?`${s}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":cn,"data-valign":Xe.kind,...Xe.kind==="baseline"?{"data-valign-anchor":Xe.anchorLetter}:{}},children:[a.jsx("div",{className:`${s}-list-col${dt?` ${s}-list-col-last`:""}`,style:{...et,...it,...h?{justifyContent:ho(Xe.kind)}:{}},"data-test":Ee.width,children:a.jsx("span",{className:yo(e,Ee.textPrefix,`${s}-list-col-title`,`${s}-text-tight-leading`),style:{...fo(xr(e,Ee.textPrefix),n),...vo(e,Ee.textPrefix,s,n),...h?{}:Vd(Xe.kind)},children:X.cells[Ee.key]??null})}),rt&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:pe(ut)}}),er&&a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":Ee.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:pe(Math.max(ut,Gr))}})]},Ee.key)}),p&&ue===0&&h&&a.jsxs(a.Fragment,{children:[a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"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(ye),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:pe(se),height:"100%"}}),a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"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(ye),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:pe(Math.max(se,Me-se)),width:pe(se),height:"100%"}})]})]}),!h&&Be>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:pe(Be)}}),p&&ue===0&&!h&&a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"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:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:pe(Vt)}})]},X.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":Dt,"data-controls-static-handle":"",...h?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:h?"center":"left-y",areaStyle:{position:"absolute",top:St,left:0,width:"100%",height:pe(Math.max(Ne,Gr))}})},"row-padding-handles"),p&&!h&&$e&&Qe&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":$e.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ie[0]-((Ke==null?void 0:Ke.paddingRight)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:pe(at),height:"100%"}}),a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":Qe.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(Ie[ve.length-1]-((De==null?void 0:De.paddingLeft)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:pe(Wr-Zn),width:pe(Zn),height:"100%"}})]},"column-edge-padding-handles"),p&&!h&&ve.slice(0,-1).map((X,ue)=>{const fe=ve[ue+1],we=xe.slice(0,ue+1).reduce((dt,Ye)=>dt+Ye,0),je=ke[ue],Ge=ke[ue+1],Ee=Math.max(je.paddingRight,hn),ct=Math.max(Ge.paddingLeft,hn);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"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(Ie[ue]-je.paddingLeft),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:pe(we-Ee),width:pe(Ee),height:"100%"}}),a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":fe.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ie[ue+1]-Ge.paddingRight),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:pe(we),width:pe(ct),height:"100%"}})]},`${X.paddingRightKey}-padding`)}),p&&!h&&ve.slice(0,-1).map((X,ue)=>{const fe=cu(ue,xe,oe,Me),je=xe.slice(0,ue+1).reduce((Ge,Ee)=>Ge+Ee,0)-bo/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":X.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(Ii),"data-controls-max-fraction":String(fe),"data-controls-variant":"column-width",className:`${s}-col-resize-handle`,style:{position:"absolute",top:"0px",left:pe(je),width:pe(bo),height:"calc(100%)",pointerEvents:"auto"}})},`${X.widthKey}-junction`)})]}),mt&&(()=>{const X=xr(e,Nt),ue=Dd(e.cutLabelVerticalAlign),fe=X.textTextAlign==="justify"||h;return a.jsx("button",{type:"button",className:`${s}-cut-item`,style:{minHeight:pe(v??0),cursor:gt?"pointer":"default",...Wd(_,g??0,n??!1)},onClick:gt?At:void 0,onMouseEnter:B||R?Fr:void 0,onMouseLeave:B?Re:void 0,children:a.jsx("div",{className:`${s}-list-cols-row`,style:{...h?{paddingLeft:pe(G),paddingRight:pe(G)}:{},justifyContent:zd(X.textTextAlign),alignItems:ho(ue)},children:a.jsx("span",{className:yo(e,Nt,`${s}-cut-label`,`${s}-text-tight-leading`),style:{...fo(X,n),...vo(e,Nt,s,n),...fe?{width:"100%"}:{}},children:F})})})})(),R&&Z&&(()=>{const X=pr(Z.widthPx),ue={width:X,height:"auto",maxHeight:X,objectFit:"contain",left:Z.x,top:Z.y,position:"absolute"};return a.jsx(Rd,{media:Z,className:Z.isVideo?`${s}-hover-video`:`${s}-hover-image`,style:ue},`${Z.rowId}-${Z.url}`)})()]})})]})}const gu=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';\r
|
|
5449
5449
|
import { CommonComponentProps } from '../props';\r
|
|
5450
5450
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';\r
|
|
5451
5451
|
import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';\r
|
|
5452
|
+
import { PaddingControl } from '../helpers/PaddingControl/PaddingControl';\r
|
|
5452
5453
|
import type { LayoutItem, LayoutTab } from '../../types/SchemaV1';\r
|
|
5453
5454
|
\r
|
|
5454
5455
|
type ListFontSettings = { fontWeight: number; fontStyle: string };\r
|
|
@@ -6745,7 +6746,6 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
|
|
|
6745
6746
|
const COL_RESIZE_HANDLE_WIDTH = 0.004;\r
|
|
6746
6747
|
const COL_PADDING_HANDLE_WIDTH = 0.004;\r
|
|
6747
6748
|
const ROW_PADDING_HANDLE_HEIGHT = COL_PADDING_HANDLE_WIDTH;\r
|
|
6748
|
-
const PADDING_CONTROL_HIT_SIZE = 12;\r
|
|
6749
6749
|
const MIN_COLUMN_WIDTH_PX = 50;\r
|
|
6750
6750
|
const ARTICLE_DESIGN_WIDTH = 1440;\r
|
|
6751
6751
|
const MIN_COLUMN_WIDTH = MIN_COLUMN_WIDTH_PX / ARTICLE_DESIGN_WIDTH;\r
|
|
@@ -6758,61 +6758,6 @@ export function getListMinColumnWidth(designWidthPx?: number): number {\r
|
|
|
6758
6758
|
return MIN_COLUMN_WIDTH_PX / designWidth;\r
|
|
6759
6759
|
}\r
|
|
6760
6760
|
\r
|
|
6761
|
-
type ListPaddingControlHitPlacement = 'left-y' | 'center-x' | 'center';\r
|
|
6762
|
-
\r
|
|
6763
|
-
function getListPaddingControlHitStyle(\r
|
|
6764
|
-
P: string,\r
|
|
6765
|
-
placement: ListPaddingControlHitPlacement,\r
|
|
6766
|
-
): CSSProperties {\r
|
|
6767
|
-
const base: CSSProperties = {\r
|
|
6768
|
-
position: 'absolute',\r
|
|
6769
|
-
width: PADDING_CONTROL_HIT_SIZE,\r
|
|
6770
|
-
height: PADDING_CONTROL_HIT_SIZE,\r
|
|
6771
|
-
pointerEvents: 'auto',\r
|
|
6772
|
-
};\r
|
|
6773
|
-
\r
|
|
6774
|
-
if (placement === 'left-y') {\r
|
|
6775
|
-
return { ...base, left: 20, top: '50%', transform: 'translateY(-50%)' };\r
|
|
6776
|
-
}\r
|
|
6777
|
-
\r
|
|
6778
|
-
if (placement === 'center-x') {\r
|
|
6779
|
-
return {\r
|
|
6780
|
-
...base,\r
|
|
6781
|
-
left: '50%',\r
|
|
6782
|
-
top: \`var(--\${P}-first-entry-handle-top, 50%)\`,\r
|
|
6783
|
-
transform: 'translate(-50%, -50%)',\r
|
|
6784
|
-
};\r
|
|
6785
|
-
}\r
|
|
6786
|
-
\r
|
|
6787
|
-
return { ...base, left: '50%', top: '50%', transform: 'translate(-50%, -50%)' };\r
|
|
6788
|
-
}\r
|
|
6789
|
-
\r
|
|
6790
|
-
type ListPaddingControlProps = {\r
|
|
6791
|
-
P: string;\r
|
|
6792
|
-
className: string;\r
|
|
6793
|
-
areaStyle: CSSProperties;\r
|
|
6794
|
-
hitPlacement: ListPaddingControlHitPlacement;\r
|
|
6795
|
-
} & ComponentPropsWithoutRef<'div'>;\r
|
|
6796
|
-
\r
|
|
6797
|
-
function ListPaddingControl({\r
|
|
6798
|
-
P,\r
|
|
6799
|
-
className,\r
|
|
6800
|
-
areaStyle,\r
|
|
6801
|
-
hitPlacement,\r
|
|
6802
|
-
...rest\r
|
|
6803
|
-
}: ListPaddingControlProps) {\r
|
|
6804
|
-
return (\r
|
|
6805
|
-
<div\r
|
|
6806
|
-
className={className}\r
|
|
6807
|
-
style={{ ...areaStyle, pointerEvents: 'none' }}\r
|
|
6808
|
-
data-controls-center-only-drag=""\r
|
|
6809
|
-
{...rest}\r
|
|
6810
|
-
>\r
|
|
6811
|
-
<div style={getListPaddingControlHitStyle(P, hitPlacement)} />\r
|
|
6812
|
-
</div>\r
|
|
6813
|
-
);\r
|
|
6814
|
-
}\r
|
|
6815
|
-
\r
|
|
6816
6761
|
function getEditorDesignWidth(element: HTMLElement | null | undefined): number {\r
|
|
6817
6762
|
let el = element ?? null;\r
|
|
6818
6763
|
\r
|
|
@@ -8122,8 +8067,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8122
8067
|
/>\r
|
|
8123
8068
|
)}\r
|
|
8124
8069
|
{columnPaddingBottomOverlay && (\r
|
|
8125
|
-
<
|
|
8126
|
-
|
|
8070
|
+
<PaddingControl\r
|
|
8071
|
+
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}\r
|
|
8127
8072
|
data-controls={col.paddingBottomKey}\r
|
|
8128
8073
|
data-controls-static-handle=""\r
|
|
8129
8074
|
data-controls-axis="y"\r
|
|
@@ -8145,8 +8090,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8145
8090
|
})}\r
|
|
8146
8091
|
{showControls && rowIdx === 0 && isVerticalLayout && (\r
|
|
8147
8092
|
<>\r
|
|
8148
|
-
<
|
|
8149
|
-
|
|
8093
|
+
<PaddingControl\r
|
|
8094
|
+
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}\r
|
|
8150
8095
|
data-controls="textPaddingLR"\r
|
|
8151
8096
|
data-controls-static-handle=""\r
|
|
8152
8097
|
data-controls-paired=""\r
|
|
@@ -8164,8 +8109,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8164
8109
|
height: '100%',\r
|
|
8165
8110
|
}}\r
|
|
8166
8111
|
/>\r
|
|
8167
|
-
<
|
|
8168
|
-
|
|
8112
|
+
<PaddingControl\r
|
|
8113
|
+
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}\r
|
|
8169
8114
|
data-controls="textPaddingLR"\r
|
|
8170
8115
|
data-controls-static-handle=""\r
|
|
8171
8116
|
data-controls-paired=""\r
|
|
@@ -8194,8 +8139,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8194
8139
|
/>\r
|
|
8195
8140
|
)}\r
|
|
8196
8141
|
{showControls && rowIdx === 0 && !isVerticalLayout && (\r
|
|
8197
|
-
<
|
|
8198
|
-
|
|
8142
|
+
<PaddingControl\r
|
|
8143
|
+
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}\r
|
|
8199
8144
|
data-controls="rowPaddingBottom"\r
|
|
8200
8145
|
data-controls-static-handle=""\r
|
|
8201
8146
|
data-controls-handle-left="20"\r
|
|
@@ -8218,8 +8163,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8218
8163
|
})}\r
|
|
8219
8164
|
{showControls && (\r
|
|
8220
8165
|
<div key="row-padding-handles" style={{ position: 'absolute', inset: 0, pointerEvents: 'none' }}>\r
|
|
8221
|
-
<
|
|
8222
|
-
|
|
8166
|
+
<PaddingControl\r
|
|
8167
|
+
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}\r
|
|
8223
8168
|
data-controls={rowPaddingTopControlKey}\r
|
|
8224
8169
|
data-controls-static-handle=""\r
|
|
8225
8170
|
{...(!isVerticalLayout ? { 'data-controls-handle-left': '20' } : {})}\r
|
|
@@ -8240,8 +8185,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8240
8185
|
)}\r
|
|
8241
8186
|
{showControls && !isVerticalLayout && firstColumn && lastColumn && (\r
|
|
8242
8187
|
<div key="column-edge-padding-handles" style={{ position: 'absolute', inset: 0, pointerEvents: 'none' }}>\r
|
|
8243
|
-
<
|
|
8244
|
-
|
|
8188
|
+
<PaddingControl\r
|
|
8189
|
+
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}\r
|
|
8245
8190
|
data-controls={firstColumn.paddingLeftKey}\r
|
|
8246
8191
|
data-controls-static-handle=""\r
|
|
8247
8192
|
data-controls-axis="x"\r
|
|
@@ -8260,8 +8205,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8260
8205
|
height: '100%',\r
|
|
8261
8206
|
}}\r
|
|
8262
8207
|
/>\r
|
|
8263
|
-
<
|
|
8264
|
-
|
|
8208
|
+
<PaddingControl\r
|
|
8209
|
+
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}\r
|
|
8265
8210
|
data-controls={lastColumn.paddingRightKey}\r
|
|
8266
8211
|
data-controls-static-handle=""\r
|
|
8267
8212
|
data-controls-axis="x"\r
|
|
@@ -8300,8 +8245,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8300
8245
|
\r
|
|
8301
8246
|
return (\r
|
|
8302
8247
|
<div key={\`\${col.paddingRightKey}-padding\`} style={{ position: 'absolute', inset: 0, pointerEvents: 'none' }}>\r
|
|
8303
|
-
<
|
|
8304
|
-
|
|
8248
|
+
<PaddingControl\r
|
|
8249
|
+
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}\r
|
|
8305
8250
|
data-controls={col.paddingRightKey}\r
|
|
8306
8251
|
data-controls-static-handle=""\r
|
|
8307
8252
|
data-controls-axis="x"\r
|
|
@@ -8321,8 +8266,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8321
8266
|
height: '100%',\r
|
|
8322
8267
|
}}\r
|
|
8323
8268
|
/>\r
|
|
8324
|
-
<
|
|
8325
|
-
|
|
8269
|
+
<PaddingControl\r
|
|
8270
|
+
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}\r
|
|
8326
8271
|
data-controls={nextCol.paddingLeftKey}\r
|
|
8327
8272
|
data-controls-static-handle=""\r
|
|
8328
8273
|
data-controls-axis="x"\r
|
|
@@ -8457,7 +8402,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8457
8402
|
</>\r
|
|
8458
8403
|
);\r
|
|
8459
8404
|
}\r
|
|
8460
|
-
`,_n=["A","B","C","D","E"],Si=[...ao,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],tn={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 yu(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function lr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function vu(){return Object.fromEntries(_n.map((e,t)=>{const n=Xt[t],r=`${e} column`;return[n,yu(r)]}))}function bu(){const e={};for(const t of _n)e[`${t}ColumnWidth`]=lr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=lr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=lr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=lr(`${t} column padding bottom`);return e}function $i(e={}){const{typeBDefaults:t,...n}=e,r={wrapperWidth:1,columnsOrder:[...Xt]};for(const l of _n)r[`${l}ColumnWidth`]=l==="A"?.0798:.32,r[`${l}ColumnPaddingLeft`]=0,r[`${l}ColumnPaddingRight`]=0,r[`${l}ColumnPaddingBottom`]=0;const i=n.type==="b"&&t?t:{};return{...r,...i,...n}}function xu(e){const t={};if(e===Ht)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...ao]},enum:[...ao]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Si],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Si]}}return t[_e(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[_e(e,"textFontSettings")]={...tn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[_e(e,"textFontSize")]={...tn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[_e(e,"textLineHeight")]={...tn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[_e(e,"textLetterSpacing")]={...tn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[_e(e,"textWordSpacing")]={...tn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[_e(e,"textTextAlign")]={...tn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[_e(e,"textTextAppearance")]={...tn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Cu=Io.reduce((e,t)=>({...e,...xu(t)}),{});function Su(e){return{verticalAlign:e===Ht?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Ht?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function $u(e,t={}){var n;return{...Su(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const wi=new Set(["textFontFamily","textFontSettings"]);function wu(e,t,n){const r=l=>n===void 0?!0:n==="common"?wi.has(l):!wi.has(l),i={};return r("verticalAlign")&&t.verticalAlign!==void 0&&(i[`${e}VerticalAlign`]=Ro(t.verticalAlign)),r("textFontFamily")&&t.textFontFamily!==void 0&&(i[_e(e,"textFontFamily")]=t.textFontFamily),r("textFontSettings")&&t.textFontSettings!==void 0&&(i[_e(e,"textFontSettings")]=t.textFontSettings),r("textFontSize")&&t.textFontSize!==void 0&&(i[_e(e,"textFontSize")]=t.textFontSize),r("textLineHeight")&&t.textLineHeight!==void 0&&(i[_e(e,"textLineHeight")]=t.textLineHeight),r("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(i[_e(e,"textLetterSpacing")]=t.textLetterSpacing),r("textWordSpacing")&&t.textWordSpacing!==void 0&&(i[_e(e,"textWordSpacing")]=t.textWordSpacing),r("textTextAlign")&&t.textTextAlign!==void 0&&(i[_e(e,"textTextAlign")]=t.textTextAlign),r("textTextAppearance")&&t.textTextAppearance!==void 0&&(i[_e(e,"textTextAppearance")]=t.textTextAppearance),i}function hr(e={},t){return Io.reduce((n,r)=>({...n,...wu(r,$u(r,e),t)}),{})}const Tu=hr(),Lu=Qd();function Sa(e){return[_e(e,"textFontFamily"),_e(e,"textFontSettings"),_e(e,"textFontSize"),_e(e,"textLineHeight"),_e(e,"textLetterSpacing"),_e(e,"textWordSpacing"),_e(e,"textTextAlign"),_e(e,"textTextAppearance"),`${e}VerticalAlign`]}function Pu(){const e=[];return Ao.forEach((t,n)=>{const r=Xt[n],i=Sa(t);for(let l=1;l<Xt.length;l+=1){const o=[{name:"columns",value:l},...Array.from({length:l},(c,s)=>({name:`columnsOrder.${s}`,value:r,isNotEqual:!0}))];i.forEach(c=>{e.push({if:o,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const Eu=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Sa(Ht);const _u=[..._n.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],nn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],Au=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:nn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:nn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:nn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:nn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:nn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:nn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:nn[6],link:""}],Iu=[..._n.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Ru={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:{...vu(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-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:Au},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:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"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:"Display",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"}},...bu(),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"}},...Cu,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",...Tu,...hr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:$i({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},...hr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:$i({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},...hr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Pu(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},..._u.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",...Iu]},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:"Entries",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:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{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:["__componentName__",Lu]}],paletteBookmark:{items:[...Eu],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},ku={element:hu,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>cu(e,t),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:Ru,sourceCode:fu},Ti=300,zt=.004,Li=12;function Wu(e){const t={position:"absolute",width:Li,height:Li,pointerEvents:"auto"};return e==="left-y"?{...t,left:20,top:"50%",transform:"translateY(-50%)"}:e==="center-x"?{...t,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}:{...t,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function jt({className:e,areaStyle:t,hitPlacement:n,...r}){return a.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...r,children:a.jsx("div",{style:Wu(n)})})}const Fu={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},Mu=["hover","focus","filled","success","error"];function Nu(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Pi(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function Ei(e,t,n,r){const i=e??.01;return t===void 0||t>=i?{}:{[`--${n}-text-leading-gap`]:y.scalingValue((i-t)/2,r)}}function Hu(e){return`
|
|
8405
|
+
`,_n=["A","B","C","D","E"],Co=[...oi,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],tn={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 hu(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function sr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function fu(){return Object.fromEntries(_n.map((e,t)=>{const n=Xt[t],r=`${e} column`;return[n,hu(r)]}))}function yu(){const e={};for(const t of _n)e[`${t}ColumnWidth`]=sr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=sr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=sr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=sr(`${t} column padding bottom`);return e}function So(e={}){const{typeBDefaults:t,...n}=e,r={wrapperWidth:1,columnsOrder:[...Xt]};for(const l of _n)r[`${l}ColumnWidth`]=l==="A"?.0798:.32,r[`${l}ColumnPaddingLeft`]=0,r[`${l}ColumnPaddingRight`]=0,r[`${l}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...r,...o,...n}}function vu(e){const t={};if(e===Nt)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...oi]},enum:[...oi]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Co],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Co]}}return t[Ae(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Ae(e,"textFontSettings")]={...tn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Ae(e,"textFontSize")]={...tn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ae(e,"textLineHeight")]={...tn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ae(e,"textLetterSpacing")]={...tn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ae(e,"textWordSpacing")]={...tn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ae(e,"textTextAlign")]={...tn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ae(e,"textTextAppearance")]={...tn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const bu=_i.reduce((e,t)=>({...e,...vu(t)}),{});function xu(e){return{verticalAlign:e===Nt?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Nt?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Cu(e,t={}){var n;return{...xu(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const $o=new Set(["textFontFamily","textFontSettings"]);function Su(e,t,n){const r=l=>n===void 0?!0:n==="common"?$o.has(l):!$o.has(l),o={};return r("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Ai(t.verticalAlign)),r("textFontFamily")&&t.textFontFamily!==void 0&&(o[Ae(e,"textFontFamily")]=t.textFontFamily),r("textFontSettings")&&t.textFontSettings!==void 0&&(o[Ae(e,"textFontSettings")]=t.textFontSettings),r("textFontSize")&&t.textFontSize!==void 0&&(o[Ae(e,"textFontSize")]=t.textFontSize),r("textLineHeight")&&t.textLineHeight!==void 0&&(o[Ae(e,"textLineHeight")]=t.textLineHeight),r("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Ae(e,"textLetterSpacing")]=t.textLetterSpacing),r("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Ae(e,"textWordSpacing")]=t.textWordSpacing),r("textTextAlign")&&t.textTextAlign!==void 0&&(o[Ae(e,"textTextAlign")]=t.textTextAlign),r("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Ae(e,"textTextAppearance")]=t.textTextAppearance),o}function gr(e={},t){return _i.reduce((n,r)=>({...n,...Su(r,Cu(r,e),t)}),{})}const $u=gr(),wu=Xd();function xa(e){return[Ae(e,"textFontFamily"),Ae(e,"textFontSettings"),Ae(e,"textFontSize"),Ae(e,"textLineHeight"),Ae(e,"textLetterSpacing"),Ae(e,"textWordSpacing"),Ae(e,"textTextAlign"),Ae(e,"textTextAppearance"),`${e}VerticalAlign`]}function Tu(){const e=[];return Pi.forEach((t,n)=>{const r=Xt[n],o=xa(t);for(let l=1;l<Xt.length;l+=1){const i=[{name:"columns",value:l},...Array.from({length:l},(c,s)=>({name:`columnsOrder.${s}`,value:r,isNotEqual:!0}))];o.forEach(c=>{e.push({if:i,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const Lu=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];xa(Nt);const Eu=[..._n.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],nn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],Pu=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:nn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:nn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:nn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:nn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:nn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:nn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:nn[6],link:""}],_u=[..._n.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Au={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:{...fu(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-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:Pu},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:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"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:"Display",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"}},...yu(),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"}},...bu,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",...$u,...gr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:So({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},...gr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:So({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},...gr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Tu(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Eu.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",..._u]},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:"Entries",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:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{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:["__componentName__",wu]}],paletteBookmark:{items:[...Lu],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Iu={element:mu,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>su(e,t),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:Au,sourceCode:gu},wo=300,jt=.004,Ru={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},ku=["hover","focus","filled","success","error"];function Wu(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Mu(e){return`
|
|
8461
8406
|
.${e}-wrapper {
|
|
8462
8407
|
box-sizing: border-box;
|
|
8463
8408
|
display: flex;
|
|
@@ -8519,7 +8464,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8519
8464
|
display: flex;
|
|
8520
8465
|
align-items: center;
|
|
8521
8466
|
justify-content: space-between;
|
|
8522
|
-
gap: ${
|
|
8467
|
+
gap: ${Wu(20)};
|
|
8523
8468
|
width: 100%;
|
|
8524
8469
|
min-width: 0;
|
|
8525
8470
|
min-height: var(--${e}-question-min-height, unset);
|
|
@@ -8547,7 +8492,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8547
8492
|
width: var(--${e}-icon-max-width);
|
|
8548
8493
|
height: var(--${e}-icon-max-width);
|
|
8549
8494
|
position: relative;
|
|
8550
|
-
transition: transform ${
|
|
8495
|
+
transition: transform ${wo}ms ease;
|
|
8551
8496
|
}
|
|
8552
8497
|
.${e}-icon-custom {
|
|
8553
8498
|
display: flex;
|
|
@@ -8582,7 +8527,11 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8582
8527
|
.${e}-panel {
|
|
8583
8528
|
display: grid;
|
|
8584
8529
|
grid-template-rows: 0fr;
|
|
8585
|
-
transition: grid-template-rows ${
|
|
8530
|
+
transition: grid-template-rows ${wo}ms ease;
|
|
8531
|
+
pointer-events: none;
|
|
8532
|
+
}
|
|
8533
|
+
.${e}-item-open .${e}-panel {
|
|
8534
|
+
pointer-events: auto;
|
|
8586
8535
|
}
|
|
8587
8536
|
.${e}-item-open .${e}-panel {
|
|
8588
8537
|
grid-template-rows: 1fr;
|
|
@@ -8650,400 +8599,17 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8650
8599
|
left: 20px;
|
|
8651
8600
|
transform: translateY(-50%);
|
|
8652
8601
|
}
|
|
8653
|
-
`}function
|
|
8654
|
-
import
|
|
8602
|
+
`}function To(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function Lo(e,t,n,r){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:y.scalingValue((o-t)/2,r)}}function Eo(e,t,n,r,o,l,i,c){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:r,letterSpacing:o??0,wordSpacing:l??0,textAppearance:i,color:c??"#000000"}}function Fu({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o,activeEvent:l}){const{prefix:i}=y.useScopedStyles(),c=o??!1,{wrapperWidth:s=1,cellMinHeight:p=0,dividerWidth:u=694e-6,dividerStyle:T="solid",entryHoverEffect:x="default",autoclose:f="off",icon:m,iconMaxWidth:g=.00833,iconPaddingRight:C=0,iconAnimation:w="rotate 45",questionColor:S="#000000",answerColor:v="#000000",dividerColor:F="#0000001F",iconColor:L="#000000",questionHoverColor:H="#666666",iconHoverColor:b="#666666",iconActiveColor:E="#000000",dividerHoverColor:O="#000000",questionFontFamily:$,questionFontSettings:P,questionFontSize:A,questionLineHeight:W,questionLetterSpacing:j,questionWordSpacing:te,questionTextAppearance:k,answerFontFamily:M,answerFontSettings:D,answerFontSize:N,answerLineHeight:I,answerLetterSpacing:K,answerWordSpacing:Z,answerTextAppearance:Q,questionPaddingLeft:R=0,questionPaddingTop:ne=0,questionPaddingBottom:h=0,answerPaddingLeft:ee=0,answerPaddingRight:ge=0,answerPaddingTop:le=0,answerPaddingBottom:be=0}=e,re=t??[],[ce,V]=d.useState(()=>new Set),U=!n||r;d.useEffect(()=>{V(new Set)},[f]),d.useEffect(()=>{n&&!o&&!r&&V(new Set)},[n,o,r]);const G=pe=>y.scalingValue(pe,n??!1),se=Math.max(R,jt),ye=Math.max(ne,jt),Te=Math.max(h,jt),Se=Math.max(ee,jt),Le=Math.max(ge,jt),_e=Math.max(le,jt),B=Math.max(be,jt),ie=Math.max(0,(s??1)-C-g),_=Math.max(0,(s??1)-ge),z=Math.max(0,(s??1)-ee),q=Math.max(C,jt),Y=Math.max(0,(s??1)-R-g),ae=d.useMemo(()=>ce.size===0?0:Math.min(...ce),[ce]),me=d.useCallback(pe=>ce.has(pe),[ce]),We=U&&x==="default"?`${i}-entry-hover-default`:"",he=m??"",ve=he!=="",Me=w.replace(/^rotate /,""),oe=`${i}-icon-anim-${Me}`,xe=yt(Je(Eo($,P,A,W,j,te,k,S),n)),Ie=yt(Je(Eo(M,D,N,I,K,Z,Q,v),n)),ke=To(A,W,`${i}-question`,`${i}-text-tight-leading`),Ve=To(N,I,`${i}-answer-text`,`${i}-text-tight-leading`),nt=Lo(A,W,i,n),pt=Lo(N,I,i,n),mt=y.buildColorVars(i,{questionColor:S,answerColor:v,dividerColor:F,iconColor:L,questionHoverColor:H,iconHoverColor:b,iconActiveColor:E,dividerHoverColor:O},Ru,ku),xt=l&&l!=="default"?`${i}-state-${l}`:"",_t=d.useCallback(pe=>{U&&V(Ne=>{if(Ne.has(pe)){const Ue=new Set(Ne);return Ue.delete(pe),Ue}if(f==="on")return new Set([pe]);const Be=new Set(Ne);return Be.add(pe),Be})},[U,f]),gt=d.useMemo(()=>Mu(i),[i]),At={[`--${i}-divider-width`]:y.scalingValue(u,n??!1),[`--${i}-divider-style`]:T,[`--${i}-icon-max-width`]:y.scalingValue(g,n??!1),...p>0?{[`--${i}-question-min-height`]:y.scalingValue(p,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:gt}}),a.jsx("div",{style:mt,children:a.jsx("div",{className:Pe(`${i}-wrapper`,n&&!r&&`${i}-editor`,We,xt),style:{width:y.scalingValue(s,n??!1),maxWidth:"100%",...At},children:re.map((pe,Ne)=>{var Dt;const Be=me(Ne),Ue=((Dt=pe.question)==null?void 0:Dt.trim())??"",Ct=pe.answer,Vt=((Ct==null?void 0:Ct.length)??0)>0,St=c&&Ne===ae,It=St&&Be;return a.jsxs("div",{className:Pe(`${i}-item`,Be&&`${i}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${i}-question-controls`,children:[St&&a.jsxs(a.Fragment,{children:[a.jsx(Ze,{"data-controls":"questionPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${i}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:G(ye),zIndex:2}}),a.jsx(Ze,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ie),className:`${i}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:G(se),height:"100%",zIndex:2}}),a.jsx(Ze,{"data-controls":"iconPaddingRight","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(Y),className:`${i}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:G(q),height:"100%",zIndex:2}})]}),a.jsxs("button",{type:"button",className:`${i}-question-button`,"aria-expanded":Be,style:{...xe,...nt,paddingLeft:G(R),paddingRight:G(C)},onClick:()=>_t(Ne),children:[ne>0&&a.jsx("span",{className:`${i}-padding-handle`,style:{height:G(ne)},"aria-hidden":"true"}),a.jsxs("span",{className:`${i}-question-row`,children:[a.jsx("span",{className:ke,children:Ue}),Vt&&(ve?a.jsx("span",{className:`${i}-icon ${i}-icon-custom ${oe}`,"aria-hidden":"true",children:a.jsx(Ht,{url:he,fill:L,hoverFill:b,className:`${i}-icon-image`})}):a.jsx("span",{className:`${i}-icon ${i}-icon-default ${oe}`,"aria-hidden":"true"}))]}),h>0&&a.jsx("span",{className:`${i}-padding-handle`,style:{height:G(h)},"aria-hidden":"true"})]}),St&&a.jsx(Ze,{"data-controls":"questionPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${i}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:G(Te),zIndex:2}})]}),Vt&&Ct&&a.jsx("div",{className:`${i}-panel`,"aria-hidden":!Be,children:a.jsx("div",{className:`${i}-panel-inner`,children:a.jsxs("div",{className:`${i}-answer-controls`,children:[It&&a.jsxs(a.Fragment,{children:[a.jsx(Ze,{"data-controls":"answerPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${i}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:G(_e),zIndex:2}}),a.jsx(Ze,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(_),className:`${i}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:G(Se),height:"100%",zIndex:2}}),a.jsx(Ze,{"data-controls":"answerPaddingRight","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(z),className:`${i}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:G(Le),height:"100%",zIndex:2}})]}),le>0&&a.jsx("div",{className:`${i}-padding-handle`,style:{height:G(le)}}),a.jsx("div",{className:`${i}-answer`,style:{...Ie,...pt,paddingLeft:G(ee),paddingRight:G(ge)},children:a.jsx("div",{className:Ve,children:a.jsx(Sn,{content:Ct})})}),be>0&&a.jsx("div",{className:`${i}-padding-handle`,style:{height:G(be)}}),It&&a.jsx(Ze,{"data-controls":"answerPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${i}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:G(B),zIndex:2}})]})})})]},Ne)})})})]})}const Hu=`import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
8603
|
+
import cn from 'classnames';
|
|
8655
8604
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
|
|
8656
|
-
import { omitTextColors,
|
|
8605
|
+
import { omitTextColors, textStylesToCss } from '../utils/textStylesToCss';
|
|
8657
8606
|
import { SvgImage } from '../helpers/SvgImage/SvgImage';
|
|
8658
8607
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
8659
|
-
|
|
8660
|
-
|
|
8661
|
-
|
|
8662
|
-
|
|
8663
|
-
};
|
|
8664
|
-
|
|
8665
|
-
type FAQSettings = {
|
|
8666
|
-
wrapperWidth?: number;
|
|
8667
|
-
cellMinHeight?: number;
|
|
8668
|
-
dividerWidth?: number;
|
|
8669
|
-
dividerStyle?: 'solid' | 'dashed' | 'dotted';
|
|
8670
|
-
entryHoverEffect?: 'none' | 'default';
|
|
8671
|
-
autoclose?: 'on' | 'off';
|
|
8672
|
-
icon?: string | null;
|
|
8673
|
-
iconMaxWidth?: number;
|
|
8674
|
-
iconPaddingRight?: number;
|
|
8675
|
-
iconAnimation?: 'rotate 180' | 'rotate 90' | 'rotate 45';
|
|
8676
|
-
questionColor?: string;
|
|
8677
|
-
answerColor?: string;
|
|
8678
|
-
dividerColor?: string;
|
|
8679
|
-
iconColor?: string;
|
|
8680
|
-
questionHoverColor?: string;
|
|
8681
|
-
iconHoverColor?: string;
|
|
8682
|
-
iconActiveColor?: string;
|
|
8683
|
-
dividerHoverColor?: string;
|
|
8684
|
-
questionFontFamily?: string;
|
|
8685
|
-
questionFontSettings?: { fontWeight: number; fontStyle: string };
|
|
8686
|
-
questionFontSize?: number;
|
|
8687
|
-
questionLineHeight?: number;
|
|
8688
|
-
questionLetterSpacing?: number;
|
|
8689
|
-
questionWordSpacing?: number;
|
|
8690
|
-
questionTextAppearance?: TextStyles['textAppearance'];
|
|
8691
|
-
answerFontFamily?: string;
|
|
8692
|
-
answerFontSettings?: { fontWeight: number; fontStyle: string };
|
|
8693
|
-
answerFontSize?: number;
|
|
8694
|
-
answerLineHeight?: number;
|
|
8695
|
-
answerLetterSpacing?: number;
|
|
8696
|
-
answerWordSpacing?: number;
|
|
8697
|
-
answerTextAppearance?: TextStyles['textAppearance'];
|
|
8698
|
-
questionPaddingLeft?: number;
|
|
8699
|
-
questionPaddingTop?: number;
|
|
8700
|
-
questionPaddingBottom?: number;
|
|
8701
|
-
answerPaddingLeft?: number;
|
|
8702
|
-
answerPaddingRight?: number;
|
|
8703
|
-
answerPaddingTop?: number;
|
|
8704
|
-
answerPaddingBottom?: number;
|
|
8705
|
-
};
|
|
8706
|
-
|
|
8707
|
-
type FAQProps = {
|
|
8708
|
-
settings: FAQSettings;
|
|
8709
|
-
content?: FAQContentItem[];
|
|
8710
|
-
isEditor?: boolean;
|
|
8711
|
-
isPreviewMode?: boolean;
|
|
8712
|
-
isEditMode?: boolean;
|
|
8713
|
-
activeEvent: string | undefined;
|
|
8714
|
-
onUpdateSettings?: (settings: FAQSettings) => void;
|
|
8715
|
-
} & CommonComponentProps;
|
|
8716
|
-
|
|
8717
|
-
const PANEL_ANIM_MS = 300;
|
|
8718
|
-
const PADDING_HANDLE_SIZE = 0.004;
|
|
8719
|
-
const PADDING_CONTROL_HIT_SIZE = 12;
|
|
8720
|
-
|
|
8721
|
-
type FAQPaddingControlHitPlacement = 'left-y' | 'center-x' | 'center';
|
|
8722
|
-
|
|
8723
|
-
function getFAQPaddingControlHitStyle(
|
|
8724
|
-
placement: FAQPaddingControlHitPlacement,
|
|
8725
|
-
): CSSProperties {
|
|
8726
|
-
const base: CSSProperties = {
|
|
8727
|
-
position: 'absolute',
|
|
8728
|
-
width: PADDING_CONTROL_HIT_SIZE,
|
|
8729
|
-
height: PADDING_CONTROL_HIT_SIZE,
|
|
8730
|
-
pointerEvents: 'auto',
|
|
8731
|
-
};
|
|
8732
|
-
|
|
8733
|
-
if (placement === 'left-y') {
|
|
8734
|
-
return { ...base, left: 20, top: '50%', transform: 'translateY(-50%)' };
|
|
8735
|
-
}
|
|
8736
|
-
|
|
8737
|
-
if (placement === 'center-x') {
|
|
8738
|
-
return { ...base, left: '50%', top: '50%', transform: 'translate(-50%, -50%)' };
|
|
8739
|
-
}
|
|
8740
|
-
|
|
8741
|
-
return { ...base, left: '50%', top: '50%', transform: 'translate(-50%, -50%)' };
|
|
8742
|
-
}
|
|
8743
|
-
|
|
8744
|
-
type FAQPaddingControlProps = {
|
|
8745
|
-
className: string;
|
|
8746
|
-
areaStyle: CSSProperties;
|
|
8747
|
-
hitPlacement: FAQPaddingControlHitPlacement;
|
|
8748
|
-
} & ComponentPropsWithoutRef<'div'>;
|
|
8749
|
-
|
|
8750
|
-
function FAQPaddingControl({
|
|
8751
|
-
className,
|
|
8752
|
-
areaStyle,
|
|
8753
|
-
hitPlacement,
|
|
8754
|
-
...rest
|
|
8755
|
-
}: FAQPaddingControlProps) {
|
|
8756
|
-
return (
|
|
8757
|
-
<div
|
|
8758
|
-
className={className}
|
|
8759
|
-
style={{ ...areaStyle, pointerEvents: 'none' }}
|
|
8760
|
-
data-controls-center-only-drag=""
|
|
8761
|
-
{...rest}
|
|
8762
|
-
>
|
|
8763
|
-
<div style={getFAQPaddingControlHitStyle(hitPlacement)} />
|
|
8764
|
-
</div>
|
|
8765
|
-
);
|
|
8766
|
-
}
|
|
8767
|
-
|
|
8768
|
-
type ColorKeys =
|
|
8769
|
-
| 'questionColor'
|
|
8770
|
-
| 'answerColor'
|
|
8771
|
-
| 'dividerColor'
|
|
8772
|
-
| 'iconColor'
|
|
8773
|
-
| 'questionHoverColor'
|
|
8774
|
-
| 'iconHoverColor'
|
|
8775
|
-
| 'iconActiveColor'
|
|
8776
|
-
| 'dividerHoverColor';
|
|
8777
|
-
|
|
8778
|
-
const COLOR_VAR_MAP: Record<ColorKeys, string> = {
|
|
8779
|
-
questionColor: 'question-color',
|
|
8780
|
-
answerColor: 'answer-color',
|
|
8781
|
-
dividerColor: 'divider-color',
|
|
8782
|
-
iconColor: 'icon-color',
|
|
8783
|
-
questionHoverColor: 'question-hover-color',
|
|
8784
|
-
iconHoverColor: 'icon-hover-color',
|
|
8785
|
-
iconActiveColor: 'icon-active-color',
|
|
8786
|
-
dividerHoverColor: 'divider-hover-color',
|
|
8787
|
-
};
|
|
8788
|
-
|
|
8789
|
-
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
8790
|
-
|
|
8791
|
-
function sv(px: number): string {
|
|
8792
|
-
return \`calc(var(--cntrl-article-width, 100vw) * \${px / 1440})\`;
|
|
8793
|
-
}
|
|
8794
|
-
|
|
8795
|
-
function getTextClassName(
|
|
8796
|
-
fontSize: number | undefined,
|
|
8797
|
-
lineHeight: number | undefined,
|
|
8798
|
-
baseClassName: string,
|
|
8799
|
-
tightLeadingClassName: string,
|
|
8800
|
-
): string {
|
|
8801
|
-
const resolvedFontSize = fontSize ?? 0.01;
|
|
8802
|
-
const needsTightLeading = lineHeight !== undefined && lineHeight < resolvedFontSize;
|
|
8803
|
-
|
|
8804
|
-
return needsTightLeading
|
|
8805
|
-
? \`\${baseClassName} \${tightLeadingClassName}\`
|
|
8806
|
-
: baseClassName;
|
|
8807
|
-
}
|
|
8808
|
-
|
|
8809
|
-
function getTextLeadingVars(
|
|
8810
|
-
fontSize: number | undefined,
|
|
8811
|
-
lineHeight: number | undefined,
|
|
8812
|
-
prefix: string,
|
|
8813
|
-
isEditor?: boolean,
|
|
8814
|
-
): React.CSSProperties {
|
|
8815
|
-
const resolvedFontSize = fontSize ?? 0.01;
|
|
8816
|
-
|
|
8817
|
-
if (lineHeight === undefined || lineHeight >= resolvedFontSize) {
|
|
8818
|
-
return {};
|
|
8819
|
-
}
|
|
8820
|
-
|
|
8821
|
-
return {
|
|
8822
|
-
[\`--\${prefix}-text-leading-gap\`]: scalingValue((resolvedFontSize - lineHeight) / 2, isEditor),
|
|
8823
|
-
} as React.CSSProperties;
|
|
8824
|
-
}
|
|
8825
|
-
|
|
8826
|
-
function getCSS(P: string): string {
|
|
8827
|
-
return \`
|
|
8828
|
-
.\${P}-wrapper {
|
|
8829
|
-
box-sizing: border-box;
|
|
8830
|
-
display: flex;
|
|
8831
|
-
flex-direction: column;
|
|
8832
|
-
}
|
|
8833
|
-
.\${P}-item {
|
|
8834
|
-
display: flex;
|
|
8835
|
-
flex-direction: column;
|
|
8836
|
-
position: relative;
|
|
8837
|
-
border-bottom-width: var(--\${P}-divider-width);
|
|
8838
|
-
border-bottom-style: var(--\${P}-divider-style);
|
|
8839
|
-
border-bottom-color: var(--\${P}-divider-color);
|
|
8840
|
-
}
|
|
8841
|
-
.\${P}-item:first-child {
|
|
8842
|
-
border-top-width: var(--\${P}-divider-width);
|
|
8843
|
-
border-top-style: var(--\${P}-divider-style);
|
|
8844
|
-
border-top-color: var(--\${P}-divider-color);
|
|
8845
|
-
}
|
|
8846
|
-
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-item {
|
|
8847
|
-
transition: border-color 250ms;
|
|
8848
|
-
}
|
|
8849
|
-
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-question-button {
|
|
8850
|
-
transition: color 250ms;
|
|
8851
|
-
}
|
|
8852
|
-
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-item:not(.\${P}-item-open):hover,
|
|
8853
|
-
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-item:has(+ .\${P}-item:not(.\${P}-item-open):hover),
|
|
8854
|
-
.\${P}-wrapper.\${P}-entry-hover-default.\${P}-state-hover .\${P}-item:not(.\${P}-item-open) {
|
|
8855
|
-
border-bottom-color: var(--\${P}-divider-hover-color, var(--\${P}-divider-color));
|
|
8856
|
-
}
|
|
8857
|
-
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-item:not(.\${P}-item-open):hover:first-child,
|
|
8858
|
-
.\${P}-wrapper.\${P}-entry-hover-default.\${P}-state-hover .\${P}-item:not(.\${P}-item-open):first-child {
|
|
8859
|
-
border-top-color: var(--\${P}-divider-hover-color, var(--\${P}-divider-color));
|
|
8860
|
-
}
|
|
8861
|
-
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-item:not(.\${P}-item-open):hover .\${P}-question-button,
|
|
8862
|
-
.\${P}-wrapper.\${P}-entry-hover-default.\${P}-state-hover .\${P}-item:not(.\${P}-item-open) .\${P}-question-button {
|
|
8863
|
-
color: var(--\${P}-question-hover-color, var(--\${P}-question-color));
|
|
8864
|
-
}
|
|
8865
|
-
.\${P}-question-button {
|
|
8866
|
-
display: flex;
|
|
8867
|
-
flex-direction: column;
|
|
8868
|
-
align-items: stretch;
|
|
8869
|
-
width: 100%;
|
|
8870
|
-
margin: 0;
|
|
8871
|
-
border: none;
|
|
8872
|
-
background: none;
|
|
8873
|
-
cursor: pointer;
|
|
8874
|
-
text-align: left;
|
|
8875
|
-
color: var(--\${P}-question-color);
|
|
8876
|
-
font: inherit;
|
|
8877
|
-
padding-left: 0;
|
|
8878
|
-
outline: none;
|
|
8879
|
-
-webkit-tap-highlight-color: transparent;
|
|
8880
|
-
}
|
|
8881
|
-
.\${P}-question-button:focus,
|
|
8882
|
-
.\${P}-question-button:focus-visible {
|
|
8883
|
-
outline: none;
|
|
8884
|
-
}
|
|
8885
|
-
.\${P}-question-row {
|
|
8886
|
-
display: flex;
|
|
8887
|
-
align-items: center;
|
|
8888
|
-
justify-content: space-between;
|
|
8889
|
-
gap: \${sv(20)};
|
|
8890
|
-
width: 100%;
|
|
8891
|
-
min-width: 0;
|
|
8892
|
-
min-height: var(--\${P}-question-min-height, unset);
|
|
8893
|
-
}
|
|
8894
|
-
.\${P}-editor .\${P}-question-button {
|
|
8895
|
-
cursor: default;
|
|
8896
|
-
}
|
|
8897
|
-
.\${P}-question {
|
|
8898
|
-
margin: 0;
|
|
8899
|
-
flex: 1;
|
|
8900
|
-
min-width: 0;
|
|
8901
|
-
color: inherit;
|
|
8902
|
-
white-space: pre-wrap;
|
|
8903
|
-
overflow-wrap: anywhere;
|
|
8904
|
-
word-break: break-word;
|
|
8905
|
-
}
|
|
8906
|
-
.\${P}-text-tight-leading {
|
|
8907
|
-
display: block;
|
|
8908
|
-
flex-shrink: 0;
|
|
8909
|
-
padding-top: var(--\${P}-text-leading-gap, 0);
|
|
8910
|
-
padding-bottom: var(--\${P}-text-leading-gap, 0);
|
|
8911
|
-
}
|
|
8912
|
-
.\${P}-icon {
|
|
8913
|
-
flex-shrink: 0;
|
|
8914
|
-
width: var(--\${P}-icon-max-width);
|
|
8915
|
-
height: var(--\${P}-icon-max-width);
|
|
8916
|
-
position: relative;
|
|
8917
|
-
transition: transform \${PANEL_ANIM_MS}ms ease;
|
|
8918
|
-
}
|
|
8919
|
-
.\${P}-icon-custom {
|
|
8920
|
-
display: flex;
|
|
8921
|
-
align-items: center;
|
|
8922
|
-
justify-content: center;
|
|
8923
|
-
}
|
|
8924
|
-
.\${P}-icon-image {
|
|
8925
|
-
position: absolute;
|
|
8926
|
-
top: 50%;
|
|
8927
|
-
left: 50%;
|
|
8928
|
-
transform: translate(-50%, -50%);
|
|
8929
|
-
transition: background-color 250ms;
|
|
8930
|
-
}
|
|
8931
|
-
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-item:not(.\${P}-item-open):hover .\${P}-icon-image,
|
|
8932
|
-
.\${P}-wrapper.\${P}-entry-hover-default.\${P}-state-hover .\${P}-item:not(.\${P}-item-open) .\${P}-icon-image {
|
|
8933
|
-
--fill: var(--\${P}-icon-hover-color, var(--\${P}-icon-color)) !important;
|
|
8934
|
-
--hover-fill: var(--\${P}-icon-hover-color, var(--\${P}-icon-color)) !important;
|
|
8935
|
-
}
|
|
8936
|
-
.\${P}-item-open .\${P}-icon-image {
|
|
8937
|
-
--fill: var(--\${P}-icon-active-color, var(--\${P}-icon-color)) !important;
|
|
8938
|
-
--hover-fill: var(--\${P}-icon-active-color, var(--\${P}-icon-color)) !important;
|
|
8939
|
-
}
|
|
8940
|
-
.\${P}-item-open .\${P}-icon-anim-45 {
|
|
8941
|
-
transform: rotate(45deg);
|
|
8942
|
-
}
|
|
8943
|
-
.\${P}-item-open .\${P}-icon-anim-90 {
|
|
8944
|
-
transform: rotate(90deg);
|
|
8945
|
-
}
|
|
8946
|
-
.\${P}-item-open .\${P}-icon-anim-180 {
|
|
8947
|
-
transform: rotate(180deg);
|
|
8948
|
-
}
|
|
8949
|
-
.\${P}-panel {
|
|
8950
|
-
display: grid;
|
|
8951
|
-
grid-template-rows: 0fr;
|
|
8952
|
-
transition: grid-template-rows \${PANEL_ANIM_MS}ms ease;
|
|
8953
|
-
}
|
|
8954
|
-
.\${P}-item-open .\${P}-panel {
|
|
8955
|
-
grid-template-rows: 1fr;
|
|
8956
|
-
}
|
|
8957
|
-
.\${P}-panel-inner {
|
|
8958
|
-
overflow: hidden;
|
|
8959
|
-
min-height: 0;
|
|
8960
|
-
}
|
|
8961
|
-
.\${P}-answer {
|
|
8962
|
-
color: var(--\${P}-answer-color);
|
|
8963
|
-
}
|
|
8964
|
-
.\${P}-answer-text {
|
|
8965
|
-
margin: 0;
|
|
8966
|
-
color: inherit;
|
|
8967
|
-
white-space: pre-wrap;
|
|
8968
|
-
overflow-wrap: anywhere;
|
|
8969
|
-
word-break: break-word;
|
|
8970
|
-
}
|
|
8971
|
-
.\${P}-answer-text a {
|
|
8972
|
-
color: inherit;
|
|
8973
|
-
text-decoration: underline;
|
|
8974
|
-
text-underline-offset: 0.1em;
|
|
8975
|
-
}
|
|
8976
|
-
.\${P}-padding-handle {
|
|
8977
|
-
width: 100%;
|
|
8978
|
-
flex-shrink: 0;
|
|
8979
|
-
background: transparent;
|
|
8980
|
-
}
|
|
8981
|
-
.\${P}-question-controls,
|
|
8982
|
-
.\${P}-answer-controls {
|
|
8983
|
-
position: relative;
|
|
8984
|
-
}
|
|
8985
|
-
.\${P}-padding-control-handle {
|
|
8986
|
-
background: transparent;
|
|
8987
|
-
}
|
|
8988
|
-
.\${P}-padding-control-handle[data-controls-axis="x"][data-controls-variant="column-padding"]::after {
|
|
8989
|
-
content: '';
|
|
8990
|
-
position: absolute;
|
|
8991
|
-
top: 50%;
|
|
8992
|
-
left: 50%;
|
|
8993
|
-
transform: translate(-50%, -50%);
|
|
8994
|
-
width: 4px;
|
|
8995
|
-
height: 12px;
|
|
8996
|
-
background: #FF5C02;
|
|
8997
|
-
border: 1px solid #FFFFFF;
|
|
8998
|
-
border-radius: 5px;
|
|
8999
|
-
box-sizing: border-box;
|
|
9000
|
-
pointer-events: none;
|
|
9001
|
-
}
|
|
9002
|
-
.\${P}-padding-control-handle[data-controls-axis="y"]::after {
|
|
9003
|
-
content: '';
|
|
9004
|
-
position: absolute;
|
|
9005
|
-
top: 50%;
|
|
9006
|
-
left: 50%;
|
|
9007
|
-
transform: translate(-50%, -50%);
|
|
9008
|
-
width: 12px;
|
|
9009
|
-
height: 4px;
|
|
9010
|
-
background: #FF5C02;
|
|
9011
|
-
border: 1px solid #FFFFFF;
|
|
9012
|
-
border-radius: 5px;
|
|
9013
|
-
box-sizing: border-box;
|
|
9014
|
-
pointer-events: none;
|
|
9015
|
-
}
|
|
9016
|
-
.\${P}-padding-control-handle[data-controls-variant="row-padding"][data-controls-axis="y"]::after {
|
|
9017
|
-
left: 20px;
|
|
9018
|
-
transform: translateY(-50%);
|
|
9019
|
-
}
|
|
9020
|
-
\`;
|
|
9021
|
-
}
|
|
9022
|
-
|
|
9023
|
-
function resolveTextStyle(
|
|
9024
|
-
fontFamily: string | undefined,
|
|
9025
|
-
fontSettings: FAQSettings['questionFontSettings'],
|
|
9026
|
-
fontSize: number | undefined,
|
|
9027
|
-
lineHeight: number | undefined,
|
|
9028
|
-
letterSpacing: number | undefined,
|
|
9029
|
-
wordSpacing: number | undefined,
|
|
9030
|
-
textAppearance: TextStyles['textAppearance'],
|
|
9031
|
-
color: string | undefined,
|
|
9032
|
-
): TextStyles {
|
|
9033
|
-
return {
|
|
9034
|
-
fontSettings: {
|
|
9035
|
-
fontFamily,
|
|
9036
|
-
fontWeight: fontSettings?.fontWeight ?? 400,
|
|
9037
|
-
fontStyle: fontSettings?.fontStyle ?? 'normal',
|
|
9038
|
-
},
|
|
9039
|
-
fontSize: fontSize ?? 0.01,
|
|
9040
|
-
lineHeight,
|
|
9041
|
-
letterSpacing: letterSpacing ?? 0,
|
|
9042
|
-
wordSpacing: wordSpacing ?? 0,
|
|
9043
|
-
textAppearance,
|
|
9044
|
-
color: color ?? '#000000',
|
|
9045
|
-
};
|
|
9046
|
-
}
|
|
8608
|
+
import { PaddingControl } from '../helpers/PaddingControl/PaddingControl';
|
|
8609
|
+
import { COLOR_VAR_MAP, PADDING_HANDLE_SIZE, STATE_KEYS } from './FAQConstants';
|
|
8610
|
+
import { getCSS } from './FAQStyles';
|
|
8611
|
+
import { getTextClassName, getTextLeadingVars, resolveTextStyle } from './FAQTypography';
|
|
8612
|
+
import type { FAQProps } from './FAQTypes';
|
|
9047
8613
|
|
|
9048
8614
|
export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, activeEvent }: FAQProps) {
|
|
9049
8615
|
const { prefix: P } = useScopedStyles();
|
|
@@ -9223,7 +8789,12 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
9223
8789
|
<style dangerouslySetInnerHTML={{ __html: scopedCss }} />
|
|
9224
8790
|
<div style={colorVars}>
|
|
9225
8791
|
<div
|
|
9226
|
-
className={
|
|
8792
|
+
className={cn(
|
|
8793
|
+
\`\${P}-wrapper\`,
|
|
8794
|
+
isEditor && !isPreviewMode && \`\${P}-editor\`,
|
|
8795
|
+
entryHoverClass,
|
|
8796
|
+
stateClass,
|
|
8797
|
+
)}
|
|
9227
8798
|
style={{
|
|
9228
8799
|
width: scalingValue(wrapperWidth, isEditor ?? false),
|
|
9229
8800
|
maxWidth: '100%',
|
|
@@ -9236,17 +8807,18 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
9236
8807
|
const answer = item.answer;
|
|
9237
8808
|
const hasAnswer = (answer?.length ?? 0) > 0;
|
|
9238
8809
|
const showPaddingControls = showControls && index === controlsTargetIndex;
|
|
8810
|
+
const showAnswerPaddingControls = showPaddingControls && isOpen;
|
|
9239
8811
|
|
|
9240
8812
|
return (
|
|
9241
8813
|
<div
|
|
9242
8814
|
key={index}
|
|
9243
|
-
className={\`\${P}-item
|
|
8815
|
+
className={cn(\`\${P}-item\`, isOpen && \`\${P}-item-open\`)}
|
|
9244
8816
|
data-faq-item=""
|
|
9245
8817
|
>
|
|
9246
8818
|
<div className={\`\${P}-question-controls\`}>
|
|
9247
8819
|
{showPaddingControls && (
|
|
9248
8820
|
<>
|
|
9249
|
-
<
|
|
8821
|
+
<PaddingControl
|
|
9250
8822
|
data-controls="questionPaddingTop"
|
|
9251
8823
|
data-controls-static-handle=""
|
|
9252
8824
|
data-controls-handle-left="20"
|
|
@@ -9264,7 +8836,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
9264
8836
|
zIndex: 2,
|
|
9265
8837
|
}}
|
|
9266
8838
|
/>
|
|
9267
|
-
<
|
|
8839
|
+
<PaddingControl
|
|
9268
8840
|
data-controls="questionPaddingLeft"
|
|
9269
8841
|
data-controls-static-handle=""
|
|
9270
8842
|
data-controls-axis="x"
|
|
@@ -9282,7 +8854,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
9282
8854
|
zIndex: 2,
|
|
9283
8855
|
}}
|
|
9284
8856
|
/>
|
|
9285
|
-
<
|
|
8857
|
+
<PaddingControl
|
|
9286
8858
|
data-controls="iconPaddingRight"
|
|
9287
8859
|
data-controls-static-handle=""
|
|
9288
8860
|
data-controls-axis="x"
|
|
@@ -9348,7 +8920,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
9348
8920
|
)}
|
|
9349
8921
|
</button>
|
|
9350
8922
|
{showPaddingControls && (
|
|
9351
|
-
<
|
|
8923
|
+
<PaddingControl
|
|
9352
8924
|
data-controls="questionPaddingBottom"
|
|
9353
8925
|
data-controls-static-handle=""
|
|
9354
8926
|
data-controls-handle-left="20"
|
|
@@ -9372,9 +8944,9 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
9372
8944
|
<div className={\`\${P}-panel\`} aria-hidden={!isOpen}>
|
|
9373
8945
|
<div className={\`\${P}-panel-inner\`}>
|
|
9374
8946
|
<div className={\`\${P}-answer-controls\`}>
|
|
9375
|
-
{
|
|
8947
|
+
{showAnswerPaddingControls && (
|
|
9376
8948
|
<>
|
|
9377
|
-
<
|
|
8949
|
+
<PaddingControl
|
|
9378
8950
|
data-controls="answerPaddingTop"
|
|
9379
8951
|
data-controls-static-handle=""
|
|
9380
8952
|
data-controls-handle-left="20"
|
|
@@ -9392,7 +8964,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
9392
8964
|
zIndex: 2,
|
|
9393
8965
|
}}
|
|
9394
8966
|
/>
|
|
9395
|
-
<
|
|
8967
|
+
<PaddingControl
|
|
9396
8968
|
data-controls="answerPaddingLeft"
|
|
9397
8969
|
data-controls-static-handle=""
|
|
9398
8970
|
data-controls-axis="x"
|
|
@@ -9410,7 +8982,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
9410
8982
|
zIndex: 2,
|
|
9411
8983
|
}}
|
|
9412
8984
|
/>
|
|
9413
|
-
<
|
|
8985
|
+
<PaddingControl
|
|
9414
8986
|
data-controls="answerPaddingRight"
|
|
9415
8987
|
data-controls-static-handle=""
|
|
9416
8988
|
data-controls-axis="x"
|
|
@@ -9456,8 +9028,8 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
9456
9028
|
style={{ height: scaled(answerPaddingBottom) }}
|
|
9457
9029
|
/>
|
|
9458
9030
|
)}
|
|
9459
|
-
{
|
|
9460
|
-
<
|
|
9031
|
+
{showAnswerPaddingControls && (
|
|
9032
|
+
<PaddingControl
|
|
9461
9033
|
data-controls="answerPaddingBottom"
|
|
9462
9034
|
data-controls-static-handle=""
|
|
9463
9035
|
data-controls-handle-left="20"
|
|
@@ -9488,4 +9060,4 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
9488
9060
|
</>
|
|
9489
9061
|
);
|
|
9490
9062
|
}
|
|
9491
|
-
`;function qt(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ai={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Vu=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Du={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"icon-switch-control"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:qt("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...Ai.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...Ai.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:qt("Question Padding Left"),questionPaddingTop:qt("Question Padding Top"),questionPaddingBottom:qt("Question Padding Bottom"),answerPaddingLeft:qt("Answer Padding Left"),answerPaddingRight:qt("Answer Padding Right"),answerPaddingTop:qt("Answer Padding Top"),answerPaddingBottom:qt("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...Vu],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},zu={element:Bu,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},schema:Du,sourceCode:Ou},ju=[Fl,Dl,Ac,Bc,Yc,sd,pd,bd,Id,ku,zu];exports.components=ju;exports.isSchemaV1=La;
|
|
9063
|
+
`;function qt(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Po={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Nu=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Bu={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"icon-switch-control"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:qt("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...Po.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...Po.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:qt("Question Padding Left"),questionPaddingTop:qt("Question Padding Top"),questionPaddingBottom:qt("Question Padding Bottom"),answerPaddingLeft:qt("Answer Padding Left"),answerPaddingRight:qt("Answer Padding Right"),answerPaddingTop:qt("Answer Padding Top"),answerPaddingBottom:qt("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...Nu],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Ou={element:Fu,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},schema:Bu,sourceCode:Hu},Vu=[kl,Ol,Pc,Hc,Uc,od,dd,yd,_d,Iu,Ou];exports.components=Vu;exports.isSchemaV1=wa;
|