@cntrl-site/components 1.0.52 → 1.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +205 -523
- package/dist/index.mjs +5933 -6328
- package/package.json +1 -1
- package/dist/Components/helpers/PaddingControl/PaddingControl.d.ts +0 -9
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),nt=require("classnames"),y=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),gi=require("react-dom");function Sc(e){return e.type==="object"&&e.version===1}const $c="ControlSlider-module__wrapper___sHEkd",Cc="ControlSlider-module__hoverArrow___A-dOH",Tc="ControlSlider-module__sliderItem___QQSkR",Lc="ControlSlider-module__sliderImage___9hRl-",Ic="ControlSlider-module__arrow___05ghY",Rc="ControlSlider-module__arrowVertical___tBfVN",Ec="ControlSlider-module__nextArrow___-30Yc",kc="ControlSlider-module__arrowInner___aEra3",Mc="ControlSlider-module__arrowIcon___S4ztF",Pc="ControlSlider-module__arrowImg___2dwJW",Ac="ControlSlider-module__mirror___brd6U",Fc="ControlSlider-module__pagination___bicLF",Wc="ControlSlider-module__paginationInner___bT-P-",_c="ControlSlider-module__paginationVertical___zYqKw",Nc="ControlSlider-module__paginationItem___nTRbk",Hc="ControlSlider-module__dot___p1Qun",jc="ControlSlider-module__activeDot___LHFaj",Oc="ControlSlider-module__paginationInsideBottom___R3FWn",zc="ControlSlider-module__paginationInsideTop___V-qb-",Bc="ControlSlider-module__paginationOutsideBottom___14w8D",Dc="ControlSlider-module__paginationOutsideTop___SCLqB",Vc="ControlSlider-module__paginationInsideLeft___yOBRZ",Gc="ControlSlider-module__paginationInsideRight___Rtt3o",qc="ControlSlider-module__paginationOutsideLeft___lahaw",Kc="ControlSlider-module__paginationOutsideRight___EtuQa",Uc="ControlSlider-module__imgWrapper___UjEgB",Xc="ControlSlider-module__captionBlock___dJ6-j",Yc="ControlSlider-module__captionTextWrapper___HFlpf",Zc="ControlSlider-module__captionText___uGBVc",Jc="ControlSlider-module__active___WZK4G",Qc="ControlSlider-module__withPointerEvents___t-18M",ed="ControlSlider-module__topLeftAlignment___zjnGM",td="ControlSlider-module__topCenterAlignment___gD1xW",nd="ControlSlider-module__topRightAlignment___NMapS",id="ControlSlider-module__middleLeftAlignment___OnUrY",od="ControlSlider-module__middleCenterAlignment___Tdkl0",rd="ControlSlider-module__middleRightAlignment___wEbfX",ad="ControlSlider-module__bottomLeftAlignment___cTP2-",sd="ControlSlider-module__bottomCenterAlignment___c54fB",ld="ControlSlider-module__bottomRightAlignment___kEwrz",cd="ControlSlider-module__clickOverlay___DZA28",dd="ControlSlider-module__contain___pLyq7",ud="ControlSlider-module__cover___KdDat",Xe={wrapper:$c,hoverArrow:Cc,sliderItem:Tc,sliderImage:Lc,arrow:Ic,arrowVertical:Rc,nextArrow:Ec,arrowInner:kc,arrowIcon:Mc,arrowImg:Pc,mirror:Ac,pagination:Fc,paginationInner:Wc,paginationVertical:_c,paginationItem:Nc,dot:Hc,activeDot:jc,paginationInsideBottom:Oc,paginationInsideTop:zc,paginationOutsideBottom:Bc,paginationOutsideTop:Dc,paginationInsideLeft:Vc,paginationInsideRight:Gc,paginationOutsideLeft:qc,paginationOutsideRight:Kc,imgWrapper:Uc,captionBlock:Xc,captionTextWrapper:Yc,captionText:Zc,active:Jc,withPointerEvents:Qc,topLeftAlignment:ed,topCenterAlignment:td,topRightAlignment:nd,middleLeftAlignment:id,middleCenterAlignment:od,middleRightAlignment:rd,bottomLeftAlignment:ad,bottomCenterAlignment:sd,bottomRightAlignment:ld,clickOverlay:cd,contain:dd,cover:ud};function pd(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function md(e,t,n){return t&&pd(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ya="(prefers-reduced-motion: reduce)",Ci=1,gd=2,Ri=3,zi=4,yo=5,qo=6,Qo=7,hd={CREATED:Ci,MOUNTED:gd,IDLE:Ri,MOVING:zi,SCROLLING:yo,DRAGGING:qo,DESTROYED:Qo};function Wn(e){e.length=0}function Xn(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ot(e){return e.bind.apply(e,[null].concat(Xn(arguments,1)))}var dl=setTimeout,oa=function(){};function Za(e){return requestAnimationFrame(e)}function cr(e,t){return typeof t===e}function oo(e){return!xa(e)&&cr("object",e)}var va=Array.isArray,ul=Ot(cr,"function"),Gn=Ot(cr,"string"),vo=Ot(cr,"undefined");function xa(e){return e===null}function pl(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function xo(e){return va(e)?e:[e]}function vn(e,t){xo(e).forEach(t)}function ba(e,t){return e.indexOf(t)>-1}function Ko(e,t){return e.push.apply(e,xo(t)),e}function kn(e,t,n){e&&vn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Tn(e,t){kn(e,Gn(t)?t.split(" "):t,!0)}function bo(e,t){vn(t,e.appendChild.bind(e))}function wa(e,t){vn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ro(e,t){return pl(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ml(e,t){var n=e?Xn(e.children):[];return t?n.filter(function(i){return ro(i,t)}):n}function wo(e,t){return t?ml(e,t)[0]:e.firstElementChild}var ao=Object.keys;function di(e,t,n){return e&&(n?ao(e).reverse():ao(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function so(e){return Xn(arguments,1).forEach(function(t){di(t,function(n,i){e[i]=t[i]})}),e}function zn(e){return Xn(arguments,1).forEach(function(t){di(t,function(n,i){va(n)?e[i]=n.slice():oo(n)?e[i]=zn({},oo(e[i])?e[i]:{},n):e[i]=n})}),e}function Ja(e,t){vn(t||ao(e),function(n){delete e[n]})}function Ln(e,t){vn(e,function(n){vn(t,function(i){n&&n.removeAttribute(i)})})}function ct(e,t,n){oo(t)?di(t,function(i,o){ct(e,o,i)}):vn(e,function(i){xa(n)||n===""?Ln(i,t):i.setAttribute(t,String(n))})}function Ti(e,t,n){var i=document.createElement(e);return t&&(Gn(t)?Tn(i,t):ct(i,t)),n&&bo(n,i),i}function xn(e,t,n){if(vo(n))return getComputedStyle(e)[t];xa(n)||(e.style[t]=""+n)}function lo(e,t){xn(e,"display",t)}function gl(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function bn(e,t){return e.getAttribute(t)}function Qa(e,t){return e&&e.classList.contains(t)}function gn(e){return e.getBoundingClientRect()}function ui(e){vn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function hl(e){return wo(new DOMParser().parseFromString(e,"text/html").body)}function En(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function fl(e,t){return e&&e.querySelector(t)}function Sa(e,t){return t?Xn(e.querySelectorAll(t)):[]}function Mn(e,t){kn(e,t,!1)}function ra(e){return e.timeStamp}function ti(e){return Gn(e)?e:e?e+"px":""}var So="splide",$a="data-"+So;function Qi(e,t){if(!e)throw new Error("["+So+"] "+(t||""))}var qn=Math.min,er=Math.max,tr=Math.floor,co=Math.ceil,ln=Math.abs;function yl(e,t,n){return ln(e-t)<n}function Uo(e,t,n,i){var o=qn(t,n),s=er(t,n);return i?o<e&&e<s:o<=e&&e<=s}function wi(e,t,n){var i=qn(t,n),o=er(t,n);return qn(er(i,e),o)}function aa(e){return+(e>0)-+(e<0)}function sa(e,t){return vn(t,function(n){e=e.replace("%s",""+n)}),e}function Ca(e){return e<10?"0"+e:""+e}var es={};function fd(e){return""+e+Ca(es[e]=(es[e]||0)+1)}function vl(){var e=[];function t(l,d,c,u){o(l,d,function(m,x,b){var T="addEventListener"in m,f=T?m.removeEventListener.bind(m,x,c,u):m.removeListener.bind(m,c);T?m.addEventListener(x,c,u):m.addListener(c),e.push([m,x,b,c,f])})}function n(l,d,c){o(l,d,function(u,m,x){e=e.filter(function(b){return b[0]===u&&b[1]===m&&b[2]===x&&(!c||b[3]===c)?(b[4](),!1):!0})})}function i(l,d,c){var u,m=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:m,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,m,!1,c)),l.dispatchEvent(u),u}function o(l,d,c){vn(l,function(u){u&&vn(d,function(m){m.split(" ").forEach(function(x){var b=x.split(".");c(u,b[0],b[1])})})})}function s(){e.forEach(function(l){l[4]()}),Wn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Yn="mounted",la="ready",_n="move",Bi="moved",Ta="click",xl="active",bl="inactive",wl="visible",Sl="hidden",Zt="refresh",an="updated",Ei="resize",dr="resized",$l="drag",Cl="dragging",Tl="dragged",ur="scroll",hi="scrolled",yd="overflow",La="destroy",Ll="arrows:mounted",Il="arrows:updated",Rl="pagination:mounted",El="pagination:updated",Ia="navigation:mounted",Ra="autoplay:play",kl="autoplay:playing",Ea="autoplay:pause",ka="lazyload:loaded",Ml="sk",Pl="sh",nr="ei";function qt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=vl();function i(s,l){n.bind(t,xo(s).join(" "),function(d){l.apply(l,va(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Xn(arguments,1))}return e&&e.event.on(La,n.destroy),so(n,{bus:t,on:i,off:Ot(n.unbind,t),emit:o})}function pr(e,t,n,i){var o=Date.now,s,l=0,d,c=!0,u=0;function m(){if(!c){if(l=e?qn((o()-s)/e,1):1,n&&n(l),l>=1&&(t(),s=o(),i&&++u>=i))return b();d=Za(m)}}function x(R){R||f(),s=o()-(R?l*e:0),c=!1,d=Za(m)}function b(){c=!0}function T(){s=o(),l=0,n&&n(l)}function f(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function L(R){e=R}function $(){return c}return{start:x,rewind:T,pause:b,cancel:f,set:L,isPaused:$}}function vd(e){var t=e;function n(o){t=o}function i(o){return ba(xo(o),t)}return{set:n,is:i}}function xd(e,t){var n=pr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function bd(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},l=vl(),d=[];function c(){var f=n.mediaQuery==="min";ao(o).sort(function(L,$){return f?+L-+$:+$-+L}).forEach(function(L){m(o[L],"("+(f?"min":"max")+"-width:"+L+"px)")}),m(s,Ya),x()}function u(f){f&&l.destroy()}function m(f,L){var $=matchMedia(L);l.bind($,"change",x),d.push([f,$])}function x(){var f=i.is(Qo),L=n.direction,$=d.reduce(function(R,P){return zn(R,P[1].matches?P[0]:{})},{});Ja(n),T($),n.destroy?e.destroy(n.destroy==="completely"):f?(u(!0),e.mount()):L!==n.direction&&e.refresh()}function b(f){matchMedia(Ya).matches&&(f?zn(n,s):Ja(n,ao(s)))}function T(f,L,$){zn(n,f),L&&zn(Object.getPrototypeOf(n),f),($||!i.is(Ci))&&e.emit(an,n)}return{setup:c,destroy:u,reduce:b,set:T}}var mr="Arrow",gr=mr+"Left",hr=mr+"Right",Al=mr+"Up",Fl=mr+"Down",ts="rtl",fr="ttb",Pr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Al,hr],ArrowRight:[Fl,gr]};function wd(e,t,n){function i(s,l,d){d=d||n.direction;var c=d===ts&&!l?1:d===fr?0:-1;return Pr[s]&&Pr[s][c]||s.replace(/width|left|right/i,function(u,m){var x=Pr[u.toLowerCase()][c]||u;return m>0?x.charAt(0).toUpperCase()+x.slice(1):x})}function o(s){return s*(n.direction===ts?1:-1)}return{resolve:i,orient:o}}var Pn="role",Li="tabindex",Sd="disabled",wn="aria-",$o=wn+"controls",Wl=wn+"current",ns=wn+"selected",fn=wn+"label",Ma=wn+"labelledby",_l=wn+"hidden",Pa=wn+"orientation",uo=wn+"roledescription",is=wn+"live",os=wn+"busy",rs=wn+"atomic",Aa=[Pn,Li,Sd,$o,Wl,fn,Ma,_l,Pa,uo],In=So+"__",Zn="is-",Ar=So,as=In+"track",$d=In+"list",yr=In+"slide",Nl=yr+"--clone",Cd=yr+"__container",Fa=In+"arrows",vr=In+"arrow",Hl=vr+"--prev",jl=vr+"--next",xr=In+"pagination",Ol=xr+"__page",Td=In+"progress",Ld=Td+"__bar",Id=In+"toggle",Rd=In+"spinner",Ed=In+"sr",kd=Zn+"initialized",pi=Zn+"active",zl=Zn+"prev",Bl=Zn+"next",ca=Zn+"visible",da=Zn+"loading",Dl=Zn+"focus-in",Vl=Zn+"overflow",Md=[pi,ca,zl,Bl,da,Dl,Vl],Pd={slide:yr,clone:Nl,arrows:Fa,arrow:vr,prev:Hl,next:jl,pagination:xr,page:Ol,spinner:Rd};function Ad(e,t){if(ul(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ro(n,t);)n=n.parentElement;return n}var Fd=5,ss=200,Gl="touchstart mousedown",Fr="touchmove mousemove",Wr="touchend touchcancel mouseup click";function Wd(e,t,n){var i=qt(e),o=i.on,s=i.bind,l=e.root,d=n.i18n,c={},u=[],m=[],x=[],b,T,f;function L(){C(),X(),P()}function $(){o(Zt,R),o(Zt,L),o(an,P),s(document,Gl+" keydown",function(I){f=I.type==="keydown"},{capture:!0}),s(l,"focusin",function(){kn(l,Dl,!!f)})}function R(I){var w=Aa.concat("style");Wn(u),Mn(l,m),Mn(b,x),Ln([b,T],w),Ln(l,I?w:["style",uo])}function P(){Mn(l,m),Mn(b,x),m=B(Ar),x=B(as),Tn(l,m),Tn(b,x),ct(l,fn,n.label),ct(l,Ma,n.labelledby)}function C(){b=E("."+as),T=wo(b,"."+$d),Qi(b&&T,"A track/list element is missing."),Ko(u,ml(T,"."+yr+":not(."+Nl+")")),di({arrows:Fa,pagination:xr,prev:Hl,next:jl,bar:Ld,toggle:Id},function(I,w){c[w]=E("."+I)}),so(c,{root:l,track:b,list:T,slides:u})}function X(){var I=l.id||fd(So),w=n.role;l.id=I,b.id=b.id||I+"-track",T.id=T.id||I+"-list",!bn(l,Pn)&&l.tagName!=="SECTION"&&w&&ct(l,Pn,w),ct(l,uo,d.carousel),ct(T,Pn,"presentation")}function E(I){var w=fl(l,I);return w&&Ad(w,"."+Ar)===l?w:void 0}function B(I){return[I+"--"+n.type,I+"--"+n.direction,n.drag&&I+"--draggable",n.isNavigation&&I+"--nav",I===Ar&&pi]}return so(c,{setup:L,mount:$,destroy:R})}var ki="slide",Di="loop",Co="fade";function _d(e,t,n,i){var o=qt(e),s=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,m=e.options,x=m.isNavigation,b=m.updateOnMove,T=m.i18n,f=m.pagination,L=m.slideFocus,$=c.Direction.resolve,R=bn(i,"style"),P=bn(i,fn),C=n>-1,X=wo(i,"."+Cd),E;function B(){C||(i.id=u.id+"-slide"+Ca(t+1),ct(i,Pn,f?"tabpanel":"group"),ct(i,uo,T.slide),ct(i,fn,P||sa(T.slideLabel,[t+1,e.length]))),I()}function I(){d(i,"click",Ot(l,Ta,H)),d(i,"keydown",Ot(l,Ml,H)),s([Bi,Pl,hi],S),s(Ia,W),b&&s(_n,h)}function w(){E=!0,o.destroy(),Mn(i,Md),Ln(i,Aa),ct(i,"style",R),ct(i,fn,P||"")}function W(){var F=e.splides.map(function(A){var K=A.splide.Components.Slides.getAt(t);return K?K.slide.id:""}).join(" ");ct(i,fn,sa(T.slideX,(C?n:t)+1)),ct(i,$o,F),ct(i,Pn,L?"button":""),L&&Ln(i,uo)}function h(){E||S()}function S(){if(!E){var F=e.index;k(),D(),kn(i,zl,t===F-1),kn(i,Bl,t===F+1)}}function k(){var F=ae();F!==Qa(i,pi)&&(kn(i,pi,F),ct(i,Wl,x&&F||""),l(F?xl:bl,H))}function D(){var F=Y(),A=!F&&(!ae()||C);if(e.state.is([zi,yo])||ct(i,_l,A||""),ct(Sa(i,m.focusableNodes||""),Li,A?-1:""),L&&ct(i,Li,A?-1:0),F!==Qa(i,ca)&&(kn(i,ca,F),l(F?wl:Sl,H)),!F&&document.activeElement===i){var K=c.Slides.getAt(e.index);K&&gl(K.slide)}}function U(F,A,K){xn(K&&X||i,F,A)}function ae(){var F=e.index;return F===t||m.cloneStatus&&F===n}function Y(){if(e.is(Co))return ae();var F=gn(c.Elements.track),A=gn(i),K=$("left",!0),q=$("right",!0);return tr(F[K])<=co(A[K])&&tr(A[q])<=co(F[q])}function G(F,A){var K=ln(F-t);return!C&&(m.rewind||e.is(Di))&&(K=qn(K,e.length-K)),K<=A}var H={index:t,slideIndex:n,slide:i,container:X,isClone:C,mount:B,destroy:w,update:S,style:U,isWithin:G};return H}function Nd(e,t,n){var i=qt(e),o=i.on,s=i.emit,l=i.bind,d=t.Elements,c=d.slides,u=d.list,m=[];function x(){b(),o(Zt,T),o(Zt,b)}function b(){c.forEach(function(S,k){L(S,k,-1)})}function T(){E(function(S){S.destroy()}),Wn(m)}function f(){E(function(S){S.update()})}function L(S,k,D){var U=_d(e,k,D,S);U.mount(),m.push(U),m.sort(function(ae,Y){return ae.index-Y.index})}function $(S){return S?B(function(k){return!k.isClone}):m}function R(S){var k=t.Controller,D=k.toIndex(S),U=k.hasFocus()?1:n.perPage;return B(function(ae){return Uo(ae.index,D,D+U-1)})}function P(S){return B(S)[0]}function C(S,k){vn(S,function(D){if(Gn(D)&&(D=hl(D)),pl(D)){var U=c[k];U?wa(D,U):bo(u,D),Tn(D,n.classes.slide),w(D,Ot(s,Ei))}}),s(Zt)}function X(S){ui(B(S).map(function(k){return k.slide})),s(Zt)}function E(S,k){$(k).forEach(S)}function B(S){return m.filter(ul(S)?S:function(k){return Gn(S)?ro(k.slide,S):ba(xo(S),k.index)})}function I(S,k,D){E(function(U){U.style(S,k,D)})}function w(S,k){var D=Sa(S,"img"),U=D.length;U?D.forEach(function(ae){l(ae,"load error",function(){--U||k()})}):k()}function W(S){return S?c.length:m.length}function h(){return m.length>n.perPage}return{mount:x,destroy:T,update:f,register:L,get:$,getIn:R,getAt:P,add:C,remove:X,forEach:E,filter:B,style:I,getLength:W,isEnough:h}}function Hd(e,t,n){var i=qt(e),o=i.on,s=i.bind,l=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,m=u.root,x=u.track,b=u.list,T=d.getAt,f=d.style,L,$,R;function P(){C(),s(window,"resize load",xd(Ot(l,Ei))),o([an,Zt],C),o(Ei,X)}function C(){L=n.direction===fr,xn(m,"maxWidth",ti(n.width)),xn(x,c("paddingLeft"),E(!1)),xn(x,c("paddingRight"),E(!0)),X(!0)}function X(H){var F=gn(m);(H||$.width!==F.width||$.height!==F.height)&&(xn(x,"height",B()),f(c("marginRight"),ti(n.gap)),f("width",w()),f("height",W(),!0),$=F,l(dr),R!==(R=G())&&(kn(m,Vl,R),l(yd,R)))}function E(H){var F=n.padding,A=c(H?"right":"left");return F&&ti(F[A]||(oo(F)?0:F))||"0px"}function B(){var H="";return L&&(H=I(),Qi(H,"height or heightRatio is missing."),H="calc("+H+" - "+E(!1)+" - "+E(!0)+")"),H}function I(){return ti(n.height||gn(b).width*n.heightRatio)}function w(){return n.autoWidth?null:ti(n.fixedWidth)||(L?"":h())}function W(){return ti(n.fixedHeight)||(L?n.autoHeight?null:h():I())}function h(){var H=ti(n.gap);return"calc((100%"+(H&&" + "+H)+")/"+(n.perPage||1)+(H&&" - "+H)+")"}function S(){return gn(b)[c("width")]}function k(H,F){var A=T(H||0);return A?gn(A.slide)[c("width")]+(F?0:ae()):0}function D(H,F){var A=T(H);if(A){var K=gn(A.slide)[c("right")],q=gn(b)[c("left")];return ln(K-q)+(F?0:ae())}return 0}function U(H){return D(e.length-1)-D(0)+k(0,H)}function ae(){var H=T(0);return H&&parseFloat(xn(H.slide,c("marginRight")))||0}function Y(H){return parseFloat(xn(x,c("padding"+(H?"Right":"Left"))))||0}function G(){return e.is(Co)||U(!0)>S()}return{mount:P,resize:X,listSize:S,slideSize:k,sliderSize:U,totalSize:D,getPadding:Y,isOverflow:G}}var jd=2;function Od(e,t,n){var i=qt(e),o=i.on,s=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function m(){o(Zt,x),o([an,Ei],T),(u=$())&&(f(u),t.Layout.resize(!0))}function x(){b(),m()}function b(){ui(c),Wn(c),i.destroy()}function T(){var R=$();u!==R&&(u<R||!R)&&i.emit(Zt)}function f(R){var P=l.get().slice(),C=P.length;if(C){for(;P.length<R;)Ko(P,P);Ko(P.slice(-R),P.slice(0,R)).forEach(function(X,E){var B=E<R,I=L(X.slide,E);B?wa(I,P[0].slide):bo(s.list,I),Ko(c,I),l.register(I,E-R+(B?0:C),X.index)})}}function L(R,P){var C=R.cloneNode(!0);return Tn(C,n.classes.clone),C.id=e.root.id+"-clone"+Ca(P+1),C}function $(){var R=n.clones;if(!e.is(Di))R=0;else if(vo(R)){var P=n[d("fixedWidth")]&&t.Layout.slideSize(0),C=P&&co(gn(s.track)[d("width")]/P);R=C||n[d("autoWidth")]&&e.length||n.perPage*jd}return R}return{mount:m,destroy:b}}function zd(e,t,n){var i=qt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,m=d.totalSize,x=d.listSize,b=d.sliderSize,T=t.Direction,f=T.resolve,L=T.orient,$=t.Elements,R=$.list,P=$.track,C;function X(){C=t.Transition,o([Yn,dr,an,Zt],E)}function E(){t.Controller.isBusy()||(t.Scroll.cancel(),I(e.index),t.Slides.update())}function B(A,K,q,ee){A!==K&&H(A>q)&&(S(),w(h(U(),A>q),!0)),l(zi),s(_n,K,q,A),C.start(K,function(){l(Ri),s(Bi,K,q,A),ee&&ee()})}function I(A){w(D(A,!0))}function w(A,K){if(!e.is(Co)){var q=K?A:W(A);xn(R,"transform","translate"+f("X")+"("+q+"px)"),A!==q&&s(Pl)}}function W(A){if(e.is(Di)){var K=k(A),q=K>t.Controller.getEnd(),ee=K<0;(ee||q)&&(A=h(A,q))}return A}function h(A,K){var q=A-G(K),ee=b();return A-=L(ee*(co(ln(q)/ee)||1))*(K?1:-1),A}function S(){w(U(),!0),C.cancel()}function k(A){for(var K=t.Slides.get(),q=0,ee=1/0,N=0;N<K.length;N++){var ue=K[N].index,v=ln(D(ue,!0)-A);if(v<=ee)ee=v,q=ue;else break}return q}function D(A,K){var q=L(m(A-1)-Y(A));return K?ae(q):q}function U(){var A=f("left");return gn(R)[A]-gn(P)[A]+L(u(!1))}function ae(A){return n.trimSpace&&e.is(ki)&&(A=wi(A,0,L(b(!0)-x()))),A}function Y(A){var K=n.focus;return K==="center"?(x()-c(A,!0))/2:+K*c(A)||0}function G(A){return D(A?t.Controller.getEnd():0,!!n.trimSpace)}function H(A){var K=L(h(U(),A));return A?K>=0:K<=R[f("scrollWidth")]-gn(P)[f("width")]}function F(A,K){K=vo(K)?U():K;var q=A!==!0&&L(K)<L(G(!1)),ee=A!==!1&&L(K)>L(G(!0));return q||ee}return{mount:X,move:B,jump:I,translate:w,shift:h,cancel:S,toIndex:k,toPosition:D,getPosition:U,getLimit:G,exceededLimit:F,reposition:E}}function Bd(e,t,n){var i=qt(e),o=i.on,s=i.emit,l=t.Move,d=l.getPosition,c=l.getLimit,u=l.toPosition,m=t.Slides,x=m.isEnough,b=m.getLength,T=n.omitEnd,f=e.is(Di),L=e.is(ki),$=Ot(U,!1),R=Ot(U,!0),P=n.start||0,C,X=P,E,B,I;function w(){W(),o([an,Zt,nr],W),o(dr,h)}function W(){E=b(!0),B=n.perMove,I=n.perPage,C=H();var v=wi(P,0,T?C:E-1);v!==P&&(P=v,l.reposition())}function h(){C!==H()&&s(nr)}function S(v,ye,Z){if(!ue()){var ce=D(v),$e=G(ce);$e>-1&&(ye||$e!==P)&&(q($e),l.move(ce,$e,X,Z))}}function k(v,ye,Z,ce){t.Scroll.scroll(v,ye,Z,function(){var $e=G(l.toIndex(d()));q(T?qn($e,C):$e),ce&&ce()})}function D(v){var ye=P;if(Gn(v)){var Z=v.match(/([+\-<>])(\d+)?/)||[],ce=Z[1],$e=Z[2];ce==="+"||ce==="-"?ye=ae(P+ +(""+ce+(+$e||1)),P):ce===">"?ye=$e?F(+$e):$(!0):ce==="<"&&(ye=R(!0))}else ye=f?v:wi(v,0,C);return ye}function U(v,ye){var Z=B||(N()?1:I),ce=ae(P+Z*(v?-1:1),P,!(B||N()));return ce===-1&&L&&!yl(d(),c(!v),1)?v?0:C:ye?ce:G(ce)}function ae(v,ye,Z){if(x()||N()){var ce=Y(v);ce!==v&&(ye=v,v=ce,Z=!1),v<0||v>C?!B&&(Uo(0,v,ye,!0)||Uo(C,ye,v,!0))?v=F(A(v)):f?v=Z?v<0?-(E%I||I):E:v:n.rewind?v=v<0?C:0:v=-1:Z&&v!==ye&&(v=F(A(ye)+(v<ye?-1:1)))}else v=-1;return v}function Y(v){if(L&&n.trimSpace==="move"&&v!==P)for(var ye=d();ye===u(v,!0)&&Uo(v,0,e.length-1,!n.rewind);)v<P?--v:++v;return v}function G(v){return f?(v+E)%E||0:v}function H(){for(var v=E-(N()||f&&B?1:I);T&&v-- >0;)if(u(E-1,!0)!==u(v,!0)){v++;break}return wi(v,0,E-1)}function F(v){return wi(N()?v:I*v,0,C)}function A(v){return N()?qn(v,C):tr((v>=C?E-1:v)/I)}function K(v){var ye=l.toIndex(v);return L?wi(ye,0,C):ye}function q(v){v!==P&&(X=P,P=v)}function ee(v){return v?X:P}function N(){return!vo(n.focus)||n.isNavigation}function ue(){return e.state.is([zi,yo])&&!!n.waitForTransition}return{mount:w,go:S,scroll:k,getNext:$,getPrev:R,getAdjacent:U,getEnd:H,setIndex:q,getIndex:ee,toIndex:F,toPage:A,toDest:K,hasFocus:N,isBusy:ue}}var Dd="http://www.w3.org/2000/svg",Vd="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",ko=40;function Gd(e,t,n){var i=qt(e),o=i.on,s=i.bind,l=i.emit,d=n.classes,c=n.i18n,u=t.Elements,m=t.Controller,x=u.arrows,b=u.track,T=x,f=u.prev,L=u.next,$,R,P={};function C(){E(),o(an,X)}function X(){B(),C()}function E(){var k=n.arrows;k&&!(f&&L)&&W(),f&&L&&(so(P,{prev:f,next:L}),lo(T,k?"":"none"),Tn(T,R=Fa+"--"+n.direction),k&&(I(),S(),ct([f,L],$o,b.id),l(Ll,f,L)))}function B(){i.destroy(),Mn(T,R),$?(ui(x?[f,L]:T),f=L=null):Ln([f,L],Aa)}function I(){o([Yn,Bi,Zt,hi,nr],S),s(L,"click",Ot(w,">")),s(f,"click",Ot(w,"<"))}function w(k){m.go(k,!0)}function W(){T=x||Ti("div",d.arrows),f=h(!0),L=h(!1),$=!0,bo(T,[f,L]),!x&&wa(T,b)}function h(k){var D='<button class="'+d.arrow+" "+(k?d.prev:d.next)+'" type="button"><svg xmlns="'+Dd+'" viewBox="0 0 '+ko+" "+ko+'" width="'+ko+'" height="'+ko+'" focusable="false"><path d="'+(n.arrowPath||Vd)+'" />';return hl(D)}function S(){if(f&&L){var k=e.index,D=m.getPrev(),U=m.getNext(),ae=D>-1&&k<D?c.last:c.prev,Y=U>-1&&k>U?c.first:c.next;f.disabled=D<0,L.disabled=U<0,ct(f,fn,ae),ct(L,fn,Y),l(Il,f,L,D,U)}}return{arrows:P,mount:C,destroy:B,update:S}}var qd=$a+"-interval";function Kd(e,t,n){var i=qt(e),o=i.on,s=i.bind,l=i.emit,d=pr(n.interval,e.go.bind(e,">"),I),c=d.isPaused,u=t.Elements,m=t.Elements,x=m.root,b=m.toggle,T=n.autoplay,f,L,$=T==="pause";function R(){T&&(P(),b&&ct(b,$o,u.track.id),$||C(),B())}function P(){n.pauseOnHover&&s(x,"mouseenter mouseleave",function(W){f=W.type==="mouseenter",E()}),n.pauseOnFocus&&s(x,"focusin focusout",function(W){L=W.type==="focusin",E()}),b&&s(b,"click",function(){$?C():X(!0)}),o([_n,ur,Zt],d.rewind),o(_n,w)}function C(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),L=f=$=!1,B(),l(Ra))}function X(W){W===void 0&&(W=!0),$=!!W,B(),c()||(d.pause(),l(Ea))}function E(){$||(f||L?X(!1):C())}function B(){b&&(kn(b,pi,!$),ct(b,fn,n.i18n[$?"play":"pause"]))}function I(W){var h=u.bar;h&&xn(h,"width",W*100+"%"),l(kl,W)}function w(W){var h=t.Slides.getAt(W);d.set(h&&+bn(h.slide,qd)||n.interval)}return{mount:R,destroy:d.cancel,play:C,pause:X,isPaused:c}}function Ud(e,t,n){var i=qt(e),o=i.on;function s(){n.cover&&(o(ka,Ot(d,!0)),o([Yn,an,Zt],Ot(l,!0)))}function l(c){t.Slides.forEach(function(u){var m=wo(u.container||u.slide,"img");m&&m.src&&d(c,m,u)})}function d(c,u,m){m.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),lo(u,c?"none":"")}return{mount:s,destroy:Ot(l,!1)}}var Xd=10,Yd=600,Zd=.6,Jd=1.5,Qd=800;function eu(e,t,n){var i=qt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,m=d.exceededLimit,x=d.translate,b=e.is(ki),T,f,L=1;function $(){o(_n,X),o([an,Zt],E)}function R(I,w,W,h,S){var k=c();if(X(),W&&(!b||!m())){var D=t.Layout.sliderSize(),U=aa(I)*D*tr(ln(I)/D)||0;I=d.toPosition(t.Controller.toDest(I%D))+U}var ae=yl(k,I,1);L=1,w=ae?0:w||er(ln(I-k)/Jd,Qd),f=h,T=pr(w,P,Ot(C,k,I,S),1),l(yo),s(ur),T.start()}function P(){l(Ri),f&&f(),s(hi)}function C(I,w,W,h){var S=c(),k=I+(w-I)*B(h),D=(k-S)*L;x(S+D),b&&!W&&m()&&(L*=Zd,ln(D)<Xd&&R(u(m(!0)),Yd,!1,f,!0))}function X(){T&&T.cancel()}function E(){T&&!T.isPaused()&&(X(),P())}function B(I){var w=n.easingFunc;return w?w(I):1-Math.pow(1-I,4)}return{mount:$,destroy:X,scroll:R,cancel:E}}var Si={passive:!1,capture:!0};function tu(e,t,n){var i=qt(e),o=i.on,s=i.emit,l=i.bind,d=i.unbind,c=e.state,u=t.Move,m=t.Scroll,x=t.Controller,b=t.Elements.track,T=t.Media.reduce,f=t.Direction,L=f.resolve,$=f.orient,R=u.getPosition,P=u.exceededLimit,C,X,E,B,I,w=!1,W,h,S;function k(){l(b,Fr,oa,Si),l(b,Wr,oa,Si),l(b,Gl,U,Si),l(b,"click",G,{capture:!0}),l(b,"dragstart",En),o([Yn,an],D)}function D(){var J=n.drag;ve(!J),B=J==="free"}function U(J){if(W=!1,!h){var pe=$e(J);ce(J.target)&&(pe||!J.button)&&(x.isBusy()?En(J,!0):(S=pe?b:window,I=c.is([zi,yo]),E=null,l(S,Fr,ae,Si),l(S,Wr,Y,Si),u.cancel(),m.cancel(),H(J)))}}function ae(J){if(c.is(qo)||(c.set(qo),s($l)),J.cancelable)if(I){u.translate(C+Z(N(J)));var pe=ue(J)>ss,he=w!==(w=P());(pe||he)&&H(J),W=!0,s(Cl),En(J)}else K(J)&&(I=A(J),En(J))}function Y(J){c.is(qo)&&(c.set(Ri),s(Tl)),I&&(F(J),En(J)),d(S,Fr,ae),d(S,Wr,Y),I=!1}function G(J){!h&&W&&En(J,!0)}function H(J){E=X,X=J,C=R()}function F(J){var pe=q(J),he=ee(pe),Ae=n.rewind&&n.rewindByDrag;T(!1),B?x.scroll(he,0,n.snap):e.is(Co)?x.go($(aa(pe))<0?Ae?"<":"-":Ae?">":"+"):e.is(ki)&&w&&Ae?x.go(P(!0)?">":"<"):x.go(x.toDest(he),!0),T(!0)}function A(J){var pe=n.dragMinThreshold,he=oo(pe),Ae=he&&pe.mouse||0,be=(he?pe.touch:+pe)||10;return ln(N(J))>($e(J)?be:Ae)}function K(J){return ln(N(J))>ln(N(J,!0))}function q(J){if(e.is(Di)||!w){var pe=ue(J);if(pe&&pe<ss)return N(J)/pe}return 0}function ee(J){return R()+aa(J)*qn(ln(J)*(n.flickPower||600),B?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function N(J,pe){return ye(J,pe)-ye(v(J),pe)}function ue(J){return ra(J)-ra(v(J))}function v(J){return X===J&&E||X}function ye(J,pe){return($e(J)?J.changedTouches[0]:J)["page"+L(pe?"Y":"X")]}function Z(J){return J/(w&&e.is(ki)?Fd:1)}function ce(J){var pe=n.noDrag;return!ro(J,"."+Ol+", ."+vr)&&(!pe||!ro(J,pe))}function $e(J){return typeof TouchEvent<"u"&&J instanceof TouchEvent}function ne(){return I}function ve(J){h=J}return{mount:k,disable:ve,isDragging:ne}}var nu={Spacebar:" ",Right:hr,Left:gr,Up:Al,Down:Fl};function Wa(e){return e=Gn(e)?e:e.key,nu[e]||e}var ls="keydown";function iu(e,t,n){var i=qt(e),o=i.on,s=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,m;function x(){b(),o(an,T),o(an,b),o(_n,L)}function b(){var R=n.keyboard;R&&(u=R==="global"?window:d,s(u,ls,$))}function T(){l(u,ls)}function f(R){m=R}function L(){var R=m;m=!0,dl(function(){m=R})}function $(R){if(!m){var P=Wa(R);P===c(gr)?e.go("<"):P===c(hr)&&e.go(">")}}return{mount:x,destroy:T,disable:f}}var eo=$a+"-lazy",Xo=eo+"-srcset",ou="["+eo+"], ["+Xo+"]";function ru(e,t,n){var i=qt(e),o=i.on,s=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[Bi,hi],m=[];function x(){n.lazyLoad&&(b(),o(Zt,b))}function b(){Wn(m),T(),c?R():(s(u),o(u,f),f())}function T(){t.Slides.forEach(function(P){Sa(P.slide,ou).forEach(function(C){var X=bn(C,eo),E=bn(C,Xo);if(X!==C.src||E!==C.srcset){var B=n.classes.spinner,I=C.parentElement,w=wo(I,"."+B)||Ti("span",B,I);m.push([C,P,w]),C.src||lo(C,"none")}})})}function f(){m=m.filter(function(P){var C=n.perPage*((n.preloadPages||1)+1)-1;return P[1].isWithin(e.index,C)?L(P):!0}),m.length||s(u)}function L(P){var C=P[0];Tn(P[1].slide,da),l(C,"load error",Ot($,P)),ct(C,"src",bn(C,eo)),ct(C,"srcset",bn(C,Xo)),Ln(C,eo),Ln(C,Xo)}function $(P,C){var X=P[0],E=P[1];Mn(E.slide,da),C.type!=="error"&&(ui(P[2]),lo(X,""),d(ka,X,E),d(Ei)),c&&R()}function R(){m.length&&L(m.shift())}return{mount:x,destroy:Ot(Wn,m),check:f}}function au(e,t,n){var i=qt(e),o=i.on,s=i.emit,l=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,m=u.hasFocus,x=u.getIndex,b=u.go,T=t.Direction.resolve,f=c.pagination,L=[],$,R;function P(){C(),o([an,Zt,nr],P);var h=n.pagination;f&&lo(f,h?"":"none"),h&&(o([_n,ur,hi],W),X(),W(),s(Rl,{list:$,items:L},w(e.index)))}function C(){$&&(ui(f?Xn($.children):$),Mn($,R),Wn(L),$=null),i.destroy()}function X(){var h=e.length,S=n.classes,k=n.i18n,D=n.perPage,U=m()?u.getEnd()+1:co(h/D);$=f||Ti("ul",S.pagination,c.track.parentElement),Tn($,R=xr+"--"+I()),ct($,Pn,"tablist"),ct($,fn,k.select),ct($,Pa,I()===fr?"vertical":"");for(var ae=0;ae<U;ae++){var Y=Ti("li",null,$),G=Ti("button",{class:S.page,type:"button"},Y),H=d.getIn(ae).map(function(A){return A.slide.id}),F=!m()&&D>1?k.pageX:k.slideX;l(G,"click",Ot(E,ae)),n.paginationKeyboard&&l(G,"keydown",Ot(B,ae)),ct(Y,Pn,"presentation"),ct(G,Pn,"tab"),ct(G,$o,H.join(" ")),ct(G,fn,sa(F,ae+1)),ct(G,Li,-1),L.push({li:Y,button:G,page:ae})}}function E(h){b(">"+h,!0)}function B(h,S){var k=L.length,D=Wa(S),U=I(),ae=-1;D===T(hr,!1,U)?ae=++h%k:D===T(gr,!1,U)?ae=(--h+k)%k:D==="Home"?ae=0:D==="End"&&(ae=k-1);var Y=L[ae];Y&&(gl(Y.button),b(">"+ae),En(S,!0))}function I(){return n.paginationDirection||n.direction}function w(h){return L[u.toPage(h)]}function W(){var h=w(x(!0)),S=w(x());if(h){var k=h.button;Mn(k,pi),Ln(k,ns),ct(k,Li,-1)}if(S){var D=S.button;Tn(D,pi),ct(D,ns,!0),ct(D,Li,"")}s(El,{list:$,items:L},h,S)}return{items:L,mount:P,destroy:C,getAt:w,update:W}}var su=[" ","Enter"];function lu(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function l(){e.splides.forEach(function(f){f.isParent||(u(e,f.splide),u(f.splide,e))}),i&&m()}function d(){s.forEach(function(f){f.destroy()}),Wn(s)}function c(){d(),l()}function u(f,L){var $=qt(f);$.on(_n,function(R,P,C){L.go(L.is(Di)?C:R)}),s.push($)}function m(){var f=qt(e),L=f.on;L(Ta,b),L(Ml,T),L([Yn,an],x),s.push(f),f.emit(Ia,e.splides)}function x(){ct(t.Elements.list,Pa,n.direction===fr?"vertical":"")}function b(f){e.go(f.index)}function T(f,L){ba(su,Wa(L))&&(b(f),En(L))}return{setup:Ot(t.Media.set,{slideFocus:vo(o)?i:o},!0),mount:l,destroy:d,remount:c}}function cu(e,t,n){var i=qt(e),o=i.bind,s=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,Si)}function d(u){if(u.cancelable){var m=u.deltaY,x=m<0,b=ra(u),T=n.wheelMinThreshold||0,f=n.wheelSleep||0;ln(m)>T&&b-s>f&&(e.go(x?"<":">"),s=b),c(x)&&En(u)}}function c(u){return!n.releaseWheel||e.state.is(zi)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var du=90;function uu(e,t,n){var i=qt(e),o=i.on,s=t.Elements.track,l=n.live&&!n.isNavigation,d=Ti("span",Ed),c=pr(du,Ot(m,!1));function u(){l&&(b(!t.Autoplay.isPaused()),ct(s,rs,!0),d.textContent="…",o(Ra,Ot(b,!0)),o(Ea,Ot(b,!1)),o([Bi,hi],Ot(m,!0)))}function m(T){ct(s,os,T),T?(bo(s,d),c.start()):(ui(d),c.cancel())}function x(){Ln(s,[is,rs,os]),ui(d)}function b(T){l&&ct(s,is,T?"off":"polite")}return{mount:u,disable:b,destroy:x}}var pu=Object.freeze({__proto__:null,Media:bd,Direction:wd,Elements:Wd,Slides:Nd,Layout:Hd,Clones:Od,Move:zd,Controller:Bd,Arrows:Gd,Autoplay:Kd,Cover:Ud,Scroll:eu,Drag:tu,Keyboard:iu,LazyLoad:ru,Pagination:au,Sync:lu,Wheel:cu,Live:uu}),mu={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"},gu={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:Pd,i18n:mu,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function hu(e,t,n){var i=t.Slides;function o(){qt(e).on([Yn,Zt],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function l(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),dl(c)}return{mount:o,start:l,cancel:oa}}function fu(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,l=t.Elements.list,d=Ot(xn,l,"transition"),c;function u(){qt(e).bind(l,"transitionend",function(T){T.target===l&&c&&(x(),c())})}function m(T,f){var L=i.toPosition(T,!0),$=i.getPosition(),R=b(T);ln(L-$)>=1&&R>=1?n.useScroll?s.scroll(L,R,!1,f):(d("transform "+R+"ms "+n.easing),i.translate(L,!0),c=f):(i.jump(T),f())}function x(){d(""),s.cancel()}function b(T){var f=n.rewindSpeed;if(e.is(ki)&&f){var L=o.getIndex(!0),$=o.getEnd();if(L===0&&T>=$||L>=$&&T===0)return f}return n.speed}return{mount:u,start:m,cancel:x}}var yu=(function(){function e(n,i){this.event=qt(),this.Components={},this.state=vd(Ci),this.splides=[],this._o={},this._E={};var o=Gn(n)?fl(document,n):n;Qi(o,o+" is invalid."),this.root=o,i=zn({label:bn(o,fn)||"",labelledby:bn(o,Ma)||""},gu,e.defaults,i||{});try{zn(i,JSON.parse(bn(o,$a)))}catch{Qi(!1,"Invalid JSON")}this._o=Object.create(zn({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,l=this.state,d=this.Components;Qi(l.is([Ci,Qo]),"Already mounted!"),l.set(Ci),this._C=d,this._T=o||this._T||(this.is(Co)?hu:fu),this._E=i||this._E;var c=so({},pu,this._E,{Transition:this._T});return di(c,function(u,m){var x=u(s,d,s._o);d[m]=x,x.setup&&x.setup()}),di(d,function(u){u.mount&&u.mount()}),this.emit(Yn),Tn(this.root,kd),l.set(Ri),this.emit(la),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Ri)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(Xn(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(Zt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(Ci)?qt(this).on(la,this.destroy.bind(this,i)):(di(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(La),o.destroy(),i&&Wn(this.splides),s.set(Qo)),this},md(e,[{key:"options",get:function(){return this._o},set:function(i){this._C.Media.set(i,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),_a=yu;_a.defaults={};_a.STATES=hd;var cs=[[Yn,"onMounted"],[la,"onReady"],[_n,"onMove"],[Bi,"onMoved"],[Ta,"onClick"],[xl,"onActive"],[bl,"onInactive"],[wl,"onVisible"],[Sl,"onHidden"],[Zt,"onRefresh"],[an,"onUpdated"],[Ei,"onResize"],[dr,"onResized"],[$l,"onDrag"],[Cl,"onDragging"],[Tl,"onDragged"],[ur,"onScroll"],[hi,"onScrolled"],[La,"onDestroy"],[Ll,"onArrowsMounted"],[Il,"onArrowsUpdated"],[Rl,"onPaginationMounted"],[El,"onPaginationUpdated"],[Ia,"onNavigationMounted"],[Ra,"onAutoplayPlay"],[kl,"onAutoplayPlaying"],[Ea,"onAutoplayPause"],[ka,"onLazyLoadLoaded"]];function Na(...e){return e.filter(Boolean).join(" ")}function ir(e){return e!==null&&typeof e=="object"}function ua(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!ua(n,t[i]));if(ir(e)&&ir(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!ua(e[o],t[o]))}return e===t}function vu(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function xu(e,t){if(e){const n=Object.keys(e);for(let i=0;i<n.length;i++){const o=n[i];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function pa(e,t){const n=e;return xu(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():ir(i)?n[o]=pa(ir(n[o])?n[o]:{},i):n[o]=i}),n}var bu=({children:e,className:t,...n})=>a.createElement("div",{className:Na("splide__track",t),...n},a.createElement("ul",{className:"splide__list"},e)),br=class extends a.Component{constructor(){super(...arguments),this.splideRef=a.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new _a(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=pa({},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&&!ua(this.options,e)&&(this.splide.options=e,this.options=pa({},e));const t=this.getSlides();vu(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){cs.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(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:i,...o}=this.props;return a.createElement(t,{className:Na("splide",e),ref:this.splideRef,...this.omit(o,["options",...cs.map(s=>s[1])])},n?a.createElement(bu,null,i):i)}},wr=({children:e,className:t,...n})=>a.createElement("li",{className:Na("splide__slide",t),...n},e);/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),nt=require("classnames"),y=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),mi=require("react-dom");function wc(e){return e.type==="object"&&e.version===1}const Sc="ControlSlider-module__wrapper___sHEkd",$c="ControlSlider-module__hoverArrow___A-dOH",Cc="ControlSlider-module__sliderItem___QQSkR",Tc="ControlSlider-module__sliderImage___9hRl-",Lc="ControlSlider-module__arrow___05ghY",Ic="ControlSlider-module__arrowVertical___tBfVN",Rc="ControlSlider-module__nextArrow___-30Yc",Ec="ControlSlider-module__arrowInner___aEra3",Mc="ControlSlider-module__arrowIcon___S4ztF",kc="ControlSlider-module__arrowImg___2dwJW",Ac="ControlSlider-module__mirror___brd6U",Pc="ControlSlider-module__pagination___bicLF",Wc="ControlSlider-module__paginationInner___bT-P-",Fc="ControlSlider-module__paginationVertical___zYqKw",_c="ControlSlider-module__paginationItem___nTRbk",Nc="ControlSlider-module__dot___p1Qun",Hc="ControlSlider-module__activeDot___LHFaj",Oc="ControlSlider-module__paginationInsideBottom___R3FWn",jc="ControlSlider-module__paginationInsideTop___V-qb-",zc="ControlSlider-module__paginationOutsideBottom___14w8D",Bc="ControlSlider-module__paginationOutsideTop___SCLqB",Dc="ControlSlider-module__paginationInsideLeft___yOBRZ",Vc="ControlSlider-module__paginationInsideRight___Rtt3o",Gc="ControlSlider-module__paginationOutsideLeft___lahaw",qc="ControlSlider-module__paginationOutsideRight___EtuQa",Kc="ControlSlider-module__imgWrapper___UjEgB",Uc="ControlSlider-module__captionBlock___dJ6-j",Xc="ControlSlider-module__captionTextWrapper___HFlpf",Yc="ControlSlider-module__captionText___uGBVc",Zc="ControlSlider-module__active___WZK4G",Jc="ControlSlider-module__withPointerEvents___t-18M",Qc="ControlSlider-module__topLeftAlignment___zjnGM",ed="ControlSlider-module__topCenterAlignment___gD1xW",td="ControlSlider-module__topRightAlignment___NMapS",nd="ControlSlider-module__middleLeftAlignment___OnUrY",id="ControlSlider-module__middleCenterAlignment___Tdkl0",od="ControlSlider-module__middleRightAlignment___wEbfX",rd="ControlSlider-module__bottomLeftAlignment___cTP2-",ad="ControlSlider-module__bottomCenterAlignment___c54fB",sd="ControlSlider-module__bottomRightAlignment___kEwrz",ld="ControlSlider-module__clickOverlay___DZA28",cd="ControlSlider-module__contain___pLyq7",dd="ControlSlider-module__cover___KdDat",Ue={wrapper:Sc,hoverArrow:$c,sliderItem:Cc,sliderImage:Tc,arrow:Lc,arrowVertical:Ic,nextArrow:Rc,arrowInner:Ec,arrowIcon:Mc,arrowImg:kc,mirror:Ac,pagination:Pc,paginationInner:Wc,paginationVertical:Fc,paginationItem:_c,dot:Nc,activeDot:Hc,paginationInsideBottom:Oc,paginationInsideTop:jc,paginationOutsideBottom:zc,paginationOutsideTop:Bc,paginationInsideLeft:Dc,paginationInsideRight:Vc,paginationOutsideLeft:Gc,paginationOutsideRight:qc,imgWrapper:Kc,captionBlock:Uc,captionTextWrapper:Xc,captionText:Yc,active:Zc,withPointerEvents:Jc,topLeftAlignment:Qc,topCenterAlignment:ed,topRightAlignment:td,middleLeftAlignment:nd,middleCenterAlignment:id,middleRightAlignment:od,bottomLeftAlignment:rd,bottomCenterAlignment:ad,bottomRightAlignment:sd,clickOverlay:ld,contain:cd,cover:dd};function ud(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function pd(e,t,n){return t&&ud(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Xa="(prefers-reduced-motion: reduce)",$i=1,md=2,Ii=3,ji=4,fo=5,Go=6,Jo=7,gd={CREATED:$i,MOUNTED:md,IDLE:Ii,MOVING:ji,SCROLLING:fo,DRAGGING:Go,DESTROYED:Jo};function Wn(e){e.length=0}function Un(e,t,n){return Array.prototype.slice.call(e,t,n)}function Nt(e){return e.bind.apply(e,[null].concat(Un(arguments,1)))}var cl=setTimeout,ia=function(){};function Ya(e){return requestAnimationFrame(e)}function lr(e,t){return typeof t===e}function io(e){return!va(e)&&lr("object",e)}var ya=Array.isArray,dl=Nt(lr,"function"),Vn=Nt(lr,"string"),yo=Nt(lr,"undefined");function va(e){return e===null}function ul(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function vo(e){return ya(e)?e:[e]}function yn(e,t){vo(e).forEach(t)}function xa(e,t){return e.indexOf(t)>-1}function qo(e,t){return e.push.apply(e,vo(t)),e}function En(e,t,n){e&&yn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Cn(e,t){En(e,Vn(t)?t.split(" "):t,!0)}function xo(e,t){yn(t,e.appendChild.bind(e))}function ba(e,t){yn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function oo(e,t){return ul(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function pl(e,t){var n=e?Un(e.children):[];return t?n.filter(function(i){return oo(i,t)}):n}function bo(e,t){return t?pl(e,t)[0]:e.firstElementChild}var ro=Object.keys;function ci(e,t,n){return e&&(n?ro(e).reverse():ro(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function ao(e){return Un(arguments,1).forEach(function(t){ci(t,function(n,i){e[i]=t[i]})}),e}function jn(e){return Un(arguments,1).forEach(function(t){ci(t,function(n,i){ya(n)?e[i]=n.slice():io(n)?e[i]=jn({},io(e[i])?e[i]:{},n):e[i]=n})}),e}function Za(e,t){yn(t||ro(e),function(n){delete e[n]})}function Tn(e,t){yn(e,function(n){yn(t,function(i){n&&n.removeAttribute(i)})})}function ut(e,t,n){io(t)?ci(t,function(i,o){ut(e,o,i)}):yn(e,function(i){va(n)||n===""?Tn(i,t):i.setAttribute(t,String(n))})}function Ci(e,t,n){var i=document.createElement(e);return t&&(Vn(t)?Cn(i,t):ut(i,t)),n&&xo(n,i),i}function vn(e,t,n){if(yo(n))return getComputedStyle(e)[t];va(n)||(e.style[t]=""+n)}function so(e,t){vn(e,"display",t)}function ml(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function xn(e,t){return e.getAttribute(t)}function Ja(e,t){return e&&e.classList.contains(t)}function mn(e){return e.getBoundingClientRect()}function di(e){yn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function gl(e){return bo(new DOMParser().parseFromString(e,"text/html").body)}function Rn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function hl(e,t){return e&&e.querySelector(t)}function wa(e,t){return t?Un(e.querySelectorAll(t)):[]}function Mn(e,t){En(e,t,!1)}function oa(e){return e.timeStamp}function ei(e){return Vn(e)?e:e?e+"px":""}var wo="splide",Sa="data-"+wo;function Ji(e,t){if(!e)throw new Error("["+wo+"] "+(t||""))}var Gn=Math.min,Qo=Math.max,er=Math.floor,lo=Math.ceil,sn=Math.abs;function fl(e,t,n){return sn(e-t)<n}function Ko(e,t,n,i){var o=Gn(t,n),s=Qo(t,n);return i?o<e&&e<s:o<=e&&e<=s}function bi(e,t,n){var i=Gn(t,n),o=Qo(t,n);return Gn(Qo(i,e),o)}function ra(e){return+(e>0)-+(e<0)}function aa(e,t){return yn(t,function(n){e=e.replace("%s",""+n)}),e}function $a(e){return e<10?"0"+e:""+e}var Qa={};function hd(e){return""+e+$a(Qa[e]=(Qa[e]||0)+1)}function yl(){var e=[];function t(l,d,c,u){o(l,d,function(m,x,b){var T="addEventListener"in m,f=T?m.removeEventListener.bind(m,x,c,u):m.removeListener.bind(m,c);T?m.addEventListener(x,c,u):m.addListener(c),e.push([m,x,b,c,f])})}function n(l,d,c){o(l,d,function(u,m,x){e=e.filter(function(b){return b[0]===u&&b[1]===m&&b[2]===x&&(!c||b[3]===c)?(b[4](),!1):!0})})}function i(l,d,c){var u,m=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:m,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,m,!1,c)),l.dispatchEvent(u),u}function o(l,d,c){yn(l,function(u){u&&yn(d,function(m){m.split(" ").forEach(function(x){var b=x.split(".");c(u,b[0],b[1])})})})}function s(){e.forEach(function(l){l[4]()}),Wn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Xn="mounted",sa="ready",Fn="move",zi="moved",Ca="click",vl="active",xl="inactive",bl="visible",wl="hidden",Zt="refresh",rn="updated",Ri="resize",cr="resized",Sl="drag",$l="dragging",Cl="dragged",dr="scroll",gi="scrolled",fd="overflow",Ta="destroy",Tl="arrows:mounted",Ll="arrows:updated",Il="pagination:mounted",Rl="pagination:updated",La="navigation:mounted",Ia="autoplay:play",El="autoplay:playing",Ra="autoplay:pause",Ea="lazyload:loaded",Ml="sk",kl="sh",tr="ei";function Gt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=yl();function i(s,l){n.bind(t,vo(s).join(" "),function(d){l.apply(l,ya(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Un(arguments,1))}return e&&e.event.on(Ta,n.destroy),ao(n,{bus:t,on:i,off:Nt(n.unbind,t),emit:o})}function ur(e,t,n,i){var o=Date.now,s,l=0,d,c=!0,u=0;function m(){if(!c){if(l=e?Gn((o()-s)/e,1):1,n&&n(l),l>=1&&(t(),s=o(),i&&++u>=i))return b();d=Ya(m)}}function x(R){R||f(),s=o()-(R?l*e:0),c=!1,d=Ya(m)}function b(){c=!0}function T(){s=o(),l=0,n&&n(l)}function f(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function L(R){e=R}function $(){return c}return{start:x,rewind:T,pause:b,cancel:f,set:L,isPaused:$}}function yd(e){var t=e;function n(o){t=o}function i(o){return xa(vo(o),t)}return{set:n,is:i}}function vd(e,t){var n=ur(0,e,null,1);return function(){n.isPaused()&&n.start()}}function xd(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},l=yl(),d=[];function c(){var f=n.mediaQuery==="min";ro(o).sort(function(L,$){return f?+L-+$:+$-+L}).forEach(function(L){m(o[L],"("+(f?"min":"max")+"-width:"+L+"px)")}),m(s,Xa),x()}function u(f){f&&l.destroy()}function m(f,L){var $=matchMedia(L);l.bind($,"change",x),d.push([f,$])}function x(){var f=i.is(Jo),L=n.direction,$=d.reduce(function(R,A){return jn(R,A[1].matches?A[0]:{})},{});Za(n),T($),n.destroy?e.destroy(n.destroy==="completely"):f?(u(!0),e.mount()):L!==n.direction&&e.refresh()}function b(f){matchMedia(Xa).matches&&(f?jn(n,s):Za(n,ro(s)))}function T(f,L,$){jn(n,f),L&&jn(Object.getPrototypeOf(n),f),($||!i.is($i))&&e.emit(rn,n)}return{setup:c,destroy:u,reduce:b,set:T}}var pr="Arrow",mr=pr+"Left",gr=pr+"Right",Al=pr+"Up",Pl=pr+"Down",es="rtl",hr="ttb",kr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Al,gr],ArrowRight:[Pl,mr]};function bd(e,t,n){function i(s,l,d){d=d||n.direction;var c=d===es&&!l?1:d===hr?0:-1;return kr[s]&&kr[s][c]||s.replace(/width|left|right/i,function(u,m){var x=kr[u.toLowerCase()][c]||u;return m>0?x.charAt(0).toUpperCase()+x.slice(1):x})}function o(s){return s*(n.direction===es?1:-1)}return{resolve:i,orient:o}}var kn="role",Ti="tabindex",wd="disabled",bn="aria-",So=bn+"controls",Wl=bn+"current",ts=bn+"selected",hn=bn+"label",Ma=bn+"labelledby",Fl=bn+"hidden",ka=bn+"orientation",co=bn+"roledescription",ns=bn+"live",is=bn+"busy",os=bn+"atomic",Aa=[kn,Ti,wd,So,Wl,hn,Ma,Fl,ka,co],Ln=wo+"__",Yn="is-",Ar=wo,rs=Ln+"track",Sd=Ln+"list",fr=Ln+"slide",_l=fr+"--clone",$d=fr+"__container",Pa=Ln+"arrows",yr=Ln+"arrow",Nl=yr+"--prev",Hl=yr+"--next",vr=Ln+"pagination",Ol=vr+"__page",Cd=Ln+"progress",Td=Cd+"__bar",Ld=Ln+"toggle",Id=Ln+"spinner",Rd=Ln+"sr",Ed=Yn+"initialized",ui=Yn+"active",jl=Yn+"prev",zl=Yn+"next",la=Yn+"visible",ca=Yn+"loading",Bl=Yn+"focus-in",Dl=Yn+"overflow",Md=[ui,la,jl,zl,ca,Bl,Dl],kd={slide:fr,clone:_l,arrows:Pa,arrow:yr,prev:Nl,next:Hl,pagination:vr,page:Ol,spinner:Id};function Ad(e,t){if(dl(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!oo(n,t);)n=n.parentElement;return n}var Pd=5,as=200,Vl="touchstart mousedown",Pr="touchmove mousemove",Wr="touchend touchcancel mouseup click";function Wd(e,t,n){var i=Gt(e),o=i.on,s=i.bind,l=e.root,d=n.i18n,c={},u=[],m=[],x=[],b,T,f;function L(){C(),U(),A()}function $(){o(Zt,R),o(Zt,L),o(rn,A),s(document,Vl+" keydown",function(I){f=I.type==="keydown"},{capture:!0}),s(l,"focusin",function(){En(l,Bl,!!f)})}function R(I){var w=Aa.concat("style");Wn(u),Mn(l,m),Mn(b,x),Tn([b,T],w),Tn(l,I?w:["style",co])}function A(){Mn(l,m),Mn(b,x),m=O(Ar),x=O(rs),Cn(l,m),Cn(b,x),ut(l,hn,n.label),ut(l,Ma,n.labelledby)}function C(){b=E("."+rs),T=bo(b,"."+Sd),Ji(b&&T,"A track/list element is missing."),qo(u,pl(T,"."+fr+":not(."+_l+")")),ci({arrows:Pa,pagination:vr,prev:Nl,next:Hl,bar:Td,toggle:Ld},function(I,w){c[w]=E("."+I)}),ao(c,{root:l,track:b,list:T,slides:u})}function U(){var I=l.id||hd(wo),w=n.role;l.id=I,b.id=b.id||I+"-track",T.id=T.id||I+"-list",!xn(l,kn)&&l.tagName!=="SECTION"&&w&&ut(l,kn,w),ut(l,co,d.carousel),ut(T,kn,"presentation")}function E(I){var w=hl(l,I);return w&&Ad(w,"."+Ar)===l?w:void 0}function O(I){return[I+"--"+n.type,I+"--"+n.direction,n.drag&&I+"--draggable",n.isNavigation&&I+"--nav",I===Ar&&ui]}return ao(c,{setup:L,mount:$,destroy:R})}var Ei="slide",Bi="loop",$o="fade";function Fd(e,t,n,i){var o=Gt(e),s=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,m=e.options,x=m.isNavigation,b=m.updateOnMove,T=m.i18n,f=m.pagination,L=m.slideFocus,$=c.Direction.resolve,R=xn(i,"style"),A=xn(i,hn),C=n>-1,U=bo(i,"."+$d),E;function O(){C||(i.id=u.id+"-slide"+$a(t+1),ut(i,kn,f?"tabpanel":"group"),ut(i,co,T.slide),ut(i,hn,A||aa(T.slideLabel,[t+1,e.length]))),I()}function I(){d(i,"click",Nt(l,Ca,N)),d(i,"keydown",Nt(l,Ml,N)),s([zi,kl,gi],S),s(La,F),b&&s(Fn,h)}function w(){E=!0,o.destroy(),Mn(i,Md),Tn(i,Aa),ut(i,"style",R),ut(i,hn,A||"")}function F(){var W=e.splides.map(function(P){var q=P.splide.Components.Slides.getAt(t);return q?q.slide.id:""}).join(" ");ut(i,hn,aa(T.slideX,(C?n:t)+1)),ut(i,So,W),ut(i,kn,L?"button":""),L&&Tn(i,co)}function h(){E||S()}function S(){if(!E){var W=e.index;M(),z(),En(i,jl,t===W-1),En(i,zl,t===W+1)}}function M(){var W=se();W!==Ja(i,ui)&&(En(i,ui,W),ut(i,Wl,x&&W||""),l(W?vl:xl,N))}function z(){var W=Y(),P=!W&&(!se()||C);if(e.state.is([ji,fo])||ut(i,Fl,P||""),ut(wa(i,m.focusableNodes||""),Ti,P?-1:""),L&&ut(i,Ti,P?-1:0),W!==Ja(i,la)&&(En(i,la,W),l(W?bl:wl,N)),!W&&document.activeElement===i){var q=c.Slides.getAt(e.index);q&&ml(q.slide)}}function K(W,P,q){vn(q&&U||i,W,P)}function se(){var W=e.index;return W===t||m.cloneStatus&&W===n}function Y(){if(e.is($o))return se();var W=mn(c.Elements.track),P=mn(i),q=$("left",!0),G=$("right",!0);return er(W[q])<=lo(P[q])&&er(P[G])<=lo(W[G])}function D(W,P){var q=sn(W-t);return!C&&(m.rewind||e.is(Bi))&&(q=Gn(q,e.length-q)),q<=P}var N={index:t,slideIndex:n,slide:i,container:U,isClone:C,mount:O,destroy:w,update:S,style:K,isWithin:D};return N}function _d(e,t,n){var i=Gt(e),o=i.on,s=i.emit,l=i.bind,d=t.Elements,c=d.slides,u=d.list,m=[];function x(){b(),o(Zt,T),o(Zt,b)}function b(){c.forEach(function(S,M){L(S,M,-1)})}function T(){E(function(S){S.destroy()}),Wn(m)}function f(){E(function(S){S.update()})}function L(S,M,z){var K=Fd(e,M,z,S);K.mount(),m.push(K),m.sort(function(se,Y){return se.index-Y.index})}function $(S){return S?O(function(M){return!M.isClone}):m}function R(S){var M=t.Controller,z=M.toIndex(S),K=M.hasFocus()?1:n.perPage;return O(function(se){return Ko(se.index,z,z+K-1)})}function A(S){return O(S)[0]}function C(S,M){yn(S,function(z){if(Vn(z)&&(z=gl(z)),ul(z)){var K=c[M];K?ba(z,K):xo(u,z),Cn(z,n.classes.slide),w(z,Nt(s,Ri))}}),s(Zt)}function U(S){di(O(S).map(function(M){return M.slide})),s(Zt)}function E(S,M){$(M).forEach(S)}function O(S){return m.filter(dl(S)?S:function(M){return Vn(S)?oo(M.slide,S):xa(vo(S),M.index)})}function I(S,M,z){E(function(K){K.style(S,M,z)})}function w(S,M){var z=wa(S,"img"),K=z.length;K?z.forEach(function(se){l(se,"load error",function(){--K||M()})}):M()}function F(S){return S?c.length:m.length}function h(){return m.length>n.perPage}return{mount:x,destroy:T,update:f,register:L,get:$,getIn:R,getAt:A,add:C,remove:U,forEach:E,filter:O,style:I,getLength:F,isEnough:h}}function Nd(e,t,n){var i=Gt(e),o=i.on,s=i.bind,l=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,m=u.root,x=u.track,b=u.list,T=d.getAt,f=d.style,L,$,R;function A(){C(),s(window,"resize load",vd(Nt(l,Ri))),o([rn,Zt],C),o(Ri,U)}function C(){L=n.direction===hr,vn(m,"maxWidth",ei(n.width)),vn(x,c("paddingLeft"),E(!1)),vn(x,c("paddingRight"),E(!0)),U(!0)}function U(N){var W=mn(m);(N||$.width!==W.width||$.height!==W.height)&&(vn(x,"height",O()),f(c("marginRight"),ei(n.gap)),f("width",w()),f("height",F(),!0),$=W,l(cr),R!==(R=D())&&(En(m,Dl,R),l(fd,R)))}function E(N){var W=n.padding,P=c(N?"right":"left");return W&&ei(W[P]||(io(W)?0:W))||"0px"}function O(){var N="";return L&&(N=I(),Ji(N,"height or heightRatio is missing."),N="calc("+N+" - "+E(!1)+" - "+E(!0)+")"),N}function I(){return ei(n.height||mn(b).width*n.heightRatio)}function w(){return n.autoWidth?null:ei(n.fixedWidth)||(L?"":h())}function F(){return ei(n.fixedHeight)||(L?n.autoHeight?null:h():I())}function h(){var N=ei(n.gap);return"calc((100%"+(N&&" + "+N)+")/"+(n.perPage||1)+(N&&" - "+N)+")"}function S(){return mn(b)[c("width")]}function M(N,W){var P=T(N||0);return P?mn(P.slide)[c("width")]+(W?0:se()):0}function z(N,W){var P=T(N);if(P){var q=mn(P.slide)[c("right")],G=mn(b)[c("left")];return sn(q-G)+(W?0:se())}return 0}function K(N){return z(e.length-1)-z(0)+M(0,N)}function se(){var N=T(0);return N&&parseFloat(vn(N.slide,c("marginRight")))||0}function Y(N){return parseFloat(vn(x,c("padding"+(N?"Right":"Left"))))||0}function D(){return e.is($o)||K(!0)>S()}return{mount:A,resize:U,listSize:S,slideSize:M,sliderSize:K,totalSize:z,getPadding:Y,isOverflow:D}}var Hd=2;function Od(e,t,n){var i=Gt(e),o=i.on,s=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function m(){o(Zt,x),o([rn,Ri],T),(u=$())&&(f(u),t.Layout.resize(!0))}function x(){b(),m()}function b(){di(c),Wn(c),i.destroy()}function T(){var R=$();u!==R&&(u<R||!R)&&i.emit(Zt)}function f(R){var A=l.get().slice(),C=A.length;if(C){for(;A.length<R;)qo(A,A);qo(A.slice(-R),A.slice(0,R)).forEach(function(U,E){var O=E<R,I=L(U.slide,E);O?ba(I,A[0].slide):xo(s.list,I),qo(c,I),l.register(I,E-R+(O?0:C),U.index)})}}function L(R,A){var C=R.cloneNode(!0);return Cn(C,n.classes.clone),C.id=e.root.id+"-clone"+$a(A+1),C}function $(){var R=n.clones;if(!e.is(Bi))R=0;else if(yo(R)){var A=n[d("fixedWidth")]&&t.Layout.slideSize(0),C=A&&lo(mn(s.track)[d("width")]/A);R=C||n[d("autoWidth")]&&e.length||n.perPage*Hd}return R}return{mount:m,destroy:b}}function jd(e,t,n){var i=Gt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,m=d.totalSize,x=d.listSize,b=d.sliderSize,T=t.Direction,f=T.resolve,L=T.orient,$=t.Elements,R=$.list,A=$.track,C;function U(){C=t.Transition,o([Xn,cr,rn,Zt],E)}function E(){t.Controller.isBusy()||(t.Scroll.cancel(),I(e.index),t.Slides.update())}function O(P,q,G,Z){P!==q&&N(P>G)&&(S(),w(h(K(),P>G),!0)),l(ji),s(Fn,q,G,P),C.start(q,function(){l(Ii),s(zi,q,G,P),Z&&Z()})}function I(P){w(z(P,!0))}function w(P,q){if(!e.is($o)){var G=q?P:F(P);vn(R,"transform","translate"+f("X")+"("+G+"px)"),P!==G&&s(kl)}}function F(P){if(e.is(Bi)){var q=M(P),G=q>t.Controller.getEnd(),Z=q<0;(Z||G)&&(P=h(P,G))}return P}function h(P,q){var G=P-D(q),Z=b();return P-=L(Z*(lo(sn(G)/Z)||1))*(q?1:-1),P}function S(){w(K(),!0),C.cancel()}function M(P){for(var q=t.Slides.get(),G=0,Z=1/0,_=0;_<q.length;_++){var me=q[_].index,v=sn(z(me,!0)-P);if(v<=Z)Z=v,G=me;else break}return G}function z(P,q){var G=L(m(P-1)-Y(P));return q?se(G):G}function K(){var P=f("left");return mn(R)[P]-mn(A)[P]+L(u(!1))}function se(P){return n.trimSpace&&e.is(Ei)&&(P=bi(P,0,L(b(!0)-x()))),P}function Y(P){var q=n.focus;return q==="center"?(x()-c(P,!0))/2:+q*c(P)||0}function D(P){return z(P?t.Controller.getEnd():0,!!n.trimSpace)}function N(P){var q=L(h(K(),P));return P?q>=0:q<=R[f("scrollWidth")]-mn(A)[f("width")]}function W(P,q){q=yo(q)?K():q;var G=P!==!0&&L(q)<L(D(!1)),Z=P!==!1&&L(q)>L(D(!0));return G||Z}return{mount:U,move:O,jump:I,translate:w,shift:h,cancel:S,toIndex:M,toPosition:z,getPosition:K,getLimit:D,exceededLimit:W,reposition:E}}function zd(e,t,n){var i=Gt(e),o=i.on,s=i.emit,l=t.Move,d=l.getPosition,c=l.getLimit,u=l.toPosition,m=t.Slides,x=m.isEnough,b=m.getLength,T=n.omitEnd,f=e.is(Bi),L=e.is(Ei),$=Nt(K,!1),R=Nt(K,!0),A=n.start||0,C,U=A,E,O,I;function w(){F(),o([rn,Zt,tr],F),o(cr,h)}function F(){E=b(!0),O=n.perMove,I=n.perPage,C=N();var v=bi(A,0,T?C:E-1);v!==A&&(A=v,l.reposition())}function h(){C!==N()&&s(tr)}function S(v,fe,J){if(!me()){var ce=z(v),Ce=D(ce);Ce>-1&&(fe||Ce!==A)&&(G(Ce),l.move(ce,Ce,U,J))}}function M(v,fe,J,ce){t.Scroll.scroll(v,fe,J,function(){var Ce=D(l.toIndex(d()));G(T?Gn(Ce,C):Ce),ce&&ce()})}function z(v){var fe=A;if(Vn(v)){var J=v.match(/([+\-<>])(\d+)?/)||[],ce=J[1],Ce=J[2];ce==="+"||ce==="-"?fe=se(A+ +(""+ce+(+Ce||1)),A):ce===">"?fe=Ce?W(+Ce):$(!0):ce==="<"&&(fe=R(!0))}else fe=f?v:bi(v,0,C);return fe}function K(v,fe){var J=O||(_()?1:I),ce=se(A+J*(v?-1:1),A,!(O||_()));return ce===-1&&L&&!fl(d(),c(!v),1)?v?0:C:fe?ce:D(ce)}function se(v,fe,J){if(x()||_()){var ce=Y(v);ce!==v&&(fe=v,v=ce,J=!1),v<0||v>C?!O&&(Ko(0,v,fe,!0)||Ko(C,fe,v,!0))?v=W(P(v)):f?v=J?v<0?-(E%I||I):E:v:n.rewind?v=v<0?C:0:v=-1:J&&v!==fe&&(v=W(P(fe)+(v<fe?-1:1)))}else v=-1;return v}function Y(v){if(L&&n.trimSpace==="move"&&v!==A)for(var fe=d();fe===u(v,!0)&&Ko(v,0,e.length-1,!n.rewind);)v<A?--v:++v;return v}function D(v){return f?(v+E)%E||0:v}function N(){for(var v=E-(_()||f&&O?1:I);T&&v-- >0;)if(u(E-1,!0)!==u(v,!0)){v++;break}return bi(v,0,E-1)}function W(v){return bi(_()?v:I*v,0,C)}function P(v){return _()?Gn(v,C):er((v>=C?E-1:v)/I)}function q(v){var fe=l.toIndex(v);return L?bi(fe,0,C):fe}function G(v){v!==A&&(U=A,A=v)}function Z(v){return v?U:A}function _(){return!yo(n.focus)||n.isNavigation}function me(){return e.state.is([ji,fo])&&!!n.waitForTransition}return{mount:w,go:S,scroll:M,getNext:$,getPrev:R,getAdjacent:K,getEnd:N,setIndex:G,getIndex:Z,toIndex:W,toPage:P,toDest:q,hasFocus:_,isBusy:me}}var Bd="http://www.w3.org/2000/svg",Dd="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",Eo=40;function Vd(e,t,n){var i=Gt(e),o=i.on,s=i.bind,l=i.emit,d=n.classes,c=n.i18n,u=t.Elements,m=t.Controller,x=u.arrows,b=u.track,T=x,f=u.prev,L=u.next,$,R,A={};function C(){E(),o(rn,U)}function U(){O(),C()}function E(){var M=n.arrows;M&&!(f&&L)&&F(),f&&L&&(ao(A,{prev:f,next:L}),so(T,M?"":"none"),Cn(T,R=Pa+"--"+n.direction),M&&(I(),S(),ut([f,L],So,b.id),l(Tl,f,L)))}function O(){i.destroy(),Mn(T,R),$?(di(x?[f,L]:T),f=L=null):Tn([f,L],Aa)}function I(){o([Xn,zi,Zt,gi,tr],S),s(L,"click",Nt(w,">")),s(f,"click",Nt(w,"<"))}function w(M){m.go(M,!0)}function F(){T=x||Ci("div",d.arrows),f=h(!0),L=h(!1),$=!0,xo(T,[f,L]),!x&&ba(T,b)}function h(M){var z='<button class="'+d.arrow+" "+(M?d.prev:d.next)+'" type="button"><svg xmlns="'+Bd+'" viewBox="0 0 '+Eo+" "+Eo+'" width="'+Eo+'" height="'+Eo+'" focusable="false"><path d="'+(n.arrowPath||Dd)+'" />';return gl(z)}function S(){if(f&&L){var M=e.index,z=m.getPrev(),K=m.getNext(),se=z>-1&&M<z?c.last:c.prev,Y=K>-1&&M>K?c.first:c.next;f.disabled=z<0,L.disabled=K<0,ut(f,hn,se),ut(L,hn,Y),l(Ll,f,L,z,K)}}return{arrows:A,mount:C,destroy:O,update:S}}var Gd=Sa+"-interval";function qd(e,t,n){var i=Gt(e),o=i.on,s=i.bind,l=i.emit,d=ur(n.interval,e.go.bind(e,">"),I),c=d.isPaused,u=t.Elements,m=t.Elements,x=m.root,b=m.toggle,T=n.autoplay,f,L,$=T==="pause";function R(){T&&(A(),b&&ut(b,So,u.track.id),$||C(),O())}function A(){n.pauseOnHover&&s(x,"mouseenter mouseleave",function(F){f=F.type==="mouseenter",E()}),n.pauseOnFocus&&s(x,"focusin focusout",function(F){L=F.type==="focusin",E()}),b&&s(b,"click",function(){$?C():U(!0)}),o([Fn,dr,Zt],d.rewind),o(Fn,w)}function C(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),L=f=$=!1,O(),l(Ia))}function U(F){F===void 0&&(F=!0),$=!!F,O(),c()||(d.pause(),l(Ra))}function E(){$||(f||L?U(!1):C())}function O(){b&&(En(b,ui,!$),ut(b,hn,n.i18n[$?"play":"pause"]))}function I(F){var h=u.bar;h&&vn(h,"width",F*100+"%"),l(El,F)}function w(F){var h=t.Slides.getAt(F);d.set(h&&+xn(h.slide,Gd)||n.interval)}return{mount:R,destroy:d.cancel,play:C,pause:U,isPaused:c}}function Kd(e,t,n){var i=Gt(e),o=i.on;function s(){n.cover&&(o(Ea,Nt(d,!0)),o([Xn,rn,Zt],Nt(l,!0)))}function l(c){t.Slides.forEach(function(u){var m=bo(u.container||u.slide,"img");m&&m.src&&d(c,m,u)})}function d(c,u,m){m.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),so(u,c?"none":"")}return{mount:s,destroy:Nt(l,!1)}}var Ud=10,Xd=600,Yd=.6,Zd=1.5,Jd=800;function Qd(e,t,n){var i=Gt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,m=d.exceededLimit,x=d.translate,b=e.is(Ei),T,f,L=1;function $(){o(Fn,U),o([rn,Zt],E)}function R(I,w,F,h,S){var M=c();if(U(),F&&(!b||!m())){var z=t.Layout.sliderSize(),K=ra(I)*z*er(sn(I)/z)||0;I=d.toPosition(t.Controller.toDest(I%z))+K}var se=fl(M,I,1);L=1,w=se?0:w||Qo(sn(I-M)/Zd,Jd),f=h,T=ur(w,A,Nt(C,M,I,S),1),l(fo),s(dr),T.start()}function A(){l(Ii),f&&f(),s(gi)}function C(I,w,F,h){var S=c(),M=I+(w-I)*O(h),z=(M-S)*L;x(S+z),b&&!F&&m()&&(L*=Yd,sn(z)<Ud&&R(u(m(!0)),Xd,!1,f,!0))}function U(){T&&T.cancel()}function E(){T&&!T.isPaused()&&(U(),A())}function O(I){var w=n.easingFunc;return w?w(I):1-Math.pow(1-I,4)}return{mount:$,destroy:U,scroll:R,cancel:E}}var wi={passive:!1,capture:!0};function eu(e,t,n){var i=Gt(e),o=i.on,s=i.emit,l=i.bind,d=i.unbind,c=e.state,u=t.Move,m=t.Scroll,x=t.Controller,b=t.Elements.track,T=t.Media.reduce,f=t.Direction,L=f.resolve,$=f.orient,R=u.getPosition,A=u.exceededLimit,C,U,E,O,I,w=!1,F,h,S;function M(){l(b,Pr,ia,wi),l(b,Wr,ia,wi),l(b,Vl,K,wi),l(b,"click",D,{capture:!0}),l(b,"dragstart",Rn),o([Xn,rn],z)}function z(){var Q=n.drag;xe(!Q),O=Q==="free"}function K(Q){if(F=!1,!h){var ye=Ce(Q);ce(Q.target)&&(ye||!Q.button)&&(x.isBusy()?Rn(Q,!0):(S=ye?b:window,I=c.is([ji,fo]),E=null,l(S,Pr,se,wi),l(S,Wr,Y,wi),u.cancel(),m.cancel(),N(Q)))}}function se(Q){if(c.is(Go)||(c.set(Go),s(Sl)),Q.cancelable)if(I){u.translate(C+J(_(Q)));var ye=me(Q)>as,ve=w!==(w=A());(ye||ve)&&N(Q),F=!0,s($l),Rn(Q)}else q(Q)&&(I=P(Q),Rn(Q))}function Y(Q){c.is(Go)&&(c.set(Ii),s(Cl)),I&&(W(Q),Rn(Q)),d(S,Pr,se),d(S,Wr,Y),I=!1}function D(Q){!h&&F&&Rn(Q,!0)}function N(Q){E=U,U=Q,C=R()}function W(Q){var ye=G(Q),ve=Z(ye),Me=n.rewind&&n.rewindByDrag;T(!1),O?x.scroll(ve,0,n.snap):e.is($o)?x.go($(ra(ye))<0?Me?"<":"-":Me?">":"+"):e.is(Ei)&&w&&Me?x.go(A(!0)?">":"<"):x.go(x.toDest(ve),!0),T(!0)}function P(Q){var ye=n.dragMinThreshold,ve=io(ye),Me=ve&&ye.mouse||0,we=(ve?ye.touch:+ye)||10;return sn(_(Q))>(Ce(Q)?we:Me)}function q(Q){return sn(_(Q))>sn(_(Q,!0))}function G(Q){if(e.is(Bi)||!w){var ye=me(Q);if(ye&&ye<as)return _(Q)/ye}return 0}function Z(Q){return R()+ra(Q)*Gn(sn(Q)*(n.flickPower||600),O?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function _(Q,ye){return fe(Q,ye)-fe(v(Q),ye)}function me(Q){return oa(Q)-oa(v(Q))}function v(Q){return U===Q&&E||U}function fe(Q,ye){return(Ce(Q)?Q.changedTouches[0]:Q)["page"+L(ye?"Y":"X")]}function J(Q){return Q/(w&&e.is(Ei)?Pd:1)}function ce(Q){var ye=n.noDrag;return!oo(Q,"."+Ol+", ."+yr)&&(!ye||!oo(Q,ye))}function Ce(Q){return typeof TouchEvent<"u"&&Q instanceof TouchEvent}function oe(){return I}function xe(Q){h=Q}return{mount:M,disable:xe,isDragging:oe}}var tu={Spacebar:" ",Right:gr,Left:mr,Up:Al,Down:Pl};function Wa(e){return e=Vn(e)?e:e.key,tu[e]||e}var ss="keydown";function nu(e,t,n){var i=Gt(e),o=i.on,s=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,m;function x(){b(),o(rn,T),o(rn,b),o(Fn,L)}function b(){var R=n.keyboard;R&&(u=R==="global"?window:d,s(u,ss,$))}function T(){l(u,ss)}function f(R){m=R}function L(){var R=m;m=!0,cl(function(){m=R})}function $(R){if(!m){var A=Wa(R);A===c(mr)?e.go("<"):A===c(gr)&&e.go(">")}}return{mount:x,destroy:T,disable:f}}var Qi=Sa+"-lazy",Uo=Qi+"-srcset",iu="["+Qi+"], ["+Uo+"]";function ou(e,t,n){var i=Gt(e),o=i.on,s=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[zi,gi],m=[];function x(){n.lazyLoad&&(b(),o(Zt,b))}function b(){Wn(m),T(),c?R():(s(u),o(u,f),f())}function T(){t.Slides.forEach(function(A){wa(A.slide,iu).forEach(function(C){var U=xn(C,Qi),E=xn(C,Uo);if(U!==C.src||E!==C.srcset){var O=n.classes.spinner,I=C.parentElement,w=bo(I,"."+O)||Ci("span",O,I);m.push([C,A,w]),C.src||so(C,"none")}})})}function f(){m=m.filter(function(A){var C=n.perPage*((n.preloadPages||1)+1)-1;return A[1].isWithin(e.index,C)?L(A):!0}),m.length||s(u)}function L(A){var C=A[0];Cn(A[1].slide,ca),l(C,"load error",Nt($,A)),ut(C,"src",xn(C,Qi)),ut(C,"srcset",xn(C,Uo)),Tn(C,Qi),Tn(C,Uo)}function $(A,C){var U=A[0],E=A[1];Mn(E.slide,ca),C.type!=="error"&&(di(A[2]),so(U,""),d(Ea,U,E),d(Ri)),c&&R()}function R(){m.length&&L(m.shift())}return{mount:x,destroy:Nt(Wn,m),check:f}}function ru(e,t,n){var i=Gt(e),o=i.on,s=i.emit,l=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,m=u.hasFocus,x=u.getIndex,b=u.go,T=t.Direction.resolve,f=c.pagination,L=[],$,R;function A(){C(),o([rn,Zt,tr],A);var h=n.pagination;f&&so(f,h?"":"none"),h&&(o([Fn,dr,gi],F),U(),F(),s(Il,{list:$,items:L},w(e.index)))}function C(){$&&(di(f?Un($.children):$),Mn($,R),Wn(L),$=null),i.destroy()}function U(){var h=e.length,S=n.classes,M=n.i18n,z=n.perPage,K=m()?u.getEnd()+1:lo(h/z);$=f||Ci("ul",S.pagination,c.track.parentElement),Cn($,R=vr+"--"+I()),ut($,kn,"tablist"),ut($,hn,M.select),ut($,ka,I()===hr?"vertical":"");for(var se=0;se<K;se++){var Y=Ci("li",null,$),D=Ci("button",{class:S.page,type:"button"},Y),N=d.getIn(se).map(function(P){return P.slide.id}),W=!m()&&z>1?M.pageX:M.slideX;l(D,"click",Nt(E,se)),n.paginationKeyboard&&l(D,"keydown",Nt(O,se)),ut(Y,kn,"presentation"),ut(D,kn,"tab"),ut(D,So,N.join(" ")),ut(D,hn,aa(W,se+1)),ut(D,Ti,-1),L.push({li:Y,button:D,page:se})}}function E(h){b(">"+h,!0)}function O(h,S){var M=L.length,z=Wa(S),K=I(),se=-1;z===T(gr,!1,K)?se=++h%M:z===T(mr,!1,K)?se=(--h+M)%M:z==="Home"?se=0:z==="End"&&(se=M-1);var Y=L[se];Y&&(ml(Y.button),b(">"+se),Rn(S,!0))}function I(){return n.paginationDirection||n.direction}function w(h){return L[u.toPage(h)]}function F(){var h=w(x(!0)),S=w(x());if(h){var M=h.button;Mn(M,ui),Tn(M,ts),ut(M,Ti,-1)}if(S){var z=S.button;Cn(z,ui),ut(z,ts,!0),ut(z,Ti,"")}s(Rl,{list:$,items:L},h,S)}return{items:L,mount:A,destroy:C,getAt:w,update:F}}var au=[" ","Enter"];function su(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function l(){e.splides.forEach(function(f){f.isParent||(u(e,f.splide),u(f.splide,e))}),i&&m()}function d(){s.forEach(function(f){f.destroy()}),Wn(s)}function c(){d(),l()}function u(f,L){var $=Gt(f);$.on(Fn,function(R,A,C){L.go(L.is(Bi)?C:R)}),s.push($)}function m(){var f=Gt(e),L=f.on;L(Ca,b),L(Ml,T),L([Xn,rn],x),s.push(f),f.emit(La,e.splides)}function x(){ut(t.Elements.list,ka,n.direction===hr?"vertical":"")}function b(f){e.go(f.index)}function T(f,L){xa(au,Wa(L))&&(b(f),Rn(L))}return{setup:Nt(t.Media.set,{slideFocus:yo(o)?i:o},!0),mount:l,destroy:d,remount:c}}function lu(e,t,n){var i=Gt(e),o=i.bind,s=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,wi)}function d(u){if(u.cancelable){var m=u.deltaY,x=m<0,b=oa(u),T=n.wheelMinThreshold||0,f=n.wheelSleep||0;sn(m)>T&&b-s>f&&(e.go(x?"<":">"),s=b),c(x)&&Rn(u)}}function c(u){return!n.releaseWheel||e.state.is(ji)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var cu=90;function du(e,t,n){var i=Gt(e),o=i.on,s=t.Elements.track,l=n.live&&!n.isNavigation,d=Ci("span",Rd),c=ur(cu,Nt(m,!1));function u(){l&&(b(!t.Autoplay.isPaused()),ut(s,os,!0),d.textContent="…",o(Ia,Nt(b,!0)),o(Ra,Nt(b,!1)),o([zi,gi],Nt(m,!0)))}function m(T){ut(s,is,T),T?(xo(s,d),c.start()):(di(d),c.cancel())}function x(){Tn(s,[ns,os,is]),di(d)}function b(T){l&&ut(s,ns,T?"off":"polite")}return{mount:u,disable:b,destroy:x}}var uu=Object.freeze({__proto__:null,Media:xd,Direction:bd,Elements:Wd,Slides:_d,Layout:Nd,Clones:Od,Move:jd,Controller:zd,Arrows:Vd,Autoplay:qd,Cover:Kd,Scroll:Qd,Drag:eu,Keyboard:nu,LazyLoad:ou,Pagination:ru,Sync:su,Wheel:lu,Live:du}),pu={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"},mu={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:kd,i18n:pu,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function gu(e,t,n){var i=t.Slides;function o(){Gt(e).on([Xn,Zt],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function l(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),cl(c)}return{mount:o,start:l,cancel:ia}}function hu(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,l=t.Elements.list,d=Nt(vn,l,"transition"),c;function u(){Gt(e).bind(l,"transitionend",function(T){T.target===l&&c&&(x(),c())})}function m(T,f){var L=i.toPosition(T,!0),$=i.getPosition(),R=b(T);sn(L-$)>=1&&R>=1?n.useScroll?s.scroll(L,R,!1,f):(d("transform "+R+"ms "+n.easing),i.translate(L,!0),c=f):(i.jump(T),f())}function x(){d(""),s.cancel()}function b(T){var f=n.rewindSpeed;if(e.is(Ei)&&f){var L=o.getIndex(!0),$=o.getEnd();if(L===0&&T>=$||L>=$&&T===0)return f}return n.speed}return{mount:u,start:m,cancel:x}}var fu=(function(){function e(n,i){this.event=Gt(),this.Components={},this.state=yd($i),this.splides=[],this._o={},this._E={};var o=Vn(n)?hl(document,n):n;Ji(o,o+" is invalid."),this.root=o,i=jn({label:xn(o,hn)||"",labelledby:xn(o,Ma)||""},mu,e.defaults,i||{});try{jn(i,JSON.parse(xn(o,Sa)))}catch{Ji(!1,"Invalid JSON")}this._o=Object.create(jn({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,l=this.state,d=this.Components;Ji(l.is([$i,Jo]),"Already mounted!"),l.set($i),this._C=d,this._T=o||this._T||(this.is($o)?gu:hu),this._E=i||this._E;var c=ao({},uu,this._E,{Transition:this._T});return ci(c,function(u,m){var x=u(s,d,s._o);d[m]=x,x.setup&&x.setup()}),ci(d,function(u){u.mount&&u.mount()}),this.emit(Xn),Cn(this.root,Ed),l.set(Ii),this.emit(sa),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Ii)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(Un(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(Zt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is($i)?Gt(this).on(sa,this.destroy.bind(this,i)):(ci(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(Ta),o.destroy(),i&&Wn(this.splides),s.set(Jo)),this},pd(e,[{key:"options",get:function(){return this._o},set:function(i){this._C.Media.set(i,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Fa=fu;Fa.defaults={};Fa.STATES=gd;var ls=[[Xn,"onMounted"],[sa,"onReady"],[Fn,"onMove"],[zi,"onMoved"],[Ca,"onClick"],[vl,"onActive"],[xl,"onInactive"],[bl,"onVisible"],[wl,"onHidden"],[Zt,"onRefresh"],[rn,"onUpdated"],[Ri,"onResize"],[cr,"onResized"],[Sl,"onDrag"],[$l,"onDragging"],[Cl,"onDragged"],[dr,"onScroll"],[gi,"onScrolled"],[Ta,"onDestroy"],[Tl,"onArrowsMounted"],[Ll,"onArrowsUpdated"],[Il,"onPaginationMounted"],[Rl,"onPaginationUpdated"],[La,"onNavigationMounted"],[Ia,"onAutoplayPlay"],[El,"onAutoplayPlaying"],[Ra,"onAutoplayPause"],[Ea,"onLazyLoadLoaded"]];function _a(...e){return e.filter(Boolean).join(" ")}function nr(e){return e!==null&&typeof e=="object"}function da(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!da(n,t[i]));if(nr(e)&&nr(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!da(e[o],t[o]))}return e===t}function yu(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function vu(e,t){if(e){const n=Object.keys(e);for(let i=0;i<n.length;i++){const o=n[i];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function ua(e,t){const n=e;return vu(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():nr(i)?n[o]=ua(nr(n[o])?n[o]:{},i):n[o]=i}),n}var xu=({children:e,className:t,...n})=>a.createElement("div",{className:_a("splide__track",t),...n},a.createElement("ul",{className:"splide__list"},e)),xr=class extends a.Component{constructor(){super(...arguments),this.splideRef=a.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Fa(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=ua({},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&&!da(this.options,e)&&(this.splide.options=e,this.options=ua({},e));const t=this.getSlides();yu(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){ls.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(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:i,...o}=this.props;return a.createElement(t,{className:_a("splide",e),ref:this.splideRef,...this.omit(o,["options",...ls.map(s=>s[1])])},n?a.createElement(xu,null,i):i)}},br=({children:e,className:t,...n})=>a.createElement("li",{className:_a("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 wu="RichTextRenderer-module__link___BWeZ2",Su={link:wu},$u=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},Sr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>$u(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function dn(e){const{color:t,...n}=e;return n}function Xt(e,t){var o,s,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Sr(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:i!==void 0?y.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}const mi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:Su.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:Cu(i),children:i.text},o));return r.jsx(r.Fragment,{children:e.map((n,i)=>{const o=n.children;return r.jsx("div",{children:t(o)},i)})})};function Cu(e){return{...e.fontFamily&&{fontFamily:Sr(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 Tu="SvgImage-module__svg___q3xE-",Lu="SvgImage-module__img___VsTm-",ds={svg:Tu,img:Lu},Iu=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Ru=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,rn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,l]=a.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return a.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(d)}},[]),!Iu(e)||!s?r.jsx("img",{src:e,alt:"",className:nt(ds.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:nt(ds.svg,i),style:{"--svg":Ru(e),"--fill":t,"--hover-fill":n,...o??{}}})},Eu={"top-left":Xe.topLeftAlignment,"top-center":Xe.topCenterAlignment,"top-right":Xe.topRightAlignment,"middle-left":Xe.middleLeftAlignment,"middle-center":Xe.middleCenterAlignment,"middle-right":Xe.middleRightAlignment,"bottom-left":Xe.bottomLeftAlignment,"bottom-center":Xe.bottomCenterAlignment,"bottom-right":Xe.bottomRightAlignment};function ku({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=a.useState(null),{widthSettings:l,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:m,fontSizeLineHeight:x,textAppearance:b,color:T}=n.imageCaption??{},[f,L]=a.useState(void 0),[$,R]=a.useState(null),[P,C]=a.useState(0),[X,E]=a.useState(0),{direction:B,transition:I,controls:w,pagination:W,imageCaption:h,triggers:S}=e,k=a.useRef(I.type),{x:D,y:U}=e.controls.offset,ae=Y=>{o&&o.go(Y)};return a.useEffect(()=>{if(!$)return;const Y=new ResizeObserver(G=>{if(!o)return;const[H]=G;L({width:Math.round(H.contentRect.width),height:Math.round(H.contentRect.height)})});return Y.observe($),()=>Y.unobserve($)},[$]),a.useEffect(()=>{!o||k.current===I.type||(E(Y=>Y+1),k.current=I.type)},[I.type]),r.jsx("div",{className:nt(Xe.wrapper,{[Xe.editor]:i}),ref:R,children:r.jsxs("div",{className:Xe.sliderInner,style:{width:f?f.width:"100%",height:f?f.height:"100%",backgroundColor:I.backgroundColor&&I.type==="fade in"?I.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:nt(Xe.captionBlock),children:r.jsx("div",{className:Xe.captionTextWrapper,children:t.map((Y,G)=>r.jsx("div",{className:nt(Xe.captionText,Eu[h.alignment],{[Xe.withPointerEvents]:G===P&&i,[Xe.active]:G===P}),style:{fontFamily:Sr(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":y.scalingValue(l.width,i),letterSpacing:y.scalingValue(c,i),wordSpacing:y.scalingValue(m,i),textAlign:u,fontSize:y.scalingValue(x.fontSize,i),lineHeight:y.scalingValue(x.lineHeight,i),textTransform:b.textTransform??"none",textDecoration:b.textDecoration??"none",fontVariant:b.fontVariant??"normal",color:T,transitionDuration:I.duration?`${Math.round(parseInt(I.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Xe.captionTextInner,style:{"--link-hover-color":h.linkHoverColor,"--link-color":h.linkColor,position:"relative",top:y.scalingValue(h.offset.y,i),left:y.scalingValue(h.offset.x,i)},children:r.jsx(mi,{content:Y.imageCaption})})},G))})}),r.jsx(br,{onMove:Y=>{C(Y.index)},ref:s,options:{arrows:!1,speed:I.duration?parseInt(I.duration):500,autoplay:S.autoPlay!==null,...S.autoPlay!==null&&{interval:parseInt(S.autoPlay)*1e3},direction:B==="horiz"||I.type==="fade in"?"ltr":"ttb",pagination:!1,drag:S.triggersList.drag,perPage:1,width:f?f.width:"100%",height:f?f.height:"100%",type:I.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((Y,G)=>r.jsx(wr,{children:r.jsx("div",{className:Xe.sliderItem,children:r.jsx("div",{className:Xe.imgWrapper,children:r.jsx("img",{className:nt(Xe.sliderImage,{[Xe.contain]:Y.image.objectFit==="contain",[Xe.cover]:Y.image.objectFit==="cover"}),src:Y.image.url,alt:Y.image.name??""})})})},G))},X),w.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:nt(Xe.arrow,{[Xe.arrowVertical]:B==="vert",[Xe.hoverArrow]:w.show==="on hover"}),style:{color:w.color,"--arrow-hover-color":w.hover},children:r.jsxs("button",{onClick:()=>{ae("-1")},className:Xe.arrowInner,style:{transform:`translate(${y.scalingValue(D,i)}, ${y.scalingValue(U*(B==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[w.arrowsImgUrl&&r.jsx(rn,{url:w.arrowsImgUrl,fill:w.color,hoverFill:w.hover,className:nt(Xe.arrowImg,Xe.mirror)}),!w.arrowsImgUrl&&r.jsx(us,{color:w.color,className:nt(Xe.arrowIcon,Xe.arrowImg,Xe.mirror)})]})}),r.jsx("div",{className:nt(Xe.arrow,Xe.nextArrow,{[Xe.arrowVertical]:B==="vert",[Xe.hoverArrow]:w.show==="on hover"}),style:{color:w.color,"--arrow-hover-color":w.hover},children:r.jsxs("button",{className:Xe.arrowInner,onClick:()=>ae("+1"),style:{transform:`translate(${y.scalingValue(D*(B==="horiz"?-1:1),i)}, ${y.scalingValue(U,i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[w.arrowsImgUrl&&r.jsx(rn,{url:w.arrowsImgUrl,fill:w.color,hoverFill:w.hover,className:Xe.arrowImg}),!w.arrowsImgUrl&&r.jsx(us,{color:w.color,className:nt(Xe.arrowIcon,Xe.arrowImg)})]})})]}),S.triggersList.click&&r.jsx("div",{className:Xe.clickOverlay,onClick:()=>{o&&o.go("+1")}}),W.isActive&&r.jsx("div",{className:nt(Xe.pagination,{[Xe.paginationInsideBottom]:W.position==="inside-1"&&B==="horiz",[Xe.paginationInsideTop]:W.position==="inside-2"&&B==="horiz",[Xe.paginationOutsideBottom]:W.position==="outside-1"&&B==="horiz",[Xe.paginationOutsideTop]:W.position==="outside-2"&&B==="horiz",[Xe.paginationInsideLeft]:W.position==="inside-1"&&B==="vert",[Xe.paginationInsideRight]:W.position==="inside-2"&&B==="vert",[Xe.paginationOutsideLeft]:W.position==="outside-1"&&B==="vert",[Xe.paginationOutsideRight]:W.position==="outside-2"&&B==="vert",[Xe.paginationVertical]:B==="vert"}),children:r.jsx("div",{className:Xe.paginationInner,style:{backgroundColor:W.colors[2],transform:`scale(${W.scale/100}) translate(${y.scalingValue(W.offset.x,i)}, ${y.scalingValue(W.offset.y,i)}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:t.map((Y,G)=>r.jsx("button",{onClick:()=>{o&&o.go(G)},className:nt(Xe.paginationItem),children:r.jsx("div",{className:nt(Xe.dot,{[Xe.activeDot]:G===P}),style:{backgroundColor:G===P?W.colors[0]:W.colors[1],"--pagination-hover-color":W.hover}})},G))})})]})})}function us({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.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 Mu={element:ku,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"]}},Pu="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Au="ImageRevealSlider-module__image___Qjt-e",Fu="ImageRevealSlider-module__link___N-iLG",Wu="ImageRevealSlider-module__cursor___2U03d",vi={imageRevealSlider:Pu,image:Au,link:Fu,cursor:Wu};function ps(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*s,d=s/2,c=l/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function _r(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function _u(e,t,n,i){let o,s;if(t==="custom"){o=n;const l=await _r(e);s=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await _r(e);s=l.height/l.width*o}else{const l=await _r(e);o=l.width,s=l.height}return{width:o,height:s,finalWidth:`${o}px`}}function Nu({settings:e,content:t,isEditor:n}){const[i,o]=a.useState(null),[s,l]=a.useState([]),[d,c]=a.useState(0),u=a.useRef(0),[m,x]=a.useState({x:0,y:0}),[b,T]=a.useState(1),[f,L]=a.useState("none"),$=a.useRef({x:0,y:0}),[R,P]=a.useState(!1),{sizeType:C,imageWidth:X,randomRangeImageWidth:E}=e.imageSize,{revealPosition:B,visible:I}=e.position,{cursorType:w,target:W,defaultCursorScale:h,defaultCursor:S,hoverCursorScale:k,hoverCursor:D}=e.cursor;a.useEffect(()=>{if(!i)return;const Y=(F,A)=>{const K=i.getBoundingClientRect(),q=F-K.left,ee=A-K.top;if(x({x:q,y:ee}),w==="system"){L("none"),T(1);return}const N=q,ue=ee,v=document.elementFromPoint(K.left+N,K.top+ue);if(v&&v.closest("a")){L("none"),T(1);return}const ye=ps(N,ue,s)||W==="area"?{img:D??"none",scale:k}:{img:S??"none",scale:h};L(ye.img),T(ye.scale)},G=F=>{F.stopPropagation(),$.current={x:F.clientX,y:F.clientY},Y(F.clientX,F.clientY)},H=()=>{R&&Y($.current.x,$.current.y)};return i.addEventListener("mousemove",G),window.addEventListener("scroll",H,!0),()=>{i.removeEventListener("mousemove",G),window.removeEventListener("scroll",H,!0)}},[i,R,m,w,W,D,S,k,h,s]),a.useEffect(()=>{R||(L("none"),T(0))},[R]);const U=async(Y,G,H,F={})=>{const{width:A,height:K,finalWidth:q}=await _u(Y.image.url,C,X,E);let ee=0,N=0;B==="same"?(ee=G/2,N=H/2):(ee=F.x??Math.random()*G,N=F.y??Math.random()*H);const ue=Math.min(Math.max(ee,A/2),G-A/2),v=Math.min(Math.max(N,K/2),H-K/2);return{id:u.current++,url:Y.image.url,link:Y.link,name:Y.image.name,x:ue,y:v,width:q}};a.useEffect(()=>{if(!i||t.length===0)return;const Y=i.getBoundingClientRect(),G=Y.width,H=Y.height,F=[];(async()=>{const K=t[0],q=await U(K,G,H);F.push(q),l(F),c(1)})()},[C,X,E,B,i]),a.useEffect(()=>{I==="last One"&&l(Y=>Y.length>0?[Y[Y.length-1]]:[])},[I]);const ae=async Y=>{if(!i)return;const G=i.getBoundingClientRect(),H=Y.clientX-G.left,F=Y.clientY-G.top;if(W==="image"&&!ps(H,F,s))return;let A=0,K=0;B==="on Click"?(A=H,K=F):B==="same"?(A=G.width/2,K=G.height/2):(A=Math.random()*G.width,K=Math.random()*G.height);const q=t[d],ee=await U(q,G.width,G.height,{x:A,y:K});l(N=>I==="all"?[...N,ee]:[ee]),c(N=>N>=t.length-1?0:N+1)};return r.jsxs("div",{ref:o,onClick:ae,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),className:vi.imageRevealSlider,style:{cursor:f==="none"?"default":"none"},children:[s.map(Y=>r.jsx("div",{className:vi.wrapper,style:{top:`${Y.y}px`,left:`${Y.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:Y.width??"auto",height:"auto",cursor:f==="none"?"default":"none"},children:W==="area"&&Y.link?r.jsx("a",{href:Y.link,target:"_blank",className:vi.link,children:r.jsx("img",{src:Y.url,alt:Y.name,className:vi.image},Y.id)}):r.jsx("img",{src:Y.url,alt:Y.name,className:vi.image},Y.id)},Y.id)),R&&r.jsx("div",{className:vi.cursor,style:{left:`${m.x}px`,top:`${m.y}px`,transform:`translate(-50%, -50%) scale(${b})`,backgroundImage:`url('${f}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Hu={element:Nu,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:""}]}}}},ju="LightBox-module__hidden___9s-9x",Ou="LightBox-module__heroImage___sTxNF",zu="LightBox-module__background___rm9ml",Bu="LightBox-module__editor___4ACaY",Du="LightBox-module__contentStyle___Bgnsq",Vu="LightBox-module__imageStyle___tLIlB",Gu="LightBox-module__imgWrapper___LuFUp",qu="LightBox-module__contain___8-yaS",Ku="LightBox-module__cover___hNvOG",Uu="LightBox-module__caption___b6L2I",Xu="LightBox-module__captionTextInner___rCGNH",Yu="LightBox-module__lightboxSplide___XFuWC",Zu="LightBox-module__arrow___iz38X",Ju="LightBox-module__arrowVertical___Zfz81",Qu="LightBox-module__nextArrow___zkAQN",ep="LightBox-module__arrowInner___p48sW",tp="LightBox-module__arrowIcon___3VaFf",np="LightBox-module__arrowImg___pNV88",ip="LightBox-module__mirror___pjeXc",op="LightBox-module__thumbsWrapper___GB-nU",rp="LightBox-module__thumbsContainerVertical___wttk5",ap="LightBox-module__thumbsContainer___osSma",sp="LightBox-module__thumbsAlignStart___MO6tY",lp="LightBox-module__thumbsAlignCenter___Q4sUx",cp="LightBox-module__thumbsAlignEnd___p4y9R",dp="LightBox-module__thumbItem___HvnF3",up="LightBox-module__closeButton___g2khP",pp="LightBox-module__fadeIn___0m5GW",mp="LightBox-module__slideInLeft___gPYwC",gp="LightBox-module__slideInRight___S-pPp",hp="LightBox-module__slideInTop___DFdAj",fp="LightBox-module__slideInBottom___m27kZ",yp="LightBox-module__fadeOut___55qBR",vp="LightBox-module__slideOutLeft___NvU7P",xp="LightBox-module__slideOutRight___SK7eC",bp="LightBox-module__slideOutTop___Vgg0z",wp="LightBox-module__slideOutBottom___nJ0Ef",Sp="LightBox-module__scaleSlide___vZriG",Fe={hidden:ju,heroImage:Ou,background:zu,editor:Bu,contentStyle:Du,imageStyle:Vu,imgWrapper:Gu,contain:qu,cover:Ku,caption:Uu,captionTextInner:Xu,lightboxSplide:Yu,arrow:Zu,arrowVertical:Ju,nextArrow:Qu,arrowInner:ep,arrowIcon:tp,arrowImg:np,mirror:ip,thumbsWrapper:op,thumbsContainerVertical:rp,thumbsContainer:ap,thumbsAlignStart:sp,thumbsAlignCenter:lp,thumbsAlignEnd:cp,thumbItem:dp,closeButton:up,fadeIn:pp,slideInLeft:mp,slideInRight:gp,slideInTop:hp,slideInBottom:fp,fadeOut:yp,slideOutLeft:vp,slideOutRight:xp,slideOutTop:bp,slideOutBottom:wp,scaleSlide:Sp},Mo=(e,t,n)=>{const i={},[o,s]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),s==="left"?(i.left="0",i.right="auto"):s==="center"?(i.left="50%",i.right="auto"):s==="right"&&(i.left="auto",i.right="0"),o==="middle"&&s==="center"?i.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), calc(-50% + ${y.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${y.scalingValue(t.x,n)}, calc(-50% + ${y.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), ${y.scalingValue(t.y,n)})`:i.transform=`translate(${y.scalingValue(t.x,n)}, ${y.scalingValue(t.y,n)})`,i};function ql(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 or(e){const t=e.getBoundingClientRect(),n=ql(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,l=e.naturalHeight,d=i/o,c=s/l;let u,m;c>d?(u=i,m=i/c):(m=o,u=o*c);const x=t.left+n.left,b=t.top+n.top,T=(i-u)/2+x,f=(o-m)/2+b;return{x:T,y:f,width:u,height:m}}function ms(e){const t=e.getBoundingClientRect(),n=ql(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function gs(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const i=t[1].split(",").map(o=>parseFloat(o.trim()));return i.length===4?i[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const i=n[1].substring(6,8);return parseInt(i,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function $p(e,t){const n=(()=>{if(e==="fade in")return Fe.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Fe.slideInLeft;case"right":return Fe.slideInRight;case"top":return Fe.slideInTop;case"bottom":return Fe.slideInBottom;default:return Fe.slideInRight}return Fe.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Fe.fadeIn;if(e==="slide in")switch(t){case"left":return Fe.slideInLeft;case"right":return Fe.slideInRight;case"top":return Fe.slideInTop;case"bottom":return Fe.slideInBottom;default:return Fe.slideInRight}return Fe.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return Fe.fadeOut;if(e==="slide in")switch(t){case"left":return Fe.slideOutLeft;case"right":return Fe.slideOutRight;case"top":return Fe.slideOutTop;case"bottom":return Fe.slideOutBottom;default:return Fe.slideOutRight}return Fe.fadeOut})(),s=(()=>{if(e==="fade in")return Fe.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Fe.slideOutLeft;case"right":return Fe.slideOutRight;case"top":return Fe.slideOutTop;case"bottom":return Fe.slideOutBottom;default:return Fe.slideOutRight}return Fe.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const Cp=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:l})=>{const[d,c]=a.useState(!1),{url:u}=e.thumbnailBlock.cover;return a.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:u,alt:"Cover",className:Fe.heroImage,onClick:()=>c(!0)}),r.jsx(Tp,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},Tp=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:l,metadata:d})=>{var xe;const{widthSettings:c,fontSettings:u,letterSpacing:m,textAlign:x,wordSpacing:b,fontSizeLineHeight:T,textAppearance:f,color:L}=i.imageCaption??{},[$,R]=a.useState(0),[P,C]=a.useState(0),[X,E]=a.useState(!1),[B,I]=a.useState(!1),[w,W]=a.useState({}),h=a.useRef(null),S=a.useRef(null),k=a.useRef(null),D=a.useRef(!1),U=a.useRef(null),ae=a.useRef(null),Y=a.useRef(null),G=a.useRef(null),H=a.useRef(!1),F=a.useRef(null),[A,K]=a.useState(!1),{appear:q,triggers:ee,slider:N,thumbnail:ue,controls:v,area:ye,caption:Z,layout:ce}=o.lightboxBlock,{appearClass:$e,backdropAppearClass:ne,backdropDisappearClass:ve,disappearClass:J}=$p(q.type,q.direction),pe=(d==null?void 0:d.itemId)??null;a.useEffect(()=>{const O=()=>{setTimeout(()=>{var fe,Se;(Se=(fe=h.current)==null?void 0:fe.splide)==null||Se.refresh()},16)},se=()=>{C(fe=>fe+1)};return window.addEventListener("ArticleEditor.Layout:change",O),window.addEventListener("ArticleEditor.ComponentContent:change",se),()=>{window.removeEventListener("ArticleEditor.Layout:change",O),window.removeEventListener("ArticleEditor.ComponentContent:change",se)}},[]),a.useEffect(()=>{if(!e||!ue.isActive){K(!1);return}const O=F.current;if(!O)return;const se=()=>{N.direction==="horiz"?K(O.scrollWidth>O.clientWidth):K(O.scrollHeight>O.clientHeight)};se();const fe=new ResizeObserver(se);return fe.observe(O),()=>fe.disconnect()},[e,ue.isActive,n.length,w,N.direction]);const he=a.useCallback(()=>{const O=window.matchMedia("(max-width: 768px)").matches,se=gs(ye.color);O&&!l&&se>.9&&(document.body.style.backgroundColor=""),E(!0),D.current=!0;const fe=Se=>{Se.target===U.current&&Se.animationName&&(U.current&&ae.current&&U.current.removeEventListener("animationend",ae.current),ae.current=null,D.current&&(D.current=!1,t()),E(!1))};U.current&&(ae.current=fe,U.current.addEventListener("animationend",fe))},[t,ye.color,l]),Ae=(O,se,fe)=>{var Se,Ie;if(O){if(ee.type==="click"&&ee.switch==="image")ee.repeat==="close"&&$===n.length-1?he():(Se=h.current)==null||Se.go("+1");else if(ee.type==="click"&&ee.switch==="50/50"){const we=O.getBoundingClientRect(),_=se-we.left,de=fe-we.top,oe=we.width,z=we.height;let re;N.direction==="horiz"?re=_<oe/2?"-1":"+1":re=de<z/2?"-1":"+1",(Ie=h.current)==null||Ie.go(re)}}},be=O=>{if(H.current){H.current=!1;return}const se=n[$],fe=(se==null?void 0:se.image.objectFit)==="cover";let Se,Ie;if("changedTouches"in O&&O.changedTouches.length>0)Se=O.changedTouches[0].clientX,Ie=O.changedTouches[0].clientY;else if("clientX"in O)Se=O.clientX,Ie=O.clientY;else return;let we;if(fe&&k.current){const _=ms(k.current);we=Se>=_.left&&Se<=_.right&&Ie>=_.top&&Ie<=_.bottom}else{const _=k.current?or(k.current):null;if(!_){O.target===O.currentTarget&&he();return}we=Se>=_.x&&Se<=_.x+_.width&&Ie>=_.y&&Ie<=_.y+_.height}we?Ae(k.current,Se,Ie):he()},We=O=>{const se=O.target;(se.classList.contains(Fe.thumbsWrapper)||se.classList.contains(Fe.thumbsContainer))&&be(O)};a.useEffect(()=>{if(!e)return;const O=se=>{var fe,Se;if(se.key==="Escape"){he();return}if(se.key==="ArrowRight"){R(Ie=>(Ie+1)%Math.max(n.length,1)),(fe=h.current)==null||fe.go("+1");return}se.key==="ArrowLeft"&&(R(Ie=>(Ie-1+Math.max(n.length,1))%Math.max(n.length,1)),(Se=h.current)==null||Se.go("-1"))};return window.addEventListener("keydown",O),()=>{window.removeEventListener("keydown",O)}},[e,he,n.length]),a.useEffect(()=>{if(e){if(R(0),C(se=>se+1),D.current=!1,E(!1),I(!1),W({}),!pe)return;const O=new CustomEvent("page-overlay",{detail:{itemId:pe}});window.dispatchEvent(O)}return()=>{U.current&&ae.current&&(U.current.removeEventListener("animationend",ae.current),ae.current=null),I(!1)}},[e,pe]),a.useEffect(()=>{S.current!==null&&S.current!==N.type&&C(O=>O+1),S.current=N.type},[N.type]),a.useEffect(()=>{if(!e)return;const O=document.body.style.overflow,se=window.matchMedia("(max-width: 768px)").matches,fe=gs(ye.color);document.body.style.overflow="hidden",I(!1);const Se=we=>{we.target===U.current&&!D.current&&we.animationName&&(se&&!l&&fe>.9&&(document.body.style.backgroundColor=ye.color),I(!0),U.current&&Y.current&&U.current.removeEventListener("animationend",Y.current),Y.current=null)};U.current&&(Y.current=Se,U.current.addEventListener("animationend",Se));const Ie=we=>{const _=we.target;_&&(_.closest(`.${Fe.thumbsWrapper}`)||_.closest(`.${Fe.thumbsContainer}`))||N.type!=="slide"&&we.preventDefault()};return document.addEventListener("touchmove",Ie,{passive:!1}),()=>{document.body.style.overflow=O,document.removeEventListener("touchmove",Ie),U.current&&Y.current&&(U.current.removeEventListener("animationend",Y.current),Y.current=null),I(!1)}},[e,l,ye.color,N.type]),a.useEffect(()=>{if(!e)return;const O=se=>{var Se,Ie;if(D.current){se.stopPropagation();return}if(H.current){H.current=!1;return}const fe=se.target;if(!(fe&&(fe.closest(`.${Fe.thumbsContainer}`)||fe.closest(`.${Fe.thumbItem}`)||fe.closest(`.${Fe.arrow}`)||fe.closest(`.${Fe.closeButton}`)||fe.closest(`.${Fe.caption}`)))){if(N.type==="slide"&&ee.type==="drag"&&((Ie=(Se=h.current)==null?void 0:Se.splide)!=null&&Ie.root)){const we=h.current.splide.root;if(fe&&(we.contains(fe)||we===fe))return}if(se.touches.length===0&&se.changedTouches.length>0){const we=n[$],_=(we==null?void 0:we.image.objectFit)==="cover",de=se.changedTouches[0];let oe;if(_&&k.current){const z=ms(k.current);oe=de.clientX>=z.left&&de.clientX<=z.right&&de.clientY>=z.top&&de.clientY<=z.bottom}else{const z=k.current?or(k.current):null;if(!z)return;oe=de.clientX>=z.x&&de.clientX<=z.x+z.width&&de.clientY>=z.y&&de.clientY<=z.y+z.height}if(!oe){se.stopPropagation(),D.current=!0;const z=re=>{re.stopPropagation(),re.preventDefault(),document.removeEventListener("click",z,!0)};document.addEventListener("click",z,!0),he()}}}};return document.addEventListener("touchend",O,{passive:!0}),()=>{document.removeEventListener("touchend",O)}},[e,he,$,n]);const Q=(N.type==="scale"||N.type==="fade")&&N.direction==="vert"&&ee.type==="drag";a.useEffect(()=>{var re,ke;if(!e||!Q||!((ke=(re=h.current)==null?void 0:re.splide)!=null&&ke.root))return;const O=h.current.splide.root,se=30,fe=(ie,j)=>{if(G.current){const Ne=Math.abs(ie-G.current.x),Me=Math.abs(j-G.current.y);(Ne>0||Me>0)&&(H.current=!0)}},Se=ie=>{G.current&&(ie.preventDefault(),fe(ie.clientX,ie.clientY))},Ie=ie=>{G.current&&ie.touches.length>0&&(ie.preventDefault(),fe(ie.touches[0].clientX,ie.touches[0].clientY))},we=(ie,j)=>{if(!G.current||!h.current){G.current=null;return}const Ne=Math.abs(ie-G.current.x),Me=Math.abs(j-G.current.y);Me>se&&Me>Ne&&h.current.go(j<G.current.y?"+1":"-1"),G.current=null},_=ie=>{G.current&&we(ie.clientX,ie.clientY),document.removeEventListener("pointerup",_),document.removeEventListener("pointercancel",_),document.removeEventListener("pointermove",Se)},de=ie=>{if(G.current){if(ie.changedTouches.length>0){const j=ie.changedTouches[0];we(j.clientX,j.clientY)}document.removeEventListener("touchend",de),document.removeEventListener("touchcancel",de),document.removeEventListener("touchmove",Ie)}},oe=ie=>{G.current={x:ie.clientX,y:ie.clientY},H.current=!1,document.addEventListener("pointermove",Se,{passive:!1}),document.addEventListener("pointerup",_),document.addEventListener("pointercancel",_)},z=ie=>{ie.touches.length>0&&(G.current={x:ie.touches[0].clientX,y:ie.touches[0].clientY},H.current=!1,document.addEventListener("touchmove",Ie,{passive:!1}),document.addEventListener("touchend",de),document.addEventListener("touchcancel",de))};return O.addEventListener("pointerdown",oe),O.addEventListener("touchstart",z),()=>{O.removeEventListener("pointerdown",oe),O.removeEventListener("touchstart",z),document.removeEventListener("pointermove",Se),document.removeEventListener("pointerup",_),document.removeEventListener("pointercancel",_),document.removeEventListener("touchmove",Ie),document.removeEventListener("touchend",de),document.removeEventListener("touchcancel",de),G.current=null,H.current=!1}},[e,Q,P]);const le={backgroundColor:ye.color,backdropFilter:`blur(${ye.blur}px)`,animationDuration:`${parseInt(q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:gi.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:l?null:U,className:nt(Fe.background,X?ve:ne,{[Fe.editor]:l},{[Fe.hidden]:!e}),style:{...le,...B&&!l&&!X?{position:"absolute"}:{}}}),r.jsxs("div",{ref:l?U:null,className:nt(Fe.contentStyle,X?J:$e,{[Fe.editor]:l},{[Fe.hidden]:!e}),style:{animationDuration:`${parseInt(q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(br,{onMove:O=>R(O.index),ref:h,className:Fe.lightboxSplide,options:{arrows:!1,speed:N.duration?parseInt(N.duration):500,direction:N.direction==="horiz"||N.type==="fade"||N.type==="scale"?"ltr":"ttb",pagination:!1,drag:ee.type==="drag"&&!Q,perPage:1,width:"100%",height:"100%",type:N.type==="fade"||N.type==="scale"?"fade":"loop",padding:0,rewind:ee.repeat!=="close",start:0},style:{"--splide-speed":N.duration},children:n.map((O,se)=>{const fe=Mo(ce.position,ce.offset,l),Se=`${y.scalingValue(ce.padding.top,l)} ${y.scalingValue(ce.padding.right,l)} ${y.scalingValue(ce.padding.bottom,l)} ${y.scalingValue(ce.padding.left,l)}`,Ie=N.type==="scale"?(()=>{const{transform:we,..._}=fe;return{..._,position:"absolute",padding:Se,boxSizing:"border-box","--position-transform":we||"none"}})():{...fe,position:"absolute",padding:Se,boxSizing:"border-box"};return r.jsx(wr,{children:r.jsx("div",{className:Fe.imgWrapper,onClick:be,children:r.jsx("img",{ref:se===$?k:null,className:nt(Fe.imageStyle,{[Fe.contain]:O.image.objectFit==="contain",[Fe.cover]:O.image.objectFit==="cover",[Fe.scaleSlide]:N.type==="scale"}),src:O.image.url,alt:O.image.name??"",style:{...Ie,pointerEvents:O.image.objectFit==="contain"?"none":"auto"}})})},se)})},P),v.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:nt(Fe.arrow,{[Fe.arrowVertical]:N.direction==="vert"}),style:{color:v.color,"--arrow-hover-color":v.hover},children:r.jsxs("button",{className:Fe.arrowInner,style:{transform:`translate(${y.scalingValue(v.offset.x,l)}, ${y.scalingValue(v.offset.y*(N.direction==="horiz"?1:-1),l)}) scale(${v.scale}) rotate(${N.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var O;return(O=h.current)==null?void 0:O.go("-1")},"aria-label":"Previous",children:[v.arrowsImgUrl&&r.jsx(rn,{url:v.arrowsImgUrl,fill:v.color,hoverFill:v.hover,className:nt(Fe.arrowImg,Fe.mirror)}),!v.arrowsImgUrl&&r.jsx(hs,{color:v.color,className:nt(Fe.arrowIcon,Fe.arrowImg,Fe.mirror)})]})}),r.jsx("div",{className:nt(Fe.arrow,Fe.nextArrow,{[Fe.arrowVertical]:N.direction==="vert"}),style:{color:v.color,"--arrow-hover-color":v.hover},children:r.jsxs("button",{className:Fe.arrowInner,style:{transform:`translate(${y.scalingValue(v.offset.x*(N.direction==="horiz"?-1:1),l)}, ${y.scalingValue(v.offset.y,l)}) scale(${v.scale}) rotate(${N.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var O;return(O=h.current)==null?void 0:O.go("+1")},"aria-label":"Next",children:[v.arrowsImgUrl&&r.jsx(rn,{url:v.arrowsImgUrl,fill:v.color,hoverFill:v.hover,className:Fe.arrowImg}),!v.arrowsImgUrl&&r.jsx(hs,{color:v.color,className:nt(Fe.arrowIcon,Fe.arrowImg)})]})})]}),ye.closeIconUrl&&(()=>{const O=Mo(ye.closeIconAlign,ye.closeIconOffset,l),se=`scale(${ye.closeIconScale})`,fe=O.transform?`${O.transform} ${se}`:se;return r.jsx("button",{className:Fe.closeButton,style:{...O,transform:fe},onClick:he,"aria-label":"Close lightbox",children:r.jsx(rn,{url:ye.closeIconUrl,fill:ye.closeIconColor??"#000000",hoverFill:ye.closeIconHover??"#cccccc"})})})(),Z&&Z.isActive&&i.imageCaption&&((xe=n[$])==null?void 0:xe.imageCaption)&&r.jsx("div",{className:Fe.caption,style:{...Mo(Z.alignment,Z.offset,l),fontFamily:Sr(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":y.scalingValue(c.width,l),letterSpacing:y.scalingValue(m,l),wordSpacing:y.scalingValue(b,l),textAlign:x,fontSize:y.scalingValue(T.fontSize,l),lineHeight:y.scalingValue(T.lineHeight,l),textTransform:f.textTransform??"none",textDecoration:f.textDecoration??"none",fontVariant:f.fontVariant??"normal",color:L},onClick:O=>O.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:Fe.captionTextInner,style:{"--link-color":Z.linkColor,"--link-hover-color":Z.linkHoverColor},children:r.jsx(mi,{content:n[$].imageCaption})})}),ue.isActive&&(()=>{const[O,se]=ue.position.split("-"),fe=N.direction==="horiz"?`${O}-left`:ue.position,Se=Mo(fe,ue.offset,l),Ie=()=>{if(N.direction==="horiz"){if(se==="left")return"flex-start";if(se==="center")return"center";if(se==="right")return"flex-end"}else{if(O==="top")return"flex-start";if(O==="middle")return"center";if(O==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:F,className:Fe.thumbsWrapper,onClick:we=>We(we),style:{position:l?"absolute":"fixed",...Se,...N.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:nt(Fe.thumbsContainer,{[Fe.thumbsContainerVertical]:N.direction==="vert",[Fe.thumbsAlignStart]:ue.align==="start",[Fe.thumbsAlignCenter]:ue.align==="center",[Fe.thumbsAlignEnd]:ue.align==="end"}),style:{gap:y.scalingValue(ue.grid.gap,l),justifyContent:A?"flex-start":Ie()},children:n.map((we,_)=>{const de=_===$,oe=w[_],re=ue.grid.size*(de?ue.activeState.scale:1),ke=()=>{if(ue.fit!=="fit")return{};if(!oe)return N.direction==="horiz"?{height:y.scalingValue(re,l)}:{width:y.scalingValue(re,l)};const ie=oe.width/oe.height;if(N.direction==="horiz"){const j=re,Ne=j*ie;return{width:y.scalingValue(Ne,l),height:y.scalingValue(j,l)}}else{const j=re,Ne=j/ie;return{width:y.scalingValue(j,l),height:y.scalingValue(Ne,l)}}};return r.jsx("button",{className:Fe.thumbItem,style:{...N.direction==="horiz"&&ue.fit!=="fit"?{height:y.scalingValue(re,l)}:{},...N.direction==="vert"&&ue.fit!=="fit"?{width:y.scalingValue(re,l)}:{},...ue.fit==="cover"?{width:y.scalingValue(re,l),height:y.scalingValue(re,l)}:{},...ke(),transition:de?"all 0.25s ease-out":"none",opacity:de?ue.activeState.opacity/100:ue.opacity/100,"--thumb-hover":ue.activeState.opacity/100},onClick:ie=>{var j;ie.stopPropagation(),R(_),(j=h.current)==null||j.go(_)},onMouseEnter:()=>{var ie;ue.triggers==="hov"&&((ie=h.current)==null||ie.go(_))},children:r.jsx("img",{src:we.image.url,alt:we.image.name??"",onLoad:ie=>{const j=ie.currentTarget;j.naturalWidth&&j.naturalHeight&&W(Ne=>({...Ne,[_]:{width:j.naturalWidth,height:j.naturalHeight}}))},style:{objectFit:ue.fit==="cover"?"cover":"contain",...ue.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ue.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${we.image.name}-${_}`)})})})})()]})]}),document.getElementById(s))};function hs({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.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 Lp={element:Cp,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 Po(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ip(e){return`
|
|
6
|
+
*/const bu="RichTextRenderer-module__link___BWeZ2",wu={link:bu},Su=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},wr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Su(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function cn(e){const{color:t,...n}=e;return n}function Xt(e,t){var o,s,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:wr(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:i!==void 0?y.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}const pi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:wu.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:$u(i),children:i.text},o));return r.jsx(r.Fragment,{children:e.map((n,i)=>{const o=n.children;return r.jsx("div",{children:t(o)},i)})})};function $u(e){return{...e.fontFamily&&{fontFamily:wr(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 Cu="SvgImage-module__svg___q3xE-",Tu="SvgImage-module__img___VsTm-",cs={svg:Cu,img:Tu},Lu=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Iu=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,on=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,l]=a.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return a.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(d)}},[]),!Lu(e)||!s?r.jsx("img",{src:e,alt:"",className:nt(cs.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:nt(cs.svg,i),style:{"--svg":Iu(e),"--fill":t,"--hover-fill":n,...o??{}}})},Ru={"top-left":Ue.topLeftAlignment,"top-center":Ue.topCenterAlignment,"top-right":Ue.topRightAlignment,"middle-left":Ue.middleLeftAlignment,"middle-center":Ue.middleCenterAlignment,"middle-right":Ue.middleRightAlignment,"bottom-left":Ue.bottomLeftAlignment,"bottom-center":Ue.bottomCenterAlignment,"bottom-right":Ue.bottomRightAlignment};function Eu({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=a.useState(null),{widthSettings:l,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:m,fontSizeLineHeight:x,textAppearance:b,color:T}=n.imageCaption??{},[f,L]=a.useState(void 0),[$,R]=a.useState(null),[A,C]=a.useState(0),[U,E]=a.useState(0),{direction:O,transition:I,controls:w,pagination:F,imageCaption:h,triggers:S}=e,M=a.useRef(I.type),{x:z,y:K}=e.controls.offset,se=Y=>{o&&o.go(Y)};return a.useEffect(()=>{if(!$)return;const Y=new ResizeObserver(D=>{if(!o)return;const[N]=D;L({width:Math.round(N.contentRect.width),height:Math.round(N.contentRect.height)})});return Y.observe($),()=>Y.unobserve($)},[$]),a.useEffect(()=>{!o||M.current===I.type||(E(Y=>Y+1),M.current=I.type)},[I.type]),r.jsx("div",{className:nt(Ue.wrapper,{[Ue.editor]:i}),ref:R,children:r.jsxs("div",{className:Ue.sliderInner,style:{width:f?f.width:"100%",height:f?f.height:"100%",backgroundColor:I.backgroundColor&&I.type==="fade in"?I.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:nt(Ue.captionBlock),children:r.jsx("div",{className:Ue.captionTextWrapper,children:t.map((Y,D)=>r.jsx("div",{className:nt(Ue.captionText,Ru[h.alignment],{[Ue.withPointerEvents]:D===A&&i,[Ue.active]:D===A}),style:{fontFamily:wr(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":y.scalingValue(l.width,i),letterSpacing:y.scalingValue(c,i),wordSpacing:y.scalingValue(m,i),textAlign:u,fontSize:y.scalingValue(x.fontSize,i),lineHeight:y.scalingValue(x.lineHeight,i),textTransform:b.textTransform??"none",textDecoration:b.textDecoration??"none",fontVariant:b.fontVariant??"normal",color:T,transitionDuration:I.duration?`${Math.round(parseInt(I.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Ue.captionTextInner,style:{"--link-hover-color":h.linkHoverColor,"--link-color":h.linkColor,position:"relative",top:y.scalingValue(h.offset.y,i),left:y.scalingValue(h.offset.x,i)},children:r.jsx(pi,{content:Y.imageCaption})})},D))})}),r.jsx(xr,{onMove:Y=>{C(Y.index)},ref:s,options:{arrows:!1,speed:I.duration?parseInt(I.duration):500,autoplay:S.autoPlay!==null,...S.autoPlay!==null&&{interval:parseInt(S.autoPlay)*1e3},direction:O==="horiz"||I.type==="fade in"?"ltr":"ttb",pagination:!1,drag:S.triggersList.drag,perPage:1,width:f?f.width:"100%",height:f?f.height:"100%",type:I.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((Y,D)=>r.jsx(br,{children:r.jsx("div",{className:Ue.sliderItem,children:r.jsx("div",{className:Ue.imgWrapper,children:r.jsx("img",{className:nt(Ue.sliderImage,{[Ue.contain]:Y.image.objectFit==="contain",[Ue.cover]:Y.image.objectFit==="cover"}),src:Y.image.url,alt:Y.image.name??""})})})},D))},U),w.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:nt(Ue.arrow,{[Ue.arrowVertical]:O==="vert",[Ue.hoverArrow]:w.show==="on hover"}),style:{color:w.color,"--arrow-hover-color":w.hover},children:r.jsxs("button",{onClick:()=>{se("-1")},className:Ue.arrowInner,style:{transform:`translate(${y.scalingValue(z,i)}, ${y.scalingValue(K*(O==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${O==="horiz"?"0deg":"90deg"})`},children:[w.arrowsImgUrl&&r.jsx(on,{url:w.arrowsImgUrl,fill:w.color,hoverFill:w.hover,className:nt(Ue.arrowImg,Ue.mirror)}),!w.arrowsImgUrl&&r.jsx(ds,{color:w.color,className:nt(Ue.arrowIcon,Ue.arrowImg,Ue.mirror)})]})}),r.jsx("div",{className:nt(Ue.arrow,Ue.nextArrow,{[Ue.arrowVertical]:O==="vert",[Ue.hoverArrow]:w.show==="on hover"}),style:{color:w.color,"--arrow-hover-color":w.hover},children:r.jsxs("button",{className:Ue.arrowInner,onClick:()=>se("+1"),style:{transform:`translate(${y.scalingValue(z*(O==="horiz"?-1:1),i)}, ${y.scalingValue(K,i)}) scale(${e.controls.scale/100}) rotate(${O==="horiz"?"0deg":"90deg"})`},children:[w.arrowsImgUrl&&r.jsx(on,{url:w.arrowsImgUrl,fill:w.color,hoverFill:w.hover,className:Ue.arrowImg}),!w.arrowsImgUrl&&r.jsx(ds,{color:w.color,className:nt(Ue.arrowIcon,Ue.arrowImg)})]})})]}),S.triggersList.click&&r.jsx("div",{className:Ue.clickOverlay,onClick:()=>{o&&o.go("+1")}}),F.isActive&&r.jsx("div",{className:nt(Ue.pagination,{[Ue.paginationInsideBottom]:F.position==="inside-1"&&O==="horiz",[Ue.paginationInsideTop]:F.position==="inside-2"&&O==="horiz",[Ue.paginationOutsideBottom]:F.position==="outside-1"&&O==="horiz",[Ue.paginationOutsideTop]:F.position==="outside-2"&&O==="horiz",[Ue.paginationInsideLeft]:F.position==="inside-1"&&O==="vert",[Ue.paginationInsideRight]:F.position==="inside-2"&&O==="vert",[Ue.paginationOutsideLeft]:F.position==="outside-1"&&O==="vert",[Ue.paginationOutsideRight]:F.position==="outside-2"&&O==="vert",[Ue.paginationVertical]:O==="vert"}),children:r.jsx("div",{className:Ue.paginationInner,style:{backgroundColor:F.colors[2],transform:`scale(${F.scale/100}) translate(${y.scalingValue(F.offset.x,i)}, ${y.scalingValue(F.offset.y,i)}) rotate(${O==="horiz"?"0deg":"90deg"})`},children:t.map((Y,D)=>r.jsx("button",{onClick:()=>{o&&o.go(D)},className:nt(Ue.paginationItem),children:r.jsx("div",{className:nt(Ue.dot,{[Ue.activeDot]:D===A}),style:{backgroundColor:D===A?F.colors[0]:F.colors[1],"--pagination-hover-color":F.hover}})},D))})})]})})}function ds({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.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 Mu={element:Eu,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"]}},ku="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Au="ImageRevealSlider-module__image___Qjt-e",Pu="ImageRevealSlider-module__link___N-iLG",Wu="ImageRevealSlider-module__cursor___2U03d",yi={imageRevealSlider:ku,image:Au,link:Pu,cursor:Wu};function us(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*s,d=s/2,c=l/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function Fr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Fu(e,t,n,i){let o,s;if(t==="custom"){o=n;const l=await Fr(e);s=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Fr(e);s=l.height/l.width*o}else{const l=await Fr(e);o=l.width,s=l.height}return{width:o,height:s,finalWidth:`${o}px`}}function _u({settings:e,content:t,isEditor:n}){const[i,o]=a.useState(null),[s,l]=a.useState([]),[d,c]=a.useState(0),u=a.useRef(0),[m,x]=a.useState({x:0,y:0}),[b,T]=a.useState(1),[f,L]=a.useState("none"),$=a.useRef({x:0,y:0}),[R,A]=a.useState(!1),{sizeType:C,imageWidth:U,randomRangeImageWidth:E}=e.imageSize,{revealPosition:O,visible:I}=e.position,{cursorType:w,target:F,defaultCursorScale:h,defaultCursor:S,hoverCursorScale:M,hoverCursor:z}=e.cursor;a.useEffect(()=>{if(!i)return;const Y=(W,P)=>{const q=i.getBoundingClientRect(),G=W-q.left,Z=P-q.top;if(x({x:G,y:Z}),w==="system"){L("none"),T(1);return}const _=G,me=Z,v=document.elementFromPoint(q.left+_,q.top+me);if(v&&v.closest("a")){L("none"),T(1);return}const fe=us(_,me,s)||F==="area"?{img:z??"none",scale:M}:{img:S??"none",scale:h};L(fe.img),T(fe.scale)},D=W=>{W.stopPropagation(),$.current={x:W.clientX,y:W.clientY},Y(W.clientX,W.clientY)},N=()=>{R&&Y($.current.x,$.current.y)};return i.addEventListener("mousemove",D),window.addEventListener("scroll",N,!0),()=>{i.removeEventListener("mousemove",D),window.removeEventListener("scroll",N,!0)}},[i,R,m,w,F,z,S,M,h,s]),a.useEffect(()=>{R||(L("none"),T(0))},[R]);const K=async(Y,D,N,W={})=>{const{width:P,height:q,finalWidth:G}=await Fu(Y.image.url,C,U,E);let Z=0,_=0;O==="same"?(Z=D/2,_=N/2):(Z=W.x??Math.random()*D,_=W.y??Math.random()*N);const me=Math.min(Math.max(Z,P/2),D-P/2),v=Math.min(Math.max(_,q/2),N-q/2);return{id:u.current++,url:Y.image.url,link:Y.link,name:Y.image.name,x:me,y:v,width:G}};a.useEffect(()=>{if(!i||t.length===0)return;const Y=i.getBoundingClientRect(),D=Y.width,N=Y.height,W=[];(async()=>{const q=t[0],G=await K(q,D,N);W.push(G),l(W),c(1)})()},[C,U,E,O,i]),a.useEffect(()=>{I==="last One"&&l(Y=>Y.length>0?[Y[Y.length-1]]:[])},[I]);const se=async Y=>{if(!i)return;const D=i.getBoundingClientRect(),N=Y.clientX-D.left,W=Y.clientY-D.top;if(F==="image"&&!us(N,W,s))return;let P=0,q=0;O==="on Click"?(P=N,q=W):O==="same"?(P=D.width/2,q=D.height/2):(P=Math.random()*D.width,q=Math.random()*D.height);const G=t[d],Z=await K(G,D.width,D.height,{x:P,y:q});l(_=>I==="all"?[..._,Z]:[Z]),c(_=>_>=t.length-1?0:_+1)};return r.jsxs("div",{ref:o,onClick:se,onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),className:yi.imageRevealSlider,style:{cursor:f==="none"?"default":"none"},children:[s.map(Y=>r.jsx("div",{className:yi.wrapper,style:{top:`${Y.y}px`,left:`${Y.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:Y.width??"auto",height:"auto",cursor:f==="none"?"default":"none"},children:F==="area"&&Y.link?r.jsx("a",{href:Y.link,target:"_blank",className:yi.link,children:r.jsx("img",{src:Y.url,alt:Y.name,className:yi.image},Y.id)}):r.jsx("img",{src:Y.url,alt:Y.name,className:yi.image},Y.id)},Y.id)),R&&r.jsx("div",{className:yi.cursor,style:{left:`${m.x}px`,top:`${m.y}px`,transform:`translate(-50%, -50%) scale(${b})`,backgroundImage:`url('${f}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Nu={element:_u,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:""}]}}}},Hu="LightBox-module__hidden___9s-9x",Ou="LightBox-module__heroImage___sTxNF",ju="LightBox-module__background___rm9ml",zu="LightBox-module__editor___4ACaY",Bu="LightBox-module__contentStyle___Bgnsq",Du="LightBox-module__imageStyle___tLIlB",Vu="LightBox-module__imgWrapper___LuFUp",Gu="LightBox-module__contain___8-yaS",qu="LightBox-module__cover___hNvOG",Ku="LightBox-module__caption___b6L2I",Uu="LightBox-module__captionTextInner___rCGNH",Xu="LightBox-module__lightboxSplide___XFuWC",Yu="LightBox-module__arrow___iz38X",Zu="LightBox-module__arrowVertical___Zfz81",Ju="LightBox-module__nextArrow___zkAQN",Qu="LightBox-module__arrowInner___p48sW",ep="LightBox-module__arrowIcon___3VaFf",tp="LightBox-module__arrowImg___pNV88",np="LightBox-module__mirror___pjeXc",ip="LightBox-module__thumbsWrapper___GB-nU",op="LightBox-module__thumbsContainerVertical___wttk5",rp="LightBox-module__thumbsContainer___osSma",ap="LightBox-module__thumbsAlignStart___MO6tY",sp="LightBox-module__thumbsAlignCenter___Q4sUx",lp="LightBox-module__thumbsAlignEnd___p4y9R",cp="LightBox-module__thumbItem___HvnF3",dp="LightBox-module__closeButton___g2khP",up="LightBox-module__fadeIn___0m5GW",pp="LightBox-module__slideInLeft___gPYwC",mp="LightBox-module__slideInRight___S-pPp",gp="LightBox-module__slideInTop___DFdAj",hp="LightBox-module__slideInBottom___m27kZ",fp="LightBox-module__fadeOut___55qBR",yp="LightBox-module__slideOutLeft___NvU7P",vp="LightBox-module__slideOutRight___SK7eC",xp="LightBox-module__slideOutTop___Vgg0z",bp="LightBox-module__slideOutBottom___nJ0Ef",wp="LightBox-module__scaleSlide___vZriG",We={hidden:Hu,heroImage:Ou,background:ju,editor:zu,contentStyle:Bu,imageStyle:Du,imgWrapper:Vu,contain:Gu,cover:qu,caption:Ku,captionTextInner:Uu,lightboxSplide:Xu,arrow:Yu,arrowVertical:Zu,nextArrow:Ju,arrowInner:Qu,arrowIcon:ep,arrowImg:tp,mirror:np,thumbsWrapper:ip,thumbsContainerVertical:op,thumbsContainer:rp,thumbsAlignStart:ap,thumbsAlignCenter:sp,thumbsAlignEnd:lp,thumbItem:cp,closeButton:dp,fadeIn:up,slideInLeft:pp,slideInRight:mp,slideInTop:gp,slideInBottom:hp,fadeOut:fp,slideOutLeft:yp,slideOutRight:vp,slideOutTop:xp,slideOutBottom:bp,scaleSlide:wp},Mo=(e,t,n)=>{const i={},[o,s]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),s==="left"?(i.left="0",i.right="auto"):s==="center"?(i.left="50%",i.right="auto"):s==="right"&&(i.left="auto",i.right="0"),o==="middle"&&s==="center"?i.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), calc(-50% + ${y.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${y.scalingValue(t.x,n)}, calc(-50% + ${y.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), ${y.scalingValue(t.y,n)})`:i.transform=`translate(${y.scalingValue(t.x,n)}, ${y.scalingValue(t.y,n)})`,i};function Gl(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 ir(e){const t=e.getBoundingClientRect(),n=Gl(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,l=e.naturalHeight,d=i/o,c=s/l;let u,m;c>d?(u=i,m=i/c):(m=o,u=o*c);const x=t.left+n.left,b=t.top+n.top,T=(i-u)/2+x,f=(o-m)/2+b;return{x:T,y:f,width:u,height:m}}function ps(e){const t=e.getBoundingClientRect(),n=Gl(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function ms(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const i=t[1].split(",").map(o=>parseFloat(o.trim()));return i.length===4?i[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const i=n[1].substring(6,8);return parseInt(i,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Sp(e,t){const n=(()=>{if(e==="fade in")return We.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return We.slideInLeft;case"right":return We.slideInRight;case"top":return We.slideInTop;case"bottom":return We.slideInBottom;default:return We.slideInRight}return We.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return We.fadeIn;if(e==="slide in")switch(t){case"left":return We.slideInLeft;case"right":return We.slideInRight;case"top":return We.slideInTop;case"bottom":return We.slideInBottom;default:return We.slideInRight}return We.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return We.fadeOut;if(e==="slide in")switch(t){case"left":return We.slideOutLeft;case"right":return We.slideOutRight;case"top":return We.slideOutTop;case"bottom":return We.slideOutBottom;default:return We.slideOutRight}return We.fadeOut})(),s=(()=>{if(e==="fade in")return We.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return We.slideOutLeft;case"right":return We.slideOutRight;case"top":return We.slideOutTop;case"bottom":return We.slideOutBottom;default:return We.slideOutRight}return We.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const $p=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:l})=>{const[d,c]=a.useState(!1),{url:u}=e.thumbnailBlock.cover;return a.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:u,alt:"Cover",className:We.heroImage,onClick:()=>c(!0)}),r.jsx(Cp,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},Cp=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:l,metadata:d})=>{var Se;const{widthSettings:c,fontSettings:u,letterSpacing:m,textAlign:x,wordSpacing:b,fontSizeLineHeight:T,textAppearance:f,color:L}=i.imageCaption??{},[$,R]=a.useState(0),[A,C]=a.useState(0),[U,E]=a.useState(!1),[O,I]=a.useState(!1),[w,F]=a.useState({}),h=a.useRef(null),S=a.useRef(null),M=a.useRef(null),z=a.useRef(!1),K=a.useRef(null),se=a.useRef(null),Y=a.useRef(null),D=a.useRef(null),N=a.useRef(!1),W=a.useRef(null),[P,q]=a.useState(!1),{appear:G,triggers:Z,slider:_,thumbnail:me,controls:v,area:fe,caption:J,layout:ce}=o.lightboxBlock,{appearClass:Ce,backdropAppearClass:oe,backdropDisappearClass:xe,disappearClass:Q}=Sp(G.type,G.direction),ye=(d==null?void 0:d.itemId)??null;a.useEffect(()=>{const j=()=>{setTimeout(()=>{var H,re;(re=(H=h.current)==null?void 0:H.splide)==null||re.refresh()},16)},de=()=>{C(H=>H+1)};return window.addEventListener("ArticleEditor.Layout:change",j),window.addEventListener("ArticleEditor.ComponentContent:change",de),()=>{window.removeEventListener("ArticleEditor.Layout:change",j),window.removeEventListener("ArticleEditor.ComponentContent:change",de)}},[]),a.useEffect(()=>{if(!e||!me.isActive){q(!1);return}const j=W.current;if(!j)return;const de=()=>{_.direction==="horiz"?q(j.scrollWidth>j.clientWidth):q(j.scrollHeight>j.clientHeight)};de();const H=new ResizeObserver(de);return H.observe(j),()=>H.disconnect()},[e,me.isActive,n.length,w,_.direction]);const ve=a.useCallback(()=>{const j=window.matchMedia("(max-width: 768px)").matches,de=ms(fe.color);j&&!l&&de>.9&&(document.body.style.backgroundColor=""),E(!0),z.current=!0;const H=re=>{re.target===K.current&&re.animationName&&(K.current&&se.current&&K.current.removeEventListener("animationend",se.current),se.current=null,z.current&&(z.current=!1,t()),E(!1))};K.current&&(se.current=H,K.current.addEventListener("animationend",H))},[t,fe.color,l]),Me=(j,de,H)=>{var re,ae;if(j){if(Z.type==="click"&&Z.switch==="image")Z.repeat==="close"&&$===n.length-1?ve():(re=h.current)==null||re.go("+1");else if(Z.type==="click"&&Z.switch==="50/50"){const ne=j.getBoundingClientRect(),ie=de-ne.left,be=H-ne.top,Te=ne.width,ee=ne.height;let pe;_.direction==="horiz"?pe=ie<Te/2?"-1":"+1":pe=be<ee/2?"-1":"+1",(ae=h.current)==null||ae.go(pe)}}},we=j=>{if(N.current){N.current=!1;return}const de=n[$],H=(de==null?void 0:de.image.objectFit)==="cover";let re,ae;if("changedTouches"in j&&j.changedTouches.length>0)re=j.changedTouches[0].clientX,ae=j.changedTouches[0].clientY;else if("clientX"in j)re=j.clientX,ae=j.clientY;else return;let ne;if(H&&M.current){const ie=ps(M.current);ne=re>=ie.left&&re<=ie.right&&ae>=ie.top&&ae<=ie.bottom}else{const ie=M.current?ir(M.current):null;if(!ie){j.target===j.currentTarget&&ve();return}ne=re>=ie.x&&re<=ie.x+ie.width&&ae>=ie.y&&ae<=ie.y+ie.height}ne?Me(M.current,re,ae):ve()},Ae=j=>{const de=j.target;(de.classList.contains(We.thumbsWrapper)||de.classList.contains(We.thumbsContainer))&&we(j)};a.useEffect(()=>{if(!e)return;const j=de=>{var H,re;if(de.key==="Escape"){ve();return}if(de.key==="ArrowRight"){R(ae=>(ae+1)%Math.max(n.length,1)),(H=h.current)==null||H.go("+1");return}de.key==="ArrowLeft"&&(R(ae=>(ae-1+Math.max(n.length,1))%Math.max(n.length,1)),(re=h.current)==null||re.go("-1"))};return window.addEventListener("keydown",j),()=>{window.removeEventListener("keydown",j)}},[e,ve,n.length]),a.useEffect(()=>{if(e){if(R(0),C(de=>de+1),z.current=!1,E(!1),I(!1),F({}),!ye)return;const j=new CustomEvent("page-overlay",{detail:{itemId:ye}});window.dispatchEvent(j)}return()=>{K.current&&se.current&&(K.current.removeEventListener("animationend",se.current),se.current=null),I(!1)}},[e,ye]),a.useEffect(()=>{S.current!==null&&S.current!==_.type&&C(j=>j+1),S.current=_.type},[_.type]),a.useEffect(()=>{if(!e)return;const j=document.body.style.overflow,de=window.matchMedia("(max-width: 768px)").matches,H=ms(fe.color);document.body.style.overflow="hidden",I(!1);const re=ne=>{ne.target===K.current&&!z.current&&ne.animationName&&(de&&!l&&H>.9&&(document.body.style.backgroundColor=fe.color),I(!0),K.current&&Y.current&&K.current.removeEventListener("animationend",Y.current),Y.current=null)};K.current&&(Y.current=re,K.current.addEventListener("animationend",re));const ae=ne=>{const ie=ne.target;ie&&(ie.closest(`.${We.thumbsWrapper}`)||ie.closest(`.${We.thumbsContainer}`))||_.type!=="slide"&&ne.preventDefault()};return document.addEventListener("touchmove",ae,{passive:!1}),()=>{document.body.style.overflow=j,document.removeEventListener("touchmove",ae),K.current&&Y.current&&(K.current.removeEventListener("animationend",Y.current),Y.current=null),I(!1)}},[e,l,fe.color,_.type]),a.useEffect(()=>{if(!e)return;const j=de=>{var re,ae;if(z.current){de.stopPropagation();return}if(N.current){N.current=!1;return}const H=de.target;if(!(H&&(H.closest(`.${We.thumbsContainer}`)||H.closest(`.${We.thumbItem}`)||H.closest(`.${We.arrow}`)||H.closest(`.${We.closeButton}`)||H.closest(`.${We.caption}`)))){if(_.type==="slide"&&Z.type==="drag"&&((ae=(re=h.current)==null?void 0:re.splide)!=null&&ae.root)){const ne=h.current.splide.root;if(H&&(ne.contains(H)||ne===H))return}if(de.touches.length===0&&de.changedTouches.length>0){const ne=n[$],ie=(ne==null?void 0:ne.image.objectFit)==="cover",be=de.changedTouches[0];let Te;if(ie&&M.current){const ee=ps(M.current);Te=be.clientX>=ee.left&&be.clientX<=ee.right&&be.clientY>=ee.top&&be.clientY<=ee.bottom}else{const ee=M.current?ir(M.current):null;if(!ee)return;Te=be.clientX>=ee.x&&be.clientX<=ee.x+ee.width&&be.clientY>=ee.y&&be.clientY<=ee.y+ee.height}if(!Te){de.stopPropagation(),z.current=!0;const ee=pe=>{pe.stopPropagation(),pe.preventDefault(),document.removeEventListener("click",ee,!0)};document.addEventListener("click",ee,!0),ve()}}}};return document.addEventListener("touchend",j,{passive:!0}),()=>{document.removeEventListener("touchend",j)}},[e,ve,$,n]);const X=(_.type==="scale"||_.type==="fade")&&_.direction==="vert"&&Z.type==="drag";a.useEffect(()=>{var pe,Pe;if(!e||!X||!((Pe=(pe=h.current)==null?void 0:pe.splide)!=null&&Pe.root))return;const j=h.current.splide.root,de=30,H=(le,V)=>{if(D.current){const He=Math.abs(le-D.current.x),Fe=Math.abs(V-D.current.y);(He>0||Fe>0)&&(N.current=!0)}},re=le=>{D.current&&(le.preventDefault(),H(le.clientX,le.clientY))},ae=le=>{D.current&&le.touches.length>0&&(le.preventDefault(),H(le.touches[0].clientX,le.touches[0].clientY))},ne=(le,V)=>{if(!D.current||!h.current){D.current=null;return}const He=Math.abs(le-D.current.x),Fe=Math.abs(V-D.current.y);Fe>de&&Fe>He&&h.current.go(V<D.current.y?"+1":"-1"),D.current=null},ie=le=>{D.current&&ne(le.clientX,le.clientY),document.removeEventListener("pointerup",ie),document.removeEventListener("pointercancel",ie),document.removeEventListener("pointermove",re)},be=le=>{if(D.current){if(le.changedTouches.length>0){const V=le.changedTouches[0];ne(V.clientX,V.clientY)}document.removeEventListener("touchend",be),document.removeEventListener("touchcancel",be),document.removeEventListener("touchmove",ae)}},Te=le=>{D.current={x:le.clientX,y:le.clientY},N.current=!1,document.addEventListener("pointermove",re,{passive:!1}),document.addEventListener("pointerup",ie),document.addEventListener("pointercancel",ie)},ee=le=>{le.touches.length>0&&(D.current={x:le.touches[0].clientX,y:le.touches[0].clientY},N.current=!1,document.addEventListener("touchmove",ae,{passive:!1}),document.addEventListener("touchend",be),document.addEventListener("touchcancel",be))};return j.addEventListener("pointerdown",Te),j.addEventListener("touchstart",ee),()=>{j.removeEventListener("pointerdown",Te),j.removeEventListener("touchstart",ee),document.removeEventListener("pointermove",re),document.removeEventListener("pointerup",ie),document.removeEventListener("pointercancel",ie),document.removeEventListener("touchmove",ae),document.removeEventListener("touchend",be),document.removeEventListener("touchcancel",be),D.current=null,N.current=!1}},[e,X,A]);const ue={backgroundColor:fe.color,backdropFilter:`blur(${fe.blur}px)`,animationDuration:`${parseInt(G.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:mi.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:l?null:K,className:nt(We.background,U?xe:oe,{[We.editor]:l},{[We.hidden]:!e}),style:{...ue,...O&&!l&&!U?{position:"absolute"}:{}}}),r.jsxs("div",{ref:l?K:null,className:nt(We.contentStyle,U?Q:Ce,{[We.editor]:l},{[We.hidden]:!e}),style:{animationDuration:`${parseInt(G.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(xr,{onMove:j=>R(j.index),ref:h,className:We.lightboxSplide,options:{arrows:!1,speed:_.duration?parseInt(_.duration):500,direction:_.direction==="horiz"||_.type==="fade"||_.type==="scale"?"ltr":"ttb",pagination:!1,drag:Z.type==="drag"&&!X,perPage:1,width:"100%",height:"100%",type:_.type==="fade"||_.type==="scale"?"fade":"loop",padding:0,rewind:Z.repeat!=="close",start:0},style:{"--splide-speed":_.duration},children:n.map((j,de)=>{const H=Mo(ce.position,ce.offset,l),re=`${y.scalingValue(ce.padding.top,l)} ${y.scalingValue(ce.padding.right,l)} ${y.scalingValue(ce.padding.bottom,l)} ${y.scalingValue(ce.padding.left,l)}`,ae=_.type==="scale"?(()=>{const{transform:ne,...ie}=H;return{...ie,position:"absolute",padding:re,boxSizing:"border-box","--position-transform":ne||"none"}})():{...H,position:"absolute",padding:re,boxSizing:"border-box"};return r.jsx(br,{children:r.jsx("div",{className:We.imgWrapper,onClick:we,children:r.jsx("img",{ref:de===$?M:null,className:nt(We.imageStyle,{[We.contain]:j.image.objectFit==="contain",[We.cover]:j.image.objectFit==="cover",[We.scaleSlide]:_.type==="scale"}),src:j.image.url,alt:j.image.name??"",style:{...ae,pointerEvents:j.image.objectFit==="contain"?"none":"auto"}})})},de)})},A),v.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:nt(We.arrow,{[We.arrowVertical]:_.direction==="vert"}),style:{color:v.color,"--arrow-hover-color":v.hover},children:r.jsxs("button",{className:We.arrowInner,style:{transform:`translate(${y.scalingValue(v.offset.x,l)}, ${y.scalingValue(v.offset.y*(_.direction==="horiz"?1:-1),l)}) scale(${v.scale}) rotate(${_.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var j;return(j=h.current)==null?void 0:j.go("-1")},"aria-label":"Previous",children:[v.arrowsImgUrl&&r.jsx(on,{url:v.arrowsImgUrl,fill:v.color,hoverFill:v.hover,className:nt(We.arrowImg,We.mirror)}),!v.arrowsImgUrl&&r.jsx(gs,{color:v.color,className:nt(We.arrowIcon,We.arrowImg,We.mirror)})]})}),r.jsx("div",{className:nt(We.arrow,We.nextArrow,{[We.arrowVertical]:_.direction==="vert"}),style:{color:v.color,"--arrow-hover-color":v.hover},children:r.jsxs("button",{className:We.arrowInner,style:{transform:`translate(${y.scalingValue(v.offset.x*(_.direction==="horiz"?-1:1),l)}, ${y.scalingValue(v.offset.y,l)}) scale(${v.scale}) rotate(${_.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var j;return(j=h.current)==null?void 0:j.go("+1")},"aria-label":"Next",children:[v.arrowsImgUrl&&r.jsx(on,{url:v.arrowsImgUrl,fill:v.color,hoverFill:v.hover,className:We.arrowImg}),!v.arrowsImgUrl&&r.jsx(gs,{color:v.color,className:nt(We.arrowIcon,We.arrowImg)})]})})]}),fe.closeIconUrl&&(()=>{const j=Mo(fe.closeIconAlign,fe.closeIconOffset,l),de=`scale(${fe.closeIconScale})`,H=j.transform?`${j.transform} ${de}`:de;return r.jsx("button",{className:We.closeButton,style:{...j,transform:H},onClick:ve,"aria-label":"Close lightbox",children:r.jsx(on,{url:fe.closeIconUrl,fill:fe.closeIconColor??"#000000",hoverFill:fe.closeIconHover??"#cccccc"})})})(),J&&J.isActive&&i.imageCaption&&((Se=n[$])==null?void 0:Se.imageCaption)&&r.jsx("div",{className:We.caption,style:{...Mo(J.alignment,J.offset,l),fontFamily:wr(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":y.scalingValue(c.width,l),letterSpacing:y.scalingValue(m,l),wordSpacing:y.scalingValue(b,l),textAlign:x,fontSize:y.scalingValue(T.fontSize,l),lineHeight:y.scalingValue(T.lineHeight,l),textTransform:f.textTransform??"none",textDecoration:f.textDecoration??"none",fontVariant:f.fontVariant??"normal",color:L},onClick:j=>j.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:We.captionTextInner,style:{"--link-color":J.linkColor,"--link-hover-color":J.linkHoverColor},children:r.jsx(pi,{content:n[$].imageCaption})})}),me.isActive&&(()=>{const[j,de]=me.position.split("-"),H=_.direction==="horiz"?`${j}-left`:me.position,re=Mo(H,me.offset,l),ae=()=>{if(_.direction==="horiz"){if(de==="left")return"flex-start";if(de==="center")return"center";if(de==="right")return"flex-end"}else{if(j==="top")return"flex-start";if(j==="middle")return"center";if(j==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:W,className:We.thumbsWrapper,onClick:ne=>Ae(ne),style:{position:l?"absolute":"fixed",...re,..._.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:nt(We.thumbsContainer,{[We.thumbsContainerVertical]:_.direction==="vert",[We.thumbsAlignStart]:me.align==="start",[We.thumbsAlignCenter]:me.align==="center",[We.thumbsAlignEnd]:me.align==="end"}),style:{gap:y.scalingValue(me.grid.gap,l),justifyContent:P?"flex-start":ae()},children:n.map((ne,ie)=>{const be=ie===$,Te=w[ie],pe=me.grid.size*(be?me.activeState.scale:1),Pe=()=>{if(me.fit!=="fit")return{};if(!Te)return _.direction==="horiz"?{height:y.scalingValue(pe,l)}:{width:y.scalingValue(pe,l)};const le=Te.width/Te.height;if(_.direction==="horiz"){const V=pe,He=V*le;return{width:y.scalingValue(He,l),height:y.scalingValue(V,l)}}else{const V=pe,He=V/le;return{width:y.scalingValue(V,l),height:y.scalingValue(He,l)}}};return r.jsx("button",{className:We.thumbItem,style:{..._.direction==="horiz"&&me.fit!=="fit"?{height:y.scalingValue(pe,l)}:{},..._.direction==="vert"&&me.fit!=="fit"?{width:y.scalingValue(pe,l)}:{},...me.fit==="cover"?{width:y.scalingValue(pe,l),height:y.scalingValue(pe,l)}:{},...Pe(),transition:be?"all 0.25s ease-out":"none",opacity:be?me.activeState.opacity/100:me.opacity/100,"--thumb-hover":me.activeState.opacity/100},onClick:le=>{var V;le.stopPropagation(),R(ie),(V=h.current)==null||V.go(ie)},onMouseEnter:()=>{var le;me.triggers==="hov"&&((le=h.current)==null||le.go(ie))},children:r.jsx("img",{src:ne.image.url,alt:ne.image.name??"",onLoad:le=>{const V=le.currentTarget;V.naturalWidth&&V.naturalHeight&&F(He=>({...He,[ie]:{width:V.naturalWidth,height:V.naturalHeight}}))},style:{objectFit:me.fit==="cover"?"cover":"contain",...me.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...me.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ne.image.name}-${ie}`)})})})})()]})]}),document.getElementById(s))};function gs({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.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 Tp={element:$p,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 ko(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Lp(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: ${ko(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: ${ko(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: ${ko(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: ${ko(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 Ip({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const l=!!n,d=i&&t||!t,{prefix:c}=y.useScopedStyles(),{type:u="A",fieldsToShow:m=2,fields:x=[],buttonLabel:b,gap:T,fieldsGap:f,buttonCorners:L,buttonStroke:$,buttonPadding:R,isButtonFullWidth:A,inputCorners:C,inputStroke:U,inputPadding:E,inputColor:O,inputTextColor:I,inputBorderColor:w,placeholderColor:F,buttonColor:h,buttonTextColor:S,buttonBorderColor:M,labelTextColor:z,successColor:K,errorColor:se,fontFamily:Y,inputFontSettings:D,inputFontSize:N,inputLineHeight:W,inputLetterSpacing:P,inputWordSpacing:q,inputTextAppearance:G,buttonFontSettings:Z,buttonFontSize:_,buttonLineHeight:me,buttonLetterSpacing:v,buttonWordSpacing:fe,buttonTextAppearance:J,labelFontSettings:ce,labelFontSize:Ce,labelLineHeight:oe,labelLetterSpacing:xe,labelWordSpacing:Q,labelTextAppearance:ye,statusFontSettings:ve,statusFontSize:Me,statusLineHeight:we,statusLetterSpacing:Ae,statusWordSpacing:X,statusTextAppearance:ue,successMessage:Se,errorMessage:j,stateOverrides:de}=e,H=u==="B",re=x.slice(0,Math.min(m,x.length)),ae={fontSettings:{fontFamily:Y,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:N??.01,lineHeight:W,letterSpacing:P??0,wordSpacing:q??0,textAppearance:G,color:I},ne=cn(Xt(ae,t)),ie=y.scalingValue(U??0,t),be=y.scalingValue((W??N??.01)+((E==null?void 0:E.top)??0)+((E==null?void 0:E.bottom)??0)+(u==="C"?U??0:(U??0)*2),t),Te={...ne,borderStyle:"solid",borderRadius:u==="C"?0:y.scalingValue(C??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ie,borderLeftWidth:0}:{borderWidth:ie},paddingTop:y.scalingValue((E==null?void 0:E.top)??0,t),paddingRight:y.scalingValue((E==null?void 0:E.right)??0,t),paddingBottom:y.scalingValue((E==null?void 0:E.bottom)??0,t),paddingLeft:y.scalingValue((E==null?void 0:E.left)??0,t),height:be,minHeight:be},ee={fontSettings:{fontFamily:Y,fontWeight:(Z==null?void 0:Z.fontWeight)??400,fontStyle:(Z==null?void 0:Z.fontStyle)??"normal"},fontSize:_??.01,lineHeight:me,letterSpacing:v??0,wordSpacing:fe??0,textAppearance:J,color:S},pe=cn(Xt(ee,t)),Pe=y.scalingValue($??0,t),le={fontSettings:{fontFamily:Y,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:Ce??.01,lineHeight:oe,letterSpacing:xe??0,wordSpacing:Q??0,textAppearance:ye,color:z},V=Xt(le,t),He={fontSettings:{fontFamily:Y,fontWeight:(ve==null?void 0:ve.fontWeight)??400,fontStyle:(ve==null?void 0:ve.fontStyle)??"normal"},fontSize:Me??.01,lineHeight:we,letterSpacing:Ae??0,wordSpacing:X??0,textAppearance:ue,color:K},Fe=cn(Xt(He,t)),Qe=y.buildColorVars(c,{inputColor:O,inputTextColor:I,inputBorderColor:w,placeholderColor:F!=null&&F.trim()?F:"#cccccc",buttonColor:h,buttonTextColor:S,buttonBorderColor:M,labelTextColor:z,successColor:K,errorColor:se},Rp,Ep,de),[Xe,lt]=a.useState(()=>Object.fromEntries(re.map(De=>[De.name,""]))),[pt,Be]=a.useState("idle"),[rt,Tt]=a.useState(null),at=s==="success"?"success":s==="error"?"error":pt,Ke=s==="error"?j:rt,gt=s==="filled",bt=a.useMemo(()=>{if(!gt)return Xe;let De=null;for(const Ve of re)(Xe[Ve.name]??"").trim().length>0||(De=De??{...Xe},De[Ve.name]="Filled");return De??Xe},[Xe,gt,re]),mt=at==="error"?y.getFormFieldValidationError(re,bt):null,Wt=`${s&&s!=="default"?`${c}-state-${s}`:""}`.trim(),et=o==null?void 0:o.submitUrl,St=(De,Ve)=>{lt(_e=>({..._e,[De]:Ve}))},$t=async De=>{if(De.preventDefault(),!d)return;const Ve=Object.fromEntries(re.map(ht=>{var It;return[ht.name,((It=Xe[ht.name])==null?void 0:It.trim())??""]}).filter(([,ht])=>ht));if(!et){Be("error"),Tt("No integrations were found for this form.");return}if(Object.keys(Ve).length===0)return;const _e=y.getFormFieldValidationError(re,Xe);if(_e){Be("error"),Tt(_e);return}Be("submitting"),Tt(null);try{const ht=await fetch(et,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ve)});if(!ht.ok){const It=await ht.text();throw new Error(It||`Request failed: ${ht.status}`)}Be("success"),lt(Object.fromEntries(re.map(It=>[It.name,""])))}catch(ht){Be("error"),Tt(ht instanceof Error?ht.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${Wt}`.trim(),style:Qe,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Lp(c)}}),r.jsxs("form",{onSubmit:$t,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:re.map((De,Ve)=>r.jsxs(a.Fragment,{children:[Ve>0&&r.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${c}-control`:void 0,style:{height:y.scalingValue(f??0,t)}}),r.jsxs("div",{className:`${c}-field-group${H?` ${c}-labeled`:""}`,children:[H&&r.jsx("span",{className:`${c}-field-label`,style:V?{...V,lineHeight:V.fontSize}:void 0,children:De.label||De.name}),De.type==="textarea"?r.jsx("textarea",{name:De.name,autoComplete:"off",value:bt[De.name]??"",onChange:_e=>St(De.name,_e.target.value),placeholder:De.placeholder,className:`${c}-input`,style:Te,rows:1,"data-filled":gt||(bt[De.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:De.type==="phone"?"tel":De.type==="email"?"email":"text",name:De.name,autoComplete:"off",value:bt[De.name]??"",onChange:_e=>St(De.name,_e.target.value),placeholder:De.placeholder,required:De.isRequired??De.type==="email",className:`${c}-input`,style:Te,"data-filled":gt||(bt[De.name]??"").trim().length>0})]})]},Ve))}),r.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${c}-control`:void 0,style:{height:y.scalingValue(T??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:y.scalingValue(L??0,t),borderWidth:Pe,paddingTop:y.scalingValue((R==null?void 0:R.top)??0,t),paddingRight:y.scalingValue((R==null?void 0:R.right)??0,t),paddingBottom:y.scalingValue((R==null?void 0:R.bottom)??0,t),paddingLeft:y.scalingValue((R==null?void 0:R.left)??0,t),pointerEvents:d?"auto":void 0,...pe,...A?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:A?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:pt==="submitting"?"...":b})})})]}),at==="success"&&r.jsx("p",{className:`${c}-success`,style:{...Fe},children:Se}),at==="error"&&r.jsx("p",{className:`${c}-error`,style:{...Fe},role:"alert",children:mt??Ke??j})]})}const Rp={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"},Ep=["hover","focus","filled","success","error"],Mp=`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
|
-
`,Pp=[{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"}],Ao={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ap=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Fp={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:{...Ao.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:{...Ao.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:{...Ao.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:{...Ao.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:Pp,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#A7A7A7",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:!0,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:.0426,buttonLineHeight:.0426,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},t:{gap:.02604,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.039,buttonPadding:{top:.0195,right:.02604,bottom:.0195,left:.0195},inputPadding:{top:.0195,right:.0195,bottom:.0195,left:.0195},inputFontSize:.02083,inputLineHeight:.02604,buttonFontSize:.02083,buttonLineHeight:.02604,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01},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:[...Ap],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"]},Wp={element:Rp,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300},t:{width:300},m:{width:340}},schema:Fp,sourceCode:Mp,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function Fo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function _p(e){return`
|
|
792
|
+
`,kp=[{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"}],Ao={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ap=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Pp={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:{...Ao.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:{...Ao.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:{...Ao.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:{...Ao.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:kp,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#A7A7A7",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:!0,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:.0426,buttonLineHeight:.0426,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},t:{gap:.02604,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.039,buttonPadding:{top:.0195,right:.02604,bottom:.0195,left:.0195},inputPadding:{top:.0195,right:.0195,bottom:.0195,left:.0195},inputFontSize:.02083,inputLineHeight:.02604,buttonFontSize:.02083,buttonLineHeight:.02604,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01},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:[...Ap],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"]},Wp={element:Ip,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300},t:{width:300},m:{width:340}},schema:Pp,sourceCode:Mp,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function Po(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Fp(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: ${Po(8)};
|
|
975
|
+
font-size: ${Po(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: ${Po(8)};
|
|
980
|
+
font-size: ${Po(14)};
|
|
981
981
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
982
982
|
}
|
|
983
|
-
`}const
|
|
983
|
+
`}const _p=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=y.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:m=1,fontFamily:x,inputFontSettings:b,inputFontSize:T,inputLineHeight:f,inputLetterSpacing:L,inputWordSpacing:$,inputTextAppearance:R,buttonFontSettings:A,buttonFontSize:C,buttonLineHeight:U,buttonLetterSpacing:E,buttonWordSpacing:O,buttonTextAppearance:I,statusFontSettings:w,statusFontSize:F,statusLineHeight:h,statusLetterSpacing:S,statusWordSpacing:M,statusTextAppearance:z,iconMaxWidth:K,minHeight:se,corners:Y,stroke:D,stateOverrides:N,inputPadding:W,buttonPadding:P,successMessage:q="Thanks for subscribing!",errorMessage:G="Please, fill all required fields."}=e,Z=d.slice(0,Math.min(m,d.length)),[_,me]=a.useState(()=>Object.fromEntries(Z.map(le=>[le.name,""]))),[v,fe]=a.useState("idle"),[J,ce]=a.useState(null),Ce=o==="success"?"success":o==="error"?"error":v,oe=o==="error"?G:J,xe=o==="filled",Q=a.useMemo(()=>{if(!xe)return _;let le=null;for(const V of Z)(_[V.name]??"").trim().length>0||(le=le??{..._},le[V.name]="Filled");return le??_},[xe,_,Z]),ye=Ce==="error"?y.getFormFieldValidationError(Z,Q):null,ve=o&&o!=="default"?`${s}-state-${o}`:"",Me=Z.some(le=>(Q[le.name]??"").trim().length>0),we=ve!==`${s}-state-filled`&&Me?`${s}-state-filled`:"",Ae=`${ve} ${we}`.trim(),X=i==null?void 0:i.submitUrl,ue=u??"",Se=(c==null?void 0:c.icon)??"",j=(c==null?void 0:c.mode)==="On",de=ue||"Submit",H={fontSettings:{fontFamily:x,fontWeight:(b==null?void 0:b.fontWeight)??400,fontStyle:(b==null?void 0:b.fontStyle)??"normal"},fontSize:T??.01,lineHeight:f,letterSpacing:L??0,wordSpacing:$??0,textAppearance:R,color:e.inputTextColor??"#111111"},re={fontSettings:{fontFamily:x,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:C??.01,lineHeight:U,letterSpacing:E??0,wordSpacing:O??0,textAppearance:I,color:e.buttonTextColor??"#ffffff"},ae={fontSettings:{fontFamily:x,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:F??.01,lineHeight:h,letterSpacing:S??0,wordSpacing:M??0,textAppearance:z,color:e.successColor??"#22c55e"},ne=cn(Xt(H,t)),ie=cn(Xt(re,t)),be=cn(Xt(ae,t)),Te=y.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(H==null?void 0:H.color)??"#111111",buttonTextColor:e.buttonTextColor??(re==null?void 0:re.color)??"#ffffff"},Np,Hp,N),ee={borderRadius:y.scalingValue(Y,t),borderWidth:y.scalingValue(D,t),borderStyle:"solid"},pe={borderLeftWidth:y.scalingValue(D,t)},Pe=async le=>{if(le.preventDefault(),!l)return;const V=Object.fromEntries(Z.map(Fe=>{var Qe;return[Fe.name,((Qe=_[Fe.name])==null?void 0:Qe.trim())??""]}).filter(([,Fe])=>Fe));if(!X){fe("error"),ce("No integrations were found for this form.");return}if(Object.keys(V).length===0)return;const He=y.getFormFieldValidationError(Z,_);if(He){fe("error"),ce(He);return}fe("submitting"),ce(null);try{const Fe=await fetch(X,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)});if(!Fe.ok){const Qe=await Fe.text();throw new Error(Qe||`Request failed: ${Fe.status}`)}fe("success"),me(Object.fromEntries(Z.map(Qe=>[Qe.name,""])))}catch(Fe){fe("error"),ce(Fe instanceof Error?Fe.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${Ae}`.trim(),style:Te,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Fp(s)}}),r.jsxs("form",{onSubmit:Pe,className:`${s}-form`,style:{...ee,height:y.scalingValue(se,t),minHeight:y.scalingValue(se,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:Z.map(le=>r.jsx("input",{type:le.type==="email"?"email":le.type==="phone"?"tel":"text",name:le.name,autoComplete:"off",value:Q[le.name]??"",onChange:V=>me(He=>({...He,[le.name]:V.target.value})),placeholder:le.placeholder,required:le.isRequired??le.type==="email",className:`${s}-input`,style:{...ne,paddingRight:y.scalingValue(W.right,t),paddingLeft:y.scalingValue(W.left,t),paddingTop:y.scalingValue(W.top,t),paddingBottom:y.scalingValue(W.bottom,t)}},le.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:l?"submit":"button",className:`${s}-submitBtn`,"aria-label":de,style:{...ie,...pe,paddingRight:y.scalingValue(P.right,t),paddingLeft:y.scalingValue(P.left,t),paddingTop:y.scalingValue(P.top,t),paddingBottom:y.scalingValue(P.bottom,t),pointerEvents:l?"auto":void 0},children:v==="submitting"?"...":j?Se&&r.jsx(on,{url:Se,className:`${s}-submitBtnIcon`,style:{maxWidth:y.scalingValue(K??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):ue})})]}),Ce==="success"&&r.jsx("p",{className:`${s}-success`,style:{...be},children:q}),Ce==="error"&&r.jsx("p",{className:`${s}-error`,style:{...be},role:"alert",children:ye??oe??G})]})},Np={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"},Hp=["hover","focus","filled","success","error"],Op=`import React, { useMemo, useState } from 'react';
|
|
984
984
|
import { CommonComponentProps } from '../props';
|
|
985
985
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
|
|
986
986
|
import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
|
|
@@ -1557,7 +1557,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
|
|
|
1557
1557
|
};
|
|
1558
1558
|
|
|
1559
1559
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
1560
|
-
`,zp="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>'),Bp=[{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."}],Nr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Dp=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Vp={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:{...Nr.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:{...Nr.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:{...Nr.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:Bp,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:zp},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:.0053,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},t:{minHeight:.0651,iconMaxWidth:.1,stroke:.001,corners:.0026,buttonPadding:{top:.02604,right:.02604,bottom:.02604,left:.02604},inputPadding:{top:.02604,right:.02604,bottom:.02604,left:.0182},inputFontSize:.0208,inputLineHeight:.02604,buttonFontSize:.0208,buttonLineHeight:.02604,statusFontSize:.0208,statusLineHeight:.02604},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:.0027,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:[...Dp],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"]},Gp={element:Np,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},t:{width:500},m:{width:340}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",statusFontSettings:"fontFamily"},schema:Vp,sourceCode:Op};function qp(e,t){const n=t>0?`${t}px`:"0px";return`
|
|
1560
|
+
`,jp="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>'),zp=[{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."}],_r={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Bp=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Dp={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:{..._r.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:{..._r.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:{..._r.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:zp,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:jp},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:.0053,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},t:{minHeight:.0651,iconMaxWidth:.1,stroke:.001,corners:.0026,buttonPadding:{top:.02604,right:.02604,bottom:.02604,left:.02604},inputPadding:{top:.02604,right:.02604,bottom:.02604,left:.0182},inputFontSize:.0208,inputLineHeight:.02604,buttonFontSize:.0208,buttonLineHeight:.02604,statusFontSize:.0208,statusLineHeight:.02604},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:.0027,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:[...Bp],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"]},Vp={element:_p,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},t:{width:500},m:{width:340}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",statusFontSettings:"fontFamily"},schema:Dp,sourceCode:Op};function Gp(e,t){const n=t>0?`${t}px`:"0px";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;
|
|
|
1689
1689
|
.${e}-image-hover-grayscale:hover video {
|
|
1690
1690
|
filter: grayscale(100%);
|
|
1691
1691
|
}
|
|
1692
|
-
`}const
|
|
1692
|
+
`}const qp=30,Kp=20,Nr=3,Up=12,Xp=32,Yp=3,Zp=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},Jp=(e,t)=>Array.from({length:t},()=>e).flat(),Qp=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},ql=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),hs=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const d=Array.from({length:t},(u,m)=>e.children[m]),c=ql(d);return c<=0?0:c+s*Math.max(0,t-1)},em=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=ql(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+s*Math.max(0,e.children.length-1)+l},tm=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},nm=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>tm(i,e))},im=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??"")},om=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,rm=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:s,imageHoverClass:l,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var M,z,K,se;const m=a.useRef(null),x=!!((M=e.image)!=null&&M.url&&im(e.image));a.useLayoutEffect(()=>{d&&om(m.current)&&(u==null||u())},[d,(z=e.image)==null?void 0:z.url,u]);const b=n.display==="cover",T=n.ratioValue??"1:1",f=n.reversed??!1,[L,$]=T.split(":").map(Number),C=(f?$:L)/(f?L:$),U=i/C,E=U>o?o:U,O=U>o?o*C:i,I=c(O),w=c(E),F={borderRadius:c(s)},h=b?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...F}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",...F},S=((K=e.image)==null?void 0:K.url)&&(x?r.jsx("video",{ref:Y=>{m.current=Y},src:e.image.url,style:h,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:d?u:void 0,onError:d?u:void 0}):r.jsx("img",{ref:Y=>{m.current=Y},src:e.image.url,alt:((se=e.image)==null?void 0:se.name)??"",style:h,onLoad:d?u:void 0,onError:d?u:void 0}));return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...b?{width:I}:{width:"max-content",maxWidth:c(i),minWidth:0}},children:r.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...b?{width:I,height:w,overflow:"hidden",...F}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:S&&e.link?r.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:nt(`${t}-marquee-link`,!b&&`${t}-marquee-link-contain`),children:S}):S})})},am=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=y.useScopedStyles(),[l,d]=a.useState(0),c=l>0?Math.round(l):0,u=a.useMemo(()=>Gp(s,c),[s,c]),{speed:m,direction:x,pauseOnHover:b,gap:T,imageMaxWidth:f,imageMaxHeight:L,hoverEffect:$,cornerRadius:R=0}=e,A=a.useMemo(()=>Qp(e.imageFit),[e.imageFit]),C=(t==null?void 0:t.length)??0,U=!!o,E=!n||!!i,O=E&&$!=="off"&&$!=="randomize"?`${s}-image-hover-${$}`:void 0,I=n?!!i:!0,F=((t==null?void 0:t.length)??0)>0&&(I||!!n),h=Math.max(0,m)*qp,S=we=>y.scalingValue(we,n??!1),M=a.useRef(null),z=a.useRef(null),K=a.useRef(null),[se,Y]=a.useState(0),D=I&&b==="on",[N,W]=a.useState(!1),[P,q]=a.useState({}),G=a.useRef(P);G.current=P;const Z=a.useRef(null),_=a.useRef(0),me=a.useRef(null),v=a.useMemo(()=>(t??[]).map(we=>{var Ae;return((Ae=we.image)==null?void 0:Ae.url)??""}).join("\0"),[t]),[fe,J]=a.useState(Nr),ce=a.useMemo(()=>{const we=t??[];return we.length===0||!(I||!!n)?we:Jp(we,fe)},[t,I,fe,n]),Ce=a.useMemo(()=>(t??[]).filter(we=>{var Ae;return!!((Ae=we.image)!=null&&Ae.url)}).length,[t]),oe=F?Yp:1;a.useLayoutEffect(()=>{_.current=0,q({}),Z.current=null,J(Nr),d(0)},[v]),a.useEffect(()=>{if(!E||$!=="randomize")return;const we=M.current;if(!we)return;const Ae=j=>{q(de=>{const H=Array.from(j).filter(ae=>ae in de&&!nm(we,ae));if(H.length===0)return de;const re={...de};return H.forEach(ae=>{delete re[ae]}),re})},X=new IntersectionObserver(j=>{const de=new Set;for(const H of j){const re=H.target.dataset.marqueeItemIndex,ae=re!==void 0?Number(re):NaN;Number.isNaN(ae)||de.add(ae)}de.size>0&&Ae(de)},{root:we,threshold:0});Object.keys(P).forEach(j=>{const de=Number(j);we.querySelectorAll(`[data-marquee-item-index="${de}"]`).forEach(H=>X.observe(H))});const ue={current:0},Se=()=>{const j=Object.keys(G.current);j.length!==0&&(Ae(j.map(Number)),ue.current=requestAnimationFrame(Se))};return Object.keys(G.current).length>0&&(ue.current=requestAnimationFrame(Se)),()=>{cancelAnimationFrame(ue.current),X.disconnect()}},[$,P,E]),a.useLayoutEffect(()=>{if(!F)return;const we=M.current,Ae=K.current;if(!we||!Ae)return;const X={current:0},ue=()=>{const de=we.getBoundingClientRect().width||we.offsetWidth,H=em(Ae),re=Z.current,ae=typeof re=="number"&&Math.abs(re-H)<=.25;Z.current=H;let ne=fe,ie=0;if((I||n)&&C>0&&de>0){const ee=hs(Ae,C);if(ee>=Xp){ie=ee;const pe=Math.min(Up,Math.max(Nr,Math.ceil(de/ee)+1));ne=pe,pe!==fe&&J(pe)}}const Te=ne!==fe&&ie>0?ie*ne:H>0?H:ie>0?ie*ne:(()=>{const ee=hs(Ae,C);return ee>0?ee*ne:0})();Te>0?d(ee=>ee<=0?Te:!ae||Math.round(ee)===Math.round(Te)?ee:Te):!ae&&l<=0&&(cancelAnimationFrame(X.current),X.current=requestAnimationFrame(ue))},Se=()=>{cancelAnimationFrame(X.current),X.current=requestAnimationFrame(ue)};me.current=Se,Se();const j=new ResizeObserver(Se);return j.observe(we),j.observe(Ae),()=>{me.current=null,cancelAnimationFrame(X.current),j.disconnect()}},[I,F,l,v,fe,C,n]),a.useLayoutEffect(()=>{if(!F||c<=0)return;const we=z.current;we&&Zp(we)},[F,c,x,h]),a.useLayoutEffect(()=>{if(!F||l<=0){Y(0);return}const we=z.current,Ae=K.current;if(!we||!Ae)return;const X=()=>{const Se=we.offsetHeight||we.getBoundingClientRect().height,j=Array.from(Ae.children).reduce((H,re)=>Math.max(H,re.offsetHeight||re.getBoundingClientRect().height),0),de=Se>0?Se:j;Y(de>0?de:0)};X();const ue=new ResizeObserver(X);return ue.observe(we),ue.observe(Ae),()=>ue.disconnect()},[F,oe,ce,n,T,f,L,l,A,P]),a.useLayoutEffect(()=>{if(!n||!U||!F||typeof window>"u")return;const we=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(we)},[n,U,F,x,l,se,T,ce]);const xe=()=>{D&&W(!0)},Q=()=>{D&&W(!1)},ye=a.useCallback(()=>{var we;_.current=Math.min(Ce,_.current+1),(we=me.current)==null||we.call(me)},[Ce]),ve=a.useCallback((we,Ae)=>{q(X=>{const ue=X[we]??Ae,Se=(t??[]).filter(de=>de!==ue);if(Se.length===0)return X;const j=Se[Math.floor(Math.random()*Se.length)];return{...X,[we]:j}})},[t]),Me=(we,Ae,X,ue)=>{const Se=E&&$==="randomize"&&A.display==="cover"?P[X]??we:we,j=`max(${S(T)}, ${Kp}px)`,de=`calc(-0.5 * (${j} + ${S(T)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":X,onMouseEnter:E&&$==="randomize"&&A.display==="cover"?()=>ve(X,we):void 0,children:[r.jsx(rm,{item:Se,prefix:s,imageFit:A,imageMaxWidth:f,imageMaxHeight:L,cornerRadius:R,imageHoverClass:O,isEditor:n,isFirstSet:ue,scaled:S,onFirstSetImageDone:ye}),U&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:de,width:j,height:"100%"}})]},`${Ae}-${X}`)};if(F){const we=I?D&&N?"paused":"running":"paused",Ae=c>0&&h>0?c/h*1e3:0,X=`${Math.max(0,Ae)/1e3}s`;return r.jsxs("div",{ref:M,className:nt(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:se>0?{height:se}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{ref:z,className:`${s}-marquee-track`,"data-direction":x,onMouseEnter:xe,onMouseLeave:Q,style:{WebkitAnimationDuration:X,animationDuration:X,WebkitAnimationPlayState:we,animationPlayState:we},children:Array.from({length:oe},(ue,Se)=>r.jsx("div",{ref:Se===0?K:void 0,className:nt(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:S(T),paddingRight:S(T)},"aria-hidden":Se>0,children:ce.map((j,de)=>Me(j,Se,de,Se===0&&de<C))},`set-${Se}`))})]})}return r.jsxs("div",{ref:M,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{className:nt(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:S(T),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((we,Ae)=>Me(we,0,Ae))},"marquee-static")]})},sm=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
|
|
1693
1693
|
import cn from 'classnames';
|
|
1694
1694
|
import { CommonComponentProps } from '../props';
|
|
1695
1695
|
import { scalingValue } from '../utils/scalingValue';
|
|
@@ -2472,7 +2472,7 @@ type MarqueeProps = {
|
|
|
2472
2472
|
isPreviewMode?: boolean;
|
|
2473
2473
|
isEditMode?: boolean;
|
|
2474
2474
|
} & CommonComponentProps;
|
|
2475
|
-
`,
|
|
2475
|
+
`,lm={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"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.8,cornerRadius:0},t:{speed:1.64,gap:.02,imageMaxWidth:.5208,imageMaxHeight:.5208,cornerRadius:0},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278,cornerRadius:0}},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","cornerRadius"]},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",items:["cornerRadius"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""},link:""}]}},cm={element:am,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:lm,sourceCode:sm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function fs(e){return`
|
|
2476
2476
|
.${e}-marquee-wrapper {
|
|
2477
2477
|
overflow: hidden;
|
|
2478
2478
|
width: 100%;
|
|
@@ -2480,13 +2480,13 @@ type MarqueeProps = {
|
|
|
2480
2480
|
}
|
|
2481
2481
|
|
|
2482
2482
|
@keyframes ${e}-marquee-left {
|
|
2483
|
-
from {
|
|
2484
|
-
to {
|
|
2483
|
+
from { transform: translate3d(0, 0, 0); }
|
|
2484
|
+
to { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
|
|
2485
2485
|
}
|
|
2486
2486
|
|
|
2487
2487
|
@keyframes ${e}-marquee-right {
|
|
2488
|
-
from {
|
|
2489
|
-
to {
|
|
2488
|
+
from { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
|
|
2489
|
+
to { transform: translate3d(0, 0, 0); }
|
|
2490
2490
|
}
|
|
2491
2491
|
|
|
2492
2492
|
.${e}-marquee-track {
|
|
@@ -2499,19 +2499,17 @@ type MarqueeProps = {
|
|
|
2499
2499
|
-webkit-backface-visibility: hidden;
|
|
2500
2500
|
-webkit-transform: translateZ(0);
|
|
2501
2501
|
perspective: 1000px;
|
|
2502
|
-
|
|
2502
|
+
animation-duration: var(--marquee-duration);
|
|
2503
2503
|
animation-timing-function: linear;
|
|
2504
|
-
-webkit-animation-iteration-count: infinite;
|
|
2505
2504
|
animation-iteration-count: infinite;
|
|
2505
|
+
animation-play-state: var(--marquee-play-state, running);
|
|
2506
2506
|
}
|
|
2507
2507
|
|
|
2508
2508
|
.${e}-marquee-track[data-direction="left"] {
|
|
2509
|
-
-webkit-animation-name: ${e}-marquee-left;
|
|
2510
2509
|
animation-name: ${e}-marquee-left;
|
|
2511
2510
|
}
|
|
2512
2511
|
|
|
2513
2512
|
.${e}-marquee-track[data-direction="right"] {
|
|
2514
|
-
-webkit-animation-name: ${e}-marquee-right;
|
|
2515
2513
|
animation-name: ${e}-marquee-right;
|
|
2516
2514
|
}
|
|
2517
2515
|
|
|
@@ -2561,7 +2559,7 @@ type MarqueeProps = {
|
|
|
2561
2559
|
pointer-events: auto;
|
|
2562
2560
|
z-index: 10;
|
|
2563
2561
|
}
|
|
2564
|
-
`}const
|
|
2562
|
+
`}const dm=30,ys=2,um=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=y.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:m,cardWidth:x,corners:b,stroke:T,strokeColor:f,bgColor:L,padding:$,logoMarginTop:R,logoWidth:A,logoHeight:C,captionMarginTop:U}=e,E=!!o,O=((t==null?void 0:t.length)??0)>0,I=d>0&&(!n||i),w=O&&(I||n),F=Math.max(0,d)*dm,h=H=>y.scalingValue(H,n??!1),S=a.useRef(null),M=a.useRef(null),z=a.useRef(null),[K,se]=a.useState(0),[Y,D]=a.useState(0),[N,W]=a.useState(0),P=I&&u==="on",[q,G]=a.useState(!1),Z=a.useRef(null),[_,me]=a.useState(0),[v,fe]=a.useState(0),J=a.useRef(null),ce=H=>{var ae,ne,ie,be,Te;return{fontSettings:{fontFamily:(e==null?void 0:e[`${H}FontFamily`])??"Arial",fontWeight:((ae=e==null?void 0:e[`${H}FontSettings`])==null?void 0:ae.fontWeight)??400,fontStyle:((ne=e==null?void 0:e[`${H}FontSettings`])==null?void 0:ne.fontStyle)??"normal"},textAppearance:{textTransform:((ie=e==null?void 0:e[`${H}TextAppearance`])==null?void 0:ie.textTransform)??"none",textDecoration:((be=e==null?void 0:e[`${H}TextAppearance`])==null?void 0:be.textDecoration)??"none",fontVariant:((Te=e==null?void 0:e[`${H}TextAppearance`])==null?void 0:Te.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${H}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${H}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${H}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${H}LineHeight`])??.01,color:(e==null?void 0:e[`${H}Color`])??"#000000"}},Ce=ce("text"),oe=ce("caption"),xe=a.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(H=>{var re,ae;return(((re=H.text)==null?void 0:re.length)??0)>0||(((ae=H.caption)==null?void 0:ae.length)??0)>0}),[t]),Q=a.useMemo(()=>!w||(t==null?void 0:t.length)===0?1:Y<=0||K<=0?ys:Math.max(ys,Math.ceil(K/Y)+1),[w,t==null?void 0:t.length,Y,K]);a.useLayoutEffect(()=>{if(!w)return;const H=S.current,re=z.current;if(!H||!re)return;let ae=0;const ne=()=>{const Te=H.getBoundingClientRect().width,ee=re.getBoundingClientRect().width,pe=J.current,Pe=typeof pe=="number"&&Math.abs(pe-ee)<=.25;if(J.current=ee,se(Te),typeof ee=="number"&&ee>0&&Y<=0){D(ee);return}Pe&&ee!==Y?D(ee):!Pe&&Y<=0&&(cancelAnimationFrame(ae),ae=requestAnimationFrame(ne))},ie=()=>{cancelAnimationFrame(ae),ae=requestAnimationFrame(ne)};ie();const be=new ResizeObserver(ie);return be.observe(H),be.observe(re),()=>{cancelAnimationFrame(ae),be.disconnect()}},[I,w,Y]),a.useLayoutEffect(()=>{const H=M.current;if(!w||!H)return;const re=Y>0?Y:0,ae=re>0&&F>0?re/F*1e3:0,ne=`${Math.max(0,ae)/1e3}s`;H.style.setProperty("--marquee-distance",`${re}px`),H.style.setProperty("--marquee-duration",ne)},[I,w,F,Y]),a.useLayoutEffect(()=>{if(!w){W(0);return}const H=z.current,re=M.current;if(!H||!re)return;const ae=()=>{let ie=0;for(let be=0;be<H.children.length;be++){const ee=H.children[be].firstElementChild;ee&&(ie=Math.max(ie,ee.offsetHeight))}ie<=0&&(ie=re.offsetHeight),W(ie>0?ie:0)};ae();const ne=new ResizeObserver(ae);return ne.observe(H),ne.observe(re),()=>{ne.disconnect()}},[w,Q,t,n,m,x,$,T,b,A,C,_,v]);const ye=()=>{P&&G(!0)},ve=()=>{P&&G(!1)},Me=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),we=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),Ae=a.useCallback((H,re,ae,ne)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Me,width:"100%"},children:[r.jsx("div",{"data-controls":E?ne==null?void 0:ne.controlsName:void 0,"data-controls-axis":E?"y":void 0,className:E?`${s}-control`:void 0,style:{height:h((ne==null?void 0:ne.marginTop)??0)}}),r.jsx("div",{...ne!=null&&ne.dataMeasureKind?{"data-testimonial-measure":ne.dataMeasureKind}:{},style:{...Xt(H,n),textAlign:we,pointerEvents:"auto",...typeof(ne==null?void 0:ne.minHeightPx)=="number"&&ne.minHeightPx>0?{minHeight:ne.minHeightPx}:{}},children:r.jsx(pi,{content:re})})]},ae),[Me,we,n,E,s,h]),X=a.useCallback((H,re,ae)=>{var ne,ie,be;return r.jsxs("div",{style:{padding:`${h($.top)} ${h($.right)} ${h($.bottom)} ${h($.left)}`,width:h(x+T*2),height:"100%",borderRadius:h(b),border:`${h(T)} solid ${f}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:L}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:Me,textAlign:we},children:[H.text&&Ae(Ce,H.text,"text",ae!=null&&ae.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(ae==null?void 0:ae.textMinHeightPx)=="number"&&ae.textMinHeightPx>0?{minHeightPx:ae.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Me,width:"100%"},children:[r.jsx("div",{"data-controls":E&&!(ae!=null&&ae.dataMeasureAttrs)?"logoMarginTop":void 0,className:E&&!(ae!=null&&ae.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:h(R)}}),r.jsx("div",{style:{width:h(A),height:h(C)},children:((ne=H.logo)==null?void 0:ne.url)&&r.jsx("img",{src:H.logo.url,alt:((ie=H.logo)==null?void 0:ie.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((be=H.logo)==null?void 0:be.objectFit)||"contain"}})})]}),H.caption&&Ae(oe,H.caption,"caption",{...ae!=null&&ae.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:U,...ae!=null&&ae.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(ae==null?void 0:ae.captionMinHeightPx)=="number"&&ae.captionMinHeightPx>0?{minHeightPx:ae.captionMinHeightPx}:{}})]})]},re)},[L,U,oe,x,b,C,R,A,Me,we,$.bottom,$.left,$.right,$.top,Ae,T,f,Ce,n,E,s]),ue=a.useCallback(H=>{me(H.maxTextPx),fe(H.maxCaptionPx)},[]);a.useLayoutEffect(()=>{if(!xe){ue({maxTextPx:0,maxCaptionPx:0});return}const H=Z.current;if(!H)return;const re=()=>{y.readTestimonialTextMeasure(H,ue)};re();const ae=new ResizeObserver(re);return ae.observe(H),()=>{ae.disconnect()}},[xe,ue,t,X]);const Se=xe?{textMinHeightPx:_,captionMinHeightPx:v}:void 0,j=xe?r.jsx("div",{ref:Z,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((H,re)=>X(H,`measure-${re}`,{dataMeasureAttrs:!0}))}):null,de=(H,re)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[X(H,`card-${re}`,Se),E&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${h(m)})`,width:h(m),height:"100%",pointerEvents:"auto",zIndex:2}})]},re);if(w){const H=I?P&&q?"paused":"running":"paused";return r.jsxs("div",{ref:S,className:nt(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...N>0?{height:N}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:fs(s)}}),j,r.jsx("div",{ref:M,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:ye,onMouseLeave:ve,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":H},children:Array.from({length:Q},(re,ae)=>r.jsx("div",{ref:ae===0?z:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:h(m),paddingRight:h(m)},"aria-hidden":ae>0,children:t==null?void 0:t.map((ne,ie)=>de(ne,`${ae}-${ie}`))},`set-${ae}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:fs(s)}}),j,r.jsx("div",{style:{gap:h(m),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((H,re)=>de(H,re))})]})},pm=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
2565
2563
|
import cn from 'classnames';
|
|
2566
2564
|
import { CommonComponentProps } from '../props';
|
|
2567
2565
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
@@ -2570,8 +2568,7 @@ import { textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
|
|
|
2570
2568
|
import { useScopedStyles } from '../utils/useScopedStyles';
|
|
2571
2569
|
import { readTestimonialTextMeasure } from '../utils/readTestimonialTextMeasure';
|
|
2572
2570
|
|
|
2573
|
-
function getCSS(P: string
|
|
2574
|
-
const distance = distancePx > 0 ? \`\${distancePx}px\` : '0px';
|
|
2571
|
+
function getCSS(P: string): string {
|
|
2575
2572
|
return \`
|
|
2576
2573
|
.\${P}-marquee-wrapper {
|
|
2577
2574
|
overflow: hidden;
|
|
@@ -2580,13 +2577,13 @@ function getCSS(P: string, distancePx: number): string {
|
|
|
2580
2577
|
}
|
|
2581
2578
|
|
|
2582
2579
|
@keyframes \${P}-marquee-left {
|
|
2583
|
-
from {
|
|
2584
|
-
to {
|
|
2580
|
+
from { transform: translate3d(0, 0, 0); }
|
|
2581
|
+
to { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
|
|
2585
2582
|
}
|
|
2586
2583
|
|
|
2587
2584
|
@keyframes \${P}-marquee-right {
|
|
2588
|
-
from {
|
|
2589
|
-
to {
|
|
2585
|
+
from { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
|
|
2586
|
+
to { transform: translate3d(0, 0, 0); }
|
|
2590
2587
|
}
|
|
2591
2588
|
|
|
2592
2589
|
.\${P}-marquee-track {
|
|
@@ -2599,19 +2596,17 @@ function getCSS(P: string, distancePx: number): string {
|
|
|
2599
2596
|
-webkit-backface-visibility: hidden;
|
|
2600
2597
|
-webkit-transform: translateZ(0);
|
|
2601
2598
|
perspective: 1000px;
|
|
2602
|
-
|
|
2599
|
+
animation-duration: var(--marquee-duration);
|
|
2603
2600
|
animation-timing-function: linear;
|
|
2604
|
-
-webkit-animation-iteration-count: infinite;
|
|
2605
2601
|
animation-iteration-count: infinite;
|
|
2602
|
+
animation-play-state: var(--marquee-play-state, running);
|
|
2606
2603
|
}
|
|
2607
2604
|
|
|
2608
2605
|
.\${P}-marquee-track[data-direction="left"] {
|
|
2609
|
-
-webkit-animation-name: \${P}-marquee-left;
|
|
2610
2606
|
animation-name: \${P}-marquee-left;
|
|
2611
2607
|
}
|
|
2612
2608
|
|
|
2613
2609
|
.\${P}-marquee-track[data-direction="right"] {
|
|
2614
|
-
-webkit-animation-name: \${P}-marquee-right;
|
|
2615
2610
|
animation-name: \${P}-marquee-right;
|
|
2616
2611
|
}
|
|
2617
2612
|
|
|
@@ -2675,14 +2670,6 @@ type TestimonialsProps = {
|
|
|
2675
2670
|
const PX_PER_SEC_PER_SPEED_UNIT = 30;
|
|
2676
2671
|
const MIN_TRACK_COPIES = 2;
|
|
2677
2672
|
|
|
2678
|
-
const restartTrackAnimation = (track: HTMLElement) => {
|
|
2679
|
-
track.style.setProperty('animation-name', 'none');
|
|
2680
|
-
track.style.setProperty('-webkit-animation-name', 'none');
|
|
2681
|
-
void track.offsetHeight;
|
|
2682
|
-
track.style.removeProperty('animation-name');
|
|
2683
|
-
track.style.removeProperty('-webkit-animation-name');
|
|
2684
|
-
};
|
|
2685
|
-
|
|
2686
2673
|
type RenderCardOpts = {
|
|
2687
2674
|
textMinHeightPx?: number;
|
|
2688
2675
|
captionMinHeightPx?: number;
|
|
@@ -2710,8 +2697,6 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode, is
|
|
|
2710
2697
|
const setRef = useRef<HTMLDivElement | null>(null);
|
|
2711
2698
|
const [containerWidth, setContainerWidth] = useState(0);
|
|
2712
2699
|
const [setWidth, setSetWidth] = useState(0);
|
|
2713
|
-
const animationDistance = setWidth > 0 ? setWidth : 0;
|
|
2714
|
-
const scopedCss = useMemo(() => getCSS(P, animationDistance), [P, animationDistance]);
|
|
2715
2700
|
const [trackHeight, setTrackHeight] = useState(0);
|
|
2716
2701
|
const hoverPauseEnabled = autoplayEnabled && (pauseOnHover === 'on');
|
|
2717
2702
|
const [isHovering, setIsHovering] = useState(false);
|
|
@@ -2794,15 +2779,15 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode, is
|
|
|
2794
2779
|
};
|
|
2795
2780
|
}, [autoplayEnabled, useMarqueeTrack, setWidth]);
|
|
2796
2781
|
|
|
2797
|
-
const durationMs = animationDistance > 0 && pxPerSec > 0 ? (animationDistance / pxPerSec) * 1000 : 0;
|
|
2798
|
-
const durationS = \`\${Math.max(0, durationMs) / 1000}s\`;
|
|
2799
|
-
|
|
2800
2782
|
useLayoutEffect(() => {
|
|
2801
|
-
if (!useMarqueeTrack || animationDistance <= 0) return;
|
|
2802
2783
|
const track = trackRef.current;
|
|
2803
|
-
if (!track) return;
|
|
2804
|
-
|
|
2805
|
-
|
|
2784
|
+
if (!useMarqueeTrack || !track) return;
|
|
2785
|
+
const safeSetWidth = setWidth > 0 ? setWidth : 0;
|
|
2786
|
+
const durationMs = safeSetWidth > 0 && pxPerSec > 0 ? (safeSetWidth / pxPerSec) * 1000 : 0;
|
|
2787
|
+
const durationS = \`\${Math.max(0, durationMs) / 1000}s\`;
|
|
2788
|
+
track.style.setProperty('--marquee-distance', \`\${safeSetWidth}px\`);
|
|
2789
|
+
track.style.setProperty('--marquee-duration', durationS);
|
|
2790
|
+
}, [autoplayEnabled, useMarqueeTrack, pxPerSec, setWidth]);
|
|
2806
2791
|
|
|
2807
2792
|
useLayoutEffect(() => {
|
|
2808
2793
|
if (!useMarqueeTrack) {
|
|
@@ -3087,7 +3072,7 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode, is
|
|
|
3087
3072
|
...(trackHeight > 0 ? { height: trackHeight } : {}),
|
|
3088
3073
|
}}
|
|
3089
3074
|
>
|
|
3090
|
-
<style dangerouslySetInnerHTML={{ __html:
|
|
3075
|
+
<style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
|
|
3091
3076
|
{measureLayerEl}
|
|
3092
3077
|
<div
|
|
3093
3078
|
ref={trackRef}
|
|
@@ -3106,10 +3091,7 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode, is
|
|
|
3106
3091
|
transform: 'translateZ(0)',
|
|
3107
3092
|
WebkitTransform: 'translateZ(0)',
|
|
3108
3093
|
perspective: '1000px',
|
|
3109
|
-
|
|
3110
|
-
WebkitAnimationDuration: durationS,
|
|
3111
|
-
animationPlayState: marqueePlayState,
|
|
3112
|
-
WebkitAnimationPlayState: marqueePlayState,
|
|
3094
|
+
...( { '--marquee-play-state': marqueePlayState } as React.CSSProperties),
|
|
3113
3095
|
}}
|
|
3114
3096
|
>
|
|
3115
3097
|
{Array.from({ length: copies }, (_, copyIndex) => (
|
|
@@ -3138,7 +3120,7 @@ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode, is
|
|
|
3138
3120
|
|
|
3139
3121
|
return (
|
|
3140
3122
|
<div className={\`\${P}-wrapper\`}>
|
|
3141
|
-
<style dangerouslySetInnerHTML={{ __html:
|
|
3123
|
+
<style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
|
|
3142
3124
|
{measureLayerEl}
|
|
3143
3125
|
<div
|
|
3144
3126
|
style={{
|
|
@@ -3192,7 +3174,7 @@ type TestimonialsSettings = {
|
|
|
3192
3174
|
logoHeight: number;
|
|
3193
3175
|
captionMarginTop: number;
|
|
3194
3176
|
};
|
|
3195
|
-
`,vs={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},
|
|
3177
|
+
`,vs={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},mm={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:"Text Default",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption Default",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:{...vs.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:{...vs.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:.069,textLineHeight:.093,captionFontSize:.053,captionLineHeight:.069},t:{speed:1.64,gap:.02,cardWidth:.44,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.065,left:.01},logoMarginTop:.1,logoWidth:.052,logoHeight:.052,captionMarginTop:.005,textFontSize:.035,textLineHeight:.04,captionFontSize:.023,captionLineHeight:.029},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"}]}]}]}},gm={element:um,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:mm,sourceCode:pm,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function hm(e){return`
|
|
3196
3178
|
.${e}-container {
|
|
3197
3179
|
position: relative;
|
|
3198
3180
|
overflow-x: clip;
|
|
@@ -3316,7 +3298,7 @@ type TestimonialsSettings = {
|
|
|
3316
3298
|
width: 100%;
|
|
3317
3299
|
height: 100%;
|
|
3318
3300
|
}
|
|
3319
|
-
`}const
|
|
3301
|
+
`}const fm=3e3,ym=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=y.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:m,textMarginTop:x,captionMarginTop:b,imageWidth:T,imageHeight:f,controlsWidth:L,controlsColor:$,controlsHoverColor:R}=e,A=d>0&&(!n||!!i),[C,U]=a.useState(0),[E,O]=a.useState(null),[I,w]=a.useState(!1),F=a.useRef(null),h=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),S=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);a.useEffect(()=>{U(0),O(null),w(!1)},[l.length]);const M=l[C],z=E===null?null:l[E],K=oe=>{var Q,ye,ve,Me,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${oe}FontFamily`])??"Arial",fontWeight:((Q=e==null?void 0:e[`${oe}FontSettings`])==null?void 0:Q.fontWeight)??400,fontStyle:((ye=e==null?void 0:e[`${oe}FontSettings`])==null?void 0:ye.fontStyle)??"normal"},textAppearance:{textTransform:((ve=e==null?void 0:e[`${oe}TextAppearance`])==null?void 0:ve.textTransform)??"none",textDecoration:((Me=e==null?void 0:e[`${oe}TextAppearance`])==null?void 0:Me.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${oe}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${oe}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${oe}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${oe}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${oe}WordSpacing`])??0,color:(e==null?void 0:e[`${oe}Color`])??"#000000"}},se=K("text"),Y=K("caption"),D=l.length>1&&l.some(oe=>{var xe,Q;return(((xe=oe.text)==null?void 0:xe.length)??0)>0||(((Q=oe.caption)==null?void 0:Q.length)??0)>0}),N=a.useRef(null),[W,P]=a.useState(0),[q,G]=a.useState(0),Z=e.controls??{mode:"Off",icon:null},_=l.length>1,me=a.useCallback((oe,xe)=>!_||xe===oe?oe:(F.current&&window.clearTimeout(F.current),O(oe),w(!0),F.current=window.setTimeout(()=>{O(null),w(!1),F.current=null},300),xe),[_]),v=a.useCallback(()=>{_&&U(oe=>me(oe,(oe-1+l.length)%l.length))},[_,me,l.length]),fe=a.useCallback(()=>{_&&U(oe=>me(oe,(oe+1)%l.length))},[_,me,l.length]);a.useEffect(()=>{if(!A||!_)return;const oe=Math.max(300,fm/d),xe=window.setInterval(()=>{U(Q=>me(Q,(Q+1)%l.length))},oe);return()=>{window.clearInterval(xe)}},[A,_,me,l.length,d]),a.useEffect(()=>()=>{F.current&&window.clearTimeout(F.current)},[]);const J=(oe,xe)=>{var we,Ae,X,ue;const Q=xe==null?void 0:xe.textMinHeightPx,ye=xe==null?void 0:xe.captionMinHeightPx,ve=xe==null?void 0:xe.dataMeasureAttrs,Me=o&&!(xe!=null&&xe.dataMeasureAttrs)&&!(xe!=null&&xe.hideControls);return r.jsxs(r.Fragment,{children:[oe.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[r.jsx("div",{"data-controls":Me?"textMarginTop":void 0,className:Me?`${s}-control`:void 0,style:{height:y.scalingValue(x??0,n??!1)}}),r.jsx("div",{...ve&&{"data-testimonial-measure":"text"},style:{...Xt(se,n),...Q&&Q>0?{minHeight:Q}:{},textAlign:S,pointerEvents:"auto"},children:r.jsx(pi,{content:oe.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[r.jsx("div",{"data-controls":Me?"imageMarginTop":void 0,className:Me?`${s}-control`:void 0,style:{height:y.scalingValue(m??0,n??!1)}}),r.jsx("div",{style:{width:y.scalingValue(T??0,n??!1),height:y.scalingValue(f??0,n??!1)},children:((we=oe.image)==null?void 0:we.url)&&r.jsx("img",{src:(Ae=oe.image)==null?void 0:Ae.url,alt:((X=oe.image)==null?void 0:X.name)??"",className:`${s}-icon`,style:{objectFit:((ue=oe.image)==null?void 0:ue.objectFit)||"contain"}})})]}),oe.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[r.jsx("div",{"data-controls":Me?"captionMarginTop":void 0,className:Me?`${s}-control`:void 0,style:{height:y.scalingValue(b??0,n??!1)}}),r.jsx("div",{...ve?{"data-testimonial-measure":"caption"}:{},style:{...Xt(Y,n),...ye&&ye>0?{minHeight:ye}:{},textAlign:S,pointerEvents:"auto"},children:r.jsx(pi,{content:oe.caption})})]})]})},ce=a.useCallback(oe=>{P(oe.maxTextPx),G(oe.maxCaptionPx)},[]);if(a.useLayoutEffect(()=>{if(!D){ce({maxTextPx:0,maxCaptionPx:0});return}const oe=N.current;if(!oe)return;const xe=()=>{y.readTestimonialTextMeasure(oe,ce)};xe();const Q=new ResizeObserver(xe);return Q.observe(oe),()=>{Q.disconnect()}},[D,ce,t]),!M)return r.jsx(r.Fragment,{});const Ce=D?{textMinHeightPx:W,captionMinHeightPx:q}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:hm(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:y.scalingValue(u??0,n??!1),alignItems:h},children:[D&&r.jsx("div",{ref:N,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((oe,xe)=>r.jsx("div",{style:{width:"100%"},children:J(oe,{dataMeasureAttrs:!0})},xe))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[z&&I&&r.jsx("div",{className:nt(`${s}-fade-item-prev`,`${s}-fade-out`),children:J(z,{...Ce,hideControls:!0})}),r.jsx("div",{className:nt(`${s}-fade-item-current`,I?`${s}-fade-in`:void 0),children:J(M,Ce)})]})]}),Z.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:y.scalingValue(L??.02,n??!1),height:y.scalingValue(L??.02,n??!1),"--arrow-hover-color":R},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:v,disabled:!_,"aria-label":"Previous testimonial",children:Z.icon&&r.jsx(on,{url:Z.icon,fill:$,hoverFill:R,className:nt(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:nt(`${s}-arrow`,`${s}-next-arrow`),style:{width:y.scalingValue(L??.02,n??!1),height:y.scalingValue(L??.02,n??!1),"--arrow-hover-color":R},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:fe,disabled:!_,"aria-label":"Next testimonial",children:Z.icon&&r.jsx(on,{url:Z.icon,fill:$,hoverFill:R,className:`${s}-arrow-img`})})})]})]})})},vm=`import cn from 'classnames';
|
|
3320
3302
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
3321
3303
|
import { CommonComponentProps } from '../props';
|
|
3322
3304
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
@@ -3812,12 +3794,12 @@ type TestimonialsSettings = {
|
|
|
3812
3794
|
icon?: string | null;
|
|
3813
3795
|
};
|
|
3814
3796
|
};
|
|
3815
|
-
`,
|
|
3797
|
+
`,xm="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>'),xs={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},bm={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:"Controls Default",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",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:{...xs.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:"Caption Default"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...xs.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:"Text Default"}},defaults:{controls:{mode:"On",icon:xm},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},t:{speed:1,width:.65,imageMarginTop:.026,captionMarginTop:.01,textMarginTop:0,textFontSize:.035,captionFontSize:.023,textLineHeight:.04,captionLineHeight:.029,imageWidth:.05,imageHeight:.05,controlsWidth:.026},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"}]}]}]}},wm={element:ym,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},t:{width:700},m:{width:334}},schema:bm,sourceCode:vm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function Sm(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function bs(e){return((e==null?void 0:e.trim().length)??0)>0}function Hr(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Or(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((o-t)/2,i)}}function $m(e){return`
|
|
3816
3798
|
.${e}-wrapper {
|
|
3817
3799
|
display: grid;
|
|
3818
3800
|
align-items: start;
|
|
3819
3801
|
justify-content: center;
|
|
3820
|
-
min-height: ${
|
|
3802
|
+
min-height: ${Sm(48)};
|
|
3821
3803
|
}
|
|
3822
3804
|
.${e}-item {
|
|
3823
3805
|
display: flex;
|
|
@@ -4155,7 +4137,7 @@ type TestimonialsSettings = {
|
|
|
4155
4137
|
z-index: 2;
|
|
4156
4138
|
width: 100%;
|
|
4157
4139
|
}
|
|
4158
|
-
`}const Rn=500,Im=750,ni="cubic-bezier(0.22, 1, 0.36, 1)",Rm=72,Em=50;function km(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Mm(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Pm(e){const[t]=e.media;return t!=null&&t.url?t:null}function Am(e){return!Array.isArray(e)||e.length===0?[]:km(e)?e.flatMap(t=>{const n=Mm(t);if(!n)return[];const i=Pm(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.url?i:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function to(e){return e.type==="video"}function Fm(e){e.pause(),e.removeAttribute("src"),e.load()}function ws({media:e,className:t,style:n,onMediaClick:i}){return to(e)?r.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Wo(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Wm(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function _m({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:l,onTransitionEnd:d}){return a.useEffect(()=>{const c=n.current;if(c)return()=>{Fm(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:l,onTransitionEnd:d,style:i})}function Nm({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:s,onPrev:l,onNext:d,counterClassName:c,counterStyle:u}){const m=i==="cover",x=a.useRef(null),b=a.useRef(null),T=a.useRef(null),f=a.useRef(null),L=a.useRef(0),$=a.useRef(0),R=a.useRef("none"),P=a.useRef(!1),C=a.useRef(!1),X=a.useRef(!1),E=a.useRef(null),[B,I]=a.useState(null),[w,W]=a.useState("opening"),[h,S]=a.useState(0),[k,D]=a.useState(0),[U,ae]=a.useState(!1),[Y,G]=a.useState(!1),[H,F]=a.useState(!1),A=a.useRef(n),K=t[n],q=K?to(K):!1,ee=k!==0||U,N=a.useCallback(Q=>{X.current=Q,ae(Q)},[]),ue=a.useCallback(()=>{E.current!==null&&(window.clearTimeout(E.current),E.current=null)},[]),v=a.useCallback(()=>{ue(),E.current=window.setTimeout(()=>{ue(),N(!1)},Rn+32)},[ue,N]),ye=a.useCallback(()=>{const Q=b.current,le=T.current;if(!Q)return;const xe=Q.getBoundingClientRect(),O=xe.width,se=xe.height;if(!O||!se)return;if(i==="cover"){I({width:O,height:se,left:xe.left,top:xe.top});return}if(!le){I(Wo(Q));return}const{width:fe,height:Se}=Wm(le);if(!fe||!Se){I(Wo(Q));return}const Ie=fe/Se,we=O/se;if(Ie>we){const _=O/Ie;I({width:O,height:_,left:xe.left,top:xe.top+(se-_)/2})}else{const _=se*Ie;I({width:_,height:se,left:xe.left+(O-_)/2,top:xe.top})}},[i]);a.useEffect(()=>{ye();const Q=b.current;if(!Q)return;const le=new ResizeObserver(()=>ye());return le.observe(Q),()=>le.disconnect()},[ye,n]),a.useEffect(()=>{w==="opening"&&B&&W("open")},[w,B]),a.useEffect(()=>{if(w!=="closing")return;const Q=setTimeout(()=>s(),Rn);return()=>clearTimeout(Q)},[w,s]),a.useEffect(()=>()=>{ue()},[ue]),a.useLayoutEffect(()=>{if(A.current===n)return;ue(),S(0),D(0),N(!1),F(!1),G(!1),L.current=0,$.current=0,R.current="none",P.current=!1,f.current=null,C.current=!1;const Q=b.current;Q&&I(Wo(Q)),A.current=n},[n,N,ue]),a.useEffect(()=>{if(w!=="open")return;let Q=null;const le=()=>{Q&&(document.removeEventListener("click",Q,!0),Q=null)},xe=()=>{le(),Q=we=>{we.stopPropagation(),we.preventDefault(),le()},document.addEventListener("click",Q,!0)},O=we=>{ue(),X.current=!1,ae(!1),D(0),G(!1),P.current=!1,$.current=0,R.current="none";const _=b.current;_&&I(Wo(_)),we<0?d():l()},se=we=>{if(Math.abs(we)>Em&&t.length>1){O(we);return}N(!0),D(0),v()},fe=we=>{if(we.touches.length!==1||X.current)return;const _=we.touches[0];C.current=!0,f.current={x:_.clientX,y:_.clientY},R.current="none",$.current=0,P.current=!1},Se=we=>{if(!f.current||we.touches.length!==1||X.current)return;const _=we.touches[0],de=_.clientX-f.current.x,oe=_.clientY-f.current.y;if(R.current==="none"){if(Math.abs(de)<10&&Math.abs(oe)<10)return;if(Math.abs(de)>Math.abs(oe)){if(t.length<=1)return;R.current="horizontal"}else if(oe>0)R.current="vertical";else return}if(R.current==="horizontal"){P.current=!0,G(!0),$.current=de,D(de),we.preventDefault();return}R.current==="vertical"&&(P.current=!0,G(!0),L.current=oe,S(oe),we.preventDefault())},Ie=()=>{if(!f.current)return;const we=R.current,_=P.current;if(_&&we==="horizontal")se($.current),xe();else if(_&&we==="vertical")if(L.current>Rm){const oe=window.innerHeight;L.current=oe,F(!0),S(oe),W("closing")}else L.current=0,S(0),xe();else we==="horizontal"&&Math.abs($.current)>0&&(se($.current),xe());f.current=null,R.current="none",$.current=0,P.current=!1,G(!1)};return document.addEventListener("touchstart",fe,{passive:!0}),document.addEventListener("touchmove",Se,{passive:!1}),document.addEventListener("touchend",Ie),document.addEventListener("touchcancel",Ie),()=>{document.removeEventListener("touchstart",fe),document.removeEventListener("touchmove",Se),document.removeEventListener("touchend",Ie),document.removeEventListener("touchcancel",Ie),le()}},[w,t.length,d,l,N,v]),a.useEffect(()=>{const Q=le=>{le.key==="Escape"&&(le.preventDefault(),le.stopPropagation(),w!=="closing"&&W("closing"))};return window.addEventListener("keydown",Q,!0),()=>window.removeEventListener("keydown",Q,!0)},[w]);const Z=()=>{w!=="closing"&&W("closing")},ce=w==="open",$e=w==="closing",ne=h>0?Math.max(0,1-h/500):1,ve=h>0?Math.max(.35,1-h/500):1,J=Q=>{if(Q.stopPropagation(),C.current){C.current=!1;return}if(t.length<=1)return;const le=Q.currentTarget.getBoundingClientRect(),xe=Q.clientY-le.top,O=Math.min(52,le.height*.2);if(!(xe>le.height-O)){if(Q.clientX-le.left<le.width/2){l();return}d()}},pe=Q=>{if(t.length<=1)return;const le=Q.currentTarget.getBoundingClientRect(),xe=Q.clientX-le.left,O=Q.clientY-le.top,se=Math.min(52,le.height*.2);if(O>le.height-se){Q.currentTarget.style.cursor="default";return}Q.currentTarget.style.cursor=xe<le.width/2?"w-resize":"e-resize"},he=a.useCallback(Q=>{Q.propertyName!=="transform"||!X.current||(ue(),N(!1))},[ue,N]),Ae=ee?`translateX(${k}px)`:h>0?`translateY(${h}px)`:void 0,be={position:"fixed",top:B==null?void 0:B.top,left:B==null?void 0:B.left,width:B==null?void 0:B.width,height:B==null?void 0:B.height,objectFit:i==="cover"?"cover":"contain",transform:Ae,opacity:h>0?ve:w==="opening"||$e?0:1,transition:Y&&!U?"none":U?`transform ${Rn}ms ${ni}`:H?`transform ${Rn}ms ${ni}, opacity ${Rn}ms ${ni}`:w==="opening"||$e?`opacity ${Rn}ms ${ni}`:"none",pointerEvents:q&&ce&&!ee?"auto":"none",touchAction:q&&ce?"none":void 0,zIndex:9998},We=B?{position:"fixed",top:B.top,height:B.height,width:B.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:x,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:w==="open"?"none":void 0},onClick:Z,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:ce?ne:0,transition:Y?"none":`opacity ${Rn}ms ${ni}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:m?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:b,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:ce?1:0,transition:`opacity ${Rn}ms ${ni}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:b,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:ce?1:0,transition:`opacity ${Rn}ms ${ni}`},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),B&&K&&(q?r.jsx(_m,{src:K.url,phase:w,mediaRef:T,mediaStyle:be,onLoadedMetadata:ye,onClick:J,onMouseMove:pe,onTransitionEnd:he},`${n}-${K.url}`):r.jsx("img",{ref:T,src:K.url,alt:K.name,onLoad:ye,onTransitionEnd:he,style:be},`${n}-${K.url}`)),ce&&We&&t.length>1&&!q&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...We,left:B.left,cursor:"w-resize",pointerEvents:ee?"none":"auto"},onClick:Q=>{if(C.current){C.current=!1;return}Q.stopPropagation(),l()}}),r.jsx("div",{style:{...We,left:B.left+B.width/2,cursor:"e-resize",pointerEvents:ee?"none":"auto"},onClick:Q=>{if(C.current){C.current=!1;return}Q.stopPropagation(),d()}})]})]})}function Hm(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function jm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=y.useScopedStyles(),{type:m="a",gridLayout:x,textBoxWidth:b=100,verticalGap:T,entriesCount:f,lightbox:L,imageDisplay:$,lightboxImageDisplay:R,slider:P,sliderTiming:C,direction:X,transition:E,titleMarginTop:B,subtitleMarginTop:I,titleColor:w,subtitleColor:W,lightboxCounterColor:h,titleFontFamily:S,titleFontSettings:k,titleFontSize:D,titleLineHeight:U,titleLetterSpacing:ae,titleWordSpacing:Y,titleTextAppearance:G,subtitleFontFamily:H,subtitleFontSettings:F,subtitleFontSize:A,subtitleLineHeight:K,subtitleLetterSpacing:q,subtitleWordSpacing:ee,subtitleTextAppearance:N,lightboxCounterFontFamily:ue,lightboxCounterFontSettings:v,lightboxCounterFontSize:ye,lightboxCounterLineHeight:Z,lightboxCounterLetterSpacing:ce,lightboxCounterWordSpacing:$e,lightboxCounterTextAppearance:ne,showText:ve="always",alignEntries:J="off",align:pe="top"}=e,he={fontSettings:{fontFamily:S,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:D??.01,lineHeight:U,letterSpacing:ae??0,wordSpacing:Y??0,textAppearance:G,color:w},be={...dn(Xt(he,n))},We={fontSettings:{fontFamily:H,fontWeight:(F==null?void 0:F.fontWeight)??400,fontStyle:(F==null?void 0:F.fontStyle)??"normal"},fontSize:A??.01,lineHeight:K,letterSpacing:q??0,wordSpacing:ee??0,textAppearance:N,color:W},le={...dn(Xt(We,n))},xe={fontSettings:{fontFamily:ue,fontWeight:(v==null?void 0:v.fontWeight)??400,fontStyle:(v==null?void 0:v.fontStyle)??"normal"},fontSize:ye??.01,lineHeight:Z,letterSpacing:ce??0,wordSpacing:$e??0,textAppearance:ne,color:h},se={...dn(Xt(xe,n)),...Or(ye,Z,u,n)},fe=jr(D,U,`${u}-item-title`,`${u}-text-tight-leading`),Se=jr(A,K,`${u}-item-subtitle`,`${u}-text-tight-leading`),Ie=Or(D,U,u,n),we=Or(A,K,u,n),_=jr(ye,Z,`${u}-lightbox-counter`,`${u}-text-tight-leading`),de=y.buildColorVars(u,{titleColor:w,subtitleColor:W,lightboxCounterColor:h},Om,zm),re=`${l&&l!=="default"?`${u}-state-${l}`:""}${ve==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),ke=f===0?1/0:f,ie=(t??[]).slice(0,ke),j=x.entryWidth??.2,Ne=($==null?void 0:$.display)==="cover",Me=($==null?void 0:$.ratioValue)??"1:1",et=($==null?void 0:$.reversed)??!1,[Ye,lt]=Me.split(":").map(Number),ot=`${et?lt:Ye} / ${et?Ye:lt}`,$t=x.columnsCount,rt=y.scalingValue(j??0,n),Ue=rt,ht=!Ne&&P!=="off",xt=ie.length%$t||$t,dt=xt<$t&&ie.length>0,kt=ie.length-xt,_t=dt?Math.floor(($t-xt)/2)+1:1,Qe={width:Ue,...Ne?{aspectRatio:ot,height:"auto",overflow:"hidden"}:{height:"auto"}},Tt=`${u}-item-image-wrapper${ht?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),Lt=m==="d"||m==="e"||m==="f",Ge=J==="on",qe=`calc(${y.scalingValue(j??0,n)} * (${b} / 100))`,Pe=y.scalingValue(j*b/100,n),gt=Ne?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[It,Mt]=a.useState("ltr"),[Dt,en]=a.useState(0),on=a.useRef(null);a.useEffect(()=>{const ze=on.current;if(!ze)return;const ut=new ResizeObserver(_e=>{en(Math.round(_e[0].contentRect.width))});return ut.observe(ze),()=>ut.disconnect()},[]);const bt=(()=>{const ze={...de},ut=on.current?getComputedStyle(on.current).getPropertyValue("--cntrl-article-width").trim():"";return ut&&(ze["--cntrl-article-width"]=ut),ze})(),[Rt,Ut]=a.useState(!1),[Kt,ft]=a.useState([]),[Jt,Ce]=a.useState(0),Oe=L==="on"&&(!n||i),Ke=(ze,ut)=>{n&&!i||L!=="off"&&(ft(ze),Ce(ut),Ut(!0))};a.useEffect(()=>{if(!Rt||L!=="on"||typeof document>"u")return;const ze=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ze}},[Rt,L]),a.useEffect(()=>{!n||i||Ut(!1)},[n,i]);const He=a.useMemo(()=>Lm(u),[u]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:He}}),r.jsx("div",{style:de,children:r.jsx("div",{ref:on,className:`${u}-wrapper ${u}-type-${m}${Ge?` ${u}-align-entries`:""} ${u}-image-align-${pe} ${re}`.trim(),style:{gridTemplateColumns:`repeat(${$t}, ${rt})`,rowGap:Ge?0:y.scalingValue(T??0,n),columnGap:y.scalingValue(x.horizontalGap??0,n),width:y.scalingValue(x.wrapperWidth??0,n),...Ge?{[`--${u}-align-entries-row-gap`]:y.scalingValue(T??0,n)}:{}},children:ie.map((ze,ut)=>{var Gt;const _e=bs(ze.title),Je=bs(ze.subtitle),tt=(((Gt=ze.link)==null?void 0:Gt.length)??0)>0&&L==="off"?ze.link:void 0,Wt=Math.floor(ut/$t)===Math.ceil(ie.length/$t)-1,Ct=dt&&ut>=kt?`${_t+(ut-kt)}`:void 0,st=Lt?r.jsxs("div",{className:`${u}-item-text-block`,children:[_e&&r.jsx("p",{className:fe,style:{width:qe,...be,...Ie},children:ze.title}),_e&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(B??0,n),width:Pe}}),Je&&r.jsx("p",{className:Se,style:{width:qe,...le,...we},children:ze.subtitle}),Je&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(I??0,n),width:Pe}})]}):null,Nt=Ge?r.jsxs("div",{className:`${u}-item-title-row`,children:[!Lt&&r.jsx("div",{"data-controls":o&&_e?"titleMarginTop":void 0,className:o&&_e?`${u}-control`:void 0,style:{height:_e?y.scalingValue(B??0,n):0,width:Pe}}),_e&&r.jsx("p",{className:fe,style:{width:qe,...be,...Ie},children:ze.title}),Lt&&_e&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(B??0,n),width:Pe}})]}):null,At=Ge?r.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!Lt&&r.jsx("div",{"data-controls":o&&Je?"subtitleMarginTop":void 0,className:o&&Je?`${u}-control`:void 0,style:{height:Je?y.scalingValue(I??0,n):0,width:Pe}}),Je&&r.jsx("p",{className:Se,style:{width:qe,...le,...we},children:ze.subtitle}),Lt&&Je&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(I??0,n),width:Pe}})]}):null,Vt=tt?r.jsxs("a",{href:tt,target:"_blank",className:`${u}-item-text-link`,children:[Nt,At]}):r.jsxs(r.Fragment,{children:[Nt,At]}),zt=Am(ze.gallery),Pt=zt.filter(pt=>pt.lightboxMedia).map(pt=>pt.lightboxMedia),Qt=r.jsx("div",{className:Tt,style:Qe,children:zt.length===0?null:P==="off"?(()=>{const{displayMedia:pt,lightboxMedia:Ft}=zt[0],Bt=Ft?Pt.findIndex(g=>g.url===Ft.url):-1;return r.jsx(ws,{media:pt,className:`${u}-item-${to(pt)?"video":"image"}`.trim(),style:gt,onMediaClick:Oe&&Bt>=0?()=>Ke(Pt,Bt):void 0})})():r.jsxs(r.Fragment,{children:[ht&&Ge&&r.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:zt.map(({displayMedia:pt})=>to(pt)?r.jsx("video",{src:pt.url,muted:!0,playsInline:!0},`sizer-${pt.url}`):r.jsx("img",{src:pt.url,alt:""},`sizer-${pt.url}`))}),r.jsx(br,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:C*1e3,width:"100%",height:"100%",speed:Im,type:E==="fade"?"fade":"loop",rewind:E==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:E==="fade"?"ltr":X!=="random"?X==="horizontal"?"ltr":"ttb":It},onMoved:pt=>{if(X!=="random"||E==="fade")return;const Ft=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Mt(Ft),setTimeout(()=>{pt.refresh()},0)},children:zt.map(({displayMedia:pt,lightboxMedia:Ft},Bt)=>{const g=Ft?Pt.findIndex(me=>me.url===Ft.url):-1;return r.jsx(wr,{children:r.jsx(ws,{media:pt,className:`${u}-item-${to(pt)?"video":"image"}`.trim(),style:gt,onMediaClick:Oe&&g>=0?()=>Ke(Pt,g):void 0})},Bt)})},`${E}-${j}-${X}-${C}-${Dt}-${d}`)]})}),wt=Lt?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&_e?"titleMarginTop":void 0,className:o&&_e?`${u}-control`:void 0,style:{height:_e?y.scalingValue(B??0,n):0,width:Pe}}),r.jsx("p",{className:fe,style:{width:qe,...be,...Ie},children:ze.title}),r.jsx("div",{"data-controls":o&&Je?"subtitleMarginTop":void 0,className:o&&Je?`${u}-control`:void 0,style:{height:Je?y.scalingValue(I??0,n):0,width:Pe}}),r.jsx("p",{className:Se,style:{width:qe,...le,...we},children:ze.subtitle})]});return r.jsx("div",{className:`${u}-item`.trim(),style:Ct&&!Ge?{gridColumn:Ct}:void 0,children:r.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${Ge&&Wt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(b??0)>100?`calc(${rt} * (${b} / 100))`:rt,...Ct&&Ge?{gridColumn:Ct}:{}},children:Ge?r.jsx(r.Fragment,{children:Lt?r.jsxs(r.Fragment,{children:[Vt,r.jsx("a",{href:tt,target:"_blank",className:`${u}-item-image-link`,children:Qt})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:tt,target:"_blank",className:`${u}-item-image-link`,children:Qt}),Vt]})}):tt?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:tt,target:"_blank",className:`${u}-item-image-link`,children:[st,Qt]}),!Lt&&r.jsx("a",{href:tt,target:"_blank",className:`${u}-item-text-link`,children:wt})]}):r.jsxs(r.Fragment,{children:[st,Qt,wt]})})},ut)})})}),(!n||i)&&Rt&&typeof document<"u"&&L==="on"&&(()=>{const ze=(c?document.getElementById(c):null)??document.body;return gi.createPortal(r.jsx("div",{style:bt,"data-selection":"none",children:r.jsx(Nm,{prefix:u,items:Kt,index:Jt,imageDisplay:Hm(R),isEditor:n,onClose:()=>Ut(!1),onPrev:()=>Ce(ut=>(ut-1+Kt.length)%Kt.length),onNext:()=>Ce(ut=>(ut+1)%Kt.length),counterClassName:_,counterStyle:se})}),ze)})()]})}const Om={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},zm=["hover","focus","filled","success","error"],Bm=`import { Splide, SplideSlide } from '@splidejs/react-splide';
|
|
4140
|
+
`}const In=500,Cm=750,ti="cubic-bezier(0.22, 1, 0.36, 1)",Tm=72,Lm=50;function Im(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Rm(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Em(e){const[t]=e.media;return t!=null&&t.url?t:null}function Mm(e){return!Array.isArray(e)||e.length===0?[]:Im(e)?e.flatMap(t=>{const n=Rm(t);if(!n)return[];const i=Em(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.url?i:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function eo(e){return e.type==="video"}function km(e){e.pause(),e.removeAttribute("src"),e.load()}function ws({media:e,className:t,style:n,onMediaClick:i}){return eo(e)?r.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Wo(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Am(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Pm({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:l,onTransitionEnd:d}){return a.useEffect(()=>{const c=n.current;if(c)return()=>{km(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:l,onTransitionEnd:d,style:i})}function Wm({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:s,onPrev:l,onNext:d,counterClassName:c,counterStyle:u}){const m=i==="cover",x=a.useRef(null),b=a.useRef(null),T=a.useRef(null),f=a.useRef(null),L=a.useRef(0),$=a.useRef(0),R=a.useRef("none"),A=a.useRef(!1),C=a.useRef(!1),U=a.useRef(!1),E=a.useRef(null),[O,I]=a.useState(null),[w,F]=a.useState("opening"),[h,S]=a.useState(0),[M,z]=a.useState(0),[K,se]=a.useState(!1),[Y,D]=a.useState(!1),[N,W]=a.useState(!1),P=a.useRef(n),q=t[n],G=q?eo(q):!1,Z=M!==0||K,_=a.useCallback(X=>{U.current=X,se(X)},[]),me=a.useCallback(()=>{E.current!==null&&(window.clearTimeout(E.current),E.current=null)},[]),v=a.useCallback(()=>{me(),E.current=window.setTimeout(()=>{me(),_(!1)},In+32)},[me,_]),fe=a.useCallback(()=>{const X=b.current,ue=T.current;if(!X)return;const Se=X.getBoundingClientRect(),j=Se.width,de=Se.height;if(!j||!de)return;if(i==="cover"){I({width:j,height:de,left:Se.left,top:Se.top});return}if(!ue){I(Wo(X));return}const{width:H,height:re}=Am(ue);if(!H||!re){I(Wo(X));return}const ae=H/re,ne=j/de;if(ae>ne){const ie=j/ae;I({width:j,height:ie,left:Se.left,top:Se.top+(de-ie)/2})}else{const ie=de*ae;I({width:ie,height:de,left:Se.left+(j-ie)/2,top:Se.top})}},[i]);a.useEffect(()=>{fe();const X=b.current;if(!X)return;const ue=new ResizeObserver(()=>fe());return ue.observe(X),()=>ue.disconnect()},[fe,n]),a.useEffect(()=>{w==="opening"&&O&&F("open")},[w,O]),a.useEffect(()=>{if(w!=="closing")return;const X=setTimeout(()=>s(),In);return()=>clearTimeout(X)},[w,s]),a.useEffect(()=>()=>{me()},[me]),a.useLayoutEffect(()=>{if(P.current===n)return;me(),S(0),z(0),_(!1),W(!1),D(!1),L.current=0,$.current=0,R.current="none",A.current=!1,f.current=null,C.current=!1;const X=b.current;X&&I(Wo(X)),P.current=n},[n,_,me]),a.useEffect(()=>{if(w!=="open")return;let X=null;const ue=()=>{X&&(document.removeEventListener("click",X,!0),X=null)},Se=()=>{ue(),X=ne=>{ne.stopPropagation(),ne.preventDefault(),ue()},document.addEventListener("click",X,!0)},j=ne=>{me(),U.current=!1,se(!1),z(0),D(!1),A.current=!1,$.current=0,R.current="none";const ie=b.current;ie&&I(Wo(ie)),ne<0?d():l()},de=ne=>{if(Math.abs(ne)>Lm&&t.length>1){j(ne);return}_(!0),z(0),v()},H=ne=>{if(ne.touches.length!==1||U.current)return;const ie=ne.touches[0];C.current=!0,f.current={x:ie.clientX,y:ie.clientY},R.current="none",$.current=0,A.current=!1},re=ne=>{if(!f.current||ne.touches.length!==1||U.current)return;const ie=ne.touches[0],be=ie.clientX-f.current.x,Te=ie.clientY-f.current.y;if(R.current==="none"){if(Math.abs(be)<10&&Math.abs(Te)<10)return;if(Math.abs(be)>Math.abs(Te)){if(t.length<=1)return;R.current="horizontal"}else if(Te>0)R.current="vertical";else return}if(R.current==="horizontal"){A.current=!0,D(!0),$.current=be,z(be),ne.preventDefault();return}R.current==="vertical"&&(A.current=!0,D(!0),L.current=Te,S(Te),ne.preventDefault())},ae=()=>{if(!f.current)return;const ne=R.current,ie=A.current;if(ie&&ne==="horizontal")de($.current),Se();else if(ie&&ne==="vertical")if(L.current>Tm){const Te=window.innerHeight;L.current=Te,W(!0),S(Te),F("closing")}else L.current=0,S(0),Se();else ne==="horizontal"&&Math.abs($.current)>0&&(de($.current),Se());f.current=null,R.current="none",$.current=0,A.current=!1,D(!1)};return document.addEventListener("touchstart",H,{passive:!0}),document.addEventListener("touchmove",re,{passive:!1}),document.addEventListener("touchend",ae),document.addEventListener("touchcancel",ae),()=>{document.removeEventListener("touchstart",H),document.removeEventListener("touchmove",re),document.removeEventListener("touchend",ae),document.removeEventListener("touchcancel",ae),ue()}},[w,t.length,d,l,_,v]),a.useEffect(()=>{const X=ue=>{ue.key==="Escape"&&(ue.preventDefault(),ue.stopPropagation(),w!=="closing"&&F("closing"))};return window.addEventListener("keydown",X,!0),()=>window.removeEventListener("keydown",X,!0)},[w]);const J=()=>{w!=="closing"&&F("closing")},ce=w==="open",Ce=w==="closing",oe=h>0?Math.max(0,1-h/500):1,xe=h>0?Math.max(.35,1-h/500):1,Q=X=>{if(X.stopPropagation(),C.current){C.current=!1;return}if(t.length<=1)return;const ue=X.currentTarget.getBoundingClientRect(),Se=X.clientY-ue.top,j=Math.min(52,ue.height*.2);if(!(Se>ue.height-j)){if(X.clientX-ue.left<ue.width/2){l();return}d()}},ye=X=>{if(t.length<=1)return;const ue=X.currentTarget.getBoundingClientRect(),Se=X.clientX-ue.left,j=X.clientY-ue.top,de=Math.min(52,ue.height*.2);if(j>ue.height-de){X.currentTarget.style.cursor="default";return}X.currentTarget.style.cursor=Se<ue.width/2?"w-resize":"e-resize"},ve=a.useCallback(X=>{X.propertyName!=="transform"||!U.current||(me(),_(!1))},[me,_]),Me=Z?`translateX(${M}px)`:h>0?`translateY(${h}px)`:void 0,we={position:"fixed",top:O==null?void 0:O.top,left:O==null?void 0:O.left,width:O==null?void 0:O.width,height:O==null?void 0:O.height,objectFit:i==="cover"?"cover":"contain",transform:Me,opacity:h>0?xe:w==="opening"||Ce?0:1,transition:Y&&!K?"none":K?`transform ${In}ms ${ti}`:N?`transform ${In}ms ${ti}, opacity ${In}ms ${ti}`:w==="opening"||Ce?`opacity ${In}ms ${ti}`:"none",pointerEvents:G&&ce&&!Z?"auto":"none",touchAction:G&&ce?"none":void 0,zIndex:9998},Ae=O?{position:"fixed",top:O.top,height:O.height,width:O.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:x,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:w==="open"?"none":void 0},onClick:J,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:ce?oe:0,transition:Y?"none":`opacity ${In}ms ${ti}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:m?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:b,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:ce?1:0,transition:`opacity ${In}ms ${ti}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:b,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:ce?1:0,transition:`opacity ${In}ms ${ti}`},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),O&&q&&(G?r.jsx(Pm,{src:q.url,phase:w,mediaRef:T,mediaStyle:we,onLoadedMetadata:fe,onClick:Q,onMouseMove:ye,onTransitionEnd:ve},`${n}-${q.url}`):r.jsx("img",{ref:T,src:q.url,alt:q.name,onLoad:fe,onTransitionEnd:ve,style:we},`${n}-${q.url}`)),ce&&Ae&&t.length>1&&!G&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...Ae,left:O.left,cursor:"w-resize",pointerEvents:Z?"none":"auto"},onClick:X=>{if(C.current){C.current=!1;return}X.stopPropagation(),l()}}),r.jsx("div",{style:{...Ae,left:O.left+O.width/2,cursor:"e-resize",pointerEvents:Z?"none":"auto"},onClick:X=>{if(C.current){C.current=!1;return}X.stopPropagation(),d()}})]})]})}function Fm(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function _m({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=y.useScopedStyles(),{type:m="a",gridLayout:x,textBoxWidth:b=100,verticalGap:T,entriesCount:f,lightbox:L,imageDisplay:$,lightboxImageDisplay:R,slider:A,sliderTiming:C,direction:U,transition:E,titleMarginTop:O,subtitleMarginTop:I,titleColor:w,subtitleColor:F,lightboxCounterColor:h,titleFontFamily:S,titleFontSettings:M,titleFontSize:z,titleLineHeight:K,titleLetterSpacing:se,titleWordSpacing:Y,titleTextAppearance:D,subtitleFontFamily:N,subtitleFontSettings:W,subtitleFontSize:P,subtitleLineHeight:q,subtitleLetterSpacing:G,subtitleWordSpacing:Z,subtitleTextAppearance:_,lightboxCounterFontFamily:me,lightboxCounterFontSettings:v,lightboxCounterFontSize:fe,lightboxCounterLineHeight:J,lightboxCounterLetterSpacing:ce,lightboxCounterWordSpacing:Ce,lightboxCounterTextAppearance:oe,showText:xe="always",alignEntries:Q="off",align:ye="top"}=e,ve={fontSettings:{fontFamily:S,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:z??.01,lineHeight:K,letterSpacing:se??0,wordSpacing:Y??0,textAppearance:D,color:w},we={...cn(Xt(ve,n))},Ae={fontSettings:{fontFamily:N,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:P??.01,lineHeight:q,letterSpacing:G??0,wordSpacing:Z??0,textAppearance:_,color:F},ue={...cn(Xt(Ae,n))},Se={fontSettings:{fontFamily:me,fontWeight:(v==null?void 0:v.fontWeight)??400,fontStyle:(v==null?void 0:v.fontStyle)??"normal"},fontSize:fe??.01,lineHeight:J,letterSpacing:ce??0,wordSpacing:Ce??0,textAppearance:oe,color:h},de={...cn(Xt(Se,n)),...Or(fe,J,u,n)},H=Hr(z,K,`${u}-item-title`,`${u}-text-tight-leading`),re=Hr(P,q,`${u}-item-subtitle`,`${u}-text-tight-leading`),ae=Or(z,K,u,n),ne=Or(P,q,u,n),ie=Hr(fe,J,`${u}-lightbox-counter`,`${u}-text-tight-leading`),be=y.buildColorVars(u,{titleColor:w,subtitleColor:F,lightboxCounterColor:h},Nm,Hm),pe=`${l&&l!=="default"?`${u}-state-${l}`:""}${xe==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),Pe=f===0?1/0:f,le=(t??[]).slice(0,Pe),V=x.entryWidth??.2,He=($==null?void 0:$.display)==="cover",Fe=($==null?void 0:$.ratioValue)??"1:1",Qe=($==null?void 0:$.reversed)??!1,[Xe,lt]=Fe.split(":").map(Number),rt=`${Qe?lt:Xe} / ${Qe?Xe:lt}`,Tt=x.columnsCount,at=y.scalingValue(V??0,n),Ke=at,gt=!He&&A!=="off",bt=le.length%Tt||Tt,mt=bt<Tt&&le.length>0,kt=le.length-bt,Wt=mt?Math.floor((Tt-bt)/2)+1:1,et={width:Ke,...He?{aspectRatio:rt,height:"auto",overflow:"hidden"}:{height:"auto"}},St=`${u}-item-image-wrapper${gt?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),$t=m==="d"||m==="e"||m==="f",De=Q==="on",Ve=`calc(${y.scalingValue(V??0,n)} * (${b} / 100))`,_e=y.scalingValue(V*b/100,n),ht=He?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[It,At]=a.useState("ltr"),[Vt,tn]=a.useState(0),nn=a.useRef(null);a.useEffect(()=>{const ke=nn.current;if(!ke)return;const ft=new ResizeObserver(Je=>{tn(Math.round(Je[0].contentRect.width))});return ft.observe(ke),()=>ft.disconnect()},[]);const wt=(()=>{const ke={...be},ft=nn.current?getComputedStyle(nn.current).getPropertyValue("--cntrl-article-width").trim():"";return ft&&(ke["--cntrl-article-width"]=ft),ke})(),[Rt,qt]=a.useState(!1),[Kt,$e]=a.useState([]),[je,Oe]=a.useState(0),Ye=L==="on"&&(!n||i),Lt=(ke,ft)=>{n&&!i||L!=="off"&&($e(ke),Oe(ft),qt(!0))};a.useEffect(()=>{if(!Rt||L!=="on"||typeof document>"u")return;const ke=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ke}},[Rt,L]),a.useEffect(()=>{!n||i||qt(!1)},[n,i]);const tt=a.useMemo(()=>$m(u),[u]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:tt}}),r.jsx("div",{style:be,children:r.jsx("div",{ref:nn,className:`${u}-wrapper ${u}-type-${m}${De?` ${u}-align-entries`:""} ${u}-image-align-${ye} ${pe}`.trim(),style:{gridTemplateColumns:`repeat(${Tt}, ${at})`,rowGap:De?0:y.scalingValue(T??0,n),columnGap:y.scalingValue(x.horizontalGap??0,n),width:y.scalingValue(x.wrapperWidth??0,n),...De?{[`--${u}-align-entries-row-gap`]:y.scalingValue(T??0,n)}:{}},children:le.map((ke,ft)=>{var Qt;const Je=bs(ke.title),qe=bs(ke.subtitle),it=(((Qt=ke.link)==null?void 0:Qt.length)??0)>0&&L==="off"?ke.link:void 0,Ht=Math.floor(ft/Tt)===Math.ceil(le.length/Tt)-1,Et=mt&&ft>=kt?`${Wt+(ft-kt)}`:void 0,ct=$t?r.jsxs("div",{className:`${u}-item-text-block`,children:[Je&&r.jsx("p",{className:H,style:{width:Ve,...we,...ae},children:ke.title}),Je&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(O??0,n),width:_e}}),qe&&r.jsx("p",{className:re,style:{width:Ve,...ue,...ne},children:ke.subtitle}),qe&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(I??0,n),width:_e}})]}):null,Ot=De?r.jsxs("div",{className:`${u}-item-title-row`,children:[!$t&&r.jsx("div",{"data-controls":o&&Je?"titleMarginTop":void 0,className:o&&Je?`${u}-control`:void 0,style:{height:Je?y.scalingValue(O??0,n):0,width:_e}}),Je&&r.jsx("p",{className:H,style:{width:Ve,...we,...ae},children:ke.title}),$t&&Je&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(O??0,n),width:_e}})]}):null,Dt=De?r.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!$t&&r.jsx("div",{"data-controls":o&&qe?"subtitleMarginTop":void 0,className:o&&qe?`${u}-control`:void 0,style:{height:qe?y.scalingValue(I??0,n):0,width:_e}}),qe&&r.jsx("p",{className:re,style:{width:Ve,...ue,...ne},children:ke.subtitle}),$t&&qe&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:y.scalingValue(I??0,n),width:_e}})]}):null,jt=it?r.jsxs("a",{href:it,target:"_blank",className:`${u}-item-text-link`,children:[Ot,Dt]}):r.jsxs(r.Fragment,{children:[Ot,Dt]}),zt=Mm(ke.gallery),dt=zt.filter(vt=>vt.lightboxMedia).map(vt=>vt.lightboxMedia),Ut=r.jsx("div",{className:St,style:et,children:zt.length===0?null:A==="off"?(()=>{const{displayMedia:vt,lightboxMedia:Pt}=zt[0],Bt=Pt?dt.findIndex(g=>g.url===Pt.url):-1;return r.jsx(ws,{media:vt,className:`${u}-item-${eo(vt)?"video":"image"}`.trim(),style:ht,onMediaClick:Ye&&Bt>=0?()=>Lt(dt,Bt):void 0})})():r.jsxs(r.Fragment,{children:[gt&&De&&r.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:zt.map(({displayMedia:vt})=>eo(vt)?r.jsx("video",{src:vt.url,muted:!0,playsInline:!0},`sizer-${vt.url}`):r.jsx("img",{src:vt.url,alt:""},`sizer-${vt.url}`))}),r.jsx(xr,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:C*1e3,width:"100%",height:"100%",speed:Cm,type:E==="fade"?"fade":"loop",rewind:E==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:E==="fade"?"ltr":U!=="random"?U==="horizontal"?"ltr":"ttb":It},onMoved:vt=>{if(U!=="random"||E==="fade")return;const Pt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";At(Pt),setTimeout(()=>{vt.refresh()},0)},children:zt.map(({displayMedia:vt,lightboxMedia:Pt},Bt)=>{const g=Pt?dt.findIndex(ge=>ge.url===Pt.url):-1;return r.jsx(br,{children:r.jsx(ws,{media:vt,className:`${u}-item-${eo(vt)?"video":"image"}`.trim(),style:ht,onMediaClick:Ye&&g>=0?()=>Lt(dt,g):void 0})},Bt)})},`${E}-${V}-${U}-${C}-${Vt}-${d}`)]})}),Jt=$t?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&Je?"titleMarginTop":void 0,className:o&&Je?`${u}-control`:void 0,style:{height:Je?y.scalingValue(O??0,n):0,width:_e}}),r.jsx("p",{className:H,style:{width:Ve,...we,...ae},children:ke.title}),r.jsx("div",{"data-controls":o&&qe?"subtitleMarginTop":void 0,className:o&&qe?`${u}-control`:void 0,style:{height:qe?y.scalingValue(I??0,n):0,width:_e}}),r.jsx("p",{className:re,style:{width:Ve,...ue,...ne},children:ke.subtitle})]});return r.jsx("div",{className:`${u}-item`.trim(),style:Et&&!De?{gridColumn:Et}:void 0,children:r.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${De&&Ht?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(b??0)>100?`calc(${at} * (${b} / 100))`:at,...Et&&De?{gridColumn:Et}:{}},children:De?r.jsx(r.Fragment,{children:$t?r.jsxs(r.Fragment,{children:[jt,r.jsx("a",{href:it,target:"_blank",className:`${u}-item-image-link`,children:Ut})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:it,target:"_blank",className:`${u}-item-image-link`,children:Ut}),jt]})}):it?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:it,target:"_blank",className:`${u}-item-image-link`,children:[ct,Ut]}),!$t&&r.jsx("a",{href:it,target:"_blank",className:`${u}-item-text-link`,children:Jt})]}):r.jsxs(r.Fragment,{children:[ct,Ut,Jt]})})},ft)})})}),(!n||i)&&Rt&&typeof document<"u"&&L==="on"&&(()=>{const ke=(c?document.getElementById(c):null)??document.body;return mi.createPortal(r.jsx("div",{style:wt,"data-selection":"none",children:r.jsx(Wm,{prefix:u,items:Kt,index:je,imageDisplay:Fm(R),isEditor:n,onClose:()=>qt(!1),onPrev:()=>Oe(ft=>(ft-1+Kt.length)%Kt.length),onNext:()=>Oe(ft=>(ft+1)%Kt.length),counterClassName:ie,counterStyle:de})}),ke)})()]})}const Nm={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Hm=["hover","focus","filled","success","error"],Om=`import { Splide, SplideSlide } from '@splidejs/react-splide';
|
|
4159
4141
|
import '@splidejs/react-splide/css/core';
|
|
4160
4142
|
import { CommonComponentProps } from '../props';
|
|
4161
4143
|
import {
|
|
@@ -5969,12 +5951,12 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
|
|
|
5969
5951
|
};
|
|
5970
5952
|
|
|
5971
5953
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
5972
|
-
`,zr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Dm=["titleColor","subtitleColor","lightboxCounterColor"],Vm={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!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"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},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:"Gutter",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"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},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:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...zr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",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:"b",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:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,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:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,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:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","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","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{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","direction"]},{type:"group",title:"",items:["sliderTiming","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:[...Dm],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Gm={element:jm,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:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:Vm,sourceCode:Bm},qm=50,Ss=10,Ha="cntrl-lightbox-journal",$r=Ha,ma=`${Ha}-`,Cr=e=>`${Ha}-${e}`,ja=e=>e===$r||e.startsWith(ma),$s=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Cs=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=$s(t.get(Cr(e)));if(i)return i}const n=$s(t.get($r));if(n)return n;for(const[i]of t){if(!i.startsWith(ma))continue;const o=i.slice(ma.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},Ts=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Ul=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{ja(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(Cr(t),String(e)):i.searchParams.set($r,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},Km=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Cr(e)||i===$r:ja(i));if(n.forEach(i=>t.searchParams.delete(i)),n.length>0){const i=`${t.pathname}${t.search}${t.hash}`;window.history.replaceState(window.history.state,"",i)}},Xl=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Cr(e)):[...t.keys()].some(n=>ja(n))},Um=(e,t)=>{if(Xl(t)){if(e){window.history.back();return}Km(t)}},Xm=20,Ym=2,Br=e=>`max(${e}, ${Xm}px)`,Mi=e=>((e==null?void 0:e.image)??[]).slice(0,Ym),Yl=e=>e.reduce((t,n)=>t+Mi(n).length,0),Zm=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+Mi(s).length,1),i=Mi(e[t]).length;return{start:n,end:n+i-1}},Jm=(e,t)=>{const n=Yl(e),{start:i,end:o}=Zm(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Yo=(e,t)=>t==="B"?e.flatMap((n,i)=>Mi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Mi(n)})),Qm=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return Jm(i,o)},Ls=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",eg=(e,t,n)=>e==="B"?t.length>1:Yl(n)>1,hn=.004,Bn=.004,Ii={title1Width:.13,title2Width:.13,title3Width:.14},Dn=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},Pi=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},po=(e,t)=>Pi(e,t),sn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Vn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Pi(e.length,n),effective:po(e.length,n)}},Zl=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Jl=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Kn=["title1","title2","title3","count"],Be=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Oa={title1:"1",title2:"2",title3:"3",count:"Count"},za=e=>[Be(e,"fontFamily"),Be(e,"fontSettings"),{type:"row",items:[Be(e,"fontSize"),Be(e,"lineHeight"),Be(e,"letterSpacing"),Be(e,"wordSpacing")]},Be(e,"textAlign"),Be(e,"textAppearance")],tg=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Kn.map(e=>[Oa[e],za(e)]))}),ng={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},ig={title1:.02,title2:.02,title3:.02,count:.017},li=(e,t)=>{const n=i=>{const o=Be(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[ng[t]]}},ci=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??ig[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)};function Ql({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:m=0,title2MarginLeft:x=0,title3MarginLeft:b=0,titleRowMarginBottom:T=0,titleHeaderLayout:f="desktop",contentMarginTop:L=0,iconMarginRight:$=0,closeIcon:R=null,closeIconMaxWidth:P=0,closeIconColor:C="#000000",closeIconHoverColor:X="#cccccc"}=n,E=y.scalingValue(L,i),B=y.scalingValue($,i),I=y.scalingValue(T,i),w=f==="mobile",W=ci("title1",li(n,"title1"),i),h=ci("title2",li(n,"title2"),i),S=ci("title3",li(n,"title3"),i),k=a.useMemo(()=>({title1Width:d??Ii.title1Width,title2Width:c??Ii.title2Width,title3Width:u??Ii.title3Width}),[d,c,u]),D=a.useMemo(()=>({title2MarginLeft:x,title3MarginLeft:b}),[x,b]),U=a.useMemo(()=>Dn(e,t,W,h,S),[e,t,W,h,S]),ae=a.useMemo(()=>U.map(z=>k[z.widthKey]),[U,k]),Y=a.useMemo(()=>Pi(U.length,ae),[U.length,ae]),G=a.useMemo(()=>po(U.length,ae),[U.length,ae]),H=a.useMemo(()=>U.filter(z=>z.prefix==="title1"),[U]),F=a.useMemo(()=>U.filter(z=>z.prefix==="title2"||z.prefix==="title3"),[U]),A=a.useMemo(()=>Vn(H,k),[H,k]),K=a.useMemo(()=>Vn(F,k),[F,k]),q=!!(t.title1||t.title2||t.title3),ee=R!==null;if(!(q||ee))return null;const ue=(m??0)>0||o,v=(z,re)=>{const ke=U.findIndex(j=>j.prefix===z.prefix);if(!w||re==="single-row")return{effectiveWidth:G[ke]??0,resolvedWidth:Y[ke]??0,maxWidth:sn(ke,Y)};if(re==="two-row-top"){const j=H.findIndex(Ne=>Ne.prefix===z.prefix);return{effectiveWidth:A.effective[j]??0,resolvedWidth:A.resolved[j]??0,maxWidth:sn(j,A.resolved)}}const ie=F.findIndex(j=>j.prefix===z.prefix);return{effectiveWidth:K.effective[ie]??0,resolvedWidth:K.resolved[ie]??0,maxWidth:sn(ie,K.resolved)}},ye=(z,re,ke)=>{if(!w||ke==="single-row"){const et=z.findIndex(De=>De.prefix===re.prefix),Ye=z.map(De=>k[De.widthKey]),lt=Pi(z.length,Ye);return{effectiveWidth:po(z.length,Ye)[et]??0,resolvedWidth:lt[et]??0,maxWidth:sn(et,lt)}}if(ke==="two-row-top"){const et=z.filter(De=>De.prefix==="title1"),Ye=et.findIndex(De=>De.prefix===re.prefix),{resolved:lt,effective:mt}=Vn(et,k);return{effectiveWidth:mt[Ye]??0,resolvedWidth:lt[Ye]??0,maxWidth:sn(Ye,lt)}}const ie=z.filter(et=>et.prefix==="title2"||et.prefix==="title3"),j=ie.findIndex(et=>et.prefix===re.prefix),{resolved:Ne,effective:Me}=Vn(ie,k);return{effectiveWidth:Me[j]??0,resolvedWidth:Ne[j]??0,maxWidth:sn(j,Ne)}},Z=z=>Jl(U,Y,D,z)+(w?0:m??0),ce=()=>w?0:m??0,$e=z=>F.slice(0,z).reduce((re,ke,ie)=>re+(ke.marginLeftKey?D[ke.marginLeftKey]??0:0)+(K.resolved[ie]??0),0),ne=z=>{const re=F[z];return $e(z)+(re.marginLeftKey?D[re.marginLeftKey]??0:0)+(K.resolved[z]??0)},ve=(z,re,ke)=>{const ie=z.marginLeftKey?D[z.marginLeftKey]??0:0,{effectiveWidth:j,resolvedWidth:Ne,maxWidth:Me}=ke??v(z,re),et=Math.max(ie,Bn),Ye=o&&re==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":z.prefix,style:{width:y.scalingValue(j,i),...ie>0?{marginLeft:y.scalingValue(ie,i)}:{}},children:[r.jsx("p",{className:z.className,style:z.style,children:z.text}),Ye&&z.marginLeftKey?r.jsx("div",{"data-controls":z.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ne),style:{position:"absolute",top:0,left:y.scalingValue(-ie,i),width:y.scalingValue(et,i),height:"100%",pointerEvents:"auto"}}):null,Ye?r.jsx("div",{"data-controls":z.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Me),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:y.scalingValue(-hn/2,i),width:y.scalingValue(hn,i),height:"100%",pointerEvents:"auto"}}):null]},z.className)},J=(z="two-row")=>{const re=U.findIndex(j=>j.prefix==="title1"),ke=re>=0?Y[re]:k.title1Width,ie=z==="two-row"&&o;return r.jsx("div",{...ie?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke)}:{},style:{width:y.scalingValue(m??0,i),flexShrink:0,alignSelf:"stretch",...ie?{pointerEvents:"auto"}:{}}})},pe=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:W,"aria-hidden":"true",children:" "}),he=z=>{const re=Dn(e,z,W,h,S);return r.jsx(r.Fragment,{children:re.map(ke=>ve(ke,"single-row",ye(re,ke,"single-row")))})},Ae=z=>{const re=Dn(e,z,W,h,S),ke=re.find(ie=>ie.prefix==="title1");return ke?ve(ke,"two-row-top",ye(re,ke,"two-row-top")):null},be=(z,re=!1)=>{const ke=Dn(e,z,W,h,S),ie=ke.filter(Me=>Me.prefix==="title2"||Me.prefix==="title3"),j=o&&re;return ie.length>0||j||(T??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[ie.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[r.jsx("div",{className:`${e}-titles-stack`,children:ie.map(Me=>ve(Me,"two-row-bottom",ye(ke,Me,"two-row-bottom")))}),re&&o?r.jsxs(r.Fragment,{children:[Se(),Ie()]}):null]}):null,(T??0)>0||j?r.jsx("div",{"data-controls":j?"titleRowMarginBottom":void 0,"data-controls-axis":j?"y":void 0,"data-controls-reverse":j?"":void 0,className:j?`${e}-control`:void 0,style:{height:I,width:"100%",flexShrink:0,pointerEvents:j?"auto":"none"}}):null]}):null},We=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:y.scalingValue(P??0,i),height:y.scalingValue(P??0,i),marginRight:B,"--close-icon-hover-color":X},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:z=>{z.stopPropagation(),l==null||l()},"aria-label":"Close",children:r.jsx(rn,{url:R??"",fill:C,hoverFill:i&&!s?C:X,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:B,height:"100%",pointerEvents:"auto"}})]}),Q=()=>ee?r.jsx("div",{className:`${e}-titles-row-header-controls`,children:We()}):null,le=z=>r.jsx("div",{className:`${e}-titles-row-titles`,children:r.jsx("div",{className:`${e}-titles-stack`,children:z})}),xe=z=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[ee||q?pe():null,ue?J("two-row"):null,le(z),Q()]}),O=(z,re=!1)=>r.jsxs(r.Fragment,{children:[xe(Ae(z)),be(z,re)]}),se=()=>{const z=w?-1:U.findIndex(ie=>ie.prefix==="title1"),re=!w&&(o||(m??0)>0)?(()=>{const ie=m??0,j=z>=0?Y[z]:k.title1Width,Ne=Math.max(ie,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(j),style:{position:"absolute",top:0,left:0,width:y.scalingValue(Ne,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,ke=U.flatMap((ie,j)=>{if(!ie.marginLeftKey)return[];const Ne=D[ie.marginLeftKey]??0,Me=Zl(U,Y,D,j)+ce(),et=Math.max(Ne,Bn);return r.jsx("div",{"data-controls":ie.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Y[j]),style:{position:"absolute",top:0,left:y.scalingValue(Me,i),width:y.scalingValue(et,i),height:"100%",pointerEvents:"auto"}},ie.marginLeftKey)});return re?[re,...ke]:ke},fe=()=>U.map((z,re)=>{const ke=sn(re,Y),j=Z(re)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":z.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ke),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:y.scalingValue(j,i),width:y.scalingValue(hn,i),height:"100%",pointerEvents:"auto"}})},`${z.widthKey}-junction`)}),Se=()=>F.flatMap((z,re)=>{if(!z.marginLeftKey)return[];const ke=D[z.marginLeftKey]??0,ie=$e(re),j=Math.max(ke,Bn),{resolvedWidth:Ne}=v(z,"two-row-bottom");return r.jsx("div",{"data-controls":z.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ne),style:{position:"absolute",top:0,left:y.scalingValue(ie,i),width:y.scalingValue(j,i),height:"100%",pointerEvents:"auto"}},z.marginLeftKey)}),Ie=()=>F.map((z,re)=>{const{maxWidth:ke}=v(z,"two-row-bottom"),j=ne(re)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":z.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ke),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:y.scalingValue(j,i),width:y.scalingValue(hn,i),height:"100%",pointerEvents:"auto"}})},`${z.widthKey}-junction`)}),we=()=>!o||w?null:r.jsxs(r.Fragment,{children:[se(),fe()]}),_=!!(t.title2||t.title3||(T??0)>0||o),de=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[ee||q?pe():null,ue?J("single-row"):null,q?le(he(t)):r.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),Q(),we()]}),oe=()=>r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,..._?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:_?void 0:{flex:"0 0 auto",height:"auto"},children:O(t,!0)}),we()]});return r.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:E,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...w?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${w?` ${e}-lightbox-content-area-stacked`:""}`,children:r.jsx("div",{className:`${e}-text-bar-cell${w?` ${e}-text-bar-cell-stacked`:""}`,style:w?void 0:{flex:1,minWidth:0,width:"100%"},children:w?oe():de()})})})]})}function og(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function rg(e){return`
|
|
5954
|
+
`,jr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},jm=["titleColor","subtitleColor","lightboxCounterColor"],zm={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!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"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},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:"Gutter",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"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},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:{...jr.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:{...jr.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:{...jr.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:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",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:"b",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:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,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:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,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:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","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","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{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","direction"]},{type:"group",title:"",items:["sliderTiming","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:[...jm],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Bm={element:_m,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:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:zm,sourceCode:Om},Dm=50,Ss=10,Na="cntrl-lightbox-journal",Sr=Na,pa=`${Na}-`,$r=e=>`${Na}-${e}`,Ha=e=>e===Sr||e.startsWith(pa),$s=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Cs=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=$s(t.get($r(e)));if(i)return i}const n=$s(t.get(Sr));if(n)return n;for(const[i]of t){if(!i.startsWith(pa))continue;const o=i.slice(pa.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},Ts=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Kl=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Ha(l)&&i.searchParams.delete(l)}),t?i.searchParams.set($r(t),String(e)):i.searchParams.set(Sr,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},Vm=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===$r(e)||i===Sr:Ha(i));if(n.forEach(i=>t.searchParams.delete(i)),n.length>0){const i=`${t.pathname}${t.search}${t.hash}`;window.history.replaceState(window.history.state,"",i)}},Ul=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has($r(e)):[...t.keys()].some(n=>Ha(n))},Gm=(e,t)=>{if(Ul(t)){if(e){window.history.back();return}Vm(t)}},qm=20,Km=2,zr=e=>`max(${e}, ${qm}px)`,Mi=e=>((e==null?void 0:e.image)??[]).slice(0,Km),Xl=e=>e.reduce((t,n)=>t+Mi(n).length,0),Um=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+Mi(s).length,1),i=Mi(e[t]).length;return{start:n,end:n+i-1}},Xm=(e,t)=>{const n=Xl(e),{start:i,end:o}=Um(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Xo=(e,t)=>t==="B"?e.flatMap((n,i)=>Mi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Mi(n)})),Ym=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return Xm(i,o)},Ls=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Zm=(e,t,n)=>e==="B"?t.length>1:Xl(n)>1,gn=.004,zn=.004,Li={title1Width:.13,title2Width:.13,title3Width:.14},Bn=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},ki=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},uo=(e,t)=>ki(e,t),an=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Dn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:ki(e.length,n),effective:uo(e.length,n)}},Yl=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Zl=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),qn=["title1","title2","title3","count"],ze=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Oa={title1:"1",title2:"2",title3:"3",count:"Count"},ja=e=>[ze(e,"fontFamily"),ze(e,"fontSettings"),{type:"row",items:[ze(e,"fontSize"),ze(e,"lineHeight"),ze(e,"letterSpacing"),ze(e,"wordSpacing")]},ze(e,"textAlign"),ze(e,"textAppearance")],Jm=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(qn.map(e=>[Oa[e],ja(e)]))}),Qm={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},eg={title1:.02,title2:.02,title3:.02,count:.017},si=(e,t)=>{const n=i=>{const o=ze(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Qm[t]]}},li=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??eg[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)};function Jl({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:m=0,title2MarginLeft:x=0,title3MarginLeft:b=0,titleRowMarginBottom:T=0,titleHeaderLayout:f="desktop",contentMarginTop:L=0,iconMarginRight:$=0,closeIcon:R=null,closeIconMaxWidth:A=0,closeIconColor:C="#000000",closeIconHoverColor:U="#cccccc"}=n,E=y.scalingValue(L,i),O=y.scalingValue($,i),I=y.scalingValue(T,i),w=f==="mobile",F=li("title1",si(n,"title1"),i),h=li("title2",si(n,"title2"),i),S=li("title3",si(n,"title3"),i),M=a.useMemo(()=>({title1Width:d??Li.title1Width,title2Width:c??Li.title2Width,title3Width:u??Li.title3Width}),[d,c,u]),z=a.useMemo(()=>({title2MarginLeft:x,title3MarginLeft:b}),[x,b]),K=a.useMemo(()=>Bn(e,t,F,h,S),[e,t,F,h,S]),se=a.useMemo(()=>K.map(ee=>M[ee.widthKey]),[K,M]),Y=a.useMemo(()=>ki(K.length,se),[K.length,se]),D=a.useMemo(()=>uo(K.length,se),[K.length,se]),N=a.useMemo(()=>K.filter(ee=>ee.prefix==="title1"),[K]),W=a.useMemo(()=>K.filter(ee=>ee.prefix==="title2"||ee.prefix==="title3"),[K]),P=a.useMemo(()=>Dn(N,M),[N,M]),q=a.useMemo(()=>Dn(W,M),[W,M]),G=!!(t.title1||t.title2||t.title3),Z=R!==null;if(!(G||Z))return null;const me=(m??0)>0||o,v=(ee,pe)=>{const Pe=K.findIndex(V=>V.prefix===ee.prefix);if(!w||pe==="single-row")return{effectiveWidth:D[Pe]??0,resolvedWidth:Y[Pe]??0,maxWidth:an(Pe,Y)};if(pe==="two-row-top"){const V=N.findIndex(He=>He.prefix===ee.prefix);return{effectiveWidth:P.effective[V]??0,resolvedWidth:P.resolved[V]??0,maxWidth:an(V,P.resolved)}}const le=W.findIndex(V=>V.prefix===ee.prefix);return{effectiveWidth:q.effective[le]??0,resolvedWidth:q.resolved[le]??0,maxWidth:an(le,q.resolved)}},fe=(ee,pe,Pe)=>{if(!w||Pe==="single-row"){const Qe=ee.findIndex(Be=>Be.prefix===pe.prefix),Xe=ee.map(Be=>M[Be.widthKey]),lt=ki(ee.length,Xe);return{effectiveWidth:uo(ee.length,Xe)[Qe]??0,resolvedWidth:lt[Qe]??0,maxWidth:an(Qe,lt)}}if(Pe==="two-row-top"){const Qe=ee.filter(Be=>Be.prefix==="title1"),Xe=Qe.findIndex(Be=>Be.prefix===pe.prefix),{resolved:lt,effective:pt}=Dn(Qe,M);return{effectiveWidth:pt[Xe]??0,resolvedWidth:lt[Xe]??0,maxWidth:an(Xe,lt)}}const le=ee.filter(Qe=>Qe.prefix==="title2"||Qe.prefix==="title3"),V=le.findIndex(Qe=>Qe.prefix===pe.prefix),{resolved:He,effective:Fe}=Dn(le,M);return{effectiveWidth:Fe[V]??0,resolvedWidth:He[V]??0,maxWidth:an(V,He)}},J=ee=>Zl(K,Y,z,ee)+(w?0:m??0),ce=()=>w?0:m??0,Ce=ee=>W.slice(0,ee).reduce((pe,Pe,le)=>pe+(Pe.marginLeftKey?z[Pe.marginLeftKey]??0:0)+(q.resolved[le]??0),0),oe=ee=>{const pe=W[ee];return Ce(ee)+(pe.marginLeftKey?z[pe.marginLeftKey]??0:0)+(q.resolved[ee]??0)},xe=(ee,pe,Pe)=>{const le=ee.marginLeftKey?z[ee.marginLeftKey]??0:0,{effectiveWidth:V,resolvedWidth:He,maxWidth:Fe}=Pe??v(ee,pe),Qe=Math.max(le,zn),Xe=o&&pe==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":ee.prefix,style:{width:y.scalingValue(V,i),...le>0?{marginLeft:y.scalingValue(le,i)}:{}},children:[r.jsx("p",{className:ee.className,style:ee.style,children:ee.text}),Xe&&ee.marginLeftKey?r.jsx("div",{"data-controls":ee.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(He),style:{position:"absolute",top:0,left:y.scalingValue(-le,i),width:y.scalingValue(Qe,i),height:"100%",pointerEvents:"auto"}}):null,Xe?r.jsx("div",{"data-controls":ee.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Fe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:y.scalingValue(-gn/2,i),width:y.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}}):null]},ee.className)},Q=(ee="two-row")=>{const pe=K.findIndex(V=>V.prefix==="title1"),Pe=pe>=0?Y[pe]:M.title1Width,le=ee==="two-row"&&o;return r.jsx("div",{...le?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Pe)}:{},style:{width:y.scalingValue(m??0,i),flexShrink:0,alignSelf:"stretch",...le?{pointerEvents:"auto"}:{}}})},ye=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:F,"aria-hidden":"true",children:" "}),ve=ee=>{const pe=Bn(e,ee,F,h,S);return r.jsx(r.Fragment,{children:pe.map(Pe=>xe(Pe,"single-row",fe(pe,Pe,"single-row")))})},Me=ee=>{const pe=Bn(e,ee,F,h,S),Pe=pe.find(le=>le.prefix==="title1");return Pe?xe(Pe,"two-row-top",fe(pe,Pe,"two-row-top")):null},we=(ee,pe=!1)=>{const Pe=Bn(e,ee,F,h,S),le=Pe.filter(Fe=>Fe.prefix==="title2"||Fe.prefix==="title3"),V=o&&pe;return le.length>0||V||(T??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[le.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[r.jsx("div",{className:`${e}-titles-stack`,children:le.map(Fe=>xe(Fe,"two-row-bottom",fe(Pe,Fe,"two-row-bottom")))}),pe&&o?r.jsxs(r.Fragment,{children:[re(),ae()]}):null]}):null,(T??0)>0||V?r.jsx("div",{"data-controls":V?"titleRowMarginBottom":void 0,"data-controls-axis":V?"y":void 0,"data-controls-reverse":V?"":void 0,className:V?`${e}-control`:void 0,style:{height:I,width:"100%",flexShrink:0,pointerEvents:V?"auto":"none"}}):null]}):null},Ae=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:y.scalingValue(A??0,i),height:y.scalingValue(A??0,i),marginRight:O,"--close-icon-hover-color":U},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:ee=>{ee.stopPropagation(),l==null||l()},"aria-label":"Close",children:r.jsx(on,{url:R??"",fill:C,hoverFill:i&&!s?C:U,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:O,height:"100%",pointerEvents:"auto"}})]}),X=()=>Z?r.jsx("div",{className:`${e}-titles-row-header-controls`,children:Ae()}):null,ue=ee=>r.jsx("div",{className:`${e}-titles-row-titles`,children:r.jsx("div",{className:`${e}-titles-stack`,children:ee})}),Se=ee=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Z||G?ye():null,me?Q("two-row"):null,ue(ee),X()]}),j=(ee,pe=!1)=>r.jsxs(r.Fragment,{children:[Se(Me(ee)),we(ee,pe)]}),de=()=>{const ee=w?-1:K.findIndex(le=>le.prefix==="title1"),pe=!w&&(o||(m??0)>0)?(()=>{const le=m??0,V=ee>=0?Y[ee]:M.title1Width,He=Math.max(le,zn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(V),style:{position:"absolute",top:0,left:0,width:y.scalingValue(He,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Pe=K.flatMap((le,V)=>{if(!le.marginLeftKey)return[];const He=z[le.marginLeftKey]??0,Fe=Yl(K,Y,z,V)+ce(),Qe=Math.max(He,zn);return r.jsx("div",{"data-controls":le.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Y[V]),style:{position:"absolute",top:0,left:y.scalingValue(Fe,i),width:y.scalingValue(Qe,i),height:"100%",pointerEvents:"auto"}},le.marginLeftKey)});return pe?[pe,...Pe]:Pe},H=()=>K.map((ee,pe)=>{const Pe=an(pe,Y),V=J(pe)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ee.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Pe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:y.scalingValue(V,i),width:y.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}})},`${ee.widthKey}-junction`)}),re=()=>W.flatMap((ee,pe)=>{if(!ee.marginLeftKey)return[];const Pe=z[ee.marginLeftKey]??0,le=Ce(pe),V=Math.max(Pe,zn),{resolvedWidth:He}=v(ee,"two-row-bottom");return r.jsx("div",{"data-controls":ee.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(He),style:{position:"absolute",top:0,left:y.scalingValue(le,i),width:y.scalingValue(V,i),height:"100%",pointerEvents:"auto"}},ee.marginLeftKey)}),ae=()=>W.map((ee,pe)=>{const{maxWidth:Pe}=v(ee,"two-row-bottom"),V=oe(pe)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ee.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Pe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:y.scalingValue(V,i),width:y.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}})},`${ee.widthKey}-junction`)}),ne=()=>!o||w?null:r.jsxs(r.Fragment,{children:[de(),H()]}),ie=!!(t.title2||t.title3||(T??0)>0||o),be=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Z||G?ye():null,me?Q("single-row"):null,G?ue(ve(t)):r.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),X(),ne()]}),Te=()=>r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ie?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:ie?void 0:{flex:"0 0 auto",height:"auto"},children:j(t,!0)}),ne()]});return r.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:E,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...w?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${w?` ${e}-lightbox-content-area-stacked`:""}`,children:r.jsx("div",{className:`${e}-text-bar-cell${w?` ${e}-text-bar-cell-stacked`:""}`,style:w?void 0:{flex:1,minWidth:0,width:"100%"},children:w?Te():be()})})})]})}function tg(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ng(e){return`
|
|
5973
5955
|
.${e}-wrapper {
|
|
5974
5956
|
display: grid;
|
|
5975
5957
|
align-items: start;
|
|
5976
5958
|
justify-content: center;
|
|
5977
|
-
min-height: ${
|
|
5959
|
+
min-height: ${tg(48)};
|
|
5978
5960
|
}
|
|
5979
5961
|
.${e}-item {
|
|
5980
5962
|
display: flex;
|
|
@@ -6230,17 +6212,6 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
6230
6212
|
.${e}-title-resize-handle {
|
|
6231
6213
|
background: transparent;
|
|
6232
6214
|
}
|
|
6233
|
-
.${e}-title-resize-handle::after {
|
|
6234
|
-
content: '';
|
|
6235
|
-
position: absolute;
|
|
6236
|
-
top: 0;
|
|
6237
|
-
left: 50%;
|
|
6238
|
-
transform: translateX(-50%);
|
|
6239
|
-
width: 2px;
|
|
6240
|
-
height: 100%;
|
|
6241
|
-
background: #FF5C02;
|
|
6242
|
-
pointer-events: none;
|
|
6243
|
-
}
|
|
6244
6215
|
.${e}-lightbox {
|
|
6245
6216
|
position: fixed;
|
|
6246
6217
|
inset: 0;
|
|
@@ -6300,7 +6271,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
6300
6271
|
pointer-events: auto;
|
|
6301
6272
|
flex-shrink: 0;
|
|
6302
6273
|
}
|
|
6303
|
-
`}const Is={url:"",name:"",objectFit:"cover"},$n=500,Ki=650,pn="cubic-bezier(0.22, 1, 0.36, 1)",ag=72,sg=50,lg=1e4,cg=650,dg=500;function ug(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function ec(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=or(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function pg(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?ec(i,n):null}function mg(e){return e.reduce((t,n,i)=>{const o=Ba(n.gallery),l=Da(o).filter(d=>d.lightboxMedia).map(d=>d.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function Zi(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function Rs(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Zi(e,i,n)}const gg=.03;function tc(e){return e.width*gg}const Dr={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function _o(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Es(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function hg(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function ga(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function fg(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:ga(e,t.width,t.height)}function yg(e,t){if(Vi(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function vg(e){const t=new Set,n=[];for(const i of e){const o=Ba(i.gallery),s=Da(o);for(const l of s)for(const d of[l.displayMedia,l.lightboxMedia])d!=null&&d.url&&!t.has(d.url)&&(t.add(d.url),n.push(d))}return n}function xg({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Vi(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function Ai(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=tc(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function rr(e,t,n){const i=Ai(e,t,n);return{...i,left:2*i.left-e.left}}function bg(e,t,n){const{left:i,width:o}=n,s=tc(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function nc(e,t,n,i){const o=Ai(e,"left",i),s=Ai(e,"right",i),l=rr(e,"left",i),d=rr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function wg(e,t,n,i){const{start:o,end:s}=nc(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function Sg(e,t,n){const i=Ai(e,t,n),o=rr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function ic(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Ba(e){if(!e)return;if(ic(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.url?t:void 0,o=n!=null&&n.url?n:void 0;if(!(!i&&!o))return[{media:[o??i??Is,i??o??Is]}]}function $g(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Cg(e){const[t]=e.media;return t!=null&&t.url?t:null}function Da(e){if(!Array.isArray(e)||e.length===0)return[];if(ic(e)){const t=[];for(const n of e){const i=$g(n);if(!i)continue;const o=Cg(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Vi(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Tg({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Vi(e)?r.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):r.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Lg({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function No({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Vi(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function Ig({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:m,layoutId:x,sourceRect:b,resolveCloseSourceRect:T,onClose:f,onPrev:L,onNext:$}){const R=a.useRef(null),P=a.useRef(null),C=a.useRef(null),X=a.useRef(new Map),[E,B]=a.useState(0),I=a.useRef(null),w=a.useRef(0),W=a.useRef(0),h=a.useRef("none"),S=a.useRef(!1),k=a.useRef(!1),D=a.useRef(!1),U=a.useRef(null),ae=a.useRef(null),Y=a.useRef(null),G=a.useRef(()=>{}),H=a.useRef(null),F=a.useRef(null),A=a.useRef(null),K=a.useRef(!1),[q,ee]=a.useState(null),[N,ue]=a.useState(Dr),[v,ye]=a.useState(0),[Z,ce]=a.useState("opening"),[$e,ne]=a.useState(0),[ve,J]=a.useState(0),[pe,he]=a.useState(!1),[Ae,be]=a.useState(null),[We,Q]=a.useState(null),[le,xe]=a.useState(null),[O,se]=a.useState(!1),[fe,Se]=a.useState(null),[Ie,we]=a.useState(!1),_=a.useRef(!1),[de,oe]=a.useState(!1),[z,re]=a.useState(!1),ke=a.useRef(n),ie=a.useRef(void 0),j=t[n],Ne=j?Vi(j):!1,Me=ve!==0||pe,et=!l&&(!s||!!d),Ye=c&&!l,lt=u.length>1,mt=a.useCallback((g,me)=>t.length<=1?null:t[(g+me+t.length)%t.length]??null,[t]),De=lt?Zi(u,m,-1):mt(n,-1),ot=lt?Zi(u,m,1):mt(n,1),$t=Ae===-1&&Me?lt&&We!==null?Zi(u,We,-1):le!==null?mt(le,-1):null:null,rt=Ae===1&&Me?lt&&We!==null?Zi(u,We,1):le!==null?mt(le,1):null:null,Ue=$t&&$t.url!==(De==null?void 0:De.url)?$t:null,ht=rt&&rt.url!==(ot==null?void 0:ot.url)?rt:null,xt=De&&Ye?(()=>{const g=lt?Rs(u,m,-1):t.length>2?mt((n-1+t.length)%t.length,-1):null;return g&&g.url!==De.url?g:null})():null,dt=ot&&Ye?(()=>{const g=lt?Rs(u,m,1):t.length>2?mt((n+1)%t.length,1):null;return g&&g.url!==ot.url?g:null})():null,kt=Ue??xt,_t=ht??dt,Qe=a.useCallback((g,me,Re)=>{if(!g||!me||!Re)return;const Le=X.current,Ze=Le.get(g);(Ze==null?void 0:Ze.width)===me&&(Ze==null?void 0:Ze.height)===Re||(Le.set(g,{width:me,height:Re}),B(Et=>Et+1))},[]),Tt=a.useCallback(g=>{if(!(g!=null&&g.url))return null;const me=X.current.get(g.url);return fg(P.current,me)},[E,v]),Lt=a.useCallback(()=>{if(!j)return;const g=Tt(j);if(g){ee(g);return}const me=P.current;me&&ee(Es(me))},[j,Tt]),Ge=a.useCallback(g=>{if(lt){const me=u.length;Q((m+g+me)%me),xe(null);return}t.length>1&&(xe((n+g+t.length)%t.length),Q(null))},[lt,u.length,m,t.length,n]),qe=a.useCallback(g=>{D.current=g,he(g)},[]),Pe=a.useCallback(()=>{U.current!==null&&(window.clearTimeout(U.current),U.current=null)},[]),gt=a.useCallback(()=>{Pe(),U.current=window.setTimeout(()=>{Pe(),qe(!1)},Ki+32)},[Pe,qe]),It=a.useCallback(()=>{const g=R.current;if(!g){ue({left:0,top:0,width:typeof window<"u"?window.innerWidth:Dr.width,height:typeof window<"u"?window.innerHeight:Dr.height});return}const me=g.getBoundingClientRect();ue({left:me.left,top:me.top,width:me.width,height:me.height})},[]),Mt=a.useCallback((g,me)=>{if(Me){if(de&&!pe)return`translate(${ve}px, 0px)`;if(pe&&Ae!==null){const Re=Tt(g);if(!Re)return;const{x:Le,y:Ze}=wg(Re,me,Ae,N);return`translate(${Le}px, ${Ze}px)`}if(pe)return"translate(0px, 0px)"}},[Me,de,pe,ve,Ae,N,Tt]),Dt=a.useCallback(()=>{const g=ae.current;ae.current=null,Pe(),qe(!1),be(null),Q(null),xe(null),J(0),oe(!1),S.current=!1,W.current=0,h.current="none",g===-1?L():g===1&&$()},[Pe,qe,L,$]),en=a.useCallback(()=>{Pe(),U.current=window.setTimeout(()=>{ae.current!==null&&Dt()},Ki+32)},[Pe,Dt]),on=a.useCallback(()=>{Pe(),ae.current=null,qe(!1),be(null),Q(null),xe(null),J(0),oe(!1),S.current=!1,W.current=0,h.current="none"},[Pe,qe]),bt=a.useCallback(g=>{if(!(!Ye||!q)){if(D.current){if(ae.current===g){Y.current=g,Dt();return}on()}Pe(),Ge(g),ae.current=g,be(g),qe(!0),en()}},[Ye,q,Dt,on,Pe,Ge,qe,en]);G.current=bt;const Rt=a.useCallback(()=>{H.current=null,K.current=!1,F.current!==null&&(window.clearInterval(F.current),F.current=null),A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),Ut=a.useCallback(g=>{F.current!==null&&window.clearInterval(F.current);const me=K.current?dg:cg;F.current=window.setInterval(()=>{G.current(g)},me)},[]),Kt=a.useCallback(g=>{H.current!==g&&(Rt(),H.current=g,K.current=!1,G.current(g),Ut(g),A.current=window.setTimeout(()=>{A.current=null,H.current===g&&(K.current=!0,Ut(g))},lg))},[Rt,Ut]),ft=a.useCallback(()=>{const g=P.current;if(!g)return;const me=j==null?void 0:j.url,Re=me?X.current.get(me):void 0;if(Re!=null&&Re.width&&(Re!=null&&Re.height)){ee(ga(g,Re.width,Re.height));return}const Le=C.current;if(Le&&me&&(Le.src===me||Le.currentSrc===me)){const{width:Et,height:Ve}=hg(Le);if(Et&&Ve){Qe(me,Et,Ve),ee(ga(g,Et,Ve));return}}const Ze=Es(g);!Ze.width||!Ze.height||ee(Ze)},[j==null?void 0:j.url,Qe]),Jt=a.useCallback(g=>{if(C.current=g,!!g){if(g instanceof HTMLVideoElement){g.readyState>=1&&g.videoWidth>0&&ft();return}g.complete&&g.naturalWidth>0&&ft()}},[ft]),Ce=a.useCallback(()=>{It(),ft(),ye(g=>g+1)},[It,ft]);a.useEffect(()=>{Ce();const g=P.current,me=R.current,Re=new ResizeObserver(()=>Ce());return g&&Re.observe(g),me&&Re.observe(me),window.addEventListener("resize",Ce),()=>{Re.disconnect(),window.removeEventListener("resize",Ce)}},[Ce,n,x]),a.useLayoutEffect(()=>{if(!j)return;const g=C.current;if(g){if(g instanceof HTMLImageElement&&g.complete&&g.naturalWidth>0){ft();return}g instanceof HTMLVideoElement&&g.readyState>=1&&g.videoWidth>0&&ft()}},[j==null?void 0:j.url,n,ft]),a.useEffect(()=>{Lt()},[Lt,E]),a.useEffect(()=>{const g=new Set,me=[],Re=Le=>{!(Le!=null&&Le.url)||g.has(Le.url)||(g.add(Le.url),me.push(Le))};t.forEach(Re),u.forEach(Le=>Le.items.forEach(Re)),me.forEach(Le=>{X.current.has(Le.url)||yg(Le,Qe)})},[t,u,Qe]),a.useEffect(()=>{if(Z!=="opening"||!q)return;if(!b){ce("open");return}se(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{se(!0),ce("open")})});return()=>cancelAnimationFrame(g)},[Z,q,b]),a.useEffect(()=>{if(Z!=="closing")return;const g=setTimeout(()=>f(),$n);return()=>clearTimeout(g)},[Z,f]),a.useEffect(()=>()=>{Pe()},[Pe]),a.useLayoutEffect(()=>{ke.current===n&&ie.current===(j==null?void 0:j.url)||(Pe(),ae.current=null,be(null),Q(null),xe(null),ne(0),J(0),qe(!1),re(!1),oe(!1),w.current=0,W.current=0,h.current="none",S.current=!1,I.current=null,k.current=!1,C.current=null,Lt(),ke.current=n,ie.current=j==null?void 0:j.url)},[n,j==null?void 0:j.url,qe,Pe,Lt]),a.useLayoutEffect(()=>{const g=Y.current;g!==null&&(Y.current=null,requestAnimationFrame(()=>{G.current(g)}))},[n,m,j==null?void 0:j.url]),a.useLayoutEffect(()=>{if(Z==="opening"){_.current=!1,we(!1);return}if(Z!=="open"||_.current)return;if(!De&&!ot){_.current=!0;return}we(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{we(!0),_.current=!0})});return()=>cancelAnimationFrame(g)},[Z,De==null?void 0:De.url,ot==null?void 0:ot.url]),a.useEffect(()=>{if(Z!=="open")return;const g=()=>{const Ve=it=>{it.stopPropagation(),it.preventDefault(),document.removeEventListener("click",Ve,!0)};document.addEventListener("click",Ve,!0)},me=Ve=>{const it=Ve<0?1:-1;Pe(),Ge(it),ae.current=it,be(it),qe(!0),en()},Re=Ve=>{if(Math.abs(Ve)>sg&&Ye){me(Ve);return}ae.current=null,be(null),Q(null),xe(null),qe(!0),J(0),gt()},Le=Ve=>{if(Ve.touches.length!==1||D.current)return;const it=Ve.touches[0];k.current=!0,I.current={x:it.clientX,y:it.clientY},h.current="none",W.current=0,S.current=!1},Ze=Ve=>{if(!I.current||Ve.touches.length!==1||D.current)return;const it=Ve.touches[0],jt=it.clientX-I.current.x,St=it.clientY-I.current.y;if(h.current==="none"){if(Math.abs(jt)<10&&Math.abs(St)<10)return;if(Math.abs(jt)>Math.abs(St)){if(!Ye)return;h.current="horizontal"}else if(St>0){if(!et)return;h.current="vertical"}else return}if(h.current==="horizontal"){S.current=!0,oe(!0),W.current=jt,J(jt),Ve.preventDefault();return}h.current==="vertical"&&(S.current=!0,oe(!0),w.current=St,ne(St),Ve.preventDefault())},Et=()=>{if(!I.current)return;const Ve=h.current,it=S.current;if(it&&Ve==="horizontal")Re(W.current),g();else if(it&&Ve==="vertical"){const jt=w.current;if(et&&jt>ag){const St=window.innerHeight;w.current=St,re(!0),ne(St),ce("closing")}else w.current=0,ne(0);g()}else Ve==="horizontal"&&Math.abs(W.current)>0&&(Re(W.current),g());I.current=null,h.current="none",W.current=0,S.current=!1,oe(!1)};return document.addEventListener("touchstart",Le,{passive:!0}),document.addEventListener("touchmove",Ze,{passive:!1}),document.addEventListener("touchend",Et),document.addEventListener("touchcancel",Et),()=>{document.removeEventListener("touchstart",Le),document.removeEventListener("touchmove",Ze),document.removeEventListener("touchend",Et),document.removeEventListener("touchcancel",Et)}},[Z,Ye,qe,gt,Pe,et,en,Ge]);const Oe=a.useCallback(()=>{const g=(T==null?void 0:T())??b??null;g&&q&&(Se(g),se(!0)),ce("closing")},[T,b,q]);a.useEffect(()=>{const g=Le=>{if(Le.key==="Escape"){if(s&&d||Z==="closing")return;Rt(),Oe();return}if(Le.key!=="ArrowLeft"&&Le.key!=="ArrowRight"||Z!=="open"||!Ye)return;Le.preventDefault();const Ze=Le.key==="ArrowLeft"?-1:1;Le.repeat&&H.current===Ze||Kt(Ze)},me=Le=>{if(Le.key!=="ArrowLeft"&&Le.key!=="ArrowRight")return;const Ze=Le.key==="ArrowLeft"?-1:1;H.current===Ze&&Rt()},Re=()=>{Rt()};return window.addEventListener("keydown",g),window.addEventListener("keyup",me),window.addEventListener("blur",Re),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",me),window.removeEventListener("blur",Re),Rt()}},[Z,s,d,Oe,Ye,Kt,Rt]),a.useEffect(()=>{Z!=="open"&&Rt()},[Z,Rt]);const Ke=()=>{Z==="closing"||l||Oe()},He=Z==="open",ze=Z==="closing",ut=$e>0?Math.max(0,1-$e/500):1,_e=$e>0?Math.max(.35,1-$e/500):1,Je=a.useCallback(g=>{if(!(g.propertyName!=="transform"||!D.current)){if(ae.current!==null){Dt();return}Pe(),qe(!1)}},[Pe,qe,Dt]),tt=Z==="closing"?fe??b:b,Wt=tt&&q&&(Z==="opening"||ze)?ug(tt,q):void 0,Ct=Me&&j?Mt(j,"center"):$e>0?`translateY(${$e}px)`:Wt,st=q?_o(q,N):null,Nt=!!(tt&&q),At=Nt&&(Z==="closing"||Z==="open"&&O),Vt={position:"absolute",top:st==null?void 0:st.top,left:st==null?void 0:st.left,width:st==null?void 0:st.width,height:st==null?void 0:st.height,objectFit:"contain",transformOrigin:"top left",transform:Ct,opacity:$e>0?_e:Nt?1:Z==="opening"||ze?0:1,transition:de&&!pe?"none":pe?`transform ${Ki}ms ${pn}`:z?`transform ${$n}ms ${pn}, opacity ${$n}ms ${pn}`:At?`transform ${$n}ms ${pn}`:Z==="opening"||ze?`opacity ${$n}ms ${pn}`:"none",pointerEvents:Ne&&He&&!Me?"auto":"none",touchAction:Ne&&He?"none":void 0,zIndex:1,overflow:Ne?"hidden":void 0},zt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:He&&!Me?"auto":"none"},Pt=(g,me,Re="adjacent")=>{const Le=Tt(g);if(!Le)return{display:"none"};const Ze=Re==="far"?me==="left"?"far-left":"far-right":me==="left"?"left-adjacent":"right-adjacent",{start:Et}=Ae!==null?nc(Le,Ze,Ae,N):{start:Re==="far"?rr(Le,me,N):Ai(Le,me,N)},Ve=_o(Et,N),it=Mt(g,Ze),jt=!Me&&Re==="adjacent"&&He&&!Ie?Sg(Le,me,N):null,St=Re==="far"&&Me&&Ae===(me==="left"?-1:1),cn=de&&!pe?!1:pe,un=Re==="adjacent"&&He&&Ie&&!Me;return{position:"absolute",top:Ve.top,left:Ve.left,width:Ve.width,height:Ve.height,objectFit:"contain",transform:it??(jt?`translate(${jt.x}px, ${jt.y}px)`:void 0),opacity:Re==="far"?He&&St?1:0:He?1:0,transition:cn?Re==="far"?`transform ${Ki}ms ${pn}`:`transform ${Ki}ms ${pn}, opacity ${$n}ms ${pn}`:un?`transform ${$n}ms ${pn}`:Z==="opening"||ze?`opacity ${$n}ms ${pn}`:"none",pointerEvents:"none",zIndex:1}},Qt=(g,me)=>{const Re=Tt(g);return Re?bg(Ai(Re,me,N),me,N):null},wt=g=>me=>{if(!l){if(k.current){k.current=!1;return}me.stopPropagation(),bt(g)}},Gt=De?Qt(De,"left"):null,pt=ot?Qt(ot,"right"):null,Ft=Gt?_o(Gt,N):null,Bt=pt?_o(pt,N):null;return r.jsxs("div",{ref:R,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:Z==="open"?"none":void 0},onClick:Ke,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:He?ut:0,transition:de?"none":`opacity ${$n}ms ${pn}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:P,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:He?1:0,transition:de?"none":`opacity ${$n}ms ${pn}`,pointerEvents:"none"},children:r.jsx(Ql,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:Ke})})]}),He&&kt&&r.jsx(No,{media:kt,style:Pt(kt,"left","far"),onMeasure:Qe,onTransitionEnd:Je},`far-prev-${kt.url}`),He&&De&&r.jsxs(r.Fragment,{children:[r.jsx(No,{media:De,style:Pt(De,"left"),onMeasure:Qe,onTransitionEnd:Je},`prev-${De.url}`),Ft&&r.jsx("div",{style:{position:"absolute",top:Ft.top,left:Ft.left,width:Ft.width,height:Ft.height,cursor:l||de?"default":"pointer",pointerEvents:l||de?"none":"auto",zIndex:3},onClick:wt(-1)})]}),He&&ot&&r.jsxs(r.Fragment,{children:[r.jsx(No,{media:ot,style:Pt(ot,"right"),onMeasure:Qe,onTransitionEnd:Je},`next-${ot.url}`),Bt&&r.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||de?"default":"pointer",pointerEvents:l||de?"none":"auto",zIndex:3},onClick:wt(1)})]}),He&&_t&&r.jsx(No,{media:_t,style:Pt(_t,"right","far"),onMeasure:Qe,onTransitionEnd:Je},`far-next-${_t.url}`),q&&j&&(Ne?r.jsx(Lg,{src:j.url,phase:Z,onMediaElement:Jt,wrapperStyle:Vt,videoStyle:zt,onLoadedMetadata:ft,onTransitionEnd:Je},`${n}-${j.url}`):r.jsx("img",{ref:Jt,src:j.url,alt:j.name,onLoad:ft,onTransitionEnd:Je,style:Vt},`${n}-${j.url}`))]})}function Rg({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=y.useScopedStyles(),{gridLayout:c,verticalGap:u,align:m="top",imageDisplay:x}=e,b=(x==null?void 0:x.display)==="cover",T=(x==null?void 0:x.ratioValue)??"1:1",f=(x==null?void 0:x.reversed)??!1,[L,$]=T.split(":").map(Number),C=`${f?$:L} / ${f?L:$}`,X=c.entryWidth??.2,E=c.columnsCount,B=y.scalingValue(X,n),I=y.scalingValue(c.horizontalGap??0,n),w=B,W=B,h={width:w,...b?{aspectRatio:C,height:"auto",overflow:"hidden"}:{height:"auto"}},S=b?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},k=a.useRef(null),[D,U]=a.useState(!1),[ae,Y]=a.useState([]),[G,H]=a.useState(0),[F,A]=a.useState(0),[K,q]=a.useState(null),[ee,N]=a.useState({title1:"",title2:"",title3:""}),ue=(()=>{const le={},xe=k.current?getComputedStyle(k.current).getPropertyValue("--cntrl-article-width").trim():"";return xe&&(le["--cntrl-article-width"]=xe),le})(),v=!n||i||o,ye=a.useMemo(()=>rg(d),[d]),Z=t??[],ce=Z.length%E||E,$e=ce<E&&Z.length>0,ne=Z.length-ce,ve=$e?Math.floor((E-ce)/2)+1:1,J=a.useMemo(()=>mg(Z),[Z]),pe=a.useMemo(()=>vg(Z),[Z]),he=(le,xe,O)=>{if(n&&!o&&!i)return;const se=J.findIndex(Se=>Se.gridIndex===le);if(se<0)return;const fe=J[se];A(se),Y(fe.items),H(xe),N(fe.entry),q(O??null),U(!0)},Ae=a.useCallback(()=>{U(!1),q(null)},[]),be=a.useCallback(()=>{const le=J[F];return!le||!k.current?K:pg(k.current,le.gridIndex,b?"cover":"contain")??K},[J,F,K,b]),We=a.useCallback(le=>{if(J.length>1){const xe=J.length,O=(F+le+xe)%xe,se=J[O],fe=Math.min(G,se.items.length-1);A(O),Y(se.items),H(fe),N(se.entry);return}H(xe=>(xe+le+ae.length)%ae.length)},[J,F,G,ae.length]),Q=J.length>1||ae.length>1;return a.useEffect(()=>{if(!D||typeof document>"u")return;const le=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=le}},[D]),a.useEffect(()=>{!n||o||i||U(!1)},[n,o,i]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ye}}),r.jsx(xg,{mediaList:pe}),r.jsx("div",{ref:k,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${m}`.trim(),style:{gridTemplateColumns:`repeat(${E}, ${B})`,rowGap:0,columnGap:I,width:y.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:y.scalingValue(u??0,n)},children:Z.map((le,xe)=>{const O=Ba(le.gallery),se=Da(O),fe=se.filter(oe=>oe.lightboxMedia).map(oe=>oe.lightboxMedia),Se=Math.floor(xe/E)===Math.ceil(Z.length/E)-1,Ie=$e&&xe>=ne?`${ve+(xe-ne)}`:void 0,we=se[0],_=we!=null&&we.lightboxMedia?fe.findIndex(oe=>oe.url===we.lightboxMedia.url):-1,de=r.jsx("div",{className:`${d}-item-image-wrapper`,style:h,children:se.length>0&&r.jsx(Tg,{media:we.displayMedia,gridIndex:xe,className:`${d}-item-${Vi(we.displayMedia)?"video":"image"}`.trim(),style:S,onMediaClick:v&&_>=0?oe=>he(xe,_,ec(oe.currentTarget,b?"cover":"contain")):void 0})});return r.jsx("div",{className:`${d}-item`,children:r.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,Se?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:B,...Ie?{gridColumn:Ie}:{}},children:[r.jsx("div",{className:`${d}-item-title-row`,children:r.jsx("div",{style:{height:0,width:W}})}),r.jsx("a",{className:`${d}-item-image-link`,children:de}),r.jsx("div",{className:`${d}-item-subtitle-row`,children:r.jsx("div",{style:{height:0,width:W}})})]})},xe)})}),D&&typeof document<"u"&&(()=>{const le=(l?document.getElementById(l):null)??document.body;return gi.createPortal(r.jsx("div",{style:ue,"data-selection":"none",children:r.jsx(Ig,{prefix:d,items:ae,index:G,entry:ee,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:Q,lightboxEntries:J,entryIdx:F,layoutId:s,sourceRect:K,resolveCloseSourceRect:be,onClose:Ae,onPrev:()=>We(-1),onNext:()=>We(1)})}),le)})()]})}const Eg=`import { CommonComponentProps } from '../props';
|
|
6274
|
+
`}const Is={url:"",name:"",objectFit:"cover"},Sn=500,qi=650,un="cubic-bezier(0.22, 1, 0.36, 1)",ig=72,og=50,rg=1e4,ag=650,sg=500;function lg(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function Ql(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=ir(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function cg(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Ql(i,n):null}function dg(e){return e.reduce((t,n,i)=>{const o=za(n.gallery),l=Ba(o).filter(d=>d.lightboxMedia).map(d=>d.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function Yi(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function Rs(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Yi(e,i,n)}const ug=.03;function ec(e){return e.width*ug}const Br={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Fo(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Es(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function pg(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function ma(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function mg(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:ma(e,t.width,t.height)}function gg(e,t){if(Di(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function hg(e){const t=new Set,n=[];for(const i of e){const o=za(i.gallery),s=Ba(o);for(const l of s)for(const d of[l.displayMedia,l.lightboxMedia])d!=null&&d.url&&!t.has(d.url)&&(t.add(d.url),n.push(d))}return n}function fg({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Di(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function Ai(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=ec(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function or(e,t,n){const i=Ai(e,t,n);return{...i,left:2*i.left-e.left}}function yg(e,t,n){const{left:i,width:o}=n,s=ec(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function tc(e,t,n,i){const o=Ai(e,"left",i),s=Ai(e,"right",i),l=or(e,"left",i),d=or(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function vg(e,t,n,i){const{start:o,end:s}=tc(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function xg(e,t,n){const i=Ai(e,t,n),o=or(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function nc(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function za(e){if(!e)return;if(nc(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.url?t:void 0,o=n!=null&&n.url?n:void 0;if(!(!i&&!o))return[{media:[o??i??Is,i??o??Is]}]}function bg(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function wg(e){const[t]=e.media;return t!=null&&t.url?t:null}function Ba(e){if(!Array.isArray(e)||e.length===0)return[];if(nc(e)){const t=[];for(const n of e){const i=bg(n);if(!i)continue;const o=wg(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Di(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Sg({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Di(e)?r.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):r.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function $g({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function _o({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Di(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function Cg({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:m,layoutId:x,sourceRect:b,resolveCloseSourceRect:T,onClose:f,onPrev:L,onNext:$}){const R=a.useRef(null),A=a.useRef(null),C=a.useRef(null),U=a.useRef(new Map),[E,O]=a.useState(0),I=a.useRef(null),w=a.useRef(0),F=a.useRef(0),h=a.useRef("none"),S=a.useRef(!1),M=a.useRef(!1),z=a.useRef(!1),K=a.useRef(null),se=a.useRef(null),Y=a.useRef(null),D=a.useRef(()=>{}),N=a.useRef(null),W=a.useRef(null),P=a.useRef(null),q=a.useRef(!1),[G,Z]=a.useState(null),[_,me]=a.useState(Br),[v,fe]=a.useState(0),[J,ce]=a.useState("opening"),[Ce,oe]=a.useState(0),[xe,Q]=a.useState(0),[ye,ve]=a.useState(!1),[Me,we]=a.useState(null),[Ae,X]=a.useState(null),[ue,Se]=a.useState(null),[j,de]=a.useState(!1),[H,re]=a.useState(null),[ae,ne]=a.useState(!1),ie=a.useRef(!1),[be,Te]=a.useState(!1),[ee,pe]=a.useState(!1),Pe=a.useRef(n),le=a.useRef(void 0),V=t[n],He=V?Di(V):!1,Fe=xe!==0||ye,Qe=!l&&(!s||!!d),Xe=c&&!l,lt=u.length>1,pt=a.useCallback((g,ge)=>t.length<=1?null:t[(g+ge+t.length)%t.length]??null,[t]),Be=lt?Yi(u,m,-1):pt(n,-1),rt=lt?Yi(u,m,1):pt(n,1),Tt=Me===-1&&Fe?lt&&Ae!==null?Yi(u,Ae,-1):ue!==null?pt(ue,-1):null:null,at=Me===1&&Fe?lt&&Ae!==null?Yi(u,Ae,1):ue!==null?pt(ue,1):null:null,Ke=Tt&&Tt.url!==(Be==null?void 0:Be.url)?Tt:null,gt=at&&at.url!==(rt==null?void 0:rt.url)?at:null,bt=Be&&Xe?(()=>{const g=lt?Rs(u,m,-1):t.length>2?pt((n-1+t.length)%t.length,-1):null;return g&&g.url!==Be.url?g:null})():null,mt=rt&&Xe?(()=>{const g=lt?Rs(u,m,1):t.length>2?pt((n+1)%t.length,1):null;return g&&g.url!==rt.url?g:null})():null,kt=Ke??bt,Wt=gt??mt,et=a.useCallback((g,ge,Ee)=>{if(!g||!ge||!Ee)return;const Ie=U.current,Ze=Ie.get(g);(Ze==null?void 0:Ze.width)===ge&&(Ze==null?void 0:Ze.height)===Ee||(Ie.set(g,{width:ge,height:Ee}),O(Mt=>Mt+1))},[]),St=a.useCallback(g=>{if(!(g!=null&&g.url))return null;const ge=U.current.get(g.url);return mg(A.current,ge)},[E,v]),$t=a.useCallback(()=>{if(!V)return;const g=St(V);if(g){Z(g);return}const ge=A.current;ge&&Z(Es(ge))},[V,St]),De=a.useCallback(g=>{if(lt){const ge=u.length;X((m+g+ge)%ge),Se(null);return}t.length>1&&(Se((n+g+t.length)%t.length),X(null))},[lt,u.length,m,t.length,n]),Ve=a.useCallback(g=>{z.current=g,ve(g)},[]),_e=a.useCallback(()=>{K.current!==null&&(window.clearTimeout(K.current),K.current=null)},[]),ht=a.useCallback(()=>{_e(),K.current=window.setTimeout(()=>{_e(),Ve(!1)},qi+32)},[_e,Ve]),It=a.useCallback(()=>{const g=R.current;if(!g){me({left:0,top:0,width:typeof window<"u"?window.innerWidth:Br.width,height:typeof window<"u"?window.innerHeight:Br.height});return}const ge=g.getBoundingClientRect();me({left:ge.left,top:ge.top,width:ge.width,height:ge.height})},[]),At=a.useCallback((g,ge)=>{if(Fe){if(be&&!ye)return`translate(${xe}px, 0px)`;if(ye&&Me!==null){const Ee=St(g);if(!Ee)return;const{x:Ie,y:Ze}=vg(Ee,ge,Me,_);return`translate(${Ie}px, ${Ze}px)`}if(ye)return"translate(0px, 0px)"}},[Fe,be,ye,xe,Me,_,St]),Vt=a.useCallback(()=>{const g=se.current;se.current=null,_e(),Ve(!1),we(null),X(null),Se(null),Q(0),Te(!1),S.current=!1,F.current=0,h.current="none",g===-1?L():g===1&&$()},[_e,Ve,L,$]),tn=a.useCallback(()=>{_e(),K.current=window.setTimeout(()=>{se.current!==null&&Vt()},qi+32)},[_e,Vt]),nn=a.useCallback(()=>{_e(),se.current=null,Ve(!1),we(null),X(null),Se(null),Q(0),Te(!1),S.current=!1,F.current=0,h.current="none"},[_e,Ve]),wt=a.useCallback(g=>{if(!(!Xe||!G)){if(z.current){if(se.current===g){Y.current=g,Vt();return}nn()}_e(),De(g),se.current=g,we(g),Ve(!0),tn()}},[Xe,G,Vt,nn,_e,De,Ve,tn]);D.current=wt;const Rt=a.useCallback(()=>{N.current=null,q.current=!1,W.current!==null&&(window.clearInterval(W.current),W.current=null),P.current!==null&&(window.clearTimeout(P.current),P.current=null)},[]),qt=a.useCallback(g=>{W.current!==null&&window.clearInterval(W.current);const ge=q.current?sg:ag;W.current=window.setInterval(()=>{D.current(g)},ge)},[]),Kt=a.useCallback(g=>{N.current!==g&&(Rt(),N.current=g,q.current=!1,D.current(g),qt(g),P.current=window.setTimeout(()=>{P.current=null,N.current===g&&(q.current=!0,qt(g))},rg))},[Rt,qt]),$e=a.useCallback(()=>{const g=A.current;if(!g)return;const ge=V==null?void 0:V.url,Ee=ge?U.current.get(ge):void 0;if(Ee!=null&&Ee.width&&(Ee!=null&&Ee.height)){Z(ma(g,Ee.width,Ee.height));return}const Ie=C.current;if(Ie&&ge&&(Ie.src===ge||Ie.currentSrc===ge)){const{width:Mt,height:Ge}=pg(Ie);if(Mt&&Ge){et(ge,Mt,Ge),Z(ma(g,Mt,Ge));return}}const Ze=Es(g);!Ze.width||!Ze.height||Z(Ze)},[V==null?void 0:V.url,et]),je=a.useCallback(g=>{if(C.current=g,!!g){if(g instanceof HTMLVideoElement){g.readyState>=1&&g.videoWidth>0&&$e();return}g.complete&&g.naturalWidth>0&&$e()}},[$e]),Oe=a.useCallback(()=>{It(),$e(),fe(g=>g+1)},[It,$e]);a.useEffect(()=>{Oe();const g=A.current,ge=R.current,Ee=new ResizeObserver(()=>Oe());return g&&Ee.observe(g),ge&&Ee.observe(ge),window.addEventListener("resize",Oe),()=>{Ee.disconnect(),window.removeEventListener("resize",Oe)}},[Oe,n,x]),a.useLayoutEffect(()=>{if(!V)return;const g=C.current;if(g){if(g instanceof HTMLImageElement&&g.complete&&g.naturalWidth>0){$e();return}g instanceof HTMLVideoElement&&g.readyState>=1&&g.videoWidth>0&&$e()}},[V==null?void 0:V.url,n,$e]),a.useEffect(()=>{$t()},[$t,E]),a.useEffect(()=>{const g=new Set,ge=[],Ee=Ie=>{!(Ie!=null&&Ie.url)||g.has(Ie.url)||(g.add(Ie.url),ge.push(Ie))};t.forEach(Ee),u.forEach(Ie=>Ie.items.forEach(Ee)),ge.forEach(Ie=>{U.current.has(Ie.url)||gg(Ie,et)})},[t,u,et]),a.useEffect(()=>{if(J!=="opening"||!G)return;if(!b){ce("open");return}de(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{de(!0),ce("open")})});return()=>cancelAnimationFrame(g)},[J,G,b]),a.useEffect(()=>{if(J!=="closing")return;const g=setTimeout(()=>f(),Sn);return()=>clearTimeout(g)},[J,f]),a.useEffect(()=>()=>{_e()},[_e]),a.useLayoutEffect(()=>{Pe.current===n&&le.current===(V==null?void 0:V.url)||(_e(),se.current=null,we(null),X(null),Se(null),oe(0),Q(0),Ve(!1),pe(!1),Te(!1),w.current=0,F.current=0,h.current="none",S.current=!1,I.current=null,M.current=!1,C.current=null,$t(),Pe.current=n,le.current=V==null?void 0:V.url)},[n,V==null?void 0:V.url,Ve,_e,$t]),a.useLayoutEffect(()=>{const g=Y.current;g!==null&&(Y.current=null,requestAnimationFrame(()=>{D.current(g)}))},[n,m,V==null?void 0:V.url]),a.useLayoutEffect(()=>{if(J==="opening"){ie.current=!1,ne(!1);return}if(J!=="open"||ie.current)return;if(!Be&&!rt){ie.current=!0;return}ne(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ne(!0),ie.current=!0})});return()=>cancelAnimationFrame(g)},[J,Be==null?void 0:Be.url,rt==null?void 0:rt.url]),a.useEffect(()=>{if(J!=="open")return;const g=()=>{const Ge=ot=>{ot.stopPropagation(),ot.preventDefault(),document.removeEventListener("click",Ge,!0)};document.addEventListener("click",Ge,!0)},ge=Ge=>{const ot=Ge<0?1:-1;_e(),De(ot),se.current=ot,we(ot),Ve(!0),tn()},Ee=Ge=>{if(Math.abs(Ge)>og&&Xe){ge(Ge);return}se.current=null,we(null),X(null),Se(null),Ve(!0),Q(0),ht()},Ie=Ge=>{if(Ge.touches.length!==1||z.current)return;const ot=Ge.touches[0];M.current=!0,I.current={x:ot.clientX,y:ot.clientY},h.current="none",F.current=0,S.current=!1},Ze=Ge=>{if(!I.current||Ge.touches.length!==1||z.current)return;const ot=Ge.touches[0],_t=ot.clientX-I.current.x,Ct=ot.clientY-I.current.y;if(h.current==="none"){if(Math.abs(_t)<10&&Math.abs(Ct)<10)return;if(Math.abs(_t)>Math.abs(Ct)){if(!Xe)return;h.current="horizontal"}else if(Ct>0){if(!Qe)return;h.current="vertical"}else return}if(h.current==="horizontal"){S.current=!0,Te(!0),F.current=_t,Q(_t),Ge.preventDefault();return}h.current==="vertical"&&(S.current=!0,Te(!0),w.current=Ct,oe(Ct),Ge.preventDefault())},Mt=()=>{if(!I.current)return;const Ge=h.current,ot=S.current;if(ot&&Ge==="horizontal")Ee(F.current),g();else if(ot&&Ge==="vertical"){const _t=w.current;if(Qe&&_t>ig){const Ct=window.innerHeight;w.current=Ct,pe(!0),oe(Ct),ce("closing")}else w.current=0,oe(0);g()}else Ge==="horizontal"&&Math.abs(F.current)>0&&(Ee(F.current),g());I.current=null,h.current="none",F.current=0,S.current=!1,Te(!1)};return document.addEventListener("touchstart",Ie,{passive:!0}),document.addEventListener("touchmove",Ze,{passive:!1}),document.addEventListener("touchend",Mt),document.addEventListener("touchcancel",Mt),()=>{document.removeEventListener("touchstart",Ie),document.removeEventListener("touchmove",Ze),document.removeEventListener("touchend",Mt),document.removeEventListener("touchcancel",Mt)}},[J,Xe,Ve,ht,_e,Qe,tn,De]);const Ye=a.useCallback(()=>{const g=(T==null?void 0:T())??b??null;g&&G&&(re(g),de(!0)),ce("closing")},[T,b,G]);a.useEffect(()=>{const g=Ie=>{if(Ie.key==="Escape"){if(s&&d||J==="closing")return;Rt(),Ye();return}if(Ie.key!=="ArrowLeft"&&Ie.key!=="ArrowRight"||J!=="open"||!Xe)return;Ie.preventDefault();const Ze=Ie.key==="ArrowLeft"?-1:1;Ie.repeat&&N.current===Ze||Kt(Ze)},ge=Ie=>{if(Ie.key!=="ArrowLeft"&&Ie.key!=="ArrowRight")return;const Ze=Ie.key==="ArrowLeft"?-1:1;N.current===Ze&&Rt()},Ee=()=>{Rt()};return window.addEventListener("keydown",g),window.addEventListener("keyup",ge),window.addEventListener("blur",Ee),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",ge),window.removeEventListener("blur",Ee),Rt()}},[J,s,d,Ye,Xe,Kt,Rt]),a.useEffect(()=>{J!=="open"&&Rt()},[J,Rt]);const Lt=()=>{J==="closing"||l||Ye()},tt=J==="open",ke=J==="closing",ft=Ce>0?Math.max(0,1-Ce/500):1,Je=Ce>0?Math.max(.35,1-Ce/500):1,qe=a.useCallback(g=>{if(!(g.propertyName!=="transform"||!z.current)){if(se.current!==null){Vt();return}_e(),Ve(!1)}},[_e,Ve,Vt]),it=J==="closing"?H??b:b,Ht=it&&G&&(J==="opening"||ke)?lg(it,G):void 0,Et=Fe&&V?At(V,"center"):Ce>0?`translateY(${Ce}px)`:Ht,ct=G?Fo(G,_):null,Ot=!!(it&&G),Dt=Ot&&(J==="closing"||J==="open"&&j),jt={position:"absolute",top:ct==null?void 0:ct.top,left:ct==null?void 0:ct.left,width:ct==null?void 0:ct.width,height:ct==null?void 0:ct.height,objectFit:"contain",transformOrigin:"top left",transform:Et,opacity:Ce>0?Je:Ot?1:J==="opening"||ke?0:1,transition:be&&!ye?"none":ye?`transform ${qi}ms ${un}`:ee?`transform ${Sn}ms ${un}, opacity ${Sn}ms ${un}`:Dt?`transform ${Sn}ms ${un}`:J==="opening"||ke?`opacity ${Sn}ms ${un}`:"none",pointerEvents:He&&tt&&!Fe?"auto":"none",touchAction:He&&tt?"none":void 0,zIndex:1,overflow:He?"hidden":void 0},zt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:tt&&!Fe?"auto":"none"},dt=(g,ge,Ee="adjacent")=>{const Ie=St(g);if(!Ie)return{display:"none"};const Ze=Ee==="far"?ge==="left"?"far-left":"far-right":ge==="left"?"left-adjacent":"right-adjacent",{start:Mt}=Me!==null?tc(Ie,Ze,Me,_):{start:Ee==="far"?or(Ie,ge,_):Ai(Ie,ge,_)},Ge=Fo(Mt,_),ot=At(g,Ze),_t=!Fe&&Ee==="adjacent"&&tt&&!ae?xg(Ie,ge,_):null,Ct=Ee==="far"&&Fe&&Me===(ge==="left"?-1:1),ln=be&&!ye?!1:ye,dn=Ee==="adjacent"&&tt&&ae&&!Fe;return{position:"absolute",top:Ge.top,left:Ge.left,width:Ge.width,height:Ge.height,objectFit:"contain",transform:ot??(_t?`translate(${_t.x}px, ${_t.y}px)`:void 0),opacity:Ee==="far"?tt&&Ct?1:0:tt?1:0,transition:ln?Ee==="far"?`transform ${qi}ms ${un}`:`transform ${qi}ms ${un}, opacity ${Sn}ms ${un}`:dn?`transform ${Sn}ms ${un}`:J==="opening"||ke?`opacity ${Sn}ms ${un}`:"none",pointerEvents:"none",zIndex:1}},Ut=(g,ge)=>{const Ee=St(g);return Ee?yg(Ai(Ee,ge,_),ge,_):null},Jt=g=>ge=>{if(!l){if(M.current){M.current=!1;return}ge.stopPropagation(),wt(g)}},Qt=Be?Ut(Be,"left"):null,vt=rt?Ut(rt,"right"):null,Pt=Qt?Fo(Qt,_):null,Bt=vt?Fo(vt,_):null;return r.jsxs("div",{ref:R,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:Lt,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:tt?ft:0,transition:be?"none":`opacity ${Sn}ms ${un}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:A,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:tt?1:0,transition:be?"none":`opacity ${Sn}ms ${un}`,pointerEvents:"none"},children:r.jsx(Jl,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:Lt})})]}),tt&&kt&&r.jsx(_o,{media:kt,style:dt(kt,"left","far"),onMeasure:et,onTransitionEnd:qe},`far-prev-${kt.url}`),tt&&Be&&r.jsxs(r.Fragment,{children:[r.jsx(_o,{media:Be,style:dt(Be,"left"),onMeasure:et,onTransitionEnd:qe},`prev-${Be.url}`),Pt&&r.jsx("div",{style:{position:"absolute",top:Pt.top,left:Pt.left,width:Pt.width,height:Pt.height,cursor:l||be?"default":"pointer",pointerEvents:l||be?"none":"auto",zIndex:3},onClick:Jt(-1)})]}),tt&&rt&&r.jsxs(r.Fragment,{children:[r.jsx(_o,{media:rt,style:dt(rt,"right"),onMeasure:et,onTransitionEnd:qe},`next-${rt.url}`),Bt&&r.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||be?"default":"pointer",pointerEvents:l||be?"none":"auto",zIndex:3},onClick:Jt(1)})]}),tt&&Wt&&r.jsx(_o,{media:Wt,style:dt(Wt,"right","far"),onMeasure:et,onTransitionEnd:qe},`far-next-${Wt.url}`),G&&V&&(He?r.jsx($g,{src:V.url,phase:J,onMediaElement:je,wrapperStyle:jt,videoStyle:zt,onLoadedMetadata:$e,onTransitionEnd:qe},`${n}-${V.url}`):r.jsx("img",{ref:je,src:V.url,alt:V.name,onLoad:$e,onTransitionEnd:qe,style:jt},`${n}-${V.url}`))]})}function Tg({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=y.useScopedStyles(),{gridLayout:c,verticalGap:u,align:m="top",imageDisplay:x}=e,b=(x==null?void 0:x.display)==="cover",T=(x==null?void 0:x.ratioValue)??"1:1",f=(x==null?void 0:x.reversed)??!1,[L,$]=T.split(":").map(Number),C=`${f?$:L} / ${f?L:$}`,U=c.entryWidth??.2,E=c.columnsCount,O=y.scalingValue(U,n),I=y.scalingValue(c.horizontalGap??0,n),w=O,F=O,h={width:w,...b?{aspectRatio:C,height:"auto",overflow:"hidden"}:{height:"auto"}},S=b?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},M=a.useRef(null),[z,K]=a.useState(!1),[se,Y]=a.useState([]),[D,N]=a.useState(0),[W,P]=a.useState(0),[q,G]=a.useState(null),[Z,_]=a.useState({title1:"",title2:"",title3:""}),me=(()=>{const ue={},Se=M.current?getComputedStyle(M.current).getPropertyValue("--cntrl-article-width").trim():"";return Se&&(ue["--cntrl-article-width"]=Se),ue})(),v=!n||i||o,fe=a.useMemo(()=>ng(d),[d]),J=t??[],ce=J.length%E||E,Ce=ce<E&&J.length>0,oe=J.length-ce,xe=Ce?Math.floor((E-ce)/2)+1:1,Q=a.useMemo(()=>dg(J),[J]),ye=a.useMemo(()=>hg(J),[J]),ve=(ue,Se,j)=>{if(n&&!o&&!i)return;const de=Q.findIndex(re=>re.gridIndex===ue);if(de<0)return;const H=Q[de];P(de),Y(H.items),N(Se),_(H.entry),G(j??null),K(!0)},Me=a.useCallback(()=>{K(!1),G(null)},[]),we=a.useCallback(()=>{const ue=Q[W];return!ue||!M.current?q:cg(M.current,ue.gridIndex,b?"cover":"contain")??q},[Q,W,q,b]),Ae=a.useCallback(ue=>{if(Q.length>1){const Se=Q.length,j=(W+ue+Se)%Se,de=Q[j],H=Math.min(D,de.items.length-1);P(j),Y(de.items),N(H),_(de.entry);return}N(Se=>(Se+ue+se.length)%se.length)},[Q,W,D,se.length]),X=Q.length>1||se.length>1;return a.useEffect(()=>{if(!z||typeof document>"u")return;const ue=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ue}},[z]),a.useEffect(()=>{!n||o||i||K(!1)},[n,o,i]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:fe}}),r.jsx(fg,{mediaList:ye}),r.jsx("div",{ref:M,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${m}`.trim(),style:{gridTemplateColumns:`repeat(${E}, ${O})`,rowGap:0,columnGap:I,width:y.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:y.scalingValue(u??0,n)},children:J.map((ue,Se)=>{const j=za(ue.gallery),de=Ba(j),H=de.filter(Te=>Te.lightboxMedia).map(Te=>Te.lightboxMedia),re=Math.floor(Se/E)===Math.ceil(J.length/E)-1,ae=Ce&&Se>=oe?`${xe+(Se-oe)}`:void 0,ne=de[0],ie=ne!=null&&ne.lightboxMedia?H.findIndex(Te=>Te.url===ne.lightboxMedia.url):-1,be=r.jsx("div",{className:`${d}-item-image-wrapper`,style:h,children:de.length>0&&r.jsx(Sg,{media:ne.displayMedia,gridIndex:Se,className:`${d}-item-${Di(ne.displayMedia)?"video":"image"}`.trim(),style:S,onMediaClick:v&&ie>=0?Te=>ve(Se,ie,Ql(Te.currentTarget,b?"cover":"contain")):void 0})});return r.jsx("div",{className:`${d}-item`,children:r.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,re?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:O,...ae?{gridColumn:ae}:{}},children:[r.jsx("div",{className:`${d}-item-title-row`,children:r.jsx("div",{style:{height:0,width:F}})}),r.jsx("a",{className:`${d}-item-image-link`,children:be}),r.jsx("div",{className:`${d}-item-subtitle-row`,children:r.jsx("div",{style:{height:0,width:F}})})]})},Se)})}),z&&typeof document<"u"&&(()=>{const ue=(l?document.getElementById(l):null)??document.body;return mi.createPortal(r.jsx("div",{style:me,"data-selection":"none",children:r.jsx(Cg,{prefix:d,items:se,index:D,entry:Z,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:X,lightboxEntries:Q,entryIdx:W,layoutId:s,sourceRect:q,resolveCloseSourceRect:we,onClose:Me,onPrev:()=>Ae(-1),onNext:()=>Ae(1)})}),ue)})()]})}const Lg=`import { CommonComponentProps } from '../props';
|
|
6304
6275
|
import { scalingValue, useScopedStyles } from '../utils/index';
|
|
6305
6276
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
6306
6277
|
import { createPortal } from 'react-dom';
|
|
@@ -6577,17 +6548,6 @@ function getCSS(P: string): string {
|
|
|
6577
6548
|
.\${P}-title-resize-handle {
|
|
6578
6549
|
background: transparent;
|
|
6579
6550
|
}
|
|
6580
|
-
.\${P}-title-resize-handle::after {
|
|
6581
|
-
content: '';
|
|
6582
|
-
position: absolute;
|
|
6583
|
-
top: 0;
|
|
6584
|
-
left: 50%;
|
|
6585
|
-
transform: translateX(-50%);
|
|
6586
|
-
width: 2px;
|
|
6587
|
-
height: 100%;
|
|
6588
|
-
background: #FF5C02;
|
|
6589
|
-
pointer-events: none;
|
|
6590
|
-
}
|
|
6591
6551
|
.\${P}-lightbox {
|
|
6592
6552
|
position: fixed;
|
|
6593
6553
|
inset: 0;
|
|
@@ -8654,11 +8614,11 @@ export function Hive({
|
|
|
8654
8614
|
</>
|
|
8655
8615
|
);
|
|
8656
8616
|
}
|
|
8657
|
-
`,kg="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),ii={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",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Mg(e){const t={};return t[Be(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSettings")]={...ii.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSize")]={...ii.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Be(e,"lineHeight")]={...ii.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Be(e,"letterSpacing")]={...ii.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Be(e,"wordSpacing")]={...ii.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Be(e,"textAlign")]={...ii.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Be(e,"textAppearance")]={...ii.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Fi=Kn.filter(e=>e!=="count"),Pg=Fi.reduce((e,t)=>({...e,...Mg(t)}),{}),Ag=Fi.reduce((e,t)=>({...e,[Be(t,"fontFamily")]:"Arial",[Be(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Be(t,"letterSpacing")]:0,[Be(t,"wordSpacing")]:0,[Be(t,"textAlign")]:"left",[Be(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Vr(e){return Fi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Be(n,"fontSize")]=i),o!==void 0&&(t[Be(n,"lineHeight")]=o),t},{})}const Fg={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Fi.map(e=>[Oa[e],za(e)]))},Wg={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},_g=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...Wg,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),Ng={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:_g},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},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"}}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...Pg},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:kg,closeIconColor:"#000000",closeIconHoverColor:"#999999",...Ag},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...Vr({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...Vr({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...Vr({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Fg]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},Hg={element:Rg,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...Fi.map(e=>({path:`${Be(e,"fontFamily")}`}))]},fontRelations:{...Fi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Be(t,"fontFamily")}`}),{})},schema:Ng,sourceCode:Eg},ks=12;function jg(e,t="50%"){const n={position:"absolute",width:ks,height:ks,pointerEvents:"none"};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 nn({className:e,areaStyle:t,hitPlacement:n,centerXHitTop:i,...o}){return r.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...o,children:r.jsx("div",{style:jg(n,i)})})}function Og(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 zg({media:e,className:t,style:n}){const i=a.useRef(null);return a.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const s=o.play();s&&s.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function Gr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Bg(e){return String(e??"").trim().length>0}function Ms(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Ps(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function As(e,t,n,i,o,s,l){const d=y.scalingValue(s,l),c=y.scalingValue(0,l),u=e===0,m=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!m||i?d:c}}function Dg(e,t,n){const i=y.scalingValue(t,n),o=y.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Fs=10;function Vg(e){return`
|
|
8617
|
+
`,Ig="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),ni={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",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Rg(e){const t={};return t[ze(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ze(e,"fontSettings")]={...ni.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ze(e,"fontSize")]={...ni.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ze(e,"lineHeight")]={...ni.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ze(e,"letterSpacing")]={...ni.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ze(e,"wordSpacing")]={...ni.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ze(e,"textAlign")]={...ni.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ze(e,"textAppearance")]={...ni.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Pi=qn.filter(e=>e!=="count"),Eg=Pi.reduce((e,t)=>({...e,...Rg(t)}),{}),Mg=Pi.reduce((e,t)=>({...e,[ze(t,"fontFamily")]:"Arial",[ze(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ze(t,"letterSpacing")]:0,[ze(t,"wordSpacing")]:0,[ze(t,"textAlign")]:"left",[ze(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Dr(e){return Pi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ze(n,"fontSize")]=i),o!==void 0&&(t[ze(n,"lineHeight")]=o),t},{})}const kg={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Pi.map(e=>[Oa[e],ja(e)]))},Ag={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},Pg=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...Ag,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),Wg={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:Pg},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},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"}}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...Eg},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Ig,closeIconColor:"#000000",closeIconHoverColor:"#999999",...Mg},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...Dr({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...Dr({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...Dr({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[kg]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},Fg={element:Tg,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...Pi.map(e=>({path:`${ze(e,"fontFamily")}`}))]},fontRelations:{...Pi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ze(t,"fontFamily")}`}),{})},schema:Wg,sourceCode:Lg};function _g(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 Ng({media:e,className:t,style:n}){const i=a.useRef(null);return a.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const s=o.play();s&&s.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function Vr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Hg(e){return String(e??"").trim().length>0}function Ms(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function ks(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function As(e,t,n,i,o,s,l){const d=y.scalingValue(s,l),c=y.scalingValue(0,l),u=e===0,m=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!m||i?d:c}}function Og(e,t,n){const i=y.scalingValue(t,n),o=y.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Ps=10;function jg(e){return`
|
|
8658
8618
|
.${e}-wrapper {
|
|
8659
8619
|
display: grid;
|
|
8660
8620
|
align-items: start;
|
|
8661
|
-
min-height: ${
|
|
8621
|
+
min-height: ${Vr(48)};
|
|
8662
8622
|
position: relative;
|
|
8663
8623
|
overflow: visible;
|
|
8664
8624
|
box-sizing: border-box;
|
|
@@ -8780,7 +8740,7 @@ a.${e}-list-item {
|
|
|
8780
8740
|
flex-shrink: 0;
|
|
8781
8741
|
overflow: visible;
|
|
8782
8742
|
box-sizing: border-box;
|
|
8783
|
-
min-width: ${
|
|
8743
|
+
min-width: ${Vr(50)};
|
|
8784
8744
|
position: relative;
|
|
8785
8745
|
display: flex;
|
|
8786
8746
|
align-items: flex-start;
|
|
@@ -8788,7 +8748,7 @@ a.${e}-list-item {
|
|
|
8788
8748
|
|
|
8789
8749
|
.${e}-list-col-last {
|
|
8790
8750
|
flex: 1 1 auto;
|
|
8791
|
-
min-width: ${
|
|
8751
|
+
min-width: ${Vr(50)};
|
|
8792
8752
|
}
|
|
8793
8753
|
|
|
8794
8754
|
.${e}-list-col-title {
|
|
@@ -8811,56 +8771,14 @@ a.${e}-list-item {
|
|
|
8811
8771
|
}
|
|
8812
8772
|
|
|
8813
8773
|
.${e}-col-resize-handle,
|
|
8814
|
-
.${e}-
|
|
8815
|
-
.${e}-text-padding-lr-handle {
|
|
8774
|
+
.${e}-control-anchor {
|
|
8816
8775
|
background: transparent;
|
|
8817
8776
|
}
|
|
8818
8777
|
|
|
8819
|
-
.${e}-
|
|
8820
|
-
.${e}-text-padding-lr-handle::after {
|
|
8821
|
-
content: '';
|
|
8778
|
+
.${e}-control-anchor {
|
|
8822
8779
|
position: absolute;
|
|
8823
|
-
top: var(--${e}-first-entry-handle-top, 50%);
|
|
8824
|
-
left: 50%;
|
|
8825
|
-
transform: translate(-50%, -50%);
|
|
8826
|
-
width: 4px;
|
|
8827
|
-
height: 12px;
|
|
8828
|
-
background: #FF5C02;
|
|
8829
|
-
border: 1px solid #FFFFFF;
|
|
8830
|
-
border-radius: 5px;
|
|
8831
|
-
box-sizing: border-box;
|
|
8832
8780
|
pointer-events: none;
|
|
8833
|
-
|
|
8834
|
-
|
|
8835
|
-
.${e}-text-padding-lr-handle::after {
|
|
8836
|
-
top: 50%;
|
|
8837
|
-
}
|
|
8838
|
-
|
|
8839
|
-
.${e}-padding-control-handle[data-controls-axis="y"]::after {
|
|
8840
|
-
content: '';
|
|
8841
|
-
position: absolute;
|
|
8842
|
-
top: 50%;
|
|
8843
|
-
left: 50%;
|
|
8844
|
-
transform: translate(-50%, -50%);
|
|
8845
|
-
width: 12px;
|
|
8846
|
-
height: 4px;
|
|
8847
|
-
background: #FF5C02;
|
|
8848
|
-
border: 1px solid #FFFFFF;
|
|
8849
|
-
border-radius: 5px;
|
|
8850
|
-
box-sizing: border-box;
|
|
8851
|
-
pointer-events: none;
|
|
8852
|
-
}
|
|
8853
|
-
|
|
8854
|
-
.${e}-padding-control-handle[data-controls-variant="row-padding"][data-controls-axis="y"]::after,
|
|
8855
|
-
.${e}-padding-control-handle[data-controls-variant="column-padding"][data-controls-axis="y"]::after {
|
|
8856
|
-
left: 20px;
|
|
8857
|
-
transform: translateY(-50%);
|
|
8858
|
-
}
|
|
8859
|
-
|
|
8860
|
-
.${e}-wrapper.${e}-type-b .${e}-padding-control-handle[data-controls-variant="row-padding"][data-controls-axis="y"]::after,
|
|
8861
|
-
.${e}-wrapper.${e}-type-b .${e}-padding-control-handle[data-controls-variant="column-padding"][data-controls-axis="y"]::after {
|
|
8862
|
-
left: 50%;
|
|
8863
|
-
transform: translate(-50%, -50%);
|
|
8781
|
+
z-index: 2;
|
|
8864
8782
|
}
|
|
8865
8783
|
|
|
8866
8784
|
.${e}-row-padding-handle {
|
|
@@ -8877,26 +8795,6 @@ a.${e}-list-item {
|
|
|
8877
8795
|
position: relative;
|
|
8878
8796
|
}
|
|
8879
8797
|
|
|
8880
|
-
.${e}-col-resize-handle::after {
|
|
8881
|
-
content: '';
|
|
8882
|
-
position: absolute;
|
|
8883
|
-
top: 0;
|
|
8884
|
-
left: 50%;
|
|
8885
|
-
transform: translateX(-50%);
|
|
8886
|
-
width: 2px;
|
|
8887
|
-
height: 100%;
|
|
8888
|
-
background: #FF5C02;
|
|
8889
|
-
pointer-events: none;
|
|
8890
|
-
}
|
|
8891
|
-
|
|
8892
|
-
.${e}-wrapper.${e}-type-b .${e}-col-resize-handle::after {
|
|
8893
|
-
top: 50%;
|
|
8894
|
-
left: 0;
|
|
8895
|
-
transform: translateY(-50%);
|
|
8896
|
-
width: 100%;
|
|
8897
|
-
height: 2px;
|
|
8898
|
-
}
|
|
8899
|
-
|
|
8900
8798
|
.${e}-wrapper.${e}-entry-hover-default .${e}-list-item-has-link,
|
|
8901
8799
|
.${e}-wrapper.${e}-entry-hover-blinds .${e}-list-item-has-link,
|
|
8902
8800
|
.${e}-wrapper.${e}-entry-hover-reveal .${e}-list-item-has-link,
|
|
@@ -8924,19 +8822,19 @@ a.${e}-list-item {
|
|
|
8924
8822
|
|
|
8925
8823
|
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-default .${e}-list-item-has-link:hover,
|
|
8926
8824
|
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-default .${e}-list-item:has(+ .${e}-list-item-has-link:hover),
|
|
8927
|
-
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-default
|
|
8825
|
+
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-default:has(.${e}-cut-item:hover) .${e}-list-item-before-cut,
|
|
8928
8826
|
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-default.${e}-state-hover .${e}-list-item-has-link,
|
|
8929
8827
|
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-default .${e}-cut-item:hover,
|
|
8930
8828
|
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-default.${e}-state-hover .${e}-cut-item,
|
|
8931
8829
|
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-blinds .${e}-list-item-has-link:hover,
|
|
8932
8830
|
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-blinds .${e}-list-item:has(+ .${e}-list-item-has-link:hover),
|
|
8933
|
-
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-blinds
|
|
8831
|
+
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-blinds:has(.${e}-cut-item:hover) .${e}-list-item-before-cut,
|
|
8934
8832
|
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-blinds.${e}-state-hover .${e}-list-item-has-link,
|
|
8935
8833
|
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-blinds .${e}-cut-item:hover,
|
|
8936
8834
|
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-blinds.${e}-state-hover .${e}-cut-item,
|
|
8937
8835
|
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-reveal .${e}-list-item-has-link:hover,
|
|
8938
8836
|
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-reveal .${e}-list-item:has(+ .${e}-list-item-has-link:hover),
|
|
8939
|
-
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-reveal
|
|
8837
|
+
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-reveal:has(.${e}-cut-item:hover) .${e}-list-item-before-cut,
|
|
8940
8838
|
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-reveal.${e}-state-hover .${e}-list-item-has-link,
|
|
8941
8839
|
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-reveal .${e}-cut-item:hover,
|
|
8942
8840
|
.${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-reveal.${e}-state-hover .${e}-cut-item {
|
|
@@ -9085,11 +8983,10 @@ a.${e}-list-item {
|
|
|
9085
8983
|
overflow-wrap: anywhere;
|
|
9086
8984
|
word-break: break-word;
|
|
9087
8985
|
}
|
|
9088
|
-
`}const Un=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Va=["AColumn","BColumn","CColumn","DColumn","EColumn"],An="cutLabel",mo=[...Va,An],Tr=["A","B","C","D","E"];function oc(e){return`${e}ColumnVerticalAlign`}const ha=["Top","Center","Bottom"];function Ga(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Tr.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Gg(e){const t=Ga(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function qg(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Tr.includes(n)?n:null}function rc(e,t,n){const i=qg(e);return i?i===t?!1:Gg(n[oc(i)]):!0}function go(e){const t=Ga(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Tr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Kg(e,t,n){if(ac(e,t,n))return go(e);const i=go(e);return i.kind==="baseline"?{kind:"top"}:i}function Ug(e){const t=go(e);return t.kind==="baseline"?{kind:"top"}:t}function ac(e,t,n){return rc(e,n,t)?go(e).kind==="baseline":!1}function Xg(e){const t={};let n=!1;for(const i of Tr){const o=oc(i),s=e[o];if(e.type==="b"){const l=String(s??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}rc(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function Yg(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Zg(e){const t=go(e).kind;return t==="baseline"?"center":t}function Jg(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Ws(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Qg(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),s=o-i;return n.remove(),s}function qr(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const l=Qg(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const d=s.getBoundingClientRect(),c=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(d.height-c)/2:e.kind==="bottom"&&(u=d.height-c),d.top-t+u+l}function eh(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${i}px`,s.style.height=`${i}px`)}),i)}function th(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const nh={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function vt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const ih={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function oh(e){return[vt(e,"textFontFamily"),vt(e,"textFontSettings"),{type:"row",items:[vt(e,"textFontSize"),vt(e,"textLineHeight"),vt(e,"textLetterSpacing"),vt(e,"textWordSpacing")]},vt(e,"textTextAlign"),vt(e,"textTextAppearance"),`${e}VerticalAlign`]}function rh(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(mo.map(e=>[ih[e],oh(e)]))}}function ar(e,t){const n=i=>{const o=vt(t,i);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===An?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function _s(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.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 dn(Xt(n,t))}function Ns(e,t,n,i){const o=ar(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<s?`${n} ${i}`:n}function Hs(e,t,n,i){const o=ar(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=s?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((s-l)/2,i)}}const yn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Wi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],_i=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Ni=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],ah={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},sh=["hover","focus","filled","success","error"],js=.004,$i=.004,Kr=$i,qa=50,ho=1440,fo=qa/ho;function sc(e){const t=typeof e=="number"&&e>0?e:ho;return qa/t}function lh(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 i=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(i){const o=parseFloat(i);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return ho}const lc={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function no(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function ch(e,t=1){const n=t/e;return Object.fromEntries(yn.map(i=>[i,n]))}function dh(){return Object.fromEntries([...Wi.map(e=>[e,0]),..._i.map(e=>[e,0])])}function uh(){return Object.fromEntries(Ni.map(e=>[e,0]))}function Ho(e){return Object.fromEntries(yn.map(t=>[t,typeof e[t]=="number"?e[t]:lc[t]]))}function cc(e,t,n){const i=e-fo,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const s=i/o;return{paddingLeft:t*s,paddingRight:n*s}}function Zo(e,t,n){const i=Ka(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,l)=>s+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function ph(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=Wi[o],l=_i[o],d=typeof n[s]=="number"?n[s]:0,c=typeof n[l]=="number"?n[l]:0,u=cc(t[o]??0,d,c);u.paddingLeft!==d&&(i[s]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function Ka(e,t,n){if(e<=0)return[];const i=yn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,m)=>u+m,0)+fo;if(t>=l)return i;const d=[...o];let c=l-t;for(let u=d.length-1;u>=0&&c>0;u-=1){const m=d[u]-fo;if(m<=0)continue;const x=Math.min(c,m);d[u]-=x,c-=x}return[...d,i[e-1]]}function mh(e,t,n){if(e<=1)return{};const i=Ka(e,t,n),o={};for(let s=0;s<e-1;s+=1){const l=yn[s];i[s]!==n[l]&&(o[l]=i[s])}return o}function Os(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Un]}function gh(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function hh(e,t,n,i){const o=Math.min(i,e.length,yn.length),s={};for(let l=0;l<o;l+=1){const d=e[l],c=t.indexOf(d);if(c===-1)continue;const u=yn[c],m=Wi[c],x=_i[c],b=Ni[c],T=yn[l],f=Wi[l],L=_i[l],$=Ni[l],R=n[u],P=n[m],C=n[x],X=n[b];typeof R=="number"&&(s[T]=R),typeof P=="number"&&(s[f]=P),typeof C=="number"&&(s[L]=C),typeof X=="number"&&(s[$]=X)}return s}function dc(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const i of n)if(e[i]!==t[i])return!0;return!1}function fh(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=no(e),s=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...ch(n,o),...dh()};if(s)for(const d of Ni)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,uh());return dc(e,l)?l:e}function yh(e,t,n){const i=Xg(e);i&&(e={...e,...i});const o=sc(n==null?void 0:n.designWidth),s=e.columns,l=t.columns,d=no(e),c=no(t),u=e.type==="b"||e.type===void 0&&t.type==="b",m=typeof s=="number"?s:typeof l=="number"?l:Un.length,x=C=>{if(u)return C;const X=Ho({...t,...C}),E=no(C),B=Zo(m,E,X),I=ph(m,B,{...t,...C});return Object.keys(I).length===0?C:{...C,...I}};if(typeof s=="number"&&s!==l)return e;const b=Os(e),T=Os(t);if(!gh(b,T))return x({...e,...hh(b,T,t,m)});if(d<c&&typeof m=="number"&&!u){const C=Ho({...t,...e});return x({...e,...mh(m,d,C)})}if(u){const C=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,X=Math.max(0,(d-o)/2);return C>X?{...e,textPaddingLR:X}:e}const f=Ho({...t,...e}),L=Zo(m,c,Ho(t)),R=Zo(m,d,f).some((C,X)=>C<(L[X]??C)),P=yn.some(C=>{const X=e[C],E=t[C];return typeof X=="number"&&typeof E=="number"&&X!==E});return R||P?x(e):e}function vh(e,t,n,i){const o=t.slice(0,e).reduce((l,d)=>l+d,0),s=n.slice(e+1,t.length-1).reduce((l,d)=>l+d,0);return Math.max(fo,i-o-s-fo)}function xh(e,t){return Math.random()*(t-e)+e}function bh(e){return Object.fromEntries(yn.map(t=>[t,typeof e[t]=="number"?e[t]:lc[t]]))}function Ur(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function wh(e,t,n,i,o,s){return e.slice(0,t).map((l,d)=>{const c=Wi[d],u=_i[d],m=Ni[d];return{key:l,textPrefix:nh[l],widthKey:yn[d],width:n[yn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:m,paddingLeft:i[c],paddingRight:o[u],paddingBottom:s[m]}})}function Sh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:l,onUpdateSettings:d}){const{prefix:c}=y.useScopedStyles(),u=!!o,{columns:m,type:x,wrapperWidth:b,entriesCount:T,cellMinHeight:f,dividerWidth:L,showVisibility:$,cut:R,showCut:P,cutCellMinHeight:C,cutLabel:X,imageSize:E,imageOnHover:B,entryHoverEffect:I,entryHoverShowOption:w,rowPaddingTop:W,rowPaddingBottom:h,rowPaddingTopB:S,columnsOrder:k,textPaddingLR:D,textColor:U,backgroundColor:ae,dividerColor:Y,textHoverColor:G,backgroundHoverColor:H,dividerHoverColor:F}=e,[A,K]=a.useState(void 0),[q,ee]=a.useState(null),N=B==="on"&&(!n||i),ue=(R??0)>0,v=x==="b",ye=a.useRef(null),Z=a.useRef(null),[ce,$e]=a.useState(null),[ne,ve]=a.useState(ho),J=sc(ne),pe=Math.max(0,((b??0)-J)/2),he=Math.min(D??0,pe),Ae=Math.max(he,$i),be=((b??0)+J)/2;a.useLayoutEffect(()=>{if(!n){ve(ho);return}const Ce=()=>{ve(lh(ye.current))};Ce();const Oe=ye.current;if(!Oe)return;const Ke=new ResizeObserver(Ce);Ke.observe(Oe);let He=Oe;for(;He&&!He.style.getPropertyValue("--cntrl-article-width");)He=He.parentElement;return He&&Ke.observe(He),()=>Ke.disconnect()},[n,l]),a.useEffect(()=>{K(void 0)},[R,P,t,T]),a.useEffect(()=>{n&&!i&&K(void 0)},[n,i]);const We=y.buildColorVars(c,{textColor:U,backgroundColor:ae,dividerColor:Y,textHoverColor:G,backgroundHoverColor:H,dividerHoverColor:F},ah,sh),Q=s&&s!=="default"?`${c}-state-${s}`:"",xe=`${!n||i?I==="default"?`${c}-entry-hover-default`:I==="blinds"?`${c}-entry-hover-blinds`:I==="reveal"?`${c}-entry-hover-reveal`:"":""} ${Q}`.trim(),O=I==="reveal"&&(!n||i),se=($==null?void 0:$[0])??!1,fe=($==null?void 0:$[1])??!1,Se=a.useRef(e),Ie=a.useRef(l);a.useEffect(()=>{if(!d||!n){Se.current=e,Ie.current=l;return}if(Ie.current!==l){Se.current=e,Ie.current=l;return}const Ce=Se.current;if(!(Ce!==e))return;if(typeof Ce.columns=="number"&&typeof e.columns=="number"&&Ce.columns!==e.columns){Se.current=e;return}const Ke=yh(e,Ce,{designWidth:ne});Se.current=e,dc(e,Ke)&&d(Ke)},[e,d,n,l,ne]);const we=a.useMemo(()=>bh(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),_=a.useMemo(()=>Ur(e,Wi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),de=a.useMemo(()=>Ur(e,_i),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),oe=a.useMemo(()=>Ur(e,Ni),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),z=a.useMemo(()=>Array.isArray(k)&&k.length>0?k:[...Un],[k]),re=a.useMemo(()=>wh(z,m,we,_,de,oe),[z,m,we,_,de,oe]),ke=no(e),ie=a.useMemo(()=>yn.slice(0,m).map(Ce=>we[Ce]),[m,we]),j=a.useMemo(()=>Ka(m,ke,we),[m,ke,we]),Ne=a.useMemo(()=>Zo(m,ke,we),[m,ke,we]),Me=a.useMemo(()=>re.map((Ce,Oe)=>cc(Ne[Oe]??0,Ce.paddingLeft,Ce.paddingRight)),[re,Ne]),et=a.useMemo(()=>{const Ce=T===0?1/0:T;return(t??[]).slice(0,Ce).map((Ke,He)=>({id:He,cells:Object.fromEntries(Un.map(ze=>[ze,Ke[ze]??""])),image:Ke.image,link:Ke.link}))},[t,T]),Ye=ue?A??R:et.length,lt=a.useMemo(()=>ue?et.slice(0,Ye):et,[et,ue,Ye]),mt=ue&&Ye<et.length,De=lt.length>1||mt,ot=[se?`${c}-divider-top`:"",fe||De?`${c}-divider-bottom`:""].filter(Boolean).join(" "),$t=!n||i,rt=()=>{if(!$t)return;const Ce=A??R;if(!P){K(et.length);return}K(Math.min(Ce+P,et.length))},Ue=Ce=>y.scalingValue(Ce,n??!1),ht=v?S??0:W??0,xt=h??0,dt=f??0,kt=ht+dt/2,_t=Math.max(xt,Kr),Qe=As(0,lt.length,se,fe,mt,L??0,n??!1).borderTopWidth,Tt=ce!=null?`${ce}px`:`calc(${Qe} + ${Ue(kt)})`,Lt=v?"rowPaddingTopB":"rowPaddingTop",Ge=re[0],qe=re[re.length-1],Pe=Me[0],gt=Me[Me.length-1],It=Ge&&Pe?Math.max(Pe.paddingLeft,$i):0,Mt=qe&>?Math.max(gt.paddingRight,$i):0,Dt=ke,en=Ce=>{const Oe=ye.current;if(!Oe)return{x:0,y:0};const Ke=Oe.getBoundingClientRect();return{x:Ce.clientX-Ke.left+Fs,y:Ce.clientY-Ke.top+Fs}},on=(Ce,Oe)=>{if(!N)return;const Ke=Ce.image;if(!(Ke!=null&&Ke.url)){ee(null);return}const{x:He,y:ze}=en(Oe),ut=(E==null?void 0:E.min)??80,_e=(E==null?void 0:E.max)??320,Je=(q==null?void 0:q.rowId)===Ce.id?q.widthPx:xh(ut,_e);ee({rowId:Ce.id,url:Ke.url,objectFit:"contain",isVideo:Og(Ke),widthPx:Je,x:He,y:ze})},bt=Ce=>{if(!N||!q)return;const{x:Oe,y:Ke}=en(Ce);ee(He=>!He||He.x===Oe&&He.y===Ke?He:{...He,x:Oe,y:Ke})},Rt=()=>{ee(null)},Ut=Ce=>{O&&Ms(Ce,c),N&&ee(null)},Kt=Ce=>{O&&Ps(Ce,c)};a.useLayoutEffect(()=>{if(!u||v){$e(null);return}const Ce=Z.current,Oe=Ce==null?void 0:Ce.parentElement;if(!Ce||!Oe){$e(null);return}const Ke=()=>{const ze=Ce.querySelector("[data-list-row]");if(!ze){$e(null);return}const ut=Oe.getBoundingClientRect(),_e=ze.getBoundingClientRect();$e(_e.top-ut.top+_e.height/2)};Ke();const He=new ResizeObserver(Ke);return He.observe(Ce),He.observe(Oe),()=>He.disconnect()},[u,v,lt,ht,xt,dt,t,e,re,Ne,ne,L,se,fe,mt]);const ft=a.useMemo(()=>!v&&Va.some(Ce=>{const Oe=Ce.charAt(0),Ke=e[`${Ce}VerticalAlign`];return ac(Ke,e,Oe)}),[v,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);a.useLayoutEffect(()=>{var Je;const Ce=ye.current;if(!Ce)return;const Oe=()=>{Ce.querySelectorAll("[data-list-col]").forEach(tt=>{tt.style.transform="";const Wt=tt.querySelector(`.${c}-list-col`);Wt&&(Wt.style.minHeight="",Wt.style.height="");const Ct=tt.querySelector(`.${c}-list-col-title`);Ct&&(Ct.style.transform="")})};if(v||!ft){Oe();return}const Ke=()=>{const tt=Array.from(Ce.querySelectorAll("[data-list-row]")),Wt=`${c}-list-col`,Ct=`${c}-baseline-probe`;tt.forEach(st=>{st.querySelectorAll("[data-list-col]").forEach(Nt=>{Nt.style.transform="";const At=Nt.querySelector(`.${Wt}`);At&&(At.style.minHeight="",At.style.height="");const Vt=Nt.querySelector(`.${c}-list-col-title`);Vt&&(Vt.style.transform="")})}),tt.forEach(st=>{const Nt=Array.from(st.querySelectorAll("[data-list-col]"));eh(st,Nt,Wt)}),Ce.offsetHeight,tt.forEach(st=>{const Nt=Array.from(st.querySelectorAll("[data-list-col]")),At=st.getBoundingClientRect().top,Vt=new Map,zt=Nt.map(wt=>{const Gt=wt.querySelector(`.${c}-list-col-title`),pt={el:wt,titleEl:Gt,letter:wt.getAttribute("data-col-letter")??"",kind:wt.getAttribute("data-valign")??"top",anchor:wt.getAttribute("data-valign-anchor")};return Vt.set(pt.letter,pt),pt}),Pt=new Map,Qt=(wt,Gt)=>{const pt=Pt.get(wt.letter);if(pt!==void 0)return pt;const Ft=wt.anchor?Vt.get(wt.anchor):void 0;if(wt.kind!=="baseline"||!Ft||Gt.has(wt.letter)){const Le=qr(wt,At,Wt,Ct);return Pt.set(wt.letter,Le),Le}Gt.add(wt.letter);const Bt=Qt(Ft,Gt);Gt.delete(wt.letter);const g=qr(wt,At,Wt,Ct),me=Bt-g;th(wt.titleEl,me);const Re=qr(wt,At,Wt,Ct);return Pt.set(wt.letter,Re),Re};zt.forEach(wt=>Qt(wt,new Set))})};let He=null;const ze=()=>{He===null&&(He=requestAnimationFrame(()=>{He=null,Ke()}))};Ke();const ut=new ResizeObserver(()=>ze());ut.observe(Ce);let _e=!1;return typeof document<"u"&&((Je=document.fonts)!=null&&Je.ready)&&document.fonts.ready.then(()=>{_e||ze()}),()=>{_e=!0,He!==null&&(cancelAnimationFrame(He),He=null),ut.disconnect(),Oe()}},[ft,v,e,t,ne,lt,Ne]);const Jt=a.useMemo(()=>Vg(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Jt}}),r.jsx("div",{style:We,children:r.jsxs("div",{ref:ye,className:`${c}-wrapper ${xe}${ot?` ${ot}`:""}${v?` ${c}-type-b`:""}`.trim(),style:{width:y.scalingValue(b??0,n),...!v&&u?{[`--${c}-first-entry-handle-top`]:Tt}:{}},onMouseMove:N?bt:void 0,onMouseLeave:N?Rt:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[lt.map((Ce,Oe)=>{var ut;const Ke=(((ut=Ce.link)==null?void 0:ut.length)??0)>0,He=Ke&&(!n||i)?"a":"div",ze=As(Oe,lt.length,se,fe,mt,L??0,n??!1);return r.jsxs(He,{ref:Oe===0?_e=>{Z.current=_e}:void 0,className:`${c}-list-item${Ke||w==="always"?` ${c}-list-item-has-link`:""}`,...Ke?{href:Ce.link,target:"_blank"}:{},style:ze,onMouseEnter:_e=>{O&&(Ke||w==="always")&&Ms(_e,c),N&&on(Ce,_e)},onMouseLeave:_e=>{O&&(Ke||w==="always")&&Ps(_e,c)},children:[ht>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ue(ht)}}),r.jsxs("div",{className:`${c}-list-cols-row${v?"":` ${c}-list-cols-row-h`}${u&&Oe===0&&v?` ${c}-list-cols-row-controls`:""}`,...v?{}:{"data-list-row":""},style:v?void 0:{minHeight:Ue(dt)},children:[re.map((_e,Je)=>{const tt=Je===re.length-1,Wt=Me[Je],Ct=_e.paddingBottom,st=Bg(Ce.cells[_e.key]),Nt=v&&st&&Ct>0,At=v?{minHeight:Ue(dt)}:{width:Ue(Ne[Je])},Vt=v?{paddingLeft:Ue(he),paddingRight:Ue(he)}:{paddingLeft:Ue(Wt.paddingLeft),paddingRight:Ue(Wt.paddingRight)},zt=_e.textPrefix.charAt(0),Pt=v?Ug(e[`${_e.textPrefix}VerticalAlign`]):Kg(e[`${_e.textPrefix}VerticalAlign`],e,zt),Qt=v&&st&&u&&Oe===0;return v&&!st?null:r.jsxs("div",{className:v?`${c}-list-col-wrap`:void 0,...v?{}:{"data-list-col":"","data-col-letter":zt,"data-valign":Pt.kind,...Pt.kind==="baseline"?{"data-valign-anchor":Pt.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${tt?` ${c}-list-col-last`:""}`,style:{...Vt,...At,...v?{justifyContent:Ws(Pt.kind)}:{}},"data-test":_e.width,children:r.jsx("span",{className:Ns(e,_e.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{..._s(ar(e,_e.textPrefix),n),...Hs(e,_e.textPrefix,c,n),...v?{}:Yg(Pt.kind)},children:Ce.cells[_e.key]??null})}),Nt&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ue(Ct)}}),Qt&&r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":_e.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Ue(Math.max(Ct,Kr))}})]},_e.key)}),u&&Oe===0&&v&&r.jsxs(r.Fragment,{children:[r.jsx(nn,{centerXHitTop:`var(--${c}-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(be),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:Ue(Ae),height:"100%"}}),r.jsx(nn,{centerXHitTop:`var(--${c}-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(be),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:Ue(Math.max(Ae,ke-Ae)),width:Ue(Ae),height:"100%"}})]})]}),!v&&xt>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ue(xt)}}),u&&Oe===0&&!v&&r.jsx(nn,{centerXHitTop:`var(--${c}-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:`${c}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Ue(_t)}})]},Ce.id)}),u&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Lt,"data-controls-static-handle":"",...v?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:v?"center":"left-y",areaStyle:{position:"absolute",top:Qe,left:0,width:"100%",height:Ue(Math.max(ht,Kr))}})},"row-padding-handles"),u&&!v&&Ge&&qe&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ge.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ne[0]-((Pe==null?void 0:Pe.paddingRight)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:Ue(It),height:"100%"}}),r.jsx(nn,{centerXHitTop:`var(--${c}-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(Ne[re.length-1]-((gt==null?void 0:gt.paddingLeft)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ue(Dt-Mt),width:Ue(Mt),height:"100%"}})]},"column-edge-padding-handles"),u&&!v&&re.slice(0,-1).map((Ce,Oe)=>{const Ke=re[Oe+1],He=j.slice(0,Oe+1).reduce((tt,Wt)=>tt+Wt,0),ze=Me[Oe],ut=Me[Oe+1],_e=Math.max(ze.paddingRight,$i),Je=Math.max(ut.paddingLeft,$i);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ce.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ne[Oe]-ze.paddingLeft),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ue(He-_e),width:Ue(_e),height:"100%"}}),r.jsx(nn,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ke.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ne[Oe+1]-ut.paddingRight),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ue(He),width:Ue(Je),height:"100%"}})]},`${Ce.paddingRightKey}-padding`)}),u&&!v&&re.slice(0,-1).map((Ce,Oe)=>{const Ke=vh(Oe,j,ie,ke),ze=j.slice(0,Oe+1).reduce((ut,_e)=>ut+_e,0)-js/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Ce.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(qa),"data-controls-max-fraction":String(Ke),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ue(ze),width:Ue(js),height:"calc(100%)",pointerEvents:"auto"}})},`${Ce.widthKey}-junction`)})]}),mt&&(()=>{const Ce=ar(e,An),Oe=Zg(e.cutLabelVerticalAlign),Ke=Ce.textTextAlign==="justify"||v;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ue(C??0),cursor:$t?"pointer":"default",...Dg(fe,L??0,n??!1)},onClick:$t?rt:void 0,onMouseEnter:O||N?Ut:void 0,onMouseLeave:O?Kt:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...v?{paddingLeft:Ue(he),paddingRight:Ue(he)}:{},justifyContent:Jg(Ce.textTextAlign),alignItems:Ws(Oe)},children:r.jsx("span",{className:Ns(e,An,`${c}-cut-label`,`${c}-text-tight-leading`),style:{..._s(Ce,n),...Hs(e,An,c,n),...Ke?{width:"100%"}:{}},children:X})})})})(),N&&q&&(()=>{const Ce=`${q.widthPx}px`,Oe={width:Ce,height:"auto",maxHeight:Ce,objectFit:"contain",left:q.x,top:q.y,position:"absolute"};return r.jsx(zg,{media:q,className:q.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:Oe},`${q.rowId}-${q.url}`)})()]})})]})}const $h=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
|
|
8986
|
+
`}const Kn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Da=["AColumn","BColumn","CColumn","DColumn","EColumn"],An="cutLabel",po=[...Da,An],Cr=["A","B","C","D","E"];function ic(e){return`${e}ColumnVerticalAlign`}const ga=["Top","Center","Bottom"];function Va(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Cr.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function zg(e){const t=Va(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Bg(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Cr.includes(n)?n:null}function oc(e,t,n){const i=Bg(e);return i?i===t?!1:zg(n[ic(i)]):!0}function mo(e){const t=Va(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Cr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Dg(e,t,n){if(rc(e,t,n))return mo(e);const i=mo(e);return i.kind==="baseline"?{kind:"top"}:i}function Vg(e){const t=mo(e);return t.kind==="baseline"?{kind:"top"}:t}function rc(e,t,n){return oc(e,n,t)?mo(e).kind==="baseline":!1}function Gg(e){const t={};let n=!1;for(const i of Cr){const o=ic(i),s=e[o];if(e.type==="b"){const l=String(s??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}oc(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function qg(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Kg(e){const t=mo(e).kind;return t==="baseline"?"center":t}function Ug(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Ws(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Xg(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),s=o-i;return n.remove(),s}function Gr(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const l=Xg(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const d=s.getBoundingClientRect(),c=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(d.height-c)/2:e.kind==="bottom"&&(u=d.height-c),d.top-t+u+l}function Yg(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${i}px`,s.style.height=`${i}px`)}),i)}function Zg(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Jg={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function xt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Qg={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function eh(e){return[xt(e,"textFontFamily"),xt(e,"textFontSettings"),{type:"row",items:[xt(e,"textFontSize"),xt(e,"textLineHeight"),xt(e,"textLetterSpacing"),xt(e,"textWordSpacing")]},xt(e,"textTextAlign"),xt(e,"textTextAppearance"),`${e}VerticalAlign`]}function th(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(po.map(e=>[Qg[e],eh(e)]))}}function rr(e,t){const n=i=>{const o=xt(t,i);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===An?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Fs(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.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 cn(Xt(n,t))}function _s(e,t,n,i){const o=rr(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<s?`${n} ${i}`:n}function Ns(e,t,n,i){const o=rr(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=s?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((s-l)/2,i)}}const fn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Wi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Fi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],_i=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],nh={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},ih=["hover","focus","filled","success","error"],Hs=.004,Si=.004,qr=Si,Ga=50,go=1440,ho=Ga/go;function ac(e){const t=typeof e=="number"&&e>0?e:go;return Ga/t}function oh(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 i=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(i){const o=parseFloat(i);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return go}const sc={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function to(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function rh(e,t=1){const n=t/e;return Object.fromEntries(fn.map(i=>[i,n]))}function ah(){return Object.fromEntries([...Wi.map(e=>[e,0]),...Fi.map(e=>[e,0])])}function sh(){return Object.fromEntries(_i.map(e=>[e,0]))}function No(e){return Object.fromEntries(fn.map(t=>[t,typeof e[t]=="number"?e[t]:sc[t]]))}function lc(e,t,n){const i=e-ho,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const s=i/o;return{paddingLeft:t*s,paddingRight:n*s}}function Yo(e,t,n){const i=qa(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,l)=>s+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function lh(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=Wi[o],l=Fi[o],d=typeof n[s]=="number"?n[s]:0,c=typeof n[l]=="number"?n[l]:0,u=lc(t[o]??0,d,c);u.paddingLeft!==d&&(i[s]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function qa(e,t,n){if(e<=0)return[];const i=fn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,m)=>u+m,0)+ho;if(t>=l)return i;const d=[...o];let c=l-t;for(let u=d.length-1;u>=0&&c>0;u-=1){const m=d[u]-ho;if(m<=0)continue;const x=Math.min(c,m);d[u]-=x,c-=x}return[...d,i[e-1]]}function ch(e,t,n){if(e<=1)return{};const i=qa(e,t,n),o={};for(let s=0;s<e-1;s+=1){const l=fn[s];i[s]!==n[l]&&(o[l]=i[s])}return o}function Os(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Kn]}function dh(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function uh(e,t,n,i){const o=Math.min(i,e.length,fn.length),s={};for(let l=0;l<o;l+=1){const d=e[l],c=t.indexOf(d);if(c===-1)continue;const u=fn[c],m=Wi[c],x=Fi[c],b=_i[c],T=fn[l],f=Wi[l],L=Fi[l],$=_i[l],R=n[u],A=n[m],C=n[x],U=n[b];typeof R=="number"&&(s[T]=R),typeof A=="number"&&(s[f]=A),typeof C=="number"&&(s[L]=C),typeof U=="number"&&(s[$]=U)}return s}function cc(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const i of n)if(e[i]!==t[i])return!0;return!1}function ph(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=to(e),s=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...rh(n,o),...ah()};if(s)for(const d of _i)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,sh());return cc(e,l)?l:e}function mh(e,t,n){const i=Gg(e);i&&(e={...e,...i});const o=ac(n==null?void 0:n.designWidth),s=e.columns,l=t.columns,d=to(e),c=to(t),u=e.type==="b"||e.type===void 0&&t.type==="b",m=typeof s=="number"?s:typeof l=="number"?l:Kn.length,x=C=>{if(u)return C;const U=No({...t,...C}),E=to(C),O=Yo(m,E,U),I=lh(m,O,{...t,...C});return Object.keys(I).length===0?C:{...C,...I}};if(typeof s=="number"&&s!==l)return e;const b=Os(e),T=Os(t);if(!dh(b,T))return x({...e,...uh(b,T,t,m)});if(d<c&&typeof m=="number"&&!u){const C=No({...t,...e});return x({...e,...ch(m,d,C)})}if(u){const C=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,U=Math.max(0,(d-o)/2);return C>U?{...e,textPaddingLR:U}:e}const f=No({...t,...e}),L=Yo(m,c,No(t)),R=Yo(m,d,f).some((C,U)=>C<(L[U]??C)),A=fn.some(C=>{const U=e[C],E=t[C];return typeof U=="number"&&typeof E=="number"&&U!==E});return R||A?x(e):e}function gh(e,t,n,i){const o=t.slice(0,e).reduce((l,d)=>l+d,0),s=n.slice(e+1,t.length-1).reduce((l,d)=>l+d,0);return Math.max(ho,i-o-s-ho)}function hh(e,t){return Math.random()*(t-e)+e}function fh(e){return Object.fromEntries(fn.map(t=>[t,typeof e[t]=="number"?e[t]:sc[t]]))}function Kr(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function yh(e,t,n,i,o,s){return e.slice(0,t).map((l,d)=>{const c=Wi[d],u=Fi[d],m=_i[d];return{key:l,textPrefix:Jg[l],widthKey:fn[d],width:n[fn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:m,paddingLeft:i[c],paddingRight:o[u],paddingBottom:s[m]}})}function vh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:l,onUpdateSettings:d}){const{prefix:c}=y.useScopedStyles(),u=!!o,{columns:m,type:x,wrapperWidth:b,entriesCount:T,cellMinHeight:f,dividerWidth:L,showVisibility:$,cut:R,showCut:A,cutCellMinHeight:C,cutLabel:U,imageSize:E,imageOnHover:O,entryHoverEffect:I,entryHoverShowOption:w,rowPaddingTop:F,rowPaddingBottom:h,rowPaddingTopB:S,columnsOrder:M,textPaddingLR:z,textColor:K,backgroundColor:se,dividerColor:Y,textHoverColor:D,backgroundHoverColor:N,dividerHoverColor:W}=e,[P,q]=a.useState(void 0),[G,Z]=a.useState(null),_=O==="on"&&(!n||i),me=(R??0)>0,v=x==="b",fe=a.useRef(null),J=a.useRef(null),[ce,Ce]=a.useState(null),[oe,xe]=a.useState(go),Q=ac(oe),ye=Math.max(0,((b??0)-Q)/2),ve=Math.min(z??0,ye),Me=Math.max(ve,Si),we=((b??0)+Q)/2;a.useLayoutEffect(()=>{if(!n){xe(go);return}const $e=()=>{xe(oh(fe.current))};$e();const je=fe.current;if(!je)return;const Oe=new ResizeObserver($e);Oe.observe(je);let Ye=je;for(;Ye&&!Ye.style.getPropertyValue("--cntrl-article-width");)Ye=Ye.parentElement;return Ye&&Oe.observe(Ye),()=>Oe.disconnect()},[n,l]),a.useEffect(()=>{q(void 0)},[R,A,t,T]),a.useEffect(()=>{n&&!i&&q(void 0)},[n,i]);const Ae=y.buildColorVars(c,{textColor:K,backgroundColor:se,dividerColor:Y,textHoverColor:D,backgroundHoverColor:N,dividerHoverColor:W},nh,ih),X=s&&s!=="default"?`${c}-state-${s}`:"",Se=`${!n||i?I==="default"?`${c}-entry-hover-default`:I==="blinds"?`${c}-entry-hover-blinds`:I==="reveal"?`${c}-entry-hover-reveal`:"":""} ${X}`.trim(),j=I==="reveal"&&(!n||i),de=($==null?void 0:$[0])??!1,H=($==null?void 0:$[1])??!1,re=a.useRef(e),ae=a.useRef(l);a.useEffect(()=>{if(!d||!n){re.current=e,ae.current=l;return}if(ae.current!==l){re.current=e,ae.current=l;return}const $e=re.current;if(!($e!==e))return;if(typeof $e.columns=="number"&&typeof e.columns=="number"&&$e.columns!==e.columns){re.current=e;return}const Oe=mh(e,$e,{designWidth:oe});re.current=e,cc(e,Oe)&&d(Oe)},[e,d,n,l,oe]);const ne=a.useMemo(()=>fh(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ie=a.useMemo(()=>Kr(e,Wi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),be=a.useMemo(()=>Kr(e,Fi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Te=a.useMemo(()=>Kr(e,_i),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),ee=a.useMemo(()=>Array.isArray(M)&&M.length>0?M:[...Kn],[M]),pe=a.useMemo(()=>yh(ee,m,ne,ie,be,Te),[ee,m,ne,ie,be,Te]),Pe=to(e),le=a.useMemo(()=>fn.slice(0,m).map($e=>ne[$e]),[m,ne]),V=a.useMemo(()=>qa(m,Pe,ne),[m,Pe,ne]),He=a.useMemo(()=>Yo(m,Pe,ne),[m,Pe,ne]),Fe=a.useMemo(()=>pe.map(($e,je)=>lc(He[je]??0,$e.paddingLeft,$e.paddingRight)),[pe,He]),Qe=a.useMemo(()=>{const $e=T===0?1/0:T;return(t??[]).slice(0,$e).map((Oe,Ye)=>({id:Ye,cells:Object.fromEntries(Kn.map(Lt=>[Lt,Oe[Lt]??""])),image:Oe.image,link:Oe.link}))},[t,T]),Xe=me?P??R:Qe.length,lt=a.useMemo(()=>me?Qe.slice(0,Xe):Qe,[Qe,me,Xe]),pt=me&&Xe<Qe.length,Be=lt.length>1||pt,rt=[de?`${c}-divider-top`:"",H||Be?`${c}-divider-bottom`:""].filter(Boolean).join(" "),Tt=!n||i,at=()=>{if(!Tt)return;const $e=P??R;if(!A){q(Qe.length);return}q(Math.min($e+A,Qe.length))},Ke=$e=>y.scalingValue($e,n??!1),gt=v?S??0:F??0,bt=h??0,mt=f??0,kt=Math.max(bt,qr),Wt=As(0,lt.length,de,H,pt,L??0,n??!1).borderTopWidth,et=v?"rowPaddingTopB":"rowPaddingTop",St=pe[0],$t=pe[pe.length-1],De=Fe[0],Ve=Fe[Fe.length-1],_e=St&&De?Math.max(De.paddingLeft,Si):0,ht=$t&&Ve?Math.max(Ve.paddingRight,Si):0,It=Pe,At=$e=>{const je=fe.current;if(!je)return{x:0,y:0};const Oe=je.getBoundingClientRect();return{x:$e.clientX-Oe.left+Ps,y:$e.clientY-Oe.top+Ps}},Vt=($e,je)=>{if(!_)return;const Oe=$e.image;if(!(Oe!=null&&Oe.url)){Z(null);return}const{x:Ye,y:Lt}=At(je),tt=(E==null?void 0:E.min)??80,ke=(E==null?void 0:E.max)??320,ft=(G==null?void 0:G.rowId)===$e.id?G.widthPx:hh(tt,ke);Z({rowId:$e.id,url:Oe.url,objectFit:"contain",isVideo:_g(Oe),widthPx:ft,x:Ye,y:Lt})},tn=$e=>{if(!_||!G)return;const{x:je,y:Oe}=At($e);Z(Ye=>!Ye||Ye.x===je&&Ye.y===Oe?Ye:{...Ye,x:je,y:Oe})},nn=()=>{Z(null)},wt=$e=>{j&&Ms($e,c),_&&Z(null)},Rt=$e=>{j&&ks($e,c)};a.useLayoutEffect(()=>{if(!u||v){Ce(null);return}const $e=J.current,je=$e==null?void 0:$e.parentElement;if(!$e||!je){Ce(null);return}const Oe=()=>{const Lt=$e.querySelector("[data-list-row]");if(!Lt){Ce(null);return}const tt=je.getBoundingClientRect(),ke=Lt.getBoundingClientRect();Ce(ke.top-tt.top+ke.height/2)};Oe();const Ye=new ResizeObserver(Oe);return Ye.observe($e),Ye.observe(je),()=>Ye.disconnect()},[u,v,lt,gt,bt,mt,t,e,pe,He,oe,L,de,H,pt]);const qt=a.useMemo(()=>!v&&Da.some($e=>{const je=$e.charAt(0),Oe=e[`${$e}VerticalAlign`];return rc(Oe,e,je)}),[v,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);a.useLayoutEffect(()=>{var ft;const $e=fe.current;if(!$e)return;const je=()=>{$e.querySelectorAll("[data-list-col]").forEach(Je=>{Je.style.transform="";const qe=Je.querySelector(`.${c}-list-col`);qe&&(qe.style.minHeight="",qe.style.height="");const it=Je.querySelector(`.${c}-list-col-title`);it&&(it.style.transform="")})};if(v||!qt){je();return}const Oe=()=>{const Je=Array.from($e.querySelectorAll("[data-list-row]")),qe=`${c}-list-col`,it=`${c}-baseline-probe`;Je.forEach(Ht=>{Ht.querySelectorAll("[data-list-col]").forEach(Et=>{Et.style.transform="";const ct=Et.querySelector(`.${qe}`);ct&&(ct.style.minHeight="",ct.style.height="");const Ot=Et.querySelector(`.${c}-list-col-title`);Ot&&(Ot.style.transform="")})}),Je.forEach(Ht=>{const Et=Array.from(Ht.querySelectorAll("[data-list-col]"));Yg(Ht,Et,qe)}),$e.offsetHeight,Je.forEach(Ht=>{const Et=Array.from(Ht.querySelectorAll("[data-list-col]")),ct=Ht.getBoundingClientRect().top,Ot=new Map,Dt=Et.map(dt=>{const Ut=dt.querySelector(`.${c}-list-col-title`),Jt={el:dt,titleEl:Ut,letter:dt.getAttribute("data-col-letter")??"",kind:dt.getAttribute("data-valign")??"top",anchor:dt.getAttribute("data-valign-anchor")};return Ot.set(Jt.letter,Jt),Jt}),jt=new Map,zt=(dt,Ut)=>{const Jt=jt.get(dt.letter);if(Jt!==void 0)return Jt;const Qt=dt.anchor?Ot.get(dt.anchor):void 0;if(dt.kind!=="baseline"||!Qt||Ut.has(dt.letter)){const ge=Gr(dt,ct,qe,it);return jt.set(dt.letter,ge),ge}Ut.add(dt.letter);const vt=zt(Qt,Ut);Ut.delete(dt.letter);const Pt=Gr(dt,ct,qe,it),Bt=vt-Pt;Zg(dt.titleEl,Bt);const g=Gr(dt,ct,qe,it);return jt.set(dt.letter,g),g};Dt.forEach(dt=>zt(dt,new Set))})};let Ye=null;const Lt=()=>{Ye===null&&(Ye=requestAnimationFrame(()=>{Ye=null,Oe()}))};Oe();const tt=new ResizeObserver(()=>Lt());tt.observe($e);let ke=!1;return typeof document<"u"&&((ft=document.fonts)!=null&&ft.ready)&&document.fonts.ready.then(()=>{ke||Lt()}),()=>{ke=!0,Ye!==null&&(cancelAnimationFrame(Ye),Ye=null),tt.disconnect(),je()}},[qt,v,e,t,oe,lt,He]);const Kt=a.useMemo(()=>jg(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Kt}}),r.jsx("div",{style:Ae,children:r.jsxs("div",{ref:fe,className:`${c}-wrapper ${Se}${rt?` ${rt}`:""}${v?` ${c}-type-b`:""}`.trim(),style:{width:y.scalingValue(b??0,n)},onMouseMove:_?tn:void 0,onMouseLeave:_?nn:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[lt.map(($e,je)=>{var tt;const Oe=(((tt=$e.link)==null?void 0:tt.length)??0)>0,Ye=Oe&&(!n||i)?"a":"div",Lt=As(je,lt.length,de,H,pt,L??0,n??!1);return r.jsxs(Ye,{ref:je===0?ke=>{J.current=ke}:void 0,className:`${c}-list-item${Oe||w==="always"?` ${c}-list-item-has-link`:""}${pt&&je===lt.length-1?` ${c}-list-item-before-cut`:""}`,...Oe?{href:$e.link,target:"_blank"}:{},style:Lt,onMouseEnter:ke=>{j&&(Oe||w==="always")&&Ms(ke,c),_&&Vt($e,ke)},onMouseLeave:ke=>{j&&(Oe||w==="always")&&ks(ke,c)},children:[gt>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ke(gt)}}),r.jsxs("div",{className:`${c}-list-cols-row${v?"":` ${c}-list-cols-row-h`}${u&&je===0&&v?` ${c}-list-cols-row-controls`:""}`,...v?{}:{"data-list-row":""},style:v?void 0:{minHeight:Ke(mt)},children:[pe.map((ke,ft)=>{const Je=ft===pe.length-1,qe=Fe[ft],it=ke.paddingBottom,Ht=Hg($e.cells[ke.key]),Et=v&&Ht&&it>0,ct=v?{minHeight:Ke(mt)}:{width:Ke(He[ft])},Ot=v?{paddingLeft:Ke(ve),paddingRight:Ke(ve)}:{paddingLeft:Ke(qe.paddingLeft),paddingRight:Ke(qe.paddingRight)},Dt=ke.textPrefix.charAt(0),jt=v?Vg(e[`${ke.textPrefix}VerticalAlign`]):Dg(e[`${ke.textPrefix}VerticalAlign`],e,Dt),zt=v&&Ht&&u&&je===0;return v&&!Ht?null:r.jsxs("div",{className:v?`${c}-list-col-wrap`:void 0,...v?{}:{"data-list-col":"","data-col-letter":Dt,"data-valign":jt.kind,...jt.kind==="baseline"?{"data-valign-anchor":jt.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${Je?` ${c}-list-col-last`:""}`,style:{...Ot,...ct,...v?{justifyContent:Ws(jt.kind)}:{}},"data-test":ke.width,children:r.jsx("span",{className:_s(e,ke.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...Fs(rr(e,ke.textPrefix),n),...Ns(e,ke.textPrefix,c,n),...v?{}:qg(jt.kind)},children:$e.cells[ke.key]??null})}),Et&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ke(it)}}),zt&&r.jsx("div",{"data-controls":ke.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ke(Math.max(it,qr))}})]},ke.key)}),u&&je===0&&v&&r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(we),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:0,width:Ke(Me),height:"100%"}}),r.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(we),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:Ke(Math.max(Me,Pe-Me)),width:Ke(Me),height:"100%"}})]})]}),!v&&bt>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ke(bt)}}),u&&je===0&&!v&&r.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ke(kt)}})]},$e.id)}),u&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":et,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":v?"center":"left-y",className:`${c}-control-anchor`,style:{top:Wt,left:0,width:"100%",height:Ke(Math.max(gt,qr))}})},"row-padding-handles"),u&&!v&&St&&$t&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx("div",{"data-controls":St.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(He[0]-((De==null?void 0:De.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ce??void 0,className:`${c}-control-anchor`,style:{top:0,left:0,width:Ke(_e),height:"100%"}}),r.jsx("div",{"data-controls":$t.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(He[pe.length-1]-((Ve==null?void 0:Ve.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ce??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ke(It-ht),width:Ke(ht),height:"100%"}})]},"column-edge-padding-handles"),u&&!v&&pe.slice(0,-1).map(($e,je)=>{const Oe=pe[je+1],Ye=V.slice(0,je+1).reduce((Je,qe)=>Je+qe,0),Lt=Fe[je],tt=Fe[je+1],ke=Math.max(Lt.paddingRight,Si),ft=Math.max(tt.paddingLeft,Si);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx("div",{"data-controls":$e.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(He[je]-Lt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ce??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ke(Ye-ke),width:Ke(ke),height:"100%"}}),r.jsx("div",{"data-controls":Oe.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(He[je+1]-tt.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ce??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ke(Ye),width:Ke(ft),height:"100%"}})]},`${$e.paddingRightKey}-padding`)}),u&&!v&&pe.slice(0,-1).map(($e,je)=>{const Oe=gh(je,V,le,Pe),Lt=V.slice(0,je+1).reduce((tt,ke)=>tt+ke,0)-Hs/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":$e.widthKey,"data-controls-axis":"x","data-controls-min":String(Ga),"data-controls-max-fraction":String(Oe),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ke(Lt),width:Ke(Hs),height:"calc(100%)",pointerEvents:"auto"}})},`${$e.widthKey}-junction`)})]}),pt&&(()=>{const $e=rr(e,An),je=Kg(e.cutLabelVerticalAlign),Oe=$e.textTextAlign==="justify"||v;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ke(C??0),cursor:Tt?"pointer":"default",...Og(H,L??0,n??!1)},onClick:Tt?at:void 0,onMouseEnter:j||_?wt:void 0,onMouseLeave:j?Rt:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...v?{paddingLeft:Ke(ve),paddingRight:Ke(ve)}:{},justifyContent:Ug($e.textTextAlign),alignItems:Ws(je)},children:r.jsx("span",{className:_s(e,An,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...Fs($e,n),...Ns(e,An,c,n),...Oe?{width:"100%"}:{}},children:U})})})})(),_&&G&&(()=>{const $e=`${G.widthPx}px`,je={width:$e,height:"auto",maxHeight:$e,objectFit:"contain",left:G.x,top:G.y,position:"absolute"};return r.jsx(Ng,{media:G,className:G.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:je},`${G.rowId}-${G.url}`)})()]})})]})}const xh=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
|
|
9089
8987
|
import { CommonComponentProps } from '../props';
|
|
9090
8988
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
|
|
9091
8989
|
import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
|
|
9092
|
-
import { PaddingControl } from '../helpers/PaddingControl/PaddingControl';
|
|
9093
8990
|
import type { LayoutItem, LayoutTab } from '../../types/SchemaV1';
|
|
9094
8991
|
|
|
9095
8992
|
type ListFontSettings = { fontWeight: number; fontStyle: string };
|
|
@@ -9530,56 +9427,14 @@ a.\${P}-list-item {
|
|
|
9530
9427
|
}
|
|
9531
9428
|
|
|
9532
9429
|
.\${P}-col-resize-handle,
|
|
9533
|
-
.\${P}-
|
|
9534
|
-
.\${P}-text-padding-lr-handle {
|
|
9430
|
+
.\${P}-control-anchor {
|
|
9535
9431
|
background: transparent;
|
|
9536
9432
|
}
|
|
9537
9433
|
|
|
9538
|
-
.\${P}-
|
|
9539
|
-
.\${P}-text-padding-lr-handle::after {
|
|
9540
|
-
content: '';
|
|
9541
|
-
position: absolute;
|
|
9542
|
-
top: var(--\${P}-first-entry-handle-top, 50%);
|
|
9543
|
-
left: 50%;
|
|
9544
|
-
transform: translate(-50%, -50%);
|
|
9545
|
-
width: 4px;
|
|
9546
|
-
height: 12px;
|
|
9547
|
-
background: #FF5C02;
|
|
9548
|
-
border: 1px solid #FFFFFF;
|
|
9549
|
-
border-radius: 5px;
|
|
9550
|
-
box-sizing: border-box;
|
|
9551
|
-
pointer-events: none;
|
|
9552
|
-
}
|
|
9553
|
-
|
|
9554
|
-
.\${P}-text-padding-lr-handle::after {
|
|
9555
|
-
top: 50%;
|
|
9556
|
-
}
|
|
9557
|
-
|
|
9558
|
-
.\${P}-padding-control-handle[data-controls-axis="y"]::after {
|
|
9559
|
-
content: '';
|
|
9434
|
+
.\${P}-control-anchor {
|
|
9560
9435
|
position: absolute;
|
|
9561
|
-
top: 50%;
|
|
9562
|
-
left: 50%;
|
|
9563
|
-
transform: translate(-50%, -50%);
|
|
9564
|
-
width: 12px;
|
|
9565
|
-
height: 4px;
|
|
9566
|
-
background: #FF5C02;
|
|
9567
|
-
border: 1px solid #FFFFFF;
|
|
9568
|
-
border-radius: 5px;
|
|
9569
|
-
box-sizing: border-box;
|
|
9570
9436
|
pointer-events: none;
|
|
9571
|
-
|
|
9572
|
-
|
|
9573
|
-
.\${P}-padding-control-handle[data-controls-variant="row-padding"][data-controls-axis="y"]::after,
|
|
9574
|
-
.\${P}-padding-control-handle[data-controls-variant="column-padding"][data-controls-axis="y"]::after {
|
|
9575
|
-
left: 20px;
|
|
9576
|
-
transform: translateY(-50%);
|
|
9577
|
-
}
|
|
9578
|
-
|
|
9579
|
-
.\${P}-wrapper.\${P}-type-b .\${P}-padding-control-handle[data-controls-variant="row-padding"][data-controls-axis="y"]::after,
|
|
9580
|
-
.\${P}-wrapper.\${P}-type-b .\${P}-padding-control-handle[data-controls-variant="column-padding"][data-controls-axis="y"]::after {
|
|
9581
|
-
left: 50%;
|
|
9582
|
-
transform: translate(-50%, -50%);
|
|
9437
|
+
z-index: 2;
|
|
9583
9438
|
}
|
|
9584
9439
|
|
|
9585
9440
|
.\${P}-row-padding-handle {
|
|
@@ -9596,26 +9451,6 @@ a.\${P}-list-item {
|
|
|
9596
9451
|
position: relative;
|
|
9597
9452
|
}
|
|
9598
9453
|
|
|
9599
|
-
.\${P}-col-resize-handle::after {
|
|
9600
|
-
content: '';
|
|
9601
|
-
position: absolute;
|
|
9602
|
-
top: 0;
|
|
9603
|
-
left: 50%;
|
|
9604
|
-
transform: translateX(-50%);
|
|
9605
|
-
width: 2px;
|
|
9606
|
-
height: 100%;
|
|
9607
|
-
background: #FF5C02;
|
|
9608
|
-
pointer-events: none;
|
|
9609
|
-
}
|
|
9610
|
-
|
|
9611
|
-
.\${P}-wrapper.\${P}-type-b .\${P}-col-resize-handle::after {
|
|
9612
|
-
top: 50%;
|
|
9613
|
-
left: 0;
|
|
9614
|
-
transform: translateY(-50%);
|
|
9615
|
-
width: 100%;
|
|
9616
|
-
height: 2px;
|
|
9617
|
-
}
|
|
9618
|
-
|
|
9619
9454
|
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-list-item-has-link,
|
|
9620
9455
|
.\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-list-item-has-link,
|
|
9621
9456
|
.\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-list-item-has-link,
|
|
@@ -9643,19 +9478,19 @@ a.\${P}-list-item {
|
|
|
9643
9478
|
|
|
9644
9479
|
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-default .\${P}-list-item-has-link:hover,
|
|
9645
9480
|
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-default .\${P}-list-item:has(+ .\${P}-list-item-has-link:hover),
|
|
9646
|
-
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-default
|
|
9481
|
+
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-default:has(.\${P}-cut-item:hover) .\${P}-list-item-before-cut,
|
|
9647
9482
|
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-default.\${P}-state-hover .\${P}-list-item-has-link,
|
|
9648
9483
|
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-default .\${P}-cut-item:hover,
|
|
9649
9484
|
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-default.\${P}-state-hover .\${P}-cut-item,
|
|
9650
9485
|
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-blinds .\${P}-list-item-has-link:hover,
|
|
9651
9486
|
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-blinds .\${P}-list-item:has(+ .\${P}-list-item-has-link:hover),
|
|
9652
|
-
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-blinds
|
|
9487
|
+
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-blinds:has(.\${P}-cut-item:hover) .\${P}-list-item-before-cut,
|
|
9653
9488
|
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-list-item-has-link,
|
|
9654
9489
|
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-blinds .\${P}-cut-item:hover,
|
|
9655
9490
|
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-cut-item,
|
|
9656
9491
|
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-reveal .\${P}-list-item-has-link:hover,
|
|
9657
9492
|
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-reveal .\${P}-list-item:has(+ .\${P}-list-item-has-link:hover),
|
|
9658
|
-
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-reveal
|
|
9493
|
+
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-reveal:has(.\${P}-cut-item:hover) .\${P}-list-item-before-cut,
|
|
9659
9494
|
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-reveal.\${P}-state-hover .\${P}-list-item-has-link,
|
|
9660
9495
|
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-reveal .\${P}-cut-item:hover,
|
|
9661
9496
|
.\${P}-wrapper.\${P}-divider-bottom.\${P}-entry-hover-reveal.\${P}-state-hover .\${P}-cut-item {
|
|
@@ -10968,8 +10803,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
10968
10803
|
const cutEnabled = (cut ?? 0) > 0;
|
|
10969
10804
|
const isVerticalLayout = type === 'b';
|
|
10970
10805
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
10971
|
-
const
|
|
10972
|
-
const [
|
|
10806
|
+
const firstRowRef = useRef<HTMLElement | null>(null);
|
|
10807
|
+
const [firstRowHandleCenterOffsetPx, setFirstRowHandleCenterOffsetPx] = useState<number | null>(null);
|
|
10973
10808
|
const [designWidth, setDesignWidth] = useState(ARTICLE_DESIGN_WIDTH);
|
|
10974
10809
|
const minColumnWidth = getListMinColumnWidth(designWidth);
|
|
10975
10810
|
|
|
@@ -11233,7 +11068,6 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
11233
11068
|
: (rowPaddingTop ?? 0);
|
|
11234
11069
|
const resolvedRowPaddingBottom = rowPaddingBottom ?? 0;
|
|
11235
11070
|
const resolvedCellMinHeight = cellMinHeight ?? 0;
|
|
11236
|
-
const firstEntryContentCenter = resolvedRowPaddingTop + resolvedCellMinHeight / 2;
|
|
11237
11071
|
const rowPaddingBottomControlHeight = Math.max(resolvedRowPaddingBottom, ROW_PADDING_HANDLE_HEIGHT);
|
|
11238
11072
|
const firstEntryBorderTopWidth = getEntryDividerWidths(
|
|
11239
11073
|
0,
|
|
@@ -11244,9 +11078,6 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
11244
11078
|
dividerWidth ?? 0,
|
|
11245
11079
|
isEditor ?? false,
|
|
11246
11080
|
).borderTopWidth;
|
|
11247
|
-
const firstEntryHandleTop = firstEntryHandleTopPx != null
|
|
11248
|
-
? \`\${firstEntryHandleTopPx}px\`
|
|
11249
|
-
: \`calc(\${firstEntryBorderTopWidth} + \${scaled(firstEntryContentCenter)})\`;
|
|
11250
11081
|
const rowPaddingTopControlKey = isVerticalLayout ? 'rowPaddingTopB' : 'rowPaddingTop';
|
|
11251
11082
|
const firstColumn = listColumns[0];
|
|
11252
11083
|
const lastColumn = listColumns[listColumns.length - 1];
|
|
@@ -11331,27 +11162,27 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
11331
11162
|
|
|
11332
11163
|
useLayoutEffect(() => {
|
|
11333
11164
|
if (!showControls || isVerticalLayout) {
|
|
11334
|
-
|
|
11165
|
+
setFirstRowHandleCenterOffsetPx(null);
|
|
11335
11166
|
return;
|
|
11336
11167
|
}
|
|
11337
11168
|
|
|
11338
|
-
const el =
|
|
11169
|
+
const el = firstRowRef.current;
|
|
11339
11170
|
const container = el?.parentElement;
|
|
11340
11171
|
if (!el || !container) {
|
|
11341
|
-
|
|
11172
|
+
setFirstRowHandleCenterOffsetPx(null);
|
|
11342
11173
|
return;
|
|
11343
11174
|
}
|
|
11344
11175
|
|
|
11345
11176
|
const update = () => {
|
|
11346
11177
|
const rowContent = el.querySelector('[data-list-row]');
|
|
11347
11178
|
if (!rowContent) {
|
|
11348
|
-
|
|
11179
|
+
setFirstRowHandleCenterOffsetPx(null);
|
|
11349
11180
|
return;
|
|
11350
11181
|
}
|
|
11351
11182
|
|
|
11352
11183
|
const containerRect = container.getBoundingClientRect();
|
|
11353
11184
|
const rowRect = rowContent.getBoundingClientRect();
|
|
11354
|
-
|
|
11185
|
+
setFirstRowHandleCenterOffsetPx(rowRect.top - containerRect.top + rowRect.height / 2);
|
|
11355
11186
|
};
|
|
11356
11187
|
|
|
11357
11188
|
update();
|
|
@@ -11569,9 +11400,6 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
11569
11400
|
className={\`\${P}-wrapper \${wrapperStateClasses}\${dividerClassNames ? \` \${dividerClassNames}\` : ''}\${isVerticalLayout ? \` \${P}-type-b\` : ''}\`.trim()}
|
|
11570
11401
|
style={{
|
|
11571
11402
|
width: scalingValue(wrapperWidth ?? 0, isEditor),
|
|
11572
|
-
...(!isVerticalLayout && showControls
|
|
11573
|
-
? { [\`--\${P}-first-entry-handle-top\`]: firstEntryHandleTop }
|
|
11574
|
-
: {}),
|
|
11575
11403
|
}}
|
|
11576
11404
|
onMouseMove={showHoverImage ? handleWrapperMouseMove : undefined}
|
|
11577
11405
|
onMouseLeave={showHoverImage ? handleWrapperMouseLeave : undefined}
|
|
@@ -11593,8 +11421,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
11593
11421
|
return (
|
|
11594
11422
|
<RowElement
|
|
11595
11423
|
key={row.id}
|
|
11596
|
-
ref={rowIdx === 0 ? (el: HTMLElement | null) => {
|
|
11597
|
-
className={\`\${P}-list-item\${hasLink || entryHoverShowOption === 'always' ? \` \${P}-list-item-has-link\` : ''}\`}
|
|
11424
|
+
ref={rowIdx === 0 ? (el: HTMLElement | null) => { firstRowRef.current = el; } : undefined}
|
|
11425
|
+
className={\`\${P}-list-item\${hasLink || entryHoverShowOption === 'always' ? \` \${P}-list-item-has-link\` : ''}\${showCutLabel && rowIdx === visibleRows.length - 1 ? \` \${P}-list-item-before-cut\` : ''}\`}
|
|
11598
11426
|
{...(hasLink ? { href: row.link, target: '_blank' } : {})}
|
|
11599
11427
|
style={rowStyle}
|
|
11600
11428
|
onMouseEnter={(event) => {
|
|
@@ -11711,17 +11539,15 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
11711
11539
|
/>
|
|
11712
11540
|
)}
|
|
11713
11541
|
{columnPaddingBottomOverlay && (
|
|
11714
|
-
<
|
|
11715
|
-
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}
|
|
11542
|
+
<div
|
|
11716
11543
|
data-controls={col.paddingBottomKey}
|
|
11717
|
-
data-controls-static-handle=""
|
|
11718
11544
|
data-controls-axis="y"
|
|
11719
11545
|
data-controls-variant="column-padding"
|
|
11720
11546
|
data-controls-min="0"
|
|
11721
|
-
|
|
11722
|
-
|
|
11723
|
-
|
|
11724
|
-
|
|
11547
|
+
data-controls-center-only-drag=""
|
|
11548
|
+
data-controls-hit-placement="center"
|
|
11549
|
+
className={\`\${P}-control-anchor\`}
|
|
11550
|
+
style={{
|
|
11725
11551
|
bottom: 0,
|
|
11726
11552
|
left: 0,
|
|
11727
11553
|
width: '100%',
|
|
@@ -11734,39 +11560,35 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
11734
11560
|
})}
|
|
11735
11561
|
{showControls && rowIdx === 0 && isVerticalLayout && (
|
|
11736
11562
|
<>
|
|
11737
|
-
<
|
|
11738
|
-
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}
|
|
11563
|
+
<div
|
|
11739
11564
|
data-controls="textPaddingLR"
|
|
11740
|
-
data-controls-static-handle=""
|
|
11741
11565
|
data-controls-paired=""
|
|
11742
11566
|
data-controls-axis="x"
|
|
11743
11567
|
data-controls-variant="column-padding"
|
|
11744
11568
|
data-controls-min="0"
|
|
11745
11569
|
data-controls-max-fraction={String(textPaddingLRMaxFraction)}
|
|
11746
|
-
|
|
11747
|
-
|
|
11748
|
-
|
|
11749
|
-
|
|
11570
|
+
data-controls-center-only-drag=""
|
|
11571
|
+
data-controls-hit-placement="center"
|
|
11572
|
+
className={\`\${P}-control-anchor\`}
|
|
11573
|
+
style={{
|
|
11750
11574
|
top: 0,
|
|
11751
11575
|
left: 0,
|
|
11752
11576
|
width: scaled(textPaddingLRHandleWidth),
|
|
11753
11577
|
height: '100%',
|
|
11754
11578
|
}}
|
|
11755
11579
|
/>
|
|
11756
|
-
<
|
|
11757
|
-
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}
|
|
11580
|
+
<div
|
|
11758
11581
|
data-controls="textPaddingLR"
|
|
11759
|
-
data-controls-static-handle=""
|
|
11760
11582
|
data-controls-paired=""
|
|
11761
11583
|
data-controls-axis="x"
|
|
11762
11584
|
data-controls-variant="column-padding"
|
|
11763
11585
|
data-controls-reverse=""
|
|
11764
11586
|
data-controls-min="0"
|
|
11765
11587
|
data-controls-max-fraction={String(textPaddingLRMaxFraction)}
|
|
11766
|
-
|
|
11767
|
-
|
|
11768
|
-
|
|
11769
|
-
|
|
11588
|
+
data-controls-center-only-drag=""
|
|
11589
|
+
data-controls-hit-placement="center"
|
|
11590
|
+
className={\`\${P}-control-anchor\`}
|
|
11591
|
+
style={{
|
|
11770
11592
|
top: 0,
|
|
11771
11593
|
left: scaled(Math.max(textPaddingLRHandleWidth, resolvedContentWidth - textPaddingLRHandleWidth)),
|
|
11772
11594
|
width: scaled(textPaddingLRHandleWidth),
|
|
@@ -11783,18 +11605,15 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
11783
11605
|
/>
|
|
11784
11606
|
)}
|
|
11785
11607
|
{showControls && rowIdx === 0 && !isVerticalLayout && (
|
|
11786
|
-
<
|
|
11787
|
-
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}
|
|
11608
|
+
<div
|
|
11788
11609
|
data-controls="rowPaddingBottom"
|
|
11789
|
-
data-controls-static-handle=""
|
|
11790
|
-
data-controls-handle-left="20"
|
|
11791
11610
|
data-controls-axis="y"
|
|
11792
11611
|
data-controls-variant="row-padding"
|
|
11793
11612
|
data-controls-min="0"
|
|
11794
|
-
|
|
11795
|
-
|
|
11796
|
-
|
|
11797
|
-
|
|
11613
|
+
data-controls-center-only-drag=""
|
|
11614
|
+
data-controls-hit-placement="left-y"
|
|
11615
|
+
className={\`\${P}-control-anchor\`}
|
|
11616
|
+
style={{
|
|
11798
11617
|
bottom: 0,
|
|
11799
11618
|
left: 0,
|
|
11800
11619
|
width: '100%',
|
|
@@ -11807,18 +11626,15 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
11807
11626
|
})}
|
|
11808
11627
|
{showControls && (
|
|
11809
11628
|
<div key="row-padding-handles" style={{ position: 'absolute', inset: 0, pointerEvents: 'none' }}>
|
|
11810
|
-
<
|
|
11811
|
-
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}
|
|
11629
|
+
<div
|
|
11812
11630
|
data-controls={rowPaddingTopControlKey}
|
|
11813
|
-
data-controls-static-handle=""
|
|
11814
|
-
{...(!isVerticalLayout ? { 'data-controls-handle-left': '20' } : {})}
|
|
11815
11631
|
data-controls-axis="y"
|
|
11816
11632
|
data-controls-variant="row-padding"
|
|
11817
11633
|
data-controls-min="0"
|
|
11818
|
-
|
|
11819
|
-
|
|
11820
|
-
|
|
11821
|
-
|
|
11634
|
+
data-controls-center-only-drag=""
|
|
11635
|
+
data-controls-hit-placement={isVerticalLayout ? 'center' : 'left-y'}
|
|
11636
|
+
className={\`\${P}-control-anchor\`}
|
|
11637
|
+
style={{
|
|
11822
11638
|
top: firstEntryBorderTopWidth,
|
|
11823
11639
|
left: 0,
|
|
11824
11640
|
width: '100%',
|
|
@@ -11829,30 +11645,27 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
11829
11645
|
)}
|
|
11830
11646
|
{showControls && !isVerticalLayout && firstColumn && lastColumn && (
|
|
11831
11647
|
<div key="column-edge-padding-handles" style={{ position: 'absolute', inset: 0, pointerEvents: 'none' }}>
|
|
11832
|
-
<
|
|
11833
|
-
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}
|
|
11648
|
+
<div
|
|
11834
11649
|
data-controls={firstColumn.paddingLeftKey}
|
|
11835
|
-
data-controls-static-handle=""
|
|
11836
11650
|
data-controls-axis="x"
|
|
11837
11651
|
data-controls-variant="column-padding"
|
|
11838
11652
|
data-controls-min="0"
|
|
11839
11653
|
data-controls-max-fraction={String(
|
|
11840
11654
|
effectiveColumnWidths[0] - (firstColumnEffectivePadding?.paddingRight ?? 0),
|
|
11841
11655
|
)}
|
|
11842
|
-
|
|
11843
|
-
|
|
11844
|
-
|
|
11845
|
-
|
|
11656
|
+
data-controls-center-only-drag=""
|
|
11657
|
+
data-controls-hit-placement="center-x"
|
|
11658
|
+
data-controls-hit-top={firstRowHandleCenterOffsetPx ?? undefined}
|
|
11659
|
+
className={\`\${P}-control-anchor\`}
|
|
11660
|
+
style={{
|
|
11846
11661
|
top: 0,
|
|
11847
11662
|
left: 0,
|
|
11848
11663
|
width: scaled(firstColumnPaddingLeftWidth),
|
|
11849
11664
|
height: '100%',
|
|
11850
11665
|
}}
|
|
11851
11666
|
/>
|
|
11852
|
-
<
|
|
11853
|
-
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}
|
|
11667
|
+
<div
|
|
11854
11668
|
data-controls={lastColumn.paddingRightKey}
|
|
11855
|
-
data-controls-static-handle=""
|
|
11856
11669
|
data-controls-axis="x"
|
|
11857
11670
|
data-controls-variant="column-padding"
|
|
11858
11671
|
data-controls-reverse=""
|
|
@@ -11861,10 +11674,11 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
11861
11674
|
effectiveColumnWidths[listColumns.length - 1]
|
|
11862
11675
|
- (lastColumnEffectivePadding?.paddingLeft ?? 0),
|
|
11863
11676
|
)}
|
|
11864
|
-
|
|
11865
|
-
|
|
11866
|
-
|
|
11867
|
-
|
|
11677
|
+
data-controls-center-only-drag=""
|
|
11678
|
+
data-controls-hit-placement="center-x"
|
|
11679
|
+
data-controls-hit-top={firstRowHandleCenterOffsetPx ?? undefined}
|
|
11680
|
+
className={\`\${P}-control-anchor\`}
|
|
11681
|
+
style={{
|
|
11868
11682
|
top: 0,
|
|
11869
11683
|
left: scaled(columnsRightEdge - lastColumnPaddingRightWidth),
|
|
11870
11684
|
width: scaled(lastColumnPaddingRightWidth),
|
|
@@ -11889,10 +11703,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
11889
11703
|
|
|
11890
11704
|
return (
|
|
11891
11705
|
<div key={\`\${col.paddingRightKey}-padding\`} style={{ position: 'absolute', inset: 0, pointerEvents: 'none' }}>
|
|
11892
|
-
<
|
|
11893
|
-
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}
|
|
11706
|
+
<div
|
|
11894
11707
|
data-controls={col.paddingRightKey}
|
|
11895
|
-
data-controls-static-handle=""
|
|
11896
11708
|
data-controls-axis="x"
|
|
11897
11709
|
data-controls-variant="column-padding"
|
|
11898
11710
|
data-controls-reverse=""
|
|
@@ -11900,30 +11712,30 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
11900
11712
|
data-controls-max-fraction={String(
|
|
11901
11713
|
effectiveColumnWidths[colIndex] - colEffectivePadding.paddingLeft,
|
|
11902
11714
|
)}
|
|
11903
|
-
|
|
11904
|
-
|
|
11905
|
-
|
|
11906
|
-
|
|
11715
|
+
data-controls-center-only-drag=""
|
|
11716
|
+
data-controls-hit-placement="center-x"
|
|
11717
|
+
data-controls-hit-top={firstRowHandleCenterOffsetPx ?? undefined}
|
|
11718
|
+
className={\`\${P}-control-anchor\`}
|
|
11719
|
+
style={{
|
|
11907
11720
|
top: 0,
|
|
11908
11721
|
left: scaled(boundaryOffset - paddingRightWidth),
|
|
11909
11722
|
width: scaled(paddingRightWidth),
|
|
11910
11723
|
height: '100%',
|
|
11911
11724
|
}}
|
|
11912
11725
|
/>
|
|
11913
|
-
<
|
|
11914
|
-
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}
|
|
11726
|
+
<div
|
|
11915
11727
|
data-controls={nextCol.paddingLeftKey}
|
|
11916
|
-
data-controls-static-handle=""
|
|
11917
11728
|
data-controls-axis="x"
|
|
11918
11729
|
data-controls-variant="column-padding"
|
|
11919
11730
|
data-controls-min="0"
|
|
11920
11731
|
data-controls-max-fraction={String(
|
|
11921
11732
|
effectiveColumnWidths[colIndex + 1] - nextColEffectivePadding.paddingRight,
|
|
11922
11733
|
)}
|
|
11923
|
-
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
|
|
11734
|
+
data-controls-center-only-drag=""
|
|
11735
|
+
data-controls-hit-placement="center-x"
|
|
11736
|
+
data-controls-hit-top={firstRowHandleCenterOffsetPx ?? undefined}
|
|
11737
|
+
className={\`\${P}-control-anchor\`}
|
|
11738
|
+
style={{
|
|
11927
11739
|
top: 0,
|
|
11928
11740
|
left: scaled(boundaryOffset),
|
|
11929
11741
|
width: scaled(paddingLeftWidth),
|
|
@@ -11947,7 +11759,6 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
11947
11759
|
<div key={\`\${col.widthKey}-junction\`} style={{ position: 'absolute', inset: 0, pointerEvents: 'none' }}>
|
|
11948
11760
|
<div
|
|
11949
11761
|
data-controls={col.widthKey}
|
|
11950
|
-
data-controls-static-handle=""
|
|
11951
11762
|
data-controls-axis="x"
|
|
11952
11763
|
data-controls-min={String(MIN_COLUMN_WIDTH_PX)}
|
|
11953
11764
|
data-controls-max-fraction={String(maxColumnWidth)}
|
|
@@ -12046,7 +11857,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
12046
11857
|
</>
|
|
12047
11858
|
);
|
|
12048
11859
|
}
|
|
12049
|
-
`,Gi=["A","B","C","D","E"],zs=[...ha,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],oi={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 Ch(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function jo(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Th(){return Object.fromEntries(Gi.map((e,t)=>{const n=Un[t],i=`${e} column`;return[n,Ch(i)]}))}function Lh(){const e={};for(const t of Gi)e[`${t}ColumnWidth`]=jo(`${t} column width`),e[`${t}ColumnPaddingLeft`]=jo(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=jo(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=jo(`${t} column padding bottom`);return e}function Bs(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Un]};for(const s of Gi)i[`${s}ColumnWidth`]=s==="A"?.0798:.32,i[`${s}ColumnPaddingLeft`]=0,i[`${s}ColumnPaddingRight`]=0,i[`${s}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function Ih(e){const t={};if(e===An)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...ha]},enum:[...ha]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...zs],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...zs]}}return t[vt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[vt(e,"textFontSettings")]={...oi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[vt(e,"textFontSize")]={...oi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[vt(e,"textLineHeight")]={...oi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[vt(e,"textLetterSpacing")]={...oi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[vt(e,"textWordSpacing")]={...oi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[vt(e,"textTextAlign")]={...oi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[vt(e,"textTextAppearance")]={...oi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Rh=mo.reduce((e,t)=>({...e,...Ih(t)}),{});function Eh(e){return{verticalAlign:e===An?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===An?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function kh(e,t={}){var n;return{...Eh(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Ds=new Set(["textFontFamily","textFontSettings"]);function Mh(e,t,n){const i=s=>n===void 0?!0:n==="common"?Ds.has(s):!Ds.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Ga(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[vt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[vt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[vt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[vt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[vt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[vt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[vt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[vt(e,"textTextAppearance")]=t.textTextAppearance),o}function Jo(e={},t){return mo.reduce((n,i)=>({...n,...Mh(i,kh(i,e),t)}),{})}const Ph=Jo(),Ah=rh();function uc(e){return[vt(e,"textFontFamily"),vt(e,"textFontSettings"),vt(e,"textFontSize"),vt(e,"textLineHeight"),vt(e,"textLetterSpacing"),vt(e,"textWordSpacing"),vt(e,"textTextAlign"),vt(e,"textTextAppearance"),`${e}VerticalAlign`]}function Fh(){const e=[];return Va.forEach((t,n)=>{const i=Un[n],o=uc(t);for(let s=1;s<Un.length;s+=1){const l=[{name:"columns",value:s},...Array.from({length:s},(d,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:l,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const Wh=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];uc(An);const _h=[...Gi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],ri=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg"}],Nh=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:ri[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:ri[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:ri[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:ri[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:ri[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:ri[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:ri[6],link:""}],Hh=[...Gi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],jh={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Th(),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:Nh},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"}},...Lh(),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"}},...Rh,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",...Ph,...Jo({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Bs({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},...Jo({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Bs({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},...Jo({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Fh(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},..._h.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}},...Gi.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",...Hh]},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__",Ah]}],paletteBookmark:{items:[...Wh],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Oh={element:Sh,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>fh(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...mo.map(e=>({path:`${vt(e,"textFontFamily")}`}))]},fontRelations:{...mo.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${vt(t,"textFontFamily")}`}),{})},schema:jh,sourceCode:$h},Vs=300,Nn=.004,zh={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"},Bh=["hover","focus","filled","success","error"];function Dh(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Gs(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function qs(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:y.scalingValue((o-t)/2,i)}}function Vh(e){return`
|
|
11860
|
+
`,Vi=["A","B","C","D","E"],js=[...ga,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],ii={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 bh(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Ho(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function wh(){return Object.fromEntries(Vi.map((e,t)=>{const n=Kn[t],i=`${e} column`;return[n,bh(i)]}))}function Sh(){const e={};for(const t of Vi)e[`${t}ColumnWidth`]=Ho(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Ho(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Ho(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Ho(`${t} column padding bottom`);return e}function zs(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Kn]};for(const s of Vi)i[`${s}ColumnWidth`]=s==="A"?.0798:.32,i[`${s}ColumnPaddingLeft`]=0,i[`${s}ColumnPaddingRight`]=0,i[`${s}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function $h(e){const t={};if(e===An)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...ga]},enum:[...ga]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...js],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...js]}}return t[xt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[xt(e,"textFontSettings")]={...ii.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[xt(e,"textFontSize")]={...ii.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[xt(e,"textLineHeight")]={...ii.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[xt(e,"textLetterSpacing")]={...ii.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[xt(e,"textWordSpacing")]={...ii.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[xt(e,"textTextAlign")]={...ii.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[xt(e,"textTextAppearance")]={...ii.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Ch=po.reduce((e,t)=>({...e,...$h(t)}),{});function Th(e){return{verticalAlign:e===An?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===An?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Lh(e,t={}){var n;return{...Th(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Bs=new Set(["textFontFamily","textFontSettings"]);function Ih(e,t,n){const i=s=>n===void 0?!0:n==="common"?Bs.has(s):!Bs.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Va(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[xt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[xt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[xt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[xt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[xt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[xt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[xt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[xt(e,"textTextAppearance")]=t.textTextAppearance),o}function Zo(e={},t){return po.reduce((n,i)=>({...n,...Ih(i,Lh(i,e),t)}),{})}const Rh=Zo(),Eh=th();function dc(e){return[xt(e,"textFontFamily"),xt(e,"textFontSettings"),xt(e,"textFontSize"),xt(e,"textLineHeight"),xt(e,"textLetterSpacing"),xt(e,"textWordSpacing"),xt(e,"textTextAlign"),xt(e,"textTextAppearance"),`${e}VerticalAlign`]}function Mh(){const e=[];return Da.forEach((t,n)=>{const i=Kn[n],o=dc(t);for(let s=1;s<Kn.length;s+=1){const l=[{name:"columns",value:s},...Array.from({length:s},(d,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:l,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const kh=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];dc(An);const Ah=[...Vi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],oi=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg"}],Ph=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:oi[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:oi[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:oi[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:oi[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:oi[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:oi[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:oi[6],link:""}],Wh=[...Vi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Fh={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...wh(),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:Ph},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"}},...Sh(),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"}},...Ch,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",...Rh,...Zo({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:zs({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},...Zo({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:zs({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},...Zo({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Mh(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Ah.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}},...Vi.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",...Wh]},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__",Eh]}],paletteBookmark:{items:[...kh],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},_h={element:vh,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>ph(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...po.map(e=>({path:`${xt(e,"textFontFamily")}`}))]},fontRelations:{...po.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${xt(t,"textFontFamily")}`}),{})},schema:Fh,sourceCode:xh},Ds=300,_n=.004,Nh={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"},Hh=["hover","focus","filled","success","error"];function Oh(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Vs(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Gs(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:y.scalingValue((o-t)/2,i)}}function jh(e){return`
|
|
12050
11861
|
.${e}-wrapper {
|
|
12051
11862
|
box-sizing: border-box;
|
|
12052
11863
|
display: flex;
|
|
@@ -12108,7 +11919,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
12108
11919
|
display: flex;
|
|
12109
11920
|
align-items: center;
|
|
12110
11921
|
justify-content: space-between;
|
|
12111
|
-
gap: ${
|
|
11922
|
+
gap: ${Oh(20)};
|
|
12112
11923
|
width: 100%;
|
|
12113
11924
|
min-width: 0;
|
|
12114
11925
|
min-height: var(--${e}-question-min-height, unset);
|
|
@@ -12136,7 +11947,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
12136
11947
|
width: var(--${e}-icon-max-width);
|
|
12137
11948
|
height: var(--${e}-icon-max-width);
|
|
12138
11949
|
position: relative;
|
|
12139
|
-
transition: transform ${
|
|
11950
|
+
transition: transform ${Ds}ms ease;
|
|
12140
11951
|
}
|
|
12141
11952
|
.${e}-icon-custom {
|
|
12142
11953
|
display: flex;
|
|
@@ -12171,7 +11982,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
12171
11982
|
.${e}-panel {
|
|
12172
11983
|
display: grid;
|
|
12173
11984
|
grid-template-rows: 0fr;
|
|
12174
|
-
transition: grid-template-rows ${
|
|
11985
|
+
transition: grid-template-rows ${Ds}ms ease;
|
|
12175
11986
|
}
|
|
12176
11987
|
.${e}-item-open .${e}-panel {
|
|
12177
11988
|
grid-template-rows: 1fr;
|
|
@@ -12204,49 +12015,18 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
12204
12015
|
.${e}-answer-controls {
|
|
12205
12016
|
position: relative;
|
|
12206
12017
|
}
|
|
12207
|
-
.${e}-
|
|
12208
|
-
background: transparent;
|
|
12209
|
-
}
|
|
12210
|
-
.${e}-padding-control-handle[data-controls-axis="x"][data-controls-variant="column-padding"]::after {
|
|
12211
|
-
content: '';
|
|
12212
|
-
position: absolute;
|
|
12213
|
-
top: 50%;
|
|
12214
|
-
left: 50%;
|
|
12215
|
-
transform: translate(-50%, -50%);
|
|
12216
|
-
width: 4px;
|
|
12217
|
-
height: 12px;
|
|
12218
|
-
background: #FF5C02;
|
|
12219
|
-
border: 1px solid #FFFFFF;
|
|
12220
|
-
border-radius: 5px;
|
|
12221
|
-
box-sizing: border-box;
|
|
12222
|
-
pointer-events: none;
|
|
12223
|
-
}
|
|
12224
|
-
.${e}-padding-control-handle[data-controls-axis="y"]::after {
|
|
12225
|
-
content: '';
|
|
12018
|
+
.${e}-control-anchor {
|
|
12226
12019
|
position: absolute;
|
|
12227
|
-
top: 50%;
|
|
12228
|
-
left: 50%;
|
|
12229
|
-
transform: translate(-50%, -50%);
|
|
12230
|
-
width: 12px;
|
|
12231
|
-
height: 4px;
|
|
12232
|
-
background: #FF5C02;
|
|
12233
|
-
border: 1px solid #FFFFFF;
|
|
12234
|
-
border-radius: 5px;
|
|
12235
|
-
box-sizing: border-box;
|
|
12236
12020
|
pointer-events: none;
|
|
12021
|
+
z-index: 2;
|
|
12237
12022
|
}
|
|
12238
|
-
|
|
12239
|
-
left: 20px;
|
|
12240
|
-
transform: translateY(-50%);
|
|
12241
|
-
}
|
|
12242
|
-
`}function Ks(e,t,n,i,o,s,l,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:s??0,textAppearance:l,color:d??"#000000"}}function Gh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:l}=y.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:m=694e-6,dividerStyle:x="solid",entryHoverEffect:b="default",autoclose:T="off",icon:f,iconMaxWidth:L=.00833,iconPaddingRight:$=0,iconAnimation:R="rotate 45",questionColor:P="#000000",answerColor:C="#000000",dividerColor:X="#0000001F",iconColor:E="#000000",questionHoverColor:B="#666666",iconHoverColor:I="#666666",iconActiveColor:w="#000000",dividerHoverColor:W="#000000",questionFontFamily:h,questionFontSettings:S,questionFontSize:k,questionLineHeight:D,questionLetterSpacing:U,questionWordSpacing:ae,questionTextAppearance:Y,answerFontFamily:G,answerFontSettings:H,answerFontSize:F,answerLineHeight:A,answerLetterSpacing:K,answerWordSpacing:q,answerTextAppearance:ee,questionPaddingLeft:N=0,questionPaddingTop:ue=0,questionPaddingBottom:v=0,answerPaddingLeft:ye=0,answerPaddingRight:Z=0,answerPaddingTop:ce=0,answerPaddingBottom:$e=0}=e,ne=t??[],[ve,J]=a.useState(()=>new Set),pe=!n||i;a.useEffect(()=>{J(new Set)},[T]),a.useEffect(()=>{n&&!o&&!i&&J(new Set)},[n,o,i]);const he=Ue=>y.scalingValue(Ue,n??!1),Ae=Math.max(N,Nn),be=Math.max(ue,Nn),We=Math.max(v,Nn),Q=Math.max(ye,Nn),le=Math.max(Z,Nn),xe=Math.max(ce,Nn),O=Math.max($e,Nn),se=Math.max(0,(c??1)-$-L),fe=Math.max(0,(c??1)-Z),Se=Math.max(0,(c??1)-ye),Ie=Math.max($,Nn),we=Math.max(0,(c??1)-N-L),_=a.useMemo(()=>ve.size===0?0:Math.min(...ve),[ve]),de=a.useCallback(Ue=>ve.has(Ue),[ve]),oe=pe&&b==="default"?`${l}-entry-hover-default`:"",z=f??"",re=z!=="",ke=R.replace(/^rotate /,""),ie=`${l}-icon-anim-${ke}`,j=dn(Xt(Ks(h,S,k,D,U,ae,Y,P),n)),Ne=dn(Xt(Ks(G,H,F,A,K,q,ee,C),n)),Me=Gs(k,D,`${l}-question`,`${l}-text-tight-leading`),et=Gs(F,A,`${l}-answer-text`,`${l}-text-tight-leading`),Ye=qs(k,D,l,n),lt=qs(F,A,l,n),mt=y.buildColorVars(l,{questionColor:P,answerColor:C,dividerColor:X,iconColor:E,questionHoverColor:B,iconHoverColor:I,iconActiveColor:w,dividerHoverColor:W},zh,Bh),De=s&&s!=="default"?`${l}-state-${s}`:"",ot=a.useCallback(Ue=>{pe&&J(ht=>{if(ht.has(Ue)){const dt=new Set(ht);return dt.delete(Ue),dt}if(T==="on")return new Set([Ue]);const xt=new Set(ht);return xt.add(Ue),xt})},[pe,T]),$t=a.useMemo(()=>Vh(l),[l]),rt={[`--${l}-divider-width`]:y.scalingValue(m,n??!1),[`--${l}-divider-style`]:x,[`--${l}-icon-max-width`]:y.scalingValue(L,n??!1),...u>0?{[`--${l}-question-min-height`]:y.scalingValue(u,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:$t}}),r.jsx("div",{style:mt,children:r.jsx("div",{className:nt(`${l}-wrapper`,n&&!i&&`${l}-editor`,oe,De),style:{width:y.scalingValue(c,n??!1),maxWidth:"100%",...rt},children:ne.map((Ue,ht)=>{var Tt;const xt=de(ht),dt=((Tt=Ue.question)==null?void 0:Tt.trim())??"",kt=Ue.answer,_t=((kt==null?void 0:kt.length)??0)>0,Qe=d&&ht===_;return r.jsxs("div",{className:nt(`${l}-item`,xt&&`${l}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${l}-question-controls`,children:[Qe&&r.jsxs(r.Fragment,{children:[r.jsx(nn,{"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:`${l}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:he(be),zIndex:2}}),r.jsx(nn,{"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(se),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:he(Ae),height:"100%",zIndex:2}}),r.jsx(nn,{"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(we),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:he(Ie),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":xt,style:{...j,...Ye,paddingLeft:he(N),paddingRight:he($)},onClick:()=>ot(ht),children:[ue>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:he(ue)},"aria-hidden":"true"}),r.jsxs("span",{className:`${l}-question-row`,children:[r.jsx("span",{className:Me,children:dt}),_t&&(re?r.jsx("span",{className:`${l}-icon ${l}-icon-custom ${ie}`,"aria-hidden":"true",children:r.jsx(rn,{url:z,fill:E,hoverFill:I,className:`${l}-icon-image`})}):r.jsx("span",{className:`${l}-icon ${l}-icon-default ${ie}`,"aria-hidden":"true"}))]}),v>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:he(v)},"aria-hidden":"true"})]}),Qe&&r.jsx(nn,{"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:`${l}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:he(We),zIndex:2}})]}),_t&&kt&&r.jsx("div",{className:`${l}-panel`,"aria-hidden":!xt,children:r.jsx("div",{className:`${l}-panel-inner`,children:r.jsxs("div",{className:`${l}-answer-controls`,children:[Qe&&xt&&r.jsxs(r.Fragment,{children:[r.jsx(nn,{"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:`${l}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:he(xe),zIndex:2}}),r.jsx(nn,{"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(fe),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:he(Q),height:"100%",zIndex:2}}),r.jsx(nn,{"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(Se),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:he(le),height:"100%",zIndex:2}})]}),ce>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:he(ce)}}),r.jsx("div",{className:`${l}-answer`,style:{...Ne,...lt,paddingLeft:he(ye),paddingRight:he(Z)},children:r.jsx("div",{className:et,children:r.jsx(mi,{content:kt})})}),$e>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:he($e)}}),Qe&&xt&&r.jsx(nn,{"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:`${l}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:he(O),zIndex:2}})]})})})]},ht)})})})]})}const qh=`import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
12023
|
+
`}function qs(e,t,n,i,o,s,l,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:s??0,textAppearance:l,color:d??"#000000"}}function zh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:l}=y.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:m=694e-6,dividerStyle:x="solid",entryHoverEffect:b="default",autoclose:T="off",icon:f,iconMaxWidth:L=.00833,iconPaddingRight:$=0,iconAnimation:R="rotate 45",questionColor:A="#000000",answerColor:C="#000000",dividerColor:U="#0000001F",iconColor:E="#000000",questionHoverColor:O="#666666",iconHoverColor:I="#666666",iconActiveColor:w="#000000",dividerHoverColor:F="#000000",questionFontFamily:h,questionFontSettings:S,questionFontSize:M,questionLineHeight:z,questionLetterSpacing:K,questionWordSpacing:se,questionTextAppearance:Y,answerFontFamily:D,answerFontSettings:N,answerFontSize:W,answerLineHeight:P,answerLetterSpacing:q,answerWordSpacing:G,answerTextAppearance:Z,questionPaddingLeft:_=0,questionPaddingTop:me=0,questionPaddingBottom:v=0,answerPaddingLeft:fe=0,answerPaddingRight:J=0,answerPaddingTop:ce=0,answerPaddingBottom:Ce=0}=e,oe=t??[],[xe,Q]=a.useState(()=>new Set),ye=!n||i;a.useEffect(()=>{Q(new Set)},[T]),a.useEffect(()=>{n&&!o&&!i&&Q(new Set)},[n,o,i]);const ve=Ke=>y.scalingValue(Ke,n??!1),Me=Math.max(_,_n),we=Math.max(me,_n),Ae=Math.max(v,_n),X=Math.max(fe,_n),ue=Math.max(J,_n),Se=Math.max(ce,_n),j=Math.max(Ce,_n),de=Math.max(0,(c??1)-$-L),H=Math.max(0,(c??1)-J),re=Math.max(0,(c??1)-fe),ae=Math.max($,_n),ne=Math.max(0,(c??1)-_-L),ie=a.useMemo(()=>xe.size===0?0:Math.min(...xe),[xe]),be=a.useCallback(Ke=>xe.has(Ke),[xe]),Te=ye&&b==="default"?`${l}-entry-hover-default`:"",ee=f??"",pe=ee!=="",Pe=R.replace(/^rotate /,""),le=`${l}-icon-anim-${Pe}`,V=cn(Xt(qs(h,S,M,z,K,se,Y,A),n)),He=cn(Xt(qs(D,N,W,P,q,G,Z,C),n)),Fe=Vs(M,z,`${l}-question`,`${l}-text-tight-leading`),Qe=Vs(W,P,`${l}-answer-text`,`${l}-text-tight-leading`),Xe=Gs(M,z,l,n),lt=Gs(W,P,l,n),pt=y.buildColorVars(l,{questionColor:A,answerColor:C,dividerColor:U,iconColor:E,questionHoverColor:O,iconHoverColor:I,iconActiveColor:w,dividerHoverColor:F},Nh,Hh),Be=s&&s!=="default"?`${l}-state-${s}`:"",rt=a.useCallback(Ke=>{ye&&Q(gt=>{if(gt.has(Ke)){const mt=new Set(gt);return mt.delete(Ke),mt}if(T==="on")return new Set([Ke]);const bt=new Set(gt);return bt.add(Ke),bt})},[ye,T]),Tt=a.useMemo(()=>jh(l),[l]),at={[`--${l}-divider-width`]:y.scalingValue(m,n??!1),[`--${l}-divider-style`]:x,[`--${l}-icon-max-width`]:y.scalingValue(L,n??!1),...u>0?{[`--${l}-question-min-height`]:y.scalingValue(u,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Tt}}),r.jsx("div",{style:pt,children:r.jsx("div",{className:nt(`${l}-wrapper`,n&&!i&&`${l}-editor`,Te,Be),style:{width:y.scalingValue(c,n??!1),maxWidth:"100%",...at},children:oe.map((Ke,gt)=>{var St;const bt=be(gt),mt=((St=Ke.question)==null?void 0:St.trim())??"",kt=Ke.answer,Wt=((kt==null?void 0:kt.length)??0)>0,et=d&>===ie;return r.jsxs("div",{className:nt(`${l}-item`,bt&&`${l}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${l}-question-controls`,children:[et&&r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":"questionPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:ve(we)}}),r.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(de),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:ve(Me),height:"100%"}}),r.jsx("div",{"data-controls":"iconPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ne),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:ve(ae),height:"100%"}})]}),r.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":bt,style:{...V,...Xe,paddingLeft:ve(_),paddingRight:ve($)},onClick:()=>rt(gt),children:[me>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:ve(me)},"aria-hidden":"true"}),r.jsxs("span",{className:`${l}-question-row`,children:[r.jsx("span",{className:Fe,children:mt}),Wt&&(pe?r.jsx("span",{className:`${l}-icon ${l}-icon-custom ${le}`,"aria-hidden":"true",children:r.jsx(on,{url:ee,fill:E,hoverFill:I,className:`${l}-icon-image`})}):r.jsx("span",{className:`${l}-icon ${l}-icon-default ${le}`,"aria-hidden":"true"}))]}),v>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:ve(v)},"aria-hidden":"true"})]}),et&&r.jsx("div",{"data-controls":"questionPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:ve(Ae)}})]}),Wt&&kt&&r.jsx("div",{className:`${l}-panel`,"aria-hidden":!bt,children:r.jsx("div",{className:`${l}-panel-inner`,children:r.jsxs("div",{className:`${l}-answer-controls`,children:[et&&bt&&r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":"answerPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:ve(Se)}}),r.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(H),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:ve(X),height:"100%"}}),r.jsx("div",{"data-controls":"answerPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(re),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:ve(ue),height:"100%"}})]}),ce>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:ve(ce)}}),r.jsx("div",{className:`${l}-answer`,style:{...He,...lt,paddingLeft:ve(fe),paddingRight:ve(J)},children:r.jsx("div",{className:Qe,children:r.jsx(pi,{content:kt})})}),Ce>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:ve(Ce)}}),et&&bt&&r.jsx("div",{"data-controls":"answerPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:ve(j)}})]})})})]},gt)})})})]})}const Bh=`import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
12243
12024
|
import cn from 'classnames';
|
|
12244
12025
|
import { CommonComponentProps } from '../props';
|
|
12245
12026
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
|
|
12246
12027
|
import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
|
|
12247
12028
|
import { SvgImage } from '../helpers/SvgImage/SvgImage';
|
|
12248
12029
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
12249
|
-
import { PaddingControl } from '../helpers/PaddingControl/PaddingControl';
|
|
12250
12030
|
|
|
12251
12031
|
type FAQContentItem = {
|
|
12252
12032
|
question?: string;
|
|
@@ -12525,40 +12305,10 @@ function getCSS(P: string): string {
|
|
|
12525
12305
|
.\${P}-answer-controls {
|
|
12526
12306
|
position: relative;
|
|
12527
12307
|
}
|
|
12528
|
-
.\${P}-
|
|
12529
|
-
background: transparent;
|
|
12530
|
-
}
|
|
12531
|
-
.\${P}-padding-control-handle[data-controls-axis="x"][data-controls-variant="column-padding"]::after {
|
|
12532
|
-
content: '';
|
|
12533
|
-
position: absolute;
|
|
12534
|
-
top: 50%;
|
|
12535
|
-
left: 50%;
|
|
12536
|
-
transform: translate(-50%, -50%);
|
|
12537
|
-
width: 4px;
|
|
12538
|
-
height: 12px;
|
|
12539
|
-
background: #FF5C02;
|
|
12540
|
-
border: 1px solid #FFFFFF;
|
|
12541
|
-
border-radius: 5px;
|
|
12542
|
-
box-sizing: border-box;
|
|
12543
|
-
pointer-events: none;
|
|
12544
|
-
}
|
|
12545
|
-
.\${P}-padding-control-handle[data-controls-axis="y"]::after {
|
|
12546
|
-
content: '';
|
|
12308
|
+
.\${P}-control-anchor {
|
|
12547
12309
|
position: absolute;
|
|
12548
|
-
top: 50%;
|
|
12549
|
-
left: 50%;
|
|
12550
|
-
transform: translate(-50%, -50%);
|
|
12551
|
-
width: 12px;
|
|
12552
|
-
height: 4px;
|
|
12553
|
-
background: #FF5C02;
|
|
12554
|
-
border: 1px solid #FFFFFF;
|
|
12555
|
-
border-radius: 5px;
|
|
12556
|
-
box-sizing: border-box;
|
|
12557
12310
|
pointer-events: none;
|
|
12558
|
-
|
|
12559
|
-
.\${P}-padding-control-handle[data-controls-variant="row-padding"][data-controls-axis="y"]::after {
|
|
12560
|
-
left: 20px;
|
|
12561
|
-
transform: translateY(-50%);
|
|
12311
|
+
z-index: 2;
|
|
12562
12312
|
}
|
|
12563
12313
|
\`;
|
|
12564
12314
|
}
|
|
@@ -12794,59 +12544,52 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
12794
12544
|
<div className={\`\${P}-question-controls\`}>
|
|
12795
12545
|
{showPaddingControls && (
|
|
12796
12546
|
<>
|
|
12797
|
-
<
|
|
12547
|
+
<div
|
|
12798
12548
|
data-controls="questionPaddingTop"
|
|
12799
|
-
data-controls-static-handle=""
|
|
12800
|
-
data-controls-handle-left="20"
|
|
12801
12549
|
data-controls-axis="y"
|
|
12802
12550
|
data-controls-variant="row-padding"
|
|
12803
12551
|
data-controls-min="0"
|
|
12804
|
-
|
|
12805
|
-
|
|
12806
|
-
|
|
12807
|
-
|
|
12552
|
+
data-controls-center-only-drag=""
|
|
12553
|
+
data-controls-hit-placement="left-y"
|
|
12554
|
+
className={\`\${P}-control-anchor\`}
|
|
12555
|
+
style={{
|
|
12808
12556
|
top: 0,
|
|
12809
12557
|
left: 0,
|
|
12810
12558
|
width: '100%',
|
|
12811
12559
|
height: scaled(questionPaddingTopHeight),
|
|
12812
|
-
zIndex: 2,
|
|
12813
12560
|
}}
|
|
12814
12561
|
/>
|
|
12815
|
-
<
|
|
12562
|
+
<div
|
|
12816
12563
|
data-controls="questionPaddingLeft"
|
|
12817
|
-
data-controls-static-handle=""
|
|
12818
12564
|
data-controls-axis="x"
|
|
12819
12565
|
data-controls-variant="column-padding"
|
|
12820
12566
|
data-controls-min="0"
|
|
12821
12567
|
data-controls-max-fraction={String(questionPaddingLeftMaxFraction)}
|
|
12822
|
-
|
|
12823
|
-
|
|
12824
|
-
|
|
12825
|
-
|
|
12568
|
+
data-controls-center-only-drag=""
|
|
12569
|
+
data-controls-hit-placement="center-x"
|
|
12570
|
+
className={\`\${P}-control-anchor\`}
|
|
12571
|
+
style={{
|
|
12826
12572
|
top: 0,
|
|
12827
12573
|
left: 0,
|
|
12828
12574
|
width: scaled(questionPaddingLeftWidth),
|
|
12829
12575
|
height: '100%',
|
|
12830
|
-
zIndex: 2,
|
|
12831
12576
|
}}
|
|
12832
12577
|
/>
|
|
12833
|
-
<
|
|
12578
|
+
<div
|
|
12834
12579
|
data-controls="iconPaddingRight"
|
|
12835
|
-
data-controls-static-handle=""
|
|
12836
12580
|
data-controls-axis="x"
|
|
12837
12581
|
data-controls-variant="column-padding"
|
|
12838
12582
|
data-controls-reverse=""
|
|
12839
12583
|
data-controls-min="0"
|
|
12840
12584
|
data-controls-max-fraction={String(iconPaddingRightMaxFraction)}
|
|
12841
|
-
|
|
12842
|
-
|
|
12843
|
-
|
|
12844
|
-
|
|
12585
|
+
data-controls-center-only-drag=""
|
|
12586
|
+
data-controls-hit-placement="center-x"
|
|
12587
|
+
className={\`\${P}-control-anchor\`}
|
|
12588
|
+
style={{
|
|
12845
12589
|
top: 0,
|
|
12846
12590
|
right: 0,
|
|
12847
12591
|
width: scaled(iconPaddingRightWidth),
|
|
12848
12592
|
height: '100%',
|
|
12849
|
-
zIndex: 2,
|
|
12850
12593
|
}}
|
|
12851
12594
|
/>
|
|
12852
12595
|
</>
|
|
@@ -12896,22 +12639,19 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
12896
12639
|
)}
|
|
12897
12640
|
</button>
|
|
12898
12641
|
{showPaddingControls && (
|
|
12899
|
-
<
|
|
12642
|
+
<div
|
|
12900
12643
|
data-controls="questionPaddingBottom"
|
|
12901
|
-
data-controls-static-handle=""
|
|
12902
|
-
data-controls-handle-left="20"
|
|
12903
12644
|
data-controls-axis="y"
|
|
12904
12645
|
data-controls-variant="row-padding"
|
|
12905
12646
|
data-controls-min="0"
|
|
12906
|
-
|
|
12907
|
-
|
|
12908
|
-
|
|
12909
|
-
|
|
12647
|
+
data-controls-center-only-drag=""
|
|
12648
|
+
data-controls-hit-placement="left-y"
|
|
12649
|
+
className={\`\${P}-control-anchor\`}
|
|
12650
|
+
style={{
|
|
12910
12651
|
bottom: 0,
|
|
12911
12652
|
left: 0,
|
|
12912
12653
|
width: '100%',
|
|
12913
12654
|
height: scaled(questionPaddingBottomHeight),
|
|
12914
|
-
zIndex: 2,
|
|
12915
12655
|
}}
|
|
12916
12656
|
/>
|
|
12917
12657
|
)}
|
|
@@ -12922,59 +12662,52 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
12922
12662
|
<div className={\`\${P}-answer-controls\`}>
|
|
12923
12663
|
{showPaddingControls && isOpen && (
|
|
12924
12664
|
<>
|
|
12925
|
-
<
|
|
12665
|
+
<div
|
|
12926
12666
|
data-controls="answerPaddingTop"
|
|
12927
|
-
data-controls-static-handle=""
|
|
12928
|
-
data-controls-handle-left="20"
|
|
12929
12667
|
data-controls-axis="y"
|
|
12930
12668
|
data-controls-variant="row-padding"
|
|
12931
12669
|
data-controls-min="0"
|
|
12932
|
-
|
|
12933
|
-
|
|
12934
|
-
|
|
12935
|
-
|
|
12670
|
+
data-controls-center-only-drag=""
|
|
12671
|
+
data-controls-hit-placement="left-y"
|
|
12672
|
+
className={\`\${P}-control-anchor\`}
|
|
12673
|
+
style={{
|
|
12936
12674
|
top: 0,
|
|
12937
12675
|
left: 0,
|
|
12938
12676
|
width: '100%',
|
|
12939
12677
|
height: scaled(answerPaddingTopHeight),
|
|
12940
|
-
zIndex: 2,
|
|
12941
12678
|
}}
|
|
12942
12679
|
/>
|
|
12943
|
-
<
|
|
12680
|
+
<div
|
|
12944
12681
|
data-controls="answerPaddingLeft"
|
|
12945
|
-
data-controls-static-handle=""
|
|
12946
12682
|
data-controls-axis="x"
|
|
12947
12683
|
data-controls-variant="column-padding"
|
|
12948
12684
|
data-controls-min="0"
|
|
12949
12685
|
data-controls-max-fraction={String(answerPaddingLeftMaxFraction)}
|
|
12950
|
-
|
|
12951
|
-
|
|
12952
|
-
|
|
12953
|
-
|
|
12686
|
+
data-controls-center-only-drag=""
|
|
12687
|
+
data-controls-hit-placement="center-x"
|
|
12688
|
+
className={\`\${P}-control-anchor\`}
|
|
12689
|
+
style={{
|
|
12954
12690
|
top: 0,
|
|
12955
12691
|
left: 0,
|
|
12956
12692
|
width: scaled(answerPaddingLeftWidth),
|
|
12957
12693
|
height: '100%',
|
|
12958
|
-
zIndex: 2,
|
|
12959
12694
|
}}
|
|
12960
12695
|
/>
|
|
12961
|
-
<
|
|
12696
|
+
<div
|
|
12962
12697
|
data-controls="answerPaddingRight"
|
|
12963
|
-
data-controls-static-handle=""
|
|
12964
12698
|
data-controls-axis="x"
|
|
12965
12699
|
data-controls-variant="column-padding"
|
|
12966
12700
|
data-controls-reverse=""
|
|
12967
12701
|
data-controls-min="0"
|
|
12968
12702
|
data-controls-max-fraction={String(answerPaddingRightMaxFraction)}
|
|
12969
|
-
|
|
12970
|
-
|
|
12971
|
-
|
|
12972
|
-
|
|
12703
|
+
data-controls-center-only-drag=""
|
|
12704
|
+
data-controls-hit-placement="center-x"
|
|
12705
|
+
className={\`\${P}-control-anchor\`}
|
|
12706
|
+
style={{
|
|
12973
12707
|
top: 0,
|
|
12974
12708
|
right: 0,
|
|
12975
12709
|
width: scaled(answerPaddingRightWidth),
|
|
12976
12710
|
height: '100%',
|
|
12977
|
-
zIndex: 2,
|
|
12978
12711
|
}}
|
|
12979
12712
|
/>
|
|
12980
12713
|
</>
|
|
@@ -13005,22 +12738,19 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
13005
12738
|
/>
|
|
13006
12739
|
)}
|
|
13007
12740
|
{showPaddingControls && isOpen && (
|
|
13008
|
-
<
|
|
12741
|
+
<div
|
|
13009
12742
|
data-controls="answerPaddingBottom"
|
|
13010
|
-
data-controls-static-handle=""
|
|
13011
|
-
data-controls-handle-left="20"
|
|
13012
12743
|
data-controls-axis="y"
|
|
13013
12744
|
data-controls-variant="row-padding"
|
|
13014
12745
|
data-controls-min="0"
|
|
13015
|
-
|
|
13016
|
-
|
|
13017
|
-
|
|
13018
|
-
|
|
12746
|
+
data-controls-center-only-drag=""
|
|
12747
|
+
data-controls-hit-placement="left-y"
|
|
12748
|
+
className={\`\${P}-control-anchor\`}
|
|
12749
|
+
style={{
|
|
13019
12750
|
bottom: 0,
|
|
13020
12751
|
left: 0,
|
|
13021
12752
|
width: '100%',
|
|
13022
12753
|
height: scaled(answerPaddingBottomHeight),
|
|
13023
|
-
zIndex: 2,
|
|
13024
12754
|
}}
|
|
13025
12755
|
/>
|
|
13026
12756
|
)}
|
|
@@ -13036,7 +12766,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
13036
12766
|
</>
|
|
13037
12767
|
);
|
|
13038
12768
|
}
|
|
13039
|
-
`;function Hn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Us={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Kh=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Uh={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",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",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:Hn("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:{...Us.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:{...Us.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:Hn("Question Padding Left"),questionPaddingTop:Hn("Question Padding Top"),questionPaddingBottom:Hn("Question Padding Bottom"),answerPaddingLeft:Hn("Answer Padding Left"),answerPaddingRight:Hn("Answer Padding Right"),answerPaddingTop:Hn("Answer Padding Top"),answerPaddingBottom:Hn("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:[...Kh],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Xh={element:Gh,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"}]},fontSettingsPaths:{content:[],parameters:[{path:"questionFontFamily"},{path:"answerFontFamily"}]},fontRelations:{questionFontSettings:"questionFontFamily",answerFontSettings:"answerFontFamily"},schema:Uh,sourceCode:qh},Fn=e=>e.display==="cover",Lr=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Xs=100,Yh=.2,Ys=8,pc=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=a.useState(0),[l,d]=a.useState(!1),c=a.useRef(null),u=a.useRef(0);u.current=o;const m=a.useMemo(()=>typeof window>"u"?Xs:Math.max(Xs,window.innerHeight*Yh),[]),x=a.useCallback(h=>Math.max(0,1-h/(m*1.5)),[m]),b=a.useCallback(h=>Math.max(0,1-h/(m*.45)),[m]),T=a.useCallback(h=>{const S=typeof window<"u"?window.innerHeight:800,k=Math.max(.88,1-h/S*.12);return`translateY(${h}px) scale(${k})`},[]),f=a.useCallback(()=>{c.current=null},[]),L=a.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),f()},[n,f]),$=a.useCallback(()=>{const h=typeof window<"u"?window.innerHeight:800;d(!0),s(h),window.setTimeout(()=>{t(),f(),d(!1)},Math.min(n,200))},[n,t,f]),R=a.useCallback(h=>{!e||l||h.pointerType==="touch"&&(i!=null&&i(h.target)||(c.current={startX:h.clientX,startY:h.clientY,isLocked:null,pointerId:h.pointerId}))},[e,l,i]),P=a.useCallback(h=>{const S=c.current;if(!e||!S||h.pointerType!=="touch"||S.pointerId!==h.pointerId)return;const k=h.clientX-S.startX,D=h.clientY-S.startY;if(S.isLocked===null){if(Math.abs(k)<Ys&&Math.abs(D)<Ys)return;if(D>0&&D>Math.abs(k))S.isLocked=!0,h.currentTarget.setPointerCapture(h.pointerId);else{S.isLocked=!1,f();return}}if(!S.isLocked)return;h.preventDefault();const U=Math.max(0,D);u.current=U,s(U)},[e,f]),C=a.useCallback(h=>{const S=c.current;if(!e||!S||h.pointerType!=="touch"||S.pointerId!==h.pointerId)return;const k=S.isLocked===!0;if(h.currentTarget.hasPointerCapture(h.pointerId)&&h.currentTarget.releasePointerCapture(h.pointerId),!k){f();return}h.clientY-S.startY>=m?$():L()},[m,$,e,f,L]),X=a.useCallback(h=>{C(h)},[C]),E=a.useCallback(h=>{C(h)},[C]),B=o>0,I=l?`transform ${n}ms ease`:"none",w=l?`opacity ${n}ms ease`:"none",W=o>0||l;return{isSwipeDragging:B,backdropStyle:{opacity:x(o),transition:w},mediaAreaStyle:{transform:T(o),transition:I,touchAction:B?"none":void 0,willChange:B?"transform":void 0},overlayContentStyle:W?{opacity:b(o),transition:w}:void 0,swipeHandlers:e?{onPointerDown:R,onPointerMove:P,onPointerUp:X,onPointerCancel:E}:{},dismissAreaStyle:e?{touchAction:B?"none":"pan-x"}:void 0}},Zh="[data-lightbox-scrollable]",mc=()=>{a.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const l=d=>{const c=d.target;c instanceof Element&&c.closest(Zh)||d.preventDefault()};return document.addEventListener("touchmove",l,{passive:!1}),()=>{document.removeEventListener("touchmove",l),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo({top:e,left:0,behavior:"instant"})}},[])},Jh=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Qh=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},ef=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},tf=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(f,L)=>{Qh(t),e.scrollLeft=f,L&&(s==null||s())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let m=!1,x=0;const b=()=>{t.removeEventListener("transitionend",T),clearTimeout(x)},T=f=>{f.target!==t||f.propertyName!=="transform"||m||(m=!0,b(),u(n,!0))};return t.addEventListener("transitionend",T),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${c}px, 0, 0)`,x=window.setTimeout(()=>{m||(m=!0,b(),u(n,!0))},i+64),()=>{m||(m=!0,b(),u(l-ef(t),!1))}},io=300,nf=900,of=1500,rf="cubic-bezier(0.16, 1, 0.3, 1)",af=3e3,sf=2,lf=16,cf=.05,df=1,Oo=.3,uf=50,pf=20,xi=.004,Hi=["title1","title2","title3"],mf={title1:"1",title2:"2",title3:"3"},gf={title1:"title1Color",title2:"title2Color",title3:"title3Color"},hf={title1:.02,title2:.02,title3:.02},zo=e=>`max(${e}, ${pf}px)`,ff=e=>{if(!Array.isArray(e)||e.length===0)return{};const t=e.find(o=>(o==null?void 0:o.type)==="paragraph")??e[0],n=t==null?void 0:t.children;if(!Array.isArray(n))return{};const i=n.map(o=>typeof(o==null?void 0:o.text)=="string"?o.text.trim():"").filter(Boolean);return{title1:i[0],title2:i[1],title3:i[2]}},yf=e=>{if(!e)return{title1:"",title2:"",title3:""};if(e.title1||e.title2||e.title3)return{title1:e.title1??"",title2:e.title2??"",title3:e.title3??""};const t=ff(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Ht=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,vf=e=>[Ht(e,"fontFamily"),Ht(e,"fontSettings"),{type:"row",items:[Ht(e,"fontSize"),Ht(e,"lineHeight"),Ht(e,"letterSpacing"),Ht(e,"wordSpacing")]},Ht(e,"textAlign"),Ht(e,"textAppearance")],xf=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Hi.map(e=>[mf[e],vf(e)]))}),Ua=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},gc=(e,t)=>Ua(e,t),Bo=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Zs=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ua(e.length,n),effective:gc(e.length,n)}},bf=(e,t,n,i,o,s,l)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),d},Xr=(e,t)=>{const n=i=>{const o=Ht(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[gf[t]]}},wf=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Yr=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??hf[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)},Sf=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:m,imageGap:x,closeIcon:b,closeIconMaxWidth:T,closeIconColor:f,closeIconHoverColor:L,thumbnailTrigger:$,thumbnailVisibility:R,thumbnailObjectFit:P,thumbnailActive:C,thumbnailActiveColor:X,title1Width:E,title2Width:B,title3Width:I,title1MarginLeft:w=0,title2MarginLeft:W=0,title3MarginLeft:h=0,titleRowMarginBottom:S=0,titleHeaderLayout:k="desktop",contentMarginTop:D,iconMarginLeft:U}=n,ae=p=>y.scalingValue(p,i??!1),Y=c??n.thumnailSize??.03,G=ae(Y),H=ae(u),F=ae(m??.02),A=ae(x??0),K=ae(D??0),q=zo(K),ee=ae(U??0),[N,ue]=a.useState(0),v=a.useRef(N);v.current=N;const ye=t[N],{title1:Z,title2:ce,title3:$e}=yf(ye),ne=Yr("title1",Xr(n,"title1"),i),ve=Yr("title2",Xr(n,"title2"),i),J=Yr("title3",Xr(n,"title3"),i),pe=k==="mobile",he=!o&&(!i||s),Ae=he,be=he,We=he,Q=Fn(P),le=Q?{"--image-aspect-ratio":Lr(P)}:void 0,xe=!!(Z||ce||$e),O=a.useMemo(()=>bf(e,Z,ce,$e,ne,ve,J),[e,N,Z,ce,$e,ne,ve,J]),se=a.useMemo(()=>({title1Width:E,title2Width:B,title3Width:I}),[E,B,I]),fe=a.useMemo(()=>O.map(p=>se[p.widthKey]),[O,se]),Se=a.useMemo(()=>Ua(O.length,fe),[O.length,fe]),Ie=a.useMemo(()=>gc(O.length,fe),[O.length,fe]),we=a.useMemo(()=>O.filter(p=>p.prefix==="title1"),[O]),_=a.useMemo(()=>O.filter(p=>p.prefix==="title2"||p.prefix==="title3"),[O]),de=a.useMemo(()=>Zs(we,se),[we,se]),oe=a.useMemo(()=>Zs(_,se),[_,se]),z=a.useCallback((p,M)=>{const V=O.indexOf(p);if(!pe||M==="single-row")return{effectiveWidth:Ie[V]??0,resolvedWidth:Se[V]??0,maxWidth:Bo(V,Se)};if(M==="two-row-top"){const Te=we.indexOf(p);return{effectiveWidth:de.effective[Te]??0,resolvedWidth:de.resolved[Te]??0,maxWidth:Bo(Te,de.resolved)}}const ge=_.indexOf(p);return{effectiveWidth:oe.effective[ge]??0,resolvedWidth:oe.resolved[ge]??0,maxWidth:Bo(ge,oe.resolved)}},[_,oe,Ie,Se,O,we,de,pe]),re=a.useCallback(p=>y.scalingValue(p,i??!1),[i]),ke=re(S??0),ie=a.useMemo(()=>({title1MarginLeft:w,title2MarginLeft:W,title3MarginLeft:h}),[w,W,h]),j=a.useCallback(p=>O.slice(0,p+1).reduce((M,V,ge)=>M+(V!=null&&V.marginLeftKey?ie[V.marginLeftKey]??0:0)+(Se[ge]??0),0)+(pe?0:w??0),[O,ie,Se,pe,w]),Ne=a.useCallback(()=>pe?0:w??0,[pe,w]),Me=a.useCallback(p=>_.slice(0,p).reduce((M,V,ge)=>M+(V.marginLeftKey?ie[V.marginLeftKey]??0:0)+(oe.resolved[ge]??0),0),[_,oe.resolved,ie]),et=a.useCallback(p=>{const M=_[p];return Me(p)+(M.marginLeftKey?ie[M.marginLeftKey]??0:0)+(oe.resolved[p]??0)},[_,oe.resolved,Me,ie]),Ye=(p,M)=>{const V=p.marginLeftKey?ie[p.marginLeftKey]??0:0,{effectiveWidth:ge,resolvedWidth:Te,maxWidth:je}=z(p,M),at=o&&M==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":p.prefix,style:{...M==="single-row"?{gridArea:p.prefix}:{},width:re(ge),...V>0?{marginLeft:re(V)}:{}},children:[r.jsx("p",{className:p.className,style:p.style,children:p.text}),at&&p.marginLeftKey&&r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Te),style:{position:"absolute",top:0,left:re(-V),width:`max(${re(V)}, 10px)`,height:"100%",pointerEvents:"auto"}}),at&&r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(je),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:re(-xi/2),width:re(xi),height:"100%",pointerEvents:"auto"}})]},p.className)},lt=()=>{const p=pe?-1:O.findIndex(ge=>ge.prefix==="title1"),M=!pe&&(o||(w??0)>0)?(()=>{const ge=w??0,Te=p>=0?Se[p]:E??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Te),style:{position:"absolute",top:0,left:0,width:`max(${re(ge)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,V=O.flatMap((ge,Te)=>{if(!ge.marginLeftKey)return[];const je=ie[ge.marginLeftKey]??0,at=wf(O,Se,ie,Te)+Ne();return r.jsx("div",{"data-controls":ge.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Se[Te]),style:{position:"absolute",top:0,left:re(at),width:`max(${re(je)}, 10px)`,height:"100%",pointerEvents:"auto"}},ge.marginLeftKey)});return M?[M,...V]:V},mt=()=>O.map((p,M)=>{const V=Bo(M,Se),Te=j(M)-xi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(V),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:re(Te),width:re(xi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),De=()=>_.flatMap((p,M)=>{if(!p.marginLeftKey)return[];const V=ie[p.marginLeftKey]??0,ge=Me(M),{resolvedWidth:Te}=z(p,"two-row-bottom");return r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Te),style:{position:"absolute",top:0,left:re(ge),width:`max(${re(V)}, 10px)`,height:"100%",pointerEvents:"auto"}},p.marginLeftKey)}),ot=()=>_.map((p,M)=>{const{maxWidth:V}=z(p,"two-row-bottom"),Te=et(M)-xi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(V),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:re(Te),width:re(xi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),$t=a.useRef(null),rt=a.useRef(null),Ue=a.useRef(null),ht=a.useRef(null),xt=a.useRef([]),dt=a.useRef([]),kt=a.useRef(0),_t=a.useRef(null),Qe=a.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Tt=a.useRef(null),Lt=a.useRef(null),Ge=a.useRef(0),qe=a.useRef("forward"),Pe=a.useRef(0),gt=a.useRef(null),It=a.useRef(!1),Mt=t.length>1&&(!o||!!s),Dt=Mt?3:1,en=a.useMemo(()=>Array.from({length:Dt},()=>t).flat(),[t,Dt]),[on,bt]=a.useState(!1),[Rt,Ut]=a.useState(!1),[Kt,ft]=a.useState(!0),Jt=a.useRef(null),Ce=a.useRef(null),Oe=a.useRef(!1),Ke=a.useRef(!1),He=a.useRef(null),ze=a.useRef(null),ut=Ae&&!Kt,_e=a.useCallback(()=>{Ae&&(ft(!0),ze.current&&clearTimeout(ze.current),ze.current=setTimeout(()=>{Qe.current.isActive||ft(!1)},af))},[Ae]),Je=a.useCallback(()=>{o||Ke.current||(Ke.current=!0,Ut(!1),He.current=setTimeout(()=>{l()},io))},[o,l]),tt=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":ut?"true":"false",style:{width:y.scalingValue(T??0,i),height:y.scalingValue(T??0,i),marginRight:ee,"--close-icon-hover-color":L},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Je,"aria-label":"Close",children:r.jsx(rn,{url:b,fill:f,hoverFill:i&&!s?f:L,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:ee,height:"100%",pointerEvents:"auto"}})]}),Wt=(p="two-row")=>r.jsx("div",{...p==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:re(w??0),flexShrink:0,...p==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...p==="two-row"&&o?{pointerEvents:"auto"}:{}}}),Ct=()=>{const p=O.find(ge=>ge.prefix==="title1"),M=O.filter(ge=>ge.prefix==="title2"||ge.prefix==="title3"),V=M.length>0||o||(S??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(w??0)>0||o?Wt():null,p&&Ye(p,"two-row-top"),b&&tt()]}),V?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[M.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[M.map(ge=>Ye(ge,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[De(),ot()]})]}):null,r.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:ke,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},st=()=>r.jsxs(r.Fragment,{children:[(w??0)>0||o?Wt("single-row"):null,O.map(p=>Ye(p,"single-row")),o?r.jsxs(r.Fragment,{children:[lt(),mt()]}):null,b?tt():null]}),Nt=a.useCallback(p=>!!(p.closest("[data-controls]")||p.closest(`.${e}-thumbnails`)||p.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:At,backdropStyle:Vt,mediaAreaStyle:zt,overlayContentStyle:Pt,swipeHandlers:Qt,dismissAreaStyle:wt}=pc({enabled:he??!1,onClose:Je,animMs:io,isBlockedTarget:Nt}),Gt=()=>{if(!Mt||t.length===0)return kt.current=0,0;const p=dt.current[0],M=dt.current[t.length];if(!p||!M)return kt.current;const V=M.offsetLeft-p.offsetLeft;return V>0&&(kt.current=V),kt.current},pt=(p=!1)=>{if(!Mt)return;const M=rt.current,V=Gt();!M||V<=0||V<M.clientWidth*.25||(M.scrollLeft<=0?(M.scrollLeft+=V,p&&(Qe.current.scrollLeft+=V),It.current&&(Pe.current+=V)):M.scrollLeft>=V*2&&(M.scrollLeft-=V,p&&(Qe.current.scrollLeft-=V),It.current&&(Pe.current-=V)))},Ft=(p,M=(V=>(V=rt.current)==null?void 0:V.scrollLeft)()??0)=>{if(!Mt)return p;let ge=t.length+p,Te=1/0;for(let je=0;je<Dt;je++){const at=je*t.length+p,yt=dt.current[at];if(!yt)continue;const tn=Math.abs(yt.offsetLeft-M);tn<Te&&(Te=tn,ge=at)}return ge},Bt=p=>{const M=rt.current;return!p||!M?!1:p.offsetWidth>M.clientWidth+1},g=p=>{const M=rt.current;if(!p||!M||!Bt(p))return!1;const V=p.offsetLeft,ge=V+p.offsetWidth;return M.scrollLeft>=V-1&&M.scrollLeft+M.clientWidth<=ge+1},me=(p=(M=>(M=rt.current)==null?void 0:M.scrollLeft)()??0)=>{for(let ge=0;ge<dt.current.length;ge+=1){const Te=dt.current[ge];if(Te&&g(Te))return ge}let V={flatIndex:0,distance:1/0};return dt.current.forEach((ge,Te)=>{if(!ge)return;const je=Math.abs(ge.offsetLeft-p);je<V.distance&&(V={flatIndex:Te,distance:je})}),V.flatIndex},Re=p=>{rt.current&&dt.current.forEach(M=>{M&&(M.style.scrollSnapAlign=Bt(M)&&p==="backward"?"end":"start")})},Le=(p,M,V)=>{const ge=p-M,Te=me(M),je=dt.current[Te];if(g(je))return me(p)%t.length;const at=dt.current[Te+1],yt=je?at?at.offsetLeft-je.offsetLeft:je.offsetWidth:0,tn=yt>0?ge>yt*Oo?1:ge<-yt*Oo?-1:0:0;return tn===0?V:Mt?(V+tn+t.length)%t.length:Math.max(0,Math.min(t.length-1,V+tn))},Ze=a.useCallback((p=!1)=>{if(R!=="on"||o)return;const M=ht.current,V=v.current,ge=xt.current[V];if(!M||!ge||M.scrollWidth<=M.clientWidth)return;const Te=M.scrollLeft,je=Te+M.clientWidth,at=ge.offsetLeft,yt=at+ge.offsetWidth;if(at>=Te&&yt<=je)return;const tn=M.scrollWidth-M.clientWidth;let Yt=Te;if(!p&&Jt.current===null){const yi=xt.current[V-1],qi=xt.current[V+1],Eo=yi?ge.offsetLeft-yi.offsetLeft:qi?qi.offsetLeft-ge.offsetLeft:ge.offsetWidth;yt>je?Yt+=Eo:at<Te&&(Yt-=Eo)}else yt>je?Yt=yt-M.clientWidth:Yt=at;M.scrollLeft=Math.max(0,Math.min(tn,Yt))},[o,R]),Et=a.useCallback((p=!1)=>{p&&(Oe.current=!0),Ce.current===null&&(Ce.current=requestAnimationFrame(()=>{Ce.current=null;const M=Oe.current;Oe.current=!1,Ze(M)}))},[Ze]),Ve=a.useCallback(p=>{if(p===v.current)return;const M=v.current;v.current=p;const V=Math.abs(p-M)>1,ge=Mt&&t.length>1&&(M===t.length-1&&p===0||M===0&&p===t.length-1);ue(p),Et(V||ge)},[t.length,Mt,Et]),it=()=>{if(!rt.current||t.length===0||Jt.current!==null||Qe.current.isActive&&Qe.current.hasMoved)return;const p=rt.current.scrollLeft,M=me(p)%t.length;M!==v.current&&Ve(M)},jt=()=>{Jt.current=null},St=p=>{const M=rt.current;M&&(M.style.scrollSnapType=p?"":"none")},cn=()=>{var p;(p=Lt.current)==null||p.call(Lt),Lt.current=null},un=()=>{gt.current!==null&&(cancelAnimationFrame(gt.current),gt.current=null),It.current=!1},Jn=()=>{const p=rt.current;if(!p){gt.current=null,It.current=!1;return}const M=Pe.current-p.scrollLeft;if(Math.abs(M)<.5){p.scrollLeft=Pe.current,pt(),it(),gt.current=null,It.current=!1;return}p.scrollLeft+=M*cf,pt(),it(),_e(),gt.current=requestAnimationFrame(Jn)},Qn=()=>{const p=Ue.current;p&&(p.style.transition="",p.style.transform="",p.style.willChange="")},To=(p,M,V,ge)=>{Qn(),p.scrollLeft=M,Ge.current=p.scrollLeft,pt(),V!==void 0?(v.current=V,ue(V)):it(),St(!0),ge==null||ge()},Lo=(p,{behavior:M="smooth",activeIndex:V,onComplete:ge}={})=>{const Te=rt.current,je=Ue.current;if(!Te||!je)return;if(un(),cn(),St(!1),M==="auto"){To(Te,p,V,ge);return}const at=Math.abs(p-Te.scrollLeft),yt=Jh(at,nf,of,Te.clientWidth*.55);Lt.current=tf(Te,je,p,{duration:yt,easing:rf,onComplete:()=>{Lt.current=null,To(Te,p,V,ge)}})},Rr=(p="smooth")=>{const M=rt.current;if(!M||t.length===0)return;const V=me()%t.length,ge=Ft(V,M.scrollLeft),Te=dt.current[ge];Te&&Lo(Te.offsetLeft,{behavior:p,activeIndex:V})},Er=(p,M="smooth",V,ge)=>{const Te=rt.current;if(!Te||t.length===0)return;const je=(ge??Te.scrollLeft)-p,at=me(p),yt=dt.current[at];if(g(yt)){St(!0),it();return}const tn=dt.current[at+1],Yt=yt?tn?tn.offsetLeft-yt.offsetLeft:yt.offsetWidth:0;if((Yt>0?je>Yt*Oo?1:je<-Yt*Oo?-1:0:0)!==0){const bc=V??at%t.length,wc=Le(ge??Te.scrollLeft,p,bc);Sn(wc,M);return}const qi=ge??Te.scrollLeft,Eo=me(qi),Xa=dt.current[Eo];if(Xa&&Math.abs(Xa.offsetLeft-qi)<1){St(!0),it();return}Rr("auto")},Sn=(p,M="smooth")=>{const V=rt.current;if(!V||t.length===0)return;const ge=Ft(p,V.scrollLeft),Te=dt.current[ge];Te&&(M==="smooth"?Jt.current=p:Jt.current=null,v.current=p,ue(p),Et(!0),Lo(Te.offsetLeft,{behavior:M,activeIndex:p,onComplete:M==="smooth"?jt:void 0}))},fi=()=>{Tt.current&&(window.removeEventListener("pointerup",Tt.current),window.removeEventListener("pointercancel",Tt.current),Tt.current=null)},Io=(p,M,V,ge,Te)=>{const je=V-p,at=ge-M,yt=Math.abs(je),tn=Math.abs(at);if(yt<uf||yt<=tn)return!1;const Yt=je<0?1:-1,yi=Mt?(Te+Yt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Te+Yt));return yi===Te?!1:(Sn(yi),!0)},ei=p=>{if(!Qe.current.isActive)return;fi();const M=rt.current;if(!M)return;const{scrollLeft:V,startActiveIndex:ge,hasMoved:Te}=Qe.current,je=M.scrollLeft;pt(!0),Qe.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},bt(!1),p!==void 0&&M.hasPointerCapture(p)&&M.releasePointerCapture(p),Te?Er(V,"smooth",ge,je):(St(!0),it()),_e()},Ro=(p,M)=>{const V=_t.current;_t.current=null,V&&(Io(V.startX,V.startY,p,M,V.startActiveIndex),_e())},kr=p=>{if(!be)return;if(p.pointerType==="touch"){if(un(),St(!0),Nt(p.target))return;_t.current={startX:p.clientX,startY:p.clientY,startActiveIndex:v.current};return}if(p.pointerType!=="mouse"||p.button!==0||Nt(p.target))return;const M=rt.current;if(!M)return;un(),cn(),Qn(),Jt.current=null,Qe.current={isActive:!0,startX:p.clientX,scrollLeft:M.scrollLeft,startActiveIndex:v.current,hasMoved:!1},St(!1),_e(),M.setPointerCapture(p.pointerId),fi();const V=ge=>{ge.pointerType==="mouse"&&ei(ge.pointerId)};Tt.current=V,window.addEventListener("pointerup",V),window.addEventListener("pointercancel",V)},Mr=p=>{if(!be||p.pointerType!=="mouse")return;const M=rt.current;if(!M||!Qe.current.isActive)return;if(p.buttons===0){ei(p.pointerId);return}const V=p.clientX-Qe.current.startX;Math.abs(V)>df&&(Qe.current.hasMoved=!0,bt(!0)),Qe.current.hasMoved&&(p.preventDefault(),M.scrollLeft=Qe.current.scrollLeft-V,pt(!0),it(),_e())},te=p=>{if(be){if(p.pointerType==="touch"){p.type==="pointerup"?Ro(p.clientX,p.clientY):_t.current=null;return}p.pointerType==="mouse"&&ei(p.pointerId)}},Ee=p=>{!be||p.pointerType!=="mouse"||ei(p.pointerId)};return mc(),a.useEffect(()=>{const p=requestAnimationFrame(()=>Ut(!0));return()=>{cancelAnimationFrame(p),cn(),fi(),Ce.current!==null&&(cancelAnimationFrame(Ce.current),Ce.current=null),He.current&&clearTimeout(He.current),ze.current&&clearTimeout(ze.current)}},[]),a.useEffect(()=>{if(!Ae){ft(!0);return}_e();const p=$t.current;if(!p)return;const M=()=>_e();return p.addEventListener("pointermove",M),p.addEventListener("pointerdown",M),()=>{p.removeEventListener("pointermove",M),p.removeEventListener("pointerdown",M),ze.current&&clearTimeout(ze.current)}},[Ae,_e]),a.useEffect(()=>{const p=M=>{M.key==="Escape"&&Je()};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[Je]),a.useLayoutEffect(()=>{Gt()},[A,t.length,Mt]),a.useLayoutEffect(()=>{o||Sn(v.current,"auto")},[A,o]),a.useLayoutEffect(()=>{Sn(0,"auto")},[t.length,Mt]),a.useEffect(()=>{const p=rt.current;if(!p||o||!he)return;const M=V=>{if(V.preventDefault(),Math.abs(V.deltaY)<=Math.abs(V.deltaX))return;const ge=V.deltaMode===1?lf:V.deltaMode===2?p.clientHeight:1,Te=V.deltaY*ge*sf;if(Te!==0){if(cn(),It.current||(It.current=!0,Pe.current=p.scrollLeft,Jt.current=null,St(!1)),Pe.current+=Te,!Mt){const je=p.scrollWidth-p.clientWidth;Pe.current=Math.max(0,Math.min(je,Pe.current))}_e(),gt.current===null&&(gt.current=requestAnimationFrame(Jn))}};return p.addEventListener("wheel",M,{passive:!1}),()=>{p.removeEventListener("wheel",M),un()}},[o,he,Mt]),a.useEffect(()=>{const p=rt.current;if(!p)return;const M=()=>{pt(Qe.current.isActive);const ge=p.scrollLeft,Te=ge-Ge.current;Ge.current=ge;const je=kt.current>0?kt.current*.5:1/0;if(Te!==0&&Math.abs(Te)<je){const at=Te>0?"forward":"backward";at!==qe.current&&(qe.current=at,Re(at))}Qe.current.isActive&&Qe.current.hasMoved||it()};p.addEventListener("scroll",M,{passive:!0});const V=new ResizeObserver(()=>{Gt(),pt(Qe.current.isActive),Re(qe.current),it()});return V.observe(p),()=>{cn(),p.removeEventListener("scroll",M),V.disconnect()}},[t.length,Mt]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{At||Je()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Rt?1:0,transition:`opacity ${io}ms ease`,pointerEvents:Rt?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Vt}}),r.jsxs("div",{ref:$t,className:`${e}-lightbox-dismiss-area`,style:wt,...Qt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:zt,onClick:p=>p.stopPropagation(),children:r.jsx("div",{ref:rt,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":be&&t.length>0?"true":"false","data-mouse-dragging":on?"true":"false",onPointerDown:kr,onPointerMove:Mr,onPointerUp:te,onPointerCancel:te,onLostPointerCapture:Ee,children:r.jsx("div",{ref:Ue,className:`${e}-lightbox-strip-track`,style:{gap:A},children:en.map((p,M)=>{const V=p.image.objectFit??"contain",ge=M%t.length,Te=Math.floor(M/t.length),je=zo(A),at=`calc(-0.5 * (${je} + ${A}))`;return r.jsxs("div",{ref:yt=>dt.current[M]=yt,className:`${e}-strip-item`,style:{height:k==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[r.jsx("img",{src:p.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:V}}),o&&ge<t.length-1&&Te===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:at,width:je,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Te}-${p.image.url}-${ge}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":ut?"true":"false",style:Pt,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:K,flexShrink:0,pointerEvents:"none"},children:o&&r.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:q,pointerEvents:"auto",zIndex:3}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${pe?` ${e}-lightbox-content-area-stacked`:""}`,children:(xe||b)&&r.jsx("div",{className:`${e}-header ${pe?`${e}-header-two-row`:`${e}-header-single-row`}`,children:pe?Ct():xe||b?st():null})})})]}),t.length>1&&R==="on"&&(()=>{const p=zo(F),M=`calc(-0.5 * (${F} + ${p}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:F},children:r.jsx("div",{ref:ht,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:V=>V.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":C,style:{gap:H,"--thumbnail-active-color":X},children:[t.map((V,ge)=>{const Te=zo(H),je=`calc(-0.5 * (${Te} + ${H}))`;return r.jsxs("div",{ref:at=>{xt.current[ge]=at},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":N===ge?"true":"false",onClick:()=>he&&$==="click"&&Sn(ge),onMouseEnter:()=>We&&$==="hover"&&Sn(ge),"aria-label":V.image.name?`View ${V.image.name}`:`View image ${ge+1}`,"aria-current":N===ge?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${Q?` ${e}-thumb-image-cover`:""}`,src:V.image.url,alt:"",draggable:!1,style:{...le,maxWidth:G,maxHeight:G,width:P.display==="cover"?"auto":"100%",height:"auto",objectFit:P.display==="cover"?"cover":"contain"}})}),o&&ge<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:je,width:Te,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${V.image.url}-${ge}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:M,height:p,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function $f(e){return`
|
|
12769
|
+
`;function Nn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ks={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Dh=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Vh={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",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",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:Nn("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:{...Ks.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:{...Ks.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:Nn("Question Padding Left"),questionPaddingTop:Nn("Question Padding Top"),questionPaddingBottom:Nn("Question Padding Bottom"),answerPaddingLeft:Nn("Answer Padding Left"),answerPaddingRight:Nn("Answer Padding Right"),answerPaddingTop:Nn("Answer Padding Top"),answerPaddingBottom:Nn("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:[...Dh],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Gh={element:zh,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"}]},fontSettingsPaths:{content:[],parameters:[{path:"questionFontFamily"},{path:"answerFontFamily"}]},fontRelations:{questionFontSettings:"questionFontFamily",answerFontSettings:"answerFontFamily"},schema:Vh,sourceCode:Bh},Pn=e=>e.display==="cover",Tr=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Us=100,qh=.2,Xs=8,uc=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=a.useState(0),[l,d]=a.useState(!1),c=a.useRef(null),u=a.useRef(0);u.current=o;const m=a.useMemo(()=>typeof window>"u"?Us:Math.max(Us,window.innerHeight*qh),[]),x=a.useCallback(h=>Math.max(0,1-h/(m*1.5)),[m]),b=a.useCallback(h=>Math.max(0,1-h/(m*.45)),[m]),T=a.useCallback(h=>{const S=typeof window<"u"?window.innerHeight:800,M=Math.max(.88,1-h/S*.12);return`translateY(${h}px) scale(${M})`},[]),f=a.useCallback(()=>{c.current=null},[]),L=a.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),f()},[n,f]),$=a.useCallback(()=>{const h=typeof window<"u"?window.innerHeight:800;d(!0),s(h),window.setTimeout(()=>{t(),f(),d(!1)},Math.min(n,200))},[n,t,f]),R=a.useCallback(h=>{!e||l||h.pointerType==="touch"&&(i!=null&&i(h.target)||(c.current={startX:h.clientX,startY:h.clientY,isLocked:null,pointerId:h.pointerId}))},[e,l,i]),A=a.useCallback(h=>{const S=c.current;if(!e||!S||h.pointerType!=="touch"||S.pointerId!==h.pointerId)return;const M=h.clientX-S.startX,z=h.clientY-S.startY;if(S.isLocked===null){if(Math.abs(M)<Xs&&Math.abs(z)<Xs)return;if(z>0&&z>Math.abs(M))S.isLocked=!0,h.currentTarget.setPointerCapture(h.pointerId);else{S.isLocked=!1,f();return}}if(!S.isLocked)return;h.preventDefault();const K=Math.max(0,z);u.current=K,s(K)},[e,f]),C=a.useCallback(h=>{const S=c.current;if(!e||!S||h.pointerType!=="touch"||S.pointerId!==h.pointerId)return;const M=S.isLocked===!0;if(h.currentTarget.hasPointerCapture(h.pointerId)&&h.currentTarget.releasePointerCapture(h.pointerId),!M){f();return}h.clientY-S.startY>=m?$():L()},[m,$,e,f,L]),U=a.useCallback(h=>{C(h)},[C]),E=a.useCallback(h=>{C(h)},[C]),O=o>0,I=l?`transform ${n}ms ease`:"none",w=l?`opacity ${n}ms ease`:"none",F=o>0||l;return{isSwipeDragging:O,backdropStyle:{opacity:x(o),transition:w},mediaAreaStyle:{transform:T(o),transition:I,touchAction:O?"none":void 0,willChange:O?"transform":void 0},overlayContentStyle:F?{opacity:b(o),transition:w}:void 0,swipeHandlers:e?{onPointerDown:R,onPointerMove:A,onPointerUp:U,onPointerCancel:E}:{},dismissAreaStyle:e?{touchAction:O?"none":"pan-x"}:void 0}},Kh="[data-lightbox-scrollable]",pc=()=>{a.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const l=d=>{const c=d.target;c instanceof Element&&c.closest(Kh)||d.preventDefault()};return document.addEventListener("touchmove",l,{passive:!1}),()=>{document.removeEventListener("touchmove",l),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo(0,e)}},[])},Uh=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Xh=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Yh=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Zh=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(f,L)=>{Xh(t),e.scrollLeft=f,L&&(s==null||s())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let m=!1,x=0;const b=()=>{t.removeEventListener("transitionend",T),clearTimeout(x)},T=f=>{f.target!==t||f.propertyName!=="transform"||m||(m=!0,b(),u(n,!0))};return t.addEventListener("transitionend",T),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${c}px, 0, 0)`,x=window.setTimeout(()=>{m||(m=!0,b(),u(n,!0))},i+64),()=>{m||(m=!0,b(),u(l-Yh(t),!1))}},no=300,Jh=900,Qh=1500,ef="cubic-bezier(0.16, 1, 0.3, 1)",tf=3e3,nf=2,of=16,rf=.05,af=1,Oo=.3,sf=50,lf=20,vi=.004,Ni=["title1","title2","title3"],cf={title1:"1",title2:"2",title3:"3"},df={title1:"title1Color",title2:"title2Color",title3:"title3Color"},uf={title1:.02,title2:.02,title3:.02},jo=e=>`max(${e}, ${lf}px)`,pf=e=>{if(!Array.isArray(e)||e.length===0)return{};const t=e.find(o=>(o==null?void 0:o.type)==="paragraph")??e[0],n=t==null?void 0:t.children;if(!Array.isArray(n))return{};const i=n.map(o=>typeof(o==null?void 0:o.text)=="string"?o.text.trim():"").filter(Boolean);return{title1:i[0],title2:i[1],title3:i[2]}},mf=e=>{if(!e)return{title1:"",title2:"",title3:""};if(e.title1||e.title2||e.title3)return{title1:e.title1??"",title2:e.title2??"",title3:e.title3??""};const t=pf(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Ft=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,gf=e=>[Ft(e,"fontFamily"),Ft(e,"fontSettings"),{type:"row",items:[Ft(e,"fontSize"),Ft(e,"lineHeight"),Ft(e,"letterSpacing"),Ft(e,"wordSpacing")]},Ft(e,"textAlign"),Ft(e,"textAppearance")],hf=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ni.map(e=>[cf[e],gf(e)]))}),Ka=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},mc=(e,t)=>Ka(e,t),zo=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Ys=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ka(e.length,n),effective:mc(e.length,n)}},ff=(e,t,n,i,o,s,l)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),d},Ur=(e,t)=>{const n=i=>{const o=Ft(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[df[t]]}},yf=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Xr=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??uf[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)},vf=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:m,imageGap:x,closeIcon:b,closeIconMaxWidth:T,closeIconColor:f,closeIconHoverColor:L,thumbnailTrigger:$,thumbnailVisibility:R,thumbnailObjectFit:A,thumbnailActive:C,thumbnailActiveColor:U,title1Width:E,title2Width:O,title3Width:I,title1MarginLeft:w=0,title2MarginLeft:F=0,title3MarginLeft:h=0,titleRowMarginBottom:S=0,titleHeaderLayout:M="desktop",contentMarginTop:z,iconMarginLeft:K}=n,se=p=>y.scalingValue(p,i??!1),Y=c??n.thumnailSize??.03,D=se(Y),N=se(u),W=se(m??.02),P=se(x??0),q=se(z??0),G=jo(q),Z=se(K??0),[_,me]=a.useState(0),v=a.useRef(_);v.current=_;const fe=t[_],{title1:J,title2:ce,title3:Ce}=mf(fe),oe=Xr("title1",Ur(n,"title1"),i),xe=Xr("title2",Ur(n,"title2"),i),Q=Xr("title3",Ur(n,"title3"),i),ye=M==="mobile",ve=!o&&(!i||s),Me=ve,we=ve,Ae=ve,X=Pn(A),ue=X?{"--image-aspect-ratio":Tr(A)}:void 0,Se=!!(J||ce||Ce),j=a.useMemo(()=>ff(e,J,ce,Ce,oe,xe,Q),[e,_,J,ce,Ce,oe,xe,Q]),de=a.useMemo(()=>({title1Width:E,title2Width:O,title3Width:I}),[E,O,I]),H=a.useMemo(()=>j.map(p=>de[p.widthKey]),[j,de]),re=a.useMemo(()=>Ka(j.length,H),[j.length,H]),ae=a.useMemo(()=>mc(j.length,H),[j.length,H]),ne=a.useMemo(()=>j.filter(p=>p.prefix==="title1"),[j]),ie=a.useMemo(()=>j.filter(p=>p.prefix==="title2"||p.prefix==="title3"),[j]),be=a.useMemo(()=>Ys(ne,de),[ne,de]),Te=a.useMemo(()=>Ys(ie,de),[ie,de]),ee=a.useCallback((p,k)=>{const B=j.indexOf(p);if(!ye||k==="single-row")return{effectiveWidth:ae[B]??0,resolvedWidth:re[B]??0,maxWidth:zo(B,re)};if(k==="two-row-top"){const Le=ne.indexOf(p);return{effectiveWidth:be.effective[Le]??0,resolvedWidth:be.resolved[Le]??0,maxWidth:zo(Le,be.resolved)}}const he=ie.indexOf(p);return{effectiveWidth:Te.effective[he]??0,resolvedWidth:Te.resolved[he]??0,maxWidth:zo(he,Te.resolved)}},[ie,Te,ae,re,j,ne,be,ye]),pe=a.useCallback(p=>y.scalingValue(p,i??!1),[i]),Pe=pe(S??0),le=a.useMemo(()=>({title1MarginLeft:w,title2MarginLeft:F,title3MarginLeft:h}),[w,F,h]),V=a.useCallback(p=>j.slice(0,p+1).reduce((k,B,he)=>k+(B!=null&&B.marginLeftKey?le[B.marginLeftKey]??0:0)+(re[he]??0),0)+(ye?0:w??0),[j,le,re,ye,w]),He=a.useCallback(()=>ye?0:w??0,[ye,w]),Fe=a.useCallback(p=>ie.slice(0,p).reduce((k,B,he)=>k+(B.marginLeftKey?le[B.marginLeftKey]??0:0)+(Te.resolved[he]??0),0),[ie,Te.resolved,le]),Qe=a.useCallback(p=>{const k=ie[p];return Fe(p)+(k.marginLeftKey?le[k.marginLeftKey]??0:0)+(Te.resolved[p]??0)},[ie,Te.resolved,Fe,le]),Xe=(p,k)=>{const B=p.marginLeftKey?le[p.marginLeftKey]??0:0,{effectiveWidth:he,resolvedWidth:Le,maxWidth:Ne}=ee(p,k),st=o&&k==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":p.prefix,style:{...k==="single-row"?{gridArea:p.prefix}:{},width:pe(he),...B>0?{marginLeft:pe(B)}:{}},children:[r.jsx("p",{className:p.className,style:p.style,children:p.text}),st&&p.marginLeftKey&&r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Le),style:{position:"absolute",top:0,left:pe(-B),width:`max(${pe(B)}, 10px)`,height:"100%",pointerEvents:"auto"}}),st&&r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ne),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:pe(-vi/2),width:pe(vi),height:"100%",pointerEvents:"auto"}})]},p.className)},lt=()=>{const p=ye?-1:j.findIndex(he=>he.prefix==="title1"),k=!ye&&(o||(w??0)>0)?(()=>{const he=w??0,Le=p>=0?re[p]:E??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Le),style:{position:"absolute",top:0,left:0,width:`max(${pe(he)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,B=j.flatMap((he,Le)=>{if(!he.marginLeftKey)return[];const Ne=le[he.marginLeftKey]??0,st=yf(j,re,le,Le)+He();return r.jsx("div",{"data-controls":he.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re[Le]),style:{position:"absolute",top:0,left:pe(st),width:`max(${pe(Ne)}, 10px)`,height:"100%",pointerEvents:"auto"}},he.marginLeftKey)});return k?[k,...B]:B},pt=()=>j.map((p,k)=>{const B=zo(k,re),Le=V(k)-vi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(B),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:pe(Le),width:pe(vi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),Be=()=>ie.flatMap((p,k)=>{if(!p.marginLeftKey)return[];const B=le[p.marginLeftKey]??0,he=Fe(k),{resolvedWidth:Le}=ee(p,"two-row-bottom");return r.jsx("div",{"data-controls":p.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Le),style:{position:"absolute",top:0,left:pe(he),width:`max(${pe(B)}, 10px)`,height:"100%",pointerEvents:"auto"}},p.marginLeftKey)}),rt=()=>ie.map((p,k)=>{const{maxWidth:B}=ee(p,"two-row-bottom"),Le=Qe(k)-vi/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":p.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(B),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:pe(Le),width:pe(vi),height:"100%",pointerEvents:"auto"}})},`${p.widthKey}-junction`)}),Tt=a.useRef(null),at=a.useRef(null),Ke=a.useRef(null),gt=a.useRef(null),bt=a.useRef([]),mt=a.useRef([]),kt=a.useRef(0),Wt=a.useRef(null),et=a.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),St=a.useRef(null),$t=a.useRef(null),De=a.useRef(0),Ve=a.useRef("forward"),_e=a.useRef(0),ht=a.useRef(null),It=a.useRef(!1),At=t.length>1&&(!o||!!s),Vt=At?3:1,tn=a.useMemo(()=>Array.from({length:Vt},()=>t).flat(),[t,Vt]),[nn,wt]=a.useState(!1),[Rt,qt]=a.useState(!1),[Kt,$e]=a.useState(!0),je=a.useRef(null),Oe=a.useRef(null),Ye=a.useRef(!1),Lt=a.useRef(!1),tt=a.useRef(null),ke=a.useRef(null),ft=Me&&!Kt,Je=a.useCallback(()=>{Me&&($e(!0),ke.current&&clearTimeout(ke.current),ke.current=setTimeout(()=>{et.current.isActive||$e(!1)},tf))},[Me]),qe=a.useCallback(()=>{o||Lt.current||(Lt.current=!0,qt(!1),tt.current=setTimeout(()=>{l()},no))},[o,l]),it=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":ft?"true":"false",style:{width:y.scalingValue(T??0,i),height:y.scalingValue(T??0,i),marginRight:Z,"--close-icon-hover-color":L},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:qe,"aria-label":"Close",children:r.jsx(on,{url:b,fill:f,hoverFill:i&&!s?f:L,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:Z,height:"100%",pointerEvents:"auto"}})]}),Ht=(p="two-row")=>r.jsx("div",{...p==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:pe(w??0),flexShrink:0,...p==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...p==="two-row"&&o?{pointerEvents:"auto"}:{}}}),Et=()=>{const p=j.find(he=>he.prefix==="title1"),k=j.filter(he=>he.prefix==="title2"||he.prefix==="title3"),B=k.length>0||o||(S??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(w??0)>0||o?Ht():null,p&&Xe(p,"two-row-top"),b&&it()]}),B?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[k.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[k.map(he=>Xe(he,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[Be(),rt()]})]}):null,r.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:Pe,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},ct=()=>r.jsxs(r.Fragment,{children:[(w??0)>0||o?Ht("single-row"):null,j.map(p=>Xe(p,"single-row")),o?r.jsxs(r.Fragment,{children:[lt(),pt()]}):null,b?it():null]}),Ot=a.useCallback(p=>!!(p.closest("[data-controls]")||p.closest(`.${e}-thumbnails`)||p.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Dt,backdropStyle:jt,mediaAreaStyle:zt,overlayContentStyle:dt,swipeHandlers:Ut,dismissAreaStyle:Jt}=uc({enabled:ve??!1,onClose:qe,animMs:no,isBlockedTarget:Ot}),Qt=()=>{if(!At||t.length===0)return kt.current=0,0;const p=mt.current[0],k=mt.current[t.length];if(!p||!k)return kt.current;const B=k.offsetLeft-p.offsetLeft;return B>0&&(kt.current=B),kt.current},vt=(p=!1)=>{if(!At)return;const k=at.current,B=Qt();!k||B<=0||B<k.clientWidth*.25||(k.scrollLeft<=0?(k.scrollLeft+=B,p&&(et.current.scrollLeft+=B),It.current&&(_e.current+=B)):k.scrollLeft>=B*2&&(k.scrollLeft-=B,p&&(et.current.scrollLeft-=B),It.current&&(_e.current-=B)))},Pt=(p,k=(B=>(B=at.current)==null?void 0:B.scrollLeft)()??0)=>{if(!At)return p;let he=t.length+p,Le=1/0;for(let Ne=0;Ne<Vt;Ne++){const st=Ne*t.length+p,yt=mt.current[st];if(!yt)continue;const en=Math.abs(yt.offsetLeft-k);en<Le&&(Le=en,he=st)}return he},Bt=p=>{const k=at.current;return!p||!k?!1:p.offsetWidth>k.clientWidth+1},g=p=>{const k=at.current;if(!p||!k||!Bt(p))return!1;const B=p.offsetLeft,he=B+p.offsetWidth;return k.scrollLeft>=B-1&&k.scrollLeft+k.clientWidth<=he+1},ge=(p=(k=>(k=at.current)==null?void 0:k.scrollLeft)()??0)=>{for(let he=0;he<mt.current.length;he+=1){const Le=mt.current[he];if(Le&&g(Le))return he}let B={flatIndex:0,distance:1/0};return mt.current.forEach((he,Le)=>{if(!he)return;const Ne=Math.abs(he.offsetLeft-p);Ne<B.distance&&(B={flatIndex:Le,distance:Ne})}),B.flatIndex},Ee=p=>{at.current&&mt.current.forEach(k=>{k&&(k.style.scrollSnapAlign=Bt(k)&&p==="backward"?"end":"start")})},Ie=(p,k,B)=>{const he=p-k,Le=ge(k),Ne=mt.current[Le];if(g(Ne))return ge(p)%t.length;const st=mt.current[Le+1],yt=Ne?st?st.offsetLeft-Ne.offsetLeft:Ne.offsetWidth:0,en=yt>0?he>yt*Oo?1:he<-yt*Oo?-1:0:0;return en===0?B:At?(B+en+t.length)%t.length:Math.max(0,Math.min(t.length-1,B+en))},Ze=a.useCallback((p=!1)=>{if(R!=="on"||o)return;const k=gt.current,B=v.current,he=bt.current[B];if(!k||!he||k.scrollWidth<=k.clientWidth)return;const Le=k.scrollLeft,Ne=Le+k.clientWidth,st=he.offsetLeft,yt=st+he.offsetWidth;if(st>=Le&&yt<=Ne)return;const en=k.scrollWidth-k.clientWidth;let Yt=Le;if(!p&&je.current===null){const fi=bt.current[B-1],Gi=bt.current[B+1],Ro=fi?he.offsetLeft-fi.offsetLeft:Gi?Gi.offsetLeft-he.offsetLeft:he.offsetWidth;yt>Ne?Yt+=Ro:st<Le&&(Yt-=Ro)}else yt>Ne?Yt=yt-k.clientWidth:Yt=st;k.scrollLeft=Math.max(0,Math.min(en,Yt))},[o,R]),Mt=a.useCallback((p=!1)=>{p&&(Ye.current=!0),Oe.current===null&&(Oe.current=requestAnimationFrame(()=>{Oe.current=null;const k=Ye.current;Ye.current=!1,Ze(k)}))},[Ze]),Ge=a.useCallback(p=>{if(p===v.current)return;const k=v.current;v.current=p;const B=Math.abs(p-k)>1,he=At&&t.length>1&&(k===t.length-1&&p===0||k===0&&p===t.length-1);me(p),Mt(B||he)},[t.length,At,Mt]),ot=()=>{if(!at.current||t.length===0||je.current!==null||et.current.isActive&&et.current.hasMoved)return;const p=at.current.scrollLeft,k=ge(p)%t.length;k!==v.current&&Ge(k)},_t=()=>{je.current=null},Ct=p=>{const k=at.current;k&&(k.style.scrollSnapType=p?"":"none")},ln=()=>{var p;(p=$t.current)==null||p.call($t),$t.current=null},dn=()=>{ht.current!==null&&(cancelAnimationFrame(ht.current),ht.current=null),It.current=!1},Zn=()=>{const p=at.current;if(!p){ht.current=null,It.current=!1;return}const k=_e.current-p.scrollLeft;if(Math.abs(k)<.5){p.scrollLeft=_e.current,vt(),ot(),ht.current=null,It.current=!1;return}p.scrollLeft+=k*rf,vt(),ot(),Je(),ht.current=requestAnimationFrame(Zn)},Jn=()=>{const p=Ke.current;p&&(p.style.transition="",p.style.transform="",p.style.willChange="")},Co=(p,k,B,he)=>{Jn(),p.scrollLeft=k,De.current=p.scrollLeft,vt(),B!==void 0?(v.current=B,me(B)):ot(),Ct(!0),he==null||he()},To=(p,{behavior:k="smooth",activeIndex:B,onComplete:he}={})=>{const Le=at.current,Ne=Ke.current;if(!Le||!Ne)return;if(dn(),ln(),Ct(!1),k==="auto"){Co(Le,p,B,he);return}const st=Math.abs(p-Le.scrollLeft),yt=Uh(st,Jh,Qh,Le.clientWidth*.55);$t.current=Zh(Le,Ne,p,{duration:yt,easing:ef,onComplete:()=>{$t.current=null,Co(Le,p,B,he)}})},Ir=(p="smooth")=>{const k=at.current;if(!k||t.length===0)return;const B=ge()%t.length,he=Pt(B,k.scrollLeft),Le=mt.current[he];Le&&To(Le.offsetLeft,{behavior:p,activeIndex:B})},Rr=(p,k="smooth",B,he)=>{const Le=at.current;if(!Le||t.length===0)return;const Ne=(he??Le.scrollLeft)-p,st=ge(p),yt=mt.current[st];if(g(yt)){Ct(!0),ot();return}const en=mt.current[st+1],Yt=yt?en?en.offsetLeft-yt.offsetLeft:yt.offsetWidth:0;if((Yt>0?Ne>Yt*Oo?1:Ne<-Yt*Oo?-1:0:0)!==0){const xc=B??st%t.length,bc=Ie(he??Le.scrollLeft,p,xc);wn(bc,k);return}const Gi=he??Le.scrollLeft,Ro=ge(Gi),Ua=mt.current[Ro];if(Ua&&Math.abs(Ua.offsetLeft-Gi)<1){Ct(!0),ot();return}Ir("auto")},wn=(p,k="smooth")=>{const B=at.current;if(!B||t.length===0)return;const he=Pt(p,B.scrollLeft),Le=mt.current[he];Le&&(k==="smooth"?je.current=p:je.current=null,v.current=p,me(p),Mt(!0),To(Le.offsetLeft,{behavior:k,activeIndex:p,onComplete:k==="smooth"?_t:void 0}))},hi=()=>{St.current&&(window.removeEventListener("pointerup",St.current),window.removeEventListener("pointercancel",St.current),St.current=null)},Lo=(p,k,B,he,Le)=>{const Ne=B-p,st=he-k,yt=Math.abs(Ne),en=Math.abs(st);if(yt<sf||yt<=en)return!1;const Yt=Ne<0?1:-1,fi=At?(Le+Yt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Le+Yt));return fi===Le?!1:(wn(fi),!0)},Qn=p=>{if(!et.current.isActive)return;hi();const k=at.current;if(!k)return;const{scrollLeft:B,startActiveIndex:he,hasMoved:Le}=et.current,Ne=k.scrollLeft;vt(!0),et.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},wt(!1),p!==void 0&&k.hasPointerCapture(p)&&k.releasePointerCapture(p),Le?Rr(B,"smooth",he,Ne):(Ct(!0),ot()),Je()},Io=(p,k)=>{const B=Wt.current;Wt.current=null,B&&(Lo(B.startX,B.startY,p,k,B.startActiveIndex),Je())},Er=p=>{if(!we)return;if(p.pointerType==="touch"){if(dn(),Ct(!0),Ot(p.target))return;Wt.current={startX:p.clientX,startY:p.clientY,startActiveIndex:v.current};return}if(p.pointerType!=="mouse"||p.button!==0||Ot(p.target))return;const k=at.current;if(!k)return;dn(),ln(),Jn(),je.current=null,et.current={isActive:!0,startX:p.clientX,scrollLeft:k.scrollLeft,startActiveIndex:v.current,hasMoved:!1},Ct(!1),Je(),k.setPointerCapture(p.pointerId),hi();const B=he=>{he.pointerType==="mouse"&&Qn(he.pointerId)};St.current=B,window.addEventListener("pointerup",B),window.addEventListener("pointercancel",B)},Mr=p=>{if(!we||p.pointerType!=="mouse")return;const k=at.current;if(!k||!et.current.isActive)return;if(p.buttons===0){Qn(p.pointerId);return}const B=p.clientX-et.current.startX;Math.abs(B)>af&&(et.current.hasMoved=!0,wt(!0)),et.current.hasMoved&&(p.preventDefault(),k.scrollLeft=et.current.scrollLeft-B,vt(!0),ot(),Je())},te=p=>{if(we){if(p.pointerType==="touch"){p.type==="pointerup"?Io(p.clientX,p.clientY):Wt.current=null;return}p.pointerType==="mouse"&&Qn(p.pointerId)}},Re=p=>{!we||p.pointerType!=="mouse"||Qn(p.pointerId)};return pc(),a.useEffect(()=>{const p=requestAnimationFrame(()=>qt(!0));return()=>{cancelAnimationFrame(p),ln(),hi(),Oe.current!==null&&(cancelAnimationFrame(Oe.current),Oe.current=null),tt.current&&clearTimeout(tt.current),ke.current&&clearTimeout(ke.current)}},[]),a.useEffect(()=>{if(!Me){$e(!0);return}Je();const p=Tt.current;if(!p)return;const k=()=>Je();return p.addEventListener("pointermove",k),p.addEventListener("pointerdown",k),()=>{p.removeEventListener("pointermove",k),p.removeEventListener("pointerdown",k),ke.current&&clearTimeout(ke.current)}},[Me,Je]),a.useEffect(()=>{const p=k=>{k.key==="Escape"&&qe()};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[qe]),a.useLayoutEffect(()=>{Qt()},[P,t.length,At]),a.useLayoutEffect(()=>{o||wn(v.current,"auto")},[P,o]),a.useLayoutEffect(()=>{wn(0,"auto")},[t.length,At]),a.useEffect(()=>{const p=at.current;if(!p||o||!ve)return;const k=B=>{if(B.preventDefault(),Math.abs(B.deltaY)<=Math.abs(B.deltaX))return;const he=B.deltaMode===1?of:B.deltaMode===2?p.clientHeight:1,Le=B.deltaY*he*nf;if(Le!==0){if(ln(),It.current||(It.current=!0,_e.current=p.scrollLeft,je.current=null,Ct(!1)),_e.current+=Le,!At){const Ne=p.scrollWidth-p.clientWidth;_e.current=Math.max(0,Math.min(Ne,_e.current))}Je(),ht.current===null&&(ht.current=requestAnimationFrame(Zn))}};return p.addEventListener("wheel",k,{passive:!1}),()=>{p.removeEventListener("wheel",k),dn()}},[o,ve,At]),a.useEffect(()=>{const p=at.current;if(!p)return;const k=()=>{vt(et.current.isActive);const he=p.scrollLeft,Le=he-De.current;De.current=he;const Ne=kt.current>0?kt.current*.5:1/0;if(Le!==0&&Math.abs(Le)<Ne){const st=Le>0?"forward":"backward";st!==Ve.current&&(Ve.current=st,Ee(st))}et.current.isActive&&et.current.hasMoved||ot()};p.addEventListener("scroll",k,{passive:!0});const B=new ResizeObserver(()=>{Qt(),vt(et.current.isActive),Ee(Ve.current),ot()});return B.observe(p),()=>{ln(),p.removeEventListener("scroll",k),B.disconnect()}},[t.length,At]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Dt||qe()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Rt?1:0,transition:`opacity ${no}ms ease`,pointerEvents:Rt?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...jt}}),r.jsxs("div",{ref:Tt,className:`${e}-lightbox-dismiss-area`,style:Jt,...Ut,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:zt,onClick:p=>p.stopPropagation(),children:r.jsx("div",{ref:at,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":we&&t.length>0?"true":"false","data-mouse-dragging":nn?"true":"false",onPointerDown:Er,onPointerMove:Mr,onPointerUp:te,onPointerCancel:te,onLostPointerCapture:Re,children:r.jsx("div",{ref:Ke,className:`${e}-lightbox-strip-track`,style:{gap:P},children:tn.map((p,k)=>{const B=p.image.objectFit??"contain",he=k%t.length,Le=Math.floor(k/t.length),Ne=jo(P),st=`calc(-0.5 * (${Ne} + ${P}))`;return r.jsxs("div",{ref:yt=>mt.current[k]=yt,className:`${e}-strip-item`,style:{height:M==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[r.jsx("img",{src:p.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:B}}),o&&he<t.length-1&&Le===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:st,width:Ne,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Le}-${p.image.url}-${he}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":ft?"true":"false",style:dt,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:q,flexShrink:0,pointerEvents:"none"},children:o&&r.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:G,pointerEvents:"auto",zIndex:3}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${ye?` ${e}-lightbox-content-area-stacked`:""}`,children:(Se||b)&&r.jsx("div",{className:`${e}-header ${ye?`${e}-header-two-row`:`${e}-header-single-row`}`,children:ye?Et():Se||b?ct():null})})})]}),t.length>1&&R==="on"&&(()=>{const p=jo(W),k=`calc(-0.5 * (${W} + ${p}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:W},children:r.jsx("div",{ref:gt,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:B=>B.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":C,style:{gap:N,"--thumbnail-active-color":U},children:[t.map((B,he)=>{const Le=jo(N),Ne=`calc(-0.5 * (${Le} + ${N}))`;return r.jsxs("div",{ref:st=>{bt.current[he]=st},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":_===he?"true":"false",onClick:()=>ve&&$==="click"&&wn(he),onMouseEnter:()=>Ae&&$==="hover"&&wn(he),"aria-label":B.image.name?`View ${B.image.name}`:`View image ${he+1}`,"aria-current":_===he?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${X?` ${e}-thumb-image-cover`:""}`,src:B.image.url,alt:"",draggable:!1,style:{...ue,maxWidth:D,maxHeight:D,width:A.display==="cover"?"auto":"100%",height:"auto",objectFit:A.display==="cover"?"cover":"contain"}})}),o&&he<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ne,width:Le,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${B.image.url}-${he}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:k,height:p,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function xf(e){return`
|
|
13040
12770
|
.${e}-wrapper {
|
|
13041
12771
|
position: relative;
|
|
13042
12772
|
width: 100%;
|
|
@@ -13267,7 +12997,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
13267
12997
|
background-color: transparent;
|
|
13268
12998
|
padding: 0;
|
|
13269
12999
|
opacity: 1;
|
|
13270
|
-
transition: opacity ${
|
|
13000
|
+
transition: opacity ${no}ms ease;
|
|
13271
13001
|
}
|
|
13272
13002
|
|
|
13273
13003
|
.${e}-close-icon[data-overlay-content-hidden="true"] {
|
|
@@ -13372,18 +13102,6 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
13372
13102
|
background: transparent;
|
|
13373
13103
|
}
|
|
13374
13104
|
|
|
13375
|
-
.${e}-title-resize-handle::after {
|
|
13376
|
-
content: '';
|
|
13377
|
-
position: absolute;
|
|
13378
|
-
top: 0;
|
|
13379
|
-
left: 50%;
|
|
13380
|
-
transform: translateX(-50%);
|
|
13381
|
-
width: 2px;
|
|
13382
|
-
height: 100%;
|
|
13383
|
-
background: #FF5C02;
|
|
13384
|
-
pointer-events: none;
|
|
13385
|
-
}
|
|
13386
|
-
|
|
13387
13105
|
.${e}-lightbox-content-inner {
|
|
13388
13106
|
position: absolute;
|
|
13389
13107
|
inset: 0;
|
|
@@ -13392,7 +13110,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
13392
13110
|
display: flex;
|
|
13393
13111
|
flex-direction: column;
|
|
13394
13112
|
opacity: 1;
|
|
13395
|
-
transition: opacity ${
|
|
13113
|
+
transition: opacity ${no}ms ease;
|
|
13396
13114
|
}
|
|
13397
13115
|
|
|
13398
13116
|
.${e}-lightbox-content-inner[data-overlay-content-hidden="true"] {
|
|
@@ -13433,7 +13151,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
13433
13151
|
pointer-events: auto;
|
|
13434
13152
|
z-index: 10;
|
|
13435
13153
|
}
|
|
13436
|
-
`}const
|
|
13154
|
+
`}const bf=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s})=>{const{prefix:l}=y.useScopedStyles(),{cover:d,coverFit:c}=e,u=a.useRef(null),[m,x]=a.useState(!1),b=t??[],T=m&&b.length>0,f=()=>{b.length!==0&&x(!0)};return a.useEffect(()=>{!n||i||o||x(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:xf(l)}}),d&&r.jsx("div",{className:`${l}-cover ${Pn(c)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>f(),style:{...Pn(c)?{"--image-aspect-ratio":Tr(c)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${l}-cover-image ${Pn(c)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:d,alt:"cover"})})]}),T&&typeof document<"u"&&(()=>{const L=(s?document.getElementById(s):null)??document.body;return mi.createPortal(r.jsx(vf,{prefix:l,images:b,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>x(!1)}),L)})()]})},wf=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
|
|
13437
13155
|
import { createPortal } from 'react-dom';
|
|
13438
13156
|
import { CommonComponentProps } from '../props';
|
|
13439
13157
|
import { useScopedStyles } from '../utils/useScopedStyles';
|
|
@@ -13795,18 +13513,6 @@ function getCSS(P: string): string {
|
|
|
13795
13513
|
background: transparent;
|
|
13796
13514
|
}
|
|
13797
13515
|
|
|
13798
|
-
.\${P}-title-resize-handle::after {
|
|
13799
|
-
content: '';
|
|
13800
|
-
position: absolute;
|
|
13801
|
-
top: 0;
|
|
13802
|
-
left: 50%;
|
|
13803
|
-
transform: translateX(-50%);
|
|
13804
|
-
width: 2px;
|
|
13805
|
-
height: 100%;
|
|
13806
|
-
background: #FF5C02;
|
|
13807
|
-
pointer-events: none;
|
|
13808
|
-
}
|
|
13809
|
-
|
|
13810
13516
|
.\${P}-lightbox-content-inner {
|
|
13811
13517
|
position: absolute;
|
|
13812
13518
|
inset: 0;
|
|
@@ -13991,7 +13697,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
|
|
|
13991
13697
|
</>
|
|
13992
13698
|
);
|
|
13993
13699
|
};
|
|
13994
|
-
`,Lf="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),ai={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",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function If(e){const t={};return t[Ht(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ht(e,"fontSettings")]={...ai.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ht(e,"fontSize")]={...ai.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ht(e,"lineHeight")]={...ai.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ht(e,"letterSpacing")]={...ai.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ht(e,"wordSpacing")]={...ai.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ht(e,"textAlign")]={...ai.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ht(e,"textAppearance")]={...ai.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Rf=Hi.reduce((e,t)=>({...e,...If(t)}),{}),Ef=Hi.reduce((e,t)=>({...e,[Ht(t,"fontFamily")]:"Goudy Bookletter 1911",[Ht(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ht(t,"letterSpacing")]:0,[Ht(t,"wordSpacing")]:0,[Ht(t,"textAlign")]:"left",[Ht(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Zr(e){return Hi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ht(n,"fontSize")]=i),o!==void 0&&(t[Ht(n,"lineHeight")]=o),t},{})}const kf=xf(),Mf={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{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"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"layout",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"layout",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{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"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up","none"]}},thumbnailActiveColor:{type:"string",scope:"layout",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"layout",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"layout",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"layout",title:"Caption Default",display:{type:"palette-color-picker"}},...Rf,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Lf,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Ef},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...Zr({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...Zr({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...Zr({title1FontSize:.011,title1LineHeight:.02,title2FontSize:.011,title2LineHeight:.02,title3FontSize:.011,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[kf]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},Pf={element:Cf,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:Mf,sourceCode:Tf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Hi.map(e=>({path:`${Ht(e,"fontFamily")}`}))]},fontRelations:{...Hi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ht(t,"fontFamily")}`}),{})}},Af=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:l=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:m})=>{const{type:x,coverFit:b,backgroundColor:T,imageGap:f,maxWidth:L,maxHeight:$,textTransition:R,title1Width:P,title2Width:C,title3Width:X,title1MarginLeft:E=0,title2MarginLeft:B=0,title3MarginLeft:I=0,titleRowMarginBottom:w=0,titleHeaderLayout:W="single-row",countCloseGap:h=0,closeIcon:S,closeIconMaxWidth:k,closeIconColor:D,closeIconHoverColor:U,contentMarginTop:ae=0,iconMarginRight:Y=0}=n,G=a.useCallback(te=>y.scalingValue(te,i??!1),[i]),H=G(f??0),F=`${L}%`,A=`${$}%`,K=G(h),q=G(ae),ee=G(Y),N=ci("title1",li(n,"title1"),i),ue=ci("title2",li(n,"title2"),i),v=ci("title3",li(n,"title3"),i),ye=ci("count",li(n,"count"),i),Z=W==="mobile",ce=!i||!!s,$e=!o&&(!i||!!s),ne=a.useMemo(()=>Yo(t,x),[t,x]),[ve,J]=a.useState(l),pe=ne[ve],he=pe==null?void 0:pe.entry,[Ae,be]=a.useState(!1),[We,Q]=a.useState(null),[le,xe]=a.useState(!1),[O,se]=a.useState(null),[fe,Se]=a.useState(!1),[Ie,we]=a.useState(0),[_,de]=a.useState(),[oe,z]=a.useState(),[re,ke]=a.useState(null),ie=a.useRef(null),j=a.useRef(0),Ne=a.useRef(0),Me=a.useRef(0),et=a.useRef(!1),Ye=a.useRef(null),lt=a.useRef(null),mt=a.useRef(null),De=a.useRef(null),ot=a.useRef(null),$t=a.useRef(null),rt=a.useRef(null),Ue=a.useCallback(()=>{const te=lt.current;if(!te)return;const Ee=te.closest(`.${e}-lightbox-content-area`);if(!Ee)return te.getBoundingClientRect().width;const p=Array.from(Ee.children).reduce((M,V)=>!(V instanceof HTMLElement)||V.contains(te)?M:M+V.getBoundingClientRect().width,0);return Ee.getBoundingClientRect().width-p},[e]),ht=a.useCallback(()=>{ie.current&&(clearTimeout(ie.current),ie.current=null)},[]),xt=a.useCallback(te=>{te===j.current&&(se(null),Se(!1))},[]),dt=a.useCallback(()=>{o||et.current||(et.current=!0,u==null||u(),be(!1),Ye.current=setTimeout(()=>{m()},300))},[o,u,m]),kt=a.useCallback(te=>!!(te.closest("[data-controls]")||te.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:_t,backdropStyle:Qe,mediaAreaStyle:Tt,overlayContentStyle:Lt,swipeHandlers:Ge,dismissAreaStyle:qe}=pc({enabled:$e,onClose:dt,animMs:300,isBlockedTarget:kt}),Pe=a.useCallback(te=>{d&&Ul(te+1,c,!0)},[d,c]),gt=a.useCallback(te=>{if(te)return te.getBoundingClientRect().height},[]),It=a.useCallback(te=>{if(ne.length===0)return;const Ee=(te%ne.length+ne.length)%ne.length;if(Ee===ve)return;const p=ne[ve],M=ne[Ee];j.current+=1;const V=j.current,ge=R==="fade"&&Ls(p==null?void 0:p.entry)!==Ls(M==null?void 0:M.entry),Te=gt(mt.current),je=ge?(()=>{const yt=Ue();gi.flushSync(()=>{ke(M.entry)}),mt.current&&yt&&(mt.current.style.width=`${yt}px`);const tn=gt(mt.current);return mt.current&&(mt.current.style.width=""),{measuredIncomingTitlesHeight:tn,incomingTitlesMeasureWidth:yt}})():void 0,at=Math.max(Te??0,(je==null?void 0:je.measuredIncomingTitlesHeight)??0)||void 0;we(V),se(ve),Se(!0),J(Ee),Pe(Ee),Me.current=Ee,ge?(ht(),at&&de(at),je!=null&&je.incomingTitlesMeasureWidth&&z(je.incomingTitlesMeasureWidth),Q((p==null?void 0:p.entryIndex)??null),xe(!0),Ne.current=M.entryIndex,ie.current=setTimeout(()=>{Q(null),xe(!1),de(void 0),z(void 0),ke(null),ie.current=null},400)):(ht(),Q(null),xe(!1),de(void 0),z(void 0),ke(null),Ne.current=M.entryIndex)},[ve,ht,Ue,gt,ne,Pe,R]),Mt=a.useCallback(()=>{rt.current=null},[]),Dt=a.useCallback(te=>{!ce||ne.length<=1||te.pointerType==="mouse"&&te.button!==0||te.target.closest("[data-controls]")||(rt.current={startX:te.clientX,startY:te.clientY,pointerId:te.pointerId})},[ce,ne.length]),en=a.useCallback(te=>{var yt;if(!ce||ne.length<=1||te.pointerType==="mouse"&&te.button!==0)return;if(_t){Mt();return}const Ee=rt.current;if(!Ee||Ee.pointerId!==te.pointerId||(Mt(),te.target.closest("[data-controls]")))return;const M=te.clientX-Ee.startX,V=te.clientY-Ee.startY,ge=Math.abs(M),Te=Math.abs(V);if(ge>=qm&&ge>Te){It(M>0?ve-1:ve+1);return}if(ge>Ss||Te>Ss)return;const je=(yt=De.current)==null?void 0:yt.getBoundingClientRect(),at=je?je.left+je.width/2:window.innerWidth/2;It(te.clientX<at?ve-1:ve+1)},[ve,ce,It,_t,Mt,ne.length]),on=a.useCallback(te=>{const Ee=rt.current;(Ee==null?void 0:Ee.pointerId)===te.pointerId&&Mt()},[Mt]);mc(),a.useEffect(()=>{$t.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const te=requestAnimationFrame(()=>{be(!0),requestAnimationFrame(()=>{ot.current?ot.current.focus():De.current&&De.current.focus()})});return()=>{cancelAnimationFrame(te),Ye.current&&clearTimeout(Ye.current),ie.current&&clearTimeout(ie.current);const Ee=$t.current;Ee&&document.contains(Ee)&&Ee.focus({preventScroll:!0})}},[]),a.useEffect(()=>{var te;R!=="fade"&&(Ne.current=((te=ne[ve])==null?void 0:te.entryIndex)??0,ht(),Q(null),xe(!1),de(void 0),z(void 0))},[ve,ht,ne,R]),a.useEffect(()=>{const te=Ee=>{if(Ee.key==="Escape"){dt();return}if(Ee.key==="ArrowLeft"&&ne.length>1){It(ve-1);return}if(Ee.key==="ArrowRight"&&ne.length>1){It(ve+1);return}if(Ee.key==="Tab"&&De.current){const p=De.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),M=Array.from(p).filter(je=>!je.closest('[aria-hidden="true"]'));if(M.length===0)return;const V=M[0],ge=M[M.length-1],Te=document.activeElement;Ee.shiftKey?(Te===V||!De.current.contains(Te))&&(Ee.preventDefault(),ge.focus()):(Te===ge||!De.current.contains(Te))&&(Ee.preventDefault(),V.focus())}};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[It,dt,ve,ne.length]),a.useLayoutEffect(()=>{ht(),j.current=0,we(0),se(null),Se(!1),Q(null),xe(!1),de(void 0),z(void 0),ke(null),J(te=>{const Ee=Math.max(0,ne.length-1);return Math.min(te,Ee)})},[ht,t.length,x,ne.length]),a.useLayoutEffect(()=>{var p;const te=Math.max(0,ne.length-1),Ee=Math.min(Math.max(0,l),te);Me.current=Ee,Ne.current=((p=ne[Ee])==null?void 0:p.entryIndex)??0,J(Ee)},[l]);const bt=We!==null?t[We]:null,Rt=O!==null?ne[O]:null,Ut=(he==null?void 0:he.title1)||(he==null?void 0:he.title2)||(he==null?void 0:he.title3)||(bt==null?void 0:bt.title1)||(bt==null?void 0:bt.title2)||(bt==null?void 0:bt.title3),Kt=eg(x,ne,t),ft=S!==null,Jt=Ut||Kt||ft,Ce=Kt&&ft?{gap:K}:void 0,Oe=`${e}-titles-stack${Z?` ${e}-titles-stack-stacked`:""}`,Ke=`${e}-titles-layer-out${Z?` ${e}-titles-layer-out-stacked`:""}`,He=`${e}-titles-layer-out`,ze=(E??0)>0||o,ut=G(w),_e=a.useMemo(()=>({title1Width:P??Ii.title1Width,title2Width:C??Ii.title2Width,title3Width:X??Ii.title3Width}),[P,C,X]),Je=a.useMemo(()=>({title2MarginLeft:B,title3MarginLeft:I}),[B,I]),tt=a.useMemo(()=>he?Dn(e,he,N,ue,v):[],[e,he,N,ue,v]),Wt=a.useMemo(()=>tt.map(te=>_e[te.widthKey]),[tt,_e]),Ct=a.useMemo(()=>Pi(tt.length,Wt),[tt.length,Wt]),st=a.useMemo(()=>po(tt.length,Wt),[tt.length,Wt]),Nt=a.useMemo(()=>tt.filter(te=>te.prefix==="title1"),[tt]),At=a.useMemo(()=>tt.filter(te=>te.prefix==="title2"||te.prefix==="title3"),[tt]),Vt=a.useMemo(()=>Vn(Nt,_e),[Nt,_e]),zt=a.useMemo(()=>Vn(At,_e),[At,_e]),Pt=a.useCallback((te,Ee)=>{const p=tt.findIndex(V=>V.prefix===te.prefix);if(!Z||Ee==="single-row")return{effectiveWidth:st[p]??0,resolvedWidth:Ct[p]??0,maxWidth:sn(p,Ct)};if(Ee==="two-row-top"){const V=Nt.findIndex(ge=>ge.prefix===te.prefix);return{effectiveWidth:Vt.effective[V]??0,resolvedWidth:Vt.resolved[V]??0,maxWidth:sn(V,Vt.resolved)}}const M=At.findIndex(V=>V.prefix===te.prefix);return{effectiveWidth:zt.effective[M]??0,resolvedWidth:zt.resolved[M]??0,maxWidth:sn(M,zt.resolved)}},[tt,At,zt,st,Ct,Nt,Vt,Z]),Qt=a.useCallback(te=>Jl(tt,Ct,Je,te)+(Z?0:E??0),[tt,Ct,Je,Z,E]),wt=a.useCallback(()=>Z?0:E??0,[Z,E]),Gt=a.useCallback(te=>At.slice(0,te).reduce((Ee,p,M)=>Ee+(p.marginLeftKey?Je[p.marginLeftKey]??0:0)+(zt.resolved[M]??0),0),[At,zt.resolved,Je]),pt=a.useCallback(te=>{const Ee=At[te];return Gt(te)+(Ee.marginLeftKey?Je[Ee.marginLeftKey]??0:0)+(zt.resolved[te]??0)},[At,zt.resolved,Gt,Je]),Ft=a.useCallback((te,Ee,p)=>{if(!Z||p==="single-row"){const je=te.findIndex(Yt=>Yt.prefix===Ee.prefix),at=te.map(Yt=>_e[Yt.widthKey]),yt=Pi(te.length,at);return{effectiveWidth:po(te.length,at)[je]??0,resolvedWidth:yt[je]??0,maxWidth:sn(je,yt)}}if(p==="two-row-top"){const je=te.filter(Yt=>Yt.prefix==="title1"),at=je.findIndex(Yt=>Yt.prefix===Ee.prefix),{resolved:yt,effective:tn}=Vn(je,_e);return{effectiveWidth:tn[at]??0,resolvedWidth:yt[at]??0,maxWidth:sn(at,yt)}}const M=te.filter(je=>je.prefix==="title2"||je.prefix==="title3"),V=M.findIndex(je=>je.prefix===Ee.prefix),{resolved:ge,effective:Te}=Vn(M,_e);return{effectiveWidth:Te[V]??0,resolvedWidth:ge[V]??0,maxWidth:sn(V,ge)}},[_e,Z]),Bt=(te,Ee,p)=>{const M=te.marginLeftKey?Je[te.marginLeftKey]??0:0,{effectiveWidth:V,resolvedWidth:ge,maxWidth:Te}=p??Pt(te,Ee),je=Math.max(M,Bn),at=o&&Ee==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":te.prefix,style:{width:G(V),...M>0?{marginLeft:G(M)}:{}},children:[r.jsx("p",{className:te.className,style:te.style,children:te.text}),at&&te.marginLeftKey?r.jsx("div",{"data-controls":te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ge),style:{position:"absolute",top:0,left:G(-M),width:G(je),height:"100%",pointerEvents:"auto"}}):null,at?r.jsx("div",{"data-controls":te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Te),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:G(-hn/2),width:G(hn),height:"100%",pointerEvents:"auto"}}):null]},te.className)},g=(te="two-row")=>{const Ee=tt.findIndex(V=>V.prefix==="title1"),p=Ee>=0?Ct[Ee]:_e.title1Width,M=te==="two-row"&&o;return r.jsx("div",{...M?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(p)}:{},style:{width:G(E??0),flexShrink:0,alignSelf:"stretch",...M?{pointerEvents:"auto"}:{}}})},me=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:N,"aria-hidden":"true",children:" "}),Re=()=>r.jsx("span",{className:`${e}-entry-counter`,style:ye,"aria-live":"polite","aria-atomic":"true",children:Qm(ne,ve,x,t)}),Le=()=>Kt?o&&ft?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Re(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Br(K)} + ${K}))`,width:Br(K),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Re():null,Ze=()=>!Kt&&!ft?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Ce,children:[Le(),ft?it():null]}),Et=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Kt||Ut?me():null,ze?g("single-row"):null,St(he),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Ze(),Sn()]}),Ve=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Kt||Ut?me():null,ze?g("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:le&&_?{minHeight:_}:void 0,children:[r.jsx("div",{ref:mt,className:Oe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Qn(re||he)}),r.jsxs("div",{ref:lt,className:Oe,style:{position:le?"absolute":"relative",inset:le?0:void 0,width:"100%",...le&&oe?{width:oe,maxWidth:"100%"}:void 0},children:[bt&&le?r.jsx("div",{className:`${Ke} ${e}-titles-fade-out`,children:Qn(bt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${le?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Qn(he)})]})]}),Ze(),Sn()]}),it=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:y.scalingValue(k??0,i),height:y.scalingValue(k??0,i),marginRight:ee,"--close-icon-hover-color":U},children:[r.jsx("button",{ref:ot,type:"button",className:`${e}-close-icon-inner`,onClick:dt,"aria-label":"Close",children:r.jsx(rn,{url:S??"",fill:D,hoverFill:i&&!s?D:U,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:ee,height:"100%",pointerEvents:"auto"}})]}),jt=(te,Ee)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Kt||Ut?me():null,ze?g("two-row"):null,Ee!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ee},children:te}):r.jsxs(r.Fragment,{children:[te,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Ze()]}),St=te=>{if(!te)return null;const Ee=Dn(e,te,N,ue,v);return r.jsx(r.Fragment,{children:Ee.map(p=>Bt(p,"single-row",Ft(Ee,p,"single-row")))})},cn=te=>{if(!te)return null;const Ee=Dn(e,te,N,ue,v),p=Ee.find(M=>M.prefix==="title1");return p?Bt(p,"two-row-top",Ft(Ee,p,"two-row-top")):null},un=(te,Ee=!1)=>{const p=te?Dn(e,te,N,ue,v):[],M=p.filter(Te=>Te.prefix==="title2"||Te.prefix==="title3"),V=o&&Ee;return M.length>0||V||(w??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[M.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[M.map(Te=>Bt(Te,"two-row-bottom",Ft(p,Te,"two-row-bottom"))),Ee&&o?r.jsxs(r.Fragment,{children:[Rr(),Er()]}):null]}):null,(w??0)>0||V?r.jsx("div",{"data-controls":V?"titleRowMarginBottom":void 0,"data-controls-axis":V?"y":void 0,"data-controls-reverse":V?"":void 0,className:V?`${e}-control`:void 0,style:{height:ut,width:"100%",flexShrink:0,pointerEvents:V?"auto":"none"}}):null]}):null},Jn=(te,Ee=!1)=>r.jsxs(r.Fragment,{children:[jt(cn(te)),un(te,Ee)]}),Qn=te=>Z?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Jn(te)}):te?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:St(te)}):null,To=()=>{const te=Z?-1:tt.findIndex(M=>M.prefix==="title1"),Ee=!Z&&(o||(E??0)>0)?(()=>{const M=E??0,V=te>=0?Ct[te]:_e.title1Width,ge=Math.max(M,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(V),style:{position:"absolute",top:0,left:0,width:G(ge),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,p=tt.flatMap((M,V)=>{if(!M.marginLeftKey)return[];const ge=Je[M.marginLeftKey]??0,Te=Zl(tt,Ct,Je,V)+wt(),je=Math.max(ge,Bn);return r.jsx("div",{"data-controls":M.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ct[V]),style:{position:"absolute",top:0,left:G(Te),width:G(je),height:"100%",pointerEvents:"auto"}},M.marginLeftKey)});return Ee?[Ee,...p]:p},Lo=()=>tt.map((te,Ee)=>{const p=sn(Ee,Ct),V=Qt(Ee)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:G(V),width:G(hn),height:"100%",pointerEvents:"auto"}})},`${te.widthKey}-junction`)}),Rr=()=>At.flatMap((te,Ee)=>{if(!te.marginLeftKey)return[];const p=Je[te.marginLeftKey]??0,M=Gt(Ee),V=Math.max(p,Bn),{resolvedWidth:ge}=Pt(te,"two-row-bottom");return r.jsx("div",{"data-controls":te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ge),style:{position:"absolute",top:0,left:G(M),width:G(V),height:"100%",pointerEvents:"auto"}},te.marginLeftKey)}),Er=()=>At.map((te,Ee)=>{const{maxWidth:p}=Pt(te,"two-row-bottom"),V=pt(Ee)-hn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:G(V),width:G(hn),height:"100%",pointerEvents:"auto"}})},`${te.widthKey}-junction`)}),Sn=()=>!o||Z?null:r.jsxs(r.Fragment,{children:[To(),Lo()]}),fi=te=>{const Ee=!te.objectFit&&Fn(b);return{className:`${e}-slide-image-cell${Ee?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:F,maxHeight:A,...Ee?{"--image-aspect-ratio":Lr(b)}:{}}}},Io=te=>te.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":te.objectFit}}:Fn(b)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},ei=te=>{if(te.length===0)return null;const Ee=te.length>1,p=Br(H),M=`calc(-0.5 * (${p} + ${H}))`;if(te.length===1){const V=te[0];return r.jsx("div",{...fi(V),children:r.jsx("img",{...Io(V),src:V.url,alt:V.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:Ee?{gap:H}:void 0,children:te.map((V,ge)=>r.jsxs("div",{...fi(V),children:[r.jsx("img",{...Io(V),src:V.url,alt:V.name??"",draggable:!1}),o&&Ee&&ge<te.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:M,width:p,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${V.url}-${ge}`))})},Ro=!!(he!=null&&he.title2||he!=null&&he.title3||bt!=null&&bt.title2||bt!=null&&bt.title3||(w??0)>0||o),kr=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:mt,className:Oe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Jn(re||he)}),r.jsxs("div",{ref:lt,className:`${e}-titles-row-two-row`,style:{...le&&_?{minHeight:_}:void 0,...le&&oe?{width:oe,maxWidth:"100%"}:void 0},children:[jt(r.jsxs("div",{className:Oe,style:{position:le?"absolute":"relative",inset:le?0:void 0,width:"100%"},children:[bt&&le?r.jsx("div",{className:`${He} ${e}-titles-fade-out`,children:cn(bt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${le?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:cn(he)})]}),le&&_?_:void 0),Ro?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[bt&&le?r.jsx("div",{className:`${Ke} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:un(bt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${le?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${Z?` ${e}-titles-layer-in-stacked`:""}`,children:un(he,!0)})]}):null]})]}),Mr=()=>{const te=Ro;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...te?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:te?void 0:{flex:"0 0 auto",height:"auto"},children:Jn(he,!0)}),Sn()]})};return r.jsxs("div",{ref:De,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{_t||dt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ft?void 0:-1,style:{opacity:Ae?1:0,transition:"opacity 300ms ease",pointerEvents:Ae?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:T,...Qe}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:qe,...Ge,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Tt,onClick:te=>te.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":ce&&ne.length>1?"true":"false",onPointerDown:ce?Dt:void 0,onPointerUp:ce?en:void 0,onPointerCancel:ce?on:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[Rt&&fe?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:te=>{te.target===te.currentTarget&&xt(Ie)},children:r.jsx("div",{className:`${e}-slide-area`,children:ei(Rt.images)})},`slide-out-${Ie}`):null,r.jsx("div",{className:`${e}-slide-layer-in${fe?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:pe?ei(pe.images):null})},`slide-in-${Ie}-${ve}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Lt,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:q,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...Z?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${Z?` ${e}-lightbox-content-area-stacked`:""}`,children:Jt&&r.jsx("div",{className:`${e}-text-bar-cell${Z?` ${e}-text-bar-cell-stacked`:""}`,style:Z?void 0:{flex:1,minWidth:0,width:"100%"},children:Z?R==="fade"?kr():Mr():R==="fade"?Ve():Et()})})})]})]})]})};function Ff(e){return`
|
|
13700
|
+
`,Sf="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),ri={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",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function $f(e){const t={};return t[Ft(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ft(e,"fontSettings")]={...ri.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ft(e,"fontSize")]={...ri.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ft(e,"lineHeight")]={...ri.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ft(e,"letterSpacing")]={...ri.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ft(e,"wordSpacing")]={...ri.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ft(e,"textAlign")]={...ri.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ft(e,"textAppearance")]={...ri.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Cf=Ni.reduce((e,t)=>({...e,...$f(t)}),{}),Tf=Ni.reduce((e,t)=>({...e,[Ft(t,"fontFamily")]:"Goudy Bookletter 1911",[Ft(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ft(t,"letterSpacing")]:0,[Ft(t,"wordSpacing")]:0,[Ft(t,"textAlign")]:"left",[Ft(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Yr(e){return Ni.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ft(n,"fontSize")]=i),o!==void 0&&(t[Ft(n,"lineHeight")]=o),t},{})}const Lf=hf(),If={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{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"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"layout",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"layout",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{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"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up","none"]}},thumbnailActiveColor:{type:"string",scope:"layout",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"layout",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"layout",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"layout",title:"Caption Default",display:{type:"palette-color-picker"}},...Cf,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Sf,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Tf},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...Yr({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...Yr({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...Yr({title1FontSize:.011,title1LineHeight:.02,title2FontSize:.011,title2LineHeight:.02,title3FontSize:.011,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Lf]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},Rf={element:bf,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:If,sourceCode:wf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Ni.map(e=>({path:`${Ft(e,"fontFamily")}`}))]},fontRelations:{...Ni.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ft(t,"fontFamily")}`}),{})}},Ef=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:l=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:m})=>{const{type:x,coverFit:b,backgroundColor:T,imageGap:f,maxWidth:L,maxHeight:$,textTransition:R,title1Width:A,title2Width:C,title3Width:U,title1MarginLeft:E=0,title2MarginLeft:O=0,title3MarginLeft:I=0,titleRowMarginBottom:w=0,titleHeaderLayout:F="single-row",countCloseGap:h=0,closeIcon:S,closeIconMaxWidth:M,closeIconColor:z,closeIconHoverColor:K,contentMarginTop:se=0,iconMarginRight:Y=0}=n,D=a.useCallback(te=>y.scalingValue(te,i??!1),[i]),N=D(f??0),W=`${L}%`,P=`${$}%`,q=D(h),G=D(se),Z=D(Y),_=li("title1",si(n,"title1"),i),me=li("title2",si(n,"title2"),i),v=li("title3",si(n,"title3"),i),fe=li("count",si(n,"count"),i),J=F==="mobile",ce=!i||!!s,Ce=!o&&(!i||!!s),oe=a.useMemo(()=>Xo(t,x),[t,x]),[xe,Q]=a.useState(l),ye=oe[xe],ve=ye==null?void 0:ye.entry,[Me,we]=a.useState(!1),[Ae,X]=a.useState(null),[ue,Se]=a.useState(!1),[j,de]=a.useState(null),[H,re]=a.useState(!1),[ae,ne]=a.useState(0),[ie,be]=a.useState(),[Te,ee]=a.useState(),[pe,Pe]=a.useState(null),le=a.useRef(null),V=a.useRef(0),He=a.useRef(0),Fe=a.useRef(0),Qe=a.useRef(!1),Xe=a.useRef(null),lt=a.useRef(null),pt=a.useRef(null),Be=a.useRef(null),rt=a.useRef(null),Tt=a.useRef(null),at=a.useRef(null),Ke=a.useCallback(()=>{const te=lt.current;if(!te)return;const Re=te.closest(`.${e}-lightbox-content-area`);if(!Re)return te.getBoundingClientRect().width;const p=Array.from(Re.children).reduce((k,B)=>!(B instanceof HTMLElement)||B.contains(te)?k:k+B.getBoundingClientRect().width,0);return Re.getBoundingClientRect().width-p},[e]),gt=a.useCallback(()=>{le.current&&(clearTimeout(le.current),le.current=null)},[]),bt=a.useCallback(te=>{te===V.current&&(de(null),re(!1))},[]),mt=a.useCallback(()=>{o||Qe.current||(Qe.current=!0,u==null||u(),we(!1),Xe.current=setTimeout(()=>{m()},300))},[o,u,m]),kt=a.useCallback(te=>!!(te.closest("[data-controls]")||te.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Wt,backdropStyle:et,mediaAreaStyle:St,overlayContentStyle:$t,swipeHandlers:De,dismissAreaStyle:Ve}=uc({enabled:Ce,onClose:mt,animMs:300,isBlockedTarget:kt}),_e=a.useCallback(te=>{d&&Kl(te+1,c,!0)},[d,c]),ht=a.useCallback(te=>{if(te)return te.getBoundingClientRect().height},[]),It=a.useCallback(te=>{if(oe.length===0)return;const Re=(te%oe.length+oe.length)%oe.length;if(Re===xe)return;const p=oe[xe],k=oe[Re];V.current+=1;const B=V.current,he=R==="fade"&&Ls(p==null?void 0:p.entry)!==Ls(k==null?void 0:k.entry),Le=ht(pt.current),Ne=he?(()=>{const yt=Ke();mi.flushSync(()=>{Pe(k.entry)}),pt.current&&yt&&(pt.current.style.width=`${yt}px`);const en=ht(pt.current);return pt.current&&(pt.current.style.width=""),{measuredIncomingTitlesHeight:en,incomingTitlesMeasureWidth:yt}})():void 0,st=Math.max(Le??0,(Ne==null?void 0:Ne.measuredIncomingTitlesHeight)??0)||void 0;ne(B),de(xe),re(!0),Q(Re),_e(Re),Fe.current=Re,he?(gt(),st&&be(st),Ne!=null&&Ne.incomingTitlesMeasureWidth&&ee(Ne.incomingTitlesMeasureWidth),X((p==null?void 0:p.entryIndex)??null),Se(!0),He.current=k.entryIndex,le.current=setTimeout(()=>{X(null),Se(!1),be(void 0),ee(void 0),Pe(null),le.current=null},400)):(gt(),X(null),Se(!1),be(void 0),ee(void 0),Pe(null),He.current=k.entryIndex)},[xe,gt,Ke,ht,oe,_e,R]),At=a.useCallback(()=>{at.current=null},[]),Vt=a.useCallback(te=>{!ce||oe.length<=1||te.pointerType==="mouse"&&te.button!==0||te.target.closest("[data-controls]")||(at.current={startX:te.clientX,startY:te.clientY,pointerId:te.pointerId})},[ce,oe.length]),tn=a.useCallback(te=>{var yt;if(!ce||oe.length<=1||te.pointerType==="mouse"&&te.button!==0)return;if(Wt){At();return}const Re=at.current;if(!Re||Re.pointerId!==te.pointerId||(At(),te.target.closest("[data-controls]")))return;const k=te.clientX-Re.startX,B=te.clientY-Re.startY,he=Math.abs(k),Le=Math.abs(B);if(he>=Dm&&he>Le){It(k>0?xe-1:xe+1);return}if(he>Ss||Le>Ss)return;const Ne=(yt=Be.current)==null?void 0:yt.getBoundingClientRect(),st=Ne?Ne.left+Ne.width/2:window.innerWidth/2;It(te.clientX<st?xe-1:xe+1)},[xe,ce,It,Wt,At,oe.length]),nn=a.useCallback(te=>{const Re=at.current;(Re==null?void 0:Re.pointerId)===te.pointerId&&At()},[At]);pc(),a.useEffect(()=>{Tt.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const te=requestAnimationFrame(()=>{we(!0),requestAnimationFrame(()=>{rt.current?rt.current.focus():Be.current&&Be.current.focus()})});return()=>{cancelAnimationFrame(te),Xe.current&&clearTimeout(Xe.current),le.current&&clearTimeout(le.current);const Re=Tt.current;Re&&document.contains(Re)&&Re.focus({preventScroll:!0})}},[]),a.useEffect(()=>{var te;R!=="fade"&&(He.current=((te=oe[xe])==null?void 0:te.entryIndex)??0,gt(),X(null),Se(!1),be(void 0),ee(void 0))},[xe,gt,oe,R]),a.useEffect(()=>{const te=Re=>{if(Re.key==="Escape"){mt();return}if(Re.key==="ArrowLeft"&&oe.length>1){It(xe-1);return}if(Re.key==="ArrowRight"&&oe.length>1){It(xe+1);return}if(Re.key==="Tab"&&Be.current){const p=Be.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),k=Array.from(p).filter(Ne=>!Ne.closest('[aria-hidden="true"]'));if(k.length===0)return;const B=k[0],he=k[k.length-1],Le=document.activeElement;Re.shiftKey?(Le===B||!Be.current.contains(Le))&&(Re.preventDefault(),he.focus()):(Le===he||!Be.current.contains(Le))&&(Re.preventDefault(),B.focus())}};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[It,mt,xe,oe.length]),a.useLayoutEffect(()=>{gt(),V.current=0,ne(0),de(null),re(!1),X(null),Se(!1),be(void 0),ee(void 0),Pe(null),Q(te=>{const Re=Math.max(0,oe.length-1);return Math.min(te,Re)})},[gt,t.length,x,oe.length]),a.useLayoutEffect(()=>{var p;const te=Math.max(0,oe.length-1),Re=Math.min(Math.max(0,l),te);Fe.current=Re,He.current=((p=oe[Re])==null?void 0:p.entryIndex)??0,Q(Re)},[l]);const wt=Ae!==null?t[Ae]:null,Rt=j!==null?oe[j]:null,qt=(ve==null?void 0:ve.title1)||(ve==null?void 0:ve.title2)||(ve==null?void 0:ve.title3)||(wt==null?void 0:wt.title1)||(wt==null?void 0:wt.title2)||(wt==null?void 0:wt.title3),Kt=Zm(x,oe,t),$e=S!==null,je=qt||Kt||$e,Oe=Kt&&$e?{gap:q}:void 0,Ye=`${e}-titles-stack${J?` ${e}-titles-stack-stacked`:""}`,Lt=`${e}-titles-layer-out${J?` ${e}-titles-layer-out-stacked`:""}`,tt=`${e}-titles-layer-out`,ke=(E??0)>0||o,ft=D(w),Je=a.useMemo(()=>({title1Width:A??Li.title1Width,title2Width:C??Li.title2Width,title3Width:U??Li.title3Width}),[A,C,U]),qe=a.useMemo(()=>({title2MarginLeft:O,title3MarginLeft:I}),[O,I]),it=a.useMemo(()=>ve?Bn(e,ve,_,me,v):[],[e,ve,_,me,v]),Ht=a.useMemo(()=>it.map(te=>Je[te.widthKey]),[it,Je]),Et=a.useMemo(()=>ki(it.length,Ht),[it.length,Ht]),ct=a.useMemo(()=>uo(it.length,Ht),[it.length,Ht]),Ot=a.useMemo(()=>it.filter(te=>te.prefix==="title1"),[it]),Dt=a.useMemo(()=>it.filter(te=>te.prefix==="title2"||te.prefix==="title3"),[it]),jt=a.useMemo(()=>Dn(Ot,Je),[Ot,Je]),zt=a.useMemo(()=>Dn(Dt,Je),[Dt,Je]),dt=a.useCallback((te,Re)=>{const p=it.findIndex(B=>B.prefix===te.prefix);if(!J||Re==="single-row")return{effectiveWidth:ct[p]??0,resolvedWidth:Et[p]??0,maxWidth:an(p,Et)};if(Re==="two-row-top"){const B=Ot.findIndex(he=>he.prefix===te.prefix);return{effectiveWidth:jt.effective[B]??0,resolvedWidth:jt.resolved[B]??0,maxWidth:an(B,jt.resolved)}}const k=Dt.findIndex(B=>B.prefix===te.prefix);return{effectiveWidth:zt.effective[k]??0,resolvedWidth:zt.resolved[k]??0,maxWidth:an(k,zt.resolved)}},[it,Dt,zt,ct,Et,Ot,jt,J]),Ut=a.useCallback(te=>Zl(it,Et,qe,te)+(J?0:E??0),[it,Et,qe,J,E]),Jt=a.useCallback(()=>J?0:E??0,[J,E]),Qt=a.useCallback(te=>Dt.slice(0,te).reduce((Re,p,k)=>Re+(p.marginLeftKey?qe[p.marginLeftKey]??0:0)+(zt.resolved[k]??0),0),[Dt,zt.resolved,qe]),vt=a.useCallback(te=>{const Re=Dt[te];return Qt(te)+(Re.marginLeftKey?qe[Re.marginLeftKey]??0:0)+(zt.resolved[te]??0)},[Dt,zt.resolved,Qt,qe]),Pt=a.useCallback((te,Re,p)=>{if(!J||p==="single-row"){const Ne=te.findIndex(Yt=>Yt.prefix===Re.prefix),st=te.map(Yt=>Je[Yt.widthKey]),yt=ki(te.length,st);return{effectiveWidth:uo(te.length,st)[Ne]??0,resolvedWidth:yt[Ne]??0,maxWidth:an(Ne,yt)}}if(p==="two-row-top"){const Ne=te.filter(Yt=>Yt.prefix==="title1"),st=Ne.findIndex(Yt=>Yt.prefix===Re.prefix),{resolved:yt,effective:en}=Dn(Ne,Je);return{effectiveWidth:en[st]??0,resolvedWidth:yt[st]??0,maxWidth:an(st,yt)}}const k=te.filter(Ne=>Ne.prefix==="title2"||Ne.prefix==="title3"),B=k.findIndex(Ne=>Ne.prefix===Re.prefix),{resolved:he,effective:Le}=Dn(k,Je);return{effectiveWidth:Le[B]??0,resolvedWidth:he[B]??0,maxWidth:an(B,he)}},[Je,J]),Bt=(te,Re,p)=>{const k=te.marginLeftKey?qe[te.marginLeftKey]??0:0,{effectiveWidth:B,resolvedWidth:he,maxWidth:Le}=p??dt(te,Re),Ne=Math.max(k,zn),st=o&&Re==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":te.prefix,style:{width:D(B),...k>0?{marginLeft:D(k)}:{}},children:[r.jsx("p",{className:te.className,style:te.style,children:te.text}),st&&te.marginLeftKey?r.jsx("div",{"data-controls":te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(he),style:{position:"absolute",top:0,left:D(-k),width:D(Ne),height:"100%",pointerEvents:"auto"}}):null,st?r.jsx("div",{"data-controls":te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Le),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:D(-gn/2),width:D(gn),height:"100%",pointerEvents:"auto"}}):null]},te.className)},g=(te="two-row")=>{const Re=it.findIndex(B=>B.prefix==="title1"),p=Re>=0?Et[Re]:Je.title1Width,k=te==="two-row"&&o;return r.jsx("div",{...k?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(p)}:{},style:{width:D(E??0),flexShrink:0,alignSelf:"stretch",...k?{pointerEvents:"auto"}:{}}})},ge=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:_,"aria-hidden":"true",children:" "}),Ee=()=>r.jsx("span",{className:`${e}-entry-counter`,style:fe,"aria-live":"polite","aria-atomic":"true",children:Ym(oe,xe,x,t)}),Ie=()=>Kt?o&&$e?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Ee(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${zr(q)} + ${q}))`,width:zr(q),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Ee():null,Ze=()=>!Kt&&!$e?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Oe,children:[Ie(),$e?ot():null]}),Mt=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Kt||qt?ge():null,ke?g("single-row"):null,Ct(ve),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Ze(),wn()]}),Ge=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Kt||qt?ge():null,ke?g("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:ue&&ie?{minHeight:ie}:void 0,children:[r.jsx("div",{ref:pt,className:Ye,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Jn(pe||ve)}),r.jsxs("div",{ref:lt,className:Ye,style:{position:ue?"absolute":"relative",inset:ue?0:void 0,width:"100%",...ue&&Te?{width:Te,maxWidth:"100%"}:void 0},children:[wt&&ue?r.jsx("div",{className:`${Lt} ${e}-titles-fade-out`,children:Jn(wt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ue?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Jn(ve)})]})]}),Ze(),wn()]}),ot=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:y.scalingValue(M??0,i),height:y.scalingValue(M??0,i),marginRight:Z,"--close-icon-hover-color":K},children:[r.jsx("button",{ref:rt,type:"button",className:`${e}-close-icon-inner`,onClick:mt,"aria-label":"Close",children:r.jsx(on,{url:S??"",fill:z,hoverFill:i&&!s?z:K,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:Z,height:"100%",pointerEvents:"auto"}})]}),_t=(te,Re)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Kt||qt?ge():null,ke?g("two-row"):null,Re!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Re},children:te}):r.jsxs(r.Fragment,{children:[te,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Ze()]}),Ct=te=>{if(!te)return null;const Re=Bn(e,te,_,me,v);return r.jsx(r.Fragment,{children:Re.map(p=>Bt(p,"single-row",Pt(Re,p,"single-row")))})},ln=te=>{if(!te)return null;const Re=Bn(e,te,_,me,v),p=Re.find(k=>k.prefix==="title1");return p?Bt(p,"two-row-top",Pt(Re,p,"two-row-top")):null},dn=(te,Re=!1)=>{const p=te?Bn(e,te,_,me,v):[],k=p.filter(Le=>Le.prefix==="title2"||Le.prefix==="title3"),B=o&ℜreturn k.length>0||B||(w??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[k.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[k.map(Le=>Bt(Le,"two-row-bottom",Pt(p,Le,"two-row-bottom"))),Re&&o?r.jsxs(r.Fragment,{children:[Ir(),Rr()]}):null]}):null,(w??0)>0||B?r.jsx("div",{"data-controls":B?"titleRowMarginBottom":void 0,"data-controls-axis":B?"y":void 0,"data-controls-reverse":B?"":void 0,className:B?`${e}-control`:void 0,style:{height:ft,width:"100%",flexShrink:0,pointerEvents:B?"auto":"none"}}):null]}):null},Zn=(te,Re=!1)=>r.jsxs(r.Fragment,{children:[_t(ln(te)),dn(te,Re)]}),Jn=te=>J?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Zn(te)}):te?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Ct(te)}):null,Co=()=>{const te=J?-1:it.findIndex(k=>k.prefix==="title1"),Re=!J&&(o||(E??0)>0)?(()=>{const k=E??0,B=te>=0?Et[te]:Je.title1Width,he=Math.max(k,zn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(B),style:{position:"absolute",top:0,left:0,width:D(he),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,p=it.flatMap((k,B)=>{if(!k.marginLeftKey)return[];const he=qe[k.marginLeftKey]??0,Le=Yl(it,Et,qe,B)+Jt(),Ne=Math.max(he,zn);return r.jsx("div",{"data-controls":k.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Et[B]),style:{position:"absolute",top:0,left:D(Le),width:D(Ne),height:"100%",pointerEvents:"auto"}},k.marginLeftKey)});return Re?[Re,...p]:p},To=()=>it.map((te,Re)=>{const p=an(Re,Et),B=Ut(Re)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:D(B),width:D(gn),height:"100%",pointerEvents:"auto"}})},`${te.widthKey}-junction`)}),Ir=()=>Dt.flatMap((te,Re)=>{if(!te.marginLeftKey)return[];const p=qe[te.marginLeftKey]??0,k=Qt(Re),B=Math.max(p,zn),{resolvedWidth:he}=dt(te,"two-row-bottom");return r.jsx("div",{"data-controls":te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(he),style:{position:"absolute",top:0,left:D(k),width:D(B),height:"100%",pointerEvents:"auto"}},te.marginLeftKey)}),Rr=()=>Dt.map((te,Re)=>{const{maxWidth:p}=dt(te,"two-row-bottom"),B=vt(Re)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(p),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:D(B),width:D(gn),height:"100%",pointerEvents:"auto"}})},`${te.widthKey}-junction`)}),wn=()=>!o||J?null:r.jsxs(r.Fragment,{children:[Co(),To()]}),hi=te=>{const Re=!te.objectFit&&Pn(b);return{className:`${e}-slide-image-cell${Re?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:W,maxHeight:P,...Re?{"--image-aspect-ratio":Tr(b)}:{}}}},Lo=te=>te.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":te.objectFit}}:Pn(b)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Qn=te=>{if(te.length===0)return null;const Re=te.length>1,p=zr(N),k=`calc(-0.5 * (${p} + ${N}))`;if(te.length===1){const B=te[0];return r.jsx("div",{...hi(B),children:r.jsx("img",{...Lo(B),src:B.url,alt:B.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:Re?{gap:N}:void 0,children:te.map((B,he)=>r.jsxs("div",{...hi(B),children:[r.jsx("img",{...Lo(B),src:B.url,alt:B.name??"",draggable:!1}),o&&Re&&he<te.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:k,width:p,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${B.url}-${he}`))})},Io=!!(ve!=null&&ve.title2||ve!=null&&ve.title3||wt!=null&&wt.title2||wt!=null&&wt.title3||(w??0)>0||o),Er=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:pt,className:Ye,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Zn(pe||ve)}),r.jsxs("div",{ref:lt,className:`${e}-titles-row-two-row`,style:{...ue&&ie?{minHeight:ie}:void 0,...ue&&Te?{width:Te,maxWidth:"100%"}:void 0},children:[_t(r.jsxs("div",{className:Ye,style:{position:ue?"absolute":"relative",inset:ue?0:void 0,width:"100%"},children:[wt&&ue?r.jsx("div",{className:`${tt} ${e}-titles-fade-out`,children:ln(wt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ue?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:ln(ve)})]}),ue&&ie?ie:void 0),Io?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[wt&&ue?r.jsx("div",{className:`${Lt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:dn(wt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ue?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${J?` ${e}-titles-layer-in-stacked`:""}`,children:dn(ve,!0)})]}):null]})]}),Mr=()=>{const te=Io;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...te?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:te?void 0:{flex:"0 0 auto",height:"auto"},children:Zn(ve,!0)}),wn()]})};return r.jsxs("div",{ref:Be,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Wt||mt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:$e?void 0:-1,style:{opacity:Me?1:0,transition:"opacity 300ms ease",pointerEvents:Me?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:T,...et}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Ve,...De,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:St,onClick:te=>te.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":ce&&oe.length>1?"true":"false",onPointerDown:ce?Vt:void 0,onPointerUp:ce?tn:void 0,onPointerCancel:ce?nn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[Rt&&H?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:te=>{te.target===te.currentTarget&&bt(ae)},children:r.jsx("div",{className:`${e}-slide-area`,children:Qn(Rt.images)})},`slide-out-${ae}`):null,r.jsx("div",{className:`${e}-slide-layer-in${H?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:ye?Qn(ye.images):null})},`slide-in-${ae}-${xe}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:$t,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:G,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...J?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${J?` ${e}-lightbox-content-area-stacked`:""}`,children:je&&r.jsx("div",{className:`${e}-text-bar-cell${J?` ${e}-text-bar-cell-stacked`:""}`,style:J?void 0:{flex:1,minWidth:0,width:"100%"},children:J?R==="fade"?Er():Mr():R==="fade"?Ge():Mt()})})})]})]})]})};function Mf(e){return`
|
|
13995
13701
|
.${e}-wrapper {
|
|
13996
13702
|
position: relative;
|
|
13997
13703
|
width: 100%;
|
|
@@ -14371,18 +14077,6 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
|
|
|
14371
14077
|
background: transparent;
|
|
14372
14078
|
}
|
|
14373
14079
|
|
|
14374
|
-
.${e}-title-resize-handle::after {
|
|
14375
|
-
content: '';
|
|
14376
|
-
position: absolute;
|
|
14377
|
-
top: 0;
|
|
14378
|
-
left: 50%;
|
|
14379
|
-
transform: translateX(-50%);
|
|
14380
|
-
width: 2px;
|
|
14381
|
-
height: 100%;
|
|
14382
|
-
background: #FF5C02;
|
|
14383
|
-
pointer-events: none;
|
|
14384
|
-
}
|
|
14385
|
-
|
|
14386
14080
|
.${e}-titles-stack {
|
|
14387
14081
|
position: relative;
|
|
14388
14082
|
display: flex;
|
|
@@ -14525,7 +14219,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
|
|
|
14525
14219
|
pointer-events: auto;
|
|
14526
14220
|
z-index: 10;
|
|
14527
14221
|
}
|
|
14528
|
-
`}const
|
|
14222
|
+
`}const kf=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:l})=>{const{prefix:d}=y.useScopedStyles(),c=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:m,type:x}=e,b=a.useRef(null),[T,f]=a.useState(!1),[L,$]=a.useState(0),R=a.useRef(!1),A=a.useRef(!1),C=a.useRef(!1),U=a.useMemo(()=>(t??[]).filter(h=>Mi(h).length>0),[t]),E=T&&U.length>0,O=!n,I=a.useCallback(()=>{O&&(C.current=!0,Gm(A.current,c),A.current=!1)},[O,c]),w=(h=0)=>{if(U.length===0||n&&!i&&!o)return;const S=Xo(U,x),M=Math.max(0,Math.min(h,S.length-1));if($(M),O){const z=Ul();Kl(M+1,c,z),A.current=!z}f(!0)},F=a.useCallback(()=>{f(!1),C.current=!1},[]);return a.useEffect(()=>{!n||i||o||f(!1)},[n,i,o]),a.useEffect(()=>{if(!O||R.current)return;R.current=!0;const h=Cs(c);if(!h)return;const S=Ts(h,Xo(U,x).length);S<0||($(S),f(!0))},[U,c,O,x]),a.useEffect(()=>{if(!O)return;const h=()=>{if(C.current){C.current=!1,f(!1);return}const S=Cs(c);if(!S){f(!1);return}const M=Ts(S,Xo(U,x).length);if(M<0){f(!1);return}A.current=!1,$(M),f(!0)};return window.addEventListener("popstate",h),()=>window.removeEventListener("popstate",h)},[U,c,O,x]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:b,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Mf(d)}}),u?r.jsx("button",{type:"button",className:`${d}-cover ${Pn(m)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>w(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...Pn(m)?{"--image-aspect-ratio":Tr(m)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${Pn(m)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),E&&typeof document<"u"&&(()=>{const h=(s?document.getElementById(s):null)??document.body;return mi.createPortal(r.jsx(Ef,{prefix:d,entries:U,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:L,enableUrlSync:O,journalItemId:c,onBeforeClose:I,onClose:F}),h)})()]})},Af=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
|
|
14529
14223
|
import { createPortal } from 'react-dom';
|
|
14530
14224
|
import { CommonComponentProps } from '../props';
|
|
14531
14225
|
import { useScopedStyles } from '../utils/useScopedStyles';
|
|
@@ -14915,18 +14609,6 @@ function getCSS(P: string): string {
|
|
|
14915
14609
|
background: transparent;
|
|
14916
14610
|
}
|
|
14917
14611
|
|
|
14918
|
-
.\${P}-title-resize-handle::after {
|
|
14919
|
-
content: '';
|
|
14920
|
-
position: absolute;
|
|
14921
|
-
top: 0;
|
|
14922
|
-
left: 50%;
|
|
14923
|
-
transform: translateX(-50%);
|
|
14924
|
-
width: 2px;
|
|
14925
|
-
height: 100%;
|
|
14926
|
-
background: #FF5C02;
|
|
14927
|
-
pointer-events: none;
|
|
14928
|
-
}
|
|
14929
|
-
|
|
14930
14612
|
.\${P}-titles-stack {
|
|
14931
14613
|
position: relative;
|
|
14932
14614
|
display: flex;
|
|
@@ -15293,7 +14975,7 @@ export type LightboxJournalSettings = {
|
|
|
15293
14975
|
closeIconColor: string;
|
|
15294
14976
|
closeIconHoverColor: string;
|
|
15295
14977
|
};
|
|
15296
|
-
`,Nf="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),si={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",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Hf(e){const t={};return t[Be(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSettings")]={...si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSize")]={...si.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Be(e,"lineHeight")]={...si.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Be(e,"letterSpacing")]={...si.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Be(e,"wordSpacing")]={...si.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Be(e,"textAlign")]={...si.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Be(e,"textAppearance")]={...si.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const jf=Kn.reduce((e,t)=>({...e,...Hf(t)}),{}),Of=Kn.reduce((e,t)=>({...e,[Be(t,"fontFamily")]:"Goudy Bookletter 1911",[Be(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Be(t,"letterSpacing")]:0,[Be(t,"wordSpacing")]:0,[Be(t,"textAlign")]:"left",[Be(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Jr(e){return Kn.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Be(n,"fontSize")]=i),o!==void 0&&(t[Be(n,"lineHeight")]=o),t},{})}const zf=tg(),Bf={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{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"}}},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},maxHeight:{type:"number",scope:"layout",title:"Max Height (%)",min:0,max:100,display:{type:"percentage-input"}},maxWidth:{type:"number",scope:"layout",title:"Max Width (%)",min:0,max:100,display:{type:"percentage-input"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control",visible:!1}},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},textTransition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["none","fade"]}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},countCloseGap:{type:"number",scope:"layout",title:"Count / Close Gap",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},countColor:{type:"string",scope:"common",title:"Count Default",display:{type:"palette-color-picker"}},...jf,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Nf,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...Of,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.04,...Jr({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...Jr({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...Jr({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098,countFontSize:.008,countLineHeight:.0098})}},layout:["__componentName__","maxWidth","maxHeight","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","countCloseGap","contentMarginTop","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["type"]},{type:"row",title:"Image",items:["maxWidth","maxHeight"]},{type:"row",title:"Text",items:["textTransition"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover Image",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[zf]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"}]}]}},Df={element:Wf,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:Bf,sourceCode:_f,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Kn.map(e=>({path:`${Be(e,"fontFamily")}`}))]},fontRelations:{...Kn.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Be(t,"fontFamily")}`}),{})}},Vf={sizeType:"custom",value:700,min:400,max:700};function sr(e,t){return{widthPx:e,heightPx:e*t}}function fa(e,t,n,i,o,s){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,s/2),i-s/2)}}function Js(e,t,n,i){const{heightPx:o}=sr(n,i);return fa(e/2,t/2,e,t,n,o)}function hc(e,t,n){for(const i of n){const{heightPx:o}=sr(i.widthPx,i.aspectRatio),s=i.widthPx/2,l=o/2;if(e>=i.x-s&&e<=i.x+s&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function Gf(e,t,n,i,o,s,l,d){if(o==="system")return"none";const c=i.getBoundingClientRect(),u=document.elementFromPoint(c.left+e,c.top+t);return u&&u.closest("a")?"none":hc(e,t,n)||s==="area"?l??"none":d??"none"}function Qs(e,t,n){var d;const{sizeType:i,value:o,min:s,max:l}=t;return i==="custom"?o:i==="as is"?((d=n.get(e))==null?void 0:d.naturalWidth)??o:Math.round(Math.random()*(l-s)+s)}function qf(e){return`
|
|
14978
|
+
`,Pf="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),ai={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",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Wf(e){const t={};return t[ze(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ze(e,"fontSettings")]={...ai.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ze(e,"fontSize")]={...ai.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ze(e,"lineHeight")]={...ai.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ze(e,"letterSpacing")]={...ai.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ze(e,"wordSpacing")]={...ai.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ze(e,"textAlign")]={...ai.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ze(e,"textAppearance")]={...ai.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Ff=qn.reduce((e,t)=>({...e,...Wf(t)}),{}),_f=qn.reduce((e,t)=>({...e,[ze(t,"fontFamily")]:"Goudy Bookletter 1911",[ze(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ze(t,"letterSpacing")]:0,[ze(t,"wordSpacing")]:0,[ze(t,"textAlign")]:"left",[ze(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Zr(e){return qn.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ze(n,"fontSize")]=i),o!==void 0&&(t[ze(n,"lineHeight")]=o),t},{})}const Nf=Jm(),Hf={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{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"}}},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},maxHeight:{type:"number",scope:"layout",title:"Max Height (%)",min:0,max:100,display:{type:"percentage-input"}},maxWidth:{type:"number",scope:"layout",title:"Max Width (%)",min:0,max:100,display:{type:"percentage-input"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control",visible:!1}},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},textTransition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["none","fade"]}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},countCloseGap:{type:"number",scope:"layout",title:"Count / Close Gap",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},countColor:{type:"string",scope:"common",title:"Count Default",display:{type:"palette-color-picker"}},...Ff,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Pf,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",..._f,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.04,...Zr({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...Zr({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...Zr({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098,countFontSize:.008,countLineHeight:.0098})}},layout:["__componentName__","maxWidth","maxHeight","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","countCloseGap","contentMarginTop","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["type"]},{type:"row",title:"Image",items:["maxWidth","maxHeight"]},{type:"row",title:"Text",items:["textTransition"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover Image",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Nf]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"}]}]}},Of={element:kf,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:Hf,sourceCode:Af,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...qn.map(e=>({path:`${ze(e,"fontFamily")}`}))]},fontRelations:{...qn.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ze(t,"fontFamily")}`}),{})}},jf={sizeType:"custom",value:700,min:400,max:700};function ar(e,t){return{widthPx:e,heightPx:e*t}}function ha(e,t,n,i,o,s){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,s/2),i-s/2)}}function Zs(e,t,n,i){const{heightPx:o}=ar(n,i);return ha(e/2,t/2,e,t,n,o)}function gc(e,t,n){for(const i of n){const{heightPx:o}=ar(i.widthPx,i.aspectRatio),s=i.widthPx/2,l=o/2;if(e>=i.x-s&&e<=i.x+s&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function zf(e,t,n,i,o,s,l,d){if(o==="system")return"none";const c=i.getBoundingClientRect(),u=document.elementFromPoint(c.left+e,c.top+t);return u&&u.closest("a")?"none":gc(e,t,n)||s==="area"?l??"none":d??"none"}function Js(e,t,n){var d;const{sizeType:i,value:o,min:s,max:l}=t;return i==="custom"?o:i==="as is"?((d=n.get(e))==null?void 0:d.naturalWidth)??o:Math.round(Math.random()*(l-s)+s)}function Bf(e){return`
|
|
15297
14979
|
.${e}-root {
|
|
15298
14980
|
position: absolute;
|
|
15299
14981
|
top: 0;
|
|
@@ -15328,7 +15010,7 @@ export type LightboxJournalSettings = {
|
|
|
15328
15010
|
width: 32px;
|
|
15329
15011
|
height: 32px;
|
|
15330
15012
|
}
|
|
15331
|
-
`}function
|
|
15013
|
+
`}function Df(e){return new Promise(t=>{const n=new Image;n.onload=()=>{t({aspectRatio:n.naturalHeight/n.naturalWidth,naturalWidth:n.naturalWidth})},n.onerror=()=>{t({aspectRatio:1,naturalWidth:700})},n.src=e})}async function Vf(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await Df(i)]));return new Map(n)}function Gf({settings:e,content:t=[],isEditor:n}){const{prefix:i}=y.useScopedStyles(),[o,s]=a.useState(null),[l,d]=a.useState([]),[c,u]=a.useState(0),m=a.useRef(0),[x,b]=a.useState({x:0,y:0}),[T,f]=a.useState("none"),L=a.useRef({x:0,y:0}),[$,R]=a.useState(!1),[A,C]=a.useState(!1),U=a.useRef(new Map),{imageSize:E=jf,cursor:O="system",target:I="area",position:w="random",visible:F="all",defaultCursor:h=null,hoverCursor:S=null}=e,M=a.useMemo(()=>Bf(i),[i]),z=a.useCallback((N,W,P=l)=>{if(!o)return;const q=o.getBoundingClientRect(),G=N-q.left,Z=W-q.top;b({x:G,y:Z}),f(zf(G,Z,P,o,O,I,S,h))},[o,l,O,I,S,h]);a.useEffect(()=>{const N=[...t.map(P=>P.image.url),h,S].filter(P=>!!P);if(N.length===0){U.current=new Map,C(!0);return}let W=!1;return C(!1),Vf(N).then(P=>{W||(U.current=P,C(!0))}),()=>{W=!0}},[t,h,S]),a.useEffect(()=>{if(!o)return;const N=P=>{P.stopPropagation(),L.current={x:P.clientX,y:P.clientY},z(P.clientX,P.clientY)},W=()=>{$&&z(L.current.x,L.current.y)};return o.addEventListener("mousemove",N),window.addEventListener("scroll",W,!0),()=>{o.removeEventListener("mousemove",N),window.removeEventListener("scroll",W,!0)}},[o,$,z]),a.useEffect(()=>{!o||!$||z(L.current.x,L.current.y)},[l,o,$,z]),a.useEffect(()=>{$||f("none")},[$]);const K=(N,W,P,q={})=>{var fe;const G=((fe=U.current.get(N.image.url))==null?void 0:fe.aspectRatio)??1,Z=Js(N.image.url,E,U.current),{heightPx:_}=ar(Z,G);let me=0,v=0;return w==="same"?{x:me,y:v}=Zs(W,P,Z,G):(me=q.x??Math.random()*W,v=q.y??Math.random()*P,{x:me,y:v}=ha(me,v,W,P,Z,_)),{id:m.current++,url:N.image.url,link:N.link,name:N.image.name,x:me,y:v,xRatio:me/W,yRatio:v/P,aspectRatio:G,widthPx:Z}},se=()=>{if(!o)return;const N=o.getBoundingClientRect(),W=N.width,P=N.height;W===0||P===0||d(q=>q.length===0?q:q.map(G=>{const Z=E.sizeType==="random"?G.widthPx:Js(G.url,E,U.current),{heightPx:_}=ar(Z,G.aspectRatio);if(w==="same"){const{x:fe,y:J}=Zs(W,P,Z,G.aspectRatio);return{...G,x:fe,y:J,widthPx:Z}}const{x:me,y:v}=ha(G.xRatio*W,G.yRatio*P,W,P,Z,_);return{...G,x:me,y:v,widthPx:Z}}))};a.useEffect(()=>{if(!o||t.length===0||!A)return;const N=o.getBoundingClientRect(),W=N.width,P=N.height,q=K(t[0],W,P);d([q]),u(1)},[E,w,o,t,A]),a.useEffect(()=>{if(!o)return;se();const N=new ResizeObserver(se);return N.observe(o),window.addEventListener("resize",se),()=>{N.disconnect(),window.removeEventListener("resize",se)}},[o,w,E,l.length]),a.useEffect(()=>{F==="last One"&&d(N=>N.length>0?[N[N.length-1]]:[])},[F]);const Y=N=>{if(!o||t.length===0||!A)return;const W=o.getBoundingClientRect(),P=N.clientX-W.left,q=N.clientY-W.top;if(I==="image"&&!gc(P,q,l))return;let G=0,Z=0;w==="on Click"?(G=P,Z=q):w==="same"?(G=W.width/2,Z=W.height/2):(G=Math.random()*W.width,Z=Math.random()*W.height);const _=t[c],me=K(_,W.width,W.height,{x:G,y:Z}),v=F==="all"?[...l,me]:[me];d(v),u(fe=>fe>=t.length-1?0:fe+1),z(N.clientX,N.clientY,v)},D=O==="custom"&&T!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:M}}),r.jsxs("div",{ref:s,onClick:Y,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),className:`${i}-root`,style:{cursor:D?"none":"default"},children:[l.map(N=>r.jsx("div",{className:`${i}-wrapper`,style:{top:`${N.y}px`,left:`${N.x}px`,width:`${N.widthPx}px`,cursor:D?"none":"default"},children:I==="area"&&N.link?r.jsx("a",{href:N.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:r.jsx("img",{src:N.url,alt:N.name,className:`${i}-image`})}):r.jsx("img",{src:N.url,alt:N.name,className:`${i}-image`})},N.id)),$&&D&&r.jsx("div",{className:`${i}-cursor`,style:{left:`${x.x}px`,top:`${x.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${T}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const qf=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
15332
15014
|
import { CommonComponentProps } from '../props';
|
|
15333
15015
|
import { useScopedStyles } from '../utils/index';
|
|
15334
15016
|
|
|
@@ -15849,7 +15531,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
|
|
|
15849
15531
|
</>
|
|
15850
15532
|
);
|
|
15851
15533
|
}
|
|
15852
|
-
`,
|
|
15534
|
+
`,Kf={type:"object",version:1,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"}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"Slider-1.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"Slider-2.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"Slider-3.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"Slider-4.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"Slider-5.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"Slider-6.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"Slider-7.png"},link:""}]},settings:{sizing:"manual",properties:{imageSize:{type:"object",scope:"layout",title:"Img Size",display:{type:"toggle-cycle-numeric-input",enum:["custom","as is","random"],inputs:{custom:"single","as is":"none",random:"range"},defaultValue:700,defaultMin:400,defaultMax:700},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},cursor:{type:"string",scope:"common",title:"Cursor",display:{type:"toggle-cycle",enum:["system","custom"]}},target:{type:"string",scope:"common",title:"Target",display:{type:"toggle-cycle",enum:["area","image"]}},position:{type:"string",scope:"common",title:"Position",display:{type:"toggle-cycle",enum:["random","same","on Click"]}},visible:{type:"string",scope:"common",title:"Visible",display:{type:"toggle-cycle",enum:["all","last One"]}},defaultCursor:{type:["string","null"],scope:"common",title:"Default",display:{type:"settings-image-input",visible:!1}},hoverCursor:{type:["string","null"],scope:"common",title:"Hover",display:{type:"settings-image-input",visible:!1}}},defaults:{imageSize:{sizeType:"custom",value:700,min:400,max:700},cursor:"system",target:"area",position:"random",visible:"all",defaultCursor:null,hoverCursor:null},layoutDefaults:{m:{imageSize:{sizeType:"custom",value:500,min:400,max:700}},t:{imageSize:{sizeType:"custom",value:600,min:400,max:700}},d:{imageSize:{sizeType:"custom",value:700,min:400,max:700}}},displayRules:[{if:{name:"cursor",value:"custom"},then:{name:"properties.defaultCursor.display.visible",value:!0}},{if:{name:"cursor",value:"custom"},then:{name:"properties.hoverCursor.display.visible",value:!0}}],layout:["__componentName__","imageSize","cursor","target","position","visible","defaultCursor","hoverCursor"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["imageSize"]},{type:"row",title:"",items:["cursor","target"]},{type:"row",title:"",items:["position","visible"]},{type:"row",title:"Custom Cursor",items:["defaultCursor","hoverCursor"]}]}]},Uf={element:Gf,id:"click-gallerie",name:"Click",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},schema:Kf,sourceCode:qf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},Xf=100,Yf=70,Hn="cubic-bezier(0.86, 0, 0.07, 1)";function Zf(e){return`
|
|
15853
15535
|
.${e}-wrapper {
|
|
15854
15536
|
position: relative;
|
|
15855
15537
|
width: 100%;
|
|
@@ -15884,34 +15566,34 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
|
|
|
15884
15566
|
}
|
|
15885
15567
|
.${e}-incoming-next {
|
|
15886
15568
|
z-index: 4;
|
|
15887
|
-
transition: transform var(--${e}-transition-ms) ${
|
|
15569
|
+
transition: transform var(--${e}-transition-ms) ${Hn};
|
|
15888
15570
|
}
|
|
15889
15571
|
.${e}-incoming-prev {
|
|
15890
15572
|
z-index: 4;
|
|
15891
|
-
transition: transform var(--${e}-transition-ms) ${
|
|
15573
|
+
transition: transform var(--${e}-transition-ms) ${Hn};
|
|
15892
15574
|
}
|
|
15893
15575
|
.${e}-outgoing {
|
|
15894
15576
|
will-change: transform;
|
|
15895
15577
|
}
|
|
15896
15578
|
.${e}-outgoing-next {
|
|
15897
15579
|
z-index: 3;
|
|
15898
|
-
transition: transform var(--${e}-transition-ms) ${
|
|
15580
|
+
transition: transform var(--${e}-transition-ms) ${Hn};
|
|
15899
15581
|
}
|
|
15900
15582
|
.${e}-outgoing-prev {
|
|
15901
15583
|
z-index: 3;
|
|
15902
|
-
transition: transform var(--${e}-transition-ms) ${
|
|
15584
|
+
transition: transform var(--${e}-transition-ms) ${Hn};
|
|
15903
15585
|
}
|
|
15904
15586
|
.${e}-outgoing-next .${e}-effect-image {
|
|
15905
|
-
transition: filter var(--${e}-transition-ms) ${
|
|
15587
|
+
transition: filter var(--${e}-transition-ms) ${Hn};
|
|
15906
15588
|
}
|
|
15907
15589
|
.${e}-outgoing-prev .${e}-effect-image {
|
|
15908
|
-
transition: filter var(--${e}-transition-ms) ${
|
|
15590
|
+
transition: filter var(--${e}-transition-ms) ${Hn};
|
|
15909
15591
|
}
|
|
15910
15592
|
.${e}-incoming .${e}-effect-image {
|
|
15911
|
-
transition: filter var(--${e}-transition-ms) ${
|
|
15593
|
+
transition: filter var(--${e}-transition-ms) ${Hn};
|
|
15912
15594
|
}
|
|
15913
15595
|
.${e}-background .${e}-effect-image {
|
|
15914
|
-
transition: filter var(--${e}-transition-ms) ${
|
|
15596
|
+
transition: filter var(--${e}-transition-ms) ${Hn};
|
|
15915
15597
|
}
|
|
15916
15598
|
.${e}-snap .${e}-incoming,
|
|
15917
15599
|
.${e}-snap .${e}-outgoing,
|
|
@@ -15959,7 +15641,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
|
|
|
15959
15641
|
display: block;
|
|
15960
15642
|
pointer-events: none;
|
|
15961
15643
|
}
|
|
15962
|
-
`}function
|
|
15644
|
+
`}function Jf(e){return e==="blur"?Yf:e==="greyscale"?Xf:0}function Ki(e,t=1,n=1){const i=Jf(e)*Math.max(0,Math.min(1,t));if(e==="greyscale")return`grayscale(${i}%)`;if(e==="blur"){const o=i/4;return o<=0?"none":`blur(${o/Math.max(n,1)}px)`}return"none"}function Qs(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Qf(e,t){return t<=1?0:(e-1+t)%t}function ey(e,t=1){return!e||e.height===0?t:e.width/e.height}function ty(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const s=e*i/100,l=t*o/100;let d=s,c=d/n;return c>l&&(c=l,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function el(e,t,n){if(e<=0||t<=0)return 1;const i=e*n.widthPercent/100,o=t*n.heightPercent/100;return i<=0||o<=0?1:Math.max(e/i,t/o)}function hc(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function tl(e,t,n){return{...hc(e),[`--${n}-stage-scale`]:t}}function ny(e,t){[...new Set(e.filter(Boolean))].forEach(i=>{const o=new Image;o.onload=()=>{o.naturalWidth>0&&o.naturalHeight>0&&t(i,{width:o.naturalWidth,height:o.naturalHeight})},o.src=i})}function iy({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Se,j,de,H,re,ae,ne;const{prefix:o}=y.useScopedStyles(),s=a.useMemo(()=>Zf(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:m="greyscale"}=e,x=t??[],b=Qs(x.length),[T,f]=a.useState(b.activeIndex),[L,$]=a.useState(b.backgroundIndex),[R,A]=a.useState(!1),[C,U]=a.useState(!1),[E,O]=a.useState(null),[I,w]=a.useState(null),[F,h]=a.useState(0),[S,M]=a.useState(1),[z,K]=a.useState("none"),[se,Y]=a.useState("next"),[D,N]=a.useState({}),[W,P]=a.useState({width:0,height:0}),q=a.useRef(null),G=a.useRef(null),Z=!n||!!i,_=l??60,me=Math.max(10,Math.min(100,d??_)),v=Math.max(10,Math.min(100,c??_)),fe=Math.max(100,u),J=Ki(m),ce=a.useCallback(ie=>{const be=ey(ie?D[ie]:void 0);return ty(W.width,W.height,be,me,v)},[W.height,W.width,D,v,me]);a.useEffect(()=>{const ie=G.current;if(!ie)return;const be=new ResizeObserver(([Te])=>{const{width:ee,height:pe}=Te.contentRect;P({width:ee,height:pe})});return be.observe(ie),()=>be.disconnect()},[]),a.useEffect(()=>{const ie=(t??[]).map(be=>{var Te;return(Te=be.image)==null?void 0:Te.url}).filter(be=>!!be);ny(ie,(be,Te)=>{N(ee=>{var pe,Pe;return((pe=ee[be])==null?void 0:pe.width)===Te.width&&((Pe=ee[be])==null?void 0:Pe.height)===Te.height?ee:{...ee,[be]:Te}})})},[t]),a.useEffect(()=>{const{backgroundIndex:ie,activeIndex:be}=Qs(x.length);f(be),$(ie),A(!1),U(!1),O(null),w(null),h(0),M(1),K("none"),Y("next")},[x.length,t]),a.useEffect(()=>()=>{q.current&&clearTimeout(q.current)},[]);const Ce=a.useCallback(ie=>{var le,V,He,Fe;if(!Z||R||x.length<=1)return;const be=ie==="next"?(T+1)%x.length:(T-1+x.length)%x.length,Te=ce((V=(le=x[T])==null?void 0:le.image)==null?void 0:V.url),ee=ce((Fe=(He=x[be])==null?void 0:He.image)==null?void 0:Fe.url),pe=el(W.width,W.height,Te),Pe=el(W.width,W.height,ee);q.current&&clearTimeout(q.current),Y(ie),U(!0),A(!0),ie==="next"?(O(T),w(be),h(0),M(1),K(Ki(m,0,1))):($(Qf(be,x.length)),O(be),w(T),h(1),M(Pe),K(Ki(m,1,Pe))),requestAnimationFrame(()=>{U(!1),requestAnimationFrame(()=>{ie==="next"?(h(1),M(pe),K(Ki(m,1,pe))):(h(0),M(1),K(Ki(m,0,1)))})}),q.current=setTimeout(()=>{ie==="next"&&$(T),f(be),O(null),w(null),A(!1)},fe)},[T,m,W.height,W.width,ce,R,Z,x,fe]),oe=x[T],xe=L!==null?x[L]:null,Q=E!==null?x[E]:null,ye=I!==null?x[I]:null,ve=x.length<=1?0:(T-1+x.length)%x.length,Me=x.length<=1?0:(T+1)%x.length,we=ce((Se=oe==null?void 0:oe.image)==null?void 0:Se.url),Ae=ce((j=Q==null?void 0:Q.image)==null?void 0:j.url),X=ce((de=ye==null?void 0:ye.image)==null?void 0:de.url),ue={[`--${o}-transition-ms`]:`${fe}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),r.jsxs("div",{ref:G,className:nt(`${o}-wrapper`,C&&`${o}-snap`,n&&!i&&`${o}-editor`),style:ue,"aria-label":"Zoom gallery",children:[((H=xe==null?void 0:xe.image)==null?void 0:H.url)&&r.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:xe.image.url,alt:"",style:{filter:J}})}),R&&((re=Q==null?void 0:Q.image)==null?void 0:re.url)&&r.jsx("div",{className:nt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${se}`),style:tl(Ae,S,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:Q.image.url,alt:"",style:{filter:z}})}),R&&((ae=ye==null?void 0:ye.image)==null?void 0:ae.url)&&r.jsx("div",{className:nt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${se}`),style:tl(X,F,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:ye.image.url,alt:""})}),!R&&((ne=oe==null?void 0:oe.image)==null?void 0:ne.url)&&r.jsx("div",{className:nt(`${o}-stage`,`${o}-foreground`),style:hc(we),children:r.jsx("img",{className:`${o}-image`,src:oe.image.url,alt:oe.image.name??""})}),Z&&x.length>1&&!R&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:nt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Ce("prev"),"aria-label":`Show previous image (${ve+1} of ${x.length})`}),r.jsx("button",{type:"button",className:nt(`${o}-nav`,`${o}-nav-next`),onClick:()=>Ce("next"),"aria-label":`Show next image (${Me+1} of ${x.length})`})]})]})]})}const oy=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
15963
15645
|
import cn from 'classnames';
|
|
15964
15646
|
import { CommonComponentProps } from '../props';
|
|
15965
15647
|
import { useScopedStyles } from '../utils/useScopedStyles';
|
|
@@ -16478,7 +16160,7 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
|
|
|
16478
16160
|
</>
|
|
16479
16161
|
);
|
|
16480
16162
|
}
|
|
16481
|
-
`,
|
|
16163
|
+
`,ry={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""}}]}},ay={element:iy,id:"scale",name:"Scale",category:"galleries",version:1,defaultSize:{d:{width:920,height:540},m:{width:"100%",height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Scale.mp4"},schema:ry,sourceCode:oy,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},sy={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},ly=["hover","active"],Jr={left:"flex-start",center:"center",right:"flex-end"};function cy(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function dy(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function uy(e){const t=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-box-shadow-color, transparent)`,n=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-inner-box-shadow-color, transparent)`,i=`${t}, ${n}`,o=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,s=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-hover-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,l=`${o}, ${s}`,d=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,c=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-active-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,u=`${d}, ${c}`,m=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,x=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,b=`.${e}-button:hover, ${x}`,T=f=>`.${e}-hover-effect-${f}:hover, .${e}-hover-effect-${f}:focus-visible, a:focus-visible .${e}-hover-effect-${f}`;return`
|
|
16482
16164
|
.${e}-root {
|
|
16483
16165
|
line-height: 0;
|
|
16484
16166
|
}
|
|
@@ -16718,7 +16400,7 @@ a:active .${e}-button .${e}-icon-image,
|
|
|
16718
16400
|
height: calc(1em * var(--${e}-icon-scale, 1));
|
|
16719
16401
|
width: calc(1em * var(--${e}-icon-scale, 1));
|
|
16720
16402
|
}
|
|
16721
|
-
`}function
|
|
16403
|
+
`}function Qr(e,t,n="",i,o){const s=t();return r.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[r.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:s}),r.jsxs("span",{className:`${e}-content-roll-viewport`,children:[r.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),r.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function nl(e,t,n="fill",i=100,o=0,s){if(!t)return null;const l=r.jsx(on,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return r.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const d=y.scalingValue(o,s);return r.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:l})}return r.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function py({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:s}=y.useScopedStyles(),l=a.useMemo(()=>uy(s),[s]),{type:d="a",label:c="Button",icon:u,alignment:m="center",alignA:x,order:b="text-icon",gap:T=0,iconSize:f=0,iconWidthC:L=0,dimensions:$=!1,padding:R={top:0,right:0,bottom:0,left:0},cornerRadius:A=0,boxShadow:C={top:0,left:0,right:0,bottom:0},boxShadowColor:U="rgba(0, 0, 0, 0)",innerBoxShadow:E={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:O="rgba(0, 0, 0, 0)",stroke:I=0,backgroundColor:w="#000000",textColor:F="#ffffff",borderColor:h="#ffffff",iconColor:S="#ffffff",hoverEffect:M="none",fontFamily:z,fontSettings:K,fontSize:se,lineHeight:Y,letterSpacing:D=0,wordSpacing:N=0,textAppearance:W,stateOverrides:P,minWidth:q=0,minHeight:G=0,width:Z=0,height:_=0}=e,me=y.buildColorVars(s,{backgroundColor:w,textColor:F,borderColor:h,iconColor:S,boxShadowColor:U,innerBoxShadowColor:O},sy,ly,P),v=i&&i!=="default"?`${s}-state-${i}`:"",fe=t&&!n?`${s}-editing`:"",J=M!=="none"&&(!t||n||i==="hover")?`${s}-hover-effect-${M}`:"",ce=M==="reveal"||M==="swipe",Ce=M==="content-roll",oe=M==="reveal"&&(!t||n),xe=$===!0,ye=d==="a"?x??m:m,ve=d==="c",Me=d!=="b",we={fontSettings:{fontFamily:z,fontWeight:(K==null?void 0:K.fontWeight)??400,fontStyle:(K==null?void 0:K.fontStyle)??"normal"},fontSize:se??.01,lineHeight:Y,letterSpacing:D,wordSpacing:N,textAppearance:W,color:F},X={...Me?cn(Xt(we,t)):{},[`--${s}-box-shadow-x`]:y.scalingValue(C.left,t),[`--${s}-box-shadow-y`]:y.scalingValue(C.top,t),[`--${s}-box-shadow-blur`]:y.scalingValue(C.right,t),[`--${s}-box-shadow-spread`]:y.scalingValue(C.bottom,t),[`--${s}-inner-box-shadow-x`]:y.scalingValue(E.left,t),[`--${s}-inner-box-shadow-y`]:y.scalingValue(E.top,t),[`--${s}-inner-box-shadow-blur`]:y.scalingValue(E.right,t),[`--${s}-inner-box-shadow-spread`]:y.scalingValue(E.bottom,t),paddingTop:y.scalingValue(R.top,t),paddingRight:y.scalingValue(R.right,t),paddingBottom:y.scalingValue(R.bottom,t),paddingLeft:y.scalingValue(R.left,t),borderRadius:y.scalingValue(A,t),borderWidth:y.scalingValue(I,t),...ve?{}:{justifyContent:Jr[ye],textAlign:ye},...ve&&!Ce?{gap:y.scalingValue(T,t)}:{},...xe?{width:y.scalingValue(Z,t),height:y.scalingValue(_,t)}:{minWidth:y.scalingValue(q,t),minHeight:y.scalingValue(G,t),...ve?{width:"100%"}:{}}};let ue;const Se={display:"inline-flex",alignItems:"center",justifyContent:ve?Jr[ye]:Jr[d==="a"?ye:"center"],gap:ve?y.scalingValue(T,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:ye}:{}};if(d==="b"){const H=()=>nl(s,u,f>0?"fixed":"fill",100,f,t);ue=Ce?Qr(s,H,`${s}-icon-roll`,void 0,Se):H()}else if(d==="c"){const H=()=>{const re=r.jsx("span",{className:`${s}-text`,style:{textAlign:ye},children:c}),ae=nl(s,u,L>0?"fixed":"fill",100,L,t);return b==="icon-text"?r.jsxs(r.Fragment,{children:[ae,re]}):r.jsxs(r.Fragment,{children:[re,ae]})};ue=Ce?Qr(s,H,`${s}-icon-text-roll`,void 0,Se):H()}else ue=Ce?Qr(s,()=>c,`${s}-label-roll`,void 0,Se):ce?r.jsx("span",{className:`${s}-button-inner`,children:c}):c;const j=oe?H=>cy(H,s):void 0,de=oe?H=>dy(H,s):void 0;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),r.jsx("div",{className:`${s}-root`,style:me,children:r.jsx("div",{className:`${s}-wrapper ${v} ${fe}`.trim(),children:r.jsx("div",{className:`${s}-button ${J}`.trim(),style:X,onMouseEnter:j,onMouseLeave:de,role:"button",tabIndex:o||t&&!n?void 0:0,children:ue})})})]})}const my=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
|
|
16722
16404
|
import { SvgImage } from '../helpers/SvgImage/SvgImage';
|
|
16723
16405
|
import { CommonComponentProps } from '../props';
|
|
16724
16406
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
|
|
@@ -17345,7 +17027,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
|
|
|
17345
17027
|
</>
|
|
17346
17028
|
);
|
|
17347
17029
|
}
|
|
17348
|
-
`,vy={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},xy=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],by={type:"object",version:1,settings:{sizing:"auto",hasLinkParameter:!0,properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},label:{type:"string",scope:"common",title:"Label",display:{type:"label-input"}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"settings-image-input",visible:!1}},alignment:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"]}},alignA:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"],visible:!1}},order:{type:"string",scope:"layout",title:"Order",display:{type:"toggle-cycle",enum:["text-icon","icon-text"],visible:!1}},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconSize:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconWidthC:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},dimensions:{type:"boolean",scope:"layout",title:"Dimensions",display:{type:"toggle",enum:["auto","fixed"]}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}},boxShadow:{type:"object",scope:"layout",title:"Shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},boxShadowColor:{type:"string",scope:"common",title:"Shadow Default",titleByState:{default:"Shadow Default",hover:"Shadow Hover",active:"Shadow Active"},display:{type:"palette-color-picker"}},innerBoxShadow:{type:"object",scope:"layout",title:"Inner shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},innerBoxShadowColor:{type:"string",scope:"common",title:"Inner Shadow Default",titleByState:{default:"Inner Shadow Default",hover:"Inner Shadow Hover",active:"Inner Shadow Active"},display:{type:"palette-color-picker"}},stroke:{type:"number",scope:"layout",title:"Stroke Width",display:{type:"numeric-input"},min:0,max:9999},backgroundColor:{type:"string",scope:"common",title:"Background Default",titleByState:{default:"Background Default",hover:"Background Hover",active:"Background Active"},display:{type:"palette-color-picker"}},textColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover",active:"Text Active"},display:{type:"palette-color-picker"}},borderColor:{type:"string",scope:"common",title:"Border Default",titleByState:{default:"Border Default",hover:"Border Hover",active:"Border Active"},display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover",active:"Icon Active"},display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},hoverEffect:{type:"string",scope:"layout",title:"Hover effect",display:{type:"toggle-cycle",enum:["none","scale-up","lift","reveal","swipe","content-roll"]}},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},fontSettings:{...vy.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},fontSize:{type:"number",scope:"layout",title:"Font size",display:{type:"font-size"}},lineHeight:{type:"number",scope:"layout",title:"Line height",display:{type:"line-height-input"}},letterSpacing:{type:"number",scope:"layout",title:"Letter spacing",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",scope:"layout",title:"Word spacing",display:{type:"word-spacing-input"}},textAppearance:{type:"object",scope:"layout",title:"Text appearance",display:{type:"text-appearance"}},minWidth:{type:"number",scope:"layout",title:"Min width",display:{type:"numeric-input"},min:0,max:9999},minHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input",visible:!1},min:0,max:9999},height:{type:"number",scope:"layout",title:"Height",display:{type:"numeric-input",visible:!1},min:0,max:9999}},defaults:{label:"Button",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KY78A0YVT403B042HVWWTHBC.svg",boxShadowColor:"#000000",innerBoxShadowColor:"#000000",backgroundColor:"#2E12F0",textColor:"#ffffff",borderColor:"#ffffff",iconColor:"#ffffff",fontFamily:"Arial",fontSettings:{fontWeight:400,fontStyle:"normal"},stateOverrides:{hover:{backgroundColor:"#3642EF"},active:{backgroundColor:"#475FFF"}}},layoutDefaults:{m:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/375,right:20/375,bottom:10/375,left:20/375},minWidth:0/375,minHeight:0/375,width:100/375,height:100/375,cornerRadius:20/375,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,hoverEffect:"none",iconSize:16/375,gap:10/375,iconWidthC:16/375,fontSize:16/375,lineHeight:16/375,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},t:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/768,right:20/768,bottom:10/768,left:20/768},minWidth:0/768,minHeight:0/768,width:100/768,height:100/768,cornerRadius:20/768,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,hoverEffect:"none",iconSize:16/768,gap:10/768,iconWidthC:16/768,fontSize:16/768,lineHeight:16/768,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},d:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/1440,right:20/1440,bottom:10/1440,left:20/1440},minWidth:0/1440,minHeight:0/1440,width:100/1440,height:100/1440,cornerRadius:20/1440,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,hoverEffect:"none",iconSize:16/1440,gap:10/1440,iconWidthC:16/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}},layout:["__componentName__","type","label","icon","alignment","order","gap","iconSize","iconWidthC","hoverEffect",{type:"row",title:"",items:["dimensions","padding"]},"cornerRadius","boxShadow","boxShadowColor","innerBoxShadow","innerBoxShadowColor",{type:"row",title:"",items:["stroke","borderColor"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]}],displayRules:[{if:{name:"type",value:"a"},then:{name:"properties.icon.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignment.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignA.display.visible",value:!0}},{if:{name:"type",value:"a"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"b"},then:{name:"properties.label.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontFamily.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSettings.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSize.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.lineHeight.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.letterSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.wordSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.textAppearance.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.iconSize.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.order.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.iconWidthC.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.gap.display.visible",value:!0}},{if:{name:"stroke",value:0},then:{name:"properties.borderColor.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minWidth.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minHeight.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.width.display.visible",value:!0}},{if:{name:"dimensions",value:!0},then:{name:"properties.height.display.visible",value:!0}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["label","icon","iconSize","alignA"]},{type:"row",title:"",items:["alignment","order"]},{type:"row",title:"",items:["gap","iconWidthC"]},{type:"row",title:"",items:["dimensions","padding"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]},{type:"row",title:"",items:["hoverEffect","cornerRadius"]},{type:"row",title:"",items:["boxShadow"]},{type:"row",title:"",items:["innerBoxShadow"]},{type:"row",title:"",items:["stroke"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily","fontSettings",{type:"row",title:"",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAppearance"]}],paletteBookmark:{items:[...xy],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],hover:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],active:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"]}},states:["default","hover","active"]},wy={element:fy,id:"simple-button",name:"Simple Button",category:"ui-elements",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/button-preview.png"},schema:by,sourceCode:yy,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function Sy(e){return`
|
|
17030
|
+
`,gy={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},hy=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],fy={type:"object",version:1,settings:{sizing:"auto",hasLinkParameter:!0,properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},label:{type:"string",scope:"common",title:"Label",display:{type:"label-input"}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"settings-image-input",visible:!1}},alignment:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"]}},alignA:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"],visible:!1}},order:{type:"string",scope:"layout",title:"Order",display:{type:"toggle-cycle",enum:["text-icon","icon-text"],visible:!1}},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconSize:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconWidthC:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},dimensions:{type:"boolean",scope:"layout",title:"Dimensions",display:{type:"toggle",enum:["auto","fixed"]}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}},boxShadow:{type:"object",scope:"layout",title:"Shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},boxShadowColor:{type:"string",scope:"common",title:"Shadow Default",titleByState:{default:"Shadow Default",hover:"Shadow Hover",active:"Shadow Active"},display:{type:"palette-color-picker"}},innerBoxShadow:{type:"object",scope:"layout",title:"Inner shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},innerBoxShadowColor:{type:"string",scope:"common",title:"Inner Shadow Default",titleByState:{default:"Inner Shadow Default",hover:"Inner Shadow Hover",active:"Inner Shadow Active"},display:{type:"palette-color-picker"}},stroke:{type:"number",scope:"layout",title:"Stroke Width",display:{type:"numeric-input"},min:0,max:9999},backgroundColor:{type:"string",scope:"common",title:"Background Default",titleByState:{default:"Background Default",hover:"Background Hover",active:"Background Active"},display:{type:"palette-color-picker"}},textColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover",active:"Text Active"},display:{type:"palette-color-picker"}},borderColor:{type:"string",scope:"common",title:"Border Default",titleByState:{default:"Border Default",hover:"Border Hover",active:"Border Active"},display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover",active:"Icon Active"},display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},hoverEffect:{type:"string",scope:"layout",title:"Hover effect",display:{type:"toggle-cycle",enum:["none","scale-up","lift","reveal","swipe","content-roll"]}},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},fontSettings:{...gy.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},fontSize:{type:"number",scope:"layout",title:"Font size",display:{type:"font-size"}},lineHeight:{type:"number",scope:"layout",title:"Line height",display:{type:"line-height-input"}},letterSpacing:{type:"number",scope:"layout",title:"Letter spacing",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",scope:"layout",title:"Word spacing",display:{type:"word-spacing-input"}},textAppearance:{type:"object",scope:"layout",title:"Text appearance",display:{type:"text-appearance"}},minWidth:{type:"number",scope:"layout",title:"Min width",display:{type:"numeric-input"},min:0,max:9999},minHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input",visible:!1},min:0,max:9999},height:{type:"number",scope:"layout",title:"Height",display:{type:"numeric-input",visible:!1},min:0,max:9999}},defaults:{label:"Button",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KY78A0YVT403B042HVWWTHBC.svg",boxShadowColor:"#000000",innerBoxShadowColor:"#000000",backgroundColor:"#2E12F0",textColor:"#ffffff",borderColor:"#ffffff",iconColor:"#ffffff",fontFamily:"Arial",fontSettings:{fontWeight:400,fontStyle:"normal"},stateOverrides:{hover:{backgroundColor:"#3642EF"},active:{backgroundColor:"#475FFF"}}},layoutDefaults:{m:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/375,right:20/375,bottom:10/375,left:20/375},minWidth:0/375,minHeight:0/375,width:100/375,height:100/375,cornerRadius:20/375,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,hoverEffect:"none",iconSize:16/375,gap:10/375,iconWidthC:16/375,fontSize:16/375,lineHeight:16/375,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},t:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/768,right:20/768,bottom:10/768,left:20/768},minWidth:0/768,minHeight:0/768,width:100/768,height:100/768,cornerRadius:20/768,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,hoverEffect:"none",iconSize:16/768,gap:10/768,iconWidthC:16/768,fontSize:16/768,lineHeight:16/768,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},d:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/1440,right:20/1440,bottom:10/1440,left:20/1440},minWidth:0/1440,minHeight:0/1440,width:100/1440,height:100/1440,cornerRadius:20/1440,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,hoverEffect:"none",iconSize:16/1440,gap:10/1440,iconWidthC:16/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}},layout:["__componentName__","type","label","icon","alignment","order","gap","iconSize","iconWidthC","hoverEffect",{type:"row",title:"",items:["dimensions","padding"]},"cornerRadius","boxShadow","boxShadowColor","innerBoxShadow","innerBoxShadowColor",{type:"row",title:"",items:["stroke","borderColor"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]}],displayRules:[{if:{name:"type",value:"a"},then:{name:"properties.icon.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignment.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignA.display.visible",value:!0}},{if:{name:"type",value:"a"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"b"},then:{name:"properties.label.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontFamily.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSettings.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSize.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.lineHeight.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.letterSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.wordSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.textAppearance.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.iconSize.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.order.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.iconWidthC.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.gap.display.visible",value:!0}},{if:{name:"stroke",value:0},then:{name:"properties.borderColor.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minWidth.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minHeight.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.width.display.visible",value:!0}},{if:{name:"dimensions",value:!0},then:{name:"properties.height.display.visible",value:!0}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["label","icon","iconSize","alignA"]},{type:"row",title:"",items:["alignment","order"]},{type:"row",title:"",items:["gap","iconWidthC"]},{type:"row",title:"",items:["dimensions","padding"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]},{type:"row",title:"",items:["hoverEffect","cornerRadius"]},{type:"row",title:"",items:["boxShadow"]},{type:"row",title:"",items:["innerBoxShadow"]},{type:"row",title:"",items:["stroke"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily","fontSettings",{type:"row",title:"",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAppearance"]}],paletteBookmark:{items:[...hy],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],hover:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],active:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"]}},states:["default","hover","active"]},yy={element:py,id:"simple-button",name:"Simple Button",category:"ui-elements",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/button-preview.png"},schema:fy,sourceCode:my,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function vy(e){return`
|
|
17349
17031
|
.${e}-titles-row {
|
|
17350
17032
|
position: relative;
|
|
17351
17033
|
flex: 0 1 auto;
|
|
@@ -17543,7 +17225,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
|
|
|
17543
17225
|
pointer-events: auto;
|
|
17544
17226
|
flex-shrink: 0;
|
|
17545
17227
|
}
|
|
17546
|
-
`}const Cn=500,Xi=650,mn="cubic-bezier(0.22, 1, 0.36, 1)",$y=72,Cy=50,Ty=1e4,Ly=650,Iy=500;function Ry(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function yc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=or(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function Ey(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?yc(i,n):null}function ky(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.url&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function Ji(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function ol(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Ji(e,i,n)}const My=.03;function vc(e){return e.width*My}const ta={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Do(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function rl(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Py(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function ya(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function Ay(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:ya(e,t.width,t.height)}function Fy(e,t){if(Ir(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function Wy(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.url)||t.has(o.url)||(t.add(o.url),n.push(o))}return n}function _y({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Ir(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function ji(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=vc(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function lr(e,t,n){const i=ji(e,t,n);return{...i,left:2*i.left-e.left}}function Ny(e,t,n){const{left:i,width:o}=n,s=vc(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function xc(e,t,n,i){const o=ji(e,"left",i),s=ji(e,"right",i),l=lr(e,"left",i),d=lr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Hy(e,t,n,i){const{start:o,end:s}=xc(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function jy(e,t,n){const i=ji(e,t,n),o=lr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Ir(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Oy({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function Vo({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Ir(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function zy({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:m,layoutId:x,sourceRect:b,resolveCloseSourceRect:T,onClose:f,onPrev:L,onNext:$}){const R=a.useRef(null),P=a.useRef(null),C=a.useRef(null),X=a.useRef(new Map),[E,B]=a.useState(0),I=a.useRef(null),w=a.useRef(0),W=a.useRef(0),h=a.useRef("none"),S=a.useRef(!1),k=a.useRef(!1),D=a.useRef(!1),U=a.useRef(null),ae=a.useRef(null),Y=a.useRef(null),G=a.useRef(()=>{}),H=a.useRef(null),F=a.useRef(null),A=a.useRef(null),K=a.useRef(!1),[q,ee]=a.useState(null),[N,ue]=a.useState(ta),[v,ye]=a.useState(0),[Z,ce]=a.useState("opening"),[$e,ne]=a.useState(0),[ve,J]=a.useState(0),[pe,he]=a.useState(!1),[Ae,be]=a.useState(null),[We,Q]=a.useState(null),[le,xe]=a.useState(null),[O,se]=a.useState(!1),[fe,Se]=a.useState(null),[Ie,we]=a.useState(!1),_=a.useRef(!1),[de,oe]=a.useState(!1),[z,re]=a.useState(!1),ke=a.useRef(n),ie=a.useRef(void 0),j=t[n],Ne=j?Ir(j):!1,Me=ve!==0||pe,et=!l&&(!s||!!d),Ye=c&&!l,lt=u.length>1,mt=a.useCallback((g,me)=>t.length<=1?null:t[(g+me+t.length)%t.length]??null,[t]),De=lt?Ji(u,m,-1):mt(n,-1),ot=lt?Ji(u,m,1):mt(n,1),$t=Ae===-1&&Me?lt&&We!==null?Ji(u,We,-1):le!==null?mt(le,-1):null:null,rt=Ae===1&&Me?lt&&We!==null?Ji(u,We,1):le!==null?mt(le,1):null:null,Ue=$t&&$t.url!==(De==null?void 0:De.url)?$t:null,ht=rt&&rt.url!==(ot==null?void 0:ot.url)?rt:null,xt=De&&Ye?(()=>{const g=lt?ol(u,m,-1):t.length>2?mt((n-1+t.length)%t.length,-1):null;return g&&g.url!==De.url?g:null})():null,dt=ot&&Ye?(()=>{const g=lt?ol(u,m,1):t.length>2?mt((n+1)%t.length,1):null;return g&&g.url!==ot.url?g:null})():null,kt=Ue??xt,_t=ht??dt,Qe=a.useCallback((g,me,Re)=>{if(!g||!me||!Re)return;const Le=X.current,Ze=Le.get(g);(Ze==null?void 0:Ze.width)===me&&(Ze==null?void 0:Ze.height)===Re||(Le.set(g,{width:me,height:Re}),B(Et=>Et+1))},[]),Tt=a.useCallback(g=>{if(!(g!=null&&g.url))return null;const me=X.current.get(g.url);return Ay(P.current,me)},[E,v]),Lt=a.useCallback(()=>{if(!j)return;const g=Tt(j);if(g){ee(g);return}const me=P.current;me&&ee(rl(me))},[j,Tt]),Ge=a.useCallback(g=>{if(lt){const me=u.length;Q((m+g+me)%me),xe(null);return}t.length>1&&(xe((n+g+t.length)%t.length),Q(null))},[lt,u.length,m,t.length,n]),qe=a.useCallback(g=>{D.current=g,he(g)},[]),Pe=a.useCallback(()=>{U.current!==null&&(window.clearTimeout(U.current),U.current=null)},[]),gt=a.useCallback(()=>{Pe(),U.current=window.setTimeout(()=>{Pe(),qe(!1)},Xi+32)},[Pe,qe]),It=a.useCallback(()=>{const g=R.current;if(!g){ue({left:0,top:0,width:typeof window<"u"?window.innerWidth:ta.width,height:typeof window<"u"?window.innerHeight:ta.height});return}const me=g.getBoundingClientRect();ue({left:me.left,top:me.top,width:me.width,height:me.height})},[]),Mt=a.useCallback((g,me)=>{if(Me){if(de&&!pe)return`translate(${ve}px, 0px)`;if(pe&&Ae!==null){const Re=Tt(g);if(!Re)return;const{x:Le,y:Ze}=Hy(Re,me,Ae,N);return`translate(${Le}px, ${Ze}px)`}if(pe)return"translate(0px, 0px)"}},[Me,de,pe,ve,Ae,N,Tt]),Dt=a.useCallback(()=>{const g=ae.current;ae.current=null,Pe(),qe(!1),be(null),Q(null),xe(null),J(0),oe(!1),S.current=!1,W.current=0,h.current="none",g===-1?L():g===1&&$()},[Pe,qe,L,$]),en=a.useCallback(()=>{Pe(),U.current=window.setTimeout(()=>{ae.current!==null&&Dt()},Xi+32)},[Pe,Dt]),on=a.useCallback(()=>{Pe(),ae.current=null,qe(!1),be(null),Q(null),xe(null),J(0),oe(!1),S.current=!1,W.current=0,h.current="none"},[Pe,qe]),bt=a.useCallback(g=>{if(!(!Ye||!q)){if(D.current){if(ae.current===g){Y.current=g,Dt();return}on()}Pe(),Ge(g),ae.current=g,be(g),qe(!0),en()}},[Ye,q,Dt,on,Pe,Ge,qe,en]);G.current=bt;const Rt=a.useCallback(()=>{H.current=null,K.current=!1,F.current!==null&&(window.clearInterval(F.current),F.current=null),A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),Ut=a.useCallback(g=>{F.current!==null&&window.clearInterval(F.current);const me=K.current?Iy:Ly;F.current=window.setInterval(()=>{G.current(g)},me)},[]),Kt=a.useCallback(g=>{H.current!==g&&(Rt(),H.current=g,K.current=!1,G.current(g),Ut(g),A.current=window.setTimeout(()=>{A.current=null,H.current===g&&(K.current=!0,Ut(g))},Ty))},[Rt,Ut]),ft=a.useCallback(()=>{const g=P.current;if(!g)return;const me=j==null?void 0:j.url,Re=me?X.current.get(me):void 0;if(Re!=null&&Re.width&&(Re!=null&&Re.height)){ee(ya(g,Re.width,Re.height));return}const Le=C.current;if(Le&&me&&(Le.src===me||Le.currentSrc===me)){const{width:Et,height:Ve}=Py(Le);if(Et&&Ve){Qe(me,Et,Ve),ee(ya(g,Et,Ve));return}}const Ze=rl(g);!Ze.width||!Ze.height||ee(Ze)},[j==null?void 0:j.url,Qe]),Jt=a.useCallback(g=>{if(C.current=g,!!g){if(g instanceof HTMLVideoElement){g.readyState>=1&&g.videoWidth>0&&ft();return}g.complete&&g.naturalWidth>0&&ft()}},[ft]),Ce=a.useCallback(()=>{It(),ft(),ye(g=>g+1)},[It,ft]);a.useEffect(()=>{Ce();const g=P.current,me=R.current,Re=new ResizeObserver(()=>Ce());return g&&Re.observe(g),me&&Re.observe(me),window.addEventListener("resize",Ce),()=>{Re.disconnect(),window.removeEventListener("resize",Ce)}},[Ce,n,x]),a.useLayoutEffect(()=>{if(!j)return;const g=C.current;if(g){if(g instanceof HTMLImageElement&&g.complete&&g.naturalWidth>0){ft();return}g instanceof HTMLVideoElement&&g.readyState>=1&&g.videoWidth>0&&ft()}},[j==null?void 0:j.url,n,ft]),a.useEffect(()=>{Lt()},[Lt,E]),a.useEffect(()=>{const g=new Set,me=[],Re=Le=>{!(Le!=null&&Le.url)||g.has(Le.url)||(g.add(Le.url),me.push(Le))};t.forEach(Re),u.forEach(Le=>Le.items.forEach(Re)),me.forEach(Le=>{X.current.has(Le.url)||Fy(Le,Qe)})},[t,u,Qe]),a.useEffect(()=>{if(Z!=="opening"||!q)return;if(!b){ce("open");return}se(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{se(!0),ce("open")})});return()=>cancelAnimationFrame(g)},[Z,q,b]),a.useEffect(()=>{if(Z!=="closing")return;const g=setTimeout(()=>f(),Cn);return()=>clearTimeout(g)},[Z,f]),a.useEffect(()=>()=>{Pe()},[Pe]),a.useLayoutEffect(()=>{ke.current===n&&ie.current===(j==null?void 0:j.url)||(Pe(),ae.current=null,be(null),Q(null),xe(null),ne(0),J(0),qe(!1),re(!1),oe(!1),w.current=0,W.current=0,h.current="none",S.current=!1,I.current=null,k.current=!1,C.current=null,Lt(),ke.current=n,ie.current=j==null?void 0:j.url)},[n,j==null?void 0:j.url,qe,Pe,Lt]),a.useLayoutEffect(()=>{const g=Y.current;g!==null&&(Y.current=null,requestAnimationFrame(()=>{G.current(g)}))},[n,m,j==null?void 0:j.url]),a.useLayoutEffect(()=>{if(Z==="opening"){_.current=!1,we(!1);return}if(Z!=="open"||_.current)return;if(!De&&!ot){_.current=!0;return}we(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{we(!0),_.current=!0})});return()=>cancelAnimationFrame(g)},[Z,De==null?void 0:De.url,ot==null?void 0:ot.url]),a.useEffect(()=>{if(Z!=="open")return;const g=()=>{const Ve=it=>{it.stopPropagation(),it.preventDefault(),document.removeEventListener("click",Ve,!0)};document.addEventListener("click",Ve,!0)},me=Ve=>{const it=Ve<0?1:-1;Pe(),Ge(it),ae.current=it,be(it),qe(!0),en()},Re=Ve=>{if(Math.abs(Ve)>Cy&&Ye){me(Ve);return}ae.current=null,be(null),Q(null),xe(null),qe(!0),J(0),gt()},Le=Ve=>{if(Ve.touches.length!==1||D.current)return;const it=Ve.touches[0];k.current=!0,I.current={x:it.clientX,y:it.clientY},h.current="none",W.current=0,S.current=!1},Ze=Ve=>{if(!I.current||Ve.touches.length!==1||D.current)return;const it=Ve.touches[0],jt=it.clientX-I.current.x,St=it.clientY-I.current.y;if(h.current==="none"){if(Math.abs(jt)<10&&Math.abs(St)<10)return;if(Math.abs(jt)>Math.abs(St)){if(!Ye)return;h.current="horizontal"}else if(St>0){if(!et)return;h.current="vertical"}else return}if(h.current==="horizontal"){S.current=!0,oe(!0),W.current=jt,J(jt),Ve.preventDefault();return}h.current==="vertical"&&(S.current=!0,oe(!0),w.current=St,ne(St),Ve.preventDefault())},Et=()=>{if(!I.current)return;const Ve=h.current,it=S.current;if(it&&Ve==="horizontal")Re(W.current),g();else if(it&&Ve==="vertical"){const jt=w.current;if(et&&jt>$y){const St=window.innerHeight;w.current=St,re(!0),ne(St),ce("closing")}else w.current=0,ne(0);g()}else Ve==="horizontal"&&Math.abs(W.current)>0&&(Re(W.current),g());I.current=null,h.current="none",W.current=0,S.current=!1,oe(!1)};return document.addEventListener("touchstart",Le,{passive:!0}),document.addEventListener("touchmove",Ze,{passive:!1}),document.addEventListener("touchend",Et),document.addEventListener("touchcancel",Et),()=>{document.removeEventListener("touchstart",Le),document.removeEventListener("touchmove",Ze),document.removeEventListener("touchend",Et),document.removeEventListener("touchcancel",Et)}},[Z,Ye,qe,gt,Pe,et,en,Ge]);const Oe=a.useCallback(()=>{const g=(T==null?void 0:T())??b??null;g&&q&&(Se(g),se(!0)),ce("closing")},[T,b,q]);a.useEffect(()=>{const g=Le=>{if(Le.key==="Escape"){if(s&&d||Z==="closing")return;Rt(),Oe();return}if(Le.key!=="ArrowLeft"&&Le.key!=="ArrowRight"||Z!=="open"||!Ye)return;Le.preventDefault();const Ze=Le.key==="ArrowLeft"?-1:1;Le.repeat&&H.current===Ze||Kt(Ze)},me=Le=>{if(Le.key!=="ArrowLeft"&&Le.key!=="ArrowRight")return;const Ze=Le.key==="ArrowLeft"?-1:1;H.current===Ze&&Rt()},Re=()=>{Rt()};return window.addEventListener("keydown",g),window.addEventListener("keyup",me),window.addEventListener("blur",Re),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",me),window.removeEventListener("blur",Re),Rt()}},[Z,s,d,Oe,Ye,Kt,Rt]),a.useEffect(()=>{Z!=="open"&&Rt()},[Z,Rt]);const Ke=()=>{Z==="closing"||l||Oe()},He=Z==="open",ze=Z==="closing",ut=$e>0?Math.max(0,1-$e/500):1,_e=$e>0?Math.max(.35,1-$e/500):1,Je=a.useCallback(g=>{if(!(g.propertyName!=="transform"||!D.current)){if(ae.current!==null){Dt();return}Pe(),qe(!1)}},[Pe,qe,Dt]),tt=Z==="closing"?fe??b:b,Wt=tt&&q&&(Z==="opening"||ze)?Ry(tt,q):void 0,Ct=Me&&j?Mt(j,"center"):$e>0?`translateY(${$e}px)`:Wt,st=q?Do(q,N):null,Nt=!!(tt&&q),At=Nt&&(Z==="closing"||Z==="open"&&O),Vt={position:"absolute",top:st==null?void 0:st.top,left:st==null?void 0:st.left,width:st==null?void 0:st.width,height:st==null?void 0:st.height,objectFit:"contain",transformOrigin:"top left",transform:Ct,opacity:$e>0?_e:Nt?1:Z==="opening"||ze?0:1,transition:de&&!pe?"none":pe?`transform ${Xi}ms ${mn}`:z?`transform ${Cn}ms ${mn}, opacity ${Cn}ms ${mn}`:At?`transform ${Cn}ms ${mn}`:Z==="opening"||ze?`opacity ${Cn}ms ${mn}`:"none",pointerEvents:Ne&&He&&!Me?"auto":"none",touchAction:Ne&&He?"none":void 0,zIndex:1,overflow:Ne?"hidden":void 0},zt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:He&&!Me?"auto":"none"},Pt=(g,me,Re="adjacent")=>{const Le=Tt(g);if(!Le)return{display:"none"};const Ze=Re==="far"?me==="left"?"far-left":"far-right":me==="left"?"left-adjacent":"right-adjacent",{start:Et}=Ae!==null?xc(Le,Ze,Ae,N):{start:Re==="far"?lr(Le,me,N):ji(Le,me,N)},Ve=Do(Et,N),it=Mt(g,Ze),jt=!Me&&Re==="adjacent"&&He&&!Ie?jy(Le,me,N):null,St=Re==="far"&&Me&&Ae===(me==="left"?-1:1),cn=de&&!pe?!1:pe,un=Re==="adjacent"&&He&&Ie&&!Me;return{position:"absolute",top:Ve.top,left:Ve.left,width:Ve.width,height:Ve.height,objectFit:"contain",transform:it??(jt?`translate(${jt.x}px, ${jt.y}px)`:void 0),opacity:Re==="far"?He&&St?1:0:He?1:0,transition:cn?Re==="far"?`transform ${Xi}ms ${mn}`:`transform ${Xi}ms ${mn}, opacity ${Cn}ms ${mn}`:un?`transform ${Cn}ms ${mn}`:Z==="opening"||ze?`opacity ${Cn}ms ${mn}`:"none",pointerEvents:"none",zIndex:1}},Qt=(g,me)=>{const Re=Tt(g);return Re?Ny(ji(Re,me,N),me,N):null},wt=g=>me=>{if(!l){if(k.current){k.current=!1;return}me.stopPropagation(),bt(g)}},Gt=De?Qt(De,"left"):null,pt=ot?Qt(ot,"right"):null,Ft=Gt?Do(Gt,N):null,Bt=pt?Do(pt,N):null;return r.jsxs("div",{ref:R,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:Z==="open"?"none":void 0},onClick:Ke,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:He?ut:0,transition:de?"none":`opacity ${Cn}ms ${mn}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:P,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:He?1:0,transition:de?"none":`opacity ${Cn}ms ${mn}`,pointerEvents:"none"},children:r.jsx(Ql,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:Ke})})]}),He&&kt&&r.jsx(Vo,{media:kt,style:Pt(kt,"left","far"),onMeasure:Qe,onTransitionEnd:Je},`far-prev-${kt.url}`),He&&De&&r.jsxs(r.Fragment,{children:[r.jsx(Vo,{media:De,style:Pt(De,"left"),onMeasure:Qe,onTransitionEnd:Je},`prev-${De.url}`),Ft&&r.jsx("div",{style:{position:"absolute",top:Ft.top,left:Ft.left,width:Ft.width,height:Ft.height,cursor:l||de?"default":"pointer",pointerEvents:l||de?"none":"auto",zIndex:3},onClick:wt(-1)})]}),He&&ot&&r.jsxs(r.Fragment,{children:[r.jsx(Vo,{media:ot,style:Pt(ot,"right"),onMeasure:Qe,onTransitionEnd:Je},`next-${ot.url}`),Bt&&r.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||de?"default":"pointer",pointerEvents:l||de?"none":"auto",zIndex:3},onClick:wt(1)})]}),He&&_t&&r.jsx(Vo,{media:_t,style:Pt(_t,"right","far"),onMeasure:Qe,onTransitionEnd:Je},`far-next-${_t.url}`),q&&j&&(Ne?r.jsx(Oy,{src:j.url,phase:Z,onMediaElement:Jt,wrapperStyle:Vt,videoStyle:zt,onLoadedMetadata:ft,onTransitionEnd:Je},`${n}-${j.url}`):r.jsx("img",{ref:Jt,src:j.url,alt:j.name,onLoad:ft,onTransitionEnd:Je,style:Vt},`${n}-${j.url}`))]})}const By=20,Dy=.18;function Vy(e){return`
|
|
17228
|
+
`}const $n=500,Ui=650,pn="cubic-bezier(0.22, 1, 0.36, 1)",xy=72,by=50,wy=1e4,Sy=650,$y=500;function Cy(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function fc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=ir(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function Ty(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?fc(i,n):null}function Ly(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.url&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function Zi(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function il(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Zi(e,i,n)}const Iy=.03;function yc(e){return e.width*Iy}const ea={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Bo(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function ol(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Ry(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function fa(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function Ey(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:fa(e,t.width,t.height)}function My(e,t){if(Lr(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function ky(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.url)||t.has(o.url)||(t.add(o.url),n.push(o))}return n}function Ay({mediaList:e}){return e.length===0?null:r.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Lr(t)?r.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):r.jsx("img",{src:t.url,alt:""},t.url))})}function Hi(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=yc(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function sr(e,t,n){const i=Hi(e,t,n);return{...i,left:2*i.left-e.left}}function Py(e,t,n){const{left:i,width:o}=n,s=yc(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function vc(e,t,n,i){const o=Hi(e,"left",i),s=Hi(e,"right",i),l=sr(e,"left",i),d=sr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Wy(e,t,n,i){const{start:o,end:s}=vc(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function Fy(e,t,n){const i=Hi(e,t,n),o=sr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Lr(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function _y({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){const d=a.useRef(null);return a.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),r.jsx("div",{style:i,onTransitionEnd:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function Do({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Lr(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function Ny({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:m,layoutId:x,sourceRect:b,resolveCloseSourceRect:T,onClose:f,onPrev:L,onNext:$}){const R=a.useRef(null),A=a.useRef(null),C=a.useRef(null),U=a.useRef(new Map),[E,O]=a.useState(0),I=a.useRef(null),w=a.useRef(0),F=a.useRef(0),h=a.useRef("none"),S=a.useRef(!1),M=a.useRef(!1),z=a.useRef(!1),K=a.useRef(null),se=a.useRef(null),Y=a.useRef(null),D=a.useRef(()=>{}),N=a.useRef(null),W=a.useRef(null),P=a.useRef(null),q=a.useRef(!1),[G,Z]=a.useState(null),[_,me]=a.useState(ea),[v,fe]=a.useState(0),[J,ce]=a.useState("opening"),[Ce,oe]=a.useState(0),[xe,Q]=a.useState(0),[ye,ve]=a.useState(!1),[Me,we]=a.useState(null),[Ae,X]=a.useState(null),[ue,Se]=a.useState(null),[j,de]=a.useState(!1),[H,re]=a.useState(null),[ae,ne]=a.useState(!1),ie=a.useRef(!1),[be,Te]=a.useState(!1),[ee,pe]=a.useState(!1),Pe=a.useRef(n),le=a.useRef(void 0),V=t[n],He=V?Lr(V):!1,Fe=xe!==0||ye,Qe=!l&&(!s||!!d),Xe=c&&!l,lt=u.length>1,pt=a.useCallback((g,ge)=>t.length<=1?null:t[(g+ge+t.length)%t.length]??null,[t]),Be=lt?Zi(u,m,-1):pt(n,-1),rt=lt?Zi(u,m,1):pt(n,1),Tt=Me===-1&&Fe?lt&&Ae!==null?Zi(u,Ae,-1):ue!==null?pt(ue,-1):null:null,at=Me===1&&Fe?lt&&Ae!==null?Zi(u,Ae,1):ue!==null?pt(ue,1):null:null,Ke=Tt&&Tt.url!==(Be==null?void 0:Be.url)?Tt:null,gt=at&&at.url!==(rt==null?void 0:rt.url)?at:null,bt=Be&&Xe?(()=>{const g=lt?il(u,m,-1):t.length>2?pt((n-1+t.length)%t.length,-1):null;return g&&g.url!==Be.url?g:null})():null,mt=rt&&Xe?(()=>{const g=lt?il(u,m,1):t.length>2?pt((n+1)%t.length,1):null;return g&&g.url!==rt.url?g:null})():null,kt=Ke??bt,Wt=gt??mt,et=a.useCallback((g,ge,Ee)=>{if(!g||!ge||!Ee)return;const Ie=U.current,Ze=Ie.get(g);(Ze==null?void 0:Ze.width)===ge&&(Ze==null?void 0:Ze.height)===Ee||(Ie.set(g,{width:ge,height:Ee}),O(Mt=>Mt+1))},[]),St=a.useCallback(g=>{if(!(g!=null&&g.url))return null;const ge=U.current.get(g.url);return Ey(A.current,ge)},[E,v]),$t=a.useCallback(()=>{if(!V)return;const g=St(V);if(g){Z(g);return}const ge=A.current;ge&&Z(ol(ge))},[V,St]),De=a.useCallback(g=>{if(lt){const ge=u.length;X((m+g+ge)%ge),Se(null);return}t.length>1&&(Se((n+g+t.length)%t.length),X(null))},[lt,u.length,m,t.length,n]),Ve=a.useCallback(g=>{z.current=g,ve(g)},[]),_e=a.useCallback(()=>{K.current!==null&&(window.clearTimeout(K.current),K.current=null)},[]),ht=a.useCallback(()=>{_e(),K.current=window.setTimeout(()=>{_e(),Ve(!1)},Ui+32)},[_e,Ve]),It=a.useCallback(()=>{const g=R.current;if(!g){me({left:0,top:0,width:typeof window<"u"?window.innerWidth:ea.width,height:typeof window<"u"?window.innerHeight:ea.height});return}const ge=g.getBoundingClientRect();me({left:ge.left,top:ge.top,width:ge.width,height:ge.height})},[]),At=a.useCallback((g,ge)=>{if(Fe){if(be&&!ye)return`translate(${xe}px, 0px)`;if(ye&&Me!==null){const Ee=St(g);if(!Ee)return;const{x:Ie,y:Ze}=Wy(Ee,ge,Me,_);return`translate(${Ie}px, ${Ze}px)`}if(ye)return"translate(0px, 0px)"}},[Fe,be,ye,xe,Me,_,St]),Vt=a.useCallback(()=>{const g=se.current;se.current=null,_e(),Ve(!1),we(null),X(null),Se(null),Q(0),Te(!1),S.current=!1,F.current=0,h.current="none",g===-1?L():g===1&&$()},[_e,Ve,L,$]),tn=a.useCallback(()=>{_e(),K.current=window.setTimeout(()=>{se.current!==null&&Vt()},Ui+32)},[_e,Vt]),nn=a.useCallback(()=>{_e(),se.current=null,Ve(!1),we(null),X(null),Se(null),Q(0),Te(!1),S.current=!1,F.current=0,h.current="none"},[_e,Ve]),wt=a.useCallback(g=>{if(!(!Xe||!G)){if(z.current){if(se.current===g){Y.current=g,Vt();return}nn()}_e(),De(g),se.current=g,we(g),Ve(!0),tn()}},[Xe,G,Vt,nn,_e,De,Ve,tn]);D.current=wt;const Rt=a.useCallback(()=>{N.current=null,q.current=!1,W.current!==null&&(window.clearInterval(W.current),W.current=null),P.current!==null&&(window.clearTimeout(P.current),P.current=null)},[]),qt=a.useCallback(g=>{W.current!==null&&window.clearInterval(W.current);const ge=q.current?$y:Sy;W.current=window.setInterval(()=>{D.current(g)},ge)},[]),Kt=a.useCallback(g=>{N.current!==g&&(Rt(),N.current=g,q.current=!1,D.current(g),qt(g),P.current=window.setTimeout(()=>{P.current=null,N.current===g&&(q.current=!0,qt(g))},wy))},[Rt,qt]),$e=a.useCallback(()=>{const g=A.current;if(!g)return;const ge=V==null?void 0:V.url,Ee=ge?U.current.get(ge):void 0;if(Ee!=null&&Ee.width&&(Ee!=null&&Ee.height)){Z(fa(g,Ee.width,Ee.height));return}const Ie=C.current;if(Ie&&ge&&(Ie.src===ge||Ie.currentSrc===ge)){const{width:Mt,height:Ge}=Ry(Ie);if(Mt&&Ge){et(ge,Mt,Ge),Z(fa(g,Mt,Ge));return}}const Ze=ol(g);!Ze.width||!Ze.height||Z(Ze)},[V==null?void 0:V.url,et]),je=a.useCallback(g=>{if(C.current=g,!!g){if(g instanceof HTMLVideoElement){g.readyState>=1&&g.videoWidth>0&&$e();return}g.complete&&g.naturalWidth>0&&$e()}},[$e]),Oe=a.useCallback(()=>{It(),$e(),fe(g=>g+1)},[It,$e]);a.useEffect(()=>{Oe();const g=A.current,ge=R.current,Ee=new ResizeObserver(()=>Oe());return g&&Ee.observe(g),ge&&Ee.observe(ge),window.addEventListener("resize",Oe),()=>{Ee.disconnect(),window.removeEventListener("resize",Oe)}},[Oe,n,x]),a.useLayoutEffect(()=>{if(!V)return;const g=C.current;if(g){if(g instanceof HTMLImageElement&&g.complete&&g.naturalWidth>0){$e();return}g instanceof HTMLVideoElement&&g.readyState>=1&&g.videoWidth>0&&$e()}},[V==null?void 0:V.url,n,$e]),a.useEffect(()=>{$t()},[$t,E]),a.useEffect(()=>{const g=new Set,ge=[],Ee=Ie=>{!(Ie!=null&&Ie.url)||g.has(Ie.url)||(g.add(Ie.url),ge.push(Ie))};t.forEach(Ee),u.forEach(Ie=>Ie.items.forEach(Ee)),ge.forEach(Ie=>{U.current.has(Ie.url)||My(Ie,et)})},[t,u,et]),a.useEffect(()=>{if(J!=="opening"||!G)return;if(!b){ce("open");return}de(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{de(!0),ce("open")})});return()=>cancelAnimationFrame(g)},[J,G,b]),a.useEffect(()=>{if(J!=="closing")return;const g=setTimeout(()=>f(),$n);return()=>clearTimeout(g)},[J,f]),a.useEffect(()=>()=>{_e()},[_e]),a.useLayoutEffect(()=>{Pe.current===n&&le.current===(V==null?void 0:V.url)||(_e(),se.current=null,we(null),X(null),Se(null),oe(0),Q(0),Ve(!1),pe(!1),Te(!1),w.current=0,F.current=0,h.current="none",S.current=!1,I.current=null,M.current=!1,C.current=null,$t(),Pe.current=n,le.current=V==null?void 0:V.url)},[n,V==null?void 0:V.url,Ve,_e,$t]),a.useLayoutEffect(()=>{const g=Y.current;g!==null&&(Y.current=null,requestAnimationFrame(()=>{D.current(g)}))},[n,m,V==null?void 0:V.url]),a.useLayoutEffect(()=>{if(J==="opening"){ie.current=!1,ne(!1);return}if(J!=="open"||ie.current)return;if(!Be&&!rt){ie.current=!0;return}ne(!1);const g=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ne(!0),ie.current=!0})});return()=>cancelAnimationFrame(g)},[J,Be==null?void 0:Be.url,rt==null?void 0:rt.url]),a.useEffect(()=>{if(J!=="open")return;const g=()=>{const Ge=ot=>{ot.stopPropagation(),ot.preventDefault(),document.removeEventListener("click",Ge,!0)};document.addEventListener("click",Ge,!0)},ge=Ge=>{const ot=Ge<0?1:-1;_e(),De(ot),se.current=ot,we(ot),Ve(!0),tn()},Ee=Ge=>{if(Math.abs(Ge)>by&&Xe){ge(Ge);return}se.current=null,we(null),X(null),Se(null),Ve(!0),Q(0),ht()},Ie=Ge=>{if(Ge.touches.length!==1||z.current)return;const ot=Ge.touches[0];M.current=!0,I.current={x:ot.clientX,y:ot.clientY},h.current="none",F.current=0,S.current=!1},Ze=Ge=>{if(!I.current||Ge.touches.length!==1||z.current)return;const ot=Ge.touches[0],_t=ot.clientX-I.current.x,Ct=ot.clientY-I.current.y;if(h.current==="none"){if(Math.abs(_t)<10&&Math.abs(Ct)<10)return;if(Math.abs(_t)>Math.abs(Ct)){if(!Xe)return;h.current="horizontal"}else if(Ct>0){if(!Qe)return;h.current="vertical"}else return}if(h.current==="horizontal"){S.current=!0,Te(!0),F.current=_t,Q(_t),Ge.preventDefault();return}h.current==="vertical"&&(S.current=!0,Te(!0),w.current=Ct,oe(Ct),Ge.preventDefault())},Mt=()=>{if(!I.current)return;const Ge=h.current,ot=S.current;if(ot&&Ge==="horizontal")Ee(F.current),g();else if(ot&&Ge==="vertical"){const _t=w.current;if(Qe&&_t>xy){const Ct=window.innerHeight;w.current=Ct,pe(!0),oe(Ct),ce("closing")}else w.current=0,oe(0);g()}else Ge==="horizontal"&&Math.abs(F.current)>0&&(Ee(F.current),g());I.current=null,h.current="none",F.current=0,S.current=!1,Te(!1)};return document.addEventListener("touchstart",Ie,{passive:!0}),document.addEventListener("touchmove",Ze,{passive:!1}),document.addEventListener("touchend",Mt),document.addEventListener("touchcancel",Mt),()=>{document.removeEventListener("touchstart",Ie),document.removeEventListener("touchmove",Ze),document.removeEventListener("touchend",Mt),document.removeEventListener("touchcancel",Mt)}},[J,Xe,Ve,ht,_e,Qe,tn,De]);const Ye=a.useCallback(()=>{const g=(T==null?void 0:T())??b??null;g&&G&&(re(g),de(!0)),ce("closing")},[T,b,G]);a.useEffect(()=>{const g=Ie=>{if(Ie.key==="Escape"){if(s&&d||J==="closing")return;Rt(),Ye();return}if(Ie.key!=="ArrowLeft"&&Ie.key!=="ArrowRight"||J!=="open"||!Xe)return;Ie.preventDefault();const Ze=Ie.key==="ArrowLeft"?-1:1;Ie.repeat&&N.current===Ze||Kt(Ze)},ge=Ie=>{if(Ie.key!=="ArrowLeft"&&Ie.key!=="ArrowRight")return;const Ze=Ie.key==="ArrowLeft"?-1:1;N.current===Ze&&Rt()},Ee=()=>{Rt()};return window.addEventListener("keydown",g),window.addEventListener("keyup",ge),window.addEventListener("blur",Ee),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",ge),window.removeEventListener("blur",Ee),Rt()}},[J,s,d,Ye,Xe,Kt,Rt]),a.useEffect(()=>{J!=="open"&&Rt()},[J,Rt]);const Lt=()=>{J==="closing"||l||Ye()},tt=J==="open",ke=J==="closing",ft=Ce>0?Math.max(0,1-Ce/500):1,Je=Ce>0?Math.max(.35,1-Ce/500):1,qe=a.useCallback(g=>{if(!(g.propertyName!=="transform"||!z.current)){if(se.current!==null){Vt();return}_e(),Ve(!1)}},[_e,Ve,Vt]),it=J==="closing"?H??b:b,Ht=it&&G&&(J==="opening"||ke)?Cy(it,G):void 0,Et=Fe&&V?At(V,"center"):Ce>0?`translateY(${Ce}px)`:Ht,ct=G?Bo(G,_):null,Ot=!!(it&&G),Dt=Ot&&(J==="closing"||J==="open"&&j),jt={position:"absolute",top:ct==null?void 0:ct.top,left:ct==null?void 0:ct.left,width:ct==null?void 0:ct.width,height:ct==null?void 0:ct.height,objectFit:"contain",transformOrigin:"top left",transform:Et,opacity:Ce>0?Je:Ot?1:J==="opening"||ke?0:1,transition:be&&!ye?"none":ye?`transform ${Ui}ms ${pn}`:ee?`transform ${$n}ms ${pn}, opacity ${$n}ms ${pn}`:Dt?`transform ${$n}ms ${pn}`:J==="opening"||ke?`opacity ${$n}ms ${pn}`:"none",pointerEvents:He&&tt&&!Fe?"auto":"none",touchAction:He&&tt?"none":void 0,zIndex:1,overflow:He?"hidden":void 0},zt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:tt&&!Fe?"auto":"none"},dt=(g,ge,Ee="adjacent")=>{const Ie=St(g);if(!Ie)return{display:"none"};const Ze=Ee==="far"?ge==="left"?"far-left":"far-right":ge==="left"?"left-adjacent":"right-adjacent",{start:Mt}=Me!==null?vc(Ie,Ze,Me,_):{start:Ee==="far"?sr(Ie,ge,_):Hi(Ie,ge,_)},Ge=Bo(Mt,_),ot=At(g,Ze),_t=!Fe&&Ee==="adjacent"&&tt&&!ae?Fy(Ie,ge,_):null,Ct=Ee==="far"&&Fe&&Me===(ge==="left"?-1:1),ln=be&&!ye?!1:ye,dn=Ee==="adjacent"&&tt&&ae&&!Fe;return{position:"absolute",top:Ge.top,left:Ge.left,width:Ge.width,height:Ge.height,objectFit:"contain",transform:ot??(_t?`translate(${_t.x}px, ${_t.y}px)`:void 0),opacity:Ee==="far"?tt&&Ct?1:0:tt?1:0,transition:ln?Ee==="far"?`transform ${Ui}ms ${pn}`:`transform ${Ui}ms ${pn}, opacity ${$n}ms ${pn}`:dn?`transform ${$n}ms ${pn}`:J==="opening"||ke?`opacity ${$n}ms ${pn}`:"none",pointerEvents:"none",zIndex:1}},Ut=(g,ge)=>{const Ee=St(g);return Ee?Py(Hi(Ee,ge,_),ge,_):null},Jt=g=>ge=>{if(!l){if(M.current){M.current=!1;return}ge.stopPropagation(),wt(g)}},Qt=Be?Ut(Be,"left"):null,vt=rt?Ut(rt,"right"):null,Pt=Qt?Bo(Qt,_):null,Bt=vt?Bo(vt,_):null;return r.jsxs("div",{ref:R,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:Lt,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:tt?ft:0,transition:be?"none":`opacity ${$n}ms ${pn}`,pointerEvents:"none"}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[r.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:A,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:tt?1:0,transition:be?"none":`opacity ${$n}ms ${pn}`,pointerEvents:"none"},children:r.jsx(Jl,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:Lt})})]}),tt&&kt&&r.jsx(Do,{media:kt,style:dt(kt,"left","far"),onMeasure:et,onTransitionEnd:qe},`far-prev-${kt.url}`),tt&&Be&&r.jsxs(r.Fragment,{children:[r.jsx(Do,{media:Be,style:dt(Be,"left"),onMeasure:et,onTransitionEnd:qe},`prev-${Be.url}`),Pt&&r.jsx("div",{style:{position:"absolute",top:Pt.top,left:Pt.left,width:Pt.width,height:Pt.height,cursor:l||be?"default":"pointer",pointerEvents:l||be?"none":"auto",zIndex:3},onClick:Jt(-1)})]}),tt&&rt&&r.jsxs(r.Fragment,{children:[r.jsx(Do,{media:rt,style:dt(rt,"right"),onMeasure:et,onTransitionEnd:qe},`next-${rt.url}`),Bt&&r.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||be?"default":"pointer",pointerEvents:l||be?"none":"auto",zIndex:3},onClick:Jt(1)})]}),tt&&Wt&&r.jsx(Do,{media:Wt,style:dt(Wt,"right","far"),onMeasure:et,onTransitionEnd:qe},`far-next-${Wt.url}`),G&&V&&(He?r.jsx(_y,{src:V.url,phase:J,onMediaElement:je,wrapperStyle:jt,videoStyle:zt,onLoadedMetadata:$e,onTransitionEnd:qe},`${n}-${V.url}`):r.jsx("img",{ref:je,src:V.url,alt:V.name,onLoad:$e,onTransitionEnd:qe,style:jt},`${n}-${V.url}`))]})}const Hy=20,Oy=.18;function jy(e){return`
|
|
17547
17229
|
.${e}-wrapper {
|
|
17548
17230
|
box-sizing: border-box;
|
|
17549
17231
|
max-width: 100%;
|
|
@@ -17616,8 +17298,8 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
|
|
|
17616
17298
|
z-index: 2;
|
|
17617
17299
|
pointer-events: auto;
|
|
17618
17300
|
}
|
|
17619
|
-
${
|
|
17620
|
-
`}function
|
|
17301
|
+
${vy(e)}
|
|
17302
|
+
`}function zy(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,s]=n.split(":").map(Number),l=i?s:o,d=i?o:s;return d>0?l/d:1}function By(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:y.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:y.scalingValue(i*Oy,n??!1),[`--${t}-image-aspect`]:zy(e)}}function Dy(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.07,lineHeight:e==null?void 0:e.titleLineHeight,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,color:(e==null?void 0:e.titleColor)??"#000000"};return Xt(n,t)}function Vy(e){var o;const t=((o=e==null?void 0:e.imageDisplay)==null?void 0:o.display)==="cover",n=((e==null?void 0:e.lightbox)??"on")==="on",i={objectFit:t?"cover":"contain",pointerEvents:"auto",...n?{cursor:"pointer"}:null};return{objectFitMode:t?"cover":"contain",imageStyle:i}}function Gy(e,t,n,i,o,s){if(!(!e||!t))return l=>{var c;const d=((c=l.currentTarget.closest(`.${i}-item`))==null?void 0:c.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);s(n,d?fc(d,o):void 0)}}function qy({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=y.useScopedStyles(),c=a.useMemo(()=>jy(d),[d]),u=t??[],m=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,x=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,b=y.scalingValue(x,n??!1),T=`max(${b}, ${Hy}px)`,{objectFitMode:f,imageStyle:L}=Vy(e),$=Dy(e,n),R=a.useRef(null),[A,C]=a.useState(!1),[U,E]=a.useState([]),[O,I]=a.useState(0),[w,F]=a.useState(0),[h,S]=a.useState(null),[M,z]=a.useState({title1:"",title2:"",title3:""}),K=(!n||i)&&!A,se=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},Y=se.sizeType??"none",D=K&&Y!=="none"?`${d}-item-image-hover-${Y}`:void 0,N=(se.value??120)/100,W={width:y.scalingValue(m,n??!1),...$,...By(e,d,n),[`--${d}-image-hover-scale`]:String(N)},P=(()=>{const ce={},Ce=R.current?getComputedStyle(R.current).getPropertyValue("--cntrl-article-width").trim():"";return Ce&&(ce["--cntrl-article-width"]=Ce),ce})(),q=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),G=a.useMemo(()=>Ly(u),[u]),Z=a.useMemo(()=>ky(u),[u]),_=(ce,Ce)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const oe=G.findIndex(Q=>Q.gridIndex===ce);if(oe<0)return;const xe=G[oe];F(oe),E(xe.items),I(0),z(xe.entry),S(Ce??null),C(!0)},me=a.useCallback(()=>{C(!1),S(null)},[]),v=a.useCallback(()=>{const ce=G[w];return!ce||!R.current?h:Ty(R.current,ce.gridIndex,f)??h},[G,w,h,f]),fe=a.useCallback(ce=>{if(G.length>1){const Ce=G.length,oe=(w+ce+Ce)%Ce,xe=G[oe];F(oe),E(xe.items),I(0),z(xe.entry);return}I(Ce=>(Ce+ce+U.length)%U.length)},[G,w,U.length]),J=G.length>1||U.length>1;return a.useEffect(()=>{if(!A||typeof document>"u")return;const ce=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ce}},[A]),a.useEffect(()=>{!n||o||i||C(!1)},[n,o,i]),a.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&C(!1)},[e==null?void 0:e.lightbox]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),r.jsx(Ay,{mediaList:Z}),r.jsx("div",{ref:R,className:`${d}-wrapper`,style:W,children:u.map((ce,Ce)=>{var Q,ye;const oe=!!((Q=ce.image)!=null&&Q.url),xe=Gy(!!q,oe,Ce,d,f,_);return r.jsxs("div",{className:`${d}-item`,children:[ce.title?r.jsx("span",{className:`${d}-item-title`,onClick:xe,style:xe?{cursor:"pointer"}:void 0,children:ce.title}):null,(ye=ce.image)!=null&&ye.url?r.jsx("span",{className:[`${d}-item-image`,D].filter(Boolean).join(" "),children:ce.image.type==="video"?r.jsx("video",{src:ce.image.url,"data-waterfall-index":Ce,style:L,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:xe}):r.jsx("img",{src:ce.image.url,alt:ce.image.name??"","data-waterfall-index":Ce,style:L,onClick:xe})}):null,Ce<u.length-1&&r.jsx("div",{className:`${d}-item-gap-host`,style:{width:b},children:o&&!A&&r.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${d}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:T,height:"100%"}})})]},Ce)})}),A&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ce=(l?document.getElementById(l):null)??document.body;return mi.createPortal(r.jsx("div",{style:P,"data-selection":"none",children:r.jsx(Ny,{prefix:d,items:U,index:O,entry:M,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:J,lightboxEntries:G,entryIdx:w,layoutId:s,sourceRect:h,resolveCloseSourceRect:v,onClose:me,onPrev:()=>fe(-1),onNext:()=>fe(1)})}),ce)})()]})}const Ky=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
17621
17303
|
import type React from 'react';
|
|
17622
17304
|
import { createPortal } from 'react-dom';
|
|
17623
17305
|
import { CommonComponentProps } from '../props';
|
|
@@ -18072,7 +17754,7 @@ export function Waterfall({
|
|
|
18072
17754
|
</>
|
|
18073
17755
|
);
|
|
18074
17756
|
}
|
|
18075
|
-
`,Jy="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),On={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",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Qy(e){const t={};return t[Be(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSettings")]={...On.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Be(e,"fontSize")]={...On.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Be(e,"lineHeight")]={...On.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Be(e,"letterSpacing")]={...On.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Be(e,"wordSpacing")]={...On.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Be(e,"textAlign")]={...On.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Be(e,"textAppearance")]={...On.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Oi=Kn.filter(e=>e!=="count"),ev=Oi.reduce((e,t)=>({...e,...Qy(t)}),{}),tv=Oi.reduce((e,t)=>({...e,[Be(t,"fontFamily")]:"Arial",[Be(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Be(t,"letterSpacing")]:0,[Be(t,"wordSpacing")]:0,[Be(t,"textAlign")]:"left",[Be(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function na(e){return Oi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Be(n,"fontSize")]=i),o!==void 0&&(t[Be(n,"lineHeight")]=o),t},{})}const nv={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Oi.map(e=>[Oa[e],za(e)]))},Go={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},iv=[{title:"Salton Sea from Above",...Go,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...Go,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Go,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...Go,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],ov={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!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"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",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"]}},required:["image"]},default:iv},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},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"}}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageHoverEffect:{type:"object",scope:"common",title:"Hover",display:{type:"toggle-cycle-numeric-input",enum:["none","scale","saturate"],inputs:{none:"none",scale:"single",saturate:"none"},defaultValue:120,showDash:!1},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},horizontalGap:{type:"number",scope:"layout",title:"Gutter",min:0,display:{type:"range-control"}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title1Color:{type:"string",scope:"common",title:"Title Lightbox",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Lightbox",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Lightbox",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...On.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",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"]}}},...ev},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightbox:"on",imageHoverEffect:{sizeType:"none",value:120,min:100,max:200},titleColor:"#000000",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Jy,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...tv},layoutDefaults:{d:{wrapperWidth:1,horizontalGap:.006944,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,titleFontSize:.0625,titleLineHeight:.05555,titleLetterSpacing:-34722e-8,...na({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})},m:{wrapperWidth:1,horizontalGap:.026666,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,titleFontSize:.16,titleLineHeight:.13333,...na({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{wrapperWidth:1,horizontalGap:.01302,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026,titleFontSize:.07,titleLineHeight:.07,...na({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","wrapperWidth","imageDisplay","lightbox","imageHoverEffect","horizontalGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","lightbox"]},{type:"row",title:"Image",items:["imageDisplay","imageHoverEffect"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Lightbox",items:[nv]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},rv={element:Yy,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},...Oi.map(e=>({path:`${Be(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...Oi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Be(t,"fontFamily")}`}),{})},schema:ov,sourceCode:Zy},al="500ms",sl={color:"#000000",hover:"#cccccc"},Yi={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},av={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},ia={offset:{x:0,y:0},linkColor:"#cccccc"},ll={sizeType:"drag",value:3},sv="left";function lv(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:sv,color:(e==null?void 0:e.titleColor)??"#000000"};return Xt(n,t)}function bi(e,t,n){return`${e}: ${y.scalingValue(t/1440,n)};`}function cv(e,t){return`
|
|
17757
|
+
`,Uy="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),On={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",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Xy(e){const t={};return t[ze(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ze(e,"fontSettings")]={...On.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ze(e,"fontSize")]={...On.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ze(e,"lineHeight")]={...On.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ze(e,"letterSpacing")]={...On.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ze(e,"wordSpacing")]={...On.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ze(e,"textAlign")]={...On.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ze(e,"textAppearance")]={...On.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Oi=qn.filter(e=>e!=="count"),Yy=Oi.reduce((e,t)=>({...e,...Xy(t)}),{}),Zy=Oi.reduce((e,t)=>({...e,[ze(t,"fontFamily")]:"Arial",[ze(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ze(t,"letterSpacing")]:0,[ze(t,"wordSpacing")]:0,[ze(t,"textAlign")]:"left",[ze(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ta(e){return Oi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ze(n,"fontSize")]=i),o!==void 0&&(t[ze(n,"lineHeight")]=o),t},{})}const Jy={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Oi.map(e=>[Oa[e],ja(e)]))},Vo={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},Qy=[{title:"Salton Sea from Above",...Vo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...Vo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Vo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...Vo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],ev={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!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"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",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"]}},required:["image"]},default:Qy},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},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"}}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageHoverEffect:{type:"object",scope:"common",title:"Hover",display:{type:"toggle-cycle-numeric-input",enum:["none","scale","saturate"],inputs:{none:"none",scale:"single",saturate:"none"},defaultValue:120,showDash:!1},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},horizontalGap:{type:"number",scope:"layout",title:"Gutter",min:0,display:{type:"range-control"}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title1Color:{type:"string",scope:"common",title:"Title Lightbox",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Lightbox",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Lightbox",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...On.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",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"]}}},...Yy},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightbox:"on",imageHoverEffect:{sizeType:"none",value:120,min:100,max:200},titleColor:"#000000",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Uy,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...Zy},layoutDefaults:{d:{wrapperWidth:1,horizontalGap:.006944,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,titleFontSize:.0625,titleLineHeight:.05555,titleLetterSpacing:-34722e-8,...ta({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})},m:{wrapperWidth:1,horizontalGap:.026666,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,titleFontSize:.16,titleLineHeight:.13333,...ta({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{wrapperWidth:1,horizontalGap:.01302,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026,titleFontSize:.07,titleLineHeight:.07,...ta({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","wrapperWidth","imageDisplay","lightbox","imageHoverEffect","horizontalGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","lightbox"]},{type:"row",title:"Image",items:["imageDisplay","imageHoverEffect"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Lightbox",items:[Jy]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},tv={element:qy,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},...Oi.map(e=>({path:`${ze(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...Oi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ze(t,"fontFamily")}`}),{})},schema:ev,sourceCode:Ky},rl="500ms",al={color:"#000000",hover:"#cccccc"},Xi={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},nv={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},na={offset:{x:0,y:0},linkColor:"#cccccc"},sl={sizeType:"drag",value:3},iv="left";function ov(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:iv,color:(e==null?void 0:e.titleColor)??"#000000"};return Xt(n,t)}function xi(e,t,n){return`${e}: ${y.scalingValue(t/1440,n)};`}function rv(e,t){return`
|
|
18076
17758
|
.${e}-wrapper {
|
|
18077
17759
|
position: relative;
|
|
18078
17760
|
width: 100%;
|
|
@@ -18108,29 +17790,29 @@ export function Waterfall({
|
|
|
18108
17790
|
top: 50%;
|
|
18109
17791
|
z-index: 1;
|
|
18110
17792
|
padding: 0;
|
|
18111
|
-
${
|
|
18112
|
-
${
|
|
17793
|
+
${xi("width",30,t)}
|
|
17794
|
+
${xi("height",30,t)}
|
|
18113
17795
|
transition: opacity 0.15s ease-in-out;
|
|
18114
17796
|
}
|
|
18115
17797
|
.${e}-arrow-prev {
|
|
18116
|
-
${
|
|
17798
|
+
${xi("left",-20,t)}
|
|
18117
17799
|
transform: translate3d(-50%, -50%, 0);
|
|
18118
17800
|
}
|
|
18119
17801
|
.${e}-arrow-next {
|
|
18120
17802
|
left: unset;
|
|
18121
|
-
${
|
|
17803
|
+
${xi("right",-20,t)}
|
|
18122
17804
|
transform: translate3d(50%, -50%, 0);
|
|
18123
17805
|
}
|
|
18124
17806
|
.${e}-arrow-prev-vertical {
|
|
18125
17807
|
left: 50%;
|
|
18126
|
-
${
|
|
17808
|
+
${xi("top",-20,t)}
|
|
18127
17809
|
transform: translate3d(-50%, -50%, 0);
|
|
18128
17810
|
}
|
|
18129
17811
|
.${e}-arrow-next-vertical {
|
|
18130
17812
|
left: 50%;
|
|
18131
17813
|
right: unset;
|
|
18132
17814
|
top: unset;
|
|
18133
|
-
${
|
|
17815
|
+
${xi("bottom",-20,t)}
|
|
18134
17816
|
transform: translate3d(-50%, 50%, 0);
|
|
18135
17817
|
}
|
|
18136
17818
|
.${e}-arrow-hidden {
|
|
@@ -18274,7 +17956,7 @@ export function Waterfall({
|
|
|
18274
17956
|
from { clip-path: inset(100% 0 0 0); }
|
|
18275
17957
|
to { clip-path: inset(0 0 0 0); }
|
|
18276
17958
|
}
|
|
18277
|
-
`}function
|
|
17959
|
+
`}function av({settings:e,content:t,isEditor:n}){const{prefix:i}=y.useScopedStyles(),[o,s]=a.useState(null),l=ov(e,n),[d,c]=a.useState(void 0),[u,m]=a.useState(null),[x,b]=a.useState(0),[T,f]=a.useState(!1),[L,$]=a.useState(0),R=t??[],A=(e==null?void 0:e.trigger)??sl,C=A.sizeType??"drag",U=A.value??sl.value,E=(e==null?void 0:e.direction)??"horizontal",O=(e==null?void 0:e.transition)??"slide",I=(e==null?void 0:e.nav)??"classic",w=(e==null?void 0:e.navSize)??"m",F=nv[w],h=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,S=X=>y.scalingValue(X*h,n),M=(e==null?void 0:e.show)??"always",z=(e==null?void 0:e.controls)??null,K=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,se=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,Y=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,D=(e==null?void 0:e.controlsColor)??al.color,N=(e==null?void 0:e.controlsHoverColor)??al.hover,W=(e==null?void 0:e.navColor)??Xi.colors.inactive,P=(e==null?void 0:e.navPaginationColor)??Xi.colors.pagination,q=(e==null?void 0:e.navBackgroundColor)??Xi.colors.background,G=(e==null?void 0:e.linkColor)??na.linkColor,Z=E==="horizontal",_=C==="click",me=C==="drag",v=C==="auto",fe=O==="fade in"||O==="reveal",J=I==="classic",ce=M!=="never",Ce=M==="on hover",oe=a.useRef(O),xe=a.useRef(C),Q=a.useRef(U),ye=a.useRef(E),ve=a.useRef(I),Me=y.scalingValue(K,n),we={width:Me,height:Me,maxWidth:Me},Ae=X=>{o&&o.go(X)};return a.useEffect(()=>{if(!T)return;const X=window.setTimeout(()=>f(!1),300);return()=>window.clearTimeout(X)},[T,x]),a.useEffect(()=>{if(!u)return;const X=new ResizeObserver(ue=>{if(!o)return;const[Se]=ue;c({width:Math.round(Se.contentRect.width),height:Math.round(Se.contentRect.height)})});return X.observe(u),()=>X.unobserve(u)},[u]),a.useEffect(()=>{oe.current!==O&&($(X=>X+1),oe.current=O)},[O]),a.useEffect(()=>{xe.current!==C&&($(X=>X+1),xe.current=C)},[C]),a.useEffect(()=>{Q.current!==U&&($(X=>X+1),Q.current=U)},[U]),a.useEffect(()=>{ye.current!==E&&($(X=>X+1),ye.current=E)},[E]),a.useEffect(()=>{ve.current!==I&&($(X=>X+1),ve.current=I)},[I]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:rv(i,n)}}),r.jsxs("div",{className:nt(`${i}-wrapper`,{[`${i}-transition-reveal`]:O==="reveal",[`${i}-transition-reveal-vertical`]:O==="reveal"&&!Z}),ref:m,children:[r.jsxs("div",{className:`${i}-slider-inner`,style:{width:d?d.width:"100%",height:d?d.height:"100%",backgroundColor:"transparent"},children:[r.jsx(xr,{onMove:X=>{f(!0),b(X.index)},ref:s,options:{arrows:!1,speed:parseInt(rl),autoplay:v,...v&&{interval:U*1e3},direction:Z||fe?"ltr":"ttb",pagination:!1,drag:me,perPage:1,width:d?d.width:"100%",height:d?d.height:"100%",type:fe?"fade":"loop",rewind:!0},children:R.map((X,ue)=>r.jsx(br,{children:r.jsx("div",{className:`${i}-slider-item`,children:r.jsx("div",{className:`${i}-img-wrapper`,children:r.jsx("img",{className:nt(`${i}-slider-image`,{[`${i}-contain`]:X.image.objectFit==="contain",[`${i}-cover`]:X.image.objectFit==="cover"}),src:X.image.url,alt:X.image.name??""})})})},ue))},L),ce&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:nt(`${i}-arrow`,{[`${i}-arrow-prev`]:Z,[`${i}-arrow-prev-vertical`]:!Z,[`${i}-hover-arrow`]:Ce}),style:{color:D,"--arrow-hover-color":N,...we},children:r.jsxs("button",{onClick:X=>{X.stopPropagation(),Ae("-1")},className:`${i}-arrow-inner`,style:{transform:`translate(${y.scalingValue(se,n)}, ${y.scalingValue(Y*(Z?1:-1),n)}) rotate(${Z?"0deg":"90deg"})`},children:[z&&r.jsx(on,{url:z,fill:D,hoverFill:N,className:nt(`${i}-arrow-img`,`${i}-mirror`),style:we}),!z&&r.jsx(ll,{color:D,className:nt(`${i}-arrow-icon`,`${i}-arrow-img`,`${i}-mirror`)})]})}),r.jsx("div",{className:nt(`${i}-arrow`,{[`${i}-arrow-next`]:Z,[`${i}-arrow-next-vertical`]:!Z,[`${i}-hover-arrow`]:Ce}),style:{color:D,"--arrow-hover-color":N,...we},children:r.jsxs("button",{className:`${i}-arrow-inner`,onClick:X=>{X.stopPropagation(),Ae("+1")},style:{transform:`translate(${y.scalingValue(se*(Z?-1:1),n)}, ${y.scalingValue(Y,n)}) rotate(${Z?"0deg":"90deg"})`},children:[z&&r.jsx(on,{url:z,fill:D,hoverFill:N,className:`${i}-arrow-img`,style:we}),!z&&r.jsx(ll,{color:D,className:nt(`${i}-arrow-icon`,`${i}-arrow-img`)})]})})]}),_&&r.jsx("div",{className:`${i}-click-overlay`,onClick:()=>{o&&o.go("+1")}}),J&&r.jsx("div",{className:nt(`${i}-pagination`,{[`${i}-pagination-inside-bottom`]:Z,[`${i}-pagination-inside-left`]:!Z}),style:Z?{bottom:S(F.inset)}:{left:S(F.inset)},children:r.jsx("div",{className:nt(`${i}-pagination-inner`,{[`${i}-pagination-vertical`]:!Z,[`${i}-animate-dots`]:T}),style:{backgroundColor:q,gap:S(F.gapInactive-F.activeDot+F.dot),...Z?{height:S(F.activeDot+F.paddingY*2),paddingTop:S(F.paddingY),paddingBottom:S(F.paddingY),paddingLeft:S(F.paddingActive),paddingRight:S(F.paddingActive)}:{width:S(F.activeDot+F.paddingY*2),paddingLeft:S(F.paddingY),paddingRight:S(F.paddingY),paddingTop:S(F.paddingActive),paddingBottom:S(F.paddingActive)},borderRadius:S(F.borderRadius),transform:`translate(${y.scalingValue(Xi.offset.x,n)}, ${y.scalingValue(Xi.offset.y,n)})`},children:R.map((X,ue)=>{const Se=ue===x,j=Se?F.activeDot:F.dot;return r.jsx("button",{onClick:()=>{o&&o.go(ue)},className:`${i}-pagination-item`,style:{width:S(F.activeDot)},children:r.jsx("div",{className:`${i}-dot`,style:{backgroundColor:Se?P:W,width:S(j)}})},ue)})},`${w}-${E}`)})]}),r.jsx("div",{className:`${i}-caption-block`,children:r.jsx("div",{className:`${i}-caption-text-wrapper`,children:R.map((X,ue)=>r.jsx("div",{className:nt(`${i}-caption-text`,{[`${i}-with-pointer-events`]:ue===x&&n,[`${i}-active`]:ue===x}),style:{...l,width:"max-content",transitionDuration:`${Math.round(parseInt(rl)/2)}ms`},children:r.jsx("div",{className:`${i}-caption-text-inner`,style:{"--link-color":G,"--link-hover-color":G,position:"relative",top:y.scalingValue(na.offset.y,n),left:y.scalingValue(na.offset.x,n)},children:r.jsx(pi,{content:X.imageCaption})})},ue))})})]})]})}function ll({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.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 sv=`import React, { useState, useEffect, useRef } from 'react';
|
|
18278
17960
|
import { Splide, SplideSlide } from '@splidejs/react-splide';
|
|
18279
17961
|
import '@splidejs/react-splide/css/core';
|
|
18280
17962
|
import cn from 'classnames';
|
|
@@ -19018,4 +18700,4 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
|
|
|
19018
18700
|
</svg>
|
|
19019
18701
|
);
|
|
19020
18702
|
}
|
|
19021
|
-
`,
|
|
18703
|
+
`,lv={type:"object",version:1,settings:{sizing:"manual",properties:{trigger:{type:"object",scope:"common",title:"Trigger",display:{type:"toggle-cycle-numeric-input",enum:["click","drag","auto"],inputs:{click:"none",drag:"none",auto:"single"},defaultValue:3,showDash:!1},min:1,max:5,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical"]}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["slide","fade in","reveal"]}},nav:{type:"string",scope:"common",title:"Nav",display:{type:"toggle-cycle",enum:["classic","no"]}},navSize:{type:"string",scope:"layout",title:"Nav Size",display:{type:"toggle-cycle",enum:["s","m","l"]}},navUnit:{type:"number",scope:"layout",title:"",display:{type:"numeric-input",visible:!1},min:0,max:1},controls:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},controlsMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},show:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","on hover","never"]}},paddingX:{type:"number",scope:"layout",title:"Padding X",display:{type:"numeric-input"},min:-9999,max:9999},paddingY:{type:"number",scope:"layout",title:"Padding Y",display:{type:"numeric-input"},min:-9999,max:9999},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"palette-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"palette-color-picker"}},navColor:{type:"string",scope:"common",title:"Dot Nav",display:{type:"palette-color-picker"}},navPaginationColor:{type:"string",scope:"common",title:"Active Nav",display:{type:"palette-color-picker"}},navBackgroundColor:{type:"string",scope:"common",title:"BG Nav",display:{type:"palette-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"palette-color-picker"}},titleColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{type:"object",scope:"common",title:"",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",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"]}}}},defaults:{trigger:{sizeType:"drag",value:3,min:1,max:5},direction:"horizontal",transition:"slide",nav:"classic",controls:null,show:"always",controlsColor:"#000000",controlsHoverColor:"#3F3F3F",navColor:"#A4A4A4",navPaginationColor:"#FFFFFF",navBackgroundColor:"#000000",linkColor:"#2E12F0",titleColor:"#000000",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{controlsMaxWidth:30/1440,paddingX:0,paddingY:0,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,titleFontSize:16/375,titleLineHeight:16/375,navSize:"m",navUnit:1/375}},displayRules:[{if:{name:"show",value:"never"},then:{name:"properties.controlsColor.display.visible",value:!1}},{if:{name:"show",value:"never"},then:{name:"properties.controlsHoverColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navPaginationColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navBackgroundColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navSize.display.visible",value:!1}}],layout:["__componentName__","trigger","direction","transition","nav","navSize","controls","controlsMaxWidth","show","paddingX","paddingY","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["trigger","direction"]},{type:"row",title:"",items:["transition","nav"]},{type:"row",title:"",items:["navSize"]},{type:"group",title:"Controls",items:[{type:"row",title:"",items:["controls","controlsMaxWidth"]},{type:"row",title:"",items:["paddingX","paddingY"]},{type:"row",title:"",items:["show"]}]}]},{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"]}]}],paletteBookmark:{items:["controlsColor","controlsHoverColor","navPaginationColor","navColor","navBackgroundColor","titleColor","linkColor"],panelIds:["general","typeStyle"]},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/Component-default-1.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},cv={element:av,id:"slider-2-0",name:"Slider 2.0",category:"galleries",version:1,defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},schema:lv,sourceCode:sv,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},dv=[Mu,Nu,Uf,Tp,Wp,Vp,cm,gm,wm,Bm,Fg,_h,Gh,Rf,Of,ay,tv,yy,cv];exports.components=dv;exports.isSchemaV1=wc;
|