@cntrl-site/components 1.0.59 → 1.0.60-alpha.0

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 CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),ut=require("classnames"),w=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Yn=require("react-dom");function zc(e){return e.type==="object"&&e.version===1}const Bc="ControlSlider-module__wrapper___sHEkd",Vc="ControlSlider-module__hoverArrow___A-dOH",Gc="ControlSlider-module__sliderItem___QQSkR",qc="ControlSlider-module__sliderImage___9hRl-",Uc="ControlSlider-module__arrow___05ghY",Kc="ControlSlider-module__arrowVertical___tBfVN",Xc="ControlSlider-module__nextArrow___-30Yc",Yc="ControlSlider-module__arrowInner___aEra3",Zc="ControlSlider-module__arrowIcon___S4ztF",Jc="ControlSlider-module__arrowImg___2dwJW",Qc="ControlSlider-module__mirror___brd6U",ed="ControlSlider-module__pagination___bicLF",td="ControlSlider-module__paginationInner___bT-P-",nd="ControlSlider-module__paginationVertical___zYqKw",id="ControlSlider-module__paginationItem___nTRbk",od="ControlSlider-module__dot___p1Qun",rd="ControlSlider-module__activeDot___LHFaj",ad="ControlSlider-module__paginationInsideBottom___R3FWn",ld="ControlSlider-module__paginationInsideTop___V-qb-",sd="ControlSlider-module__paginationOutsideBottom___14w8D",cd="ControlSlider-module__paginationOutsideTop___SCLqB",dd="ControlSlider-module__paginationInsideLeft___yOBRZ",ud="ControlSlider-module__paginationInsideRight___Rtt3o",pd="ControlSlider-module__paginationOutsideLeft___lahaw",md="ControlSlider-module__paginationOutsideRight___EtuQa",gd="ControlSlider-module__imgWrapper___UjEgB",hd="ControlSlider-module__captionBlock___dJ6-j",fd="ControlSlider-module__captionTextWrapper___HFlpf",yd="ControlSlider-module__captionText___uGBVc",vd="ControlSlider-module__active___WZK4G",xd="ControlSlider-module__withPointerEvents___t-18M",bd="ControlSlider-module__topLeftAlignment___zjnGM",wd="ControlSlider-module__topCenterAlignment___gD1xW",Sd="ControlSlider-module__topRightAlignment___NMapS",$d="ControlSlider-module__middleLeftAlignment___OnUrY",Cd="ControlSlider-module__middleCenterAlignment___Tdkl0",Td="ControlSlider-module__middleRightAlignment___wEbfX",Ld="ControlSlider-module__bottomLeftAlignment___cTP2-",Rd="ControlSlider-module__bottomCenterAlignment___c54fB",Id="ControlSlider-module__bottomRightAlignment___kEwrz",Md="ControlSlider-module__clickOverlay___DZA28",Ed="ControlSlider-module__contain___pLyq7",Pd="ControlSlider-module__cover___KdDat",rt={wrapper:Bc,hoverArrow:Vc,sliderItem:Gc,sliderImage:qc,arrow:Uc,arrowVertical:Kc,nextArrow:Xc,arrowInner:Yc,arrowIcon:Zc,arrowImg:Jc,mirror:Qc,pagination:ed,paginationInner:td,paginationVertical:nd,paginationItem:id,dot:od,activeDot:rd,paginationInsideBottom:ad,paginationInsideTop:ld,paginationOutsideBottom:sd,paginationOutsideTop:cd,paginationInsideLeft:dd,paginationInsideRight:ud,paginationOutsideLeft:pd,paginationOutsideRight:md,imgWrapper:gd,captionBlock:hd,captionTextWrapper:fd,captionText:yd,active:vd,withPointerEvents:xd,topLeftAlignment:bd,topCenterAlignment:wd,topRightAlignment:Sd,middleLeftAlignment:$d,middleCenterAlignment:Cd,middleRightAlignment:Td,bottomLeftAlignment:Ld,bottomCenterAlignment:Rd,bottomRightAlignment:Id,clickOverlay:Md,contain:Ed,cover:Pd};function kd(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 Ad(e,t,n){return t&&kd(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var al="(prefers-reduced-motion: reduce)",Ei=1,Fd=2,Wi=3,Ki=4,Co=5,Qo=6,ar=7,Wd={CREATED:Ei,MOUNTED:Fd,IDLE:Wi,MOVING:Ki,SCROLLING:Co,DRAGGING:Qo,DESTROYED:ar};function Wn(e){e.length=0}function Zn(e,t,n){return Array.prototype.slice.call(e,t,n)}function jt(e){return e.bind.apply(e,[null].concat(Zn(arguments,1)))}var Ls=setTimeout,ua=function(){};function ll(e){return requestAnimationFrame(e)}function fr(e,t){return typeof t===e}function po(e){return!Ra(e)&&fr("object",e)}var La=Array.isArray,Rs=jt(fr,"function"),qn=jt(fr,"string"),To=jt(fr,"undefined");function Ra(e){return e===null}function Is(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Lo(e){return La(e)?e:[e]}function yn(e,t){Lo(e).forEach(t)}function Ia(e,t){return e.indexOf(t)>-1}function er(e,t){return e.push.apply(e,Lo(t)),e}function En(e,t,n){e&&yn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Tn(e,t){En(e,qn(t)?t.split(" "):t,!0)}function Ro(e,t){yn(t,e.appendChild.bind(e))}function Ma(e,t){yn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function mo(e,t){return Is(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Ms(e,t){var n=e?Zn(e.children):[];return t?n.filter(function(i){return mo(i,t)}):n}function Io(e,t){return t?Ms(e,t)[0]:e.firstElementChild}var go=Object.keys;function mi(e,t,n){return e&&(n?go(e).reverse():go(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function ho(e){return Zn(arguments,1).forEach(function(t){mi(t,function(n,i){e[i]=t[i]})}),e}function zn(e){return Zn(arguments,1).forEach(function(t){mi(t,function(n,i){La(n)?e[i]=n.slice():po(n)?e[i]=zn({},po(e[i])?e[i]:{},n):e[i]=n})}),e}function sl(e,t){yn(t||go(e),function(n){delete e[n]})}function Ln(e,t){yn(e,function(n){yn(t,function(i){n&&n.removeAttribute(i)})})}function wt(e,t,n){po(t)?mi(t,function(i,o){wt(e,o,i)}):yn(e,function(i){Ra(n)||n===""?Ln(i,t):i.setAttribute(t,String(n))})}function Pi(e,t,n){var i=document.createElement(e);return t&&(qn(t)?Tn(i,t):wt(i,t)),n&&Ro(n,i),i}function xn(e,t,n){if(To(n))return getComputedStyle(e)[t];Ra(n)||(e.style[t]=""+n)}function fo(e,t){xn(e,"display",t)}function Es(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function bn(e,t){return e.getAttribute(t)}function cl(e,t){return e&&e.classList.contains(t)}function mn(e){return e.getBoundingClientRect()}function hi(e){yn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Ps(e){return Io(new DOMParser().parseFromString(e,"text/html").body)}function Mn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function ks(e,t){return e&&e.querySelector(t)}function Ea(e,t){return t?Zn(e.querySelectorAll(t)):[]}function Pn(e,t){En(e,t,!1)}function pa(e){return e.timeStamp}function ii(e){return qn(e)?e:e?e+"px":""}var Mo="splide",Pa="data-"+Mo;function lo(e,t){if(!e)throw new Error("["+Mo+"] "+(t||""))}var Un=Math.min,lr=Math.max,sr=Math.floor,yo=Math.ceil,sn=Math.abs;function As(e,t,n){return sn(e-t)<n}function tr(e,t,n,i){var o=Un(t,n),l=lr(t,n);return i?o<e&&e<l:o<=e&&e<=l}function Li(e,t,n){var i=Un(t,n),o=lr(t,n);return Un(lr(i,e),o)}function ma(e){return+(e>0)-+(e<0)}function ga(e,t){return yn(t,function(n){e=e.replace("%s",""+n)}),e}function ka(e){return e<10?"0"+e:""+e}var dl={};function _d(e){return""+e+ka(dl[e]=(dl[e]||0)+1)}function Fs(){var e=[];function t(s,d,c,u){o(s,d,function(p,b,S){var L="addEventListener"in p,h=L?p.removeEventListener.bind(p,b,c,u):p.removeListener.bind(p,c);L?p.addEventListener(b,c,u):p.addListener(c),e.push([p,b,S,c,h])})}function n(s,d,c){o(s,d,function(u,p,b){e=e.filter(function(S){return S[0]===u&&S[1]===p&&S[2]===b&&(!c||S[3]===c)?(S[4](),!1):!0})})}function i(s,d,c){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:p,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,p,!1,c)),s.dispatchEvent(u),u}function o(s,d,c){yn(s,function(u){u&&yn(d,function(p){p.split(" ").forEach(function(b){var S=b.split(".");c(u,S[0],S[1])})})})}function l(){e.forEach(function(s){s[4]()}),Wn(e)}return{bind:t,unbind:n,dispatch:i,destroy:l}}var Jn="mounted",ha="ready",_n="move",Xi="moved",Aa="click",Ws="active",_s="inactive",Ns="visible",Hs="hidden",en="refresh",an="updated",_i="resize",yr="resized",Os="drag",js="dragging",Ds="dragged",vr="scroll",vi="scrolled",Nd="overflow",Fa="destroy",zs="arrows:mounted",Bs="arrows:updated",Vs="pagination:mounted",Gs="pagination:updated",Wa="navigation:mounted",_a="autoplay:play",qs="autoplay:playing",Na="autoplay:pause",Ha="lazyload:loaded",Us="sk",Ks="sh",cr="ei";function Gt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Fs();function i(l,s){n.bind(t,Lo(l).join(" "),function(d){s.apply(s,La(d.detail)?d.detail:[])})}function o(l){n.dispatch(t,l,Zn(arguments,1))}return e&&e.event.on(Fa,n.destroy),ho(n,{bus:t,on:i,off:jt(n.unbind,t),emit:o})}function xr(e,t,n,i){var o=Date.now,l,s=0,d,c=!0,u=0;function p(){if(!c){if(s=e?Un((o()-l)/e,1):1,n&&n(s),s>=1&&(t(),l=o(),i&&++u>=i))return S();d=ll(p)}}function b(E){E||h(),l=o()-(E?s*e:0),c=!1,d=ll(p)}function S(){c=!0}function L(){l=o(),s=0,n&&n(s)}function h(){d&&cancelAnimationFrame(d),s=0,d=0,c=!0}function g(E){e=E}function y(){return c}return{start:b,rewind:L,pause:S,cancel:h,set:g,isPaused:y}}function Hd(e){var t=e;function n(o){t=o}function i(o){return Ia(Lo(o),t)}return{set:n,is:i}}function Od(e,t){var n=xr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function jd(e,t,n){var i=e.state,o=n.breakpoints||{},l=n.reducedMotion||{},s=Fs(),d=[];function c(){var h=n.mediaQuery==="min";go(o).sort(function(g,y){return h?+g-+y:+y-+g}).forEach(function(g){p(o[g],"("+(h?"min":"max")+"-width:"+g+"px)")}),p(l,al),b()}function u(h){h&&s.destroy()}function p(h,g){var y=matchMedia(g);s.bind(y,"change",b),d.push([h,y])}function b(){var h=i.is(ar),g=n.direction,y=d.reduce(function(E,R){return zn(E,R[1].matches?R[0]:{})},{});sl(n),L(y),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):g!==n.direction&&e.refresh()}function S(h){matchMedia(al).matches&&(h?zn(n,l):sl(n,go(l)))}function L(h,g,y){zn(n,h),g&&zn(Object.getPrototypeOf(n),h),(y||!i.is(Ei))&&e.emit(an,n)}return{setup:c,destroy:u,reduce:S,set:L}}var br="Arrow",wr=br+"Left",Sr=br+"Right",Xs=br+"Up",Ys=br+"Down",ul="rtl",$r="ttb",Nr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Xs,Sr],ArrowRight:[Ys,wr]};function Dd(e,t,n){function i(l,s,d){d=d||n.direction;var c=d===ul&&!s?1:d===$r?0:-1;return Nr[l]&&Nr[l][c]||l.replace(/width|left|right/i,function(u,p){var b=Nr[u.toLowerCase()][c]||u;return p>0?b.charAt(0).toUpperCase()+b.slice(1):b})}function o(l){return l*(n.direction===ul?1:-1)}return{resolve:i,orient:o}}var kn="role",ki="tabindex",zd="disabled",wn="aria-",Eo=wn+"controls",Zs=wn+"current",pl=wn+"selected",hn=wn+"label",Oa=wn+"labelledby",Js=wn+"hidden",ja=wn+"orientation",vo=wn+"roledescription",ml=wn+"live",gl=wn+"busy",hl=wn+"atomic",Da=[kn,ki,zd,Eo,Zs,hn,Oa,Js,ja,vo],Rn=Mo+"__",Qn="is-",Hr=Mo,fl=Rn+"track",Bd=Rn+"list",Cr=Rn+"slide",Qs=Cr+"--clone",Vd=Cr+"__container",za=Rn+"arrows",Tr=Rn+"arrow",ec=Tr+"--prev",tc=Tr+"--next",Lr=Rn+"pagination",nc=Lr+"__page",Gd=Rn+"progress",qd=Gd+"__bar",Ud=Rn+"toggle",Kd=Rn+"spinner",Xd=Rn+"sr",Yd=Qn+"initialized",fi=Qn+"active",ic=Qn+"prev",oc=Qn+"next",fa=Qn+"visible",ya=Qn+"loading",rc=Qn+"focus-in",ac=Qn+"overflow",Zd=[fi,fa,ic,oc,ya,rc,ac],Jd={slide:Cr,clone:Qs,arrows:za,arrow:Tr,prev:ec,next:tc,pagination:Lr,page:nc,spinner:Kd};function Qd(e,t){if(Rs(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!mo(n,t);)n=n.parentElement;return n}var eu=5,yl=200,lc="touchstart mousedown",Or="touchmove mousemove",jr="touchend touchcancel mouseup click";function tu(e,t,n){var i=Gt(e),o=i.on,l=i.bind,s=e.root,d=n.i18n,c={},u=[],p=[],b=[],S,L,h;function g(){T(),Y(),R()}function y(){o(en,E),o(en,g),o(an,R),l(document,lc+" keydown",function(P){h=P.type==="keydown"},{capture:!0}),l(s,"focusin",function(){En(s,rc,!!h)})}function E(P){var C=Da.concat("style");Wn(u),Pn(s,p),Pn(S,b),Ln([S,L],C),Ln(s,P?C:["style",vo])}function R(){Pn(s,p),Pn(S,b),p=B(Hr),b=B(fl),Tn(s,p),Tn(S,b),wt(s,hn,n.label),wt(s,Oa,n.labelledby)}function T(){S=k("."+fl),L=Io(S,"."+Bd),lo(S&&L,"A track/list element is missing."),er(u,Ms(L,"."+Cr+":not(."+Qs+")")),mi({arrows:za,pagination:Lr,prev:ec,next:tc,bar:qd,toggle:Ud},function(P,C){c[C]=k("."+P)}),ho(c,{root:s,track:S,list:L,slides:u})}function Y(){var P=s.id||_d(Mo),C=n.role;s.id=P,S.id=S.id||P+"-track",L.id=L.id||P+"-list",!bn(s,kn)&&s.tagName!=="SECTION"&&C&&wt(s,kn,C),wt(s,vo,d.carousel),wt(L,kn,"presentation")}function k(P){var C=ks(s,P);return C&&Qd(C,"."+Hr)===s?C:void 0}function B(P){return[P+"--"+n.type,P+"--"+n.direction,n.drag&&P+"--draggable",n.isNavigation&&P+"--nav",P===Hr&&fi]}return ho(c,{setup:g,mount:y,destroy:E})}var Ni="slide",Yi="loop",Po="fade";function nu(e,t,n,i){var o=Gt(e),l=o.on,s=o.emit,d=o.bind,c=e.Components,u=e.root,p=e.options,b=p.isNavigation,S=p.updateOnMove,L=p.i18n,h=p.pagination,g=p.slideFocus,y=c.Direction.resolve,E=bn(i,"style"),R=bn(i,hn),T=n>-1,Y=Io(i,"."+Vd),k;function B(){T||(i.id=u.id+"-slide"+ka(t+1),wt(i,kn,h?"tabpanel":"group"),wt(i,vo,L.slide),wt(i,hn,R||ga(L.slideLabel,[t+1,e.length]))),P()}function P(){d(i,"click",jt(s,Aa,ne)),d(i,"keydown",jt(s,Us,ne)),l([Xi,Ks,vi],W),l(Wa,z),S&&l(_n,v)}function C(){k=!0,o.destroy(),Pn(i,Zd),Ln(i,Da),wt(i,"style",E),wt(i,hn,R||"")}function z(){var $=e.splides.map(function(M){var H=M.splide.Components.Slides.getAt(t);return H?H.slide.id:""}).join(" ");wt(i,hn,ga(L.slideX,(T?n:t)+1)),wt(i,Eo,$),wt(i,kn,g?"button":""),g&&Ln(i,vo)}function v(){k||W()}function W(){if(!k){var $=e.index;I(),Z(),En(i,ic,t===$-1),En(i,oc,t===$+1)}}function I(){var $=K();$!==cl(i,fi)&&(En(i,fi,$),wt(i,Zs,b&&$||""),s($?Ws:_s,ne))}function Z(){var $=V(),M=!$&&(!K()||T);if(e.state.is([Ki,Co])||wt(i,Js,M||""),wt(Ea(i,p.focusableNodes||""),ki,M?-1:""),g&&wt(i,ki,M?-1:0),$!==cl(i,fa)&&(En(i,fa,$),s($?Ns:Hs,ne)),!$&&document.activeElement===i){var H=c.Slides.getAt(e.index);H&&Es(H.slide)}}function A($,M,H){xn(H&&Y||i,$,M)}function K(){var $=e.index;return $===t||p.cloneStatus&&$===n}function V(){if(e.is(Po))return K();var $=mn(c.Elements.track),M=mn(i),H=y("left",!0),ee=y("right",!0);return sr($[H])<=yo(M[H])&&sr(M[ee])<=yo($[ee])}function G($,M){var H=sn($-t);return!T&&(p.rewind||e.is(Yi))&&(H=Un(H,e.length-H)),H<=M}var ne={index:t,slideIndex:n,slide:i,container:Y,isClone:T,mount:B,destroy:C,update:W,style:A,isWithin:G};return ne}function iu(e,t,n){var i=Gt(e),o=i.on,l=i.emit,s=i.bind,d=t.Elements,c=d.slides,u=d.list,p=[];function b(){S(),o(en,L),o(en,S)}function S(){c.forEach(function(W,I){g(W,I,-1)})}function L(){k(function(W){W.destroy()}),Wn(p)}function h(){k(function(W){W.update()})}function g(W,I,Z){var A=nu(e,I,Z,W);A.mount(),p.push(A),p.sort(function(K,V){return K.index-V.index})}function y(W){return W?B(function(I){return!I.isClone}):p}function E(W){var I=t.Controller,Z=I.toIndex(W),A=I.hasFocus()?1:n.perPage;return B(function(K){return tr(K.index,Z,Z+A-1)})}function R(W){return B(W)[0]}function T(W,I){yn(W,function(Z){if(qn(Z)&&(Z=Ps(Z)),Is(Z)){var A=c[I];A?Ma(Z,A):Ro(u,Z),Tn(Z,n.classes.slide),C(Z,jt(l,_i))}}),l(en)}function Y(W){hi(B(W).map(function(I){return I.slide})),l(en)}function k(W,I){y(I).forEach(W)}function B(W){return p.filter(Rs(W)?W:function(I){return qn(W)?mo(I.slide,W):Ia(Lo(W),I.index)})}function P(W,I,Z){k(function(A){A.style(W,I,Z)})}function C(W,I){var Z=Ea(W,"img"),A=Z.length;A?Z.forEach(function(K){s(K,"load error",function(){--A||I()})}):I()}function z(W){return W?c.length:p.length}function v(){return p.length>n.perPage}return{mount:b,destroy:L,update:h,register:g,get:y,getIn:E,getAt:R,add:T,remove:Y,forEach:k,filter:B,style:P,getLength:z,isEnough:v}}function ou(e,t,n){var i=Gt(e),o=i.on,l=i.bind,s=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,p=u.root,b=u.track,S=u.list,L=d.getAt,h=d.style,g,y,E;function R(){T(),l(window,"resize load",Od(jt(s,_i))),o([an,en],T),o(_i,Y)}function T(){g=n.direction===$r,xn(p,"maxWidth",ii(n.width)),xn(b,c("paddingLeft"),k(!1)),xn(b,c("paddingRight"),k(!0)),Y(!0)}function Y(ne){var $=mn(p);(ne||y.width!==$.width||y.height!==$.height)&&(xn(b,"height",B()),h(c("marginRight"),ii(n.gap)),h("width",C()),h("height",z(),!0),y=$,s(yr),E!==(E=G())&&(En(p,ac,E),s(Nd,E)))}function k(ne){var $=n.padding,M=c(ne?"right":"left");return $&&ii($[M]||(po($)?0:$))||"0px"}function B(){var ne="";return g&&(ne=P(),lo(ne,"height or heightRatio is missing."),ne="calc("+ne+" - "+k(!1)+" - "+k(!0)+")"),ne}function P(){return ii(n.height||mn(S).width*n.heightRatio)}function C(){return n.autoWidth?null:ii(n.fixedWidth)||(g?"":v())}function z(){return ii(n.fixedHeight)||(g?n.autoHeight?null:v():P())}function v(){var ne=ii(n.gap);return"calc((100%"+(ne&&" + "+ne)+")/"+(n.perPage||1)+(ne&&" - "+ne)+")"}function W(){return mn(S)[c("width")]}function I(ne,$){var M=L(ne||0);return M?mn(M.slide)[c("width")]+($?0:K()):0}function Z(ne,$){var M=L(ne);if(M){var H=mn(M.slide)[c("right")],ee=mn(S)[c("left")];return sn(H-ee)+($?0:K())}return 0}function A(ne){return Z(e.length-1)-Z(0)+I(0,ne)}function K(){var ne=L(0);return ne&&parseFloat(xn(ne.slide,c("marginRight")))||0}function V(ne){return parseFloat(xn(b,c("padding"+(ne?"Right":"Left"))))||0}function G(){return e.is(Po)||A(!0)>W()}return{mount:R,resize:Y,listSize:W,slideSize:I,sliderSize:A,totalSize:Z,getPadding:V,isOverflow:G}}var ru=2;function au(e,t,n){var i=Gt(e),o=i.on,l=t.Elements,s=t.Slides,d=t.Direction.resolve,c=[],u;function p(){o(en,b),o([an,_i],L),(u=y())&&(h(u),t.Layout.resize(!0))}function b(){S(),p()}function S(){hi(c),Wn(c),i.destroy()}function L(){var E=y();u!==E&&(u<E||!E)&&i.emit(en)}function h(E){var R=s.get().slice(),T=R.length;if(T){for(;R.length<E;)er(R,R);er(R.slice(-E),R.slice(0,E)).forEach(function(Y,k){var B=k<E,P=g(Y.slide,k);B?Ma(P,R[0].slide):Ro(l.list,P),er(c,P),s.register(P,k-E+(B?0:T),Y.index)})}}function g(E,R){var T=E.cloneNode(!0);return Tn(T,n.classes.clone),T.id=e.root.id+"-clone"+ka(R+1),T}function y(){var E=n.clones;if(!e.is(Yi))E=0;else if(To(E)){var R=n[d("fixedWidth")]&&t.Layout.slideSize(0),T=R&&yo(mn(l.track)[d("width")]/R);E=T||n[d("autoWidth")]&&e.length||n.perPage*ru}return E}return{mount:p,destroy:S}}function lu(e,t,n){var i=Gt(e),o=i.on,l=i.emit,s=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,p=d.totalSize,b=d.listSize,S=d.sliderSize,L=t.Direction,h=L.resolve,g=L.orient,y=t.Elements,E=y.list,R=y.track,T;function Y(){T=t.Transition,o([Jn,yr,an,en],k)}function k(){t.Controller.isBusy()||(t.Scroll.cancel(),P(e.index),t.Slides.update())}function B(M,H,ee,ie){M!==H&&ne(M>ee)&&(W(),C(v(A(),M>ee),!0)),s(Ki),l(_n,H,ee,M),T.start(H,function(){s(Wi),l(Xi,H,ee,M),ie&&ie()})}function P(M){C(Z(M,!0))}function C(M,H){if(!e.is(Po)){var ee=H?M:z(M);xn(E,"transform","translate"+h("X")+"("+ee+"px)"),M!==ee&&l(Ks)}}function z(M){if(e.is(Yi)){var H=I(M),ee=H>t.Controller.getEnd(),ie=H<0;(ie||ee)&&(M=v(M,ee))}return M}function v(M,H){var ee=M-G(H),ie=S();return M-=g(ie*(yo(sn(ee)/ie)||1))*(H?1:-1),M}function W(){C(A(),!0),T.cancel()}function I(M){for(var H=t.Slides.get(),ee=0,ie=1/0,F=0;F<H.length;F++){var pe=H[F].index,x=sn(Z(pe,!0)-M);if(x<=ie)ie=x,ee=pe;else break}return ee}function Z(M,H){var ee=g(p(M-1)-V(M));return H?K(ee):ee}function A(){var M=h("left");return mn(E)[M]-mn(R)[M]+g(u(!1))}function K(M){return n.trimSpace&&e.is(Ni)&&(M=Li(M,0,g(S(!0)-b()))),M}function V(M){var H=n.focus;return H==="center"?(b()-c(M,!0))/2:+H*c(M)||0}function G(M){return Z(M?t.Controller.getEnd():0,!!n.trimSpace)}function ne(M){var H=g(v(A(),M));return M?H>=0:H<=E[h("scrollWidth")]-mn(R)[h("width")]}function $(M,H){H=To(H)?A():H;var ee=M!==!0&&g(H)<g(G(!1)),ie=M!==!1&&g(H)>g(G(!0));return ee||ie}return{mount:Y,move:B,jump:P,translate:C,shift:v,cancel:W,toIndex:I,toPosition:Z,getPosition:A,getLimit:G,exceededLimit:$,reposition:k}}function su(e,t,n){var i=Gt(e),o=i.on,l=i.emit,s=t.Move,d=s.getPosition,c=s.getLimit,u=s.toPosition,p=t.Slides,b=p.isEnough,S=p.getLength,L=n.omitEnd,h=e.is(Yi),g=e.is(Ni),y=jt(A,!1),E=jt(A,!0),R=n.start||0,T,Y=R,k,B,P;function C(){z(),o([an,en,cr],z),o(yr,v)}function z(){k=S(!0),B=n.perMove,P=n.perPage,T=ne();var x=Li(R,0,L?T:k-1);x!==R&&(R=x,s.reposition())}function v(){T!==ne()&&l(cr)}function W(x,re,J){if(!pe()){var fe=Z(x),Re=G(fe);Re>-1&&(re||Re!==R)&&(ee(Re),s.move(fe,Re,Y,J))}}function I(x,re,J,fe){t.Scroll.scroll(x,re,J,function(){var Re=G(s.toIndex(d()));ee(L?Un(Re,T):Re),fe&&fe()})}function Z(x){var re=R;if(qn(x)){var J=x.match(/([+\-<>])(\d+)?/)||[],fe=J[1],Re=J[2];fe==="+"||fe==="-"?re=K(R+ +(""+fe+(+Re||1)),R):fe===">"?re=Re?$(+Re):y(!0):fe==="<"&&(re=E(!0))}else re=h?x:Li(x,0,T);return re}function A(x,re){var J=B||(F()?1:P),fe=K(R+J*(x?-1:1),R,!(B||F()));return fe===-1&&g&&!As(d(),c(!x),1)?x?0:T:re?fe:G(fe)}function K(x,re,J){if(b()||F()){var fe=V(x);fe!==x&&(re=x,x=fe,J=!1),x<0||x>T?!B&&(tr(0,x,re,!0)||tr(T,re,x,!0))?x=$(M(x)):h?x=J?x<0?-(k%P||P):k:x:n.rewind?x=x<0?T:0:x=-1:J&&x!==re&&(x=$(M(re)+(x<re?-1:1)))}else x=-1;return x}function V(x){if(g&&n.trimSpace==="move"&&x!==R)for(var re=d();re===u(x,!0)&&tr(x,0,e.length-1,!n.rewind);)x<R?--x:++x;return x}function G(x){return h?(x+k)%k||0:x}function ne(){for(var x=k-(F()||h&&B?1:P);L&&x-- >0;)if(u(k-1,!0)!==u(x,!0)){x++;break}return Li(x,0,k-1)}function $(x){return Li(F()?x:P*x,0,T)}function M(x){return F()?Un(x,T):sr((x>=T?k-1:x)/P)}function H(x){var re=s.toIndex(x);return g?Li(re,0,T):re}function ee(x){x!==R&&(Y=R,R=x)}function ie(x){return x?Y:R}function F(){return!To(n.focus)||n.isNavigation}function pe(){return e.state.is([Ki,Co])&&!!n.waitForTransition}return{mount:C,go:W,scroll:I,getNext:y,getPrev:E,getAdjacent:A,getEnd:ne,setIndex:ee,getIndex:ie,toIndex:$,toPage:M,toDest:H,hasFocus:F,isBusy:pe}}var cu="http://www.w3.org/2000/svg",du="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",No=40;function uu(e,t,n){var i=Gt(e),o=i.on,l=i.bind,s=i.emit,d=n.classes,c=n.i18n,u=t.Elements,p=t.Controller,b=u.arrows,S=u.track,L=b,h=u.prev,g=u.next,y,E,R={};function T(){k(),o(an,Y)}function Y(){B(),T()}function k(){var I=n.arrows;I&&!(h&&g)&&z(),h&&g&&(ho(R,{prev:h,next:g}),fo(L,I?"":"none"),Tn(L,E=za+"--"+n.direction),I&&(P(),W(),wt([h,g],Eo,S.id),s(zs,h,g)))}function B(){i.destroy(),Pn(L,E),y?(hi(b?[h,g]:L),h=g=null):Ln([h,g],Da)}function P(){o([Jn,Xi,en,vi,cr],W),l(g,"click",jt(C,">")),l(h,"click",jt(C,"<"))}function C(I){p.go(I,!0)}function z(){L=b||Pi("div",d.arrows),h=v(!0),g=v(!1),y=!0,Ro(L,[h,g]),!b&&Ma(L,S)}function v(I){var Z='<button class="'+d.arrow+" "+(I?d.prev:d.next)+'" type="button"><svg xmlns="'+cu+'" viewBox="0 0 '+No+" "+No+'" width="'+No+'" height="'+No+'" focusable="false"><path d="'+(n.arrowPath||du)+'" />';return Ps(Z)}function W(){if(h&&g){var I=e.index,Z=p.getPrev(),A=p.getNext(),K=Z>-1&&I<Z?c.last:c.prev,V=A>-1&&I>A?c.first:c.next;h.disabled=Z<0,g.disabled=A<0,wt(h,hn,K),wt(g,hn,V),s(Bs,h,g,Z,A)}}return{arrows:R,mount:T,destroy:B,update:W}}var pu=Pa+"-interval";function mu(e,t,n){var i=Gt(e),o=i.on,l=i.bind,s=i.emit,d=xr(n.interval,e.go.bind(e,">"),P),c=d.isPaused,u=t.Elements,p=t.Elements,b=p.root,S=p.toggle,L=n.autoplay,h,g,y=L==="pause";function E(){L&&(R(),S&&wt(S,Eo,u.track.id),y||T(),B())}function R(){n.pauseOnHover&&l(b,"mouseenter mouseleave",function(z){h=z.type==="mouseenter",k()}),n.pauseOnFocus&&l(b,"focusin focusout",function(z){g=z.type==="focusin",k()}),S&&l(S,"click",function(){y?T():Y(!0)}),o([_n,vr,en],d.rewind),o(_n,C)}function T(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),g=h=y=!1,B(),s(_a))}function Y(z){z===void 0&&(z=!0),y=!!z,B(),c()||(d.pause(),s(Na))}function k(){y||(h||g?Y(!1):T())}function B(){S&&(En(S,fi,!y),wt(S,hn,n.i18n[y?"play":"pause"]))}function P(z){var v=u.bar;v&&xn(v,"width",z*100+"%"),s(qs,z)}function C(z){var v=t.Slides.getAt(z);d.set(v&&+bn(v.slide,pu)||n.interval)}return{mount:E,destroy:d.cancel,play:T,pause:Y,isPaused:c}}function gu(e,t,n){var i=Gt(e),o=i.on;function l(){n.cover&&(o(Ha,jt(d,!0)),o([Jn,an,en],jt(s,!0)))}function s(c){t.Slides.forEach(function(u){var p=Io(u.container||u.slide,"img");p&&p.src&&d(c,p,u)})}function d(c,u,p){p.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),fo(u,c?"none":"")}return{mount:l,destroy:jt(s,!1)}}var hu=10,fu=600,yu=.6,vu=1.5,xu=800;function bu(e,t,n){var i=Gt(e),o=i.on,l=i.emit,s=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,p=d.exceededLimit,b=d.translate,S=e.is(Ni),L,h,g=1;function y(){o(_n,Y),o([an,en],k)}function E(P,C,z,v,W){var I=c();if(Y(),z&&(!S||!p())){var Z=t.Layout.sliderSize(),A=ma(P)*Z*sr(sn(P)/Z)||0;P=d.toPosition(t.Controller.toDest(P%Z))+A}var K=As(I,P,1);g=1,C=K?0:C||lr(sn(P-I)/vu,xu),h=v,L=xr(C,R,jt(T,I,P,W),1),s(Co),l(vr),L.start()}function R(){s(Wi),h&&h(),l(vi)}function T(P,C,z,v){var W=c(),I=P+(C-P)*B(v),Z=(I-W)*g;b(W+Z),S&&!z&&p()&&(g*=yu,sn(Z)<hu&&E(u(p(!0)),fu,!1,h,!0))}function Y(){L&&L.cancel()}function k(){L&&!L.isPaused()&&(Y(),R())}function B(P){var C=n.easingFunc;return C?C(P):1-Math.pow(1-P,4)}return{mount:y,destroy:Y,scroll:E,cancel:k}}var Ri={passive:!1,capture:!0};function wu(e,t,n){var i=Gt(e),o=i.on,l=i.emit,s=i.bind,d=i.unbind,c=e.state,u=t.Move,p=t.Scroll,b=t.Controller,S=t.Elements.track,L=t.Media.reduce,h=t.Direction,g=h.resolve,y=h.orient,E=u.getPosition,R=u.exceededLimit,T,Y,k,B,P,C=!1,z,v,W;function I(){s(S,Or,ua,Ri),s(S,jr,ua,Ri),s(S,lc,A,Ri),s(S,"click",G,{capture:!0}),s(S,"dragstart",Mn),o([Jn,an],Z)}function Z(){var q=n.drag;se(!q),B=q==="free"}function A(q){if(z=!1,!v){var Q=Re(q);fe(q.target)&&(Q||!q.button)&&(b.isBusy()?Mn(q,!0):(W=Q?S:window,P=c.is([Ki,Co]),k=null,s(W,Or,K,Ri),s(W,jr,V,Ri),u.cancel(),p.cancel(),ne(q)))}}function K(q){if(c.is(Qo)||(c.set(Qo),l(Os)),q.cancelable)if(P){u.translate(T+J(F(q)));var Q=pe(q)>yl,me=C!==(C=R());(Q||me)&&ne(q),z=!0,l(js),Mn(q)}else H(q)&&(P=M(q),Mn(q))}function V(q){c.is(Qo)&&(c.set(Wi),l(Ds)),P&&($(q),Mn(q)),d(W,Or,K),d(W,jr,V),P=!1}function G(q){!v&&z&&Mn(q,!0)}function ne(q){k=Y,Y=q,T=E()}function $(q){var Q=ee(q),me=ie(Q),Ne=n.rewind&&n.rewindByDrag;L(!1),B?b.scroll(me,0,n.snap):e.is(Po)?b.go(y(ma(Q))<0?Ne?"<":"-":Ne?">":"+"):e.is(Ni)&&C&&Ne?b.go(R(!0)?">":"<"):b.go(b.toDest(me),!0),L(!0)}function M(q){var Q=n.dragMinThreshold,me=po(Q),Ne=me&&Q.mouse||0,$e=(me?Q.touch:+Q)||10;return sn(F(q))>(Re(q)?$e:Ne)}function H(q){return sn(F(q))>sn(F(q,!0))}function ee(q){if(e.is(Yi)||!C){var Q=pe(q);if(Q&&Q<yl)return F(q)/Q}return 0}function ie(q){return E()+ma(q)*Un(sn(q)*(n.flickPower||600),B?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function F(q,Q){return re(q,Q)-re(x(q),Q)}function pe(q){return pa(q)-pa(x(q))}function x(q){return Y===q&&k||Y}function re(q,Q){return(Re(q)?q.changedTouches[0]:q)["page"+g(Q?"Y":"X")]}function J(q){return q/(C&&e.is(Ni)?eu:1)}function fe(q){var Q=n.noDrag;return!mo(q,"."+nc+", ."+Tr)&&(!Q||!mo(q,Q))}function Re(q){return typeof TouchEvent<"u"&&q instanceof TouchEvent}function de(){return P}function se(q){v=q}return{mount:I,disable:se,isDragging:de}}var Su={Spacebar:" ",Right:Sr,Left:wr,Up:Xs,Down:Ys};function Ba(e){return e=qn(e)?e:e.key,Su[e]||e}var vl="keydown";function $u(e,t,n){var i=Gt(e),o=i.on,l=i.bind,s=i.unbind,d=e.root,c=t.Direction.resolve,u,p;function b(){S(),o(an,L),o(an,S),o(_n,g)}function S(){var E=n.keyboard;E&&(u=E==="global"?window:d,l(u,vl,y))}function L(){s(u,vl)}function h(E){p=E}function g(){var E=p;p=!0,Ls(function(){p=E})}function y(E){if(!p){var R=Ba(E);R===c(wr)?e.go("<"):R===c(Sr)&&e.go(">")}}return{mount:b,destroy:L,disable:h}}var so=Pa+"-lazy",nr=so+"-srcset",Cu="["+so+"], ["+nr+"]";function Tu(e,t,n){var i=Gt(e),o=i.on,l=i.off,s=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[Xi,vi],p=[];function b(){n.lazyLoad&&(S(),o(en,S))}function S(){Wn(p),L(),c?E():(l(u),o(u,h),h())}function L(){t.Slides.forEach(function(R){Ea(R.slide,Cu).forEach(function(T){var Y=bn(T,so),k=bn(T,nr);if(Y!==T.src||k!==T.srcset){var B=n.classes.spinner,P=T.parentElement,C=Io(P,"."+B)||Pi("span",B,P);p.push([T,R,C]),T.src||fo(T,"none")}})})}function h(){p=p.filter(function(R){var T=n.perPage*((n.preloadPages||1)+1)-1;return R[1].isWithin(e.index,T)?g(R):!0}),p.length||l(u)}function g(R){var T=R[0];Tn(R[1].slide,ya),s(T,"load error",jt(y,R)),wt(T,"src",bn(T,so)),wt(T,"srcset",bn(T,nr)),Ln(T,so),Ln(T,nr)}function y(R,T){var Y=R[0],k=R[1];Pn(k.slide,ya),T.type!=="error"&&(hi(R[2]),fo(Y,""),d(Ha,Y,k),d(_i)),c&&E()}function E(){p.length&&g(p.shift())}return{mount:b,destroy:jt(Wn,p),check:h}}function Lu(e,t,n){var i=Gt(e),o=i.on,l=i.emit,s=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,p=u.hasFocus,b=u.getIndex,S=u.go,L=t.Direction.resolve,h=c.pagination,g=[],y,E;function R(){T(),o([an,en,cr],R);var v=n.pagination;h&&fo(h,v?"":"none"),v&&(o([_n,vr,vi],z),Y(),z(),l(Vs,{list:y,items:g},C(e.index)))}function T(){y&&(hi(h?Zn(y.children):y),Pn(y,E),Wn(g),y=null),i.destroy()}function Y(){var v=e.length,W=n.classes,I=n.i18n,Z=n.perPage,A=p()?u.getEnd()+1:yo(v/Z);y=h||Pi("ul",W.pagination,c.track.parentElement),Tn(y,E=Lr+"--"+P()),wt(y,kn,"tablist"),wt(y,hn,I.select),wt(y,ja,P()===$r?"vertical":"");for(var K=0;K<A;K++){var V=Pi("li",null,y),G=Pi("button",{class:W.page,type:"button"},V),ne=d.getIn(K).map(function(M){return M.slide.id}),$=!p()&&Z>1?I.pageX:I.slideX;s(G,"click",jt(k,K)),n.paginationKeyboard&&s(G,"keydown",jt(B,K)),wt(V,kn,"presentation"),wt(G,kn,"tab"),wt(G,Eo,ne.join(" ")),wt(G,hn,ga($,K+1)),wt(G,ki,-1),g.push({li:V,button:G,page:K})}}function k(v){S(">"+v,!0)}function B(v,W){var I=g.length,Z=Ba(W),A=P(),K=-1;Z===L(Sr,!1,A)?K=++v%I:Z===L(wr,!1,A)?K=(--v+I)%I:Z==="Home"?K=0:Z==="End"&&(K=I-1);var V=g[K];V&&(Es(V.button),S(">"+K),Mn(W,!0))}function P(){return n.paginationDirection||n.direction}function C(v){return g[u.toPage(v)]}function z(){var v=C(b(!0)),W=C(b());if(v){var I=v.button;Pn(I,fi),Ln(I,pl),wt(I,ki,-1)}if(W){var Z=W.button;Tn(Z,fi),wt(Z,pl,!0),wt(Z,ki,"")}l(Gs,{list:y,items:g},v,W)}return{items:g,mount:R,destroy:T,getAt:C,update:z}}var Ru=[" ","Enter"];function Iu(e,t,n){var i=n.isNavigation,o=n.slideFocus,l=[];function s(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&p()}function d(){l.forEach(function(h){h.destroy()}),Wn(l)}function c(){d(),s()}function u(h,g){var y=Gt(h);y.on(_n,function(E,R,T){g.go(g.is(Yi)?T:E)}),l.push(y)}function p(){var h=Gt(e),g=h.on;g(Aa,S),g(Us,L),g([Jn,an],b),l.push(h),h.emit(Wa,e.splides)}function b(){wt(t.Elements.list,ja,n.direction===$r?"vertical":"")}function S(h){e.go(h.index)}function L(h,g){Ia(Ru,Ba(g))&&(S(h),Mn(g))}return{setup:jt(t.Media.set,{slideFocus:To(o)?i:o},!0),mount:s,destroy:d,remount:c}}function Mu(e,t,n){var i=Gt(e),o=i.bind,l=0;function s(){n.wheel&&o(t.Elements.track,"wheel",d,Ri)}function d(u){if(u.cancelable){var p=u.deltaY,b=p<0,S=pa(u),L=n.wheelMinThreshold||0,h=n.wheelSleep||0;sn(p)>L&&S-l>h&&(e.go(b?"<":">"),l=S),c(b)&&Mn(u)}}function c(u){return!n.releaseWheel||e.state.is(Ki)||t.Controller.getAdjacent(u)!==-1}return{mount:s}}var Eu=90;function Pu(e,t,n){var i=Gt(e),o=i.on,l=t.Elements.track,s=n.live&&!n.isNavigation,d=Pi("span",Xd),c=xr(Eu,jt(p,!1));function u(){s&&(S(!t.Autoplay.isPaused()),wt(l,hl,!0),d.textContent="…",o(_a,jt(S,!0)),o(Na,jt(S,!1)),o([Xi,vi],jt(p,!0)))}function p(L){wt(l,gl,L),L?(Ro(l,d),c.start()):(hi(d),c.cancel())}function b(){Ln(l,[ml,hl,gl]),hi(d)}function S(L){s&&wt(l,ml,L?"off":"polite")}return{mount:u,disable:S,destroy:b}}var ku=Object.freeze({__proto__:null,Media:jd,Direction:Dd,Elements:tu,Slides:iu,Layout:ou,Clones:au,Move:lu,Controller:su,Arrows:uu,Autoplay:mu,Cover:gu,Scroll:bu,Drag:wu,Keyboard:$u,LazyLoad:Tu,Pagination:Lu,Sync:Iu,Wheel:Mu,Live:Pu}),Au={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"},Fu={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:Jd,i18n:Au,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Wu(e,t,n){var i=t.Slides;function o(){Gt(e).on([Jn,en],l)}function l(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function s(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),Ls(c)}return{mount:o,start:s,cancel:ua}}function _u(e,t,n){var i=t.Move,o=t.Controller,l=t.Scroll,s=t.Elements.list,d=jt(xn,s,"transition"),c;function u(){Gt(e).bind(s,"transitionend",function(L){L.target===s&&c&&(b(),c())})}function p(L,h){var g=i.toPosition(L,!0),y=i.getPosition(),E=S(L);sn(g-y)>=1&&E>=1?n.useScroll?l.scroll(g,E,!1,h):(d("transform "+E+"ms "+n.easing),i.translate(g,!0),c=h):(i.jump(L),h())}function b(){d(""),l.cancel()}function S(L){var h=n.rewindSpeed;if(e.is(Ni)&&h){var g=o.getIndex(!0),y=o.getEnd();if(g===0&&L>=y||g>=y&&L===0)return h}return n.speed}return{mount:u,start:p,cancel:b}}var Nu=(function(){function e(n,i){this.event=Gt(),this.Components={},this.state=Hd(Ei),this.splides=[],this._o={},this._E={};var o=qn(n)?ks(document,n):n;lo(o,o+" is invalid."),this.root=o,i=zn({label:bn(o,hn)||"",labelledby:bn(o,Oa)||""},Fu,e.defaults,i||{});try{zn(i,JSON.parse(bn(o,Pa)))}catch{lo(!1,"Invalid JSON")}this._o=Object.create(zn({},i))}var t=e.prototype;return t.mount=function(i,o){var l=this,s=this.state,d=this.Components;lo(s.is([Ei,ar]),"Already mounted!"),s.set(Ei),this._C=d,this._T=o||this._T||(this.is(Po)?Wu:_u),this._E=i||this._E;var c=ho({},ku,this._E,{Transition:this._T});return mi(c,function(u,p){var b=u(l,d,l._o);d[p]=b,b.setup&&b.setup()}),mi(d,function(u){u.mount&&u.mount()}),this.emit(Jn),Tn(this.root,Yd),s.set(Wi),this.emit(ha),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Wi)&&(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(Zn(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(en),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,l=this.state;return l.is(Ei)?Gt(this).on(ha,this.destroy.bind(this,i)):(mi(this._C,function(s){s.destroy&&s.destroy(i)},!0),o.emit(Fa),o.destroy(),i&&Wn(this.splides),l.set(ar)),this},Ad(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})(),Va=Nu;Va.defaults={};Va.STATES=Wd;var xl=[[Jn,"onMounted"],[ha,"onReady"],[_n,"onMove"],[Xi,"onMoved"],[Aa,"onClick"],[Ws,"onActive"],[_s,"onInactive"],[Ns,"onVisible"],[Hs,"onHidden"],[en,"onRefresh"],[an,"onUpdated"],[_i,"onResize"],[yr,"onResized"],[Os,"onDrag"],[js,"onDragging"],[Ds,"onDragged"],[vr,"onScroll"],[vi,"onScrolled"],[Fa,"onDestroy"],[zs,"onArrowsMounted"],[Bs,"onArrowsUpdated"],[Vs,"onPaginationMounted"],[Gs,"onPaginationUpdated"],[Wa,"onNavigationMounted"],[_a,"onAutoplayPlay"],[qs,"onAutoplayPlaying"],[Na,"onAutoplayPause"],[Ha,"onLazyLoadLoaded"]];function Ga(...e){return e.filter(Boolean).join(" ")}function dr(e){return e!==null&&typeof e=="object"}function va(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!va(n,t[i]));if(dr(e)&&dr(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!va(e[o],t[o]))}return e===t}function Hu(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function Ou(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 xa(e,t){const n=e;return Ou(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():dr(i)?n[o]=xa(dr(n[o])?n[o]:{},i):n[o]=i}),n}var ju=({children:e,className:t,...n})=>a.createElement("div",{className:Ga("splide__track",t),...n},a.createElement("ul",{className:"splide__list"},e)),qa=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 Va(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=xa({},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&&!va(this.options,e)&&(this.splide.options=e,this.options=xa({},e));const t=this.getSlides();Hu(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){xl.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:Ga("splide",e),ref:this.splideRef,...this.omit(o,["options",...xl.map(l=>l[1])])},n?a.createElement(ju,null,i):i)}},Ua=({children:e,className:t,...n})=>a.createElement("li",{className:Ga("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),ut=require("classnames"),S=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Yn=require("react-dom");function id(e){return e.type==="object"&&e.version===1}const od="ControlSlider-module__wrapper___sHEkd",rd="ControlSlider-module__hoverArrow___A-dOH",ad="ControlSlider-module__sliderItem___QQSkR",sd="ControlSlider-module__sliderImage___9hRl-",ld="ControlSlider-module__arrow___05ghY",cd="ControlSlider-module__arrowVertical___tBfVN",dd="ControlSlider-module__nextArrow___-30Yc",ud="ControlSlider-module__arrowInner___aEra3",pd="ControlSlider-module__arrowIcon___S4ztF",md="ControlSlider-module__arrowImg___2dwJW",gd="ControlSlider-module__mirror___brd6U",hd="ControlSlider-module__pagination___bicLF",fd="ControlSlider-module__paginationInner___bT-P-",yd="ControlSlider-module__paginationVertical___zYqKw",vd="ControlSlider-module__paginationItem___nTRbk",bd="ControlSlider-module__dot___p1Qun",xd="ControlSlider-module__activeDot___LHFaj",wd="ControlSlider-module__paginationInsideBottom___R3FWn",Sd="ControlSlider-module__paginationInsideTop___V-qb-",$d="ControlSlider-module__paginationOutsideBottom___14w8D",Cd="ControlSlider-module__paginationOutsideTop___SCLqB",Td="ControlSlider-module__paginationInsideLeft___yOBRZ",Ld="ControlSlider-module__paginationInsideRight___Rtt3o",Id="ControlSlider-module__paginationOutsideLeft___lahaw",Rd="ControlSlider-module__paginationOutsideRight___EtuQa",Md="ControlSlider-module__imgWrapper___UjEgB",Ed="ControlSlider-module__captionBlock___dJ6-j",Pd="ControlSlider-module__captionTextWrapper___HFlpf",kd="ControlSlider-module__captionText___uGBVc",Ad="ControlSlider-module__active___WZK4G",Fd="ControlSlider-module__withPointerEvents___t-18M",Wd="ControlSlider-module__topLeftAlignment___zjnGM",_d="ControlSlider-module__topCenterAlignment___gD1xW",Nd="ControlSlider-module__topRightAlignment___NMapS",Hd="ControlSlider-module__middleLeftAlignment___OnUrY",Od="ControlSlider-module__middleCenterAlignment___Tdkl0",Dd="ControlSlider-module__middleRightAlignment___wEbfX",jd="ControlSlider-module__bottomLeftAlignment___cTP2-",zd="ControlSlider-module__bottomCenterAlignment___c54fB",Bd="ControlSlider-module__bottomRightAlignment___kEwrz",Vd="ControlSlider-module__clickOverlay___DZA28",Gd="ControlSlider-module__contain___pLyq7",qd="ControlSlider-module__cover___KdDat",rt={wrapper:od,hoverArrow:rd,sliderItem:ad,sliderImage:sd,arrow:ld,arrowVertical:cd,nextArrow:dd,arrowInner:ud,arrowIcon:pd,arrowImg:md,mirror:gd,pagination:hd,paginationInner:fd,paginationVertical:yd,paginationItem:vd,dot:bd,activeDot:xd,paginationInsideBottom:wd,paginationInsideTop:Sd,paginationOutsideBottom:$d,paginationOutsideTop:Cd,paginationInsideLeft:Td,paginationInsideRight:Ld,paginationOutsideLeft:Id,paginationOutsideRight:Rd,imgWrapper:Md,captionBlock:Ed,captionTextWrapper:Pd,captionText:kd,active:Ad,withPointerEvents:Fd,topLeftAlignment:Wd,topCenterAlignment:_d,topRightAlignment:Nd,middleLeftAlignment:Hd,middleCenterAlignment:Od,middleRightAlignment:Dd,bottomLeftAlignment:jd,bottomCenterAlignment:zd,bottomRightAlignment:Bd,clickOverlay:Vd,contain:Gd,cover:qd};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 Kd(e,t,n){return t&&Ud(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var ds="(prefers-reduced-motion: reduce)",Ei=1,Xd=2,Wi=3,Ki=4,Co=5,Qo=6,ar=7,Yd={CREATED:Ei,MOUNTED:Xd,IDLE:Wi,MOVING:Ki,SCROLLING:Co,DRAGGING:Qo,DESTROYED:ar};function Wn(e){e.length=0}function Zn(e,t,n){return Array.prototype.slice.call(e,t,n)}function Dt(e){return e.bind.apply(e,[null].concat(Zn(arguments,1)))}var Al=setTimeout,ma=function(){};function us(e){return requestAnimationFrame(e)}function fr(e,t){return typeof t===e}function po(e){return!Ea(e)&&fr("object",e)}var Ma=Array.isArray,Fl=Dt(fr,"function"),qn=Dt(fr,"string"),To=Dt(fr,"undefined");function Ea(e){return e===null}function Wl(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Lo(e){return Ma(e)?e:[e]}function yn(e,t){Lo(e).forEach(t)}function Pa(e,t){return e.indexOf(t)>-1}function er(e,t){return e.push.apply(e,Lo(t)),e}function En(e,t,n){e&&yn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Tn(e,t){En(e,qn(t)?t.split(" "):t,!0)}function Io(e,t){yn(t,e.appendChild.bind(e))}function ka(e,t){yn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function mo(e,t){return Wl(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function _l(e,t){var n=e?Zn(e.children):[];return t?n.filter(function(i){return mo(i,t)}):n}function Ro(e,t){return t?_l(e,t)[0]:e.firstElementChild}var go=Object.keys;function mi(e,t,n){return e&&(n?go(e).reverse():go(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function ho(e){return Zn(arguments,1).forEach(function(t){mi(t,function(n,i){e[i]=t[i]})}),e}function zn(e){return Zn(arguments,1).forEach(function(t){mi(t,function(n,i){Ma(n)?e[i]=n.slice():po(n)?e[i]=zn({},po(e[i])?e[i]:{},n):e[i]=n})}),e}function ps(e,t){yn(t||go(e),function(n){delete e[n]})}function Ln(e,t){yn(e,function(n){yn(t,function(i){n&&n.removeAttribute(i)})})}function wt(e,t,n){po(t)?mi(t,function(i,o){wt(e,o,i)}):yn(e,function(i){Ea(n)||n===""?Ln(i,t):i.setAttribute(t,String(n))})}function Pi(e,t,n){var i=document.createElement(e);return t&&(qn(t)?Tn(i,t):wt(i,t)),n&&Io(n,i),i}function bn(e,t,n){if(To(n))return getComputedStyle(e)[t];Ea(n)||(e.style[t]=""+n)}function fo(e,t){bn(e,"display",t)}function Nl(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function xn(e,t){return e.getAttribute(t)}function ms(e,t){return e&&e.classList.contains(t)}function mn(e){return e.getBoundingClientRect()}function hi(e){yn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Hl(e){return Ro(new DOMParser().parseFromString(e,"text/html").body)}function Mn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Ol(e,t){return e&&e.querySelector(t)}function Aa(e,t){return t?Zn(e.querySelectorAll(t)):[]}function Pn(e,t){En(e,t,!1)}function ga(e){return e.timeStamp}function ii(e){return qn(e)?e:e?e+"px":""}var Mo="splide",Fa="data-"+Mo;function so(e,t){if(!e)throw new Error("["+Mo+"] "+(t||""))}var Un=Math.min,sr=Math.max,lr=Math.floor,yo=Math.ceil,ln=Math.abs;function Dl(e,t,n){return ln(e-t)<n}function tr(e,t,n,i){var o=Un(t,n),s=sr(t,n);return i?o<e&&e<s:o<=e&&e<=s}function Li(e,t,n){var i=Un(t,n),o=sr(t,n);return Un(sr(i,e),o)}function ha(e){return+(e>0)-+(e<0)}function fa(e,t){return yn(t,function(n){e=e.replace("%s",""+n)}),e}function Wa(e){return e<10?"0"+e:""+e}var gs={};function Zd(e){return""+e+Wa(gs[e]=(gs[e]||0)+1)}function jl(){var e=[];function t(l,d,c,u){o(l,d,function(p,v,x){var I="addEventListener"in p,h=I?p.removeEventListener.bind(p,v,c,u):p.removeListener.bind(p,c);I?p.addEventListener(v,c,u):p.addListener(c),e.push([p,v,x,c,h])})}function n(l,d,c){o(l,d,function(u,p,v){e=e.filter(function(x){return x[0]===u&&x[1]===p&&x[2]===v&&(!c||x[3]===c)?(x[4](),!1):!0})})}function i(l,d,c){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:p,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,p,!1,c)),l.dispatchEvent(u),u}function o(l,d,c){yn(l,function(u){u&&yn(d,function(p){p.split(" ").forEach(function(v){var x=v.split(".");c(u,x[0],x[1])})})})}function s(){e.forEach(function(l){l[4]()}),Wn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Jn="mounted",ya="ready",_n="move",Xi="moved",_a="click",zl="active",Bl="inactive",Vl="visible",Gl="hidden",en="refresh",an="updated",_i="resize",yr="resized",ql="drag",Ul="dragging",Kl="dragged",vr="scroll",vi="scrolled",Jd="overflow",Na="destroy",Xl="arrows:mounted",Yl="arrows:updated",Zl="pagination:mounted",Jl="pagination:updated",Ha="navigation:mounted",Oa="autoplay:play",Ql="autoplay:playing",Da="autoplay:pause",ja="lazyload:loaded",ec="sk",tc="sh",cr="ei";function Gt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=jl();function i(s,l){n.bind(t,Lo(s).join(" "),function(d){l.apply(l,Ma(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Zn(arguments,1))}return e&&e.event.on(Na,n.destroy),ho(n,{bus:t,on:i,off:Dt(n.unbind,t),emit:o})}function br(e,t,n,i){var o=Date.now,s,l=0,d,c=!0,u=0;function p(){if(!c){if(l=e?Un((o()-s)/e,1):1,n&&n(l),l>=1&&(t(),s=o(),i&&++u>=i))return x();d=us(p)}}function v(E){E||h(),s=o()-(E?l*e:0),c=!1,d=us(p)}function x(){c=!0}function I(){s=o(),l=0,n&&n(l)}function h(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function g(E){e=E}function y(){return c}return{start:v,rewind:I,pause:x,cancel:h,set:g,isPaused:y}}function Qd(e){var t=e;function n(o){t=o}function i(o){return Pa(Lo(o),t)}return{set:n,is:i}}function eu(e,t){var n=br(0,e,null,1);return function(){n.isPaused()&&n.start()}}function tu(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},l=jl(),d=[];function c(){var h=n.mediaQuery==="min";go(o).sort(function(g,y){return h?+g-+y:+y-+g}).forEach(function(g){p(o[g],"("+(h?"min":"max")+"-width:"+g+"px)")}),p(s,ds),v()}function u(h){h&&l.destroy()}function p(h,g){var y=matchMedia(g);l.bind(y,"change",v),d.push([h,y])}function v(){var h=i.is(ar),g=n.direction,y=d.reduce(function(E,L){return zn(E,L[1].matches?L[0]:{})},{});ps(n),I(y),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):g!==n.direction&&e.refresh()}function x(h){matchMedia(ds).matches&&(h?zn(n,s):ps(n,go(s)))}function I(h,g,y){zn(n,h),g&&zn(Object.getPrototypeOf(n),h),(y||!i.is(Ei))&&e.emit(an,n)}return{setup:c,destroy:u,reduce:x,set:I}}var xr="Arrow",wr=xr+"Left",Sr=xr+"Right",nc=xr+"Up",ic=xr+"Down",hs="rtl",$r="ttb",Hr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[nc,Sr],ArrowRight:[ic,wr]};function nu(e,t,n){function i(s,l,d){d=d||n.direction;var c=d===hs&&!l?1:d===$r?0:-1;return Hr[s]&&Hr[s][c]||s.replace(/width|left|right/i,function(u,p){var v=Hr[u.toLowerCase()][c]||u;return p>0?v.charAt(0).toUpperCase()+v.slice(1):v})}function o(s){return s*(n.direction===hs?1:-1)}return{resolve:i,orient:o}}var kn="role",ki="tabindex",iu="disabled",wn="aria-",Eo=wn+"controls",oc=wn+"current",fs=wn+"selected",hn=wn+"label",za=wn+"labelledby",rc=wn+"hidden",Ba=wn+"orientation",vo=wn+"roledescription",ys=wn+"live",vs=wn+"busy",bs=wn+"atomic",Va=[kn,ki,iu,Eo,oc,hn,za,rc,Ba,vo],In=Mo+"__",Qn="is-",Or=Mo,xs=In+"track",ou=In+"list",Cr=In+"slide",ac=Cr+"--clone",ru=Cr+"__container",Ga=In+"arrows",Tr=In+"arrow",sc=Tr+"--prev",lc=Tr+"--next",Lr=In+"pagination",cc=Lr+"__page",au=In+"progress",su=au+"__bar",lu=In+"toggle",cu=In+"spinner",du=In+"sr",uu=Qn+"initialized",fi=Qn+"active",dc=Qn+"prev",uc=Qn+"next",va=Qn+"visible",ba=Qn+"loading",pc=Qn+"focus-in",mc=Qn+"overflow",pu=[fi,va,dc,uc,ba,pc,mc],mu={slide:Cr,clone:ac,arrows:Ga,arrow:Tr,prev:sc,next:lc,pagination:Lr,page:cc,spinner:cu};function gu(e,t){if(Fl(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!mo(n,t);)n=n.parentElement;return n}var hu=5,ws=200,gc="touchstart mousedown",Dr="touchmove mousemove",jr="touchend touchcancel mouseup click";function fu(e,t,n){var i=Gt(e),o=i.on,s=i.bind,l=e.root,d=n.i18n,c={},u=[],p=[],v=[],x,I,h;function g(){C(),K(),L()}function y(){o(en,E),o(en,g),o(an,L),s(document,gc+" keydown",function(P){h=P.type==="keydown"},{capture:!0}),s(l,"focusin",function(){En(l,pc,!!h)})}function E(P){var T=Va.concat("style");Wn(u),Pn(l,p),Pn(x,v),Ln([x,I],T),Ln(l,P?T:["style",vo])}function L(){Pn(l,p),Pn(x,v),p=B(Or),v=B(xs),Tn(l,p),Tn(x,v),wt(l,hn,n.label),wt(l,za,n.labelledby)}function C(){x=A("."+xs),I=Ro(x,"."+ou),so(x&&I,"A track/list element is missing."),er(u,_l(I,"."+Cr+":not(."+ac+")")),mi({arrows:Ga,pagination:Lr,prev:sc,next:lc,bar:su,toggle:lu},function(P,T){c[T]=A("."+P)}),ho(c,{root:l,track:x,list:I,slides:u})}function K(){var P=l.id||Zd(Mo),T=n.role;l.id=P,x.id=x.id||P+"-track",I.id=I.id||P+"-list",!xn(l,kn)&&l.tagName!=="SECTION"&&T&&wt(l,kn,T),wt(l,vo,d.carousel),wt(I,kn,"presentation")}function A(P){var T=Ol(l,P);return T&&gu(T,"."+Or)===l?T:void 0}function B(P){return[P+"--"+n.type,P+"--"+n.direction,n.drag&&P+"--draggable",n.isNavigation&&P+"--nav",P===Or&&fi]}return ho(c,{setup:g,mount:y,destroy:E})}var Ni="slide",Yi="loop",Po="fade";function yu(e,t,n,i){var o=Gt(e),s=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,p=e.options,v=p.isNavigation,x=p.updateOnMove,I=p.i18n,h=p.pagination,g=p.slideFocus,y=c.Direction.resolve,E=xn(i,"style"),L=xn(i,hn),C=n>-1,K=Ro(i,"."+ru),A;function B(){C||(i.id=u.id+"-slide"+Wa(t+1),wt(i,kn,h?"tabpanel":"group"),wt(i,vo,I.slide),wt(i,hn,L||fa(I.slideLabel,[t+1,e.length]))),P()}function P(){d(i,"click",Dt(l,_a,oe)),d(i,"keydown",Dt(l,ec,oe)),s([Xi,tc,vi],W),s(Ha,z),x&&s(_n,w)}function T(){A=!0,o.destroy(),Pn(i,pu),Ln(i,Va),wt(i,"style",E),wt(i,hn,L||"")}function z(){var $=e.splides.map(function(M){var N=M.splide.Components.Slides.getAt(t);return N?N.slide.id:""}).join(" ");wt(i,hn,fa(I.slideX,(C?n:t)+1)),wt(i,Eo,$),wt(i,kn,g?"button":""),g&&Ln(i,vo)}function w(){A||W()}function W(){if(!A){var $=e.index;R(),J(),En(i,dc,t===$-1),En(i,uc,t===$+1)}}function R(){var $=U();$!==ms(i,fi)&&(En(i,fi,$),wt(i,oc,v&&$||""),l($?zl:Bl,oe))}function J(){var $=V(),M=!$&&(!U()||C);if(e.state.is([Ki,Co])||wt(i,rc,M||""),wt(Aa(i,p.focusableNodes||""),ki,M?-1:""),g&&wt(i,ki,M?-1:0),$!==ms(i,va)&&(En(i,va,$),l($?Vl:Gl,oe)),!$&&document.activeElement===i){var N=c.Slides.getAt(e.index);N&&Nl(N.slide)}}function F($,M,N){bn(N&&K||i,$,M)}function U(){var $=e.index;return $===t||p.cloneStatus&&$===n}function V(){if(e.is(Po))return U();var $=mn(c.Elements.track),M=mn(i),N=y("left",!0),Q=y("right",!0);return lr($[N])<=yo(M[N])&&lr(M[Q])<=yo($[Q])}function G($,M){var N=ln($-t);return!C&&(p.rewind||e.is(Yi))&&(N=Un(N,e.length-N)),N<=M}var oe={index:t,slideIndex:n,slide:i,container:K,isClone:C,mount:B,destroy:T,update:W,style:F,isWithin:G};return oe}function vu(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,p=[];function v(){x(),o(en,I),o(en,x)}function x(){c.forEach(function(W,R){g(W,R,-1)})}function I(){A(function(W){W.destroy()}),Wn(p)}function h(){A(function(W){W.update()})}function g(W,R,J){var F=yu(e,R,J,W);F.mount(),p.push(F),p.sort(function(U,V){return U.index-V.index})}function y(W){return W?B(function(R){return!R.isClone}):p}function E(W){var R=t.Controller,J=R.toIndex(W),F=R.hasFocus()?1:n.perPage;return B(function(U){return tr(U.index,J,J+F-1)})}function L(W){return B(W)[0]}function C(W,R){yn(W,function(J){if(qn(J)&&(J=Hl(J)),Wl(J)){var F=c[R];F?ka(J,F):Io(u,J),Tn(J,n.classes.slide),T(J,Dt(s,_i))}}),s(en)}function K(W){hi(B(W).map(function(R){return R.slide})),s(en)}function A(W,R){y(R).forEach(W)}function B(W){return p.filter(Fl(W)?W:function(R){return qn(W)?mo(R.slide,W):Pa(Lo(W),R.index)})}function P(W,R,J){A(function(F){F.style(W,R,J)})}function T(W,R){var J=Aa(W,"img"),F=J.length;F?J.forEach(function(U){l(U,"load error",function(){--F||R()})}):R()}function z(W){return W?c.length:p.length}function w(){return p.length>n.perPage}return{mount:v,destroy:I,update:h,register:g,get:y,getIn:E,getAt:L,add:C,remove:K,forEach:A,filter:B,style:P,getLength:z,isEnough:w}}function bu(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,p=u.root,v=u.track,x=u.list,I=d.getAt,h=d.style,g,y,E;function L(){C(),s(window,"resize load",eu(Dt(l,_i))),o([an,en],C),o(_i,K)}function C(){g=n.direction===$r,bn(p,"maxWidth",ii(n.width)),bn(v,c("paddingLeft"),A(!1)),bn(v,c("paddingRight"),A(!0)),K(!0)}function K(oe){var $=mn(p);(oe||y.width!==$.width||y.height!==$.height)&&(bn(v,"height",B()),h(c("marginRight"),ii(n.gap)),h("width",T()),h("height",z(),!0),y=$,l(yr),E!==(E=G())&&(En(p,mc,E),l(Jd,E)))}function A(oe){var $=n.padding,M=c(oe?"right":"left");return $&&ii($[M]||(po($)?0:$))||"0px"}function B(){var oe="";return g&&(oe=P(),so(oe,"height or heightRatio is missing."),oe="calc("+oe+" - "+A(!1)+" - "+A(!0)+")"),oe}function P(){return ii(n.height||mn(x).width*n.heightRatio)}function T(){return n.autoWidth?null:ii(n.fixedWidth)||(g?"":w())}function z(){return ii(n.fixedHeight)||(g?n.autoHeight?null:w():P())}function w(){var oe=ii(n.gap);return"calc((100%"+(oe&&" + "+oe)+")/"+(n.perPage||1)+(oe&&" - "+oe)+")"}function W(){return mn(x)[c("width")]}function R(oe,$){var M=I(oe||0);return M?mn(M.slide)[c("width")]+($?0:U()):0}function J(oe,$){var M=I(oe);if(M){var N=mn(M.slide)[c("right")],Q=mn(x)[c("left")];return ln(N-Q)+($?0:U())}return 0}function F(oe){return J(e.length-1)-J(0)+R(0,oe)}function U(){var oe=I(0);return oe&&parseFloat(bn(oe.slide,c("marginRight")))||0}function V(oe){return parseFloat(bn(v,c("padding"+(oe?"Right":"Left"))))||0}function G(){return e.is(Po)||F(!0)>W()}return{mount:L,resize:K,listSize:W,slideSize:R,sliderSize:F,totalSize:J,getPadding:V,isOverflow:G}}var xu=2;function wu(e,t,n){var i=Gt(e),o=i.on,s=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function p(){o(en,v),o([an,_i],I),(u=y())&&(h(u),t.Layout.resize(!0))}function v(){x(),p()}function x(){hi(c),Wn(c),i.destroy()}function I(){var E=y();u!==E&&(u<E||!E)&&i.emit(en)}function h(E){var L=l.get().slice(),C=L.length;if(C){for(;L.length<E;)er(L,L);er(L.slice(-E),L.slice(0,E)).forEach(function(K,A){var B=A<E,P=g(K.slide,A);B?ka(P,L[0].slide):Io(s.list,P),er(c,P),l.register(P,A-E+(B?0:C),K.index)})}}function g(E,L){var C=E.cloneNode(!0);return Tn(C,n.classes.clone),C.id=e.root.id+"-clone"+Wa(L+1),C}function y(){var E=n.clones;if(!e.is(Yi))E=0;else if(To(E)){var L=n[d("fixedWidth")]&&t.Layout.slideSize(0),C=L&&yo(mn(s.track)[d("width")]/L);E=C||n[d("autoWidth")]&&e.length||n.perPage*xu}return E}return{mount:p,destroy:x}}function Su(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,p=d.totalSize,v=d.listSize,x=d.sliderSize,I=t.Direction,h=I.resolve,g=I.orient,y=t.Elements,E=y.list,L=y.track,C;function K(){C=t.Transition,o([Jn,yr,an,en],A)}function A(){t.Controller.isBusy()||(t.Scroll.cancel(),P(e.index),t.Slides.update())}function B(M,N,Q,te){M!==N&&oe(M>Q)&&(W(),T(w(F(),M>Q),!0)),l(Ki),s(_n,N,Q,M),C.start(N,function(){l(Wi),s(Xi,N,Q,M),te&&te()})}function P(M){T(J(M,!0))}function T(M,N){if(!e.is(Po)){var Q=N?M:z(M);bn(E,"transform","translate"+h("X")+"("+Q+"px)"),M!==Q&&s(tc)}}function z(M){if(e.is(Yi)){var N=R(M),Q=N>t.Controller.getEnd(),te=N<0;(te||Q)&&(M=w(M,Q))}return M}function w(M,N){var Q=M-G(N),te=x();return M-=g(te*(yo(ln(Q)/te)||1))*(N?1:-1),M}function W(){T(F(),!0),C.cancel()}function R(M){for(var N=t.Slides.get(),Q=0,te=1/0,k=0;k<N.length;k++){var le=N[k].index,f=ln(J(le,!0)-M);if(f<=te)te=f,Q=le;else break}return Q}function J(M,N){var Q=g(p(M-1)-V(M));return N?U(Q):Q}function F(){var M=h("left");return mn(E)[M]-mn(L)[M]+g(u(!1))}function U(M){return n.trimSpace&&e.is(Ni)&&(M=Li(M,0,g(x(!0)-v()))),M}function V(M){var N=n.focus;return N==="center"?(v()-c(M,!0))/2:+N*c(M)||0}function G(M){return J(M?t.Controller.getEnd():0,!!n.trimSpace)}function oe(M){var N=g(w(F(),M));return M?N>=0:N<=E[h("scrollWidth")]-mn(L)[h("width")]}function $(M,N){N=To(N)?F():N;var Q=M!==!0&&g(N)<g(G(!1)),te=M!==!1&&g(N)>g(G(!0));return Q||te}return{mount:K,move:B,jump:P,translate:T,shift:w,cancel:W,toIndex:R,toPosition:J,getPosition:F,getLimit:G,exceededLimit:$,reposition:A}}function $u(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,p=t.Slides,v=p.isEnough,x=p.getLength,I=n.omitEnd,h=e.is(Yi),g=e.is(Ni),y=Dt(F,!1),E=Dt(F,!0),L=n.start||0,C,K=L,A,B,P;function T(){z(),o([an,en,cr],z),o(yr,w)}function z(){A=x(!0),B=n.perMove,P=n.perPage,C=oe();var f=Li(L,0,I?C:A-1);f!==L&&(L=f,l.reposition())}function w(){C!==oe()&&s(cr)}function W(f,ne,Z){if(!le()){var fe=J(f),Ie=G(fe);Ie>-1&&(ne||Ie!==L)&&(Q(Ie),l.move(fe,Ie,K,Z))}}function R(f,ne,Z,fe){t.Scroll.scroll(f,ne,Z,function(){var Ie=G(l.toIndex(d()));Q(I?Un(Ie,C):Ie),fe&&fe()})}function J(f){var ne=L;if(qn(f)){var Z=f.match(/([+\-<>])(\d+)?/)||[],fe=Z[1],Ie=Z[2];fe==="+"||fe==="-"?ne=U(L+ +(""+fe+(+Ie||1)),L):fe===">"?ne=Ie?$(+Ie):y(!0):fe==="<"&&(ne=E(!0))}else ne=h?f:Li(f,0,C);return ne}function F(f,ne){var Z=B||(k()?1:P),fe=U(L+Z*(f?-1:1),L,!(B||k()));return fe===-1&&g&&!Dl(d(),c(!f),1)?f?0:C:ne?fe:G(fe)}function U(f,ne,Z){if(v()||k()){var fe=V(f);fe!==f&&(ne=f,f=fe,Z=!1),f<0||f>C?!B&&(tr(0,f,ne,!0)||tr(C,ne,f,!0))?f=$(M(f)):h?f=Z?f<0?-(A%P||P):A:f:n.rewind?f=f<0?C:0:f=-1:Z&&f!==ne&&(f=$(M(ne)+(f<ne?-1:1)))}else f=-1;return f}function V(f){if(g&&n.trimSpace==="move"&&f!==L)for(var ne=d();ne===u(f,!0)&&tr(f,0,e.length-1,!n.rewind);)f<L?--f:++f;return f}function G(f){return h?(f+A)%A||0:f}function oe(){for(var f=A-(k()||h&&B?1:P);I&&f-- >0;)if(u(A-1,!0)!==u(f,!0)){f++;break}return Li(f,0,A-1)}function $(f){return Li(k()?f:P*f,0,C)}function M(f){return k()?Un(f,C):lr((f>=C?A-1:f)/P)}function N(f){var ne=l.toIndex(f);return g?Li(ne,0,C):ne}function Q(f){f!==L&&(K=L,L=f)}function te(f){return f?K:L}function k(){return!To(n.focus)||n.isNavigation}function le(){return e.state.is([Ki,Co])&&!!n.waitForTransition}return{mount:T,go:W,scroll:R,getNext:y,getPrev:E,getAdjacent:F,getEnd:oe,setIndex:Q,getIndex:te,toIndex:$,toPage:M,toDest:N,hasFocus:k,isBusy:le}}var Cu="http://www.w3.org/2000/svg",Tu="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",No=40;function Lu(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,p=t.Controller,v=u.arrows,x=u.track,I=v,h=u.prev,g=u.next,y,E,L={};function C(){A(),o(an,K)}function K(){B(),C()}function A(){var R=n.arrows;R&&!(h&&g)&&z(),h&&g&&(ho(L,{prev:h,next:g}),fo(I,R?"":"none"),Tn(I,E=Ga+"--"+n.direction),R&&(P(),W(),wt([h,g],Eo,x.id),l(Xl,h,g)))}function B(){i.destroy(),Pn(I,E),y?(hi(v?[h,g]:I),h=g=null):Ln([h,g],Va)}function P(){o([Jn,Xi,en,vi,cr],W),s(g,"click",Dt(T,">")),s(h,"click",Dt(T,"<"))}function T(R){p.go(R,!0)}function z(){I=v||Pi("div",d.arrows),h=w(!0),g=w(!1),y=!0,Io(I,[h,g]),!v&&ka(I,x)}function w(R){var J='<button class="'+d.arrow+" "+(R?d.prev:d.next)+'" type="button"><svg xmlns="'+Cu+'" viewBox="0 0 '+No+" "+No+'" width="'+No+'" height="'+No+'" focusable="false"><path d="'+(n.arrowPath||Tu)+'" />';return Hl(J)}function W(){if(h&&g){var R=e.index,J=p.getPrev(),F=p.getNext(),U=J>-1&&R<J?c.last:c.prev,V=F>-1&&R>F?c.first:c.next;h.disabled=J<0,g.disabled=F<0,wt(h,hn,U),wt(g,hn,V),l(Yl,h,g,J,F)}}return{arrows:L,mount:C,destroy:B,update:W}}var Iu=Fa+"-interval";function Ru(e,t,n){var i=Gt(e),o=i.on,s=i.bind,l=i.emit,d=br(n.interval,e.go.bind(e,">"),P),c=d.isPaused,u=t.Elements,p=t.Elements,v=p.root,x=p.toggle,I=n.autoplay,h,g,y=I==="pause";function E(){I&&(L(),x&&wt(x,Eo,u.track.id),y||C(),B())}function L(){n.pauseOnHover&&s(v,"mouseenter mouseleave",function(z){h=z.type==="mouseenter",A()}),n.pauseOnFocus&&s(v,"focusin focusout",function(z){g=z.type==="focusin",A()}),x&&s(x,"click",function(){y?C():K(!0)}),o([_n,vr,en],d.rewind),o(_n,T)}function C(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),g=h=y=!1,B(),l(Oa))}function K(z){z===void 0&&(z=!0),y=!!z,B(),c()||(d.pause(),l(Da))}function A(){y||(h||g?K(!1):C())}function B(){x&&(En(x,fi,!y),wt(x,hn,n.i18n[y?"play":"pause"]))}function P(z){var w=u.bar;w&&bn(w,"width",z*100+"%"),l(Ql,z)}function T(z){var w=t.Slides.getAt(z);d.set(w&&+xn(w.slide,Iu)||n.interval)}return{mount:E,destroy:d.cancel,play:C,pause:K,isPaused:c}}function Mu(e,t,n){var i=Gt(e),o=i.on;function s(){n.cover&&(o(ja,Dt(d,!0)),o([Jn,an,en],Dt(l,!0)))}function l(c){t.Slides.forEach(function(u){var p=Ro(u.container||u.slide,"img");p&&p.src&&d(c,p,u)})}function d(c,u,p){p.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),fo(u,c?"none":"")}return{mount:s,destroy:Dt(l,!1)}}var Eu=10,Pu=600,ku=.6,Au=1.5,Fu=800;function Wu(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,p=d.exceededLimit,v=d.translate,x=e.is(Ni),I,h,g=1;function y(){o(_n,K),o([an,en],A)}function E(P,T,z,w,W){var R=c();if(K(),z&&(!x||!p())){var J=t.Layout.sliderSize(),F=ha(P)*J*lr(ln(P)/J)||0;P=d.toPosition(t.Controller.toDest(P%J))+F}var U=Dl(R,P,1);g=1,T=U?0:T||sr(ln(P-R)/Au,Fu),h=w,I=br(T,L,Dt(C,R,P,W),1),l(Co),s(vr),I.start()}function L(){l(Wi),h&&h(),s(vi)}function C(P,T,z,w){var W=c(),R=P+(T-P)*B(w),J=(R-W)*g;v(W+J),x&&!z&&p()&&(g*=ku,ln(J)<Eu&&E(u(p(!0)),Pu,!1,h,!0))}function K(){I&&I.cancel()}function A(){I&&!I.isPaused()&&(K(),L())}function B(P){var T=n.easingFunc;return T?T(P):1-Math.pow(1-P,4)}return{mount:y,destroy:K,scroll:E,cancel:A}}var Ii={passive:!1,capture:!0};function _u(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,p=t.Scroll,v=t.Controller,x=t.Elements.track,I=t.Media.reduce,h=t.Direction,g=h.resolve,y=h.orient,E=u.getPosition,L=u.exceededLimit,C,K,A,B,P,T=!1,z,w,W;function R(){l(x,Dr,ma,Ii),l(x,jr,ma,Ii),l(x,gc,F,Ii),l(x,"click",G,{capture:!0}),l(x,"dragstart",Mn),o([Jn,an],J)}function J(){var q=n.drag;se(!q),B=q==="free"}function F(q){if(z=!1,!w){var ee=Ie(q);fe(q.target)&&(ee||!q.button)&&(v.isBusy()?Mn(q,!0):(W=ee?x:window,P=c.is([Ki,Co]),A=null,l(W,Dr,U,Ii),l(W,jr,V,Ii),u.cancel(),p.cancel(),oe(q)))}}function U(q){if(c.is(Qo)||(c.set(Qo),s(ql)),q.cancelable)if(P){u.translate(C+Z(k(q)));var ee=le(q)>ws,ce=T!==(T=L());(ee||ce)&&oe(q),z=!0,s(Ul),Mn(q)}else N(q)&&(P=M(q),Mn(q))}function V(q){c.is(Qo)&&(c.set(Wi),s(Kl)),P&&($(q),Mn(q)),d(W,Dr,U),d(W,jr,V),P=!1}function G(q){!w&&z&&Mn(q,!0)}function oe(q){A=K,K=q,C=E()}function $(q){var ee=Q(q),ce=te(ee),ke=n.rewind&&n.rewindByDrag;I(!1),B?v.scroll(ce,0,n.snap):e.is(Po)?v.go(y(ha(ee))<0?ke?"<":"-":ke?">":"+"):e.is(Ni)&&T&&ke?v.go(L(!0)?">":"<"):v.go(v.toDest(ce),!0),I(!0)}function M(q){var ee=n.dragMinThreshold,ce=po(ee),ke=ce&&ee.mouse||0,$e=(ce?ee.touch:+ee)||10;return ln(k(q))>(Ie(q)?$e:ke)}function N(q){return ln(k(q))>ln(k(q,!0))}function Q(q){if(e.is(Yi)||!T){var ee=le(q);if(ee&&ee<ws)return k(q)/ee}return 0}function te(q){return E()+ha(q)*Un(ln(q)*(n.flickPower||600),B?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function k(q,ee){return ne(q,ee)-ne(f(q),ee)}function le(q){return ga(q)-ga(f(q))}function f(q){return K===q&&A||K}function ne(q,ee){return(Ie(q)?q.changedTouches[0]:q)["page"+g(ee?"Y":"X")]}function Z(q){return q/(T&&e.is(Ni)?hu:1)}function fe(q){var ee=n.noDrag;return!mo(q,"."+cc+", ."+Tr)&&(!ee||!mo(q,ee))}function Ie(q){return typeof TouchEvent<"u"&&q instanceof TouchEvent}function ue(){return P}function se(q){w=q}return{mount:R,disable:se,isDragging:ue}}var Nu={Spacebar:" ",Right:Sr,Left:wr,Up:nc,Down:ic};function qa(e){return e=qn(e)?e:e.key,Nu[e]||e}var Ss="keydown";function Hu(e,t,n){var i=Gt(e),o=i.on,s=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,p;function v(){x(),o(an,I),o(an,x),o(_n,g)}function x(){var E=n.keyboard;E&&(u=E==="global"?window:d,s(u,Ss,y))}function I(){l(u,Ss)}function h(E){p=E}function g(){var E=p;p=!0,Al(function(){p=E})}function y(E){if(!p){var L=qa(E);L===c(wr)?e.go("<"):L===c(Sr)&&e.go(">")}}return{mount:v,destroy:I,disable:h}}var lo=Fa+"-lazy",nr=lo+"-srcset",Ou="["+lo+"], ["+nr+"]";function Du(e,t,n){var i=Gt(e),o=i.on,s=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[Xi,vi],p=[];function v(){n.lazyLoad&&(x(),o(en,x))}function x(){Wn(p),I(),c?E():(s(u),o(u,h),h())}function I(){t.Slides.forEach(function(L){Aa(L.slide,Ou).forEach(function(C){var K=xn(C,lo),A=xn(C,nr);if(K!==C.src||A!==C.srcset){var B=n.classes.spinner,P=C.parentElement,T=Ro(P,"."+B)||Pi("span",B,P);p.push([C,L,T]),C.src||fo(C,"none")}})})}function h(){p=p.filter(function(L){var C=n.perPage*((n.preloadPages||1)+1)-1;return L[1].isWithin(e.index,C)?g(L):!0}),p.length||s(u)}function g(L){var C=L[0];Tn(L[1].slide,ba),l(C,"load error",Dt(y,L)),wt(C,"src",xn(C,lo)),wt(C,"srcset",xn(C,nr)),Ln(C,lo),Ln(C,nr)}function y(L,C){var K=L[0],A=L[1];Pn(A.slide,ba),C.type!=="error"&&(hi(L[2]),fo(K,""),d(ja,K,A),d(_i)),c&&E()}function E(){p.length&&g(p.shift())}return{mount:v,destroy:Dt(Wn,p),check:h}}function ju(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,p=u.hasFocus,v=u.getIndex,x=u.go,I=t.Direction.resolve,h=c.pagination,g=[],y,E;function L(){C(),o([an,en,cr],L);var w=n.pagination;h&&fo(h,w?"":"none"),w&&(o([_n,vr,vi],z),K(),z(),s(Zl,{list:y,items:g},T(e.index)))}function C(){y&&(hi(h?Zn(y.children):y),Pn(y,E),Wn(g),y=null),i.destroy()}function K(){var w=e.length,W=n.classes,R=n.i18n,J=n.perPage,F=p()?u.getEnd()+1:yo(w/J);y=h||Pi("ul",W.pagination,c.track.parentElement),Tn(y,E=Lr+"--"+P()),wt(y,kn,"tablist"),wt(y,hn,R.select),wt(y,Ba,P()===$r?"vertical":"");for(var U=0;U<F;U++){var V=Pi("li",null,y),G=Pi("button",{class:W.page,type:"button"},V),oe=d.getIn(U).map(function(M){return M.slide.id}),$=!p()&&J>1?R.pageX:R.slideX;l(G,"click",Dt(A,U)),n.paginationKeyboard&&l(G,"keydown",Dt(B,U)),wt(V,kn,"presentation"),wt(G,kn,"tab"),wt(G,Eo,oe.join(" ")),wt(G,hn,fa($,U+1)),wt(G,ki,-1),g.push({li:V,button:G,page:U})}}function A(w){x(">"+w,!0)}function B(w,W){var R=g.length,J=qa(W),F=P(),U=-1;J===I(Sr,!1,F)?U=++w%R:J===I(wr,!1,F)?U=(--w+R)%R:J==="Home"?U=0:J==="End"&&(U=R-1);var V=g[U];V&&(Nl(V.button),x(">"+U),Mn(W,!0))}function P(){return n.paginationDirection||n.direction}function T(w){return g[u.toPage(w)]}function z(){var w=T(v(!0)),W=T(v());if(w){var R=w.button;Pn(R,fi),Ln(R,fs),wt(R,ki,-1)}if(W){var J=W.button;Tn(J,fi),wt(J,fs,!0),wt(J,ki,"")}s(Jl,{list:y,items:g},w,W)}return{items:g,mount:L,destroy:C,getAt:T,update:z}}var zu=[" ","Enter"];function Bu(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function l(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&p()}function d(){s.forEach(function(h){h.destroy()}),Wn(s)}function c(){d(),l()}function u(h,g){var y=Gt(h);y.on(_n,function(E,L,C){g.go(g.is(Yi)?C:E)}),s.push(y)}function p(){var h=Gt(e),g=h.on;g(_a,x),g(ec,I),g([Jn,an],v),s.push(h),h.emit(Ha,e.splides)}function v(){wt(t.Elements.list,Ba,n.direction===$r?"vertical":"")}function x(h){e.go(h.index)}function I(h,g){Pa(zu,qa(g))&&(x(h),Mn(g))}return{setup:Dt(t.Media.set,{slideFocus:To(o)?i:o},!0),mount:l,destroy:d,remount:c}}function Vu(e,t,n){var i=Gt(e),o=i.bind,s=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,Ii)}function d(u){if(u.cancelable){var p=u.deltaY,v=p<0,x=ga(u),I=n.wheelMinThreshold||0,h=n.wheelSleep||0;ln(p)>I&&x-s>h&&(e.go(v?"<":">"),s=x),c(v)&&Mn(u)}}function c(u){return!n.releaseWheel||e.state.is(Ki)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var Gu=90;function qu(e,t,n){var i=Gt(e),o=i.on,s=t.Elements.track,l=n.live&&!n.isNavigation,d=Pi("span",du),c=br(Gu,Dt(p,!1));function u(){l&&(x(!t.Autoplay.isPaused()),wt(s,bs,!0),d.textContent="…",o(Oa,Dt(x,!0)),o(Da,Dt(x,!1)),o([Xi,vi],Dt(p,!0)))}function p(I){wt(s,vs,I),I?(Io(s,d),c.start()):(hi(d),c.cancel())}function v(){Ln(s,[ys,bs,vs]),hi(d)}function x(I){l&&wt(s,ys,I?"off":"polite")}return{mount:u,disable:x,destroy:v}}var Uu=Object.freeze({__proto__:null,Media:tu,Direction:nu,Elements:fu,Slides:vu,Layout:bu,Clones:wu,Move:Su,Controller:$u,Arrows:Lu,Autoplay:Ru,Cover:Mu,Scroll:Wu,Drag:_u,Keyboard:Hu,LazyLoad:Du,Pagination:ju,Sync:Bu,Wheel:Vu,Live:qu}),Ku={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"},Xu={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:mu,i18n:Ku,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Yu(e,t,n){var i=t.Slides;function o(){Gt(e).on([Jn,en],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),Al(c)}return{mount:o,start:l,cancel:ma}}function Zu(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,l=t.Elements.list,d=Dt(bn,l,"transition"),c;function u(){Gt(e).bind(l,"transitionend",function(I){I.target===l&&c&&(v(),c())})}function p(I,h){var g=i.toPosition(I,!0),y=i.getPosition(),E=x(I);ln(g-y)>=1&&E>=1?n.useScroll?s.scroll(g,E,!1,h):(d("transform "+E+"ms "+n.easing),i.translate(g,!0),c=h):(i.jump(I),h())}function v(){d(""),s.cancel()}function x(I){var h=n.rewindSpeed;if(e.is(Ni)&&h){var g=o.getIndex(!0),y=o.getEnd();if(g===0&&I>=y||g>=y&&I===0)return h}return n.speed}return{mount:u,start:p,cancel:v}}var Ju=(function(){function e(n,i){this.event=Gt(),this.Components={},this.state=Qd(Ei),this.splides=[],this._o={},this._E={};var o=qn(n)?Ol(document,n):n;so(o,o+" is invalid."),this.root=o,i=zn({label:xn(o,hn)||"",labelledby:xn(o,za)||""},Xu,e.defaults,i||{});try{zn(i,JSON.parse(xn(o,Fa)))}catch{so(!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;so(l.is([Ei,ar]),"Already mounted!"),l.set(Ei),this._C=d,this._T=o||this._T||(this.is(Po)?Yu:Zu),this._E=i||this._E;var c=ho({},Uu,this._E,{Transition:this._T});return mi(c,function(u,p){var v=u(s,d,s._o);d[p]=v,v.setup&&v.setup()}),mi(d,function(u){u.mount&&u.mount()}),this.emit(Jn),Tn(this.root,uu),l.set(Wi),this.emit(ya),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Wi)&&(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(Zn(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(en),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(Ei)?Gt(this).on(ya,this.destroy.bind(this,i)):(mi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(Na),o.destroy(),i&&Wn(this.splides),s.set(ar)),this},Kd(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})(),Ua=Ju;Ua.defaults={};Ua.STATES=Yd;var $s=[[Jn,"onMounted"],[ya,"onReady"],[_n,"onMove"],[Xi,"onMoved"],[_a,"onClick"],[zl,"onActive"],[Bl,"onInactive"],[Vl,"onVisible"],[Gl,"onHidden"],[en,"onRefresh"],[an,"onUpdated"],[_i,"onResize"],[yr,"onResized"],[ql,"onDrag"],[Ul,"onDragging"],[Kl,"onDragged"],[vr,"onScroll"],[vi,"onScrolled"],[Na,"onDestroy"],[Xl,"onArrowsMounted"],[Yl,"onArrowsUpdated"],[Zl,"onPaginationMounted"],[Jl,"onPaginationUpdated"],[Ha,"onNavigationMounted"],[Oa,"onAutoplayPlay"],[Ql,"onAutoplayPlaying"],[Da,"onAutoplayPause"],[ja,"onLazyLoadLoaded"]];function Ka(...e){return e.filter(Boolean).join(" ")}function dr(e){return e!==null&&typeof e=="object"}function xa(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!xa(n,t[i]));if(dr(e)&&dr(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!xa(e[o],t[o]))}return e===t}function Qu(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function ep(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 wa(e,t){const n=e;return ep(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():dr(i)?n[o]=wa(dr(n[o])?n[o]:{},i):n[o]=i}),n}var tp=({children:e,className:t,...n})=>a.createElement("div",{className:Ka("splide__track",t),...n},a.createElement("ul",{className:"splide__list"},e)),Xa=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 Ua(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=wa({},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&&!xa(this.options,e)&&(this.splide.options=e,this.options=wa({},e));const t=this.getSlides();Qu(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){$s.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:Ka("splide",e),ref:this.splideRef,...this.omit(o,["options",...$s.map(s=>s[1])])},n?a.createElement(tp,null,i):i)}},Ya=({children:e,className:t,...n})=>a.createElement("li",{className:Ka("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 Du="RichTextRenderer-module__link___BWeZ2",zu={link:Du},Bu=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))},Rr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Bu(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function on(e){const{color:t,...n}=e;return n}function Vt(e,t){var o,l,s;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Rr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:w.scalingValue(e.letterSpacing,t),wordSpacing:w.scalingValue(e.wordSpacing,t),fontSize:w.scalingValue(n,t),lineHeight:i!==void 0?w.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(l=e.textAppearance)==null?void 0:l.textDecoration,fontVariant:(s=e.textAppearance)==null?void 0:s.fontVariant,textAlign:e.textAlign,color:e.color}}const yi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:zu.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:Vu(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 Vu(e){return{...e.fontFamily&&{fontFamily:Rr(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const Gu="SvgImage-module__svg___q3xE-",qu="SvgImage-module__img___VsTm-",bl={svg:Gu,img:qu},Uu=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Ku=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,rn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[l,s]=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("")');s(d)}},[]),!Uu(e)||!l?r.jsx("img",{src:e,alt:"",className:ut(bl.img,i),style:o}):r.jsx("span",{"data-supports-mask":l,className:ut(bl.svg,i),style:{"--svg":Ku(e),"--fill":t,"--hover-fill":n,...o??{}}})},Xu={"top-left":rt.topLeftAlignment,"top-center":rt.topCenterAlignment,"top-right":rt.topRightAlignment,"middle-left":rt.middleLeftAlignment,"middle-center":rt.middleCenterAlignment,"middle-right":rt.middleRightAlignment,"bottom-left":rt.bottomLeftAlignment,"bottom-center":rt.bottomCenterAlignment,"bottom-right":rt.bottomRightAlignment};function Yu({settings:e,content:t,styles:n,isEditor:i}){const[o,l]=a.useState(null),{widthSettings:s,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:p,fontSizeLineHeight:b,textAppearance:S,color:L}=n.imageCaption??{},[h,g]=a.useState(void 0),[y,E]=a.useState(null),[R,T]=a.useState(0),[Y,k]=a.useState(0),{direction:B,transition:P,controls:C,pagination:z,imageCaption:v,triggers:W}=e,I=a.useRef(P.type),{x:Z,y:A}=e.controls.offset,K=V=>{o&&o.go(V)};return a.useEffect(()=>{if(!y)return;const V=new ResizeObserver(G=>{if(!o)return;const[ne]=G;g({width:Math.round(ne.contentRect.width),height:Math.round(ne.contentRect.height)})});return V.observe(y),()=>V.unobserve(y)},[y]),a.useEffect(()=>{!o||I.current===P.type||(k(V=>V+1),I.current=P.type)},[P.type]),r.jsx("div",{className:ut(rt.wrapper,{[rt.editor]:i}),ref:E,children:r.jsxs("div",{className:rt.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:P.backgroundColor&&P.type==="fade in"?P.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:ut(rt.captionBlock),children:r.jsx("div",{className:rt.captionTextWrapper,children:t.map((V,G)=>r.jsx("div",{className:ut(rt.captionText,Xu[v.alignment],{[rt.withPointerEvents]:G===R&&i,[rt.active]:G===R}),style:{fontFamily:Rr(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:s.sizing==="auto"?"max-content":w.scalingValue(s.width,i),letterSpacing:w.scalingValue(c,i),wordSpacing:w.scalingValue(p,i),textAlign:u,fontSize:w.scalingValue(b.fontSize,i),lineHeight:w.scalingValue(b.lineHeight,i),textTransform:S.textTransform??"none",textDecoration:S.textDecoration??"none",fontVariant:S.fontVariant??"normal",color:L,transitionDuration:P.duration?`${Math.round(parseInt(P.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:rt.captionTextInner,style:{"--link-hover-color":v.linkHoverColor,"--link-color":v.linkColor,position:"relative",top:w.scalingValue(v.offset.y,i),left:w.scalingValue(v.offset.x,i)},children:r.jsx(yi,{content:V.imageCaption})})},G))})}),r.jsx(qa,{onMove:V=>{T(V.index)},ref:l,options:{arrows:!1,speed:P.duration?parseInt(P.duration):500,autoplay:W.autoPlay!==null,...W.autoPlay!==null&&{interval:parseInt(W.autoPlay)*1e3},direction:B==="horiz"||P.type==="fade in"?"ltr":"ttb",pagination:!1,drag:W.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:P.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((V,G)=>r.jsx(Ua,{children:r.jsx("div",{className:rt.sliderItem,children:r.jsx("div",{className:rt.imgWrapper,children:r.jsx("img",{className:ut(rt.sliderImage,{[rt.contain]:V.image.objectFit==="contain",[rt.cover]:V.image.objectFit==="cover"}),src:V.image.url,alt:V.image.name??""})})})},G))},Y),C.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:ut(rt.arrow,{[rt.arrowVertical]:B==="vert",[rt.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:r.jsxs("button",{onClick:()=>{K("-1")},className:rt.arrowInner,style:{transform:`translate(${w.scalingValue(Z,i)}, ${w.scalingValue(A*(B==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&r.jsx(rn,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:ut(rt.arrowImg,rt.mirror)}),!C.arrowsImgUrl&&r.jsx(wl,{color:C.color,className:ut(rt.arrowIcon,rt.arrowImg,rt.mirror)})]})}),r.jsx("div",{className:ut(rt.arrow,rt.nextArrow,{[rt.arrowVertical]:B==="vert",[rt.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:r.jsxs("button",{className:rt.arrowInner,onClick:()=>K("+1"),style:{transform:`translate(${w.scalingValue(Z*(B==="horiz"?-1:1),i)}, ${w.scalingValue(A,i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&r.jsx(rn,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:rt.arrowImg}),!C.arrowsImgUrl&&r.jsx(wl,{color:C.color,className:ut(rt.arrowIcon,rt.arrowImg)})]})})]}),W.triggersList.click&&r.jsx("div",{className:rt.clickOverlay,onClick:()=>{o&&o.go("+1")}}),z.isActive&&r.jsx("div",{className:ut(rt.pagination,{[rt.paginationInsideBottom]:z.position==="inside-1"&&B==="horiz",[rt.paginationInsideTop]:z.position==="inside-2"&&B==="horiz",[rt.paginationOutsideBottom]:z.position==="outside-1"&&B==="horiz",[rt.paginationOutsideTop]:z.position==="outside-2"&&B==="horiz",[rt.paginationInsideLeft]:z.position==="inside-1"&&B==="vert",[rt.paginationInsideRight]:z.position==="inside-2"&&B==="vert",[rt.paginationOutsideLeft]:z.position==="outside-1"&&B==="vert",[rt.paginationOutsideRight]:z.position==="outside-2"&&B==="vert",[rt.paginationVertical]:B==="vert"}),children:r.jsx("div",{className:rt.paginationInner,style:{backgroundColor:z.colors[2],transform:`scale(${z.scale/100}) translate(${w.scalingValue(z.offset.x,i)}, ${w.scalingValue(z.offset.y,i)}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:t.map((V,G)=>r.jsx("button",{onClick:()=>{o&&o.go(G)},className:ut(rt.paginationItem),children:r.jsx("div",{className:ut(rt.dot,{[rt.activeDot]:G===R}),style:{backgroundColor:G===R?z.colors[0]:z.colors[1],"--pagination-hover-color":z.hover}})},G))})})]})})}function wl({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 Zu={element:Yu,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"]}},Ju="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Qu="ImageRevealSlider-module__image___Qjt-e",ep="ImageRevealSlider-module__link___N-iLG",tp="ImageRevealSlider-module__cursor___2U03d",wi={imageRevealSlider:Ju,image:Qu,link:ep,cursor:tp};function Sl(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const l=i.width?Number.parseFloat(i.width):o.naturalWidth,s=o.naturalHeight/o.naturalWidth*l,d=l/2,c=s/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function Dr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function np(e,t,n,i){let o,l;if(t==="custom"){o=n;const s=await Dr(e);l=s.height/s.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const s=await Dr(e);l=s.height/s.width*o}else{const s=await Dr(e);o=s.width,l=s.height}return{width:o,height:l,finalWidth:`${o}px`}}function ip({settings:e,content:t,isEditor:n}){const[i,o]=a.useState(null),[l,s]=a.useState([]),[d,c]=a.useState(0),u=a.useRef(0),[p,b]=a.useState({x:0,y:0}),[S,L]=a.useState(1),[h,g]=a.useState("none"),y=a.useRef({x:0,y:0}),[E,R]=a.useState(!1),{sizeType:T,imageWidth:Y,randomRangeImageWidth:k}=e.imageSize,{revealPosition:B,visible:P}=e.position,{cursorType:C,target:z,defaultCursorScale:v,defaultCursor:W,hoverCursorScale:I,hoverCursor:Z}=e.cursor;a.useEffect(()=>{if(!i)return;const V=($,M)=>{const H=i.getBoundingClientRect(),ee=$-H.left,ie=M-H.top;if(b({x:ee,y:ie}),C==="system"){g("none"),L(1);return}const F=ee,pe=ie,x=document.elementFromPoint(H.left+F,H.top+pe);if(x&&x.closest("a")){g("none"),L(1);return}const re=Sl(F,pe,l)||z==="area"?{img:Z??"none",scale:I}:{img:W??"none",scale:v};g(re.img),L(re.scale)},G=$=>{$.stopPropagation(),y.current={x:$.clientX,y:$.clientY},V($.clientX,$.clientY)},ne=()=>{E&&V(y.current.x,y.current.y)};return i.addEventListener("mousemove",G),window.addEventListener("scroll",ne,!0),()=>{i.removeEventListener("mousemove",G),window.removeEventListener("scroll",ne,!0)}},[i,E,p,C,z,Z,W,I,v,l]),a.useEffect(()=>{E||(g("none"),L(0))},[E]);const A=async(V,G,ne,$={})=>{const{width:M,height:H,finalWidth:ee}=await np(V.image.url,T,Y,k);let ie=0,F=0;B==="same"?(ie=G/2,F=ne/2):(ie=$.x??Math.random()*G,F=$.y??Math.random()*ne);const pe=Math.min(Math.max(ie,M/2),G-M/2),x=Math.min(Math.max(F,H/2),ne-H/2);return{id:u.current++,url:V.image.url,link:V.link,name:V.image.name,x:pe,y:x,width:ee}};a.useEffect(()=>{if(!i||t.length===0)return;const V=i.getBoundingClientRect(),G=V.width,ne=V.height,$=[];(async()=>{const H=t[0],ee=await A(H,G,ne);$.push(ee),s($),c(1)})()},[T,Y,k,B,i]),a.useEffect(()=>{P==="last One"&&s(V=>V.length>0?[V[V.length-1]]:[])},[P]);const K=async V=>{if(!i)return;const G=i.getBoundingClientRect(),ne=V.clientX-G.left,$=V.clientY-G.top;if(z==="image"&&!Sl(ne,$,l))return;let M=0,H=0;B==="on Click"?(M=ne,H=$):B==="same"?(M=G.width/2,H=G.height/2):(M=Math.random()*G.width,H=Math.random()*G.height);const ee=t[d],ie=await A(ee,G.width,G.height,{x:M,y:H});s(F=>P==="all"?[...F,ie]:[ie]),c(F=>F>=t.length-1?0:F+1)};return r.jsxs("div",{ref:o,onClick:K,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),className:wi.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[l.map(V=>r.jsx("div",{className:wi.wrapper,style:{top:`${V.y}px`,left:`${V.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:V.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:z==="area"&&V.link?r.jsx("a",{href:V.link,target:"_blank",className:wi.link,children:r.jsx("img",{src:V.url,alt:V.name,className:wi.image},V.id)}):r.jsx("img",{src:V.url,alt:V.name,className:wi.image},V.id)},V.id)),E&&r.jsx("div",{className:wi.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${S})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const op={element:ip,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:""}]}}}},rp="LightBox-module__hidden___9s-9x",ap="LightBox-module__heroImage___sTxNF",lp="LightBox-module__background___rm9ml",sp="LightBox-module__editor___4ACaY",cp="LightBox-module__contentStyle___Bgnsq",dp="LightBox-module__imageStyle___tLIlB",up="LightBox-module__imgWrapper___LuFUp",pp="LightBox-module__contain___8-yaS",mp="LightBox-module__cover___hNvOG",gp="LightBox-module__caption___b6L2I",hp="LightBox-module__captionTextInner___rCGNH",fp="LightBox-module__lightboxSplide___XFuWC",yp="LightBox-module__arrow___iz38X",vp="LightBox-module__arrowVertical___Zfz81",xp="LightBox-module__nextArrow___zkAQN",bp="LightBox-module__arrowInner___p48sW",wp="LightBox-module__arrowIcon___3VaFf",Sp="LightBox-module__arrowImg___pNV88",$p="LightBox-module__mirror___pjeXc",Cp="LightBox-module__thumbsWrapper___GB-nU",Tp="LightBox-module__thumbsContainerVertical___wttk5",Lp="LightBox-module__thumbsContainer___osSma",Rp="LightBox-module__thumbsAlignStart___MO6tY",Ip="LightBox-module__thumbsAlignCenter___Q4sUx",Mp="LightBox-module__thumbsAlignEnd___p4y9R",Ep="LightBox-module__thumbItem___HvnF3",Pp="LightBox-module__closeButton___g2khP",kp="LightBox-module__fadeIn___0m5GW",Ap="LightBox-module__slideInLeft___gPYwC",Fp="LightBox-module__slideInRight___S-pPp",Wp="LightBox-module__slideInTop___DFdAj",_p="LightBox-module__slideInBottom___m27kZ",Np="LightBox-module__fadeOut___55qBR",Hp="LightBox-module__slideOutLeft___NvU7P",Op="LightBox-module__slideOutRight___SK7eC",jp="LightBox-module__slideOutTop___Vgg0z",Dp="LightBox-module__slideOutBottom___nJ0Ef",zp="LightBox-module__scaleSlide___vZriG",Be={hidden:rp,heroImage:ap,background:lp,editor:sp,contentStyle:cp,imageStyle:dp,imgWrapper:up,contain:pp,cover:mp,caption:gp,captionTextInner:hp,lightboxSplide:fp,arrow:yp,arrowVertical:vp,nextArrow:xp,arrowInner:bp,arrowIcon:wp,arrowImg:Sp,mirror:$p,thumbsWrapper:Cp,thumbsContainerVertical:Tp,thumbsContainer:Lp,thumbsAlignStart:Rp,thumbsAlignCenter:Ip,thumbsAlignEnd:Mp,thumbItem:Ep,closeButton:Pp,fadeIn:kp,slideInLeft:Ap,slideInRight:Fp,slideInTop:Wp,slideInBottom:_p,fadeOut:Np,slideOutLeft:Hp,slideOutRight:Op,slideOutTop:jp,slideOutBottom:Dp,scaleSlide:zp},Ho=(e,t,n)=>{const i={},[o,l]=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"),l==="left"?(i.left="0",i.right="auto"):l==="center"?(i.left="50%",i.right="auto"):l==="right"&&(i.left="auto",i.right="0"),o==="middle"&&l==="center"?i.transform=`translate(calc(-50% + ${w.scalingValue(t.x,n)}), calc(-50% + ${w.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${w.scalingValue(t.x,n)}, calc(-50% + ${w.scalingValue(t.y,n)}))`:l==="center"?i.transform=`translate(calc(-50% + ${w.scalingValue(t.x,n)}), ${w.scalingValue(t.y,n)})`:i.transform=`translate(${w.scalingValue(t.x,n)}, ${w.scalingValue(t.y,n)})`,i};function sc(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 Bp(e){const t=e.trim().split(/\s+/),n=i=>{if(i.endsWith("%"))return parseFloat(i)/100;switch(i){case"left":case"top":return 0;case"right":case"bottom":return 1;case"center":return .5;default:return .5}};if(t.length===1){const i=t[0];return i==="center"?{x:.5,y:.5}:i==="top"||i==="bottom"?{x:.5,y:n(i)}:i==="left"||i==="right"?{x:n(i),y:.5}:{x:n(i),y:.5}}return{x:n(t[0]),y:n(t[1])}}function cc(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,l=n/i;if(l>o){const d=e;return{renderedW:d,renderedH:d/l}}const s=t;return{renderedW:s*l,renderedH:s}}function Vp(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,l=n/i;if(l>o){const d=t;return{renderedW:d*l,renderedH:d}}const s=e;return{renderedW:s,renderedH:s/l}}function dc(e,t,n,i,o){const{x:l,y:s}=Bp(o);return{offsetX:l*(e-n),offsetY:s*(t-i)}}function Gp(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,l=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:s,objectPosition:d}=window.getComputedStyle(e),c=s==="cover"?Vp:cc,{renderedW:u,renderedH:p}=c(n,i,o,l),{offsetX:b,offsetY:S}=dc(n,i,u,p,d),L=(b+u/2)/n*100,h=(S+p/2)/i*100;return`${L}% ${h}%`}function qp(e){return Gp(e)}function ur(e){const t=e.getBoundingClientRect(),n=sc(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),l=e.naturalWidth,s=e.naturalHeight,{renderedW:d,renderedH:c}=cc(i,o,l,s),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:b}=dc(i,o,d,c,u),S=t.left+n.left,L=t.top+n.top;return{x:p+S,y:b+L,width:d,height:c}}function $l(e){const t=e.getBoundingClientRect(),n=sc(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Cl(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 Up(e,t){const n=(()=>{if(e==="fade in")return Be.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Be.slideInLeft;case"right":return Be.slideInRight;case"top":return Be.slideInTop;case"bottom":return Be.slideInBottom;default:return Be.slideInRight}return Be.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Be.fadeIn;if(e==="slide in")switch(t){case"left":return Be.slideInLeft;case"right":return Be.slideInRight;case"top":return Be.slideInTop;case"bottom":return Be.slideInBottom;default:return Be.slideInRight}return Be.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return Be.fadeOut;if(e==="slide in")switch(t){case"left":return Be.slideOutLeft;case"right":return Be.slideOutRight;case"top":return Be.slideOutTop;case"bottom":return Be.slideOutBottom;default:return Be.slideOutRight}return Be.fadeOut})(),l=(()=>{if(e==="fade in")return Be.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Be.slideOutLeft;case"right":return Be.slideOutRight;case"top":return Be.slideOutTop;case"bottom":return Be.slideOutBottom;default:return Be.slideOutRight}return Be.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:l}}const Kp=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:l,isPreviewMode:s})=>{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:Be.heroImage,onClick:()=>c(!0)}),r.jsx(Xp,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:l})]})},Xp=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:l,isEditor:s,metadata:d})=>{var Se;const{widthSettings:c,fontSettings:u,letterSpacing:p,textAlign:b,wordSpacing:S,fontSizeLineHeight:L,textAppearance:h,color:g}=i.imageCaption??{},[y,E]=a.useState(0),[R,T]=a.useState(0),[Y,k]=a.useState(!1),[B,P]=a.useState(!1),[C,z]=a.useState({}),v=a.useRef(null),W=a.useRef(null),I=a.useRef(null),Z=a.useRef(!1),A=a.useRef(null),K=a.useRef(null),V=a.useRef(null),G=a.useRef(null),ne=a.useRef(!1),$=a.useRef(null),[M,H]=a.useState(!1),{appear:ee,triggers:ie,slider:F,thumbnail:pe,controls:x,area:re,caption:J,layout:fe}=o.lightboxBlock,{appearClass:Re,backdropAppearClass:de,backdropDisappearClass:se,disappearClass:q}=Up(ee.type,ee.direction),Q=(d==null?void 0:d.itemId)??null;a.useEffect(()=>{const D=()=>{setTimeout(()=>{var ge,xe;(xe=(ge=v.current)==null?void 0:ge.splide)==null||xe.refresh()},16)},oe=()=>{T(ge=>ge+1)};return window.addEventListener("ArticleEditor.Layout:change",D),window.addEventListener("ArticleEditor.ComponentContent:change",oe),()=>{window.removeEventListener("ArticleEditor.Layout:change",D),window.removeEventListener("ArticleEditor.ComponentContent:change",oe)}},[]),a.useEffect(()=>{if(!e||!pe.isActive){H(!1);return}const D=$.current;if(!D)return;const oe=()=>{F.direction==="horiz"?H(D.scrollWidth>D.clientWidth):H(D.scrollHeight>D.clientHeight)};oe();const ge=new ResizeObserver(oe);return ge.observe(D),()=>ge.disconnect()},[e,pe.isActive,n.length,C,F.direction]);const me=a.useCallback(()=>{const D=window.matchMedia("(max-width: 768px)").matches,oe=Cl(re.color);D&&!s&&oe>.9&&(document.body.style.backgroundColor=""),k(!0),Z.current=!0;const ge=xe=>{xe.target===A.current&&xe.animationName&&(A.current&&K.current&&A.current.removeEventListener("animationend",K.current),K.current=null,Z.current&&(Z.current=!1,t()),k(!1))};A.current&&(K.current=ge,A.current.addEventListener("animationend",ge))},[t,re.color,s]),Ne=(D,oe,ge)=>{var xe,Le;if(D){if(ie.type==="click"&&ie.switch==="image")ie.repeat==="close"&&y===n.length-1?me():(xe=v.current)==null||xe.go("+1");else if(ie.type==="click"&&ie.switch==="50/50"){const be=D.getBoundingClientRect(),_=oe-be.left,ce=ge-be.top,te=be.width,N=be.height;let U;F.direction==="horiz"?U=_<te/2?"-1":"+1":U=ce<N/2?"-1":"+1",(Le=v.current)==null||Le.go(U)}}},$e=D=>{if(ne.current){ne.current=!1;return}const oe=n[y],ge=(oe==null?void 0:oe.image.objectFit)==="cover";let xe,Le;if("changedTouches"in D&&D.changedTouches.length>0)xe=D.changedTouches[0].clientX,Le=D.changedTouches[0].clientY;else if("clientX"in D)xe=D.clientX,Le=D.clientY;else return;let be;if(ge&&I.current){const _=$l(I.current);be=xe>=_.left&&xe<=_.right&&Le>=_.top&&Le<=_.bottom}else{const _=I.current?ur(I.current):null;if(!_){D.target===D.currentTarget&&me();return}be=xe>=_.x&&xe<=_.x+_.width&&Le>=_.y&&Le<=_.y+_.height}be?Ne(I.current,xe,Le):me()},ke=D=>{const oe=D.target;(oe.classList.contains(Be.thumbsWrapper)||oe.classList.contains(Be.thumbsContainer))&&$e(D)};a.useEffect(()=>{if(!e)return;const D=oe=>{var ge,xe;if(oe.key==="Escape"){me();return}if(oe.key==="ArrowRight"){E(Le=>(Le+1)%Math.max(n.length,1)),(ge=v.current)==null||ge.go("+1");return}oe.key==="ArrowLeft"&&(E(Le=>(Le-1+Math.max(n.length,1))%Math.max(n.length,1)),(xe=v.current)==null||xe.go("-1"))};return window.addEventListener("keydown",D),()=>{window.removeEventListener("keydown",D)}},[e,me,n.length]),a.useEffect(()=>{if(e){if(E(0),T(oe=>oe+1),Z.current=!1,k(!1),P(!1),z({}),!Q)return;const D=new CustomEvent("page-overlay",{detail:{itemId:Q}});window.dispatchEvent(D)}return()=>{A.current&&K.current&&(A.current.removeEventListener("animationend",K.current),K.current=null),P(!1)}},[e,Q]),a.useEffect(()=>{W.current!==null&&W.current!==F.type&&T(D=>D+1),W.current=F.type},[F.type]),a.useEffect(()=>{if(!e)return;const D=document.body.style.overflow,oe=window.matchMedia("(max-width: 768px)").matches,ge=Cl(re.color);document.body.style.overflow="hidden",P(!1);const xe=be=>{be.target===A.current&&!Z.current&&be.animationName&&(oe&&!s&&ge>.9&&(document.body.style.backgroundColor=re.color),P(!0),A.current&&V.current&&A.current.removeEventListener("animationend",V.current),V.current=null)};A.current&&(V.current=xe,A.current.addEventListener("animationend",xe));const Le=be=>{const _=be.target;_&&(_.closest(`.${Be.thumbsWrapper}`)||_.closest(`.${Be.thumbsContainer}`))||F.type!=="slide"&&be.preventDefault()};return document.addEventListener("touchmove",Le,{passive:!1}),()=>{document.body.style.overflow=D,document.removeEventListener("touchmove",Le),A.current&&V.current&&(A.current.removeEventListener("animationend",V.current),V.current=null),P(!1)}},[e,s,re.color,F.type]),a.useEffect(()=>{if(!e)return;const D=oe=>{var xe,Le;if(Z.current){oe.stopPropagation();return}if(ne.current){ne.current=!1;return}const ge=oe.target;if(!(ge&&(ge.closest(`.${Be.thumbsContainer}`)||ge.closest(`.${Be.thumbItem}`)||ge.closest(`.${Be.arrow}`)||ge.closest(`.${Be.closeButton}`)||ge.closest(`.${Be.caption}`)))){if(F.type==="slide"&&ie.type==="drag"&&((Le=(xe=v.current)==null?void 0:xe.splide)!=null&&Le.root)){const be=v.current.splide.root;if(ge&&(be.contains(ge)||be===ge))return}if(oe.touches.length===0&&oe.changedTouches.length>0){const be=n[y],_=(be==null?void 0:be.image.objectFit)==="cover",ce=oe.changedTouches[0];let te;if(_&&I.current){const N=$l(I.current);te=ce.clientX>=N.left&&ce.clientX<=N.right&&ce.clientY>=N.top&&ce.clientY<=N.bottom}else{const N=I.current?ur(I.current):null;if(!N)return;te=ce.clientX>=N.x&&ce.clientX<=N.x+N.width&&ce.clientY>=N.y&&ce.clientY<=N.y+N.height}if(!te){oe.stopPropagation(),Z.current=!0;const N=U=>{U.stopPropagation(),U.preventDefault(),document.removeEventListener("click",N,!0)};document.addEventListener("click",N,!0),me()}}}};return document.addEventListener("touchend",D,{passive:!0}),()=>{document.removeEventListener("touchend",D)}},[e,me,y,n]);const ue=(F.type==="scale"||F.type==="fade")&&F.direction==="vert"&&ie.type==="drag";a.useEffect(()=>{var U,Ie;if(!e||!ue||!((Ie=(U=v.current)==null?void 0:U.splide)!=null&&Ie.root))return;const D=v.current.splide.root,oe=30,ge=(le,j)=>{if(G.current){const ze=Math.abs(le-G.current.x),Ae=Math.abs(j-G.current.y);(ze>0||Ae>0)&&(ne.current=!0)}},xe=le=>{G.current&&(le.preventDefault(),ge(le.clientX,le.clientY))},Le=le=>{G.current&&le.touches.length>0&&(le.preventDefault(),ge(le.touches[0].clientX,le.touches[0].clientY))},be=(le,j)=>{if(!G.current||!v.current){G.current=null;return}const ze=Math.abs(le-G.current.x),Ae=Math.abs(j-G.current.y);Ae>oe&&Ae>ze&&v.current.go(j<G.current.y?"+1":"-1"),G.current=null},_=le=>{G.current&&be(le.clientX,le.clientY),document.removeEventListener("pointerup",_),document.removeEventListener("pointercancel",_),document.removeEventListener("pointermove",xe)},ce=le=>{if(G.current){if(le.changedTouches.length>0){const j=le.changedTouches[0];be(j.clientX,j.clientY)}document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),document.removeEventListener("touchmove",Le)}},te=le=>{G.current={x:le.clientX,y:le.clientY},ne.current=!1,document.addEventListener("pointermove",xe,{passive:!1}),document.addEventListener("pointerup",_),document.addEventListener("pointercancel",_)},N=le=>{le.touches.length>0&&(G.current={x:le.touches[0].clientX,y:le.touches[0].clientY},ne.current=!1,document.addEventListener("touchmove",Le,{passive:!1}),document.addEventListener("touchend",ce),document.addEventListener("touchcancel",ce))};return D.addEventListener("pointerdown",te),D.addEventListener("touchstart",N),()=>{D.removeEventListener("pointerdown",te),D.removeEventListener("touchstart",N),document.removeEventListener("pointermove",xe),document.removeEventListener("pointerup",_),document.removeEventListener("pointercancel",_),document.removeEventListener("touchmove",Le),document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),G.current=null,ne.current=!1}},[e,ue,R]);const he={backgroundColor:re.color,backdropFilter:`blur(${re.blur}px)`,animationDuration:`${parseInt(ee.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:Yn.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:s?null:A,className:ut(Be.background,Y?se:de,{[Be.editor]:s},{[Be.hidden]:!e}),style:{...he,...B&&!s&&!Y?{position:"absolute"}:{}}}),r.jsxs("div",{ref:s?A:null,className:ut(Be.contentStyle,Y?q:Re,{[Be.editor]:s},{[Be.hidden]:!e}),style:{animationDuration:`${parseInt(ee.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(qa,{onMove:D=>E(D.index),ref:v,className:Be.lightboxSplide,options:{arrows:!1,speed:F.duration?parseInt(F.duration):500,direction:F.direction==="horiz"||F.type==="fade"||F.type==="scale"?"ltr":"ttb",pagination:!1,drag:ie.type==="drag"&&!ue,perPage:1,width:"100%",height:"100%",type:F.type==="fade"||F.type==="scale"?"fade":"loop",padding:0,rewind:ie.repeat!=="close",start:0},style:{"--splide-speed":F.duration},children:n.map((D,oe)=>{const ge=Ho(fe.position,fe.offset,s),xe=`${w.scalingValue(fe.padding.top,s)} ${w.scalingValue(fe.padding.right,s)} ${w.scalingValue(fe.padding.bottom,s)} ${w.scalingValue(fe.padding.left,s)}`,Le=F.type==="scale"?(()=>{const{transform:be,..._}=ge;return{..._,position:"absolute",padding:xe,boxSizing:"border-box","--position-transform":be||"none"}})():{...ge,position:"absolute",padding:xe,boxSizing:"border-box"};return r.jsx(Ua,{children:r.jsx("div",{className:Be.imgWrapper,onClick:$e,children:r.jsx("img",{ref:oe===y?I:null,className:ut(Be.imageStyle,{[Be.contain]:D.image.objectFit==="contain",[Be.cover]:D.image.objectFit==="cover",[Be.scaleSlide]:F.type==="scale"}),src:D.image.url,alt:D.image.name??"",style:{...Le,pointerEvents:D.image.objectFit==="contain"?"none":"auto"}})})},oe)})},R),x.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:ut(Be.arrow,{[Be.arrowVertical]:F.direction==="vert"}),style:{color:x.color,"--arrow-hover-color":x.hover},children:r.jsxs("button",{className:Be.arrowInner,style:{transform:`translate(${w.scalingValue(x.offset.x,s)}, ${w.scalingValue(x.offset.y*(F.direction==="horiz"?1:-1),s)}) scale(${x.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var D;return(D=v.current)==null?void 0:D.go("-1")},"aria-label":"Previous",children:[x.arrowsImgUrl&&r.jsx(rn,{url:x.arrowsImgUrl,fill:x.color,hoverFill:x.hover,className:ut(Be.arrowImg,Be.mirror)}),!x.arrowsImgUrl&&r.jsx(Tl,{color:x.color,className:ut(Be.arrowIcon,Be.arrowImg,Be.mirror)})]})}),r.jsx("div",{className:ut(Be.arrow,Be.nextArrow,{[Be.arrowVertical]:F.direction==="vert"}),style:{color:x.color,"--arrow-hover-color":x.hover},children:r.jsxs("button",{className:Be.arrowInner,style:{transform:`translate(${w.scalingValue(x.offset.x*(F.direction==="horiz"?-1:1),s)}, ${w.scalingValue(x.offset.y,s)}) scale(${x.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var D;return(D=v.current)==null?void 0:D.go("+1")},"aria-label":"Next",children:[x.arrowsImgUrl&&r.jsx(rn,{url:x.arrowsImgUrl,fill:x.color,hoverFill:x.hover,className:Be.arrowImg}),!x.arrowsImgUrl&&r.jsx(Tl,{color:x.color,className:ut(Be.arrowIcon,Be.arrowImg)})]})})]}),re.closeIconUrl&&(()=>{const D=Ho(re.closeIconAlign,re.closeIconOffset,s),oe=`scale(${re.closeIconScale})`,ge=D.transform?`${D.transform} ${oe}`:oe;return r.jsx("button",{className:Be.closeButton,style:{...D,transform:ge},onClick:me,"aria-label":"Close lightbox",children:r.jsx(rn,{url:re.closeIconUrl,fill:re.closeIconColor??"#000000",hoverFill:re.closeIconHover??"#cccccc"})})})(),J&&J.isActive&&i.imageCaption&&((Se=n[y])==null?void 0:Se.imageCaption)&&r.jsx("div",{className:Be.caption,style:{...Ho(J.alignment,J.offset,s),fontFamily:Rr(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":w.scalingValue(c.width,s),letterSpacing:w.scalingValue(p,s),wordSpacing:w.scalingValue(S,s),textAlign:b,fontSize:w.scalingValue(L.fontSize,s),lineHeight:w.scalingValue(L.lineHeight,s),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:g},onClick:D=>D.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:Be.captionTextInner,style:{"--link-color":J.linkColor,"--link-hover-color":J.linkHoverColor},children:r.jsx(yi,{content:n[y].imageCaption})})}),pe.isActive&&(()=>{const[D,oe]=pe.position.split("-"),ge=F.direction==="horiz"?`${D}-left`:pe.position,xe=Ho(ge,pe.offset,s),Le=()=>{if(F.direction==="horiz"){if(oe==="left")return"flex-start";if(oe==="center")return"center";if(oe==="right")return"flex-end"}else{if(D==="top")return"flex-start";if(D==="middle")return"center";if(D==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:$,className:Be.thumbsWrapper,onClick:be=>ke(be),style:{position:s?"absolute":"fixed",...xe,...F.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:ut(Be.thumbsContainer,{[Be.thumbsContainerVertical]:F.direction==="vert",[Be.thumbsAlignStart]:pe.align==="start",[Be.thumbsAlignCenter]:pe.align==="center",[Be.thumbsAlignEnd]:pe.align==="end"}),style:{gap:w.scalingValue(pe.grid.gap,s),justifyContent:M?"flex-start":Le()},children:n.map((be,_)=>{const ce=_===y,te=C[_],U=pe.grid.size*(ce?pe.activeState.scale:1),Ie=()=>{if(pe.fit!=="fit")return{};if(!te)return F.direction==="horiz"?{height:w.scalingValue(U,s)}:{width:w.scalingValue(U,s)};const le=te.width/te.height;if(F.direction==="horiz"){const j=U,ze=j*le;return{width:w.scalingValue(ze,s),height:w.scalingValue(j,s)}}else{const j=U,ze=j/le;return{width:w.scalingValue(j,s),height:w.scalingValue(ze,s)}}};return r.jsx("button",{className:Be.thumbItem,style:{...F.direction==="horiz"&&pe.fit!=="fit"?{height:w.scalingValue(U,s)}:{},...F.direction==="vert"&&pe.fit!=="fit"?{width:w.scalingValue(U,s)}:{},...pe.fit==="cover"?{width:w.scalingValue(U,s),height:w.scalingValue(U,s)}:{},...Ie(),transition:ce?"all 0.25s ease-out":"none",opacity:ce?pe.activeState.opacity/100:pe.opacity/100,"--thumb-hover":pe.activeState.opacity/100},onClick:le=>{var j;le.stopPropagation(),E(_),(j=v.current)==null||j.go(_)},onMouseEnter:()=>{var le;pe.triggers==="hov"&&((le=v.current)==null||le.go(_))},children:r.jsx("img",{src:be.image.url,alt:be.image.name??"",onLoad:le=>{const j=le.currentTarget;j.naturalWidth&&j.naturalHeight&&z(ze=>({...ze,[_]:{width:j.naturalWidth,height:j.naturalHeight}}))},style:{objectFit:pe.fit==="cover"?"cover":"contain",...pe.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...pe.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${be.image.name}-${_}`)})})})})()]})]}),document.getElementById(l))};function Tl({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 Yp={element:Kp,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 Oo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Zp(e){return`
6
+ */const np="RichTextRenderer-module__link___BWeZ2",ip={link:np},op=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))},Ir=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>op(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function on(e){const{color:t,...n}=e;return n}function Vt(e,t){var o,s,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Ir(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:S.scalingValue(e.letterSpacing,t),wordSpacing:S.scalingValue(e.wordSpacing,t),fontSize:S.scalingValue(n,t),lineHeight:i!==void 0?S.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 yi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:ip.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:rp(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 rp(e){return{...e.fontFamily&&{fontFamily:Ir(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 ap="SvgImage-module__svg___q3xE-",sp="SvgImage-module__img___VsTm-",Cs={svg:ap,img:sp},lp=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},cp=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)}},[]),!lp(e)||!s?r.jsx("img",{src:e,alt:"",className:ut(Cs.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:ut(Cs.svg,i),style:{"--svg":cp(e),"--fill":t,"--hover-fill":n,...o??{}}})},dp={"top-left":rt.topLeftAlignment,"top-center":rt.topCenterAlignment,"top-right":rt.topRightAlignment,"middle-left":rt.middleLeftAlignment,"middle-center":rt.middleCenterAlignment,"middle-right":rt.middleRightAlignment,"bottom-left":rt.bottomLeftAlignment,"bottom-center":rt.bottomCenterAlignment,"bottom-right":rt.bottomRightAlignment};function up({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=a.useState(null),{widthSettings:l,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:p,fontSizeLineHeight:v,textAppearance:x,color:I}=n.imageCaption??{},[h,g]=a.useState(void 0),[y,E]=a.useState(null),[L,C]=a.useState(0),[K,A]=a.useState(0),{direction:B,transition:P,controls:T,pagination:z,imageCaption:w,triggers:W}=e,R=a.useRef(P.type),{x:J,y:F}=e.controls.offset,U=V=>{o&&o.go(V)};return a.useEffect(()=>{if(!y)return;const V=new ResizeObserver(G=>{if(!o)return;const[oe]=G;g({width:Math.round(oe.contentRect.width),height:Math.round(oe.contentRect.height)})});return V.observe(y),()=>V.unobserve(y)},[y]),a.useEffect(()=>{!o||R.current===P.type||(A(V=>V+1),R.current=P.type)},[P.type]),r.jsx("div",{className:ut(rt.wrapper,{[rt.editor]:i}),ref:E,children:r.jsxs("div",{className:rt.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:P.backgroundColor&&P.type==="fade in"?P.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:ut(rt.captionBlock),children:r.jsx("div",{className:rt.captionTextWrapper,children:t.map((V,G)=>r.jsx("div",{className:ut(rt.captionText,dp[w.alignment],{[rt.withPointerEvents]:G===L&&i,[rt.active]:G===L}),style:{fontFamily:Ir(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":S.scalingValue(l.width,i),letterSpacing:S.scalingValue(c,i),wordSpacing:S.scalingValue(p,i),textAlign:u,fontSize:S.scalingValue(v.fontSize,i),lineHeight:S.scalingValue(v.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:I,transitionDuration:P.duration?`${Math.round(parseInt(P.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:rt.captionTextInner,style:{"--link-hover-color":w.linkHoverColor,"--link-color":w.linkColor,position:"relative",top:S.scalingValue(w.offset.y,i),left:S.scalingValue(w.offset.x,i)},children:r.jsx(yi,{content:V.imageCaption})})},G))})}),r.jsx(Xa,{onMove:V=>{C(V.index)},ref:s,options:{arrows:!1,speed:P.duration?parseInt(P.duration):500,autoplay:W.autoPlay!==null,...W.autoPlay!==null&&{interval:parseInt(W.autoPlay)*1e3},direction:B==="horiz"||P.type==="fade in"?"ltr":"ttb",pagination:!1,drag:W.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:P.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((V,G)=>r.jsx(Ya,{children:r.jsx("div",{className:rt.sliderItem,children:r.jsx("div",{className:rt.imgWrapper,children:r.jsx("img",{className:ut(rt.sliderImage,{[rt.contain]:V.image.objectFit==="contain",[rt.cover]:V.image.objectFit==="cover"}),src:V.image.url,alt:V.image.name??""})})})},G))},K),T.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:ut(rt.arrow,{[rt.arrowVertical]:B==="vert",[rt.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:r.jsxs("button",{onClick:()=>{U("-1")},className:rt.arrowInner,style:{transform:`translate(${S.scalingValue(J,i)}, ${S.scalingValue(F*(B==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&r.jsx(rn,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:ut(rt.arrowImg,rt.mirror)}),!T.arrowsImgUrl&&r.jsx(Ts,{color:T.color,className:ut(rt.arrowIcon,rt.arrowImg,rt.mirror)})]})}),r.jsx("div",{className:ut(rt.arrow,rt.nextArrow,{[rt.arrowVertical]:B==="vert",[rt.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:r.jsxs("button",{className:rt.arrowInner,onClick:()=>U("+1"),style:{transform:`translate(${S.scalingValue(J*(B==="horiz"?-1:1),i)}, ${S.scalingValue(F,i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&r.jsx(rn,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:rt.arrowImg}),!T.arrowsImgUrl&&r.jsx(Ts,{color:T.color,className:ut(rt.arrowIcon,rt.arrowImg)})]})})]}),W.triggersList.click&&r.jsx("div",{className:rt.clickOverlay,onClick:()=>{o&&o.go("+1")}}),z.isActive&&r.jsx("div",{className:ut(rt.pagination,{[rt.paginationInsideBottom]:z.position==="inside-1"&&B==="horiz",[rt.paginationInsideTop]:z.position==="inside-2"&&B==="horiz",[rt.paginationOutsideBottom]:z.position==="outside-1"&&B==="horiz",[rt.paginationOutsideTop]:z.position==="outside-2"&&B==="horiz",[rt.paginationInsideLeft]:z.position==="inside-1"&&B==="vert",[rt.paginationInsideRight]:z.position==="inside-2"&&B==="vert",[rt.paginationOutsideLeft]:z.position==="outside-1"&&B==="vert",[rt.paginationOutsideRight]:z.position==="outside-2"&&B==="vert",[rt.paginationVertical]:B==="vert"}),children:r.jsx("div",{className:rt.paginationInner,style:{backgroundColor:z.colors[2],transform:`scale(${z.scale/100}) translate(${S.scalingValue(z.offset.x,i)}, ${S.scalingValue(z.offset.y,i)}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:t.map((V,G)=>r.jsx("button",{onClick:()=>{o&&o.go(G)},className:ut(rt.paginationItem),children:r.jsx("div",{className:ut(rt.dot,{[rt.activeDot]:G===L}),style:{backgroundColor:G===L?z.colors[0]:z.colors[1],"--pagination-hover-color":z.hover}})},G))})})]})})}function Ts({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 pp={element:up,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"]}},mp="ImageRevealSlider-module__imageRevealSlider___UE5Ob",gp="ImageRevealSlider-module__image___Qjt-e",hp="ImageRevealSlider-module__link___N-iLG",fp="ImageRevealSlider-module__cursor___2U03d",wi={imageRevealSlider:mp,image:gp,link:hp,cursor:fp};function Ls(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 zr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function yp(e,t,n,i){let o,s;if(t==="custom"){o=n;const l=await zr(e);s=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await zr(e);s=l.height/l.width*o}else{const l=await zr(e);o=l.width,s=l.height}return{width:o,height:s,finalWidth:`${o}px`}}function vp({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),[p,v]=a.useState({x:0,y:0}),[x,I]=a.useState(1),[h,g]=a.useState("none"),y=a.useRef({x:0,y:0}),[E,L]=a.useState(!1),{sizeType:C,imageWidth:K,randomRangeImageWidth:A}=e.imageSize,{revealPosition:B,visible:P}=e.position,{cursorType:T,target:z,defaultCursorScale:w,defaultCursor:W,hoverCursorScale:R,hoverCursor:J}=e.cursor;a.useEffect(()=>{if(!i)return;const V=($,M)=>{const N=i.getBoundingClientRect(),Q=$-N.left,te=M-N.top;if(v({x:Q,y:te}),T==="system"){g("none"),I(1);return}const k=Q,le=te,f=document.elementFromPoint(N.left+k,N.top+le);if(f&&f.closest("a")){g("none"),I(1);return}const ne=Ls(k,le,s)||z==="area"?{img:J??"none",scale:R}:{img:W??"none",scale:w};g(ne.img),I(ne.scale)},G=$=>{$.stopPropagation(),y.current={x:$.clientX,y:$.clientY},V($.clientX,$.clientY)},oe=()=>{E&&V(y.current.x,y.current.y)};return i.addEventListener("mousemove",G),window.addEventListener("scroll",oe,!0),()=>{i.removeEventListener("mousemove",G),window.removeEventListener("scroll",oe,!0)}},[i,E,p,T,z,J,W,R,w,s]),a.useEffect(()=>{E||(g("none"),I(0))},[E]);const F=async(V,G,oe,$={})=>{const{width:M,height:N,finalWidth:Q}=await yp(V.image.url,C,K,A);let te=0,k=0;B==="same"?(te=G/2,k=oe/2):(te=$.x??Math.random()*G,k=$.y??Math.random()*oe);const le=Math.min(Math.max(te,M/2),G-M/2),f=Math.min(Math.max(k,N/2),oe-N/2);return{id:u.current++,url:V.image.url,link:V.link,name:V.image.name,x:le,y:f,width:Q}};a.useEffect(()=>{if(!i||t.length===0)return;const V=i.getBoundingClientRect(),G=V.width,oe=V.height,$=[];(async()=>{const N=t[0],Q=await F(N,G,oe);$.push(Q),l($),c(1)})()},[C,K,A,B,i]),a.useEffect(()=>{P==="last One"&&l(V=>V.length>0?[V[V.length-1]]:[])},[P]);const U=async V=>{if(!i)return;const G=i.getBoundingClientRect(),oe=V.clientX-G.left,$=V.clientY-G.top;if(z==="image"&&!Ls(oe,$,s))return;let M=0,N=0;B==="on Click"?(M=oe,N=$):B==="same"?(M=G.width/2,N=G.height/2):(M=Math.random()*G.width,N=Math.random()*G.height);const Q=t[d],te=await F(Q,G.width,G.height,{x:M,y:N});l(k=>P==="all"?[...k,te]:[te]),c(k=>k>=t.length-1?0:k+1)};return r.jsxs("div",{ref:o,onClick:U,onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),className:wi.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[s.map(V=>r.jsx("div",{className:wi.wrapper,style:{top:`${V.y}px`,left:`${V.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:V.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:z==="area"&&V.link?r.jsx("a",{href:V.link,target:"_blank",className:wi.link,children:r.jsx("img",{src:V.url,alt:V.name,className:wi.image},V.id)}):r.jsx("img",{src:V.url,alt:V.name,className:wi.image},V.id)},V.id)),E&&r.jsx("div",{className:wi.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const bp={element:vp,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:""}]}}}},xp="LightBox-module__hidden___9s-9x",wp="LightBox-module__heroImage___sTxNF",Sp="LightBox-module__background___rm9ml",$p="LightBox-module__editor___4ACaY",Cp="LightBox-module__contentStyle___Bgnsq",Tp="LightBox-module__imageStyle___tLIlB",Lp="LightBox-module__imgWrapper___LuFUp",Ip="LightBox-module__contain___8-yaS",Rp="LightBox-module__cover___hNvOG",Mp="LightBox-module__caption___b6L2I",Ep="LightBox-module__captionTextInner___rCGNH",Pp="LightBox-module__lightboxSplide___XFuWC",kp="LightBox-module__arrow___iz38X",Ap="LightBox-module__arrowVertical___Zfz81",Fp="LightBox-module__nextArrow___zkAQN",Wp="LightBox-module__arrowInner___p48sW",_p="LightBox-module__arrowIcon___3VaFf",Np="LightBox-module__arrowImg___pNV88",Hp="LightBox-module__mirror___pjeXc",Op="LightBox-module__thumbsWrapper___GB-nU",Dp="LightBox-module__thumbsContainerVertical___wttk5",jp="LightBox-module__thumbsContainer___osSma",zp="LightBox-module__thumbsAlignStart___MO6tY",Bp="LightBox-module__thumbsAlignCenter___Q4sUx",Vp="LightBox-module__thumbsAlignEnd___p4y9R",Gp="LightBox-module__thumbItem___HvnF3",qp="LightBox-module__closeButton___g2khP",Up="LightBox-module__fadeIn___0m5GW",Kp="LightBox-module__slideInLeft___gPYwC",Xp="LightBox-module__slideInRight___S-pPp",Yp="LightBox-module__slideInTop___DFdAj",Zp="LightBox-module__slideInBottom___m27kZ",Jp="LightBox-module__fadeOut___55qBR",Qp="LightBox-module__slideOutLeft___NvU7P",em="LightBox-module__slideOutRight___SK7eC",tm="LightBox-module__slideOutTop___Vgg0z",nm="LightBox-module__slideOutBottom___nJ0Ef",im="LightBox-module__scaleSlide___vZriG",Be={hidden:xp,heroImage:wp,background:Sp,editor:$p,contentStyle:Cp,imageStyle:Tp,imgWrapper:Lp,contain:Ip,cover:Rp,caption:Mp,captionTextInner:Ep,lightboxSplide:Pp,arrow:kp,arrowVertical:Ap,nextArrow:Fp,arrowInner:Wp,arrowIcon:_p,arrowImg:Np,mirror:Hp,thumbsWrapper:Op,thumbsContainerVertical:Dp,thumbsContainer:jp,thumbsAlignStart:zp,thumbsAlignCenter:Bp,thumbsAlignEnd:Vp,thumbItem:Gp,closeButton:qp,fadeIn:Up,slideInLeft:Kp,slideInRight:Xp,slideInTop:Yp,slideInBottom:Zp,fadeOut:Jp,slideOutLeft:Qp,slideOutRight:em,slideOutTop:tm,slideOutBottom:nm,scaleSlide:im},Ho=(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% + ${S.scalingValue(t.x,n)}), calc(-50% + ${S.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${S.scalingValue(t.x,n)}, calc(-50% + ${S.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${S.scalingValue(t.x,n)}), ${S.scalingValue(t.y,n)})`:i.transform=`translate(${S.scalingValue(t.x,n)}, ${S.scalingValue(t.y,n)})`,i};function hc(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 om(e){const t=e.trim().split(/\s+/),n=i=>{if(i.endsWith("%"))return parseFloat(i)/100;switch(i){case"left":case"top":return 0;case"right":case"bottom":return 1;case"center":return .5;default:return .5}};if(t.length===1){const i=t[0];return i==="center"?{x:.5,y:.5}:i==="top"||i==="bottom"?{x:.5,y:n(i)}:i==="left"||i==="right"?{x:n(i),y:.5}:{x:n(i),y:.5}}return{x:n(t[0]),y:n(t[1])}}function fc(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,s=n/i;if(s>o){const d=e;return{renderedW:d,renderedH:d/s}}const l=t;return{renderedW:l*s,renderedH:l}}function rm(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,s=n/i;if(s>o){const d=t;return{renderedW:d*s,renderedH:d}}const l=e;return{renderedW:l,renderedH:l/s}}function yc(e,t,n,i,o){const{x:s,y:l}=om(o);return{offsetX:s*(e-n),offsetY:l*(t-i)}}function am(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,s=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:d}=window.getComputedStyle(e),c=l==="cover"?rm:fc,{renderedW:u,renderedH:p}=c(n,i,o,s),{offsetX:v,offsetY:x}=yc(n,i,u,p,d),I=(v+u/2)/n*100,h=(x+p/2)/i*100;return`${I}% ${h}%`}function sm(e){return am(e)}function ur(e){const t=e.getBoundingClientRect(),n=hc(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,{renderedW:d,renderedH:c}=fc(i,o,s,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:v}=yc(i,o,d,c,u),x=t.left+n.left,I=t.top+n.top;return{x:p+x,y:v+I,width:d,height:c}}function Is(e){const t=e.getBoundingClientRect(),n=hc(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Rs(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 lm(e,t){const n=(()=>{if(e==="fade in")return Be.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Be.slideInLeft;case"right":return Be.slideInRight;case"top":return Be.slideInTop;case"bottom":return Be.slideInBottom;default:return Be.slideInRight}return Be.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Be.fadeIn;if(e==="slide in")switch(t){case"left":return Be.slideInLeft;case"right":return Be.slideInRight;case"top":return Be.slideInTop;case"bottom":return Be.slideInBottom;default:return Be.slideInRight}return Be.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return Be.fadeOut;if(e==="slide in")switch(t){case"left":return Be.slideOutLeft;case"right":return Be.slideOutRight;case"top":return Be.slideOutTop;case"bottom":return Be.slideOutBottom;default:return Be.slideOutRight}return Be.fadeOut})(),s=(()=>{if(e==="fade in")return Be.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Be.slideOutLeft;case"right":return Be.slideOutRight;case"top":return Be.slideOutTop;case"bottom":return Be.slideOutBottom;default:return Be.slideOutRight}return Be.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const cm=({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:Be.heroImage,onClick:()=>c(!0)}),r.jsx(dm,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},dm=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:l,metadata:d})=>{var be;const{widthSettings:c,fontSettings:u,letterSpacing:p,textAlign:v,wordSpacing:x,fontSizeLineHeight:I,textAppearance:h,color:g}=i.imageCaption??{},[y,E]=a.useState(0),[L,C]=a.useState(0),[K,A]=a.useState(!1),[B,P]=a.useState(!1),[T,z]=a.useState({}),w=a.useRef(null),W=a.useRef(null),R=a.useRef(null),J=a.useRef(!1),F=a.useRef(null),U=a.useRef(null),V=a.useRef(null),G=a.useRef(null),oe=a.useRef(!1),$=a.useRef(null),[M,N]=a.useState(!1),{appear:Q,triggers:te,slider:k,thumbnail:le,controls:f,area:ne,caption:Z,layout:fe}=o.lightboxBlock,{appearClass:Ie,backdropAppearClass:ue,backdropDisappearClass:se,disappearClass:q}=lm(Q.type,Q.direction),ee=(d==null?void 0:d.itemId)??null;a.useEffect(()=>{const j=()=>{setTimeout(()=>{var ge,xe;(xe=(ge=w.current)==null?void 0:ge.splide)==null||xe.refresh()},16)},re=()=>{C(ge=>ge+1)};return window.addEventListener("ArticleEditor.Layout:change",j),window.addEventListener("ArticleEditor.ComponentContent:change",re),()=>{window.removeEventListener("ArticleEditor.Layout:change",j),window.removeEventListener("ArticleEditor.ComponentContent:change",re)}},[]),a.useEffect(()=>{if(!e||!le.isActive){N(!1);return}const j=$.current;if(!j)return;const re=()=>{k.direction==="horiz"?N(j.scrollWidth>j.clientWidth):N(j.scrollHeight>j.clientHeight)};re();const ge=new ResizeObserver(re);return ge.observe(j),()=>ge.disconnect()},[e,le.isActive,n.length,T,k.direction]);const ce=a.useCallback(()=>{const j=window.matchMedia("(max-width: 768px)").matches,re=Rs(ne.color);j&&!l&&re>.9&&(document.body.style.backgroundColor=""),A(!0),J.current=!0;const ge=xe=>{xe.target===F.current&&xe.animationName&&(F.current&&U.current&&F.current.removeEventListener("animationend",U.current),U.current=null,J.current&&(J.current=!1,t()),A(!1))};F.current&&(U.current=ge,F.current.addEventListener("animationend",ge))},[t,ne.color,l]),ke=(j,re,ge)=>{var xe,Le;if(j){if(te.type==="click"&&te.switch==="image")te.repeat==="close"&&y===n.length-1?ce():(xe=w.current)==null||xe.go("+1");else if(te.type==="click"&&te.switch==="50/50"){const we=j.getBoundingClientRect(),_=re-we.left,me=ge-we.top,ie=we.width,H=we.height;let X;k.direction==="horiz"?X=_<ie/2?"-1":"+1":X=me<H/2?"-1":"+1",(Le=w.current)==null||Le.go(X)}}},$e=j=>{if(oe.current){oe.current=!1;return}const re=n[y],ge=(re==null?void 0:re.image.objectFit)==="cover";let xe,Le;if("changedTouches"in j&&j.changedTouches.length>0)xe=j.changedTouches[0].clientX,Le=j.changedTouches[0].clientY;else if("clientX"in j)xe=j.clientX,Le=j.clientY;else return;let we;if(ge&&R.current){const _=Is(R.current);we=xe>=_.left&&xe<=_.right&&Le>=_.top&&Le<=_.bottom}else{const _=R.current?ur(R.current):null;if(!_){j.target===j.currentTarget&&ce();return}we=xe>=_.x&&xe<=_.x+_.width&&Le>=_.y&&Le<=_.y+_.height}we?ke(R.current,xe,Le):ce()},Pe=j=>{const re=j.target;(re.classList.contains(Be.thumbsWrapper)||re.classList.contains(Be.thumbsContainer))&&$e(j)};a.useEffect(()=>{if(!e)return;const j=re=>{var ge,xe;if(re.key==="Escape"){ce();return}if(re.key==="ArrowRight"){E(Le=>(Le+1)%Math.max(n.length,1)),(ge=w.current)==null||ge.go("+1");return}re.key==="ArrowLeft"&&(E(Le=>(Le-1+Math.max(n.length,1))%Math.max(n.length,1)),(xe=w.current)==null||xe.go("-1"))};return window.addEventListener("keydown",j),()=>{window.removeEventListener("keydown",j)}},[e,ce,n.length]),a.useEffect(()=>{if(e){if(E(0),C(re=>re+1),J.current=!1,A(!1),P(!1),z({}),!ee)return;const j=new CustomEvent("page-overlay",{detail:{itemId:ee}});window.dispatchEvent(j)}return()=>{F.current&&U.current&&(F.current.removeEventListener("animationend",U.current),U.current=null),P(!1)}},[e,ee]),a.useEffect(()=>{W.current!==null&&W.current!==k.type&&C(j=>j+1),W.current=k.type},[k.type]),a.useEffect(()=>{if(!e)return;const j=document.body.style.overflow,re=window.matchMedia("(max-width: 768px)").matches,ge=Rs(ne.color);document.body.style.overflow="hidden",P(!1);const xe=we=>{we.target===F.current&&!J.current&&we.animationName&&(re&&!l&&ge>.9&&(document.body.style.backgroundColor=ne.color),P(!0),F.current&&V.current&&F.current.removeEventListener("animationend",V.current),V.current=null)};F.current&&(V.current=xe,F.current.addEventListener("animationend",xe));const Le=we=>{const _=we.target;_&&(_.closest(`.${Be.thumbsWrapper}`)||_.closest(`.${Be.thumbsContainer}`))||k.type!=="slide"&&we.preventDefault()};return document.addEventListener("touchmove",Le,{passive:!1}),()=>{document.body.style.overflow=j,document.removeEventListener("touchmove",Le),F.current&&V.current&&(F.current.removeEventListener("animationend",V.current),V.current=null),P(!1)}},[e,l,ne.color,k.type]),a.useEffect(()=>{if(!e)return;const j=re=>{var xe,Le;if(J.current){re.stopPropagation();return}if(oe.current){oe.current=!1;return}const ge=re.target;if(!(ge&&(ge.closest(`.${Be.thumbsContainer}`)||ge.closest(`.${Be.thumbItem}`)||ge.closest(`.${Be.arrow}`)||ge.closest(`.${Be.closeButton}`)||ge.closest(`.${Be.caption}`)))){if(k.type==="slide"&&te.type==="drag"&&((Le=(xe=w.current)==null?void 0:xe.splide)!=null&&Le.root)){const we=w.current.splide.root;if(ge&&(we.contains(ge)||we===ge))return}if(re.touches.length===0&&re.changedTouches.length>0){const we=n[y],_=(we==null?void 0:we.image.objectFit)==="cover",me=re.changedTouches[0];let ie;if(_&&R.current){const H=Is(R.current);ie=me.clientX>=H.left&&me.clientX<=H.right&&me.clientY>=H.top&&me.clientY<=H.bottom}else{const H=R.current?ur(R.current):null;if(!H)return;ie=me.clientX>=H.x&&me.clientX<=H.x+H.width&&me.clientY>=H.y&&me.clientY<=H.y+H.height}if(!ie){re.stopPropagation(),J.current=!0;const H=X=>{X.stopPropagation(),X.preventDefault(),document.removeEventListener("click",H,!0)};document.addEventListener("click",H,!0),ce()}}}};return document.addEventListener("touchend",j,{passive:!0}),()=>{document.removeEventListener("touchend",j)}},[e,ce,y,n]);const pe=(k.type==="scale"||k.type==="fade")&&k.direction==="vert"&&te.type==="drag";a.useEffect(()=>{var X,Re;if(!e||!pe||!((Re=(X=w.current)==null?void 0:X.splide)!=null&&Re.root))return;const j=w.current.splide.root,re=30,ge=(de,D)=>{if(G.current){const ze=Math.abs(de-G.current.x),Fe=Math.abs(D-G.current.y);(ze>0||Fe>0)&&(oe.current=!0)}},xe=de=>{G.current&&(de.preventDefault(),ge(de.clientX,de.clientY))},Le=de=>{G.current&&de.touches.length>0&&(de.preventDefault(),ge(de.touches[0].clientX,de.touches[0].clientY))},we=(de,D)=>{if(!G.current||!w.current){G.current=null;return}const ze=Math.abs(de-G.current.x),Fe=Math.abs(D-G.current.y);Fe>re&&Fe>ze&&w.current.go(D<G.current.y?"+1":"-1"),G.current=null},_=de=>{G.current&&we(de.clientX,de.clientY),document.removeEventListener("pointerup",_),document.removeEventListener("pointercancel",_),document.removeEventListener("pointermove",xe)},me=de=>{if(G.current){if(de.changedTouches.length>0){const D=de.changedTouches[0];we(D.clientX,D.clientY)}document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),document.removeEventListener("touchmove",Le)}},ie=de=>{G.current={x:de.clientX,y:de.clientY},oe.current=!1,document.addEventListener("pointermove",xe,{passive:!1}),document.addEventListener("pointerup",_),document.addEventListener("pointercancel",_)},H=de=>{de.touches.length>0&&(G.current={x:de.touches[0].clientX,y:de.touches[0].clientY},oe.current=!1,document.addEventListener("touchmove",Le,{passive:!1}),document.addEventListener("touchend",me),document.addEventListener("touchcancel",me))};return j.addEventListener("pointerdown",ie),j.addEventListener("touchstart",H),()=>{j.removeEventListener("pointerdown",ie),j.removeEventListener("touchstart",H),document.removeEventListener("pointermove",xe),document.removeEventListener("pointerup",_),document.removeEventListener("pointercancel",_),document.removeEventListener("touchmove",Le),document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),G.current=null,oe.current=!1}},[e,pe,L]);const he={backgroundColor:ne.color,backdropFilter:`blur(${ne.blur}px)`,animationDuration:`${parseInt(Q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Yn.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:l?null:F,className:ut(Be.background,K?se:ue,{[Be.editor]:l},{[Be.hidden]:!e}),style:{...he,...B&&!l&&!K?{position:"absolute"}:{}}}),r.jsxs("div",{ref:l?F:null,className:ut(Be.contentStyle,K?q:Ie,{[Be.editor]:l},{[Be.hidden]:!e}),style:{animationDuration:`${parseInt(Q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Xa,{onMove:j=>E(j.index),ref:w,className:Be.lightboxSplide,options:{arrows:!1,speed:k.duration?parseInt(k.duration):500,direction:k.direction==="horiz"||k.type==="fade"||k.type==="scale"?"ltr":"ttb",pagination:!1,drag:te.type==="drag"&&!pe,perPage:1,width:"100%",height:"100%",type:k.type==="fade"||k.type==="scale"?"fade":"loop",padding:0,rewind:te.repeat!=="close",start:0},style:{"--splide-speed":k.duration},children:n.map((j,re)=>{const ge=Ho(fe.position,fe.offset,l),xe=`${S.scalingValue(fe.padding.top,l)} ${S.scalingValue(fe.padding.right,l)} ${S.scalingValue(fe.padding.bottom,l)} ${S.scalingValue(fe.padding.left,l)}`,Le=k.type==="scale"?(()=>{const{transform:we,..._}=ge;return{..._,position:"absolute",padding:xe,boxSizing:"border-box","--position-transform":we||"none"}})():{...ge,position:"absolute",padding:xe,boxSizing:"border-box"};return r.jsx(Ya,{children:r.jsx("div",{className:Be.imgWrapper,onClick:$e,children:r.jsx("img",{ref:re===y?R:null,className:ut(Be.imageStyle,{[Be.contain]:j.image.objectFit==="contain",[Be.cover]:j.image.objectFit==="cover",[Be.scaleSlide]:k.type==="scale"}),src:j.image.url,alt:j.image.name??"",style:{...Le,pointerEvents:j.image.objectFit==="contain"?"none":"auto"}})})},re)})},L),f.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:ut(Be.arrow,{[Be.arrowVertical]:k.direction==="vert"}),style:{color:f.color,"--arrow-hover-color":f.hover},children:r.jsxs("button",{className:Be.arrowInner,style:{transform:`translate(${S.scalingValue(f.offset.x,l)}, ${S.scalingValue(f.offset.y*(k.direction==="horiz"?1:-1),l)}) scale(${f.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var j;return(j=w.current)==null?void 0:j.go("-1")},"aria-label":"Previous",children:[f.arrowsImgUrl&&r.jsx(rn,{url:f.arrowsImgUrl,fill:f.color,hoverFill:f.hover,className:ut(Be.arrowImg,Be.mirror)}),!f.arrowsImgUrl&&r.jsx(Ms,{color:f.color,className:ut(Be.arrowIcon,Be.arrowImg,Be.mirror)})]})}),r.jsx("div",{className:ut(Be.arrow,Be.nextArrow,{[Be.arrowVertical]:k.direction==="vert"}),style:{color:f.color,"--arrow-hover-color":f.hover},children:r.jsxs("button",{className:Be.arrowInner,style:{transform:`translate(${S.scalingValue(f.offset.x*(k.direction==="horiz"?-1:1),l)}, ${S.scalingValue(f.offset.y,l)}) scale(${f.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var j;return(j=w.current)==null?void 0:j.go("+1")},"aria-label":"Next",children:[f.arrowsImgUrl&&r.jsx(rn,{url:f.arrowsImgUrl,fill:f.color,hoverFill:f.hover,className:Be.arrowImg}),!f.arrowsImgUrl&&r.jsx(Ms,{color:f.color,className:ut(Be.arrowIcon,Be.arrowImg)})]})})]}),ne.closeIconUrl&&(()=>{const j=Ho(ne.closeIconAlign,ne.closeIconOffset,l),re=`scale(${ne.closeIconScale})`,ge=j.transform?`${j.transform} ${re}`:re;return r.jsx("button",{className:Be.closeButton,style:{...j,transform:ge},onClick:ce,"aria-label":"Close lightbox",children:r.jsx(rn,{url:ne.closeIconUrl,fill:ne.closeIconColor??"#000000",hoverFill:ne.closeIconHover??"#cccccc"})})})(),Z&&Z.isActive&&i.imageCaption&&((be=n[y])==null?void 0:be.imageCaption)&&r.jsx("div",{className:Be.caption,style:{...Ho(Z.alignment,Z.offset,l),fontFamily:Ir(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":S.scalingValue(c.width,l),letterSpacing:S.scalingValue(p,l),wordSpacing:S.scalingValue(x,l),textAlign:v,fontSize:S.scalingValue(I.fontSize,l),lineHeight:S.scalingValue(I.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:g},onClick:j=>j.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:Be.captionTextInner,style:{"--link-color":Z.linkColor,"--link-hover-color":Z.linkHoverColor},children:r.jsx(yi,{content:n[y].imageCaption})})}),le.isActive&&(()=>{const[j,re]=le.position.split("-"),ge=k.direction==="horiz"?`${j}-left`:le.position,xe=Ho(ge,le.offset,l),Le=()=>{if(k.direction==="horiz"){if(re==="left")return"flex-start";if(re==="center")return"center";if(re==="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:$,className:Be.thumbsWrapper,onClick:we=>Pe(we),style:{position:l?"absolute":"fixed",...xe,...k.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:ut(Be.thumbsContainer,{[Be.thumbsContainerVertical]:k.direction==="vert",[Be.thumbsAlignStart]:le.align==="start",[Be.thumbsAlignCenter]:le.align==="center",[Be.thumbsAlignEnd]:le.align==="end"}),style:{gap:S.scalingValue(le.grid.gap,l),justifyContent:M?"flex-start":Le()},children:n.map((we,_)=>{const me=_===y,ie=T[_],X=le.grid.size*(me?le.activeState.scale:1),Re=()=>{if(le.fit!=="fit")return{};if(!ie)return k.direction==="horiz"?{height:S.scalingValue(X,l)}:{width:S.scalingValue(X,l)};const de=ie.width/ie.height;if(k.direction==="horiz"){const D=X,ze=D*de;return{width:S.scalingValue(ze,l),height:S.scalingValue(D,l)}}else{const D=X,ze=D/de;return{width:S.scalingValue(D,l),height:S.scalingValue(ze,l)}}};return r.jsx("button",{className:Be.thumbItem,style:{...k.direction==="horiz"&&le.fit!=="fit"?{height:S.scalingValue(X,l)}:{},...k.direction==="vert"&&le.fit!=="fit"?{width:S.scalingValue(X,l)}:{},...le.fit==="cover"?{width:S.scalingValue(X,l),height:S.scalingValue(X,l)}:{},...Re(),transition:me?"all 0.25s ease-out":"none",opacity:me?le.activeState.opacity/100:le.opacity/100,"--thumb-hover":le.activeState.opacity/100},onClick:de=>{var D;de.stopPropagation(),E(_),(D=w.current)==null||D.go(_)},onMouseEnter:()=>{var de;le.triggers==="hov"&&((de=w.current)==null||de.go(_))},children:r.jsx("img",{src:we.image.url,alt:we.image.name??"",onLoad:de=>{const D=de.currentTarget;D.naturalWidth&&D.naturalHeight&&z(ze=>({...ze,[_]:{width:D.naturalWidth,height:D.naturalHeight}}))},style:{objectFit:le.fit==="cover"?"cover":"contain",...le.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...le.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${we.image.name}-${_}`)})})})})()]})]}),document.getElementById(s))};function Ms({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 um={element:cm,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 Oo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function pm(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
@@ -155,7 +155,7 @@
155
155
  pointer-events: auto;
156
156
  z-index: 10;
157
157
  }
158
- `}function Jp({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:l}){const s=!!n,d=i&&t||!t,{prefix:c}=w.useScopedStyles(),{type:u="A",fieldsToShow:p=2,fields:b=[],buttonLabel:S,gap:L,fieldsGap:h,buttonCorners:g,buttonStroke:y,buttonPadding:E,isButtonFullWidth:R,inputCorners:T,inputStroke:Y,inputPadding:k,inputColor:B,inputTextColor:P,inputBorderColor:C,placeholderColor:z,buttonColor:v,buttonTextColor:W,buttonBorderColor:I,labelTextColor:Z,successColor:A,errorColor:K,fontFamily:V,inputFontSettings:G,inputFontSize:ne,inputLineHeight:$,inputLetterSpacing:M,inputWordSpacing:H,inputTextAppearance:ee,buttonFontSettings:ie,buttonFontSize:F,buttonLineHeight:pe,buttonLetterSpacing:x,buttonWordSpacing:re,buttonTextAppearance:J,labelFontSettings:fe,labelFontSize:Re,labelLineHeight:de,labelLetterSpacing:se,labelWordSpacing:q,labelTextAppearance:Q,statusFontSettings:me,statusFontSize:Ne,statusLineHeight:$e,statusLetterSpacing:ke,statusWordSpacing:ue,statusTextAppearance:he,successMessage:Se,errorMessage:D,stateOverrides:oe}=e,ge=u==="B",xe=b.slice(0,Math.min(p,b.length)),Le={fontSettings:{fontFamily:V,fontWeight:(G==null?void 0:G.fontWeight)??400,fontStyle:(G==null?void 0:G.fontStyle)??"normal"},fontSize:ne??.01,lineHeight:$,letterSpacing:M??0,wordSpacing:H??0,textAppearance:ee,color:P},be=on(Vt(Le,t)),_=w.scalingValue(Y??0,t),ce=w.scalingValue(($??ne??.01)+((k==null?void 0:k.top)??0)+((k==null?void 0:k.bottom)??0)+(u==="C"?Y??0:(Y??0)*2),t),te={...be,borderStyle:"solid",borderRadius:u==="C"?0:w.scalingValue(T??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:_,borderLeftWidth:0}:{borderWidth:_},paddingTop:w.scalingValue((k==null?void 0:k.top)??0,t),paddingRight:w.scalingValue((k==null?void 0:k.right)??0,t),paddingBottom:w.scalingValue((k==null?void 0:k.bottom)??0,t),paddingLeft:w.scalingValue((k==null?void 0:k.left)??0,t),height:ce,minHeight:ce},N={fontSettings:{fontFamily:V,fontWeight:(ie==null?void 0:ie.fontWeight)??400,fontStyle:(ie==null?void 0:ie.fontStyle)??"normal"},fontSize:F??.01,lineHeight:pe,letterSpacing:x??0,wordSpacing:re??0,textAppearance:J,color:W},U=on(Vt(N,t)),Ie=w.scalingValue(y??0,t),le={fontSettings:{fontFamily:V,fontWeight:(fe==null?void 0:fe.fontWeight)??400,fontStyle:(fe==null?void 0:fe.fontStyle)??"normal"},fontSize:Re??.01,lineHeight:de,letterSpacing:se??0,wordSpacing:q??0,textAppearance:Q,color:Z},j=Vt(le,t),ze={fontSettings:{fontFamily:V,fontWeight:(me==null?void 0:me.fontWeight)??400,fontStyle:(me==null?void 0:me.fontStyle)??"normal"},fontSize:Ne??.01,lineHeight:$e,letterSpacing:ke??0,wordSpacing:ue??0,textAppearance:he,color:A},Ae=on(Vt(ze,t)),ot=w.buildColorVars(c,{inputColor:B,inputTextColor:P,inputBorderColor:C,placeholderColor:z!=null&&z.trim()?z:"#cccccc",buttonColor:v,buttonTextColor:W,buttonBorderColor:I,labelTextColor:Z,successColor:A,errorColor:K},Qp,em,oe),[tt,at]=a.useState(()=>Object.fromEntries(xe.map(Ue=>[Ue.name,""]))),[yt,Ve]=a.useState("idle"),[ye,Me]=a.useState(null),De=l==="success"?"success":l==="error"?"error":yt,Ee=l==="error"?D:ye,Ce=l==="filled",We=a.useMemo(()=>{if(!Ce)return tt;let Ue=null;for(const Ke of xe)(tt[Ke.name]??"").trim().length>0||(Ue=Ue??{...tt},Ue[Ke.name]="Filled");return Ue??tt},[tt,Ce,xe]),je=De==="error"?w.getFormFieldValidationError(xe,We):null,pt=`${l&&l!=="default"?`${c}-state-${l}`:""}`.trim(),Qe=o==null?void 0:o.submitUrl,St=(Ue,Ke)=>{at(Oe=>({...Oe,[Ue]:Ke}))},ct=async Ue=>{if(Ue.preventDefault(),!d)return;const Ke=Object.fromEntries(xe.map(ft=>{var mt;return[ft.name,((mt=tt[ft.name])==null?void 0:mt.trim())??""]}).filter(([,ft])=>ft));if(!Qe){Ve("error"),Me("No integrations were found for this form.");return}if(Object.keys(Ke).length===0)return;const Oe=w.getFormFieldValidationError(xe,tt);if(Oe){Ve("error"),Me(Oe);return}Ve("submitting"),Me(null);try{const ft=await fetch(Qe,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ke)});if(!ft.ok){const mt=await ft.text();throw new Error(mt||`Request failed: ${ft.status}`)}Ve("success"),at(Object.fromEntries(xe.map(mt=>[mt.name,""])))}catch(ft){Ve("error"),Me(ft instanceof Error?ft.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${pt}`.trim(),style:ot,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Zp(c)}}),r.jsxs("form",{onSubmit:ct,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:xe.map((Ue,Ke)=>r.jsxs(a.Fragment,{children:[Ke>0&&r.jsx("div",{"data-controls":s?"fieldsGap":void 0,className:s?`${c}-control`:void 0,style:{height:w.scalingValue(h??0,t)}}),r.jsxs("div",{className:`${c}-field-group${ge?` ${c}-labeled`:""}`,children:[ge&&r.jsx("span",{className:`${c}-field-label`,style:j?{...j,lineHeight:j.fontSize}:void 0,children:Ue.label||Ue.name}),Ue.type==="textarea"?r.jsx("textarea",{name:Ue.name,autoComplete:"off",value:We[Ue.name]??"",onChange:Oe=>St(Ue.name,Oe.target.value),placeholder:Ue.placeholder,className:`${c}-input`,style:te,rows:1,"data-filled":Ce||(We[Ue.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:Ue.type==="phone"?"tel":Ue.type==="email"?"email":"text",name:Ue.name,autoComplete:"off",value:We[Ue.name]??"",onChange:Oe=>St(Ue.name,Oe.target.value),placeholder:Ue.placeholder,required:Ue.isRequired??Ue.type==="email",className:`${c}-input`,style:te,"data-filled":Ce||(We[Ue.name]??"").trim().length>0})]})]},Ke))}),r.jsx("div",{"data-controls":s?"gap":void 0,className:s?`${c}-control`:void 0,style:{height:w.scalingValue(L??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:w.scalingValue(g??0,t),borderWidth:Ie,paddingTop:w.scalingValue((E==null?void 0:E.top)??0,t),paddingRight:w.scalingValue((E==null?void 0:E.right)??0,t),paddingBottom:w.scalingValue((E==null?void 0:E.bottom)??0,t),paddingLeft:w.scalingValue((E==null?void 0:E.left)??0,t),pointerEvents:d?"auto":void 0,...U,...R?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:R?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:yt==="submitting"?"...":S})})})]}),De==="success"&&r.jsx("p",{className:`${c}-success`,style:{...Ae},children:Se}),De==="error"&&r.jsx("p",{className:`${c}-error`,style:{...Ae},role:"alert",children:je??Ee??D})]})}const Qp={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"},em=["hover","focus","filled","success","error"],tm=`import React, { useMemo, useState } from 'react';
158
+ `}function mm({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const l=!!n,d=i&&t||!t,{prefix:c}=S.useScopedStyles(),{type:u="A",fieldsToShow:p=2,fields:v=[],buttonLabel:x,gap:I,fieldsGap:h,buttonCorners:g,buttonStroke:y,buttonPadding:E,isButtonFullWidth:L,inputCorners:C,inputStroke:K,inputPadding:A,inputColor:B,inputTextColor:P,inputBorderColor:T,placeholderColor:z,buttonColor:w,buttonTextColor:W,buttonBorderColor:R,labelTextColor:J,successColor:F,errorColor:U,fontFamily:V,inputFontSettings:G,inputFontSize:oe,inputLineHeight:$,inputLetterSpacing:M,inputWordSpacing:N,inputTextAppearance:Q,buttonFontSettings:te,buttonFontSize:k,buttonLineHeight:le,buttonLetterSpacing:f,buttonWordSpacing:ne,buttonTextAppearance:Z,labelFontSettings:fe,labelFontSize:Ie,labelLineHeight:ue,labelLetterSpacing:se,labelWordSpacing:q,labelTextAppearance:ee,statusFontSettings:ce,statusFontSize:ke,statusLineHeight:$e,statusLetterSpacing:Pe,statusWordSpacing:pe,statusTextAppearance:he,successMessage:be,errorMessage:j,stateOverrides:re}=e,ge=u==="B",xe=v.slice(0,Math.min(p,v.length)),Le={fontSettings:{fontFamily:V,fontWeight:(G==null?void 0:G.fontWeight)??400,fontStyle:(G==null?void 0:G.fontStyle)??"normal"},fontSize:oe??.01,lineHeight:$,letterSpacing:M??0,wordSpacing:N??0,textAppearance:Q,color:P},we=on(Vt(Le,t)),_=S.scalingValue(K??0,t),me=S.scalingValue(($??oe??.01)+((A==null?void 0:A.top)??0)+((A==null?void 0:A.bottom)??0)+(u==="C"?K??0:(K??0)*2),t),ie={...we,borderStyle:"solid",borderRadius:u==="C"?0:S.scalingValue(C??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:_,borderLeftWidth:0}:{borderWidth:_},paddingTop:S.scalingValue((A==null?void 0:A.top)??0,t),paddingRight:S.scalingValue((A==null?void 0:A.right)??0,t),paddingBottom:S.scalingValue((A==null?void 0:A.bottom)??0,t),paddingLeft:S.scalingValue((A==null?void 0:A.left)??0,t),height:me,minHeight:me},H={fontSettings:{fontFamily:V,fontWeight:(te==null?void 0:te.fontWeight)??400,fontStyle:(te==null?void 0:te.fontStyle)??"normal"},fontSize:k??.01,lineHeight:le,letterSpacing:f??0,wordSpacing:ne??0,textAppearance:Z,color:W},X=on(Vt(H,t)),Re=S.scalingValue(y??0,t),de={fontSettings:{fontFamily:V,fontWeight:(fe==null?void 0:fe.fontWeight)??400,fontStyle:(fe==null?void 0:fe.fontStyle)??"normal"},fontSize:Ie??.01,lineHeight:ue,letterSpacing:se??0,wordSpacing:q??0,textAppearance:ee,color:J},D=Vt(de,t),ze={fontSettings:{fontFamily:V,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:ke??.01,lineHeight:$e,letterSpacing:Pe??0,wordSpacing:pe??0,textAppearance:he,color:F},Fe=on(Vt(ze,t)),ot=S.buildColorVars(c,{inputColor:B,inputTextColor:P,inputBorderColor:T,placeholderColor:z!=null&&z.trim()?z:"#cccccc",buttonColor:w,buttonTextColor:W,buttonBorderColor:R,labelTextColor:J,successColor:F,errorColor:U},gm,hm,re),[tt,at]=a.useState(()=>Object.fromEntries(xe.map(Ue=>[Ue.name,""]))),[yt,Ve]=a.useState("idle"),[ye,Me]=a.useState(null),je=s==="success"?"success":s==="error"?"error":yt,Ee=s==="error"?j:ye,Ce=s==="filled",_e=a.useMemo(()=>{if(!Ce)return tt;let Ue=null;for(const Ke of xe)(tt[Ke.name]??"").trim().length>0||(Ue=Ue??{...tt},Ue[Ke.name]="Filled");return Ue??tt},[tt,Ce,xe]),De=je==="error"?S.getFormFieldValidationError(xe,_e):null,pt=`${s&&s!=="default"?`${c}-state-${s}`:""}`.trim(),Qe=o==null?void 0:o.submitUrl,St=(Ue,Ke)=>{at(Oe=>({...Oe,[Ue]:Ke}))},ct=async Ue=>{if(Ue.preventDefault(),!d)return;const Ke=Object.fromEntries(xe.map(ft=>{var mt;return[ft.name,((mt=tt[ft.name])==null?void 0:mt.trim())??""]}).filter(([,ft])=>ft));if(!Qe){Ve("error"),Me("No integrations were found for this form.");return}if(Object.keys(Ke).length===0)return;const Oe=S.getFormFieldValidationError(xe,tt);if(Oe){Ve("error"),Me(Oe);return}Ve("submitting"),Me(null);try{const ft=await fetch(Qe,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ke)});if(!ft.ok){const mt=await ft.text();throw new Error(mt||`Request failed: ${ft.status}`)}Ve("success"),at(Object.fromEntries(xe.map(mt=>[mt.name,""])))}catch(ft){Ve("error"),Me(ft instanceof Error?ft.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${pt}`.trim(),style:ot,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:pm(c)}}),r.jsxs("form",{onSubmit:ct,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:xe.map((Ue,Ke)=>r.jsxs(a.Fragment,{children:[Ke>0&&r.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${c}-control`:void 0,style:{height:S.scalingValue(h??0,t)}}),r.jsxs("div",{className:`${c}-field-group${ge?` ${c}-labeled`:""}`,children:[ge&&r.jsx("span",{className:`${c}-field-label`,style:D?{...D,lineHeight:D.fontSize}:void 0,children:Ue.label||Ue.name}),Ue.type==="textarea"?r.jsx("textarea",{name:Ue.name,autoComplete:"off",value:_e[Ue.name]??"",onChange:Oe=>St(Ue.name,Oe.target.value),placeholder:Ue.placeholder,className:`${c}-input`,style:ie,rows:1,"data-filled":Ce||(_e[Ue.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:Ue.type==="phone"?"tel":Ue.type==="email"?"email":"text",name:Ue.name,autoComplete:"off",value:_e[Ue.name]??"",onChange:Oe=>St(Ue.name,Oe.target.value),placeholder:Ue.placeholder,required:Ue.isRequired??Ue.type==="email",className:`${c}-input`,style:ie,"data-filled":Ce||(_e[Ue.name]??"").trim().length>0})]})]},Ke))}),r.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${c}-control`:void 0,style:{height:S.scalingValue(I??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:S.scalingValue(g??0,t),borderWidth:Re,paddingTop:S.scalingValue((E==null?void 0:E.top)??0,t),paddingRight:S.scalingValue((E==null?void 0:E.right)??0,t),paddingBottom:S.scalingValue((E==null?void 0:E.bottom)??0,t),paddingLeft:S.scalingValue((E==null?void 0:E.left)??0,t),pointerEvents:d?"auto":void 0,...X,...L?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:L?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:yt==="submitting"?"...":x})})})]}),je==="success"&&r.jsx("p",{className:`${c}-success`,style:{...Fe},children:be}),je==="error"&&r.jsx("p",{className:`${c}-error`,style:{...Fe},role:"alert",children:De??Ee??j})]})}const gm={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"},hm=["hover","focus","filled","success","error"],fm=`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
- `,nm=[{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"}],jo={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},im=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],om={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:{...jo.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:{...jo.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:{...jo.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:{...jo.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:nm,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:[...im],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"]},rm={element:Jp,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:om,sourceCode:tm,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function Do(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function am(e){return`
792
+ `,ym=[{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"}],Do={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},vm=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],bm={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:{...Do.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:{...Do.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:{...Do.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:{...Do.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:ym,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:[...vm],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"]},xm={element:mm,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:bm,sourceCode:fm,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function jo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function wm(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: ${Do(8)};
975
- font-size: ${Do(14)};
974
+ margin-top: ${jo(8)};
975
+ font-size: ${jo(14)};
976
976
  color: var(--${e}-success-success-color, var(--${e}-success-color));
977
977
  }
978
978
  .${e}-error {
979
- margin-top: ${Do(8)};
980
- font-size: ${Do(14)};
979
+ margin-top: ${jo(8)};
980
+ font-size: ${jo(14)};
981
981
  color: var(--${e}-error-error-color, var(--${e}-error-color));
982
982
  }
983
- `}const lm=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:l}=w.useScopedStyles(),s=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:p=1,fontFamily:b,inputFontSettings:S,inputFontSize:L,inputLineHeight:h,inputLetterSpacing:g,inputWordSpacing:y,inputTextAppearance:E,buttonFontSettings:R,buttonFontSize:T,buttonLineHeight:Y,buttonLetterSpacing:k,buttonWordSpacing:B,buttonTextAppearance:P,statusFontSettings:C,statusFontSize:z,statusLineHeight:v,statusLetterSpacing:W,statusWordSpacing:I,statusTextAppearance:Z,iconMaxWidth:A,minHeight:K,corners:V,stroke:G,stateOverrides:ne,inputPadding:$,buttonPadding:M,successMessage:H="Thanks for subscribing!",errorMessage:ee="Please, fill all required fields."}=e,ie=d.slice(0,Math.min(p,d.length)),[F,pe]=a.useState(()=>Object.fromEntries(ie.map(le=>[le.name,""]))),[x,re]=a.useState("idle"),[J,fe]=a.useState(null),Re=o==="success"?"success":o==="error"?"error":x,de=o==="error"?ee:J,se=o==="filled",q=a.useMemo(()=>{if(!se)return F;let le=null;for(const j of ie)(F[j.name]??"").trim().length>0||(le=le??{...F},le[j.name]="Filled");return le??F},[se,F,ie]),Q=Re==="error"?w.getFormFieldValidationError(ie,q):null,me=o&&o!=="default"?`${l}-state-${o}`:"",Ne=ie.some(le=>(q[le.name]??"").trim().length>0),$e=me!==`${l}-state-filled`&&Ne?`${l}-state-filled`:"",ke=`${me} ${$e}`.trim(),ue=i==null?void 0:i.submitUrl,he=u??"",Se=(c==null?void 0:c.icon)??"",D=(c==null?void 0:c.mode)==="On",oe=he||"Submit",ge={fontSettings:{fontFamily:b,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:L??.01,lineHeight:h,letterSpacing:g??0,wordSpacing:y??0,textAppearance:E,color:e.inputTextColor??"#111111"},xe={fontSettings:{fontFamily:b,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:T??.01,lineHeight:Y,letterSpacing:k??0,wordSpacing:B??0,textAppearance:P,color:e.buttonTextColor??"#ffffff"},Le={fontSettings:{fontFamily:b,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:z??.01,lineHeight:v,letterSpacing:W??0,wordSpacing:I??0,textAppearance:Z,color:e.successColor??"#22c55e"},be=on(Vt(ge,t)),_=on(Vt(xe,t)),ce=on(Vt(Le,t)),te=w.buildColorVars(l,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(ge==null?void 0:ge.color)??"#111111",buttonTextColor:e.buttonTextColor??(xe==null?void 0:xe.color)??"#ffffff"},sm,cm,ne),N={borderRadius:w.scalingValue(V,t),borderWidth:w.scalingValue(G,t),borderStyle:"solid"},U={borderLeftWidth:w.scalingValue(G,t)},Ie=async le=>{if(le.preventDefault(),!s)return;const j=Object.fromEntries(ie.map(Ae=>{var ot;return[Ae.name,((ot=F[Ae.name])==null?void 0:ot.trim())??""]}).filter(([,Ae])=>Ae));if(!ue){re("error"),fe("No integrations were found for this form.");return}if(Object.keys(j).length===0)return;const ze=w.getFormFieldValidationError(ie,F);if(ze){re("error"),fe(ze);return}re("submitting"),fe(null);try{const Ae=await fetch(ue,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)});if(!Ae.ok){const ot=await Ae.text();throw new Error(ot||`Request failed: ${Ae.status}`)}re("success"),pe(Object.fromEntries(ie.map(ot=>[ot.name,""])))}catch(Ae){re("error"),fe(Ae instanceof Error?Ae.message:"Something went wrong")}};return r.jsxs("div",{className:`${l}-wrapper ${ke}`.trim(),style:te,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:am(l)}}),r.jsxs("form",{onSubmit:Ie,className:`${l}-form`,style:{...N,height:w.scalingValue(K,t),minHeight:w.scalingValue(K,t)},children:[r.jsx("div",{className:`${l}-inputWrap ${l}-overlayAnchor`,style:{flex:1,minWidth:0},children:ie.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:j=>pe(ze=>({...ze,[le.name]:j.target.value})),placeholder:le.placeholder,required:le.isRequired??le.type==="email",className:`${l}-input`,style:{...be,paddingRight:w.scalingValue($.right,t),paddingLeft:w.scalingValue($.left,t),paddingTop:w.scalingValue($.top,t),paddingBottom:w.scalingValue($.bottom,t)}},le.name))}),r.jsx("div",{className:`${l}-overlayAnchor`,children:r.jsx("button",{type:s?"submit":"button",className:`${l}-submitBtn`,"aria-label":oe,style:{..._,...U,paddingRight:w.scalingValue(M.right,t),paddingLeft:w.scalingValue(M.left,t),paddingTop:w.scalingValue(M.top,t),paddingBottom:w.scalingValue(M.bottom,t),pointerEvents:s?"auto":void 0},children:x==="submitting"?"...":D?Se&&r.jsx(rn,{url:Se,className:`${l}-submitBtnIcon`,style:{maxWidth:w.scalingValue(A??0,t)},fill:`var(--${l}-button-text-color)`,hoverFill:`var(--${l}-button-text-color)`}):he})})]}),Re==="success"&&r.jsx("p",{className:`${l}-success`,style:{...ce},children:H}),Re==="error"&&r.jsx("p",{className:`${l}-error`,style:{...ce},role:"alert",children:Q??de??ee})]})},sm={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"},cm=["hover","focus","filled","success","error"],dm=`import React, { useMemo, useState } from 'react';
983
+ `}const Sm=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=S.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:p=1,fontFamily:v,inputFontSettings:x,inputFontSize:I,inputLineHeight:h,inputLetterSpacing:g,inputWordSpacing:y,inputTextAppearance:E,buttonFontSettings:L,buttonFontSize:C,buttonLineHeight:K,buttonLetterSpacing:A,buttonWordSpacing:B,buttonTextAppearance:P,statusFontSettings:T,statusFontSize:z,statusLineHeight:w,statusLetterSpacing:W,statusWordSpacing:R,statusTextAppearance:J,iconMaxWidth:F,minHeight:U,corners:V,stroke:G,stateOverrides:oe,inputPadding:$,buttonPadding:M,successMessage:N="Thanks for subscribing!",errorMessage:Q="Please, fill all required fields."}=e,te=d.slice(0,Math.min(p,d.length)),[k,le]=a.useState(()=>Object.fromEntries(te.map(de=>[de.name,""]))),[f,ne]=a.useState("idle"),[Z,fe]=a.useState(null),Ie=o==="success"?"success":o==="error"?"error":f,ue=o==="error"?Q:Z,se=o==="filled",q=a.useMemo(()=>{if(!se)return k;let de=null;for(const D of te)(k[D.name]??"").trim().length>0||(de=de??{...k},de[D.name]="Filled");return de??k},[se,k,te]),ee=Ie==="error"?S.getFormFieldValidationError(te,q):null,ce=o&&o!=="default"?`${s}-state-${o}`:"",ke=te.some(de=>(q[de.name]??"").trim().length>0),$e=ce!==`${s}-state-filled`&&ke?`${s}-state-filled`:"",Pe=`${ce} ${$e}`.trim(),pe=i==null?void 0:i.submitUrl,he=u??"",be=(c==null?void 0:c.icon)??"",j=(c==null?void 0:c.mode)==="On",re=he||"Submit",ge={fontSettings:{fontFamily:v,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:I??.01,lineHeight:h,letterSpacing:g??0,wordSpacing:y??0,textAppearance:E,color:e.inputTextColor??"#111111"},xe={fontSettings:{fontFamily:v,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:C??.01,lineHeight:K,letterSpacing:A??0,wordSpacing:B??0,textAppearance:P,color:e.buttonTextColor??"#ffffff"},Le={fontSettings:{fontFamily:v,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:z??.01,lineHeight:w,letterSpacing:W??0,wordSpacing:R??0,textAppearance:J,color:e.successColor??"#22c55e"},we=on(Vt(ge,t)),_=on(Vt(xe,t)),me=on(Vt(Le,t)),ie=S.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(ge==null?void 0:ge.color)??"#111111",buttonTextColor:e.buttonTextColor??(xe==null?void 0:xe.color)??"#ffffff"},$m,Cm,oe),H={borderRadius:S.scalingValue(V,t),borderWidth:S.scalingValue(G,t),borderStyle:"solid"},X={borderLeftWidth:S.scalingValue(G,t)},Re=async de=>{if(de.preventDefault(),!l)return;const D=Object.fromEntries(te.map(Fe=>{var ot;return[Fe.name,((ot=k[Fe.name])==null?void 0:ot.trim())??""]}).filter(([,Fe])=>Fe));if(!pe){ne("error"),fe("No integrations were found for this form.");return}if(Object.keys(D).length===0)return;const ze=S.getFormFieldValidationError(te,k);if(ze){ne("error"),fe(ze);return}ne("submitting"),fe(null);try{const Fe=await fetch(pe,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(D)});if(!Fe.ok){const ot=await Fe.text();throw new Error(ot||`Request failed: ${Fe.status}`)}ne("success"),le(Object.fromEntries(te.map(ot=>[ot.name,""])))}catch(Fe){ne("error"),fe(Fe instanceof Error?Fe.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${Pe}`.trim(),style:ie,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:wm(s)}}),r.jsxs("form",{onSubmit:Re,className:`${s}-form`,style:{...H,height:S.scalingValue(U,t),minHeight:S.scalingValue(U,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:te.map(de=>r.jsx("input",{type:de.type==="email"?"email":de.type==="phone"?"tel":"text",name:de.name,autoComplete:"off",value:q[de.name]??"",onChange:D=>le(ze=>({...ze,[de.name]:D.target.value})),placeholder:de.placeholder,required:de.isRequired??de.type==="email",className:`${s}-input`,style:{...we,paddingRight:S.scalingValue($.right,t),paddingLeft:S.scalingValue($.left,t),paddingTop:S.scalingValue($.top,t),paddingBottom:S.scalingValue($.bottom,t)}},de.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:l?"submit":"button",className:`${s}-submitBtn`,"aria-label":re,style:{..._,...X,paddingRight:S.scalingValue(M.right,t),paddingLeft:S.scalingValue(M.left,t),paddingTop:S.scalingValue(M.top,t),paddingBottom:S.scalingValue(M.bottom,t),pointerEvents:l?"auto":void 0},children:f==="submitting"?"...":j?be&&r.jsx(rn,{url:be,className:`${s}-submitBtnIcon`,style:{maxWidth:S.scalingValue(F??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):he})})]}),Ie==="success"&&r.jsx("p",{className:`${s}-success`,style:{...me},children:N}),Ie==="error"&&r.jsx("p",{className:`${s}-error`,style:{...me},role:"alert",children:ee??ue??Q})]})},$m={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"},Cm=["hover","focus","filled","success","error"],Tm=`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
- `,um="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>'),pm=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],zr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},mm=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],gm={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...zr.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...zr.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...zr.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:pm,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:um},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:[...mm],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"]},hm={element:lm,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:gm,sourceCode:dm};function fm(e,t){const n=t>0?`${t}px`:"0px";return`
1560
+ `,Lm="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>'),Im=[{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."}],Br={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Rm=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Mm={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:{...Br.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:{...Br.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:{...Br.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:Im,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Lm},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:[...Rm],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"]},Em={element:Sm,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:Mm,sourceCode:Tm};function Pm(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 ym=30,vm=20,Br=3,xm=12,bm=32,wm=3,Sm=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")},$m=(e,t)=>Array.from({length:t},()=>e).flat(),Cm=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},uc=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Ll=(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),l=Number.parseFloat(o.columnGap||o.gap||"0")||0,s=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(s>0)return s;const d=Array.from({length:t},(u,p)=>e.children[p]),c=uc(d);return c<=0?0:c+l*Math.max(0,t-1)},Tm=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=uc(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),l=Number.parseFloat(o.columnGap||o.gap||"0")||0,s=Number.parseFloat(o.paddingRight)||0;return i+l*Math.max(0,e.children.length-1)+s},Lm=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Rm=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Lm(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??"")},Mm=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,Em=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:l,imageHoverClass:s,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var I,Z,A,K;const p=a.useRef(null),b=!!((I=e.image)!=null&&I.url&&Im(e.image));a.useLayoutEffect(()=>{d&&Mm(p.current)&&(u==null||u())},[d,(Z=e.image)==null?void 0:Z.url,u]);const S=n.display==="cover",L=n.ratioValue??"1:1",h=n.reversed??!1,[g,y]=L.split(":").map(Number),T=(h?y:g)/(h?g:y),Y=i/T,k=Y>o?o:Y,B=Y>o?o*T:i,P=c(B),C=c(k),z={borderRadius:c(l)},v=S?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...z}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",...z},W=((A=e.image)==null?void 0:A.url)&&(b?r.jsx("video",{ref:V=>{p.current=V},src:e.image.url,style:v,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:d?u:void 0,onError:d?u:void 0}):r.jsx("img",{ref:V=>{p.current=V},src:e.image.url,alt:((K=e.image)==null?void 0:K.name)??"",style:v,onLoad:d?u:void 0,onError:d?u:void 0}));return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...S?{width:P}:{width:"max-content",maxWidth:c(i),minWidth:0}},children:r.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...S?{width:P,height:C,overflow:"hidden",...z}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:W&&e.link?r.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:ut(`${t}-marquee-link`,!S&&`${t}-marquee-link-contain`),children:W}):W})})},Pm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=w.useScopedStyles(),[s,d]=a.useState(0),c=s>0?Math.round(s):0,u=a.useMemo(()=>fm(l,c),[l,c]),{speed:p,direction:b,pauseOnHover:S,gap:L,imageMaxWidth:h,imageMaxHeight:g,hoverEffect:y,cornerRadius:E=0}=e,R=a.useMemo(()=>Cm(e.imageFit),[e.imageFit]),T=(t==null?void 0:t.length)??0,Y=!!o,k=!n||!!i,B=k&&y!=="off"&&y!=="randomize"?`${l}-image-hover-${y}`:void 0,P=n?!!i:!0,z=((t==null?void 0:t.length)??0)>0&&(P||!!n),v=Math.max(0,p)*ym,W=$e=>w.scalingValue($e,n??!1),I=a.useRef(null),Z=a.useRef(null),A=a.useRef(null),[K,V]=a.useState(0),G=P&&S==="on",[ne,$]=a.useState(!1),[M,H]=a.useState({}),ee=a.useRef(M);ee.current=M;const ie=a.useRef(null),F=a.useRef(0),pe=a.useRef(null),x=a.useMemo(()=>(t??[]).map($e=>{var ke;return((ke=$e.image)==null?void 0:ke.url)??""}).join("\0"),[t]),[re,J]=a.useState(Br),fe=a.useMemo(()=>{const $e=t??[];return $e.length===0||!(P||!!n)?$e:$m($e,re)},[t,P,re,n]),Re=a.useMemo(()=>(t??[]).filter($e=>{var ke;return!!((ke=$e.image)!=null&&ke.url)}).length,[t]),de=z?wm:1;a.useLayoutEffect(()=>{F.current=0,H({}),ie.current=null,J(Br),d(0)},[x]),a.useEffect(()=>{if(!k||y!=="randomize")return;const $e=I.current;if(!$e)return;const ke=D=>{H(oe=>{const ge=Array.from(D).filter(Le=>Le in oe&&!Rm($e,Le));if(ge.length===0)return oe;const xe={...oe};return ge.forEach(Le=>{delete xe[Le]}),xe})},ue=new IntersectionObserver(D=>{const oe=new Set;for(const ge of D){const xe=ge.target.dataset.marqueeItemIndex,Le=xe!==void 0?Number(xe):NaN;Number.isNaN(Le)||oe.add(Le)}oe.size>0&&ke(oe)},{root:$e,threshold:0});Object.keys(M).forEach(D=>{const oe=Number(D);$e.querySelectorAll(`[data-marquee-item-index="${oe}"]`).forEach(ge=>ue.observe(ge))});const he={current:0},Se=()=>{const D=Object.keys(ee.current);D.length!==0&&(ke(D.map(Number)),he.current=requestAnimationFrame(Se))};return Object.keys(ee.current).length>0&&(he.current=requestAnimationFrame(Se)),()=>{cancelAnimationFrame(he.current),ue.disconnect()}},[y,M,k]),a.useLayoutEffect(()=>{if(!z)return;const $e=I.current,ke=A.current;if(!$e||!ke)return;const ue={current:0},he=()=>{const oe=$e.getBoundingClientRect().width||$e.offsetWidth,ge=Tm(ke),xe=ie.current,Le=typeof xe=="number"&&Math.abs(xe-ge)<=.25;ie.current=ge;let be=re,_=0;if((P||n)&&T>0&&oe>0){const N=Ll(ke,T);if(N>=bm){_=N;const U=Math.min(xm,Math.max(Br,Math.ceil(oe/N)+1));be=U,U!==re&&J(U)}}const te=be!==re&&_>0?_*be:ge>0?ge:_>0?_*be:(()=>{const N=Ll(ke,T);return N>0?N*be:0})();te>0?d(N=>N<=0?te:!Le||Math.round(N)===Math.round(te)?N:te):!Le&&s<=0&&(cancelAnimationFrame(ue.current),ue.current=requestAnimationFrame(he))},Se=()=>{cancelAnimationFrame(ue.current),ue.current=requestAnimationFrame(he)};pe.current=Se,Se();const D=new ResizeObserver(Se);return D.observe($e),D.observe(ke),()=>{pe.current=null,cancelAnimationFrame(ue.current),D.disconnect()}},[P,z,s,x,re,T,n]),a.useLayoutEffect(()=>{if(!z||c<=0)return;const $e=Z.current;$e&&Sm($e)},[z,c,b,v]),a.useLayoutEffect(()=>{if(!z||s<=0){V(0);return}const $e=Z.current,ke=A.current;if(!$e||!ke)return;const ue=()=>{const Se=$e.offsetHeight||$e.getBoundingClientRect().height,D=Array.from(ke.children).reduce((ge,xe)=>Math.max(ge,xe.offsetHeight||xe.getBoundingClientRect().height),0),oe=Se>0?Se:D;V(oe>0?oe:0)};ue();const he=new ResizeObserver(ue);return he.observe($e),he.observe(ke),()=>he.disconnect()},[z,de,fe,n,L,h,g,s,R,M]),a.useLayoutEffect(()=>{if(!n||!Y||!z||typeof window>"u")return;const $e=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame($e)},[n,Y,z,b,s,K,L,fe]);const se=()=>{G&&$(!0)},q=()=>{G&&$(!1)},Q=a.useCallback(()=>{var $e;F.current=Math.min(Re,F.current+1),($e=pe.current)==null||$e.call(pe)},[Re]),me=a.useCallback(($e,ke)=>{H(ue=>{const he=ue[$e]??ke,Se=(t??[]).filter(oe=>oe!==he);if(Se.length===0)return ue;const D=Se[Math.floor(Math.random()*Se.length)];return{...ue,[$e]:D}})},[t]),Ne=($e,ke,ue,he)=>{const Se=k&&y==="randomize"&&R.display==="cover"?M[ue]??$e:$e,D=`max(${W(L)}, ${vm}px)`,oe=`calc(-0.5 * (${D} + ${W(L)}))`;return r.jsxs("div",{className:`${l}-marquee-card`,"data-marquee-item-index":ue,onMouseEnter:k&&y==="randomize"&&R.display==="cover"?()=>me(ue,$e):void 0,children:[r.jsx(Em,{item:Se,prefix:l,imageFit:R,imageMaxWidth:h,imageMaxHeight:g,cornerRadius:E,imageHoverClass:B,isEditor:n,isFirstSet:he,scaled:W,onFirstSetImageDone:Q}),Y&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${l}-gap-control`,style:{position:"absolute",top:0,right:oe,width:D,height:"100%"}})]},`${ke}-${ue}`)};if(z){const $e=P?G&&ne?"paused":"running":"paused",ke=c>0&&v>0?c/v*1e3:0,ue=`${Math.max(0,ke)/1e3}s`;return r.jsxs("div",{ref:I,className:ut(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Marquee",style:K>0?{height:K}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{ref:Z,className:`${l}-marquee-track`,"data-direction":b,onMouseEnter:se,onMouseLeave:q,style:{WebkitAnimationDuration:ue,animationDuration:ue,WebkitAnimationPlayState:$e,animationPlayState:$e},children:Array.from({length:de},(he,Se)=>r.jsx("div",{ref:Se===0?A:void 0,className:ut(`${l}-marquee-row`,`${l}-marquee-set`),style:{gap:W(L),paddingRight:W(L)},"aria-hidden":Se>0,children:fe.map((D,oe)=>Ne(D,Se,oe,Se===0&&oe<T))},`set-${Se}`))})]})}return r.jsxs("div",{ref:I,className:`${l}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{className:ut(`${l}-marquee-row`,`${l}-marquee-static`),style:{gap:W(L),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map(($e,ke)=>Ne($e,0,ke))},"marquee-static")]})},km=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1692
+ `}const km=30,Am=20,Vr=3,Fm=12,Wm=32,_m=3,Nm=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")},Hm=(e,t)=>Array.from({length:t},()=>e).flat(),Om=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},vc=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Es=(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,p)=>e.children[p]),c=vc(d);return c<=0?0:c+s*Math.max(0,t-1)},Dm=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=vc(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},jm=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},zm=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>jm(i,e))},Bm=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??"")},Vm=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,Gm=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:s,imageHoverClass:l,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var R,J,F,U;const p=a.useRef(null),v=!!((R=e.image)!=null&&R.url&&Bm(e.image));a.useLayoutEffect(()=>{d&&Vm(p.current)&&(u==null||u())},[d,(J=e.image)==null?void 0:J.url,u]);const x=n.display==="cover",I=n.ratioValue??"1:1",h=n.reversed??!1,[g,y]=I.split(":").map(Number),C=(h?y:g)/(h?g:y),K=i/C,A=K>o?o:K,B=K>o?o*C:i,P=c(B),T=c(A),z={borderRadius:c(s)},w=x?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...z}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",...z},W=((F=e.image)==null?void 0:F.url)&&(v?r.jsx("video",{ref:V=>{p.current=V},src:e.image.url,style:w,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:d?u:void 0,onError:d?u:void 0}):r.jsx("img",{ref:V=>{p.current=V},src:e.image.url,alt:((U=e.image)==null?void 0:U.name)??"",style:w,onLoad:d?u:void 0,onError:d?u:void 0}));return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...x?{width:P}:{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,...x?{width:P,height:T,overflow:"hidden",...z}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:W&&e.link?r.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:ut(`${t}-marquee-link`,!x&&`${t}-marquee-link-contain`),children:W}):W})})},qm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=S.useScopedStyles(),[l,d]=a.useState(0),c=l>0?Math.round(l):0,u=a.useMemo(()=>Pm(s,c),[s,c]),{speed:p,direction:v,pauseOnHover:x,gap:I,imageMaxWidth:h,imageMaxHeight:g,hoverEffect:y,cornerRadius:E=0}=e,L=a.useMemo(()=>Om(e.imageFit),[e.imageFit]),C=(t==null?void 0:t.length)??0,K=!!o,A=!n||!!i,B=A&&y!=="off"&&y!=="randomize"?`${s}-image-hover-${y}`:void 0,P=n?!!i:!0,z=((t==null?void 0:t.length)??0)>0&&(P||!!n),w=Math.max(0,p)*km,W=$e=>S.scalingValue($e,n??!1),R=a.useRef(null),J=a.useRef(null),F=a.useRef(null),[U,V]=a.useState(0),G=P&&x==="on",[oe,$]=a.useState(!1),[M,N]=a.useState({}),Q=a.useRef(M);Q.current=M;const te=a.useRef(null),k=a.useRef(0),le=a.useRef(null),f=a.useMemo(()=>(t??[]).map($e=>{var Pe;return((Pe=$e.image)==null?void 0:Pe.url)??""}).join("\0"),[t]),[ne,Z]=a.useState(Vr),fe=a.useMemo(()=>{const $e=t??[];return $e.length===0||!(P||!!n)?$e:Hm($e,ne)},[t,P,ne,n]),Ie=a.useMemo(()=>(t??[]).filter($e=>{var Pe;return!!((Pe=$e.image)!=null&&Pe.url)}).length,[t]),ue=z?_m:1;a.useLayoutEffect(()=>{k.current=0,N({}),te.current=null,Z(Vr),d(0)},[f]),a.useEffect(()=>{if(!A||y!=="randomize")return;const $e=R.current;if(!$e)return;const Pe=j=>{N(re=>{const ge=Array.from(j).filter(Le=>Le in re&&!zm($e,Le));if(ge.length===0)return re;const xe={...re};return ge.forEach(Le=>{delete xe[Le]}),xe})},pe=new IntersectionObserver(j=>{const re=new Set;for(const ge of j){const xe=ge.target.dataset.marqueeItemIndex,Le=xe!==void 0?Number(xe):NaN;Number.isNaN(Le)||re.add(Le)}re.size>0&&Pe(re)},{root:$e,threshold:0});Object.keys(M).forEach(j=>{const re=Number(j);$e.querySelectorAll(`[data-marquee-item-index="${re}"]`).forEach(ge=>pe.observe(ge))});const he={current:0},be=()=>{const j=Object.keys(Q.current);j.length!==0&&(Pe(j.map(Number)),he.current=requestAnimationFrame(be))};return Object.keys(Q.current).length>0&&(he.current=requestAnimationFrame(be)),()=>{cancelAnimationFrame(he.current),pe.disconnect()}},[y,M,A]),a.useLayoutEffect(()=>{if(!z)return;const $e=R.current,Pe=F.current;if(!$e||!Pe)return;const pe={current:0},he=()=>{const re=$e.getBoundingClientRect().width||$e.offsetWidth,ge=Dm(Pe),xe=te.current,Le=typeof xe=="number"&&Math.abs(xe-ge)<=.25;te.current=ge;let we=ne,_=0;if((P||n)&&C>0&&re>0){const H=Es(Pe,C);if(H>=Wm){_=H;const X=Math.min(Fm,Math.max(Vr,Math.ceil(re/H)+1));we=X,X!==ne&&Z(X)}}const ie=we!==ne&&_>0?_*we:ge>0?ge:_>0?_*we:(()=>{const H=Es(Pe,C);return H>0?H*we:0})();ie>0?d(H=>H<=0?ie:!Le||Math.round(H)===Math.round(ie)?H:ie):!Le&&l<=0&&(cancelAnimationFrame(pe.current),pe.current=requestAnimationFrame(he))},be=()=>{cancelAnimationFrame(pe.current),pe.current=requestAnimationFrame(he)};le.current=be,be();const j=new ResizeObserver(be);return j.observe($e),j.observe(Pe),()=>{le.current=null,cancelAnimationFrame(pe.current),j.disconnect()}},[P,z,l,f,ne,C,n]),a.useLayoutEffect(()=>{if(!z||c<=0)return;const $e=J.current;$e&&Nm($e)},[z,c,v,w]),a.useLayoutEffect(()=>{if(!z||l<=0){V(0);return}const $e=J.current,Pe=F.current;if(!$e||!Pe)return;const pe=()=>{const be=$e.offsetHeight||$e.getBoundingClientRect().height,j=Array.from(Pe.children).reduce((ge,xe)=>Math.max(ge,xe.offsetHeight||xe.getBoundingClientRect().height),0),re=be>0?be:j;V(re>0?re:0)};pe();const he=new ResizeObserver(pe);return he.observe($e),he.observe(Pe),()=>he.disconnect()},[z,ue,fe,n,I,h,g,l,L,M]),a.useLayoutEffect(()=>{if(!n||!K||!z||typeof window>"u")return;const $e=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame($e)},[n,K,z,v,l,U,I,fe]);const se=()=>{G&&$(!0)},q=()=>{G&&$(!1)},ee=a.useCallback(()=>{var $e;k.current=Math.min(Ie,k.current+1),($e=le.current)==null||$e.call(le)},[Ie]),ce=a.useCallback(($e,Pe)=>{N(pe=>{const he=pe[$e]??Pe,be=(t??[]).filter(re=>re!==he);if(be.length===0)return pe;const j=be[Math.floor(Math.random()*be.length)];return{...pe,[$e]:j}})},[t]),ke=($e,Pe,pe,he)=>{const be=A&&y==="randomize"&&L.display==="cover"?M[pe]??$e:$e,j=`max(${W(I)}, ${Am}px)`,re=`calc(-0.5 * (${j} + ${W(I)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":pe,onMouseEnter:A&&y==="randomize"&&L.display==="cover"?()=>ce(pe,$e):void 0,children:[r.jsx(Gm,{item:be,prefix:s,imageFit:L,imageMaxWidth:h,imageMaxHeight:g,cornerRadius:E,imageHoverClass:B,isEditor:n,isFirstSet:he,scaled:W,onFirstSetImageDone:ee}),K&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:re,width:j,height:"100%"}})]},`${Pe}-${pe}`)};if(z){const $e=P?G&&oe?"paused":"running":"paused",Pe=c>0&&w>0?c/w*1e3:0,pe=`${Math.max(0,Pe)/1e3}s`;return r.jsxs("div",{ref:R,className:ut(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:U>0?{height:U}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{ref:J,className:`${s}-marquee-track`,"data-direction":v,onMouseEnter:se,onMouseLeave:q,style:{WebkitAnimationDuration:pe,animationDuration:pe,WebkitAnimationPlayState:$e,animationPlayState:$e},children:Array.from({length:ue},(he,be)=>r.jsx("div",{ref:be===0?F:void 0,className:ut(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:W(I),paddingRight:W(I)},"aria-hidden":be>0,children:fe.map((j,re)=>ke(j,be,re,be===0&&re<C))},`set-${be}`))})]})}return r.jsxs("div",{ref:R,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{className:ut(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:W(I),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map(($e,Pe)=>ke($e,0,Pe))},"marquee-static")]})},Um=`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
- `,Am={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:""}]}},Fm={element:Pm,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:Am,sourceCode:km,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function Wm(e,t){const n=t>0?`${t}px`:"0px";return`
2475
+ `,Km={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:""}]}},Xm={element:qm,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:Km,sourceCode:Um,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function Ym(e,t){const n=t>0?`${t}px`:"0px";return`
2476
2476
  .${e}-marquee-wrapper {
2477
2477
  overflow: hidden;
2478
2478
  width: 100%;
@@ -2561,7 +2561,7 @@ type MarqueeProps = {
2561
2561
  pointer-events: auto;
2562
2562
  z-index: 10;
2563
2563
  }
2564
- `}const _m=30,Rl=2,Nm=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")},Hm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=w.useScopedStyles(),{align:s,speed:d,direction:c,pauseOnHover:u,gap:p,cardWidth:b,corners:S,stroke:L,strokeColor:h,bgColor:g,padding:y,logoMarginTop:E,logoWidth:R,logoHeight:T,captionMarginTop:Y}=e,k=!!o,B=((t==null?void 0:t.length)??0)>0,P=d>0&&(!n||i),C=B&&(P||n),z=Math.max(0,d)*_m,v=_=>w.scalingValue(_,n??!1),W=a.useRef(null),I=a.useRef(null),Z=a.useRef(null),[A,K]=a.useState(0),[V,G]=a.useState(0),ne=V>0?V:0,$=a.useMemo(()=>Wm(l,ne),[l,ne]),[M,H]=a.useState(0),ee=P&&u==="on",[ie,F]=a.useState(!1),pe=a.useRef(null),[x,re]=a.useState(0),[J,fe]=a.useState(0),Re=a.useRef(null),de=_=>{var te,N,U,Ie,le;return{fontSettings:{fontFamily:(e==null?void 0:e[`${_}FontFamily`])??"Arial",fontWeight:((te=e==null?void 0:e[`${_}FontSettings`])==null?void 0:te.fontWeight)??400,fontStyle:((N=e==null?void 0:e[`${_}FontSettings`])==null?void 0:N.fontStyle)??"normal"},textAppearance:{textTransform:((U=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:U.textTransform)??"none",textDecoration:((Ie=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:Ie.textDecoration)??"none",fontVariant:((le=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:le.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${_}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${_}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${_}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${_}LineHeight`])??.01,color:(e==null?void 0:e[`${_}Color`])??"#000000"}},se=de("text"),q=de("caption"),Q=a.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(_=>{var ce,te;return(((ce=_.text)==null?void 0:ce.length)??0)>0||(((te=_.caption)==null?void 0:te.length)??0)>0}),[t]),me=a.useMemo(()=>!C||(t==null?void 0:t.length)===0?1:V<=0||A<=0?Rl:Math.max(Rl,Math.ceil(A/V)+1),[C,t==null?void 0:t.length,V,A]);a.useLayoutEffect(()=>{if(!C)return;const _=W.current,ce=Z.current;if(!_||!ce)return;let te=0;const N=()=>{const le=_.getBoundingClientRect().width,j=ce.getBoundingClientRect().width,ze=Re.current,Ae=typeof ze=="number"&&Math.abs(ze-j)<=.25;if(Re.current=j,K(le),typeof j=="number"&&j>0&&V<=0){G(j);return}Ae&&j!==V?G(j):!Ae&&V<=0&&(cancelAnimationFrame(te),te=requestAnimationFrame(N))},U=()=>{cancelAnimationFrame(te),te=requestAnimationFrame(N)};U();const Ie=new ResizeObserver(U);return Ie.observe(_),Ie.observe(ce),()=>{cancelAnimationFrame(te),Ie.disconnect()}},[P,C,V]);const Ne=ne>0&&z>0?ne/z*1e3:0,$e=`${Math.max(0,Ne)/1e3}s`;a.useLayoutEffect(()=>{if(!C||ne<=0)return;const _=I.current;_&&Nm(_)},[C,ne,c]),a.useLayoutEffect(()=>{if(!C){H(0);return}const _=Z.current,ce=I.current;if(!_||!ce)return;const te=()=>{let U=0;for(let Ie=0;Ie<_.children.length;Ie++){const j=_.children[Ie].firstElementChild;j&&(U=Math.max(U,j.offsetHeight))}U<=0&&(U=ce.offsetHeight),H(U>0?U:0)};te();const N=new ResizeObserver(te);return N.observe(_),N.observe(ce),()=>{N.disconnect()}},[C,me,t,n,p,b,y,L,S,R,T,x,J]);const ke=()=>{ee&&F(!0)},ue=()=>{ee&&F(!1)},he=a.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),Se=a.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]),D=a.useCallback((_,ce,te,N)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:he,width:"100%"},children:[r.jsx("div",{"data-controls":k?N==null?void 0:N.controlsName:void 0,"data-controls-axis":k?"y":void 0,className:k?`${l}-control`:void 0,style:{height:v((N==null?void 0:N.marginTop)??0)}}),r.jsx("div",{...N!=null&&N.dataMeasureKind?{"data-testimonial-measure":N.dataMeasureKind}:{},style:{...Vt(_,n),textAlign:Se,pointerEvents:"auto",...typeof(N==null?void 0:N.minHeightPx)=="number"&&N.minHeightPx>0?{minHeight:N.minHeightPx}:{}},children:r.jsx(yi,{content:ce})})]},te),[he,Se,n,k,l,v]),oe=a.useCallback((_,ce,te)=>{var N,U,Ie;return r.jsxs("div",{style:{padding:`${v(y.top)} ${v(y.right)} ${v(y.bottom)} ${v(y.left)}`,width:v(b+L*2),height:"100%",borderRadius:v(S),border:`${v(L)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${l}-cover`,style:{background:g}}),r.jsxs("div",{className:`${l}-elements-overlay`,style:{alignItems:he,textAlign:Se},children:[_.text&&D(se,_.text,"text",te!=null&&te.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(te==null?void 0:te.textMinHeightPx)=="number"&&te.textMinHeightPx>0?{minHeightPx:te.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:he,width:"100%"},children:[r.jsx("div",{"data-controls":k&&!(te!=null&&te.dataMeasureAttrs)?"logoMarginTop":void 0,className:k&&!(te!=null&&te.dataMeasureAttrs)?`${l}-control`:void 0,style:{height:v(E)}}),r.jsx("div",{style:{width:v(R),height:v(T)},children:((N=_.logo)==null?void 0:N.url)&&r.jsx("img",{src:_.logo.url,alt:((U=_.logo)==null?void 0:U.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Ie=_.logo)==null?void 0:Ie.objectFit)||"contain"}})})]}),_.caption&&D(q,_.caption,"caption",{...te!=null&&te.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:Y,...te!=null&&te.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(te==null?void 0:te.captionMinHeightPx)=="number"&&te.captionMinHeightPx>0?{minHeightPx:te.captionMinHeightPx}:{}})]})]},ce)},[g,Y,q,b,S,T,E,R,he,Se,y.bottom,y.left,y.right,y.top,D,L,h,se,n,k,l]),ge=a.useCallback(_=>{re(_.maxTextPx),fe(_.maxCaptionPx)},[]);a.useLayoutEffect(()=>{if(!Q){ge({maxTextPx:0,maxCaptionPx:0});return}const _=pe.current;if(!_)return;const ce=()=>{w.readTestimonialTextMeasure(_,ge)};ce();const te=new ResizeObserver(ce);return te.observe(_),()=>{te.disconnect()}},[Q,ge,t,oe]);const xe=Q?{textMinHeightPx:x,captionMinHeightPx:J}:void 0,Le=Q?r.jsx("div",{ref:pe,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((_,ce)=>oe(_,`measure-${ce}`,{dataMeasureAttrs:!0}))}):null,be=(_,ce)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[oe(_,`card-${ce}`,xe),k&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${v(p)})`,width:v(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},ce);if(C){const _=P?ee&&ie?"paused":"running":"paused";return r.jsxs("div",{ref:W,className:ut(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...M>0?{height:M}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:$}}),Le,r.jsx("div",{ref:I,className:`${l}-marquee-track`,"data-direction":c,onMouseEnter:ke,onMouseLeave:ue,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",animationDuration:$e,WebkitAnimationDuration:$e,animationPlayState:_,WebkitAnimationPlayState:_},children:Array.from({length:me},(ce,te)=>r.jsx("div",{ref:te===0?Z:void 0,className:`${l}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:v(p),paddingRight:v(p)},"aria-hidden":te>0,children:t==null?void 0:t.map((N,U)=>be(N,`${te}-${U}`))},`set-${te}`))})]})}return r.jsxs("div",{className:`${l}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:$}}),Le,r.jsx("div",{style:{gap:v(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((_,ce)=>be(_,ce))})]})},Om=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2564
+ `}const Zm=30,Ps=2,Jm=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")},Qm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=S.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:p,cardWidth:v,corners:x,stroke:I,strokeColor:h,bgColor:g,padding:y,logoMarginTop:E,logoWidth:L,logoHeight:C,captionMarginTop:K}=e,A=!!o,B=((t==null?void 0:t.length)??0)>0,P=d>0&&(!n||i),T=B&&(P||n),z=Math.max(0,d)*Zm,w=_=>S.scalingValue(_,n??!1),W=a.useRef(null),R=a.useRef(null),J=a.useRef(null),[F,U]=a.useState(0),[V,G]=a.useState(0),oe=V>0?V:0,$=a.useMemo(()=>Ym(s,oe),[s,oe]),[M,N]=a.useState(0),Q=P&&u==="on",[te,k]=a.useState(!1),le=a.useRef(null),[f,ne]=a.useState(0),[Z,fe]=a.useState(0),Ie=a.useRef(null),ue=_=>{var ie,H,X,Re,de;return{fontSettings:{fontFamily:(e==null?void 0:e[`${_}FontFamily`])??"Arial",fontWeight:((ie=e==null?void 0:e[`${_}FontSettings`])==null?void 0:ie.fontWeight)??400,fontStyle:((H=e==null?void 0:e[`${_}FontSettings`])==null?void 0:H.fontStyle)??"normal"},textAppearance:{textTransform:((X=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:X.textTransform)??"none",textDecoration:((Re=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:Re.textDecoration)??"none",fontVariant:((de=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:de.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${_}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${_}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${_}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${_}LineHeight`])??.01,color:(e==null?void 0:e[`${_}Color`])??"#000000"}},se=ue("text"),q=ue("caption"),ee=a.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(_=>{var me,ie;return(((me=_.text)==null?void 0:me.length)??0)>0||(((ie=_.caption)==null?void 0:ie.length)??0)>0}),[t]),ce=a.useMemo(()=>!T||(t==null?void 0:t.length)===0?1:V<=0||F<=0?Ps:Math.max(Ps,Math.ceil(F/V)+1),[T,t==null?void 0:t.length,V,F]);a.useLayoutEffect(()=>{if(!T)return;const _=W.current,me=J.current;if(!_||!me)return;let ie=0;const H=()=>{const de=_.getBoundingClientRect().width,D=me.getBoundingClientRect().width,ze=Ie.current,Fe=typeof ze=="number"&&Math.abs(ze-D)<=.25;if(Ie.current=D,U(de),typeof D=="number"&&D>0&&V<=0){G(D);return}Fe&&D!==V?G(D):!Fe&&V<=0&&(cancelAnimationFrame(ie),ie=requestAnimationFrame(H))},X=()=>{cancelAnimationFrame(ie),ie=requestAnimationFrame(H)};X();const Re=new ResizeObserver(X);return Re.observe(_),Re.observe(me),()=>{cancelAnimationFrame(ie),Re.disconnect()}},[P,T,V]);const ke=oe>0&&z>0?oe/z*1e3:0,$e=`${Math.max(0,ke)/1e3}s`;a.useLayoutEffect(()=>{if(!T||oe<=0)return;const _=R.current;_&&Jm(_)},[T,oe,c]),a.useLayoutEffect(()=>{if(!T){N(0);return}const _=J.current,me=R.current;if(!_||!me)return;const ie=()=>{let X=0;for(let Re=0;Re<_.children.length;Re++){const D=_.children[Re].firstElementChild;D&&(X=Math.max(X,D.offsetHeight))}X<=0&&(X=me.offsetHeight),N(X>0?X:0)};ie();const H=new ResizeObserver(ie);return H.observe(_),H.observe(me),()=>{H.disconnect()}},[T,ce,t,n,p,v,y,I,x,L,C,f,Z]);const Pe=()=>{Q&&k(!0)},pe=()=>{Q&&k(!1)},he=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),be=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),j=a.useCallback((_,me,ie,H)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:he,width:"100%"},children:[r.jsx("div",{"data-controls":A?H==null?void 0:H.controlsName:void 0,"data-controls-axis":A?"y":void 0,className:A?`${s}-control`:void 0,style:{height:w((H==null?void 0:H.marginTop)??0)}}),r.jsx("div",{...H!=null&&H.dataMeasureKind?{"data-testimonial-measure":H.dataMeasureKind}:{},style:{...Vt(_,n),textAlign:be,pointerEvents:"auto",...typeof(H==null?void 0:H.minHeightPx)=="number"&&H.minHeightPx>0?{minHeight:H.minHeightPx}:{}},children:r.jsx(yi,{content:me})})]},ie),[he,be,n,A,s,w]),re=a.useCallback((_,me,ie)=>{var H,X,Re;return r.jsxs("div",{style:{padding:`${w(y.top)} ${w(y.right)} ${w(y.bottom)} ${w(y.left)}`,width:w(v+I*2),height:"100%",borderRadius:w(x),border:`${w(I)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:g}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:he,textAlign:be},children:[_.text&&j(se,_.text,"text",ie!=null&&ie.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(ie==null?void 0:ie.textMinHeightPx)=="number"&&ie.textMinHeightPx>0?{minHeightPx:ie.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:he,width:"100%"},children:[r.jsx("div",{"data-controls":A&&!(ie!=null&&ie.dataMeasureAttrs)?"logoMarginTop":void 0,className:A&&!(ie!=null&&ie.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:w(E)}}),r.jsx("div",{style:{width:w(L),height:w(C)},children:((H=_.logo)==null?void 0:H.url)&&r.jsx("img",{src:_.logo.url,alt:((X=_.logo)==null?void 0:X.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Re=_.logo)==null?void 0:Re.objectFit)||"contain"}})})]}),_.caption&&j(q,_.caption,"caption",{...ie!=null&&ie.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:K,...ie!=null&&ie.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(ie==null?void 0:ie.captionMinHeightPx)=="number"&&ie.captionMinHeightPx>0?{minHeightPx:ie.captionMinHeightPx}:{}})]})]},me)},[g,K,q,v,x,C,E,L,he,be,y.bottom,y.left,y.right,y.top,j,I,h,se,n,A,s]),ge=a.useCallback(_=>{ne(_.maxTextPx),fe(_.maxCaptionPx)},[]);a.useLayoutEffect(()=>{if(!ee){ge({maxTextPx:0,maxCaptionPx:0});return}const _=le.current;if(!_)return;const me=()=>{S.readTestimonialTextMeasure(_,ge)};me();const ie=new ResizeObserver(me);return ie.observe(_),()=>{ie.disconnect()}},[ee,ge,t,re]);const xe=ee?{textMinHeightPx:f,captionMinHeightPx:Z}:void 0,Le=ee?r.jsx("div",{ref:le,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((_,me)=>re(_,`measure-${me}`,{dataMeasureAttrs:!0}))}):null,we=(_,me)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[re(_,`card-${me}`,xe),A&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${w(p)})`,width:w(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},me);if(T){const _=P?Q&&te?"paused":"running":"paused";return r.jsxs("div",{ref:W,className:ut(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...M>0?{height:M}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:$}}),Le,r.jsx("div",{ref:R,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:Pe,onMouseLeave:pe,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",animationDuration:$e,WebkitAnimationDuration:$e,animationPlayState:_,WebkitAnimationPlayState:_},children:Array.from({length:ce},(me,ie)=>r.jsx("div",{ref:ie===0?J:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:w(p),paddingRight:w(p)},"aria-hidden":ie>0,children:t==null?void 0:t.map((H,X)=>we(H,`${ie}-${X}`))},`set-${ie}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:$}}),Le,r.jsx("div",{style:{gap:w(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((_,me)=>we(_,me))})]})},eg=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2565
2565
  import cn from 'classnames';
2566
2566
  import { CommonComponentProps } from '../props';
2567
2567
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3192,7 +3192,7 @@ type TestimonialsSettings = {
3192
3192
  logoHeight: number;
3193
3193
  captionMarginTop: number;
3194
3194
  };
3195
- `,Il={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},jm={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:{...Il.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:{...Il.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"}]}]}]}},Dm={element:Hm,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:jm,sourceCode:Om,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function zm(e){return`
3195
+ `,ks={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},tg={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:{...ks.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:{...ks.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"}]}]}]}},ng={element:Qm,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:tg,sourceCode:eg,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function ig(e){return`
3196
3196
  .${e}-container {
3197
3197
  position: relative;
3198
3198
  overflow-x: clip;
@@ -3316,7 +3316,7 @@ type TestimonialsSettings = {
3316
3316
  width: 100%;
3317
3317
  height: 100%;
3318
3318
  }
3319
- `}const Bm=3e3,Vm=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=w.useScopedStyles(),s=t||[],{speed:d,align:c,width:u,imageMarginTop:p,textMarginTop:b,captionMarginTop:S,imageWidth:L,imageHeight:h,controlsWidth:g,controlsColor:y,controlsHoverColor:E}=e,R=d>0&&(!n||!!i),[T,Y]=a.useState(0),[k,B]=a.useState(null),[P,C]=a.useState(!1),z=a.useRef(null),v=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),W=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);a.useEffect(()=>{Y(0),B(null),C(!1)},[s.length]);const I=s[T],Z=k===null?null:s[k],A=de=>{var q,Q,me,Ne,$e;return{fontSettings:{fontFamily:(e==null?void 0:e[`${de}FontFamily`])??"Arial",fontWeight:((q=e==null?void 0:e[`${de}FontSettings`])==null?void 0:q.fontWeight)??400,fontStyle:((Q=e==null?void 0:e[`${de}FontSettings`])==null?void 0:Q.fontStyle)??"normal"},textAppearance:{textTransform:((me=e==null?void 0:e[`${de}TextAppearance`])==null?void 0:me.textTransform)??"none",textDecoration:((Ne=e==null?void 0:e[`${de}TextAppearance`])==null?void 0:Ne.textDecoration)??"none",fontVariant:(($e=e==null?void 0:e[`${de}TextAppearance`])==null?void 0:$e.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${de}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${de}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${de}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${de}WordSpacing`])??0,color:(e==null?void 0:e[`${de}Color`])??"#000000"}},K=A("text"),V=A("caption"),G=s.length>1&&s.some(de=>{var se,q;return(((se=de.text)==null?void 0:se.length)??0)>0||(((q=de.caption)==null?void 0:q.length)??0)>0}),ne=a.useRef(null),[$,M]=a.useState(0),[H,ee]=a.useState(0),ie=e.controls??{mode:"Off",icon:null},F=s.length>1,pe=a.useCallback((de,se)=>!F||se===de?de:(z.current&&window.clearTimeout(z.current),B(de),C(!0),z.current=window.setTimeout(()=>{B(null),C(!1),z.current=null},300),se),[F]),x=a.useCallback(()=>{F&&Y(de=>pe(de,(de-1+s.length)%s.length))},[F,pe,s.length]),re=a.useCallback(()=>{F&&Y(de=>pe(de,(de+1)%s.length))},[F,pe,s.length]);a.useEffect(()=>{if(!R||!F)return;const de=Math.max(300,Bm/d),se=window.setInterval(()=>{Y(q=>pe(q,(q+1)%s.length))},de);return()=>{window.clearInterval(se)}},[R,F,pe,s.length,d]),a.useEffect(()=>()=>{z.current&&window.clearTimeout(z.current)},[]);const J=(de,se)=>{var $e,ke,ue,he;const q=se==null?void 0:se.textMinHeightPx,Q=se==null?void 0:se.captionMinHeightPx,me=se==null?void 0:se.dataMeasureAttrs,Ne=o&&!(se!=null&&se.dataMeasureAttrs)&&!(se!=null&&se.hideControls);return r.jsxs(r.Fragment,{children:[de.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:v,width:"100%"},children:[r.jsx("div",{"data-controls":Ne?"textMarginTop":void 0,className:Ne?`${l}-control`:void 0,style:{height:w.scalingValue(b??0,n??!1)}}),r.jsx("div",{...me&&{"data-testimonial-measure":"text"},style:{...Vt(K,n),...q&&q>0?{minHeight:q}:{},textAlign:W,pointerEvents:"auto"},children:r.jsx(yi,{content:de.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:v,width:"100%"},children:[r.jsx("div",{"data-controls":Ne?"imageMarginTop":void 0,className:Ne?`${l}-control`:void 0,style:{height:w.scalingValue(p??0,n??!1)}}),r.jsx("div",{style:{width:w.scalingValue(L??0,n??!1),height:w.scalingValue(h??0,n??!1)},children:(($e=de.image)==null?void 0:$e.url)&&r.jsx("img",{src:(ke=de.image)==null?void 0:ke.url,alt:((ue=de.image)==null?void 0:ue.name)??"",className:`${l}-icon`,style:{objectFit:((he=de.image)==null?void 0:he.objectFit)||"contain"}})})]}),de.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:v,width:"100%"},children:[r.jsx("div",{"data-controls":Ne?"captionMarginTop":void 0,className:Ne?`${l}-control`:void 0,style:{height:w.scalingValue(S??0,n??!1)}}),r.jsx("div",{...me?{"data-testimonial-measure":"caption"}:{},style:{...Vt(V,n),...Q&&Q>0?{minHeight:Q}:{},textAlign:W,pointerEvents:"auto"},children:r.jsx(yi,{content:de.caption})})]})]})},fe=a.useCallback(de=>{M(de.maxTextPx),ee(de.maxCaptionPx)},[]);if(a.useLayoutEffect(()=>{if(!G){fe({maxTextPx:0,maxCaptionPx:0});return}const de=ne.current;if(!de)return;const se=()=>{w.readTestimonialTextMeasure(de,fe)};se();const q=new ResizeObserver(se);return q.observe(de),()=>{q.disconnect()}},[G,fe,t]),!I)return r.jsx(r.Fragment,{});const Re=G?{textMinHeightPx:$,captionMinHeightPx:H}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${l}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:zm(l)}}),r.jsxs("div",{className:`${l}-wrapper`,style:{width:w.scalingValue(u??0,n??!1),alignItems:v},children:[G&&r.jsx("div",{ref:ne,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((de,se)=>r.jsx("div",{style:{width:"100%"},children:J(de,{dataMeasureAttrs:!0})},se))}),r.jsxs("div",{className:`${l}-fade-stack`,children:[Z&&P&&r.jsx("div",{className:ut(`${l}-fade-item-prev`,`${l}-fade-out`),children:J(Z,{...Re,hideControls:!0})}),r.jsx("div",{className:ut(`${l}-fade-item-current`,P?`${l}-fade-in`:void 0),children:J(I,Re)})]})]}),ie.mode==="On"&&r.jsxs("div",{className:`${l}-controls`,children:[r.jsx("div",{className:`${l}-arrow`,style:{width:w.scalingValue(g??.02,n??!1),height:w.scalingValue(g??.02,n??!1),"--arrow-hover-color":E},children:r.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:x,disabled:!F,"aria-label":"Previous testimonial",children:ie.icon&&r.jsx(rn,{url:ie.icon,fill:y,hoverFill:E,className:ut(`${l}-arrow-img`,`${l}-mirror`)})})}),r.jsx("div",{className:ut(`${l}-arrow`,`${l}-next-arrow`),style:{width:w.scalingValue(g??.02,n??!1),height:w.scalingValue(g??.02,n??!1),"--arrow-hover-color":E},children:r.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:re,disabled:!F,"aria-label":"Next testimonial",children:ie.icon&&r.jsx(rn,{url:ie.icon,fill:y,hoverFill:E,className:`${l}-arrow-img`})})})]})]})})},Gm=`import cn from 'classnames';
3319
+ `}const og=3e3,rg=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=S.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:p,textMarginTop:v,captionMarginTop:x,imageWidth:I,imageHeight:h,controlsWidth:g,controlsColor:y,controlsHoverColor:E}=e,L=d>0&&(!n||!!i),[C,K]=a.useState(0),[A,B]=a.useState(null),[P,T]=a.useState(!1),z=a.useRef(null),w=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),W=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);a.useEffect(()=>{K(0),B(null),T(!1)},[l.length]);const R=l[C],J=A===null?null:l[A],F=ue=>{var q,ee,ce,ke,$e;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ue}FontFamily`])??"Arial",fontWeight:((q=e==null?void 0:e[`${ue}FontSettings`])==null?void 0:q.fontWeight)??400,fontStyle:((ee=e==null?void 0:e[`${ue}FontSettings`])==null?void 0:ee.fontStyle)??"normal"},textAppearance:{textTransform:((ce=e==null?void 0:e[`${ue}TextAppearance`])==null?void 0:ce.textTransform)??"none",textDecoration:((ke=e==null?void 0:e[`${ue}TextAppearance`])==null?void 0:ke.textDecoration)??"none",fontVariant:(($e=e==null?void 0:e[`${ue}TextAppearance`])==null?void 0:$e.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ue}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ue}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ue}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ue}WordSpacing`])??0,color:(e==null?void 0:e[`${ue}Color`])??"#000000"}},U=F("text"),V=F("caption"),G=l.length>1&&l.some(ue=>{var se,q;return(((se=ue.text)==null?void 0:se.length)??0)>0||(((q=ue.caption)==null?void 0:q.length)??0)>0}),oe=a.useRef(null),[$,M]=a.useState(0),[N,Q]=a.useState(0),te=e.controls??{mode:"Off",icon:null},k=l.length>1,le=a.useCallback((ue,se)=>!k||se===ue?ue:(z.current&&window.clearTimeout(z.current),B(ue),T(!0),z.current=window.setTimeout(()=>{B(null),T(!1),z.current=null},300),se),[k]),f=a.useCallback(()=>{k&&K(ue=>le(ue,(ue-1+l.length)%l.length))},[k,le,l.length]),ne=a.useCallback(()=>{k&&K(ue=>le(ue,(ue+1)%l.length))},[k,le,l.length]);a.useEffect(()=>{if(!L||!k)return;const ue=Math.max(300,og/d),se=window.setInterval(()=>{K(q=>le(q,(q+1)%l.length))},ue);return()=>{window.clearInterval(se)}},[L,k,le,l.length,d]),a.useEffect(()=>()=>{z.current&&window.clearTimeout(z.current)},[]);const Z=(ue,se)=>{var $e,Pe,pe,he;const q=se==null?void 0:se.textMinHeightPx,ee=se==null?void 0:se.captionMinHeightPx,ce=se==null?void 0:se.dataMeasureAttrs,ke=o&&!(se!=null&&se.dataMeasureAttrs)&&!(se!=null&&se.hideControls);return r.jsxs(r.Fragment,{children:[ue.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:w,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"textMarginTop":void 0,className:ke?`${s}-control`:void 0,style:{height:S.scalingValue(v??0,n??!1)}}),r.jsx("div",{...ce&&{"data-testimonial-measure":"text"},style:{...Vt(U,n),...q&&q>0?{minHeight:q}:{},textAlign:W,pointerEvents:"auto"},children:r.jsx(yi,{content:ue.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:w,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"imageMarginTop":void 0,className:ke?`${s}-control`:void 0,style:{height:S.scalingValue(p??0,n??!1)}}),r.jsx("div",{style:{width:S.scalingValue(I??0,n??!1),height:S.scalingValue(h??0,n??!1)},children:(($e=ue.image)==null?void 0:$e.url)&&r.jsx("img",{src:(Pe=ue.image)==null?void 0:Pe.url,alt:((pe=ue.image)==null?void 0:pe.name)??"",className:`${s}-icon`,style:{objectFit:((he=ue.image)==null?void 0:he.objectFit)||"contain"}})})]}),ue.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:w,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"captionMarginTop":void 0,className:ke?`${s}-control`:void 0,style:{height:S.scalingValue(x??0,n??!1)}}),r.jsx("div",{...ce?{"data-testimonial-measure":"caption"}:{},style:{...Vt(V,n),...ee&&ee>0?{minHeight:ee}:{},textAlign:W,pointerEvents:"auto"},children:r.jsx(yi,{content:ue.caption})})]})]})},fe=a.useCallback(ue=>{M(ue.maxTextPx),Q(ue.maxCaptionPx)},[]);if(a.useLayoutEffect(()=>{if(!G){fe({maxTextPx:0,maxCaptionPx:0});return}const ue=oe.current;if(!ue)return;const se=()=>{S.readTestimonialTextMeasure(ue,fe)};se();const q=new ResizeObserver(se);return q.observe(ue),()=>{q.disconnect()}},[G,fe,t]),!R)return r.jsx(r.Fragment,{});const Ie=G?{textMinHeightPx:$,captionMinHeightPx:N}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ig(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:S.scalingValue(u??0,n??!1),alignItems:w},children:[G&&r.jsx("div",{ref:oe,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((ue,se)=>r.jsx("div",{style:{width:"100%"},children:Z(ue,{dataMeasureAttrs:!0})},se))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[J&&P&&r.jsx("div",{className:ut(`${s}-fade-item-prev`,`${s}-fade-out`),children:Z(J,{...Ie,hideControls:!0})}),r.jsx("div",{className:ut(`${s}-fade-item-current`,P?`${s}-fade-in`:void 0),children:Z(R,Ie)})]})]}),te.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:S.scalingValue(g??.02,n??!1),height:S.scalingValue(g??.02,n??!1),"--arrow-hover-color":E},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:f,disabled:!k,"aria-label":"Previous testimonial",children:te.icon&&r.jsx(rn,{url:te.icon,fill:y,hoverFill:E,className:ut(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:ut(`${s}-arrow`,`${s}-next-arrow`),style:{width:S.scalingValue(g??.02,n??!1),height:S.scalingValue(g??.02,n??!1),"--arrow-hover-color":E},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:ne,disabled:!k,"aria-label":"Next testimonial",children:te.icon&&r.jsx(rn,{url:te.icon,fill:y,hoverFill:E,className:`${s}-arrow-img`})})})]})]})})},ag=`import cn from 'classnames';
3320
3320
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
3321
3321
  import { CommonComponentProps } from '../props';
3322
3322
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3812,12 +3812,12 @@ type TestimonialsSettings = {
3812
3812
  icon?: string | null;
3813
3813
  };
3814
3814
  };
3815
- `,qm="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>'),Ml={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Um={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:{...Ml.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:{...Ml.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:qm},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"}]}]}]}},Km={element:Vm,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:Um,sourceCode:Gm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function Xm(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function El(e){return((e==null?void 0:e.trim().length)??0)>0}function Vr(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Gr(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:w.scalingValue((o-t)/2,i)}}function Ym(e){return`
3815
+ `,sg="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>'),As={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},lg={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:{...As.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:{...As.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:sg},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"}]}]}]}},cg={element:rg,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:lg,sourceCode:ag,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function dg(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Fs(e){return((e==null?void 0:e.trim().length)??0)>0}function Gr(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function qr(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:S.scalingValue((o-t)/2,i)}}function ug(e){return`
3816
3816
  .${e}-wrapper {
3817
3817
  display: grid;
3818
3818
  align-items: start;
3819
3819
  justify-content: center;
3820
- min-height: ${Xm(48)};
3820
+ min-height: ${dg(48)};
3821
3821
  }
3822
3822
  .${e}-item {
3823
3823
  display: flex;
@@ -4159,7 +4159,7 @@ type TestimonialsSettings = {
4159
4159
  z-index: 2;
4160
4160
  width: 100%;
4161
4161
  }
4162
- `}function Zm(){return Math.random()<.5?"ltr":"ttb"}function Jm(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Qm(e){const t=Zm();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Jm(e)})})}const vn=500,eg=750,Nn="cubic-bezier(0.22, 1, 0.36, 1)",tg=72,ng=50;function ig(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 og(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function rg(e){const[t]=e.media;return t!=null&&t.url?t:null}function pc(e){return!Array.isArray(e)||e.length===0?[]:ig(e)?e.flatMap(t=>{const n=og(t);if(!n)return[];const i=rg(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 gi(e){return e.type==="video"}function ag(e){const t=new Set,n=[];for(const i of e){const o=pc(i.gallery);for(const l of o){const s=l.lightboxMedia;s!=null&&s.url&&!t.has(s.url)&&(t.add(s.url),n.push(s))}}return n}function lg({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=>gi(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 sg(e){e.pause(),e.removeAttribute("src"),e.load()}function Pl({media:e,className:t,style:n,onMediaClick:i}){return gi(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 kl(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function cg(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const l=e.width/n;return{width:e.width,height:l,left:e.left,top:e.top+(e.height-l)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function dg({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:l,onMouseMove:s}){return a.useEffect(()=>{const d=n.current;if(d)return()=>{sg(d)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:l,onMouseMove:s,style:i})}function ug({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:l,onPrev:s,onNext:d,counterClassName:c,counterStyle:u}){const p=i==="cover",b=a.useRef(null),S=a.useRef(null),L=a.useRef(null),h=a.useRef(null),g=a.useRef(0),y=a.useRef(0),E=a.useRef("none"),R=a.useRef(!1),T=a.useRef(!1),Y=a.useRef(null),k=a.useRef(0),B=a.useRef(null),P=a.useRef(!1),C=a.useRef(null),z=a.useRef(null),v=a.useRef(null),W=a.useRef(()=>{}),[I,Z]=a.useState(null),[A,K]=a.useState(null),[V,G]=a.useState("opening"),[ne,$]=a.useState(0),[M,H]=a.useState(0),[ee,ie]=a.useState(null),[F,pe]=a.useState(!1),[x,re]=a.useState(!1),[J,fe]=a.useState(!1),[Re,de]=a.useState(null),se=a.useRef(n),q=a.useRef(void 0),Q=t[n],me=Q?gi(Q):!1,Ne=M!==0||F,$e=ee!==null,ke=a.useCallback(Ce=>{const We=Ce.currentTarget,je=We instanceof HTMLVideoElement?{width:We.videoWidth,height:We.videoHeight}:{width:We.naturalWidth,height:We.naturalHeight};!je.width||!je.height||de(je)},[]);a.useEffect(()=>{Y.current=A},[A]),a.useEffect(()=>{const Ce=b.current;if(!Ce)return;const We=()=>K(kl(Ce));We();const je=new ResizeObserver(We);return je.observe(Ce),()=>je.disconnect()},[]);const ue=a.useCallback(()=>{C.current!==null&&(window.clearTimeout(C.current),C.current=null)},[]),he=a.useCallback(()=>{const Ce=z.current;z.current=null,ue(),B.current=null,P.current=!1,ie(null),pe(!1),H(0),k.current=0,re(!1),R.current=!1,y.current=0,E.current="none",Ce===1?d():Ce===-1&&s()},[ue,d,s]),Se=a.useCallback(()=>{ue(),z.current=null,B.current=null,P.current=!1,ie(null),pe(!1),H(0),k.current=0},[ue]),D=a.useCallback(()=>{ue(),C.current=window.setTimeout(()=>{z.current!==null&&he()},vn+32)},[ue,he]),oe=a.useCallback((Ce,We)=>{var nt;const je=((nt=Y.current)==null?void 0:nt.width)??0;if(ue(),B.current=Ce,ie(Ce),P.current=!0,pe(!0),We){z.current=Ce;const pt=-Ce*je;k.current=pt,H(pt),D();return}k.current=0,H(0),C.current=window.setTimeout(()=>{C.current=null,Se()},vn+32)},[ue,Se,D]),ge=a.useCallback(Ce=>{if(!(t.length<=1)){if(P.current){if(z.current===Ce){v.current=Ce,he();return}Se()}ue(),B.current=Ce,ie(Ce),P.current=!1,pe(!1),k.current=0,H(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{oe(Ce,!0)})})}},[t.length,oe,he,Se,ue]);W.current=ge;const xe=a.useCallback(Ce=>{Ce.propertyName!=="transform"||!P.current||z.current!==null&&he()},[he]),Le=a.useCallback(()=>{const Ce=S.current;if(!Ce)return;const We=kl(Ce);!We.width||!We.height||Z(We)},[]);a.useEffect(()=>{Le();const Ce=S.current;if(!Ce)return;const We=new ResizeObserver(()=>Le());return We.observe(Ce),()=>We.disconnect()},[Le]),a.useEffect(()=>{V==="opening"&&I&&G("open")},[V,I]),a.useEffect(()=>{if(V!=="closing")return;const Ce=setTimeout(()=>l(),vn);return()=>clearTimeout(Ce)},[V,l]),a.useEffect(()=>()=>{ue()},[ue]),a.useLayoutEffect(()=>{se.current===n&&q.current===(Q==null?void 0:Q.url)||(ue(),z.current=null,ie(null),$(0),H(0),pe(!1),fe(!1),re(!1),de(null),g.current=0,y.current=0,E.current="none",R.current=!1,P.current=!1,k.current=0,B.current=null,h.current=null,T.current=!1,se.current=n,q.current=Q==null?void 0:Q.url)},[n,Q==null?void 0:Q.url,ue]),a.useLayoutEffect(()=>{const Ce=v.current;Ce!==null&&(v.current=null,requestAnimationFrame(()=>{W.current(Ce)}))},[n,Q==null?void 0:Q.url]),a.useEffect(()=>{if(V!=="open")return;let Ce=null;const We=()=>{Ce&&(document.removeEventListener("click",Ce,!0),Ce=null)},je=()=>{We(),Ce=ct=>{ct.stopPropagation(),ct.preventDefault(),We()},document.addEventListener("click",Ce,!0)},nt=ct=>{const Ue=ct<0?1:-1;if(Math.abs(ct)>ng&&t.length>1){oe(Ue,!0);return}oe(Ue,!1)},pt=ct=>{if(ct.touches.length!==1||P.current)return;const Ue=ct.touches[0];T.current=!0,h.current={x:Ue.clientX,y:Ue.clientY},E.current="none",y.current=0,R.current=!1},Qe=ct=>{if(!h.current||ct.touches.length!==1||P.current)return;const Ue=ct.touches[0],Ke=Ue.clientX-h.current.x,Oe=Ue.clientY-h.current.y;if(E.current==="none"){if(Math.abs(Ke)<10&&Math.abs(Oe)<10)return;if(Math.abs(Ke)>Math.abs(Oe)){if(t.length<=1)return;E.current="horizontal"}else if(Oe>0)E.current="vertical";else return}if(E.current==="horizontal"){R.current=!0,re(!0),y.current=Ke;const ft=Ke<0?1:-1;B.current!==ft&&(B.current=ft,ie(ft)),k.current=Ke,H(Ke),ct.preventDefault();return}E.current==="vertical"&&(R.current=!0,re(!0),g.current=Oe,$(Oe),ct.preventDefault())},St=()=>{if(!h.current)return;const ct=E.current,Ue=R.current;if(Ue&&ct==="horizontal")nt(y.current),je();else if(Ue&&ct==="vertical")if(g.current>tg){const Oe=window.innerHeight;g.current=Oe,fe(!0),$(Oe),G("closing")}else g.current=0,$(0),je();else ct==="horizontal"&&Math.abs(y.current)>0&&(nt(y.current),je());h.current=null,E.current="none",y.current=0,R.current=!1,re(!1)};return document.addEventListener("touchstart",pt,{passive:!0}),document.addEventListener("touchmove",Qe,{passive:!1}),document.addEventListener("touchend",St),document.addEventListener("touchcancel",St),()=>{document.removeEventListener("touchstart",pt),document.removeEventListener("touchmove",Qe),document.removeEventListener("touchend",St),document.removeEventListener("touchcancel",St),We()}},[V,t.length,oe]),a.useEffect(()=>{const Ce=We=>{We.key==="Escape"&&(We.preventDefault(),We.stopPropagation(),V!=="closing"&&G("closing"))};return window.addEventListener("keydown",Ce,!0),()=>window.removeEventListener("keydown",Ce,!0)},[V]);const be=()=>{V!=="closing"&&G("closing")},_=V==="open",ce=V==="closing",te=ne>0?Math.max(0,1-ne/500):1,N=ne>0?Math.max(.35,1-ne/500):1,U=I?p?I:cg(I,Re):null,Ie=Ce=>{if(Ce.stopPropagation(),T.current){T.current=!1;return}if(t.length<=1)return;const We=U??Ce.currentTarget.getBoundingClientRect(),je=Ce.clientY-We.top,nt=Math.min(52,We.height*.2);if(!(je>We.height-nt)){if(Ce.clientX-We.left<We.width/2){ge(-1);return}ge(1)}},le=Ce=>{if(t.length<=1)return;const We=U??Ce.currentTarget.getBoundingClientRect(),je=Ce.clientX-We.left,nt=Ce.clientY-We.top,pt=Math.min(52,We.height*.2);if(nt>We.height-pt){Ce.currentTarget.style.cursor="default";return}Ce.currentTarget.style.cursor=je<We.width/2?"w-resize":"e-resize"},j={position:"fixed",top:A==null?void 0:A.top,left:A==null?void 0:A.left,width:A==null?void 0:A.width,height:A==null?void 0:A.height,zIndex:9998},ze=p?"cover":"contain",Ae=M!==0||ne>0?`translate(${M}px, ${ne}px)`:void 0,ot=x&&!F?"none":F?`transform ${vn}ms ${Nn}`:J?`transform ${vn}ms ${Nn}, opacity ${vn}ms ${Nn}`:V==="opening"||ce?`opacity ${vn}ms ${Nn}`:"none",tt={...j,transform:Ae,opacity:ne>0?N:V==="opening"||ce?0:1,transition:ot,pointerEvents:"none"},at={position:"absolute",top:((U==null?void 0:U.top)??0)-((A==null?void 0:A.top)??0),left:((U==null?void 0:U.left)??0)-((A==null?void 0:A.left)??0),width:U==null?void 0:U.width,height:U==null?void 0:U.height,objectFit:ze,pointerEvents:me&&_&&!Ne?"auto":"none",touchAction:me&&_?"none":void 0},yt=(A==null?void 0:A.width)??0,Ve=$e?(n+ee+t.length)%t.length:null,ye=Ve!==null?t[Ve]:null,Me={...j,transform:$e?`translateX(${ee*yt+M}px)`:void 0,opacity:1,transition:F?`transform ${vn}ms ${Nn}`:"none",pointerEvents:"none"},De={position:"absolute",top:((I==null?void 0:I.top)??0)-((A==null?void 0:A.top)??0),left:((I==null?void 0:I.left)??0)-((A==null?void 0:A.left)??0),width:I==null?void 0:I.width,height:I==null?void 0:I.height,objectFit:ze,pointerEvents:"none"},Ee=U?{position:"fixed",top:U.top,height:U.height,width:U.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:b,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:V==="open"?"none":void 0},onClick:be,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:_?te:0,transition:x?"none":`opacity ${vn}ms ${Nn}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:S,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:_?1:0,transition:`opacity ${vn}ms ${Nn}`,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:S,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:_?1:0,transition:`opacity ${vn}ms ${Nn}`},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),I&&A&&ye&&r.jsx("div",{style:Me,onTransitionEnd:xe,children:gi(ye)?r.jsx("video",{src:ye.url,muted:!0,playsInline:!0,preload:"auto",style:De},`neighbor-${Ve}-${ye.url}`):r.jsx("img",{src:ye.url,alt:ye.name,style:De},`neighbor-${Ve}-${ye.url}`)}),I&&A&&Q&&r.jsx("div",{style:tt,onTransitionEnd:xe,children:me?r.jsx(dg,{src:Q.url,phase:V,mediaRef:L,mediaStyle:at,onLoadedMetadata:ke,onClick:Ie,onMouseMove:le},`${n}-${Q.url}`):r.jsx("img",{ref:L,src:Q.url,alt:Q.name,onLoad:ke,style:at},`${n}-${Q.url}`)}),_&&Ee&&t.length>1&&!me&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...Ee,left:U.left,cursor:"w-resize",pointerEvents:x?"none":"auto"},onClick:Ce=>{if(T.current){T.current=!1;return}Ce.stopPropagation(),ge(-1)}}),r.jsx("div",{style:{...Ee,left:U.left+U.width/2,cursor:"e-resize",pointerEvents:x?"none":"auto"},onClick:Ce=>{if(T.current){T.current=!1;return}Ce.stopPropagation(),ge(1)}})]})]})}function pg(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function mg({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:l,activeEvent:s,layoutId:d,portalId:c}){const{prefix:u}=w.useScopedStyles(),{type:p="a",gridLayout:b,textBoxWidth:S=100,verticalGap:L,entriesCount:h,lightbox:g,imageDisplay:y,imageCorners:E,lightboxImageDisplay:R,slider:T,sliderTiming:Y,direction:k,transition:B,titleMarginTop:P,subtitleMarginTop:C,titleColor:z,subtitleColor:v,lightboxCounterColor:W,titleFontFamily:I,titleFontSettings:Z,titleFontSize:A,titleLineHeight:K,titleLetterSpacing:V,titleWordSpacing:G,titleTextAppearance:ne,subtitleFontFamily:$,subtitleFontSettings:M,subtitleFontSize:H,subtitleLineHeight:ee,subtitleLetterSpacing:ie,subtitleWordSpacing:F,subtitleTextAppearance:pe,lightboxCounterFontFamily:x,lightboxCounterFontSettings:re,lightboxCounterFontSize:J,lightboxCounterLineHeight:fe,lightboxCounterLetterSpacing:Re,lightboxCounterWordSpacing:de,lightboxCounterTextAppearance:se,showText:q="always",alignEntries:Q="off",align:me="top"}=e,Ne={fontSettings:{fontFamily:I,fontWeight:(Z==null?void 0:Z.fontWeight)??400,fontStyle:(Z==null?void 0:Z.fontStyle)??"normal"},fontSize:A??.01,lineHeight:K,letterSpacing:V??0,wordSpacing:G??0,textAppearance:ne,color:z},ke={...on(Vt(Ne,n))},ue={fontSettings:{fontFamily:$,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:H??.01,lineHeight:ee,letterSpacing:ie??0,wordSpacing:F??0,textAppearance:pe,color:v},Se={...on(Vt(ue,n))},D={fontSettings:{fontFamily:x,fontWeight:(re==null?void 0:re.fontWeight)??400,fontStyle:(re==null?void 0:re.fontStyle)??"normal"},fontSize:J??.01,lineHeight:fe,letterSpacing:Re??0,wordSpacing:de??0,textAppearance:se,color:W},ge={...on(Vt(D,n)),...Gr(J,fe,u,n)},xe=Vr(A,K,`${u}-item-title`,`${u}-text-tight-leading`),Le=Vr(H,ee,`${u}-item-subtitle`,`${u}-text-tight-leading`),be=Gr(A,K,u,n),_=Gr(H,ee,u,n),ce=Vr(J,fe,`${u}-lightbox-counter`,`${u}-text-tight-leading`),te=w.buildColorVars(u,{titleColor:z,subtitleColor:v,lightboxCounterColor:W},gg,hg),Ie=`${s&&s!=="default"?`${u}-state-${s}`:""}${q==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),le=h===0?1/0:h,j=(t??[]).slice(0,le),ze=a.useMemo(()=>g==="on"?ag(j):[],[j,g]),Ae=b.entryWidth??.2,ot=(y==null?void 0:y.display)==="cover",tt=(y==null?void 0:y.ratioValue)??"1:1",at=(y==null?void 0:y.reversed)??!1,[yt,Ve]=tt.split(":").map(Number),De=`${at?Ve:yt} / ${at?yt:Ve}`,Ee=b.columnsCount,Ce=w.scalingValue(Ae??0,n),We=Ce,je=!ot&&T!=="off",nt=j.length%Ee||Ee,pt=nt<Ee&&j.length>0,Qe=j.length-nt,St=pt?Math.floor((Ee-nt)/2)+1:1,ct=E?w.scalingValue(E,n):void 0,Ue={width:We,...ot?{aspectRatio:De,height:"auto",overflow:"hidden"}:{height:"auto"},...ct?{borderRadius:ct,overflow:"hidden"}:{}},Ke=`${u}-item-image-wrapper${je?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),Oe=p==="d"||p==="e"||p==="f",ft=Q==="on",mt=`calc(${w.scalingValue(Ae??0,n)} * (${S} / 100))`,gt=w.scalingValue(Ae*S/100,n),At=ot?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...ct?{borderRadius:ct}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...ct?{borderRadius:ct}:{}},[Zt,tn]=a.useState(0),$t=a.useRef(null),Tt=B==="fade"||k==="horizontal"?"ltr":k==="vertical"?"ttb":"ltr";a.useEffect(()=>{const Ze=$t.current;if(!Ze)return;const Je=new ResizeObserver(lt=>{tn(Math.round(lt[0].contentRect.width))});return Je.observe(Ze),()=>Je.disconnect()},[]);const Ht=(()=>{const Ze={...te},Je=$t.current?getComputedStyle($t.current).getPropertyValue("--cntrl-article-width").trim():"";return Je&&(Ze["--cntrl-article-width"]=Je),Ze})(),[Wt,Te]=a.useState(!1),[Ge,Xe]=a.useState([]),[dt,Pt]=a.useState(0),ht=g==="on"&&(!n||i),it=(Ze,Je)=>{n&&!i||g!=="off"&&(Xe(Ze),Pt(Je),Te(!0))};a.useEffect(()=>{if(!Wt||g!=="on"||typeof document>"u")return;const Ze=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ze}},[Wt,g]),a.useEffect(()=>{!n||i||Te(!1)},[n,i]);const Kt=a.useMemo(()=>Ym(u),[u]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Kt}}),g==="on"&&r.jsx(lg,{mediaList:ze}),r.jsx("div",{style:te,children:r.jsx("div",{ref:$t,className:`${u}-wrapper ${u}-type-${p}${ft?` ${u}-align-entries`:""} ${u}-image-align-${me} ${Ie}`.trim(),style:{gridTemplateColumns:`repeat(${Ee}, ${Ce})`,rowGap:ft?0:w.scalingValue(L??0,n),columnGap:w.scalingValue(b.horizontalGap??0,n),width:w.scalingValue(b.wrapperWidth??0,n),...ft?{[`--${u}-align-entries-row-gap`]:w.scalingValue(L??0,n)}:{}},children:j.map((Ze,Je)=>{var Bt;const lt=El(Ze.title),Mt=El(Ze.subtitle),Et=(((Bt=Ze.link)==null?void 0:Bt.length)??0)>0&&g==="off"?Ze.link:void 0,bt=Math.floor(Je/Ee)===Math.ceil(j.length/Ee)-1,_t=pt&&Je>=Qe?`${St+(Je-Qe)}`:void 0,zt=Oe?r.jsxs("div",{className:`${u}-item-text-block`,children:[lt&&r.jsx("p",{className:xe,style:{width:mt,...ke,...be},children:Ze.title}),lt&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:w.scalingValue(P??0,n),width:gt}}),Mt&&r.jsx("p",{className:Le,style:{width:mt,...Se,..._},children:Ze.subtitle}),Mt&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:w.scalingValue(C??0,n),width:gt}})]}):null,Dt=ft?r.jsxs("div",{className:`${u}-item-title-row`,children:[!Oe&&r.jsx("div",{"data-controls":o&&lt?"titleMarginTop":void 0,className:o&&lt?`${u}-control`:void 0,style:{height:lt?w.scalingValue(P??0,n):0,width:gt}}),lt&&r.jsx("p",{className:xe,style:{width:mt,...ke,...be},children:Ze.title}),Oe&&lt&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:w.scalingValue(P??0,n),width:gt}})]}):null,qt=ft?r.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!Oe&&r.jsx("div",{"data-controls":o&&Mt?"subtitleMarginTop":void 0,className:o&&Mt?`${u}-control`:void 0,style:{height:Mt?w.scalingValue(C??0,n):0,width:gt}}),Mt&&r.jsx("p",{className:Le,style:{width:mt,...Se,..._},children:Ze.subtitle}),Oe&&Mt&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:w.scalingValue(C??0,n),width:gt}})]}):null,Ct=Et?r.jsxs("a",{href:Et,target:"_blank",className:`${u}-item-text-link`,children:[Dt,qt]}):r.jsxs(r.Fragment,{children:[Dt,qt]}),Ut=pc(Ze.gallery),Xt=Ut.filter(Lt=>Lt.lightboxMedia).map(Lt=>Lt.lightboxMedia),Yt=r.jsx("div",{className:Ke,style:Ue,children:Ut.length===0?null:T==="off"?(()=>{const{displayMedia:Lt,lightboxMedia:f}=Ut[0],ve=f?Xt.findIndex(Fe=>Fe.url===f.url):-1;return r.jsx(Pl,{media:Lt,className:`${u}-item-${gi(Lt)?"video":"image"}`.trim(),style:At,onMediaClick:ht&&ve>=0?()=>it(Xt,ve):void 0})})():r.jsxs(r.Fragment,{children:[je&&r.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ut.map(({displayMedia:Lt})=>gi(Lt)?r.jsx("video",{src:Lt.url,muted:!0,playsInline:!0},`sizer-${Lt.url}`):r.jsx("img",{src:Lt.url,alt:""},`sizer-${Lt.url}`))}),r.jsx(qa,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:Y*1e3,width:"100%",height:"100%",speed:eg,type:B==="fade"?"fade":"loop",rewind:B==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:Tt},onMoved:Lt=>{k!=="random"||B==="fade"||Qm(Lt)},children:Ut.map(({displayMedia:Lt,lightboxMedia:f},ve)=>{const Fe=f?Xt.findIndex(_e=>_e.url===f.url):-1;return r.jsx(Ua,{children:r.jsx(Pl,{media:Lt,className:`${u}-item-${gi(Lt)?"video":"image"}`.trim(),style:At,onMediaClick:ht&&Fe>=0?()=>it(Xt,Fe):void 0})},ve)})},`${B}-${Ae}-${k}-${Y}-${Zt}-${d}`)]})}),Jt=Oe?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&lt?"titleMarginTop":void 0,className:o&&lt?`${u}-control`:void 0,style:{height:lt?w.scalingValue(P??0,n):0,width:gt}}),r.jsx("p",{className:xe,style:{width:mt,...ke,...be},children:Ze.title}),r.jsx("div",{"data-controls":o&&Mt?"subtitleMarginTop":void 0,className:o&&Mt?`${u}-control`:void 0,style:{height:Mt?w.scalingValue(C??0,n):0,width:gt}}),r.jsx("p",{className:Le,style:{width:mt,...Se,..._},children:Ze.subtitle})]});return r.jsx("div",{className:`${u}-item`.trim(),style:_t&&!ft?{gridColumn:_t}:void 0,children:r.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${ft&&bt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(S??0)>100?`calc(${Ce} * (${S} / 100))`:Ce,..._t&&ft?{gridColumn:_t}:{}},children:ft?r.jsx(r.Fragment,{children:Oe?r.jsxs(r.Fragment,{children:[Ct,r.jsx("a",{href:Et,target:"_blank",className:`${u}-item-image-link`,children:Yt})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:Et,target:"_blank",className:`${u}-item-image-link`,children:Yt}),Ct]})}):Et?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:Et,target:"_blank",className:`${u}-item-image-link`,children:[zt,Yt]}),!Oe&&r.jsx("a",{href:Et,target:"_blank",className:`${u}-item-text-link`,children:Jt})]}):r.jsxs(r.Fragment,{children:[zt,Yt,Jt]})})},Je)})})}),(!n||i)&&Wt&&typeof document<"u"&&g==="on"&&(()=>{const Ze=(c?document.getElementById(c):null)??document.body;return Yn.createPortal(r.jsx("div",{style:Ht,"data-selection":"none",children:r.jsx(ug,{prefix:u,items:Ge,index:dt,imageDisplay:pg(R),isEditor:n,onClose:()=>Te(!1),onPrev:()=>Pt(Je=>(Je-1+Ge.length)%Ge.length),onNext:()=>Pt(Je=>(Je+1)%Ge.length),counterClassName:ce,counterStyle:ge})}),Ze)})()]})}const gg={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},hg=["hover","focus","filled","success","error"],fg=`import { Splide, SplideSlide } from '@splidejs/react-splide';
4162
+ `}function pg(){return Math.random()<.5?"ltr":"ttb"}function mg(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function gg(e){const t=pg();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{mg(e)})})}const vn=500,hg=750,Nn="cubic-bezier(0.22, 1, 0.36, 1)",fg=72,yg=50;function vg(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 bg(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function xg(e){const[t]=e.media;return t!=null&&t.url?t:null}function bc(e){return!Array.isArray(e)||e.length===0?[]:vg(e)?e.flatMap(t=>{const n=bg(t);if(!n)return[];const i=xg(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 gi(e){return e.type==="video"}function wg(e){const t=new Set,n=[];for(const i of e){const o=bc(i.gallery);for(const s of o){const l=s.lightboxMedia;l!=null&&l.url&&!t.has(l.url)&&(t.add(l.url),n.push(l))}}return n}function Sg({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=>gi(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 $g(e){e.pause(),e.removeAttribute("src"),e.load()}function Ws({media:e,className:t,style:n,onMediaClick:i}){return gi(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 _s(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Cg(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const s=e.width/n;return{width:e.width,height:s,left:e.left,top:e.top+(e.height-s)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function Tg({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:l}){return a.useEffect(()=>{const d=n.current;if(d)return()=>{$g(d)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:l,style:i})}function Lg({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:s,onPrev:l,onNext:d,counterClassName:c,counterStyle:u}){const p=i==="cover",v=a.useRef(null),x=a.useRef(null),I=a.useRef(null),h=a.useRef(null),g=a.useRef(0),y=a.useRef(0),E=a.useRef("none"),L=a.useRef(!1),C=a.useRef(!1),K=a.useRef(null),A=a.useRef(0),B=a.useRef(null),P=a.useRef(!1),T=a.useRef(null),z=a.useRef(null),w=a.useRef(null),W=a.useRef(()=>{}),[R,J]=a.useState(null),[F,U]=a.useState(null),[V,G]=a.useState("opening"),[oe,$]=a.useState(0),[M,N]=a.useState(0),[Q,te]=a.useState(null),[k,le]=a.useState(!1),[f,ne]=a.useState(!1),[Z,fe]=a.useState(!1),[Ie,ue]=a.useState(null),se=a.useRef(n),q=a.useRef(void 0),ee=t[n],ce=ee?gi(ee):!1,ke=M!==0||k,$e=Q!==null,Pe=a.useCallback(Ce=>{const _e=Ce.currentTarget,De=_e instanceof HTMLVideoElement?{width:_e.videoWidth,height:_e.videoHeight}:{width:_e.naturalWidth,height:_e.naturalHeight};!De.width||!De.height||ue(De)},[]);a.useEffect(()=>{K.current=F},[F]),a.useEffect(()=>{const Ce=v.current;if(!Ce)return;const _e=()=>U(_s(Ce));_e();const De=new ResizeObserver(_e);return De.observe(Ce),()=>De.disconnect()},[]);const pe=a.useCallback(()=>{T.current!==null&&(window.clearTimeout(T.current),T.current=null)},[]),he=a.useCallback(()=>{const Ce=z.current;z.current=null,pe(),B.current=null,P.current=!1,te(null),le(!1),N(0),A.current=0,ne(!1),L.current=!1,y.current=0,E.current="none",Ce===1?d():Ce===-1&&l()},[pe,d,l]),be=a.useCallback(()=>{pe(),z.current=null,B.current=null,P.current=!1,te(null),le(!1),N(0),A.current=0},[pe]),j=a.useCallback(()=>{pe(),T.current=window.setTimeout(()=>{z.current!==null&&he()},vn+32)},[pe,he]),re=a.useCallback((Ce,_e)=>{var nt;const De=((nt=K.current)==null?void 0:nt.width)??0;if(pe(),B.current=Ce,te(Ce),P.current=!0,le(!0),_e){z.current=Ce;const pt=-Ce*De;A.current=pt,N(pt),j();return}A.current=0,N(0),T.current=window.setTimeout(()=>{T.current=null,be()},vn+32)},[pe,be,j]),ge=a.useCallback(Ce=>{if(!(t.length<=1)){if(P.current){if(z.current===Ce){w.current=Ce,he();return}be()}pe(),B.current=Ce,te(Ce),P.current=!1,le(!1),A.current=0,N(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{re(Ce,!0)})})}},[t.length,re,he,be,pe]);W.current=ge;const xe=a.useCallback(Ce=>{Ce.propertyName!=="transform"||!P.current||z.current!==null&&he()},[he]),Le=a.useCallback(()=>{const Ce=x.current;if(!Ce)return;const _e=_s(Ce);!_e.width||!_e.height||J(_e)},[]);a.useEffect(()=>{Le();const Ce=x.current;if(!Ce)return;const _e=new ResizeObserver(()=>Le());return _e.observe(Ce),()=>_e.disconnect()},[Le]),a.useEffect(()=>{V==="opening"&&R&&G("open")},[V,R]),a.useEffect(()=>{if(V!=="closing")return;const Ce=setTimeout(()=>s(),vn);return()=>clearTimeout(Ce)},[V,s]),a.useEffect(()=>()=>{pe()},[pe]),a.useLayoutEffect(()=>{se.current===n&&q.current===(ee==null?void 0:ee.url)||(pe(),z.current=null,te(null),$(0),N(0),le(!1),fe(!1),ne(!1),ue(null),g.current=0,y.current=0,E.current="none",L.current=!1,P.current=!1,A.current=0,B.current=null,h.current=null,C.current=!1,se.current=n,q.current=ee==null?void 0:ee.url)},[n,ee==null?void 0:ee.url,pe]),a.useLayoutEffect(()=>{const Ce=w.current;Ce!==null&&(w.current=null,requestAnimationFrame(()=>{W.current(Ce)}))},[n,ee==null?void 0:ee.url]),a.useEffect(()=>{if(V!=="open")return;let Ce=null;const _e=()=>{Ce&&(document.removeEventListener("click",Ce,!0),Ce=null)},De=()=>{_e(),Ce=ct=>{ct.stopPropagation(),ct.preventDefault(),_e()},document.addEventListener("click",Ce,!0)},nt=ct=>{const Ue=ct<0?1:-1;if(Math.abs(ct)>yg&&t.length>1){re(Ue,!0);return}re(Ue,!1)},pt=ct=>{if(ct.touches.length!==1||P.current)return;const Ue=ct.touches[0];C.current=!0,h.current={x:Ue.clientX,y:Ue.clientY},E.current="none",y.current=0,L.current=!1},Qe=ct=>{if(!h.current||ct.touches.length!==1||P.current)return;const Ue=ct.touches[0],Ke=Ue.clientX-h.current.x,Oe=Ue.clientY-h.current.y;if(E.current==="none"){if(Math.abs(Ke)<10&&Math.abs(Oe)<10)return;if(Math.abs(Ke)>Math.abs(Oe)){if(t.length<=1)return;E.current="horizontal"}else if(Oe>0)E.current="vertical";else return}if(E.current==="horizontal"){L.current=!0,ne(!0),y.current=Ke;const ft=Ke<0?1:-1;B.current!==ft&&(B.current=ft,te(ft)),A.current=Ke,N(Ke),ct.preventDefault();return}E.current==="vertical"&&(L.current=!0,ne(!0),g.current=Oe,$(Oe),ct.preventDefault())},St=()=>{if(!h.current)return;const ct=E.current,Ue=L.current;if(Ue&&ct==="horizontal")nt(y.current),De();else if(Ue&&ct==="vertical")if(g.current>fg){const Oe=window.innerHeight;g.current=Oe,fe(!0),$(Oe),G("closing")}else g.current=0,$(0),De();else ct==="horizontal"&&Math.abs(y.current)>0&&(nt(y.current),De());h.current=null,E.current="none",y.current=0,L.current=!1,ne(!1)};return document.addEventListener("touchstart",pt,{passive:!0}),document.addEventListener("touchmove",Qe,{passive:!1}),document.addEventListener("touchend",St),document.addEventListener("touchcancel",St),()=>{document.removeEventListener("touchstart",pt),document.removeEventListener("touchmove",Qe),document.removeEventListener("touchend",St),document.removeEventListener("touchcancel",St),_e()}},[V,t.length,re]),a.useEffect(()=>{const Ce=_e=>{_e.key==="Escape"&&(_e.preventDefault(),_e.stopPropagation(),V!=="closing"&&G("closing"))};return window.addEventListener("keydown",Ce,!0),()=>window.removeEventListener("keydown",Ce,!0)},[V]);const we=()=>{V!=="closing"&&G("closing")},_=V==="open",me=V==="closing",ie=oe>0?Math.max(0,1-oe/500):1,H=oe>0?Math.max(.35,1-oe/500):1,X=R?p?R:Cg(R,Ie):null,Re=Ce=>{if(Ce.stopPropagation(),C.current){C.current=!1;return}if(t.length<=1)return;const _e=X??Ce.currentTarget.getBoundingClientRect(),De=Ce.clientY-_e.top,nt=Math.min(52,_e.height*.2);if(!(De>_e.height-nt)){if(Ce.clientX-_e.left<_e.width/2){ge(-1);return}ge(1)}},de=Ce=>{if(t.length<=1)return;const _e=X??Ce.currentTarget.getBoundingClientRect(),De=Ce.clientX-_e.left,nt=Ce.clientY-_e.top,pt=Math.min(52,_e.height*.2);if(nt>_e.height-pt){Ce.currentTarget.style.cursor="default";return}Ce.currentTarget.style.cursor=De<_e.width/2?"w-resize":"e-resize"},D={position:"fixed",top:F==null?void 0:F.top,left:F==null?void 0:F.left,width:F==null?void 0:F.width,height:F==null?void 0:F.height,zIndex:9998},ze=p?"cover":"contain",Fe=M!==0||oe>0?`translate(${M}px, ${oe}px)`:void 0,ot=f&&!k?"none":k?`transform ${vn}ms ${Nn}`:Z?`transform ${vn}ms ${Nn}, opacity ${vn}ms ${Nn}`:V==="opening"||me?`opacity ${vn}ms ${Nn}`:"none",tt={...D,transform:Fe,opacity:oe>0?H:V==="opening"||me?0:1,transition:ot,pointerEvents:"none"},at={position:"absolute",top:((X==null?void 0:X.top)??0)-((F==null?void 0:F.top)??0),left:((X==null?void 0:X.left)??0)-((F==null?void 0:F.left)??0),width:X==null?void 0:X.width,height:X==null?void 0:X.height,objectFit:ze,pointerEvents:ce&&_&&!ke?"auto":"none",touchAction:ce&&_?"none":void 0},yt=(F==null?void 0:F.width)??0,Ve=$e?(n+Q+t.length)%t.length:null,ye=Ve!==null?t[Ve]:null,Me={...D,transform:$e?`translateX(${Q*yt+M}px)`:void 0,opacity:1,transition:k?`transform ${vn}ms ${Nn}`:"none",pointerEvents:"none"},je={position:"absolute",top:((R==null?void 0:R.top)??0)-((F==null?void 0:F.top)??0),left:((R==null?void 0:R.left)??0)-((F==null?void 0:F.left)??0),width:R==null?void 0:R.width,height:R==null?void 0:R.height,objectFit:ze,pointerEvents:"none"},Ee=X?{position:"fixed",top:X.top,height:X.height,width:X.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:v,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:V==="open"?"none":void 0},onClick:we,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:_?ie:0,transition:f?"none":`opacity ${vn}ms ${Nn}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:x,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:_?1:0,transition:`opacity ${vn}ms ${Nn}`,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:x,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:_?1:0,transition:`opacity ${vn}ms ${Nn}`},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),R&&F&&ye&&r.jsx("div",{style:Me,onTransitionEnd:xe,children:gi(ye)?r.jsx("video",{src:ye.url,muted:!0,playsInline:!0,preload:"auto",style:je},`neighbor-${Ve}-${ye.url}`):r.jsx("img",{src:ye.url,alt:ye.name,style:je},`neighbor-${Ve}-${ye.url}`)}),R&&F&&ee&&r.jsx("div",{style:tt,onTransitionEnd:xe,children:ce?r.jsx(Tg,{src:ee.url,phase:V,mediaRef:I,mediaStyle:at,onLoadedMetadata:Pe,onClick:Re,onMouseMove:de},`${n}-${ee.url}`):r.jsx("img",{ref:I,src:ee.url,alt:ee.name,onLoad:Pe,style:at},`${n}-${ee.url}`)}),_&&Ee&&t.length>1&&!ce&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...Ee,left:X.left,cursor:"w-resize",pointerEvents:f?"none":"auto"},onClick:Ce=>{if(C.current){C.current=!1;return}Ce.stopPropagation(),ge(-1)}}),r.jsx("div",{style:{...Ee,left:X.left+X.width/2,cursor:"e-resize",pointerEvents:f?"none":"auto"},onClick:Ce=>{if(C.current){C.current=!1;return}Ce.stopPropagation(),ge(1)}})]})]})}function Ig(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Rg({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=S.useScopedStyles(),{type:p="a",gridLayout:v,textBoxWidth:x=100,verticalGap:I,entriesCount:h,lightbox:g,imageDisplay:y,imageCorners:E,lightboxImageDisplay:L,slider:C,sliderTiming:K,direction:A,transition:B,titleMarginTop:P,subtitleMarginTop:T,titleColor:z,subtitleColor:w,lightboxCounterColor:W,titleFontFamily:R,titleFontSettings:J,titleFontSize:F,titleLineHeight:U,titleLetterSpacing:V,titleWordSpacing:G,titleTextAppearance:oe,subtitleFontFamily:$,subtitleFontSettings:M,subtitleFontSize:N,subtitleLineHeight:Q,subtitleLetterSpacing:te,subtitleWordSpacing:k,subtitleTextAppearance:le,lightboxCounterFontFamily:f,lightboxCounterFontSettings:ne,lightboxCounterFontSize:Z,lightboxCounterLineHeight:fe,lightboxCounterLetterSpacing:Ie,lightboxCounterWordSpacing:ue,lightboxCounterTextAppearance:se,showText:q="always",alignEntries:ee="off",align:ce="top"}=e,ke={fontSettings:{fontFamily:R,fontWeight:(J==null?void 0:J.fontWeight)??400,fontStyle:(J==null?void 0:J.fontStyle)??"normal"},fontSize:F??.01,lineHeight:U,letterSpacing:V??0,wordSpacing:G??0,textAppearance:oe,color:z},Pe={...on(Vt(ke,n))},pe={fontSettings:{fontFamily:$,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:N??.01,lineHeight:Q,letterSpacing:te??0,wordSpacing:k??0,textAppearance:le,color:w},be={...on(Vt(pe,n))},j={fontSettings:{fontFamily:f,fontWeight:(ne==null?void 0:ne.fontWeight)??400,fontStyle:(ne==null?void 0:ne.fontStyle)??"normal"},fontSize:Z??.01,lineHeight:fe,letterSpacing:Ie??0,wordSpacing:ue??0,textAppearance:se,color:W},ge={...on(Vt(j,n)),...qr(Z,fe,u,n)},xe=Gr(F,U,`${u}-item-title`,`${u}-text-tight-leading`),Le=Gr(N,Q,`${u}-item-subtitle`,`${u}-text-tight-leading`),we=qr(F,U,u,n),_=qr(N,Q,u,n),me=Gr(Z,fe,`${u}-lightbox-counter`,`${u}-text-tight-leading`),ie=S.buildColorVars(u,{titleColor:z,subtitleColor:w,lightboxCounterColor:W},Mg,Eg),Re=`${l&&l!=="default"?`${u}-state-${l}`:""}${q==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),de=h===0?1/0:h,D=(t??[]).slice(0,de),ze=a.useMemo(()=>g==="on"?wg(D):[],[D,g]),Fe=v.entryWidth??.2,ot=(y==null?void 0:y.display)==="cover",tt=(y==null?void 0:y.ratioValue)??"1:1",at=(y==null?void 0:y.reversed)??!1,[yt,Ve]=tt.split(":").map(Number),je=`${at?Ve:yt} / ${at?yt:Ve}`,Ee=v.columnsCount,Ce=S.scalingValue(Fe??0,n),_e=Ce,De=!ot&&C!=="off",nt=D.length%Ee||Ee,pt=nt<Ee&&D.length>0,Qe=D.length-nt,St=pt?Math.floor((Ee-nt)/2)+1:1,ct=E?S.scalingValue(E,n):void 0,Ue={width:_e,...ot?{aspectRatio:je,height:"auto",overflow:"hidden"}:{height:"auto"},...ct?{borderRadius:ct,overflow:"hidden"}:{}},Ke=`${u}-item-image-wrapper${De?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),Oe=p==="d"||p==="e"||p==="f",ft=ee==="on",mt=`calc(${S.scalingValue(Fe??0,n)} * (${x} / 100))`,gt=S.scalingValue(Fe*x/100,n),At=ot?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...ct?{borderRadius:ct}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...ct?{borderRadius:ct}:{}},[Zt,tn]=a.useState(0),$t=a.useRef(null),Tt=B==="fade"||A==="horizontal"?"ltr":A==="vertical"?"ttb":"ltr";a.useEffect(()=>{const Ze=$t.current;if(!Ze)return;const Je=new ResizeObserver(st=>{tn(Math.round(st[0].contentRect.width))});return Je.observe(Ze),()=>Je.disconnect()},[]);const Ht=(()=>{const Ze={...ie},Je=$t.current?getComputedStyle($t.current).getPropertyValue("--cntrl-article-width").trim():"";return Je&&(Ze["--cntrl-article-width"]=Je),Ze})(),[Wt,Te]=a.useState(!1),[Ge,Xe]=a.useState([]),[dt,Pt]=a.useState(0),ht=g==="on"&&(!n||i),it=(Ze,Je)=>{n&&!i||g!=="off"&&(Xe(Ze),Pt(Je),Te(!0))};a.useEffect(()=>{if(!Wt||g!=="on"||typeof document>"u")return;const Ze=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ze}},[Wt,g]),a.useEffect(()=>{!n||i||Te(!1)},[n,i]);const Kt=a.useMemo(()=>ug(u),[u]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Kt}}),g==="on"&&r.jsx(Sg,{mediaList:ze}),r.jsx("div",{style:ie,children:r.jsx("div",{ref:$t,className:`${u}-wrapper ${u}-type-${p}${ft?` ${u}-align-entries`:""} ${u}-image-align-${ce} ${Re}`.trim(),style:{gridTemplateColumns:`repeat(${Ee}, ${Ce})`,rowGap:ft?0:S.scalingValue(I??0,n),columnGap:S.scalingValue(v.horizontalGap??0,n),width:S.scalingValue(v.wrapperWidth??0,n),...ft?{[`--${u}-align-entries-row-gap`]:S.scalingValue(I??0,n)}:{}},children:D.map((Ze,Je)=>{var Bt;const st=Fs(Ze.title),Mt=Fs(Ze.subtitle),Et=(((Bt=Ze.link)==null?void 0:Bt.length)??0)>0&&g==="off"?Ze.link:void 0,xt=Math.floor(Je/Ee)===Math.ceil(D.length/Ee)-1,_t=pt&&Je>=Qe?`${St+(Je-Qe)}`:void 0,zt=Oe?r.jsxs("div",{className:`${u}-item-text-block`,children:[st&&r.jsx("p",{className:xe,style:{width:mt,...Pe,...we},children:Ze.title}),st&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:S.scalingValue(P??0,n),width:gt}}),Mt&&r.jsx("p",{className:Le,style:{width:mt,...be,..._},children:Ze.subtitle}),Mt&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:S.scalingValue(T??0,n),width:gt}})]}):null,jt=ft?r.jsxs("div",{className:`${u}-item-title-row`,children:[!Oe&&r.jsx("div",{"data-controls":o&&st?"titleMarginTop":void 0,className:o&&st?`${u}-control`:void 0,style:{height:st?S.scalingValue(P??0,n):0,width:gt}}),st&&r.jsx("p",{className:xe,style:{width:mt,...Pe,...we},children:Ze.title}),Oe&&st&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:S.scalingValue(P??0,n),width:gt}})]}):null,qt=ft?r.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!Oe&&r.jsx("div",{"data-controls":o&&Mt?"subtitleMarginTop":void 0,className:o&&Mt?`${u}-control`:void 0,style:{height:Mt?S.scalingValue(T??0,n):0,width:gt}}),Mt&&r.jsx("p",{className:Le,style:{width:mt,...be,..._},children:Ze.subtitle}),Oe&&Mt&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:S.scalingValue(T??0,n),width:gt}})]}):null,Ct=Et?r.jsxs("a",{href:Et,target:"_blank",className:`${u}-item-text-link`,children:[jt,qt]}):r.jsxs(r.Fragment,{children:[jt,qt]}),Ut=bc(Ze.gallery),Xt=Ut.filter(Lt=>Lt.lightboxMedia).map(Lt=>Lt.lightboxMedia),Yt=r.jsx("div",{className:Ke,style:Ue,children:Ut.length===0?null:C==="off"?(()=>{const{displayMedia:Lt,lightboxMedia:b}=Ut[0],ve=b?Xt.findIndex(We=>We.url===b.url):-1;return r.jsx(Ws,{media:Lt,className:`${u}-item-${gi(Lt)?"video":"image"}`.trim(),style:At,onMediaClick:ht&&ve>=0?()=>it(Xt,ve):void 0})})():r.jsxs(r.Fragment,{children:[De&&r.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ut.map(({displayMedia:Lt})=>gi(Lt)?r.jsx("video",{src:Lt.url,muted:!0,playsInline:!0},`sizer-${Lt.url}`):r.jsx("img",{src:Lt.url,alt:""},`sizer-${Lt.url}`))}),r.jsx(Xa,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:K*1e3,width:"100%",height:"100%",speed:hg,type:B==="fade"?"fade":"loop",rewind:B==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:Tt},onMoved:Lt=>{A!=="random"||B==="fade"||gg(Lt)},children:Ut.map(({displayMedia:Lt,lightboxMedia:b},ve)=>{const We=b?Xt.findIndex(Ne=>Ne.url===b.url):-1;return r.jsx(Ya,{children:r.jsx(Ws,{media:Lt,className:`${u}-item-${gi(Lt)?"video":"image"}`.trim(),style:At,onMediaClick:ht&&We>=0?()=>it(Xt,We):void 0})},ve)})},`${B}-${Fe}-${A}-${K}-${Zt}-${d}`)]})}),Jt=Oe?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&st?"titleMarginTop":void 0,className:o&&st?`${u}-control`:void 0,style:{height:st?S.scalingValue(P??0,n):0,width:gt}}),r.jsx("p",{className:xe,style:{width:mt,...Pe,...we},children:Ze.title}),r.jsx("div",{"data-controls":o&&Mt?"subtitleMarginTop":void 0,className:o&&Mt?`${u}-control`:void 0,style:{height:Mt?S.scalingValue(T??0,n):0,width:gt}}),r.jsx("p",{className:Le,style:{width:mt,...be,..._},children:Ze.subtitle})]});return r.jsx("div",{className:`${u}-item`.trim(),style:_t&&!ft?{gridColumn:_t}:void 0,children:r.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${ft&&xt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(x??0)>100?`calc(${Ce} * (${x} / 100))`:Ce,..._t&&ft?{gridColumn:_t}:{}},children:ft?r.jsx(r.Fragment,{children:Oe?r.jsxs(r.Fragment,{children:[Ct,r.jsx("a",{href:Et,target:"_blank",className:`${u}-item-image-link`,children:Yt})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:Et,target:"_blank",className:`${u}-item-image-link`,children:Yt}),Ct]})}):Et?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:Et,target:"_blank",className:`${u}-item-image-link`,children:[zt,Yt]}),!Oe&&r.jsx("a",{href:Et,target:"_blank",className:`${u}-item-text-link`,children:Jt})]}):r.jsxs(r.Fragment,{children:[zt,Yt,Jt]})})},Je)})})}),(!n||i)&&Wt&&typeof document<"u"&&g==="on"&&(()=>{const Ze=(c?document.getElementById(c):null)??document.body;return Yn.createPortal(r.jsx("div",{style:Ht,"data-selection":"none",children:r.jsx(Lg,{prefix:u,items:Ge,index:dt,imageDisplay:Ig(L),isEditor:n,onClose:()=>Te(!1),onPrev:()=>Pt(Je=>(Je-1+Ge.length)%Ge.length),onNext:()=>Pt(Je=>(Je+1)%Ge.length),counterClassName:me,counterStyle:ge})}),Ze)})()]})}const Mg={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Eg=["hover","focus","filled","success","error"],Pg=`import { Splide, SplideSlide } from '@splidejs/react-splide';
4163
4163
  import '@splidejs/react-splide/css/core';
4164
4164
  import { CommonComponentProps } from '../props';
4165
4165
  import {
@@ -6212,12 +6212,12 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
6212
6212
  };
6213
6213
 
6214
6214
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
6215
- `,qr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},yg=["titleColor","subtitleColor","lightboxCounterColor"],vg={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"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},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:{...qr.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:{...qr.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:{...qr.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,imageCorners:0,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,imageCorners:0,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,imageCorners:0,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","imageCorners","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","imageCorners"]},{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:[...yg],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},xg={element:mg,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:vg,sourceCode:fg},bg=50,Al=10,Ka="cntrl-lightbox-journal",Ir=Ka,ba=`${Ka}-`,Mr=e=>`${Ka}-${e}`,Xa=e=>e===Ir||e.startsWith(ba),Fl=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Wl=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Fl(t.get(Mr(e)));if(i)return i}const n=Fl(t.get(Ir));if(n)return n;for(const[i]of t){if(!i.startsWith(ba))continue;const o=i.slice(ba.length);if(!/^\d+$/.test(o))continue;const l=Number.parseInt(o,10);if(Number.isFinite(l)&&l>=1)return l}return null},_l=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},mc=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(s=>{Xa(s)&&i.searchParams.delete(s)}),t?i.searchParams.set(Mr(t),String(e)):i.searchParams.set(Ir,String(e));const o=n?"replaceState":"pushState",l=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",l)},wg=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Mr(e)||i===Ir:Xa(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)}},gc=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Mr(e)):[...t.keys()].some(n=>Xa(n))},Sg=(e,t)=>{if(gc(t)){if(e){window.history.back();return}wg(t)}},$g=20,Cg=2,Ur=e=>`max(${e}, ${$g}px)`,Hi=e=>((e==null?void 0:e.image)??[]).slice(0,Cg),hc=e=>e.reduce((t,n)=>t+Hi(n).length,0),Tg=(e,t)=>{const n=e.slice(0,t).reduce((o,l)=>o+Hi(l).length,1),i=Hi(e[t]).length;return{start:n,end:n+i-1}},Lg=(e,t)=>{const n=hc(e),{start:i,end:o}=Tg(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},ir=(e,t)=>t==="B"?e.flatMap((n,i)=>Hi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Hi(n)})),Rg=(e,t,n,i)=>{var l;if(n==="B")return`${t+1} / ${e.length}`;const o=((l=e[t])==null?void 0:l.entryIndex)??0;return Lg(i,o)},Nl=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Ig=(e,t,n)=>e==="B"?t.length>1:hc(n)>1,gn=.004,Bn=.004,Ai={title1Width:.13,title2Width:.13,title3Width:.14},Vn=(e,t,n,i,o)=>{const l=[];return t.title1&&l.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&l.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&l.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),l},Oi=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((l,s)=>l+s,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:l,widths:s},d)=>{if(l<=0||d<=0)return{overflow:l,widths:[d,...s]};const c=Math.min(l,d);return{overflow:l-c,widths:[d-c,...s]}},{overflow:i-1,widths:[]});return o},xo=(e,t)=>Oi(e,t),ln=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Gn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Oi(e.length,n),effective:xo(e.length,n)}},fc=(e,t,n,i)=>e.slice(0,i).reduce((o,l,s)=>o+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(t[s]??0),0),yc=(e,t,n,i)=>e.slice(0,i+1).reduce((o,l,s)=>o+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(t[s]??0),0),Kn=["title1","title2","title3","count"],Ye=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Ya={title1:"1",title2:"2",title3:"3",count:"Count"},Za=e=>[Ye(e,"fontFamily"),Ye(e,"fontSettings"),{type:"row",items:[Ye(e,"fontSize"),Ye(e,"lineHeight"),Ye(e,"letterSpacing"),Ye(e,"wordSpacing")]},Ye(e,"textAlign"),Ye(e,"textAppearance")],Mg=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Kn.map(e=>[Ya[e],Za(e)]))}),Eg={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Pg={title1:.02,title2:.02,title3:.02,count:.017},ui=(e,t)=>{const n=i=>{const o=Ye(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[Eg[t]]}},pi=(e,t,n)=>{var o,l;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((l=t.fontSettings)==null?void 0:l.fontStyle)??"normal"},fontSize:t.fontSize??Pg[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Vt(i,n)};function vc({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,onClose:s}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:b=0,title3MarginLeft:S=0,titleRowMarginBottom:L=0,titleHeaderLayout:h="desktop",contentMarginTop:g=0,iconMarginRight:y=0,closeIcon:E=null,closeIconMaxWidth:R=0,closeIconColor:T="#000000",closeIconHoverColor:Y="#cccccc"}=n,k=w.scalingValue(g,i),B=w.scalingValue(y,i),P=w.scalingValue(L,i),C=h==="mobile",z=pi("title1",ui(n,"title1"),i),v=pi("title2",ui(n,"title2"),i),W=pi("title3",ui(n,"title3"),i),I=a.useMemo(()=>({title1Width:d??Ai.title1Width,title2Width:c??Ai.title2Width,title3Width:u??Ai.title3Width}),[d,c,u]),Z=a.useMemo(()=>({title2MarginLeft:b,title3MarginLeft:S}),[b,S]),A=a.useMemo(()=>Vn(e,t,z,v,W),[e,t,z,v,W]),K=a.useMemo(()=>A.map(N=>I[N.widthKey]),[A,I]),V=a.useMemo(()=>Oi(A.length,K),[A.length,K]),G=a.useMemo(()=>xo(A.length,K),[A.length,K]),ne=a.useMemo(()=>A.filter(N=>N.prefix==="title1"),[A]),$=a.useMemo(()=>A.filter(N=>N.prefix==="title2"||N.prefix==="title3"),[A]),M=a.useMemo(()=>Gn(ne,I),[ne,I]),H=a.useMemo(()=>Gn($,I),[$,I]),ee=!!(t.title1||t.title2||t.title3),ie=E!==null;if(!(ee||ie))return null;const pe=(p??0)>0||o,x=(N,U)=>{const Ie=A.findIndex(j=>j.prefix===N.prefix);if(!C||U==="single-row")return{effectiveWidth:G[Ie]??0,resolvedWidth:V[Ie]??0,maxWidth:ln(Ie,V)};if(U==="two-row-top"){const j=ne.findIndex(ze=>ze.prefix===N.prefix);return{effectiveWidth:M.effective[j]??0,resolvedWidth:M.resolved[j]??0,maxWidth:ln(j,M.resolved)}}const le=$.findIndex(j=>j.prefix===N.prefix);return{effectiveWidth:H.effective[le]??0,resolvedWidth:H.resolved[le]??0,maxWidth:ln(le,H.resolved)}},re=(N,U,Ie)=>{if(!C||Ie==="single-row"){const ot=N.findIndex(Ve=>Ve.prefix===U.prefix),tt=N.map(Ve=>I[Ve.widthKey]),at=Oi(N.length,tt);return{effectiveWidth:xo(N.length,tt)[ot]??0,resolvedWidth:at[ot]??0,maxWidth:ln(ot,at)}}if(Ie==="two-row-top"){const ot=N.filter(Ve=>Ve.prefix==="title1"),tt=ot.findIndex(Ve=>Ve.prefix===U.prefix),{resolved:at,effective:yt}=Gn(ot,I);return{effectiveWidth:yt[tt]??0,resolvedWidth:at[tt]??0,maxWidth:ln(tt,at)}}const le=N.filter(ot=>ot.prefix==="title2"||ot.prefix==="title3"),j=le.findIndex(ot=>ot.prefix===U.prefix),{resolved:ze,effective:Ae}=Gn(le,I);return{effectiveWidth:Ae[j]??0,resolvedWidth:ze[j]??0,maxWidth:ln(j,ze)}},J=N=>yc(A,V,Z,N)+(C?0:p??0),fe=()=>C?0:p??0,Re=N=>$.slice(0,N).reduce((U,Ie,le)=>U+(Ie.marginLeftKey?Z[Ie.marginLeftKey]??0:0)+(H.resolved[le]??0),0),de=N=>{const U=$[N];return Re(N)+(U.marginLeftKey?Z[U.marginLeftKey]??0:0)+(H.resolved[N]??0)},se=(N,U,Ie)=>{const le=N.marginLeftKey?Z[N.marginLeftKey]??0:0,{effectiveWidth:j,resolvedWidth:ze,maxWidth:Ae}=Ie??x(N,U),ot=Math.max(le,Bn),tt=o&&U==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":N.prefix,style:{width:w.scalingValue(j,i),...le>0?{marginLeft:w.scalingValue(le,i)}:{}},children:[r.jsx("p",{className:N.className,style:N.style,children:N.text}),tt&&N.marginLeftKey?r.jsx("div",{"data-controls":N.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ze),style:{position:"absolute",top:0,left:w.scalingValue(-le,i),width:w.scalingValue(ot,i),height:"100%",pointerEvents:"auto"}}):null,tt?r.jsx("div",{"data-controls":N.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:w.scalingValue(-gn/2,i),width:w.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}}):null]},N.className)},q=(N="two-row")=>{const U=A.findIndex(j=>j.prefix==="title1"),Ie=U>=0?V[U]:I.title1Width,le=N==="two-row"&&o;return r.jsx("div",{...le?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ie)}:{},style:{width:w.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...le?{pointerEvents:"auto"}:{}}})},Q=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:z,"aria-hidden":"true",children:" "}),me=N=>{const U=Vn(e,N,z,v,W);return r.jsx(r.Fragment,{children:U.map(Ie=>se(Ie,"single-row",re(U,Ie,"single-row")))})},Ne=N=>{const U=Vn(e,N,z,v,W),Ie=U.find(le=>le.prefix==="title1");return Ie?se(Ie,"two-row-top",re(U,Ie,"two-row-top")):null},$e=(N,U=!1)=>{const Ie=Vn(e,N,z,v,W),le=Ie.filter(Ae=>Ae.prefix==="title2"||Ae.prefix==="title3"),j=o&&U;return le.length>0||j||(L??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(Ae=>se(Ae,"two-row-bottom",re(Ie,Ae,"two-row-bottom")))}),U&&o?r.jsxs(r.Fragment,{children:[xe(),Le()]}):null]}):null,(L??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:P,width:"100%",flexShrink:0,pointerEvents:j?"auto":"none"}}):null]}):null},ke=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:w.scalingValue(R??0,i),height:w.scalingValue(R??0,i),marginRight:B,"--close-icon-hover-color":Y},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:N=>{N.stopPropagation(),s==null||s()},"aria-label":"Close",children:r.jsx(rn,{url:E??"",fill:T,hoverFill:i&&!l?T:Y,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"}})]}),ue=()=>ie?r.jsx("div",{className:`${e}-titles-row-header-controls`,children:ke()}):null,he=N=>r.jsx("div",{className:`${e}-titles-row-titles`,children:r.jsx("div",{className:`${e}-titles-stack`,children:N})}),Se=N=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[ie||ee?Q():null,pe?q("two-row"):null,he(N),ue()]}),D=(N,U=!1)=>r.jsxs(r.Fragment,{children:[Se(Ne(N)),$e(N,U)]}),oe=()=>{const N=C?-1:A.findIndex(le=>le.prefix==="title1"),U=!C&&(o||(p??0)>0)?(()=>{const le=p??0,j=N>=0?V[N]:I.title1Width,ze=Math.max(le,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:w.scalingValue(ze,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Ie=A.flatMap((le,j)=>{if(!le.marginLeftKey)return[];const ze=Z[le.marginLeftKey]??0,Ae=fc(A,V,Z,j)+fe(),ot=Math.max(ze,Bn);return r.jsx("div",{"data-controls":le.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(V[j]),style:{position:"absolute",top:0,left:w.scalingValue(Ae,i),width:w.scalingValue(ot,i),height:"100%",pointerEvents:"auto"}},le.marginLeftKey)});return U?[U,...Ie]:Ie},ge=()=>A.map((N,U)=>{const Ie=ln(U,V),j=J(U)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":N.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ie),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:w.scalingValue(j,i),width:w.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}})},`${N.widthKey}-junction`)}),xe=()=>$.flatMap((N,U)=>{if(!N.marginLeftKey)return[];const Ie=Z[N.marginLeftKey]??0,le=Re(U),j=Math.max(Ie,Bn),{resolvedWidth:ze}=x(N,"two-row-bottom");return r.jsx("div",{"data-controls":N.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ze),style:{position:"absolute",top:0,left:w.scalingValue(le,i),width:w.scalingValue(j,i),height:"100%",pointerEvents:"auto"}},N.marginLeftKey)}),Le=()=>$.map((N,U)=>{const{maxWidth:Ie}=x(N,"two-row-bottom"),j=de(U)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":N.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ie),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:w.scalingValue(j,i),width:w.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}})},`${N.widthKey}-junction`)}),be=()=>!o||C?null:r.jsxs(r.Fragment,{children:[oe(),ge()]}),_=!!(t.title2||t.title3||(L??0)>0||o),ce=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[ie||ee?Q():null,pe?q("single-row"):null,ee?he(me(t)):r.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),ue(),be()]}),te=()=>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:D(t,!0)}),be()]});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:k,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...C?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${C?` ${e}-lightbox-content-area-stacked`:""}`,children:r.jsx("div",{className:`${e}-text-bar-cell${C?` ${e}-text-bar-cell-stacked`:""}`,style:C?void 0:{flex:1,minWidth:0,width:"100%"},children:C?te():ce()})})})]})}function kg(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ag(e){return`
6215
+ `,Ur={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},kg=["titleColor","subtitleColor","lightboxCounterColor"],Ag={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"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Ur.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...Ur.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Ur.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"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,imageCorners:0,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,imageCorners:0,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,imageCorners:0,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","imageCorners","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","imageCorners"]},{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:[...kg],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Fg={element:Rg,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:Ag,sourceCode:Pg},Wg=50,Ns=10,Za="cntrl-lightbox-journal",Rr=Za,Sa=`${Za}-`,Mr=e=>`${Za}-${e}`,Ja=e=>e===Rr||e.startsWith(Sa),Hs=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Os=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Hs(t.get(Mr(e)));if(i)return i}const n=Hs(t.get(Rr));if(n)return n;for(const[i]of t){if(!i.startsWith(Sa))continue;const o=i.slice(Sa.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},Ds=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},xc=(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(Mr(t),String(e)):i.searchParams.set(Rr,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},_g=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Mr(e)||i===Rr: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)}},wc=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Mr(e)):[...t.keys()].some(n=>Ja(n))},Ng=(e,t)=>{if(wc(t)){if(e){window.history.back();return}_g(t)}},Hg=20,Og=2,Kr=e=>`max(${e}, ${Hg}px)`,Hi=e=>((e==null?void 0:e.image)??[]).slice(0,Og),Sc=e=>e.reduce((t,n)=>t+Hi(n).length,0),Dg=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+Hi(s).length,1),i=Hi(e[t]).length;return{start:n,end:n+i-1}},jg=(e,t)=>{const n=Sc(e),{start:i,end:o}=Dg(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},ir=(e,t)=>t==="B"?e.flatMap((n,i)=>Hi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Hi(n)})),zg=(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 jg(i,o)},js=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Bg=(e,t,n)=>e==="B"?t.length>1:Sc(n)>1,gn=.004,Bn=.004,Ai={title1Width:.13,title2Width:.13,title3Width:.14},Vn=(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},Oi=(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},bo=(e,t)=>Oi(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)},Gn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Oi(e.length,n),effective:bo(e.length,n)}},$c=(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),Cc=(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"],Ye=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Qa={title1:"1",title2:"2",title3:"3",count:"Count"},es=e=>[Ye(e,"fontFamily"),Ye(e,"fontSettings"),{type:"row",items:[Ye(e,"fontSize"),Ye(e,"lineHeight"),Ye(e,"letterSpacing"),Ye(e,"wordSpacing")]},Ye(e,"textAlign"),Ye(e,"textAppearance")],Vg=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Kn.map(e=>[Qa[e],es(e)]))}),Gg={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},qg={title1:.02,title2:.02,title3:.02,count:.017},ui=(e,t)=>{const n=i=>{const o=Ye(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[Gg[t]]}},pi=(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??qg[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Vt(i,n)};function Tc({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:v=0,title3MarginLeft:x=0,titleRowMarginBottom:I=0,titleHeaderLayout:h="desktop",contentMarginTop:g=0,iconMarginRight:y=0,closeIcon:E=null,closeIconMaxWidth:L=0,closeIconColor:C="#000000",closeIconHoverColor:K="#cccccc"}=n,A=S.scalingValue(g,i),B=S.scalingValue(y,i),P=S.scalingValue(I,i),T=h==="mobile",z=pi("title1",ui(n,"title1"),i),w=pi("title2",ui(n,"title2"),i),W=pi("title3",ui(n,"title3"),i),R=a.useMemo(()=>({title1Width:d??Ai.title1Width,title2Width:c??Ai.title2Width,title3Width:u??Ai.title3Width}),[d,c,u]),J=a.useMemo(()=>({title2MarginLeft:v,title3MarginLeft:x}),[v,x]),F=a.useMemo(()=>Vn(e,t,z,w,W),[e,t,z,w,W]),U=a.useMemo(()=>F.map(H=>R[H.widthKey]),[F,R]),V=a.useMemo(()=>Oi(F.length,U),[F.length,U]),G=a.useMemo(()=>bo(F.length,U),[F.length,U]),oe=a.useMemo(()=>F.filter(H=>H.prefix==="title1"),[F]),$=a.useMemo(()=>F.filter(H=>H.prefix==="title2"||H.prefix==="title3"),[F]),M=a.useMemo(()=>Gn(oe,R),[oe,R]),N=a.useMemo(()=>Gn($,R),[$,R]),Q=!!(t.title1||t.title2||t.title3),te=E!==null;if(!(Q||te))return null;const le=(p??0)>0||o,f=(H,X)=>{const Re=F.findIndex(D=>D.prefix===H.prefix);if(!T||X==="single-row")return{effectiveWidth:G[Re]??0,resolvedWidth:V[Re]??0,maxWidth:sn(Re,V)};if(X==="two-row-top"){const D=oe.findIndex(ze=>ze.prefix===H.prefix);return{effectiveWidth:M.effective[D]??0,resolvedWidth:M.resolved[D]??0,maxWidth:sn(D,M.resolved)}}const de=$.findIndex(D=>D.prefix===H.prefix);return{effectiveWidth:N.effective[de]??0,resolvedWidth:N.resolved[de]??0,maxWidth:sn(de,N.resolved)}},ne=(H,X,Re)=>{if(!T||Re==="single-row"){const ot=H.findIndex(Ve=>Ve.prefix===X.prefix),tt=H.map(Ve=>R[Ve.widthKey]),at=Oi(H.length,tt);return{effectiveWidth:bo(H.length,tt)[ot]??0,resolvedWidth:at[ot]??0,maxWidth:sn(ot,at)}}if(Re==="two-row-top"){const ot=H.filter(Ve=>Ve.prefix==="title1"),tt=ot.findIndex(Ve=>Ve.prefix===X.prefix),{resolved:at,effective:yt}=Gn(ot,R);return{effectiveWidth:yt[tt]??0,resolvedWidth:at[tt]??0,maxWidth:sn(tt,at)}}const de=H.filter(ot=>ot.prefix==="title2"||ot.prefix==="title3"),D=de.findIndex(ot=>ot.prefix===X.prefix),{resolved:ze,effective:Fe}=Gn(de,R);return{effectiveWidth:Fe[D]??0,resolvedWidth:ze[D]??0,maxWidth:sn(D,ze)}},Z=H=>Cc(F,V,J,H)+(T?0:p??0),fe=()=>T?0:p??0,Ie=H=>$.slice(0,H).reduce((X,Re,de)=>X+(Re.marginLeftKey?J[Re.marginLeftKey]??0:0)+(N.resolved[de]??0),0),ue=H=>{const X=$[H];return Ie(H)+(X.marginLeftKey?J[X.marginLeftKey]??0:0)+(N.resolved[H]??0)},se=(H,X,Re)=>{const de=H.marginLeftKey?J[H.marginLeftKey]??0:0,{effectiveWidth:D,resolvedWidth:ze,maxWidth:Fe}=Re??f(H,X),ot=Math.max(de,Bn),tt=o&&X==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":H.prefix,style:{width:S.scalingValue(D,i),...de>0?{marginLeft:S.scalingValue(de,i)}:{}},children:[r.jsx("p",{className:H.className,style:H.style,children:H.text}),tt&&H.marginLeftKey?r.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ze),style:{position:"absolute",top:0,left:S.scalingValue(-de,i),width:S.scalingValue(ot,i),height:"100%",pointerEvents:"auto"}}):null,tt?r.jsx("div",{"data-controls":H.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:S.scalingValue(-gn/2,i),width:S.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}}):null]},H.className)},q=(H="two-row")=>{const X=F.findIndex(D=>D.prefix==="title1"),Re=X>=0?V[X]:R.title1Width,de=H==="two-row"&&o;return r.jsx("div",{...de?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Re)}:{},style:{width:S.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...de?{pointerEvents:"auto"}:{}}})},ee=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:z,"aria-hidden":"true",children:" "}),ce=H=>{const X=Vn(e,H,z,w,W);return r.jsx(r.Fragment,{children:X.map(Re=>se(Re,"single-row",ne(X,Re,"single-row")))})},ke=H=>{const X=Vn(e,H,z,w,W),Re=X.find(de=>de.prefix==="title1");return Re?se(Re,"two-row-top",ne(X,Re,"two-row-top")):null},$e=(H,X=!1)=>{const Re=Vn(e,H,z,w,W),de=Re.filter(Fe=>Fe.prefix==="title2"||Fe.prefix==="title3"),D=o&&X;return de.length>0||D||(I??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[de.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[r.jsx("div",{className:`${e}-titles-stack`,children:de.map(Fe=>se(Fe,"two-row-bottom",ne(Re,Fe,"two-row-bottom")))}),X&&o?r.jsxs(r.Fragment,{children:[xe(),Le()]}):null]}):null,(I??0)>0||D?r.jsx("div",{"data-controls":D?"titleRowMarginBottom":void 0,"data-controls-axis":D?"y":void 0,"data-controls-reverse":D?"":void 0,className:D?`${e}-control`:void 0,style:{height:P,width:"100%",flexShrink:0,pointerEvents:D?"auto":"none"}}):null]}):null},Pe=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:S.scalingValue(L??0,i),height:S.scalingValue(L??0,i),marginRight:B,"--close-icon-hover-color":K},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:H=>{H.stopPropagation(),l==null||l()},"aria-label":"Close",children:r.jsx(rn,{url:E??"",fill:C,hoverFill:i&&!s?C: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:B,height:"100%",pointerEvents:"auto"}})]}),pe=()=>te?r.jsx("div",{className:`${e}-titles-row-header-controls`,children:Pe()}):null,he=H=>r.jsx("div",{className:`${e}-titles-row-titles`,children:r.jsx("div",{className:`${e}-titles-stack`,children:H})}),be=H=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[te||Q?ee():null,le?q("two-row"):null,he(H),pe()]}),j=(H,X=!1)=>r.jsxs(r.Fragment,{children:[be(ke(H)),$e(H,X)]}),re=()=>{const H=T?-1:F.findIndex(de=>de.prefix==="title1"),X=!T&&(o||(p??0)>0)?(()=>{const de=p??0,D=H>=0?V[H]:R.title1Width,ze=Math.max(de,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(D),style:{position:"absolute",top:0,left:0,width:S.scalingValue(ze,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Re=F.flatMap((de,D)=>{if(!de.marginLeftKey)return[];const ze=J[de.marginLeftKey]??0,Fe=$c(F,V,J,D)+fe(),ot=Math.max(ze,Bn);return r.jsx("div",{"data-controls":de.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(V[D]),style:{position:"absolute",top:0,left:S.scalingValue(Fe,i),width:S.scalingValue(ot,i),height:"100%",pointerEvents:"auto"}},de.marginLeftKey)});return X?[X,...Re]:Re},ge=()=>F.map((H,X)=>{const Re=sn(X,V),D=Z(X)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Re),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:S.scalingValue(D,i),width:S.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),xe=()=>$.flatMap((H,X)=>{if(!H.marginLeftKey)return[];const Re=J[H.marginLeftKey]??0,de=Ie(X),D=Math.max(Re,Bn),{resolvedWidth:ze}=f(H,"two-row-bottom");return r.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ze),style:{position:"absolute",top:0,left:S.scalingValue(de,i),width:S.scalingValue(D,i),height:"100%",pointerEvents:"auto"}},H.marginLeftKey)}),Le=()=>$.map((H,X)=>{const{maxWidth:Re}=f(H,"two-row-bottom"),D=ue(X)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Re),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:S.scalingValue(D,i),width:S.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),we=()=>!o||T?null:r.jsxs(r.Fragment,{children:[re(),ge()]}),_=!!(t.title2||t.title3||(I??0)>0||o),me=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[te||Q?ee():null,le?q("single-row"):null,Q?he(ce(t)):r.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),pe(),we()]}),ie=()=>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:j(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:A,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...T?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${T?` ${e}-lightbox-content-area-stacked`:""}`,children:r.jsx("div",{className:`${e}-text-bar-cell${T?` ${e}-text-bar-cell-stacked`:""}`,style:T?void 0:{flex:1,minWidth:0,width:"100%"},children:T?ie():me()})})})]})}function Ug(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Kg(e){return`
6216
6216
  .${e}-wrapper {
6217
6217
  display: grid;
6218
6218
  align-items: start;
6219
6219
  justify-content: center;
6220
- min-height: ${kg(48)};
6220
+ min-height: ${Ug(48)};
6221
6221
  }
6222
6222
  .${e}-item {
6223
6223
  display: flex;
@@ -6532,7 +6532,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
6532
6532
  pointer-events: auto;
6533
6533
  flex-shrink: 0;
6534
6534
  }
6535
- `}const Hl={url:"",name:"",objectFit:"cover"},$n=500,eo=650,un="cubic-bezier(0.22, 1, 0.36, 1)",Fg=72,Wg=50,_g=1e4,Ng=650,Hg=500;function Og(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,l=e.top-t.top;return`translate(${o}px, ${l}px) scale(${n}, ${i})`}function xc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=ur(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 jg(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?xc(i,n):null}function Dg(e){return e.reduce((t,n,i)=>{const o=Ja(n.gallery),s=Qa(o).filter(d=>d.lightboxMedia).map(d=>d.lightboxMedia);return s.length===0||t.push({gridIndex:i,items:s,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function oo(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 oo(e,i,n)}const zg=.03;function bc(e){return e.width*zg}const Kr={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function zo(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function jl(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Bg(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function wa(e,t,n){const i=e.getBoundingClientRect(),o=i.width,l=i.height,s=t/n,d=o/l;if(s>d){const u=o/s;return{width:o,height:u,left:i.left,top:i.top+(l-u)/2}}const c=l*s;return{width:c,height:l,left:i.left+(o-c)/2,top:i.top}}function Vg(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:wa(e,t.width,t.height)}function Gg(e,t){if(Zi(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 qg(e){const t=new Set,n=[];for(const i of e){const o=Ja(i.gallery),l=Qa(o);for(const s of l)for(const d of[s.displayMedia,s.lightboxMedia])d!=null&&d.url&&!t.has(d.url)&&(t.add(d.url),n.push(d))}return n}function Ug({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=>Zi(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:l}=e,{left:s,width:d}=n,c=bc(n);return t==="left"?{left:s+c-i,top:l,width:i,height:o}:{left:s+d-c,top:l,width:i,height:o}}function pr(e,t,n){const i=ji(e,t,n);return{...i,left:2*i.left-e.left}}function Kg(e,t,n){const{left:i,width:o}=n,l=bc(n);return t==="left"?{left:i,top:e.top,width:l,height:e.height}:{left:i+o-l,top:e.top,width:l,height:e.height}}function wc(e,t,n,i){const o=ji(e,"left",i),l=ji(e,"right",i),s=pr(e,"left",i),d=pr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:l,end:e};case"left-adjacent":return{start:o,end:s};case"far-right":return{start:d,end:l};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:l};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:l,end:d};case"far-left":return{start:s,end:o};default:return{start:e,end:e}}}function Xg(e,t,n,i){const{start:o,end:l}=wc(e,t,n,i);return{x:l.left-o.left,y:l.top-o.top}}function Yg(e,t,n){const i=ji(e,t,n),o=pr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Sc(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 Ja(e){if(!e)return;if(Sc(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??Hl,i??o??Hl]}]}function Zg(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Jg(e){const[t]=e.media;return t!=null&&t.url?t:null}function Qa(e){if(!Array.isArray(e)||e.length===0)return[];if(Sc(e)){const t=[];for(const n of e){const i=Zg(n);if(!i)continue;const o=Jg(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 Zi(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Qg({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Zi(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 eh({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:l,onTransitionEnd:s}){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:s,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:l,onClick:c=>c.stopPropagation(),style:o},e)})}function Bo({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Zi(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const l=o.currentTarget;l.videoWidth>0&&l.videoHeight>0&&(i==null||i(e.url,l.videoWidth,l.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const l=o.currentTarget;l.naturalWidth>0&&l.naturalHeight>0&&(i==null||i(e.url,l.naturalWidth,l.naturalHeight))},onTransitionEnd:n})}function th({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:l,isEditMode:s,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:b,sourceRect:S,resolveCloseSourceRect:L,onClose:h,onPrev:g,onNext:y}){const E=a.useRef(null),R=a.useRef(null),T=a.useRef(null),Y=a.useRef(new Map),[k,B]=a.useState(0),P=a.useRef(null),C=a.useRef(0),z=a.useRef(0),v=a.useRef("none"),W=a.useRef(!1),I=a.useRef(!1),Z=a.useRef(!1),A=a.useRef(null),K=a.useRef(null),V=a.useRef(null),G=a.useRef(()=>{}),ne=a.useRef(null),$=a.useRef(null),M=a.useRef(null),H=a.useRef(!1),[ee,ie]=a.useState(null),[F,pe]=a.useState(Kr),[x,re]=a.useState(0),[J,fe]=a.useState("opening"),[Re,de]=a.useState(0),[se,q]=a.useState(0),[Q,me]=a.useState(!1),[Ne,$e]=a.useState(null),[ke,ue]=a.useState(null),[he,Se]=a.useState(null),[D,oe]=a.useState(!1),[ge,xe]=a.useState(null),[Le,be]=a.useState(!1),_=a.useRef(!1),[ce,te]=a.useState(!1),[N,U]=a.useState(!1),Ie=a.useRef(n),le=a.useRef(void 0),j=t[n],ze=j?Zi(j):!1,Ae=se!==0||Q,ot=!s&&(!l||!!d),tt=c&&!s,at=u.length>1,yt=a.useCallback((f,ve)=>t.length<=1?null:t[(f+ve+t.length)%t.length]??null,[t]),Ve=at?oo(u,p,-1):yt(n,-1),ye=at?oo(u,p,1):yt(n,1),Me=Ne===-1&&Ae?at&&ke!==null?oo(u,ke,-1):he!==null?yt(he,-1):null:null,De=Ne===1&&Ae?at&&ke!==null?oo(u,ke,1):he!==null?yt(he,1):null:null,Ee=Me&&Me.url!==(Ve==null?void 0:Ve.url)?Me:null,Ce=De&&De.url!==(ye==null?void 0:ye.url)?De:null,We=Ve&&tt?(()=>{const f=at?Ol(u,p,-1):t.length>2?yt((n-1+t.length)%t.length,-1):null;return f&&f.url!==Ve.url?f:null})():null,je=ye&&tt?(()=>{const f=at?Ol(u,p,1):t.length>2?yt((n+1)%t.length,1):null;return f&&f.url!==ye.url?f:null})():null,nt=Ee??We,pt=Ce??je,Qe=a.useCallback((f,ve,Fe)=>{if(!f||!ve||!Fe)return;const _e=Y.current,st=_e.get(f);(st==null?void 0:st.width)===ve&&(st==null?void 0:st.height)===Fe||(_e.set(f,{width:ve,height:Fe}),B(Ft=>Ft+1))},[]),St=a.useCallback(f=>{if(!(f!=null&&f.url))return null;const ve=Y.current.get(f.url);return Vg(R.current,ve)},[k,x]),ct=a.useCallback(()=>{if(!j)return;const f=St(j);if(f){ie(f);return}const ve=R.current;ve&&ie(jl(ve))},[j,St]),Ue=a.useCallback(f=>{if(at){const ve=u.length;ue((p+f+ve)%ve),Se(null);return}t.length>1&&(Se((n+f+t.length)%t.length),ue(null))},[at,u.length,p,t.length,n]),Ke=a.useCallback(f=>{Z.current=f,me(f)},[]),Oe=a.useCallback(()=>{A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),ft=a.useCallback(()=>{Oe(),A.current=window.setTimeout(()=>{Oe(),Ke(!1)},eo+32)},[Oe,Ke]),mt=a.useCallback(()=>{const f=E.current;if(!f){pe({left:0,top:0,width:typeof window<"u"?window.innerWidth:Kr.width,height:typeof window<"u"?window.innerHeight:Kr.height});return}const ve=f.getBoundingClientRect();pe({left:ve.left,top:ve.top,width:ve.width,height:ve.height})},[]),gt=a.useCallback((f,ve)=>{if(Ae){if(ce&&!Q)return`translate(${se}px, 0px)`;if(Q&&Ne!==null){const Fe=St(f);if(!Fe)return;const{x:_e,y:st}=Xg(Fe,ve,Ne,F);return`translate(${_e}px, ${st}px)`}if(Q)return"translate(0px, 0px)"}},[Ae,ce,Q,se,Ne,F,St]),At=a.useCallback(()=>{const f=K.current;K.current=null,Oe(),Ke(!1),$e(null),ue(null),Se(null),q(0),te(!1),W.current=!1,z.current=0,v.current="none",f===-1?g():f===1&&y()},[Oe,Ke,g,y]),Zt=a.useCallback(()=>{Oe(),A.current=window.setTimeout(()=>{K.current!==null&&At()},eo+32)},[Oe,At]),tn=a.useCallback(()=>{Oe(),K.current=null,Ke(!1),$e(null),ue(null),Se(null),q(0),te(!1),W.current=!1,z.current=0,v.current="none"},[Oe,Ke]),$t=a.useCallback(f=>{if(!(!tt||!ee)){if(Z.current){if(K.current===f){V.current=f,At();return}tn()}Oe(),Ue(f),K.current=f,$e(f),Ke(!0),Zt()}},[tt,ee,At,tn,Oe,Ue,Ke,Zt]);G.current=$t;const Tt=a.useCallback(()=>{ne.current=null,H.current=!1,$.current!==null&&(window.clearInterval($.current),$.current=null),M.current!==null&&(window.clearTimeout(M.current),M.current=null)},[]),Ht=a.useCallback(f=>{$.current!==null&&window.clearInterval($.current);const ve=H.current?Hg:Ng;$.current=window.setInterval(()=>{G.current(f)},ve)},[]),Wt=a.useCallback(f=>{ne.current!==f&&(Tt(),ne.current=f,H.current=!1,G.current(f),Ht(f),M.current=window.setTimeout(()=>{M.current=null,ne.current===f&&(H.current=!0,Ht(f))},_g))},[Tt,Ht]),Te=a.useCallback(()=>{const f=R.current;if(!f)return;const ve=j==null?void 0:j.url,Fe=ve?Y.current.get(ve):void 0;if(Fe!=null&&Fe.width&&(Fe!=null&&Fe.height)){ie(wa(f,Fe.width,Fe.height));return}const _e=T.current;if(_e&&ve&&(_e.src===ve||_e.currentSrc===ve)){const{width:Ft,height:et}=Bg(_e);if(Ft&&et){Qe(ve,Ft,et),ie(wa(f,Ft,et));return}}const st=jl(f);!st.width||!st.height||ie(st)},[j==null?void 0:j.url,Qe]),Ge=a.useCallback(f=>{if(T.current=f,!!f){if(f instanceof HTMLVideoElement){f.readyState>=1&&f.videoWidth>0&&Te();return}f.complete&&f.naturalWidth>0&&Te()}},[Te]),Xe=a.useCallback(()=>{mt(),Te(),re(f=>f+1)},[mt,Te]);a.useEffect(()=>{Xe();const f=R.current,ve=E.current,Fe=new ResizeObserver(()=>Xe());return f&&Fe.observe(f),ve&&Fe.observe(ve),window.addEventListener("resize",Xe),()=>{Fe.disconnect(),window.removeEventListener("resize",Xe)}},[Xe,n,b]),a.useLayoutEffect(()=>{if(!j)return;const f=T.current;if(f){if(f instanceof HTMLImageElement&&f.complete&&f.naturalWidth>0){Te();return}f instanceof HTMLVideoElement&&f.readyState>=1&&f.videoWidth>0&&Te()}},[j==null?void 0:j.url,n,Te]),a.useEffect(()=>{ct()},[ct,k]),a.useEffect(()=>{const f=new Set,ve=[],Fe=_e=>{!(_e!=null&&_e.url)||f.has(_e.url)||(f.add(_e.url),ve.push(_e))};t.forEach(Fe),u.forEach(_e=>_e.items.forEach(Fe)),ve.forEach(_e=>{Y.current.has(_e.url)||Gg(_e,Qe)})},[t,u,Qe]),a.useEffect(()=>{if(J!=="opening"||!ee)return;if(!S){fe("open");return}oe(!1);const f=requestAnimationFrame(()=>{requestAnimationFrame(()=>{oe(!0),fe("open")})});return()=>cancelAnimationFrame(f)},[J,ee,S]),a.useEffect(()=>{if(J!=="closing")return;const f=setTimeout(()=>h(),$n);return()=>clearTimeout(f)},[J,h]),a.useEffect(()=>()=>{Oe()},[Oe]),a.useLayoutEffect(()=>{Ie.current===n&&le.current===(j==null?void 0:j.url)||(Oe(),K.current=null,$e(null),ue(null),Se(null),de(0),q(0),Ke(!1),U(!1),te(!1),C.current=0,z.current=0,v.current="none",W.current=!1,P.current=null,I.current=!1,T.current=null,ct(),Ie.current=n,le.current=j==null?void 0:j.url)},[n,j==null?void 0:j.url,Ke,Oe,ct]),a.useLayoutEffect(()=>{const f=V.current;f!==null&&(V.current=null,requestAnimationFrame(()=>{G.current(f)}))},[n,p,j==null?void 0:j.url]),a.useLayoutEffect(()=>{if(J==="opening"){_.current=!1,be(!1);return}if(J!=="open"||_.current)return;if(!Ve&&!ye){_.current=!0;return}be(!1);const f=requestAnimationFrame(()=>{requestAnimationFrame(()=>{be(!0),_.current=!0})});return()=>cancelAnimationFrame(f)},[J,Ve==null?void 0:Ve.url,ye==null?void 0:ye.url]),a.useEffect(()=>{if(J!=="open")return;const f=()=>{const et=vt=>{vt.stopPropagation(),vt.preventDefault(),document.removeEventListener("click",et,!0)};document.addEventListener("click",et,!0)},ve=et=>{const vt=et<0?1:-1;Oe(),Ue(vt),K.current=vt,$e(vt),Ke(!0),Zt()},Fe=et=>{if(Math.abs(et)>Wg&&tt){ve(et);return}K.current=null,$e(null),ue(null),Se(null),Ke(!0),q(0),ft()},_e=et=>{if(et.touches.length!==1||Z.current)return;const vt=et.touches[0];I.current=!0,P.current={x:vt.clientX,y:vt.clientY},v.current="none",z.current=0,W.current=!1},st=et=>{if(!P.current||et.touches.length!==1||Z.current)return;const vt=et.touches[0],Ot=vt.clientX-P.current.x,kt=vt.clientY-P.current.y;if(v.current==="none"){if(Math.abs(Ot)<10&&Math.abs(kt)<10)return;if(Math.abs(Ot)>Math.abs(kt)){if(!tt)return;v.current="horizontal"}else if(kt>0){if(!ot)return;v.current="vertical"}else return}if(v.current==="horizontal"){W.current=!0,te(!0),z.current=Ot,q(Ot),et.preventDefault();return}v.current==="vertical"&&(W.current=!0,te(!0),C.current=kt,de(kt),et.preventDefault())},Ft=()=>{if(!P.current)return;const et=v.current,vt=W.current;if(vt&&et==="horizontal")Fe(z.current),f();else if(vt&&et==="vertical"){const Ot=C.current;if(ot&&Ot>Fg){const kt=window.innerHeight;C.current=kt,U(!0),de(kt),fe("closing")}else C.current=0,de(0);f()}else et==="horizontal"&&Math.abs(z.current)>0&&(Fe(z.current),f());P.current=null,v.current="none",z.current=0,W.current=!1,te(!1)};return document.addEventListener("touchstart",_e,{passive:!0}),document.addEventListener("touchmove",st,{passive:!1}),document.addEventListener("touchend",Ft),document.addEventListener("touchcancel",Ft),()=>{document.removeEventListener("touchstart",_e),document.removeEventListener("touchmove",st),document.removeEventListener("touchend",Ft),document.removeEventListener("touchcancel",Ft)}},[J,tt,Ke,ft,Oe,ot,Zt,Ue]);const dt=a.useCallback(()=>{const f=(L==null?void 0:L())??S??null;f&&ee&&(xe(f),oe(!0)),fe("closing")},[L,S,ee]);a.useEffect(()=>{const f=_e=>{if(_e.key==="Escape"){if(l&&d||J==="closing")return;Tt(),dt();return}if(_e.key!=="ArrowLeft"&&_e.key!=="ArrowRight"||J!=="open"||!tt)return;_e.preventDefault();const st=_e.key==="ArrowLeft"?-1:1;_e.repeat&&ne.current===st||Wt(st)},ve=_e=>{if(_e.key!=="ArrowLeft"&&_e.key!=="ArrowRight")return;const st=_e.key==="ArrowLeft"?-1:1;ne.current===st&&Tt()},Fe=()=>{Tt()};return window.addEventListener("keydown",f),window.addEventListener("keyup",ve),window.addEventListener("blur",Fe),()=>{window.removeEventListener("keydown",f),window.removeEventListener("keyup",ve),window.removeEventListener("blur",Fe),Tt()}},[J,l,d,dt,tt,Wt,Tt]),a.useEffect(()=>{J!=="open"&&Tt()},[J,Tt]);const Pt=()=>{J==="closing"||s||dt()},ht=J==="open",it=J==="closing",Kt=Re>0?Math.max(0,1-Re/500):1,Ze=Re>0?Math.max(.35,1-Re/500):1,Je=a.useCallback(f=>{if(!(f.propertyName!=="transform"||!Z.current)){if(K.current!==null){At();return}Oe(),Ke(!1)}},[Oe,Ke,At]),lt=J==="closing"?ge??S:S,Mt=lt&&ee&&(J==="opening"||it)?Og(lt,ee):void 0,Et=Ae&&j?gt(j,"center"):Re>0?`translateY(${Re}px)`:Mt,bt=ee?zo(ee,F):null,_t=!!(lt&&ee),zt=_t&&(J==="closing"||J==="open"&&D),Dt={position:"absolute",top:bt==null?void 0:bt.top,left:bt==null?void 0:bt.left,width:bt==null?void 0:bt.width,height:bt==null?void 0:bt.height,objectFit:"contain",transformOrigin:"top left",transform:Et,opacity:Re>0?Ze:_t?1:J==="opening"||it?0:1,transition:ce&&!Q?"none":Q?`transform ${eo}ms ${un}`:N?`transform ${$n}ms ${un}, opacity ${$n}ms ${un}`:zt?`transform ${$n}ms ${un}`:J==="opening"||it?`opacity ${$n}ms ${un}`:"none",pointerEvents:ze&&ht&&!Ae?"auto":"none",touchAction:ze&&ht?"none":void 0,zIndex:1,overflow:ze?"hidden":void 0},qt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:ht&&!Ae?"auto":"none"},Ct=(f,ve,Fe="adjacent")=>{const _e=St(f);if(!_e)return{display:"none"};const st=Fe==="far"?ve==="left"?"far-left":"far-right":ve==="left"?"left-adjacent":"right-adjacent",{start:Ft}=Ne!==null?wc(_e,st,Ne,F):{start:Fe==="far"?pr(_e,ve,F):ji(_e,ve,F)},et=zo(Ft,F),vt=gt(f,st),Ot=!Ae&&Fe==="adjacent"&&ht&&!Le?Yg(_e,ve,F):null,kt=Fe==="far"&&Ae&&Ne===(ve==="left"?-1:1),cn=ce&&!Q?!1:Q,dn=Fe==="adjacent"&&ht&&Le&&!Ae;return{position:"absolute",top:et.top,left:et.left,width:et.width,height:et.height,objectFit:"contain",transform:vt??(Ot?`translate(${Ot.x}px, ${Ot.y}px)`:void 0),opacity:Fe==="far"?ht&&kt?1:0:ht?1:0,transition:cn?Fe==="far"?`transform ${eo}ms ${un}`:`transform ${eo}ms ${un}, opacity ${$n}ms ${un}`:dn?`transform ${$n}ms ${un}`:J==="opening"||it?`opacity ${$n}ms ${un}`:"none",pointerEvents:"none",zIndex:1}},Ut=(f,ve)=>{const Fe=St(f);return Fe?Kg(ji(Fe,ve,F),ve,F):null},Xt=f=>ve=>{if(!s){if(I.current){I.current=!1;return}ve.stopPropagation(),$t(f)}},Yt=Ve?Ut(Ve,"left"):null,Jt=ye?Ut(ye,"right"):null,Bt=Yt?zo(Yt,F):null,Lt=Jt?zo(Jt,F):null;return r.jsxs("div",{ref:E,className:[`${e}-lightbox`,l?`${e}-lightbox-editor`:"",s?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:Pt,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:ht?Kt:0,transition:ce?"none":`opacity ${$n}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:R,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:ht?1:0,transition:ce?"none":`opacity ${$n}ms ${un}`,pointerEvents:"none"},children:r.jsx(vc,{prefix:e,entry:i,settings:o,isEditor:l,isEditMode:s,isPreviewMode:d,onClose:Pt})})]}),ht&&nt&&r.jsx(Bo,{media:nt,style:Ct(nt,"left","far"),onMeasure:Qe,onTransitionEnd:Je},`far-prev-${nt.url}`),ht&&Ve&&r.jsxs(r.Fragment,{children:[r.jsx(Bo,{media:Ve,style:Ct(Ve,"left"),onMeasure:Qe,onTransitionEnd:Je},`prev-${Ve.url}`),Bt&&r.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:s||ce?"default":"pointer",pointerEvents:s||ce?"none":"auto",zIndex:3},onClick:Xt(-1)})]}),ht&&ye&&r.jsxs(r.Fragment,{children:[r.jsx(Bo,{media:ye,style:Ct(ye,"right"),onMeasure:Qe,onTransitionEnd:Je},`next-${ye.url}`),Lt&&r.jsx("div",{style:{position:"absolute",top:Lt.top,left:Lt.left,width:Lt.width,height:Lt.height,cursor:s||ce?"default":"pointer",pointerEvents:s||ce?"none":"auto",zIndex:3},onClick:Xt(1)})]}),ht&&pt&&r.jsx(Bo,{media:pt,style:Ct(pt,"right","far"),onMeasure:Qe,onTransitionEnd:Je},`far-next-${pt.url}`),ee&&j&&(ze?r.jsx(eh,{src:j.url,phase:J,onMediaElement:Ge,wrapperStyle:Dt,videoStyle:qt,onLoadedMetadata:Te,onTransitionEnd:Je},`${n}-${j.url}`):r.jsx("img",{ref:Ge,src:j.url,alt:j.name,onLoad:Te,onTransitionEnd:Je,style:Dt},`${n}-${j.url}`))]})}function nh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:l,portalId:s}){const{prefix:d}=w.useScopedStyles(),{gridLayout:c,verticalGap:u,align:p="top",imageDisplay:b}=e,S=(b==null?void 0:b.display)==="cover",L=(b==null?void 0:b.ratioValue)??"1:1",h=(b==null?void 0:b.reversed)??!1,[g,y]=L.split(":").map(Number),T=`${h?y:g} / ${h?g:y}`,Y=c.entryWidth??.2,k=c.columnsCount,B=w.scalingValue(Y,n),P=w.scalingValue(c.horizontalGap??0,n),C=B,z=B,v={width:C,...S?{aspectRatio:T,height:"auto",overflow:"hidden"}:{height:"auto"}},W=S?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},I=a.useRef(null),[Z,A]=a.useState(!1),[K,V]=a.useState([]),[G,ne]=a.useState(0),[$,M]=a.useState(0),[H,ee]=a.useState(null),[ie,F]=a.useState({title1:"",title2:"",title3:""}),pe=(()=>{const he={},Se=I.current?getComputedStyle(I.current).getPropertyValue("--cntrl-article-width").trim():"";return Se&&(he["--cntrl-article-width"]=Se),he})(),x=!n||i||o,re=a.useMemo(()=>Ag(d),[d]),J=t??[],fe=J.length%k||k,Re=fe<k&&J.length>0,de=J.length-fe,se=Re?Math.floor((k-fe)/2)+1:1,q=a.useMemo(()=>Dg(J),[J]),Q=a.useMemo(()=>qg(J),[J]),me=(he,Se,D)=>{if(n&&!o&&!i)return;const oe=q.findIndex(xe=>xe.gridIndex===he);if(oe<0)return;const ge=q[oe];M(oe),V(ge.items),ne(Se),F(ge.entry),ee(D??null),A(!0)},Ne=a.useCallback(()=>{A(!1),ee(null)},[]),$e=a.useCallback(()=>{const he=q[$];return!he||!I.current?H:jg(I.current,he.gridIndex,S?"cover":"contain")??H},[q,$,H,S]),ke=a.useCallback(he=>{if(q.length>1){const Se=q.length,D=($+he+Se)%Se,oe=q[D],ge=Math.min(G,oe.items.length-1);M(D),V(oe.items),ne(ge),F(oe.entry);return}ne(Se=>(Se+he+K.length)%K.length)},[q,$,G,K.length]),ue=q.length>1||K.length>1;return a.useEffect(()=>{if(!Z||typeof document>"u")return;const he=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=he}},[Z]),a.useEffect(()=>{!n||o||i||A(!1)},[n,o,i]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:re}}),r.jsx(Ug,{mediaList:Q}),r.jsx("div",{ref:I,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${k}, ${B})`,rowGap:0,columnGap:P,width:w.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:w.scalingValue(u??0,n)},children:J.map((he,Se)=>{const D=Ja(he.gallery),oe=Qa(D),ge=oe.filter(te=>te.lightboxMedia).map(te=>te.lightboxMedia),xe=Math.floor(Se/k)===Math.ceil(J.length/k)-1,Le=Re&&Se>=de?`${se+(Se-de)}`:void 0,be=oe[0],_=be!=null&&be.lightboxMedia?ge.findIndex(te=>te.url===be.lightboxMedia.url):-1,ce=r.jsx("div",{className:`${d}-item-image-wrapper`,style:v,children:oe.length>0&&r.jsx(Qg,{media:be.displayMedia,gridIndex:Se,className:`${d}-item-${Zi(be.displayMedia)?"video":"image"}`.trim(),style:W,onMediaClick:x&&_>=0?te=>me(Se,_,xc(te.currentTarget,S?"cover":"contain")):void 0})});return r.jsx("div",{className:`${d}-item`,children:r.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,xe?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:B,...Le?{gridColumn:Le}:{}},children:[r.jsx("div",{className:`${d}-item-title-row`,children:r.jsx("div",{style:{height:0,width:z}})}),r.jsx("a",{className:`${d}-item-image-link`,children:ce}),r.jsx("div",{className:`${d}-item-subtitle-row`,children:r.jsx("div",{style:{height:0,width:z}})})]})},Se)})}),Z&&typeof document<"u"&&(()=>{const he=(s?document.getElementById(s):null)??document.body;return Yn.createPortal(r.jsx("div",{style:pe,"data-selection":"none",children:r.jsx(th,{prefix:d,items:K,index:G,entry:ie,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ue,lightboxEntries:q,entryIdx:$,layoutId:l,sourceRect:H,resolveCloseSourceRect:$e,onClose:Ne,onPrev:()=>ke(-1),onNext:()=>ke(1)})}),he)})()]})}const ih=`import { CommonComponentProps } from '../props';
6535
+ `}const zs={url:"",name:"",objectFit:"cover"},$n=500,eo=650,un="cubic-bezier(0.22, 1, 0.36, 1)",Xg=72,Yg=50,Zg=1e4,Jg=650,Qg=500;function eh(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 Lc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=ur(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 th(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Lc(i,n):null}function nh(e){return e.reduce((t,n,i)=>{const o=ts(n.gallery),l=ns(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 oo(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 Bs(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return oo(e,i,n)}const ih=.03;function Ic(e){return e.width*ih}const Xr={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function zo(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Vs(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function oh(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function $a(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 rh(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:$a(e,t.width,t.height)}function ah(e,t){if(Zi(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 sh(e){const t=new Set,n=[];for(const i of e){const o=ts(i.gallery),s=ns(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 lh({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=>Zi(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 Di(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=Ic(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 pr(e,t,n){const i=Di(e,t,n);return{...i,left:2*i.left-e.left}}function ch(e,t,n){const{left:i,width:o}=n,s=Ic(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 Rc(e,t,n,i){const o=Di(e,"left",i),s=Di(e,"right",i),l=pr(e,"left",i),d=pr(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 dh(e,t,n,i){const{start:o,end:s}=Rc(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function uh(e,t,n){const i=Di(e,t,n),o=pr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Mc(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 ts(e){if(!e)return;if(Mc(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??zs,i??o??zs]}]}function ph(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function mh(e){const[t]=e.media;return t!=null&&t.url?t:null}function ns(e){if(!Array.isArray(e)||e.length===0)return[];if(Mc(e)){const t=[];for(const n of e){const i=ph(n);if(!i)continue;const o=mh(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 Zi(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function gh({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Zi(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 hh({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 Bo({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Zi(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 fh({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:x,resolveCloseSourceRect:I,onClose:h,onPrev:g,onNext:y}){const E=a.useRef(null),L=a.useRef(null),C=a.useRef(null),K=a.useRef(new Map),[A,B]=a.useState(0),P=a.useRef(null),T=a.useRef(0),z=a.useRef(0),w=a.useRef("none"),W=a.useRef(!1),R=a.useRef(!1),J=a.useRef(!1),F=a.useRef(null),U=a.useRef(null),V=a.useRef(null),G=a.useRef(()=>{}),oe=a.useRef(null),$=a.useRef(null),M=a.useRef(null),N=a.useRef(!1),[Q,te]=a.useState(null),[k,le]=a.useState(Xr),[f,ne]=a.useState(0),[Z,fe]=a.useState("opening"),[Ie,ue]=a.useState(0),[se,q]=a.useState(0),[ee,ce]=a.useState(!1),[ke,$e]=a.useState(null),[Pe,pe]=a.useState(null),[he,be]=a.useState(null),[j,re]=a.useState(!1),[ge,xe]=a.useState(null),[Le,we]=a.useState(!1),_=a.useRef(!1),[me,ie]=a.useState(!1),[H,X]=a.useState(!1),Re=a.useRef(n),de=a.useRef(void 0),D=t[n],ze=D?Zi(D):!1,Fe=se!==0||ee,ot=!l&&(!s||!!d),tt=c&&!l,at=u.length>1,yt=a.useCallback((b,ve)=>t.length<=1?null:t[(b+ve+t.length)%t.length]??null,[t]),Ve=at?oo(u,p,-1):yt(n,-1),ye=at?oo(u,p,1):yt(n,1),Me=ke===-1&&Fe?at&&Pe!==null?oo(u,Pe,-1):he!==null?yt(he,-1):null:null,je=ke===1&&Fe?at&&Pe!==null?oo(u,Pe,1):he!==null?yt(he,1):null:null,Ee=Me&&Me.url!==(Ve==null?void 0:Ve.url)?Me:null,Ce=je&&je.url!==(ye==null?void 0:ye.url)?je:null,_e=Ve&&tt?(()=>{const b=at?Bs(u,p,-1):t.length>2?yt((n-1+t.length)%t.length,-1):null;return b&&b.url!==Ve.url?b:null})():null,De=ye&&tt?(()=>{const b=at?Bs(u,p,1):t.length>2?yt((n+1)%t.length,1):null;return b&&b.url!==ye.url?b:null})():null,nt=Ee??_e,pt=Ce??De,Qe=a.useCallback((b,ve,We)=>{if(!b||!ve||!We)return;const Ne=K.current,lt=Ne.get(b);(lt==null?void 0:lt.width)===ve&&(lt==null?void 0:lt.height)===We||(Ne.set(b,{width:ve,height:We}),B(Ft=>Ft+1))},[]),St=a.useCallback(b=>{if(!(b!=null&&b.url))return null;const ve=K.current.get(b.url);return rh(L.current,ve)},[A,f]),ct=a.useCallback(()=>{if(!D)return;const b=St(D);if(b){te(b);return}const ve=L.current;ve&&te(Vs(ve))},[D,St]),Ue=a.useCallback(b=>{if(at){const ve=u.length;pe((p+b+ve)%ve),be(null);return}t.length>1&&(be((n+b+t.length)%t.length),pe(null))},[at,u.length,p,t.length,n]),Ke=a.useCallback(b=>{J.current=b,ce(b)},[]),Oe=a.useCallback(()=>{F.current!==null&&(window.clearTimeout(F.current),F.current=null)},[]),ft=a.useCallback(()=>{Oe(),F.current=window.setTimeout(()=>{Oe(),Ke(!1)},eo+32)},[Oe,Ke]),mt=a.useCallback(()=>{const b=E.current;if(!b){le({left:0,top:0,width:typeof window<"u"?window.innerWidth:Xr.width,height:typeof window<"u"?window.innerHeight:Xr.height});return}const ve=b.getBoundingClientRect();le({left:ve.left,top:ve.top,width:ve.width,height:ve.height})},[]),gt=a.useCallback((b,ve)=>{if(Fe){if(me&&!ee)return`translate(${se}px, 0px)`;if(ee&&ke!==null){const We=St(b);if(!We)return;const{x:Ne,y:lt}=dh(We,ve,ke,k);return`translate(${Ne}px, ${lt}px)`}if(ee)return"translate(0px, 0px)"}},[Fe,me,ee,se,ke,k,St]),At=a.useCallback(()=>{const b=U.current;U.current=null,Oe(),Ke(!1),$e(null),pe(null),be(null),q(0),ie(!1),W.current=!1,z.current=0,w.current="none",b===-1?g():b===1&&y()},[Oe,Ke,g,y]),Zt=a.useCallback(()=>{Oe(),F.current=window.setTimeout(()=>{U.current!==null&&At()},eo+32)},[Oe,At]),tn=a.useCallback(()=>{Oe(),U.current=null,Ke(!1),$e(null),pe(null),be(null),q(0),ie(!1),W.current=!1,z.current=0,w.current="none"},[Oe,Ke]),$t=a.useCallback(b=>{if(!(!tt||!Q)){if(J.current){if(U.current===b){V.current=b,At();return}tn()}Oe(),Ue(b),U.current=b,$e(b),Ke(!0),Zt()}},[tt,Q,At,tn,Oe,Ue,Ke,Zt]);G.current=$t;const Tt=a.useCallback(()=>{oe.current=null,N.current=!1,$.current!==null&&(window.clearInterval($.current),$.current=null),M.current!==null&&(window.clearTimeout(M.current),M.current=null)},[]),Ht=a.useCallback(b=>{$.current!==null&&window.clearInterval($.current);const ve=N.current?Qg:Jg;$.current=window.setInterval(()=>{G.current(b)},ve)},[]),Wt=a.useCallback(b=>{oe.current!==b&&(Tt(),oe.current=b,N.current=!1,G.current(b),Ht(b),M.current=window.setTimeout(()=>{M.current=null,oe.current===b&&(N.current=!0,Ht(b))},Zg))},[Tt,Ht]),Te=a.useCallback(()=>{const b=L.current;if(!b)return;const ve=D==null?void 0:D.url,We=ve?K.current.get(ve):void 0;if(We!=null&&We.width&&(We!=null&&We.height)){te($a(b,We.width,We.height));return}const Ne=C.current;if(Ne&&ve&&(Ne.src===ve||Ne.currentSrc===ve)){const{width:Ft,height:et}=oh(Ne);if(Ft&&et){Qe(ve,Ft,et),te($a(b,Ft,et));return}}const lt=Vs(b);!lt.width||!lt.height||te(lt)},[D==null?void 0:D.url,Qe]),Ge=a.useCallback(b=>{if(C.current=b,!!b){if(b instanceof HTMLVideoElement){b.readyState>=1&&b.videoWidth>0&&Te();return}b.complete&&b.naturalWidth>0&&Te()}},[Te]),Xe=a.useCallback(()=>{mt(),Te(),ne(b=>b+1)},[mt,Te]);a.useEffect(()=>{Xe();const b=L.current,ve=E.current,We=new ResizeObserver(()=>Xe());return b&&We.observe(b),ve&&We.observe(ve),window.addEventListener("resize",Xe),()=>{We.disconnect(),window.removeEventListener("resize",Xe)}},[Xe,n,v]),a.useLayoutEffect(()=>{if(!D)return;const b=C.current;if(b){if(b instanceof HTMLImageElement&&b.complete&&b.naturalWidth>0){Te();return}b instanceof HTMLVideoElement&&b.readyState>=1&&b.videoWidth>0&&Te()}},[D==null?void 0:D.url,n,Te]),a.useEffect(()=>{ct()},[ct,A]),a.useEffect(()=>{const b=new Set,ve=[],We=Ne=>{!(Ne!=null&&Ne.url)||b.has(Ne.url)||(b.add(Ne.url),ve.push(Ne))};t.forEach(We),u.forEach(Ne=>Ne.items.forEach(We)),ve.forEach(Ne=>{K.current.has(Ne.url)||ah(Ne,Qe)})},[t,u,Qe]),a.useEffect(()=>{if(Z!=="opening"||!Q)return;if(!x){fe("open");return}re(!1);const b=requestAnimationFrame(()=>{requestAnimationFrame(()=>{re(!0),fe("open")})});return()=>cancelAnimationFrame(b)},[Z,Q,x]),a.useEffect(()=>{if(Z!=="closing")return;const b=setTimeout(()=>h(),$n);return()=>clearTimeout(b)},[Z,h]),a.useEffect(()=>()=>{Oe()},[Oe]),a.useLayoutEffect(()=>{Re.current===n&&de.current===(D==null?void 0:D.url)||(Oe(),U.current=null,$e(null),pe(null),be(null),ue(0),q(0),Ke(!1),X(!1),ie(!1),T.current=0,z.current=0,w.current="none",W.current=!1,P.current=null,R.current=!1,C.current=null,ct(),Re.current=n,de.current=D==null?void 0:D.url)},[n,D==null?void 0:D.url,Ke,Oe,ct]),a.useLayoutEffect(()=>{const b=V.current;b!==null&&(V.current=null,requestAnimationFrame(()=>{G.current(b)}))},[n,p,D==null?void 0:D.url]),a.useLayoutEffect(()=>{if(Z==="opening"){_.current=!1,we(!1);return}if(Z!=="open"||_.current)return;if(!Ve&&!ye){_.current=!0;return}we(!1);const b=requestAnimationFrame(()=>{requestAnimationFrame(()=>{we(!0),_.current=!0})});return()=>cancelAnimationFrame(b)},[Z,Ve==null?void 0:Ve.url,ye==null?void 0:ye.url]),a.useEffect(()=>{if(Z!=="open")return;const b=()=>{const et=vt=>{vt.stopPropagation(),vt.preventDefault(),document.removeEventListener("click",et,!0)};document.addEventListener("click",et,!0)},ve=et=>{const vt=et<0?1:-1;Oe(),Ue(vt),U.current=vt,$e(vt),Ke(!0),Zt()},We=et=>{if(Math.abs(et)>Yg&&tt){ve(et);return}U.current=null,$e(null),pe(null),be(null),Ke(!0),q(0),ft()},Ne=et=>{if(et.touches.length!==1||J.current)return;const vt=et.touches[0];R.current=!0,P.current={x:vt.clientX,y:vt.clientY},w.current="none",z.current=0,W.current=!1},lt=et=>{if(!P.current||et.touches.length!==1||J.current)return;const vt=et.touches[0],Ot=vt.clientX-P.current.x,kt=vt.clientY-P.current.y;if(w.current==="none"){if(Math.abs(Ot)<10&&Math.abs(kt)<10)return;if(Math.abs(Ot)>Math.abs(kt)){if(!tt)return;w.current="horizontal"}else if(kt>0){if(!ot)return;w.current="vertical"}else return}if(w.current==="horizontal"){W.current=!0,ie(!0),z.current=Ot,q(Ot),et.preventDefault();return}w.current==="vertical"&&(W.current=!0,ie(!0),T.current=kt,ue(kt),et.preventDefault())},Ft=()=>{if(!P.current)return;const et=w.current,vt=W.current;if(vt&&et==="horizontal")We(z.current),b();else if(vt&&et==="vertical"){const Ot=T.current;if(ot&&Ot>Xg){const kt=window.innerHeight;T.current=kt,X(!0),ue(kt),fe("closing")}else T.current=0,ue(0);b()}else et==="horizontal"&&Math.abs(z.current)>0&&(We(z.current),b());P.current=null,w.current="none",z.current=0,W.current=!1,ie(!1)};return document.addEventListener("touchstart",Ne,{passive:!0}),document.addEventListener("touchmove",lt,{passive:!1}),document.addEventListener("touchend",Ft),document.addEventListener("touchcancel",Ft),()=>{document.removeEventListener("touchstart",Ne),document.removeEventListener("touchmove",lt),document.removeEventListener("touchend",Ft),document.removeEventListener("touchcancel",Ft)}},[Z,tt,Ke,ft,Oe,ot,Zt,Ue]);const dt=a.useCallback(()=>{const b=(I==null?void 0:I())??x??null;b&&Q&&(xe(b),re(!0)),fe("closing")},[I,x,Q]);a.useEffect(()=>{const b=Ne=>{if(Ne.key==="Escape"){if(s&&d||Z==="closing")return;Tt(),dt();return}if(Ne.key!=="ArrowLeft"&&Ne.key!=="ArrowRight"||Z!=="open"||!tt)return;Ne.preventDefault();const lt=Ne.key==="ArrowLeft"?-1:1;Ne.repeat&&oe.current===lt||Wt(lt)},ve=Ne=>{if(Ne.key!=="ArrowLeft"&&Ne.key!=="ArrowRight")return;const lt=Ne.key==="ArrowLeft"?-1:1;oe.current===lt&&Tt()},We=()=>{Tt()};return window.addEventListener("keydown",b),window.addEventListener("keyup",ve),window.addEventListener("blur",We),()=>{window.removeEventListener("keydown",b),window.removeEventListener("keyup",ve),window.removeEventListener("blur",We),Tt()}},[Z,s,d,dt,tt,Wt,Tt]),a.useEffect(()=>{Z!=="open"&&Tt()},[Z,Tt]);const Pt=()=>{Z==="closing"||l||dt()},ht=Z==="open",it=Z==="closing",Kt=Ie>0?Math.max(0,1-Ie/500):1,Ze=Ie>0?Math.max(.35,1-Ie/500):1,Je=a.useCallback(b=>{if(!(b.propertyName!=="transform"||!J.current)){if(U.current!==null){At();return}Oe(),Ke(!1)}},[Oe,Ke,At]),st=Z==="closing"?ge??x:x,Mt=st&&Q&&(Z==="opening"||it)?eh(st,Q):void 0,Et=Fe&&D?gt(D,"center"):Ie>0?`translateY(${Ie}px)`:Mt,xt=Q?zo(Q,k):null,_t=!!(st&&Q),zt=_t&&(Z==="closing"||Z==="open"&&j),jt={position:"absolute",top:xt==null?void 0:xt.top,left:xt==null?void 0:xt.left,width:xt==null?void 0:xt.width,height:xt==null?void 0:xt.height,objectFit:"contain",transformOrigin:"top left",transform:Et,opacity:Ie>0?Ze:_t?1:Z==="opening"||it?0:1,transition:me&&!ee?"none":ee?`transform ${eo}ms ${un}`:H?`transform ${$n}ms ${un}, opacity ${$n}ms ${un}`:zt?`transform ${$n}ms ${un}`:Z==="opening"||it?`opacity ${$n}ms ${un}`:"none",pointerEvents:ze&&ht&&!Fe?"auto":"none",touchAction:ze&&ht?"none":void 0,zIndex:1,overflow:ze?"hidden":void 0},qt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:ht&&!Fe?"auto":"none"},Ct=(b,ve,We="adjacent")=>{const Ne=St(b);if(!Ne)return{display:"none"};const lt=We==="far"?ve==="left"?"far-left":"far-right":ve==="left"?"left-adjacent":"right-adjacent",{start:Ft}=ke!==null?Rc(Ne,lt,ke,k):{start:We==="far"?pr(Ne,ve,k):Di(Ne,ve,k)},et=zo(Ft,k),vt=gt(b,lt),Ot=!Fe&&We==="adjacent"&&ht&&!Le?uh(Ne,ve,k):null,kt=We==="far"&&Fe&&ke===(ve==="left"?-1:1),cn=me&&!ee?!1:ee,dn=We==="adjacent"&&ht&&Le&&!Fe;return{position:"absolute",top:et.top,left:et.left,width:et.width,height:et.height,objectFit:"contain",transform:vt??(Ot?`translate(${Ot.x}px, ${Ot.y}px)`:void 0),opacity:We==="far"?ht&&kt?1:0:ht?1:0,transition:cn?We==="far"?`transform ${eo}ms ${un}`:`transform ${eo}ms ${un}, opacity ${$n}ms ${un}`:dn?`transform ${$n}ms ${un}`:Z==="opening"||it?`opacity ${$n}ms ${un}`:"none",pointerEvents:"none",zIndex:1}},Ut=(b,ve)=>{const We=St(b);return We?ch(Di(We,ve,k),ve,k):null},Xt=b=>ve=>{if(!l){if(R.current){R.current=!1;return}ve.stopPropagation(),$t(b)}},Yt=Ve?Ut(Ve,"left"):null,Jt=ye?Ut(ye,"right"):null,Bt=Yt?zo(Yt,k):null,Lt=Jt?zo(Jt,k):null;return r.jsxs("div",{ref:E,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:Z==="open"?"none":void 0},onClick:Pt,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:ht?Kt:0,transition:me?"none":`opacity ${$n}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:L,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:ht?1:0,transition:me?"none":`opacity ${$n}ms ${un}`,pointerEvents:"none"},children:r.jsx(Tc,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:Pt})})]}),ht&&nt&&r.jsx(Bo,{media:nt,style:Ct(nt,"left","far"),onMeasure:Qe,onTransitionEnd:Je},`far-prev-${nt.url}`),ht&&Ve&&r.jsxs(r.Fragment,{children:[r.jsx(Bo,{media:Ve,style:Ct(Ve,"left"),onMeasure:Qe,onTransitionEnd:Je},`prev-${Ve.url}`),Bt&&r.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||me?"default":"pointer",pointerEvents:l||me?"none":"auto",zIndex:3},onClick:Xt(-1)})]}),ht&&ye&&r.jsxs(r.Fragment,{children:[r.jsx(Bo,{media:ye,style:Ct(ye,"right"),onMeasure:Qe,onTransitionEnd:Je},`next-${ye.url}`),Lt&&r.jsx("div",{style:{position:"absolute",top:Lt.top,left:Lt.left,width:Lt.width,height:Lt.height,cursor:l||me?"default":"pointer",pointerEvents:l||me?"none":"auto",zIndex:3},onClick:Xt(1)})]}),ht&&pt&&r.jsx(Bo,{media:pt,style:Ct(pt,"right","far"),onMeasure:Qe,onTransitionEnd:Je},`far-next-${pt.url}`),Q&&D&&(ze?r.jsx(hh,{src:D.url,phase:Z,onMediaElement:Ge,wrapperStyle:jt,videoStyle:qt,onLoadedMetadata:Te,onTransitionEnd:Je},`${n}-${D.url}`):r.jsx("img",{ref:Ge,src:D.url,alt:D.name,onLoad:Te,onTransitionEnd:Je,style:jt},`${n}-${D.url}`))]})}function yh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=S.useScopedStyles(),{gridLayout:c,verticalGap:u,align:p="top",imageDisplay:v}=e,x=(v==null?void 0:v.display)==="cover",I=(v==null?void 0:v.ratioValue)??"1:1",h=(v==null?void 0:v.reversed)??!1,[g,y]=I.split(":").map(Number),C=`${h?y:g} / ${h?g:y}`,K=c.entryWidth??.2,A=c.columnsCount,B=S.scalingValue(K,n),P=S.scalingValue(c.horizontalGap??0,n),T=B,z=B,w={width:T,...x?{aspectRatio:C,height:"auto",overflow:"hidden"}:{height:"auto"}},W=x?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},R=a.useRef(null),[J,F]=a.useState(!1),[U,V]=a.useState([]),[G,oe]=a.useState(0),[$,M]=a.useState(0),[N,Q]=a.useState(null),[te,k]=a.useState({title1:"",title2:"",title3:""}),le=(()=>{const he={},be=R.current?getComputedStyle(R.current).getPropertyValue("--cntrl-article-width").trim():"";return be&&(he["--cntrl-article-width"]=be),he})(),f=!n||i||o,ne=a.useMemo(()=>Kg(d),[d]),Z=t??[],fe=Z.length%A||A,Ie=fe<A&&Z.length>0,ue=Z.length-fe,se=Ie?Math.floor((A-fe)/2)+1:1,q=a.useMemo(()=>nh(Z),[Z]),ee=a.useMemo(()=>sh(Z),[Z]),ce=(he,be,j)=>{if(n&&!o&&!i)return;const re=q.findIndex(xe=>xe.gridIndex===he);if(re<0)return;const ge=q[re];M(re),V(ge.items),oe(be),k(ge.entry),Q(j??null),F(!0)},ke=a.useCallback(()=>{F(!1),Q(null)},[]),$e=a.useCallback(()=>{const he=q[$];return!he||!R.current?N:th(R.current,he.gridIndex,x?"cover":"contain")??N},[q,$,N,x]),Pe=a.useCallback(he=>{if(q.length>1){const be=q.length,j=($+he+be)%be,re=q[j],ge=Math.min(G,re.items.length-1);M(j),V(re.items),oe(ge),k(re.entry);return}oe(be=>(be+he+U.length)%U.length)},[q,$,G,U.length]),pe=q.length>1||U.length>1;return a.useEffect(()=>{if(!J||typeof document>"u")return;const he=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=he}},[J]),a.useEffect(()=>{!n||o||i||F(!1)},[n,o,i]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ne}}),r.jsx(lh,{mediaList:ee}),r.jsx("div",{ref:R,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${A}, ${B})`,rowGap:0,columnGap:P,width:S.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:S.scalingValue(u??0,n)},children:Z.map((he,be)=>{const j=ts(he.gallery),re=ns(j),ge=re.filter(ie=>ie.lightboxMedia).map(ie=>ie.lightboxMedia),xe=Math.floor(be/A)===Math.ceil(Z.length/A)-1,Le=Ie&&be>=ue?`${se+(be-ue)}`:void 0,we=re[0],_=we!=null&&we.lightboxMedia?ge.findIndex(ie=>ie.url===we.lightboxMedia.url):-1,me=r.jsx("div",{className:`${d}-item-image-wrapper`,style:w,children:re.length>0&&r.jsx(gh,{media:we.displayMedia,gridIndex:be,className:`${d}-item-${Zi(we.displayMedia)?"video":"image"}`.trim(),style:W,onMediaClick:f&&_>=0?ie=>ce(be,_,Lc(ie.currentTarget,x?"cover":"contain")):void 0})});return r.jsx("div",{className:`${d}-item`,children:r.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,xe?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:B,...Le?{gridColumn:Le}:{}},children:[r.jsx("div",{className:`${d}-item-title-row`,children:r.jsx("div",{style:{height:0,width:z}})}),r.jsx("a",{className:`${d}-item-image-link`,children:me}),r.jsx("div",{className:`${d}-item-subtitle-row`,children:r.jsx("div",{style:{height:0,width:z}})})]})},be)})}),J&&typeof document<"u"&&(()=>{const he=(l?document.getElementById(l):null)??document.body;return Yn.createPortal(r.jsx("div",{style:le,"data-selection":"none",children:r.jsx(fh,{prefix:d,items:U,index:G,entry:te,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:pe,lightboxEntries:q,entryIdx:$,layoutId:s,sourceRect:N,resolveCloseSourceRect:$e,onClose:ke,onPrev:()=>Pe(-1),onNext:()=>Pe(1)})}),he)})()]})}const vh=`import { CommonComponentProps } from '../props';
6536
6536
  import { scalingValue, useScopedStyles } from '../utils/index';
6537
6537
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
6538
6538
  import { createPortal } from 'react-dom';
@@ -8875,11 +8875,11 @@ export function Hive({
8875
8875
  </>
8876
8876
  );
8877
8877
  }
8878
- `,oh="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>'),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",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 rh(e){const t={};return t[Ye(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ye(e,"fontSettings")]={...oi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ye(e,"fontSize")]={...oi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ye(e,"lineHeight")]={...oi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ye(e,"letterSpacing")]={...oi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ye(e,"wordSpacing")]={...oi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ye(e,"textAlign")]={...oi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ye(e,"textAppearance")]={...oi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Di=Kn.filter(e=>e!=="count"),ah=Di.reduce((e,t)=>({...e,...rh(t)}),{}),lh=Di.reduce((e,t)=>({...e,[Ye(t,"fontFamily")]:"Arial",[Ye(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ye(t,"letterSpacing")]:0,[Ye(t,"wordSpacing")]:0,[Ye(t,"textAlign")]:"left",[Ye(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Xr(e){return Di.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ye(n,"fontSize")]=i),o!==void 0&&(t[Ye(n,"lineHeight")]=o),t},{})}const sh={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Di.map(e=>[Ya[e],Za(e)]))},ch={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},dh=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...ch,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),uh={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:dh},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"}},...ah},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:oh,closeIconColor:"#000000",closeIconHoverColor:"#999999",...lh},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,...Xr({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,...Xr({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,...Xr({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:[sh]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},ph={element:nh,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:[...Di.map(e=>({path:`${Ye(e,"fontFamily")}`}))]},fontRelations:{...Di.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ye(t,"fontFamily")}`}),{})},schema:uh,sourceCode:ih};function mh(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 gh({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 l=o.play();l&&l.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 Yr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function hh(e){return String(e??"").trim().length>0}function Dl(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 zl(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 Bl(e,t,n,i,o,l,s){const d=w.scalingValue(l,s),c=w.scalingValue(0,s),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!p||i?d:c}}function fh(e,t,n){const i=w.scalingValue(t,n),o=w.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Vl=10;function yh(e){return`
8878
+ `,bh="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>'),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",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 xh(e){const t={};return t[Ye(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ye(e,"fontSettings")]={...oi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ye(e,"fontSize")]={...oi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ye(e,"lineHeight")]={...oi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ye(e,"letterSpacing")]={...oi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ye(e,"wordSpacing")]={...oi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ye(e,"textAlign")]={...oi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ye(e,"textAppearance")]={...oi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const ji=Kn.filter(e=>e!=="count"),wh=ji.reduce((e,t)=>({...e,...xh(t)}),{}),Sh=ji.reduce((e,t)=>({...e,[Ye(t,"fontFamily")]:"Arial",[Ye(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ye(t,"letterSpacing")]:0,[Ye(t,"wordSpacing")]:0,[Ye(t,"textAlign")]:"left",[Ye(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Yr(e){return ji.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ye(n,"fontSize")]=i),o!==void 0&&(t[Ye(n,"lineHeight")]=o),t},{})}const $h={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(ji.map(e=>[Qa[e],es(e)]))},Ch={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},Th=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...Ch,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),Lh={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:Th},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"}},...wh},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:bh,closeIconColor:"#000000",closeIconHoverColor:"#999999",...Sh},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,...Yr({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,...Yr({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,...Yr({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:[$h]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},Ih={element:yh,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:[...ji.map(e=>({path:`${Ye(e,"fontFamily")}`}))]},fontRelations:{...ji.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ye(t,"fontFamily")}`}),{})},schema:Lh,sourceCode:vh};function Rh(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 Mh({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 Zr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Eh(e){return String(e??"").trim().length>0}function Gs(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 qs(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 Us(e,t,n,i,o,s,l){const d=S.scalingValue(s,l),c=S.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!p||i?d:c}}function Ph(e,t,n){const i=S.scalingValue(t,n),o=S.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Ks=10;function kh(e){return`
8879
8879
  .${e}-wrapper {
8880
8880
  display: grid;
8881
8881
  align-items: start;
8882
- min-height: ${Yr(48)};
8882
+ min-height: ${Zr(48)};
8883
8883
  position: relative;
8884
8884
  overflow: visible;
8885
8885
  box-sizing: border-box;
@@ -9001,7 +9001,7 @@ a.${e}-list-item {
9001
9001
  flex-shrink: 0;
9002
9002
  overflow: visible;
9003
9003
  box-sizing: border-box;
9004
- min-width: ${Yr(50)};
9004
+ min-width: ${Zr(50)};
9005
9005
  position: relative;
9006
9006
  display: flex;
9007
9007
  align-items: flex-start;
@@ -9009,7 +9009,7 @@ a.${e}-list-item {
9009
9009
 
9010
9010
  .${e}-list-col-last {
9011
9011
  flex: 1 1 auto;
9012
- min-width: ${Yr(50)};
9012
+ min-width: ${Zr(50)};
9013
9013
  }
9014
9014
 
9015
9015
  .${e}-list-col-title {
@@ -9244,7 +9244,7 @@ a.${e}-list-item {
9244
9244
  overflow-wrap: anywhere;
9245
9245
  word-break: break-word;
9246
9246
  }
9247
- `}const Xn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],el=["AColumn","BColumn","CColumn","DColumn","EColumn"],An="cutLabel",bo=[...el,An],Er=["A","B","C","D","E"];function $c(e){return`${e}ColumnVerticalAlign`}const Sa=["Top","Center","Bottom"];function tl(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Er.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function vh(e){const t=tl(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function xh(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Er.includes(n)?n:null}function Cc(e,t,n){const i=xh(e);return i?i===t?!1:vh(n[$c(i)]):!0}function wo(e){const t=tl(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Er.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function bh(e,t,n){if(Tc(e,t,n))return wo(e);const i=wo(e);return i.kind==="baseline"?{kind:"top"}:i}function wh(e){const t=wo(e);return t.kind==="baseline"?{kind:"top"}:t}function Tc(e,t,n){return Cc(e,n,t)?wo(e).kind==="baseline":!1}function Sh(e){const t={};let n=!1;for(const i of Er){const o=$c(i),l=e[o];if(e.type==="b"){const s=String(l??"Top").trim();s!=="Top"&&s!=="Center"&&s!=="Bottom"&&(t[o]="Top",n=!0);continue}Cc(l,i,e)||(t[o]="Top",n=!0)}return n?t:null}function $h(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Ch(e){const t=wo(e).kind;return t==="baseline"?"center":t}function Th(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Gl(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Lh(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(),l=o-i;return n.remove(),l}function Zr(e,t,n,i){const o=e.titleEl;if(!o)return 0;const l=o.closest(`.${n}`);if(!l)return 0;const s=Lh(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+s;const d=l.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+s}function Rh(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const l=o.querySelector(`.${n}`);l&&(l.style.minHeight=`${i}px`,l.style.height=`${i}px`)}),i)}function Ih(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Mh={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function It(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Eh={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Ph(e){return[It(e,"textFontFamily"),It(e,"textFontSettings"),{type:"row",items:[It(e,"textFontSize"),It(e,"textLineHeight"),It(e,"textLetterSpacing"),It(e,"textWordSpacing")]},It(e,"textTextAlign"),It(e,"textTextAppearance"),`${e}VerticalAlign`]}function kh(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(bo.map(e=>[Eh[e],Ph(e)]))}}function mr(e,t){const n=i=>{const o=It(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 ql(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 on(Vt(n,t))}function Ul(e,t,n,i){const o=mr(e,t),l=o.textFontSize??.01,s=o.textLineHeight;return s!==void 0&&s<l?`${n} ${i}`:n}function Kl(e,t,n,i){const o=mr(e,t),l=o.textFontSize??.01,s=o.textLineHeight;return s===void 0||s>=l?{}:{[`--${n}-title-leading-gap`]:w.scalingValue((l-s)/2,i)}}const fn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],zi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Bi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Vi=["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"},Fh=["hover","focus","filled","success","error"],Xl=.004,Ii=.004,Jr=Ii,nl=50,So=1440,$o=nl/So;function Lc(e){const t=typeof e=="number"&&e>0?e:So;return nl/t}function Wh(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 So}const Rc={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function co(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function _h(e,t=1){const n=t/e;return Object.fromEntries(fn.map(i=>[i,n]))}function Nh(){return Object.fromEntries([...zi.map(e=>[e,0]),...Bi.map(e=>[e,0])])}function Hh(){return Object.fromEntries(Vi.map(e=>[e,0]))}function Vo(e){return Object.fromEntries(fn.map(t=>[t,typeof e[t]=="number"?e[t]:Rc[t]]))}function Ic(e,t,n){const i=e-$o,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const l=i/o;return{paddingLeft:t*l,paddingRight:n*l}}function or(e,t,n){const i=il(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((l,s)=>l+s,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Oh(e,t,n){const i={};for(let o=0;o<e;o+=1){const l=zi[o],s=Bi[o],d=typeof n[l]=="number"?n[l]:0,c=typeof n[s]=="number"?n[s]:0,u=Ic(t[o]??0,d,c);u.paddingLeft!==d&&(i[l]=u.paddingLeft),u.paddingRight!==c&&(i[s]=u.paddingRight)}return i}function il(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),s=o.reduce((u,p)=>u+p,0)+$o;if(t>=s)return i;const d=[...o];let c=s-t;for(let u=d.length-1;u>=0&&c>0;u-=1){const p=d[u]-$o;if(p<=0)continue;const b=Math.min(c,p);d[u]-=b,c-=b}return[...d,i[e-1]]}function jh(e,t,n){if(e<=1)return{};const i=il(e,t,n),o={};for(let l=0;l<e-1;l+=1){const s=fn[l];i[l]!==n[s]&&(o[s]=i[l])}return o}function Yl(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Xn]}function Dh(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function zh(e,t,n,i){const o=Math.min(i,e.length,fn.length),l={};for(let s=0;s<o;s+=1){const d=e[s],c=t.indexOf(d);if(c===-1)continue;const u=fn[c],p=zi[c],b=Bi[c],S=Vi[c],L=fn[s],h=zi[s],g=Bi[s],y=Vi[s],E=n[u],R=n[p],T=n[b],Y=n[S];typeof E=="number"&&(l[L]=E),typeof R=="number"&&(l[h]=R),typeof T=="number"&&(l[g]=T),typeof Y=="number"&&(l[y]=Y)}return l}function Mc(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 Bh(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=co(e),l=e.type==="b"||e.type===void 0&&t.type==="b",s={...e,..._h(n,o),...Nh()};if(l)for(const d of Vi)typeof t[d]=="number"&&(s[d]=t[d]);else Object.assign(s,Hh());return Mc(e,s)?s:e}function Vh(e,t,n){const i=Sh(e);i&&(e={...e,...i});const o=Lc(n==null?void 0:n.designWidth),l=e.columns,s=t.columns,d=co(e),c=co(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof l=="number"?l:typeof s=="number"?s:Xn.length,b=T=>{if(u)return T;const Y=Vo({...t,...T}),k=co(T),B=or(p,k,Y),P=Oh(p,B,{...t,...T});return Object.keys(P).length===0?T:{...T,...P}};if(typeof l=="number"&&l!==s)return e;const S=Yl(e),L=Yl(t);if(!Dh(S,L))return b({...e,...zh(S,L,t,p)});if(d<c&&typeof p=="number"&&!u){const T=Vo({...t,...e});return b({...e,...jh(p,d,T)})}if(u){const T=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,Y=Math.max(0,(d-o)/2);return T>Y?{...e,textPaddingLR:Y}:e}const h=Vo({...t,...e}),g=or(p,c,Vo(t)),E=or(p,d,h).some((T,Y)=>T<(g[Y]??T)),R=fn.some(T=>{const Y=e[T],k=t[T];return typeof Y=="number"&&typeof k=="number"&&Y!==k});return E||R?b(e):e}function Gh(e,t,n,i){const o=t.slice(0,e).reduce((s,d)=>s+d,0),l=n.slice(e+1,t.length-1).reduce((s,d)=>s+d,0);return Math.max($o,i-o-l-$o)}function qh(e,t){return Math.random()*(t-e)+e}function Uh(e){return Object.fromEntries(fn.map(t=>[t,typeof e[t]=="number"?e[t]:Rc[t]]))}function Qr(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Kh(e,t,n,i,o,l){return e.slice(0,t).map((s,d)=>{const c=zi[d],u=Bi[d],p=Vi[d];return{key:s,textPrefix:Mh[s],widthKey:fn[d],width:n[fn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[u],paddingBottom:l[p]}})}function Xh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:l,layoutId:s,onUpdateSettings:d}){const{prefix:c}=w.useScopedStyles(),u=!!o,{columns:p,type:b,wrapperWidth:S,entriesCount:L,cellMinHeight:h,dividerWidth:g,showVisibility:y,cut:E,showCut:R,cutCellMinHeight:T,cutLabel:Y,imageSize:k,imageOnHover:B,entryHoverEffect:P,entryHoverShowOption:C,rowPaddingTop:z,rowPaddingBottom:v,rowPaddingTopB:W,columnsOrder:I,textPaddingLR:Z,textColor:A,backgroundColor:K,dividerColor:V,textHoverColor:G,backgroundHoverColor:ne,dividerHoverColor:$}=e,[M,H]=a.useState(void 0),[ee,ie]=a.useState(null),F=B==="on"&&(!n||i),pe=(E??0)>0,x=b==="b",re=a.useRef(null),J=a.useRef(null),[fe,Re]=a.useState(null),[de,se]=a.useState(So),q=Lc(de),Q=Math.max(0,((S??0)-q)/2),me=Math.min(Z??0,Q),Ne=Math.max(me,Ii),$e=((S??0)+q)/2;a.useLayoutEffect(()=>{if(!n){se(So);return}const Te=()=>{se(Wh(re.current))};Te();const Ge=re.current;if(!Ge)return;const Xe=new ResizeObserver(Te);Xe.observe(Ge);let dt=Ge;for(;dt&&!dt.style.getPropertyValue("--cntrl-article-width");)dt=dt.parentElement;return dt&&Xe.observe(dt),()=>Xe.disconnect()},[n,s]),a.useEffect(()=>{H(void 0)},[E,R,t,L]),a.useEffect(()=>{n&&!i&&H(void 0)},[n,i]);const ke=w.buildColorVars(c,{textColor:A,backgroundColor:K,dividerColor:V,textHoverColor:G,backgroundHoverColor:ne,dividerHoverColor:$},Ah,Fh),ue=l&&l!=="default"?`${c}-state-${l}`:"",Se=`${!n||i?P==="default"?`${c}-entry-hover-default`:P==="blinds"?`${c}-entry-hover-blinds`:P==="reveal"?`${c}-entry-hover-reveal`:"":""} ${ue}`.trim(),D=P==="reveal"&&(!n||i),oe=(y==null?void 0:y[0])??!1,ge=(y==null?void 0:y[1])??!1,xe=a.useRef(e),Le=a.useRef(s);a.useEffect(()=>{if(!d||!n){xe.current=e,Le.current=s;return}if(Le.current!==s){xe.current=e,Le.current=s;return}const Te=xe.current;if(!(Te!==e))return;if(typeof Te.columns=="number"&&typeof e.columns=="number"&&Te.columns!==e.columns){xe.current=e;return}const Xe=Vh(e,Te,{designWidth:de});xe.current=e,Mc(e,Xe)&&d(Xe)},[e,d,n,s,de]);const be=a.useMemo(()=>Uh(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),_=a.useMemo(()=>Qr(e,zi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),ce=a.useMemo(()=>Qr(e,Bi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),te=a.useMemo(()=>Qr(e,Vi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),N=a.useMemo(()=>Array.isArray(I)&&I.length>0?I:[...Xn],[I]),U=a.useMemo(()=>Kh(N,p,be,_,ce,te),[N,p,be,_,ce,te]),Ie=co(e),le=a.useMemo(()=>fn.slice(0,p).map(Te=>be[Te]),[p,be]),j=a.useMemo(()=>il(p,Ie,be),[p,Ie,be]),ze=a.useMemo(()=>or(p,Ie,be),[p,Ie,be]),Ae=a.useMemo(()=>U.map((Te,Ge)=>Ic(ze[Ge]??0,Te.paddingLeft,Te.paddingRight)),[U,ze]),ot=a.useMemo(()=>{const Te=L===0?1/0:L;return(t??[]).slice(0,Te).map((Xe,dt)=>({id:dt,cells:Object.fromEntries(Xn.map(Pt=>[Pt,Xe[Pt]??""])),image:Xe.image,link:Xe.link}))},[t,L]),tt=pe?M??E:ot.length,at=a.useMemo(()=>pe?ot.slice(0,tt):ot,[ot,pe,tt]),yt=pe&&tt<ot.length,Ve=at.length>1||yt,ye=[oe?`${c}-divider-top`:"",ge||Ve?`${c}-divider-bottom`:""].filter(Boolean).join(" "),Me=!n||i,De=()=>{if(!Me)return;const Te=M??E;if(!R){H(ot.length);return}H(Math.min(Te+R,ot.length))},Ee=Te=>w.scalingValue(Te,n??!1),Ce=x?W??0:z??0,We=v??0,je=h??0,nt=Math.max(We,Jr),pt=Bl(0,at.length,oe,ge,yt,g??0,n??!1).borderTopWidth,Qe=x?"rowPaddingTopB":"rowPaddingTop",St=U[0],ct=U[U.length-1],Ue=Ae[0],Ke=Ae[Ae.length-1],Oe=St&&Ue?Math.max(Ue.paddingLeft,Ii):0,ft=ct&&Ke?Math.max(Ke.paddingRight,Ii):0,mt=Ie,gt=Te=>{const Ge=re.current;if(!Ge)return{x:0,y:0};const Xe=Ge.getBoundingClientRect();return{x:Te.clientX-Xe.left+Vl,y:Te.clientY-Xe.top+Vl}},At=(Te,Ge)=>{if(!F)return;const Xe=Te.image;if(!(Xe!=null&&Xe.url)){ie(null);return}const{x:dt,y:Pt}=gt(Ge),ht=(k==null?void 0:k.min)??80,it=(k==null?void 0:k.max)??320,Kt=(ee==null?void 0:ee.rowId)===Te.id?ee.widthPx:qh(ht,it);ie({rowId:Te.id,url:Xe.url,objectFit:"contain",isVideo:mh(Xe),widthPx:Kt,x:dt,y:Pt})},Zt=Te=>{if(!F||!ee)return;const{x:Ge,y:Xe}=gt(Te);ie(dt=>!dt||dt.x===Ge&&dt.y===Xe?dt:{...dt,x:Ge,y:Xe})},tn=()=>{ie(null)},$t=Te=>{D&&Dl(Te,c),F&&ie(null)},Tt=Te=>{D&&zl(Te,c)};a.useLayoutEffect(()=>{if(!u||x){Re(null);return}const Te=J.current,Ge=Te==null?void 0:Te.parentElement;if(!Te||!Ge){Re(null);return}const Xe=()=>{const Pt=Te.querySelector("[data-list-row]");if(!Pt){Re(null);return}const ht=Ge.getBoundingClientRect(),it=Pt.getBoundingClientRect();Re(it.top-ht.top+it.height/2)};Xe();const dt=new ResizeObserver(Xe);return dt.observe(Te),dt.observe(Ge),()=>dt.disconnect()},[u,x,at,Ce,We,je,t,e,U,ze,de,g,oe,ge,yt]);const Ht=a.useMemo(()=>!x&&el.some(Te=>{const Ge=Te.charAt(0),Xe=e[`${Te}VerticalAlign`];return Tc(Xe,e,Ge)}),[x,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);a.useLayoutEffect(()=>{var Kt;const Te=re.current;if(!Te)return;const Ge=()=>{Te.querySelectorAll("[data-list-col]").forEach(Ze=>{Ze.style.transform="";const Je=Ze.querySelector(`.${c}-list-col`);Je&&(Je.style.minHeight="",Je.style.height="");const lt=Ze.querySelector(`.${c}-list-col-title`);lt&&(lt.style.transform="")})};if(x||!Ht){Ge();return}const Xe=()=>{const Ze=Array.from(Te.querySelectorAll("[data-list-row]")),Je=`${c}-list-col`,lt=`${c}-baseline-probe`;Ze.forEach(Mt=>{Mt.querySelectorAll("[data-list-col]").forEach(Et=>{Et.style.transform="";const bt=Et.querySelector(`.${Je}`);bt&&(bt.style.minHeight="",bt.style.height="");const _t=Et.querySelector(`.${c}-list-col-title`);_t&&(_t.style.transform="")})}),Ze.forEach(Mt=>{const Et=Array.from(Mt.querySelectorAll("[data-list-col]"));Rh(Mt,Et,Je)}),Te.offsetHeight,Ze.forEach(Mt=>{const Et=Array.from(Mt.querySelectorAll("[data-list-col]")),bt=Mt.getBoundingClientRect().top,_t=new Map,zt=Et.map(Ct=>{const Ut=Ct.querySelector(`.${c}-list-col-title`),Xt={el:Ct,titleEl:Ut,letter:Ct.getAttribute("data-col-letter")??"",kind:Ct.getAttribute("data-valign")??"top",anchor:Ct.getAttribute("data-valign-anchor")};return _t.set(Xt.letter,Xt),Xt}),Dt=new Map,qt=(Ct,Ut)=>{const Xt=Dt.get(Ct.letter);if(Xt!==void 0)return Xt;const Yt=Ct.anchor?_t.get(Ct.anchor):void 0;if(Ct.kind!=="baseline"||!Yt||Ut.has(Ct.letter)){const ve=Zr(Ct,bt,Je,lt);return Dt.set(Ct.letter,ve),ve}Ut.add(Ct.letter);const Jt=qt(Yt,Ut);Ut.delete(Ct.letter);const Bt=Zr(Ct,bt,Je,lt),Lt=Jt-Bt;Ih(Ct.titleEl,Lt);const f=Zr(Ct,bt,Je,lt);return Dt.set(Ct.letter,f),f};zt.forEach(Ct=>qt(Ct,new Set))})};let dt=null;const Pt=()=>{dt===null&&(dt=requestAnimationFrame(()=>{dt=null,Xe()}))};Xe();const ht=new ResizeObserver(()=>Pt());ht.observe(Te);let it=!1;return typeof document<"u"&&((Kt=document.fonts)!=null&&Kt.ready)&&document.fonts.ready.then(()=>{it||Pt()}),()=>{it=!0,dt!==null&&(cancelAnimationFrame(dt),dt=null),ht.disconnect(),Ge()}},[Ht,x,e,t,de,at,ze]);const Wt=a.useMemo(()=>yh(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Wt}}),r.jsx("div",{style:ke,children:r.jsxs("div",{ref:re,className:`${c}-wrapper ${Se}${ye?` ${ye}`:""}${x?` ${c}-type-b`:""}`.trim(),style:{width:w.scalingValue(S??0,n)},onMouseMove:F?Zt:void 0,onMouseLeave:F?tn:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[at.map((Te,Ge)=>{var ht;const Xe=(((ht=Te.link)==null?void 0:ht.length)??0)>0,dt=Xe&&(!n||i)?"a":"div",Pt=Bl(Ge,at.length,oe,ge,yt,g??0,n??!1);return r.jsxs(dt,{ref:Ge===0?it=>{J.current=it}:void 0,className:`${c}-list-item${Xe||C==="always"?` ${c}-list-item-has-link`:""}${yt&&Ge===at.length-1?` ${c}-list-item-before-cut`:""}`,...Xe?{href:Te.link,target:"_blank"}:{},style:Pt,onMouseEnter:it=>{D&&(Xe||C==="always")&&Dl(it,c),F&&At(Te,it)},onMouseLeave:it=>{D&&(Xe||C==="always")&&zl(it,c)},children:[Ce>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ee(Ce)}}),r.jsxs("div",{className:`${c}-list-cols-row${x?"":` ${c}-list-cols-row-h`}${u&&Ge===0&&x?` ${c}-list-cols-row-controls`:""}`,...x?{}:{"data-list-row":""},style:x?void 0:{minHeight:Ee(je)},children:[U.map((it,Kt)=>{const Ze=Kt===U.length-1,Je=Ae[Kt],lt=it.paddingBottom,Mt=hh(Te.cells[it.key]),Et=x&&Mt&&lt>0,bt=x?{minHeight:Ee(je)}:{width:Ee(ze[Kt])},_t=x?{paddingLeft:Ee(me),paddingRight:Ee(me)}:{paddingLeft:Ee(Je.paddingLeft),paddingRight:Ee(Je.paddingRight)},zt=it.textPrefix.charAt(0),Dt=x?wh(e[`${it.textPrefix}VerticalAlign`]):bh(e[`${it.textPrefix}VerticalAlign`],e,zt),qt=x&&Mt&&u&&Ge===0;return x&&!Mt?null:r.jsxs("div",{className:x?`${c}-list-col-wrap`:void 0,...x?{}:{"data-list-col":"","data-col-letter":zt,"data-valign":Dt.kind,...Dt.kind==="baseline"?{"data-valign-anchor":Dt.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${Ze?` ${c}-list-col-last`:""}`,style:{..._t,...bt,...x?{justifyContent:Gl(Dt.kind)}:{}},"data-test":it.width,children:r.jsx("span",{className:Ul(e,it.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...ql(mr(e,it.textPrefix),n),...Kl(e,it.textPrefix,c,n),...x?{}:$h(Dt.kind)},children:Te.cells[it.key]??null})}),Et&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ee(lt)}}),qt&&r.jsx("div",{"data-controls":it.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:Ee(Math.max(lt,Jr))}})]},it.key)}),u&&Ge===0&&x&&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($e),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:0,width:Ee(Ne),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($e),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:Ee(Math.max(Ne,Ie-Ne)),width:Ee(Ne),height:"100%"}})]})]}),!x&&We>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ee(We)}}),u&&Ge===0&&!x&&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:Ee(nt)}})]},Te.id)}),u&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Qe,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":x?"center":"left-y",className:`${c}-control-anchor`,style:{top:pt,left:0,width:"100%",height:Ee(Math.max(Ce,Jr))}})},"row-padding-handles"),u&&!x&&St&&ct&&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(ze[0]-((Ue==null?void 0:Ue.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":fe??void 0,className:`${c}-control-anchor`,style:{top:0,left:0,width:Ee(Oe),height:"100%"}}),r.jsx("div",{"data-controls":ct.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[U.length-1]-((Ke==null?void 0:Ke.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":fe??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ee(mt-ft),width:Ee(ft),height:"100%"}})]},"column-edge-padding-handles"),u&&!x&&U.slice(0,-1).map((Te,Ge)=>{const Xe=U[Ge+1],dt=j.slice(0,Ge+1).reduce((Ze,Je)=>Ze+Je,0),Pt=Ae[Ge],ht=Ae[Ge+1],it=Math.max(Pt.paddingRight,Ii),Kt=Math.max(ht.paddingLeft,Ii);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx("div",{"data-controls":Te.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[Ge]-Pt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":fe??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ee(dt-it),width:Ee(it),height:"100%"}}),r.jsx("div",{"data-controls":Xe.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[Ge+1]-ht.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":fe??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ee(dt),width:Ee(Kt),height:"100%"}})]},`${Te.paddingRightKey}-padding`)}),u&&!x&&U.slice(0,-1).map((Te,Ge)=>{const Xe=Gh(Ge,j,le,Ie),Pt=j.slice(0,Ge+1).reduce((ht,it)=>ht+it,0)-Xl/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-min":String(nl),"data-controls-max-fraction":String(Xe),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ee(Pt),width:Ee(Xl),height:"calc(100%)",pointerEvents:"auto"}})},`${Te.widthKey}-junction`)})]}),yt&&(()=>{const Te=mr(e,An),Ge=Ch(e.cutLabelVerticalAlign),Xe=Te.textTextAlign==="justify"||x;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ee(T??0),cursor:Me?"pointer":"default",...fh(ge,g??0,n??!1)},onClick:Me?De:void 0,onMouseEnter:D||F?$t:void 0,onMouseLeave:D?Tt:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...x?{paddingLeft:Ee(me),paddingRight:Ee(me)}:{},justifyContent:Th(Te.textTextAlign),alignItems:Gl(Ge)},children:r.jsx("span",{className:Ul(e,An,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...ql(Te,n),...Kl(e,An,c,n),...Xe?{width:"100%"}:{}},children:Y})})})})(),F&&ee&&(()=>{const Te=`${ee.widthPx}px`,Ge={width:Te,height:"auto",maxHeight:Te,objectFit:"contain",left:ee.x,top:ee.y,position:"absolute"};return r.jsx(gh,{media:ee,className:ee.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:Ge},`${ee.rowId}-${ee.url}`)})()]})})]})}const Yh=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
9247
+ `}const Xn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],is=["AColumn","BColumn","CColumn","DColumn","EColumn"],An="cutLabel",xo=[...is,An],Er=["A","B","C","D","E"];function Ec(e){return`${e}ColumnVerticalAlign`}const Ca=["Top","Center","Bottom"];function os(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Er.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Ah(e){const t=os(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Fh(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Er.includes(n)?n:null}function Pc(e,t,n){const i=Fh(e);return i?i===t?!1:Ah(n[Ec(i)]):!0}function wo(e){const t=os(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Er.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Wh(e,t,n){if(kc(e,t,n))return wo(e);const i=wo(e);return i.kind==="baseline"?{kind:"top"}:i}function _h(e){const t=wo(e);return t.kind==="baseline"?{kind:"top"}:t}function kc(e,t,n){return Pc(e,n,t)?wo(e).kind==="baseline":!1}function Nh(e){const t={};let n=!1;for(const i of Er){const o=Ec(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}Pc(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function Hh(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Oh(e){const t=wo(e).kind;return t==="baseline"?"center":t}function Dh(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Xs(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function jh(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 Jr(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const l=jh(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 zh(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 Bh(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Vh={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Rt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Gh={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function qh(e){return[Rt(e,"textFontFamily"),Rt(e,"textFontSettings"),{type:"row",items:[Rt(e,"textFontSize"),Rt(e,"textLineHeight"),Rt(e,"textLetterSpacing"),Rt(e,"textWordSpacing")]},Rt(e,"textTextAlign"),Rt(e,"textTextAppearance"),`${e}VerticalAlign`]}function Uh(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(xo.map(e=>[Gh[e],qh(e)]))}}function mr(e,t){const n=i=>{const o=Rt(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 Ys(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 on(Vt(n,t))}function Zs(e,t,n,i){const o=mr(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<s?`${n} ${i}`:n}function Js(e,t,n,i){const o=mr(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=s?{}:{[`--${n}-title-leading-gap`]:S.scalingValue((s-l)/2,i)}}const fn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],zi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Bi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Vi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Kh={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Xh=["hover","focus","filled","success","error"],Qs=.004,Ri=.004,Qr=Ri,rs=50,So=1440,$o=rs/So;function Ac(e){const t=typeof e=="number"&&e>0?e:So;return rs/t}function Yh(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 So}const Fc={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function co(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Zh(e,t=1){const n=t/e;return Object.fromEntries(fn.map(i=>[i,n]))}function Jh(){return Object.fromEntries([...zi.map(e=>[e,0]),...Bi.map(e=>[e,0])])}function Qh(){return Object.fromEntries(Vi.map(e=>[e,0]))}function Vo(e){return Object.fromEntries(fn.map(t=>[t,typeof e[t]=="number"?e[t]:Fc[t]]))}function Wc(e,t,n){const i=e-$o,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 or(e,t,n){const i=as(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 ef(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=zi[o],l=Bi[o],d=typeof n[s]=="number"?n[s]:0,c=typeof n[l]=="number"?n[l]:0,u=Wc(t[o]??0,d,c);u.paddingLeft!==d&&(i[s]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function as(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,p)=>u+p,0)+$o;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 p=d[u]-$o;if(p<=0)continue;const v=Math.min(c,p);d[u]-=v,c-=v}return[...d,i[e-1]]}function tf(e,t,n){if(e<=1)return{};const i=as(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 el(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Xn]}function nf(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function of(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],p=zi[c],v=Bi[c],x=Vi[c],I=fn[l],h=zi[l],g=Bi[l],y=Vi[l],E=n[u],L=n[p],C=n[v],K=n[x];typeof E=="number"&&(s[I]=E),typeof L=="number"&&(s[h]=L),typeof C=="number"&&(s[g]=C),typeof K=="number"&&(s[y]=K)}return s}function _c(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 rf(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=co(e),s=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...Zh(n,o),...Jh()};if(s)for(const d of Vi)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,Qh());return _c(e,l)?l:e}function af(e,t,n){const i=Nh(e);i&&(e={...e,...i});const o=Ac(n==null?void 0:n.designWidth),s=e.columns,l=t.columns,d=co(e),c=co(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof s=="number"?s:typeof l=="number"?l:Xn.length,v=C=>{if(u)return C;const K=Vo({...t,...C}),A=co(C),B=or(p,A,K),P=ef(p,B,{...t,...C});return Object.keys(P).length===0?C:{...C,...P}};if(typeof s=="number"&&s!==l)return e;const x=el(e),I=el(t);if(!nf(x,I))return v({...e,...of(x,I,t,p)});if(d<c&&typeof p=="number"&&!u){const C=Vo({...t,...e});return v({...e,...tf(p,d,C)})}if(u){const C=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,K=Math.max(0,(d-o)/2);return C>K?{...e,textPaddingLR:K}:e}const h=Vo({...t,...e}),g=or(p,c,Vo(t)),E=or(p,d,h).some((C,K)=>C<(g[K]??C)),L=fn.some(C=>{const K=e[C],A=t[C];return typeof K=="number"&&typeof A=="number"&&K!==A});return E||L?v(e):e}function sf(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($o,i-o-s-$o)}function lf(e,t){return Math.random()*(t-e)+e}function cf(e){return Object.fromEntries(fn.map(t=>[t,typeof e[t]=="number"?e[t]:Fc[t]]))}function ea(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function df(e,t,n,i,o,s){return e.slice(0,t).map((l,d)=>{const c=zi[d],u=Bi[d],p=Vi[d];return{key:l,textPrefix:Vh[l],widthKey:fn[d],width:n[fn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[u],paddingBottom:s[p]}})}function uf({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:l,onUpdateSettings:d}){const{prefix:c}=S.useScopedStyles(),u=!!o,{columns:p,type:v,wrapperWidth:x,entriesCount:I,cellMinHeight:h,dividerWidth:g,showVisibility:y,cut:E,showCut:L,cutCellMinHeight:C,cutLabel:K,imageSize:A,imageOnHover:B,entryHoverEffect:P,entryHoverShowOption:T,rowPaddingTop:z,rowPaddingBottom:w,rowPaddingTopB:W,columnsOrder:R,textPaddingLR:J,textColor:F,backgroundColor:U,dividerColor:V,textHoverColor:G,backgroundHoverColor:oe,dividerHoverColor:$}=e,[M,N]=a.useState(void 0),[Q,te]=a.useState(null),k=B==="on"&&(!n||i),le=(E??0)>0,f=v==="b",ne=a.useRef(null),Z=a.useRef(null),[fe,Ie]=a.useState(null),[ue,se]=a.useState(So),q=Ac(ue),ee=Math.max(0,((x??0)-q)/2),ce=Math.min(J??0,ee),ke=Math.max(ce,Ri),$e=((x??0)+q)/2;a.useLayoutEffect(()=>{if(!n){se(So);return}const Te=()=>{se(Yh(ne.current))};Te();const Ge=ne.current;if(!Ge)return;const Xe=new ResizeObserver(Te);Xe.observe(Ge);let dt=Ge;for(;dt&&!dt.style.getPropertyValue("--cntrl-article-width");)dt=dt.parentElement;return dt&&Xe.observe(dt),()=>Xe.disconnect()},[n,l]),a.useEffect(()=>{N(void 0)},[E,L,t,I]),a.useEffect(()=>{n&&!i&&N(void 0)},[n,i]);const Pe=S.buildColorVars(c,{textColor:F,backgroundColor:U,dividerColor:V,textHoverColor:G,backgroundHoverColor:oe,dividerHoverColor:$},Kh,Xh),pe=s&&s!=="default"?`${c}-state-${s}`:"",be=`${!n||i?P==="default"?`${c}-entry-hover-default`:P==="blinds"?`${c}-entry-hover-blinds`:P==="reveal"?`${c}-entry-hover-reveal`:"":""} ${pe}`.trim(),j=P==="reveal"&&(!n||i),re=(y==null?void 0:y[0])??!1,ge=(y==null?void 0:y[1])??!1,xe=a.useRef(e),Le=a.useRef(l);a.useEffect(()=>{if(!d||!n){xe.current=e,Le.current=l;return}if(Le.current!==l){xe.current=e,Le.current=l;return}const Te=xe.current;if(!(Te!==e))return;if(typeof Te.columns=="number"&&typeof e.columns=="number"&&Te.columns!==e.columns){xe.current=e;return}const Xe=af(e,Te,{designWidth:ue});xe.current=e,_c(e,Xe)&&d(Xe)},[e,d,n,l,ue]);const we=a.useMemo(()=>cf(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),_=a.useMemo(()=>ea(e,zi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),me=a.useMemo(()=>ea(e,Bi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),ie=a.useMemo(()=>ea(e,Vi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),H=a.useMemo(()=>Array.isArray(R)&&R.length>0?R:[...Xn],[R]),X=a.useMemo(()=>df(H,p,we,_,me,ie),[H,p,we,_,me,ie]),Re=co(e),de=a.useMemo(()=>fn.slice(0,p).map(Te=>we[Te]),[p,we]),D=a.useMemo(()=>as(p,Re,we),[p,Re,we]),ze=a.useMemo(()=>or(p,Re,we),[p,Re,we]),Fe=a.useMemo(()=>X.map((Te,Ge)=>Wc(ze[Ge]??0,Te.paddingLeft,Te.paddingRight)),[X,ze]),ot=a.useMemo(()=>{const Te=I===0?1/0:I;return(t??[]).slice(0,Te).map((Xe,dt)=>({id:dt,cells:Object.fromEntries(Xn.map(Pt=>[Pt,Xe[Pt]??""])),image:Xe.image,link:Xe.link}))},[t,I]),tt=le?M??E:ot.length,at=a.useMemo(()=>le?ot.slice(0,tt):ot,[ot,le,tt]),yt=le&&tt<ot.length,Ve=at.length>1||yt,ye=[re?`${c}-divider-top`:"",ge||Ve?`${c}-divider-bottom`:""].filter(Boolean).join(" "),Me=!n||i,je=()=>{if(!Me)return;const Te=M??E;if(!L){N(ot.length);return}N(Math.min(Te+L,ot.length))},Ee=Te=>S.scalingValue(Te,n??!1),Ce=f?W??0:z??0,_e=w??0,De=h??0,nt=Math.max(_e,Qr),pt=Us(0,at.length,re,ge,yt,g??0,n??!1).borderTopWidth,Qe=f?"rowPaddingTopB":"rowPaddingTop",St=X[0],ct=X[X.length-1],Ue=Fe[0],Ke=Fe[Fe.length-1],Oe=St&&Ue?Math.max(Ue.paddingLeft,Ri):0,ft=ct&&Ke?Math.max(Ke.paddingRight,Ri):0,mt=Re,gt=Te=>{const Ge=ne.current;if(!Ge)return{x:0,y:0};const Xe=Ge.getBoundingClientRect();return{x:Te.clientX-Xe.left+Ks,y:Te.clientY-Xe.top+Ks}},At=(Te,Ge)=>{if(!k)return;const Xe=Te.image;if(!(Xe!=null&&Xe.url)){te(null);return}const{x:dt,y:Pt}=gt(Ge),ht=(A==null?void 0:A.min)??80,it=(A==null?void 0:A.max)??320,Kt=(Q==null?void 0:Q.rowId)===Te.id?Q.widthPx:lf(ht,it);te({rowId:Te.id,url:Xe.url,objectFit:"contain",isVideo:Rh(Xe),widthPx:Kt,x:dt,y:Pt})},Zt=Te=>{if(!k||!Q)return;const{x:Ge,y:Xe}=gt(Te);te(dt=>!dt||dt.x===Ge&&dt.y===Xe?dt:{...dt,x:Ge,y:Xe})},tn=()=>{te(null)},$t=Te=>{j&&Gs(Te,c),k&&te(null)},Tt=Te=>{j&&qs(Te,c)};a.useLayoutEffect(()=>{if(!u||f){Ie(null);return}const Te=Z.current,Ge=Te==null?void 0:Te.parentElement;if(!Te||!Ge){Ie(null);return}const Xe=()=>{const Pt=Te.querySelector("[data-list-row]");if(!Pt){Ie(null);return}const ht=Ge.getBoundingClientRect(),it=Pt.getBoundingClientRect();Ie(it.top-ht.top+it.height/2)};Xe();const dt=new ResizeObserver(Xe);return dt.observe(Te),dt.observe(Ge),()=>dt.disconnect()},[u,f,at,Ce,_e,De,t,e,X,ze,ue,g,re,ge,yt]);const Ht=a.useMemo(()=>!f&&is.some(Te=>{const Ge=Te.charAt(0),Xe=e[`${Te}VerticalAlign`];return kc(Xe,e,Ge)}),[f,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);a.useLayoutEffect(()=>{var Kt;const Te=ne.current;if(!Te)return;const Ge=()=>{Te.querySelectorAll("[data-list-col]").forEach(Ze=>{Ze.style.transform="";const Je=Ze.querySelector(`.${c}-list-col`);Je&&(Je.style.minHeight="",Je.style.height="");const st=Ze.querySelector(`.${c}-list-col-title`);st&&(st.style.transform="")})};if(f||!Ht){Ge();return}const Xe=()=>{const Ze=Array.from(Te.querySelectorAll("[data-list-row]")),Je=`${c}-list-col`,st=`${c}-baseline-probe`;Ze.forEach(Mt=>{Mt.querySelectorAll("[data-list-col]").forEach(Et=>{Et.style.transform="";const xt=Et.querySelector(`.${Je}`);xt&&(xt.style.minHeight="",xt.style.height="");const _t=Et.querySelector(`.${c}-list-col-title`);_t&&(_t.style.transform="")})}),Ze.forEach(Mt=>{const Et=Array.from(Mt.querySelectorAll("[data-list-col]"));zh(Mt,Et,Je)}),Te.offsetHeight,Ze.forEach(Mt=>{const Et=Array.from(Mt.querySelectorAll("[data-list-col]")),xt=Mt.getBoundingClientRect().top,_t=new Map,zt=Et.map(Ct=>{const Ut=Ct.querySelector(`.${c}-list-col-title`),Xt={el:Ct,titleEl:Ut,letter:Ct.getAttribute("data-col-letter")??"",kind:Ct.getAttribute("data-valign")??"top",anchor:Ct.getAttribute("data-valign-anchor")};return _t.set(Xt.letter,Xt),Xt}),jt=new Map,qt=(Ct,Ut)=>{const Xt=jt.get(Ct.letter);if(Xt!==void 0)return Xt;const Yt=Ct.anchor?_t.get(Ct.anchor):void 0;if(Ct.kind!=="baseline"||!Yt||Ut.has(Ct.letter)){const ve=Jr(Ct,xt,Je,st);return jt.set(Ct.letter,ve),ve}Ut.add(Ct.letter);const Jt=qt(Yt,Ut);Ut.delete(Ct.letter);const Bt=Jr(Ct,xt,Je,st),Lt=Jt-Bt;Bh(Ct.titleEl,Lt);const b=Jr(Ct,xt,Je,st);return jt.set(Ct.letter,b),b};zt.forEach(Ct=>qt(Ct,new Set))})};let dt=null;const Pt=()=>{dt===null&&(dt=requestAnimationFrame(()=>{dt=null,Xe()}))};Xe();const ht=new ResizeObserver(()=>Pt());ht.observe(Te);let it=!1;return typeof document<"u"&&((Kt=document.fonts)!=null&&Kt.ready)&&document.fonts.ready.then(()=>{it||Pt()}),()=>{it=!0,dt!==null&&(cancelAnimationFrame(dt),dt=null),ht.disconnect(),Ge()}},[Ht,f,e,t,ue,at,ze]);const Wt=a.useMemo(()=>kh(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Wt}}),r.jsx("div",{style:Pe,children:r.jsxs("div",{ref:ne,className:`${c}-wrapper ${be}${ye?` ${ye}`:""}${f?` ${c}-type-b`:""}`.trim(),style:{width:S.scalingValue(x??0,n)},onMouseMove:k?Zt:void 0,onMouseLeave:k?tn:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[at.map((Te,Ge)=>{var ht;const Xe=(((ht=Te.link)==null?void 0:ht.length)??0)>0,dt=Xe&&(!n||i)?"a":"div",Pt=Us(Ge,at.length,re,ge,yt,g??0,n??!1);return r.jsxs(dt,{ref:Ge===0?it=>{Z.current=it}:void 0,className:`${c}-list-item${Xe||T==="always"?` ${c}-list-item-has-link`:""}${yt&&Ge===at.length-1?` ${c}-list-item-before-cut`:""}`,...Xe?{href:Te.link,target:"_blank"}:{},style:Pt,onMouseEnter:it=>{j&&(Xe||T==="always")&&Gs(it,c),k&&At(Te,it)},onMouseLeave:it=>{j&&(Xe||T==="always")&&qs(it,c)},children:[Ce>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ee(Ce)}}),r.jsxs("div",{className:`${c}-list-cols-row${f?"":` ${c}-list-cols-row-h`}${u&&Ge===0&&f?` ${c}-list-cols-row-controls`:""}`,...f?{}:{"data-list-row":""},style:f?void 0:{minHeight:Ee(De)},children:[X.map((it,Kt)=>{const Ze=Kt===X.length-1,Je=Fe[Kt],st=it.paddingBottom,Mt=Eh(Te.cells[it.key]),Et=f&&Mt&&st>0,xt=f?{minHeight:Ee(De)}:{width:Ee(ze[Kt])},_t=f?{paddingLeft:Ee(ce),paddingRight:Ee(ce)}:{paddingLeft:Ee(Je.paddingLeft),paddingRight:Ee(Je.paddingRight)},zt=it.textPrefix.charAt(0),jt=f?_h(e[`${it.textPrefix}VerticalAlign`]):Wh(e[`${it.textPrefix}VerticalAlign`],e,zt),qt=f&&Mt&&u&&Ge===0;return f&&!Mt?null:r.jsxs("div",{className:f?`${c}-list-col-wrap`:void 0,...f?{}:{"data-list-col":"","data-col-letter":zt,"data-valign":jt.kind,...jt.kind==="baseline"?{"data-valign-anchor":jt.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${Ze?` ${c}-list-col-last`:""}`,style:{..._t,...xt,...f?{justifyContent:Xs(jt.kind)}:{}},"data-test":it.width,children:r.jsx("span",{className:Zs(e,it.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...Ys(mr(e,it.textPrefix),n),...Js(e,it.textPrefix,c,n),...f?{}:Hh(jt.kind)},children:Te.cells[it.key]??null})}),Et&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ee(st)}}),qt&&r.jsx("div",{"data-controls":it.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:Ee(Math.max(st,Qr))}})]},it.key)}),u&&Ge===0&&f&&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($e),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:0,width:Ee(ke),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($e),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:Ee(Math.max(ke,Re-ke)),width:Ee(ke),height:"100%"}})]})]}),!f&&_e>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ee(_e)}}),u&&Ge===0&&!f&&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:Ee(nt)}})]},Te.id)}),u&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Qe,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":f?"center":"left-y",className:`${c}-control-anchor`,style:{top:pt,left:0,width:"100%",height:Ee(Math.max(Ce,Qr))}})},"row-padding-handles"),u&&!f&&St&&ct&&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(ze[0]-((Ue==null?void 0:Ue.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":fe??void 0,className:`${c}-control-anchor`,style:{top:0,left:0,width:Ee(Oe),height:"100%"}}),r.jsx("div",{"data-controls":ct.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[X.length-1]-((Ke==null?void 0:Ke.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":fe??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ee(mt-ft),width:Ee(ft),height:"100%"}})]},"column-edge-padding-handles"),u&&!f&&X.slice(0,-1).map((Te,Ge)=>{const Xe=X[Ge+1],dt=D.slice(0,Ge+1).reduce((Ze,Je)=>Ze+Je,0),Pt=Fe[Ge],ht=Fe[Ge+1],it=Math.max(Pt.paddingRight,Ri),Kt=Math.max(ht.paddingLeft,Ri);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx("div",{"data-controls":Te.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[Ge]-Pt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":fe??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ee(dt-it),width:Ee(it),height:"100%"}}),r.jsx("div",{"data-controls":Xe.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[Ge+1]-ht.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":fe??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ee(dt),width:Ee(Kt),height:"100%"}})]},`${Te.paddingRightKey}-padding`)}),u&&!f&&X.slice(0,-1).map((Te,Ge)=>{const Xe=sf(Ge,D,de,Re),Pt=D.slice(0,Ge+1).reduce((ht,it)=>ht+it,0)-Qs/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-min":String(rs),"data-controls-max-fraction":String(Xe),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ee(Pt),width:Ee(Qs),height:"calc(100%)",pointerEvents:"auto"}})},`${Te.widthKey}-junction`)})]}),yt&&(()=>{const Te=mr(e,An),Ge=Oh(e.cutLabelVerticalAlign),Xe=Te.textTextAlign==="justify"||f;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ee(C??0),cursor:Me?"pointer":"default",...Ph(ge,g??0,n??!1)},onClick:Me?je:void 0,onMouseEnter:j||k?$t:void 0,onMouseLeave:j?Tt:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...f?{paddingLeft:Ee(ce),paddingRight:Ee(ce)}:{},justifyContent:Dh(Te.textTextAlign),alignItems:Xs(Ge)},children:r.jsx("span",{className:Zs(e,An,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...Ys(Te,n),...Js(e,An,c,n),...Xe?{width:"100%"}:{}},children:K})})})})(),k&&Q&&(()=>{const Te=`${Q.widthPx}px`,Ge={width:Te,height:"auto",maxHeight:Te,objectFit:"contain",left:Q.x,top:Q.y,position:"absolute"};return r.jsx(Mh,{media:Q,className:Q.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:Ge},`${Q.rowId}-${Q.url}`)})()]})})]})}const pf=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
9248
9248
  import { CommonComponentProps } from '../props';
9249
9249
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
9250
9250
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -12118,7 +12118,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12118
12118
  </>
12119
12119
  );
12120
12120
  }
12121
- `,Ji=["A","B","C","D","E"],Zl=[...Sa,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],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"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Zh(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Go(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Jh(){return Object.fromEntries(Ji.map((e,t)=>{const n=Xn[t],i=`${e} column`;return[n,Zh(i)]}))}function Qh(){const e={};for(const t of Ji)e[`${t}ColumnWidth`]=Go(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Go(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Go(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Go(`${t} column padding bottom`);return e}function Jl(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Xn]};for(const l of Ji)i[`${l}ColumnWidth`]=l==="A"?.0798:.32,i[`${l}ColumnPaddingLeft`]=0,i[`${l}ColumnPaddingRight`]=0,i[`${l}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function ef(e){const t={};if(e===An)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Sa]},enum:[...Sa]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Zl],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Zl]}}return t[It(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[It(e,"textFontSettings")]={...ri.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[It(e,"textFontSize")]={...ri.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[It(e,"textLineHeight")]={...ri.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[It(e,"textLetterSpacing")]={...ri.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[It(e,"textWordSpacing")]={...ri.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[It(e,"textTextAlign")]={...ri.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[It(e,"textTextAppearance")]={...ri.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const tf=bo.reduce((e,t)=>({...e,...ef(t)}),{});function nf(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 of(e,t={}){var n;return{...nf(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Ql=new Set(["textFontFamily","textFontSettings"]);function rf(e,t,n){const i=l=>n===void 0?!0:n==="common"?Ql.has(l):!Ql.has(l),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=tl(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[It(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[It(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[It(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[It(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[It(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[It(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[It(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[It(e,"textTextAppearance")]=t.textTextAppearance),o}function rr(e={},t){return bo.reduce((n,i)=>({...n,...rf(i,of(i,e),t)}),{})}const af=rr(),lf=kh();function Ec(e){return[It(e,"textFontFamily"),It(e,"textFontSettings"),It(e,"textFontSize"),It(e,"textLineHeight"),It(e,"textLetterSpacing"),It(e,"textWordSpacing"),It(e,"textTextAlign"),It(e,"textTextAppearance"),`${e}VerticalAlign`]}function sf(){const e=[];return el.forEach((t,n)=>{const i=Xn[n],o=Ec(t);for(let l=1;l<Xn.length;l+=1){const s=[{name:"columns",value:l},...Array.from({length:l},(d,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:s,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const cf=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Ec(An);const df=[...Ji.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],ai=[{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"}],uf=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:ai[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:ai[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:ai[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:ai[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:ai[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:ai[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:ai[6],link:""}],pf=[...Ji.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],mf={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:{...Jh(),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:uf},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"}},...Qh(),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"}},...tf,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",...af,...rr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Jl({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},...rr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Jl({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},...rr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...sf(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...df.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}},...Ji.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",...pf]},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__",lf]}],paletteBookmark:{items:[...cf],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},gf={element:Xh,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Bh(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:[...bo.map(e=>({path:`${It(e,"textFontFamily")}`}))]},fontRelations:{...bo.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${It(t,"textFontFamily")}`}),{})},schema:mf,sourceCode:Yh},es=300,Hn=.004,hf={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"},ff=["hover","focus","filled","success","error"];function yf(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ts(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function ns(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:w.scalingValue((o-t)/2,i)}}function vf(e){return`
12121
+ `,Ji=["A","B","C","D","E"],tl=[...Ca,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],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"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function mf(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Go(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function gf(){return Object.fromEntries(Ji.map((e,t)=>{const n=Xn[t],i=`${e} column`;return[n,mf(i)]}))}function hf(){const e={};for(const t of Ji)e[`${t}ColumnWidth`]=Go(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Go(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Go(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Go(`${t} column padding bottom`);return e}function nl(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Xn]};for(const s of Ji)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 ff(e){const t={};if(e===An)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Ca]},enum:[...Ca]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...tl],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...tl]}}return t[Rt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Rt(e,"textFontSettings")]={...ri.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Rt(e,"textFontSize")]={...ri.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Rt(e,"textLineHeight")]={...ri.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Rt(e,"textLetterSpacing")]={...ri.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Rt(e,"textWordSpacing")]={...ri.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Rt(e,"textTextAlign")]={...ri.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Rt(e,"textTextAppearance")]={...ri.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const yf=xo.reduce((e,t)=>({...e,...ff(t)}),{});function vf(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 bf(e,t={}){var n;return{...vf(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const il=new Set(["textFontFamily","textFontSettings"]);function xf(e,t,n){const i=s=>n===void 0?!0:n==="common"?il.has(s):!il.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=os(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Rt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Rt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Rt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Rt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Rt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Rt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Rt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Rt(e,"textTextAppearance")]=t.textTextAppearance),o}function rr(e={},t){return xo.reduce((n,i)=>({...n,...xf(i,bf(i,e),t)}),{})}const wf=rr(),Sf=Uh();function Nc(e){return[Rt(e,"textFontFamily"),Rt(e,"textFontSettings"),Rt(e,"textFontSize"),Rt(e,"textLineHeight"),Rt(e,"textLetterSpacing"),Rt(e,"textWordSpacing"),Rt(e,"textTextAlign"),Rt(e,"textTextAppearance"),`${e}VerticalAlign`]}function $f(){const e=[];return is.forEach((t,n)=>{const i=Xn[n],o=Nc(t);for(let s=1;s<Xn.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 Cf=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Nc(An);const Tf=[...Ji.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],ai=[{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"}],Lf=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:ai[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:ai[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:ai[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:ai[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:ai[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:ai[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:ai[6],link:""}],If=[...Ji.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Rf={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:{...gf(),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:Lf},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"}},...hf(),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"}},...yf,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",...wf,...rr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:nl({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},...rr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:nl({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},...rr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...$f(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Tf.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}},...Ji.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",...If]},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__",Sf]}],paletteBookmark:{items:[...Cf],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Mf={element:uf,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>rf(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:[...xo.map(e=>({path:`${Rt(e,"textFontFamily")}`}))]},fontRelations:{...xo.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Rt(t,"textFontFamily")}`}),{})},schema:Rf,sourceCode:pf},ol=300,Hn=.004,Ef={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"},Pf=["hover","focus","filled","success","error"];function kf(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function rl(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function al(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:S.scalingValue((o-t)/2,i)}}function Af(e){return`
12122
12122
  .${e}-wrapper {
12123
12123
  box-sizing: border-box;
12124
12124
  display: flex;
@@ -12180,7 +12180,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12180
12180
  display: flex;
12181
12181
  align-items: center;
12182
12182
  justify-content: space-between;
12183
- gap: ${yf(20)};
12183
+ gap: ${kf(20)};
12184
12184
  width: 100%;
12185
12185
  min-width: 0;
12186
12186
  min-height: var(--${e}-question-min-height, unset);
@@ -12208,7 +12208,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12208
12208
  width: var(--${e}-icon-max-width);
12209
12209
  height: var(--${e}-icon-max-width);
12210
12210
  position: relative;
12211
- transition: transform ${es}ms ease;
12211
+ transition: transform ${ol}ms ease;
12212
12212
  }
12213
12213
  .${e}-icon-custom {
12214
12214
  display: flex;
@@ -12243,7 +12243,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12243
12243
  .${e}-panel {
12244
12244
  display: grid;
12245
12245
  grid-template-rows: 0fr;
12246
- transition: grid-template-rows ${es}ms ease;
12246
+ transition: grid-template-rows ${ol}ms ease;
12247
12247
  }
12248
12248
  .${e}-item-open .${e}-panel {
12249
12249
  grid-template-rows: 1fr;
@@ -12281,7 +12281,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12281
12281
  pointer-events: none;
12282
12282
  z-index: 2;
12283
12283
  }
12284
- `}function is(e,t,n,i,o,l,s,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:l??0,textAppearance:s,color:d??"#000000"}}function xf({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:l}){const{prefix:s}=w.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:b="solid",entryHoverEffect:S="default",autoclose:L="off",icon:h,iconMaxWidth:g=.00833,iconPaddingRight:y=0,iconAnimation:E="rotate 45",questionColor:R="#000000",answerColor:T="#000000",dividerColor:Y="#0000001F",iconColor:k="#000000",questionHoverColor:B="#666666",iconHoverColor:P="#666666",iconActiveColor:C="#000000",dividerHoverColor:z="#000000",questionFontFamily:v,questionFontSettings:W,questionFontSize:I,questionLineHeight:Z,questionLetterSpacing:A,questionWordSpacing:K,questionTextAppearance:V,answerFontFamily:G,answerFontSettings:ne,answerFontSize:$,answerLineHeight:M,answerLetterSpacing:H,answerWordSpacing:ee,answerTextAppearance:ie,questionPaddingLeft:F=0,questionPaddingTop:pe=0,questionPaddingBottom:x=0,answerPaddingLeft:re=0,answerPaddingRight:J=0,answerPaddingTop:fe=0,answerPaddingBottom:Re=0}=e,de=t??[],[se,q]=a.useState(()=>new Set),Q=!n||i;a.useEffect(()=>{q(new Set)},[L]),a.useEffect(()=>{n&&!o&&!i&&q(new Set)},[n,o,i]);const me=Ee=>w.scalingValue(Ee,n??!1),Ne=Math.max(F,Hn),$e=Math.max(pe,Hn),ke=Math.max(x,Hn),ue=Math.max(re,Hn),he=Math.max(J,Hn),Se=Math.max(fe,Hn),D=Math.max(Re,Hn),oe=Math.max(0,(c??1)-y-g),ge=Math.max(0,(c??1)-J),xe=Math.max(0,(c??1)-re),Le=Math.max(y,Hn),be=Math.max(0,(c??1)-F-g),_=a.useMemo(()=>se.size===0?0:Math.min(...se),[se]),ce=a.useCallback(Ee=>se.has(Ee),[se]),te=Q&&S==="default"?`${s}-entry-hover-default`:"",N=h??"",U=N!=="",Ie=E.replace(/^rotate /,""),le=`${s}-icon-anim-${Ie}`,j=on(Vt(is(v,W,I,Z,A,K,V,R),n)),ze=on(Vt(is(G,ne,$,M,H,ee,ie,T),n)),Ae=ts(I,Z,`${s}-question`,`${s}-text-tight-leading`),ot=ts($,M,`${s}-answer-text`,`${s}-text-tight-leading`),tt=ns(I,Z,s,n),at=ns($,M,s,n),yt=w.buildColorVars(s,{questionColor:R,answerColor:T,dividerColor:Y,iconColor:k,questionHoverColor:B,iconHoverColor:P,iconActiveColor:C,dividerHoverColor:z},hf,ff),Ve=l&&l!=="default"?`${s}-state-${l}`:"",ye=a.useCallback(Ee=>{Q&&q(Ce=>{if(Ce.has(Ee)){const je=new Set(Ce);return je.delete(Ee),je}if(L==="on")return new Set([Ee]);const We=new Set(Ce);return We.add(Ee),We})},[Q,L]),Me=a.useMemo(()=>vf(s),[s]),De={[`--${s}-divider-width`]:w.scalingValue(p,n??!1),[`--${s}-divider-style`]:b,[`--${s}-icon-max-width`]:w.scalingValue(g,n??!1),...u>0?{[`--${s}-question-min-height`]:w.scalingValue(u,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Me}}),r.jsx("div",{style:yt,children:r.jsx("div",{className:ut(`${s}-wrapper`,n&&!i&&`${s}-editor`,te,Ve),style:{width:w.scalingValue(c,n??!1),maxWidth:"100%",...De},children:de.map((Ee,Ce)=>{var St;const We=ce(Ce),je=((St=Ee.question)==null?void 0:St.trim())??"",nt=Ee.answer,pt=((nt==null?void 0:nt.length)??0)>0,Qe=d&&Ce===_;return r.jsxs("div",{className:ut(`${s}-item`,We&&`${s}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${s}-question-controls`,children:[Qe&&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:`${s}-control-anchor`,style:{top:0,left:0,width:"100%",height:me($e)}}),r.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(oe),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${s}-control-anchor`,style:{top:0,left:0,width:me(Ne),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(be),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${s}-control-anchor`,style:{top:0,right:0,width:me(Le),height:"100%"}})]}),r.jsxs("button",{type:"button",className:`${s}-question-button`,"aria-expanded":We,style:{...j,...tt,paddingLeft:me(F),paddingRight:me(y)},onClick:()=>ye(Ce),children:[pe>0&&r.jsx("span",{className:`${s}-padding-handle`,style:{height:me(pe)},"aria-hidden":"true"}),r.jsxs("span",{className:`${s}-question-row`,children:[r.jsx("span",{className:Ae,children:je}),pt&&(U?r.jsx("span",{className:`${s}-icon ${s}-icon-custom ${le}`,"aria-hidden":"true",children:r.jsx(rn,{url:N,fill:k,hoverFill:P,className:`${s}-icon-image`})}):r.jsx("span",{className:`${s}-icon ${s}-icon-default ${le}`,"aria-hidden":"true"}))]}),x>0&&r.jsx("span",{className:`${s}-padding-handle`,style:{height:me(x)},"aria-hidden":"true"})]}),Qe&&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:`${s}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:me(ke)}})]}),pt&&nt&&r.jsx("div",{className:`${s}-panel`,"aria-hidden":!We,children:r.jsx("div",{className:`${s}-panel-inner`,children:r.jsxs("div",{className:`${s}-answer-controls`,children:[Qe&&We&&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:`${s}-control-anchor`,style:{top:0,left:0,width:"100%",height:me(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(ge),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${s}-control-anchor`,style:{top:0,left:0,width:me(ue),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(xe),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${s}-control-anchor`,style:{top:0,right:0,width:me(he),height:"100%"}})]}),fe>0&&r.jsx("div",{className:`${s}-padding-handle`,style:{height:me(fe)}}),r.jsx("div",{className:`${s}-answer`,style:{...ze,...at,paddingLeft:me(re),paddingRight:me(J)},children:r.jsx("div",{className:ot,children:r.jsx(yi,{content:nt})})}),Re>0&&r.jsx("div",{className:`${s}-padding-handle`,style:{height:me(Re)}}),Qe&&We&&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:`${s}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:me(D)}})]})})})]},Ce)})})})]})}const bf=`import { useCallback, useEffect, useMemo, useState } from 'react';
12284
+ `}function sl(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 Ff({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:l}=S.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:v="solid",entryHoverEffect:x="default",autoclose:I="off",icon:h,iconMaxWidth:g=.00833,iconPaddingRight:y=0,iconAnimation:E="rotate 45",questionColor:L="#000000",answerColor:C="#000000",dividerColor:K="#0000001F",iconColor:A="#000000",questionHoverColor:B="#666666",iconHoverColor:P="#666666",iconActiveColor:T="#000000",dividerHoverColor:z="#000000",questionFontFamily:w,questionFontSettings:W,questionFontSize:R,questionLineHeight:J,questionLetterSpacing:F,questionWordSpacing:U,questionTextAppearance:V,answerFontFamily:G,answerFontSettings:oe,answerFontSize:$,answerLineHeight:M,answerLetterSpacing:N,answerWordSpacing:Q,answerTextAppearance:te,questionPaddingLeft:k=0,questionPaddingTop:le=0,questionPaddingBottom:f=0,answerPaddingLeft:ne=0,answerPaddingRight:Z=0,answerPaddingTop:fe=0,answerPaddingBottom:Ie=0}=e,ue=t??[],[se,q]=a.useState(()=>new Set),ee=!n||i;a.useEffect(()=>{q(new Set)},[I]),a.useEffect(()=>{n&&!o&&!i&&q(new Set)},[n,o,i]);const ce=Ee=>S.scalingValue(Ee,n??!1),ke=Math.max(k,Hn),$e=Math.max(le,Hn),Pe=Math.max(f,Hn),pe=Math.max(ne,Hn),he=Math.max(Z,Hn),be=Math.max(fe,Hn),j=Math.max(Ie,Hn),re=Math.max(0,(c??1)-y-g),ge=Math.max(0,(c??1)-Z),xe=Math.max(0,(c??1)-ne),Le=Math.max(y,Hn),we=Math.max(0,(c??1)-k-g),_=a.useMemo(()=>se.size===0?0:Math.min(...se),[se]),me=a.useCallback(Ee=>se.has(Ee),[se]),ie=ee&&x==="default"?`${l}-entry-hover-default`:"",H=h??"",X=H!=="",Re=E.replace(/^rotate /,""),de=`${l}-icon-anim-${Re}`,D=on(Vt(sl(w,W,R,J,F,U,V,L),n)),ze=on(Vt(sl(G,oe,$,M,N,Q,te,C),n)),Fe=rl(R,J,`${l}-question`,`${l}-text-tight-leading`),ot=rl($,M,`${l}-answer-text`,`${l}-text-tight-leading`),tt=al(R,J,l,n),at=al($,M,l,n),yt=S.buildColorVars(l,{questionColor:L,answerColor:C,dividerColor:K,iconColor:A,questionHoverColor:B,iconHoverColor:P,iconActiveColor:T,dividerHoverColor:z},Ef,Pf),Ve=s&&s!=="default"?`${l}-state-${s}`:"",ye=a.useCallback(Ee=>{ee&&q(Ce=>{if(Ce.has(Ee)){const De=new Set(Ce);return De.delete(Ee),De}if(I==="on")return new Set([Ee]);const _e=new Set(Ce);return _e.add(Ee),_e})},[ee,I]),Me=a.useMemo(()=>Af(l),[l]),je={[`--${l}-divider-width`]:S.scalingValue(p,n??!1),[`--${l}-divider-style`]:v,[`--${l}-icon-max-width`]:S.scalingValue(g,n??!1),...u>0?{[`--${l}-question-min-height`]:S.scalingValue(u,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Me}}),r.jsx("div",{style:yt,children:r.jsx("div",{className:ut(`${l}-wrapper`,n&&!i&&`${l}-editor`,ie,Ve),style:{width:S.scalingValue(c,n??!1),maxWidth:"100%",...je},children:ue.map((Ee,Ce)=>{var St;const _e=me(Ce),De=((St=Ee.question)==null?void 0:St.trim())??"",nt=Ee.answer,pt=((nt==null?void 0:nt.length)??0)>0,Qe=d&&Ce===_;return r.jsxs("div",{className:ut(`${l}-item`,_e&&`${l}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${l}-question-controls`,children:[Qe&&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:ce($e)}}),r.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","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,left:0,width:ce(ke),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(we),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:ce(Le),height:"100%"}})]}),r.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":_e,style:{...D,...tt,paddingLeft:ce(k),paddingRight:ce(y)},onClick:()=>ye(Ce),children:[le>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:ce(le)},"aria-hidden":"true"}),r.jsxs("span",{className:`${l}-question-row`,children:[r.jsx("span",{className:Fe,children:De}),pt&&(X?r.jsx("span",{className:`${l}-icon ${l}-icon-custom ${de}`,"aria-hidden":"true",children:r.jsx(rn,{url:H,fill:A,hoverFill:P,className:`${l}-icon-image`})}):r.jsx("span",{className:`${l}-icon ${l}-icon-default ${de}`,"aria-hidden":"true"}))]}),f>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:ce(f)},"aria-hidden":"true"})]}),Qe&&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:ce(Pe)}})]}),pt&&nt&&r.jsx("div",{className:`${l}-panel`,"aria-hidden":!_e,children:r.jsx("div",{className:`${l}-panel-inner`,children:r.jsxs("div",{className:`${l}-answer-controls`,children:[Qe&&_e&&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:ce(be)}}),r.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ge),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:ce(pe),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(xe),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:ce(he),height:"100%"}})]}),fe>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:ce(fe)}}),r.jsx("div",{className:`${l}-answer`,style:{...ze,...at,paddingLeft:ce(ne),paddingRight:ce(Z)},children:r.jsx("div",{className:ot,children:r.jsx(yi,{content:nt})})}),Ie>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:ce(Ie)}}),Qe&&_e&&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:ce(j)}})]})})})]},Ce)})})})]})}const Wf=`import { useCallback, useEffect, useMemo, useState } from 'react';
12285
12285
  import cn from 'classnames';
12286
12286
  import { CommonComponentProps } from '../props';
12287
12287
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -13027,7 +13027,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
13027
13027
  </>
13028
13028
  );
13029
13029
  }
13030
- `;function On(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const os={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},wf=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Sf={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:On("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:{...os.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:{...os.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:On("Question Padding Left"),questionPaddingTop:On("Question Padding Top"),questionPaddingBottom:On("Question Padding Bottom"),answerPaddingLeft:On("Answer Padding Left"),answerPaddingRight:On("Answer Padding Right"),answerPaddingTop:On("Answer Padding Top"),answerPaddingBottom:On("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:[...wf],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},$f={element:xf,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:Sf,sourceCode:bf},Fn=e=>e.display==="cover",Pr=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},rs=100,Cf=.2,as=8,Pc=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,l]=a.useState(0),[s,d]=a.useState(!1),c=a.useRef(null),u=a.useRef(0);u.current=o;const p=a.useMemo(()=>typeof window>"u"?rs:Math.max(rs,window.innerHeight*Cf),[]),b=a.useCallback(v=>Math.max(0,1-v/(p*1.5)),[p]),S=a.useCallback(v=>Math.max(0,1-v/(p*.45)),[p]),L=a.useCallback(v=>{const W=typeof window<"u"?window.innerHeight:800,I=Math.max(.88,1-v/W*.12);return`translateY(${v}px) scale(${I})`},[]),h=a.useCallback(()=>{c.current=null},[]),g=a.useCallback(()=>{d(!0),l(0),window.setTimeout(()=>d(!1),n),h()},[n,h]),y=a.useCallback(()=>{const v=typeof window<"u"?window.innerHeight:800;d(!0),l(v),window.setTimeout(()=>{t(),h(),d(!1)},Math.min(n,200))},[n,t,h]),E=a.useCallback(v=>{!e||s||v.pointerType==="touch"&&(i!=null&&i(v.target)||(c.current={startX:v.clientX,startY:v.clientY,isLocked:null,pointerId:v.pointerId}))},[e,s,i]),R=a.useCallback(v=>{const W=c.current;if(!e||!W||v.pointerType!=="touch"||W.pointerId!==v.pointerId)return;const I=v.clientX-W.startX,Z=v.clientY-W.startY;if(W.isLocked===null){if(Math.abs(I)<as&&Math.abs(Z)<as)return;if(Z>0&&Z>Math.abs(I))W.isLocked=!0,v.currentTarget.setPointerCapture(v.pointerId);else{W.isLocked=!1,h();return}}if(!W.isLocked)return;v.preventDefault();const A=Math.max(0,Z);u.current=A,l(A)},[e,h]),T=a.useCallback(v=>{const W=c.current;if(!e||!W||v.pointerType!=="touch"||W.pointerId!==v.pointerId)return;const I=W.isLocked===!0;if(v.currentTarget.hasPointerCapture(v.pointerId)&&v.currentTarget.releasePointerCapture(v.pointerId),!I){h();return}v.clientY-W.startY>=p?y():g()},[p,y,e,h,g]),Y=a.useCallback(v=>{T(v)},[T]),k=a.useCallback(v=>{T(v)},[T]),B=o>0,P=s?`transform ${n}ms ease`:"none",C=s?`opacity ${n}ms ease`:"none",z=o>0||s;return{isSwipeDragging:B,backdropStyle:{opacity:b(o),transition:C},mediaAreaStyle:{transform:L(o),transition:P,touchAction:B?"none":void 0,willChange:B?"transform":void 0},overlayContentStyle:z?{opacity:S(o),transition:C}:void 0,swipeHandlers:e?{onPointerDown:E,onPointerMove:R,onPointerUp:Y,onPointerCancel:k}:{},dismissAreaStyle:e?{touchAction:B?"none":"pan-x"}:void 0}},Tf="[data-lightbox-scrollable]",kc=()=>{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,l=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 s=d=>{const c=d.target;c instanceof Element&&c.closest(Tf)||d.preventDefault()};return document.addEventListener("touchmove",s,{passive:!1}),()=>{document.removeEventListener("touchmove",s),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=l,window.scrollTo({top:e,left:0,behavior:"instant"})}},[])},Lf=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Rf=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},If=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Mf=(e,t,n,{duration:i,easing:o,onComplete:l})=>{const s=e.scrollLeft,d=n-s,c=s-n,u=(h,g)=>{Rf(t),e.scrollLeft=h,g&&(l==null||l())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let p=!1,b=0;const S=()=>{t.removeEventListener("transitionend",L),clearTimeout(b)},L=h=>{h.target!==t||h.propertyName!=="transform"||p||(p=!0,S(),u(n,!0))};return t.addEventListener("transitionend",L),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)`,b=window.setTimeout(()=>{p||(p=!0,S(),u(n,!0))},i+64),()=>{p||(p=!0,S(),u(s-If(t),!1))}},uo=300,Ef=900,Pf=1500,kf="cubic-bezier(0.16, 1, 0.3, 1)",Af=3e3,Ff=2,Wf=16,_f=.05,Nf=1,qo=.3,Hf=50,Of=20,Si=.004,Gi=["title1","title2","title3"],jf={title1:"1",title2:"2",title3:"3"},Df={title1:"title1Color",title2:"title2Color",title3:"title3Color"},zf={title1:.02,title2:.02,title3:.02},Uo=e=>`max(${e}, ${Of}px)`,Bf=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]}},Vf=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=Bf(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Nt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Gf=e=>[Nt(e,"fontFamily"),Nt(e,"fontSettings"),{type:"row",items:[Nt(e,"fontSize"),Nt(e,"lineHeight"),Nt(e,"letterSpacing"),Nt(e,"wordSpacing")]},Nt(e,"textAlign"),Nt(e,"textAppearance")],qf=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Gi.map(e=>[jf[e],Gf(e)]))}),ol=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((l,s)=>l+s,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:l,widths:s},d)=>{if(l<=0||d<=0)return{overflow:l,widths:[d,...s]};const c=Math.min(l,d);return{overflow:l-c,widths:[d-c,...s]}},{overflow:i-1,widths:[]});return o},Ac=(e,t)=>ol(e,t),Ko=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},ls=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:ol(e.length,n),effective:Ac(e.length,n)}},Uf=(e,t,n,i,o,l,s)=>{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:l,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:s,text:i}),d},ea=(e,t)=>{const n=i=>{const o=Nt(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]]}},Kf=(e,t,n,i)=>e.slice(0,i).reduce((o,l,s)=>o+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(t[s]??0),0),ta=(e,t,n)=>{var o,l;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((l=t.fontSettings)==null?void 0:l.fontStyle)??"normal"},fontSize:t.fontSize??zf[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Vt(i,n)},Xf=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,onClose:s})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:b,closeIcon:S,closeIconMaxWidth:L,closeIconColor:h,closeIconHoverColor:g,thumbnailTrigger:y,thumbnailVisibility:E,thumbnailObjectFit:R,thumbnailActive:T,thumbnailActiveColor:Y,title1Width:k,title2Width:B,title3Width:P,title1MarginLeft:C=0,title2MarginLeft:z=0,title3MarginLeft:v=0,titleRowMarginBottom:W=0,titleHeaderLayout:I="desktop",contentMarginTop:Z,iconMarginLeft:A}=n,K=m=>w.scalingValue(m,i??!1),V=c??n.thumnailSize??.03,G=K(V),ne=K(u),$=K(p??.02),M=K(b??0),H=K(Z??0),ee=Uo(H),ie=K(A??0),[F,pe]=a.useState(0),x=a.useRef(F);x.current=F;const re=t[F],{title1:J,title2:fe,title3:Re}=Vf(re),de=ta("title1",ea(n,"title1"),i),se=ta("title2",ea(n,"title2"),i),q=ta("title3",ea(n,"title3"),i),Q=I==="mobile",me=!o&&(!i||l),Ne=me,$e=me,ke=me,ue=Fn(R),he=ue?{"--image-aspect-ratio":Pr(R)}:void 0,Se=!!(J||fe||Re),D=a.useMemo(()=>Uf(e,J,fe,Re,de,se,q),[e,F,J,fe,Re,de,se,q]),oe=a.useMemo(()=>({title1Width:k,title2Width:B,title3Width:P}),[k,B,P]),ge=a.useMemo(()=>D.map(m=>oe[m.widthKey]),[D,oe]),xe=a.useMemo(()=>ol(D.length,ge),[D.length,ge]),Le=a.useMemo(()=>Ac(D.length,ge),[D.length,ge]),be=a.useMemo(()=>D.filter(m=>m.prefix==="title1"),[D]),_=a.useMemo(()=>D.filter(m=>m.prefix==="title2"||m.prefix==="title3"),[D]),ce=a.useMemo(()=>ls(be,oe),[be,oe]),te=a.useMemo(()=>ls(_,oe),[_,oe]),N=a.useCallback((m,O)=>{const X=D.indexOf(m);if(!Q||O==="single-row")return{effectiveWidth:Le[X]??0,resolvedWidth:xe[X]??0,maxWidth:Ko(X,xe)};if(O==="two-row-top"){const Pe=be.indexOf(m);return{effectiveWidth:ce.effective[Pe]??0,resolvedWidth:ce.resolved[Pe]??0,maxWidth:Ko(Pe,ce.resolved)}}const we=_.indexOf(m);return{effectiveWidth:te.effective[we]??0,resolvedWidth:te.resolved[we]??0,maxWidth:Ko(we,te.resolved)}},[_,te,Le,xe,D,be,ce,Q]),U=a.useCallback(m=>w.scalingValue(m,i??!1),[i]),Ie=U(W??0),le=a.useMemo(()=>({title1MarginLeft:C,title2MarginLeft:z,title3MarginLeft:v}),[C,z,v]),j=a.useCallback(m=>D.slice(0,m+1).reduce((O,X,we)=>O+(X!=null&&X.marginLeftKey?le[X.marginLeftKey]??0:0)+(xe[we]??0),0)+(Q?0:C??0),[D,le,xe,Q,C]),ze=a.useCallback(()=>Q?0:C??0,[Q,C]),Ae=a.useCallback(m=>_.slice(0,m).reduce((O,X,we)=>O+(X.marginLeftKey?le[X.marginLeftKey]??0:0)+(te.resolved[we]??0),0),[_,te.resolved,le]),ot=a.useCallback(m=>{const O=_[m];return Ae(m)+(O.marginLeftKey?le[O.marginLeftKey]??0:0)+(te.resolved[m]??0)},[_,te.resolved,Ae,le]),tt=(m,O)=>{const X=m.marginLeftKey?le[m.marginLeftKey]??0:0,{effectiveWidth:we,resolvedWidth:Pe,maxWidth:qe}=N(m,O),xt=o&&O==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":m.prefix,style:{...O==="single-row"?{gridArea:m.prefix}:{},width:U(we),...X>0?{marginLeft:U(X)}:{}},children:[r.jsx("p",{className:m.className,style:m.style,children:m.text}),xt&&m.marginLeftKey&&r.jsx("div",{"data-controls":m.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Pe),style:{position:"absolute",top:0,left:U(-X),width:`max(${U(X)}, 10px)`,height:"100%",pointerEvents:"auto"}}),xt&&r.jsx("div",{"data-controls":m.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(qe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:U(-Si/2),width:U(Si),height:"100%",pointerEvents:"auto"}})]},m.className)},at=()=>{const m=Q?-1:D.findIndex(we=>we.prefix==="title1"),O=!Q&&(o||(C??0)>0)?(()=>{const we=C??0,Pe=m>=0?xe[m]:k??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Pe),style:{position:"absolute",top:0,left:0,width:`max(${U(we)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,X=D.flatMap((we,Pe)=>{if(!we.marginLeftKey)return[];const qe=le[we.marginLeftKey]??0,xt=Kf(D,xe,le,Pe)+ze();return r.jsx("div",{"data-controls":we.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(xe[Pe]),style:{position:"absolute",top:0,left:U(xt),width:`max(${U(qe)}, 10px)`,height:"100%",pointerEvents:"auto"}},we.marginLeftKey)});return O?[O,...X]:X},yt=()=>D.map((m,O)=>{const X=Ko(O,xe),Pe=j(O)-Si/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":m.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(X),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:U(Pe),width:U(Si),height:"100%",pointerEvents:"auto"}})},`${m.widthKey}-junction`)}),Ve=()=>_.flatMap((m,O)=>{if(!m.marginLeftKey)return[];const X=le[m.marginLeftKey]??0,we=Ae(O),{resolvedWidth:Pe}=N(m,"two-row-bottom");return r.jsx("div",{"data-controls":m.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Pe),style:{position:"absolute",top:0,left:U(we),width:`max(${U(X)}, 10px)`,height:"100%",pointerEvents:"auto"}},m.marginLeftKey)}),ye=()=>_.map((m,O)=>{const{maxWidth:X}=N(m,"two-row-bottom"),Pe=ot(O)-Si/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":m.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(X),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:U(Pe),width:U(Si),height:"100%",pointerEvents:"auto"}})},`${m.widthKey}-junction`)}),Me=a.useRef(null),De=a.useRef(null),Ee=a.useRef(null),Ce=a.useRef(null),We=a.useRef([]),je=a.useRef([]),nt=a.useRef(0),pt=a.useRef(null),Qe=a.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),St=a.useRef(null),ct=a.useRef(null),Ue=a.useRef(0),Ke=a.useRef("forward"),Oe=a.useRef(0),ft=a.useRef(null),mt=a.useRef(!1),gt=t.length>1&&(!o||!!l),At=gt?3:1,Zt=a.useMemo(()=>Array.from({length:At},()=>t).flat(),[t,At]),[tn,$t]=a.useState(!1),[Tt,Ht]=a.useState(!1),[Wt,Te]=a.useState(!0),Ge=a.useRef(null),Xe=a.useRef(null),dt=a.useRef(!1),Pt=a.useRef(!1),ht=a.useRef(null),it=a.useRef(null),Kt=Ne&&!Wt,Ze=a.useCallback(()=>{Ne&&(Te(!0),it.current&&clearTimeout(it.current),it.current=setTimeout(()=>{Qe.current.isActive||Te(!1)},Af))},[Ne]),Je=a.useCallback(()=>{o||Pt.current||(Pt.current=!0,Ht(!1),ht.current=setTimeout(()=>{s()},uo))},[o,s]),lt=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":Kt?"true":"false",style:{width:w.scalingValue(L??0,i),height:w.scalingValue(L??0,i),marginRight:ie,"--close-icon-hover-color":g},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Je,"aria-label":"Close",children:r.jsx(rn,{url:S,fill:h,hoverFill:i&&!l?h:g,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:ie,height:"100%",pointerEvents:"auto"}})]}),Mt=(m="two-row")=>r.jsx("div",{...m==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:U(C??0),flexShrink:0,...m==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...m==="two-row"&&o?{pointerEvents:"auto"}:{}}}),Et=()=>{const m=D.find(we=>we.prefix==="title1"),O=D.filter(we=>we.prefix==="title2"||we.prefix==="title3"),X=O.length>0||o||(W??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(C??0)>0||o?Mt():null,m&&tt(m,"two-row-top"),S&&lt()]}),X?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[O.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[O.map(we=>tt(we,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[Ve(),ye()]})]}):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:Ie,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},bt=()=>r.jsxs(r.Fragment,{children:[(C??0)>0||o?Mt("single-row"):null,D.map(m=>tt(m,"single-row")),o?r.jsxs(r.Fragment,{children:[at(),yt()]}):null,S?lt():null]}),_t=a.useCallback(m=>!!(m.closest("[data-controls]")||m.closest(`.${e}-thumbnails`)||m.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:zt,backdropStyle:Dt,mediaAreaStyle:qt,overlayContentStyle:Ct,swipeHandlers:Ut,dismissAreaStyle:Xt}=Pc({enabled:me??!1,onClose:Je,animMs:uo,isBlockedTarget:_t}),Yt=()=>{if(!gt||t.length===0)return nt.current=0,0;const m=je.current[0],O=je.current[t.length];if(!m||!O)return nt.current;const X=O.offsetLeft-m.offsetLeft;return X>0&&(nt.current=X),nt.current},Jt=(m=!1)=>{if(!gt)return;const O=De.current,X=Yt();!O||X<=0||X<O.clientWidth*.25||(O.scrollLeft<=0?(O.scrollLeft+=X,m&&(Qe.current.scrollLeft+=X),mt.current&&(Oe.current+=X)):O.scrollLeft>=X*2&&(O.scrollLeft-=X,m&&(Qe.current.scrollLeft-=X),mt.current&&(Oe.current-=X)))},Bt=(m,O=(X=>(X=De.current)==null?void 0:X.scrollLeft)()??0)=>{if(!gt)return m;let we=t.length+m,Pe=1/0;for(let qe=0;qe<At;qe++){const xt=qe*t.length+m,Rt=je.current[xt];if(!Rt)continue;const nn=Math.abs(Rt.offsetLeft-O);nn<Pe&&(Pe=nn,we=xt)}return we},Lt=m=>{const O=De.current;return!m||!O?!1:m.offsetWidth>O.clientWidth+1},f=m=>{const O=De.current;if(!m||!O||!Lt(m))return!1;const X=m.offsetLeft,we=X+m.offsetWidth;return O.scrollLeft>=X-1&&O.scrollLeft+O.clientWidth<=we+1},ve=(m=(O=>(O=De.current)==null?void 0:O.scrollLeft)()??0)=>{for(let we=0;we<je.current.length;we+=1){const Pe=je.current[we];if(Pe&&f(Pe))return we}let X={flatIndex:0,distance:1/0};return je.current.forEach((we,Pe)=>{if(!we)return;const qe=Math.abs(we.offsetLeft-m);qe<X.distance&&(X={flatIndex:Pe,distance:qe})}),X.flatIndex},Fe=m=>{De.current&&je.current.forEach(O=>{O&&(O.style.scrollSnapAlign=Lt(O)&&m==="backward"?"end":"start")})},_e=(m,O,X)=>{const we=m-O,Pe=ve(O),qe=je.current[Pe];if(f(qe))return ve(m)%t.length;const xt=je.current[Pe+1],Rt=qe?xt?xt.offsetLeft-qe.offsetLeft:qe.offsetWidth:0,nn=Rt>0?we>Rt*qo?1:we<-Rt*qo?-1:0:0;return nn===0?X:gt?(X+nn+t.length)%t.length:Math.max(0,Math.min(t.length-1,X+nn))},st=a.useCallback((m=!1)=>{if(E!=="on"||o)return;const O=Ce.current,X=x.current,we=We.current[X];if(!O||!we||O.scrollWidth<=O.clientWidth)return;const Pe=O.scrollLeft,qe=Pe+O.clientWidth,xt=we.offsetLeft,Rt=xt+we.offsetWidth;if(xt>=Pe&&Rt<=qe)return;const nn=O.scrollWidth-O.clientWidth;let Qt=Pe;if(!m&&Ge.current===null){const bi=We.current[X-1],Qi=We.current[X+1],_o=bi?we.offsetLeft-bi.offsetLeft:Qi?Qi.offsetLeft-we.offsetLeft:we.offsetWidth;Rt>qe?Qt+=_o:xt<Pe&&(Qt-=_o)}else Rt>qe?Qt=Rt-O.clientWidth:Qt=xt;O.scrollLeft=Math.max(0,Math.min(nn,Qt))},[o,E]),Ft=a.useCallback((m=!1)=>{m&&(dt.current=!0),Xe.current===null&&(Xe.current=requestAnimationFrame(()=>{Xe.current=null;const O=dt.current;dt.current=!1,st(O)}))},[st]),et=a.useCallback(m=>{if(m===x.current)return;const O=x.current;x.current=m;const X=Math.abs(m-O)>1,we=gt&&t.length>1&&(O===t.length-1&&m===0||O===0&&m===t.length-1);pe(m),Ft(X||we)},[t.length,gt,Ft]),vt=()=>{if(!De.current||t.length===0||Ge.current!==null||Qe.current.isActive&&Qe.current.hasMoved)return;const m=De.current.scrollLeft,O=ve(m)%t.length;O!==x.current&&et(O)},Ot=()=>{Ge.current=null},kt=m=>{const O=De.current;O&&(O.style.scrollSnapType=m?"":"none")},cn=()=>{var m;(m=ct.current)==null||m.call(ct),ct.current=null},dn=()=>{ft.current!==null&&(cancelAnimationFrame(ft.current),ft.current=null),mt.current=!1},ei=()=>{const m=De.current;if(!m){ft.current=null,mt.current=!1;return}const O=Oe.current-m.scrollLeft;if(Math.abs(O)<.5){m.scrollLeft=Oe.current,Jt(),vt(),ft.current=null,mt.current=!1;return}m.scrollLeft+=O*_f,Jt(),vt(),Ze(),ft.current=requestAnimationFrame(ei)},ti=()=>{const m=Ee.current;m&&(m.style.transition="",m.style.transform="",m.style.willChange="")},ko=(m,O,X,we)=>{ti(),m.scrollLeft=O,Ue.current=m.scrollLeft,Jt(),X!==void 0?(x.current=X,pe(X)):vt(),kt(!0),we==null||we()},Ao=(m,{behavior:O="smooth",activeIndex:X,onComplete:we}={})=>{const Pe=De.current,qe=Ee.current;if(!Pe||!qe)return;if(dn(),cn(),kt(!1),O==="auto"){ko(Pe,m,X,we);return}const xt=Math.abs(m-Pe.scrollLeft),Rt=Lf(xt,Ef,Pf,Pe.clientWidth*.55);ct.current=Mf(Pe,qe,m,{duration:Rt,easing:kf,onComplete:()=>{ct.current=null,ko(Pe,m,X,we)}})},Ar=(m="smooth")=>{const O=De.current;if(!O||t.length===0)return;const X=ve()%t.length,we=Bt(X,O.scrollLeft),Pe=je.current[we];Pe&&Ao(Pe.offsetLeft,{behavior:m,activeIndex:X})},Fr=(m,O="smooth",X,we)=>{const Pe=De.current;if(!Pe||t.length===0)return;const qe=(we??Pe.scrollLeft)-m,xt=ve(m),Rt=je.current[xt];if(f(Rt)){kt(!0),vt();return}const nn=je.current[xt+1],Qt=Rt?nn?nn.offsetLeft-Rt.offsetLeft:Rt.offsetWidth:0;if((Qt>0?qe>Qt*qo?1:qe<-Qt*qo?-1:0:0)!==0){const jc=X??xt%t.length,Dc=_e(we??Pe.scrollLeft,m,jc);Sn(Dc,O);return}const Qi=we??Pe.scrollLeft,_o=ve(Qi),rl=je.current[_o];if(rl&&Math.abs(rl.offsetLeft-Qi)<1){kt(!0),vt();return}Ar("auto")},Sn=(m,O="smooth")=>{const X=De.current;if(!X||t.length===0)return;const we=Bt(m,X.scrollLeft),Pe=je.current[we];Pe&&(O==="smooth"?Ge.current=m:Ge.current=null,x.current=m,pe(m),Ft(!0),Ao(Pe.offsetLeft,{behavior:O,activeIndex:m,onComplete:O==="smooth"?Ot:void 0}))},xi=()=>{St.current&&(window.removeEventListener("pointerup",St.current),window.removeEventListener("pointercancel",St.current),St.current=null)},Fo=(m,O,X,we,Pe)=>{const qe=X-m,xt=we-O,Rt=Math.abs(qe),nn=Math.abs(xt);if(Rt<Hf||Rt<=nn)return!1;const Qt=qe<0?1:-1,bi=gt?(Pe+Qt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Pe+Qt));return bi===Pe?!1:(Sn(bi),!0)},ni=m=>{if(!Qe.current.isActive)return;xi();const O=De.current;if(!O)return;const{scrollLeft:X,startActiveIndex:we,hasMoved:Pe}=Qe.current,qe=O.scrollLeft;Jt(!0),Qe.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},$t(!1),m!==void 0&&O.hasPointerCapture(m)&&O.releasePointerCapture(m),Pe?Fr(X,"smooth",we,qe):(kt(!0),vt()),Ze()},Wo=(m,O)=>{const X=pt.current;pt.current=null,X&&(Fo(X.startX,X.startY,m,O,X.startActiveIndex),Ze())},Wr=m=>{if(!$e)return;if(m.pointerType==="touch"){if(dn(),kt(!0),_t(m.target))return;pt.current={startX:m.clientX,startY:m.clientY,startActiveIndex:x.current};return}if(m.pointerType!=="mouse"||m.button!==0||_t(m.target))return;const O=De.current;if(!O)return;dn(),cn(),ti(),Ge.current=null,Qe.current={isActive:!0,startX:m.clientX,scrollLeft:O.scrollLeft,startActiveIndex:x.current,hasMoved:!1},kt(!1),Ze(),O.setPointerCapture(m.pointerId),xi();const X=we=>{we.pointerType==="mouse"&&ni(we.pointerId)};St.current=X,window.addEventListener("pointerup",X),window.addEventListener("pointercancel",X)},_r=m=>{if(!$e||m.pointerType!=="mouse")return;const O=De.current;if(!O||!Qe.current.isActive)return;if(m.buttons===0){ni(m.pointerId);return}const X=m.clientX-Qe.current.startX;Math.abs(X)>Nf&&(Qe.current.hasMoved=!0,$t(!0)),Qe.current.hasMoved&&(m.preventDefault(),O.scrollLeft=Qe.current.scrollLeft-X,Jt(!0),vt(),Ze())},ae=m=>{if($e){if(m.pointerType==="touch"){m.type==="pointerup"?Wo(m.clientX,m.clientY):pt.current=null;return}m.pointerType==="mouse"&&ni(m.pointerId)}},He=m=>{!$e||m.pointerType!=="mouse"||ni(m.pointerId)};return kc(),a.useEffect(()=>{const m=requestAnimationFrame(()=>Ht(!0));return()=>{cancelAnimationFrame(m),cn(),xi(),Xe.current!==null&&(cancelAnimationFrame(Xe.current),Xe.current=null),ht.current&&clearTimeout(ht.current),it.current&&clearTimeout(it.current)}},[]),a.useEffect(()=>{if(!Ne){Te(!0);return}Ze();const m=Me.current;if(!m)return;const O=()=>Ze();return m.addEventListener("pointermove",O),m.addEventListener("pointerdown",O),()=>{m.removeEventListener("pointermove",O),m.removeEventListener("pointerdown",O),it.current&&clearTimeout(it.current)}},[Ne,Ze]),a.useEffect(()=>{const m=O=>{O.key==="Escape"&&Je()};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[Je]),a.useLayoutEffect(()=>{Yt()},[M,t.length,gt]),a.useLayoutEffect(()=>{o||Sn(x.current,"auto")},[M,o]),a.useLayoutEffect(()=>{Sn(0,"auto")},[t.length,gt]),a.useEffect(()=>{const m=De.current;if(!m||o||!me)return;const O=X=>{if(X.preventDefault(),Math.abs(X.deltaY)<=Math.abs(X.deltaX))return;const we=X.deltaMode===1?Wf:X.deltaMode===2?m.clientHeight:1,Pe=X.deltaY*we*Ff;if(Pe!==0){if(cn(),mt.current||(mt.current=!0,Oe.current=m.scrollLeft,Ge.current=null,kt(!1)),Oe.current+=Pe,!gt){const qe=m.scrollWidth-m.clientWidth;Oe.current=Math.max(0,Math.min(qe,Oe.current))}Ze(),ft.current===null&&(ft.current=requestAnimationFrame(ei))}};return m.addEventListener("wheel",O,{passive:!1}),()=>{m.removeEventListener("wheel",O),dn()}},[o,me,gt]),a.useEffect(()=>{const m=De.current;if(!m)return;const O=()=>{Jt(Qe.current.isActive);const we=m.scrollLeft,Pe=we-Ue.current;Ue.current=we;const qe=nt.current>0?nt.current*.5:1/0;if(Pe!==0&&Math.abs(Pe)<qe){const xt=Pe>0?"forward":"backward";xt!==Ke.current&&(Ke.current=xt,Fe(xt))}Qe.current.isActive&&Qe.current.hasMoved||vt()};m.addEventListener("scroll",O,{passive:!0});const X=new ResizeObserver(()=>{Yt(),Jt(Qe.current.isActive),Fe(Ke.current),vt()});return X.observe(m),()=>{cn(),m.removeEventListener("scroll",O),X.disconnect()}},[t.length,gt]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{zt||Je()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Tt?1:0,transition:`opacity ${uo}ms ease`,pointerEvents:Tt?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Dt}}),r.jsxs("div",{ref:Me,className:`${e}-lightbox-dismiss-area`,style:Xt,...Ut,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:qt,onClick:m=>m.stopPropagation(),children:r.jsx("div",{ref:De,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":$e&&t.length>0?"true":"false","data-mouse-dragging":tn?"true":"false",onPointerDown:Wr,onPointerMove:_r,onPointerUp:ae,onPointerCancel:ae,onLostPointerCapture:He,children:r.jsx("div",{ref:Ee,className:`${e}-lightbox-strip-track`,style:{gap:M},children:Zt.map((m,O)=>{const X=m.image.objectFit??"contain",we=O%t.length,Pe=Math.floor(O/t.length),qe=Uo(M),xt=`calc(-0.5 * (${qe} + ${M}))`;return r.jsxs("div",{ref:Rt=>je.current[O]=Rt,className:`${e}-strip-item`,style:{height:I==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[r.jsx("img",{src:m.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:X}}),o&&we<t.length-1&&Pe===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:xt,width:qe,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Pe}-${m.image.url}-${we}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":Kt?"true":"false",style:Ct,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:H,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:ee,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${Q?` ${e}-lightbox-content-area-stacked`:""}`,children:(Se||S)&&r.jsx("div",{className:`${e}-header ${Q?`${e}-header-two-row`:`${e}-header-single-row`}`,children:Q?Et():Se||S?bt():null})})})]}),t.length>1&&E==="on"&&(()=>{const m=Uo($),O=`calc(-0.5 * (${$} + ${m}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:$},children:r.jsx("div",{ref:Ce,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:X=>X.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":T,style:{gap:ne,"--thumbnail-active-color":Y},children:[t.map((X,we)=>{const Pe=Uo(ne),qe=`calc(-0.5 * (${Pe} + ${ne}))`;return r.jsxs("div",{ref:xt=>{We.current[we]=xt},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":F===we?"true":"false",onClick:()=>me&&y==="click"&&Sn(we),onMouseEnter:()=>ke&&y==="hover"&&Sn(we),"aria-label":X.image.name?`View ${X.image.name}`:`View image ${we+1}`,"aria-current":F===we?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${ue?` ${e}-thumb-image-cover`:""}`,src:X.image.url,alt:"",draggable:!1,style:{...he,maxWidth:G,maxHeight:G,width:R.display==="cover"?"auto":"100%",height:"auto",objectFit:R.display==="cover"?"cover":"contain"}})}),o&&we<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:qe,width:Pe,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${X.image.url}-${we}`)}),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:O,height:m,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Yf(e){return`
13030
+ `;function On(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const ll={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},_f=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Nf={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:On("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:{...ll.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:{...ll.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:On("Question Padding Left"),questionPaddingTop:On("Question Padding Top"),questionPaddingBottom:On("Question Padding Bottom"),answerPaddingLeft:On("Answer Padding Left"),answerPaddingRight:On("Answer Padding Right"),answerPaddingTop:On("Answer Padding Top"),answerPaddingBottom:On("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:[..._f],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Hf={element:Ff,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:Nf,sourceCode:Wf},Fn=e=>e.display==="cover",Pr=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},cl=100,Of=.2,dl=8,Hc=({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 p=a.useMemo(()=>typeof window>"u"?cl:Math.max(cl,window.innerHeight*Of),[]),v=a.useCallback(w=>Math.max(0,1-w/(p*1.5)),[p]),x=a.useCallback(w=>Math.max(0,1-w/(p*.45)),[p]),I=a.useCallback(w=>{const W=typeof window<"u"?window.innerHeight:800,R=Math.max(.88,1-w/W*.12);return`translateY(${w}px) scale(${R})`},[]),h=a.useCallback(()=>{c.current=null},[]),g=a.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),h()},[n,h]),y=a.useCallback(()=>{const w=typeof window<"u"?window.innerHeight:800;d(!0),s(w),window.setTimeout(()=>{t(),h(),d(!1)},Math.min(n,200))},[n,t,h]),E=a.useCallback(w=>{!e||l||w.pointerType==="touch"&&(i!=null&&i(w.target)||(c.current={startX:w.clientX,startY:w.clientY,isLocked:null,pointerId:w.pointerId}))},[e,l,i]),L=a.useCallback(w=>{const W=c.current;if(!e||!W||w.pointerType!=="touch"||W.pointerId!==w.pointerId)return;const R=w.clientX-W.startX,J=w.clientY-W.startY;if(W.isLocked===null){if(Math.abs(R)<dl&&Math.abs(J)<dl)return;if(J>0&&J>Math.abs(R))W.isLocked=!0,w.currentTarget.setPointerCapture(w.pointerId);else{W.isLocked=!1,h();return}}if(!W.isLocked)return;w.preventDefault();const F=Math.max(0,J);u.current=F,s(F)},[e,h]),C=a.useCallback(w=>{const W=c.current;if(!e||!W||w.pointerType!=="touch"||W.pointerId!==w.pointerId)return;const R=W.isLocked===!0;if(w.currentTarget.hasPointerCapture(w.pointerId)&&w.currentTarget.releasePointerCapture(w.pointerId),!R){h();return}w.clientY-W.startY>=p?y():g()},[p,y,e,h,g]),K=a.useCallback(w=>{C(w)},[C]),A=a.useCallback(w=>{C(w)},[C]),B=o>0,P=l?`transform ${n}ms ease`:"none",T=l?`opacity ${n}ms ease`:"none",z=o>0||l;return{isSwipeDragging:B,backdropStyle:{opacity:v(o),transition:T},mediaAreaStyle:{transform:I(o),transition:P,touchAction:B?"none":void 0,willChange:B?"transform":void 0},overlayContentStyle:z?{opacity:x(o),transition:T}:void 0,swipeHandlers:e?{onPointerDown:E,onPointerMove:L,onPointerUp:K,onPointerCancel:A}:{},dismissAreaStyle:e?{touchAction:B?"none":"pan-x"}:void 0}},Df="[data-lightbox-scrollable]",Oc=()=>{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(Df)||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"})}},[])},jf=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},zf=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Bf=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Vf=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(h,g)=>{zf(t),e.scrollLeft=h,g&&(s==null||s())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let p=!1,v=0;const x=()=>{t.removeEventListener("transitionend",I),clearTimeout(v)},I=h=>{h.target!==t||h.propertyName!=="transform"||p||(p=!0,x(),u(n,!0))};return t.addEventListener("transitionend",I),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)`,v=window.setTimeout(()=>{p||(p=!0,x(),u(n,!0))},i+64),()=>{p||(p=!0,x(),u(l-Bf(t),!1))}},uo=300,Gf=900,qf=1500,Uf="cubic-bezier(0.16, 1, 0.3, 1)",Kf=3e3,Xf=2,Yf=16,Zf=.05,Jf=1,qo=.3,Qf=50,ey=20,Si=.004,Gi=["title1","title2","title3"],ty={title1:"1",title2:"2",title3:"3"},ny={title1:"title1Color",title2:"title2Color",title3:"title3Color"},iy={title1:.02,title2:.02,title3:.02},Uo=e=>`max(${e}, ${ey}px)`,oy=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]}},ry=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=oy(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Nt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,ay=e=>[Nt(e,"fontFamily"),Nt(e,"fontSettings"),{type:"row",items:[Nt(e,"fontSize"),Nt(e,"lineHeight"),Nt(e,"letterSpacing"),Nt(e,"wordSpacing")]},Nt(e,"textAlign"),Nt(e,"textAppearance")],sy=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Gi.map(e=>[ty[e],ay(e)]))}),ss=(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},Dc=(e,t)=>ss(e,t),Ko=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},ul=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:ss(e.length,n),effective:Dc(e.length,n)}},ly=(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},ta=(e,t)=>{const n=i=>{const o=Nt(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[ny[t]]}},cy=(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),na=(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??iy[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Vt(i,n)},dy=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:v,closeIcon:x,closeIconMaxWidth:I,closeIconColor:h,closeIconHoverColor:g,thumbnailTrigger:y,thumbnailVisibility:E,thumbnailObjectFit:L,thumbnailActive:C,thumbnailActiveColor:K,title1Width:A,title2Width:B,title3Width:P,title1MarginLeft:T=0,title2MarginLeft:z=0,title3MarginLeft:w=0,titleRowMarginBottom:W=0,titleHeaderLayout:R="desktop",contentMarginTop:J,iconMarginLeft:F}=n,U=m=>S.scalingValue(m,i??!1),V=c??n.thumnailSize??.03,G=U(V),oe=U(u),$=U(p??.02),M=U(v??0),N=U(J??0),Q=Uo(N),te=U(F??0),[k,le]=a.useState(0),f=a.useRef(k);f.current=k;const ne=t[k],{title1:Z,title2:fe,title3:Ie}=ry(ne),ue=na("title1",ta(n,"title1"),i),se=na("title2",ta(n,"title2"),i),q=na("title3",ta(n,"title3"),i),ee=R==="mobile",ce=!o&&(!i||s),ke=ce,$e=ce,Pe=ce,pe=Fn(L),he=pe?{"--image-aspect-ratio":Pr(L)}:void 0,be=!!(Z||fe||Ie),j=a.useMemo(()=>ly(e,Z,fe,Ie,ue,se,q),[e,k,Z,fe,Ie,ue,se,q]),re=a.useMemo(()=>({title1Width:A,title2Width:B,title3Width:P}),[A,B,P]),ge=a.useMemo(()=>j.map(m=>re[m.widthKey]),[j,re]),xe=a.useMemo(()=>ss(j.length,ge),[j.length,ge]),Le=a.useMemo(()=>Dc(j.length,ge),[j.length,ge]),we=a.useMemo(()=>j.filter(m=>m.prefix==="title1"),[j]),_=a.useMemo(()=>j.filter(m=>m.prefix==="title2"||m.prefix==="title3"),[j]),me=a.useMemo(()=>ul(we,re),[we,re]),ie=a.useMemo(()=>ul(_,re),[_,re]),H=a.useCallback((m,O)=>{const Y=j.indexOf(m);if(!ee||O==="single-row")return{effectiveWidth:Le[Y]??0,resolvedWidth:xe[Y]??0,maxWidth:Ko(Y,xe)};if(O==="two-row-top"){const Ae=we.indexOf(m);return{effectiveWidth:me.effective[Ae]??0,resolvedWidth:me.resolved[Ae]??0,maxWidth:Ko(Ae,me.resolved)}}const Se=_.indexOf(m);return{effectiveWidth:ie.effective[Se]??0,resolvedWidth:ie.resolved[Se]??0,maxWidth:Ko(Se,ie.resolved)}},[_,ie,Le,xe,j,we,me,ee]),X=a.useCallback(m=>S.scalingValue(m,i??!1),[i]),Re=X(W??0),de=a.useMemo(()=>({title1MarginLeft:T,title2MarginLeft:z,title3MarginLeft:w}),[T,z,w]),D=a.useCallback(m=>j.slice(0,m+1).reduce((O,Y,Se)=>O+(Y!=null&&Y.marginLeftKey?de[Y.marginLeftKey]??0:0)+(xe[Se]??0),0)+(ee?0:T??0),[j,de,xe,ee,T]),ze=a.useCallback(()=>ee?0:T??0,[ee,T]),Fe=a.useCallback(m=>_.slice(0,m).reduce((O,Y,Se)=>O+(Y.marginLeftKey?de[Y.marginLeftKey]??0:0)+(ie.resolved[Se]??0),0),[_,ie.resolved,de]),ot=a.useCallback(m=>{const O=_[m];return Fe(m)+(O.marginLeftKey?de[O.marginLeftKey]??0:0)+(ie.resolved[m]??0)},[_,ie.resolved,Fe,de]),tt=(m,O)=>{const Y=m.marginLeftKey?de[m.marginLeftKey]??0:0,{effectiveWidth:Se,resolvedWidth:Ae,maxWidth:qe}=H(m,O),bt=o&&O==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":m.prefix,style:{...O==="single-row"?{gridArea:m.prefix}:{},width:X(Se),...Y>0?{marginLeft:X(Y)}:{}},children:[r.jsx("p",{className:m.className,style:m.style,children:m.text}),bt&&m.marginLeftKey&&r.jsx("div",{"data-controls":m.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae),style:{position:"absolute",top:0,left:X(-Y),width:`max(${X(Y)}, 10px)`,height:"100%",pointerEvents:"auto"}}),bt&&r.jsx("div",{"data-controls":m.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(qe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:X(-Si/2),width:X(Si),height:"100%",pointerEvents:"auto"}})]},m.className)},at=()=>{const m=ee?-1:j.findIndex(Se=>Se.prefix==="title1"),O=!ee&&(o||(T??0)>0)?(()=>{const Se=T??0,Ae=m>=0?xe[m]:A??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae),style:{position:"absolute",top:0,left:0,width:`max(${X(Se)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Y=j.flatMap((Se,Ae)=>{if(!Se.marginLeftKey)return[];const qe=de[Se.marginLeftKey]??0,bt=cy(j,xe,de,Ae)+ze();return r.jsx("div",{"data-controls":Se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(xe[Ae]),style:{position:"absolute",top:0,left:X(bt),width:`max(${X(qe)}, 10px)`,height:"100%",pointerEvents:"auto"}},Se.marginLeftKey)});return O?[O,...Y]:Y},yt=()=>j.map((m,O)=>{const Y=Ko(O,xe),Ae=D(O)-Si/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":m.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Y),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:X(Ae),width:X(Si),height:"100%",pointerEvents:"auto"}})},`${m.widthKey}-junction`)}),Ve=()=>_.flatMap((m,O)=>{if(!m.marginLeftKey)return[];const Y=de[m.marginLeftKey]??0,Se=Fe(O),{resolvedWidth:Ae}=H(m,"two-row-bottom");return r.jsx("div",{"data-controls":m.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae),style:{position:"absolute",top:0,left:X(Se),width:`max(${X(Y)}, 10px)`,height:"100%",pointerEvents:"auto"}},m.marginLeftKey)}),ye=()=>_.map((m,O)=>{const{maxWidth:Y}=H(m,"two-row-bottom"),Ae=ot(O)-Si/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":m.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Y),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:X(Ae),width:X(Si),height:"100%",pointerEvents:"auto"}})},`${m.widthKey}-junction`)}),Me=a.useRef(null),je=a.useRef(null),Ee=a.useRef(null),Ce=a.useRef(null),_e=a.useRef([]),De=a.useRef([]),nt=a.useRef(0),pt=a.useRef(null),Qe=a.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),St=a.useRef(null),ct=a.useRef(null),Ue=a.useRef(0),Ke=a.useRef("forward"),Oe=a.useRef(0),ft=a.useRef(null),mt=a.useRef(!1),gt=t.length>1&&(!o||!!s),At=gt?3:1,Zt=a.useMemo(()=>Array.from({length:At},()=>t).flat(),[t,At]),[tn,$t]=a.useState(!1),[Tt,Ht]=a.useState(!1),[Wt,Te]=a.useState(!0),Ge=a.useRef(null),Xe=a.useRef(null),dt=a.useRef(!1),Pt=a.useRef(!1),ht=a.useRef(null),it=a.useRef(null),Kt=ke&&!Wt,Ze=a.useCallback(()=>{ke&&(Te(!0),it.current&&clearTimeout(it.current),it.current=setTimeout(()=>{Qe.current.isActive||Te(!1)},Kf))},[ke]),Je=a.useCallback(()=>{o||Pt.current||(Pt.current=!0,Ht(!1),ht.current=setTimeout(()=>{l()},uo))},[o,l]),st=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":Kt?"true":"false",style:{width:S.scalingValue(I??0,i),height:S.scalingValue(I??0,i),marginRight:te,"--close-icon-hover-color":g},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Je,"aria-label":"Close",children:r.jsx(rn,{url:x,fill:h,hoverFill:i&&!s?h:g,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:te,height:"100%",pointerEvents:"auto"}})]}),Mt=(m="two-row")=>r.jsx("div",{...m==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:X(T??0),flexShrink:0,...m==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...m==="two-row"&&o?{pointerEvents:"auto"}:{}}}),Et=()=>{const m=j.find(Se=>Se.prefix==="title1"),O=j.filter(Se=>Se.prefix==="title2"||Se.prefix==="title3"),Y=O.length>0||o||(W??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(T??0)>0||o?Mt():null,m&&tt(m,"two-row-top"),x&&st()]}),Y?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[O.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[O.map(Se=>tt(Se,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[Ve(),ye()]})]}):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:Re,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},xt=()=>r.jsxs(r.Fragment,{children:[(T??0)>0||o?Mt("single-row"):null,j.map(m=>tt(m,"single-row")),o?r.jsxs(r.Fragment,{children:[at(),yt()]}):null,x?st():null]}),_t=a.useCallback(m=>!!(m.closest("[data-controls]")||m.closest(`.${e}-thumbnails`)||m.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:zt,backdropStyle:jt,mediaAreaStyle:qt,overlayContentStyle:Ct,swipeHandlers:Ut,dismissAreaStyle:Xt}=Hc({enabled:ce??!1,onClose:Je,animMs:uo,isBlockedTarget:_t}),Yt=()=>{if(!gt||t.length===0)return nt.current=0,0;const m=De.current[0],O=De.current[t.length];if(!m||!O)return nt.current;const Y=O.offsetLeft-m.offsetLeft;return Y>0&&(nt.current=Y),nt.current},Jt=(m=!1)=>{if(!gt)return;const O=je.current,Y=Yt();!O||Y<=0||Y<O.clientWidth*.25||(O.scrollLeft<=0?(O.scrollLeft+=Y,m&&(Qe.current.scrollLeft+=Y),mt.current&&(Oe.current+=Y)):O.scrollLeft>=Y*2&&(O.scrollLeft-=Y,m&&(Qe.current.scrollLeft-=Y),mt.current&&(Oe.current-=Y)))},Bt=(m,O=(Y=>(Y=je.current)==null?void 0:Y.scrollLeft)()??0)=>{if(!gt)return m;let Se=t.length+m,Ae=1/0;for(let qe=0;qe<At;qe++){const bt=qe*t.length+m,It=De.current[bt];if(!It)continue;const nn=Math.abs(It.offsetLeft-O);nn<Ae&&(Ae=nn,Se=bt)}return Se},Lt=m=>{const O=je.current;return!m||!O?!1:m.offsetWidth>O.clientWidth+1},b=m=>{const O=je.current;if(!m||!O||!Lt(m))return!1;const Y=m.offsetLeft,Se=Y+m.offsetWidth;return O.scrollLeft>=Y-1&&O.scrollLeft+O.clientWidth<=Se+1},ve=(m=(O=>(O=je.current)==null?void 0:O.scrollLeft)()??0)=>{for(let Se=0;Se<De.current.length;Se+=1){const Ae=De.current[Se];if(Ae&&b(Ae))return Se}let Y={flatIndex:0,distance:1/0};return De.current.forEach((Se,Ae)=>{if(!Se)return;const qe=Math.abs(Se.offsetLeft-m);qe<Y.distance&&(Y={flatIndex:Ae,distance:qe})}),Y.flatIndex},We=m=>{je.current&&De.current.forEach(O=>{O&&(O.style.scrollSnapAlign=Lt(O)&&m==="backward"?"end":"start")})},Ne=(m,O,Y)=>{const Se=m-O,Ae=ve(O),qe=De.current[Ae];if(b(qe))return ve(m)%t.length;const bt=De.current[Ae+1],It=qe?bt?bt.offsetLeft-qe.offsetLeft:qe.offsetWidth:0,nn=It>0?Se>It*qo?1:Se<-It*qo?-1:0:0;return nn===0?Y:gt?(Y+nn+t.length)%t.length:Math.max(0,Math.min(t.length-1,Y+nn))},lt=a.useCallback((m=!1)=>{if(E!=="on"||o)return;const O=Ce.current,Y=f.current,Se=_e.current[Y];if(!O||!Se||O.scrollWidth<=O.clientWidth)return;const Ae=O.scrollLeft,qe=Ae+O.clientWidth,bt=Se.offsetLeft,It=bt+Se.offsetWidth;if(bt>=Ae&&It<=qe)return;const nn=O.scrollWidth-O.clientWidth;let Qt=Ae;if(!m&&Ge.current===null){const xi=_e.current[Y-1],Qi=_e.current[Y+1],_o=xi?Se.offsetLeft-xi.offsetLeft:Qi?Qi.offsetLeft-Se.offsetLeft:Se.offsetWidth;It>qe?Qt+=_o:bt<Ae&&(Qt-=_o)}else It>qe?Qt=It-O.clientWidth:Qt=bt;O.scrollLeft=Math.max(0,Math.min(nn,Qt))},[o,E]),Ft=a.useCallback((m=!1)=>{m&&(dt.current=!0),Xe.current===null&&(Xe.current=requestAnimationFrame(()=>{Xe.current=null;const O=dt.current;dt.current=!1,lt(O)}))},[lt]),et=a.useCallback(m=>{if(m===f.current)return;const O=f.current;f.current=m;const Y=Math.abs(m-O)>1,Se=gt&&t.length>1&&(O===t.length-1&&m===0||O===0&&m===t.length-1);le(m),Ft(Y||Se)},[t.length,gt,Ft]),vt=()=>{if(!je.current||t.length===0||Ge.current!==null||Qe.current.isActive&&Qe.current.hasMoved)return;const m=je.current.scrollLeft,O=ve(m)%t.length;O!==f.current&&et(O)},Ot=()=>{Ge.current=null},kt=m=>{const O=je.current;O&&(O.style.scrollSnapType=m?"":"none")},cn=()=>{var m;(m=ct.current)==null||m.call(ct),ct.current=null},dn=()=>{ft.current!==null&&(cancelAnimationFrame(ft.current),ft.current=null),mt.current=!1},ei=()=>{const m=je.current;if(!m){ft.current=null,mt.current=!1;return}const O=Oe.current-m.scrollLeft;if(Math.abs(O)<.5){m.scrollLeft=Oe.current,Jt(),vt(),ft.current=null,mt.current=!1;return}m.scrollLeft+=O*Zf,Jt(),vt(),Ze(),ft.current=requestAnimationFrame(ei)},ti=()=>{const m=Ee.current;m&&(m.style.transition="",m.style.transform="",m.style.willChange="")},ko=(m,O,Y,Se)=>{ti(),m.scrollLeft=O,Ue.current=m.scrollLeft,Jt(),Y!==void 0?(f.current=Y,le(Y)):vt(),kt(!0),Se==null||Se()},Ao=(m,{behavior:O="smooth",activeIndex:Y,onComplete:Se}={})=>{const Ae=je.current,qe=Ee.current;if(!Ae||!qe)return;if(dn(),cn(),kt(!1),O==="auto"){ko(Ae,m,Y,Se);return}const bt=Math.abs(m-Ae.scrollLeft),It=jf(bt,Gf,qf,Ae.clientWidth*.55);ct.current=Vf(Ae,qe,m,{duration:It,easing:Uf,onComplete:()=>{ct.current=null,ko(Ae,m,Y,Se)}})},Fr=(m="smooth")=>{const O=je.current;if(!O||t.length===0)return;const Y=ve()%t.length,Se=Bt(Y,O.scrollLeft),Ae=De.current[Se];Ae&&Ao(Ae.offsetLeft,{behavior:m,activeIndex:Y})},Wr=(m,O="smooth",Y,Se)=>{const Ae=je.current;if(!Ae||t.length===0)return;const qe=(Se??Ae.scrollLeft)-m,bt=ve(m),It=De.current[bt];if(b(It)){kt(!0),vt();return}const nn=De.current[bt+1],Qt=It?nn?nn.offsetLeft-It.offsetLeft:It.offsetWidth:0;if((Qt>0?qe>Qt*qo?1:qe<-Qt*qo?-1:0:0)!==0){const td=Y??bt%t.length,nd=Ne(Se??Ae.scrollLeft,m,td);Sn(nd,O);return}const Qi=Se??Ae.scrollLeft,_o=ve(Qi),cs=De.current[_o];if(cs&&Math.abs(cs.offsetLeft-Qi)<1){kt(!0),vt();return}Fr("auto")},Sn=(m,O="smooth")=>{const Y=je.current;if(!Y||t.length===0)return;const Se=Bt(m,Y.scrollLeft),Ae=De.current[Se];Ae&&(O==="smooth"?Ge.current=m:Ge.current=null,f.current=m,le(m),Ft(!0),Ao(Ae.offsetLeft,{behavior:O,activeIndex:m,onComplete:O==="smooth"?Ot:void 0}))},bi=()=>{St.current&&(window.removeEventListener("pointerup",St.current),window.removeEventListener("pointercancel",St.current),St.current=null)},Fo=(m,O,Y,Se,Ae)=>{const qe=Y-m,bt=Se-O,It=Math.abs(qe),nn=Math.abs(bt);if(It<Qf||It<=nn)return!1;const Qt=qe<0?1:-1,xi=gt?(Ae+Qt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Ae+Qt));return xi===Ae?!1:(Sn(xi),!0)},ni=m=>{if(!Qe.current.isActive)return;bi();const O=je.current;if(!O)return;const{scrollLeft:Y,startActiveIndex:Se,hasMoved:Ae}=Qe.current,qe=O.scrollLeft;Jt(!0),Qe.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},$t(!1),m!==void 0&&O.hasPointerCapture(m)&&O.releasePointerCapture(m),Ae?Wr(Y,"smooth",Se,qe):(kt(!0),vt()),Ze()},Wo=(m,O)=>{const Y=pt.current;pt.current=null,Y&&(Fo(Y.startX,Y.startY,m,O,Y.startActiveIndex),Ze())},_r=m=>{if(!$e)return;if(m.pointerType==="touch"){if(dn(),kt(!0),_t(m.target))return;pt.current={startX:m.clientX,startY:m.clientY,startActiveIndex:f.current};return}if(m.pointerType!=="mouse"||m.button!==0||_t(m.target))return;const O=je.current;if(!O)return;dn(),cn(),ti(),Ge.current=null,Qe.current={isActive:!0,startX:m.clientX,scrollLeft:O.scrollLeft,startActiveIndex:f.current,hasMoved:!1},kt(!1),Ze(),O.setPointerCapture(m.pointerId),bi();const Y=Se=>{Se.pointerType==="mouse"&&ni(Se.pointerId)};St.current=Y,window.addEventListener("pointerup",Y),window.addEventListener("pointercancel",Y)},Nr=m=>{if(!$e||m.pointerType!=="mouse")return;const O=je.current;if(!O||!Qe.current.isActive)return;if(m.buttons===0){ni(m.pointerId);return}const Y=m.clientX-Qe.current.startX;Math.abs(Y)>Jf&&(Qe.current.hasMoved=!0,$t(!0)),Qe.current.hasMoved&&(m.preventDefault(),O.scrollLeft=Qe.current.scrollLeft-Y,Jt(!0),vt(),Ze())},ae=m=>{if($e){if(m.pointerType==="touch"){m.type==="pointerup"?Wo(m.clientX,m.clientY):pt.current=null;return}m.pointerType==="mouse"&&ni(m.pointerId)}},He=m=>{!$e||m.pointerType!=="mouse"||ni(m.pointerId)};return Oc(),a.useEffect(()=>{const m=requestAnimationFrame(()=>Ht(!0));return()=>{cancelAnimationFrame(m),cn(),bi(),Xe.current!==null&&(cancelAnimationFrame(Xe.current),Xe.current=null),ht.current&&clearTimeout(ht.current),it.current&&clearTimeout(it.current)}},[]),a.useEffect(()=>{if(!ke){Te(!0);return}Ze();const m=Me.current;if(!m)return;const O=()=>Ze();return m.addEventListener("pointermove",O),m.addEventListener("pointerdown",O),()=>{m.removeEventListener("pointermove",O),m.removeEventListener("pointerdown",O),it.current&&clearTimeout(it.current)}},[ke,Ze]),a.useEffect(()=>{const m=O=>{O.key==="Escape"&&Je()};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[Je]),a.useLayoutEffect(()=>{Yt()},[M,t.length,gt]),a.useLayoutEffect(()=>{o||Sn(f.current,"auto")},[M,o]),a.useLayoutEffect(()=>{Sn(0,"auto")},[t.length,gt]),a.useEffect(()=>{const m=je.current;if(!m||o||!ce)return;const O=Y=>{if(Y.preventDefault(),Math.abs(Y.deltaY)<=Math.abs(Y.deltaX))return;const Se=Y.deltaMode===1?Yf:Y.deltaMode===2?m.clientHeight:1,Ae=Y.deltaY*Se*Xf;if(Ae!==0){if(cn(),mt.current||(mt.current=!0,Oe.current=m.scrollLeft,Ge.current=null,kt(!1)),Oe.current+=Ae,!gt){const qe=m.scrollWidth-m.clientWidth;Oe.current=Math.max(0,Math.min(qe,Oe.current))}Ze(),ft.current===null&&(ft.current=requestAnimationFrame(ei))}};return m.addEventListener("wheel",O,{passive:!1}),()=>{m.removeEventListener("wheel",O),dn()}},[o,ce,gt]),a.useEffect(()=>{const m=je.current;if(!m)return;const O=()=>{Jt(Qe.current.isActive);const Se=m.scrollLeft,Ae=Se-Ue.current;Ue.current=Se;const qe=nt.current>0?nt.current*.5:1/0;if(Ae!==0&&Math.abs(Ae)<qe){const bt=Ae>0?"forward":"backward";bt!==Ke.current&&(Ke.current=bt,We(bt))}Qe.current.isActive&&Qe.current.hasMoved||vt()};m.addEventListener("scroll",O,{passive:!0});const Y=new ResizeObserver(()=>{Yt(),Jt(Qe.current.isActive),We(Ke.current),vt()});return Y.observe(m),()=>{cn(),m.removeEventListener("scroll",O),Y.disconnect()}},[t.length,gt]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{zt||Je()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Tt?1:0,transition:`opacity ${uo}ms ease`,pointerEvents:Tt?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...jt}}),r.jsxs("div",{ref:Me,className:`${e}-lightbox-dismiss-area`,style:Xt,...Ut,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:qt,onClick:m=>m.stopPropagation(),children:r.jsx("div",{ref:je,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":$e&&t.length>0?"true":"false","data-mouse-dragging":tn?"true":"false",onPointerDown:_r,onPointerMove:Nr,onPointerUp:ae,onPointerCancel:ae,onLostPointerCapture:He,children:r.jsx("div",{ref:Ee,className:`${e}-lightbox-strip-track`,style:{gap:M},children:Zt.map((m,O)=>{const Y=m.image.objectFit??"contain",Se=O%t.length,Ae=Math.floor(O/t.length),qe=Uo(M),bt=`calc(-0.5 * (${qe} + ${M}))`;return r.jsxs("div",{ref:It=>De.current[O]=It,className:`${e}-strip-item`,style:{height:R==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[r.jsx("img",{src:m.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:Y}}),o&&Se<t.length-1&&Ae===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:bt,width:qe,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Ae}-${m.image.url}-${Se}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":Kt?"true":"false",style:Ct,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:N,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${ee?` ${e}-lightbox-content-area-stacked`:""}`,children:(be||x)&&r.jsx("div",{className:`${e}-header ${ee?`${e}-header-two-row`:`${e}-header-single-row`}`,children:ee?Et():be||x?xt():null})})})]}),t.length>1&&E==="on"&&(()=>{const m=Uo($),O=`calc(-0.5 * (${$} + ${m}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:$},children:r.jsx("div",{ref:Ce,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:Y=>Y.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":C,style:{gap:oe,"--thumbnail-active-color":K},children:[t.map((Y,Se)=>{const Ae=Uo(oe),qe=`calc(-0.5 * (${Ae} + ${oe}))`;return r.jsxs("div",{ref:bt=>{_e.current[Se]=bt},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":k===Se?"true":"false",onClick:()=>ce&&y==="click"&&Sn(Se),onMouseEnter:()=>Pe&&y==="hover"&&Sn(Se),"aria-label":Y.image.name?`View ${Y.image.name}`:`View image ${Se+1}`,"aria-current":k===Se?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${pe?` ${e}-thumb-image-cover`:""}`,src:Y.image.url,alt:"",draggable:!1,style:{...he,maxWidth:G,maxHeight:G,width:L.display==="cover"?"auto":"100%",height:"auto",objectFit:L.display==="cover"?"cover":"contain"}})}),o&&Se<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:qe,width:Ae,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${Y.image.url}-${Se}`)}),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:O,height:m,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function uy(e){return`
13031
13031
  .${e}-wrapper {
13032
13032
  position: relative;
13033
13033
  width: 100%;
@@ -13412,7 +13412,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
13412
13412
  pointer-events: auto;
13413
13413
  z-index: 10;
13414
13414
  }
13415
- `}const Zf=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:l})=>{const{prefix:s}=w.useScopedStyles(),{cover:d,coverFit:c}=e,u=a.useRef(null),[p,b]=a.useState(!1),S=t??[],L=p&&S.length>0,h=()=>{S.length!==0&&b(!0)};return a.useEffect(()=>{!n||i||o||b(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:u,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Yf(s)}}),d&&r.jsx("div",{className:`${s}-cover ${Fn(c)?`${s}-ratio-wrapper-cover`:`${s}-ratio-wrapper-fit`}`,onClick:()=>h(),style:{...Fn(c)?{"--image-aspect-ratio":Pr(c)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${s}-cover-image ${Fn(c)?`${s}-cover-image-cover`:`${s}-cover-image-fit`}`,src:d,alt:"cover"})})]}),L&&typeof document<"u"&&(()=>{const g=(l?document.getElementById(l):null)??document.body;return Yn.createPortal(r.jsx(Xf,{prefix:s,images:S,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>b(!1)}),g)})()]})},Jf=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
13415
+ `}const py=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s})=>{const{prefix:l}=S.useScopedStyles(),{cover:d,coverFit:c}=e,u=a.useRef(null),[p,v]=a.useState(!1),x=t??[],I=p&&x.length>0,h=()=>{x.length!==0&&v(!0)};return a.useEffect(()=>{!n||i||o||v(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:uy(l)}}),d&&r.jsx("div",{className:`${l}-cover ${Fn(c)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>h(),style:{...Fn(c)?{"--image-aspect-ratio":Pr(c)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${l}-cover-image ${Fn(c)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:d,alt:"cover"})})]}),I&&typeof document<"u"&&(()=>{const g=(s?document.getElementById(s):null)??document.body;return Yn.createPortal(r.jsx(dy,{prefix:l,images:x,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>v(!1)}),g)})()]})},my=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
13416
13416
  import { createPortal } from 'react-dom';
13417
13417
  import { CommonComponentProps } from '../props';
13418
13418
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -13958,7 +13958,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
13958
13958
  </>
13959
13959
  );
13960
13960
  };
13961
- `,Qf="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>'),li={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 ey(e){const t={};return t[Nt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Nt(e,"fontSettings")]={...li.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Nt(e,"fontSize")]={...li.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Nt(e,"lineHeight")]={...li.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Nt(e,"letterSpacing")]={...li.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Nt(e,"wordSpacing")]={...li.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Nt(e,"textAlign")]={...li.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Nt(e,"textAppearance")]={...li.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const ty=Gi.reduce((e,t)=>({...e,...ey(t)}),{}),ny=Gi.reduce((e,t)=>({...e,[Nt(t,"fontFamily")]:"Goudy Bookletter 1911",[Nt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Nt(t,"letterSpacing")]:0,[Nt(t,"wordSpacing")]:0,[Nt(t,"textAlign")]:"left",[Nt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function na(e){return Gi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Nt(n,"fontSize")]=i),o!==void 0&&(t[Nt(n,"lineHeight")]=o),t},{})}const iy=qf(),oy={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"}},...ty,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:Qf,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...ny},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,...na({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,...na({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,...na({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:[iy]}],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"}]}},ry={element:Zf,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:oy,sourceCode:Jf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Gi.map(e=>({path:`${Nt(e,"fontFamily")}`}))]},fontRelations:{...Gi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Nt(t,"fontFamily")}`}),{})}},ay=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,initialSlideIndex:s=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:p})=>{const{type:b,coverFit:S,backgroundColor:L,imageGap:h,maxWidth:g,maxHeight:y,textTransition:E,title1Width:R,title2Width:T,title3Width:Y,title1MarginLeft:k=0,title2MarginLeft:B=0,title3MarginLeft:P=0,titleRowMarginBottom:C=0,titleHeaderLayout:z="single-row",countCloseGap:v=0,closeIcon:W,closeIconMaxWidth:I,closeIconColor:Z,closeIconHoverColor:A,contentMarginTop:K=0,iconMarginRight:V=0}=n,G=a.useCallback(ae=>w.scalingValue(ae,i??!1),[i]),ne=G(h??0),$=`${g}%`,M=`${y}%`,H=G(v),ee=G(K),ie=G(V),F=pi("title1",ui(n,"title1"),i),pe=pi("title2",ui(n,"title2"),i),x=pi("title3",ui(n,"title3"),i),re=pi("count",ui(n,"count"),i),J=z==="mobile",fe=!i||!!l,Re=!o&&(!i||!!l),de=a.useMemo(()=>ir(t,b),[t,b]),[se,q]=a.useState(s),Q=de[se],me=Q==null?void 0:Q.entry,[Ne,$e]=a.useState(!1),[ke,ue]=a.useState(null),[he,Se]=a.useState(!1),[D,oe]=a.useState(null),[ge,xe]=a.useState(!1),[Le,be]=a.useState(0),[_,ce]=a.useState(),[te,N]=a.useState(),[U,Ie]=a.useState(null),le=a.useRef(null),j=a.useRef(0),ze=a.useRef(0),Ae=a.useRef(0),ot=a.useRef(!1),tt=a.useRef(null),at=a.useRef(null),yt=a.useRef(null),Ve=a.useRef(null),ye=a.useRef(null),Me=a.useRef(null),De=a.useRef(null),Ee=a.useCallback(()=>{const ae=at.current;if(!ae)return;const He=ae.closest(`.${e}-lightbox-content-area`);if(!He)return ae.getBoundingClientRect().width;const m=Array.from(He.children).reduce((O,X)=>!(X instanceof HTMLElement)||X.contains(ae)?O:O+X.getBoundingClientRect().width,0);return He.getBoundingClientRect().width-m},[e]),Ce=a.useCallback(()=>{le.current&&(clearTimeout(le.current),le.current=null)},[]),We=a.useCallback(ae=>{ae===j.current&&(oe(null),xe(!1))},[]),je=a.useCallback(()=>{o||ot.current||(ot.current=!0,u==null||u(),$e(!1),tt.current=setTimeout(()=>{p()},300))},[o,u,p]),nt=a.useCallback(ae=>!!(ae.closest("[data-controls]")||ae.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:pt,backdropStyle:Qe,mediaAreaStyle:St,overlayContentStyle:ct,swipeHandlers:Ue,dismissAreaStyle:Ke}=Pc({enabled:Re,onClose:je,animMs:300,isBlockedTarget:nt}),Oe=a.useCallback(ae=>{d&&mc(ae+1,c,!0)},[d,c]),ft=a.useCallback(ae=>{if(ae)return ae.getBoundingClientRect().height},[]),mt=a.useCallback(ae=>{if(de.length===0)return;const He=(ae%de.length+de.length)%de.length;if(He===se)return;const m=de[se],O=de[He];j.current+=1;const X=j.current,we=E==="fade"&&Nl(m==null?void 0:m.entry)!==Nl(O==null?void 0:O.entry),Pe=ft(yt.current),qe=we?(()=>{const Rt=Ee();Yn.flushSync(()=>{Ie(O.entry)}),yt.current&&Rt&&(yt.current.style.width=`${Rt}px`);const nn=ft(yt.current);return yt.current&&(yt.current.style.width=""),{measuredIncomingTitlesHeight:nn,incomingTitlesMeasureWidth:Rt}})():void 0,xt=Math.max(Pe??0,(qe==null?void 0:qe.measuredIncomingTitlesHeight)??0)||void 0;be(X),oe(se),xe(!0),q(He),Oe(He),Ae.current=He,we?(Ce(),xt&&ce(xt),qe!=null&&qe.incomingTitlesMeasureWidth&&N(qe.incomingTitlesMeasureWidth),ue((m==null?void 0:m.entryIndex)??null),Se(!0),ze.current=O.entryIndex,le.current=setTimeout(()=>{ue(null),Se(!1),ce(void 0),N(void 0),Ie(null),le.current=null},400)):(Ce(),ue(null),Se(!1),ce(void 0),N(void 0),Ie(null),ze.current=O.entryIndex)},[se,Ce,Ee,ft,de,Oe,E]),gt=a.useCallback(()=>{De.current=null},[]),At=a.useCallback(ae=>{!fe||de.length<=1||ae.pointerType==="mouse"&&ae.button!==0||ae.target.closest("[data-controls]")||(De.current={startX:ae.clientX,startY:ae.clientY,pointerId:ae.pointerId})},[fe,de.length]),Zt=a.useCallback(ae=>{var Rt;if(!fe||de.length<=1||ae.pointerType==="mouse"&&ae.button!==0)return;if(pt){gt();return}const He=De.current;if(!He||He.pointerId!==ae.pointerId||(gt(),ae.target.closest("[data-controls]")))return;const O=ae.clientX-He.startX,X=ae.clientY-He.startY,we=Math.abs(O),Pe=Math.abs(X);if(we>=bg&&we>Pe){mt(O>0?se-1:se+1);return}if(we>Al||Pe>Al)return;const qe=(Rt=Ve.current)==null?void 0:Rt.getBoundingClientRect(),xt=qe?qe.left+qe.width/2:window.innerWidth/2;mt(ae.clientX<xt?se-1:se+1)},[se,fe,mt,pt,gt,de.length]),tn=a.useCallback(ae=>{const He=De.current;(He==null?void 0:He.pointerId)===ae.pointerId&&gt()},[gt]);kc(),a.useEffect(()=>{Me.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const ae=requestAnimationFrame(()=>{$e(!0),requestAnimationFrame(()=>{ye.current?ye.current.focus():Ve.current&&Ve.current.focus()})});return()=>{cancelAnimationFrame(ae),tt.current&&clearTimeout(tt.current),le.current&&clearTimeout(le.current);const He=Me.current;He&&document.contains(He)&&He.focus({preventScroll:!0})}},[]),a.useEffect(()=>{var ae;E!=="fade"&&(ze.current=((ae=de[se])==null?void 0:ae.entryIndex)??0,Ce(),ue(null),Se(!1),ce(void 0),N(void 0))},[se,Ce,de,E]),a.useEffect(()=>{const ae=He=>{if(He.key==="Escape"){je();return}if(He.key==="ArrowLeft"&&de.length>1){mt(se-1);return}if(He.key==="ArrowRight"&&de.length>1){mt(se+1);return}if(He.key==="Tab"&&Ve.current){const m=Ve.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),O=Array.from(m).filter(qe=>!qe.closest('[aria-hidden="true"]'));if(O.length===0)return;const X=O[0],we=O[O.length-1],Pe=document.activeElement;He.shiftKey?(Pe===X||!Ve.current.contains(Pe))&&(He.preventDefault(),we.focus()):(Pe===we||!Ve.current.contains(Pe))&&(He.preventDefault(),X.focus())}};return window.addEventListener("keydown",ae),()=>window.removeEventListener("keydown",ae)},[mt,je,se,de.length]),a.useLayoutEffect(()=>{Ce(),j.current=0,be(0),oe(null),xe(!1),ue(null),Se(!1),ce(void 0),N(void 0),Ie(null),q(ae=>{const He=Math.max(0,de.length-1);return Math.min(ae,He)})},[Ce,t.length,b,de.length]),a.useLayoutEffect(()=>{var m;const ae=Math.max(0,de.length-1),He=Math.min(Math.max(0,s),ae);Ae.current=He,ze.current=((m=de[He])==null?void 0:m.entryIndex)??0,q(He)},[s]);const $t=ke!==null?t[ke]:null,Tt=D!==null?de[D]:null,Ht=(me==null?void 0:me.title1)||(me==null?void 0:me.title2)||(me==null?void 0:me.title3)||($t==null?void 0:$t.title1)||($t==null?void 0:$t.title2)||($t==null?void 0:$t.title3),Wt=Ig(b,de,t),Te=W!==null,Ge=Ht||Wt||Te,Xe=Wt&&Te?{gap:H}:void 0,dt=`${e}-titles-stack${J?` ${e}-titles-stack-stacked`:""}`,Pt=`${e}-titles-layer-out${J?` ${e}-titles-layer-out-stacked`:""}`,ht=`${e}-titles-layer-out`,it=(k??0)>0||o,Kt=G(C),Ze=a.useMemo(()=>({title1Width:R??Ai.title1Width,title2Width:T??Ai.title2Width,title3Width:Y??Ai.title3Width}),[R,T,Y]),Je=a.useMemo(()=>({title2MarginLeft:B,title3MarginLeft:P}),[B,P]),lt=a.useMemo(()=>me?Vn(e,me,F,pe,x):[],[e,me,F,pe,x]),Mt=a.useMemo(()=>lt.map(ae=>Ze[ae.widthKey]),[lt,Ze]),Et=a.useMemo(()=>Oi(lt.length,Mt),[lt.length,Mt]),bt=a.useMemo(()=>xo(lt.length,Mt),[lt.length,Mt]),_t=a.useMemo(()=>lt.filter(ae=>ae.prefix==="title1"),[lt]),zt=a.useMemo(()=>lt.filter(ae=>ae.prefix==="title2"||ae.prefix==="title3"),[lt]),Dt=a.useMemo(()=>Gn(_t,Ze),[_t,Ze]),qt=a.useMemo(()=>Gn(zt,Ze),[zt,Ze]),Ct=a.useCallback((ae,He)=>{const m=lt.findIndex(X=>X.prefix===ae.prefix);if(!J||He==="single-row")return{effectiveWidth:bt[m]??0,resolvedWidth:Et[m]??0,maxWidth:ln(m,Et)};if(He==="two-row-top"){const X=_t.findIndex(we=>we.prefix===ae.prefix);return{effectiveWidth:Dt.effective[X]??0,resolvedWidth:Dt.resolved[X]??0,maxWidth:ln(X,Dt.resolved)}}const O=zt.findIndex(X=>X.prefix===ae.prefix);return{effectiveWidth:qt.effective[O]??0,resolvedWidth:qt.resolved[O]??0,maxWidth:ln(O,qt.resolved)}},[lt,zt,qt,bt,Et,_t,Dt,J]),Ut=a.useCallback(ae=>yc(lt,Et,Je,ae)+(J?0:k??0),[lt,Et,Je,J,k]),Xt=a.useCallback(()=>J?0:k??0,[J,k]),Yt=a.useCallback(ae=>zt.slice(0,ae).reduce((He,m,O)=>He+(m.marginLeftKey?Je[m.marginLeftKey]??0:0)+(qt.resolved[O]??0),0),[zt,qt.resolved,Je]),Jt=a.useCallback(ae=>{const He=zt[ae];return Yt(ae)+(He.marginLeftKey?Je[He.marginLeftKey]??0:0)+(qt.resolved[ae]??0)},[zt,qt.resolved,Yt,Je]),Bt=a.useCallback((ae,He,m)=>{if(!J||m==="single-row"){const qe=ae.findIndex(Qt=>Qt.prefix===He.prefix),xt=ae.map(Qt=>Ze[Qt.widthKey]),Rt=Oi(ae.length,xt);return{effectiveWidth:xo(ae.length,xt)[qe]??0,resolvedWidth:Rt[qe]??0,maxWidth:ln(qe,Rt)}}if(m==="two-row-top"){const qe=ae.filter(Qt=>Qt.prefix==="title1"),xt=qe.findIndex(Qt=>Qt.prefix===He.prefix),{resolved:Rt,effective:nn}=Gn(qe,Ze);return{effectiveWidth:nn[xt]??0,resolvedWidth:Rt[xt]??0,maxWidth:ln(xt,Rt)}}const O=ae.filter(qe=>qe.prefix==="title2"||qe.prefix==="title3"),X=O.findIndex(qe=>qe.prefix===He.prefix),{resolved:we,effective:Pe}=Gn(O,Ze);return{effectiveWidth:Pe[X]??0,resolvedWidth:we[X]??0,maxWidth:ln(X,we)}},[Ze,J]),Lt=(ae,He,m)=>{const O=ae.marginLeftKey?Je[ae.marginLeftKey]??0:0,{effectiveWidth:X,resolvedWidth:we,maxWidth:Pe}=m??Ct(ae,He),qe=Math.max(O,Bn),xt=o&&He==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":ae.prefix,style:{width:G(X),...O>0?{marginLeft:G(O)}:{}},children:[r.jsx("p",{className:ae.className,style:ae.style,children:ae.text}),xt&&ae.marginLeftKey?r.jsx("div",{"data-controls":ae.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(we),style:{position:"absolute",top:0,left:G(-O),width:G(qe),height:"100%",pointerEvents:"auto"}}):null,xt?r.jsx("div",{"data-controls":ae.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,right:G(-gn/2),width:G(gn),height:"100%",pointerEvents:"auto"}}):null]},ae.className)},f=(ae="two-row")=>{const He=lt.findIndex(X=>X.prefix==="title1"),m=He>=0?Et[He]:Ze.title1Width,O=ae==="two-row"&&o;return r.jsx("div",{...O?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(m)}:{},style:{width:G(k??0),flexShrink:0,alignSelf:"stretch",...O?{pointerEvents:"auto"}:{}}})},ve=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:F,"aria-hidden":"true",children:" "}),Fe=()=>r.jsx("span",{className:`${e}-entry-counter`,style:re,"aria-live":"polite","aria-atomic":"true",children:Rg(de,se,b,t)}),_e=()=>Wt?o&&Te?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Fe(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Ur(H)} + ${H}))`,width:Ur(H),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Fe():null,st=()=>!Wt&&!Te?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Xe,children:[_e(),Te?vt():null]}),Ft=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Wt||Ht?ve():null,it?f("single-row"):null,kt(me),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),st(),Sn()]}),et=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Wt||Ht?ve():null,it?f("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:he&&_?{minHeight:_}:void 0,children:[r.jsx("div",{ref:yt,className:dt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ti(U||me)}),r.jsxs("div",{ref:at,className:dt,style:{position:he?"absolute":"relative",inset:he?0:void 0,width:"100%",...he&&te?{width:te,maxWidth:"100%"}:void 0},children:[$t&&he?r.jsx("div",{className:`${Pt} ${e}-titles-fade-out`,children:ti($t)}):null,r.jsx("div",{className:`${e}-titles-layer-in${he?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:ti(me)})]})]}),st(),Sn()]}),vt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:w.scalingValue(I??0,i),height:w.scalingValue(I??0,i),marginRight:ie,"--close-icon-hover-color":A},children:[r.jsx("button",{ref:ye,type:"button",className:`${e}-close-icon-inner`,onClick:je,"aria-label":"Close",children:r.jsx(rn,{url:W??"",fill:Z,hoverFill:i&&!l?Z:A,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:ie,height:"100%",pointerEvents:"auto"}})]}),Ot=(ae,He)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Wt||Ht?ve():null,it?f("two-row"):null,He!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:He},children:ae}):r.jsxs(r.Fragment,{children:[ae,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),st()]}),kt=ae=>{if(!ae)return null;const He=Vn(e,ae,F,pe,x);return r.jsx(r.Fragment,{children:He.map(m=>Lt(m,"single-row",Bt(He,m,"single-row")))})},cn=ae=>{if(!ae)return null;const He=Vn(e,ae,F,pe,x),m=He.find(O=>O.prefix==="title1");return m?Lt(m,"two-row-top",Bt(He,m,"two-row-top")):null},dn=(ae,He=!1)=>{const m=ae?Vn(e,ae,F,pe,x):[],O=m.filter(Pe=>Pe.prefix==="title2"||Pe.prefix==="title3"),X=o&&He;return O.length>0||X||(C??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[O.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[O.map(Pe=>Lt(Pe,"two-row-bottom",Bt(m,Pe,"two-row-bottom"))),He&&o?r.jsxs(r.Fragment,{children:[Ar(),Fr()]}):null]}):null,(C??0)>0||X?r.jsx("div",{"data-controls":X?"titleRowMarginBottom":void 0,"data-controls-axis":X?"y":void 0,"data-controls-reverse":X?"":void 0,className:X?`${e}-control`:void 0,style:{height:Kt,width:"100%",flexShrink:0,pointerEvents:X?"auto":"none"}}):null]}):null},ei=(ae,He=!1)=>r.jsxs(r.Fragment,{children:[Ot(cn(ae)),dn(ae,He)]}),ti=ae=>J?r.jsx("div",{className:`${e}-titles-row-two-row`,children:ei(ae)}):ae?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:kt(ae)}):null,ko=()=>{const ae=J?-1:lt.findIndex(O=>O.prefix==="title1"),He=!J&&(o||(k??0)>0)?(()=>{const O=k??0,X=ae>=0?Et[ae]:Ze.title1Width,we=Math.max(O,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(X),style:{position:"absolute",top:0,left:0,width:G(we),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,m=lt.flatMap((O,X)=>{if(!O.marginLeftKey)return[];const we=Je[O.marginLeftKey]??0,Pe=fc(lt,Et,Je,X)+Xt(),qe=Math.max(we,Bn);return r.jsx("div",{"data-controls":O.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Et[X]),style:{position:"absolute",top:0,left:G(Pe),width:G(qe),height:"100%",pointerEvents:"auto"}},O.marginLeftKey)});return He?[He,...m]:m},Ao=()=>lt.map((ae,He)=>{const m=ln(He,Et),X=Ut(He)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ae.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(m),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:G(X),width:G(gn),height:"100%",pointerEvents:"auto"}})},`${ae.widthKey}-junction`)}),Ar=()=>zt.flatMap((ae,He)=>{if(!ae.marginLeftKey)return[];const m=Je[ae.marginLeftKey]??0,O=Yt(He),X=Math.max(m,Bn),{resolvedWidth:we}=Ct(ae,"two-row-bottom");return r.jsx("div",{"data-controls":ae.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(we),style:{position:"absolute",top:0,left:G(O),width:G(X),height:"100%",pointerEvents:"auto"}},ae.marginLeftKey)}),Fr=()=>zt.map((ae,He)=>{const{maxWidth:m}=Ct(ae,"two-row-bottom"),X=Jt(He)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ae.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(m),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:G(X),width:G(gn),height:"100%",pointerEvents:"auto"}})},`${ae.widthKey}-junction`)}),Sn=()=>!o||J?null:r.jsxs(r.Fragment,{children:[ko(),Ao()]}),xi=ae=>{const He=!ae.objectFit&&Fn(S);return{className:`${e}-slide-image-cell${He?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:$,maxHeight:M,...He?{"--image-aspect-ratio":Pr(S)}:{}}}},Fo=ae=>ae.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":ae.objectFit}}:Fn(S)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},ni=ae=>{if(ae.length===0)return null;const He=ae.length>1,m=Ur(ne),O=`calc(-0.5 * (${m} + ${ne}))`;if(ae.length===1){const X=ae[0];return r.jsx("div",{...xi(X),children:r.jsx("img",{...Fo(X),src:X.url,alt:X.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:He?{gap:ne}:void 0,children:ae.map((X,we)=>r.jsxs("div",{...xi(X),children:[r.jsx("img",{...Fo(X),src:X.url,alt:X.name??"",draggable:!1}),o&&He&&we<ae.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:O,width:m,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${X.url}-${we}`))})},Wo=!!(me!=null&&me.title2||me!=null&&me.title3||$t!=null&&$t.title2||$t!=null&&$t.title3||(C??0)>0||o),Wr=()=>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:yt,className:dt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ei(U||me)}),r.jsxs("div",{ref:at,className:`${e}-titles-row-two-row`,style:{...he&&_?{minHeight:_}:void 0,...he&&te?{width:te,maxWidth:"100%"}:void 0},children:[Ot(r.jsxs("div",{className:dt,style:{position:he?"absolute":"relative",inset:he?0:void 0,width:"100%"},children:[$t&&he?r.jsx("div",{className:`${ht} ${e}-titles-fade-out`,children:cn($t)}):null,r.jsx("div",{className:`${e}-titles-layer-in${he?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:cn(me)})]}),he&&_?_:void 0),Wo?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[$t&&he?r.jsx("div",{className:`${Pt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:dn($t)}):null,r.jsx("div",{className:`${e}-titles-layer-in${he?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${J?` ${e}-titles-layer-in-stacked`:""}`,children:dn(me,!0)})]}):null]})]}),_r=()=>{const ae=Wo;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ae?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:ae?void 0:{flex:"0 0 auto",height:"auto"},children:ei(me,!0)}),Sn()]})};return r.jsxs("div",{ref:Ve,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{pt||je()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:Te?void 0:-1,style:{opacity:Ne?1:0,transition:"opacity 300ms ease",pointerEvents:Ne?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:L,...Qe}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Ke,...Ue,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:St,onClick:ae=>ae.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":fe&&de.length>1?"true":"false",onPointerDown:fe?At:void 0,onPointerUp:fe?Zt:void 0,onPointerCancel:fe?tn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[Tt&&ge?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:ae=>{ae.target===ae.currentTarget&&We(Le)},children:r.jsx("div",{className:`${e}-slide-area`,children:ni(Tt.images)})},`slide-out-${Le}`):null,r.jsx("div",{className:`${e}-slide-layer-in${ge?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:Q?ni(Q.images):null})},`slide-in-${Le}-${se}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:ct,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ee,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:Ge&&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?E==="fade"?Wr():_r():E==="fade"?et():Ft()})})})]})]})]})};function ly(e){return`
13961
+ `,gy="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 hy(e){const t={};return t[Nt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Nt(e,"fontSettings")]={...si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Nt(e,"fontSize")]={...si.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Nt(e,"lineHeight")]={...si.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Nt(e,"letterSpacing")]={...si.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Nt(e,"wordSpacing")]={...si.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Nt(e,"textAlign")]={...si.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Nt(e,"textAppearance")]={...si.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const fy=Gi.reduce((e,t)=>({...e,...hy(t)}),{}),yy=Gi.reduce((e,t)=>({...e,[Nt(t,"fontFamily")]:"Goudy Bookletter 1911",[Nt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Nt(t,"letterSpacing")]:0,[Nt(t,"wordSpacing")]:0,[Nt(t,"textAlign")]:"left",[Nt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ia(e){return Gi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Nt(n,"fontSize")]=i),o!==void 0&&(t[Nt(n,"lineHeight")]=o),t},{})}const vy=sy(),by={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"}},...fy,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:gy,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...yy},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,...ia({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,...ia({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,...ia({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:[vy]}],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"}]}},xy={element:py,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:by,sourceCode:my,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Gi.map(e=>({path:`${Nt(e,"fontFamily")}`}))]},fontRelations:{...Gi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Nt(t,"fontFamily")}`}),{})}},wy=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:l=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:p})=>{const{type:v,coverFit:x,backgroundColor:I,imageGap:h,maxWidth:g,maxHeight:y,textTransition:E,title1Width:L,title2Width:C,title3Width:K,title1MarginLeft:A=0,title2MarginLeft:B=0,title3MarginLeft:P=0,titleRowMarginBottom:T=0,titleHeaderLayout:z="single-row",countCloseGap:w=0,closeIcon:W,closeIconMaxWidth:R,closeIconColor:J,closeIconHoverColor:F,contentMarginTop:U=0,iconMarginRight:V=0}=n,G=a.useCallback(ae=>S.scalingValue(ae,i??!1),[i]),oe=G(h??0),$=`${g}%`,M=`${y}%`,N=G(w),Q=G(U),te=G(V),k=pi("title1",ui(n,"title1"),i),le=pi("title2",ui(n,"title2"),i),f=pi("title3",ui(n,"title3"),i),ne=pi("count",ui(n,"count"),i),Z=z==="mobile",fe=!i||!!s,Ie=!o&&(!i||!!s),ue=a.useMemo(()=>ir(t,v),[t,v]),[se,q]=a.useState(l),ee=ue[se],ce=ee==null?void 0:ee.entry,[ke,$e]=a.useState(!1),[Pe,pe]=a.useState(null),[he,be]=a.useState(!1),[j,re]=a.useState(null),[ge,xe]=a.useState(!1),[Le,we]=a.useState(0),[_,me]=a.useState(),[ie,H]=a.useState(),[X,Re]=a.useState(null),de=a.useRef(null),D=a.useRef(0),ze=a.useRef(0),Fe=a.useRef(0),ot=a.useRef(!1),tt=a.useRef(null),at=a.useRef(null),yt=a.useRef(null),Ve=a.useRef(null),ye=a.useRef(null),Me=a.useRef(null),je=a.useRef(null),Ee=a.useCallback(()=>{const ae=at.current;if(!ae)return;const He=ae.closest(`.${e}-lightbox-content-area`);if(!He)return ae.getBoundingClientRect().width;const m=Array.from(He.children).reduce((O,Y)=>!(Y instanceof HTMLElement)||Y.contains(ae)?O:O+Y.getBoundingClientRect().width,0);return He.getBoundingClientRect().width-m},[e]),Ce=a.useCallback(()=>{de.current&&(clearTimeout(de.current),de.current=null)},[]),_e=a.useCallback(ae=>{ae===D.current&&(re(null),xe(!1))},[]),De=a.useCallback(()=>{o||ot.current||(ot.current=!0,u==null||u(),$e(!1),tt.current=setTimeout(()=>{p()},300))},[o,u,p]),nt=a.useCallback(ae=>!!(ae.closest("[data-controls]")||ae.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:pt,backdropStyle:Qe,mediaAreaStyle:St,overlayContentStyle:ct,swipeHandlers:Ue,dismissAreaStyle:Ke}=Hc({enabled:Ie,onClose:De,animMs:300,isBlockedTarget:nt}),Oe=a.useCallback(ae=>{d&&xc(ae+1,c,!0)},[d,c]),ft=a.useCallback(ae=>{if(ae)return ae.getBoundingClientRect().height},[]),mt=a.useCallback(ae=>{if(ue.length===0)return;const He=(ae%ue.length+ue.length)%ue.length;if(He===se)return;const m=ue[se],O=ue[He];D.current+=1;const Y=D.current,Se=E==="fade"&&js(m==null?void 0:m.entry)!==js(O==null?void 0:O.entry),Ae=ft(yt.current),qe=Se?(()=>{const It=Ee();Yn.flushSync(()=>{Re(O.entry)}),yt.current&&It&&(yt.current.style.width=`${It}px`);const nn=ft(yt.current);return yt.current&&(yt.current.style.width=""),{measuredIncomingTitlesHeight:nn,incomingTitlesMeasureWidth:It}})():void 0,bt=Math.max(Ae??0,(qe==null?void 0:qe.measuredIncomingTitlesHeight)??0)||void 0;we(Y),re(se),xe(!0),q(He),Oe(He),Fe.current=He,Se?(Ce(),bt&&me(bt),qe!=null&&qe.incomingTitlesMeasureWidth&&H(qe.incomingTitlesMeasureWidth),pe((m==null?void 0:m.entryIndex)??null),be(!0),ze.current=O.entryIndex,de.current=setTimeout(()=>{pe(null),be(!1),me(void 0),H(void 0),Re(null),de.current=null},400)):(Ce(),pe(null),be(!1),me(void 0),H(void 0),Re(null),ze.current=O.entryIndex)},[se,Ce,Ee,ft,ue,Oe,E]),gt=a.useCallback(()=>{je.current=null},[]),At=a.useCallback(ae=>{!fe||ue.length<=1||ae.pointerType==="mouse"&&ae.button!==0||ae.target.closest("[data-controls]")||(je.current={startX:ae.clientX,startY:ae.clientY,pointerId:ae.pointerId})},[fe,ue.length]),Zt=a.useCallback(ae=>{var It;if(!fe||ue.length<=1||ae.pointerType==="mouse"&&ae.button!==0)return;if(pt){gt();return}const He=je.current;if(!He||He.pointerId!==ae.pointerId||(gt(),ae.target.closest("[data-controls]")))return;const O=ae.clientX-He.startX,Y=ae.clientY-He.startY,Se=Math.abs(O),Ae=Math.abs(Y);if(Se>=Wg&&Se>Ae){mt(O>0?se-1:se+1);return}if(Se>Ns||Ae>Ns)return;const qe=(It=Ve.current)==null?void 0:It.getBoundingClientRect(),bt=qe?qe.left+qe.width/2:window.innerWidth/2;mt(ae.clientX<bt?se-1:se+1)},[se,fe,mt,pt,gt,ue.length]),tn=a.useCallback(ae=>{const He=je.current;(He==null?void 0:He.pointerId)===ae.pointerId&&gt()},[gt]);Oc(),a.useEffect(()=>{Me.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const ae=requestAnimationFrame(()=>{$e(!0),requestAnimationFrame(()=>{ye.current?ye.current.focus():Ve.current&&Ve.current.focus()})});return()=>{cancelAnimationFrame(ae),tt.current&&clearTimeout(tt.current),de.current&&clearTimeout(de.current);const He=Me.current;He&&document.contains(He)&&He.focus({preventScroll:!0})}},[]),a.useEffect(()=>{var ae;E!=="fade"&&(ze.current=((ae=ue[se])==null?void 0:ae.entryIndex)??0,Ce(),pe(null),be(!1),me(void 0),H(void 0))},[se,Ce,ue,E]),a.useEffect(()=>{const ae=He=>{if(He.key==="Escape"){De();return}if(He.key==="ArrowLeft"&&ue.length>1){mt(se-1);return}if(He.key==="ArrowRight"&&ue.length>1){mt(se+1);return}if(He.key==="Tab"&&Ve.current){const m=Ve.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),O=Array.from(m).filter(qe=>!qe.closest('[aria-hidden="true"]'));if(O.length===0)return;const Y=O[0],Se=O[O.length-1],Ae=document.activeElement;He.shiftKey?(Ae===Y||!Ve.current.contains(Ae))&&(He.preventDefault(),Se.focus()):(Ae===Se||!Ve.current.contains(Ae))&&(He.preventDefault(),Y.focus())}};return window.addEventListener("keydown",ae),()=>window.removeEventListener("keydown",ae)},[mt,De,se,ue.length]),a.useLayoutEffect(()=>{Ce(),D.current=0,we(0),re(null),xe(!1),pe(null),be(!1),me(void 0),H(void 0),Re(null),q(ae=>{const He=Math.max(0,ue.length-1);return Math.min(ae,He)})},[Ce,t.length,v,ue.length]),a.useLayoutEffect(()=>{var m;const ae=Math.max(0,ue.length-1),He=Math.min(Math.max(0,l),ae);Fe.current=He,ze.current=((m=ue[He])==null?void 0:m.entryIndex)??0,q(He)},[l]);const $t=Pe!==null?t[Pe]:null,Tt=j!==null?ue[j]:null,Ht=(ce==null?void 0:ce.title1)||(ce==null?void 0:ce.title2)||(ce==null?void 0:ce.title3)||($t==null?void 0:$t.title1)||($t==null?void 0:$t.title2)||($t==null?void 0:$t.title3),Wt=Bg(v,ue,t),Te=W!==null,Ge=Ht||Wt||Te,Xe=Wt&&Te?{gap:N}:void 0,dt=`${e}-titles-stack${Z?` ${e}-titles-stack-stacked`:""}`,Pt=`${e}-titles-layer-out${Z?` ${e}-titles-layer-out-stacked`:""}`,ht=`${e}-titles-layer-out`,it=(A??0)>0||o,Kt=G(T),Ze=a.useMemo(()=>({title1Width:L??Ai.title1Width,title2Width:C??Ai.title2Width,title3Width:K??Ai.title3Width}),[L,C,K]),Je=a.useMemo(()=>({title2MarginLeft:B,title3MarginLeft:P}),[B,P]),st=a.useMemo(()=>ce?Vn(e,ce,k,le,f):[],[e,ce,k,le,f]),Mt=a.useMemo(()=>st.map(ae=>Ze[ae.widthKey]),[st,Ze]),Et=a.useMemo(()=>Oi(st.length,Mt),[st.length,Mt]),xt=a.useMemo(()=>bo(st.length,Mt),[st.length,Mt]),_t=a.useMemo(()=>st.filter(ae=>ae.prefix==="title1"),[st]),zt=a.useMemo(()=>st.filter(ae=>ae.prefix==="title2"||ae.prefix==="title3"),[st]),jt=a.useMemo(()=>Gn(_t,Ze),[_t,Ze]),qt=a.useMemo(()=>Gn(zt,Ze),[zt,Ze]),Ct=a.useCallback((ae,He)=>{const m=st.findIndex(Y=>Y.prefix===ae.prefix);if(!Z||He==="single-row")return{effectiveWidth:xt[m]??0,resolvedWidth:Et[m]??0,maxWidth:sn(m,Et)};if(He==="two-row-top"){const Y=_t.findIndex(Se=>Se.prefix===ae.prefix);return{effectiveWidth:jt.effective[Y]??0,resolvedWidth:jt.resolved[Y]??0,maxWidth:sn(Y,jt.resolved)}}const O=zt.findIndex(Y=>Y.prefix===ae.prefix);return{effectiveWidth:qt.effective[O]??0,resolvedWidth:qt.resolved[O]??0,maxWidth:sn(O,qt.resolved)}},[st,zt,qt,xt,Et,_t,jt,Z]),Ut=a.useCallback(ae=>Cc(st,Et,Je,ae)+(Z?0:A??0),[st,Et,Je,Z,A]),Xt=a.useCallback(()=>Z?0:A??0,[Z,A]),Yt=a.useCallback(ae=>zt.slice(0,ae).reduce((He,m,O)=>He+(m.marginLeftKey?Je[m.marginLeftKey]??0:0)+(qt.resolved[O]??0),0),[zt,qt.resolved,Je]),Jt=a.useCallback(ae=>{const He=zt[ae];return Yt(ae)+(He.marginLeftKey?Je[He.marginLeftKey]??0:0)+(qt.resolved[ae]??0)},[zt,qt.resolved,Yt,Je]),Bt=a.useCallback((ae,He,m)=>{if(!Z||m==="single-row"){const qe=ae.findIndex(Qt=>Qt.prefix===He.prefix),bt=ae.map(Qt=>Ze[Qt.widthKey]),It=Oi(ae.length,bt);return{effectiveWidth:bo(ae.length,bt)[qe]??0,resolvedWidth:It[qe]??0,maxWidth:sn(qe,It)}}if(m==="two-row-top"){const qe=ae.filter(Qt=>Qt.prefix==="title1"),bt=qe.findIndex(Qt=>Qt.prefix===He.prefix),{resolved:It,effective:nn}=Gn(qe,Ze);return{effectiveWidth:nn[bt]??0,resolvedWidth:It[bt]??0,maxWidth:sn(bt,It)}}const O=ae.filter(qe=>qe.prefix==="title2"||qe.prefix==="title3"),Y=O.findIndex(qe=>qe.prefix===He.prefix),{resolved:Se,effective:Ae}=Gn(O,Ze);return{effectiveWidth:Ae[Y]??0,resolvedWidth:Se[Y]??0,maxWidth:sn(Y,Se)}},[Ze,Z]),Lt=(ae,He,m)=>{const O=ae.marginLeftKey?Je[ae.marginLeftKey]??0:0,{effectiveWidth:Y,resolvedWidth:Se,maxWidth:Ae}=m??Ct(ae,He),qe=Math.max(O,Bn),bt=o&&He==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":ae.prefix,style:{width:G(Y),...O>0?{marginLeft:G(O)}:{}},children:[r.jsx("p",{className:ae.className,style:ae.style,children:ae.text}),bt&&ae.marginLeftKey?r.jsx("div",{"data-controls":ae.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Se),style:{position:"absolute",top:0,left:G(-O),width:G(qe),height:"100%",pointerEvents:"auto"}}):null,bt?r.jsx("div",{"data-controls":ae.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:G(-gn/2),width:G(gn),height:"100%",pointerEvents:"auto"}}):null]},ae.className)},b=(ae="two-row")=>{const He=st.findIndex(Y=>Y.prefix==="title1"),m=He>=0?Et[He]:Ze.title1Width,O=ae==="two-row"&&o;return r.jsx("div",{...O?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(m)}:{},style:{width:G(A??0),flexShrink:0,alignSelf:"stretch",...O?{pointerEvents:"auto"}:{}}})},ve=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:k,"aria-hidden":"true",children:" "}),We=()=>r.jsx("span",{className:`${e}-entry-counter`,style:ne,"aria-live":"polite","aria-atomic":"true",children:zg(ue,se,v,t)}),Ne=()=>Wt?o&&Te?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[We(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Kr(N)} + ${N}))`,width:Kr(N),height:"100%",pointerEvents:"auto",zIndex:3}})]}):We():null,lt=()=>!Wt&&!Te?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Xe,children:[Ne(),Te?vt():null]}),Ft=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Wt||Ht?ve():null,it?b("single-row"):null,kt(ce),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),lt(),Sn()]}),et=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Wt||Ht?ve():null,it?b("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:he&&_?{minHeight:_}:void 0,children:[r.jsx("div",{ref:yt,className:dt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ti(X||ce)}),r.jsxs("div",{ref:at,className:dt,style:{position:he?"absolute":"relative",inset:he?0:void 0,width:"100%",...he&&ie?{width:ie,maxWidth:"100%"}:void 0},children:[$t&&he?r.jsx("div",{className:`${Pt} ${e}-titles-fade-out`,children:ti($t)}):null,r.jsx("div",{className:`${e}-titles-layer-in${he?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:ti(ce)})]})]}),lt(),Sn()]}),vt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:S.scalingValue(R??0,i),height:S.scalingValue(R??0,i),marginRight:te,"--close-icon-hover-color":F},children:[r.jsx("button",{ref:ye,type:"button",className:`${e}-close-icon-inner`,onClick:De,"aria-label":"Close",children:r.jsx(rn,{url:W??"",fill:J,hoverFill:i&&!s?J:F,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:te,height:"100%",pointerEvents:"auto"}})]}),Ot=(ae,He)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Wt||Ht?ve():null,it?b("two-row"):null,He!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:He},children:ae}):r.jsxs(r.Fragment,{children:[ae,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),lt()]}),kt=ae=>{if(!ae)return null;const He=Vn(e,ae,k,le,f);return r.jsx(r.Fragment,{children:He.map(m=>Lt(m,"single-row",Bt(He,m,"single-row")))})},cn=ae=>{if(!ae)return null;const He=Vn(e,ae,k,le,f),m=He.find(O=>O.prefix==="title1");return m?Lt(m,"two-row-top",Bt(He,m,"two-row-top")):null},dn=(ae,He=!1)=>{const m=ae?Vn(e,ae,k,le,f):[],O=m.filter(Ae=>Ae.prefix==="title2"||Ae.prefix==="title3"),Y=o&&He;return O.length>0||Y||(T??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[O.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[O.map(Ae=>Lt(Ae,"two-row-bottom",Bt(m,Ae,"two-row-bottom"))),He&&o?r.jsxs(r.Fragment,{children:[Fr(),Wr()]}):null]}):null,(T??0)>0||Y?r.jsx("div",{"data-controls":Y?"titleRowMarginBottom":void 0,"data-controls-axis":Y?"y":void 0,"data-controls-reverse":Y?"":void 0,className:Y?`${e}-control`:void 0,style:{height:Kt,width:"100%",flexShrink:0,pointerEvents:Y?"auto":"none"}}):null]}):null},ei=(ae,He=!1)=>r.jsxs(r.Fragment,{children:[Ot(cn(ae)),dn(ae,He)]}),ti=ae=>Z?r.jsx("div",{className:`${e}-titles-row-two-row`,children:ei(ae)}):ae?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:kt(ae)}):null,ko=()=>{const ae=Z?-1:st.findIndex(O=>O.prefix==="title1"),He=!Z&&(o||(A??0)>0)?(()=>{const O=A??0,Y=ae>=0?Et[ae]:Ze.title1Width,Se=Math.max(O,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Y),style:{position:"absolute",top:0,left:0,width:G(Se),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,m=st.flatMap((O,Y)=>{if(!O.marginLeftKey)return[];const Se=Je[O.marginLeftKey]??0,Ae=$c(st,Et,Je,Y)+Xt(),qe=Math.max(Se,Bn);return r.jsx("div",{"data-controls":O.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Et[Y]),style:{position:"absolute",top:0,left:G(Ae),width:G(qe),height:"100%",pointerEvents:"auto"}},O.marginLeftKey)});return He?[He,...m]:m},Ao=()=>st.map((ae,He)=>{const m=sn(He,Et),Y=Ut(He)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ae.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(m),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:G(Y),width:G(gn),height:"100%",pointerEvents:"auto"}})},`${ae.widthKey}-junction`)}),Fr=()=>zt.flatMap((ae,He)=>{if(!ae.marginLeftKey)return[];const m=Je[ae.marginLeftKey]??0,O=Yt(He),Y=Math.max(m,Bn),{resolvedWidth:Se}=Ct(ae,"two-row-bottom");return r.jsx("div",{"data-controls":ae.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Se),style:{position:"absolute",top:0,left:G(O),width:G(Y),height:"100%",pointerEvents:"auto"}},ae.marginLeftKey)}),Wr=()=>zt.map((ae,He)=>{const{maxWidth:m}=Ct(ae,"two-row-bottom"),Y=Jt(He)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ae.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(m),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:G(Y),width:G(gn),height:"100%",pointerEvents:"auto"}})},`${ae.widthKey}-junction`)}),Sn=()=>!o||Z?null:r.jsxs(r.Fragment,{children:[ko(),Ao()]}),bi=ae=>{const He=!ae.objectFit&&Fn(x);return{className:`${e}-slide-image-cell${He?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:$,maxHeight:M,...He?{"--image-aspect-ratio":Pr(x)}:{}}}},Fo=ae=>ae.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":ae.objectFit}}:Fn(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},ni=ae=>{if(ae.length===0)return null;const He=ae.length>1,m=Kr(oe),O=`calc(-0.5 * (${m} + ${oe}))`;if(ae.length===1){const Y=ae[0];return r.jsx("div",{...bi(Y),children:r.jsx("img",{...Fo(Y),src:Y.url,alt:Y.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:He?{gap:oe}:void 0,children:ae.map((Y,Se)=>r.jsxs("div",{...bi(Y),children:[r.jsx("img",{...Fo(Y),src:Y.url,alt:Y.name??"",draggable:!1}),o&&He&&Se<ae.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:O,width:m,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Y.url}-${Se}`))})},Wo=!!(ce!=null&&ce.title2||ce!=null&&ce.title3||$t!=null&&$t.title2||$t!=null&&$t.title3||(T??0)>0||o),_r=()=>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:yt,className:dt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ei(X||ce)}),r.jsxs("div",{ref:at,className:`${e}-titles-row-two-row`,style:{...he&&_?{minHeight:_}:void 0,...he&&ie?{width:ie,maxWidth:"100%"}:void 0},children:[Ot(r.jsxs("div",{className:dt,style:{position:he?"absolute":"relative",inset:he?0:void 0,width:"100%"},children:[$t&&he?r.jsx("div",{className:`${ht} ${e}-titles-fade-out`,children:cn($t)}):null,r.jsx("div",{className:`${e}-titles-layer-in${he?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:cn(ce)})]}),he&&_?_:void 0),Wo?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[$t&&he?r.jsx("div",{className:`${Pt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:dn($t)}):null,r.jsx("div",{className:`${e}-titles-layer-in${he?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${Z?` ${e}-titles-layer-in-stacked`:""}`,children:dn(ce,!0)})]}):null]})]}),Nr=()=>{const ae=Wo;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ae?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:ae?void 0:{flex:"0 0 auto",height:"auto"},children:ei(ce,!0)}),Sn()]})};return r.jsxs("div",{ref:Ve,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{pt||De()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:Te?void 0:-1,style:{opacity:ke?1:0,transition:"opacity 300ms ease",pointerEvents:ke?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:I,...Qe}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Ke,...Ue,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:St,onClick:ae=>ae.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":fe&&ue.length>1?"true":"false",onPointerDown:fe?At:void 0,onPointerUp:fe?Zt:void 0,onPointerCancel:fe?tn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[Tt&&ge?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:ae=>{ae.target===ae.currentTarget&&_e(Le)},children:r.jsx("div",{className:`${e}-slide-area`,children:ni(Tt.images)})},`slide-out-${Le}`):null,r.jsx("div",{className:`${e}-slide-layer-in${ge?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:ee?ni(ee.images):null})},`slide-in-${Le}-${se}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:ct,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:Ge&&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?E==="fade"?_r():Nr():E==="fade"?et():Ft()})})})]})]})]})};function Sy(e){return`
13962
13962
  .${e}-wrapper {
13963
13963
  position: relative;
13964
13964
  width: 100%;
@@ -14480,7 +14480,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
14480
14480
  pointer-events: auto;
14481
14481
  z-index: 10;
14482
14482
  }
14483
- `}const sy=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:l,metadata:s})=>{const{prefix:d}=w.useScopedStyles(),c=(s==null?void 0:s.itemId)??null,{cover:u,coverFit:p,type:b}=e,S=a.useRef(null),[L,h]=a.useState(!1),[g,y]=a.useState(0),E=a.useRef(!1),R=a.useRef(!1),T=a.useRef(!1),Y=a.useMemo(()=>(t??[]).filter(v=>Hi(v).length>0),[t]),k=L&&Y.length>0,B=!n,P=a.useCallback(()=>{B&&(T.current=!0,Sg(R.current,c),R.current=!1)},[B,c]),C=(v=0)=>{if(Y.length===0||n&&!i&&!o)return;const W=ir(Y,b),I=Math.max(0,Math.min(v,W.length-1));if(y(I),B){const Z=gc();mc(I+1,c,Z),R.current=!Z}h(!0)},z=a.useCallback(()=>{h(!1),T.current=!1},[]);return a.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),a.useEffect(()=>{if(!B||E.current)return;E.current=!0;const v=Wl(c);if(!v)return;const W=_l(v,ir(Y,b).length);W<0||(y(W),h(!0))},[Y,c,B,b]),a.useEffect(()=>{if(!B)return;const v=()=>{if(T.current){T.current=!1,h(!1);return}const W=Wl(c);if(!W){h(!1);return}const I=_l(W,ir(Y,b).length);if(I<0){h(!1);return}R.current=!1,y(I),h(!0)};return window.addEventListener("popstate",v),()=>window.removeEventListener("popstate",v)},[Y,c,B,b]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:S,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ly(d)}}),u?r.jsx("button",{type:"button",className:`${d}-cover ${Fn(p)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>C(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...Fn(p)?{"--image-aspect-ratio":Pr(p)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${Fn(p)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),k&&typeof document<"u"&&(()=>{const v=(l?document.getElementById(l):null)??document.body;return Yn.createPortal(r.jsx(ay,{prefix:d,entries:Y,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:g,enableUrlSync:B,journalItemId:c,onBeforeClose:P,onClose:z}),v)})()]})},cy=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
14483
+ `}const $y=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:l})=>{const{prefix:d}=S.useScopedStyles(),c=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:v}=e,x=a.useRef(null),[I,h]=a.useState(!1),[g,y]=a.useState(0),E=a.useRef(!1),L=a.useRef(!1),C=a.useRef(!1),K=a.useMemo(()=>(t??[]).filter(w=>Hi(w).length>0),[t]),A=I&&K.length>0,B=!n,P=a.useCallback(()=>{B&&(C.current=!0,Ng(L.current,c),L.current=!1)},[B,c]),T=(w=0)=>{if(K.length===0||n&&!i&&!o)return;const W=ir(K,v),R=Math.max(0,Math.min(w,W.length-1));if(y(R),B){const J=wc();xc(R+1,c,J),L.current=!J}h(!0)},z=a.useCallback(()=>{h(!1),C.current=!1},[]);return a.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),a.useEffect(()=>{if(!B||E.current)return;E.current=!0;const w=Os(c);if(!w)return;const W=Ds(w,ir(K,v).length);W<0||(y(W),h(!0))},[K,c,B,v]),a.useEffect(()=>{if(!B)return;const w=()=>{if(C.current){C.current=!1,h(!1);return}const W=Os(c);if(!W){h(!1);return}const R=Ds(W,ir(K,v).length);if(R<0){h(!1);return}L.current=!1,y(R),h(!0)};return window.addEventListener("popstate",w),()=>window.removeEventListener("popstate",w)},[K,c,B,v]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:x,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Sy(d)}}),u?r.jsx("button",{type:"button",className:`${d}-cover ${Fn(p)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>T(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...Fn(p)?{"--image-aspect-ratio":Pr(p)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${Fn(p)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),A&&typeof document<"u"&&(()=>{const w=(s?document.getElementById(s):null)??document.body;return Yn.createPortal(r.jsx(wy,{prefix:d,entries:K,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:g,enableUrlSync:B,journalItemId:c,onBeforeClose:P,onClose:z}),w)})()]})},Cy=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
14484
14484
  import { createPortal } from 'react-dom';
14485
14485
  import { CommonComponentProps } from '../props';
14486
14486
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -15236,7 +15236,7 @@ export type LightboxJournalSettings = {
15236
15236
  closeIconColor: string;
15237
15237
  closeIconHoverColor: string;
15238
15238
  };
15239
- `,dy="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 uy(e){const t={};return t[Ye(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ye(e,"fontSettings")]={...si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ye(e,"fontSize")]={...si.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ye(e,"lineHeight")]={...si.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ye(e,"letterSpacing")]={...si.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ye(e,"wordSpacing")]={...si.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ye(e,"textAlign")]={...si.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ye(e,"textAppearance")]={...si.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const py=Kn.reduce((e,t)=>({...e,...uy(t)}),{}),my=Kn.reduce((e,t)=>({...e,[Ye(t,"fontFamily")]:"Goudy Bookletter 1911",[Ye(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ye(t,"letterSpacing")]:0,[Ye(t,"wordSpacing")]:0,[Ye(t,"textAlign")]:"left",[Ye(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ia(e){return Kn.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ye(n,"fontSize")]=i),o!==void 0&&(t[Ye(n,"lineHeight")]=o),t},{})}const gy=Mg(),hy={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"}},...py,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:dy,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...my,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,...ia({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,...ia({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,...ia({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:[gy]}],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"}]}]}},fy={element:sy,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:hy,sourceCode:cy,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Kn.map(e=>({path:`${Ye(e,"fontFamily")}`}))]},fontRelations:{...Kn.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ye(t,"fontFamily")}`}),{})}},yy={sizeType:"custom",value:700,min:400,max:700};function gr(e,t){return{widthPx:e,heightPx:e*t}}function $a(e,t,n,i,o,l){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,l/2),i-l/2)}}function ss(e,t,n,i){const{heightPx:o}=gr(n,i);return $a(e/2,t/2,e,t,n,o)}function Fc(e,t,n){for(const i of n){const{heightPx:o}=gr(i.widthPx,i.aspectRatio),l=i.widthPx/2,s=o/2;if(e>=i.x-l&&e<=i.x+l&&t>=i.y-s&&t<=i.y+s)return!0}return!1}function vy(e,t,n,i,o,l,s,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":Fc(e,t,n)||l==="area"?s??"none":d??"none"}function cs(e,t,n){var d;const{sizeType:i,value:o,min:l,max:s}=t;return i==="custom"?o:i==="as is"?((d=n.get(e))==null?void 0:d.naturalWidth)??o:Math.round(Math.random()*(s-l)+l)}function xy(e){return`
15239
+ `,Ty="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>'),li={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 Ly(e){const t={};return t[Ye(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ye(e,"fontSettings")]={...li.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ye(e,"fontSize")]={...li.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ye(e,"lineHeight")]={...li.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ye(e,"letterSpacing")]={...li.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ye(e,"wordSpacing")]={...li.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ye(e,"textAlign")]={...li.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ye(e,"textAppearance")]={...li.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Iy=Kn.reduce((e,t)=>({...e,...Ly(t)}),{}),Ry=Kn.reduce((e,t)=>({...e,[Ye(t,"fontFamily")]:"Goudy Bookletter 1911",[Ye(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ye(t,"letterSpacing")]:0,[Ye(t,"wordSpacing")]:0,[Ye(t,"textAlign")]:"left",[Ye(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function oa(e){return Kn.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ye(n,"fontSize")]=i),o!==void 0&&(t[Ye(n,"lineHeight")]=o),t},{})}const My=Vg(),Ey={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"}},...Iy,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:Ty,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...Ry,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,...oa({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,...oa({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,...oa({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:[My]}],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"}]}]}},Py={element:$y,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:Ey,sourceCode:Cy,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Kn.map(e=>({path:`${Ye(e,"fontFamily")}`}))]},fontRelations:{...Kn.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ye(t,"fontFamily")}`}),{})}},ky={sizeType:"custom",value:700,min:400,max:700};function gr(e,t){return{widthPx:e,heightPx:e*t}}function Ta(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 pl(e,t,n,i){const{heightPx:o}=gr(n,i);return Ta(e/2,t/2,e,t,n,o)}function jc(e,t,n){for(const i of n){const{heightPx:o}=gr(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 Ay(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":jc(e,t,n)||s==="area"?l??"none":d??"none"}function ml(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 Fy(e){return`
15240
15240
  .${e}-root {
15241
15241
  position: absolute;
15242
15242
  top: 0;
@@ -15271,7 +15271,7 @@ export type LightboxJournalSettings = {
15271
15271
  width: 32px;
15272
15272
  height: 32px;
15273
15273
  }
15274
- `}function by(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 wy(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await by(i)]));return new Map(n)}function Sy({settings:e,content:t=[],isEditor:n}){const{prefix:i}=w.useScopedStyles(),[o,l]=a.useState(null),[s,d]=a.useState([]),[c,u]=a.useState(0),p=a.useRef(0),[b,S]=a.useState({x:0,y:0}),[L,h]=a.useState("none"),g=a.useRef({x:0,y:0}),[y,E]=a.useState(!1),[R,T]=a.useState(!1),Y=a.useRef(new Map),{imageSize:k=yy,cursor:B="system",target:P="area",position:C="random",visible:z="all",defaultCursor:v=null,hoverCursor:W=null}=e,I=t.filter($=>{var M;return!!((M=$==null?void 0:$.image)!=null&&M.url)}),Z=a.useMemo(()=>xy(i),[i]),A=a.useCallback(($,M,H=s)=>{if(!o)return;const ee=o.getBoundingClientRect(),ie=$-ee.left,F=M-ee.top;S({x:ie,y:F}),h(vy(ie,F,H,o,B,P,W,v))},[o,s,B,P,W,v]);a.useEffect(()=>{const $=[...I.map(H=>H.image.url),v,W].filter(H=>!!H);if($.length===0){Y.current=new Map,T(!0);return}let M=!1;return T(!1),wy($).then(H=>{M||(Y.current=H,T(!0))}),()=>{M=!0}},[t,v,W]),a.useEffect(()=>{if(!o)return;const $=H=>{H.stopPropagation(),g.current={x:H.clientX,y:H.clientY},A(H.clientX,H.clientY)},M=()=>{y&&A(g.current.x,g.current.y)};return o.addEventListener("mousemove",$),window.addEventListener("scroll",M,!0),()=>{o.removeEventListener("mousemove",$),window.removeEventListener("scroll",M,!0)}},[o,y,A]),a.useEffect(()=>{!o||!y||A(g.current.x,g.current.y)},[s,o,y,A]),a.useEffect(()=>{y||h("none")},[y]);const K=($,M,H,ee={})=>{var J,fe;if(!((J=$==null?void 0:$.image)!=null&&J.url))return null;const ie=((fe=Y.current.get($.image.url))==null?void 0:fe.aspectRatio)??1,F=cs($.image.url,k,Y.current),{heightPx:pe}=gr(F,ie);let x=0,re=0;return C==="same"?{x,y:re}=ss(M,H,F,ie):(x=ee.x??Math.random()*M,re=ee.y??Math.random()*H,{x,y:re}=$a(x,re,M,H,F,pe)),{id:p.current++,url:$.image.url,link:$.link,name:$.image.name,x,y:re,xRatio:x/M,yRatio:re/H,aspectRatio:ie,widthPx:F}},V=()=>{if(!o)return;const $=o.getBoundingClientRect(),M=$.width,H=$.height;M===0||H===0||d(ee=>ee.length===0?ee:ee.map(ie=>{const F=k.sizeType==="random"?ie.widthPx:cs(ie.url,k,Y.current),{heightPx:pe}=gr(F,ie.aspectRatio);if(C==="same"){const{x:J,y:fe}=ss(M,H,F,ie.aspectRatio);return{...ie,x:J,y:fe,widthPx:F}}const{x,y:re}=$a(ie.xRatio*M,ie.yRatio*H,M,H,F,pe);return{...ie,x,y:re,widthPx:F}}))};a.useEffect(()=>{if(!o||I.length===0||!R)return;const $=o.getBoundingClientRect(),M=$.width,H=$.height,ee=K(I[0],M,H);ee&&(d([ee]),u(I.length>1?1:0))},[k,C,o,t,R]),a.useEffect(()=>{if(!o)return;V();const $=new ResizeObserver(V);return $.observe(o),window.addEventListener("resize",V),()=>{$.disconnect(),window.removeEventListener("resize",V)}},[o,C,k,s.length]),a.useEffect(()=>{z==="last One"&&d($=>$.length>0?[$[$.length-1]]:[])},[z]);const G=$=>{if(!o||I.length===0||!R)return;const M=o.getBoundingClientRect(),H=$.clientX-M.left,ee=$.clientY-M.top;if(P==="image"&&!Fc(H,ee,s))return;let ie=0,F=0;C==="on Click"?(ie=H,F=ee):C==="same"?(ie=M.width/2,F=M.height/2):(ie=Math.random()*M.width,F=Math.random()*M.height);const pe=I[c%I.length],x=K(pe,M.width,M.height,{x:ie,y:F});if(!x)return;const re=z==="all"?[...s,x]:[x];d(re),u(J=>(J+1)%I.length),A($.clientX,$.clientY,re)},ne=B==="custom"&&L!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Z}}),r.jsxs("div",{ref:l,onClick:G,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),className:`${i}-root`,style:{cursor:ne?"none":"default"},children:[s.map($=>r.jsx("div",{className:`${i}-wrapper`,style:{top:`${$.y}px`,left:`${$.x}px`,width:`${$.widthPx}px`,cursor:ne?"none":"default"},children:P==="area"&&$.link?r.jsx("a",{href:$.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:r.jsx("img",{src:$.url,alt:$.name,className:`${i}-image`})}):r.jsx("img",{src:$.url,alt:$.name,className:`${i}-image`})},$.id)),y&&ne&&r.jsx("div",{className:`${i}-cursor`,style:{left:`${b.x}px`,top:`${b.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${L}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const $y=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15274
+ `}function Wy(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 _y(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await Wy(i)]));return new Map(n)}function Ny({settings:e,content:t=[],isEditor:n}){const{prefix:i}=S.useScopedStyles(),[o,s]=a.useState(null),[l,d]=a.useState([]),[c,u]=a.useState(0),p=a.useRef(0),[v,x]=a.useState({x:0,y:0}),[I,h]=a.useState("none"),g=a.useRef({x:0,y:0}),[y,E]=a.useState(!1),[L,C]=a.useState(!1),K=a.useRef(new Map),{imageSize:A=ky,cursor:B="system",target:P="area",position:T="random",visible:z="all",defaultCursor:w=null,hoverCursor:W=null}=e,R=t.filter($=>{var M;return!!((M=$==null?void 0:$.image)!=null&&M.url)}),J=a.useMemo(()=>Fy(i),[i]),F=a.useCallback(($,M,N=l)=>{if(!o)return;const Q=o.getBoundingClientRect(),te=$-Q.left,k=M-Q.top;x({x:te,y:k}),h(Ay(te,k,N,o,B,P,W,w))},[o,l,B,P,W,w]);a.useEffect(()=>{const $=[...R.map(N=>N.image.url),w,W].filter(N=>!!N);if($.length===0){K.current=new Map,C(!0);return}let M=!1;return C(!1),_y($).then(N=>{M||(K.current=N,C(!0))}),()=>{M=!0}},[t,w,W]),a.useEffect(()=>{if(!o)return;const $=N=>{N.stopPropagation(),g.current={x:N.clientX,y:N.clientY},F(N.clientX,N.clientY)},M=()=>{y&&F(g.current.x,g.current.y)};return o.addEventListener("mousemove",$),window.addEventListener("scroll",M,!0),()=>{o.removeEventListener("mousemove",$),window.removeEventListener("scroll",M,!0)}},[o,y,F]),a.useEffect(()=>{!o||!y||F(g.current.x,g.current.y)},[l,o,y,F]),a.useEffect(()=>{y||h("none")},[y]);const U=($,M,N,Q={})=>{var Z,fe;if(!((Z=$==null?void 0:$.image)!=null&&Z.url))return null;const te=((fe=K.current.get($.image.url))==null?void 0:fe.aspectRatio)??1,k=ml($.image.url,A,K.current),{heightPx:le}=gr(k,te);let f=0,ne=0;return T==="same"?{x:f,y:ne}=pl(M,N,k,te):(f=Q.x??Math.random()*M,ne=Q.y??Math.random()*N,{x:f,y:ne}=Ta(f,ne,M,N,k,le)),{id:p.current++,url:$.image.url,link:$.link,name:$.image.name,x:f,y:ne,xRatio:f/M,yRatio:ne/N,aspectRatio:te,widthPx:k}},V=()=>{if(!o)return;const $=o.getBoundingClientRect(),M=$.width,N=$.height;M===0||N===0||d(Q=>Q.length===0?Q:Q.map(te=>{const k=A.sizeType==="random"?te.widthPx:ml(te.url,A,K.current),{heightPx:le}=gr(k,te.aspectRatio);if(T==="same"){const{x:Z,y:fe}=pl(M,N,k,te.aspectRatio);return{...te,x:Z,y:fe,widthPx:k}}const{x:f,y:ne}=Ta(te.xRatio*M,te.yRatio*N,M,N,k,le);return{...te,x:f,y:ne,widthPx:k}}))};a.useEffect(()=>{if(!o||R.length===0||!L)return;const $=o.getBoundingClientRect(),M=$.width,N=$.height,Q=U(R[0],M,N);Q&&(d([Q]),u(R.length>1?1:0))},[A,T,o,t,L]),a.useEffect(()=>{if(!o)return;V();const $=new ResizeObserver(V);return $.observe(o),window.addEventListener("resize",V),()=>{$.disconnect(),window.removeEventListener("resize",V)}},[o,T,A,l.length]),a.useEffect(()=>{z==="last One"&&d($=>$.length>0?[$[$.length-1]]:[])},[z]);const G=$=>{if(!o||R.length===0||!L)return;const M=o.getBoundingClientRect(),N=$.clientX-M.left,Q=$.clientY-M.top;if(P==="image"&&!jc(N,Q,l))return;let te=0,k=0;T==="on Click"?(te=N,k=Q):T==="same"?(te=M.width/2,k=M.height/2):(te=Math.random()*M.width,k=Math.random()*M.height);const le=R[c%R.length],f=U(le,M.width,M.height,{x:te,y:k});if(!f)return;const ne=z==="all"?[...l,f]:[f];d(ne),u(Z=>(Z+1)%R.length),F($.clientX,$.clientY,ne)},oe=B==="custom"&&I!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:J}}),r.jsxs("div",{ref:s,onClick:G,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),className:`${i}-root`,style:{cursor:oe?"none":"default"},children:[l.map($=>r.jsx("div",{className:`${i}-wrapper`,style:{top:`${$.y}px`,left:`${$.x}px`,width:`${$.widthPx}px`,cursor:oe?"none":"default"},children:P==="area"&&$.link?r.jsx("a",{href:$.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:r.jsx("img",{src:$.url,alt:$.name,className:`${i}-image`})}):r.jsx("img",{src:$.url,alt:$.name,className:`${i}-image`})},$.id)),y&&oe&&r.jsx("div",{className:`${i}-cursor`,style:{left:`${v.x}px`,top:`${v.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${I}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const Hy=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15275
15275
  import { CommonComponentProps } from '../props';
15276
15276
  import { useScopedStyles } from '../utils/index';
15277
15277
 
@@ -15801,7 +15801,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
15801
15801
  </>
15802
15802
  );
15803
15803
  }
15804
- `,Cy={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"]}]}]},Ty={element:Sy,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:Cy,sourceCode:$y,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},Ly=100,Ry=70,jn="cubic-bezier(0.86, 0, 0.07, 1)";function Iy(e){return`
15804
+ `,Oy={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"]}]}]},Dy={element:Ny,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:Oy,sourceCode:Hy,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},jy=100,zy=70,Dn="cubic-bezier(0.86, 0, 0.07, 1)";function By(e){return`
15805
15805
  .${e}-wrapper {
15806
15806
  position: relative;
15807
15807
  width: 100%;
@@ -15836,34 +15836,34 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
15836
15836
  }
15837
15837
  .${e}-incoming-next {
15838
15838
  z-index: 4;
15839
- transition: transform var(--${e}-transition-ms) ${jn};
15839
+ transition: transform var(--${e}-transition-ms) ${Dn};
15840
15840
  }
15841
15841
  .${e}-incoming-prev {
15842
15842
  z-index: 4;
15843
- transition: transform var(--${e}-transition-ms) ${jn};
15843
+ transition: transform var(--${e}-transition-ms) ${Dn};
15844
15844
  }
15845
15845
  .${e}-outgoing {
15846
15846
  will-change: transform;
15847
15847
  }
15848
15848
  .${e}-outgoing-next {
15849
15849
  z-index: 3;
15850
- transition: transform var(--${e}-transition-ms) ${jn};
15850
+ transition: transform var(--${e}-transition-ms) ${Dn};
15851
15851
  }
15852
15852
  .${e}-outgoing-prev {
15853
15853
  z-index: 3;
15854
- transition: transform var(--${e}-transition-ms) ${jn};
15854
+ transition: transform var(--${e}-transition-ms) ${Dn};
15855
15855
  }
15856
15856
  .${e}-outgoing-next .${e}-effect-image {
15857
- transition: filter var(--${e}-transition-ms) ${jn};
15857
+ transition: filter var(--${e}-transition-ms) ${Dn};
15858
15858
  }
15859
15859
  .${e}-outgoing-prev .${e}-effect-image {
15860
- transition: filter var(--${e}-transition-ms) ${jn};
15860
+ transition: filter var(--${e}-transition-ms) ${Dn};
15861
15861
  }
15862
15862
  .${e}-incoming .${e}-effect-image {
15863
- transition: filter var(--${e}-transition-ms) ${jn};
15863
+ transition: filter var(--${e}-transition-ms) ${Dn};
15864
15864
  }
15865
15865
  .${e}-background .${e}-effect-image {
15866
- transition: filter var(--${e}-transition-ms) ${jn};
15866
+ transition: filter var(--${e}-transition-ms) ${Dn};
15867
15867
  }
15868
15868
  .${e}-snap .${e}-incoming,
15869
15869
  .${e}-snap .${e}-outgoing,
@@ -15911,7 +15911,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
15911
15911
  display: block;
15912
15912
  pointer-events: none;
15913
15913
  }
15914
- `}function My(e){return e==="blur"?Ry:e==="greyscale"?Ly:0}function to(e,t=1,n=1){const i=My(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 ds(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Ey(e,t){return t<=1?0:(e-1+t)%t}function Py(e,t=1){return!e||e.height===0?t:e.width/e.height}function ky(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const l=e*i/100,s=t*o/100;let d=l,c=d/n;return c>s&&(c=s,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function us(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 Wc(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function ps(e,t,n){return{...Wc(e),[`--${n}-stage-scale`]:t}}function Ay(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 Fy({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Se,D,oe,ge,xe,Le,be;const{prefix:o}=w.useScopedStyles(),l=a.useMemo(()=>Iy(o),[o]),{imageSize:s,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:p="greyscale"}=e,b=t??[],S=ds(b.length),[L,h]=a.useState(S.activeIndex),[g,y]=a.useState(S.backgroundIndex),[E,R]=a.useState(!1),[T,Y]=a.useState(!1),[k,B]=a.useState(null),[P,C]=a.useState(null),[z,v]=a.useState(0),[W,I]=a.useState(1),[Z,A]=a.useState("none"),[K,V]=a.useState("next"),[G,ne]=a.useState({}),[$,M]=a.useState({width:0,height:0}),H=a.useRef(null),ee=a.useRef(null),ie=!n||!!i,F=s??60,pe=Math.max(10,Math.min(100,d??F)),x=Math.max(10,Math.min(100,c??F)),re=Math.max(100,u),J=to(p),fe=a.useCallback(_=>{const ce=Py(_?G[_]:void 0);return ky($.width,$.height,ce,pe,x)},[$.height,$.width,G,x,pe]);a.useEffect(()=>{const _=ee.current;if(!_)return;const ce=new ResizeObserver(([te])=>{const{width:N,height:U}=te.contentRect;M({width:N,height:U})});return ce.observe(_),()=>ce.disconnect()},[]),a.useEffect(()=>{const _=(t??[]).map(ce=>{var te;return(te=ce.image)==null?void 0:te.url}).filter(ce=>!!ce);Ay(_,(ce,te)=>{ne(N=>{var U,Ie;return((U=N[ce])==null?void 0:U.width)===te.width&&((Ie=N[ce])==null?void 0:Ie.height)===te.height?N:{...N,[ce]:te}})})},[t]),a.useEffect(()=>{const{backgroundIndex:_,activeIndex:ce}=ds(b.length);h(ce),y(_),R(!1),Y(!1),B(null),C(null),v(0),I(1),A("none"),V("next")},[b.length,t]),a.useEffect(()=>()=>{H.current&&clearTimeout(H.current)},[]);const Re=a.useCallback(_=>{var le,j,ze,Ae;if(!ie||E||b.length<=1)return;const ce=_==="next"?(L+1)%b.length:(L-1+b.length)%b.length,te=fe((j=(le=b[L])==null?void 0:le.image)==null?void 0:j.url),N=fe((Ae=(ze=b[ce])==null?void 0:ze.image)==null?void 0:Ae.url),U=us($.width,$.height,te),Ie=us($.width,$.height,N);H.current&&clearTimeout(H.current),V(_),Y(!0),R(!0),_==="next"?(B(L),C(ce),v(0),I(1),A(to(p,0,1))):(y(Ey(ce,b.length)),B(ce),C(L),v(1),I(Ie),A(to(p,1,Ie))),requestAnimationFrame(()=>{Y(!1),requestAnimationFrame(()=>{_==="next"?(v(1),I(U),A(to(p,1,U))):(v(0),I(1),A(to(p,0,1)))})}),H.current=setTimeout(()=>{_==="next"&&y(L),h(ce),B(null),C(null),R(!1)},re)},[L,p,$.height,$.width,fe,E,ie,b,re]),de=b[L],se=g!==null?b[g]:null,q=k!==null?b[k]:null,Q=P!==null?b[P]:null,me=b.length<=1?0:(L-1+b.length)%b.length,Ne=b.length<=1?0:(L+1)%b.length,$e=fe((Se=de==null?void 0:de.image)==null?void 0:Se.url),ke=fe((D=q==null?void 0:q.image)==null?void 0:D.url),ue=fe((oe=Q==null?void 0:Q.image)==null?void 0:oe.url),he={[`--${o}-transition-ms`]:`${re}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),r.jsxs("div",{ref:ee,className:ut(`${o}-wrapper`,T&&`${o}-snap`,n&&!i&&`${o}-editor`),style:he,"aria-label":"Zoom gallery",children:[((ge=se==null?void 0:se.image)==null?void 0:ge.url)&&r.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:se.image.url,alt:"",style:{filter:J}})}),E&&((xe=q==null?void 0:q.image)==null?void 0:xe.url)&&r.jsx("div",{className:ut(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${K}`),style:ps(ke,W,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:q.image.url,alt:"",style:{filter:Z}})}),E&&((Le=Q==null?void 0:Q.image)==null?void 0:Le.url)&&r.jsx("div",{className:ut(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${K}`),style:ps(ue,z,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:Q.image.url,alt:""})}),!E&&((be=de==null?void 0:de.image)==null?void 0:be.url)&&r.jsx("div",{className:ut(`${o}-stage`,`${o}-foreground`),style:Wc($e),children:r.jsx("img",{className:`${o}-image`,src:de.image.url,alt:de.image.name??""})}),ie&&b.length>1&&!E&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:ut(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Re("prev"),"aria-label":`Show previous image (${me+1} of ${b.length})`}),r.jsx("button",{type:"button",className:ut(`${o}-nav`,`${o}-nav-next`),onClick:()=>Re("next"),"aria-label":`Show next image (${Ne+1} of ${b.length})`})]})]})]})}const Wy=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15914
+ `}function Vy(e){return e==="blur"?zy:e==="greyscale"?jy:0}function to(e,t=1,n=1){const i=Vy(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 gl(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Gy(e,t){return t<=1?0:(e-1+t)%t}function qy(e,t=1){return!e||e.height===0?t:e.width/e.height}function Uy(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 hl(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 zc(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function fl(e,t,n){return{...zc(e),[`--${n}-stage-scale`]:t}}function Ky(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 Xy({settings:e,content:t,isEditor:n,isPreviewMode:i}){var be,j,re,ge,xe,Le,we;const{prefix:o}=S.useScopedStyles(),s=a.useMemo(()=>By(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:p="greyscale"}=e,v=t??[],x=gl(v.length),[I,h]=a.useState(x.activeIndex),[g,y]=a.useState(x.backgroundIndex),[E,L]=a.useState(!1),[C,K]=a.useState(!1),[A,B]=a.useState(null),[P,T]=a.useState(null),[z,w]=a.useState(0),[W,R]=a.useState(1),[J,F]=a.useState("none"),[U,V]=a.useState("next"),[G,oe]=a.useState({}),[$,M]=a.useState({width:0,height:0}),N=a.useRef(null),Q=a.useRef(null),te=!n||!!i,k=l??60,le=Math.max(10,Math.min(100,d??k)),f=Math.max(10,Math.min(100,c??k)),ne=Math.max(100,u),Z=to(p),fe=a.useCallback(_=>{const me=qy(_?G[_]:void 0);return Uy($.width,$.height,me,le,f)},[$.height,$.width,G,f,le]);a.useEffect(()=>{const _=Q.current;if(!_)return;const me=new ResizeObserver(([ie])=>{const{width:H,height:X}=ie.contentRect;M({width:H,height:X})});return me.observe(_),()=>me.disconnect()},[]),a.useEffect(()=>{const _=(t??[]).map(me=>{var ie;return(ie=me.image)==null?void 0:ie.url}).filter(me=>!!me);Ky(_,(me,ie)=>{oe(H=>{var X,Re;return((X=H[me])==null?void 0:X.width)===ie.width&&((Re=H[me])==null?void 0:Re.height)===ie.height?H:{...H,[me]:ie}})})},[t]),a.useEffect(()=>{const{backgroundIndex:_,activeIndex:me}=gl(v.length);h(me),y(_),L(!1),K(!1),B(null),T(null),w(0),R(1),F("none"),V("next")},[v.length,t]),a.useEffect(()=>()=>{N.current&&clearTimeout(N.current)},[]);const Ie=a.useCallback(_=>{var de,D,ze,Fe;if(!te||E||v.length<=1)return;const me=_==="next"?(I+1)%v.length:(I-1+v.length)%v.length,ie=fe((D=(de=v[I])==null?void 0:de.image)==null?void 0:D.url),H=fe((Fe=(ze=v[me])==null?void 0:ze.image)==null?void 0:Fe.url),X=hl($.width,$.height,ie),Re=hl($.width,$.height,H);N.current&&clearTimeout(N.current),V(_),K(!0),L(!0),_==="next"?(B(I),T(me),w(0),R(1),F(to(p,0,1))):(y(Gy(me,v.length)),B(me),T(I),w(1),R(Re),F(to(p,1,Re))),requestAnimationFrame(()=>{K(!1),requestAnimationFrame(()=>{_==="next"?(w(1),R(X),F(to(p,1,X))):(w(0),R(1),F(to(p,0,1)))})}),N.current=setTimeout(()=>{_==="next"&&y(I),h(me),B(null),T(null),L(!1)},ne)},[I,p,$.height,$.width,fe,E,te,v,ne]),ue=v[I],se=g!==null?v[g]:null,q=A!==null?v[A]:null,ee=P!==null?v[P]:null,ce=v.length<=1?0:(I-1+v.length)%v.length,ke=v.length<=1?0:(I+1)%v.length,$e=fe((be=ue==null?void 0:ue.image)==null?void 0:be.url),Pe=fe((j=q==null?void 0:q.image)==null?void 0:j.url),pe=fe((re=ee==null?void 0:ee.image)==null?void 0:re.url),he={[`--${o}-transition-ms`]:`${ne}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),r.jsxs("div",{ref:Q,className:ut(`${o}-wrapper`,C&&`${o}-snap`,n&&!i&&`${o}-editor`),style:he,"aria-label":"Zoom gallery",children:[((ge=se==null?void 0:se.image)==null?void 0:ge.url)&&r.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:se.image.url,alt:"",style:{filter:Z}})}),E&&((xe=q==null?void 0:q.image)==null?void 0:xe.url)&&r.jsx("div",{className:ut(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${U}`),style:fl(Pe,W,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:q.image.url,alt:"",style:{filter:J}})}),E&&((Le=ee==null?void 0:ee.image)==null?void 0:Le.url)&&r.jsx("div",{className:ut(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${U}`),style:fl(pe,z,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:ee.image.url,alt:""})}),!E&&((we=ue==null?void 0:ue.image)==null?void 0:we.url)&&r.jsx("div",{className:ut(`${o}-stage`,`${o}-foreground`),style:zc($e),children:r.jsx("img",{className:`${o}-image`,src:ue.image.url,alt:ue.image.name??""})}),te&&v.length>1&&!E&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:ut(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Ie("prev"),"aria-label":`Show previous image (${ce+1} of ${v.length})`}),r.jsx("button",{type:"button",className:ut(`${o}-nav`,`${o}-nav-next`),onClick:()=>Ie("next"),"aria-label":`Show next image (${ke+1} of ${v.length})`})]})]})]})}const Yy=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15915
15915
  import cn from 'classnames';
15916
15916
  import { CommonComponentProps } from '../props';
15917
15917
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -16430,7 +16430,7 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
16430
16430
  </>
16431
16431
  );
16432
16432
  }
16433
- `,_y={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:""}}]}},Ny={element:Fy,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:_y,sourceCode:Wy,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Hy={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},Oy=["hover","active"],oa={left:"flex-start",center:"center",right:"flex-end"};function jy(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 zy(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))`,l=`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))`,s=`${o}, ${l}`,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}`,p=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,b=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,S=`.${e}-button:hover, ${b}`,L=h=>`.${e}-hover-effect-${h}:hover, .${e}-hover-effect-${h}:focus-visible, a:focus-visible .${e}-hover-effect-${h}`;return`
16433
+ `,Zy={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:""}}]}},Jy={element:Xy,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:Zy,sourceCode:Yy,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Qy={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},ev=["hover","active"],ra={left:"flex-start",center:"center",right:"flex-end"};function tv(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 nv(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 iv(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}`,p=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,v=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,x=`.${e}-button:hover, ${v}`,I=h=>`.${e}-hover-effect-${h}:hover, .${e}-hover-effect-${h}:focus-visible, a:focus-visible .${e}-hover-effect-${h}`;return`
16434
16434
  .${e}-root {
16435
16435
  line-height: 0;
16436
16436
  }
@@ -16460,11 +16460,11 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
16460
16460
  .${e}-wrapper.${e}-editing .${e}-button {
16461
16461
  transition: color 250ms, background-color 250ms, border-color 250ms, transform 250ms;
16462
16462
  }
16463
- ${L("scale-up")},
16463
+ ${I("scale-up")},
16464
16464
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-scale-up {
16465
16465
  transform: scale(1.05);
16466
16466
  }
16467
- ${L("lift")},
16467
+ ${I("lift")},
16468
16468
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-lift {
16469
16469
  transform: translateY(-2px);
16470
16470
  box-shadow: ${p};
@@ -16526,9 +16526,9 @@ a:focus-visible .${e}-hover-effect-swipe::before,
16526
16526
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-swipe::before {
16527
16527
  transform: translateX(0);
16528
16528
  }
16529
- ${L("reveal")},
16529
+ ${I("reveal")},
16530
16530
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-reveal,
16531
- ${L("swipe")},
16531
+ ${I("swipe")},
16532
16532
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-swipe {
16533
16533
  background-color: var(--${e}-background-color);
16534
16534
  }
@@ -16591,17 +16591,17 @@ a:focus-visible .${e}-hover-effect-content-roll .${e}-content-roll-layer-hover,
16591
16591
  transform: translateY(-50%);
16592
16592
  opacity: 1;
16593
16593
  }
16594
- ${S} {
16594
+ ${x} {
16595
16595
  background-color: var(--${e}-hover-background-color, var(--${e}-background-color));
16596
16596
  color: var(--${e}-hover-text-color, var(--${e}-text-color));
16597
16597
  border-color: var(--${e}-hover-border-color, var(--${e}-border-color));
16598
- box-shadow: ${s};
16598
+ box-shadow: ${l};
16599
16599
  }
16600
16600
  .${e}-wrapper.${e}-state-hover .${e}-button {
16601
16601
  background-color: var(--${e}-hover-background-color, var(--${e}-background-color));
16602
16602
  color: var(--${e}-hover-text-color, var(--${e}-text-color));
16603
16603
  border-color: var(--${e}-hover-border-color, var(--${e}-border-color));
16604
- box-shadow: ${s};
16604
+ box-shadow: ${l};
16605
16605
  }
16606
16606
  .${e}-button:focus,
16607
16607
  .${e}-button:focus-visible,
@@ -16670,7 +16670,7 @@ a:active .${e}-button .${e}-icon-image,
16670
16670
  height: calc(1em * var(--${e}-icon-scale, 1));
16671
16671
  width: calc(1em * var(--${e}-icon-scale, 1));
16672
16672
  }
16673
- `}function ra(e,t,n="",i,o){const l=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:l}),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 ms(e,t,n="fill",i=100,o=0,l){if(!t)return null;const s=r.jsx(rn,{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:s});if(n==="fixed"&&o>0){const d=w.scalingValue(o,l);return r.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:s})}return r.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:s})}function By({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:l}=w.useScopedStyles(),s=a.useMemo(()=>zy(l),[l]),{type:d="a",label:c="Button",icon:u,alignment:p="center",alignA:b,order:S="text-icon",gap:L=0,iconSize:h=0,iconWidthC:g=0,dimensions:y=!1,padding:E={top:0,right:0,bottom:0,left:0},cornerRadius:R=0,boxShadow:T={top:0,left:0,right:0,bottom:0},boxShadowColor:Y="rgba(0, 0, 0, 0)",innerBoxShadow:k={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:B="rgba(0, 0, 0, 0)",stroke:P=0,backgroundColor:C="#000000",textColor:z="#ffffff",borderColor:v="#ffffff",iconColor:W="#ffffff",hoverEffect:I="none",fontFamily:Z,fontSettings:A,fontSize:K,lineHeight:V,letterSpacing:G=0,wordSpacing:ne=0,textAppearance:$,stateOverrides:M,minWidth:H=0,minHeight:ee=0,width:ie=0,height:F=0}=e,pe=w.buildColorVars(l,{backgroundColor:C,textColor:z,borderColor:v,iconColor:W,boxShadowColor:Y,innerBoxShadowColor:B},Hy,Oy,M),x=i&&i!=="default"?`${l}-state-${i}`:"",re=t&&!n?`${l}-editing`:"",J=I!=="none"&&(!t||n||i==="hover")?`${l}-hover-effect-${I}`:"",fe=I==="reveal"||I==="swipe",Re=I==="content-roll",de=I==="reveal"&&(!t||n),se=y===!0,Q=d==="a"?b??p:p,me=d==="c",Ne=d!=="b",$e={fontSettings:{fontFamily:Z,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:K??.01,lineHeight:V,letterSpacing:G,wordSpacing:ne,textAppearance:$,color:z},ue={...Ne?on(Vt($e,t)):{},[`--${l}-box-shadow-x`]:w.scalingValue(T.left,t),[`--${l}-box-shadow-y`]:w.scalingValue(T.top,t),[`--${l}-box-shadow-blur`]:w.scalingValue(T.right,t),[`--${l}-box-shadow-spread`]:w.scalingValue(T.bottom,t),[`--${l}-inner-box-shadow-x`]:w.scalingValue(k.left,t),[`--${l}-inner-box-shadow-y`]:w.scalingValue(k.top,t),[`--${l}-inner-box-shadow-blur`]:w.scalingValue(k.right,t),[`--${l}-inner-box-shadow-spread`]:w.scalingValue(k.bottom,t),paddingTop:w.scalingValue(E.top,t),paddingRight:w.scalingValue(E.right,t),paddingBottom:w.scalingValue(E.bottom,t),paddingLeft:w.scalingValue(E.left,t),borderRadius:w.scalingValue(R,t),borderWidth:w.scalingValue(P,t),...me?{}:{justifyContent:oa[Q],textAlign:Q},...me&&!Re?{gap:w.scalingValue(L,t)}:{},...se?{width:w.scalingValue(ie,t),height:w.scalingValue(F,t)}:{minWidth:w.scalingValue(H,t),minHeight:w.scalingValue(ee,t),...me?{width:"100%"}:{}}};let he;const Se={display:"inline-flex",alignItems:"center",justifyContent:me?oa[Q]:oa[d==="a"?Q:"center"],gap:me?w.scalingValue(L,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:Q}:{}};if(d==="b"){const ge=()=>ms(l,u,h>0?"fixed":"fill",100,h,t);he=Re?ra(l,ge,`${l}-icon-roll`,void 0,Se):ge()}else if(d==="c"){const ge=()=>{const xe=r.jsx("span",{className:`${l}-text`,style:{textAlign:Q},children:c}),Le=ms(l,u,g>0?"fixed":"fill",100,g,t);return S==="icon-text"?r.jsxs(r.Fragment,{children:[Le,xe]}):r.jsxs(r.Fragment,{children:[xe,Le]})};he=Re?ra(l,ge,`${l}-icon-text-roll`,void 0,Se):ge()}else he=Re?ra(l,()=>c,`${l}-label-roll`,void 0,Se):fe?r.jsx("span",{className:`${l}-button-inner`,children:c}):c;const D=de?ge=>jy(ge,l):void 0,oe=de?ge=>Dy(ge,l):void 0;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),r.jsx("div",{className:`${l}-root`,style:pe,children:r.jsx("div",{className:`${l}-wrapper ${x} ${re}`.trim(),children:r.jsx("div",{className:`${l}-button ${J}`.trim(),style:ue,onMouseEnter:D,onMouseLeave:oe,role:"button",tabIndex:o||t&&!n?void 0:0,children:he})})})]})}const Vy=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
16673
+ `}function aa(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 yl(e,t,n="fill",i=100,o=0,s){if(!t)return null;const l=r.jsx(rn,{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=S.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 ov({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:s}=S.useScopedStyles(),l=a.useMemo(()=>iv(s),[s]),{type:d="a",label:c="Button",icon:u,alignment:p="center",alignA:v,order:x="text-icon",gap:I=0,iconSize:h=0,iconWidthC:g=0,dimensions:y=!1,padding:E={top:0,right:0,bottom:0,left:0},cornerRadius:L=0,boxShadow:C={top:0,left:0,right:0,bottom:0},boxShadowColor:K="rgba(0, 0, 0, 0)",innerBoxShadow:A={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:B="rgba(0, 0, 0, 0)",stroke:P=0,backgroundColor:T="#000000",textColor:z="#ffffff",borderColor:w="#ffffff",iconColor:W="#ffffff",hoverEffect:R="none",fontFamily:J,fontSettings:F,fontSize:U,lineHeight:V,letterSpacing:G=0,wordSpacing:oe=0,textAppearance:$,stateOverrides:M,minWidth:N=0,minHeight:Q=0,width:te=0,height:k=0}=e,le=S.buildColorVars(s,{backgroundColor:T,textColor:z,borderColor:w,iconColor:W,boxShadowColor:K,innerBoxShadowColor:B},Qy,ev,M),f=i&&i!=="default"?`${s}-state-${i}`:"",ne=t&&!n?`${s}-editing`:"",Z=R!=="none"&&(!t||n||i==="hover")?`${s}-hover-effect-${R}`:"",fe=R==="reveal"||R==="swipe",Ie=R==="content-roll",ue=R==="reveal"&&(!t||n),se=y===!0,ee=d==="a"?v??p:p,ce=d==="c",ke=d!=="b",$e={fontSettings:{fontFamily:J,fontWeight:(F==null?void 0:F.fontWeight)??400,fontStyle:(F==null?void 0:F.fontStyle)??"normal"},fontSize:U??.01,lineHeight:V,letterSpacing:G,wordSpacing:oe,textAppearance:$,color:z},pe={...ke?on(Vt($e,t)):{},[`--${s}-box-shadow-x`]:S.scalingValue(C.left,t),[`--${s}-box-shadow-y`]:S.scalingValue(C.top,t),[`--${s}-box-shadow-blur`]:S.scalingValue(C.right,t),[`--${s}-box-shadow-spread`]:S.scalingValue(C.bottom,t),[`--${s}-inner-box-shadow-x`]:S.scalingValue(A.left,t),[`--${s}-inner-box-shadow-y`]:S.scalingValue(A.top,t),[`--${s}-inner-box-shadow-blur`]:S.scalingValue(A.right,t),[`--${s}-inner-box-shadow-spread`]:S.scalingValue(A.bottom,t),paddingTop:S.scalingValue(E.top,t),paddingRight:S.scalingValue(E.right,t),paddingBottom:S.scalingValue(E.bottom,t),paddingLeft:S.scalingValue(E.left,t),borderRadius:S.scalingValue(L,t),borderWidth:S.scalingValue(P,t),...ce?{}:{justifyContent:ra[ee],textAlign:ee},...ce&&!Ie?{gap:S.scalingValue(I,t)}:{},...se?{width:S.scalingValue(te,t),height:S.scalingValue(k,t)}:{minWidth:S.scalingValue(N,t),minHeight:S.scalingValue(Q,t),...ce?{width:"100%"}:{}}};let he;const be={display:"inline-flex",alignItems:"center",justifyContent:ce?ra[ee]:ra[d==="a"?ee:"center"],gap:ce?S.scalingValue(I,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:ee}:{}};if(d==="b"){const ge=()=>yl(s,u,h>0?"fixed":"fill",100,h,t);he=Ie?aa(s,ge,`${s}-icon-roll`,void 0,be):ge()}else if(d==="c"){const ge=()=>{const xe=r.jsx("span",{className:`${s}-text`,style:{textAlign:ee},children:c}),Le=yl(s,u,g>0?"fixed":"fill",100,g,t);return x==="icon-text"?r.jsxs(r.Fragment,{children:[Le,xe]}):r.jsxs(r.Fragment,{children:[xe,Le]})};he=Ie?aa(s,ge,`${s}-icon-text-roll`,void 0,be):ge()}else he=Ie?aa(s,()=>c,`${s}-label-roll`,void 0,be):fe?r.jsx("span",{className:`${s}-button-inner`,children:c}):c;const j=ue?ge=>tv(ge,s):void 0,re=ue?ge=>nv(ge,s):void 0;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),r.jsx("div",{className:`${s}-root`,style:le,children:r.jsx("div",{className:`${s}-wrapper ${f} ${ne}`.trim(),children:r.jsx("div",{className:`${s}-button ${Z}`.trim(),style:pe,onMouseEnter:j,onMouseLeave:re,role:"button",tabIndex:o||t&&!n?void 0:0,children:he})})})]})}const rv=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
16674
16674
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
16675
16675
  import { CommonComponentProps } from '../props';
16676
16676
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
@@ -17297,7 +17297,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
17297
17297
  </>
17298
17298
  );
17299
17299
  }
17300
- `,Gy={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},qy=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],Uy={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:[...qy],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"]},Ky={element:By,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:Uy,sourceCode:Vy,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function Xy(e){return`
17300
+ `,av={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},sv=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],lv={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:{...av.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:[...sv],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"]},cv={element:ov,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:lv,sourceCode:rv,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function dv(e){return`
17301
17301
  .${e}-titles-row {
17302
17302
  position: relative;
17303
17303
  flex: 0 1 auto;
@@ -17495,7 +17495,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
17495
17495
  pointer-events: auto;
17496
17496
  flex-shrink: 0;
17497
17497
  }
17498
- `}const Cn=500,no=650,pn="cubic-bezier(0.22, 1, 0.36, 1)",Yy=72,Zy=50,Jy=1e4,Qy=650,ev=500;function tv(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,l=e.top-t.top;return`translate(${o}px, ${l}px) scale(${n}, ${i})`}function _c(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=ur(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 nv(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?_c(i,n):null}function iv(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 ro(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 gs(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return ro(e,i,n)}const ov=.03;function Nc(e){return e.width*ov}const aa={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Xo(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function hs(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function rv(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ca(e,t,n){const i=e.getBoundingClientRect(),o=i.width,l=i.height,s=t/n,d=o/l;if(s>d){const u=o/s;return{width:o,height:u,left:i.left,top:i.top+(l-u)/2}}const c=l*s;return{width:c,height:l,left:i.left+(o-c)/2,top:i.top}}function av(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Ca(e,t.width,t.height)}function lv(e,t){if(kr(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 sv(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 cv({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=>kr(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 qi(e,t,n){const{width:i,height:o,top:l}=e,{left:s,width:d}=n,c=Nc(n);return t==="left"?{left:s+c-i,top:l,width:i,height:o}:{left:s+d-c,top:l,width:i,height:o}}function hr(e,t,n){const i=qi(e,t,n);return{...i,left:2*i.left-e.left}}function dv(e,t,n){const{left:i,width:o}=n,l=Nc(n);return t==="left"?{left:i,top:e.top,width:l,height:e.height}:{left:i+o-l,top:e.top,width:l,height:e.height}}function Hc(e,t,n,i){const o=qi(e,"left",i),l=qi(e,"right",i),s=hr(e,"left",i),d=hr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:l,end:e};case"left-adjacent":return{start:o,end:s};case"far-right":return{start:d,end:l};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:l};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:l,end:d};case"far-left":return{start:s,end:o};default:return{start:e,end:e}}}function uv(e,t,n,i){const{start:o,end:l}=Hc(e,t,n,i);return{x:l.left-o.left,y:l.top-o.top}}function pv(e,t,n){const i=qi(e,t,n),o=hr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function kr(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function mv({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:l,onTransitionEnd:s}){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:s,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:l,onClick:c=>c.stopPropagation(),style:o},e)})}function Yo({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return kr(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const l=o.currentTarget;l.videoWidth>0&&l.videoHeight>0&&(i==null||i(e.url,l.videoWidth,l.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const l=o.currentTarget;l.naturalWidth>0&&l.naturalHeight>0&&(i==null||i(e.url,l.naturalWidth,l.naturalHeight))},onTransitionEnd:n})}function gv({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:l,isEditMode:s,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:b,sourceRect:S,resolveCloseSourceRect:L,onClose:h,onPrev:g,onNext:y}){const E=a.useRef(null),R=a.useRef(null),T=a.useRef(null),Y=a.useRef(new Map),[k,B]=a.useState(0),P=a.useRef(null),C=a.useRef(0),z=a.useRef(0),v=a.useRef("none"),W=a.useRef(!1),I=a.useRef(!1),Z=a.useRef(!1),A=a.useRef(null),K=a.useRef(null),V=a.useRef(null),G=a.useRef(()=>{}),ne=a.useRef(null),$=a.useRef(null),M=a.useRef(null),H=a.useRef(!1),[ee,ie]=a.useState(null),[F,pe]=a.useState(aa),[x,re]=a.useState(0),[J,fe]=a.useState("opening"),[Re,de]=a.useState(0),[se,q]=a.useState(0),[Q,me]=a.useState(!1),[Ne,$e]=a.useState(null),[ke,ue]=a.useState(null),[he,Se]=a.useState(null),[D,oe]=a.useState(!1),[ge,xe]=a.useState(null),[Le,be]=a.useState(!1),_=a.useRef(!1),[ce,te]=a.useState(!1),[N,U]=a.useState(!1),Ie=a.useRef(n),le=a.useRef(void 0),j=t[n],ze=j?kr(j):!1,Ae=se!==0||Q,ot=!s&&(!l||!!d),tt=c&&!s,at=u.length>1,yt=a.useCallback((f,ve)=>t.length<=1?null:t[(f+ve+t.length)%t.length]??null,[t]),Ve=at?ro(u,p,-1):yt(n,-1),ye=at?ro(u,p,1):yt(n,1),Me=Ne===-1&&Ae?at&&ke!==null?ro(u,ke,-1):he!==null?yt(he,-1):null:null,De=Ne===1&&Ae?at&&ke!==null?ro(u,ke,1):he!==null?yt(he,1):null:null,Ee=Me&&Me.url!==(Ve==null?void 0:Ve.url)?Me:null,Ce=De&&De.url!==(ye==null?void 0:ye.url)?De:null,We=Ve&&tt?(()=>{const f=at?gs(u,p,-1):t.length>2?yt((n-1+t.length)%t.length,-1):null;return f&&f.url!==Ve.url?f:null})():null,je=ye&&tt?(()=>{const f=at?gs(u,p,1):t.length>2?yt((n+1)%t.length,1):null;return f&&f.url!==ye.url?f:null})():null,nt=Ee??We,pt=Ce??je,Qe=a.useCallback((f,ve,Fe)=>{if(!f||!ve||!Fe)return;const _e=Y.current,st=_e.get(f);(st==null?void 0:st.width)===ve&&(st==null?void 0:st.height)===Fe||(_e.set(f,{width:ve,height:Fe}),B(Ft=>Ft+1))},[]),St=a.useCallback(f=>{if(!(f!=null&&f.url))return null;const ve=Y.current.get(f.url);return av(R.current,ve)},[k,x]),ct=a.useCallback(()=>{if(!j)return;const f=St(j);if(f){ie(f);return}const ve=R.current;ve&&ie(hs(ve))},[j,St]),Ue=a.useCallback(f=>{if(at){const ve=u.length;ue((p+f+ve)%ve),Se(null);return}t.length>1&&(Se((n+f+t.length)%t.length),ue(null))},[at,u.length,p,t.length,n]),Ke=a.useCallback(f=>{Z.current=f,me(f)},[]),Oe=a.useCallback(()=>{A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),ft=a.useCallback(()=>{Oe(),A.current=window.setTimeout(()=>{Oe(),Ke(!1)},no+32)},[Oe,Ke]),mt=a.useCallback(()=>{const f=E.current;if(!f){pe({left:0,top:0,width:typeof window<"u"?window.innerWidth:aa.width,height:typeof window<"u"?window.innerHeight:aa.height});return}const ve=f.getBoundingClientRect();pe({left:ve.left,top:ve.top,width:ve.width,height:ve.height})},[]),gt=a.useCallback((f,ve)=>{if(Ae){if(ce&&!Q)return`translate(${se}px, 0px)`;if(Q&&Ne!==null){const Fe=St(f);if(!Fe)return;const{x:_e,y:st}=uv(Fe,ve,Ne,F);return`translate(${_e}px, ${st}px)`}if(Q)return"translate(0px, 0px)"}},[Ae,ce,Q,se,Ne,F,St]),At=a.useCallback(()=>{const f=K.current;K.current=null,Oe(),Ke(!1),$e(null),ue(null),Se(null),q(0),te(!1),W.current=!1,z.current=0,v.current="none",f===-1?g():f===1&&y()},[Oe,Ke,g,y]),Zt=a.useCallback(()=>{Oe(),A.current=window.setTimeout(()=>{K.current!==null&&At()},no+32)},[Oe,At]),tn=a.useCallback(()=>{Oe(),K.current=null,Ke(!1),$e(null),ue(null),Se(null),q(0),te(!1),W.current=!1,z.current=0,v.current="none"},[Oe,Ke]),$t=a.useCallback(f=>{if(!(!tt||!ee)){if(Z.current){if(K.current===f){V.current=f,At();return}tn()}Oe(),Ue(f),K.current=f,$e(f),Ke(!0),Zt()}},[tt,ee,At,tn,Oe,Ue,Ke,Zt]);G.current=$t;const Tt=a.useCallback(()=>{ne.current=null,H.current=!1,$.current!==null&&(window.clearInterval($.current),$.current=null),M.current!==null&&(window.clearTimeout(M.current),M.current=null)},[]),Ht=a.useCallback(f=>{$.current!==null&&window.clearInterval($.current);const ve=H.current?ev:Qy;$.current=window.setInterval(()=>{G.current(f)},ve)},[]),Wt=a.useCallback(f=>{ne.current!==f&&(Tt(),ne.current=f,H.current=!1,G.current(f),Ht(f),M.current=window.setTimeout(()=>{M.current=null,ne.current===f&&(H.current=!0,Ht(f))},Jy))},[Tt,Ht]),Te=a.useCallback(()=>{const f=R.current;if(!f)return;const ve=j==null?void 0:j.url,Fe=ve?Y.current.get(ve):void 0;if(Fe!=null&&Fe.width&&(Fe!=null&&Fe.height)){ie(Ca(f,Fe.width,Fe.height));return}const _e=T.current;if(_e&&ve&&(_e.src===ve||_e.currentSrc===ve)){const{width:Ft,height:et}=rv(_e);if(Ft&&et){Qe(ve,Ft,et),ie(Ca(f,Ft,et));return}}const st=hs(f);!st.width||!st.height||ie(st)},[j==null?void 0:j.url,Qe]),Ge=a.useCallback(f=>{if(T.current=f,!!f){if(f instanceof HTMLVideoElement){f.readyState>=1&&f.videoWidth>0&&Te();return}f.complete&&f.naturalWidth>0&&Te()}},[Te]),Xe=a.useCallback(()=>{mt(),Te(),re(f=>f+1)},[mt,Te]);a.useEffect(()=>{Xe();const f=R.current,ve=E.current,Fe=new ResizeObserver(()=>Xe());return f&&Fe.observe(f),ve&&Fe.observe(ve),window.addEventListener("resize",Xe),()=>{Fe.disconnect(),window.removeEventListener("resize",Xe)}},[Xe,n,b]),a.useLayoutEffect(()=>{if(!j)return;const f=T.current;if(f){if(f instanceof HTMLImageElement&&f.complete&&f.naturalWidth>0){Te();return}f instanceof HTMLVideoElement&&f.readyState>=1&&f.videoWidth>0&&Te()}},[j==null?void 0:j.url,n,Te]),a.useEffect(()=>{ct()},[ct,k]),a.useEffect(()=>{const f=new Set,ve=[],Fe=_e=>{!(_e!=null&&_e.url)||f.has(_e.url)||(f.add(_e.url),ve.push(_e))};t.forEach(Fe),u.forEach(_e=>_e.items.forEach(Fe)),ve.forEach(_e=>{Y.current.has(_e.url)||lv(_e,Qe)})},[t,u,Qe]),a.useEffect(()=>{if(J!=="opening"||!ee)return;if(!S){fe("open");return}oe(!1);const f=requestAnimationFrame(()=>{requestAnimationFrame(()=>{oe(!0),fe("open")})});return()=>cancelAnimationFrame(f)},[J,ee,S]),a.useEffect(()=>{if(J!=="closing")return;const f=setTimeout(()=>h(),Cn);return()=>clearTimeout(f)},[J,h]),a.useEffect(()=>()=>{Oe()},[Oe]),a.useLayoutEffect(()=>{Ie.current===n&&le.current===(j==null?void 0:j.url)||(Oe(),K.current=null,$e(null),ue(null),Se(null),de(0),q(0),Ke(!1),U(!1),te(!1),C.current=0,z.current=0,v.current="none",W.current=!1,P.current=null,I.current=!1,T.current=null,ct(),Ie.current=n,le.current=j==null?void 0:j.url)},[n,j==null?void 0:j.url,Ke,Oe,ct]),a.useLayoutEffect(()=>{const f=V.current;f!==null&&(V.current=null,requestAnimationFrame(()=>{G.current(f)}))},[n,p,j==null?void 0:j.url]),a.useLayoutEffect(()=>{if(J==="opening"){_.current=!1,be(!1);return}if(J!=="open"||_.current)return;if(!Ve&&!ye){_.current=!0;return}be(!1);const f=requestAnimationFrame(()=>{requestAnimationFrame(()=>{be(!0),_.current=!0})});return()=>cancelAnimationFrame(f)},[J,Ve==null?void 0:Ve.url,ye==null?void 0:ye.url]),a.useEffect(()=>{if(J!=="open")return;const f=()=>{const et=vt=>{vt.stopPropagation(),vt.preventDefault(),document.removeEventListener("click",et,!0)};document.addEventListener("click",et,!0)},ve=et=>{const vt=et<0?1:-1;Oe(),Ue(vt),K.current=vt,$e(vt),Ke(!0),Zt()},Fe=et=>{if(Math.abs(et)>Zy&&tt){ve(et);return}K.current=null,$e(null),ue(null),Se(null),Ke(!0),q(0),ft()},_e=et=>{if(et.touches.length!==1||Z.current)return;const vt=et.touches[0];I.current=!0,P.current={x:vt.clientX,y:vt.clientY},v.current="none",z.current=0,W.current=!1},st=et=>{if(!P.current||et.touches.length!==1||Z.current)return;const vt=et.touches[0],Ot=vt.clientX-P.current.x,kt=vt.clientY-P.current.y;if(v.current==="none"){if(Math.abs(Ot)<10&&Math.abs(kt)<10)return;if(Math.abs(Ot)>Math.abs(kt)){if(!tt)return;v.current="horizontal"}else if(kt>0){if(!ot)return;v.current="vertical"}else return}if(v.current==="horizontal"){W.current=!0,te(!0),z.current=Ot,q(Ot),et.preventDefault();return}v.current==="vertical"&&(W.current=!0,te(!0),C.current=kt,de(kt),et.preventDefault())},Ft=()=>{if(!P.current)return;const et=v.current,vt=W.current;if(vt&&et==="horizontal")Fe(z.current),f();else if(vt&&et==="vertical"){const Ot=C.current;if(ot&&Ot>Yy){const kt=window.innerHeight;C.current=kt,U(!0),de(kt),fe("closing")}else C.current=0,de(0);f()}else et==="horizontal"&&Math.abs(z.current)>0&&(Fe(z.current),f());P.current=null,v.current="none",z.current=0,W.current=!1,te(!1)};return document.addEventListener("touchstart",_e,{passive:!0}),document.addEventListener("touchmove",st,{passive:!1}),document.addEventListener("touchend",Ft),document.addEventListener("touchcancel",Ft),()=>{document.removeEventListener("touchstart",_e),document.removeEventListener("touchmove",st),document.removeEventListener("touchend",Ft),document.removeEventListener("touchcancel",Ft)}},[J,tt,Ke,ft,Oe,ot,Zt,Ue]);const dt=a.useCallback(()=>{const f=(L==null?void 0:L())??S??null;f&&ee&&(xe(f),oe(!0)),fe("closing")},[L,S,ee]);a.useEffect(()=>{const f=_e=>{if(_e.key==="Escape"){if(l&&d||J==="closing")return;Tt(),dt();return}if(_e.key!=="ArrowLeft"&&_e.key!=="ArrowRight"||J!=="open"||!tt)return;_e.preventDefault();const st=_e.key==="ArrowLeft"?-1:1;_e.repeat&&ne.current===st||Wt(st)},ve=_e=>{if(_e.key!=="ArrowLeft"&&_e.key!=="ArrowRight")return;const st=_e.key==="ArrowLeft"?-1:1;ne.current===st&&Tt()},Fe=()=>{Tt()};return window.addEventListener("keydown",f),window.addEventListener("keyup",ve),window.addEventListener("blur",Fe),()=>{window.removeEventListener("keydown",f),window.removeEventListener("keyup",ve),window.removeEventListener("blur",Fe),Tt()}},[J,l,d,dt,tt,Wt,Tt]),a.useEffect(()=>{J!=="open"&&Tt()},[J,Tt]);const Pt=()=>{J==="closing"||s||dt()},ht=J==="open",it=J==="closing",Kt=Re>0?Math.max(0,1-Re/500):1,Ze=Re>0?Math.max(.35,1-Re/500):1,Je=a.useCallback(f=>{if(!(f.propertyName!=="transform"||!Z.current)){if(K.current!==null){At();return}Oe(),Ke(!1)}},[Oe,Ke,At]),lt=J==="closing"?ge??S:S,Mt=lt&&ee&&(J==="opening"||it)?tv(lt,ee):void 0,Et=Ae&&j?gt(j,"center"):Re>0?`translateY(${Re}px)`:Mt,bt=ee?Xo(ee,F):null,_t=!!(lt&&ee),zt=_t&&(J==="closing"||J==="open"&&D),Dt={position:"absolute",top:bt==null?void 0:bt.top,left:bt==null?void 0:bt.left,width:bt==null?void 0:bt.width,height:bt==null?void 0:bt.height,objectFit:"contain",transformOrigin:"top left",transform:Et,opacity:Re>0?Ze:_t?1:J==="opening"||it?0:1,transition:ce&&!Q?"none":Q?`transform ${no}ms ${pn}`:N?`transform ${Cn}ms ${pn}, opacity ${Cn}ms ${pn}`:zt?`transform ${Cn}ms ${pn}`:J==="opening"||it?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:ze&&ht&&!Ae?"auto":"none",touchAction:ze&&ht?"none":void 0,zIndex:1,overflow:ze?"hidden":void 0},qt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:ht&&!Ae?"auto":"none"},Ct=(f,ve,Fe="adjacent")=>{const _e=St(f);if(!_e)return{display:"none"};const st=Fe==="far"?ve==="left"?"far-left":"far-right":ve==="left"?"left-adjacent":"right-adjacent",{start:Ft}=Ne!==null?Hc(_e,st,Ne,F):{start:Fe==="far"?hr(_e,ve,F):qi(_e,ve,F)},et=Xo(Ft,F),vt=gt(f,st),Ot=!Ae&&Fe==="adjacent"&&ht&&!Le?pv(_e,ve,F):null,kt=Fe==="far"&&Ae&&Ne===(ve==="left"?-1:1),cn=ce&&!Q?!1:Q,dn=Fe==="adjacent"&&ht&&Le&&!Ae;return{position:"absolute",top:et.top,left:et.left,width:et.width,height:et.height,objectFit:"contain",transform:vt??(Ot?`translate(${Ot.x}px, ${Ot.y}px)`:void 0),opacity:Fe==="far"?ht&&kt?1:0:ht?1:0,transition:cn?Fe==="far"?`transform ${no}ms ${pn}`:`transform ${no}ms ${pn}, opacity ${Cn}ms ${pn}`:dn?`transform ${Cn}ms ${pn}`:J==="opening"||it?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:"none",zIndex:1}},Ut=(f,ve)=>{const Fe=St(f);return Fe?dv(qi(Fe,ve,F),ve,F):null},Xt=f=>ve=>{if(!s){if(I.current){I.current=!1;return}ve.stopPropagation(),$t(f)}},Yt=Ve?Ut(Ve,"left"):null,Jt=ye?Ut(ye,"right"):null,Bt=Yt?Xo(Yt,F):null,Lt=Jt?Xo(Jt,F):null;return r.jsxs("div",{ref:E,className:[`${e}-lightbox`,l?`${e}-lightbox-editor`:"",s?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:Pt,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:ht?Kt:0,transition:ce?"none":`opacity ${Cn}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:R,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:ht?1:0,transition:ce?"none":`opacity ${Cn}ms ${pn}`,pointerEvents:"none"},children:r.jsx(vc,{prefix:e,entry:i,settings:o,isEditor:l,isEditMode:s,isPreviewMode:d,onClose:Pt})})]}),ht&&nt&&r.jsx(Yo,{media:nt,style:Ct(nt,"left","far"),onMeasure:Qe,onTransitionEnd:Je},`far-prev-${nt.url}`),ht&&Ve&&r.jsxs(r.Fragment,{children:[r.jsx(Yo,{media:Ve,style:Ct(Ve,"left"),onMeasure:Qe,onTransitionEnd:Je},`prev-${Ve.url}`),Bt&&r.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:s||ce?"default":"pointer",pointerEvents:s||ce?"none":"auto",zIndex:3},onClick:Xt(-1)})]}),ht&&ye&&r.jsxs(r.Fragment,{children:[r.jsx(Yo,{media:ye,style:Ct(ye,"right"),onMeasure:Qe,onTransitionEnd:Je},`next-${ye.url}`),Lt&&r.jsx("div",{style:{position:"absolute",top:Lt.top,left:Lt.left,width:Lt.width,height:Lt.height,cursor:s||ce?"default":"pointer",pointerEvents:s||ce?"none":"auto",zIndex:3},onClick:Xt(1)})]}),ht&&pt&&r.jsx(Yo,{media:pt,style:Ct(pt,"right","far"),onMeasure:Qe,onTransitionEnd:Je},`far-next-${pt.url}`),ee&&j&&(ze?r.jsx(mv,{src:j.url,phase:J,onMediaElement:Ge,wrapperStyle:Dt,videoStyle:qt,onLoadedMetadata:Te,onTransitionEnd:Je},`${n}-${j.url}`):r.jsx("img",{ref:Ge,src:j.url,alt:j.name,onLoad:Te,onTransitionEnd:Je,style:Dt},`${n}-${j.url}`))]})}const hv=20,fv=.18;function yv(e){return`
17498
+ `}const Cn=500,no=650,pn="cubic-bezier(0.22, 1, 0.36, 1)",uv=72,pv=50,mv=1e4,gv=650,hv=500;function fv(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 Bc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=ur(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 yv(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Bc(i,n):null}function vv(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 ro(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 vl(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return ro(e,i,n)}const bv=.03;function Vc(e){return e.width*bv}const sa={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Xo(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function bl(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function xv(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function La(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 wv(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:La(e,t.width,t.height)}function Sv(e,t){if(kr(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 $v(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 Cv({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=>kr(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 qi(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 hr(e,t,n){const i=qi(e,t,n);return{...i,left:2*i.left-e.left}}function Tv(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 Gc(e,t,n,i){const o=qi(e,"left",i),s=qi(e,"right",i),l=hr(e,"left",i),d=hr(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 Lv(e,t,n,i){const{start:o,end:s}=Gc(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function Iv(e,t,n){const i=qi(e,t,n),o=hr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function kr(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Rv({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 Yo({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return kr(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 Mv({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:x,resolveCloseSourceRect:I,onClose:h,onPrev:g,onNext:y}){const E=a.useRef(null),L=a.useRef(null),C=a.useRef(null),K=a.useRef(new Map),[A,B]=a.useState(0),P=a.useRef(null),T=a.useRef(0),z=a.useRef(0),w=a.useRef("none"),W=a.useRef(!1),R=a.useRef(!1),J=a.useRef(!1),F=a.useRef(null),U=a.useRef(null),V=a.useRef(null),G=a.useRef(()=>{}),oe=a.useRef(null),$=a.useRef(null),M=a.useRef(null),N=a.useRef(!1),[Q,te]=a.useState(null),[k,le]=a.useState(sa),[f,ne]=a.useState(0),[Z,fe]=a.useState("opening"),[Ie,ue]=a.useState(0),[se,q]=a.useState(0),[ee,ce]=a.useState(!1),[ke,$e]=a.useState(null),[Pe,pe]=a.useState(null),[he,be]=a.useState(null),[j,re]=a.useState(!1),[ge,xe]=a.useState(null),[Le,we]=a.useState(!1),_=a.useRef(!1),[me,ie]=a.useState(!1),[H,X]=a.useState(!1),Re=a.useRef(n),de=a.useRef(void 0),D=t[n],ze=D?kr(D):!1,Fe=se!==0||ee,ot=!l&&(!s||!!d),tt=c&&!l,at=u.length>1,yt=a.useCallback((b,ve)=>t.length<=1?null:t[(b+ve+t.length)%t.length]??null,[t]),Ve=at?ro(u,p,-1):yt(n,-1),ye=at?ro(u,p,1):yt(n,1),Me=ke===-1&&Fe?at&&Pe!==null?ro(u,Pe,-1):he!==null?yt(he,-1):null:null,je=ke===1&&Fe?at&&Pe!==null?ro(u,Pe,1):he!==null?yt(he,1):null:null,Ee=Me&&Me.url!==(Ve==null?void 0:Ve.url)?Me:null,Ce=je&&je.url!==(ye==null?void 0:ye.url)?je:null,_e=Ve&&tt?(()=>{const b=at?vl(u,p,-1):t.length>2?yt((n-1+t.length)%t.length,-1):null;return b&&b.url!==Ve.url?b:null})():null,De=ye&&tt?(()=>{const b=at?vl(u,p,1):t.length>2?yt((n+1)%t.length,1):null;return b&&b.url!==ye.url?b:null})():null,nt=Ee??_e,pt=Ce??De,Qe=a.useCallback((b,ve,We)=>{if(!b||!ve||!We)return;const Ne=K.current,lt=Ne.get(b);(lt==null?void 0:lt.width)===ve&&(lt==null?void 0:lt.height)===We||(Ne.set(b,{width:ve,height:We}),B(Ft=>Ft+1))},[]),St=a.useCallback(b=>{if(!(b!=null&&b.url))return null;const ve=K.current.get(b.url);return wv(L.current,ve)},[A,f]),ct=a.useCallback(()=>{if(!D)return;const b=St(D);if(b){te(b);return}const ve=L.current;ve&&te(bl(ve))},[D,St]),Ue=a.useCallback(b=>{if(at){const ve=u.length;pe((p+b+ve)%ve),be(null);return}t.length>1&&(be((n+b+t.length)%t.length),pe(null))},[at,u.length,p,t.length,n]),Ke=a.useCallback(b=>{J.current=b,ce(b)},[]),Oe=a.useCallback(()=>{F.current!==null&&(window.clearTimeout(F.current),F.current=null)},[]),ft=a.useCallback(()=>{Oe(),F.current=window.setTimeout(()=>{Oe(),Ke(!1)},no+32)},[Oe,Ke]),mt=a.useCallback(()=>{const b=E.current;if(!b){le({left:0,top:0,width:typeof window<"u"?window.innerWidth:sa.width,height:typeof window<"u"?window.innerHeight:sa.height});return}const ve=b.getBoundingClientRect();le({left:ve.left,top:ve.top,width:ve.width,height:ve.height})},[]),gt=a.useCallback((b,ve)=>{if(Fe){if(me&&!ee)return`translate(${se}px, 0px)`;if(ee&&ke!==null){const We=St(b);if(!We)return;const{x:Ne,y:lt}=Lv(We,ve,ke,k);return`translate(${Ne}px, ${lt}px)`}if(ee)return"translate(0px, 0px)"}},[Fe,me,ee,se,ke,k,St]),At=a.useCallback(()=>{const b=U.current;U.current=null,Oe(),Ke(!1),$e(null),pe(null),be(null),q(0),ie(!1),W.current=!1,z.current=0,w.current="none",b===-1?g():b===1&&y()},[Oe,Ke,g,y]),Zt=a.useCallback(()=>{Oe(),F.current=window.setTimeout(()=>{U.current!==null&&At()},no+32)},[Oe,At]),tn=a.useCallback(()=>{Oe(),U.current=null,Ke(!1),$e(null),pe(null),be(null),q(0),ie(!1),W.current=!1,z.current=0,w.current="none"},[Oe,Ke]),$t=a.useCallback(b=>{if(!(!tt||!Q)){if(J.current){if(U.current===b){V.current=b,At();return}tn()}Oe(),Ue(b),U.current=b,$e(b),Ke(!0),Zt()}},[tt,Q,At,tn,Oe,Ue,Ke,Zt]);G.current=$t;const Tt=a.useCallback(()=>{oe.current=null,N.current=!1,$.current!==null&&(window.clearInterval($.current),$.current=null),M.current!==null&&(window.clearTimeout(M.current),M.current=null)},[]),Ht=a.useCallback(b=>{$.current!==null&&window.clearInterval($.current);const ve=N.current?hv:gv;$.current=window.setInterval(()=>{G.current(b)},ve)},[]),Wt=a.useCallback(b=>{oe.current!==b&&(Tt(),oe.current=b,N.current=!1,G.current(b),Ht(b),M.current=window.setTimeout(()=>{M.current=null,oe.current===b&&(N.current=!0,Ht(b))},mv))},[Tt,Ht]),Te=a.useCallback(()=>{const b=L.current;if(!b)return;const ve=D==null?void 0:D.url,We=ve?K.current.get(ve):void 0;if(We!=null&&We.width&&(We!=null&&We.height)){te(La(b,We.width,We.height));return}const Ne=C.current;if(Ne&&ve&&(Ne.src===ve||Ne.currentSrc===ve)){const{width:Ft,height:et}=xv(Ne);if(Ft&&et){Qe(ve,Ft,et),te(La(b,Ft,et));return}}const lt=bl(b);!lt.width||!lt.height||te(lt)},[D==null?void 0:D.url,Qe]),Ge=a.useCallback(b=>{if(C.current=b,!!b){if(b instanceof HTMLVideoElement){b.readyState>=1&&b.videoWidth>0&&Te();return}b.complete&&b.naturalWidth>0&&Te()}},[Te]),Xe=a.useCallback(()=>{mt(),Te(),ne(b=>b+1)},[mt,Te]);a.useEffect(()=>{Xe();const b=L.current,ve=E.current,We=new ResizeObserver(()=>Xe());return b&&We.observe(b),ve&&We.observe(ve),window.addEventListener("resize",Xe),()=>{We.disconnect(),window.removeEventListener("resize",Xe)}},[Xe,n,v]),a.useLayoutEffect(()=>{if(!D)return;const b=C.current;if(b){if(b instanceof HTMLImageElement&&b.complete&&b.naturalWidth>0){Te();return}b instanceof HTMLVideoElement&&b.readyState>=1&&b.videoWidth>0&&Te()}},[D==null?void 0:D.url,n,Te]),a.useEffect(()=>{ct()},[ct,A]),a.useEffect(()=>{const b=new Set,ve=[],We=Ne=>{!(Ne!=null&&Ne.url)||b.has(Ne.url)||(b.add(Ne.url),ve.push(Ne))};t.forEach(We),u.forEach(Ne=>Ne.items.forEach(We)),ve.forEach(Ne=>{K.current.has(Ne.url)||Sv(Ne,Qe)})},[t,u,Qe]),a.useEffect(()=>{if(Z!=="opening"||!Q)return;if(!x){fe("open");return}re(!1);const b=requestAnimationFrame(()=>{requestAnimationFrame(()=>{re(!0),fe("open")})});return()=>cancelAnimationFrame(b)},[Z,Q,x]),a.useEffect(()=>{if(Z!=="closing")return;const b=setTimeout(()=>h(),Cn);return()=>clearTimeout(b)},[Z,h]),a.useEffect(()=>()=>{Oe()},[Oe]),a.useLayoutEffect(()=>{Re.current===n&&de.current===(D==null?void 0:D.url)||(Oe(),U.current=null,$e(null),pe(null),be(null),ue(0),q(0),Ke(!1),X(!1),ie(!1),T.current=0,z.current=0,w.current="none",W.current=!1,P.current=null,R.current=!1,C.current=null,ct(),Re.current=n,de.current=D==null?void 0:D.url)},[n,D==null?void 0:D.url,Ke,Oe,ct]),a.useLayoutEffect(()=>{const b=V.current;b!==null&&(V.current=null,requestAnimationFrame(()=>{G.current(b)}))},[n,p,D==null?void 0:D.url]),a.useLayoutEffect(()=>{if(Z==="opening"){_.current=!1,we(!1);return}if(Z!=="open"||_.current)return;if(!Ve&&!ye){_.current=!0;return}we(!1);const b=requestAnimationFrame(()=>{requestAnimationFrame(()=>{we(!0),_.current=!0})});return()=>cancelAnimationFrame(b)},[Z,Ve==null?void 0:Ve.url,ye==null?void 0:ye.url]),a.useEffect(()=>{if(Z!=="open")return;const b=()=>{const et=vt=>{vt.stopPropagation(),vt.preventDefault(),document.removeEventListener("click",et,!0)};document.addEventListener("click",et,!0)},ve=et=>{const vt=et<0?1:-1;Oe(),Ue(vt),U.current=vt,$e(vt),Ke(!0),Zt()},We=et=>{if(Math.abs(et)>pv&&tt){ve(et);return}U.current=null,$e(null),pe(null),be(null),Ke(!0),q(0),ft()},Ne=et=>{if(et.touches.length!==1||J.current)return;const vt=et.touches[0];R.current=!0,P.current={x:vt.clientX,y:vt.clientY},w.current="none",z.current=0,W.current=!1},lt=et=>{if(!P.current||et.touches.length!==1||J.current)return;const vt=et.touches[0],Ot=vt.clientX-P.current.x,kt=vt.clientY-P.current.y;if(w.current==="none"){if(Math.abs(Ot)<10&&Math.abs(kt)<10)return;if(Math.abs(Ot)>Math.abs(kt)){if(!tt)return;w.current="horizontal"}else if(kt>0){if(!ot)return;w.current="vertical"}else return}if(w.current==="horizontal"){W.current=!0,ie(!0),z.current=Ot,q(Ot),et.preventDefault();return}w.current==="vertical"&&(W.current=!0,ie(!0),T.current=kt,ue(kt),et.preventDefault())},Ft=()=>{if(!P.current)return;const et=w.current,vt=W.current;if(vt&&et==="horizontal")We(z.current),b();else if(vt&&et==="vertical"){const Ot=T.current;if(ot&&Ot>uv){const kt=window.innerHeight;T.current=kt,X(!0),ue(kt),fe("closing")}else T.current=0,ue(0);b()}else et==="horizontal"&&Math.abs(z.current)>0&&(We(z.current),b());P.current=null,w.current="none",z.current=0,W.current=!1,ie(!1)};return document.addEventListener("touchstart",Ne,{passive:!0}),document.addEventListener("touchmove",lt,{passive:!1}),document.addEventListener("touchend",Ft),document.addEventListener("touchcancel",Ft),()=>{document.removeEventListener("touchstart",Ne),document.removeEventListener("touchmove",lt),document.removeEventListener("touchend",Ft),document.removeEventListener("touchcancel",Ft)}},[Z,tt,Ke,ft,Oe,ot,Zt,Ue]);const dt=a.useCallback(()=>{const b=(I==null?void 0:I())??x??null;b&&Q&&(xe(b),re(!0)),fe("closing")},[I,x,Q]);a.useEffect(()=>{const b=Ne=>{if(Ne.key==="Escape"){if(s&&d||Z==="closing")return;Tt(),dt();return}if(Ne.key!=="ArrowLeft"&&Ne.key!=="ArrowRight"||Z!=="open"||!tt)return;Ne.preventDefault();const lt=Ne.key==="ArrowLeft"?-1:1;Ne.repeat&&oe.current===lt||Wt(lt)},ve=Ne=>{if(Ne.key!=="ArrowLeft"&&Ne.key!=="ArrowRight")return;const lt=Ne.key==="ArrowLeft"?-1:1;oe.current===lt&&Tt()},We=()=>{Tt()};return window.addEventListener("keydown",b),window.addEventListener("keyup",ve),window.addEventListener("blur",We),()=>{window.removeEventListener("keydown",b),window.removeEventListener("keyup",ve),window.removeEventListener("blur",We),Tt()}},[Z,s,d,dt,tt,Wt,Tt]),a.useEffect(()=>{Z!=="open"&&Tt()},[Z,Tt]);const Pt=()=>{Z==="closing"||l||dt()},ht=Z==="open",it=Z==="closing",Kt=Ie>0?Math.max(0,1-Ie/500):1,Ze=Ie>0?Math.max(.35,1-Ie/500):1,Je=a.useCallback(b=>{if(!(b.propertyName!=="transform"||!J.current)){if(U.current!==null){At();return}Oe(),Ke(!1)}},[Oe,Ke,At]),st=Z==="closing"?ge??x:x,Mt=st&&Q&&(Z==="opening"||it)?fv(st,Q):void 0,Et=Fe&&D?gt(D,"center"):Ie>0?`translateY(${Ie}px)`:Mt,xt=Q?Xo(Q,k):null,_t=!!(st&&Q),zt=_t&&(Z==="closing"||Z==="open"&&j),jt={position:"absolute",top:xt==null?void 0:xt.top,left:xt==null?void 0:xt.left,width:xt==null?void 0:xt.width,height:xt==null?void 0:xt.height,objectFit:"contain",transformOrigin:"top left",transform:Et,opacity:Ie>0?Ze:_t?1:Z==="opening"||it?0:1,transition:me&&!ee?"none":ee?`transform ${no}ms ${pn}`:H?`transform ${Cn}ms ${pn}, opacity ${Cn}ms ${pn}`:zt?`transform ${Cn}ms ${pn}`:Z==="opening"||it?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:ze&&ht&&!Fe?"auto":"none",touchAction:ze&&ht?"none":void 0,zIndex:1,overflow:ze?"hidden":void 0},qt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:ht&&!Fe?"auto":"none"},Ct=(b,ve,We="adjacent")=>{const Ne=St(b);if(!Ne)return{display:"none"};const lt=We==="far"?ve==="left"?"far-left":"far-right":ve==="left"?"left-adjacent":"right-adjacent",{start:Ft}=ke!==null?Gc(Ne,lt,ke,k):{start:We==="far"?hr(Ne,ve,k):qi(Ne,ve,k)},et=Xo(Ft,k),vt=gt(b,lt),Ot=!Fe&&We==="adjacent"&&ht&&!Le?Iv(Ne,ve,k):null,kt=We==="far"&&Fe&&ke===(ve==="left"?-1:1),cn=me&&!ee?!1:ee,dn=We==="adjacent"&&ht&&Le&&!Fe;return{position:"absolute",top:et.top,left:et.left,width:et.width,height:et.height,objectFit:"contain",transform:vt??(Ot?`translate(${Ot.x}px, ${Ot.y}px)`:void 0),opacity:We==="far"?ht&&kt?1:0:ht?1:0,transition:cn?We==="far"?`transform ${no}ms ${pn}`:`transform ${no}ms ${pn}, opacity ${Cn}ms ${pn}`:dn?`transform ${Cn}ms ${pn}`:Z==="opening"||it?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:"none",zIndex:1}},Ut=(b,ve)=>{const We=St(b);return We?Tv(qi(We,ve,k),ve,k):null},Xt=b=>ve=>{if(!l){if(R.current){R.current=!1;return}ve.stopPropagation(),$t(b)}},Yt=Ve?Ut(Ve,"left"):null,Jt=ye?Ut(ye,"right"):null,Bt=Yt?Xo(Yt,k):null,Lt=Jt?Xo(Jt,k):null;return r.jsxs("div",{ref:E,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:Z==="open"?"none":void 0},onClick:Pt,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:ht?Kt:0,transition:me?"none":`opacity ${Cn}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:L,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:ht?1:0,transition:me?"none":`opacity ${Cn}ms ${pn}`,pointerEvents:"none"},children:r.jsx(Tc,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:Pt})})]}),ht&&nt&&r.jsx(Yo,{media:nt,style:Ct(nt,"left","far"),onMeasure:Qe,onTransitionEnd:Je},`far-prev-${nt.url}`),ht&&Ve&&r.jsxs(r.Fragment,{children:[r.jsx(Yo,{media:Ve,style:Ct(Ve,"left"),onMeasure:Qe,onTransitionEnd:Je},`prev-${Ve.url}`),Bt&&r.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||me?"default":"pointer",pointerEvents:l||me?"none":"auto",zIndex:3},onClick:Xt(-1)})]}),ht&&ye&&r.jsxs(r.Fragment,{children:[r.jsx(Yo,{media:ye,style:Ct(ye,"right"),onMeasure:Qe,onTransitionEnd:Je},`next-${ye.url}`),Lt&&r.jsx("div",{style:{position:"absolute",top:Lt.top,left:Lt.left,width:Lt.width,height:Lt.height,cursor:l||me?"default":"pointer",pointerEvents:l||me?"none":"auto",zIndex:3},onClick:Xt(1)})]}),ht&&pt&&r.jsx(Yo,{media:pt,style:Ct(pt,"right","far"),onMeasure:Qe,onTransitionEnd:Je},`far-next-${pt.url}`),Q&&D&&(ze?r.jsx(Rv,{src:D.url,phase:Z,onMediaElement:Ge,wrapperStyle:jt,videoStyle:qt,onLoadedMetadata:Te,onTransitionEnd:Je},`${n}-${D.url}`):r.jsx("img",{ref:Ge,src:D.url,alt:D.name,onLoad:Te,onTransitionEnd:Je,style:jt},`${n}-${D.url}`))]})}const Ev=20,Pv=.18;function kv(e){return`
17499
17499
  .${e}-wrapper {
17500
17500
  box-sizing: border-box;
17501
17501
  max-width: 100%;
@@ -17582,8 +17582,8 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
17582
17582
  z-index: 2;
17583
17583
  pointer-events: auto;
17584
17584
  }
17585
- ${Xy(e)}
17586
- `}function vv(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,l]=n.split(":").map(Number),s=i?l:o,d=i?o:l;return d>0?s/d:1}function xv(e){const t=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,n=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight;return!t||!n?null:t/n}function bv(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:w.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:w.scalingValue(i*fv,n??!1),[`--${t}-image-aspect`]:vv(e)}}function wv(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 Vt(n,t)}function Sv(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 $v(e,t,n,i,o,l){if(!(!e||!t))return s=>{var c;const d=((c=s.currentTarget.closest(`.${i}-item`))==null?void 0:c.querySelector(`[data-waterfall-index="${n}"]`))??(s.currentTarget instanceof HTMLImageElement||s.currentTarget instanceof HTMLVideoElement?s.currentTarget:null);l(n,d?_c(d,o):void 0)}}function Cv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:l,portalId:s}){const{prefix:d}=w.useScopedStyles(),c=a.useMemo(()=>yv(d),[d]),u=t??[],p=(e==null?void 0:e.type)??"a",b=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,S=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,L=w.scalingValue(S,n??!1),h=`max(${L}, ${hv}px)`,{objectFitMode:g,imageStyle:y}=Sv(e),E=wv(e,n),R=a.useRef(null),[T,Y]=a.useState(!1),[k,B]=a.useState([]),[P,C]=a.useState(0),[z,v]=a.useState(0),[W,I]=a.useState(null),[Z,A]=a.useState({title1:"",title2:"",title3:""}),K=(!n||i)&&!T,V=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},G=V.sizeType??"none",ne=K&&G!=="none"?`${d}-item-image-hover-${G}`:void 0,$=(V.value??120)/100,M=a.useCallback(se=>{!se||G!=="scale"||(se.style.transformOrigin=qp(se))},[G]),H=a.useCallback(se=>{if(se){if(g==="contain"){const q=xv(se);if(q){const Q=se.closest(`.${d}-item-image`);Q instanceof HTMLElement&&Q.style.setProperty(`--${d}-item-media-aspect`,String(q))}}M(se)}},[d,M,g]),ee={width:w.scalingValue(b,n??!1),...E,...bv(e,d,n),[`--${d}-image-hover-scale`]:String($)},ie=(()=>{const se={},q=R.current?getComputedStyle(R.current).getPropertyValue("--cntrl-article-width").trim():"";return q&&(se["--cntrl-article-width"]=q),se})(),F=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),pe=a.useMemo(()=>iv(u),[u]),x=a.useMemo(()=>sv(u),[u]),re=(se,q)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const Q=pe.findIndex(Ne=>Ne.gridIndex===se);if(Q<0)return;const me=pe[Q];v(Q),B(me.items),C(0),A(me.entry),I(q??null),Y(!0)},J=a.useCallback(()=>{Y(!1),I(null)},[]),fe=a.useCallback(()=>{const se=pe[z];return!se||!R.current?W:nv(R.current,se.gridIndex,g)??W},[pe,z,W,g]),Re=a.useCallback(se=>{if(pe.length>1){const q=pe.length,Q=(z+se+q)%q,me=pe[Q];v(Q),B(me.items),C(0),A(me.entry);return}C(q=>(q+se+k.length)%k.length)},[pe,z,k.length]),de=pe.length>1||k.length>1;return a.useEffect(()=>{if(!T||typeof document>"u")return;const se=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=se}},[T]),a.useEffect(()=>{!n||o||i||Y(!1)},[n,o,i]),a.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&Y(!1)},[e==null?void 0:e.lightbox]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),r.jsx(cv,{mediaList:x}),r.jsx("div",{ref:R,className:`${d}-wrapper ${d}-type-${p}`,style:ee,children:u.map((se,q)=>{var Ne,$e;const Q=!!((Ne=se.image)!=null&&Ne.url),me=$v(!!F,Q,q,d,g,re);return r.jsxs("div",{className:`${d}-item`,children:[se.title?r.jsx("span",{className:`${d}-item-title`,onClick:me,style:me?{cursor:"pointer"}:void 0,children:se.title}):null,($e=se.image)!=null&&$e.url?r.jsx("span",{className:[`${d}-item-image`,g==="contain"?`${d}-item-image-fit`:void 0,ne].filter(Boolean).join(" "),children:se.image.type==="video"?r.jsx("video",{ref:H,src:se.image.url,"data-waterfall-index":q,style:y,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:me,onLoadedData:ke=>H(ke.currentTarget)}):r.jsx("img",{ref:H,src:se.image.url,alt:se.image.name??"","data-waterfall-index":q,style:y,onClick:me,onLoad:ke=>H(ke.currentTarget)})}):null,q<u.length-1&&r.jsx("div",{className:`${d}-item-gap-host`,style:{width:L},children:o&&!T&&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:h,height:"100%"}})})]},q)})}),T&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const se=(s?document.getElementById(s):null)??document.body;return Yn.createPortal(r.jsx("div",{style:ie,"data-selection":"none",children:r.jsx(gv,{prefix:d,items:k,index:P,entry:Z,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:de,lightboxEntries:pe,entryIdx:z,layoutId:l,sourceRect:W,resolveCloseSourceRect:fe,onClose:J,onPrev:()=>Re(-1),onNext:()=>Re(1)})}),se)})()]})}const Tv=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17585
+ ${dv(e)}
17586
+ `}function Av(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 Fv(e){const t=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,n=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight;return!t||!n?null:t/n}function Wv(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:S.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:S.scalingValue(i*Pv,n??!1),[`--${t}-image-aspect`]:Av(e)}}function _v(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 Vt(n,t)}function Nv(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 Hv(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?Bc(d,o):void 0)}}function Ov({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=S.useScopedStyles(),c=a.useMemo(()=>kv(d),[d]),u=t??[],p=(e==null?void 0:e.type)??"a",v=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,x=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,I=S.scalingValue(x,n??!1),h=`max(${I}, ${Ev}px)`,{objectFitMode:g,imageStyle:y}=Nv(e),E=_v(e,n),L=a.useRef(null),[C,K]=a.useState(!1),[A,B]=a.useState([]),[P,T]=a.useState(0),[z,w]=a.useState(0),[W,R]=a.useState(null),[J,F]=a.useState({title1:"",title2:"",title3:""}),U=(!n||i)&&!C,V=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},G=V.sizeType??"none",oe=U&&G!=="none"?`${d}-item-image-hover-${G}`:void 0,$=(V.value??120)/100,M=a.useCallback(se=>{!se||G!=="scale"||(se.style.transformOrigin=sm(se))},[G]),N=a.useCallback(se=>{if(se){if(g==="contain"){const q=Fv(se);if(q){const ee=se.closest(`.${d}-item-image`);ee instanceof HTMLElement&&ee.style.setProperty(`--${d}-item-media-aspect`,String(q))}}M(se)}},[d,M,g]),Q={width:S.scalingValue(v,n??!1),...E,...Wv(e,d,n),[`--${d}-image-hover-scale`]:String($)},te=(()=>{const se={},q=L.current?getComputedStyle(L.current).getPropertyValue("--cntrl-article-width").trim():"";return q&&(se["--cntrl-article-width"]=q),se})(),k=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),le=a.useMemo(()=>vv(u),[u]),f=a.useMemo(()=>$v(u),[u]),ne=(se,q)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const ee=le.findIndex(ke=>ke.gridIndex===se);if(ee<0)return;const ce=le[ee];w(ee),B(ce.items),T(0),F(ce.entry),R(q??null),K(!0)},Z=a.useCallback(()=>{K(!1),R(null)},[]),fe=a.useCallback(()=>{const se=le[z];return!se||!L.current?W:yv(L.current,se.gridIndex,g)??W},[le,z,W,g]),Ie=a.useCallback(se=>{if(le.length>1){const q=le.length,ee=(z+se+q)%q,ce=le[ee];w(ee),B(ce.items),T(0),F(ce.entry);return}T(q=>(q+se+A.length)%A.length)},[le,z,A.length]),ue=le.length>1||A.length>1;return a.useEffect(()=>{if(!C||typeof document>"u")return;const se=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=se}},[C]),a.useEffect(()=>{!n||o||i||K(!1)},[n,o,i]),a.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&K(!1)},[e==null?void 0:e.lightbox]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),r.jsx(Cv,{mediaList:f}),r.jsx("div",{ref:L,className:`${d}-wrapper ${d}-type-${p}`,style:Q,children:u.map((se,q)=>{var ke,$e;const ee=!!((ke=se.image)!=null&&ke.url),ce=Hv(!!k,ee,q,d,g,ne);return r.jsxs("div",{className:`${d}-item`,children:[se.title?r.jsx("span",{className:`${d}-item-title`,onClick:ce,style:ce?{cursor:"pointer"}:void 0,children:se.title}):null,($e=se.image)!=null&&$e.url?r.jsx("span",{className:[`${d}-item-image`,g==="contain"?`${d}-item-image-fit`:void 0,oe].filter(Boolean).join(" "),children:se.image.type==="video"?r.jsx("video",{ref:N,src:se.image.url,"data-waterfall-index":q,style:y,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:ce,onLoadedData:Pe=>N(Pe.currentTarget)}):r.jsx("img",{ref:N,src:se.image.url,alt:se.image.name??"","data-waterfall-index":q,style:y,onClick:ce,onLoad:Pe=>N(Pe.currentTarget)})}):null,q<u.length-1&&r.jsx("div",{className:`${d}-item-gap-host`,style:{width:I},children:o&&!C&&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:h,height:"100%"}})})]},q)})}),C&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const se=(l?document.getElementById(l):null)??document.body;return Yn.createPortal(r.jsx("div",{style:te,"data-selection":"none",children:r.jsx(Mv,{prefix:d,items:A,index:P,entry:J,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ue,lightboxEntries:le,entryIdx:z,layoutId:s,sourceRect:W,resolveCloseSourceRect:fe,onClose:Z,onPrev:()=>Ie(-1),onNext:()=>Ie(1)})}),se)})()]})}const Dv=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17587
17587
  import type React from 'react';
17588
17588
  import { createPortal } from 'react-dom';
17589
17589
  import { CommonComponentProps } from '../props';
@@ -18097,7 +18097,7 @@ export function Waterfall({
18097
18097
  </>
18098
18098
  );
18099
18099
  }
18100
- `,Lv="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>'),Dn={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 Rv(e){const t={};return t[Ye(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ye(e,"fontSettings")]={...Dn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ye(e,"fontSize")]={...Dn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ye(e,"lineHeight")]={...Dn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ye(e,"letterSpacing")]={...Dn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ye(e,"wordSpacing")]={...Dn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ye(e,"textAlign")]={...Dn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ye(e,"textAppearance")]={...Dn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Ui=Kn.filter(e=>e!=="count"),Iv=Ui.reduce((e,t)=>({...e,...Rv(t)}),{}),Mv=Ui.reduce((e,t)=>({...e,[Ye(t,"fontFamily")]:"Arial",[Ye(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ye(t,"letterSpacing")]:0,[Ye(t,"wordSpacing")]:0,[Ye(t,"textAlign")]:"left",[Ye(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function la(e){return Ui.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ye(n,"fontSize")]=i),o!==void 0&&(t[Ye(n,"lineHeight")]=o),t},{})}const Ev={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ui.map(e=>[Ya[e],Za(e)]))},Zo={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},Pv=[{title:"Salton Sea from Above",...Zo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...Zo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Zo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...Zo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],kv={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:Pv},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},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:{...Dn.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"]}}},...Iv},defaults:{type:"a",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:Lv,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...Mv},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,...la({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,...la({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,...la({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","type","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",{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:[Ev]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},Av={element:Cv,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"},...Ui.map(e=>({path:`${Ye(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...Ui.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ye(t,"fontFamily")}`}),{})},schema:kv,sourceCode:Tv},Fi=500,Oc="cubic-bezier(0.25, 1, 0.5, 1)",Fv=300,Wv=5,_v=.15,Nv=.4,Hv=100,$i=100,fs={color:"#000000",hover:"#cccccc"},io={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},Ov={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}},sa={offset:{x:0,y:0},linkColor:"#cccccc"},ys={sizeType:"drag",value:3},jv="left";function Dv(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:jv,color:(e==null?void 0:e.titleColor)??"#000000"};return Vt(n,t)}function Ci(e,t,n){return`${e}: ${w.scalingValue(t/1440,n)};`}function ao(e,t){return t<=0?0:(e%t+t)%t}function zv(e,t,n,i){if(!i)return{position:ao(e+t,n),hitBoundary:!1};const o=e+t;return o>=0&&o<=n+1?{position:o,hitBoundary:!1}:{position:t>0?n+1:0,hitBoundary:!0}}function Bv(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function Vv(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,b)=>{n.style.transform=`translate(${p}px, ${b}px)`;const S=n.getBoundingClientRect();return{x:S.left,y:S.top}},o=i(0,0),l=i($i,0),s=i(0,$i);e.removeChild(n);const d={x:(l.x-o.x)/$i,y:(l.y-o.y)/$i},c={x:(s.x-o.x)/$i,y:(s.y-o.y)/$i},u=d.x*c.y-c.x*d.y;return{ex:d,ey:c,det:u}}function Gv(e,t,n){const{ex:i,ey:o,det:l}=e;return{x:(t*o.y-n*o.x)/l,y:(i.x*n-i.y*t)/l}}function qv(e,t){return`
18100
+ `,jv="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>'),jn={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 zv(e){const t={};return t[Ye(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Ye(e,"fontSettings")]={...jn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Ye(e,"fontSize")]={...jn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ye(e,"lineHeight")]={...jn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ye(e,"letterSpacing")]={...jn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ye(e,"wordSpacing")]={...jn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ye(e,"textAlign")]={...jn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ye(e,"textAppearance")]={...jn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Ui=Kn.filter(e=>e!=="count"),Bv=Ui.reduce((e,t)=>({...e,...zv(t)}),{}),Vv=Ui.reduce((e,t)=>({...e,[Ye(t,"fontFamily")]:"Arial",[Ye(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Ye(t,"letterSpacing")]:0,[Ye(t,"wordSpacing")]:0,[Ye(t,"textAlign")]:"left",[Ye(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function la(e){return Ui.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Ye(n,"fontSize")]=i),o!==void 0&&(t[Ye(n,"lineHeight")]=o),t},{})}const Gv={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ui.map(e=>[Qa[e],es(e)]))},Zo={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},qv=[{title:"Salton Sea from Above",...Zo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...Zo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Zo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...Zo,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],Uv={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:qv},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},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:{...jn.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"]}}},...Bv},defaults:{type:"a",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:jv,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...Vv},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,...la({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,...la({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,...la({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","type","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",{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:[Gv]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},Kv={element:Ov,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"},...Ui.map(e=>({path:`${Ye(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...Ui.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Ye(t,"fontFamily")}`}),{})},schema:Uv,sourceCode:Dv},Fi=500,qc="cubic-bezier(0.25, 1, 0.5, 1)",Xv=300,Yv=5,Zv=.15,Jv=.4,Qv=100,$i=100,xl={color:"#000000",hover:"#cccccc"},io={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},e0={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}},ca={offset:{x:0,y:0},linkColor:"#cccccc"},wl={sizeType:"drag",value:3},t0="left";function n0(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:t0,color:(e==null?void 0:e.titleColor)??"#000000"};return Vt(n,t)}function Ci(e,t,n){return`${e}: ${S.scalingValue(t/1440,n)};`}function ao(e,t){return t<=0?0:(e%t+t)%t}function i0(e,t,n,i){if(!i)return{position:ao(e+t,n),hitBoundary:!1};const o=e+t;return o>=0&&o<=n+1?{position:o,hitBoundary:!1}:{position:t>0?n+1:0,hitBoundary:!0}}function o0(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function r0(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,v)=>{n.style.transform=`translate(${p}px, ${v}px)`;const x=n.getBoundingClientRect();return{x:x.left,y:x.top}},o=i(0,0),s=i($i,0),l=i(0,$i);e.removeChild(n);const d={x:(s.x-o.x)/$i,y:(s.y-o.y)/$i},c={x:(l.x-o.x)/$i,y:(l.y-o.y)/$i},u=d.x*c.y-c.x*d.y;return{ex:d,ey:c,det:u}}function a0(e,t,n){const{ex:i,ey:o,det:s}=e;return{x:(t*o.y-n*o.x)/s,y:(i.x*n-i.y*t)/s}}function s0(e,t){return`
18101
18101
  .${e}-wrapper {
18102
18102
  position: relative;
18103
18103
  width: 100%;
@@ -18169,7 +18169,7 @@ export function Waterfall({
18169
18169
  top: 0;
18170
18170
  left: 0;
18171
18171
  opacity: 0;
18172
- transition: opacity ${Fi}ms ${Oc};
18172
+ transition: opacity ${Fi}ms ${qc};
18173
18173
  }
18174
18174
  .${e}-list-fade .${e}-slide.${e}-is-active {
18175
18175
  opacity: 1;
@@ -18367,7 +18367,7 @@ export function Waterfall({
18367
18367
  from { clip-path: inset(100% 0 0 0); }
18368
18368
  to { clip-path: inset(0 0 0 0); }
18369
18369
  }
18370
- `}function Uv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:l}=w.useScopedStyles(),s=Dv(e,n),d=t??[],c=d.length,u=(e==null?void 0:e.trigger)??ys,p=u.sizeType??"drag",b=u.value??ys.value,S=(e==null?void 0:e.direction)??"horizontal",L=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",g=(e==null?void 0:e.navSize)??"m",y=Ov[g],E=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,R=ye=>w.scalingValue(ye*E,n),T=(e==null?void 0:e.show)??"always",Y=(e==null?void 0:e.controls)??null,k=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,B=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,P=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,C=(e==null?void 0:e.controlsColor)??fs.color,z=(e==null?void 0:e.controlsHoverColor)??fs.hover,v=(e==null?void 0:e.navColor)??io.colors.inactive,W=(e==null?void 0:e.navPaginationColor)??io.colors.pagination,I=(e==null?void 0:e.navBackgroundColor)??io.colors.background,Z=(e==null?void 0:e.linkColor)??sa.linkColor,A=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,K=S==="horizontal",V=p==="click",G=p==="drag",ne=p==="auto"&&(!n||!!i),$=!n,M=L==="slide",H=h==="classic",ee=T!=="never",ie=T==="on hover",F=w.scalingValue(k,n),pe={width:F,height:F,maxWidth:F},x=M&&c>1,[re,J]=a.useState(0),[fe,Re]=a.useState(x?1:0),[de,se]=a.useState(!1),[q,Q]=a.useState(!1),[me,Ne]=a.useState(!1),[$e,ke]=a.useState(0),[ue,he]=a.useState(!1),[Se,D]=a.useState(!1),oe=a.useRef(!1),ge=a.useRef(fe);ge.current=fe;const xe=a.useRef(null),Le=a.useRef(0),be=a.useRef(null),_=a.useRef(null),ce=a.useRef(null),te=a.useRef(null),N=a.useCallback(ye=>{oe.current=ye,se(ye)},[]),U=a.useCallback(ye=>{if(c<2||ye===0)return;const Me=ye>0?1:-1,De=Math.abs(ye);if(he(!0),N(!0),!M){J(pt=>ao(pt+ye,c));return}let Ee=ge.current;const Ce=x&&(Ee===0||Ee===c+1),We=Ce?re+1:null;Ce&&(Ee=re+1);let je=De;for(;je>0;){const pt=zv(Ee,Me,c,x);if(Ee=pt.position,je-=1,pt.hitBoundary){Le.current=je*Me;break}}const nt=De-je;if(nt>0&&J(pt=>ao(pt+nt*Me,c)),ge.current=Ee,We!==null){if(ge.current=We,Ee===We){Q(!0),Re(Ee);return}xe.current=Ee,Q(!0),Re(We);return}Q(!1),Re(Ee)},[re,c,x,M,N]),Ie=a.useCallback(ye=>{U(ye)},[U]),le=a.useCallback(ye=>{if(c<2)return;const Me=ao(ye,c);if(!(Me===re&&!oe.current)&&(he(!0),N(!0),J(Me),M)){const De=Me+(x?1:0);xe.current=null,Le.current=0,ge.current=De,Q(!1),Re(De)}},[re,c,x,M,N]);a.useEffect(()=>{if(!de)return;const ye=window.setTimeout(()=>{if(x&&(fe===0||fe===c+1)){xe.current=null,Q(!0),Re(re+1);return}N(!1)},Fi);return()=>window.clearTimeout(ye)},[re,c,x,de,N,fe]),a.useEffect(()=>{if(!q)return;let ye=0;const Me=requestAnimationFrame(()=>{ye=requestAnimationFrame(()=>{const De=xe.current;xe.current=null;const Ee=Le.current;if(Le.current=0,Q(!1),De!==null){ge.current=De,Re(De);return}if(Ee!==0){U(Ee);return}N(!1)})});return()=>{cancelAnimationFrame(Me),cancelAnimationFrame(ye)}},[U,N,q]);const j=`${x}:${c}`,ze=a.useRef(j);a.useEffect(()=>{if(ze.current===j)return;ze.current=j;const ye=c>0?Math.min(re,c-1):0;ce.current=null,te.current=null,Ne(!1),ke(0),J(ye),Q(!0),Re(ye+(x?1:0))},[re,c,x,j]),a.useEffect(()=>{if(!ue)return;const ye=window.setTimeout(()=>he(!1),Fv);return()=>window.clearTimeout(ye)},[ue,re]),a.useEffect(()=>{if(!ne||c<2)return;const ye=Math.max(b,.1)*1e3,Me=window.setInterval(()=>{$&&Se||Ie(1)},ye);return()=>window.clearInterval(Me)},[b,c,Ie,ne,Se,$]);const Ae=a.useCallback(ye=>{const Me=ce.current;if(!Me||Me.pointerId!==ye.pointerId)return;ce.current=null,te.current=null;const De=be.current;if(De!=null&&De.hasPointerCapture(ye.pointerId)&&De.releasePointerCapture(ye.pointerId),!Me.isActive){M&&ke(0);return}const Ce=!(ye.timeStamp-Me.lastTime>Hv)&&Math.abs(Me.velocity)>Nv,We=Me.size>0&&Math.abs(Me.offset-Me.baseOffset)>Me.size*_v;if(Ne(!1),!Ce&&!We){ke(0);return}const je=We?Me.offset-Me.baseOffset:Me.velocity;let nt=1;We&&Me.size>0&&(nt=Math.max(1,Math.round(Math.abs(je)/Me.size))),ke(0),U(je<0?nt:-nt)},[U,M]);a.useEffect(()=>{const ye=Me=>{te.current===null||Me.pointerId!==te.current||Ae(Me)};return window.addEventListener("pointerup",ye),window.addEventListener("pointercancel",ye),()=>{window.removeEventListener("pointerup",ye),window.removeEventListener("pointercancel",ye)}},[Ae]);const ot=ye=>{const Me=be.current;if(!G||c<2||!Me||ye.pointerType==="mouse"&&ye.button!==0)return;xe.current=null,Le.current=0,oe.current&&N(!1);let De=0;const Ee=_.current;if(M&&Ee){const Ce=K?Ee.offsetWidth:Ee.offsetHeight;if(Ce>0){const We=Bv(Ee,K);let je=ge.current;x&&(je===0||je===c+1)?(je=re+1,ge.current=je,Q(!0),Re(je),De=0):De=We+je*Ce,ke(De)}}Me.setPointerCapture(ye.pointerId),te.current=ye.pointerId,ce.current={pointerId:ye.pointerId,startClientX:ye.clientX,startClientY:ye.clientY,axes:Vv(Me,`${l}-axis-probe`),size:K?Me.offsetWidth:Me.offsetHeight,isActive:!1,baseOffset:De,offset:De,lastTime:ye.timeStamp,velocity:0}},tt=ye=>{const Me=ce.current;if(!Me||Me.pointerId!==ye.pointerId)return;if(ye.pointerType==="mouse"&&ye.buttons===0){Ae(ye);return}const De=ye.clientX-Me.startClientX,Ee=ye.clientY-Me.startClientY,Ce=Me.axes?Gv(Me.axes,De,Ee):{x:De,y:Ee},We=K?Ce.x:Ce.y,je=K?Ce.y:Ce.x,nt=Me.baseOffset+We;if(!Me.isActive){if(Math.max(Math.abs(We),Math.abs(je))<Wv)return;if(Math.abs(je)>Math.abs(We)){const Qe=be.current;Qe!=null&&Qe.hasPointerCapture(Me.pointerId)&&Qe.releasePointerCapture(Me.pointerId),ce.current=null,te.current=null,M&&ke(0);return}Me.isActive=!0,Ne(!0)}const pt=ye.timeStamp-Me.lastTime;pt>0&&(Me.velocity=(nt-Me.offset)/pt,Me.lastTime=ye.timeStamp),Me.offset=nt,M&&ke(nt)},at=ye=>{Ae(ye)},yt=K?`translate3d(calc(${-fe*100}% + ${$e}px), 0, 0)`:`translate3d(0, calc(${-fe*100}% + ${$e}px), 0)`,Ve=x?[d[c-1],...d,d[0]]:d;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:qv(l,n)}}),r.jsxs("div",{className:ut(`${l}-wrapper`,{[`${l}-transition-reveal`]:L==="reveal",[`${l}-transition-reveal-vertical`]:L==="reveal"&&!K}),onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:[r.jsxs("div",{className:`${l}-slider-inner`,style:{backgroundColor:"transparent"},children:[r.jsx("div",{ref:be,className:ut(`${l}-track`,{[`${l}-track-draggable`]:G,[`${l}-track-draggable-vertical`]:G&&!K}),onPointerDown:ot,onPointerMove:tt,onPointerUp:at,onPointerCancel:at,onLostPointerCapture:ye=>{te.current===ye.pointerId&&Ae(ye)},children:r.jsx("div",{ref:_,className:ut(`${l}-list`,{[`${l}-list-slide`]:M,[`${l}-list-slide-vertical`]:M&&!K,[`${l}-list-fade`]:!M}),style:M?{transform:yt,transition:me||q?"none":`transform ${Fi}ms ${Oc}`}:void 0,children:Ve.map((ye,Me)=>{const De=x?ao(Me-1,c):Me,Ce=x&&(Me===0||Me===c+1)?`clone-${Me===0?"start":"end"}`:`slide-${De}`;return r.jsx("div",{className:ut(`${l}-slide`,{[`${l}-is-active`]:!M&&De===re}),children:r.jsx("div",{className:`${l}-slider-item`,children:r.jsx("div",{className:`${l}-img-wrapper`,children:r.jsx("img",{className:ut(`${l}-slider-image`,{[`${l}-contain`]:ye.image.objectFit==="contain",[`${l}-cover`]:ye.image.objectFit==="cover"}),src:ye.image.url,alt:ye.image.name??"",draggable:!1})})})},Ce)})})}),ee&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:ut(`${l}-arrow`,{[`${l}-arrow-prev`]:K,[`${l}-arrow-prev-vertical`]:!K,[`${l}-hover-arrow`]:ie}),style:{color:C,"--arrow-hover-color":z,...pe},children:r.jsxs("button",{onClick:ye=>{ye.stopPropagation(),Ie(-1)},className:`${l}-arrow-inner`,style:{transform:`translate(${w.scalingValue(B,n)}, ${w.scalingValue(P*(K?1:-1),n)}) rotate(${K?"0deg":"90deg"})`},children:[Y&&r.jsx(rn,{url:Y,fill:C,hoverFill:z,className:ut(`${l}-arrow-img`,`${l}-mirror`),style:pe}),!Y&&r.jsx(vs,{color:C,className:ut(`${l}-arrow-icon`,`${l}-arrow-img`,`${l}-mirror`)})]})}),r.jsx("div",{className:ut(`${l}-arrow`,{[`${l}-arrow-next`]:K,[`${l}-arrow-next-vertical`]:!K,[`${l}-hover-arrow`]:ie}),style:{color:C,"--arrow-hover-color":z,...pe},children:r.jsxs("button",{className:`${l}-arrow-inner`,onClick:ye=>{ye.stopPropagation(),Ie(1)},style:{transform:`translate(${w.scalingValue(B*(K?-1:1),n)}, ${w.scalingValue(P,n)}) rotate(${K?"0deg":"90deg"})`},children:[Y&&r.jsx(rn,{url:Y,fill:C,hoverFill:z,className:`${l}-arrow-img`,style:pe}),!Y&&r.jsx(vs,{color:C,className:ut(`${l}-arrow-icon`,`${l}-arrow-img`)})]})})]}),V&&r.jsx("div",{className:`${l}-click-overlay`,onClick:()=>Ie(1)}),H&&r.jsx("div",{className:ut(`${l}-pagination`,{[`${l}-pagination-inside-bottom`]:K,[`${l}-pagination-inside-left`]:!K}),style:K?{bottom:R(y.inset)}:{left:R(y.inset)},children:r.jsx("div",{className:ut(`${l}-pagination-inner`,{[`${l}-pagination-vertical`]:!K,[`${l}-animate-dots`]:ue}),style:{backgroundColor:I,gap:R(y.gapInactive-y.activeDot+y.dot),...K?{height:R(y.activeDot+y.paddingY*2),paddingTop:R(y.paddingY),paddingBottom:R(y.paddingY),paddingLeft:R(y.paddingActive),paddingRight:R(y.paddingActive)}:{width:R(y.activeDot+y.paddingY*2),paddingLeft:R(y.paddingY),paddingRight:R(y.paddingY),paddingTop:R(y.paddingActive),paddingBottom:R(y.paddingActive)},borderRadius:R(y.borderRadius),transform:`translate(${w.scalingValue(io.offset.x,n)}, ${w.scalingValue(io.offset.y,n)})`},children:d.map((ye,Me)=>{const De=Me===re,Ee=De?y.activeDot:y.dot;return r.jsx("button",{onClick:()=>le(Me),className:`${l}-pagination-item`,style:{width:R(y.activeDot)},children:r.jsx("div",{className:`${l}-dot`,style:{backgroundColor:De?W:v,width:R(Ee)}})},Me)})},`${g}-${S}`)})]}),r.jsxs("div",{className:`${l}-caption-block`,children:[r.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:w.scalingValue(A,n)}}),r.jsx("div",{className:`${l}-caption-text-wrapper`,children:d.map((ye,Me)=>r.jsx("div",{className:ut(`${l}-caption-text`,{[`${l}-with-pointer-events`]:Me===re&&n,[`${l}-active`]:Me===re}),style:{...s,width:"max-content",transitionDuration:`${Math.round(Fi/2)}ms`},children:r.jsx("div",{className:`${l}-caption-text-inner`,style:{"--link-color":Z,"--link-hover-color":Z,position:"relative",top:w.scalingValue(sa.offset.y,n),left:w.scalingValue(sa.offset.x,n)},children:r.jsx(yi,{content:ye.imageCaption})})},Me))})]})]})]})}function vs({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 Kv=`import React, { useCallback, useEffect, useRef, useState } from 'react';
18370
+ `}function l0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:s}=S.useScopedStyles(),l=n0(e,n),d=t??[],c=d.length,u=(e==null?void 0:e.trigger)??wl,p=u.sizeType??"drag",v=u.value??wl.value,x=(e==null?void 0:e.direction)??"horizontal",I=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",g=(e==null?void 0:e.navSize)??"m",y=e0[g],E=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,L=ye=>S.scalingValue(ye*E,n),C=(e==null?void 0:e.show)??"always",K=(e==null?void 0:e.controls)??null,A=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,B=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,P=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,T=(e==null?void 0:e.controlsColor)??xl.color,z=(e==null?void 0:e.controlsHoverColor)??xl.hover,w=(e==null?void 0:e.navColor)??io.colors.inactive,W=(e==null?void 0:e.navPaginationColor)??io.colors.pagination,R=(e==null?void 0:e.navBackgroundColor)??io.colors.background,J=(e==null?void 0:e.linkColor)??ca.linkColor,F=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,U=x==="horizontal",V=p==="click",G=p==="drag",oe=p==="auto"&&(!n||!!i),$=!n,M=I==="slide",N=h==="classic",Q=C!=="never",te=C==="on hover",k=S.scalingValue(A,n),le={width:k,height:k,maxWidth:k},f=M&&c>1,[ne,Z]=a.useState(0),[fe,Ie]=a.useState(f?1:0),[ue,se]=a.useState(!1),[q,ee]=a.useState(!1),[ce,ke]=a.useState(!1),[$e,Pe]=a.useState(0),[pe,he]=a.useState(!1),[be,j]=a.useState(!1),re=a.useRef(!1),ge=a.useRef(fe);ge.current=fe;const xe=a.useRef(null),Le=a.useRef(0),we=a.useRef(null),_=a.useRef(null),me=a.useRef(null),ie=a.useRef(null),H=a.useCallback(ye=>{re.current=ye,se(ye)},[]),X=a.useCallback(ye=>{if(c<2||ye===0)return;const Me=ye>0?1:-1,je=Math.abs(ye);if(he(!0),H(!0),!M){Z(pt=>ao(pt+ye,c));return}let Ee=ge.current;const Ce=f&&(Ee===0||Ee===c+1),_e=Ce?ne+1:null;Ce&&(Ee=ne+1);let De=je;for(;De>0;){const pt=i0(Ee,Me,c,f);if(Ee=pt.position,De-=1,pt.hitBoundary){Le.current=De*Me;break}}const nt=je-De;if(nt>0&&Z(pt=>ao(pt+nt*Me,c)),ge.current=Ee,_e!==null){if(ge.current=_e,Ee===_e){ee(!0),Ie(Ee);return}xe.current=Ee,ee(!0),Ie(_e);return}ee(!1),Ie(Ee)},[ne,c,f,M,H]),Re=a.useCallback(ye=>{X(ye)},[X]),de=a.useCallback(ye=>{if(c<2)return;const Me=ao(ye,c);if(!(Me===ne&&!re.current)&&(he(!0),H(!0),Z(Me),M)){const je=Me+(f?1:0);xe.current=null,Le.current=0,ge.current=je,ee(!1),Ie(je)}},[ne,c,f,M,H]);a.useEffect(()=>{if(!ue)return;const ye=window.setTimeout(()=>{if(f&&(fe===0||fe===c+1)){xe.current=null,ee(!0),Ie(ne+1);return}H(!1)},Fi);return()=>window.clearTimeout(ye)},[ne,c,f,ue,H,fe]),a.useEffect(()=>{if(!q)return;let ye=0;const Me=requestAnimationFrame(()=>{ye=requestAnimationFrame(()=>{const je=xe.current;xe.current=null;const Ee=Le.current;if(Le.current=0,ee(!1),je!==null){ge.current=je,Ie(je);return}if(Ee!==0){X(Ee);return}H(!1)})});return()=>{cancelAnimationFrame(Me),cancelAnimationFrame(ye)}},[X,H,q]);const D=`${f}:${c}`,ze=a.useRef(D);a.useEffect(()=>{if(ze.current===D)return;ze.current=D;const ye=c>0?Math.min(ne,c-1):0;me.current=null,ie.current=null,ke(!1),Pe(0),Z(ye),ee(!0),Ie(ye+(f?1:0))},[ne,c,f,D]),a.useEffect(()=>{if(!pe)return;const ye=window.setTimeout(()=>he(!1),Xv);return()=>window.clearTimeout(ye)},[pe,ne]),a.useEffect(()=>{if(!oe||c<2)return;const ye=Math.max(v,.1)*1e3,Me=window.setInterval(()=>{$&&be||Re(1)},ye);return()=>window.clearInterval(Me)},[v,c,Re,oe,be,$]);const Fe=a.useCallback(ye=>{const Me=me.current;if(!Me||Me.pointerId!==ye.pointerId)return;me.current=null,ie.current=null;const je=we.current;if(je!=null&&je.hasPointerCapture(ye.pointerId)&&je.releasePointerCapture(ye.pointerId),!Me.isActive){M&&Pe(0);return}const Ce=!(ye.timeStamp-Me.lastTime>Qv)&&Math.abs(Me.velocity)>Jv,_e=Me.size>0&&Math.abs(Me.offset-Me.baseOffset)>Me.size*Zv;if(ke(!1),!Ce&&!_e){Pe(0);return}const De=_e?Me.offset-Me.baseOffset:Me.velocity;let nt=1;_e&&Me.size>0&&(nt=Math.max(1,Math.round(Math.abs(De)/Me.size))),Pe(0),X(De<0?nt:-nt)},[X,M]);a.useEffect(()=>{const ye=Me=>{ie.current===null||Me.pointerId!==ie.current||Fe(Me)};return window.addEventListener("pointerup",ye),window.addEventListener("pointercancel",ye),()=>{window.removeEventListener("pointerup",ye),window.removeEventListener("pointercancel",ye)}},[Fe]);const ot=ye=>{const Me=we.current;if(!G||c<2||!Me||ye.pointerType==="mouse"&&ye.button!==0)return;xe.current=null,Le.current=0,re.current&&H(!1);let je=0;const Ee=_.current;if(M&&Ee){const Ce=U?Ee.offsetWidth:Ee.offsetHeight;if(Ce>0){const _e=o0(Ee,U);let De=ge.current;f&&(De===0||De===c+1)?(De=ne+1,ge.current=De,ee(!0),Ie(De),je=0):je=_e+De*Ce,Pe(je)}}Me.setPointerCapture(ye.pointerId),ie.current=ye.pointerId,me.current={pointerId:ye.pointerId,startClientX:ye.clientX,startClientY:ye.clientY,axes:r0(Me,`${s}-axis-probe`),size:U?Me.offsetWidth:Me.offsetHeight,isActive:!1,baseOffset:je,offset:je,lastTime:ye.timeStamp,velocity:0}},tt=ye=>{const Me=me.current;if(!Me||Me.pointerId!==ye.pointerId)return;if(ye.pointerType==="mouse"&&ye.buttons===0){Fe(ye);return}const je=ye.clientX-Me.startClientX,Ee=ye.clientY-Me.startClientY,Ce=Me.axes?a0(Me.axes,je,Ee):{x:je,y:Ee},_e=U?Ce.x:Ce.y,De=U?Ce.y:Ce.x,nt=Me.baseOffset+_e;if(!Me.isActive){if(Math.max(Math.abs(_e),Math.abs(De))<Yv)return;if(Math.abs(De)>Math.abs(_e)){const Qe=we.current;Qe!=null&&Qe.hasPointerCapture(Me.pointerId)&&Qe.releasePointerCapture(Me.pointerId),me.current=null,ie.current=null,M&&Pe(0);return}Me.isActive=!0,ke(!0)}const pt=ye.timeStamp-Me.lastTime;pt>0&&(Me.velocity=(nt-Me.offset)/pt,Me.lastTime=ye.timeStamp),Me.offset=nt,M&&Pe(nt)},at=ye=>{Fe(ye)},yt=U?`translate3d(calc(${-fe*100}% + ${$e}px), 0, 0)`:`translate3d(0, calc(${-fe*100}% + ${$e}px), 0)`,Ve=f?[d[c-1],...d,d[0]]:d;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s0(s,n)}}),r.jsxs("div",{className:ut(`${s}-wrapper`,{[`${s}-transition-reveal`]:I==="reveal",[`${s}-transition-reveal-vertical`]:I==="reveal"&&!U}),onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),children:[r.jsxs("div",{className:`${s}-slider-inner`,style:{backgroundColor:"transparent"},children:[r.jsx("div",{ref:we,className:ut(`${s}-track`,{[`${s}-track-draggable`]:G,[`${s}-track-draggable-vertical`]:G&&!U}),onPointerDown:ot,onPointerMove:tt,onPointerUp:at,onPointerCancel:at,onLostPointerCapture:ye=>{ie.current===ye.pointerId&&Fe(ye)},children:r.jsx("div",{ref:_,className:ut(`${s}-list`,{[`${s}-list-slide`]:M,[`${s}-list-slide-vertical`]:M&&!U,[`${s}-list-fade`]:!M}),style:M?{transform:yt,transition:ce||q?"none":`transform ${Fi}ms ${qc}`}:void 0,children:Ve.map((ye,Me)=>{const je=f?ao(Me-1,c):Me,Ce=f&&(Me===0||Me===c+1)?`clone-${Me===0?"start":"end"}`:`slide-${je}`;return r.jsx("div",{className:ut(`${s}-slide`,{[`${s}-is-active`]:!M&&je===ne}),children:r.jsx("div",{className:`${s}-slider-item`,children:r.jsx("div",{className:`${s}-img-wrapper`,children:r.jsx("img",{className:ut(`${s}-slider-image`,{[`${s}-contain`]:ye.image.objectFit==="contain",[`${s}-cover`]:ye.image.objectFit==="cover"}),src:ye.image.url,alt:ye.image.name??"",draggable:!1})})})},Ce)})})}),Q&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:ut(`${s}-arrow`,{[`${s}-arrow-prev`]:U,[`${s}-arrow-prev-vertical`]:!U,[`${s}-hover-arrow`]:te}),style:{color:T,"--arrow-hover-color":z,...le},children:r.jsxs("button",{onClick:ye=>{ye.stopPropagation(),Re(-1)},className:`${s}-arrow-inner`,style:{transform:`translate(${S.scalingValue(B,n)}, ${S.scalingValue(P*(U?1:-1),n)}) rotate(${U?"0deg":"90deg"})`},children:[K&&r.jsx(rn,{url:K,fill:T,hoverFill:z,className:ut(`${s}-arrow-img`,`${s}-mirror`),style:le}),!K&&r.jsx(Sl,{color:T,className:ut(`${s}-arrow-icon`,`${s}-arrow-img`,`${s}-mirror`)})]})}),r.jsx("div",{className:ut(`${s}-arrow`,{[`${s}-arrow-next`]:U,[`${s}-arrow-next-vertical`]:!U,[`${s}-hover-arrow`]:te}),style:{color:T,"--arrow-hover-color":z,...le},children:r.jsxs("button",{className:`${s}-arrow-inner`,onClick:ye=>{ye.stopPropagation(),Re(1)},style:{transform:`translate(${S.scalingValue(B*(U?-1:1),n)}, ${S.scalingValue(P,n)}) rotate(${U?"0deg":"90deg"})`},children:[K&&r.jsx(rn,{url:K,fill:T,hoverFill:z,className:`${s}-arrow-img`,style:le}),!K&&r.jsx(Sl,{color:T,className:ut(`${s}-arrow-icon`,`${s}-arrow-img`)})]})})]}),V&&r.jsx("div",{className:`${s}-click-overlay`,onClick:()=>Re(1)}),N&&r.jsx("div",{className:ut(`${s}-pagination`,{[`${s}-pagination-inside-bottom`]:U,[`${s}-pagination-inside-left`]:!U}),style:U?{bottom:L(y.inset)}:{left:L(y.inset)},children:r.jsx("div",{className:ut(`${s}-pagination-inner`,{[`${s}-pagination-vertical`]:!U,[`${s}-animate-dots`]:pe}),style:{backgroundColor:R,gap:L(y.gapInactive-y.activeDot+y.dot),...U?{height:L(y.activeDot+y.paddingY*2),paddingTop:L(y.paddingY),paddingBottom:L(y.paddingY),paddingLeft:L(y.paddingActive),paddingRight:L(y.paddingActive)}:{width:L(y.activeDot+y.paddingY*2),paddingLeft:L(y.paddingY),paddingRight:L(y.paddingY),paddingTop:L(y.paddingActive),paddingBottom:L(y.paddingActive)},borderRadius:L(y.borderRadius),transform:`translate(${S.scalingValue(io.offset.x,n)}, ${S.scalingValue(io.offset.y,n)})`},children:d.map((ye,Me)=>{const je=Me===ne,Ee=je?y.activeDot:y.dot;return r.jsx("button",{onClick:()=>de(Me),className:`${s}-pagination-item`,style:{width:L(y.activeDot)},children:r.jsx("div",{className:`${s}-dot`,style:{backgroundColor:je?W:w,width:L(Ee)}})},Me)})},`${g}-${x}`)})]}),r.jsxs("div",{className:`${s}-caption-block`,children:[r.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:S.scalingValue(F,n)}}),r.jsx("div",{className:`${s}-caption-text-wrapper`,children:d.map((ye,Me)=>r.jsx("div",{className:ut(`${s}-caption-text`,{[`${s}-with-pointer-events`]:Me===ne&&n,[`${s}-active`]:Me===ne}),style:{...l,width:"max-content",transitionDuration:`${Math.round(Fi/2)}ms`},children:r.jsx("div",{className:`${s}-caption-text-inner`,style:{"--link-color":J,"--link-hover-color":J,position:"relative",top:S.scalingValue(ca.offset.y,n),left:S.scalingValue(ca.offset.x,n)},children:r.jsx(yi,{content:ye.imageCaption})})},Me))})]})]})]})}function Sl({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 c0=`import React, { useCallback, useEffect, useRef, useState } from 'react';
18371
18371
  import cn from 'classnames';
18372
18372
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
18373
18373
  import { scalingValue } from '../utils/scalingValue';
@@ -19548,14 +19548,14 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
19548
19548
  </svg>
19549
19549
  );
19550
19550
  }
19551
- `,Xv={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"]}}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}}},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,captionMarginTop:10/1440,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,captionMarginTop:10/768,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,captionMarginTop:10/375,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","captionMarginTop","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"}]}]}]}},Yv={element:Uv,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:Xv,sourceCode:Kv,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},Mi=300/1440,Zv=8/1440,di=.004;function Jv(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function xs(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function bs(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:w.scalingValue((o-t)/2,i)}}function Qv(e){return`
19551
+ `,d0={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"]}}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}}},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,captionMarginTop:10/1440,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,captionMarginTop:10/768,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,captionMarginTop:10/375,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","captionMarginTop","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"}]}]}]}},u0={element:l0,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:d0,sourceCode:c0,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},Mi=300/1440,p0=8/1440,di=.004;function m0(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function $l(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Cl(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:S.scalingValue((o-t)/2,i)}}function g0(e){return`
19552
19552
  .${e}-wrapper {
19553
19553
  box-sizing: border-box;
19554
19554
  display: flex;
19555
19555
  flex-direction: column;
19556
19556
  position: relative;
19557
19557
  width: 100%;
19558
- min-height: ${Jv(48)};
19558
+ min-height: ${m0(48)};
19559
19559
  }
19560
19560
  .${e}-single-title-layer {
19561
19561
  position: absolute;
@@ -19765,7 +19765,7 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
19765
19765
  width: var(--cntrl-article-width, 100vw) !important;
19766
19766
  height: var(--cntrl-viewport-height, 100vh) !important;
19767
19767
  }
19768
- `}const e0="rgba(28,31,34,0.9)",In=500,ci="cubic-bezier(0.22, 1, 0.36, 1)",t0=72,n0=50,i0={titleColor:"title-color",lightboxCounterColor:"lightbox-counter-color"},o0=[];function r0(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 a0(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function l0(e){const[t]=e.media;return t!=null&&t.url?t:null}function s0(e){if(!Array.isArray(e)||e.length===0)return[];if(r0(e)){const t=[];for(const n of e){const i=a0(n);if(!i)continue;const o=l0(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 Ta(e){return e.type==="video"}function c0(e){e.pause(),e.removeAttribute("src"),e.load()}function Jo(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function d0(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const u0=1140/1440;function p0(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function m0(e){const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`}function g0(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function h0({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:l,onMouseMove:s,onTransitionEnd:d}){return a.useEffect(()=>{const c=n.current;if(c)return()=>{c0(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:l,onMouseMove:s,onTransitionEnd:d,style:i})}function f0({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:l,onPrev:s,onNext:d,counterClassName:c,counterStyle:u,backgroundColor:p}){const b=i==="cover",S=a.useRef(null),L=a.useRef(null),h=a.useRef(null),g=a.useRef(0),y=a.useRef(0),E=a.useRef("none"),R=a.useRef(!1),T=a.useRef(!1),Y=a.useRef(!1),k=a.useRef(null),[B,P]=a.useState(null),[C,z]=a.useState("opening"),[v,W]=a.useState(0),[I,Z]=a.useState(0),[A,K]=a.useState(!1),[V,G]=a.useState(!1),[ne,$]=a.useState(!1),M=a.useRef(n),H=t[n],ee=H?Ta(H):!1,ie=I!==0||A,F=a.useCallback(ue=>{Y.current=ue,K(ue)},[]),pe=a.useCallback(()=>{k.current!==null&&(window.clearTimeout(k.current),k.current=null)},[]),x=a.useCallback(()=>{pe(),k.current=window.setTimeout(()=>{pe(),F(!1)},In+32)},[pe,F]),re=a.useCallback(()=>{const ue=S.current,he=L.current;if(!ue)return;const Se=ue.getBoundingClientRect(),D=Se.width,oe=Se.height;if(!D||!oe)return;if(i==="cover"){P({width:D,height:oe,left:Se.left,top:Se.top});return}if(!he){P(Jo(ue));return}const{width:ge,height:xe}=d0(he);if(!ge||!xe){P(Jo(ue));return}const Le=ge/xe,be=D/oe;if(Le>be){const _=D/Le;P({width:D,height:_,left:Se.left,top:Se.top+(oe-_)/2})}else{const _=oe*Le;P({width:_,height:oe,left:Se.left+(D-_)/2,top:Se.top})}},[i]);a.useEffect(()=>{re();const ue=S.current;if(!ue)return;const he=new ResizeObserver(()=>re());return he.observe(ue),()=>he.disconnect()},[re,n]),a.useEffect(()=>{C==="opening"&&B&&z("open")},[C,B]),a.useEffect(()=>{if(C!=="closing")return;const ue=setTimeout(()=>l(),In);return()=>clearTimeout(ue)},[C,l]),a.useEffect(()=>()=>{pe()},[pe]),a.useLayoutEffect(()=>{if(M.current===n)return;pe(),W(0),Z(0),F(!1),$(!1),G(!1),g.current=0,y.current=0,E.current="none",R.current=!1,h.current=null,T.current=!1;const ue=S.current;ue&&P(Jo(ue)),M.current=n},[n,F,pe]),a.useEffect(()=>{if(C!=="open")return;let ue=null;const he=()=>{ue&&(document.removeEventListener("click",ue,!0),ue=null)},Se=()=>{he(),ue=be=>{be.stopPropagation(),be.preventDefault(),he()},document.addEventListener("click",ue,!0)},D=be=>{pe(),Y.current=!1,K(!1),Z(0),G(!1),R.current=!1,y.current=0,E.current="none";const _=S.current;_&&P(Jo(_)),be<0?d():s()},oe=be=>{if(Math.abs(be)>n0&&t.length>1){D(be);return}F(!0),Z(0),x()},ge=be=>{if(be.touches.length!==1||Y.current)return;const _=be.touches[0];T.current=!0,h.current={x:_.clientX,y:_.clientY},E.current="none",y.current=0,R.current=!1},xe=be=>{if(!h.current||be.touches.length!==1||Y.current)return;const _=be.touches[0],ce=_.clientX-h.current.x,te=_.clientY-h.current.y;if(E.current==="none"){if(Math.abs(ce)<10&&Math.abs(te)<10)return;if(Math.abs(ce)>Math.abs(te)){if(t.length<=1)return;E.current="horizontal"}else if(te>0)E.current="vertical";else return}if(E.current==="horizontal"){R.current=!0,G(!0),y.current=ce,Z(ce),be.preventDefault();return}E.current==="vertical"&&(R.current=!0,G(!0),g.current=te,W(te),be.preventDefault())},Le=()=>{if(!h.current)return;const be=E.current,_=R.current;if(_&&be==="horizontal")oe(y.current),Se();else if(_&&be==="vertical")if(g.current>t0){const te=window.innerHeight;g.current=te,$(!0),W(te),z("closing")}else g.current=0,W(0),Se();else be==="horizontal"&&Math.abs(y.current)>0&&(oe(y.current),Se());h.current=null,E.current="none",y.current=0,R.current=!1,G(!1)};return document.addEventListener("touchstart",ge,{passive:!0}),document.addEventListener("touchmove",xe,{passive:!1}),document.addEventListener("touchend",Le),document.addEventListener("touchcancel",Le),()=>{document.removeEventListener("touchstart",ge),document.removeEventListener("touchmove",xe),document.removeEventListener("touchend",Le),document.removeEventListener("touchcancel",Le),he()}},[C,t.length,d,s,F,x,pe]),a.useEffect(()=>{const ue=he=>{he.key==="Escape"&&(he.preventDefault(),he.stopPropagation(),C!=="closing"&&z("closing"))};return window.addEventListener("keydown",ue,!0),()=>window.removeEventListener("keydown",ue,!0)},[C]);const J=()=>{C!=="closing"&&z("closing")},fe=C==="open",Re=C==="closing",de=v>0?Math.max(0,1-v/500):1,se=v>0?Math.max(.35,1-v/500):1,q=ue=>{if(ue.stopPropagation(),T.current){T.current=!1;return}if(t.length<=1)return;const he=ue.currentTarget.getBoundingClientRect(),Se=ue.clientY-he.top,D=Math.min(52,he.height*.2);if(!(Se>he.height-D)){if(ue.clientX-he.left<he.width/2){s();return}d()}},Q=ue=>{if(t.length<=1)return;const he=ue.currentTarget.getBoundingClientRect(),Se=ue.clientX-he.left,D=ue.clientY-he.top,oe=Math.min(52,he.height*.2);if(D>he.height-oe){ue.currentTarget.style.cursor="default";return}ue.currentTarget.style.cursor=Se<he.width/2?"w-resize":"e-resize"},me=a.useCallback(ue=>{ue.propertyName!=="transform"||!Y.current||(pe(),F(!1))},[pe,F]),Ne=ie?`translateX(${I}px)`:v>0?`translateY(${v}px)`:void 0,$e={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:Ne,opacity:v>0?se:C==="opening"||Re?0:1,transition:V&&!A?"none":A?`transform ${In}ms ${ci}`:ne?`transform ${In}ms ${ci}, opacity ${In}ms ${ci}`:C==="opening"||Re?`opacity ${In}ms ${ci}`:"none",pointerEvents:ee&&fe&&!ie?"auto":"none",touchAction:ee&&fe?"none":void 0,zIndex:9998},ke=B?{position:"fixed",top:B.top,height:B.height,width:B.width/2,zIndex:9999}:null;return r.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:C==="open"?"none":void 0},onClick:J,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:fe?de:0,transition:V?"none":`opacity ${In}ms ${ci}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:b?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:S,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:fe?1:0,transition:`opacity ${In}ms ${ci}`,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:S,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:fe?1:0,transition:`opacity ${In}ms ${ci}`},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),B&&H&&(ee?r.jsx(h0,{src:H.url,phase:C,mediaRef:L,mediaStyle:$e,onLoadedMetadata:re,onClick:q,onMouseMove:Q,onTransitionEnd:me},`${n}-${H.url}`):r.jsx("img",{ref:L,src:H.url,alt:H.name,onLoad:re,onTransitionEnd:me,style:$e},`${n}-${H.url}`)),fe&&ke&&t.length>1&&!ee&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...ke,left:B.left,cursor:"w-resize",pointerEvents:ie?"none":"auto"},onClick:ue=>{if(T.current){T.current=!1;return}ue.stopPropagation(),s()}}),r.jsx("div",{style:{...ke,left:B.left+B.width/2,cursor:"e-resize",pointerEvents:ie?"none":"auto"},onClick:ue=>{if(T.current){T.current=!1;return}ue.stopPropagation(),d()}})]})]})}function ws({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:l,isEditor:s,galleryPaddingBetween:d=0,showPaddingAfter:c=!1,showControls:u=!1,onMediaClick:p}){const b=`${e}-gallery-${Ta(t)?"video":"image"}`,S=l.display==="cover",L=m0(l),h=C=>w.scalingValue(C,s??!1),g=n??Mi,y=o?{width:"100%",maxWidth:"100%"}:{width:h(g),maxWidth:"100%"},E=i?{borderRadius:h(i)}:{},R={...y,...S?{aspectRatio:L,height:"auto",overflow:"hidden"}:{},...E},T={...S?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":h(g)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...S?{}:E},k={className:b,style:T,onClick:p?C=>{C.stopPropagation(),p()}:void 0},B=Math.max(d,di),P=Ta(t)?r.jsx("video",{...k,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):r.jsx("img",{...k,src:t.url,alt:t.name??""});return r.jsxs("div",{className:`${e}-gallery-item`,children:[S?r.jsx("div",{style:R,children:P}):P,c&&d>0&&r.jsx("div",{className:`${e}-padding-handle`,style:{height:h(d)},"aria-hidden":"true"}),u&&c&&r.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:h(B)}})]})}function y0({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:l,galleryPaddingLeftWidth:s,galleryPaddingMaxFraction:d,showControls:c,scaled:u,children:p}){const b=t==="a"?i:t==="c"?o:0,S=b>0||c;return r.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&S&&r.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(b)},"aria-hidden":"true"}),c&&t==="c"&&r.jsx("div",{"data-controls":"galleryPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,left:0,width:u(s),height:"100%"}}),r.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&S&&r.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(b)},"aria-hidden":"true"}),c&&t==="a"&&r.jsx("div",{"data-controls":"galleryPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,right:0,width:u(l),height:"100%"}})]})}function v0(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Ss({P:e,scaled:t,height:n,paired:i}){return r.jsx("div",{"data-controls":"titleTopPadding",...i?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:t(n)}})}function $s({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:l,paired:s,anchorStyle:d}){return r.jsx("div",{"data-controls":t,...s?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...l==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...l==="left"?{left:0}:{right:0},width:n(i),height:"100%",...d}})}function ca({P:e,title:t,position:n,titleRef:i,titleClassName:o,titleContainerStyle:l,titleTextBoxStyle:s,titleStyle:d,showTextBoxOutline:c=!1,topPaddingControl:u}){const p=a.useRef(null),[b,S]=a.useState(0),L=t??"",h=n==="left"||n==="center"||n==="right";return a.useLayoutEffect(()=>{if(!h)return;const g=p.current;if(!g||typeof ResizeObserver>"u")return;const y=()=>S(g.offsetHeight);y();const E=new ResizeObserver(y);return E.observe(g),()=>E.disconnect()},[L,h]),r.jsx("div",{ref:g=>{p.current=g,i(g)},className:[o,`${e}-title-position-${n}`].join(" "),style:{...h?{[`--${e}-title-height`]:`${b}px`}:{},...l},children:r.jsxs("div",{className:`${e}-title-text-stack`,style:s,children:[u,r.jsx("div",{className:c?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:r.jsx("span",{className:`${e}-title-text`,style:d,children:L})})]})})}const Cs=45;function Ts(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const l=parseFloat(o);if(!Number.isNaN(l))return l}i=i.parentElement}return n}function x0(e){const t=Ts(e,"--cntrl-viewport-height",window.innerHeight),n=Ts(e,"--cntrl-article-top",0);return{top:n,centerY:n+t/2}}function b0(e,t,n){const{top:i,centerY:o}=x0(n);if(t==="top"){const s=n&&parseFloat(getComputedStyle(n).top)||i;return Math.abs(e.top-s)}const l=e.top+e.height/2;return Math.abs(l-o)}function w0(e,t,n){const i=Array.from({length:t},(s,d)=>{const c=e.current[d];if(!c)return 0;const u=c.getBoundingClientRect(),p=b0(u,n,c);return Math.exp(-(p*p)/(2*Cs*Cs))});let o=0,l=-1;return i.forEach((s,d)=>{s>l&&(l=s,o=d)}),{opacities:i,dominantIndex:o}}function S0(e,t,n){const i=a.useRef([]),[{opacities:o,dominantIndex:l},s]=a.useState(()=>({opacities:Array.from({length:e},(c,u)=>u===0?1:0),dominantIndex:0}));return a.useLayoutEffect(()=>{if(!t||e===0){s({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let c=0;const u=()=>{s(w0(i,e,n))},p=()=>{c||(c=window.requestAnimationFrame(()=>{c=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{c&&window.cancelAnimationFrame(c),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:c=>u=>{i.current[c]=u},opacities:o,dominantIndex:l}}function $0(e,t){const[n,i]=a.useState(e),o=a.useRef(e);return a.useEffect(()=>{if(!t){o.current=e,i(e);return}const l=Array.from(o.current),s=Array.from(e),d=Math.max(l.length,s.length);if(d===0||o.current===e)return;let c=0;const u=window.setInterval(()=>{c+=1;const p=[...s.slice(0,c),...l.slice(c)].join("");o.current=p,i(p),c>=d&&window.clearInterval(u)},35);return()=>window.clearInterval(u)},[t,e]),n}function C0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:l}){var ft;const{prefix:s}=w.useScopedStyles(),d=a.useMemo(()=>Qv(s),[s]),c=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",b=(e==null?void 0:e.imgWidth)??Mi,S=(e==null?void 0:e.titleWidth)??u0,L=p0(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??Zv,g=(e==null?void 0:e.position)??"center",y=(e==null?void 0:e.titleTopPadding)??0,E=(e==null?void 0:e.titleLeftPadding)??0,R=(e==null?void 0:e.titleRightPadding)??0,T=v0(e==null?void 0:e.transition),Y=(e==null?void 0:e.lightbox)??"on",k=p==="b",B=T==="fade"||T==="retype",{setTitleRef:P,dominantIndex:C}=S0(c.length,B,g),z=((ft=c[C])==null?void 0:ft.title)??"",v=$0(z,T==="retype"),W=T==="fade"||T==="retype",I=T==="retype"?v:z,Z=k?void 0:{width:w.scalingValue(b,n??!1)},A=Y==="on"&&(!n||i||o),K=o??!1,V=(e==null?void 0:e.galleryPaddingRight)??0,G=(e==null?void 0:e.galleryPaddingLeft)??0,ne=(e==null?void 0:e.galleryPaddingBetween)??0,$=mt=>w.scalingValue(mt,n??!1),H={width:$(S)},ee=p==="a"?V:G,ie=k?{width:"100%"}:{width:`calc(100% - ${$(b)} - ${$(ee)})`,...p==="c"?{marginLeft:"auto"}:{}},F=Math.max(V,di),pe=Math.max(G,di),x=Math.max(ne,di),re=Math.max(y,di),J=Math.max(E,di),fe=Math.max(R,di),Re=Math.max(0,(u??1)-(b??Mi)),de=p==="a"?Math.max(0,(u??1)-(b??Mi)-V):p==="c"?Math.max(0,(u??1)-(b??Mi)-G):p==="b"?u??1:1,se=K&&(p==="a"||p==="b"||p==="c")&&g==="top",q=K&&((p==="a"||p==="b")&&(g==="left"||g==="top")||p==="c"&&(g==="left"||g==="top")),Q=K&&((p==="c"||p==="b")&&g==="right"||p==="a"&&g==="right"),me=c.length>1,Ne=k?void 0:$((p==="c"?G:V)+(b??Mi)),$e=p==="c"&&Ne?{left:Ne}:void 0,ke=p==="a"&&Ne?{right:Ne}:void 0,ue=k?{left:0,width:"100%"}:p==="a"?{right:$(V),width:$(b)}:{left:$(G),width:$(b)},{titleColor:he,titleFontFamily:Se,titleFontSettings:D,titleFontSize:oe,titleLineHeight:ge,titleLetterSpacing:xe,titleWordSpacing:Le,titleAlign:be,titleTextAppearance:_,lightboxCounterColor:ce,lightboxCounterFontFamily:te,lightboxCounterFontSettings:N,lightboxCounterFontSize:U,lightboxCounterLineHeight:Ie,lightboxCounterLetterSpacing:le,lightboxCounterWordSpacing:j,lightboxCounterTextAppearance:ze}=e??{},Ae={fontSettings:{fontFamily:Se,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:oe??.01,lineHeight:ge,letterSpacing:xe??0,wordSpacing:Le??0,textAlign:be??"left",textAppearance:_,color:he??"#000000"},tt=on(Vt(Ae,n)),at=H,yt=bs(oe,ge,s,n),Ve=xs(oe,ge,`${s}-title`,`${s}-text-tight-leading`),ye={fontSettings:{fontFamily:te,fontWeight:(N==null?void 0:N.fontWeight)??400,fontStyle:(N==null?void 0:N.fontStyle)??"normal"},fontSize:U??.01,lineHeight:Ie,letterSpacing:le??0,wordSpacing:j??0,textAppearance:ze,color:ce??"#DEDDDD"},De={...on(Vt(ye,n)),...bs(U,Ie,s,n)},Ee=xs(U,Ie,`${s}-lightbox-counter`,`${s}-text-tight-leading`),Ce=w.buildColorVars(s,{titleColor:he??"#000000",lightboxCounterColor:ce??"#DEDDDD"},i0,o0),We=a.useRef(null),[je,nt]=a.useState(!1),[pt,Qe]=a.useState([]),[St,ct]=a.useState(0),Ue=a.useCallback((mt,gt)=>{A&&(Qe(mt),ct(gt),nt(!0))},[A]),Ke=a.useCallback(()=>{nt(!1)},[]),Oe=a.useMemo(()=>{const mt={...Ce},gt=We.current?getComputedStyle(We.current).getPropertyValue("--cntrl-article-width").trim():"";return gt&&(mt["--cntrl-article-width"]=gt),mt},[Ce,je]);return a.useEffect(()=>{if(!je||Y!=="on"||typeof document>"u")return;const mt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=mt}},[je,Y]),a.useEffect(()=>{!n||o||i||nt(!1)},[n,o,i]),a.useEffect(()=>{Y==="off"&&nt(!1)},[Y]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),r.jsx("div",{style:Ce,children:r.jsxs("div",{ref:We,className:`${s}-wrapper`,style:{width:w.scalingValue(u,n??!1),[`--${s}-title-top-padding`]:(p==="a"||p==="b"||p==="c")&&g==="top"?$(y):void 0,[`--${s}-title-left-padding`]:(p==="a"||p==="b")&&(g==="left"||g==="top")||p==="c"&&(g==="left"||g==="top")?$(E):void 0,[`--${s}-title-right-padding`]:(p==="c"||p==="b")&&g==="right"||p==="a"&&g==="right"?$(R):void 0},children:[W&&r.jsx("div",{className:`${s}-single-title-layer`,children:r.jsx(ca,{P:s,title:I,position:g,titleRef:()=>{},titleClassName:`${Ve} ${s}-single-title`,titleContainerStyle:{...yt,...ie},titleTextBoxStyle:at,titleStyle:tt,showTextBoxOutline:K,topPaddingControl:se?Ss({P:s,scaled:$,height:re,paired:!1}):void 0})}),c.map((mt,gt)=>{const At=s0(mt.gallery),Zt=gt<c.length-1,tn=At.filter(Tt=>Tt.lightboxMedia).map(Tt=>Tt.lightboxMedia),$t={P:s,position:g,titleRef:P(gt),titleClassName:Ve,titleContainerStyle:yt,titleTextBoxStyle:W?{maxWidth:"100%"}:at,titleStyle:tt,showTextBoxOutline:K&&!W,topPaddingControl:se&&!W?Ss({P:s,scaled:$,height:re,paired:me}):void 0};return r.jsxs("div",{"data-item-index":gt,className:`${s}-item ${s}-item-${p}`,style:{paddingBottom:Zt?$(ne):void 0},children:[q&&$s({P:s,controlKey:"titleLeftPadding",scaled:$,width:J,maxFraction:de,side:"left",paired:me,anchorStyle:$e}),Q&&$s({P:s,controlKey:"titleRightPadding",scaled:$,width:fe,maxFraction:de,side:"right",paired:me,anchorStyle:ke}),K&&Zt&&r.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-control-anchor`,style:{bottom:0,height:$(x),...ue}}),k?r.jsxs("div",{className:`${s}-gallery`,children:[r.jsx("div",{className:`${s}-gallery-media`,children:At.map(({displayMedia:Tt,lightboxMedia:Ht},Wt)=>{const Te=Ht?tn.findIndex(Ge=>Ge.url===Ht.url):-1;return r.jsx(ws,{P:s,media:Tt,imgWidth:b||void 0,cornerRadius:h||void 0,imageDisplay:L,isEditor:n,galleryPaddingBetween:ne,showPaddingAfter:Wt<At.length-1,showControls:K,onMediaClick:A&&Te>=0?()=>Ue(tn,Te):void 0},`${Tt.url}-${Wt}`)})}),r.jsx("div",{className:`${s}-title-layer`,children:r.jsx(ca,{...$t,title:W?"":mt.title})})]}):r.jsxs(r.Fragment,{children:[r.jsx(ca,{...$t,title:W?"":mt.title}),At.length>0&&r.jsx(y0,{P:s,layoutType:p,galleryWidthStyle:Z,galleryPaddingRight:V,galleryPaddingLeft:G,galleryPaddingRightWidth:F,galleryPaddingLeftWidth:pe,galleryPaddingMaxFraction:Re,showControls:K,scaled:$,children:At.map(({displayMedia:Tt,lightboxMedia:Ht},Wt)=>{const Te=Ht?tn.findIndex(Ge=>Ge.url===Ht.url):-1;return r.jsx(ws,{P:s,media:Tt,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:L,isEditor:n,galleryPaddingBetween:ne,showPaddingAfter:Wt<At.length-1,showControls:K,onMediaClick:A&&Te>=0?()=>Ue(tn,Te):void 0},`${Tt.url}-${Wt}`)})})]})]},gt)})]})}),je&&Y==="on"&&typeof document<"u"&&e&&(()=>{const mt=(l?document.getElementById(l):null)??document.body;return Yn.createPortal(r.jsx("div",{style:Oe,"data-selection":"none",children:r.jsx(f0,{prefix:s,items:pt,index:St,imageDisplay:g0(e.lightboxImageDisplay),isEditor:n,onClose:Ke,onPrev:()=>ct(gt=>(gt-1+pt.length)%pt.length),onNext:()=>ct(gt=>(gt+1)%pt.length),counterClassName:Ee,counterStyle:De,backgroundColor:e.backgroundColor??e0})}),mt)})()]})}const T0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
19768
+ `}const h0="rgba(28,31,34,0.9)",Rn=500,ci="cubic-bezier(0.22, 1, 0.36, 1)",f0=72,y0=50,v0={titleColor:"title-color",lightboxCounterColor:"lightbox-counter-color"},b0=[];function x0(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 w0(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function S0(e){const[t]=e.media;return t!=null&&t.url?t:null}function $0(e){if(!Array.isArray(e)||e.length===0)return[];if(x0(e)){const t=[];for(const n of e){const i=w0(n);if(!i)continue;const o=S0(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 Ia(e){return e.type==="video"}function C0(e){e.pause(),e.removeAttribute("src"),e.load()}function Jo(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function T0(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const L0=1140/1440;function I0(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function R0(e){const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`}function M0(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function E0({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()=>{C0(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 P0({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:s,onPrev:l,onNext:d,counterClassName:c,counterStyle:u,backgroundColor:p}){const v=i==="cover",x=a.useRef(null),I=a.useRef(null),h=a.useRef(null),g=a.useRef(0),y=a.useRef(0),E=a.useRef("none"),L=a.useRef(!1),C=a.useRef(!1),K=a.useRef(!1),A=a.useRef(null),[B,P]=a.useState(null),[T,z]=a.useState("opening"),[w,W]=a.useState(0),[R,J]=a.useState(0),[F,U]=a.useState(!1),[V,G]=a.useState(!1),[oe,$]=a.useState(!1),M=a.useRef(n),N=t[n],Q=N?Ia(N):!1,te=R!==0||F,k=a.useCallback(pe=>{K.current=pe,U(pe)},[]),le=a.useCallback(()=>{A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),f=a.useCallback(()=>{le(),A.current=window.setTimeout(()=>{le(),k(!1)},Rn+32)},[le,k]),ne=a.useCallback(()=>{const pe=x.current,he=I.current;if(!pe)return;const be=pe.getBoundingClientRect(),j=be.width,re=be.height;if(!j||!re)return;if(i==="cover"){P({width:j,height:re,left:be.left,top:be.top});return}if(!he){P(Jo(pe));return}const{width:ge,height:xe}=T0(he);if(!ge||!xe){P(Jo(pe));return}const Le=ge/xe,we=j/re;if(Le>we){const _=j/Le;P({width:j,height:_,left:be.left,top:be.top+(re-_)/2})}else{const _=re*Le;P({width:_,height:re,left:be.left+(j-_)/2,top:be.top})}},[i]);a.useEffect(()=>{ne();const pe=x.current;if(!pe)return;const he=new ResizeObserver(()=>ne());return he.observe(pe),()=>he.disconnect()},[ne,n]),a.useEffect(()=>{T==="opening"&&B&&z("open")},[T,B]),a.useEffect(()=>{if(T!=="closing")return;const pe=setTimeout(()=>s(),Rn);return()=>clearTimeout(pe)},[T,s]),a.useEffect(()=>()=>{le()},[le]),a.useLayoutEffect(()=>{if(M.current===n)return;le(),W(0),J(0),k(!1),$(!1),G(!1),g.current=0,y.current=0,E.current="none",L.current=!1,h.current=null,C.current=!1;const pe=x.current;pe&&P(Jo(pe)),M.current=n},[n,k,le]),a.useEffect(()=>{if(T!=="open")return;let pe=null;const he=()=>{pe&&(document.removeEventListener("click",pe,!0),pe=null)},be=()=>{he(),pe=we=>{we.stopPropagation(),we.preventDefault(),he()},document.addEventListener("click",pe,!0)},j=we=>{le(),K.current=!1,U(!1),J(0),G(!1),L.current=!1,y.current=0,E.current="none";const _=x.current;_&&P(Jo(_)),we<0?d():l()},re=we=>{if(Math.abs(we)>y0&&t.length>1){j(we);return}k(!0),J(0),f()},ge=we=>{if(we.touches.length!==1||K.current)return;const _=we.touches[0];C.current=!0,h.current={x:_.clientX,y:_.clientY},E.current="none",y.current=0,L.current=!1},xe=we=>{if(!h.current||we.touches.length!==1||K.current)return;const _=we.touches[0],me=_.clientX-h.current.x,ie=_.clientY-h.current.y;if(E.current==="none"){if(Math.abs(me)<10&&Math.abs(ie)<10)return;if(Math.abs(me)>Math.abs(ie)){if(t.length<=1)return;E.current="horizontal"}else if(ie>0)E.current="vertical";else return}if(E.current==="horizontal"){L.current=!0,G(!0),y.current=me,J(me),we.preventDefault();return}E.current==="vertical"&&(L.current=!0,G(!0),g.current=ie,W(ie),we.preventDefault())},Le=()=>{if(!h.current)return;const we=E.current,_=L.current;if(_&&we==="horizontal")re(y.current),be();else if(_&&we==="vertical")if(g.current>f0){const ie=window.innerHeight;g.current=ie,$(!0),W(ie),z("closing")}else g.current=0,W(0),be();else we==="horizontal"&&Math.abs(y.current)>0&&(re(y.current),be());h.current=null,E.current="none",y.current=0,L.current=!1,G(!1)};return document.addEventListener("touchstart",ge,{passive:!0}),document.addEventListener("touchmove",xe,{passive:!1}),document.addEventListener("touchend",Le),document.addEventListener("touchcancel",Le),()=>{document.removeEventListener("touchstart",ge),document.removeEventListener("touchmove",xe),document.removeEventListener("touchend",Le),document.removeEventListener("touchcancel",Le),he()}},[T,t.length,d,l,k,f,le]),a.useEffect(()=>{const pe=he=>{he.key==="Escape"&&(he.preventDefault(),he.stopPropagation(),T!=="closing"&&z("closing"))};return window.addEventListener("keydown",pe,!0),()=>window.removeEventListener("keydown",pe,!0)},[T]);const Z=()=>{T!=="closing"&&z("closing")},fe=T==="open",Ie=T==="closing",ue=w>0?Math.max(0,1-w/500):1,se=w>0?Math.max(.35,1-w/500):1,q=pe=>{if(pe.stopPropagation(),C.current){C.current=!1;return}if(t.length<=1)return;const he=pe.currentTarget.getBoundingClientRect(),be=pe.clientY-he.top,j=Math.min(52,he.height*.2);if(!(be>he.height-j)){if(pe.clientX-he.left<he.width/2){l();return}d()}},ee=pe=>{if(t.length<=1)return;const he=pe.currentTarget.getBoundingClientRect(),be=pe.clientX-he.left,j=pe.clientY-he.top,re=Math.min(52,he.height*.2);if(j>he.height-re){pe.currentTarget.style.cursor="default";return}pe.currentTarget.style.cursor=be<he.width/2?"w-resize":"e-resize"},ce=a.useCallback(pe=>{pe.propertyName!=="transform"||!K.current||(le(),k(!1))},[le,k]),ke=te?`translateX(${R}px)`:w>0?`translateY(${w}px)`:void 0,$e={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:ke,opacity:w>0?se:T==="opening"||Ie?0:1,transition:V&&!F?"none":F?`transform ${Rn}ms ${ci}`:oe?`transform ${Rn}ms ${ci}, opacity ${Rn}ms ${ci}`:T==="opening"||Ie?`opacity ${Rn}ms ${ci}`:"none",pointerEvents:Q&&fe&&!te?"auto":"none",touchAction:Q&&fe?"none":void 0,zIndex:9998},Pe=B?{position:"fixed",top:B.top,height:B.height,width:B.width/2,zIndex:9999}:null;return r.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:T==="open"?"none":void 0},onClick:Z,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:fe?ue:0,transition:V?"none":`opacity ${Rn}ms ${ci}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:v?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:x,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:fe?1:0,transition:`opacity ${Rn}ms ${ci}`,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:x,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:fe?1:0,transition:`opacity ${Rn}ms ${ci}`},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),B&&N&&(Q?r.jsx(E0,{src:N.url,phase:T,mediaRef:I,mediaStyle:$e,onLoadedMetadata:ne,onClick:q,onMouseMove:ee,onTransitionEnd:ce},`${n}-${N.url}`):r.jsx("img",{ref:I,src:N.url,alt:N.name,onLoad:ne,onTransitionEnd:ce,style:$e},`${n}-${N.url}`)),fe&&Pe&&t.length>1&&!Q&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...Pe,left:B.left,cursor:"w-resize",pointerEvents:te?"none":"auto"},onClick:pe=>{if(C.current){C.current=!1;return}pe.stopPropagation(),l()}}),r.jsx("div",{style:{...Pe,left:B.left+B.width/2,cursor:"e-resize",pointerEvents:te?"none":"auto"},onClick:pe=>{if(C.current){C.current=!1;return}pe.stopPropagation(),d()}})]})]})}function Tl({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:s,isEditor:l,galleryPaddingBetween:d=0,showPaddingAfter:c=!1,showControls:u=!1,onMediaClick:p}){const v=`${e}-gallery-${Ia(t)?"video":"image"}`,x=s.display==="cover",I=R0(s),h=T=>S.scalingValue(T,l??!1),g=n??Mi,y=o?{width:"100%",maxWidth:"100%"}:{width:h(g),maxWidth:"100%"},E=i?{borderRadius:h(i)}:{},L={...y,...x?{aspectRatio:I,height:"auto",overflow:"hidden"}:{},...E},C={...x?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":h(g)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...x?{}:E},A={className:v,style:C,onClick:p?T=>{T.stopPropagation(),p()}:void 0},B=Math.max(d,di),P=Ia(t)?r.jsx("video",{...A,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):r.jsx("img",{...A,src:t.url,alt:t.name??""});return r.jsxs("div",{className:`${e}-gallery-item`,children:[x?r.jsx("div",{style:L,children:P}):P,c&&d>0&&r.jsx("div",{className:`${e}-padding-handle`,style:{height:h(d)},"aria-hidden":"true"}),u&&c&&r.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:h(B)}})]})}function k0({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:s,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:d,showControls:c,scaled:u,children:p}){const v=t==="a"?i:t==="c"?o:0,x=v>0||c;return r.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&x&&r.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"aria-hidden":"true"}),c&&t==="c"&&r.jsx("div",{"data-controls":"galleryPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,left:0,width:u(l),height:"100%"}}),r.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&x&&r.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"aria-hidden":"true"}),c&&t==="a"&&r.jsx("div",{"data-controls":"galleryPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,right:0,width:u(s),height:"100%"}})]})}function A0(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Ll({P:e,scaled:t,height:n,paired:i}){return r.jsx("div",{"data-controls":"titleTopPadding",...i?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:t(n)}})}function Il({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:s,paired:l,anchorStyle:d}){return r.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...s==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...s==="left"?{left:0}:{right:0},width:n(i),height:"100%",...d}})}function da({P:e,title:t,position:n,titleRef:i,titleClassName:o,titleContainerStyle:s,titleTextBoxStyle:l,titleStyle:d,showTextBoxOutline:c=!1,topPaddingControl:u}){const p=a.useRef(null),[v,x]=a.useState(0),I=t??"",h=n==="left"||n==="center"||n==="right";return a.useLayoutEffect(()=>{if(!h)return;const g=p.current;if(!g||typeof ResizeObserver>"u")return;const y=()=>x(g.offsetHeight);y();const E=new ResizeObserver(y);return E.observe(g),()=>E.disconnect()},[I,h]),r.jsx("div",{ref:g=>{p.current=g,i(g)},className:[o,`${e}-title-position-${n}`].join(" "),style:{...h?{[`--${e}-title-height`]:`${v}px`}:{},...s},children:r.jsxs("div",{className:`${e}-title-text-stack`,style:l,children:[u,r.jsx("div",{className:c?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:r.jsx("span",{className:`${e}-title-text`,style:d,children:I})})]})})}const Rl=45;function Ml(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const s=parseFloat(o);if(!Number.isNaN(s))return s}i=i.parentElement}return n}function F0(e){const t=Ml(e,"--cntrl-viewport-height",window.innerHeight),n=Ml(e,"--cntrl-article-top",0);return{top:n,centerY:n+t/2}}function W0(e,t,n){const{top:i,centerY:o}=F0(n);if(t==="top"){const l=n&&parseFloat(getComputedStyle(n).top)||i;return Math.abs(e.top-l)}const s=e.top+e.height/2;return Math.abs(s-o)}function _0(e,t,n){const i=Array.from({length:t},(l,d)=>{const c=e.current[d];if(!c)return 0;const u=c.getBoundingClientRect(),p=W0(u,n,c);return Math.exp(-(p*p)/(2*Rl*Rl))});let o=0,s=-1;return i.forEach((l,d)=>{l>s&&(s=l,o=d)}),{opacities:i,dominantIndex:o}}function N0(e,t,n){const i=a.useRef([]),[{opacities:o,dominantIndex:s},l]=a.useState(()=>({opacities:Array.from({length:e},(c,u)=>u===0?1:0),dominantIndex:0}));return a.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let c=0;const u=()=>{l(_0(i,e,n))},p=()=>{c||(c=window.requestAnimationFrame(()=>{c=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{c&&window.cancelAnimationFrame(c),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:c=>u=>{i.current[c]=u},opacities:o,dominantIndex:s}}function H0(e,t){const[n,i]=a.useState(e),o=a.useRef(e);return a.useEffect(()=>{if(!t){o.current=e,i(e);return}const s=Array.from(o.current),l=Array.from(e),d=Math.max(s.length,l.length);if(d===0||o.current===e)return;let c=0;const u=window.setInterval(()=>{c+=1;const p=[...l.slice(0,c),...s.slice(c)].join("");o.current=p,i(p),c>=d&&window.clearInterval(u)},35);return()=>window.clearInterval(u)},[t,e]),n}function O0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:s}){var ft;const{prefix:l}=S.useScopedStyles(),d=a.useMemo(()=>g0(l),[l]),c=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",v=(e==null?void 0:e.imgWidth)??Mi,x=(e==null?void 0:e.titleWidth)??L0,I=I0(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??p0,g=(e==null?void 0:e.position)??"center",y=(e==null?void 0:e.titleTopPadding)??0,E=(e==null?void 0:e.titleLeftPadding)??0,L=(e==null?void 0:e.titleRightPadding)??0,C=A0(e==null?void 0:e.transition),K=(e==null?void 0:e.lightbox)??"on",A=p==="b",B=C==="fade"||C==="retype",{setTitleRef:P,dominantIndex:T}=N0(c.length,B,g),z=((ft=c[T])==null?void 0:ft.title)??"",w=H0(z,C==="retype"),W=C==="fade"||C==="retype",R=C==="retype"?w:z,J=A?void 0:{width:S.scalingValue(v,n??!1)},F=K==="on"&&(!n||i||o),U=o??!1,V=(e==null?void 0:e.galleryPaddingRight)??0,G=(e==null?void 0:e.galleryPaddingLeft)??0,oe=(e==null?void 0:e.galleryPaddingBetween)??0,$=mt=>S.scalingValue(mt,n??!1),N={width:$(x)},Q=p==="a"?V:G,te=A?{width:"100%"}:{width:`calc(100% - ${$(v)} - ${$(Q)})`,...p==="c"?{marginLeft:"auto"}:{}},k=Math.max(V,di),le=Math.max(G,di),f=Math.max(oe,di),ne=Math.max(y,di),Z=Math.max(E,di),fe=Math.max(L,di),Ie=Math.max(0,(u??1)-(v??Mi)),ue=p==="a"?Math.max(0,(u??1)-(v??Mi)-V):p==="c"?Math.max(0,(u??1)-(v??Mi)-G):p==="b"?u??1:1,se=U&&(p==="a"||p==="b"||p==="c")&&g==="top",q=U&&((p==="a"||p==="b")&&(g==="left"||g==="top")||p==="c"&&(g==="left"||g==="top")),ee=U&&((p==="c"||p==="b")&&g==="right"||p==="a"&&g==="right"),ce=c.length>1,ke=A?void 0:$((p==="c"?G:V)+(v??Mi)),$e=p==="c"&&ke?{left:ke}:void 0,Pe=p==="a"&&ke?{right:ke}:void 0,pe=A?{left:0,width:"100%"}:p==="a"?{right:$(V),width:$(v)}:{left:$(G),width:$(v)},{titleColor:he,titleFontFamily:be,titleFontSettings:j,titleFontSize:re,titleLineHeight:ge,titleLetterSpacing:xe,titleWordSpacing:Le,titleAlign:we,titleTextAppearance:_,lightboxCounterColor:me,lightboxCounterFontFamily:ie,lightboxCounterFontSettings:H,lightboxCounterFontSize:X,lightboxCounterLineHeight:Re,lightboxCounterLetterSpacing:de,lightboxCounterWordSpacing:D,lightboxCounterTextAppearance:ze}=e??{},Fe={fontSettings:{fontFamily:be,fontWeight:(j==null?void 0:j.fontWeight)??400,fontStyle:(j==null?void 0:j.fontStyle)??"normal"},fontSize:re??.01,lineHeight:ge,letterSpacing:xe??0,wordSpacing:Le??0,textAlign:we??"left",textAppearance:_,color:he??"#000000"},tt=on(Vt(Fe,n)),at=N,yt=Cl(re,ge,l,n),Ve=$l(re,ge,`${l}-title`,`${l}-text-tight-leading`),ye={fontSettings:{fontFamily:ie,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:X??.01,lineHeight:Re,letterSpacing:de??0,wordSpacing:D??0,textAppearance:ze,color:me??"#DEDDDD"},je={...on(Vt(ye,n)),...Cl(X,Re,l,n)},Ee=$l(X,Re,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Ce=S.buildColorVars(l,{titleColor:he??"#000000",lightboxCounterColor:me??"#DEDDDD"},v0,b0),_e=a.useRef(null),[De,nt]=a.useState(!1),[pt,Qe]=a.useState([]),[St,ct]=a.useState(0),Ue=a.useCallback((mt,gt)=>{F&&(Qe(mt),ct(gt),nt(!0))},[F]),Ke=a.useCallback(()=>{nt(!1)},[]),Oe=a.useMemo(()=>{const mt={...Ce},gt=_e.current?getComputedStyle(_e.current).getPropertyValue("--cntrl-article-width").trim():"";return gt&&(mt["--cntrl-article-width"]=gt),mt},[Ce,De]);return a.useEffect(()=>{if(!De||K!=="on"||typeof document>"u")return;const mt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=mt}},[De,K]),a.useEffect(()=>{!n||o||i||nt(!1)},[n,o,i]),a.useEffect(()=>{K==="off"&&nt(!1)},[K]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),r.jsx("div",{style:Ce,children:r.jsxs("div",{ref:_e,className:`${l}-wrapper`,style:{width:S.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:(p==="a"||p==="b"||p==="c")&&g==="top"?$(y):void 0,[`--${l}-title-left-padding`]:(p==="a"||p==="b")&&(g==="left"||g==="top")||p==="c"&&(g==="left"||g==="top")?$(E):void 0,[`--${l}-title-right-padding`]:(p==="c"||p==="b")&&g==="right"||p==="a"&&g==="right"?$(L):void 0},children:[W&&r.jsx("div",{className:`${l}-single-title-layer`,children:r.jsx(da,{P:l,title:R,position:g,titleRef:()=>{},titleClassName:`${Ve} ${l}-single-title`,titleContainerStyle:{...yt,...te},titleTextBoxStyle:at,titleStyle:tt,showTextBoxOutline:U,topPaddingControl:se?Ll({P:l,scaled:$,height:ne,paired:!1}):void 0})}),c.map((mt,gt)=>{const At=$0(mt.gallery),Zt=gt<c.length-1,tn=At.filter(Tt=>Tt.lightboxMedia).map(Tt=>Tt.lightboxMedia),$t={P:l,position:g,titleRef:P(gt),titleClassName:Ve,titleContainerStyle:yt,titleTextBoxStyle:W?{maxWidth:"100%"}:at,titleStyle:tt,showTextBoxOutline:U&&!W,topPaddingControl:se&&!W?Ll({P:l,scaled:$,height:ne,paired:ce}):void 0};return r.jsxs("div",{"data-item-index":gt,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:Zt?$(oe):void 0},children:[q&&Il({P:l,controlKey:"titleLeftPadding",scaled:$,width:Z,maxFraction:ue,side:"left",paired:ce,anchorStyle:$e}),ee&&Il({P:l,controlKey:"titleRightPadding",scaled:$,width:fe,maxFraction:ue,side:"right",paired:ce,anchorStyle:Pe}),U&&Zt&&r.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-control-anchor`,style:{bottom:0,height:$(f),...pe}}),A?r.jsxs("div",{className:`${l}-gallery`,children:[r.jsx("div",{className:`${l}-gallery-media`,children:At.map(({displayMedia:Tt,lightboxMedia:Ht},Wt)=>{const Te=Ht?tn.findIndex(Ge=>Ge.url===Ht.url):-1;return r.jsx(Tl,{P:l,media:Tt,imgWidth:v||void 0,cornerRadius:h||void 0,imageDisplay:I,isEditor:n,galleryPaddingBetween:oe,showPaddingAfter:Wt<At.length-1,showControls:U,onMediaClick:F&&Te>=0?()=>Ue(tn,Te):void 0},`${Tt.url}-${Wt}`)})}),r.jsx("div",{className:`${l}-title-layer`,children:r.jsx(da,{...$t,title:W?"":mt.title})})]}):r.jsxs(r.Fragment,{children:[r.jsx(da,{...$t,title:W?"":mt.title}),At.length>0&&r.jsx(k0,{P:l,layoutType:p,galleryWidthStyle:J,galleryPaddingRight:V,galleryPaddingLeft:G,galleryPaddingRightWidth:k,galleryPaddingLeftWidth:le,galleryPaddingMaxFraction:Ie,showControls:U,scaled:$,children:At.map(({displayMedia:Tt,lightboxMedia:Ht},Wt)=>{const Te=Ht?tn.findIndex(Ge=>Ge.url===Ht.url):-1;return r.jsx(Tl,{P:l,media:Tt,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:I,isEditor:n,galleryPaddingBetween:oe,showPaddingAfter:Wt<At.length-1,showControls:U,onMediaClick:F&&Te>=0?()=>Ue(tn,Te):void 0},`${Tt.url}-${Wt}`)})})]})]},gt)})]})}),De&&K==="on"&&typeof document<"u"&&e&&(()=>{const mt=(s?document.getElementById(s):null)??document.body;return Yn.createPortal(r.jsx("div",{style:Oe,"data-selection":"none",children:r.jsx(P0,{prefix:l,items:pt,index:St,imageDisplay:M0(e.lightboxImageDisplay),isEditor:n,onClose:Ke,onPrev:()=>ct(gt=>(gt-1+pt.length)%pt.length),onNext:()=>ct(gt=>(gt+1)%pt.length),counterClassName:Ee,counterStyle:je,backgroundColor:e.backgroundColor??h0})}),mt)})()]})}const D0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
19769
19769
  import { createPortal } from 'react-dom';
19770
19770
  import type React from 'react';
19771
19771
  import { CommonComponentProps } from '../props';
@@ -21815,4 +21815,563 @@ export function Mercury({
21815
21815
  </>
21816
21816
  );
21817
21817
  }
21818
- `;function Ti(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const da={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}}},L0={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"}},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"]}}}}}}}},required:["gallery"]},default:[{title:"AX-2 Space Suit",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Earth-orbital mission",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.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"}]},{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-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Salton Sea from Above",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-12.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]}]},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},imgWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},titleWidth:{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"}}},galleryPaddingRight:Ti("Gallery Padding Right"),galleryPaddingLeft:Ti("Gallery Padding Left"),galleryPaddingBetween:Ti("Gallery Padding Between"),cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right","top"]}},titleTopPadding:Ti("Title Top Padding"),titleLeftPadding:Ti("Title Left Padding"),titleRightPadding:Ti("Title Right Padding"),transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","retype","scroll"]}},titleColor:{type:"string",scope:"common",title:"Title",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...da.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"}},titleAlign:{...da.textAlign,scope:"layout",title:"Align"},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...da.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:{type:"a",position:"left",transition:"scroll",titleColor:"#000000",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleAlign:"center",titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",backgroundColor:"rgba(28,31,34,0.9)",lightboxCounterColor:"#DEDDDD",lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{defaultPaddingTop:30/1440,wrapperWidth:1,imgWidth:600/1440,titleWidth:400/1440,galleryPaddingRight:30/1440,galleryPaddingLeft:30/1440,galleryPaddingBetween:30/1440,titleTopPadding:0,titleLeftPadding:0,titleRightPadding:0,cornerRadius:4/1440,position:"center",titleFontSize:73/1440,titleLineHeight:66/1440,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},m:{defaultPaddingTop:10/375,wrapperWidth:1,imgWidth:170/375,titleWidth:150/375,galleryPaddingRight:10/375,galleryPaddingLeft:10/375,galleryPaddingBetween:10/375,titleTopPadding:0,titleLeftPadding:10/375,titleRightPadding:10/375,cornerRadius:8/375,position:"left",titleFontSize:30/375,titleLineHeight:25/375,lightboxCounterFontSize:14/375,lightboxCounterLineHeight:14/375},t:{defaultPaddingTop:20/768,wrapperWidth:1,imgWidth:300/768,titleWidth:320/768,galleryPaddingRight:20/768,galleryPaddingLeft:20/768,galleryPaddingBetween:20/768,titleTopPadding:0,titleLeftPadding:0,titleRightPadding:0,cornerRadius:8/768,position:"center",titleFontSize:58/768,titleLineHeight:48/768,lightboxCounterFontSize:8/768,lightboxCounterLineHeight:8/768}},displayRules:[{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}}],layout:["__componentName__","type","wrapperWidth","imgWidth","titleWidth","imageDisplay","cornerRadius","position","transition","lightbox","lightboxImageDisplay"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",items:["wrapperWidth","imgWidth"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",title:"Title",items:["position","transition"]},"titleWidth",{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",items:["backgroundColor"]}]},{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"]},"titleAlign","titleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:["titleColor","backgroundColor","lightboxCounterColor"],panelIds:["general","typeStyle"]}},R0={element:C0,id:"mercury",name:"Mercury",category:"lists",layoutMode:"structured",version:1,defaultSize:{d:{width:720,height:540}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Mercury.mp4"},schema:L0,sourceCode:T0,assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},I0=[Zu,op,Ty,Yp,rm,hm,Fm,Dm,Km,xg,ph,gf,$f,ry,fy,Ny,Av,Ky,Yv,R0];exports.components=I0;exports.isSchemaV1=zc;
21818
+ `;function Ti(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const ua={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}}},j0={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"}},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"]}}}}}}}},required:["gallery"]},default:[{title:"AX-2 Space Suit",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Earth-orbital mission",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.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"}]},{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-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Salton Sea from Above",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-12.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]}]},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},imgWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},titleWidth:{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"}}},galleryPaddingRight:Ti("Gallery Padding Right"),galleryPaddingLeft:Ti("Gallery Padding Left"),galleryPaddingBetween:Ti("Gallery Padding Between"),cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right","top"]}},titleTopPadding:Ti("Title Top Padding"),titleLeftPadding:Ti("Title Left Padding"),titleRightPadding:Ti("Title Right Padding"),transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","retype","scroll"]}},titleColor:{type:"string",scope:"common",title:"Title",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...ua.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"}},titleAlign:{...ua.textAlign,scope:"layout",title:"Align"},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...ua.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:{type:"a",position:"left",transition:"scroll",titleColor:"#000000",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleAlign:"center",titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",backgroundColor:"rgba(28,31,34,0.9)",lightboxCounterColor:"#DEDDDD",lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{defaultPaddingTop:30/1440,wrapperWidth:1,imgWidth:600/1440,titleWidth:400/1440,galleryPaddingRight:30/1440,galleryPaddingLeft:30/1440,galleryPaddingBetween:30/1440,titleTopPadding:0,titleLeftPadding:0,titleRightPadding:0,cornerRadius:4/1440,position:"center",titleFontSize:73/1440,titleLineHeight:66/1440,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},m:{defaultPaddingTop:10/375,wrapperWidth:1,imgWidth:170/375,titleWidth:150/375,galleryPaddingRight:10/375,galleryPaddingLeft:10/375,galleryPaddingBetween:10/375,titleTopPadding:0,titleLeftPadding:10/375,titleRightPadding:10/375,cornerRadius:8/375,position:"left",titleFontSize:30/375,titleLineHeight:25/375,lightboxCounterFontSize:14/375,lightboxCounterLineHeight:14/375},t:{defaultPaddingTop:20/768,wrapperWidth:1,imgWidth:300/768,titleWidth:320/768,galleryPaddingRight:20/768,galleryPaddingLeft:20/768,galleryPaddingBetween:20/768,titleTopPadding:0,titleLeftPadding:0,titleRightPadding:0,cornerRadius:8/768,position:"center",titleFontSize:58/768,titleLineHeight:48/768,lightboxCounterFontSize:8/768,lightboxCounterLineHeight:8/768}},displayRules:[{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}}],layout:["__componentName__","type","wrapperWidth","imgWidth","titleWidth","imageDisplay","cornerRadius","position","transition","lightbox","lightboxImageDisplay"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",items:["wrapperWidth","imgWidth"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",title:"Title",items:["position","transition"]},"titleWidth",{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",items:["backgroundColor"]}]},{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"]},"titleAlign","titleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:["titleColor","backgroundColor","lightboxCounterColor"],panelIds:["general","typeStyle"]}},z0={element:O0,id:"mercury",name:"Mercury",category:"lists",layoutMode:"structured",version:1,defaultSize:{d:{width:720,height:540}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Mercury.mp4"},schema:j0,sourceCode:D0,assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},El=48,B0=10,V0=400,G0=1,q0=1120/1440,U0=140/1440,K0=550/1440,X0=13,Y0=4,Z0=38/100,J0=28/100,Uc=2.8,Q0=.9,Kc=.22,Ra=1440;function eb(e,t){return`
21819
+ .${e}-wrapper {
21820
+ position: relative;
21821
+ box-sizing: border-box;
21822
+ overflow: hidden;
21823
+ clip-path: inset(0);
21824
+ isolation: isolate;
21825
+ }
21826
+ .${e}-item {
21827
+ position: absolute;
21828
+ overflow: hidden;
21829
+ animation-name: ${e}-orbit;
21830
+ animation-timing-function: linear;
21831
+ animation-iteration-count: infinite;
21832
+ animation-fill-mode: both;
21833
+ will-change: left, width, height, z-index;
21834
+ }
21835
+ .${e}-item-static {
21836
+ animation-name: none;
21837
+ }
21838
+ .${e}-media {
21839
+ display: block;
21840
+ width: 100%;
21841
+ max-width: 100%;
21842
+ height: auto;
21843
+ vertical-align: top;
21844
+ user-select: none;
21845
+ pointer-events: none;
21846
+ }
21847
+ .${e}-cover {
21848
+ display: block;
21849
+ width: 100%;
21850
+ height: 100%;
21851
+ overflow: hidden;
21852
+ position: relative;
21853
+ }
21854
+ .${e}-cover .${e}-media {
21855
+ position: absolute;
21856
+ inset: 0;
21857
+ width: 100%;
21858
+ height: 100%;
21859
+ object-fit: cover;
21860
+ object-position: center;
21861
+ }
21862
+ ${t}
21863
+ `}function Ar(e){return Number(e.toFixed(4))}function Pl(e,t,n,i){let s=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(s)?(s>0&&s<1&&(s=Math.round(s*Ra)),Math.min(i,Math.max(n,Math.round(s)))):t}function pa(e,t,n=0,i=9999){let s=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(s)?(s>i/Ra&&(s/=Ra),Math.min(i,Math.max(n,s))):t}function tb(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function nb(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function ib(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")}function Xc(e,t){return(1-e)/(1-e*Math.cos(t))}function ob(e){let t=0;for(let n=0;n<360;n+=1){const i=n*Math.PI/180;t=Math.max(t,Math.abs(Math.sin(i)*Xc(e,i)))}return t||1}function rb(e,t){return e?1:1+Kc*(.35+t)}function ab(e,t,n,i){const o=t*rb(n,i);return Math.max(0,(e-o)/2)}function Yc(e,t,n){const i=Xc(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function Zc(e,t,n){return e/2+t*n}function sb(e,t,n){return e(t-n/2)}function lb(e,t){return e*t}function Jc(e){return Math.round(e*1e3)}function cb(e,t,n,i,o,s,l){const{offset:d,scale:c}=Yc(i,o,s*Math.PI*2),u=Zc(t,n,d),p=Ar(c),v=`calc(${e(u)} - var(--spiral-base-w) * ${p} / 2)`,x=`calc(var(--spiral-base-w) * ${p})`,I=l?`height: calc(var(--spiral-base-h) * ${p});`:"";return`left: ${v}; width: ${x}; ${I} z-index: ${Jc(c)}; transform: translateY(-50%);`}function db(e,t,n,i,o,s,l){const d=[];for(let c=0;c<=El;c+=1){const u=c/El;d.push(` ${Ar(u*100)}% { ${cb(t,n,i,o,s,u,l)} }`)}return`@keyframes ${e}-orbit {
21864
+ ${d.join(`
21865
+ `)}
21866
+ }`}function Qc(e,t){return(e%t+t)%t}function ub(e,t){return ls(e,t)/t}function ls(e,t){return Qc(e,t)}function pb(e,t){return Math.floor(e/t)}function mb(e,t,n,i){return pb(e,t)*n+ls(e,t)*i}function gb(e,t,n){const i=n==="left"?1-e:e;return`${Ar(-i*t)}s`}function kl(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function ed(e){const t=e%1;return t<0?t+1:t}function hb(e,t,n){const i=t/Uc,o=n==="left"?-e*i:e*i;return ed(o)}function fb({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=S.useScopedStyles(),s=a.useRef(null),l=pa((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),q0),d=pa(e==null?void 0:e.imageWidth,U0),c=pa(e==null?void 0:e.turnHeight,K0),u=Pl(e==null?void 0:e.itemsPerTurn,X0,3,40),p=Pl(e==null?void 0:e.turns,Y0,1,30),v=Math.min(Q0,Math.max(0,Z0)),x=Math.min(1,Math.max(0,J0)),I=Math.max(0,(e==null?void 0:e.speed)??Uc),h=(e==null?void 0:e.direction)==="left"?"left":"right",g=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",y=(e==null?void 0:e.cornerRadius)??0,E=a.useMemo(()=>tb(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),L=E.display==="cover",C=Q=>S.scalingValue(Q,n??!1),K=a.useMemo(()=>ob(v),[v]),A=a.useMemo(()=>ab(l,d,L,x),[l,d,L,x]),B=a.useMemo(()=>eb(o,db(o,C,l,A,v,K,L)),[o,l,A,v,K,L,n]),P=a.useMemo(()=>(t??[]).filter(Q=>{var te;return!!((te=Q.image)!=null&&te.url)}),[t]),T=c/u,z=d*nb(E),w=Math.min(V0,p*u),W=G0*u,R=w+W*2,F=Math.max(0,p-1)*c+(u-1)*T,U=I>0,V=g==="scroll"&&U,G=g==="autoplay"&&U&&(n?!!i:!0),[oe,$]=a.useState(0);a.useEffect(()=>{if(!V)return;const Q=s.current;if(!Q)return;const te=()=>{const le=Q.getBoundingClientRect(),f=window.innerHeight||document.documentElement.clientHeight,ne=f+le.height;ne<=0||$(Math.min(1,Math.max(0,(f-le.top)/ne)))};te(),window.addEventListener("scroll",te,{passive:!0}),window.addEventListener("resize",te);const k=new ResizeObserver(te);return k.observe(Q),()=>{window.removeEventListener("scroll",te),window.removeEventListener("resize",te),k.disconnect()}},[V]);const M=V?hb(oe,I,h):0,N=U&&g==="autoplay"?360/(I*B0):0;return P.length===0?r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:B}}),r.jsx("div",{className:`${o}-wrapper`,style:{width:C(l),marginInline:"auto"}})]}):r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:B}}),r.jsx("div",{ref:s,className:`${o}-wrapper`,style:{width:C(l),height:C(F),marginInline:"auto"},children:Array.from({length:R},(Q,te)=>{const k=te-W,f=P[Qc(k,P.length)].image,ne=ls(k,u),Z=ub(k,u),fe=V?ed(Z+M):Z,Ie=mb(k,u,c,T),ue=x===0?0:(kl(ne+7.3)-.5)*x*T,se=L?1:1+(kl(ne+3.1)-.5)*2*Kc*(.35+x),q=fe*Math.PI*2,{offset:ee,scale:ce}=Yc(v,K,q),ke=d*se,$e=lb(ke,ce),Pe=Zc(l,A,ee),pe={"--spiral-base-w":C(ke),...L?{"--spiral-base-h":C(z)}:{}},he={top:C(Ie+ue),transform:"translateY(-50%)",...pe,...G?{animationDuration:`${Ar(N)}s`,animationDelay:gb(Z,N,h),animationDirection:h==="left"?"reverse":"normal"}:{left:sb(C,Pe,$e),width:C($e),...L?{height:C(z*ce)}:{},zIndex:Jc(ce)}},be=y>0?{borderRadius:C(y)}:{},j=L?{...be,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:be,re=ib(f)?r.jsx("video",{className:`${o}-media`,style:j,src:f.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:`${o}-media`,style:j,src:f.url,alt:f.name??"",loading:"lazy",decoding:"async"});return r.jsx("div",{className:G?`${o}-item`:`${o}-item ${o}-item-static`,style:he,children:L?r.jsx("div",{className:`${o}-cover`,style:be,children:re}):re},`${p}-${u}-${k}`)})})]})}const yb=`import { useEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
21867
+ import { CommonComponentProps } from '../../props';
21868
+ import { scalingValue } from '../../utils/scalingValue';
21869
+ import { useScopedStyles } from '../../utils/useScopedStyles';
21870
+
21871
+ const ORBIT_STEPS = 48;
21872
+ const DEG_PER_SEC_PER_SPEED_UNIT = 10;
21873
+ const MAX_TOTAL_ITEMS = 400;
21874
+ const OVERFLOW_TURNS = 1;
21875
+ const DEFAULT_WIDTH = 1120 / 1440;
21876
+ const DEFAULT_IMAGE_WIDTH = 140 / 1440;
21877
+ const DEFAULT_TURN_HEIGHT = 550 / 1440;
21878
+ const DEFAULT_ITEMS_PER_TURN = 13;
21879
+ const DEFAULT_TURNS = 4;
21880
+ const DEPTH_FACTOR = 38 / 100;
21881
+ const SCATTER = 28 / 100;
21882
+ const DEFAULT_SPEED = 2.8;
21883
+ const MAX_DEPTH_FACTOR = 0.9;
21884
+ const SIZE_JITTER = 0.22;
21885
+ const LAYOUT_EXEMPLARY = 1440;
21886
+
21887
+ function getCSS(P: string, keyframes: string): string {
21888
+ return \`
21889
+ .\${P}-wrapper {
21890
+ position: relative;
21891
+ box-sizing: border-box;
21892
+ overflow: hidden;
21893
+ clip-path: inset(0);
21894
+ isolation: isolate;
21895
+ }
21896
+ .\${P}-item {
21897
+ position: absolute;
21898
+ overflow: hidden;
21899
+ animation-name: \${P}-orbit;
21900
+ animation-timing-function: linear;
21901
+ animation-iteration-count: infinite;
21902
+ animation-fill-mode: both;
21903
+ will-change: left, width, height, z-index;
21904
+ }
21905
+ .\${P}-item-static {
21906
+ animation-name: none;
21907
+ }
21908
+ .\${P}-media {
21909
+ display: block;
21910
+ width: 100%;
21911
+ max-width: 100%;
21912
+ height: auto;
21913
+ vertical-align: top;
21914
+ user-select: none;
21915
+ pointer-events: none;
21916
+ }
21917
+ .\${P}-cover {
21918
+ display: block;
21919
+ width: 100%;
21920
+ height: 100%;
21921
+ overflow: hidden;
21922
+ position: relative;
21923
+ }
21924
+ .\${P}-cover .\${P}-media {
21925
+ position: absolute;
21926
+ inset: 0;
21927
+ width: 100%;
21928
+ height: 100%;
21929
+ object-fit: cover;
21930
+ object-position: center;
21931
+ }
21932
+ \${keyframes}
21933
+ \`;
21934
+ }
21935
+
21936
+ type SpiralMedia = {
21937
+ url?: string;
21938
+ name?: string;
21939
+ type?: 'image' | 'video';
21940
+ };
21941
+
21942
+ export type SpiralListContentItem = {
21943
+ image?: SpiralMedia;
21944
+ };
21945
+
21946
+ export type SpiralListSettings = {
21947
+ width?: number;
21948
+ /** @deprecated use \`width\` */
21949
+ spread?: number;
21950
+ /** @deprecated use \`width\` */
21951
+ wrapperWidth?: number;
21952
+ imageWidth?: number;
21953
+ turnHeight?: number;
21954
+ itemsPerTurn?: number;
21955
+ turns?: number;
21956
+ speed?: number;
21957
+ direction?: 'left' | 'right';
21958
+ playback?: 'autoplay' | 'scroll';
21959
+ /** @deprecated use \`playback\` */
21960
+ pauseOnHover?: 'on' | 'off';
21961
+ cornerRadius?: number;
21962
+ imageDisplay?: {
21963
+ display?: 'fit' | 'cover';
21964
+ ratioValue?: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
21965
+ reversed?: boolean;
21966
+ } | string;
21967
+ };
21968
+
21969
+ type SpiralListProps = {
21970
+ settings?: SpiralListSettings;
21971
+ content?: SpiralListContentItem[];
21972
+ isEditor?: boolean;
21973
+ isPreviewMode?: boolean;
21974
+ isEditMode?: boolean;
21975
+ } & CommonComponentProps;
21976
+
21977
+ type ImageDisplay = {
21978
+ display: 'fit' | 'cover';
21979
+ ratioValue: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
21980
+ reversed: boolean;
21981
+ };
21982
+
21983
+ function round(value: number): number {
21984
+ return Number(value.toFixed(4));
21985
+ }
21986
+
21987
+ // Common settings must use \`common-numeric-input\`. Older saves may contain values
21988
+ // that were accidentally divided by the layout exemplary (~1440).
21989
+ function resolveCommonCount(
21990
+ value: number | undefined,
21991
+ defaultValue: number,
21992
+ min: number,
21993
+ max: number,
21994
+ ): number {
21995
+ const raw = typeof value === 'string' ? Number(value) : value;
21996
+ let resolved = raw ?? defaultValue;
21997
+ if (!Number.isFinite(resolved)) return defaultValue;
21998
+ if (resolved > 0 && resolved < 1) {
21999
+ resolved = Math.round(resolved * LAYOUT_EXEMPLARY);
22000
+ }
22001
+ return Math.min(max, Math.max(min, Math.round(resolved)));
22002
+ }
22003
+
22004
+ function resolveLayoutMetric(
22005
+ value: number | undefined,
22006
+ defaultValue: number,
22007
+ min = 0,
22008
+ max = 9999,
22009
+ ): number {
22010
+ const raw = typeof value === 'string' ? Number(value) : value;
22011
+ let resolved = raw ?? defaultValue;
22012
+ if (!Number.isFinite(resolved)) return defaultValue;
22013
+ if (resolved > max / LAYOUT_EXEMPLARY) {
22014
+ resolved /= LAYOUT_EXEMPLARY;
22015
+ }
22016
+ return Math.min(max, Math.max(min, resolved));
22017
+ }
22018
+
22019
+ function normalizeImageDisplay(raw: SpiralListSettings['imageDisplay']): ImageDisplay {
22020
+ if (typeof raw === 'string') {
22021
+ return {
22022
+ display: raw.toLowerCase() === 'cover' ? 'cover' : 'fit',
22023
+ ratioValue: '2:3',
22024
+ reversed: false,
22025
+ };
22026
+ }
22027
+ const display = typeof raw?.display === 'string' ? raw.display.toLowerCase() : '';
22028
+ return {
22029
+ display: display === 'cover' ? 'cover' : 'fit',
22030
+ ratioValue: raw?.ratioValue ?? '2:3',
22031
+ reversed: raw?.reversed ?? false,
22032
+ };
22033
+ }
22034
+
22035
+ function getAspectHeightFactor(imageDisplay: ImageDisplay): number {
22036
+ const [ratioWidth, ratioHeight] = imageDisplay.ratioValue.split(':').map(Number);
22037
+ const effectiveWidth = imageDisplay.reversed ? ratioHeight : ratioWidth;
22038
+ const effectiveHeight = imageDisplay.reversed ? ratioWidth : ratioHeight;
22039
+ return effectiveHeight / effectiveWidth;
22040
+ }
22041
+
22042
+ function isVideoMedia(media: SpiralMedia): boolean {
22043
+ if (media.type === 'video') return true;
22044
+ if (media.type === 'image') return false;
22045
+ return /\\.(mp4|webm|ogg|mov)(\\?|$)/i.test(media.name ?? '') || /\\.(mp4|webm|ogg|mov)(\\?|$)/i.test(media.url ?? '');
22046
+ }
22047
+
22048
+ function getOrbitScale(depthFactor: number, angle: number): number {
22049
+ return (1 - depthFactor) / (1 - depthFactor * Math.cos(angle));
22050
+ }
22051
+
22052
+ function getSpreadFactor(depthFactor: number): number {
22053
+ let max = 0;
22054
+ for (let degrees = 0; degrees < 360; degrees += 1) {
22055
+ const angle = (degrees * Math.PI) / 180;
22056
+ max = Math.max(max, Math.abs(Math.sin(angle) * getOrbitScale(depthFactor, angle)));
22057
+ }
22058
+ return max || 1;
22059
+ }
22060
+
22061
+ function getMaxItemWidthFactor(isCover: boolean, scatter: number): number {
22062
+ return isCover ? 1 : 1 + SIZE_JITTER * (0.35 + scatter);
22063
+ }
22064
+
22065
+ function getOrbitRadius(
22066
+ width: number,
22067
+ imageWidth: number,
22068
+ isCover: boolean,
22069
+ scatter: number,
22070
+ ): number {
22071
+ const maxItemWidth = imageWidth * getMaxItemWidthFactor(isCover, scatter);
22072
+ return Math.max(0, (width - maxItemWidth) / 2);
22073
+ }
22074
+
22075
+ function getOrbitPose(depthFactor: number, spreadFactor: number, angle: number) {
22076
+ const scale = getOrbitScale(depthFactor, angle);
22077
+ return {
22078
+ offset: (Math.sin(angle) * scale) / spreadFactor,
22079
+ scale,
22080
+ };
22081
+ }
22082
+
22083
+ function getOrbitCenterX(width: number, orbitRadius: number, offset: number): number {
22084
+ return width / 2 + orbitRadius * offset;
22085
+ }
22086
+
22087
+ function getOrbitLeft(
22088
+ scaled: (value: number) => string,
22089
+ centerX: number,
22090
+ layoutWidth: number,
22091
+ ): string {
22092
+ return scaled(centerX - layoutWidth / 2);
22093
+ }
22094
+
22095
+ function getOrbitLayoutWidth(baseItemWidth: number, scale: number): number {
22096
+ return baseItemWidth * scale;
22097
+ }
22098
+
22099
+ function getOrbitZIndex(scale: number): number {
22100
+ return Math.round(scale * 1000);
22101
+ }
22102
+
22103
+ function getOrbitKeyframeStyles(
22104
+ scaled: (value: number) => string,
22105
+ width: number,
22106
+ orbitRadius: number,
22107
+ depthFactor: number,
22108
+ spreadFactor: number,
22109
+ progress: number,
22110
+ isCover: boolean,
22111
+ ): string {
22112
+ const { offset, scale } = getOrbitPose(depthFactor, spreadFactor, progress * Math.PI * 2);
22113
+ const centerX = getOrbitCenterX(width, orbitRadius, offset);
22114
+ const layoutWidthFactor = round(scale);
22115
+ const left = \`calc(\${scaled(centerX)} - var(--spiral-base-w) * \${layoutWidthFactor} / 2)\`;
22116
+ const widthStyle = \`calc(var(--spiral-base-w) * \${layoutWidthFactor})\`;
22117
+ const heightStyle = isCover ? \`height: calc(var(--spiral-base-h) * \${layoutWidthFactor});\` : '';
22118
+ return \`left: \${left}; width: \${widthStyle}; \${heightStyle} z-index: \${getOrbitZIndex(scale)}; transform: translateY(-50%);\`;
22119
+ }
22120
+
22121
+ function getOrbitKeyframes(
22122
+ P: string,
22123
+ scaled: (value: number) => string,
22124
+ width: number,
22125
+ orbitRadius: number,
22126
+ depthFactor: number,
22127
+ spreadFactor: number,
22128
+ isCover: boolean,
22129
+ ): string {
22130
+ const frames: string[] = [];
22131
+ for (let step = 0; step <= ORBIT_STEPS; step += 1) {
22132
+ const progress = step / ORBIT_STEPS;
22133
+ frames.push(
22134
+ \` \${round(progress * 100)}% { \${getOrbitKeyframeStyles(scaled, width, orbitRadius, depthFactor, spreadFactor, progress, isCover)} }\`,
22135
+ );
22136
+ }
22137
+ return \`@keyframes \${P}-orbit {\\n\${frames.join('\\n')}\\n}\`;
22138
+ }
22139
+
22140
+ function mod(value: number, length: number): number {
22141
+ return ((value % length) + length) % length;
22142
+ }
22143
+
22144
+ function getOrbitPhase(index: number, itemsPerTurn: number): number {
22145
+ return getOrbitSlotIndex(index, itemsPerTurn) / itemsPerTurn;
22146
+ }
22147
+
22148
+ function getOrbitSlotIndex(index: number, itemsPerTurn: number): number {
22149
+ return mod(index, itemsPerTurn);
22150
+ }
22151
+
22152
+ function getTurnIndex(index: number, itemsPerTurn: number): number {
22153
+ return Math.floor(index / itemsPerTurn);
22154
+ }
22155
+
22156
+ function getVerticalOffset(index: number, itemsPerTurn: number, turnHeight: number, verticalStep: number): number {
22157
+ return getTurnIndex(index, itemsPerTurn) * turnHeight + getOrbitSlotIndex(index, itemsPerTurn) * verticalStep;
22158
+ }
22159
+
22160
+ function getOrbitAnimationDelay(phase: number, durationSeconds: number, direction: 'left' | 'right'): string {
22161
+ const delayPhase = direction === 'left' ? 1 - phase : phase;
22162
+ return \`\${round(-delayPhase * durationSeconds)}s\`;
22163
+ }
22164
+
22165
+ function hashUnit(seed: number): number {
22166
+ const value = Math.sin(seed * 12.9898) * 43758.5453;
22167
+ return value - Math.floor(value);
22168
+ }
22169
+
22170
+ function normalizePhase(value: number): number {
22171
+ const mod = value % 1;
22172
+ return mod < 0 ? mod + 1 : mod;
22173
+ }
22174
+
22175
+ function getScrollOrbitProgress(scrollProgress: number, speed: number, direction: 'left' | 'right'): number {
22176
+ const orbitCycles = speed / DEFAULT_SPEED;
22177
+ const signedProgress = direction === 'left' ? -scrollProgress * orbitCycles : scrollProgress * orbitCycles;
22178
+ return normalizePhase(signedProgress);
22179
+ }
22180
+
22181
+ export function SpiralList({
22182
+ settings,
22183
+ content,
22184
+ isEditor,
22185
+ isPreviewMode,
22186
+ }: SpiralListProps) {
22187
+ const { prefix: P } = useScopedStyles();
22188
+ const wrapperRef = useRef<HTMLDivElement>(null);
22189
+
22190
+ const width = resolveLayoutMetric(
22191
+ settings?.width ?? settings?.spread ?? settings?.wrapperWidth,
22192
+ DEFAULT_WIDTH,
22193
+ );
22194
+ const imageWidth = resolveLayoutMetric(settings?.imageWidth, DEFAULT_IMAGE_WIDTH);
22195
+ const turnHeight = resolveLayoutMetric(settings?.turnHeight, DEFAULT_TURN_HEIGHT);
22196
+ const itemsPerTurn = resolveCommonCount(settings?.itemsPerTurn, DEFAULT_ITEMS_PER_TURN, 3, 40);
22197
+ const turns = resolveCommonCount(settings?.turns, DEFAULT_TURNS, 1, 30);
22198
+ const depthFactor = Math.min(MAX_DEPTH_FACTOR, Math.max(0, DEPTH_FACTOR));
22199
+ const scatter = Math.min(1, Math.max(0, SCATTER));
22200
+ const speed = Math.max(0, settings?.speed ?? DEFAULT_SPEED);
22201
+ const direction = settings?.direction === 'left' ? 'left' : 'right';
22202
+ const playback = settings?.playback === 'scroll' ? 'scroll' : 'autoplay';
22203
+ const cornerRadius = settings?.cornerRadius ?? 0;
22204
+ const imageDisplay = useMemo(() => normalizeImageDisplay(settings?.imageDisplay), [settings?.imageDisplay]);
22205
+ const isCover = imageDisplay.display === 'cover';
22206
+
22207
+ const scaled = (value: number) => scalingValue(value, isEditor ?? false);
22208
+ const spreadFactor = useMemo(() => getSpreadFactor(depthFactor), [depthFactor]);
22209
+ const orbitRadius = useMemo(
22210
+ () => getOrbitRadius(width, imageWidth, isCover, scatter),
22211
+ [width, imageWidth, isCover, scatter],
22212
+ );
22213
+ const scopedCss = useMemo(
22214
+ () => getCSS(P, getOrbitKeyframes(P, scaled, width, orbitRadius, depthFactor, spreadFactor, isCover)),
22215
+ [P, width, orbitRadius, depthFactor, spreadFactor, isCover, isEditor],
22216
+ );
22217
+
22218
+ const mediaItems = useMemo(
22219
+ () => (content ?? []).filter((item) => Boolean(item.image?.url)),
22220
+ [content],
22221
+ );
22222
+
22223
+ const verticalStep = turnHeight / itemsPerTurn;
22224
+ const imageHeight = imageWidth * getAspectHeightFactor(imageDisplay);
22225
+ const visibleItems = Math.min(MAX_TOTAL_ITEMS, turns * itemsPerTurn);
22226
+ const overflowItems = OVERFLOW_TURNS * itemsPerTurn;
22227
+ const totalItems = visibleItems + overflowItems * 2;
22228
+ const spiralSpan = Math.max(0, turns - 1) * turnHeight + (itemsPerTurn - 1) * verticalStep;
22229
+ const wrapperHeight = spiralSpan;
22230
+
22231
+ const motionEnabled = speed > 0;
22232
+ const useScrollMotion = playback === 'scroll' && motionEnabled;
22233
+ const useCssAnimation = playback === 'autoplay' && motionEnabled && (isEditor ? Boolean(isPreviewMode) : true);
22234
+ const [scrollProgress, setScrollProgress] = useState(0);
22235
+
22236
+ useEffect(() => {
22237
+ if (!useScrollMotion) return;
22238
+ const element = wrapperRef.current;
22239
+ if (!element) return;
22240
+
22241
+ const update = () => {
22242
+ const rect = element.getBoundingClientRect();
22243
+ const viewportHeight = window.innerHeight || document.documentElement.clientHeight;
22244
+ const range = viewportHeight + rect.height;
22245
+ if (range <= 0) return;
22246
+ setScrollProgress(Math.min(1, Math.max(0, (viewportHeight - rect.top) / range)));
22247
+ };
22248
+
22249
+ update();
22250
+ window.addEventListener('scroll', update, { passive: true });
22251
+ window.addEventListener('resize', update);
22252
+ const resizeObserver = new ResizeObserver(update);
22253
+ resizeObserver.observe(element);
22254
+ return () => {
22255
+ window.removeEventListener('scroll', update);
22256
+ window.removeEventListener('resize', update);
22257
+ resizeObserver.disconnect();
22258
+ };
22259
+ }, [useScrollMotion]);
22260
+
22261
+ const scrollOrbitProgress = useScrollMotion ? getScrollOrbitProgress(scrollProgress, speed, direction) : 0;
22262
+ const durationSeconds = motionEnabled && playback === 'autoplay' ? 360 / (speed * DEG_PER_SEC_PER_SPEED_UNIT) : 0;
22263
+
22264
+ if (mediaItems.length === 0) {
22265
+ return (
22266
+ <>
22267
+ <style dangerouslySetInnerHTML={{ __html: scopedCss }} />
22268
+ <div className={\`\${P}-wrapper\`} style={{ width: scaled(width), marginInline: 'auto' }} />
22269
+ </>
22270
+ );
22271
+ }
22272
+
22273
+ return (
22274
+ <>
22275
+ <style dangerouslySetInnerHTML={{ __html: scopedCss }} />
22276
+ <div
22277
+ ref={wrapperRef}
22278
+ className={\`\${P}-wrapper\`}
22279
+ style={{
22280
+ width: scaled(width),
22281
+ height: scaled(wrapperHeight),
22282
+ marginInline: 'auto',
22283
+ }}
22284
+ >
22285
+ {Array.from({ length: totalItems }, (_, index) => {
22286
+ const logicalIndex = index - overflowItems;
22287
+ const item = mediaItems[mod(logicalIndex, mediaItems.length)];
22288
+ const media = item.image as SpiralMedia;
22289
+ const slotIndex = getOrbitSlotIndex(logicalIndex, itemsPerTurn);
22290
+ const phase = getOrbitPhase(logicalIndex, itemsPerTurn);
22291
+ const orbitPhase = useScrollMotion ? normalizePhase(phase + scrollOrbitProgress) : phase;
22292
+ const verticalOffset = getVerticalOffset(logicalIndex, itemsPerTurn, turnHeight, verticalStep);
22293
+ const verticalJitter = scatter === 0 ? 0 : (hashUnit(slotIndex + 7.3) - 0.5) * scatter * verticalStep;
22294
+ const sizeJitter = isCover
22295
+ ? 1
22296
+ : 1 + (hashUnit(slotIndex + 3.1) - 0.5) * 2 * SIZE_JITTER * (0.35 + scatter);
22297
+ const angle = orbitPhase * Math.PI * 2;
22298
+ const { offset, scale } = getOrbitPose(depthFactor, spreadFactor, angle);
22299
+ const itemWidth = imageWidth * sizeJitter;
22300
+ const layoutWidth = getOrbitLayoutWidth(itemWidth, scale);
22301
+ const centerX = getOrbitCenterX(width, orbitRadius, offset);
22302
+ const orbitCssVars = {
22303
+ '--spiral-base-w': scaled(itemWidth),
22304
+ ...(isCover ? { '--spiral-base-h': scaled(imageHeight) } : {}),
22305
+ } as CSSProperties;
22306
+
22307
+ const itemStyle: CSSProperties = {
22308
+ top: scaled(verticalOffset + verticalJitter),
22309
+ transform: 'translateY(-50%)',
22310
+ ...orbitCssVars,
22311
+ ...(useCssAnimation
22312
+ ? {
22313
+ animationDuration: \`\${round(durationSeconds)}s\`,
22314
+ animationDelay: getOrbitAnimationDelay(phase, durationSeconds, direction),
22315
+ animationDirection: direction === 'left' ? 'reverse' : 'normal',
22316
+ }
22317
+ : {
22318
+ left: getOrbitLeft(scaled, centerX, layoutWidth),
22319
+ width: scaled(layoutWidth),
22320
+ ...(isCover ? { height: scaled(imageHeight * scale) } : {}),
22321
+ zIndex: getOrbitZIndex(scale),
22322
+ }),
22323
+ };
22324
+
22325
+ const mediaStyle: CSSProperties = cornerRadius > 0 ? { borderRadius: scaled(cornerRadius) } : {};
22326
+ const coverMediaStyle: CSSProperties = isCover
22327
+ ? {
22328
+ ...mediaStyle,
22329
+ width: '100%',
22330
+ height: '100%',
22331
+ objectFit: 'cover',
22332
+ objectPosition: 'center',
22333
+ }
22334
+ : mediaStyle;
22335
+ const mediaNode = isVideoMedia(media) ? (
22336
+ <video
22337
+ className={\`\${P}-media\`}
22338
+ style={coverMediaStyle}
22339
+ src={media.url}
22340
+ muted
22341
+ loop
22342
+ autoPlay
22343
+ playsInline
22344
+ preload="auto"
22345
+ />
22346
+ ) : (
22347
+ <img
22348
+ className={\`\${P}-media\`}
22349
+ style={coverMediaStyle}
22350
+ src={media.url}
22351
+ alt={media.name ?? ''}
22352
+ loading="lazy"
22353
+ decoding="async"
22354
+ />
22355
+ );
22356
+
22357
+ return (
22358
+ <div
22359
+ key={\`\${turns}-\${itemsPerTurn}-\${logicalIndex}\`}
22360
+ className={useCssAnimation ? \`\${P}-item\` : \`\${P}-item \${P}-item-static\`}
22361
+ style={itemStyle}
22362
+ >
22363
+ {isCover ? (
22364
+ <div className={\`\${P}-cover\`} style={mediaStyle}>
22365
+ {mediaNode}
22366
+ </div>
22367
+ ) : (
22368
+ mediaNode
22369
+ )}
22370
+ </div>
22371
+ );
22372
+ })}
22373
+ </div>
22374
+ </>
22375
+ );
22376
+ }
22377
+ `,vb=["https://cdn.cntrl.site/component-assets/Mercury-default-1.jpg","https://cdn.cntrl.site/component-assets/Component-default-1.jpg","https://cdn.cntrl.site/component-assets/Mercury-default-7.jpg","https://cdn.cntrl.site/component-assets/Component-default-2.jpg","https://cdn.cntrl.site/component-assets/Mercury-default-2.jpg","https://cdn.cntrl.site/component-assets/Component-default-3.jpg","https://cdn.cntrl.site/component-assets/Mercury-default-8.jpg","https://cdn.cntrl.site/component-assets/Component-default-4.jpg","https://cdn.cntrl.site/component-assets/Mercury-default-3.jpg","https://cdn.cntrl.site/component-assets/Component-default-5.jpg","https://cdn.cntrl.site/component-assets/Mercury-default-9.jpg","https://cdn.cntrl.site/component-assets/Component-default-6.jpg","https://cdn.cntrl.site/component-assets/Mercury-default-4.jpg","https://cdn.cntrl.site/component-assets/Component-default-7.jpg","https://cdn.cntrl.site/component-assets/Mercury-default-10.jpg","https://cdn.cntrl.site/component-assets/Mercury-default-5.jpg"],bb={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0,allowsVideo:!0},display:{type:"array"},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"]}}}}},default:vb.map(e=>({image:{url:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},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"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},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"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999}},defaults:{itemsPerTurn:13,turns:4,direction:"right",playback:"autoplay",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:1120/1440,imageWidth:140/1440,turnHeight:550/1440,speed:2.8,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:300/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:450/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["direction","speed"]},{type:"row",items:["playback"]}]}]},xb={element:fb,id:"spiral-list",name:"Spiral",category:"lists",layoutMode:"structured",version:1,defaultSize:{d:{width:720,height:540}},schema:bb,sourceCode:yb,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},wb=[pp,bp,Dy,um,xm,Em,Xm,ng,cg,Fg,Ih,Mf,Hf,xy,Py,Jy,Kv,cv,u0,z0,xb];exports.components=wb;exports.isSchemaV1=id;