@cntrl-site/components 1.0.65-alpha.5 → 1.0.66-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.
Files changed (3) hide show
  1. package/dist/index.js +392 -118
  2. package/dist/index.mjs +8117 -7752
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),pt=require("classnames"),W=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),zn=require("react-dom");function vu(e){return e.type==="object"&&e.version===1}const xu="ControlSlider-module__wrapper___sHEkd",bu="ControlSlider-module__hoverArrow___A-dOH",wu="ControlSlider-module__sliderItem___QQSkR",Su="ControlSlider-module__sliderImage___9hRl-",Cu="ControlSlider-module__arrow___05ghY",$u="ControlSlider-module__arrowVertical___tBfVN",Tu="ControlSlider-module__nextArrow___-30Yc",Iu="ControlSlider-module__arrowInner___aEra3",Ru="ControlSlider-module__arrowIcon___S4ztF",Lu="ControlSlider-module__arrowImg___2dwJW",Pu="ControlSlider-module__mirror___brd6U",Eu="ControlSlider-module__pagination___bicLF",Mu="ControlSlider-module__paginationInner___bT-P-",ku="ControlSlider-module__paginationVertical___zYqKw",Au="ControlSlider-module__paginationItem___nTRbk",Fu="ControlSlider-module__dot___p1Qun",_u="ControlSlider-module__activeDot___LHFaj",Nu="ControlSlider-module__paginationInsideBottom___R3FWn",Wu="ControlSlider-module__paginationInsideTop___V-qb-",Hu="ControlSlider-module__paginationOutsideBottom___14w8D",Du="ControlSlider-module__paginationOutsideTop___SCLqB",Ou="ControlSlider-module__paginationInsideLeft___yOBRZ",Bu="ControlSlider-module__paginationInsideRight___Rtt3o",zu="ControlSlider-module__paginationOutsideLeft___lahaw",ju="ControlSlider-module__paginationOutsideRight___EtuQa",Vu="ControlSlider-module__imgWrapper___UjEgB",Gu="ControlSlider-module__captionBlock___dJ6-j",Xu="ControlSlider-module__captionTextWrapper___HFlpf",qu="ControlSlider-module__captionText___uGBVc",Yu="ControlSlider-module__active___WZK4G",Uu="ControlSlider-module__withPointerEvents___t-18M",Ku="ControlSlider-module__topLeftAlignment___zjnGM",Zu="ControlSlider-module__topCenterAlignment___gD1xW",Ju="ControlSlider-module__topRightAlignment___NMapS",Qu="ControlSlider-module__middleLeftAlignment___OnUrY",ep="ControlSlider-module__middleCenterAlignment___Tdkl0",tp="ControlSlider-module__middleRightAlignment___wEbfX",np="ControlSlider-module__bottomLeftAlignment___cTP2-",ip="ControlSlider-module__bottomCenterAlignment___c54fB",op="ControlSlider-module__bottomRightAlignment___kEwrz",rp="ControlSlider-module__clickOverlay___DZA28",ap="ControlSlider-module__contain___pLyq7",sp="ControlSlider-module__cover___KdDat",dt={wrapper:xu,hoverArrow:bu,sliderItem:wu,sliderImage:Su,arrow:Cu,arrowVertical:$u,nextArrow:Tu,arrowInner:Iu,arrowIcon:Ru,arrowImg:Lu,mirror:Pu,pagination:Eu,paginationInner:Mu,paginationVertical:ku,paginationItem:Au,dot:Fu,activeDot:_u,paginationInsideBottom:Nu,paginationInsideTop:Wu,paginationOutsideBottom:Hu,paginationOutsideTop:Du,paginationInsideLeft:Ou,paginationInsideRight:Bu,paginationOutsideLeft:zu,paginationOutsideRight:ju,imgWrapper:Vu,captionBlock:Gu,captionTextWrapper:Xu,captionText:qu,active:Yu,withPointerEvents:Uu,topLeftAlignment:Ku,topCenterAlignment:Zu,topRightAlignment:Ju,middleLeftAlignment:Qu,middleCenterAlignment:ep,middleRightAlignment:tp,bottomLeftAlignment:np,bottomCenterAlignment:ip,bottomRightAlignment:op,clickOverlay:rp,contain:ap,cover:sp};function lp(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 cp(e,t,n){return t&&lp(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Js="(prefers-reduced-motion: reduce)",Bi=1,dp=2,qi=3,ao=4,Vo=5,Sr=6,Mr=7,up={CREATED:Bi,MOUNTED:dp,IDLE:qi,MOVING:ao,SCROLLING:Vo,DRAGGING:Sr,DESTROYED:Mr};function On(e){e.length=0}function ri(e,t,n){return Array.prototype.slice.call(e,t,n)}function Yt(e){return e.bind.apply(e,[null].concat(ri(arguments,1)))}var _c=setTimeout,Xa=function(){};function Qs(e){return requestAnimationFrame(e)}function Xr(e,t){return typeof t===e}function Po(e){return!ys(e)&&Xr("object",e)}var fs=Array.isArray,Nc=Yt(Xr,"function"),ti=Yt(Xr,"string"),Go=Yt(Xr,"undefined");function ys(e){return e===null}function Wc(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Xo(e){return fs(e)?e:[e]}function xn(e,t){Xo(e).forEach(t)}function vs(e,t){return e.indexOf(t)>-1}function Cr(e,t){return e.push.apply(e,Xo(t)),e}function _n(e,t,n){e&&xn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function En(e,t){_n(e,ti(t)?t.split(" "):t,!0)}function qo(e,t){xn(t,e.appendChild.bind(e))}function xs(e,t){xn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Eo(e,t){return Wc(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Hc(e,t){var n=e?ri(e.children):[];return t?n.filter(function(i){return Eo(i,t)}):n}function Yo(e,t){return t?Hc(e,t)[0]:e.firstElementChild}var Mo=Object.keys;function Ci(e,t,n){return e&&(n?Mo(e).reverse():Mo(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function ko(e){return ri(arguments,1).forEach(function(t){Ci(t,function(n,i){e[i]=t[i]})}),e}function Yn(e){return ri(arguments,1).forEach(function(t){Ci(t,function(n,i){fs(n)?e[i]=n.slice():Po(n)?e[i]=Yn({},Po(e[i])?e[i]:{},n):e[i]=n})}),e}function el(e,t){xn(t||Mo(e),function(n){delete e[n]})}function Mn(e,t){xn(e,function(n){xn(t,function(i){n&&n.removeAttribute(i)})})}function $t(e,t,n){Po(t)?Ci(t,function(i,o){$t(e,o,i)}):xn(e,function(i){ys(n)||n===""?Mn(i,t):i.setAttribute(t,String(n))})}function ji(e,t,n){var i=document.createElement(e);return t&&(ti(t)?En(i,t):$t(i,t)),n&&qo(n,i),i}function wn(e,t,n){if(Go(n))return getComputedStyle(e)[t];ys(n)||(e.style[t]=""+n)}function Ao(e,t){wn(e,"display",t)}function Dc(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Sn(e,t){return e.getAttribute(t)}function tl(e,t){return e&&e.classList.contains(t)}function hn(e){return e.getBoundingClientRect()}function Ti(e){xn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Oc(e){return Yo(new DOMParser().parseFromString(e,"text/html").body)}function Fn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Bc(e,t){return e&&e.querySelector(t)}function bs(e,t){return t?ri(e.querySelectorAll(t)):[]}function Nn(e,t){_n(e,t,!1)}function qa(e){return e.timeStamp}function ui(e){return ti(e)?e:e?e+"px":""}var Uo="splide",ws="data-"+Uo;function To(e,t){if(!e)throw new Error("["+Uo+"] "+(t||""))}var ni=Math.min,kr=Math.max,Ar=Math.floor,Fo=Math.ceil,dn=Math.abs;function zc(e,t,n){return dn(e-t)<n}function $r(e,t,n,i){var o=ni(t,n),r=kr(t,n);return i?o<e&&e<r:o<=e&&e<=r}function Wi(e,t,n){var i=ni(t,n),o=kr(t,n);return ni(kr(i,e),o)}function Ya(e){return+(e>0)-+(e<0)}function Ua(e,t){return xn(t,function(n){e=e.replace("%s",""+n)}),e}function Ss(e){return e<10?"0"+e:""+e}var nl={};function pp(e){return""+e+Ss(nl[e]=(nl[e]||0)+1)}function jc(){var e=[];function t(l,d,c,u){o(l,d,function(p,v,w){var m="addEventListener"in p,h=m?p.removeEventListener.bind(p,v,c,u):p.removeListener.bind(p,c);m?p.addEventListener(v,c,u):p.addListener(c),e.push([p,v,w,c,h])})}function n(l,d,c){o(l,d,function(u,p,v){e=e.filter(function(w){return w[0]===u&&w[1]===p&&w[2]===v&&(!c||w[3]===c)?(w[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){xn(l,function(u){u&&xn(d,function(p){p.split(" ").forEach(function(v){var w=v.split(".");c(u,w[0],w[1])})})})}function r(){e.forEach(function(l){l[4]()}),On(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var ai="mounted",Ka="ready",Bn="move",so="moved",Cs="click",Vc="active",Gc="inactive",Xc="visible",qc="hidden",en="refresh",ln="updated",Yi="resize",qr="resized",Yc="drag",Uc="dragging",Kc="dragged",Yr="scroll",Li="scrolled",mp="overflow",$s="destroy",Zc="arrows:mounted",Jc="arrows:updated",Qc="pagination:mounted",ed="pagination:updated",Ts="navigation:mounted",Is="autoplay:play",td="autoplay:playing",Rs="autoplay:pause",Ls="lazyload:loaded",nd="sk",id="sh",Fr="ei";function Zt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=jc();function i(r,l){n.bind(t,Xo(r).join(" "),function(d){l.apply(l,fs(d.detail)?d.detail:[])})}function o(r){n.dispatch(t,r,ri(arguments,1))}return e&&e.event.on($s,n.destroy),ko(n,{bus:t,on:i,off:Yt(n.unbind,t),emit:o})}function Ur(e,t,n,i){var o=Date.now,r,l=0,d,c=!0,u=0;function p(){if(!c){if(l=e?ni((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return w();d=Qs(p)}}function v(C){C||h(),r=o()-(C?l*e:0),c=!1,d=Qs(p)}function w(){c=!0}function m(){r=o(),l=0,n&&n(l)}function h(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function f(C){e=C}function x(){return c}return{start:v,rewind:m,pause:w,cancel:h,set:f,isPaused:x}}function gp(e){var t=e;function n(o){t=o}function i(o){return vs(Xo(o),t)}return{set:n,is:i}}function hp(e,t){var n=Ur(0,e,null,1);return function(){n.isPaused()&&n.start()}}function fp(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=jc(),d=[];function c(){var h=n.mediaQuery==="min";Mo(o).sort(function(f,x){return h?+f-+x:+x-+f}).forEach(function(f){p(o[f],"("+(h?"min":"max")+"-width:"+f+"px)")}),p(r,Js),v()}function u(h){h&&l.destroy()}function p(h,f){var x=matchMedia(f);l.bind(x,"change",v),d.push([h,x])}function v(){var h=i.is(Mr),f=n.direction,x=d.reduce(function(C,y){return Yn(C,y[1].matches?y[0]:{})},{});el(n),m(x),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):f!==n.direction&&e.refresh()}function w(h){matchMedia(Js).matches&&(h?Yn(n,r):el(n,Mo(r)))}function m(h,f,x){Yn(n,h),f&&Yn(Object.getPrototypeOf(n),h),(x||!i.is(Bi))&&e.emit(ln,n)}return{setup:c,destroy:u,reduce:w,set:m}}var Kr="Arrow",Zr=Kr+"Left",Jr=Kr+"Right",od=Kr+"Up",rd=Kr+"Down",il="rtl",Qr="ttb",pa={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[od,Jr],ArrowRight:[rd,Zr]};function yp(e,t,n){function i(r,l,d){d=d||n.direction;var c=d===il&&!l?1:d===Qr?0:-1;return pa[r]&&pa[r][c]||r.replace(/width|left|right/i,function(u,p){var v=pa[u.toLowerCase()][c]||u;return p>0?v.charAt(0).toUpperCase()+v.slice(1):v})}function o(r){return r*(n.direction===il?1:-1)}return{resolve:i,orient:o}}var Wn="role",Vi="tabindex",vp="disabled",Cn="aria-",Ko=Cn+"controls",ad=Cn+"current",ol=Cn+"selected",yn=Cn+"label",Ps=Cn+"labelledby",sd=Cn+"hidden",Es=Cn+"orientation",_o=Cn+"roledescription",rl=Cn+"live",al=Cn+"busy",sl=Cn+"atomic",Ms=[Wn,Vi,vp,Ko,ad,yn,Ps,sd,Es,_o],kn=Uo+"__",si="is-",ma=Uo,ll=kn+"track",xp=kn+"list",ea=kn+"slide",ld=ea+"--clone",bp=ea+"__container",ks=kn+"arrows",ta=kn+"arrow",cd=ta+"--prev",dd=ta+"--next",na=kn+"pagination",ud=na+"__page",wp=kn+"progress",Sp=wp+"__bar",Cp=kn+"toggle",$p=kn+"spinner",Tp=kn+"sr",Ip=si+"initialized",Ii=si+"active",pd=si+"prev",md=si+"next",Za=si+"visible",Ja=si+"loading",gd=si+"focus-in",hd=si+"overflow",Rp=[Ii,Za,pd,md,Ja,gd,hd],Lp={slide:ea,clone:ld,arrows:ks,arrow:ta,prev:cd,next:dd,pagination:na,page:ud,spinner:$p};function Pp(e,t){if(Nc(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Eo(n,t);)n=n.parentElement;return n}var Ep=5,cl=200,fd="touchstart mousedown",ga="touchmove mousemove",ha="touchend touchcancel mouseup click";function Mp(e,t,n){var i=Zt(e),o=i.on,r=i.bind,l=e.root,d=n.i18n,c={},u=[],p=[],v=[],w,m,h;function f(){S(),z(),y()}function x(){o(en,C),o(en,f),o(ln,y),r(document,fd+" keydown",function(B){h=B.type==="keydown"},{capture:!0}),r(l,"focusin",function(){_n(l,gd,!!h)})}function C(B){var T=Ms.concat("style");On(u),Nn(l,p),Nn(w,v),Mn([w,m],T),Mn(l,B?T:["style",_o])}function y(){Nn(l,p),Nn(w,v),p=Y(ma),v=Y(ll),En(l,p),En(w,v),$t(l,yn,n.label),$t(l,Ps,n.labelledby)}function S(){w=N("."+ll),m=Yo(w,"."+xp),To(w&&m,"A track/list element is missing."),Cr(u,Hc(m,"."+ea+":not(."+ld+")")),Ci({arrows:ks,pagination:na,prev:cd,next:dd,bar:Sp,toggle:Cp},function(B,T){c[T]=N("."+B)}),ko(c,{root:l,track:w,list:m,slides:u})}function z(){var B=l.id||pp(Uo),T=n.role;l.id=B,w.id=w.id||B+"-track",m.id=m.id||B+"-list",!Sn(l,Wn)&&l.tagName!=="SECTION"&&T&&$t(l,Wn,T),$t(l,_o,d.carousel),$t(m,Wn,"presentation")}function N(B){var T=Bc(l,B);return T&&Pp(T,"."+ma)===l?T:void 0}function Y(B){return[B+"--"+n.type,B+"--"+n.direction,n.drag&&B+"--draggable",n.isNavigation&&B+"--nav",B===ma&&Ii]}return ko(c,{setup:f,mount:x,destroy:C})}var Ui="slide",lo="loop",Zo="fade";function kp(e,t,n,i){var o=Zt(e),r=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,p=e.options,v=p.isNavigation,w=p.updateOnMove,m=p.i18n,h=p.pagination,f=p.slideFocus,x=c.Direction.resolve,C=Sn(i,"style"),y=Sn(i,yn),S=n>-1,z=Yo(i,"."+bp),N;function Y(){S||(i.id=u.id+"-slide"+Ss(t+1),$t(i,Wn,h?"tabpanel":"group"),$t(i,_o,m.slide),$t(i,yn,y||Ua(m.slideLabel,[t+1,e.length]))),B()}function B(){d(i,"click",Yt(l,Cs,ie)),d(i,"keydown",Yt(l,nd,ie)),r([so,id,Li],I),r(Ts,H),w&&r(Bn,$)}function T(){N=!0,o.destroy(),Nn(i,Rp),Mn(i,Ms),$t(i,"style",C),$t(i,yn,y||"")}function H(){var L=e.splides.map(function(_){var V=_.splide.Components.Slides.getAt(t);return V?V.slide.id:""}).join(" ");$t(i,yn,Ua(m.slideX,(S?n:t)+1)),$t(i,Ko,L),$t(i,Wn,f?"button":""),f&&Mn(i,_o)}function $(){N||I()}function I(){if(!N){var L=e.index;P(),M(),_n(i,pd,t===L-1),_n(i,md,t===L+1)}}function P(){var L=D();L!==tl(i,Ii)&&(_n(i,Ii,L),$t(i,ad,v&&L||""),l(L?Vc:Gc,ie))}function M(){var L=A(),_=!L&&(!D()||S);if(e.state.is([ao,Vo])||$t(i,sd,_||""),$t(bs(i,p.focusableNodes||""),Vi,_?-1:""),f&&$t(i,Vi,_?-1:0),L!==tl(i,Za)&&(_n(i,Za,L),l(L?Xc:qc,ie)),!L&&document.activeElement===i){var V=c.Slides.getAt(e.index);V&&Dc(V.slide)}}function g(L,_,V){wn(V&&z||i,L,_)}function D(){var L=e.index;return L===t||p.cloneStatus&&L===n}function A(){if(e.is(Zo))return D();var L=hn(c.Elements.track),_=hn(i),V=x("left",!0),se=x("right",!0);return Ar(L[V])<=Fo(_[V])&&Ar(_[se])<=Fo(L[se])}function X(L,_){var V=dn(L-t);return!S&&(p.rewind||e.is(lo))&&(V=ni(V,e.length-V)),V<=_}var ie={index:t,slideIndex:n,slide:i,container:z,isClone:S,mount:Y,destroy:T,update:I,style:g,isWithin:X};return ie}function Ap(e,t,n){var i=Zt(e),o=i.on,r=i.emit,l=i.bind,d=t.Elements,c=d.slides,u=d.list,p=[];function v(){w(),o(en,m),o(en,w)}function w(){c.forEach(function(I,P){f(I,P,-1)})}function m(){N(function(I){I.destroy()}),On(p)}function h(){N(function(I){I.update()})}function f(I,P,M){var g=kp(e,P,M,I);g.mount(),p.push(g),p.sort(function(D,A){return D.index-A.index})}function x(I){return I?Y(function(P){return!P.isClone}):p}function C(I){var P=t.Controller,M=P.toIndex(I),g=P.hasFocus()?1:n.perPage;return Y(function(D){return $r(D.index,M,M+g-1)})}function y(I){return Y(I)[0]}function S(I,P){xn(I,function(M){if(ti(M)&&(M=Oc(M)),Wc(M)){var g=c[P];g?xs(M,g):qo(u,M),En(M,n.classes.slide),T(M,Yt(r,Yi))}}),r(en)}function z(I){Ti(Y(I).map(function(P){return P.slide})),r(en)}function N(I,P){x(P).forEach(I)}function Y(I){return p.filter(Nc(I)?I:function(P){return ti(I)?Eo(P.slide,I):vs(Xo(I),P.index)})}function B(I,P,M){N(function(g){g.style(I,P,M)})}function T(I,P){var M=bs(I,"img"),g=M.length;g?M.forEach(function(D){l(D,"load error",function(){--g||P()})}):P()}function H(I){return I?c.length:p.length}function $(){return p.length>n.perPage}return{mount:v,destroy:m,update:h,register:f,get:x,getIn:C,getAt:y,add:S,remove:z,forEach:N,filter:Y,style:B,getLength:H,isEnough:$}}function Fp(e,t,n){var i=Zt(e),o=i.on,r=i.bind,l=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,p=u.root,v=u.track,w=u.list,m=d.getAt,h=d.style,f,x,C;function y(){S(),r(window,"resize load",hp(Yt(l,Yi))),o([ln,en],S),o(Yi,z)}function S(){f=n.direction===Qr,wn(p,"maxWidth",ui(n.width)),wn(v,c("paddingLeft"),N(!1)),wn(v,c("paddingRight"),N(!0)),z(!0)}function z(ie){var L=hn(p);(ie||x.width!==L.width||x.height!==L.height)&&(wn(v,"height",Y()),h(c("marginRight"),ui(n.gap)),h("width",T()),h("height",H(),!0),x=L,l(qr),C!==(C=X())&&(_n(p,hd,C),l(mp,C)))}function N(ie){var L=n.padding,_=c(ie?"right":"left");return L&&ui(L[_]||(Po(L)?0:L))||"0px"}function Y(){var ie="";return f&&(ie=B(),To(ie,"height or heightRatio is missing."),ie="calc("+ie+" - "+N(!1)+" - "+N(!0)+")"),ie}function B(){return ui(n.height||hn(w).width*n.heightRatio)}function T(){return n.autoWidth?null:ui(n.fixedWidth)||(f?"":$())}function H(){return ui(n.fixedHeight)||(f?n.autoHeight?null:$():B())}function $(){var ie=ui(n.gap);return"calc((100%"+(ie&&" + "+ie)+")/"+(n.perPage||1)+(ie&&" - "+ie)+")"}function I(){return hn(w)[c("width")]}function P(ie,L){var _=m(ie||0);return _?hn(_.slide)[c("width")]+(L?0:D()):0}function M(ie,L){var _=m(ie);if(_){var V=hn(_.slide)[c("right")],se=hn(w)[c("left")];return dn(V-se)+(L?0:D())}return 0}function g(ie){return M(e.length-1)-M(0)+P(0,ie)}function D(){var ie=m(0);return ie&&parseFloat(wn(ie.slide,c("marginRight")))||0}function A(ie){return parseFloat(wn(v,c("padding"+(ie?"Right":"Left"))))||0}function X(){return e.is(Zo)||g(!0)>I()}return{mount:y,resize:z,listSize:I,slideSize:P,sliderSize:g,totalSize:M,getPadding:A,isOverflow:X}}var _p=2;function Np(e,t,n){var i=Zt(e),o=i.on,r=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function p(){o(en,v),o([ln,Yi],m),(u=x())&&(h(u),t.Layout.resize(!0))}function v(){w(),p()}function w(){Ti(c),On(c),i.destroy()}function m(){var C=x();u!==C&&(u<C||!C)&&i.emit(en)}function h(C){var y=l.get().slice(),S=y.length;if(S){for(;y.length<C;)Cr(y,y);Cr(y.slice(-C),y.slice(0,C)).forEach(function(z,N){var Y=N<C,B=f(z.slide,N);Y?xs(B,y[0].slide):qo(r.list,B),Cr(c,B),l.register(B,N-C+(Y?0:S),z.index)})}}function f(C,y){var S=C.cloneNode(!0);return En(S,n.classes.clone),S.id=e.root.id+"-clone"+Ss(y+1),S}function x(){var C=n.clones;if(!e.is(lo))C=0;else if(Go(C)){var y=n[d("fixedWidth")]&&t.Layout.slideSize(0),S=y&&Fo(hn(r.track)[d("width")]/y);C=S||n[d("autoWidth")]&&e.length||n.perPage*_p}return C}return{mount:p,destroy:w}}function Wp(e,t,n){var i=Zt(e),o=i.on,r=i.emit,l=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,p=d.totalSize,v=d.listSize,w=d.sliderSize,m=t.Direction,h=m.resolve,f=m.orient,x=t.Elements,C=x.list,y=x.track,S;function z(){S=t.Transition,o([ai,qr,ln,en],N)}function N(){t.Controller.isBusy()||(t.Scroll.cancel(),B(e.index),t.Slides.update())}function Y(_,V,se,re){_!==V&&ie(_>se)&&(I(),T($(g(),_>se),!0)),l(ao),r(Bn,V,se,_),S.start(V,function(){l(qi),r(so,V,se,_),re&&re()})}function B(_){T(M(_,!0))}function T(_,V){if(!e.is(Zo)){var se=V?_:H(_);wn(C,"transform","translate"+h("X")+"("+se+"px)"),_!==se&&r(id)}}function H(_){if(e.is(lo)){var V=P(_),se=V>t.Controller.getEnd(),re=V<0;(re||se)&&(_=$(_,se))}return _}function $(_,V){var se=_-X(V),re=w();return _-=f(re*(Fo(dn(se)/re)||1))*(V?1:-1),_}function I(){T(g(),!0),S.cancel()}function P(_){for(var V=t.Slides.get(),se=0,re=1/0,k=0;k<V.length;k++){var le=V[k].index,G=dn(M(le,!0)-_);if(G<=re)re=G,se=le;else break}return se}function M(_,V){var se=f(p(_-1)-A(_));return V?D(se):se}function g(){var _=h("left");return hn(C)[_]-hn(y)[_]+f(u(!1))}function D(_){return n.trimSpace&&e.is(Ui)&&(_=Wi(_,0,f(w(!0)-v()))),_}function A(_){var V=n.focus;return V==="center"?(v()-c(_,!0))/2:+V*c(_)||0}function X(_){return M(_?t.Controller.getEnd():0,!!n.trimSpace)}function ie(_){var V=f($(g(),_));return _?V>=0:V<=C[h("scrollWidth")]-hn(y)[h("width")]}function L(_,V){V=Go(V)?g():V;var se=_!==!0&&f(V)<f(X(!1)),re=_!==!1&&f(V)>f(X(!0));return se||re}return{mount:z,move:Y,jump:B,translate:T,shift:$,cancel:I,toIndex:P,toPosition:M,getPosition:g,getLimit:X,exceededLimit:L,reposition:N}}function Hp(e,t,n){var i=Zt(e),o=i.on,r=i.emit,l=t.Move,d=l.getPosition,c=l.getLimit,u=l.toPosition,p=t.Slides,v=p.isEnough,w=p.getLength,m=n.omitEnd,h=e.is(lo),f=e.is(Ui),x=Yt(g,!1),C=Yt(g,!0),y=n.start||0,S,z=y,N,Y,B;function T(){H(),o([ln,en,Fr],H),o(qr,$)}function H(){N=w(!0),Y=n.perMove,B=n.perPage,S=ie();var G=Wi(y,0,m?S:N-1);G!==y&&(y=G,l.reposition())}function $(){S!==ie()&&r(Fr)}function I(G,b,E){if(!le()){var j=M(G),me=X(j);me>-1&&(b||me!==y)&&(se(me),l.move(j,me,z,E))}}function P(G,b,E,j){t.Scroll.scroll(G,b,E,function(){var me=X(l.toIndex(d()));se(m?ni(me,S):me),j&&j()})}function M(G){var b=y;if(ti(G)){var E=G.match(/([+\-<>])(\d+)?/)||[],j=E[1],me=E[2];j==="+"||j==="-"?b=D(y+ +(""+j+(+me||1)),y):j===">"?b=me?L(+me):x(!0):j==="<"&&(b=C(!0))}else b=h?G:Wi(G,0,S);return b}function g(G,b){var E=Y||(k()?1:B),j=D(y+E*(G?-1:1),y,!(Y||k()));return j===-1&&f&&!zc(d(),c(!G),1)?G?0:S:b?j:X(j)}function D(G,b,E){if(v()||k()){var j=A(G);j!==G&&(b=G,G=j,E=!1),G<0||G>S?!Y&&($r(0,G,b,!0)||$r(S,b,G,!0))?G=L(_(G)):h?G=E?G<0?-(N%B||B):N:G:n.rewind?G=G<0?S:0:G=-1:E&&G!==b&&(G=L(_(b)+(G<b?-1:1)))}else G=-1;return G}function A(G){if(f&&n.trimSpace==="move"&&G!==y)for(var b=d();b===u(G,!0)&&$r(G,0,e.length-1,!n.rewind);)G<y?--G:++G;return G}function X(G){return h?(G+N)%N||0:G}function ie(){for(var G=N-(k()||h&&Y?1:B);m&&G-- >0;)if(u(N-1,!0)!==u(G,!0)){G++;break}return Wi(G,0,N-1)}function L(G){return Wi(k()?G:B*G,0,S)}function _(G){return k()?ni(G,S):Ar((G>=S?N-1:G)/B)}function V(G){var b=l.toIndex(G);return f?Wi(b,0,S):b}function se(G){G!==y&&(z=y,y=G)}function re(G){return G?z:y}function k(){return!Go(n.focus)||n.isNavigation}function le(){return e.state.is([ao,Vo])&&!!n.waitForTransition}return{mount:T,go:I,scroll:P,getNext:x,getPrev:C,getAdjacent:g,getEnd:ie,setIndex:se,getIndex:re,toIndex:L,toPage:_,toDest:V,hasFocus:k,isBusy:le}}var Dp="http://www.w3.org/2000/svg",Op="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",rr=40;function Bp(e,t,n){var i=Zt(e),o=i.on,r=i.bind,l=i.emit,d=n.classes,c=n.i18n,u=t.Elements,p=t.Controller,v=u.arrows,w=u.track,m=v,h=u.prev,f=u.next,x,C,y={};function S(){N(),o(ln,z)}function z(){Y(),S()}function N(){var P=n.arrows;P&&!(h&&f)&&H(),h&&f&&(ko(y,{prev:h,next:f}),Ao(m,P?"":"none"),En(m,C=ks+"--"+n.direction),P&&(B(),I(),$t([h,f],Ko,w.id),l(Zc,h,f)))}function Y(){i.destroy(),Nn(m,C),x?(Ti(v?[h,f]:m),h=f=null):Mn([h,f],Ms)}function B(){o([ai,so,en,Li,Fr],I),r(f,"click",Yt(T,">")),r(h,"click",Yt(T,"<"))}function T(P){p.go(P,!0)}function H(){m=v||ji("div",d.arrows),h=$(!0),f=$(!1),x=!0,qo(m,[h,f]),!v&&xs(m,w)}function $(P){var M='<button class="'+d.arrow+" "+(P?d.prev:d.next)+'" type="button"><svg xmlns="'+Dp+'" viewBox="0 0 '+rr+" "+rr+'" width="'+rr+'" height="'+rr+'" focusable="false"><path d="'+(n.arrowPath||Op)+'" />';return Oc(M)}function I(){if(h&&f){var P=e.index,M=p.getPrev(),g=p.getNext(),D=M>-1&&P<M?c.last:c.prev,A=g>-1&&P>g?c.first:c.next;h.disabled=M<0,f.disabled=g<0,$t(h,yn,D),$t(f,yn,A),l(Jc,h,f,M,g)}}return{arrows:y,mount:S,destroy:Y,update:I}}var zp=ws+"-interval";function jp(e,t,n){var i=Zt(e),o=i.on,r=i.bind,l=i.emit,d=Ur(n.interval,e.go.bind(e,">"),B),c=d.isPaused,u=t.Elements,p=t.Elements,v=p.root,w=p.toggle,m=n.autoplay,h,f,x=m==="pause";function C(){m&&(y(),w&&$t(w,Ko,u.track.id),x||S(),Y())}function y(){n.pauseOnHover&&r(v,"mouseenter mouseleave",function(H){h=H.type==="mouseenter",N()}),n.pauseOnFocus&&r(v,"focusin focusout",function(H){f=H.type==="focusin",N()}),w&&r(w,"click",function(){x?S():z(!0)}),o([Bn,Yr,en],d.rewind),o(Bn,T)}function S(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),f=h=x=!1,Y(),l(Is))}function z(H){H===void 0&&(H=!0),x=!!H,Y(),c()||(d.pause(),l(Rs))}function N(){x||(h||f?z(!1):S())}function Y(){w&&(_n(w,Ii,!x),$t(w,yn,n.i18n[x?"play":"pause"]))}function B(H){var $=u.bar;$&&wn($,"width",H*100+"%"),l(td,H)}function T(H){var $=t.Slides.getAt(H);d.set($&&+Sn($.slide,zp)||n.interval)}return{mount:C,destroy:d.cancel,play:S,pause:z,isPaused:c}}function Vp(e,t,n){var i=Zt(e),o=i.on;function r(){n.cover&&(o(Ls,Yt(d,!0)),o([ai,ln,en],Yt(l,!0)))}function l(c){t.Slides.forEach(function(u){var p=Yo(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),Ao(u,c?"none":"")}return{mount:r,destroy:Yt(l,!1)}}var Gp=10,Xp=600,qp=.6,Yp=1.5,Up=800;function Kp(e,t,n){var i=Zt(e),o=i.on,r=i.emit,l=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,p=d.exceededLimit,v=d.translate,w=e.is(Ui),m,h,f=1;function x(){o(Bn,z),o([ln,en],N)}function C(B,T,H,$,I){var P=c();if(z(),H&&(!w||!p())){var M=t.Layout.sliderSize(),g=Ya(B)*M*Ar(dn(B)/M)||0;B=d.toPosition(t.Controller.toDest(B%M))+g}var D=zc(P,B,1);f=1,T=D?0:T||kr(dn(B-P)/Yp,Up),h=$,m=Ur(T,y,Yt(S,P,B,I),1),l(Vo),r(Yr),m.start()}function y(){l(qi),h&&h(),r(Li)}function S(B,T,H,$){var I=c(),P=B+(T-B)*Y($),M=(P-I)*f;v(I+M),w&&!H&&p()&&(f*=qp,dn(M)<Gp&&C(u(p(!0)),Xp,!1,h,!0))}function z(){m&&m.cancel()}function N(){m&&!m.isPaused()&&(z(),y())}function Y(B){var T=n.easingFunc;return T?T(B):1-Math.pow(1-B,4)}return{mount:x,destroy:z,scroll:C,cancel:N}}var Hi={passive:!1,capture:!0};function Zp(e,t,n){var i=Zt(e),o=i.on,r=i.emit,l=i.bind,d=i.unbind,c=e.state,u=t.Move,p=t.Scroll,v=t.Controller,w=t.Elements.track,m=t.Media.reduce,h=t.Direction,f=h.resolve,x=h.orient,C=u.getPosition,y=u.exceededLimit,S,z,N,Y,B,T=!1,H,$,I;function P(){l(w,ga,Xa,Hi),l(w,ha,Xa,Hi),l(w,fd,g,Hi),l(w,"click",X,{capture:!0}),l(w,"dragstart",Fn),o([ai,ln],M)}function M(){var O=n.drag;te(!O),Y=O==="free"}function g(O){if(H=!1,!$){var J=me(O);j(O.target)&&(J||!O.button)&&(v.isBusy()?Fn(O,!0):(I=J?w:window,B=c.is([ao,Vo]),N=null,l(I,ga,D,Hi),l(I,ha,A,Hi),u.cancel(),p.cancel(),ie(O)))}}function D(O){if(c.is(Sr)||(c.set(Sr),r(Yc)),O.cancelable)if(B){u.translate(S+E(k(O)));var J=le(O)>cl,ne=T!==(T=y());(J||ne)&&ie(O),H=!0,r(Uc),Fn(O)}else V(O)&&(B=_(O),Fn(O))}function A(O){c.is(Sr)&&(c.set(qi),r(Kc)),B&&(L(O),Fn(O)),d(I,ga,D),d(I,ha,A),B=!1}function X(O){!$&&H&&Fn(O,!0)}function ie(O){N=z,z=O,S=C()}function L(O){var J=se(O),ne=re(J),Pe=n.rewind&&n.rewindByDrag;m(!1),Y?v.scroll(ne,0,n.snap):e.is(Zo)?v.go(x(Ya(J))<0?Pe?"<":"-":Pe?">":"+"):e.is(Ui)&&T&&Pe?v.go(y(!0)?">":"<"):v.go(v.toDest(ne),!0),m(!0)}function _(O){var J=n.dragMinThreshold,ne=Po(J),Pe=ne&&J.mouse||0,be=(ne?J.touch:+J)||10;return dn(k(O))>(me(O)?be:Pe)}function V(O){return dn(k(O))>dn(k(O,!0))}function se(O){if(e.is(lo)||!T){var J=le(O);if(J&&J<cl)return k(O)/J}return 0}function re(O){return C()+Ya(O)*ni(dn(O)*(n.flickPower||600),Y?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function k(O,J){return b(O,J)-b(G(O),J)}function le(O){return qa(O)-qa(G(O))}function G(O){return z===O&&N||z}function b(O,J){return(me(O)?O.changedTouches[0]:O)["page"+f(J?"Y":"X")]}function E(O){return O/(T&&e.is(Ui)?Ep:1)}function j(O){var J=n.noDrag;return!Eo(O,"."+ud+", ."+ta)&&(!J||!Eo(O,J))}function me(O){return typeof TouchEvent<"u"&&O instanceof TouchEvent}function K(){return B}function te(O){$=O}return{mount:P,disable:te,isDragging:K}}var Jp={Spacebar:" ",Right:Jr,Left:Zr,Up:od,Down:rd};function As(e){return e=ti(e)?e:e.key,Jp[e]||e}var dl="keydown";function Qp(e,t,n){var i=Zt(e),o=i.on,r=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,p;function v(){w(),o(ln,m),o(ln,w),o(Bn,f)}function w(){var C=n.keyboard;C&&(u=C==="global"?window:d,r(u,dl,x))}function m(){l(u,dl)}function h(C){p=C}function f(){var C=p;p=!0,_c(function(){p=C})}function x(C){if(!p){var y=As(C);y===c(Zr)?e.go("<"):y===c(Jr)&&e.go(">")}}return{mount:v,destroy:m,disable:h}}var Io=ws+"-lazy",Tr=Io+"-srcset",em="["+Io+"], ["+Tr+"]";function tm(e,t,n){var i=Zt(e),o=i.on,r=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[so,Li],p=[];function v(){n.lazyLoad&&(w(),o(en,w))}function w(){On(p),m(),c?C():(r(u),o(u,h),h())}function m(){t.Slides.forEach(function(y){bs(y.slide,em).forEach(function(S){var z=Sn(S,Io),N=Sn(S,Tr);if(z!==S.src||N!==S.srcset){var Y=n.classes.spinner,B=S.parentElement,T=Yo(B,"."+Y)||ji("span",Y,B);p.push([S,y,T]),S.src||Ao(S,"none")}})})}function h(){p=p.filter(function(y){var S=n.perPage*((n.preloadPages||1)+1)-1;return y[1].isWithin(e.index,S)?f(y):!0}),p.length||r(u)}function f(y){var S=y[0];En(y[1].slide,Ja),l(S,"load error",Yt(x,y)),$t(S,"src",Sn(S,Io)),$t(S,"srcset",Sn(S,Tr)),Mn(S,Io),Mn(S,Tr)}function x(y,S){var z=y[0],N=y[1];Nn(N.slide,Ja),S.type!=="error"&&(Ti(y[2]),Ao(z,""),d(Ls,z,N),d(Yi)),c&&C()}function C(){p.length&&f(p.shift())}return{mount:v,destroy:Yt(On,p),check:h}}function nm(e,t,n){var i=Zt(e),o=i.on,r=i.emit,l=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,p=u.hasFocus,v=u.getIndex,w=u.go,m=t.Direction.resolve,h=c.pagination,f=[],x,C;function y(){S(),o([ln,en,Fr],y);var $=n.pagination;h&&Ao(h,$?"":"none"),$&&(o([Bn,Yr,Li],H),z(),H(),r(Qc,{list:x,items:f},T(e.index)))}function S(){x&&(Ti(h?ri(x.children):x),Nn(x,C),On(f),x=null),i.destroy()}function z(){var $=e.length,I=n.classes,P=n.i18n,M=n.perPage,g=p()?u.getEnd()+1:Fo($/M);x=h||ji("ul",I.pagination,c.track.parentElement),En(x,C=na+"--"+B()),$t(x,Wn,"tablist"),$t(x,yn,P.select),$t(x,Es,B()===Qr?"vertical":"");for(var D=0;D<g;D++){var A=ji("li",null,x),X=ji("button",{class:I.page,type:"button"},A),ie=d.getIn(D).map(function(_){return _.slide.id}),L=!p()&&M>1?P.pageX:P.slideX;l(X,"click",Yt(N,D)),n.paginationKeyboard&&l(X,"keydown",Yt(Y,D)),$t(A,Wn,"presentation"),$t(X,Wn,"tab"),$t(X,Ko,ie.join(" ")),$t(X,yn,Ua(L,D+1)),$t(X,Vi,-1),f.push({li:A,button:X,page:D})}}function N($){w(">"+$,!0)}function Y($,I){var P=f.length,M=As(I),g=B(),D=-1;M===m(Jr,!1,g)?D=++$%P:M===m(Zr,!1,g)?D=(--$+P)%P:M==="Home"?D=0:M==="End"&&(D=P-1);var A=f[D];A&&(Dc(A.button),w(">"+D),Fn(I,!0))}function B(){return n.paginationDirection||n.direction}function T($){return f[u.toPage($)]}function H(){var $=T(v(!0)),I=T(v());if($){var P=$.button;Nn(P,Ii),Mn(P,ol),$t(P,Vi,-1)}if(I){var M=I.button;En(M,Ii),$t(M,ol,!0),$t(M,Vi,"")}r(ed,{list:x,items:f},$,I)}return{items:f,mount:y,destroy:S,getAt:T,update:H}}var im=[" ","Enter"];function om(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&p()}function d(){r.forEach(function(h){h.destroy()}),On(r)}function c(){d(),l()}function u(h,f){var x=Zt(h);x.on(Bn,function(C,y,S){f.go(f.is(lo)?S:C)}),r.push(x)}function p(){var h=Zt(e),f=h.on;f(Cs,w),f(nd,m),f([ai,ln],v),r.push(h),h.emit(Ts,e.splides)}function v(){$t(t.Elements.list,Es,n.direction===Qr?"vertical":"")}function w(h){e.go(h.index)}function m(h,f){vs(im,As(f))&&(w(h),Fn(f))}return{setup:Yt(t.Media.set,{slideFocus:Go(o)?i:o},!0),mount:l,destroy:d,remount:c}}function rm(e,t,n){var i=Zt(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,Hi)}function d(u){if(u.cancelable){var p=u.deltaY,v=p<0,w=qa(u),m=n.wheelMinThreshold||0,h=n.wheelSleep||0;dn(p)>m&&w-r>h&&(e.go(v?"<":">"),r=w),c(v)&&Fn(u)}}function c(u){return!n.releaseWheel||e.state.is(ao)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var am=90;function sm(e,t,n){var i=Zt(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,d=ji("span",Tp),c=Ur(am,Yt(p,!1));function u(){l&&(w(!t.Autoplay.isPaused()),$t(r,sl,!0),d.textContent="…",o(Is,Yt(w,!0)),o(Rs,Yt(w,!1)),o([so,Li],Yt(p,!0)))}function p(m){$t(r,al,m),m?(qo(r,d),c.start()):(Ti(d),c.cancel())}function v(){Mn(r,[rl,sl,al]),Ti(d)}function w(m){l&&$t(r,rl,m?"off":"polite")}return{mount:u,disable:w,destroy:v}}var lm=Object.freeze({__proto__:null,Media:fp,Direction:yp,Elements:Mp,Slides:Ap,Layout:Fp,Clones:Np,Move:Wp,Controller:Hp,Arrows:Bp,Autoplay:jp,Cover:Vp,Scroll:Kp,Drag:Zp,Keyboard:Qp,LazyLoad:tm,Pagination:nm,Sync:om,Wheel:rm,Live:sm}),cm={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"},dm={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:Lp,i18n:cm,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function um(e,t,n){var i=t.Slides;function o(){Zt(e).on([ai,en],r)}function r(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function l(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),_c(c)}return{mount:o,start:l,cancel:Xa}}function pm(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,d=Yt(wn,l,"transition"),c;function u(){Zt(e).bind(l,"transitionend",function(m){m.target===l&&c&&(v(),c())})}function p(m,h){var f=i.toPosition(m,!0),x=i.getPosition(),C=w(m);dn(f-x)>=1&&C>=1?n.useScroll?r.scroll(f,C,!1,h):(d("transform "+C+"ms "+n.easing),i.translate(f,!0),c=h):(i.jump(m),h())}function v(){d(""),r.cancel()}function w(m){var h=n.rewindSpeed;if(e.is(Ui)&&h){var f=o.getIndex(!0),x=o.getEnd();if(f===0&&m>=x||f>=x&&m===0)return h}return n.speed}return{mount:u,start:p,cancel:v}}var mm=(function(){function e(n,i){this.event=Zt(),this.Components={},this.state=gp(Bi),this.splides=[],this._o={},this._E={};var o=ti(n)?Bc(document,n):n;To(o,o+" is invalid."),this.root=o,i=Yn({label:Sn(o,yn)||"",labelledby:Sn(o,Ps)||""},dm,e.defaults,i||{});try{Yn(i,JSON.parse(Sn(o,ws)))}catch{To(!1,"Invalid JSON")}this._o=Object.create(Yn({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,d=this.Components;To(l.is([Bi,Mr]),"Already mounted!"),l.set(Bi),this._C=d,this._T=o||this._T||(this.is(Zo)?um:pm),this._E=i||this._E;var c=ko({},lm,this._E,{Transition:this._T});return Ci(c,function(u,p){var v=u(r,d,r._o);d[p]=v,v.setup&&v.setup()}),Ci(d,function(u){u.mount&&u.mount()}),this.emit(ai),En(this.root,Ip),l.set(qi),this.emit(Ka),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(qi)&&(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(ri(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,r=this.state;return r.is(Bi)?Zt(this).on(Ka,this.destroy.bind(this,i)):(Ci(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit($s),o.destroy(),i&&On(this.splides),r.set(Mr)),this},cp(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})(),Fs=mm;Fs.defaults={};Fs.STATES=up;var ul=[[ai,"onMounted"],[Ka,"onReady"],[Bn,"onMove"],[so,"onMoved"],[Cs,"onClick"],[Vc,"onActive"],[Gc,"onInactive"],[Xc,"onVisible"],[qc,"onHidden"],[en,"onRefresh"],[ln,"onUpdated"],[Yi,"onResize"],[qr,"onResized"],[Yc,"onDrag"],[Uc,"onDragging"],[Kc,"onDragged"],[Yr,"onScroll"],[Li,"onScrolled"],[$s,"onDestroy"],[Zc,"onArrowsMounted"],[Jc,"onArrowsUpdated"],[Qc,"onPaginationMounted"],[ed,"onPaginationUpdated"],[Ts,"onNavigationMounted"],[Is,"onAutoplayPlay"],[td,"onAutoplayPlaying"],[Rs,"onAutoplayPause"],[Ls,"onLazyLoadLoaded"]];function _s(...e){return e.filter(Boolean).join(" ")}function _r(e){return e!==null&&typeof e=="object"}function Qa(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Qa(n,t[i]));if(_r(e)&&_r(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Qa(e[o],t[o]))}return e===t}function gm(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function hm(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 es(e,t){const n=e;return hm(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():_r(i)?n[o]=es(_r(n[o])?n[o]:{},i):n[o]=i}),n}var fm=({children:e,className:t,...n})=>s.createElement("div",{className:_s("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),Ns=class extends s.Component{constructor(){super(...arguments),this.splideRef=s.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Fs(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=es({},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&&!Qa(this.options,e)&&(this.splide.options=e,this.options=es({},e));const t=this.getSlides();gm(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){ul.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 s.createElement(t,{className:_s("splide",e),ref:this.splideRef,...this.omit(o,["options",...ul.map(r=>r[1])])},n?s.createElement(fm,null,i):i)}},Ws=({children:e,className:t,...n})=>s.createElement("li",{className:_s("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),pt=require("classnames"),O=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),zn=require("react-dom");function Su(e){return e.type==="object"&&e.version===1}const Cu="ControlSlider-module__wrapper___sHEkd",$u="ControlSlider-module__hoverArrow___A-dOH",Tu="ControlSlider-module__sliderItem___QQSkR",Iu="ControlSlider-module__sliderImage___9hRl-",Ru="ControlSlider-module__arrow___05ghY",Lu="ControlSlider-module__arrowVertical___tBfVN",Pu="ControlSlider-module__nextArrow___-30Yc",Eu="ControlSlider-module__arrowInner___aEra3",Mu="ControlSlider-module__arrowIcon___S4ztF",ku="ControlSlider-module__arrowImg___2dwJW",Au="ControlSlider-module__mirror___brd6U",Fu="ControlSlider-module__pagination___bicLF",_u="ControlSlider-module__paginationInner___bT-P-",Nu="ControlSlider-module__paginationVertical___zYqKw",Wu="ControlSlider-module__paginationItem___nTRbk",Hu="ControlSlider-module__dot___p1Qun",Du="ControlSlider-module__activeDot___LHFaj",Ou="ControlSlider-module__paginationInsideBottom___R3FWn",Bu="ControlSlider-module__paginationInsideTop___V-qb-",zu="ControlSlider-module__paginationOutsideBottom___14w8D",ju="ControlSlider-module__paginationOutsideTop___SCLqB",Vu="ControlSlider-module__paginationInsideLeft___yOBRZ",Gu="ControlSlider-module__paginationInsideRight___Rtt3o",Xu="ControlSlider-module__paginationOutsideLeft___lahaw",Yu="ControlSlider-module__paginationOutsideRight___EtuQa",qu="ControlSlider-module__imgWrapper___UjEgB",Uu="ControlSlider-module__captionBlock___dJ6-j",Ku="ControlSlider-module__captionTextWrapper___HFlpf",Zu="ControlSlider-module__captionText___uGBVc",Ju="ControlSlider-module__active___WZK4G",Qu="ControlSlider-module__withPointerEvents___t-18M",ep="ControlSlider-module__topLeftAlignment___zjnGM",tp="ControlSlider-module__topCenterAlignment___gD1xW",np="ControlSlider-module__topRightAlignment___NMapS",ip="ControlSlider-module__middleLeftAlignment___OnUrY",op="ControlSlider-module__middleCenterAlignment___Tdkl0",rp="ControlSlider-module__middleRightAlignment___wEbfX",ap="ControlSlider-module__bottomLeftAlignment___cTP2-",sp="ControlSlider-module__bottomCenterAlignment___c54fB",lp="ControlSlider-module__bottomRightAlignment___kEwrz",cp="ControlSlider-module__clickOverlay___DZA28",dp="ControlSlider-module__contain___pLyq7",up="ControlSlider-module__cover___KdDat",ut={wrapper:Cu,hoverArrow:$u,sliderItem:Tu,sliderImage:Iu,arrow:Ru,arrowVertical:Lu,nextArrow:Pu,arrowInner:Eu,arrowIcon:Mu,arrowImg:ku,mirror:Au,pagination:Fu,paginationInner:_u,paginationVertical:Nu,paginationItem:Wu,dot:Hu,activeDot:Du,paginationInsideBottom:Ou,paginationInsideTop:Bu,paginationOutsideBottom:zu,paginationOutsideTop:ju,paginationInsideLeft:Vu,paginationInsideRight:Gu,paginationOutsideLeft:Xu,paginationOutsideRight:Yu,imgWrapper:qu,captionBlock:Uu,captionTextWrapper:Ku,captionText:Zu,active:Ju,withPointerEvents:Qu,topLeftAlignment:ep,topCenterAlignment:tp,topRightAlignment:np,middleLeftAlignment:ip,middleCenterAlignment:op,middleRightAlignment:rp,bottomLeftAlignment:ap,bottomCenterAlignment:sp,bottomRightAlignment:lp,clickOverlay:cp,contain:dp,cover:up};function pp(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 mp(e,t,n){return t&&pp(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var nl="(prefers-reduced-motion: reduce)",Bi=1,gp=2,qi=3,so=4,Xo=5,Tr=6,Fr=7,hp={CREATED:Bi,MOUNTED:gp,IDLE:qi,MOVING:so,SCROLLING:Xo,DRAGGING:Tr,DESTROYED:Fr};function On(e){e.length=0}function ri(e,t,n){return Array.prototype.slice.call(e,t,n)}function qt(e){return e.bind.apply(e,[null].concat(ri(arguments,1)))}var Oc=setTimeout,Ua=function(){};function il(e){return requestAnimationFrame(e)}function Ur(e,t){return typeof t===e}function Mo(e){return!ws(e)&&Ur("object",e)}var bs=Array.isArray,Bc=qt(Ur,"function"),ti=qt(Ur,"string"),Yo=qt(Ur,"undefined");function ws(e){return e===null}function zc(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function qo(e){return bs(e)?e:[e]}function vn(e,t){qo(e).forEach(t)}function Ss(e,t){return e.indexOf(t)>-1}function Ir(e,t){return e.push.apply(e,qo(t)),e}function _n(e,t,n){e&&vn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function En(e,t){_n(e,ti(t)?t.split(" "):t,!0)}function Uo(e,t){vn(t,e.appendChild.bind(e))}function Cs(e,t){vn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ko(e,t){return zc(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function jc(e,t){var n=e?ri(e.children):[];return t?n.filter(function(i){return ko(i,t)}):n}function Ko(e,t){return t?jc(e,t)[0]:e.firstElementChild}var Ao=Object.keys;function Ci(e,t,n){return e&&(n?Ao(e).reverse():Ao(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Fo(e){return ri(arguments,1).forEach(function(t){Ci(t,function(n,i){e[i]=t[i]})}),e}function qn(e){return ri(arguments,1).forEach(function(t){Ci(t,function(n,i){bs(n)?e[i]=n.slice():Mo(n)?e[i]=qn({},Mo(e[i])?e[i]:{},n):e[i]=n})}),e}function ol(e,t){vn(t||Ao(e),function(n){delete e[n]})}function Mn(e,t){vn(e,function(n){vn(t,function(i){n&&n.removeAttribute(i)})})}function $t(e,t,n){Mo(t)?Ci(t,function(i,o){$t(e,o,i)}):vn(e,function(i){ws(n)||n===""?Mn(i,t):i.setAttribute(t,String(n))})}function Vi(e,t,n){var i=document.createElement(e);return t&&(ti(t)?En(i,t):$t(i,t)),n&&Uo(n,i),i}function wn(e,t,n){if(Yo(n))return getComputedStyle(e)[t];ws(n)||(e.style[t]=""+n)}function _o(e,t){wn(e,"display",t)}function Vc(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Sn(e,t){return e.getAttribute(t)}function rl(e,t){return e&&e.classList.contains(t)}function hn(e){return e.getBoundingClientRect()}function Ti(e){vn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Gc(e){return Ko(new DOMParser().parseFromString(e,"text/html").body)}function Fn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Xc(e,t){return e&&e.querySelector(t)}function $s(e,t){return t?ri(e.querySelectorAll(t)):[]}function Nn(e,t){_n(e,t,!1)}function Ka(e){return e.timeStamp}function ui(e){return ti(e)?e:e?e+"px":""}var Zo="splide",Ts="data-"+Zo;function Io(e,t){if(!e)throw new Error("["+Zo+"] "+(t||""))}var ni=Math.min,_r=Math.max,Nr=Math.floor,No=Math.ceil,dn=Math.abs;function Yc(e,t,n){return dn(e-t)<n}function Rr(e,t,n,i){var o=ni(t,n),r=_r(t,n);return i?o<e&&e<r:o<=e&&e<=r}function Wi(e,t,n){var i=ni(t,n),o=_r(t,n);return ni(_r(i,e),o)}function Za(e){return+(e>0)-+(e<0)}function Ja(e,t){return vn(t,function(n){e=e.replace("%s",""+n)}),e}function Is(e){return e<10?"0"+e:""+e}var al={};function fp(e){return""+e+Is(al[e]=(al[e]||0)+1)}function qc(){var e=[];function t(l,d,c,u){o(l,d,function(p,x,b){var m="addEventListener"in p,h=m?p.removeEventListener.bind(p,x,c,u):p.removeListener.bind(p,c);m?p.addEventListener(x,c,u):p.addListener(c),e.push([p,x,b,c,h])})}function n(l,d,c){o(l,d,function(u,p,x){e=e.filter(function(b){return b[0]===u&&b[1]===p&&b[2]===x&&(!c||b[3]===c)?(b[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){vn(l,function(u){u&&vn(d,function(p){p.split(" ").forEach(function(x){var b=x.split(".");c(u,b[0],b[1])})})})}function r(){e.forEach(function(l){l[4]()}),On(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var ai="mounted",Qa="ready",Bn="move",lo="moved",Rs="click",Uc="active",Kc="inactive",Zc="visible",Jc="hidden",en="refresh",ln="updated",Ui="resize",Kr="resized",Qc="drag",ed="dragging",td="dragged",Zr="scroll",Li="scrolled",yp="overflow",Ls="destroy",nd="arrows:mounted",id="arrows:updated",od="pagination:mounted",rd="pagination:updated",Ps="navigation:mounted",Es="autoplay:play",ad="autoplay:playing",Ms="autoplay:pause",ks="lazyload:loaded",sd="sk",ld="sh",Wr="ei";function Zt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=qc();function i(r,l){n.bind(t,qo(r).join(" "),function(d){l.apply(l,bs(d.detail)?d.detail:[])})}function o(r){n.dispatch(t,r,ri(arguments,1))}return e&&e.event.on(Ls,n.destroy),Fo(n,{bus:t,on:i,off:qt(n.unbind,t),emit:o})}function Jr(e,t,n,i){var o=Date.now,r,l=0,d,c=!0,u=0;function p(){if(!c){if(l=e?ni((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return b();d=il(p)}}function x(C){C||h(),r=o()-(C?l*e:0),c=!1,d=il(p)}function b(){c=!0}function m(){r=o(),l=0,n&&n(l)}function h(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function f(C){e=C}function v(){return c}return{start:x,rewind:m,pause:b,cancel:h,set:f,isPaused:v}}function xp(e){var t=e;function n(o){t=o}function i(o){return Ss(qo(o),t)}return{set:n,is:i}}function vp(e,t){var n=Jr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function bp(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=qc(),d=[];function c(){var h=n.mediaQuery==="min";Ao(o).sort(function(f,v){return h?+f-+v:+v-+f}).forEach(function(f){p(o[f],"("+(h?"min":"max")+"-width:"+f+"px)")}),p(r,nl),x()}function u(h){h&&l.destroy()}function p(h,f){var v=matchMedia(f);l.bind(v,"change",x),d.push([h,v])}function x(){var h=i.is(Fr),f=n.direction,v=d.reduce(function(C,y){return qn(C,y[1].matches?y[0]:{})},{});ol(n),m(v),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):f!==n.direction&&e.refresh()}function b(h){matchMedia(nl).matches&&(h?qn(n,r):ol(n,Ao(r)))}function m(h,f,v){qn(n,h),f&&qn(Object.getPrototypeOf(n),h),(v||!i.is(Bi))&&e.emit(ln,n)}return{setup:c,destroy:u,reduce:b,set:m}}var Qr="Arrow",ea=Qr+"Left",ta=Qr+"Right",cd=Qr+"Up",dd=Qr+"Down",sl="rtl",na="ttb",ha={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[cd,ta],ArrowRight:[dd,ea]};function wp(e,t,n){function i(r,l,d){d=d||n.direction;var c=d===sl&&!l?1:d===na?0:-1;return ha[r]&&ha[r][c]||r.replace(/width|left|right/i,function(u,p){var x=ha[u.toLowerCase()][c]||u;return p>0?x.charAt(0).toUpperCase()+x.slice(1):x})}function o(r){return r*(n.direction===sl?1:-1)}return{resolve:i,orient:o}}var Wn="role",Gi="tabindex",Sp="disabled",Cn="aria-",Jo=Cn+"controls",ud=Cn+"current",ll=Cn+"selected",yn=Cn+"label",As=Cn+"labelledby",pd=Cn+"hidden",Fs=Cn+"orientation",Wo=Cn+"roledescription",cl=Cn+"live",dl=Cn+"busy",ul=Cn+"atomic",_s=[Wn,Gi,Sp,Jo,ud,yn,As,pd,Fs,Wo],kn=Zo+"__",si="is-",fa=Zo,pl=kn+"track",Cp=kn+"list",ia=kn+"slide",md=ia+"--clone",$p=ia+"__container",Ns=kn+"arrows",oa=kn+"arrow",gd=oa+"--prev",hd=oa+"--next",ra=kn+"pagination",fd=ra+"__page",Tp=kn+"progress",Ip=Tp+"__bar",Rp=kn+"toggle",Lp=kn+"spinner",Pp=kn+"sr",Ep=si+"initialized",Ii=si+"active",yd=si+"prev",xd=si+"next",es=si+"visible",ts=si+"loading",vd=si+"focus-in",bd=si+"overflow",Mp=[Ii,es,yd,xd,ts,vd,bd],kp={slide:ia,clone:md,arrows:Ns,arrow:oa,prev:gd,next:hd,pagination:ra,page:fd,spinner:Lp};function Ap(e,t){if(Bc(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ko(n,t);)n=n.parentElement;return n}var Fp=5,ml=200,wd="touchstart mousedown",ya="touchmove mousemove",xa="touchend touchcancel mouseup click";function _p(e,t,n){var i=Zt(e),o=i.on,r=i.bind,l=e.root,d=n.i18n,c={},u=[],p=[],x=[],b,m,h;function f(){S(),j(),y()}function v(){o(en,C),o(en,f),o(ln,y),r(document,wd+" keydown",function(W){h=W.type==="keydown"},{capture:!0}),r(l,"focusin",function(){_n(l,vd,!!h)})}function C(W){var R=_s.concat("style");On(u),Nn(l,p),Nn(b,x),Mn([b,m],R),Mn(l,W?R:["style",Wo])}function y(){Nn(l,p),Nn(b,x),p=U(fa),x=U(pl),En(l,p),En(b,x),$t(l,yn,n.label),$t(l,As,n.labelledby)}function S(){b=N("."+pl),m=Ko(b,"."+Cp),Io(b&&m,"A track/list element is missing."),Ir(u,jc(m,"."+ia+":not(."+md+")")),Ci({arrows:Ns,pagination:ra,prev:gd,next:hd,bar:Ip,toggle:Rp},function(W,R){c[R]=N("."+W)}),Fo(c,{root:l,track:b,list:m,slides:u})}function j(){var W=l.id||fp(Zo),R=n.role;l.id=W,b.id=b.id||W+"-track",m.id=m.id||W+"-list",!Sn(l,Wn)&&l.tagName!=="SECTION"&&R&&$t(l,Wn,R),$t(l,Wo,d.carousel),$t(m,Wn,"presentation")}function N(W){var R=Xc(l,W);return R&&Ap(R,"."+fa)===l?R:void 0}function U(W){return[W+"--"+n.type,W+"--"+n.direction,n.drag&&W+"--draggable",n.isNavigation&&W+"--nav",W===fa&&Ii]}return Fo(c,{setup:f,mount:v,destroy:C})}var Ki="slide",co="loop",Qo="fade";function Np(e,t,n,i){var o=Zt(e),r=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,p=e.options,x=p.isNavigation,b=p.updateOnMove,m=p.i18n,h=p.pagination,f=p.slideFocus,v=c.Direction.resolve,C=Sn(i,"style"),y=Sn(i,yn),S=n>-1,j=Ko(i,"."+$p),N;function U(){S||(i.id=u.id+"-slide"+Is(t+1),$t(i,Wn,h?"tabpanel":"group"),$t(i,Wo,m.slide),$t(i,yn,y||Ja(m.slideLabel,[t+1,e.length]))),W()}function W(){d(i,"click",qt(l,Rs,ee)),d(i,"keydown",qt(l,sd,ee)),r([lo,ld,Li],T),r(Ps,B),b&&r(Bn,$)}function R(){N=!0,o.destroy(),Nn(i,Mp),Mn(i,_s),$t(i,"style",C),$t(i,yn,y||"")}function B(){var P=e.splides.map(function(D){var K=D.splide.Components.Slides.getAt(t);return K?K.slide.id:""}).join(" ");$t(i,yn,Ja(m.slideX,(S?n:t)+1)),$t(i,Jo,P),$t(i,Wn,f?"button":""),f&&Mn(i,Wo)}function $(){N||T()}function T(){if(!N){var P=e.index;k(),E(),_n(i,yd,t===P-1),_n(i,xd,t===P+1)}}function k(){var P=A();P!==rl(i,Ii)&&(_n(i,Ii,P),$t(i,ud,x&&P||""),l(P?Uc:Kc,ee))}function E(){var P=F(),D=!P&&(!A()||S);if(e.state.is([so,Xo])||$t(i,pd,D||""),$t($s(i,p.focusableNodes||""),Gi,D?-1:""),f&&$t(i,Gi,D?-1:0),P!==rl(i,es)&&(_n(i,es,P),l(P?Zc:Jc,ee)),!P&&document.activeElement===i){var K=c.Slides.getAt(e.index);K&&Vc(K.slide)}}function g(P,D,K){wn(K&&j||i,P,D)}function A(){var P=e.index;return P===t||p.cloneStatus&&P===n}function F(){if(e.is(Qo))return A();var P=hn(c.Elements.track),D=hn(i),K=v("left",!0),le=v("right",!0);return Nr(P[K])<=No(D[K])&&Nr(D[le])<=No(P[le])}function X(P,D){var K=dn(P-t);return!S&&(p.rewind||e.is(co))&&(K=ni(K,e.length-K)),K<=D}var ee={index:t,slideIndex:n,slide:i,container:j,isClone:S,mount:U,destroy:R,update:T,style:g,isWithin:X};return ee}function Wp(e,t,n){var i=Zt(e),o=i.on,r=i.emit,l=i.bind,d=t.Elements,c=d.slides,u=d.list,p=[];function x(){b(),o(en,m),o(en,b)}function b(){c.forEach(function(T,k){f(T,k,-1)})}function m(){N(function(T){T.destroy()}),On(p)}function h(){N(function(T){T.update()})}function f(T,k,E){var g=Np(e,k,E,T);g.mount(),p.push(g),p.sort(function(A,F){return A.index-F.index})}function v(T){return T?U(function(k){return!k.isClone}):p}function C(T){var k=t.Controller,E=k.toIndex(T),g=k.hasFocus()?1:n.perPage;return U(function(A){return Rr(A.index,E,E+g-1)})}function y(T){return U(T)[0]}function S(T,k){vn(T,function(E){if(ti(E)&&(E=Gc(E)),zc(E)){var g=c[k];g?Cs(E,g):Uo(u,E),En(E,n.classes.slide),R(E,qt(r,Ui))}}),r(en)}function j(T){Ti(U(T).map(function(k){return k.slide})),r(en)}function N(T,k){v(k).forEach(T)}function U(T){return p.filter(Bc(T)?T:function(k){return ti(T)?ko(k.slide,T):Ss(qo(T),k.index)})}function W(T,k,E){N(function(g){g.style(T,k,E)})}function R(T,k){var E=$s(T,"img"),g=E.length;g?E.forEach(function(A){l(A,"load error",function(){--g||k()})}):k()}function B(T){return T?c.length:p.length}function $(){return p.length>n.perPage}return{mount:x,destroy:m,update:h,register:f,get:v,getIn:C,getAt:y,add:S,remove:j,forEach:N,filter:U,style:W,getLength:B,isEnough:$}}function Hp(e,t,n){var i=Zt(e),o=i.on,r=i.bind,l=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,p=u.root,x=u.track,b=u.list,m=d.getAt,h=d.style,f,v,C;function y(){S(),r(window,"resize load",vp(qt(l,Ui))),o([ln,en],S),o(Ui,j)}function S(){f=n.direction===na,wn(p,"maxWidth",ui(n.width)),wn(x,c("paddingLeft"),N(!1)),wn(x,c("paddingRight"),N(!0)),j(!0)}function j(ee){var P=hn(p);(ee||v.width!==P.width||v.height!==P.height)&&(wn(x,"height",U()),h(c("marginRight"),ui(n.gap)),h("width",R()),h("height",B(),!0),v=P,l(Kr),C!==(C=X())&&(_n(p,bd,C),l(yp,C)))}function N(ee){var P=n.padding,D=c(ee?"right":"left");return P&&ui(P[D]||(Mo(P)?0:P))||"0px"}function U(){var ee="";return f&&(ee=W(),Io(ee,"height or heightRatio is missing."),ee="calc("+ee+" - "+N(!1)+" - "+N(!0)+")"),ee}function W(){return ui(n.height||hn(b).width*n.heightRatio)}function R(){return n.autoWidth?null:ui(n.fixedWidth)||(f?"":$())}function B(){return ui(n.fixedHeight)||(f?n.autoHeight?null:$():W())}function $(){var ee=ui(n.gap);return"calc((100%"+(ee&&" + "+ee)+")/"+(n.perPage||1)+(ee&&" - "+ee)+")"}function T(){return hn(b)[c("width")]}function k(ee,P){var D=m(ee||0);return D?hn(D.slide)[c("width")]+(P?0:A()):0}function E(ee,P){var D=m(ee);if(D){var K=hn(D.slide)[c("right")],le=hn(b)[c("left")];return dn(K-le)+(P?0:A())}return 0}function g(ee){return E(e.length-1)-E(0)+k(0,ee)}function A(){var ee=m(0);return ee&&parseFloat(wn(ee.slide,c("marginRight")))||0}function F(ee){return parseFloat(wn(x,c("padding"+(ee?"Right":"Left"))))||0}function X(){return e.is(Qo)||g(!0)>T()}return{mount:y,resize:j,listSize:T,slideSize:k,sliderSize:g,totalSize:E,getPadding:F,isOverflow:X}}var Dp=2;function Op(e,t,n){var i=Zt(e),o=i.on,r=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function p(){o(en,x),o([ln,Ui],m),(u=v())&&(h(u),t.Layout.resize(!0))}function x(){b(),p()}function b(){Ti(c),On(c),i.destroy()}function m(){var C=v();u!==C&&(u<C||!C)&&i.emit(en)}function h(C){var y=l.get().slice(),S=y.length;if(S){for(;y.length<C;)Ir(y,y);Ir(y.slice(-C),y.slice(0,C)).forEach(function(j,N){var U=N<C,W=f(j.slide,N);U?Cs(W,y[0].slide):Uo(r.list,W),Ir(c,W),l.register(W,N-C+(U?0:S),j.index)})}}function f(C,y){var S=C.cloneNode(!0);return En(S,n.classes.clone),S.id=e.root.id+"-clone"+Is(y+1),S}function v(){var C=n.clones;if(!e.is(co))C=0;else if(Yo(C)){var y=n[d("fixedWidth")]&&t.Layout.slideSize(0),S=y&&No(hn(r.track)[d("width")]/y);C=S||n[d("autoWidth")]&&e.length||n.perPage*Dp}return C}return{mount:p,destroy:b}}function Bp(e,t,n){var i=Zt(e),o=i.on,r=i.emit,l=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,p=d.totalSize,x=d.listSize,b=d.sliderSize,m=t.Direction,h=m.resolve,f=m.orient,v=t.Elements,C=v.list,y=v.track,S;function j(){S=t.Transition,o([ai,Kr,ln,en],N)}function N(){t.Controller.isBusy()||(t.Scroll.cancel(),W(e.index),t.Slides.update())}function U(D,K,le,re){D!==K&&ee(D>le)&&(T(),R($(g(),D>le),!0)),l(so),r(Bn,K,le,D),S.start(K,function(){l(qi),r(lo,K,le,D),re&&re()})}function W(D){R(E(D,!0))}function R(D,K){if(!e.is(Qo)){var le=K?D:B(D);wn(C,"transform","translate"+h("X")+"("+le+"px)"),D!==le&&r(ld)}}function B(D){if(e.is(co)){var K=k(D),le=K>t.Controller.getEnd(),re=K<0;(re||le)&&(D=$(D,le))}return D}function $(D,K){var le=D-X(K),re=b();return D-=f(re*(No(dn(le)/re)||1))*(K?1:-1),D}function T(){R(g(),!0),S.cancel()}function k(D){for(var K=t.Slides.get(),le=0,re=1/0,M=0;M<K.length;M++){var ie=K[M].index,G=dn(E(ie,!0)-D);if(G<=re)re=G,le=ie;else break}return le}function E(D,K){var le=f(p(D-1)-F(D));return K?A(le):le}function g(){var D=h("left");return hn(C)[D]-hn(y)[D]+f(u(!1))}function A(D){return n.trimSpace&&e.is(Ki)&&(D=Wi(D,0,f(b(!0)-x()))),D}function F(D){var K=n.focus;return K==="center"?(x()-c(D,!0))/2:+K*c(D)||0}function X(D){return E(D?t.Controller.getEnd():0,!!n.trimSpace)}function ee(D){var K=f($(g(),D));return D?K>=0:K<=C[h("scrollWidth")]-hn(y)[h("width")]}function P(D,K){K=Yo(K)?g():K;var le=D!==!0&&f(K)<f(X(!1)),re=D!==!1&&f(K)>f(X(!0));return le||re}return{mount:j,move:U,jump:W,translate:R,shift:$,cancel:T,toIndex:k,toPosition:E,getPosition:g,getLimit:X,exceededLimit:P,reposition:N}}function zp(e,t,n){var i=Zt(e),o=i.on,r=i.emit,l=t.Move,d=l.getPosition,c=l.getLimit,u=l.toPosition,p=t.Slides,x=p.isEnough,b=p.getLength,m=n.omitEnd,h=e.is(co),f=e.is(Ki),v=qt(g,!1),C=qt(g,!0),y=n.start||0,S,j=y,N,U,W;function R(){B(),o([ln,en,Wr],B),o(Kr,$)}function B(){N=b(!0),U=n.perMove,W=n.perPage,S=ee();var G=Wi(y,0,m?S:N-1);G!==y&&(y=G,l.reposition())}function $(){S!==ee()&&r(Wr)}function T(G,oe,te){if(!ie()){var ye=E(G),Me=X(ye);Me>-1&&(oe||Me!==y)&&(le(Me),l.move(ye,Me,j,te))}}function k(G,oe,te,ye){t.Scroll.scroll(G,oe,te,function(){var Me=X(l.toIndex(d()));le(m?ni(Me,S):Me),ye&&ye()})}function E(G){var oe=y;if(ti(G)){var te=G.match(/([+\-<>])(\d+)?/)||[],ye=te[1],Me=te[2];ye==="+"||ye==="-"?oe=A(y+ +(""+ye+(+Me||1)),y):ye===">"?oe=Me?P(+Me):v(!0):ye==="<"&&(oe=C(!0))}else oe=h?G:Wi(G,0,S);return oe}function g(G,oe){var te=U||(M()?1:W),ye=A(y+te*(G?-1:1),y,!(U||M()));return ye===-1&&f&&!Yc(d(),c(!G),1)?G?0:S:oe?ye:X(ye)}function A(G,oe,te){if(x()||M()){var ye=F(G);ye!==G&&(oe=G,G=ye,te=!1),G<0||G>S?!U&&(Rr(0,G,oe,!0)||Rr(S,oe,G,!0))?G=P(D(G)):h?G=te?G<0?-(N%W||W):N:G:n.rewind?G=G<0?S:0:G=-1:te&&G!==oe&&(G=P(D(oe)+(G<oe?-1:1)))}else G=-1;return G}function F(G){if(f&&n.trimSpace==="move"&&G!==y)for(var oe=d();oe===u(G,!0)&&Rr(G,0,e.length-1,!n.rewind);)G<y?--G:++G;return G}function X(G){return h?(G+N)%N||0:G}function ee(){for(var G=N-(M()||h&&U?1:W);m&&G-- >0;)if(u(N-1,!0)!==u(G,!0)){G++;break}return Wi(G,0,N-1)}function P(G){return Wi(M()?G:W*G,0,S)}function D(G){return M()?ni(G,S):Nr((G>=S?N-1:G)/W)}function K(G){var oe=l.toIndex(G);return f?Wi(oe,0,S):oe}function le(G){G!==y&&(j=y,y=G)}function re(G){return G?j:y}function M(){return!Yo(n.focus)||n.isNavigation}function ie(){return e.state.is([so,Xo])&&!!n.waitForTransition}return{mount:R,go:T,scroll:k,getNext:v,getPrev:C,getAdjacent:g,getEnd:ee,setIndex:le,getIndex:re,toIndex:P,toPage:D,toDest:K,hasFocus:M,isBusy:ie}}var jp="http://www.w3.org/2000/svg",Vp="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",sr=40;function Gp(e,t,n){var i=Zt(e),o=i.on,r=i.bind,l=i.emit,d=n.classes,c=n.i18n,u=t.Elements,p=t.Controller,x=u.arrows,b=u.track,m=x,h=u.prev,f=u.next,v,C,y={};function S(){N(),o(ln,j)}function j(){U(),S()}function N(){var k=n.arrows;k&&!(h&&f)&&B(),h&&f&&(Fo(y,{prev:h,next:f}),_o(m,k?"":"none"),En(m,C=Ns+"--"+n.direction),k&&(W(),T(),$t([h,f],Jo,b.id),l(nd,h,f)))}function U(){i.destroy(),Nn(m,C),v?(Ti(x?[h,f]:m),h=f=null):Mn([h,f],_s)}function W(){o([ai,lo,en,Li,Wr],T),r(f,"click",qt(R,">")),r(h,"click",qt(R,"<"))}function R(k){p.go(k,!0)}function B(){m=x||Vi("div",d.arrows),h=$(!0),f=$(!1),v=!0,Uo(m,[h,f]),!x&&Cs(m,b)}function $(k){var E='<button class="'+d.arrow+" "+(k?d.prev:d.next)+'" type="button"><svg xmlns="'+jp+'" viewBox="0 0 '+sr+" "+sr+'" width="'+sr+'" height="'+sr+'" focusable="false"><path d="'+(n.arrowPath||Vp)+'" />';return Gc(E)}function T(){if(h&&f){var k=e.index,E=p.getPrev(),g=p.getNext(),A=E>-1&&k<E?c.last:c.prev,F=g>-1&&k>g?c.first:c.next;h.disabled=E<0,f.disabled=g<0,$t(h,yn,A),$t(f,yn,F),l(id,h,f,E,g)}}return{arrows:y,mount:S,destroy:U,update:T}}var Xp=Ts+"-interval";function Yp(e,t,n){var i=Zt(e),o=i.on,r=i.bind,l=i.emit,d=Jr(n.interval,e.go.bind(e,">"),W),c=d.isPaused,u=t.Elements,p=t.Elements,x=p.root,b=p.toggle,m=n.autoplay,h,f,v=m==="pause";function C(){m&&(y(),b&&$t(b,Jo,u.track.id),v||S(),U())}function y(){n.pauseOnHover&&r(x,"mouseenter mouseleave",function(B){h=B.type==="mouseenter",N()}),n.pauseOnFocus&&r(x,"focusin focusout",function(B){f=B.type==="focusin",N()}),b&&r(b,"click",function(){v?S():j(!0)}),o([Bn,Zr,en],d.rewind),o(Bn,R)}function S(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),f=h=v=!1,U(),l(Es))}function j(B){B===void 0&&(B=!0),v=!!B,U(),c()||(d.pause(),l(Ms))}function N(){v||(h||f?j(!1):S())}function U(){b&&(_n(b,Ii,!v),$t(b,yn,n.i18n[v?"play":"pause"]))}function W(B){var $=u.bar;$&&wn($,"width",B*100+"%"),l(ad,B)}function R(B){var $=t.Slides.getAt(B);d.set($&&+Sn($.slide,Xp)||n.interval)}return{mount:C,destroy:d.cancel,play:S,pause:j,isPaused:c}}function qp(e,t,n){var i=Zt(e),o=i.on;function r(){n.cover&&(o(ks,qt(d,!0)),o([ai,ln,en],qt(l,!0)))}function l(c){t.Slides.forEach(function(u){var p=Ko(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),_o(u,c?"none":"")}return{mount:r,destroy:qt(l,!1)}}var Up=10,Kp=600,Zp=.6,Jp=1.5,Qp=800;function em(e,t,n){var i=Zt(e),o=i.on,r=i.emit,l=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,p=d.exceededLimit,x=d.translate,b=e.is(Ki),m,h,f=1;function v(){o(Bn,j),o([ln,en],N)}function C(W,R,B,$,T){var k=c();if(j(),B&&(!b||!p())){var E=t.Layout.sliderSize(),g=Za(W)*E*Nr(dn(W)/E)||0;W=d.toPosition(t.Controller.toDest(W%E))+g}var A=Yc(k,W,1);f=1,R=A?0:R||_r(dn(W-k)/Jp,Qp),h=$,m=Jr(R,y,qt(S,k,W,T),1),l(Xo),r(Zr),m.start()}function y(){l(qi),h&&h(),r(Li)}function S(W,R,B,$){var T=c(),k=W+(R-W)*U($),E=(k-T)*f;x(T+E),b&&!B&&p()&&(f*=Zp,dn(E)<Up&&C(u(p(!0)),Kp,!1,h,!0))}function j(){m&&m.cancel()}function N(){m&&!m.isPaused()&&(j(),y())}function U(W){var R=n.easingFunc;return R?R(W):1-Math.pow(1-W,4)}return{mount:v,destroy:j,scroll:C,cancel:N}}var Hi={passive:!1,capture:!0};function tm(e,t,n){var i=Zt(e),o=i.on,r=i.emit,l=i.bind,d=i.unbind,c=e.state,u=t.Move,p=t.Scroll,x=t.Controller,b=t.Elements.track,m=t.Media.reduce,h=t.Direction,f=h.resolve,v=h.orient,C=u.getPosition,y=u.exceededLimit,S,j,N,U,W,R=!1,B,$,T;function k(){l(b,ya,Ua,Hi),l(b,xa,Ua,Hi),l(b,wd,g,Hi),l(b,"click",X,{capture:!0}),l(b,"dragstart",Fn),o([ai,ln],E)}function E(){var I=n.drag;Y(!I),U=I==="free"}function g(I){if(B=!1,!$){var z=Me(I);ye(I.target)&&(z||!I.button)&&(x.isBusy()?Fn(I,!0):(T=z?b:window,W=c.is([so,Xo]),N=null,l(T,ya,A,Hi),l(T,xa,F,Hi),u.cancel(),p.cancel(),ee(I)))}}function A(I){if(c.is(Tr)||(c.set(Tr),r(Qc)),I.cancelable)if(W){u.translate(S+te(M(I)));var z=ie(I)>ml,H=R!==(R=y());(z||H)&&ee(I),B=!0,r(ed),Fn(I)}else K(I)&&(W=D(I),Fn(I))}function F(I){c.is(Tr)&&(c.set(qi),r(td)),W&&(P(I),Fn(I)),d(T,ya,A),d(T,xa,F),W=!1}function X(I){!$&&B&&Fn(I,!0)}function ee(I){N=j,j=I,S=C()}function P(I){var z=le(I),H=re(z),Te=n.rewind&&n.rewindByDrag;m(!1),U?x.scroll(H,0,n.snap):e.is(Qo)?x.go(v(Za(z))<0?Te?"<":"-":Te?">":"+"):e.is(Ki)&&R&&Te?x.go(y(!0)?">":"<"):x.go(x.toDest(H),!0),m(!0)}function D(I){var z=n.dragMinThreshold,H=Mo(z),Te=H&&z.mouse||0,fe=(H?z.touch:+z)||10;return dn(M(I))>(Me(I)?fe:Te)}function K(I){return dn(M(I))>dn(M(I,!0))}function le(I){if(e.is(co)||!R){var z=ie(I);if(z&&z<ml)return M(I)/z}return 0}function re(I){return C()+Za(I)*ni(dn(I)*(n.flickPower||600),U?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function M(I,z){return oe(I,z)-oe(G(I),z)}function ie(I){return Ka(I)-Ka(G(I))}function G(I){return j===I&&N||j}function oe(I,z){return(Me(I)?I.changedTouches[0]:I)["page"+f(z?"Y":"X")]}function te(I){return I/(R&&e.is(Ki)?Fp:1)}function ye(I){var z=n.noDrag;return!ko(I,"."+fd+", ."+oa)&&(!z||!ko(I,z))}function Me(I){return typeof TouchEvent<"u"&&I instanceof TouchEvent}function w(){return W}function Y(I){$=I}return{mount:k,disable:Y,isDragging:w}}var nm={Spacebar:" ",Right:ta,Left:ea,Up:cd,Down:dd};function Ws(e){return e=ti(e)?e:e.key,nm[e]||e}var gl="keydown";function im(e,t,n){var i=Zt(e),o=i.on,r=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,p;function x(){b(),o(ln,m),o(ln,b),o(Bn,f)}function b(){var C=n.keyboard;C&&(u=C==="global"?window:d,r(u,gl,v))}function m(){l(u,gl)}function h(C){p=C}function f(){var C=p;p=!0,Oc(function(){p=C})}function v(C){if(!p){var y=Ws(C);y===c(ea)?e.go("<"):y===c(ta)&&e.go(">")}}return{mount:x,destroy:m,disable:h}}var Ro=Ts+"-lazy",Lr=Ro+"-srcset",om="["+Ro+"], ["+Lr+"]";function rm(e,t,n){var i=Zt(e),o=i.on,r=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[lo,Li],p=[];function x(){n.lazyLoad&&(b(),o(en,b))}function b(){On(p),m(),c?C():(r(u),o(u,h),h())}function m(){t.Slides.forEach(function(y){$s(y.slide,om).forEach(function(S){var j=Sn(S,Ro),N=Sn(S,Lr);if(j!==S.src||N!==S.srcset){var U=n.classes.spinner,W=S.parentElement,R=Ko(W,"."+U)||Vi("span",U,W);p.push([S,y,R]),S.src||_o(S,"none")}})})}function h(){p=p.filter(function(y){var S=n.perPage*((n.preloadPages||1)+1)-1;return y[1].isWithin(e.index,S)?f(y):!0}),p.length||r(u)}function f(y){var S=y[0];En(y[1].slide,ts),l(S,"load error",qt(v,y)),$t(S,"src",Sn(S,Ro)),$t(S,"srcset",Sn(S,Lr)),Mn(S,Ro),Mn(S,Lr)}function v(y,S){var j=y[0],N=y[1];Nn(N.slide,ts),S.type!=="error"&&(Ti(y[2]),_o(j,""),d(ks,j,N),d(Ui)),c&&C()}function C(){p.length&&f(p.shift())}return{mount:x,destroy:qt(On,p),check:h}}function am(e,t,n){var i=Zt(e),o=i.on,r=i.emit,l=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,p=u.hasFocus,x=u.getIndex,b=u.go,m=t.Direction.resolve,h=c.pagination,f=[],v,C;function y(){S(),o([ln,en,Wr],y);var $=n.pagination;h&&_o(h,$?"":"none"),$&&(o([Bn,Zr,Li],B),j(),B(),r(od,{list:v,items:f},R(e.index)))}function S(){v&&(Ti(h?ri(v.children):v),Nn(v,C),On(f),v=null),i.destroy()}function j(){var $=e.length,T=n.classes,k=n.i18n,E=n.perPage,g=p()?u.getEnd()+1:No($/E);v=h||Vi("ul",T.pagination,c.track.parentElement),En(v,C=ra+"--"+W()),$t(v,Wn,"tablist"),$t(v,yn,k.select),$t(v,Fs,W()===na?"vertical":"");for(var A=0;A<g;A++){var F=Vi("li",null,v),X=Vi("button",{class:T.page,type:"button"},F),ee=d.getIn(A).map(function(D){return D.slide.id}),P=!p()&&E>1?k.pageX:k.slideX;l(X,"click",qt(N,A)),n.paginationKeyboard&&l(X,"keydown",qt(U,A)),$t(F,Wn,"presentation"),$t(X,Wn,"tab"),$t(X,Jo,ee.join(" ")),$t(X,yn,Ja(P,A+1)),$t(X,Gi,-1),f.push({li:F,button:X,page:A})}}function N($){b(">"+$,!0)}function U($,T){var k=f.length,E=Ws(T),g=W(),A=-1;E===m(ta,!1,g)?A=++$%k:E===m(ea,!1,g)?A=(--$+k)%k:E==="Home"?A=0:E==="End"&&(A=k-1);var F=f[A];F&&(Vc(F.button),b(">"+A),Fn(T,!0))}function W(){return n.paginationDirection||n.direction}function R($){return f[u.toPage($)]}function B(){var $=R(x(!0)),T=R(x());if($){var k=$.button;Nn(k,Ii),Mn(k,ll),$t(k,Gi,-1)}if(T){var E=T.button;En(E,Ii),$t(E,ll,!0),$t(E,Gi,"")}r(rd,{list:v,items:f},$,T)}return{items:f,mount:y,destroy:S,getAt:R,update:B}}var sm=[" ","Enter"];function lm(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&p()}function d(){r.forEach(function(h){h.destroy()}),On(r)}function c(){d(),l()}function u(h,f){var v=Zt(h);v.on(Bn,function(C,y,S){f.go(f.is(co)?S:C)}),r.push(v)}function p(){var h=Zt(e),f=h.on;f(Rs,b),f(sd,m),f([ai,ln],x),r.push(h),h.emit(Ps,e.splides)}function x(){$t(t.Elements.list,Fs,n.direction===na?"vertical":"")}function b(h){e.go(h.index)}function m(h,f){Ss(sm,Ws(f))&&(b(h),Fn(f))}return{setup:qt(t.Media.set,{slideFocus:Yo(o)?i:o},!0),mount:l,destroy:d,remount:c}}function cm(e,t,n){var i=Zt(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,Hi)}function d(u){if(u.cancelable){var p=u.deltaY,x=p<0,b=Ka(u),m=n.wheelMinThreshold||0,h=n.wheelSleep||0;dn(p)>m&&b-r>h&&(e.go(x?"<":">"),r=b),c(x)&&Fn(u)}}function c(u){return!n.releaseWheel||e.state.is(so)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var dm=90;function um(e,t,n){var i=Zt(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,d=Vi("span",Pp),c=Jr(dm,qt(p,!1));function u(){l&&(b(!t.Autoplay.isPaused()),$t(r,ul,!0),d.textContent="…",o(Es,qt(b,!0)),o(Ms,qt(b,!1)),o([lo,Li],qt(p,!0)))}function p(m){$t(r,dl,m),m?(Uo(r,d),c.start()):(Ti(d),c.cancel())}function x(){Mn(r,[cl,ul,dl]),Ti(d)}function b(m){l&&$t(r,cl,m?"off":"polite")}return{mount:u,disable:b,destroy:x}}var pm=Object.freeze({__proto__:null,Media:bp,Direction:wp,Elements:_p,Slides:Wp,Layout:Hp,Clones:Op,Move:Bp,Controller:zp,Arrows:Gp,Autoplay:Yp,Cover:qp,Scroll:em,Drag:tm,Keyboard:im,LazyLoad:rm,Pagination:am,Sync:lm,Wheel:cm,Live:um}),mm={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"},gm={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:kp,i18n:mm,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function hm(e,t,n){var i=t.Slides;function o(){Zt(e).on([ai,en],r)}function r(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function l(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),Oc(c)}return{mount:o,start:l,cancel:Ua}}function fm(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,d=qt(wn,l,"transition"),c;function u(){Zt(e).bind(l,"transitionend",function(m){m.target===l&&c&&(x(),c())})}function p(m,h){var f=i.toPosition(m,!0),v=i.getPosition(),C=b(m);dn(f-v)>=1&&C>=1?n.useScroll?r.scroll(f,C,!1,h):(d("transform "+C+"ms "+n.easing),i.translate(f,!0),c=h):(i.jump(m),h())}function x(){d(""),r.cancel()}function b(m){var h=n.rewindSpeed;if(e.is(Ki)&&h){var f=o.getIndex(!0),v=o.getEnd();if(f===0&&m>=v||f>=v&&m===0)return h}return n.speed}return{mount:u,start:p,cancel:x}}var ym=(function(){function e(n,i){this.event=Zt(),this.Components={},this.state=xp(Bi),this.splides=[],this._o={},this._E={};var o=ti(n)?Xc(document,n):n;Io(o,o+" is invalid."),this.root=o,i=qn({label:Sn(o,yn)||"",labelledby:Sn(o,As)||""},gm,e.defaults,i||{});try{qn(i,JSON.parse(Sn(o,Ts)))}catch{Io(!1,"Invalid JSON")}this._o=Object.create(qn({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,d=this.Components;Io(l.is([Bi,Fr]),"Already mounted!"),l.set(Bi),this._C=d,this._T=o||this._T||(this.is(Qo)?hm:fm),this._E=i||this._E;var c=Fo({},pm,this._E,{Transition:this._T});return Ci(c,function(u,p){var x=u(r,d,r._o);d[p]=x,x.setup&&x.setup()}),Ci(d,function(u){u.mount&&u.mount()}),this.emit(ai),En(this.root,Ep),l.set(qi),this.emit(Qa),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(qi)&&(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(ri(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,r=this.state;return r.is(Bi)?Zt(this).on(Qa,this.destroy.bind(this,i)):(Ci(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(Ls),o.destroy(),i&&On(this.splides),r.set(Fr)),this},mp(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})(),Hs=ym;Hs.defaults={};Hs.STATES=hp;var hl=[[ai,"onMounted"],[Qa,"onReady"],[Bn,"onMove"],[lo,"onMoved"],[Rs,"onClick"],[Uc,"onActive"],[Kc,"onInactive"],[Zc,"onVisible"],[Jc,"onHidden"],[en,"onRefresh"],[ln,"onUpdated"],[Ui,"onResize"],[Kr,"onResized"],[Qc,"onDrag"],[ed,"onDragging"],[td,"onDragged"],[Zr,"onScroll"],[Li,"onScrolled"],[Ls,"onDestroy"],[nd,"onArrowsMounted"],[id,"onArrowsUpdated"],[od,"onPaginationMounted"],[rd,"onPaginationUpdated"],[Ps,"onNavigationMounted"],[Es,"onAutoplayPlay"],[ad,"onAutoplayPlaying"],[Ms,"onAutoplayPause"],[ks,"onLazyLoadLoaded"]];function Ds(...e){return e.filter(Boolean).join(" ")}function Hr(e){return e!==null&&typeof e=="object"}function ns(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!ns(n,t[i]));if(Hr(e)&&Hr(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!ns(e[o],t[o]))}return e===t}function xm(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function vm(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 is(e,t){const n=e;return vm(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():Hr(i)?n[o]=is(Hr(n[o])?n[o]:{},i):n[o]=i}),n}var bm=({children:e,className:t,...n})=>s.createElement("div",{className:Ds("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),Os=class extends s.Component{constructor(){super(...arguments),this.splideRef=s.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Hs(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=is({},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&&!ns(this.options,e)&&(this.splide.options=e,this.options=is({},e));const t=this.getSlides();xm(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){hl.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 s.createElement(t,{className:Ds("splide",e),ref:this.splideRef,...this.omit(o,["options",...hl.map(r=>r[1])])},n?s.createElement(bm,null,i):i)}},Bs=({children:e,className:t,...n})=>s.createElement("li",{className:Ds("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 ym="RichTextRenderer-module__link___BWeZ2",vm={link:ym},xm=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))},co=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>xm(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function an(e){const{color:t,...n}=e;return n}function Ut(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:co(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:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}const Ri=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx("a",{className:vm.link,href:i.value,target:i.target,children:t(i.children)},o):a.jsx("span",{style:bm(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:t(o)},i)})})};function bm(e){return{...e.fontFamily&&{fontFamily:co(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 wm="SvgImage-module__svg___q3xE-",Sm="SvgImage-module__img___VsTm-",pl={svg:wm,img:Sm},Cm=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},$m=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,sn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[r,l]=s.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return s.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(d)}},[]),!Cm(e)||!r?a.jsx("img",{src:e,alt:"",className:pt(pl.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:pt(pl.svg,i),style:{"--svg":$m(e),"--fill":t,"--hover-fill":n,...o??{}}})},Tm={"top-left":dt.topLeftAlignment,"top-center":dt.topCenterAlignment,"top-right":dt.topRightAlignment,"middle-left":dt.middleLeftAlignment,"middle-center":dt.middleCenterAlignment,"middle-right":dt.middleRightAlignment,"bottom-left":dt.bottomLeftAlignment,"bottom-center":dt.bottomCenterAlignment,"bottom-right":dt.bottomRightAlignment};function Im({settings:e,content:t,styles:n,isEditor:i}){const[o,r]=s.useState(null),{widthSettings:l,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:p,fontSizeLineHeight:v,textAppearance:w,color:m}=n.imageCaption??{},[h,f]=s.useState(void 0),[x,C]=s.useState(null),[y,S]=s.useState(0),[z,N]=s.useState(0),{direction:Y,transition:B,controls:T,pagination:H,imageCaption:$,triggers:I}=e,P=s.useRef(B.type),{x:M,y:g}=e.controls.offset,D=A=>{o&&o.go(A)};return s.useEffect(()=>{if(!x)return;const A=new ResizeObserver(X=>{if(!o)return;const[ie]=X;f({width:Math.round(ie.contentRect.width),height:Math.round(ie.contentRect.height)})});return A.observe(x),()=>A.unobserve(x)},[x]),s.useEffect(()=>{!o||P.current===B.type||(N(A=>A+1),P.current=B.type)},[B.type]),a.jsx("div",{className:pt(dt.wrapper,{[dt.editor]:i}),ref:C,children:a.jsxs("div",{className:dt.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:B.backgroundColor&&B.type==="fade in"?B.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:pt(dt.captionBlock),children:a.jsx("div",{className:dt.captionTextWrapper,children:t.map((A,X)=>a.jsx("div",{className:pt(dt.captionText,Tm[$.alignment],{[dt.withPointerEvents]:X===y&&i,[dt.active]:X===y}),style:{fontFamily:co(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":W.scalingValue(l.width,i),letterSpacing:W.scalingValue(c,i),wordSpacing:W.scalingValue(p,i),textAlign:u,fontSize:W.scalingValue(v.fontSize,i),lineHeight:W.scalingValue(v.lineHeight,i),textTransform:w.textTransform??"none",textDecoration:w.textDecoration??"none",fontVariant:w.fontVariant??"normal",color:m,transitionDuration:B.duration?`${Math.round(parseInt(B.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:dt.captionTextInner,style:{"--link-hover-color":$.linkHoverColor,"--link-color":$.linkColor,position:"relative",top:W.scalingValue($.offset.y,i),left:W.scalingValue($.offset.x,i)},children:a.jsx(Ri,{content:A.imageCaption})})},X))})}),a.jsx(Ns,{onMove:A=>{S(A.index)},ref:r,options:{arrows:!1,speed:B.duration?parseInt(B.duration):500,autoplay:I.autoPlay!==null,...I.autoPlay!==null&&{interval:parseInt(I.autoPlay)*1e3},direction:Y==="horiz"||B.type==="fade in"?"ltr":"ttb",pagination:!1,drag:I.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:B.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((A,X)=>a.jsx(Ws,{children:a.jsx("div",{className:dt.sliderItem,children:a.jsx("div",{className:dt.imgWrapper,children:a.jsx("img",{className:pt(dt.sliderImage,{[dt.contain]:A.image.objectFit==="contain",[dt.cover]:A.image.objectFit==="cover"}),src:A.image.url,alt:A.image.name??""})})})},X))},z),T.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:pt(dt.arrow,{[dt.arrowVertical]:Y==="vert",[dt.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:a.jsxs("button",{onClick:()=>{D("-1")},className:dt.arrowInner,style:{transform:`translate(${W.scalingValue(M,i)}, ${W.scalingValue(g*(Y==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${Y==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&a.jsx(sn,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:pt(dt.arrowImg,dt.mirror)}),!T.arrowsImgUrl&&a.jsx(ml,{color:T.color,className:pt(dt.arrowIcon,dt.arrowImg,dt.mirror)})]})}),a.jsx("div",{className:pt(dt.arrow,dt.nextArrow,{[dt.arrowVertical]:Y==="vert",[dt.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:a.jsxs("button",{className:dt.arrowInner,onClick:()=>D("+1"),style:{transform:`translate(${W.scalingValue(M*(Y==="horiz"?-1:1),i)}, ${W.scalingValue(g,i)}) scale(${e.controls.scale/100}) rotate(${Y==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&a.jsx(sn,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:dt.arrowImg}),!T.arrowsImgUrl&&a.jsx(ml,{color:T.color,className:pt(dt.arrowIcon,dt.arrowImg)})]})})]}),I.triggersList.click&&a.jsx("div",{className:dt.clickOverlay,onClick:()=>{o&&o.go("+1")}}),H.isActive&&a.jsx("div",{className:pt(dt.pagination,{[dt.paginationInsideBottom]:H.position==="inside-1"&&Y==="horiz",[dt.paginationInsideTop]:H.position==="inside-2"&&Y==="horiz",[dt.paginationOutsideBottom]:H.position==="outside-1"&&Y==="horiz",[dt.paginationOutsideTop]:H.position==="outside-2"&&Y==="horiz",[dt.paginationInsideLeft]:H.position==="inside-1"&&Y==="vert",[dt.paginationInsideRight]:H.position==="inside-2"&&Y==="vert",[dt.paginationOutsideLeft]:H.position==="outside-1"&&Y==="vert",[dt.paginationOutsideRight]:H.position==="outside-2"&&Y==="vert",[dt.paginationVertical]:Y==="vert"}),children:a.jsx("div",{className:dt.paginationInner,style:{backgroundColor:H.colors[2],transform:`scale(${H.scale/100}) translate(${W.scalingValue(H.offset.x,i)}, ${W.scalingValue(H.offset.y,i)}) rotate(${Y==="horiz"?"0deg":"90deg"})`},children:t.map((A,X)=>a.jsx("button",{onClick:()=>{o&&o.go(X)},className:pt(dt.paginationItem),children:a.jsx("div",{className:pt(dt.dot,{[dt.activeDot]:X===y}),style:{backgroundColor:X===y?H.colors[0]:H.colors[1],"--pagination-hover-color":H.hover}})},X))})})]})})}function ml({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Rm={element:Im,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"]}},Lm="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Pm="ImageRevealSlider-module__image___Qjt-e",Em="ImageRevealSlider-module__link___N-iLG",Mm="ImageRevealSlider-module__cursor___2U03d",Mi={imageRevealSlider:Lm,image:Pm,link:Em,cursor:Mm};function gl(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,d=r/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 fa(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function km(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await fa(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await fa(e);r=l.height/l.width*o}else{const l=await fa(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function Am({settings:e,content:t,isEditor:n}){const[i,o]=s.useState(null),[r,l]=s.useState([]),[d,c]=s.useState(0),u=s.useRef(0),[p,v]=s.useState({x:0,y:0}),[w,m]=s.useState(1),[h,f]=s.useState("none"),x=s.useRef({x:0,y:0}),[C,y]=s.useState(!1),{sizeType:S,imageWidth:z,randomRangeImageWidth:N}=e.imageSize,{revealPosition:Y,visible:B}=e.position,{cursorType:T,target:H,defaultCursorScale:$,defaultCursor:I,hoverCursorScale:P,hoverCursor:M}=e.cursor;s.useEffect(()=>{if(!i)return;const A=(L,_)=>{const V=i.getBoundingClientRect(),se=L-V.left,re=_-V.top;if(v({x:se,y:re}),T==="system"){f("none"),m(1);return}const k=se,le=re,G=document.elementFromPoint(V.left+k,V.top+le);if(G&&G.closest("a")){f("none"),m(1);return}const b=gl(k,le,r)||H==="area"?{img:M??"none",scale:P}:{img:I??"none",scale:$};f(b.img),m(b.scale)},X=L=>{L.stopPropagation(),x.current={x:L.clientX,y:L.clientY},A(L.clientX,L.clientY)},ie=()=>{C&&A(x.current.x,x.current.y)};return i.addEventListener("mousemove",X),window.addEventListener("scroll",ie,!0),()=>{i.removeEventListener("mousemove",X),window.removeEventListener("scroll",ie,!0)}},[i,C,p,T,H,M,I,P,$,r]),s.useEffect(()=>{C||(f("none"),m(0))},[C]);const g=async(A,X,ie,L={})=>{const{width:_,height:V,finalWidth:se}=await km(A.image.url,S,z,N);let re=0,k=0;Y==="same"?(re=X/2,k=ie/2):(re=L.x??Math.random()*X,k=L.y??Math.random()*ie);const le=Math.min(Math.max(re,_/2),X-_/2),G=Math.min(Math.max(k,V/2),ie-V/2);return{id:u.current++,url:A.image.url,link:A.link,name:A.image.name,x:le,y:G,width:se}};s.useEffect(()=>{if(!i||t.length===0)return;const A=i.getBoundingClientRect(),X=A.width,ie=A.height,L=[];(async()=>{const V=t[0],se=await g(V,X,ie);L.push(se),l(L),c(1)})()},[S,z,N,Y,i]),s.useEffect(()=>{B==="last One"&&l(A=>A.length>0?[A[A.length-1]]:[])},[B]);const D=async A=>{if(!i)return;const X=i.getBoundingClientRect(),ie=A.clientX-X.left,L=A.clientY-X.top;if(H==="image"&&!gl(ie,L,r))return;let _=0,V=0;Y==="on Click"?(_=ie,V=L):Y==="same"?(_=X.width/2,V=X.height/2):(_=Math.random()*X.width,V=Math.random()*X.height);const se=t[d],re=await g(se,X.width,X.height,{x:_,y:V});l(k=>B==="all"?[...k,re]:[re]),c(k=>k>=t.length-1?0:k+1)};return a.jsxs("div",{ref:o,onClick:D,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),className:Mi.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[r.map(A=>a.jsx("div",{className:Mi.wrapper,style:{top:`${A.y}px`,left:`${A.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:A.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:H==="area"&&A.link?a.jsx("a",{href:A.link,target:"_blank",className:Mi.link,children:a.jsx("img",{src:A.url,alt:A.name,className:Mi.image},A.id)}):a.jsx("img",{src:A.url,alt:A.name,className:Mi.image},A.id)},A.id)),C&&a.jsx("div",{className:Mi.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${w})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Fm={element:Am,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:""}]}}}},_m="LightBox-module__hidden___9s-9x",Nm="LightBox-module__heroImage___sTxNF",Wm="LightBox-module__background___rm9ml",Hm="LightBox-module__editor___4ACaY",Dm="LightBox-module__contentStyle___Bgnsq",Om="LightBox-module__imageStyle___tLIlB",Bm="LightBox-module__imgWrapper___LuFUp",zm="LightBox-module__contain___8-yaS",jm="LightBox-module__cover___hNvOG",Vm="LightBox-module__caption___b6L2I",Gm="LightBox-module__captionTextInner___rCGNH",Xm="LightBox-module__lightboxSplide___XFuWC",qm="LightBox-module__arrow___iz38X",Ym="LightBox-module__arrowVertical___Zfz81",Um="LightBox-module__nextArrow___zkAQN",Km="LightBox-module__arrowInner___p48sW",Zm="LightBox-module__arrowIcon___3VaFf",Jm="LightBox-module__arrowImg___pNV88",Qm="LightBox-module__mirror___pjeXc",eg="LightBox-module__thumbsWrapper___GB-nU",tg="LightBox-module__thumbsContainerVertical___wttk5",ng="LightBox-module__thumbsContainer___osSma",ig="LightBox-module__thumbsAlignStart___MO6tY",og="LightBox-module__thumbsAlignCenter___Q4sUx",rg="LightBox-module__thumbsAlignEnd___p4y9R",ag="LightBox-module__thumbItem___HvnF3",sg="LightBox-module__closeButton___g2khP",lg="LightBox-module__fadeIn___0m5GW",cg="LightBox-module__slideInLeft___gPYwC",dg="LightBox-module__slideInRight___S-pPp",ug="LightBox-module__slideInTop___DFdAj",pg="LightBox-module__slideInBottom___m27kZ",mg="LightBox-module__fadeOut___55qBR",gg="LightBox-module__slideOutLeft___NvU7P",hg="LightBox-module__slideOutRight___SK7eC",fg="LightBox-module__slideOutTop___Vgg0z",yg="LightBox-module__slideOutBottom___nJ0Ef",vg="LightBox-module__scaleSlide___vZriG",Qe={hidden:_m,heroImage:Nm,background:Wm,editor:Hm,contentStyle:Dm,imageStyle:Om,imgWrapper:Bm,contain:zm,cover:jm,caption:Vm,captionTextInner:Gm,lightboxSplide:Xm,arrow:qm,arrowVertical:Ym,nextArrow:Um,arrowInner:Km,arrowIcon:Zm,arrowImg:Jm,mirror:Qm,thumbsWrapper:eg,thumbsContainerVertical:tg,thumbsContainer:ng,thumbsAlignStart:ig,thumbsAlignCenter:og,thumbsAlignEnd:rg,thumbItem:ag,closeButton:sg,fadeIn:lg,slideInLeft:cg,slideInRight:dg,slideInTop:ug,slideInBottom:pg,fadeOut:mg,slideOutLeft:gg,slideOutRight:hg,slideOutTop:fg,slideOutBottom:yg,scaleSlide:vg},ar=(e,t,n)=>{const i={},[o,r]=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"),r==="left"?(i.left="0",i.right="auto"):r==="center"?(i.left="50%",i.right="auto"):r==="right"&&(i.left="auto",i.right="0"),o==="middle"&&r==="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)}))`:r==="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 yd(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 xg(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 vd(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const d=e;return{renderedW:d,renderedH:d/r}}const l=t;return{renderedW:l*r,renderedH:l}}function bg(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const d=t;return{renderedW:d*r,renderedH:d}}const l=e;return{renderedW:l,renderedH:l/r}}function xd(e,t,n,i,o){const{x:r,y:l}=xg(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function wg(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,r=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:d}=window.getComputedStyle(e),c=l==="cover"?bg:vd,{renderedW:u,renderedH:p}=c(n,i,o,r),{offsetX:v,offsetY:w}=xd(n,i,u,p,d),m=(v+u/2)/n*100,h=(w+p/2)/i*100;return`${m}% ${h}%`}function Sg(e){return wg(e)}function Nr(e){const t=e.getBoundingClientRect(),n=yd(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),r=e.naturalWidth,l=e.naturalHeight,{renderedW:d,renderedH:c}=vd(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:v}=xd(i,o,d,c,u),w=t.left+n.left,m=t.top+n.top;return{x:p+w,y:v+m,width:d,height:c}}function hl(e){const t=e.getBoundingClientRect(),n=yd(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function fl(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 Cg(e,t){const n=(()=>{if(e==="fade in")return Qe.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Qe.slideInLeft;case"right":return Qe.slideInRight;case"top":return Qe.slideInTop;case"bottom":return Qe.slideInBottom;default:return Qe.slideInRight}return Qe.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Qe.fadeIn;if(e==="slide in")switch(t){case"left":return Qe.slideInLeft;case"right":return Qe.slideInRight;case"top":return Qe.slideInTop;case"bottom":return Qe.slideInBottom;default:return Qe.slideInRight}return Qe.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return Qe.fadeOut;if(e==="slide in")switch(t){case"left":return Qe.slideOutLeft;case"right":return Qe.slideOutRight;case"top":return Qe.slideOutTop;case"bottom":return Qe.slideOutBottom;default:return Qe.slideOutRight}return Qe.fadeOut})(),r=(()=>{if(e==="fade in")return Qe.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Qe.slideOutLeft;case"right":return Qe.slideOutRight;case"top":return Qe.slideOutTop;case"bottom":return Qe.slideOutBottom;default:return Qe.slideOutRight}return Qe.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const $g=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[d,c]=s.useState(!1),{url:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className:Qe.heroImage,onClick:()=>c(!0)}),a.jsx(Tg,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},Tg=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:d})=>{var $e;const{widthSettings:c,fontSettings:u,letterSpacing:p,textAlign:v,wordSpacing:w,fontSizeLineHeight:m,textAppearance:h,color:f}=i.imageCaption??{},[x,C]=s.useState(0),[y,S]=s.useState(0),[z,N]=s.useState(!1),[Y,B]=s.useState(!1),[T,H]=s.useState({}),$=s.useRef(null),I=s.useRef(null),P=s.useRef(null),M=s.useRef(!1),g=s.useRef(null),D=s.useRef(null),A=s.useRef(null),X=s.useRef(null),ie=s.useRef(!1),L=s.useRef(null),[_,V]=s.useState(!1),{appear:se,triggers:re,slider:k,thumbnail:le,controls:G,area:b,caption:E,layout:j}=o.lightboxBlock,{appearClass:me,backdropAppearClass:K,backdropDisappearClass:te,disappearClass:O}=Cg(se.type,se.direction),J=(d==null?void 0:d.itemId)??null;s.useEffect(()=>{const Q=()=>{setTimeout(()=>{var ae,xe;(xe=(ae=$.current)==null?void 0:ae.splide)==null||xe.refresh()},16)},Z=()=>{S(ae=>ae+1)};return window.addEventListener("ArticleEditor.Layout:change",Q),window.addEventListener("ArticleEditor.ComponentContent:change",Z),()=>{window.removeEventListener("ArticleEditor.Layout:change",Q),window.removeEventListener("ArticleEditor.ComponentContent:change",Z)}},[]),s.useEffect(()=>{if(!e||!le.isActive){V(!1);return}const Q=L.current;if(!Q)return;const Z=()=>{k.direction==="horiz"?V(Q.scrollWidth>Q.clientWidth):V(Q.scrollHeight>Q.clientHeight)};Z();const ae=new ResizeObserver(Z);return ae.observe(Q),()=>ae.disconnect()},[e,le.isActive,n.length,T,k.direction]);const ne=s.useCallback(()=>{const Q=window.matchMedia("(max-width: 768px)").matches,Z=fl(b.color);Q&&!l&&Z>.9&&(document.body.style.backgroundColor=""),N(!0),M.current=!0;const ae=xe=>{xe.target===g.current&&xe.animationName&&(g.current&&D.current&&g.current.removeEventListener("animationend",D.current),D.current=null,M.current&&(M.current=!1,t()),N(!1))};g.current&&(D.current=ae,g.current.addEventListener("animationend",ae))},[t,b.color,l]),Pe=(Q,Z,ae)=>{var xe,ke;if(Q){if(re.type==="click"&&re.switch==="image")re.repeat==="close"&&x===n.length-1?ne():(xe=$.current)==null||xe.go("+1");else if(re.type==="click"&&re.switch==="50/50"){const Ce=Q.getBoundingClientRect(),q=Z-Ce.left,ye=ae-Ce.top,ce=Ce.width,U=Ce.height;let de;k.direction==="horiz"?de=q<ce/2?"-1":"+1":de=ye<U/2?"-1":"+1",(ke=$.current)==null||ke.go(de)}}},be=Q=>{if(ie.current){ie.current=!1;return}const Z=n[x],ae=(Z==null?void 0:Z.image.objectFit)==="cover";let xe,ke;if("changedTouches"in Q&&Q.changedTouches.length>0)xe=Q.changedTouches[0].clientX,ke=Q.changedTouches[0].clientY;else if("clientX"in Q)xe=Q.clientX,ke=Q.clientY;else return;let Ce;if(ae&&P.current){const q=hl(P.current);Ce=xe>=q.left&&xe<=q.right&&ke>=q.top&&ke<=q.bottom}else{const q=P.current?Nr(P.current):null;if(!q){Q.target===Q.currentTarget&&ne();return}Ce=xe>=q.x&&xe<=q.x+q.width&&ke>=q.y&&ke<=q.y+q.height}Ce?Pe(P.current,xe,ke):ne()},Re=Q=>{const Z=Q.target;(Z.classList.contains(Qe.thumbsWrapper)||Z.classList.contains(Qe.thumbsContainer))&&be(Q)};s.useEffect(()=>{if(!e)return;const Q=Z=>{var ae,xe;if(Z.key==="Escape"){ne();return}if(Z.key==="ArrowRight"){C(ke=>(ke+1)%Math.max(n.length,1)),(ae=$.current)==null||ae.go("+1");return}Z.key==="ArrowLeft"&&(C(ke=>(ke-1+Math.max(n.length,1))%Math.max(n.length,1)),(xe=$.current)==null||xe.go("-1"))};return window.addEventListener("keydown",Q),()=>{window.removeEventListener("keydown",Q)}},[e,ne,n.length]),s.useEffect(()=>{if(e){if(C(0),S(Z=>Z+1),M.current=!1,N(!1),B(!1),H({}),!J)return;const Q=new CustomEvent("page-overlay",{detail:{itemId:J}});window.dispatchEvent(Q)}return()=>{g.current&&D.current&&(g.current.removeEventListener("animationend",D.current),D.current=null),B(!1)}},[e,J]),s.useEffect(()=>{I.current!==null&&I.current!==k.type&&S(Q=>Q+1),I.current=k.type},[k.type]),s.useEffect(()=>{if(!e)return;const Q=document.body.style.overflow,Z=window.matchMedia("(max-width: 768px)").matches,ae=fl(b.color);document.body.style.overflow="hidden",B(!1);const xe=Ce=>{Ce.target===g.current&&!M.current&&Ce.animationName&&(Z&&!l&&ae>.9&&(document.body.style.backgroundColor=b.color),B(!0),g.current&&A.current&&g.current.removeEventListener("animationend",A.current),A.current=null)};g.current&&(A.current=xe,g.current.addEventListener("animationend",xe));const ke=Ce=>{const q=Ce.target;q&&(q.closest(`.${Qe.thumbsWrapper}`)||q.closest(`.${Qe.thumbsContainer}`))||k.type!=="slide"&&Ce.preventDefault()};return document.addEventListener("touchmove",ke,{passive:!1}),()=>{document.body.style.overflow=Q,document.removeEventListener("touchmove",ke),g.current&&A.current&&(g.current.removeEventListener("animationend",A.current),A.current=null),B(!1)}},[e,l,b.color,k.type]),s.useEffect(()=>{if(!e)return;const Q=Z=>{var xe,ke;if(M.current){Z.stopPropagation();return}if(ie.current){ie.current=!1;return}const ae=Z.target;if(!(ae&&(ae.closest(`.${Qe.thumbsContainer}`)||ae.closest(`.${Qe.thumbItem}`)||ae.closest(`.${Qe.arrow}`)||ae.closest(`.${Qe.closeButton}`)||ae.closest(`.${Qe.caption}`)))){if(k.type==="slide"&&re.type==="drag"&&((ke=(xe=$.current)==null?void 0:xe.splide)!=null&&ke.root)){const Ce=$.current.splide.root;if(ae&&(Ce.contains(ae)||Ce===ae))return}if(Z.touches.length===0&&Z.changedTouches.length>0){const Ce=n[x],q=(Ce==null?void 0:Ce.image.objectFit)==="cover",ye=Z.changedTouches[0];let ce;if(q&&P.current){const U=hl(P.current);ce=ye.clientX>=U.left&&ye.clientX<=U.right&&ye.clientY>=U.top&&ye.clientY<=U.bottom}else{const U=P.current?Nr(P.current):null;if(!U)return;ce=ye.clientX>=U.x&&ye.clientX<=U.x+U.width&&ye.clientY>=U.y&&ye.clientY<=U.y+U.height}if(!ce){Z.stopPropagation(),M.current=!0;const U=de=>{de.stopPropagation(),de.preventDefault(),document.removeEventListener("click",U,!0)};document.addEventListener("click",U,!0),ne()}}}};return document.addEventListener("touchend",Q,{passive:!0}),()=>{document.removeEventListener("touchend",Q)}},[e,ne,x,n]);const ue=(k.type==="scale"||k.type==="fade")&&k.direction==="vert"&&re.type==="drag";s.useEffect(()=>{var de,He;if(!e||!ue||!((He=(de=$.current)==null?void 0:de.splide)!=null&&He.root))return;const Q=$.current.splide.root,Z=30,ae=(he,ee)=>{if(X.current){const Je=Math.abs(he-X.current.x),Ne=Math.abs(ee-X.current.y);(Je>0||Ne>0)&&(ie.current=!0)}},xe=he=>{X.current&&(he.preventDefault(),ae(he.clientX,he.clientY))},ke=he=>{X.current&&he.touches.length>0&&(he.preventDefault(),ae(he.touches[0].clientX,he.touches[0].clientY))},Ce=(he,ee)=>{if(!X.current||!$.current){X.current=null;return}const Je=Math.abs(he-X.current.x),Ne=Math.abs(ee-X.current.y);Ne>Z&&Ne>Je&&$.current.go(ee<X.current.y?"+1":"-1"),X.current=null},q=he=>{X.current&&Ce(he.clientX,he.clientY),document.removeEventListener("pointerup",q),document.removeEventListener("pointercancel",q),document.removeEventListener("pointermove",xe)},ye=he=>{if(X.current){if(he.changedTouches.length>0){const ee=he.changedTouches[0];Ce(ee.clientX,ee.clientY)}document.removeEventListener("touchend",ye),document.removeEventListener("touchcancel",ye),document.removeEventListener("touchmove",ke)}},ce=he=>{X.current={x:he.clientX,y:he.clientY},ie.current=!1,document.addEventListener("pointermove",xe,{passive:!1}),document.addEventListener("pointerup",q),document.addEventListener("pointercancel",q)},U=he=>{he.touches.length>0&&(X.current={x:he.touches[0].clientX,y:he.touches[0].clientY},ie.current=!1,document.addEventListener("touchmove",ke,{passive:!1}),document.addEventListener("touchend",ye),document.addEventListener("touchcancel",ye))};return Q.addEventListener("pointerdown",ce),Q.addEventListener("touchstart",U),()=>{Q.removeEventListener("pointerdown",ce),Q.removeEventListener("touchstart",U),document.removeEventListener("pointermove",xe),document.removeEventListener("pointerup",q),document.removeEventListener("pointercancel",q),document.removeEventListener("touchmove",ke),document.removeEventListener("touchend",ye),document.removeEventListener("touchcancel",ye),X.current=null,ie.current=!1}},[e,ue,y]);const fe={backgroundColor:b.color,backdropFilter:`blur(${b.blur}px)`,animationDuration:`${parseInt(se.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:zn.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:g,className:pt(Qe.background,z?te:K,{[Qe.editor]:l},{[Qe.hidden]:!e}),style:{...fe,...Y&&!l&&!z?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?g:null,className:pt(Qe.contentStyle,z?O:me,{[Qe.editor]:l},{[Qe.hidden]:!e}),style:{animationDuration:`${parseInt(se.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Ns,{onMove:Q=>C(Q.index),ref:$,className:Qe.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:re.type==="drag"&&!ue,perPage:1,width:"100%",height:"100%",type:k.type==="fade"||k.type==="scale"?"fade":"loop",padding:0,rewind:re.repeat!=="close",start:0},style:{"--splide-speed":k.duration},children:n.map((Q,Z)=>{const ae=ar(j.position,j.offset,l),xe=`${W.scalingValue(j.padding.top,l)} ${W.scalingValue(j.padding.right,l)} ${W.scalingValue(j.padding.bottom,l)} ${W.scalingValue(j.padding.left,l)}`,ke=k.type==="scale"?(()=>{const{transform:Ce,...q}=ae;return{...q,position:"absolute",padding:xe,boxSizing:"border-box","--position-transform":Ce||"none"}})():{...ae,position:"absolute",padding:xe,boxSizing:"border-box"};return a.jsx(Ws,{children:a.jsx("div",{className:Qe.imgWrapper,onClick:be,children:a.jsx("img",{ref:Z===x?P:null,className:pt(Qe.imageStyle,{[Qe.contain]:Q.image.objectFit==="contain",[Qe.cover]:Q.image.objectFit==="cover",[Qe.scaleSlide]:k.type==="scale"}),src:Q.image.url,alt:Q.image.name??"",style:{...ke,pointerEvents:Q.image.objectFit==="contain"?"none":"auto"}})})},Z)})},y),G.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:pt(Qe.arrow,{[Qe.arrowVertical]:k.direction==="vert"}),style:{color:G.color,"--arrow-hover-color":G.hover},children:a.jsxs("button",{className:Qe.arrowInner,style:{transform:`translate(${W.scalingValue(G.offset.x,l)}, ${W.scalingValue(G.offset.y*(k.direction==="horiz"?1:-1),l)}) scale(${G.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var Q;return(Q=$.current)==null?void 0:Q.go("-1")},"aria-label":"Previous",children:[G.arrowsImgUrl&&a.jsx(sn,{url:G.arrowsImgUrl,fill:G.color,hoverFill:G.hover,className:pt(Qe.arrowImg,Qe.mirror)}),!G.arrowsImgUrl&&a.jsx(yl,{color:G.color,className:pt(Qe.arrowIcon,Qe.arrowImg,Qe.mirror)})]})}),a.jsx("div",{className:pt(Qe.arrow,Qe.nextArrow,{[Qe.arrowVertical]:k.direction==="vert"}),style:{color:G.color,"--arrow-hover-color":G.hover},children:a.jsxs("button",{className:Qe.arrowInner,style:{transform:`translate(${W.scalingValue(G.offset.x*(k.direction==="horiz"?-1:1),l)}, ${W.scalingValue(G.offset.y,l)}) scale(${G.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var Q;return(Q=$.current)==null?void 0:Q.go("+1")},"aria-label":"Next",children:[G.arrowsImgUrl&&a.jsx(sn,{url:G.arrowsImgUrl,fill:G.color,hoverFill:G.hover,className:Qe.arrowImg}),!G.arrowsImgUrl&&a.jsx(yl,{color:G.color,className:pt(Qe.arrowIcon,Qe.arrowImg)})]})})]}),b.closeIconUrl&&(()=>{const Q=ar(b.closeIconAlign,b.closeIconOffset,l),Z=`scale(${b.closeIconScale})`,ae=Q.transform?`${Q.transform} ${Z}`:Z;return a.jsx("button",{className:Qe.closeButton,style:{...Q,transform:ae},onClick:ne,"aria-label":"Close lightbox",children:a.jsx(sn,{url:b.closeIconUrl,fill:b.closeIconColor??"#000000",hoverFill:b.closeIconHover??"#cccccc"})})})(),E&&E.isActive&&i.imageCaption&&(($e=n[x])==null?void 0:$e.imageCaption)&&a.jsx("div",{className:Qe.caption,style:{...ar(E.alignment,E.offset,l),fontFamily:co(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":W.scalingValue(c.width,l),letterSpacing:W.scalingValue(p,l),wordSpacing:W.scalingValue(w,l),textAlign:v,fontSize:W.scalingValue(m.fontSize,l),lineHeight:W.scalingValue(m.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:f},onClick:Q=>Q.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:Qe.captionTextInner,style:{"--link-color":E.linkColor,"--link-hover-color":E.linkHoverColor},children:a.jsx(Ri,{content:n[x].imageCaption})})}),le.isActive&&(()=>{const[Q,Z]=le.position.split("-"),ae=k.direction==="horiz"?`${Q}-left`:le.position,xe=ar(ae,le.offset,l),ke=()=>{if(k.direction==="horiz"){if(Z==="left")return"flex-start";if(Z==="center")return"center";if(Z==="right")return"flex-end"}else{if(Q==="top")return"flex-start";if(Q==="middle")return"center";if(Q==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:L,className:Qe.thumbsWrapper,onClick:Ce=>Re(Ce),style:{position:l?"absolute":"fixed",...xe,...k.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:pt(Qe.thumbsContainer,{[Qe.thumbsContainerVertical]:k.direction==="vert",[Qe.thumbsAlignStart]:le.align==="start",[Qe.thumbsAlignCenter]:le.align==="center",[Qe.thumbsAlignEnd]:le.align==="end"}),style:{gap:W.scalingValue(le.grid.gap,l),justifyContent:_?"flex-start":ke()},children:n.map((Ce,q)=>{const ye=q===x,ce=T[q],de=le.grid.size*(ye?le.activeState.scale:1),He=()=>{if(le.fit!=="fit")return{};if(!ce)return k.direction==="horiz"?{height:W.scalingValue(de,l)}:{width:W.scalingValue(de,l)};const he=ce.width/ce.height;if(k.direction==="horiz"){const ee=de,Je=ee*he;return{width:W.scalingValue(Je,l),height:W.scalingValue(ee,l)}}else{const ee=de,Je=ee/he;return{width:W.scalingValue(ee,l),height:W.scalingValue(Je,l)}}};return a.jsx("button",{className:Qe.thumbItem,style:{...k.direction==="horiz"&&le.fit!=="fit"?{height:W.scalingValue(de,l)}:{},...k.direction==="vert"&&le.fit!=="fit"?{width:W.scalingValue(de,l)}:{},...le.fit==="cover"?{width:W.scalingValue(de,l),height:W.scalingValue(de,l)}:{},...He(),transition:ye?"all 0.25s ease-out":"none",opacity:ye?le.activeState.opacity/100:le.opacity/100,"--thumb-hover":le.activeState.opacity/100},onClick:he=>{var ee;he.stopPropagation(),C(q),(ee=$.current)==null||ee.go(q)},onMouseEnter:()=>{var he;le.triggers==="hov"&&((he=$.current)==null||he.go(q))},children:a.jsx("img",{src:Ce.image.url,alt:Ce.image.name??"",onLoad:he=>{const ee=he.currentTarget;ee.naturalWidth&&ee.naturalHeight&&H(Je=>({...Je,[q]:{width:ee.naturalWidth,height:ee.naturalHeight}}))},style:{objectFit:le.fit==="cover"?"cover":"contain",...le.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...le.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Ce.image.name}-${q}`)})})})})()]})]}),document.getElementById(r))};function yl({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ig={element:$g,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 sr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rg(e){return`
6
+ */const wm="RichTextRenderer-module__link___BWeZ2",Sm={link:wm},Cm=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))},uo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Cm(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function an(e){const{color:t,...n}=e;return n}function Ut(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:uo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:O.scalingValue(e.letterSpacing,t),wordSpacing:O.scalingValue(e.wordSpacing,t),fontSize:O.scalingValue(n,t),lineHeight:i!==void 0?O.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}const Ri=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx("a",{className:Sm.link,href:i.value,target:i.target,children:t(i.children)},o):a.jsx("span",{style:$m(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:t(o)},i)})})};function $m(e){return{...e.fontFamily&&{fontFamily:uo(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 Tm="SvgImage-module__svg___q3xE-",Im="SvgImage-module__img___VsTm-",fl={svg:Tm,img:Im},Rm=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},Lm=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,sn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[r,l]=s.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return s.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(d)}},[]),!Rm(e)||!r?a.jsx("img",{src:e,alt:"",className:pt(fl.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:pt(fl.svg,i),style:{"--svg":Lm(e),"--fill":t,"--hover-fill":n,...o??{}}})},Pm={"top-left":ut.topLeftAlignment,"top-center":ut.topCenterAlignment,"top-right":ut.topRightAlignment,"middle-left":ut.middleLeftAlignment,"middle-center":ut.middleCenterAlignment,"middle-right":ut.middleRightAlignment,"bottom-left":ut.bottomLeftAlignment,"bottom-center":ut.bottomCenterAlignment,"bottom-right":ut.bottomRightAlignment};function Em({settings:e,content:t,styles:n,isEditor:i}){const[o,r]=s.useState(null),{widthSettings:l,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:p,fontSizeLineHeight:x,textAppearance:b,color:m}=n.imageCaption??{},[h,f]=s.useState(void 0),[v,C]=s.useState(null),[y,S]=s.useState(0),[j,N]=s.useState(0),{direction:U,transition:W,controls:R,pagination:B,imageCaption:$,triggers:T}=e,k=s.useRef(W.type),{x:E,y:g}=e.controls.offset,A=F=>{o&&o.go(F)};return s.useEffect(()=>{if(!v)return;const F=new ResizeObserver(X=>{if(!o)return;const[ee]=X;f({width:Math.round(ee.contentRect.width),height:Math.round(ee.contentRect.height)})});return F.observe(v),()=>F.unobserve(v)},[v]),s.useEffect(()=>{!o||k.current===W.type||(N(F=>F+1),k.current=W.type)},[W.type]),a.jsx("div",{className:pt(ut.wrapper,{[ut.editor]:i}),ref:C,children:a.jsxs("div",{className:ut.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:W.backgroundColor&&W.type==="fade in"?W.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:pt(ut.captionBlock),children:a.jsx("div",{className:ut.captionTextWrapper,children:t.map((F,X)=>a.jsx("div",{className:pt(ut.captionText,Pm[$.alignment],{[ut.withPointerEvents]:X===y&&i,[ut.active]:X===y}),style:{fontFamily:uo(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":O.scalingValue(l.width,i),letterSpacing:O.scalingValue(c,i),wordSpacing:O.scalingValue(p,i),textAlign:u,fontSize:O.scalingValue(x.fontSize,i),lineHeight:O.scalingValue(x.lineHeight,i),textTransform:b.textTransform??"none",textDecoration:b.textDecoration??"none",fontVariant:b.fontVariant??"normal",color:m,transitionDuration:W.duration?`${Math.round(parseInt(W.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:ut.captionTextInner,style:{"--link-hover-color":$.linkHoverColor,"--link-color":$.linkColor,position:"relative",top:O.scalingValue($.offset.y,i),left:O.scalingValue($.offset.x,i)},children:a.jsx(Ri,{content:F.imageCaption})})},X))})}),a.jsx(Os,{onMove:F=>{S(F.index)},ref:r,options:{arrows:!1,speed:W.duration?parseInt(W.duration):500,autoplay:T.autoPlay!==null,...T.autoPlay!==null&&{interval:parseInt(T.autoPlay)*1e3},direction:U==="horiz"||W.type==="fade in"?"ltr":"ttb",pagination:!1,drag:T.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:W.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((F,X)=>a.jsx(Bs,{children:a.jsx("div",{className:ut.sliderItem,children:a.jsx("div",{className:ut.imgWrapper,children:a.jsx("img",{className:pt(ut.sliderImage,{[ut.contain]:F.image.objectFit==="contain",[ut.cover]:F.image.objectFit==="cover"}),src:F.image.url,alt:F.image.name??""})})})},X))},j),R.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:pt(ut.arrow,{[ut.arrowVertical]:U==="vert",[ut.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:a.jsxs("button",{onClick:()=>{A("-1")},className:ut.arrowInner,style:{transform:`translate(${O.scalingValue(E,i)}, ${O.scalingValue(g*(U==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${U==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&a.jsx(sn,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:pt(ut.arrowImg,ut.mirror)}),!R.arrowsImgUrl&&a.jsx(yl,{color:R.color,className:pt(ut.arrowIcon,ut.arrowImg,ut.mirror)})]})}),a.jsx("div",{className:pt(ut.arrow,ut.nextArrow,{[ut.arrowVertical]:U==="vert",[ut.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:a.jsxs("button",{className:ut.arrowInner,onClick:()=>A("+1"),style:{transform:`translate(${O.scalingValue(E*(U==="horiz"?-1:1),i)}, ${O.scalingValue(g,i)}) scale(${e.controls.scale/100}) rotate(${U==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&a.jsx(sn,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:ut.arrowImg}),!R.arrowsImgUrl&&a.jsx(yl,{color:R.color,className:pt(ut.arrowIcon,ut.arrowImg)})]})})]}),T.triggersList.click&&a.jsx("div",{className:ut.clickOverlay,onClick:()=>{o&&o.go("+1")}}),B.isActive&&a.jsx("div",{className:pt(ut.pagination,{[ut.paginationInsideBottom]:B.position==="inside-1"&&U==="horiz",[ut.paginationInsideTop]:B.position==="inside-2"&&U==="horiz",[ut.paginationOutsideBottom]:B.position==="outside-1"&&U==="horiz",[ut.paginationOutsideTop]:B.position==="outside-2"&&U==="horiz",[ut.paginationInsideLeft]:B.position==="inside-1"&&U==="vert",[ut.paginationInsideRight]:B.position==="inside-2"&&U==="vert",[ut.paginationOutsideLeft]:B.position==="outside-1"&&U==="vert",[ut.paginationOutsideRight]:B.position==="outside-2"&&U==="vert",[ut.paginationVertical]:U==="vert"}),children:a.jsx("div",{className:ut.paginationInner,style:{backgroundColor:B.colors[2],transform:`scale(${B.scale/100}) translate(${O.scalingValue(B.offset.x,i)}, ${O.scalingValue(B.offset.y,i)}) rotate(${U==="horiz"?"0deg":"90deg"})`},children:t.map((F,X)=>a.jsx("button",{onClick:()=>{o&&o.go(X)},className:pt(ut.paginationItem),children:a.jsx("div",{className:pt(ut.dot,{[ut.activeDot]:X===y}),style:{backgroundColor:X===y?B.colors[0]:B.colors[1],"--pagination-hover-color":B.hover}})},X))})})]})})}function yl({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Mm={element:Em,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"]}},km="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Am="ImageRevealSlider-module__image___Qjt-e",Fm="ImageRevealSlider-module__link___N-iLG",_m="ImageRevealSlider-module__cursor___2U03d",Mi={imageRevealSlider:km,image:Am,link:Fm,cursor:_m};function xl(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,d=r/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 va(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Nm(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await va(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await va(e);r=l.height/l.width*o}else{const l=await va(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function Wm({settings:e,content:t,isEditor:n}){const[i,o]=s.useState(null),[r,l]=s.useState([]),[d,c]=s.useState(0),u=s.useRef(0),[p,x]=s.useState({x:0,y:0}),[b,m]=s.useState(1),[h,f]=s.useState("none"),v=s.useRef({x:0,y:0}),[C,y]=s.useState(!1),{sizeType:S,imageWidth:j,randomRangeImageWidth:N}=e.imageSize,{revealPosition:U,visible:W}=e.position,{cursorType:R,target:B,defaultCursorScale:$,defaultCursor:T,hoverCursorScale:k,hoverCursor:E}=e.cursor;s.useEffect(()=>{if(!i)return;const F=(P,D)=>{const K=i.getBoundingClientRect(),le=P-K.left,re=D-K.top;if(x({x:le,y:re}),R==="system"){f("none"),m(1);return}const M=le,ie=re,G=document.elementFromPoint(K.left+M,K.top+ie);if(G&&G.closest("a")){f("none"),m(1);return}const oe=xl(M,ie,r)||B==="area"?{img:E??"none",scale:k}:{img:T??"none",scale:$};f(oe.img),m(oe.scale)},X=P=>{P.stopPropagation(),v.current={x:P.clientX,y:P.clientY},F(P.clientX,P.clientY)},ee=()=>{C&&F(v.current.x,v.current.y)};return i.addEventListener("mousemove",X),window.addEventListener("scroll",ee,!0),()=>{i.removeEventListener("mousemove",X),window.removeEventListener("scroll",ee,!0)}},[i,C,p,R,B,E,T,k,$,r]),s.useEffect(()=>{C||(f("none"),m(0))},[C]);const g=async(F,X,ee,P={})=>{const{width:D,height:K,finalWidth:le}=await Nm(F.image.url,S,j,N);let re=0,M=0;U==="same"?(re=X/2,M=ee/2):(re=P.x??Math.random()*X,M=P.y??Math.random()*ee);const ie=Math.min(Math.max(re,D/2),X-D/2),G=Math.min(Math.max(M,K/2),ee-K/2);return{id:u.current++,url:F.image.url,link:F.link,name:F.image.name,x:ie,y:G,width:le}};s.useEffect(()=>{if(!i||t.length===0)return;const F=i.getBoundingClientRect(),X=F.width,ee=F.height,P=[];(async()=>{const K=t[0],le=await g(K,X,ee);P.push(le),l(P),c(1)})()},[S,j,N,U,i]),s.useEffect(()=>{W==="last One"&&l(F=>F.length>0?[F[F.length-1]]:[])},[W]);const A=async F=>{if(!i)return;const X=i.getBoundingClientRect(),ee=F.clientX-X.left,P=F.clientY-X.top;if(B==="image"&&!xl(ee,P,r))return;let D=0,K=0;U==="on Click"?(D=ee,K=P):U==="same"?(D=X.width/2,K=X.height/2):(D=Math.random()*X.width,K=Math.random()*X.height);const le=t[d],re=await g(le,X.width,X.height,{x:D,y:K});l(M=>W==="all"?[...M,re]:[re]),c(M=>M>=t.length-1?0:M+1)};return a.jsxs("div",{ref:o,onClick:A,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),className:Mi.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[r.map(F=>a.jsx("div",{className:Mi.wrapper,style:{top:`${F.y}px`,left:`${F.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:F.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:B==="area"&&F.link?a.jsx("a",{href:F.link,target:"_blank",className:Mi.link,children:a.jsx("img",{src:F.url,alt:F.name,className:Mi.image},F.id)}):a.jsx("img",{src:F.url,alt:F.name,className:Mi.image},F.id)},F.id)),C&&a.jsx("div",{className:Mi.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${b})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Hm={element:Wm,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:""}]}}}},Dm="LightBox-module__hidden___9s-9x",Om="LightBox-module__heroImage___sTxNF",Bm="LightBox-module__background___rm9ml",zm="LightBox-module__editor___4ACaY",jm="LightBox-module__contentStyle___Bgnsq",Vm="LightBox-module__imageStyle___tLIlB",Gm="LightBox-module__imgWrapper___LuFUp",Xm="LightBox-module__contain___8-yaS",Ym="LightBox-module__cover___hNvOG",qm="LightBox-module__caption___b6L2I",Um="LightBox-module__captionTextInner___rCGNH",Km="LightBox-module__lightboxSplide___XFuWC",Zm="LightBox-module__arrow___iz38X",Jm="LightBox-module__arrowVertical___Zfz81",Qm="LightBox-module__nextArrow___zkAQN",eg="LightBox-module__arrowInner___p48sW",tg="LightBox-module__arrowIcon___3VaFf",ng="LightBox-module__arrowImg___pNV88",ig="LightBox-module__mirror___pjeXc",og="LightBox-module__thumbsWrapper___GB-nU",rg="LightBox-module__thumbsContainerVertical___wttk5",ag="LightBox-module__thumbsContainer___osSma",sg="LightBox-module__thumbsAlignStart___MO6tY",lg="LightBox-module__thumbsAlignCenter___Q4sUx",cg="LightBox-module__thumbsAlignEnd___p4y9R",dg="LightBox-module__thumbItem___HvnF3",ug="LightBox-module__closeButton___g2khP",pg="LightBox-module__fadeIn___0m5GW",mg="LightBox-module__slideInLeft___gPYwC",gg="LightBox-module__slideInRight___S-pPp",hg="LightBox-module__slideInTop___DFdAj",fg="LightBox-module__slideInBottom___m27kZ",yg="LightBox-module__fadeOut___55qBR",xg="LightBox-module__slideOutLeft___NvU7P",vg="LightBox-module__slideOutRight___SK7eC",bg="LightBox-module__slideOutTop___Vgg0z",wg="LightBox-module__slideOutBottom___nJ0Ef",Sg="LightBox-module__scaleSlide___vZriG",Qe={hidden:Dm,heroImage:Om,background:Bm,editor:zm,contentStyle:jm,imageStyle:Vm,imgWrapper:Gm,contain:Xm,cover:Ym,caption:qm,captionTextInner:Um,lightboxSplide:Km,arrow:Zm,arrowVertical:Jm,nextArrow:Qm,arrowInner:eg,arrowIcon:tg,arrowImg:ng,mirror:ig,thumbsWrapper:og,thumbsContainerVertical:rg,thumbsContainer:ag,thumbsAlignStart:sg,thumbsAlignCenter:lg,thumbsAlignEnd:cg,thumbItem:dg,closeButton:ug,fadeIn:pg,slideInLeft:mg,slideInRight:gg,slideInTop:hg,slideInBottom:fg,fadeOut:yg,slideOutLeft:xg,slideOutRight:vg,slideOutTop:bg,slideOutBottom:wg,scaleSlide:Sg},lr=(e,t,n)=>{const i={},[o,r]=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"),r==="left"?(i.left="0",i.right="auto"):r==="center"?(i.left="50%",i.right="auto"):r==="right"&&(i.left="auto",i.right="0"),o==="middle"&&r==="center"?i.transform=`translate(calc(-50% + ${O.scalingValue(t.x,n)}), calc(-50% + ${O.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${O.scalingValue(t.x,n)}, calc(-50% + ${O.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${O.scalingValue(t.x,n)}), ${O.scalingValue(t.y,n)})`:i.transform=`translate(${O.scalingValue(t.x,n)}, ${O.scalingValue(t.y,n)})`,i};function Sd(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 Cg(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 Cd(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const d=e;return{renderedW:d,renderedH:d/r}}const l=t;return{renderedW:l*r,renderedH:l}}function $g(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const d=t;return{renderedW:d*r,renderedH:d}}const l=e;return{renderedW:l,renderedH:l/r}}function $d(e,t,n,i,o){const{x:r,y:l}=Cg(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function Tg(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,r=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:d}=window.getComputedStyle(e),c=l==="cover"?$g:Cd,{renderedW:u,renderedH:p}=c(n,i,o,r),{offsetX:x,offsetY:b}=$d(n,i,u,p,d),m=(x+u/2)/n*100,h=(b+p/2)/i*100;return`${m}% ${h}%`}function Ig(e){return Tg(e)}function Dr(e){const t=e.getBoundingClientRect(),n=Sd(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),r=e.naturalWidth,l=e.naturalHeight,{renderedW:d,renderedH:c}=Cd(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:x}=$d(i,o,d,c,u),b=t.left+n.left,m=t.top+n.top;return{x:p+b,y:x+m,width:d,height:c}}function vl(e){const t=e.getBoundingClientRect(),n=Sd(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function bl(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 Rg(e,t){const n=(()=>{if(e==="fade in")return Qe.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Qe.slideInLeft;case"right":return Qe.slideInRight;case"top":return Qe.slideInTop;case"bottom":return Qe.slideInBottom;default:return Qe.slideInRight}return Qe.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Qe.fadeIn;if(e==="slide in")switch(t){case"left":return Qe.slideInLeft;case"right":return Qe.slideInRight;case"top":return Qe.slideInTop;case"bottom":return Qe.slideInBottom;default:return Qe.slideInRight}return Qe.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return Qe.fadeOut;if(e==="slide in")switch(t){case"left":return Qe.slideOutLeft;case"right":return Qe.slideOutRight;case"top":return Qe.slideOutTop;case"bottom":return Qe.slideOutBottom;default:return Qe.slideOutRight}return Qe.fadeOut})(),r=(()=>{if(e==="fade in")return Qe.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Qe.slideOutLeft;case"right":return Qe.slideOutRight;case"top":return Qe.slideOutTop;case"bottom":return Qe.slideOutBottom;default:return Qe.slideOutRight}return Qe.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const Lg=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[d,c]=s.useState(!1),{url:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className:Qe.heroImage,onClick:()=>c(!0)}),a.jsx(Pg,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},Pg=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:d})=>{var we;const{widthSettings:c,fontSettings:u,letterSpacing:p,textAlign:x,wordSpacing:b,fontSizeLineHeight:m,textAppearance:h,color:f}=i.imageCaption??{},[v,C]=s.useState(0),[y,S]=s.useState(0),[j,N]=s.useState(!1),[U,W]=s.useState(!1),[R,B]=s.useState({}),$=s.useRef(null),T=s.useRef(null),k=s.useRef(null),E=s.useRef(!1),g=s.useRef(null),A=s.useRef(null),F=s.useRef(null),X=s.useRef(null),ee=s.useRef(!1),P=s.useRef(null),[D,K]=s.useState(!1),{appear:le,triggers:re,slider:M,thumbnail:ie,controls:G,area:oe,caption:te,layout:ye}=o.lightboxBlock,{appearClass:Me,backdropAppearClass:w,backdropDisappearClass:Y,disappearClass:I}=Rg(le.type,le.direction),z=(d==null?void 0:d.itemId)??null;s.useEffect(()=>{const Z=()=>{setTimeout(()=>{var ae,$e;($e=(ae=$.current)==null?void 0:ae.splide)==null||$e.refresh()},16)},Q=()=>{S(ae=>ae+1)};return window.addEventListener("ArticleEditor.Layout:change",Z),window.addEventListener("ArticleEditor.ComponentContent:change",Q),()=>{window.removeEventListener("ArticleEditor.Layout:change",Z),window.removeEventListener("ArticleEditor.ComponentContent:change",Q)}},[]),s.useEffect(()=>{if(!e||!ie.isActive){K(!1);return}const Z=P.current;if(!Z)return;const Q=()=>{M.direction==="horiz"?K(Z.scrollWidth>Z.clientWidth):K(Z.scrollHeight>Z.clientHeight)};Q();const ae=new ResizeObserver(Q);return ae.observe(Z),()=>ae.disconnect()},[e,ie.isActive,n.length,R,M.direction]);const H=s.useCallback(()=>{const Z=window.matchMedia("(max-width: 768px)").matches,Q=bl(oe.color);Z&&!l&&Q>.9&&(document.body.style.backgroundColor=""),N(!0),E.current=!0;const ae=$e=>{$e.target===g.current&&$e.animationName&&(g.current&&A.current&&g.current.removeEventListener("animationend",A.current),A.current=null,E.current&&(E.current=!1,t()),N(!1))};g.current&&(A.current=ae,g.current.addEventListener("animationend",ae))},[t,oe.color,l]),Te=(Z,Q,ae)=>{var $e,ke;if(Z){if(re.type==="click"&&re.switch==="image")re.repeat==="close"&&v===n.length-1?H():($e=$.current)==null||$e.go("+1");else if(re.type==="click"&&re.switch==="50/50"){const xe=Z.getBoundingClientRect(),V=Q-xe.left,pe=ae-xe.top,se=xe.width,q=xe.height;let ce;M.direction==="horiz"?ce=V<se/2?"-1":"+1":ce=pe<q/2?"-1":"+1",(ke=$.current)==null||ke.go(ce)}}},fe=Z=>{if(ee.current){ee.current=!1;return}const Q=n[v],ae=(Q==null?void 0:Q.image.objectFit)==="cover";let $e,ke;if("changedTouches"in Z&&Z.changedTouches.length>0)$e=Z.changedTouches[0].clientX,ke=Z.changedTouches[0].clientY;else if("clientX"in Z)$e=Z.clientX,ke=Z.clientY;else return;let xe;if(ae&&k.current){const V=vl(k.current);xe=$e>=V.left&&$e<=V.right&&ke>=V.top&&ke<=V.bottom}else{const V=k.current?Dr(k.current):null;if(!V){Z.target===Z.currentTarget&&H();return}xe=$e>=V.x&&$e<=V.x+V.width&&ke>=V.y&&ke<=V.y+V.height}xe?Te(k.current,$e,ke):H()},ve=Z=>{const Q=Z.target;(Q.classList.contains(Qe.thumbsWrapper)||Q.classList.contains(Qe.thumbsContainer))&&fe(Z)};s.useEffect(()=>{if(!e)return;const Z=Q=>{var ae,$e;if(Q.key==="Escape"){H();return}if(Q.key==="ArrowRight"){C(ke=>(ke+1)%Math.max(n.length,1)),(ae=$.current)==null||ae.go("+1");return}Q.key==="ArrowLeft"&&(C(ke=>(ke-1+Math.max(n.length,1))%Math.max(n.length,1)),($e=$.current)==null||$e.go("-1"))};return window.addEventListener("keydown",Z),()=>{window.removeEventListener("keydown",Z)}},[e,H,n.length]),s.useEffect(()=>{if(e){if(C(0),S(Q=>Q+1),E.current=!1,N(!1),W(!1),B({}),!z)return;const Z=new CustomEvent("page-overlay",{detail:{itemId:z}});window.dispatchEvent(Z)}return()=>{g.current&&A.current&&(g.current.removeEventListener("animationend",A.current),A.current=null),W(!1)}},[e,z]),s.useEffect(()=>{T.current!==null&&T.current!==M.type&&S(Z=>Z+1),T.current=M.type},[M.type]),s.useEffect(()=>{if(!e)return;const Z=document.body.style.overflow,Q=window.matchMedia("(max-width: 768px)").matches,ae=bl(oe.color);document.body.style.overflow="hidden",W(!1);const $e=xe=>{xe.target===g.current&&!E.current&&xe.animationName&&(Q&&!l&&ae>.9&&(document.body.style.backgroundColor=oe.color),W(!0),g.current&&F.current&&g.current.removeEventListener("animationend",F.current),F.current=null)};g.current&&(F.current=$e,g.current.addEventListener("animationend",$e));const ke=xe=>{const V=xe.target;V&&(V.closest(`.${Qe.thumbsWrapper}`)||V.closest(`.${Qe.thumbsContainer}`))||M.type!=="slide"&&xe.preventDefault()};return document.addEventListener("touchmove",ke,{passive:!1}),()=>{document.body.style.overflow=Z,document.removeEventListener("touchmove",ke),g.current&&F.current&&(g.current.removeEventListener("animationend",F.current),F.current=null),W(!1)}},[e,l,oe.color,M.type]),s.useEffect(()=>{if(!e)return;const Z=Q=>{var $e,ke;if(E.current){Q.stopPropagation();return}if(ee.current){ee.current=!1;return}const ae=Q.target;if(!(ae&&(ae.closest(`.${Qe.thumbsContainer}`)||ae.closest(`.${Qe.thumbItem}`)||ae.closest(`.${Qe.arrow}`)||ae.closest(`.${Qe.closeButton}`)||ae.closest(`.${Qe.caption}`)))){if(M.type==="slide"&&re.type==="drag"&&((ke=($e=$.current)==null?void 0:$e.splide)!=null&&ke.root)){const xe=$.current.splide.root;if(ae&&(xe.contains(ae)||xe===ae))return}if(Q.touches.length===0&&Q.changedTouches.length>0){const xe=n[v],V=(xe==null?void 0:xe.image.objectFit)==="cover",pe=Q.changedTouches[0];let se;if(V&&k.current){const q=vl(k.current);se=pe.clientX>=q.left&&pe.clientX<=q.right&&pe.clientY>=q.top&&pe.clientY<=q.bottom}else{const q=k.current?Dr(k.current):null;if(!q)return;se=pe.clientX>=q.x&&pe.clientX<=q.x+q.width&&pe.clientY>=q.y&&pe.clientY<=q.y+q.height}if(!se){Q.stopPropagation(),E.current=!0;const q=ce=>{ce.stopPropagation(),ce.preventDefault(),document.removeEventListener("click",q,!0)};document.addEventListener("click",q,!0),H()}}}};return document.addEventListener("touchend",Z,{passive:!0}),()=>{document.removeEventListener("touchend",Z)}},[e,H,v,n]);const de=(M.type==="scale"||M.type==="fade")&&M.direction==="vert"&&re.type==="drag";s.useEffect(()=>{var ce,We;if(!e||!de||!((We=(ce=$.current)==null?void 0:ce.splide)!=null&&We.root))return;const Z=$.current.splide.root,Q=30,ae=(ge,J)=>{if(X.current){const Ke=Math.abs(ge-X.current.x),_e=Math.abs(J-X.current.y);(Ke>0||_e>0)&&(ee.current=!0)}},$e=ge=>{X.current&&(ge.preventDefault(),ae(ge.clientX,ge.clientY))},ke=ge=>{X.current&&ge.touches.length>0&&(ge.preventDefault(),ae(ge.touches[0].clientX,ge.touches[0].clientY))},xe=(ge,J)=>{if(!X.current||!$.current){X.current=null;return}const Ke=Math.abs(ge-X.current.x),_e=Math.abs(J-X.current.y);_e>Q&&_e>Ke&&$.current.go(J<X.current.y?"+1":"-1"),X.current=null},V=ge=>{X.current&&xe(ge.clientX,ge.clientY),document.removeEventListener("pointerup",V),document.removeEventListener("pointercancel",V),document.removeEventListener("pointermove",$e)},pe=ge=>{if(X.current){if(ge.changedTouches.length>0){const J=ge.changedTouches[0];xe(J.clientX,J.clientY)}document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),document.removeEventListener("touchmove",ke)}},se=ge=>{X.current={x:ge.clientX,y:ge.clientY},ee.current=!1,document.addEventListener("pointermove",$e,{passive:!1}),document.addEventListener("pointerup",V),document.addEventListener("pointercancel",V)},q=ge=>{ge.touches.length>0&&(X.current={x:ge.touches[0].clientX,y:ge.touches[0].clientY},ee.current=!1,document.addEventListener("touchmove",ke,{passive:!1}),document.addEventListener("touchend",pe),document.addEventListener("touchcancel",pe))};return Z.addEventListener("pointerdown",se),Z.addEventListener("touchstart",q),()=>{Z.removeEventListener("pointerdown",se),Z.removeEventListener("touchstart",q),document.removeEventListener("pointermove",$e),document.removeEventListener("pointerup",V),document.removeEventListener("pointercancel",V),document.removeEventListener("touchmove",ke),document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),X.current=null,ee.current=!1}},[e,de,y]);const he={backgroundColor:oe.color,backdropFilter:`blur(${oe.blur}px)`,animationDuration:`${parseInt(le.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:zn.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:g,className:pt(Qe.background,j?Y:w,{[Qe.editor]:l},{[Qe.hidden]:!e}),style:{...he,...U&&!l&&!j?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?g:null,className:pt(Qe.contentStyle,j?I:Me,{[Qe.editor]:l},{[Qe.hidden]:!e}),style:{animationDuration:`${parseInt(le.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Os,{onMove:Z=>C(Z.index),ref:$,className:Qe.lightboxSplide,options:{arrows:!1,speed:M.duration?parseInt(M.duration):500,direction:M.direction==="horiz"||M.type==="fade"||M.type==="scale"?"ltr":"ttb",pagination:!1,drag:re.type==="drag"&&!de,perPage:1,width:"100%",height:"100%",type:M.type==="fade"||M.type==="scale"?"fade":"loop",padding:0,rewind:re.repeat!=="close",start:0},style:{"--splide-speed":M.duration},children:n.map((Z,Q)=>{const ae=lr(ye.position,ye.offset,l),$e=`${O.scalingValue(ye.padding.top,l)} ${O.scalingValue(ye.padding.right,l)} ${O.scalingValue(ye.padding.bottom,l)} ${O.scalingValue(ye.padding.left,l)}`,ke=M.type==="scale"?(()=>{const{transform:xe,...V}=ae;return{...V,position:"absolute",padding:$e,boxSizing:"border-box","--position-transform":xe||"none"}})():{...ae,position:"absolute",padding:$e,boxSizing:"border-box"};return a.jsx(Bs,{children:a.jsx("div",{className:Qe.imgWrapper,onClick:fe,children:a.jsx("img",{ref:Q===v?k:null,className:pt(Qe.imageStyle,{[Qe.contain]:Z.image.objectFit==="contain",[Qe.cover]:Z.image.objectFit==="cover",[Qe.scaleSlide]:M.type==="scale"}),src:Z.image.url,alt:Z.image.name??"",style:{...ke,pointerEvents:Z.image.objectFit==="contain"?"none":"auto"}})})},Q)})},y),G.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:pt(Qe.arrow,{[Qe.arrowVertical]:M.direction==="vert"}),style:{color:G.color,"--arrow-hover-color":G.hover},children:a.jsxs("button",{className:Qe.arrowInner,style:{transform:`translate(${O.scalingValue(G.offset.x,l)}, ${O.scalingValue(G.offset.y*(M.direction==="horiz"?1:-1),l)}) scale(${G.scale}) rotate(${M.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var Z;return(Z=$.current)==null?void 0:Z.go("-1")},"aria-label":"Previous",children:[G.arrowsImgUrl&&a.jsx(sn,{url:G.arrowsImgUrl,fill:G.color,hoverFill:G.hover,className:pt(Qe.arrowImg,Qe.mirror)}),!G.arrowsImgUrl&&a.jsx(wl,{color:G.color,className:pt(Qe.arrowIcon,Qe.arrowImg,Qe.mirror)})]})}),a.jsx("div",{className:pt(Qe.arrow,Qe.nextArrow,{[Qe.arrowVertical]:M.direction==="vert"}),style:{color:G.color,"--arrow-hover-color":G.hover},children:a.jsxs("button",{className:Qe.arrowInner,style:{transform:`translate(${O.scalingValue(G.offset.x*(M.direction==="horiz"?-1:1),l)}, ${O.scalingValue(G.offset.y,l)}) scale(${G.scale}) rotate(${M.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var Z;return(Z=$.current)==null?void 0:Z.go("+1")},"aria-label":"Next",children:[G.arrowsImgUrl&&a.jsx(sn,{url:G.arrowsImgUrl,fill:G.color,hoverFill:G.hover,className:Qe.arrowImg}),!G.arrowsImgUrl&&a.jsx(wl,{color:G.color,className:pt(Qe.arrowIcon,Qe.arrowImg)})]})})]}),oe.closeIconUrl&&(()=>{const Z=lr(oe.closeIconAlign,oe.closeIconOffset,l),Q=`scale(${oe.closeIconScale})`,ae=Z.transform?`${Z.transform} ${Q}`:Q;return a.jsx("button",{className:Qe.closeButton,style:{...Z,transform:ae},onClick:H,"aria-label":"Close lightbox",children:a.jsx(sn,{url:oe.closeIconUrl,fill:oe.closeIconColor??"#000000",hoverFill:oe.closeIconHover??"#cccccc"})})})(),te&&te.isActive&&i.imageCaption&&((we=n[v])==null?void 0:we.imageCaption)&&a.jsx("div",{className:Qe.caption,style:{...lr(te.alignment,te.offset,l),fontFamily:uo(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":O.scalingValue(c.width,l),letterSpacing:O.scalingValue(p,l),wordSpacing:O.scalingValue(b,l),textAlign:x,fontSize:O.scalingValue(m.fontSize,l),lineHeight:O.scalingValue(m.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:f},onClick:Z=>Z.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:Qe.captionTextInner,style:{"--link-color":te.linkColor,"--link-hover-color":te.linkHoverColor},children:a.jsx(Ri,{content:n[v].imageCaption})})}),ie.isActive&&(()=>{const[Z,Q]=ie.position.split("-"),ae=M.direction==="horiz"?`${Z}-left`:ie.position,$e=lr(ae,ie.offset,l),ke=()=>{if(M.direction==="horiz"){if(Q==="left")return"flex-start";if(Q==="center")return"center";if(Q==="right")return"flex-end"}else{if(Z==="top")return"flex-start";if(Z==="middle")return"center";if(Z==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:P,className:Qe.thumbsWrapper,onClick:xe=>ve(xe),style:{position:l?"absolute":"fixed",...$e,...M.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:pt(Qe.thumbsContainer,{[Qe.thumbsContainerVertical]:M.direction==="vert",[Qe.thumbsAlignStart]:ie.align==="start",[Qe.thumbsAlignCenter]:ie.align==="center",[Qe.thumbsAlignEnd]:ie.align==="end"}),style:{gap:O.scalingValue(ie.grid.gap,l),justifyContent:D?"flex-start":ke()},children:n.map((xe,V)=>{const pe=V===v,se=R[V],ce=ie.grid.size*(pe?ie.activeState.scale:1),We=()=>{if(ie.fit!=="fit")return{};if(!se)return M.direction==="horiz"?{height:O.scalingValue(ce,l)}:{width:O.scalingValue(ce,l)};const ge=se.width/se.height;if(M.direction==="horiz"){const J=ce,Ke=J*ge;return{width:O.scalingValue(Ke,l),height:O.scalingValue(J,l)}}else{const J=ce,Ke=J/ge;return{width:O.scalingValue(J,l),height:O.scalingValue(Ke,l)}}};return a.jsx("button",{className:Qe.thumbItem,style:{...M.direction==="horiz"&&ie.fit!=="fit"?{height:O.scalingValue(ce,l)}:{},...M.direction==="vert"&&ie.fit!=="fit"?{width:O.scalingValue(ce,l)}:{},...ie.fit==="cover"?{width:O.scalingValue(ce,l),height:O.scalingValue(ce,l)}:{},...We(),transition:pe?"all 0.25s ease-out":"none",opacity:pe?ie.activeState.opacity/100:ie.opacity/100,"--thumb-hover":ie.activeState.opacity/100},onClick:ge=>{var J;ge.stopPropagation(),C(V),(J=$.current)==null||J.go(V)},onMouseEnter:()=>{var ge;ie.triggers==="hov"&&((ge=$.current)==null||ge.go(V))},children:a.jsx("img",{src:xe.image.url,alt:xe.image.name??"",onLoad:ge=>{const J=ge.currentTarget;J.naturalWidth&&J.naturalHeight&&B(Ke=>({...Ke,[V]:{width:J.naturalWidth,height:J.naturalHeight}}))},style:{objectFit:ie.fit==="cover"?"cover":"contain",...ie.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ie.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${xe.image.name}-${V}`)})})})})()]})]}),document.getElementById(r))};function wl({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Eg={element:Lg,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 cr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Mg(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${sr(48)};
11
+ min-height: ${cr(48)};
12
12
  }
13
13
  .${e}-wrapper.${e}-type-C .${e}-input:focus-visible,
14
14
  .${e}-wrapper.${e}-type-C .${e}-button:focus-visible {
@@ -32,7 +32,7 @@
32
32
  min-width: 0;
33
33
  }
34
34
  .${e}-field-group.${e}-labeled {
35
- gap: ${sr(4)};
35
+ gap: ${cr(4)};
36
36
  }
37
37
  .${e}-field-label {
38
38
  white-space: nowrap;
@@ -128,11 +128,11 @@
128
128
  outline: none;
129
129
  }
130
130
  .${e}-success {
131
- margin-top: ${sr(8)};
131
+ margin-top: ${cr(8)};
132
132
  color: var(--${e}-success-success-color, var(--${e}-success-color));
133
133
  }
134
134
  .${e}-error {
135
- margin-top: ${sr(8)};
135
+ margin-top: ${cr(8)};
136
136
  color: var(--${e}-error-error-color, var(--${e}-error-color));
137
137
  }
138
138
  .${e}-overlay-anchor {
@@ -155,7 +155,7 @@
155
155
  pointer-events: auto;
156
156
  z-index: 10;
157
157
  }
158
- `}function Lg({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,d=i&&t||!t,{prefix:c}=W.useScopedStyles(),{type:u="A",fieldsToShow:p=2,fields:v=[],buttonLabel:w,gap:m,fieldsGap:h,buttonCorners:f,buttonStroke:x,buttonPadding:C,isButtonFullWidth:y,inputCorners:S,inputStroke:z,inputPadding:N,inputColor:Y,inputTextColor:B,inputBorderColor:T,placeholderColor:H,buttonColor:$,buttonTextColor:I,buttonBorderColor:P,labelTextColor:M,successColor:g,errorColor:D,fontFamily:A,inputFontSettings:X,inputFontSize:ie,inputLineHeight:L,inputLetterSpacing:_,inputWordSpacing:V,inputTextAppearance:se,buttonFontSettings:re,buttonFontSize:k,buttonLineHeight:le,buttonLetterSpacing:G,buttonWordSpacing:b,buttonTextAppearance:E,labelFontSettings:j,labelFontSize:me,labelLineHeight:K,labelLetterSpacing:te,labelWordSpacing:O,labelTextAppearance:J,statusFontSettings:ne,statusFontSize:Pe,statusLineHeight:be,statusLetterSpacing:Re,statusWordSpacing:ue,statusTextAppearance:fe,successMessage:$e,errorMessage:Q,stateOverrides:Z}=e,ae=u==="B",xe=v.slice(0,Math.min(p,v.length)),ke={fontSettings:{fontFamily:A,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:ie??.01,lineHeight:L,letterSpacing:_??0,wordSpacing:V??0,textAppearance:se,color:B},Ce=an(Ut(ke,t)),q=W.scalingValue(z??0,t),ye=W.scalingValue((L??ie??.01)+((N==null?void 0:N.top)??0)+((N==null?void 0:N.bottom)??0)+(u==="C"?z??0:(z??0)*2),t),ce={...Ce,borderStyle:"solid",borderRadius:u==="C"?0:W.scalingValue(S??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:q,borderLeftWidth:0}:{borderWidth:q},paddingTop:W.scalingValue((N==null?void 0:N.top)??0,t),paddingRight:W.scalingValue((N==null?void 0:N.right)??0,t),paddingBottom:W.scalingValue((N==null?void 0:N.bottom)??0,t),paddingLeft:W.scalingValue((N==null?void 0:N.left)??0,t),height:ye,minHeight:ye},U={fontSettings:{fontFamily:A,fontWeight:(re==null?void 0:re.fontWeight)??400,fontStyle:(re==null?void 0:re.fontStyle)??"normal"},fontSize:k??.01,lineHeight:le,letterSpacing:G??0,wordSpacing:b??0,textAppearance:E,color:I},de=an(Ut(U,t)),He=W.scalingValue(x??0,t),he={fontSettings:{fontFamily:A,fontWeight:(j==null?void 0:j.fontWeight)??400,fontStyle:(j==null?void 0:j.fontStyle)??"normal"},fontSize:me??.01,lineHeight:K,letterSpacing:te??0,wordSpacing:O??0,textAppearance:J,color:M},ee=Ut(he,t),Je={fontSettings:{fontFamily:A,fontWeight:(ne==null?void 0:ne.fontWeight)??400,fontStyle:(ne==null?void 0:ne.fontStyle)??"normal"},fontSize:Pe??.01,lineHeight:be,letterSpacing:Re??0,wordSpacing:ue??0,textAppearance:fe,color:g},Ne=an(Ut(Je,t)),ct=W.buildColorVars(c,{inputColor:Y,inputTextColor:B,inputBorderColor:T,placeholderColor:H!=null&&H.trim()?H:"#cccccc",buttonColor:$,buttonTextColor:I,buttonBorderColor:P,labelTextColor:M,successColor:g,errorColor:D},Pg,Eg,Z),[Ke,ut]=s.useState(()=>Object.fromEntries(xe.map(Ie=>[Ie.name,""]))),[lt,Ye]=s.useState("idle"),[Le,We]=s.useState(null),Be=r==="success"?"success":r==="error"?"error":lt,Ue=r==="error"?Q:Le,ge=r==="filled",ve=s.useMemo(()=>{if(!ge)return Ke;let Ie=null;for(const Ve of xe)(Ke[Ve.name]??"").trim().length>0||(Ie=Ie??{...Ke},Ie[Ve.name]="Filled");return Ie??Ke},[Ke,ge,xe]),_e=Be==="error"?W.getFormFieldValidationError(xe,ve):null,we=`${r&&r!=="default"?`${c}-state-${r}`:""}`.trim(),Te=o==null?void 0:o.submitUrl,Xe=(Ie,Ve)=>{ut(De=>({...De,[Ie]:Ve}))},ze=async Ie=>{if(Ie.preventDefault(),!d)return;const Ve=Object.fromEntries(xe.map(tt=>{var nt;return[tt.name,((nt=Ke[tt.name])==null?void 0:nt.trim())??""]}).filter(([,tt])=>tt));if(!Te){Ye("error"),We("No integrations were found for this form.");return}if(Object.keys(Ve).length===0)return;const De=W.getFormFieldValidationError(xe,Ke);if(De){Ye("error"),We(De);return}Ye("submitting"),We(null);try{const tt=await fetch(Te,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ve)});if(!tt.ok){const nt=await tt.text();throw new Error(nt||`Request failed: ${tt.status}`)}Ye("success"),ut(Object.fromEntries(xe.map(nt=>[nt.name,""])))}catch(tt){Ye("error"),We(tt instanceof Error?tt.message:"Something went wrong")}};return a.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${we}`.trim(),style:ct,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Rg(c)}}),a.jsxs("form",{onSubmit:ze,className:`${c}-form`,children:[a.jsx("div",{className:`${c}-fields`,children:xe.map((Ie,Ve)=>a.jsxs(s.Fragment,{children:[Ve>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${c}-control`:void 0,style:{height:W.scalingValue(h??0,t)}}),a.jsxs("div",{className:`${c}-field-group${ae?` ${c}-labeled`:""}`,children:[ae&&a.jsx("span",{className:`${c}-field-label`,style:ee?{...ee,lineHeight:ee.fontSize}:void 0,children:Ie.label||Ie.name}),Ie.type==="textarea"?a.jsx("textarea",{name:Ie.name,autoComplete:"off",value:ve[Ie.name]??"",onChange:De=>Xe(Ie.name,De.target.value),placeholder:Ie.placeholder,className:`${c}-input`,style:ce,rows:1,"data-filled":ge||(ve[Ie.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Ie.type==="phone"?"tel":Ie.type==="email"?"email":"text",name:Ie.name,autoComplete:"off",value:ve[Ie.name]??"",onChange:De=>Xe(Ie.name,De.target.value),placeholder:Ie.placeholder,required:Ie.isRequired??Ie.type==="email",className:`${c}-input`,style:ce,"data-filled":ge||(ve[Ie.name]??"").trim().length>0})]})]},Ve))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${c}-control`:void 0,style:{height:W.scalingValue(m??0,t)}}),a.jsx("div",{className:`${c}-overlay-anchor`,children:a.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:W.scalingValue(f??0,t),borderWidth:He,paddingTop:W.scalingValue((C==null?void 0:C.top)??0,t),paddingRight:W.scalingValue((C==null?void 0:C.right)??0,t),paddingBottom:W.scalingValue((C==null?void 0:C.bottom)??0,t),paddingLeft:W.scalingValue((C==null?void 0:C.left)??0,t),pointerEvents:d?"auto":void 0,...de,...y?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${c}-overlay-anchor`,style:y?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:lt==="submitting"?"...":w})})})]}),Be==="success"&&a.jsx("p",{className:`${c}-success`,style:{...Ne},children:$e}),Be==="error"&&a.jsx("p",{className:`${c}-error`,style:{...Ne},role:"alert",children:_e??Ue??Q})]})}const Pg={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"},Eg=["hover","focus","filled","success","error"],Mg=`import React, { useMemo, useState } from 'react';
158
+ `}function kg({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,d=i&&t||!t,{prefix:c}=O.useScopedStyles(),{type:u="A",fieldsToShow:p=2,fields:x=[],buttonLabel:b,gap:m,fieldsGap:h,buttonCorners:f,buttonStroke:v,buttonPadding:C,isButtonFullWidth:y,inputCorners:S,inputStroke:j,inputPadding:N,inputColor:U,inputTextColor:W,inputBorderColor:R,placeholderColor:B,buttonColor:$,buttonTextColor:T,buttonBorderColor:k,labelTextColor:E,successColor:g,errorColor:A,fontFamily:F,inputFontSettings:X,inputFontSize:ee,inputLineHeight:P,inputLetterSpacing:D,inputWordSpacing:K,inputTextAppearance:le,buttonFontSettings:re,buttonFontSize:M,buttonLineHeight:ie,buttonLetterSpacing:G,buttonWordSpacing:oe,buttonTextAppearance:te,labelFontSettings:ye,labelFontSize:Me,labelLineHeight:w,labelLetterSpacing:Y,labelWordSpacing:I,labelTextAppearance:z,statusFontSettings:H,statusFontSize:Te,statusLineHeight:fe,statusLetterSpacing:ve,statusWordSpacing:de,statusTextAppearance:he,successMessage:we,errorMessage:Z,stateOverrides:Q}=e,ae=u==="B",$e=x.slice(0,Math.min(p,x.length)),ke={fontSettings:{fontFamily:F,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:ee??.01,lineHeight:P,letterSpacing:D??0,wordSpacing:K??0,textAppearance:le,color:W},xe=an(Ut(ke,t)),V=O.scalingValue(j??0,t),pe=O.scalingValue((P??ee??.01)+((N==null?void 0:N.top)??0)+((N==null?void 0:N.bottom)??0)+(u==="C"?j??0:(j??0)*2),t),se={...xe,borderStyle:"solid",borderRadius:u==="C"?0:O.scalingValue(S??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:V,borderLeftWidth:0}:{borderWidth:V},paddingTop:O.scalingValue((N==null?void 0:N.top)??0,t),paddingRight:O.scalingValue((N==null?void 0:N.right)??0,t),paddingBottom:O.scalingValue((N==null?void 0:N.bottom)??0,t),paddingLeft:O.scalingValue((N==null?void 0:N.left)??0,t),height:pe,minHeight:pe},q={fontSettings:{fontFamily:F,fontWeight:(re==null?void 0:re.fontWeight)??400,fontStyle:(re==null?void 0:re.fontStyle)??"normal"},fontSize:M??.01,lineHeight:ie,letterSpacing:G??0,wordSpacing:oe??0,textAppearance:te,color:T},ce=an(Ut(q,t)),We=O.scalingValue(v??0,t),ge={fontSettings:{fontFamily:F,fontWeight:(ye==null?void 0:ye.fontWeight)??400,fontStyle:(ye==null?void 0:ye.fontStyle)??"normal"},fontSize:Me??.01,lineHeight:w,letterSpacing:Y??0,wordSpacing:I??0,textAppearance:z,color:E},J=Ut(ge,t),Ke={fontSettings:{fontFamily:F,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:Te??.01,lineHeight:fe,letterSpacing:ve??0,wordSpacing:de??0,textAppearance:he,color:g},_e=an(Ut(Ke,t)),rt=O.buildColorVars(c,{inputColor:U,inputTextColor:W,inputBorderColor:R,placeholderColor:B!=null&&B.trim()?B:"#cccccc",buttonColor:$,buttonTextColor:T,buttonBorderColor:k,labelTextColor:E,successColor:g,errorColor:A},Ag,Fg,Q),[Ye,dt]=s.useState(()=>Object.fromEntries($e.map(Re=>[Re.name,""]))),[at,Xe]=s.useState("idle"),[Le,He]=s.useState(null),Be=r==="success"?"success":r==="error"?"error":at,Ze=r==="error"?Z:Le,me=r==="filled",be=s.useMemo(()=>{if(!me)return Ye;let Re=null;for(const Ve of $e)(Ye[Ve.name]??"").trim().length>0||(Re=Re??{...Ye},Re[Ve.name]="Filled");return Re??Ye},[Ye,me,$e]),Ne=Be==="error"?O.getFormFieldValidationError($e,be):null,Se=`${r&&r!=="default"?`${c}-state-${r}`:""}`.trim(),Ie=o==null?void 0:o.submitUrl,qe=(Re,Ve)=>{dt(De=>({...De,[Re]:Ve}))},ze=async Re=>{if(Re.preventDefault(),!d)return;const Ve=Object.fromEntries($e.map(tt=>{var nt;return[tt.name,((nt=Ye[tt.name])==null?void 0:nt.trim())??""]}).filter(([,tt])=>tt));if(!Ie){Xe("error"),He("No integrations were found for this form.");return}if(Object.keys(Ve).length===0)return;const De=O.getFormFieldValidationError($e,Ye);if(De){Xe("error"),He(De);return}Xe("submitting"),He(null);try{const tt=await fetch(Ie,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ve)});if(!tt.ok){const nt=await tt.text();throw new Error(nt||`Request failed: ${tt.status}`)}Xe("success"),dt(Object.fromEntries($e.map(nt=>[nt.name,""])))}catch(tt){Xe("error"),He(tt instanceof Error?tt.message:"Something went wrong")}};return a.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${Se}`.trim(),style:rt,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Mg(c)}}),a.jsxs("form",{onSubmit:ze,className:`${c}-form`,children:[a.jsx("div",{className:`${c}-fields`,children:$e.map((Re,Ve)=>a.jsxs(s.Fragment,{children:[Ve>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${c}-control`:void 0,style:{height:O.scalingValue(h??0,t)}}),a.jsxs("div",{className:`${c}-field-group${ae?` ${c}-labeled`:""}`,children:[ae&&a.jsx("span",{className:`${c}-field-label`,style:J?{...J,lineHeight:J.fontSize}:void 0,children:Re.label||Re.name}),Re.type==="textarea"?a.jsx("textarea",{name:Re.name,autoComplete:"off",value:be[Re.name]??"",onChange:De=>qe(Re.name,De.target.value),placeholder:Re.placeholder,className:`${c}-input`,style:se,rows:1,"data-filled":me||(be[Re.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Re.type==="phone"?"tel":Re.type==="email"?"email":"text",name:Re.name,autoComplete:"off",value:be[Re.name]??"",onChange:De=>qe(Re.name,De.target.value),placeholder:Re.placeholder,required:Re.isRequired??Re.type==="email",className:`${c}-input`,style:se,"data-filled":me||(be[Re.name]??"").trim().length>0})]})]},Ve))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${c}-control`:void 0,style:{height:O.scalingValue(m??0,t)}}),a.jsx("div",{className:`${c}-overlay-anchor`,children:a.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:O.scalingValue(f??0,t),borderWidth:We,paddingTop:O.scalingValue((C==null?void 0:C.top)??0,t),paddingRight:O.scalingValue((C==null?void 0:C.right)??0,t),paddingBottom:O.scalingValue((C==null?void 0:C.bottom)??0,t),paddingLeft:O.scalingValue((C==null?void 0:C.left)??0,t),pointerEvents:d?"auto":void 0,...ce,...y?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${c}-overlay-anchor`,style:y?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:at==="submitting"?"...":b})})})]}),Be==="success"&&a.jsx("p",{className:`${c}-success`,style:{..._e},children:we}),Be==="error"&&a.jsx("p",{className:`${c}-error`,style:{..._e},role:"alert",children:Ne??Ze??Z})]})}const Ag={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"},Fg=["hover","focus","filled","success","error"],_g=`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
- `,kg=[{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"}],lr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ag=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Fg={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:{...lr.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:{...lr.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:{...lr.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:{...lr.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:kg,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:[...Ag],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"]},_g={element:Lg,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:Fg,sourceCode:Mg,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function cr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ng(e){return`
792
+ `,Ng=[{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"}],dr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Wg=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Hg={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:{...dr.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:{...dr.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:{...dr.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:{...dr.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:Ng,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:[...Wg],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"]},Dg={element:kg,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:Hg,sourceCode:_g,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function ur(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Og(e){return`
793
793
  .${e}-wrapper {
794
794
  display: flex;
795
795
  flex-direction: column;
@@ -801,6 +801,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
801
801
  .${e}-form {
802
802
  display: flex;
803
803
  width: 100%;
804
+ box-sizing: border-box;
804
805
  align-items: stretch;
805
806
  overflow: hidden;
806
807
  border-color: var(--${e}-stroke-color);
@@ -844,6 +845,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
844
845
  .${e}-input {
845
846
  flex: 1;
846
847
  min-width: 0;
848
+ box-sizing: border-box;
847
849
  background: transparent;
848
850
  border: none;
849
851
  outline: none;
@@ -971,16 +973,16 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
971
973
  align-items: center;
972
974
  }
973
975
  .${e}-success {
974
- margin-top: ${cr(8)};
975
- font-size: ${cr(14)};
976
+ margin-top: ${ur(8)};
977
+ font-size: ${ur(14)};
976
978
  color: var(--${e}-success-success-color, var(--${e}-success-color));
977
979
  }
978
980
  .${e}-error {
979
- margin-top: ${cr(8)};
980
- font-size: ${cr(14)};
981
+ margin-top: ${ur(8)};
982
+ font-size: ${ur(14)};
981
983
  color: var(--${e}-error-error-color, var(--${e}-error-color));
982
984
  }
983
- `}const Wg=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=W.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:p=1,fontFamily:v,inputFontSettings:w,inputFontSize:m,inputLineHeight:h,inputLetterSpacing:f,inputWordSpacing:x,inputTextAppearance:C,buttonFontSettings:y,buttonFontSize:S,buttonLineHeight:z,buttonLetterSpacing:N,buttonWordSpacing:Y,buttonTextAppearance:B,statusFontSettings:T,statusFontSize:H,statusLineHeight:$,statusLetterSpacing:I,statusWordSpacing:P,statusTextAppearance:M,iconMaxWidth:g,minHeight:D,corners:A,stroke:X,stateOverrides:ie,inputPadding:L,buttonPadding:_,successMessage:V="Thanks for subscribing!",errorMessage:se="Please, fill all required fields."}=e,re=d.slice(0,Math.min(p,d.length)),[k,le]=s.useState(()=>Object.fromEntries(re.map(he=>[he.name,""]))),[G,b]=s.useState("idle"),[E,j]=s.useState(null),me=o==="success"?"success":o==="error"?"error":G,K=o==="error"?se:E,te=o==="filled",O=s.useMemo(()=>{if(!te)return k;let he=null;for(const ee of re)(k[ee.name]??"").trim().length>0||(he=he??{...k},he[ee.name]="Filled");return he??k},[te,k,re]),J=me==="error"?W.getFormFieldValidationError(re,O):null,ne=o&&o!=="default"?`${r}-state-${o}`:"",Pe=re.some(he=>(O[he.name]??"").trim().length>0),be=ne!==`${r}-state-filled`&&Pe?`${r}-state-filled`:"",Re=`${ne} ${be}`.trim(),ue=i==null?void 0:i.submitUrl,fe=u??"",$e=(c==null?void 0:c.icon)??"",Q=(c==null?void 0:c.mode)==="On",Z=fe||"Submit",ae={fontSettings:{fontFamily:v,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:m??.01,lineHeight:h,letterSpacing:f??0,wordSpacing:x??0,textAppearance:C,color:e.inputTextColor??"#111111"},xe={fontSettings:{fontFamily:v,fontWeight:(y==null?void 0:y.fontWeight)??400,fontStyle:(y==null?void 0:y.fontStyle)??"normal"},fontSize:S??.01,lineHeight:z,letterSpacing:N??0,wordSpacing:Y??0,textAppearance:B,color:e.buttonTextColor??"#ffffff"},ke={fontSettings:{fontFamily:v,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:H??.01,lineHeight:$,letterSpacing:I??0,wordSpacing:P??0,textAppearance:M,color:e.successColor??"#22c55e"},Ce=an(Ut(ae,t)),q=an(Ut(xe,t)),ye=an(Ut(ke,t)),ce=W.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(ae==null?void 0:ae.color)??"#111111",buttonTextColor:e.buttonTextColor??(xe==null?void 0:xe.color)??"#ffffff"},Hg,Dg,ie),U={borderRadius:W.scalingValue(A,t),borderWidth:W.scalingValue(X,t),borderStyle:"solid"},de={borderLeftWidth:W.scalingValue(X,t)},He=async he=>{if(he.preventDefault(),!l)return;const ee=Object.fromEntries(re.map(Ne=>{var ct;return[Ne.name,((ct=k[Ne.name])==null?void 0:ct.trim())??""]}).filter(([,Ne])=>Ne));if(!ue){b("error"),j("No integrations were found for this form.");return}if(Object.keys(ee).length===0)return;const Je=W.getFormFieldValidationError(re,k);if(Je){b("error"),j(Je);return}b("submitting"),j(null);try{const Ne=await fetch(ue,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ee)});if(!Ne.ok){const ct=await Ne.text();throw new Error(ct||`Request failed: ${Ne.status}`)}b("success"),le(Object.fromEntries(re.map(ct=>[ct.name,""])))}catch(Ne){b("error"),j(Ne instanceof Error?Ne.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Re}`.trim(),style:ce,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ng(r)}}),a.jsxs("form",{onSubmit:He,className:`${r}-form`,style:{...U,height:W.scalingValue(D,t),minHeight:W.scalingValue(D,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:re.map(he=>a.jsx("input",{type:he.type==="email"?"email":he.type==="phone"?"tel":"text",name:he.name,autoComplete:"off",value:O[he.name]??"",onChange:ee=>le(Je=>({...Je,[he.name]:ee.target.value})),placeholder:he.placeholder,required:he.isRequired??he.type==="email",className:`${r}-input`,style:{...Ce,paddingRight:W.scalingValue(L.right,t),paddingLeft:W.scalingValue(L.left,t),paddingTop:W.scalingValue(L.top,t),paddingBottom:W.scalingValue(L.bottom,t)}},he.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":Z,style:{...q,...de,paddingRight:W.scalingValue(_.right,t),paddingLeft:W.scalingValue(_.left,t),paddingTop:W.scalingValue(_.top,t),paddingBottom:W.scalingValue(_.bottom,t),pointerEvents:l?"auto":void 0},children:G==="submitting"?"...":Q?$e&&a.jsx(sn,{url:$e,className:`${r}-submitBtnIcon`,style:{maxWidth:W.scalingValue(g??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):fe})})]}),me==="success"&&a.jsx("p",{className:`${r}-success`,style:{...ye},children:V}),me==="error"&&a.jsx("p",{className:`${r}-error`,style:{...ye},role:"alert",children:J??K??se})]})},Hg={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"},Dg=["hover","focus","filled","success","error"],Og=`import React, { useMemo, useState } from 'react';
985
+ `}const Bg=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=O.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:p=1,fontFamily:x,inputFontSettings:b,inputFontSize:m,inputLineHeight:h,inputLetterSpacing:f,inputWordSpacing:v,inputTextAppearance:C,buttonFontSettings:y,buttonFontSize:S,buttonLineHeight:j,buttonLetterSpacing:N,buttonWordSpacing:U,buttonTextAppearance:W,statusFontSettings:R,statusFontSize:B,statusLineHeight:$,statusLetterSpacing:T,statusWordSpacing:k,statusTextAppearance:E,iconMaxWidth:g,minHeight:A,corners:F,stroke:X,stateOverrides:ee,inputPadding:P,buttonPadding:D,successMessage:K="Thanks for subscribing!",errorMessage:le="Please, fill all required fields."}=e,re=d.slice(0,Math.min(p,d.length)),[M,ie]=s.useState(()=>Object.fromEntries(re.map(ge=>[ge.name,""]))),[G,oe]=s.useState("idle"),[te,ye]=s.useState(null),Me=o==="success"?"success":o==="error"?"error":G,w=o==="error"?le:te,Y=o==="filled",I=s.useMemo(()=>{if(!Y)return M;let ge=null;for(const J of re)(M[J.name]??"").trim().length>0||(ge=ge??{...M},ge[J.name]="Filled");return ge??M},[Y,M,re]),z=Me==="error"?O.getFormFieldValidationError(re,I):null,H=o&&o!=="default"?`${r}-state-${o}`:"",Te=re.some(ge=>(I[ge.name]??"").trim().length>0),fe=H!==`${r}-state-filled`&&Te?`${r}-state-filled`:"",ve=`${H} ${fe}`.trim(),de=i==null?void 0:i.submitUrl,he=u??"",we=(c==null?void 0:c.icon)??"",Z=(c==null?void 0:c.mode)==="On",Q=he||"Submit",ae={fontSettings:{fontFamily:x,fontWeight:(b==null?void 0:b.fontWeight)??400,fontStyle:(b==null?void 0:b.fontStyle)??"normal"},fontSize:m??.01,lineHeight:h,letterSpacing:f??0,wordSpacing:v??0,textAppearance:C,color:e.inputTextColor??"#111111"},$e={fontSettings:{fontFamily:x,fontWeight:(y==null?void 0:y.fontWeight)??400,fontStyle:(y==null?void 0:y.fontStyle)??"normal"},fontSize:S??.01,lineHeight:j,letterSpacing:N??0,wordSpacing:U??0,textAppearance:W,color:e.buttonTextColor??"#ffffff"},ke={fontSettings:{fontFamily:x,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:B??.01,lineHeight:$,letterSpacing:T??0,wordSpacing:k??0,textAppearance:E,color:e.successColor??"#22c55e"},xe=an(Ut(ae,t)),V=an(Ut($e,t)),pe=an(Ut(ke,t)),se=O.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(ae==null?void 0:ae.color)??"#111111",buttonTextColor:e.buttonTextColor??($e==null?void 0:$e.color)??"#ffffff"},zg,jg,ee),q={borderRadius:O.scalingValue(F,t),borderWidth:O.scalingValue(X,t),borderStyle:"solid"},ce={borderLeftWidth:O.scalingValue(X,t)},We=async ge=>{if(ge.preventDefault(),!l)return;const J=Object.fromEntries(re.map(_e=>{var rt;return[_e.name,((rt=M[_e.name])==null?void 0:rt.trim())??""]}).filter(([,_e])=>_e));if(!de){oe("error"),ye("No integrations were found for this form.");return}if(Object.keys(J).length===0)return;const Ke=O.getFormFieldValidationError(re,M);if(Ke){oe("error"),ye(Ke);return}oe("submitting"),ye(null);try{const _e=await fetch(de,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(J)});if(!_e.ok){const rt=await _e.text();throw new Error(rt||`Request failed: ${_e.status}`)}oe("success"),ie(Object.fromEntries(re.map(rt=>[rt.name,""])))}catch(_e){oe("error"),ye(_e instanceof Error?_e.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${ve}`.trim(),style:se,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Og(r)}}),a.jsxs("form",{onSubmit:We,className:`${r}-form`,style:{...q,height:O.scalingValue(A,t),minHeight:O.scalingValue(A,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:re.map(ge=>a.jsx("input",{type:ge.type==="email"?"email":ge.type==="phone"?"tel":"text",name:ge.name,autoComplete:"off",value:I[ge.name]??"",onChange:J=>ie(Ke=>({...Ke,[ge.name]:J.target.value})),placeholder:ge.placeholder,required:ge.isRequired??ge.type==="email",className:`${r}-input`,style:{...xe,paddingRight:O.scalingValue(P.right,t),paddingLeft:O.scalingValue(P.left,t),paddingTop:O.scalingValue(P.top,t),paddingBottom:O.scalingValue(P.bottom,t)}},ge.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":Q,style:{...V,...ce,paddingRight:O.scalingValue(D.right,t),paddingLeft:O.scalingValue(D.left,t),paddingTop:O.scalingValue(D.top,t),paddingBottom:O.scalingValue(D.bottom,t),pointerEvents:l?"auto":void 0},children:G==="submitting"?"...":Z?we&&a.jsx(sn,{url:we,className:`${r}-submitBtnIcon`,style:{maxWidth:O.scalingValue(g??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):he})})]}),Me==="success"&&a.jsx("p",{className:`${r}-success`,style:{...pe},children:K}),Me==="error"&&a.jsx("p",{className:`${r}-error`,style:{...pe},role:"alert",children:z??w??le})]})},zg={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"},jg=["hover","focus","filled","success","error"],Vg=`import React, { useMemo, useState } from 'react';
984
986
  import { CommonComponentProps } from '../props';
985
987
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
986
988
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -1003,6 +1005,7 @@ function getCSS(P: string): string {
1003
1005
  .\${P}-form {
1004
1006
  display: flex;
1005
1007
  width: 100%;
1008
+ box-sizing: border-box;
1006
1009
  align-items: stretch;
1007
1010
  overflow: hidden;
1008
1011
  border-color: var(--\${P}-stroke-color);
@@ -1046,6 +1049,7 @@ function getCSS(P: string): string {
1046
1049
  .\${P}-input {
1047
1050
  flex: 1;
1048
1051
  min-width: 0;
1052
+ box-sizing: border-box;
1049
1053
  background: transparent;
1050
1054
  border: none;
1051
1055
  outline: none;
@@ -1557,7 +1561,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
1557
1561
  };
1558
1562
 
1559
1563
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1560
- `,Bg="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>'),zg=[{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."}],ya={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},jg=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Vg={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:{...ya.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:{...ya.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:{...ya.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:zg,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Bg},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:[...jg],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"]},Gg={element:Wg,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:Vg,sourceCode:Og};function Xg(e,t){const n=t>0?`${t}px`:"0px";return`
1564
+ `,Gg="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>'),Xg=[{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."}],ba={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Yg=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],qg={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:{...ba.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:{...ba.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:{...ba.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:Xg,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Gg},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:[...Yg],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"]},Ug={element:Bg,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:qg,sourceCode:Vg};function Kg(e,t){const n=t>0?`${t}px`:"0px";return`
1561
1565
  .${e}-marquee-wrapper {
1562
1566
  overflow: hidden;
1563
1567
  width: 100%;
@@ -1689,7 +1693,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1689
1693
  .${e}-image-hover-grayscale:hover video {
1690
1694
  filter: grayscale(100%);
1691
1695
  }
1692
- `}const qg=30,Yg=20,va=3,Ug=12,Kg=32,Zg=3,Jg=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")},Qg=(e,t)=>Array.from({length:t},()=>e).flat(),eh=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},bd=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),vl=(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),r=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=bd(d);return c<=0?0:c+r*Math.max(0,t-1)},th=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=bd(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+r*Math.max(0,e.children.length-1)+l},nh=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},ih=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>nh(i,e))},oh=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??"")},rh=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,ah=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var P,M,g,D;const p=s.useRef(null),v=!!((P=e.image)!=null&&P.url&&oh(e.image));s.useLayoutEffect(()=>{d&&rh(p.current)&&(u==null||u())},[d,(M=e.image)==null?void 0:M.url,u]);const w=n.display==="cover",m=n.ratioValue??"1:1",h=n.reversed??!1,[f,x]=m.split(":").map(Number),S=(h?x:f)/(h?f:x),z=i/S,N=z>o?o:z,Y=z>o?o*S:i,B=c(Y),T=c(N),H={borderRadius:c(r)},$=w?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...H}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",...H},I=((g=e.image)==null?void 0:g.url)&&(v?a.jsx("video",{ref:A=>{p.current=A},src:e.image.url,style:$,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:d?u:void 0,onError:d?u:void 0}):a.jsx("img",{ref:A=>{p.current=A},src:e.image.url,alt:((D=e.image)==null?void 0:D.name)??"",style:$,onLoad:d?u:void 0,onError:d?u:void 0}));return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...w?{width:B}:{width:"max-content",maxWidth:c(i),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...w?{width:B,height:T,overflow:"hidden",...H}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:I&&e.link?a.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:pt(`${t}-marquee-link`,!w&&`${t}-marquee-link-contain`),children:I}):I})})},sh=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=W.useScopedStyles(),[l,d]=s.useState(0),c=l>0?Math.round(l):0,u=s.useMemo(()=>Xg(r,c),[r,c]),{speed:p,direction:v,pauseOnHover:w,gap:m,imageMaxWidth:h,imageMaxHeight:f,hoverEffect:x,cornerRadius:C=0}=e,y=s.useMemo(()=>eh(e.imageFit),[e.imageFit]),S=(t==null?void 0:t.length)??0,z=!!o,N=!n||!!i,Y=N&&x!=="off"&&x!=="randomize"?`${r}-image-hover-${x}`:void 0,B=n?!!i:!0,H=((t==null?void 0:t.length)??0)>0&&(B||!!n),$=Math.max(0,p)*qg,I=be=>W.scalingValue(be,n??!1),P=s.useRef(null),M=s.useRef(null),g=s.useRef(null),[D,A]=s.useState(0),X=B&&w==="on",[ie,L]=s.useState(!1),[_,V]=s.useState({}),se=s.useRef(_);se.current=_;const re=s.useRef(null),k=s.useRef(0),le=s.useRef(null),G=s.useMemo(()=>(t??[]).map(be=>{var Re;return((Re=be.image)==null?void 0:Re.url)??""}).join("\0"),[t]),[b,E]=s.useState(va),j=s.useMemo(()=>{const be=t??[];return be.length===0||!(B||!!n)?be:Qg(be,b)},[t,B,b,n]),me=s.useMemo(()=>(t??[]).filter(be=>{var Re;return!!((Re=be.image)!=null&&Re.url)}).length,[t]),K=H?Zg:1;s.useLayoutEffect(()=>{k.current=0,V({}),re.current=null,E(va),d(0)},[G]),s.useEffect(()=>{if(!N||x!=="randomize")return;const be=P.current;if(!be)return;const Re=Q=>{V(Z=>{const ae=Array.from(Q).filter(ke=>ke in Z&&!ih(be,ke));if(ae.length===0)return Z;const xe={...Z};return ae.forEach(ke=>{delete xe[ke]}),xe})},ue=new IntersectionObserver(Q=>{const Z=new Set;for(const ae of Q){const xe=ae.target.dataset.marqueeItemIndex,ke=xe!==void 0?Number(xe):NaN;Number.isNaN(ke)||Z.add(ke)}Z.size>0&&Re(Z)},{root:be,threshold:0});Object.keys(_).forEach(Q=>{const Z=Number(Q);be.querySelectorAll(`[data-marquee-item-index="${Z}"]`).forEach(ae=>ue.observe(ae))});const fe={current:0},$e=()=>{const Q=Object.keys(se.current);Q.length!==0&&(Re(Q.map(Number)),fe.current=requestAnimationFrame($e))};return Object.keys(se.current).length>0&&(fe.current=requestAnimationFrame($e)),()=>{cancelAnimationFrame(fe.current),ue.disconnect()}},[x,_,N]),s.useLayoutEffect(()=>{if(!H)return;const be=P.current,Re=g.current;if(!be||!Re)return;const ue={current:0},fe=()=>{const Z=be.getBoundingClientRect().width||be.offsetWidth,ae=th(Re),xe=re.current,ke=typeof xe=="number"&&Math.abs(xe-ae)<=.25;re.current=ae;let Ce=b,q=0;if((B||n)&&S>0&&Z>0){const U=vl(Re,S);if(U>=Kg){q=U;const de=Math.min(Ug,Math.max(va,Math.ceil(Z/U)+1));Ce=de,de!==b&&E(de)}}const ce=Ce!==b&&q>0?q*Ce:ae>0?ae:q>0?q*Ce:(()=>{const U=vl(Re,S);return U>0?U*Ce:0})();ce>0?d(U=>U<=0?ce:!ke||Math.round(U)===Math.round(ce)?U:ce):!ke&&l<=0&&(cancelAnimationFrame(ue.current),ue.current=requestAnimationFrame(fe))},$e=()=>{cancelAnimationFrame(ue.current),ue.current=requestAnimationFrame(fe)};le.current=$e,$e();const Q=new ResizeObserver($e);return Q.observe(be),Q.observe(Re),()=>{le.current=null,cancelAnimationFrame(ue.current),Q.disconnect()}},[B,H,l,G,b,S,n]),s.useLayoutEffect(()=>{if(!H||c<=0)return;const be=M.current;be&&Jg(be)},[H,c,v,$]),s.useLayoutEffect(()=>{if(!H||l<=0){A(0);return}const be=M.current,Re=g.current;if(!be||!Re)return;const ue=()=>{const $e=be.offsetHeight||be.getBoundingClientRect().height,Q=Array.from(Re.children).reduce((ae,xe)=>Math.max(ae,xe.offsetHeight||xe.getBoundingClientRect().height),0),Z=$e>0?$e:Q;A(Z>0?Z:0)};ue();const fe=new ResizeObserver(ue);return fe.observe(be),fe.observe(Re),()=>fe.disconnect()},[H,K,j,n,m,h,f,l,y,_]),s.useLayoutEffect(()=>{if(!n||!z||!H||typeof window>"u")return;const be=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(be)},[n,z,H,v,l,D,m,j]);const te=()=>{X&&L(!0)},O=()=>{X&&L(!1)},J=s.useCallback(()=>{var be;k.current=Math.min(me,k.current+1),(be=le.current)==null||be.call(le)},[me]),ne=s.useCallback((be,Re)=>{V(ue=>{const fe=ue[be]??Re,$e=(t??[]).filter(Z=>Z!==fe);if($e.length===0)return ue;const Q=$e[Math.floor(Math.random()*$e.length)];return{...ue,[be]:Q}})},[t]),Pe=(be,Re,ue,fe)=>{const $e=N&&x==="randomize"&&y.display==="cover"?_[ue]??be:be,Q=`max(${I(m)}, ${Yg}px)`,Z=`calc(-0.5 * (${Q} + ${I(m)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":ue,onMouseEnter:N&&x==="randomize"&&y.display==="cover"?()=>ne(ue,be):void 0,children:[a.jsx(ah,{item:$e,prefix:r,imageFit:y,imageMaxWidth:h,imageMaxHeight:f,cornerRadius:C,imageHoverClass:Y,isEditor:n,isFirstSet:fe,scaled:I,onFirstSetImageDone:J}),z&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:Z,width:Q,height:"100%"}})]},`${Re}-${ue}`)};if(H){const be=B?X&&ie?"paused":"running":"paused",Re=c>0&&$>0?c/$*1e3:0,ue=`${Math.max(0,Re)/1e3}s`;return a.jsxs("div",{ref:P,className:pt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:D>0?{height:D}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:M,className:`${r}-marquee-track`,"data-direction":v,onMouseEnter:te,onMouseLeave:O,style:{WebkitAnimationDuration:ue,animationDuration:ue,WebkitAnimationPlayState:be,animationPlayState:be},children:Array.from({length:K},(fe,$e)=>a.jsx("div",{ref:$e===0?g:void 0,className:pt(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:I(m),paddingRight:I(m)},"aria-hidden":$e>0,children:j.map((Q,Z)=>Pe(Q,$e,Z,$e===0&&Z<S))},`set-${$e}`))})]})}return a.jsxs("div",{ref:P,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:pt(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:I(m),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((be,Re)=>Pe(be,0,Re))},"marquee-static")]})},lh=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1696
+ `}const Zg=30,Jg=20,wa=3,Qg=12,eh=32,th=3,nh=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")},ih=(e,t)=>Array.from({length:t},()=>e).flat(),oh=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},Td=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Sl=(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),r=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=Td(d);return c<=0?0:c+r*Math.max(0,t-1)},rh=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Td(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+r*Math.max(0,e.children.length-1)+l},ah=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},sh=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>ah(i,e))},lh=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??"")},ch=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,dh=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var k,E,g,A;const p=s.useRef(null),x=!!((k=e.image)!=null&&k.url&&lh(e.image));s.useLayoutEffect(()=>{d&&ch(p.current)&&(u==null||u())},[d,(E=e.image)==null?void 0:E.url,u]);const b=n.display==="cover",m=n.ratioValue??"1:1",h=n.reversed??!1,[f,v]=m.split(":").map(Number),S=(h?v:f)/(h?f:v),j=i/S,N=j>o?o:j,U=j>o?o*S:i,W=c(U),R=c(N),B={borderRadius:c(r)},$=b?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...B}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",...B},T=((g=e.image)==null?void 0:g.url)&&(x?a.jsx("video",{ref:F=>{p.current=F},src:e.image.url,style:$,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:d?u:void 0,onError:d?u:void 0}):a.jsx("img",{ref:F=>{p.current=F},src:e.image.url,alt:((A=e.image)==null?void 0:A.name)??"",style:$,onLoad:d?u:void 0,onError:d?u:void 0}));return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...b?{width:W}:{width:"max-content",maxWidth:c(i),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...b?{width:W,height:R,overflow:"hidden",...B}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:T&&e.link?a.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:pt(`${t}-marquee-link`,!b&&`${t}-marquee-link-contain`),children:T}):T})})},uh=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=O.useScopedStyles(),[l,d]=s.useState(0),c=l>0?Math.round(l):0,u=s.useMemo(()=>Kg(r,c),[r,c]),{speed:p,direction:x,pauseOnHover:b,gap:m,imageMaxWidth:h,imageMaxHeight:f,hoverEffect:v,cornerRadius:C=0}=e,y=s.useMemo(()=>oh(e.imageFit),[e.imageFit]),S=(t==null?void 0:t.length)??0,j=!!o,N=!n||!!i,U=N&&v!=="off"&&v!=="randomize"?`${r}-image-hover-${v}`:void 0,W=n?!!i:!0,B=((t==null?void 0:t.length)??0)>0&&(W||!!n),$=Math.max(0,p)*Zg,T=fe=>O.scalingValue(fe,n??!1),k=s.useRef(null),E=s.useRef(null),g=s.useRef(null),[A,F]=s.useState(0),X=W&&b==="on",[ee,P]=s.useState(!1),[D,K]=s.useState({}),le=s.useRef(D);le.current=D;const re=s.useRef(null),M=s.useRef(0),ie=s.useRef(null),G=s.useMemo(()=>(t??[]).map(fe=>{var ve;return((ve=fe.image)==null?void 0:ve.url)??""}).join("\0"),[t]),[oe,te]=s.useState(wa),ye=s.useMemo(()=>{const fe=t??[];return fe.length===0||!(W||!!n)?fe:ih(fe,oe)},[t,W,oe,n]),Me=s.useMemo(()=>(t??[]).filter(fe=>{var ve;return!!((ve=fe.image)!=null&&ve.url)}).length,[t]),w=B?th:1;s.useLayoutEffect(()=>{M.current=0,K({}),re.current=null,te(wa),d(0)},[G]),s.useEffect(()=>{if(!N||v!=="randomize")return;const fe=k.current;if(!fe)return;const ve=Z=>{K(Q=>{const ae=Array.from(Z).filter(ke=>ke in Q&&!sh(fe,ke));if(ae.length===0)return Q;const $e={...Q};return ae.forEach(ke=>{delete $e[ke]}),$e})},de=new IntersectionObserver(Z=>{const Q=new Set;for(const ae of Z){const $e=ae.target.dataset.marqueeItemIndex,ke=$e!==void 0?Number($e):NaN;Number.isNaN(ke)||Q.add(ke)}Q.size>0&&ve(Q)},{root:fe,threshold:0});Object.keys(D).forEach(Z=>{const Q=Number(Z);fe.querySelectorAll(`[data-marquee-item-index="${Q}"]`).forEach(ae=>de.observe(ae))});const he={current:0},we=()=>{const Z=Object.keys(le.current);Z.length!==0&&(ve(Z.map(Number)),he.current=requestAnimationFrame(we))};return Object.keys(le.current).length>0&&(he.current=requestAnimationFrame(we)),()=>{cancelAnimationFrame(he.current),de.disconnect()}},[v,D,N]),s.useLayoutEffect(()=>{if(!B)return;const fe=k.current,ve=g.current;if(!fe||!ve)return;const de={current:0},he=()=>{const Q=fe.getBoundingClientRect().width||fe.offsetWidth,ae=rh(ve),$e=re.current,ke=typeof $e=="number"&&Math.abs($e-ae)<=.25;re.current=ae;let xe=oe,V=0;if((W||n)&&S>0&&Q>0){const q=Sl(ve,S);if(q>=eh){V=q;const ce=Math.min(Qg,Math.max(wa,Math.ceil(Q/q)+1));xe=ce,ce!==oe&&te(ce)}}const se=xe!==oe&&V>0?V*xe:ae>0?ae:V>0?V*xe:(()=>{const q=Sl(ve,S);return q>0?q*xe:0})();se>0?d(q=>q<=0?se:!ke||Math.round(q)===Math.round(se)?q:se):!ke&&l<=0&&(cancelAnimationFrame(de.current),de.current=requestAnimationFrame(he))},we=()=>{cancelAnimationFrame(de.current),de.current=requestAnimationFrame(he)};ie.current=we,we();const Z=new ResizeObserver(we);return Z.observe(fe),Z.observe(ve),()=>{ie.current=null,cancelAnimationFrame(de.current),Z.disconnect()}},[W,B,l,G,oe,S,n]),s.useLayoutEffect(()=>{if(!B||c<=0)return;const fe=E.current;fe&&nh(fe)},[B,c,x,$]),s.useLayoutEffect(()=>{if(!B||l<=0){F(0);return}const fe=E.current,ve=g.current;if(!fe||!ve)return;const de=()=>{const we=fe.offsetHeight||fe.getBoundingClientRect().height,Z=Array.from(ve.children).reduce((ae,$e)=>Math.max(ae,$e.offsetHeight||$e.getBoundingClientRect().height),0),Q=we>0?we:Z;F(Q>0?Q:0)};de();const he=new ResizeObserver(de);return he.observe(fe),he.observe(ve),()=>he.disconnect()},[B,w,ye,n,m,h,f,l,y,D]),s.useLayoutEffect(()=>{if(!n||!j||!B||typeof window>"u")return;const fe=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(fe)},[n,j,B,x,l,A,m,ye]);const Y=()=>{X&&P(!0)},I=()=>{X&&P(!1)},z=s.useCallback(()=>{var fe;M.current=Math.min(Me,M.current+1),(fe=ie.current)==null||fe.call(ie)},[Me]),H=s.useCallback((fe,ve)=>{K(de=>{const he=de[fe]??ve,we=(t??[]).filter(Q=>Q!==he);if(we.length===0)return de;const Z=we[Math.floor(Math.random()*we.length)];return{...de,[fe]:Z}})},[t]),Te=(fe,ve,de,he)=>{const we=N&&v==="randomize"&&y.display==="cover"?D[de]??fe:fe,Z=`max(${T(m)}, ${Jg}px)`,Q=`calc(-0.5 * (${Z} + ${T(m)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":de,onMouseEnter:N&&v==="randomize"&&y.display==="cover"?()=>H(de,fe):void 0,children:[a.jsx(dh,{item:we,prefix:r,imageFit:y,imageMaxWidth:h,imageMaxHeight:f,cornerRadius:C,imageHoverClass:U,isEditor:n,isFirstSet:he,scaled:T,onFirstSetImageDone:z}),j&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:Q,width:Z,height:"100%"}})]},`${ve}-${de}`)};if(B){const fe=W?X&&ee?"paused":"running":"paused",ve=c>0&&$>0?c/$*1e3:0,de=`${Math.max(0,ve)/1e3}s`;return a.jsxs("div",{ref:k,className:pt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:A>0?{height:A}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:E,className:`${r}-marquee-track`,"data-direction":x,onMouseEnter:Y,onMouseLeave:I,style:{WebkitAnimationDuration:de,animationDuration:de,WebkitAnimationPlayState:fe,animationPlayState:fe},children:Array.from({length:w},(he,we)=>a.jsx("div",{ref:we===0?g:void 0,className:pt(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:T(m),paddingRight:T(m)},"aria-hidden":we>0,children:ye.map((Z,Q)=>Te(Z,we,Q,we===0&&Q<S))},`set-${we}`))})]})}return a.jsxs("div",{ref:k,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:pt(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:T(m),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((fe,ve)=>Te(fe,0,ve))},"marquee-static")]})},ph=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1693
1697
  import cn from 'classnames';
1694
1698
  import { CommonComponentProps } from '../props';
1695
1699
  import { scalingValue } from '../utils/scalingValue';
@@ -2472,7 +2476,7 @@ type MarqueeProps = {
2472
2476
  isPreviewMode?: boolean;
2473
2477
  isEditMode?: boolean;
2474
2478
  } & CommonComponentProps;
2475
- `,ch={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:""}]}},dh={element:sh,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:ch,sourceCode:lh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function uh(e,t,n){const i=t>0?`${t}px`:"0px",o=n?`
2479
+ `,mh={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:""}]}},gh={element:uh,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:mh,sourceCode:ph,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function hh(e,t,n){const i=t>0?`${t}px`:"0px",o=n?`
2476
2480
  .${e}-item-image-wrap {
2477
2481
  display: flex;
2478
2482
  flex: 0 0 auto;
@@ -2601,7 +2605,7 @@ ${o}
2601
2605
  left: -9999px;
2602
2606
  top: 0;
2603
2607
  }
2604
- `}const ph=30,xa=3,mh=12,gh=3,ts=.72,hh=100,fh=10,yh=e=>Math.max(0,e)/hh,vh=e=>Math.max(0,e)/fh,xh=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")},bh=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),ki={ctx:void 0},wh=()=>ki.ctx!==void 0?ki.ctx:typeof document>"u"?(ki.ctx=null,ki.ctx):(ki.ctx=document.createElement("canvas").getContext("2d"),ki.ctx),Sh=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},Ch=e=>{e.style.transform=""},$h=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},Th=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const r=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?r:n(l,r)};return n(e,e.offsetWidth/2)},Ih=96,Rh=(e,t,n)=>{if(t<=0||e<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),r=new Float64Array(n+1),l=e*t,d=u=>Math.sqrt(1+(l*Math.cos(t*u))**2),c=i/n;return Array.from({length:n},(u,p)=>{const v=p*c,w=v+c;o[p+1]=w,r[p+1]=r[p]+(d(v)+d(w))*.5*c}),{wavelength:i,periodArc:r[n],x:o,s:r}},Lh=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),r=i-o*e.periodArc,{s:l,x:d}=e,c=(m,h)=>{if(h-m<=1)return[m,h];const f=m+h>>1;return l[f]<=r?c(f,h):c(m,f)},[u,p]=c(0,l.length-1),v=l[p]-l[u],w=v>0?(r-l[u])/v:0;return n*(o*e.wavelength+d[u]+(d[p]-d[u])*w)},Ph=(e,t,n,i)=>{const o=Math.max(0,n),r=e>0?2*Math.PI*o/e:0,l=p=>i+t*Math.sin(r*p),d=p=>t*r*Math.cos(r*p),c=Math.max(4,Math.ceil(o*4)),u=Array.from({length:c},(p,v)=>{const w=v/c*e,m=(v+1)/c*e,h=m-w,f=l(w),x=l(m),C=w+h/3,y=f+d(w)*h/3,S=m-h/3,z=x-d(m)*h/3;return`C${C.toFixed(2)} ${y.toFixed(2)} ${S.toFixed(2)} ${z.toFixed(2)} ${m.toFixed(2)} ${x.toFixed(2)}`});return[`M0 ${l(0).toFixed(2)}`,...u].join(" ")},Eh=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var m;const d=o!==0?{...n,transform:`translateY(${o}px)`}:n,c=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${ts}em`},u=((m=e.image)==null?void 0:m.url)&&a.jsx("img",{src:e.image.url,alt:e.image.name??"",className:`${t}-item-image`,style:c}),p=u&&(l?a.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),v=l?a.jsx("span",{className:`${t}-text`,style:d,children:Array.from(e.text).map((h,f)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:h===" "?" ":h})},f))}):a.jsx("span",{className:`${t}-text`,style:d,children:e.text}),w=a.jsxs(a.Fragment,{children:[p,v]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:e.link?a.jsx("a",{href:e.link,className:`${t}-item-link`,style:{gap:r},children:w}):w})},Mh=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=W.useScopedStyles(),[r,l]=s.useState(0),d=r>0?Math.round(r):0,{speed:c,direction:u,pauseOnHover:p,gap:v,layoutType:w,curveAmplitude:m,curveFrequency:h,textFontFamily:f,textFontSettings:x,textFontSize:C,textLineHeight:y,textLetterSpacing:S,textWordSpacing:z,textTextAppearance:N,textColor:Y,backgroundColor:B,ribbonWidth:T}=e,H=T??y,$=w==="curve",I=yh(m),P=vh(h),M=s.useMemo(()=>uh(o,d,$),[o,d,$]),g=s.useMemo(()=>Ut({fontSettings:{fontFamily:f,fontWeight:x.fontWeight,fontStyle:x.fontStyle},letterSpacing:S,wordSpacing:z,fontSize:C,lineHeight:y,textAppearance:N,color:Y},n),[f,x,S,z,C,y,N,Y,n]),D=ge=>W.scalingValue(ge,n??!1),A=((t==null?void 0:t.length)??0)>0,X=n?!!i:!0,ie=A&&(X||!!n),L=Math.max(0,c)*ph,_=X&&p==="on",[V,se]=s.useState(!1),re=X?_&&V?"paused":"running":"paused",k=re==="running"&&L>0&&d>0,le=s.useRef(null),G=s.useRef(null),b=s.useRef(null),E=s.useRef(null),j=s.useRef(null),me=s.useRef(null),K=s.useRef(k),te=s.useRef(null);K.current=k;const[O,J]=s.useState(0),[ne,Pe]=s.useState(0),[be,Re]=s.useState(0),[ue,fe]=s.useState(0),[$e,Q]=s.useState(0),Z=s.useMemo(()=>(t??[]).map(ge=>{var ve;return`${ge.text}\0${((ve=ge.image)==null?void 0:ve.url)??""}`}).join("\0"),[t]),[ae,xe]=s.useState(xa),ke=s.useMemo(()=>{const ge=t??[];return ge.length===0||!(X||n)?ge:bh(ge,ae)},[t,X,ae,n]),Ce=ie?gh:1;s.useLayoutEffect(()=>{xe(xa),l(0)},[Z]),s.useLayoutEffect(()=>{var we;const ge=me.current;if(!ge)return;const ve=()=>{const Te=getComputedStyle(ge),Xe=parseFloat(Te.fontSize)||0;if(Xe<=0)return;const ze=wh();if(!ze){J(Xe*ts),Pe(0);return}ze.font=`${Te.fontStyle} ${Te.fontWeight} ${Xe}px ${Te.fontFamily}`;const Ie=ze.measureText("H"),Ve=Ie.actualBoundingBoxAscent>0?Ie.actualBoundingBoxAscent:Xe*ts,De=Math.max(0,Ie.actualBoundingBoxDescent||0),tt=Ie.fontBoundingBoxAscent||0,nt=Ie.fontBoundingBoxDescent||0;J(St=>Math.abs(St-Ve)>.5?Ve:St);const st=tt>0||nt>0?(nt-De-(tt-Ve))/2:0;Pe(St=>Math.abs(St-st)>.25?st:St)};ve();const _e=typeof document<"u"?document.fonts:void 0;(we=_e==null?void 0:_e.ready)==null||we.then(ve).catch(()=>{});const Ze=new ResizeObserver(ve);return Ze.observe(ge),()=>Ze.disconnect()},[g.fontFamily,g.fontWeight,g.fontStyle,g.fontSize,g.lineHeight]),s.useLayoutEffect(()=>{if(!ie)return;const ge=le.current,ve=E.current;if(!ge||!ve)return;const _e={id:0},Ze=()=>{const Te=ge.offsetWidth||ge.getBoundingClientRect().width,Xe=ve.offsetWidth||ve.getBoundingClientRect().width;if(A&&Te>0&&Xe>0){const ze=Xe/ae;if(ze>0){const Ie=Math.min(mh,Math.max(xa,Math.ceil(Te/ze)+1));if(Ie!==ae){xe(Ie);return}}}Xe>0&&l(Xe)};_e.id=requestAnimationFrame(Ze);const we=new ResizeObserver(()=>{cancelAnimationFrame(_e.id),_e.id=requestAnimationFrame(Ze)});return we.observe(ge),we.observe(ve),()=>{cancelAnimationFrame(_e.id),we.disconnect()}},[ie,Z,ae,A,O]),s.useLayoutEffect(()=>{const ge=j.current;if(!ge)return;const ve={id:0},_e=()=>{const we=ge.offsetHeight;we>0&&Q(Te=>Math.abs(Te-we)>.5?we:Te)};ve.id=requestAnimationFrame(_e);const Ze=new ResizeObserver(()=>{cancelAnimationFrame(ve.id),ve.id=requestAnimationFrame(_e)});return Ze.observe(ge),()=>{cancelAnimationFrame(ve.id),Ze.disconnect()}},[H,n]),s.useLayoutEffect(()=>{if(!$){Re(0),fe(0);return}const ge=le.current,ve=E.current;if(!ge||!ve)return;const _e={id:0},Ze=()=>{const Te=ge.offsetWidth,Xe=ve.offsetHeight;Te>0&&fe(ze=>Math.abs(ze-Te)>.5?Te:ze),Xe>0&&Re(ze=>Math.abs(ze-Xe)>.5?Xe:ze)};_e.id=requestAnimationFrame(Ze);const we=new ResizeObserver(()=>{cancelAnimationFrame(_e.id),_e.id=requestAnimationFrame(Ze)});return we.observe(ge),we.observe(ve),()=>{cancelAnimationFrame(_e.id),we.disconnect()}},[$,Z,O,y,C,ie]),s.useLayoutEffect(()=>{if(!ie||d<=0)return;const ge=b.current;ge&&xh(ge)},[ie,d,u,L]),s.useLayoutEffect(()=>{if(!$||!A)return;const ge=le.current;if(!ge)return;const ve={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},_e=()=>{for(const Ie of ve.itemsCache)for(const Ve of Ie.glyphs)Ch(Ve.inner)},Ze=()=>{const Ie=G.current??ge;ve.itemsCache=Array.from(ge.querySelectorAll("[data-marquee-text-item]"),Ve=>{const De=[];return Ve.querySelectorAll("[data-marquee-wave-node]").forEach(tt=>{const nt=tt.firstElementChild;nt&&De.push({inner:nt,layoutLocalX:Th(tt,Ie)})}),{item:Ve,glyphs:De}}),ve.cacheDirty=!1},we=()=>{ve.cacheDirty&&Ze();const Ve=(G.current??ge).offsetWidth||1,De=Ve*I,tt=2*Math.PI*P/Ve,nt=`${Ve}|${De}|${tt}`;nt!==ve.lutKey&&(ve.lutKey=nt,ve.lut=Rh(De,tt,Ih));const st=b.current,St=st?$h(getComputedStyle(st).transform):0,Bt=ge.getBoundingClientRect(),zt=Bt.left,ft=Bt.right,wt=ve.lut&&ve.lut.wavelength>0?Math.max(0,(ve.lut.periodArc/ve.lut.wavelength-1)*Ve):0;for(const{item:jt,glyphs:At}of ve.itemsCache){const xt=jt.getBoundingClientRect();if(!(xt.right<zt||xt.left>ft+wt))for(const Ft of At){const Nt=Ft.layoutLocalX+St,Kt=ve.lut?Lh(ve.lut,Nt):Nt,Jt=tt*Kt,Tt=De*Math.sin(Jt),Wt=De*tt*Math.cos(Jt),rn=Math.atan(Wt)*(180/Math.PI);Sh(Ft.inner,Kt-Nt,Tt,rn)}}},Te=()=>{ve.cancelled||(ve.raf=0,we(),K.current&&!document.hidden&&(ve.raf=requestAnimationFrame(Te)))},Xe=()=>{ve.cancelled||ve.raf||(ve.raf=requestAnimationFrame(Te))};te.current=Xe,Xe();const ze=()=>{if(document.hidden){cancelAnimationFrame(ve.raf),ve.raf=0;return}Xe()};return document.addEventListener("visibilitychange",ze),()=>{ve.cancelled=!0,te.current=null,cancelAnimationFrame(ve.raf),document.removeEventListener("visibilitychange",ze),_e()}},[$,I,P,A,r,Z,ae,O]),s.useLayoutEffect(()=>{var ge;(ge=te.current)==null||ge.call(te)},[k]);const q=()=>{_&&se(!0)},ye=()=>{_&&se(!1)},ce=$?I*100:0,U=D(H),de={minHeight:U,...$?{paddingTop:`${ce}%`,paddingBottom:`${ce}%`}:{}},He={height:U,...$?{visibility:"hidden"}:{backgroundColor:B}},he={gap:D(v),minHeight:U},ee=ue*I,Je=$e>0?$e:be,Ne=Math.max(be,Je),ct=$&&ue>0&&Ne>0?Ph(ue,ee,P,ee+Ne/2):"",Ke=ee*2+Ne,ut=ct?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${ue} ${Ke}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:ct,fill:"none",stroke:B,strokeWidth:Je,strokeLinecap:"round",strokeLinejoin:"round"})}):null,lt=a.jsx("div",{ref:j,className:`${o}-ribbon`,style:He,"aria-hidden":!0}),Ye=(ge,ve,_e)=>a.jsx(Eh,{item:ge,prefix:o,textCss:g,capHeightPx:O,opticalOffsetY:ne,imageGapPx:D(v),isCurve:$},`${ve}-${_e}`),Le=a.jsx("span",{ref:me,"aria-hidden":!0,className:`${o}-cap-ref`,style:g,children:"H"}),We=d>0&&L>0?d/L*1e3:0,Be=`${Math.max(0,We)/1e3}s`,Ue=ie?a.jsx("div",{ref:b,className:`${o}-marquee-track`,"data-direction":u,onMouseEnter:q,onMouseLeave:ye,style:{WebkitAnimationDuration:Be,animationDuration:Be,WebkitAnimationPlayState:re,animationPlayState:re},children:Array.from({length:Ce},(ge,ve)=>a.jsx("div",{ref:ve===0?E:void 0,className:`${o}-marquee-set`,style:{...he,paddingRight:D(v)},"aria-hidden":ve>0,children:ke.map((_e,Ze)=>Ye(_e,ve,Ze))},`set-${ve}`))}):a.jsx("div",{ref:E,className:pt(`${o}-marquee-set`,`${o}-marquee-static`),style:he,children:t==null?void 0:t.map((ge,ve)=>Ye(ge,0,ve))});return a.jsxs("div",{ref:le,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:M}}),Le,a.jsxs("div",{ref:G,className:`${o}-marquee-wrapper`,style:de,children:[lt,ut,Ue]})]})},kh=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
2608
+ `}const fh=30,Sa=3,yh=12,xh=3,os=.72,vh=100,bh=10,wh=e=>Math.max(0,e)/vh,Sh=e=>Math.max(0,e)/bh,Ch=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")},$h=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),ki={ctx:void 0},Th=()=>ki.ctx!==void 0?ki.ctx:typeof document>"u"?(ki.ctx=null,ki.ctx):(ki.ctx=document.createElement("canvas").getContext("2d"),ki.ctx),Ih=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},Rh=e=>{e.style.transform=""},Lh=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},Ph=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const r=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?r:n(l,r)};return n(e,e.offsetWidth/2)},Eh=96,Mh=(e,t,n)=>{if(t<=0||e<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),r=new Float64Array(n+1),l=e*t,d=u=>Math.sqrt(1+(l*Math.cos(t*u))**2),c=i/n;return Array.from({length:n},(u,p)=>{const x=p*c,b=x+c;o[p+1]=b,r[p+1]=r[p]+(d(x)+d(b))*.5*c}),{wavelength:i,periodArc:r[n],x:o,s:r}},kh=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),r=i-o*e.periodArc,{s:l,x:d}=e,c=(m,h)=>{if(h-m<=1)return[m,h];const f=m+h>>1;return l[f]<=r?c(f,h):c(m,f)},[u,p]=c(0,l.length-1),x=l[p]-l[u],b=x>0?(r-l[u])/x:0;return n*(o*e.wavelength+d[u]+(d[p]-d[u])*b)},Ah=(e,t,n,i)=>{const o=Math.max(0,n),r=e>0?2*Math.PI*o/e:0,l=p=>i+t*Math.sin(r*p),d=p=>t*r*Math.cos(r*p),c=Math.max(4,Math.ceil(o*4)),u=Array.from({length:c},(p,x)=>{const b=x/c*e,m=(x+1)/c*e,h=m-b,f=l(b),v=l(m),C=b+h/3,y=f+d(b)*h/3,S=m-h/3,j=v-d(m)*h/3;return`C${C.toFixed(2)} ${y.toFixed(2)} ${S.toFixed(2)} ${j.toFixed(2)} ${m.toFixed(2)} ${v.toFixed(2)}`});return[`M0 ${l(0).toFixed(2)}`,...u].join(" ")},Fh=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var m;const d=o!==0?{...n,transform:`translateY(${o}px)`}:n,c=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${os}em`},u=((m=e.image)==null?void 0:m.url)&&a.jsx("img",{src:e.image.url,alt:e.image.name??"",className:`${t}-item-image`,style:c}),p=u&&(l?a.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),x=l?a.jsx("span",{className:`${t}-text`,style:d,children:Array.from(e.text).map((h,f)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:h===" "?" ":h})},f))}):a.jsx("span",{className:`${t}-text`,style:d,children:e.text}),b=a.jsxs(a.Fragment,{children:[p,x]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:e.link?a.jsx("a",{href:e.link,className:`${t}-item-link`,style:{gap:r},children:b}):b})},_h=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=O.useScopedStyles(),[r,l]=s.useState(0),d=r>0?Math.round(r):0,{speed:c,direction:u,pauseOnHover:p,gap:x,layoutType:b,curveAmplitude:m,curveFrequency:h,textFontFamily:f,textFontSettings:v,textFontSize:C,textLineHeight:y,textLetterSpacing:S,textWordSpacing:j,textTextAppearance:N,textColor:U,backgroundColor:W,ribbonWidth:R}=e,B=R??y,$=b==="curve",T=wh(m),k=Sh(h),E=s.useMemo(()=>hh(o,d,$),[o,d,$]),g=s.useMemo(()=>Ut({fontSettings:{fontFamily:f,fontWeight:v.fontWeight,fontStyle:v.fontStyle},letterSpacing:S,wordSpacing:j,fontSize:C,lineHeight:y,textAppearance:N,color:U},n),[f,v,S,j,C,y,N,U,n]),A=me=>O.scalingValue(me,n??!1),F=((t==null?void 0:t.length)??0)>0,X=n?!!i:!0,ee=F&&(X||!!n),P=Math.max(0,c)*fh,D=X&&p==="on",[K,le]=s.useState(!1),re=X?D&&K?"paused":"running":"paused",M=re==="running"&&P>0&&d>0,ie=s.useRef(null),G=s.useRef(null),oe=s.useRef(null),te=s.useRef(null),ye=s.useRef(null),Me=s.useRef(null),w=s.useRef(M),Y=s.useRef(null);w.current=M;const[I,z]=s.useState(0),[H,Te]=s.useState(0),[fe,ve]=s.useState(0),[de,he]=s.useState(0),[we,Z]=s.useState(0),Q=s.useMemo(()=>(t??[]).map(me=>{var be;return`${me.text}\0${((be=me.image)==null?void 0:be.url)??""}`}).join("\0"),[t]),[ae,$e]=s.useState(Sa),ke=s.useMemo(()=>{const me=t??[];return me.length===0||!(X||n)?me:$h(me,ae)},[t,X,ae,n]),xe=ee?xh:1;s.useLayoutEffect(()=>{$e(Sa),l(0)},[Q]),s.useLayoutEffect(()=>{var Se;const me=Me.current;if(!me)return;const be=()=>{const Ie=getComputedStyle(me),qe=parseFloat(Ie.fontSize)||0;if(qe<=0)return;const ze=Th();if(!ze){z(qe*os),Te(0);return}ze.font=`${Ie.fontStyle} ${Ie.fontWeight} ${qe}px ${Ie.fontFamily}`;const Re=ze.measureText("H"),Ve=Re.actualBoundingBoxAscent>0?Re.actualBoundingBoxAscent:qe*os,De=Math.max(0,Re.actualBoundingBoxDescent||0),tt=Re.fontBoundingBoxAscent||0,nt=Re.fontBoundingBoxDescent||0;z(St=>Math.abs(St-Ve)>.5?Ve:St);const ct=tt>0||nt>0?(nt-De-(tt-Ve))/2:0;Te(St=>Math.abs(St-ct)>.25?ct:St)};be();const Ne=typeof document<"u"?document.fonts:void 0;(Se=Ne==null?void 0:Ne.ready)==null||Se.then(be).catch(()=>{});const Je=new ResizeObserver(be);return Je.observe(me),()=>Je.disconnect()},[g.fontFamily,g.fontWeight,g.fontStyle,g.fontSize,g.lineHeight]),s.useLayoutEffect(()=>{if(!ee)return;const me=ie.current,be=te.current;if(!me||!be)return;const Ne={id:0},Je=()=>{const Ie=me.offsetWidth||me.getBoundingClientRect().width,qe=be.offsetWidth||be.getBoundingClientRect().width;if(F&&Ie>0&&qe>0){const ze=qe/ae;if(ze>0){const Re=Math.min(yh,Math.max(Sa,Math.ceil(Ie/ze)+1));if(Re!==ae){$e(Re);return}}}qe>0&&l(qe)};Ne.id=requestAnimationFrame(Je);const Se=new ResizeObserver(()=>{cancelAnimationFrame(Ne.id),Ne.id=requestAnimationFrame(Je)});return Se.observe(me),Se.observe(be),()=>{cancelAnimationFrame(Ne.id),Se.disconnect()}},[ee,Q,ae,F,I]),s.useLayoutEffect(()=>{const me=ye.current;if(!me)return;const be={id:0},Ne=()=>{const Se=me.offsetHeight;Se>0&&Z(Ie=>Math.abs(Ie-Se)>.5?Se:Ie)};be.id=requestAnimationFrame(Ne);const Je=new ResizeObserver(()=>{cancelAnimationFrame(be.id),be.id=requestAnimationFrame(Ne)});return Je.observe(me),()=>{cancelAnimationFrame(be.id),Je.disconnect()}},[B,n]),s.useLayoutEffect(()=>{if(!$){ve(0),he(0);return}const me=ie.current,be=te.current;if(!me||!be)return;const Ne={id:0},Je=()=>{const Ie=me.offsetWidth,qe=be.offsetHeight;Ie>0&&he(ze=>Math.abs(ze-Ie)>.5?Ie:ze),qe>0&&ve(ze=>Math.abs(ze-qe)>.5?qe:ze)};Ne.id=requestAnimationFrame(Je);const Se=new ResizeObserver(()=>{cancelAnimationFrame(Ne.id),Ne.id=requestAnimationFrame(Je)});return Se.observe(me),Se.observe(be),()=>{cancelAnimationFrame(Ne.id),Se.disconnect()}},[$,Q,I,y,C,ee]),s.useLayoutEffect(()=>{if(!ee||d<=0)return;const me=oe.current;me&&Ch(me)},[ee,d,u,P]),s.useLayoutEffect(()=>{if(!$||!F)return;const me=ie.current;if(!me)return;const be={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},Ne=()=>{for(const Re of be.itemsCache)for(const Ve of Re.glyphs)Rh(Ve.inner)},Je=()=>{const Re=G.current??me;be.itemsCache=Array.from(me.querySelectorAll("[data-marquee-text-item]"),Ve=>{const De=[];return Ve.querySelectorAll("[data-marquee-wave-node]").forEach(tt=>{const nt=tt.firstElementChild;nt&&De.push({inner:nt,layoutLocalX:Ph(tt,Re)})}),{item:Ve,glyphs:De}}),be.cacheDirty=!1},Se=()=>{be.cacheDirty&&Je();const Ve=(G.current??me).offsetWidth||1,De=Ve*T,tt=2*Math.PI*k/Ve,nt=`${Ve}|${De}|${tt}`;nt!==be.lutKey&&(be.lutKey=nt,be.lut=Mh(De,tt,Eh));const ct=oe.current,St=ct?Lh(getComputedStyle(ct).transform):0,Bt=me.getBoundingClientRect(),zt=Bt.left,ft=Bt.right,wt=be.lut&&be.lut.wavelength>0?Math.max(0,(be.lut.periodArc/be.lut.wavelength-1)*Ve):0;for(const{item:jt,glyphs:At}of be.itemsCache){const vt=jt.getBoundingClientRect();if(!(vt.right<zt||vt.left>ft+wt))for(const Ft of At){const Nt=Ft.layoutLocalX+St,Kt=be.lut?kh(be.lut,Nt):Nt,Jt=tt*Kt,Tt=De*Math.sin(Jt),Wt=De*tt*Math.cos(Jt),rn=Math.atan(Wt)*(180/Math.PI);Ih(Ft.inner,Kt-Nt,Tt,rn)}}},Ie=()=>{be.cancelled||(be.raf=0,Se(),w.current&&!document.hidden&&(be.raf=requestAnimationFrame(Ie)))},qe=()=>{be.cancelled||be.raf||(be.raf=requestAnimationFrame(Ie))};Y.current=qe,qe();const ze=()=>{if(document.hidden){cancelAnimationFrame(be.raf),be.raf=0;return}qe()};return document.addEventListener("visibilitychange",ze),()=>{be.cancelled=!0,Y.current=null,cancelAnimationFrame(be.raf),document.removeEventListener("visibilitychange",ze),Ne()}},[$,T,k,F,r,Q,ae,I]),s.useLayoutEffect(()=>{var me;(me=Y.current)==null||me.call(Y)},[M]);const V=()=>{D&&le(!0)},pe=()=>{D&&le(!1)},se=$?T*100:0,q=A(B),ce={minHeight:q,...$?{paddingTop:`${se}%`,paddingBottom:`${se}%`}:{}},We={height:q,...$?{visibility:"hidden"}:{backgroundColor:W}},ge={gap:A(x),minHeight:q},J=de*T,Ke=we>0?we:fe,_e=Math.max(fe,Ke),rt=$&&de>0&&_e>0?Ah(de,J,k,J+_e/2):"",Ye=J*2+_e,dt=rt?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${de} ${Ye}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:rt,fill:"none",stroke:W,strokeWidth:Ke,strokeLinecap:"round",strokeLinejoin:"round"})}):null,at=a.jsx("div",{ref:ye,className:`${o}-ribbon`,style:We,"aria-hidden":!0}),Xe=(me,be,Ne)=>a.jsx(Fh,{item:me,prefix:o,textCss:g,capHeightPx:I,opticalOffsetY:H,imageGapPx:A(x),isCurve:$},`${be}-${Ne}`),Le=a.jsx("span",{ref:Me,"aria-hidden":!0,className:`${o}-cap-ref`,style:g,children:"H"}),He=d>0&&P>0?d/P*1e3:0,Be=`${Math.max(0,He)/1e3}s`,Ze=ee?a.jsx("div",{ref:oe,className:`${o}-marquee-track`,"data-direction":u,onMouseEnter:V,onMouseLeave:pe,style:{WebkitAnimationDuration:Be,animationDuration:Be,WebkitAnimationPlayState:re,animationPlayState:re},children:Array.from({length:xe},(me,be)=>a.jsx("div",{ref:be===0?te:void 0,className:`${o}-marquee-set`,style:{...ge,paddingRight:A(x)},"aria-hidden":be>0,children:ke.map((Ne,Je)=>Xe(Ne,be,Je))},`set-${be}`))}):a.jsx("div",{ref:te,className:pt(`${o}-marquee-set`,`${o}-marquee-static`),style:ge,children:t==null?void 0:t.map((me,be)=>Xe(me,0,be))});return a.jsxs("div",{ref:ie,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:E}}),Le,a.jsxs("div",{ref:G,className:`${o}-marquee-wrapper`,style:ce,children:[at,dt,Ze]})]})},Nh=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
2605
2609
  import cn from 'classnames';
2606
2610
  import { CommonComponentProps } from '../props';
2607
2611
  import { scalingValue } from '../utils/scalingValue';
@@ -3442,7 +3446,7 @@ type MarqueeTextProps = {
3442
3446
  isPreviewMode?: boolean;
3443
3447
  isEditMode?: boolean;
3444
3448
  } & CommonComponentProps;
3445
- `,Ah={fontSettings:{type:"object",scope:"common",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Fh={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"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},ribbonWidth:{type:"number",scope:"layout",title:"Ribbon Width",min:0,display:{type:"numeric-input"}},layoutType:{type:"string",scope:"common",title:"Path Type",display:{type:"toggle-cycle",enum:["straight","curve"]}},curveAmplitude:{type:"number",scope:"layout",title:"Amplitude",min:0,max:30,step:1,display:{type:"common-numeric-input",visible:!1}},curveFrequency:{type:"number",scope:"layout",title:"Frequency",min:0,max:100,step:1,display:{type:"common-numeric-input",visible:!1}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Ah.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"},backgroundColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Ribbon Color"}},defaults:{direction:"left",pauseOnHover:"off",layoutType:"curve",textFontFamily:"Antique Série",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#FFFFFF",backgroundColor:"#2E12F0"},layoutDefaults:{m:{speed:.55,gap:.04,ribbonWidth:.08,curveAmplitude:6,curveFrequency:15,textFontSize:.08,textLineHeight:.08},t:{speed:1.3,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:15,textFontSize:.07,textLineHeight:.05},d:{speed:2.5,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:18,textFontSize:.071,textLineHeight:.035}},displayRules:[{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveAmplitude.display.visible",value:!0}},{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveFrequency.display.visible",value:!0}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","ribbonWidth","layoutType","curveAmplitude","curveFrequency"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction","speed"]},{type:"row",items:["ribbonWidth","gap"]},{type:"row",items:["pauseOnHover","layoutType"]},{type:"row",items:["curveAmplitude","curveFrequency"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}],paletteBookmark:{items:["textColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{text:{placeholder:"Add text...",label:"Text",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-input"}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}}},default:[{text:"NEW WORK",image:{url:"https://cdn.cntrl.site/component-assets/marquee_text_icon.svg",name:""},link:""}]}},_h={element:Mh,id:"marquee-text",name:"Marquee Text",category:"typography",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Text_Marquee.mp4"},schema:Fh,sourceCode:kh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}};function Nh(e,t){const n=t>0?`${t}px`:"0px";return`
3449
+ `,Wh={fontSettings:{type:"object",scope:"common",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Hh={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"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},ribbonWidth:{type:"number",scope:"layout",title:"Ribbon Width",min:0,display:{type:"numeric-input"}},layoutType:{type:"string",scope:"common",title:"Path Type",display:{type:"toggle-cycle",enum:["straight","curve"]}},curveAmplitude:{type:"number",scope:"layout",title:"Amplitude",min:0,max:30,step:1,display:{type:"common-numeric-input",visible:!1}},curveFrequency:{type:"number",scope:"layout",title:"Frequency",min:0,max:100,step:1,display:{type:"common-numeric-input",visible:!1}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Wh.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"},backgroundColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Ribbon Color"}},defaults:{direction:"left",pauseOnHover:"off",layoutType:"curve",textFontFamily:"Antique Série",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#FFFFFF",backgroundColor:"#2E12F0"},layoutDefaults:{m:{speed:.55,gap:.04,ribbonWidth:.08,curveAmplitude:6,curveFrequency:15,textFontSize:.08,textLineHeight:.08},t:{speed:1.3,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:15,textFontSize:.07,textLineHeight:.05},d:{speed:2.5,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:18,textFontSize:.071,textLineHeight:.035}},displayRules:[{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveAmplitude.display.visible",value:!0}},{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveFrequency.display.visible",value:!0}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","ribbonWidth","layoutType","curveAmplitude","curveFrequency"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction","speed"]},{type:"row",items:["ribbonWidth","gap"]},{type:"row",items:["pauseOnHover","layoutType"]},{type:"row",items:["curveAmplitude","curveFrequency"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}],paletteBookmark:{items:["textColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{text:{placeholder:"Add text...",label:"Text",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-input"}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}}},default:[{text:"NEW WORK",image:{url:"https://cdn.cntrl.site/component-assets/marquee_text_icon.svg",name:""},link:""}]}},Dh={element:_h,id:"marquee-text",name:"Marquee Text",category:"typography",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Text_Marquee.mp4"},schema:Hh,sourceCode:Nh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}};function Oh(e,t){const n=t>0?`${t}px`:"0px";return`
3446
3450
  .${e}-marquee-wrapper {
3447
3451
  overflow: hidden;
3448
3452
  width: 100%;
@@ -3531,7 +3535,7 @@ type MarqueeTextProps = {
3531
3535
  pointer-events: auto;
3532
3536
  z-index: 10;
3533
3537
  }
3534
- `}const Wh=30,xl=2,Hh=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")},Dh=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=W.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:p,cardWidth:v,corners:w,stroke:m,strokeColor:h,bgColor:f,padding:x,logoMarginTop:C,logoWidth:y,logoHeight:S,captionMarginTop:z}=e,N=!!o,Y=((t==null?void 0:t.length)??0)>0,B=d>0&&(!n||i),T=Y&&(B||n),H=Math.max(0,d)*Wh,$=q=>W.scalingValue(q,n??!1),I=s.useRef(null),P=s.useRef(null),M=s.useRef(null),[g,D]=s.useState(0),[A,X]=s.useState(0),ie=A>0?A:0,L=s.useMemo(()=>Nh(r,ie),[r,ie]),[_,V]=s.useState(0),se=B&&u==="on",[re,k]=s.useState(!1),le=s.useRef(null),[G,b]=s.useState(0),[E,j]=s.useState(0),me=s.useRef(null),K=q=>{var ce,U,de,He,he;return{fontSettings:{fontFamily:(e==null?void 0:e[`${q}FontFamily`])??"Arial",fontWeight:((ce=e==null?void 0:e[`${q}FontSettings`])==null?void 0:ce.fontWeight)??400,fontStyle:((U=e==null?void 0:e[`${q}FontSettings`])==null?void 0:U.fontStyle)??"normal"},textAppearance:{textTransform:((de=e==null?void 0:e[`${q}TextAppearance`])==null?void 0:de.textTransform)??"none",textDecoration:((He=e==null?void 0:e[`${q}TextAppearance`])==null?void 0:He.textDecoration)??"none",fontVariant:((he=e==null?void 0:e[`${q}TextAppearance`])==null?void 0:he.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${q}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${q}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${q}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${q}LineHeight`])??.01,color:(e==null?void 0:e[`${q}Color`])??"#000000"}},te=K("text"),O=K("caption"),J=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(q=>{var ye,ce;return(((ye=q.text)==null?void 0:ye.length)??0)>0||(((ce=q.caption)==null?void 0:ce.length)??0)>0}),[t]),ne=s.useMemo(()=>!T||(t==null?void 0:t.length)===0?1:A<=0||g<=0?xl:Math.max(xl,Math.ceil(g/A)+1),[T,t==null?void 0:t.length,A,g]);s.useLayoutEffect(()=>{if(!T)return;const q=I.current,ye=M.current;if(!q||!ye)return;let ce=0;const U=()=>{const he=q.getBoundingClientRect().width,ee=ye.getBoundingClientRect().width,Je=me.current,Ne=typeof Je=="number"&&Math.abs(Je-ee)<=.25;if(me.current=ee,D(he),typeof ee=="number"&&ee>0&&A<=0){X(ee);return}Ne&&ee!==A?X(ee):!Ne&&A<=0&&(cancelAnimationFrame(ce),ce=requestAnimationFrame(U))},de=()=>{cancelAnimationFrame(ce),ce=requestAnimationFrame(U)};de();const He=new ResizeObserver(de);return He.observe(q),He.observe(ye),()=>{cancelAnimationFrame(ce),He.disconnect()}},[B,T,A]);const Pe=ie>0&&H>0?ie/H*1e3:0,be=`${Math.max(0,Pe)/1e3}s`;s.useLayoutEffect(()=>{if(!T||ie<=0)return;const q=P.current;q&&Hh(q)},[T,ie,c]),s.useLayoutEffect(()=>{if(!T){V(0);return}const q=M.current,ye=P.current;if(!q||!ye)return;const ce=()=>{let de=0;for(let He=0;He<q.children.length;He++){const ee=q.children[He].firstElementChild;ee&&(de=Math.max(de,ee.offsetHeight))}de<=0&&(de=ye.offsetHeight),V(de>0?de:0)};ce();const U=new ResizeObserver(ce);return U.observe(q),U.observe(ye),()=>{U.disconnect()}},[T,ne,t,n,p,v,x,m,w,y,S,G,E]);const Re=()=>{se&&k(!0)},ue=()=>{se&&k(!1)},fe=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),$e=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),Q=s.useCallback((q,ye,ce,U)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:fe,width:"100%"},children:[a.jsx("div",{"data-controls":N?U==null?void 0:U.controlsName:void 0,"data-controls-axis":N?"y":void 0,className:N?`${r}-control`:void 0,style:{height:$((U==null?void 0:U.marginTop)??0)}}),a.jsx("div",{...U!=null&&U.dataMeasureKind?{"data-testimonial-measure":U.dataMeasureKind}:{},style:{...Ut(q,n),textAlign:$e,pointerEvents:"auto",...typeof(U==null?void 0:U.minHeightPx)=="number"&&U.minHeightPx>0?{minHeight:U.minHeightPx}:{}},children:a.jsx(Ri,{content:ye})})]},ce),[fe,$e,n,N,r,$]),Z=s.useCallback((q,ye,ce)=>{var U,de,He;return a.jsxs("div",{style:{padding:`${$(x.top)} ${$(x.right)} ${$(x.bottom)} ${$(x.left)}`,width:$(v+m*2),height:"100%",borderRadius:$(w),border:`${$(m)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:f}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:fe,textAlign:$e},children:[q.text&&Q(te,q.text,"text",ce!=null&&ce.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(ce==null?void 0:ce.textMinHeightPx)=="number"&&ce.textMinHeightPx>0?{minHeightPx:ce.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:fe,width:"100%"},children:[a.jsx("div",{"data-controls":N&&!(ce!=null&&ce.dataMeasureAttrs)?"logoMarginTop":void 0,className:N&&!(ce!=null&&ce.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:$(C)}}),a.jsx("div",{style:{width:$(y),height:$(S)},children:((U=q.logo)==null?void 0:U.url)&&a.jsx("img",{src:q.logo.url,alt:((de=q.logo)==null?void 0:de.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((He=q.logo)==null?void 0:He.objectFit)||"contain"}})})]}),q.caption&&Q(O,q.caption,"caption",{...ce!=null&&ce.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:z,...ce!=null&&ce.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(ce==null?void 0:ce.captionMinHeightPx)=="number"&&ce.captionMinHeightPx>0?{minHeightPx:ce.captionMinHeightPx}:{}})]})]},ye)},[f,z,O,v,w,S,C,y,fe,$e,x.bottom,x.left,x.right,x.top,Q,m,h,te,n,N,r]),ae=s.useCallback(q=>{b(q.maxTextPx),j(q.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!J){ae({maxTextPx:0,maxCaptionPx:0});return}const q=le.current;if(!q)return;const ye=()=>{W.readTestimonialTextMeasure(q,ae)};ye();const ce=new ResizeObserver(ye);return ce.observe(q),()=>{ce.disconnect()}},[J,ae,t,Z]);const xe=J?{textMinHeightPx:G,captionMinHeightPx:E}:void 0,ke=J?a.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((q,ye)=>Z(q,`measure-${ye}`,{dataMeasureAttrs:!0}))}):null,Ce=(q,ye)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Z(q,`card-${ye}`,xe),N&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(p)})`,width:$(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},ye);if(T){const q=B?se&&re?"paused":"running":"paused";return a.jsxs("div",{ref:I,className:pt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",..._>0?{height:_}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:L}}),ke,a.jsx("div",{ref:P,className:`${r}-marquee-track`,"data-direction":c,onMouseEnter:Re,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:be,WebkitAnimationDuration:be,animationPlayState:q,WebkitAnimationPlayState:q},children:Array.from({length:ne},(ye,ce)=>a.jsx("div",{ref:ce===0?M:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(p),paddingRight:$(p)},"aria-hidden":ce>0,children:t==null?void 0:t.map((U,de)=>Ce(U,`${ce}-${de}`))},`set-${ce}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:L}}),ke,a.jsx("div",{style:{gap:$(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((q,ye)=>Ce(q,ye))})]})},Oh=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3538
+ `}const Bh=30,Cl=2,zh=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")},jh=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=O.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:p,cardWidth:x,corners:b,stroke:m,strokeColor:h,bgColor:f,padding:v,logoMarginTop:C,logoWidth:y,logoHeight:S,captionMarginTop:j}=e,N=!!o,U=((t==null?void 0:t.length)??0)>0,W=d>0&&(!n||i),R=U&&(W||n),B=Math.max(0,d)*Bh,$=V=>O.scalingValue(V,n??!1),T=s.useRef(null),k=s.useRef(null),E=s.useRef(null),[g,A]=s.useState(0),[F,X]=s.useState(0),ee=F>0?F:0,P=s.useMemo(()=>Oh(r,ee),[r,ee]),[D,K]=s.useState(0),le=W&&u==="on",[re,M]=s.useState(!1),ie=s.useRef(null),[G,oe]=s.useState(0),[te,ye]=s.useState(0),Me=s.useRef(null),w=V=>{var se,q,ce,We,ge;return{fontSettings:{fontFamily:(e==null?void 0:e[`${V}FontFamily`])??"Arial",fontWeight:((se=e==null?void 0:e[`${V}FontSettings`])==null?void 0:se.fontWeight)??400,fontStyle:((q=e==null?void 0:e[`${V}FontSettings`])==null?void 0:q.fontStyle)??"normal"},textAppearance:{textTransform:((ce=e==null?void 0:e[`${V}TextAppearance`])==null?void 0:ce.textTransform)??"none",textDecoration:((We=e==null?void 0:e[`${V}TextAppearance`])==null?void 0:We.textDecoration)??"none",fontVariant:((ge=e==null?void 0:e[`${V}TextAppearance`])==null?void 0:ge.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${V}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${V}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${V}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${V}LineHeight`])??.01,color:(e==null?void 0:e[`${V}Color`])??"#000000"}},Y=w("text"),I=w("caption"),z=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(V=>{var pe,se;return(((pe=V.text)==null?void 0:pe.length)??0)>0||(((se=V.caption)==null?void 0:se.length)??0)>0}),[t]),H=s.useMemo(()=>!R||(t==null?void 0:t.length)===0?1:F<=0||g<=0?Cl:Math.max(Cl,Math.ceil(g/F)+1),[R,t==null?void 0:t.length,F,g]);s.useLayoutEffect(()=>{if(!R)return;const V=T.current,pe=E.current;if(!V||!pe)return;let se=0;const q=()=>{const ge=V.getBoundingClientRect().width,J=pe.getBoundingClientRect().width,Ke=Me.current,_e=typeof Ke=="number"&&Math.abs(Ke-J)<=.25;if(Me.current=J,A(ge),typeof J=="number"&&J>0&&F<=0){X(J);return}_e&&J!==F?X(J):!_e&&F<=0&&(cancelAnimationFrame(se),se=requestAnimationFrame(q))},ce=()=>{cancelAnimationFrame(se),se=requestAnimationFrame(q)};ce();const We=new ResizeObserver(ce);return We.observe(V),We.observe(pe),()=>{cancelAnimationFrame(se),We.disconnect()}},[W,R,F]);const Te=ee>0&&B>0?ee/B*1e3:0,fe=`${Math.max(0,Te)/1e3}s`;s.useLayoutEffect(()=>{if(!R||ee<=0)return;const V=k.current;V&&zh(V)},[R,ee,c]),s.useLayoutEffect(()=>{if(!R){K(0);return}const V=E.current,pe=k.current;if(!V||!pe)return;const se=()=>{let ce=0;for(let We=0;We<V.children.length;We++){const J=V.children[We].firstElementChild;J&&(ce=Math.max(ce,J.offsetHeight))}ce<=0&&(ce=pe.offsetHeight),K(ce>0?ce:0)};se();const q=new ResizeObserver(se);return q.observe(V),q.observe(pe),()=>{q.disconnect()}},[R,H,t,n,p,x,v,m,b,y,S,G,te]);const ve=()=>{le&&M(!0)},de=()=>{le&&M(!1)},he=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),we=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),Z=s.useCallback((V,pe,se,q)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:he,width:"100%"},children:[a.jsx("div",{"data-controls":N?q==null?void 0:q.controlsName:void 0,"data-controls-axis":N?"y":void 0,className:N?`${r}-control`:void 0,style:{height:$((q==null?void 0:q.marginTop)??0)}}),a.jsx("div",{...q!=null&&q.dataMeasureKind?{"data-testimonial-measure":q.dataMeasureKind}:{},style:{...Ut(V,n),textAlign:we,pointerEvents:"auto",...typeof(q==null?void 0:q.minHeightPx)=="number"&&q.minHeightPx>0?{minHeight:q.minHeightPx}:{}},children:a.jsx(Ri,{content:pe})})]},se),[he,we,n,N,r,$]),Q=s.useCallback((V,pe,se)=>{var q,ce,We;return a.jsxs("div",{style:{padding:`${$(v.top)} ${$(v.right)} ${$(v.bottom)} ${$(v.left)}`,width:$(x+m*2),height:"100%",borderRadius:$(b),border:`${$(m)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:f}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:he,textAlign:we},children:[V.text&&Z(Y,V.text,"text",se!=null&&se.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(se==null?void 0:se.textMinHeightPx)=="number"&&se.textMinHeightPx>0?{minHeightPx:se.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:he,width:"100%"},children:[a.jsx("div",{"data-controls":N&&!(se!=null&&se.dataMeasureAttrs)?"logoMarginTop":void 0,className:N&&!(se!=null&&se.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:$(C)}}),a.jsx("div",{style:{width:$(y),height:$(S)},children:((q=V.logo)==null?void 0:q.url)&&a.jsx("img",{src:V.logo.url,alt:((ce=V.logo)==null?void 0:ce.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((We=V.logo)==null?void 0:We.objectFit)||"contain"}})})]}),V.caption&&Z(I,V.caption,"caption",{...se!=null&&se.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:j,...se!=null&&se.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(se==null?void 0:se.captionMinHeightPx)=="number"&&se.captionMinHeightPx>0?{minHeightPx:se.captionMinHeightPx}:{}})]})]},pe)},[f,j,I,x,b,S,C,y,he,we,v.bottom,v.left,v.right,v.top,Z,m,h,Y,n,N,r]),ae=s.useCallback(V=>{oe(V.maxTextPx),ye(V.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!z){ae({maxTextPx:0,maxCaptionPx:0});return}const V=ie.current;if(!V)return;const pe=()=>{O.readTestimonialTextMeasure(V,ae)};pe();const se=new ResizeObserver(pe);return se.observe(V),()=>{se.disconnect()}},[z,ae,t,Q]);const $e=z?{textMinHeightPx:G,captionMinHeightPx:te}:void 0,ke=z?a.jsx("div",{ref:ie,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((V,pe)=>Q(V,`measure-${pe}`,{dataMeasureAttrs:!0}))}):null,xe=(V,pe)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Q(V,`card-${pe}`,$e),N&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(p)})`,width:$(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},pe);if(R){const V=W?le&&re?"paused":"running":"paused";return a.jsxs("div",{ref:T,className:pt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...D>0?{height:D}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),ke,a.jsx("div",{ref:k,className:`${r}-marquee-track`,"data-direction":c,onMouseEnter:ve,onMouseLeave:de,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:fe,WebkitAnimationDuration:fe,animationPlayState:V,WebkitAnimationPlayState:V},children:Array.from({length:H},(pe,se)=>a.jsx("div",{ref:se===0?E:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(p),paddingRight:$(p)},"aria-hidden":se>0,children:t==null?void 0:t.map((q,ce)=>xe(q,`${se}-${ce}`))},`set-${se}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),ke,a.jsx("div",{style:{gap:$(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((V,pe)=>xe(V,pe))})]})},Vh=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3535
3539
  import cn from 'classnames';
3536
3540
  import { CommonComponentProps } from '../props';
3537
3541
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4162,7 +4166,7 @@ type TestimonialsSettings = {
4162
4166
  logoHeight: number;
4163
4167
  captionMarginTop: number;
4164
4168
  };
4165
- `,bl={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Bh={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:{...bl.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:{...bl.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"}]}]}]}},zh={element:Dh,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:Bh,sourceCode:Oh,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function jh(e){return`
4169
+ `,$l={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Gh={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:{...$l.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:{...$l.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"}]}]}]}},Xh={element:jh,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:Gh,sourceCode:Vh,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function Yh(e){return`
4166
4170
  .${e}-container {
4167
4171
  position: relative;
4168
4172
  overflow-x: clip;
@@ -4286,7 +4290,7 @@ type TestimonialsSettings = {
4286
4290
  width: 100%;
4287
4291
  height: 100%;
4288
4292
  }
4289
- `}const Vh=3e3,Gh=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=W.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:p,textMarginTop:v,captionMarginTop:w,imageWidth:m,imageHeight:h,controlsWidth:f,controlsColor:x,controlsHoverColor:C}=e,y=d>0&&(!n||!!i),[S,z]=s.useState(0),[N,Y]=s.useState(null),[B,T]=s.useState(!1),H=s.useRef(null),$=s.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),I=s.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);s.useEffect(()=>{z(0),Y(null),T(!1)},[l.length]);const P=l[S],M=N===null?null:l[N],g=K=>{var O,J,ne,Pe,be;return{fontSettings:{fontFamily:(e==null?void 0:e[`${K}FontFamily`])??"Arial",fontWeight:((O=e==null?void 0:e[`${K}FontSettings`])==null?void 0:O.fontWeight)??400,fontStyle:((J=e==null?void 0:e[`${K}FontSettings`])==null?void 0:J.fontStyle)??"normal"},textAppearance:{textTransform:((ne=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:ne.textTransform)??"none",textDecoration:((Pe=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:Pe.textDecoration)??"none",fontVariant:((be=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:be.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${K}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${K}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${K}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${K}WordSpacing`])??0,color:(e==null?void 0:e[`${K}Color`])??"#000000"}},D=g("text"),A=g("caption"),X=l.length>1&&l.some(K=>{var te,O;return(((te=K.text)==null?void 0:te.length)??0)>0||(((O=K.caption)==null?void 0:O.length)??0)>0}),ie=s.useRef(null),[L,_]=s.useState(0),[V,se]=s.useState(0),re=e.controls??{mode:"Off",icon:null},k=l.length>1,le=s.useCallback((K,te)=>!k||te===K?K:(H.current&&window.clearTimeout(H.current),Y(K),T(!0),H.current=window.setTimeout(()=>{Y(null),T(!1),H.current=null},300),te),[k]),G=s.useCallback(()=>{k&&z(K=>le(K,(K-1+l.length)%l.length))},[k,le,l.length]),b=s.useCallback(()=>{k&&z(K=>le(K,(K+1)%l.length))},[k,le,l.length]);s.useEffect(()=>{if(!y||!k)return;const K=Math.max(300,Vh/d),te=window.setInterval(()=>{z(O=>le(O,(O+1)%l.length))},K);return()=>{window.clearInterval(te)}},[y,k,le,l.length,d]),s.useEffect(()=>()=>{H.current&&window.clearTimeout(H.current)},[]);const E=(K,te)=>{var be,Re,ue,fe;const O=te==null?void 0:te.textMinHeightPx,J=te==null?void 0:te.captionMinHeightPx,ne=te==null?void 0:te.dataMeasureAttrs,Pe=o&&!(te!=null&&te.dataMeasureAttrs)&&!(te!=null&&te.hideControls);return a.jsxs(a.Fragment,{children:[K.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Pe?"textMarginTop":void 0,className:Pe?`${r}-control`:void 0,style:{height:W.scalingValue(v??0,n??!1)}}),a.jsx("div",{...ne&&{"data-testimonial-measure":"text"},style:{...Ut(D,n),...O&&O>0?{minHeight:O}:{},textAlign:I,pointerEvents:"auto"},children:a.jsx(Ri,{content:K.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Pe?"imageMarginTop":void 0,className:Pe?`${r}-control`:void 0,style:{height:W.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:W.scalingValue(m??0,n??!1),height:W.scalingValue(h??0,n??!1)},children:((be=K.image)==null?void 0:be.url)&&a.jsx("img",{src:(Re=K.image)==null?void 0:Re.url,alt:((ue=K.image)==null?void 0:ue.name)??"",className:`${r}-icon`,style:{objectFit:((fe=K.image)==null?void 0:fe.objectFit)||"contain"}})})]}),K.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Pe?"captionMarginTop":void 0,className:Pe?`${r}-control`:void 0,style:{height:W.scalingValue(w??0,n??!1)}}),a.jsx("div",{...ne?{"data-testimonial-measure":"caption"}:{},style:{...Ut(A,n),...J&&J>0?{minHeight:J}:{},textAlign:I,pointerEvents:"auto"},children:a.jsx(Ri,{content:K.caption})})]})]})},j=s.useCallback(K=>{_(K.maxTextPx),se(K.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!X){j({maxTextPx:0,maxCaptionPx:0});return}const K=ie.current;if(!K)return;const te=()=>{W.readTestimonialTextMeasure(K,j)};te();const O=new ResizeObserver(te);return O.observe(K),()=>{O.disconnect()}},[X,j,t]),!P)return a.jsx(a.Fragment,{});const me=X?{textMinHeightPx:L,captionMinHeightPx:V}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:jh(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:W.scalingValue(u??0,n??!1),alignItems:$},children:[X&&a.jsx("div",{ref:ie,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((K,te)=>a.jsx("div",{style:{width:"100%"},children:E(K,{dataMeasureAttrs:!0})},te))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[M&&B&&a.jsx("div",{className:pt(`${r}-fade-item-prev`,`${r}-fade-out`),children:E(M,{...me,hideControls:!0})}),a.jsx("div",{className:pt(`${r}-fade-item-current`,B?`${r}-fade-in`:void 0),children:E(P,me)})]})]}),re.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:W.scalingValue(f??.02,n??!1),height:W.scalingValue(f??.02,n??!1),"--arrow-hover-color":C},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:G,disabled:!k,"aria-label":"Previous testimonial",children:re.icon&&a.jsx(sn,{url:re.icon,fill:x,hoverFill:C,className:pt(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:pt(`${r}-arrow`,`${r}-next-arrow`),style:{width:W.scalingValue(f??.02,n??!1),height:W.scalingValue(f??.02,n??!1),"--arrow-hover-color":C},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:b,disabled:!k,"aria-label":"Next testimonial",children:re.icon&&a.jsx(sn,{url:re.icon,fill:x,hoverFill:C,className:`${r}-arrow-img`})})})]})]})})},Xh=`import cn from 'classnames';
4293
+ `}const qh=3e3,Uh=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=O.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:p,textMarginTop:x,captionMarginTop:b,imageWidth:m,imageHeight:h,controlsWidth:f,controlsColor:v,controlsHoverColor:C}=e,y=d>0&&(!n||!!i),[S,j]=s.useState(0),[N,U]=s.useState(null),[W,R]=s.useState(!1),B=s.useRef(null),$=s.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),T=s.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);s.useEffect(()=>{j(0),U(null),R(!1)},[l.length]);const k=l[S],E=N===null?null:l[N],g=w=>{var I,z,H,Te,fe;return{fontSettings:{fontFamily:(e==null?void 0:e[`${w}FontFamily`])??"Arial",fontWeight:((I=e==null?void 0:e[`${w}FontSettings`])==null?void 0:I.fontWeight)??400,fontStyle:((z=e==null?void 0:e[`${w}FontSettings`])==null?void 0:z.fontStyle)??"normal"},textAppearance:{textTransform:((H=e==null?void 0:e[`${w}TextAppearance`])==null?void 0:H.textTransform)??"none",textDecoration:((Te=e==null?void 0:e[`${w}TextAppearance`])==null?void 0:Te.textDecoration)??"none",fontVariant:((fe=e==null?void 0:e[`${w}TextAppearance`])==null?void 0:fe.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${w}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${w}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${w}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${w}WordSpacing`])??0,color:(e==null?void 0:e[`${w}Color`])??"#000000"}},A=g("text"),F=g("caption"),X=l.length>1&&l.some(w=>{var Y,I;return(((Y=w.text)==null?void 0:Y.length)??0)>0||(((I=w.caption)==null?void 0:I.length)??0)>0}),ee=s.useRef(null),[P,D]=s.useState(0),[K,le]=s.useState(0),re=e.controls??{mode:"Off",icon:null},M=l.length>1,ie=s.useCallback((w,Y)=>!M||Y===w?w:(B.current&&window.clearTimeout(B.current),U(w),R(!0),B.current=window.setTimeout(()=>{U(null),R(!1),B.current=null},300),Y),[M]),G=s.useCallback(()=>{M&&j(w=>ie(w,(w-1+l.length)%l.length))},[M,ie,l.length]),oe=s.useCallback(()=>{M&&j(w=>ie(w,(w+1)%l.length))},[M,ie,l.length]);s.useEffect(()=>{if(!y||!M)return;const w=Math.max(300,qh/d),Y=window.setInterval(()=>{j(I=>ie(I,(I+1)%l.length))},w);return()=>{window.clearInterval(Y)}},[y,M,ie,l.length,d]),s.useEffect(()=>()=>{B.current&&window.clearTimeout(B.current)},[]);const te=(w,Y)=>{var fe,ve,de,he;const I=Y==null?void 0:Y.textMinHeightPx,z=Y==null?void 0:Y.captionMinHeightPx,H=Y==null?void 0:Y.dataMeasureAttrs,Te=o&&!(Y!=null&&Y.dataMeasureAttrs)&&!(Y!=null&&Y.hideControls);return a.jsxs(a.Fragment,{children:[w.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Te?"textMarginTop":void 0,className:Te?`${r}-control`:void 0,style:{height:O.scalingValue(x??0,n??!1)}}),a.jsx("div",{...H&&{"data-testimonial-measure":"text"},style:{...Ut(A,n),...I&&I>0?{minHeight:I}:{},textAlign:T,pointerEvents:"auto"},children:a.jsx(Ri,{content:w.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Te?"imageMarginTop":void 0,className:Te?`${r}-control`:void 0,style:{height:O.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:O.scalingValue(m??0,n??!1),height:O.scalingValue(h??0,n??!1)},children:((fe=w.image)==null?void 0:fe.url)&&a.jsx("img",{src:(ve=w.image)==null?void 0:ve.url,alt:((de=w.image)==null?void 0:de.name)??"",className:`${r}-icon`,style:{objectFit:((he=w.image)==null?void 0:he.objectFit)||"contain"}})})]}),w.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Te?"captionMarginTop":void 0,className:Te?`${r}-control`:void 0,style:{height:O.scalingValue(b??0,n??!1)}}),a.jsx("div",{...H?{"data-testimonial-measure":"caption"}:{},style:{...Ut(F,n),...z&&z>0?{minHeight:z}:{},textAlign:T,pointerEvents:"auto"},children:a.jsx(Ri,{content:w.caption})})]})]})},ye=s.useCallback(w=>{D(w.maxTextPx),le(w.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!X){ye({maxTextPx:0,maxCaptionPx:0});return}const w=ee.current;if(!w)return;const Y=()=>{O.readTestimonialTextMeasure(w,ye)};Y();const I=new ResizeObserver(Y);return I.observe(w),()=>{I.disconnect()}},[X,ye,t]),!k)return a.jsx(a.Fragment,{});const Me=X?{textMinHeightPx:P,captionMinHeightPx:K}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Yh(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:O.scalingValue(u??0,n??!1),alignItems:$},children:[X&&a.jsx("div",{ref:ee,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((w,Y)=>a.jsx("div",{style:{width:"100%"},children:te(w,{dataMeasureAttrs:!0})},Y))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[E&&W&&a.jsx("div",{className:pt(`${r}-fade-item-prev`,`${r}-fade-out`),children:te(E,{...Me,hideControls:!0})}),a.jsx("div",{className:pt(`${r}-fade-item-current`,W?`${r}-fade-in`:void 0),children:te(k,Me)})]})]}),re.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:O.scalingValue(f??.02,n??!1),height:O.scalingValue(f??.02,n??!1),"--arrow-hover-color":C},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:G,disabled:!M,"aria-label":"Previous testimonial",children:re.icon&&a.jsx(sn,{url:re.icon,fill:v,hoverFill:C,className:pt(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:pt(`${r}-arrow`,`${r}-next-arrow`),style:{width:O.scalingValue(f??.02,n??!1),height:O.scalingValue(f??.02,n??!1),"--arrow-hover-color":C},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:oe,disabled:!M,"aria-label":"Next testimonial",children:re.icon&&a.jsx(sn,{url:re.icon,fill:v,hoverFill:C,className:`${r}-arrow-img`})})})]})]})})},Kh=`import cn from 'classnames';
4290
4294
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
4291
4295
  import { CommonComponentProps } from '../props';
4292
4296
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4782,12 +4786,12 @@ type TestimonialsSettings = {
4782
4786
  icon?: string | null;
4783
4787
  };
4784
4788
  };
4785
- `,qh="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>'),wl={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Yh={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:{...wl.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:{...wl.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:qh},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"}]}]}]}},Uh={element:Gh,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:Yh,sourceCode:Xh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function Kh(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Sl(e){return((e==null?void 0:e.trim().length)??0)>0}function ba(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function wa(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 Zh(e){return`
4789
+ `,Zh="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>'),Tl={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Jh={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:{...Tl.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:{...Tl.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:Zh},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"}]}]}]}},Qh={element:Uh,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:Jh,sourceCode:Kh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function ef(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Il(e){return((e==null?void 0:e.trim().length)??0)>0}function Ca(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function $a(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:O.scalingValue((o-t)/2,i)}}function tf(e){return`
4786
4790
  .${e}-wrapper {
4787
4791
  display: grid;
4788
4792
  align-items: start;
4789
4793
  justify-content: center;
4790
- min-height: ${Kh(48)};
4794
+ min-height: ${ef(48)};
4791
4795
  }
4792
4796
  .${e}-item {
4793
4797
  display: flex;
@@ -5129,7 +5133,7 @@ type TestimonialsSettings = {
5129
5133
  z-index: 2;
5130
5134
  width: 100%;
5131
5135
  }
5132
- `}function Jh(){return Math.random()<.5?"ltr":"ttb"}function Qh(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function ef(e){const t=Jh();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Qh(e)})})}const bn=500,tf=750,jn="cubic-bezier(0.22, 1, 0.36, 1)",nf=72,of=50;function rf(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 af(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function sf(e){const[t]=e.media;return t!=null&&t.url?t:null}function wd(e){return!Array.isArray(e)||e.length===0?[]:rf(e)?e.flatMap(t=>{const n=af(t);if(!n)return[];const i=sf(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 $i(e){return e.type==="video"}function lf(e){const t=new Set,n=[];for(const i of e){const o=wd(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.url&&!t.has(l.url)&&(t.add(l.url),n.push(l))}}return n}function cf({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>$i(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function df(e){e.pause(),e.removeAttribute("src"),e.load()}function Cl({media:e,className:t,style:n,onMediaClick:i}){return $i(e)?a.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function $l(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function uf(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 r=e.width/n;return{width:e.width,height:r,left:e.left,top:e.top+(e.height-r)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function pf({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const d=n.current;if(d)return()=>{df(d)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,style:i})}function mf({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:d,counterClassName:c,counterStyle:u}){const p=i==="cover",v=s.useRef(null),w=s.useRef(null),m=s.useRef(null),h=s.useRef(null),f=s.useRef(0),x=s.useRef(0),C=s.useRef("none"),y=s.useRef(!1),S=s.useRef(!1),z=s.useRef(null),N=s.useRef(0),Y=s.useRef(null),B=s.useRef(!1),T=s.useRef(null),H=s.useRef(null),$=s.useRef(null),I=s.useRef(()=>{}),[P,M]=s.useState(null),[g,D]=s.useState(null),[A,X]=s.useState("opening"),[ie,L]=s.useState(0),[_,V]=s.useState(0),[se,re]=s.useState(null),[k,le]=s.useState(!1),[G,b]=s.useState(!1),[E,j]=s.useState(!1),[me,K]=s.useState(null),te=s.useRef(n),O=s.useRef(void 0),J=t[n],ne=J?$i(J):!1,Pe=_!==0||k,be=se!==null,Re=s.useCallback(ge=>{const ve=ge.currentTarget,_e=ve instanceof HTMLVideoElement?{width:ve.videoWidth,height:ve.videoHeight}:{width:ve.naturalWidth,height:ve.naturalHeight};!_e.width||!_e.height||K(_e)},[]);s.useEffect(()=>{z.current=g},[g]),s.useEffect(()=>{const ge=v.current;if(!ge)return;const ve=()=>D($l(ge));ve();const _e=new ResizeObserver(ve);return _e.observe(ge),()=>_e.disconnect()},[]);const ue=s.useCallback(()=>{T.current!==null&&(window.clearTimeout(T.current),T.current=null)},[]),fe=s.useCallback(()=>{const ge=H.current;H.current=null,ue(),Y.current=null,B.current=!1,re(null),le(!1),V(0),N.current=0,b(!1),y.current=!1,x.current=0,C.current="none",ge===1?d():ge===-1&&l()},[ue,d,l]),$e=s.useCallback(()=>{ue(),H.current=null,Y.current=null,B.current=!1,re(null),le(!1),V(0),N.current=0},[ue]),Q=s.useCallback(()=>{ue(),T.current=window.setTimeout(()=>{H.current!==null&&fe()},bn+32)},[ue,fe]),Z=s.useCallback((ge,ve)=>{var Ze;const _e=((Ze=z.current)==null?void 0:Ze.width)??0;if(ue(),Y.current=ge,re(ge),B.current=!0,le(!0),ve){H.current=ge;const we=-ge*_e;N.current=we,V(we),Q();return}N.current=0,V(0),T.current=window.setTimeout(()=>{T.current=null,$e()},bn+32)},[ue,$e,Q]),ae=s.useCallback(ge=>{if(!(t.length<=1)){if(B.current){if(H.current===ge){$.current=ge,fe();return}$e()}ue(),Y.current=ge,re(ge),B.current=!1,le(!1),N.current=0,V(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Z(ge,!0)})})}},[t.length,Z,fe,$e,ue]);I.current=ae;const xe=s.useCallback(ge=>{ge.propertyName!=="transform"||!B.current||H.current!==null&&fe()},[fe]),ke=s.useCallback(()=>{const ge=w.current;if(!ge)return;const ve=$l(ge);!ve.width||!ve.height||M(ve)},[]);s.useEffect(()=>{ke();const ge=w.current;if(!ge)return;const ve=new ResizeObserver(()=>ke());return ve.observe(ge),()=>ve.disconnect()},[ke]),s.useEffect(()=>{A==="opening"&&P&&X("open")},[A,P]),s.useEffect(()=>{if(A!=="closing")return;const ge=setTimeout(()=>r(),bn);return()=>clearTimeout(ge)},[A,r]),s.useEffect(()=>()=>{ue()},[ue]),s.useLayoutEffect(()=>{te.current===n&&O.current===(J==null?void 0:J.url)||(ue(),H.current=null,re(null),L(0),V(0),le(!1),j(!1),b(!1),K(null),f.current=0,x.current=0,C.current="none",y.current=!1,B.current=!1,N.current=0,Y.current=null,h.current=null,S.current=!1,te.current=n,O.current=J==null?void 0:J.url)},[n,J==null?void 0:J.url,ue]),s.useLayoutEffect(()=>{const ge=$.current;ge!==null&&($.current=null,requestAnimationFrame(()=>{I.current(ge)}))},[n,J==null?void 0:J.url]),s.useEffect(()=>{if(A!=="open")return;let ge=null;const ve=()=>{ge&&(document.removeEventListener("click",ge,!0),ge=null)},_e=()=>{ve(),ge=ze=>{ze.stopPropagation(),ze.preventDefault(),ve()},document.addEventListener("click",ge,!0)},Ze=ze=>{const Ie=ze<0?1:-1;if(Math.abs(ze)>of&&t.length>1){Z(Ie,!0);return}Z(Ie,!1)},we=ze=>{if(ze.touches.length!==1||B.current)return;const Ie=ze.touches[0];S.current=!0,h.current={x:Ie.clientX,y:Ie.clientY},C.current="none",x.current=0,y.current=!1},Te=ze=>{if(!h.current||ze.touches.length!==1||B.current)return;const Ie=ze.touches[0],Ve=Ie.clientX-h.current.x,De=Ie.clientY-h.current.y;if(C.current==="none"){if(Math.abs(Ve)<10&&Math.abs(De)<10)return;if(Math.abs(Ve)>Math.abs(De)){if(t.length<=1)return;C.current="horizontal"}else if(De>0)C.current="vertical";else return}if(C.current==="horizontal"){y.current=!0,b(!0),x.current=Ve;const tt=Ve<0?1:-1;Y.current!==tt&&(Y.current=tt,re(tt)),N.current=Ve,V(Ve),ze.preventDefault();return}C.current==="vertical"&&(y.current=!0,b(!0),f.current=De,L(De),ze.preventDefault())},Xe=()=>{if(!h.current)return;const ze=C.current,Ie=y.current;if(Ie&&ze==="horizontal")Ze(x.current),_e();else if(Ie&&ze==="vertical")if(f.current>nf){const De=window.innerHeight;f.current=De,j(!0),L(De),X("closing")}else f.current=0,L(0),_e();else ze==="horizontal"&&Math.abs(x.current)>0&&(Ze(x.current),_e());h.current=null,C.current="none",x.current=0,y.current=!1,b(!1)};return document.addEventListener("touchstart",we,{passive:!0}),document.addEventListener("touchmove",Te,{passive:!1}),document.addEventListener("touchend",Xe),document.addEventListener("touchcancel",Xe),()=>{document.removeEventListener("touchstart",we),document.removeEventListener("touchmove",Te),document.removeEventListener("touchend",Xe),document.removeEventListener("touchcancel",Xe),ve()}},[A,t.length,Z]),s.useEffect(()=>{const ge=ve=>{ve.key==="Escape"&&(ve.preventDefault(),ve.stopPropagation(),A!=="closing"&&X("closing"))};return window.addEventListener("keydown",ge,!0),()=>window.removeEventListener("keydown",ge,!0)},[A]);const Ce=()=>{A!=="closing"&&X("closing")},q=A==="open",ye=A==="closing",ce=ie>0?Math.max(0,1-ie/500):1,U=ie>0?Math.max(.35,1-ie/500):1,de=P?p?P:uf(P,me):null,He=ge=>{if(ge.stopPropagation(),S.current){S.current=!1;return}if(t.length<=1)return;const ve=de??ge.currentTarget.getBoundingClientRect(),_e=ge.clientY-ve.top,Ze=Math.min(52,ve.height*.2);if(!(_e>ve.height-Ze)){if(ge.clientX-ve.left<ve.width/2){ae(-1);return}ae(1)}},he=ge=>{if(t.length<=1)return;const ve=de??ge.currentTarget.getBoundingClientRect(),_e=ge.clientX-ve.left,Ze=ge.clientY-ve.top,we=Math.min(52,ve.height*.2);if(Ze>ve.height-we){ge.currentTarget.style.cursor="default";return}ge.currentTarget.style.cursor=_e<ve.width/2?"w-resize":"e-resize"},ee={position:"fixed",top:g==null?void 0:g.top,left:g==null?void 0:g.left,width:g==null?void 0:g.width,height:g==null?void 0:g.height,zIndex:9998},Je=p?"cover":"contain",Ne=_!==0||ie>0?`translate(${_}px, ${ie}px)`:void 0,ct=G&&!k?"none":k?`transform ${bn}ms ${jn}`:E?`transform ${bn}ms ${jn}, opacity ${bn}ms ${jn}`:A==="opening"||ye?`opacity ${bn}ms ${jn}`:"none",Ke={...ee,transform:Ne,opacity:ie>0?U:A==="opening"||ye?0:1,transition:ct,pointerEvents:"none"},ut={position:"absolute",top:((de==null?void 0:de.top)??0)-((g==null?void 0:g.top)??0),left:((de==null?void 0:de.left)??0)-((g==null?void 0:g.left)??0),width:de==null?void 0:de.width,height:de==null?void 0:de.height,objectFit:Je,pointerEvents:ne&&q&&!Pe?"auto":"none",touchAction:ne&&q?"none":void 0},lt=(g==null?void 0:g.width)??0,Ye=be?(n+se+t.length)%t.length:null,Le=Ye!==null?t[Ye]:null,We={...ee,transform:be?`translateX(${se*lt+_}px)`:void 0,opacity:1,transition:k?`transform ${bn}ms ${jn}`:"none",pointerEvents:"none"},Be={position:"absolute",top:((P==null?void 0:P.top)??0)-((g==null?void 0:g.top)??0),left:((P==null?void 0:P.left)??0)-((g==null?void 0:g.left)??0),width:P==null?void 0:P.width,height:P==null?void 0:P.height,objectFit:Je,pointerEvents:"none"},Ue=de?{position:"fixed",top:de.top,height:de.height,width:de.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:v,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:A==="open"?"none":void 0},onClick:Ce,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:q?ce:0,transition:G?"none":`opacity ${bn}ms ${jn}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:w,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:q?1:0,transition:`opacity ${bn}ms ${jn}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:w,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:q?1:0,transition:`opacity ${bn}ms ${jn}`},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),P&&g&&Le&&a.jsx("div",{style:We,onTransitionEnd:xe,children:$i(Le)?a.jsx("video",{src:Le.url,muted:!0,playsInline:!0,preload:"auto",style:Be},`neighbor-${Ye}-${Le.url}`):a.jsx("img",{src:Le.url,alt:Le.name,style:Be},`neighbor-${Ye}-${Le.url}`)}),P&&g&&J&&a.jsx("div",{style:Ke,onTransitionEnd:xe,children:ne?a.jsx(pf,{src:J.url,phase:A,mediaRef:m,mediaStyle:ut,onLoadedMetadata:Re,onClick:He,onMouseMove:he},`${n}-${J.url}`):a.jsx("img",{ref:m,src:J.url,alt:J.name,onLoad:Re,style:ut},`${n}-${J.url}`)}),q&&Ue&&t.length>1&&!ne&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Ue,left:de.left,cursor:"w-resize",pointerEvents:G?"none":"auto"},onClick:ge=>{if(S.current){S.current=!1;return}ge.stopPropagation(),ae(-1)}}),a.jsx("div",{style:{...Ue,left:de.left+de.width/2,cursor:"e-resize",pointerEvents:G?"none":"auto"},onClick:ge=>{if(S.current){S.current=!1;return}ge.stopPropagation(),ae(1)}})]})]})}function gf(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function hf({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=W.useScopedStyles(),{type:p="a",gridLayout:v,textBoxWidth:w=100,verticalGap:m,entriesCount:h,lightbox:f,imageDisplay:x,imageCorners:C,lightboxImageDisplay:y,slider:S,sliderTiming:z,direction:N,transition:Y,titleMarginTop:B,subtitleMarginTop:T,titleColor:H,subtitleColor:$,lightboxCounterColor:I,titleFontFamily:P,titleFontSettings:M,titleFontSize:g,titleLineHeight:D,titleLetterSpacing:A,titleWordSpacing:X,titleTextAppearance:ie,subtitleFontFamily:L,subtitleFontSettings:_,subtitleFontSize:V,subtitleLineHeight:se,subtitleLetterSpacing:re,subtitleWordSpacing:k,subtitleTextAppearance:le,lightboxCounterFontFamily:G,lightboxCounterFontSettings:b,lightboxCounterFontSize:E,lightboxCounterLineHeight:j,lightboxCounterLetterSpacing:me,lightboxCounterWordSpacing:K,lightboxCounterTextAppearance:te,showText:O="always",alignEntries:J="off",align:ne="top"}=e,Pe={fontSettings:{fontFamily:P,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:g??.01,lineHeight:D,letterSpacing:A??0,wordSpacing:X??0,textAppearance:ie,color:H},Re={...an(Ut(Pe,n))},ue={fontSettings:{fontFamily:L,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:V??.01,lineHeight:se,letterSpacing:re??0,wordSpacing:k??0,textAppearance:le,color:$},$e={...an(Ut(ue,n))},Q={fontSettings:{fontFamily:G,fontWeight:(b==null?void 0:b.fontWeight)??400,fontStyle:(b==null?void 0:b.fontStyle)??"normal"},fontSize:E??.01,lineHeight:j,letterSpacing:me??0,wordSpacing:K??0,textAppearance:te,color:I},ae={...an(Ut(Q,n)),...wa(E,j,u,n)},xe=ba(g,D,`${u}-item-title`,`${u}-text-tight-leading`),ke=ba(V,se,`${u}-item-subtitle`,`${u}-text-tight-leading`),Ce=wa(g,D,u,n),q=wa(V,se,u,n),ye=ba(E,j,`${u}-lightbox-counter`,`${u}-text-tight-leading`),ce=W.buildColorVars(u,{titleColor:H,subtitleColor:$,lightboxCounterColor:I},ff,yf),He=`${l&&l!=="default"?`${u}-state-${l}`:""}${O==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),he=h===0?1/0:h,ee=(t??[]).slice(0,he),Je=s.useMemo(()=>f==="on"?lf(ee):[],[ee,f]),Ne=v.entryWidth??.2,ct=(x==null?void 0:x.display)==="cover",Ke=(x==null?void 0:x.ratioValue)??"1:1",ut=(x==null?void 0:x.reversed)??!1,[lt,Ye]=Ke.split(":").map(Number),Be=`${ut?Ye:lt} / ${ut?lt:Ye}`,Ue=v.columnsCount,ge=W.scalingValue(Ne??0,n),ve=ge,_e=!ct&&S!=="off",Ze=ee.length%Ue||Ue,we=Ze<Ue&&ee.length>0,Te=ee.length-Ze,Xe=we?Math.floor((Ue-Ze)/2)+1:1,ze=C?W.scalingValue(C,n):void 0,Ie={width:ve,...ct?{aspectRatio:Be,height:"auto",overflow:"hidden"}:{height:"auto"},...ze?{borderRadius:ze,overflow:"hidden"}:{}},Ve=`${u}-item-image-wrapper${_e?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),De=p==="d"||p==="e"||p==="f",tt=J==="on",nt=`calc(${W.scalingValue(Ne??0,n)} * (${w} / 100))`,st=W.scalingValue(Ne*w/100,n),St=ct?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...ze?{borderRadius:ze}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...ze?{borderRadius:ze}:{}},[Bt,zt]=s.useState(0),ft=s.useRef(null),wt=Y==="fade"||N==="horizontal"?"ltr":N==="vertical"?"ttb":"ltr";s.useEffect(()=>{const gt=ft.current;if(!gt)return;const Ae=new ResizeObserver(Ge=>{zt(Math.round(Ge[0].contentRect.width))});return Ae.observe(gt),()=>Ae.disconnect()},[]);const jt=(()=>{const gt={...ce},Ae=ft.current?getComputedStyle(ft.current).getPropertyValue("--cntrl-article-width").trim():"";return Ae&&(gt["--cntrl-article-width"]=Ae),gt})(),[At,xt]=s.useState(!1),[Ft,Nt]=s.useState([]),[Kt,Jt]=s.useState(0),Tt=f==="on"&&(!n||i),Wt=(gt,Ae)=>{n&&!i||f!=="off"&&(Nt(gt),Jt(Ae),xt(!0))};s.useEffect(()=>{if(!At||f!=="on"||typeof document>"u")return;const gt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=gt}},[At,f]),s.useEffect(()=>{!n||i||xt(!1)},[n,i]);const rn=s.useMemo(()=>Zh(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:rn}}),f==="on"&&a.jsx(cf,{mediaList:Je}),a.jsx("div",{style:ce,children:a.jsx("div",{ref:ft,className:`${u}-wrapper ${u}-type-${p}${tt?` ${u}-align-entries`:""} ${u}-image-align-${ne} ${He}`.trim(),style:{gridTemplateColumns:`repeat(${Ue}, ${ge})`,rowGap:tt?0:W.scalingValue(m??0,n),columnGap:W.scalingValue(v.horizontalGap??0,n),width:W.scalingValue(v.wrapperWidth??0,n),...tt?{[`--${u}-align-entries-row-gap`]:W.scalingValue(m??0,n)}:{}},children:ee.map((gt,Ae)=>{var _t;const Ge=Sl(gt.title),rt=Sl(gt.subtitle),ht=(((_t=gt.link)==null?void 0:_t.length)??0)>0&&f==="off"?gt.link:void 0,yt=Math.floor(Ae/Ue)===Math.ceil(ee.length/Ue)-1,Lt=we&&Ae>=Te?`${Xe+(Ae-Te)}`:void 0,mt=De?a.jsxs("div",{className:`${u}-item-text-block`,children:[Ge&&a.jsx("p",{className:xe,style:{width:nt,...Re,...Ce},children:gt.title}),Ge&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:W.scalingValue(B??0,n),width:st}}),rt&&a.jsx("p",{className:ke,style:{width:nt,...$e,...q},children:gt.subtitle}),rt&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:W.scalingValue(T??0,n),width:st}})]}):null,Vt=tt?a.jsxs("div",{className:`${u}-item-title-row`,children:[!De&&a.jsx("div",{"data-controls":o&&Ge?"titleMarginTop":void 0,className:o&&Ge?`${u}-control`:void 0,style:{height:Ge?W.scalingValue(B??0,n):0,width:st}}),Ge&&a.jsx("p",{className:xe,style:{width:nt,...Re,...Ce},children:gt.title}),De&&Ge&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:W.scalingValue(B??0,n),width:st}})]}):null,kt=tt?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!De&&a.jsx("div",{"data-controls":o&&rt?"subtitleMarginTop":void 0,className:o&&rt?`${u}-control`:void 0,style:{height:rt?W.scalingValue(T??0,n):0,width:st}}),rt&&a.jsx("p",{className:ke,style:{width:nt,...$e,...q},children:gt.subtitle}),De&&rt&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:W.scalingValue(T??0,n),width:st}})]}):null,Mt=ht?a.jsxs("a",{href:ht,target:"_blank",className:`${u}-item-text-link`,children:[Vt,kt]}):a.jsxs(a.Fragment,{children:[Vt,kt]}),Xt=wd(gt.gallery),qt=Xt.filter(Ct=>Ct.lightboxMedia).map(Ct=>Ct.lightboxMedia),Ht=a.jsx("div",{className:Ve,style:Ie,children:Xt.length===0?null:S==="off"?(()=>{const{displayMedia:Ct,lightboxMedia:F}=Xt[0],Ee=F?qt.findIndex(Fe=>Fe.url===F.url):-1;return a.jsx(Cl,{media:Ct,className:`${u}-item-${$i(Ct)?"video":"image"}`.trim(),style:St,onMediaClick:Tt&&Ee>=0?()=>Wt(qt,Ee):void 0})})():a.jsxs(a.Fragment,{children:[_e&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Xt.map(({displayMedia:Ct})=>$i(Ct)?a.jsx("video",{src:Ct.url,muted:!0,playsInline:!0},`sizer-${Ct.url}`):a.jsx("img",{src:Ct.url,alt:""},`sizer-${Ct.url}`))}),a.jsx(Ns,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:z*1e3,width:"100%",height:"100%",speed:tf,type:Y==="fade"?"fade":"loop",rewind:Y==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:wt},onMoved:Ct=>{N!=="random"||Y==="fade"||ef(Ct)},children:Xt.map(({displayMedia:Ct,lightboxMedia:F},Ee)=>{const Fe=F?qt.findIndex(Oe=>Oe.url===F.url):-1;return a.jsx(Ws,{children:a.jsx(Cl,{media:Ct,className:`${u}-item-${$i(Ct)?"video":"image"}`.trim(),style:St,onMediaClick:Tt&&Fe>=0?()=>Wt(qt,Fe):void 0})},Ee)})},`${Y}-${Ne}-${N}-${z}-${Bt}-${d}`)]})}),Dt=De?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&Ge?"titleMarginTop":void 0,className:o&&Ge?`${u}-control`:void 0,style:{height:Ge?W.scalingValue(B??0,n):0,width:st}}),a.jsx("p",{className:xe,style:{width:nt,...Re,...Ce},children:gt.title}),a.jsx("div",{"data-controls":o&&rt?"subtitleMarginTop":void 0,className:o&&rt?`${u}-control`:void 0,style:{height:rt?W.scalingValue(T??0,n):0,width:st}}),a.jsx("p",{className:ke,style:{width:nt,...$e,...q},children:gt.subtitle})]});return a.jsx("div",{className:`${u}-item`.trim(),style:Lt&&!tt?{gridColumn:Lt}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${tt&&yt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(w??0)>100?`calc(${ge} * (${w} / 100))`:ge,...Lt&&tt?{gridColumn:Lt}:{}},children:tt?a.jsx(a.Fragment,{children:De?a.jsxs(a.Fragment,{children:[Mt,a.jsx("a",{href:ht,target:"_blank",className:`${u}-item-image-link`,children:Ht})]}):a.jsxs(a.Fragment,{children:[a.jsx("a",{href:ht,target:"_blank",className:`${u}-item-image-link`,children:Ht}),Mt]})}):ht?a.jsxs(a.Fragment,{children:[a.jsxs("a",{href:ht,target:"_blank",className:`${u}-item-image-link`,children:[mt,Ht]}),!De&&a.jsx("a",{href:ht,target:"_blank",className:`${u}-item-text-link`,children:Dt})]}):a.jsxs(a.Fragment,{children:[mt,Ht,Dt]})})},Ae)})})}),(!n||i)&&At&&typeof document<"u"&&f==="on"&&(()=>{const gt=(c?document.getElementById(c):null)??document.body;return zn.createPortal(a.jsx("div",{style:jt,"data-selection":"none",children:a.jsx(mf,{prefix:u,items:Ft,index:Kt,imageDisplay:gf(y),isEditor:n,onClose:()=>xt(!1),onPrev:()=>Jt(Ae=>(Ae-1+Ft.length)%Ft.length),onNext:()=>Jt(Ae=>(Ae+1)%Ft.length),counterClassName:ye,counterStyle:ae})}),gt)})()]})}const ff={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},yf=["hover","focus","filled","success","error"],vf=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5136
+ `}function nf(){return Math.random()<.5?"ltr":"ttb"}function of(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function rf(e){const t=nf();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{of(e)})})}const bn=500,af=750,jn="cubic-bezier(0.22, 1, 0.36, 1)",sf=72,lf=50;function cf(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 df(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function uf(e){const[t]=e.media;return t!=null&&t.url?t:null}function Id(e){return!Array.isArray(e)||e.length===0?[]:cf(e)?e.flatMap(t=>{const n=df(t);if(!n)return[];const i=uf(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 $i(e){return e.type==="video"}function pf(e){const t=new Set,n=[];for(const i of e){const o=Id(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.url&&!t.has(l.url)&&(t.add(l.url),n.push(l))}}return n}function mf({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>$i(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function gf(e){e.pause(),e.removeAttribute("src"),e.load()}function Rl({media:e,className:t,style:n,onMediaClick:i}){return $i(e)?a.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Ll(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function hf(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 r=e.width/n;return{width:e.width,height:r,left:e.left,top:e.top+(e.height-r)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function ff({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const d=n.current;if(d)return()=>{gf(d)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,style:i})}function yf({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:d,counterClassName:c,counterStyle:u}){const p=i==="cover",x=s.useRef(null),b=s.useRef(null),m=s.useRef(null),h=s.useRef(null),f=s.useRef(0),v=s.useRef(0),C=s.useRef("none"),y=s.useRef(!1),S=s.useRef(!1),j=s.useRef(null),N=s.useRef(0),U=s.useRef(null),W=s.useRef(!1),R=s.useRef(null),B=s.useRef(null),$=s.useRef(null),T=s.useRef(()=>{}),[k,E]=s.useState(null),[g,A]=s.useState(null),[F,X]=s.useState("opening"),[ee,P]=s.useState(0),[D,K]=s.useState(0),[le,re]=s.useState(null),[M,ie]=s.useState(!1),[G,oe]=s.useState(!1),[te,ye]=s.useState(!1),[Me,w]=s.useState(null),Y=s.useRef(n),I=s.useRef(void 0),z=t[n],H=z?$i(z):!1,Te=D!==0||M,fe=le!==null,ve=s.useCallback(me=>{const be=me.currentTarget,Ne=be instanceof HTMLVideoElement?{width:be.videoWidth,height:be.videoHeight}:{width:be.naturalWidth,height:be.naturalHeight};!Ne.width||!Ne.height||w(Ne)},[]);s.useEffect(()=>{j.current=g},[g]),s.useEffect(()=>{const me=x.current;if(!me)return;const be=()=>A(Ll(me));be();const Ne=new ResizeObserver(be);return Ne.observe(me),()=>Ne.disconnect()},[]);const de=s.useCallback(()=>{R.current!==null&&(window.clearTimeout(R.current),R.current=null)},[]),he=s.useCallback(()=>{const me=B.current;B.current=null,de(),U.current=null,W.current=!1,re(null),ie(!1),K(0),N.current=0,oe(!1),y.current=!1,v.current=0,C.current="none",me===1?d():me===-1&&l()},[de,d,l]),we=s.useCallback(()=>{de(),B.current=null,U.current=null,W.current=!1,re(null),ie(!1),K(0),N.current=0},[de]),Z=s.useCallback(()=>{de(),R.current=window.setTimeout(()=>{B.current!==null&&he()},bn+32)},[de,he]),Q=s.useCallback((me,be)=>{var Je;const Ne=((Je=j.current)==null?void 0:Je.width)??0;if(de(),U.current=me,re(me),W.current=!0,ie(!0),be){B.current=me;const Se=-me*Ne;N.current=Se,K(Se),Z();return}N.current=0,K(0),R.current=window.setTimeout(()=>{R.current=null,we()},bn+32)},[de,we,Z]),ae=s.useCallback(me=>{if(!(t.length<=1)){if(W.current){if(B.current===me){$.current=me,he();return}we()}de(),U.current=me,re(me),W.current=!1,ie(!1),N.current=0,K(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Q(me,!0)})})}},[t.length,Q,he,we,de]);T.current=ae;const $e=s.useCallback(me=>{me.propertyName!=="transform"||!W.current||B.current!==null&&he()},[he]),ke=s.useCallback(()=>{const me=b.current;if(!me)return;const be=Ll(me);!be.width||!be.height||E(be)},[]);s.useEffect(()=>{ke();const me=b.current;if(!me)return;const be=new ResizeObserver(()=>ke());return be.observe(me),()=>be.disconnect()},[ke]),s.useEffect(()=>{F==="opening"&&k&&X("open")},[F,k]),s.useEffect(()=>{if(F!=="closing")return;const me=setTimeout(()=>r(),bn);return()=>clearTimeout(me)},[F,r]),s.useEffect(()=>()=>{de()},[de]),s.useLayoutEffect(()=>{Y.current===n&&I.current===(z==null?void 0:z.url)||(de(),B.current=null,re(null),P(0),K(0),ie(!1),ye(!1),oe(!1),w(null),f.current=0,v.current=0,C.current="none",y.current=!1,W.current=!1,N.current=0,U.current=null,h.current=null,S.current=!1,Y.current=n,I.current=z==null?void 0:z.url)},[n,z==null?void 0:z.url,de]),s.useLayoutEffect(()=>{const me=$.current;me!==null&&($.current=null,requestAnimationFrame(()=>{T.current(me)}))},[n,z==null?void 0:z.url]),s.useEffect(()=>{if(F!=="open")return;let me=null;const be=()=>{me&&(document.removeEventListener("click",me,!0),me=null)},Ne=()=>{be(),me=ze=>{ze.stopPropagation(),ze.preventDefault(),be()},document.addEventListener("click",me,!0)},Je=ze=>{const Re=ze<0?1:-1;if(Math.abs(ze)>lf&&t.length>1){Q(Re,!0);return}Q(Re,!1)},Se=ze=>{if(ze.touches.length!==1||W.current)return;const Re=ze.touches[0];S.current=!0,h.current={x:Re.clientX,y:Re.clientY},C.current="none",v.current=0,y.current=!1},Ie=ze=>{if(!h.current||ze.touches.length!==1||W.current)return;const Re=ze.touches[0],Ve=Re.clientX-h.current.x,De=Re.clientY-h.current.y;if(C.current==="none"){if(Math.abs(Ve)<10&&Math.abs(De)<10)return;if(Math.abs(Ve)>Math.abs(De)){if(t.length<=1)return;C.current="horizontal"}else if(De>0)C.current="vertical";else return}if(C.current==="horizontal"){y.current=!0,oe(!0),v.current=Ve;const tt=Ve<0?1:-1;U.current!==tt&&(U.current=tt,re(tt)),N.current=Ve,K(Ve),ze.preventDefault();return}C.current==="vertical"&&(y.current=!0,oe(!0),f.current=De,P(De),ze.preventDefault())},qe=()=>{if(!h.current)return;const ze=C.current,Re=y.current;if(Re&&ze==="horizontal")Je(v.current),Ne();else if(Re&&ze==="vertical")if(f.current>sf){const De=window.innerHeight;f.current=De,ye(!0),P(De),X("closing")}else f.current=0,P(0),Ne();else ze==="horizontal"&&Math.abs(v.current)>0&&(Je(v.current),Ne());h.current=null,C.current="none",v.current=0,y.current=!1,oe(!1)};return document.addEventListener("touchstart",Se,{passive:!0}),document.addEventListener("touchmove",Ie,{passive:!1}),document.addEventListener("touchend",qe),document.addEventListener("touchcancel",qe),()=>{document.removeEventListener("touchstart",Se),document.removeEventListener("touchmove",Ie),document.removeEventListener("touchend",qe),document.removeEventListener("touchcancel",qe),be()}},[F,t.length,Q]),s.useEffect(()=>{const me=be=>{be.key==="Escape"&&(be.preventDefault(),be.stopPropagation(),F!=="closing"&&X("closing"))};return window.addEventListener("keydown",me,!0),()=>window.removeEventListener("keydown",me,!0)},[F]);const xe=()=>{F!=="closing"&&X("closing")},V=F==="open",pe=F==="closing",se=ee>0?Math.max(0,1-ee/500):1,q=ee>0?Math.max(.35,1-ee/500):1,ce=k?p?k:hf(k,Me):null,We=me=>{if(me.stopPropagation(),S.current){S.current=!1;return}if(t.length<=1)return;const be=ce??me.currentTarget.getBoundingClientRect(),Ne=me.clientY-be.top,Je=Math.min(52,be.height*.2);if(!(Ne>be.height-Je)){if(me.clientX-be.left<be.width/2){ae(-1);return}ae(1)}},ge=me=>{if(t.length<=1)return;const be=ce??me.currentTarget.getBoundingClientRect(),Ne=me.clientX-be.left,Je=me.clientY-be.top,Se=Math.min(52,be.height*.2);if(Je>be.height-Se){me.currentTarget.style.cursor="default";return}me.currentTarget.style.cursor=Ne<be.width/2?"w-resize":"e-resize"},J={position:"fixed",top:g==null?void 0:g.top,left:g==null?void 0:g.left,width:g==null?void 0:g.width,height:g==null?void 0:g.height,zIndex:9998},Ke=p?"cover":"contain",_e=D!==0||ee>0?`translate(${D}px, ${ee}px)`:void 0,rt=G&&!M?"none":M?`transform ${bn}ms ${jn}`:te?`transform ${bn}ms ${jn}, opacity ${bn}ms ${jn}`:F==="opening"||pe?`opacity ${bn}ms ${jn}`:"none",Ye={...J,transform:_e,opacity:ee>0?q:F==="opening"||pe?0:1,transition:rt,pointerEvents:"none"},dt={position:"absolute",top:((ce==null?void 0:ce.top)??0)-((g==null?void 0:g.top)??0),left:((ce==null?void 0:ce.left)??0)-((g==null?void 0:g.left)??0),width:ce==null?void 0:ce.width,height:ce==null?void 0:ce.height,objectFit:Ke,pointerEvents:H&&V&&!Te?"auto":"none",touchAction:H&&V?"none":void 0},at=(g==null?void 0:g.width)??0,Xe=fe?(n+le+t.length)%t.length:null,Le=Xe!==null?t[Xe]:null,He={...J,transform:fe?`translateX(${le*at+D}px)`:void 0,opacity:1,transition:M?`transform ${bn}ms ${jn}`:"none",pointerEvents:"none"},Be={position:"absolute",top:((k==null?void 0:k.top)??0)-((g==null?void 0:g.top)??0),left:((k==null?void 0:k.left)??0)-((g==null?void 0:g.left)??0),width:k==null?void 0:k.width,height:k==null?void 0:k.height,objectFit:Ke,pointerEvents:"none"},Ze=ce?{position:"fixed",top:ce.top,height:ce.height,width:ce.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:x,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:F==="open"?"none":void 0},onClick:xe,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:V?se:0,transition:G?"none":`opacity ${bn}ms ${jn}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:b,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:V?1:0,transition:`opacity ${bn}ms ${jn}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:b,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:V?1:0,transition:`opacity ${bn}ms ${jn}`},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),k&&g&&Le&&a.jsx("div",{style:He,onTransitionEnd:$e,children:$i(Le)?a.jsx("video",{src:Le.url,muted:!0,playsInline:!0,preload:"auto",style:Be},`neighbor-${Xe}-${Le.url}`):a.jsx("img",{src:Le.url,alt:Le.name,style:Be},`neighbor-${Xe}-${Le.url}`)}),k&&g&&z&&a.jsx("div",{style:Ye,onTransitionEnd:$e,children:H?a.jsx(ff,{src:z.url,phase:F,mediaRef:m,mediaStyle:dt,onLoadedMetadata:ve,onClick:We,onMouseMove:ge},`${n}-${z.url}`):a.jsx("img",{ref:m,src:z.url,alt:z.name,onLoad:ve,style:dt},`${n}-${z.url}`)}),V&&Ze&&t.length>1&&!H&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Ze,left:ce.left,cursor:"w-resize",pointerEvents:G?"none":"auto"},onClick:me=>{if(S.current){S.current=!1;return}me.stopPropagation(),ae(-1)}}),a.jsx("div",{style:{...Ze,left:ce.left+ce.width/2,cursor:"e-resize",pointerEvents:G?"none":"auto"},onClick:me=>{if(S.current){S.current=!1;return}me.stopPropagation(),ae(1)}})]})]})}function xf(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function vf({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=O.useScopedStyles(),{type:p="a",gridLayout:x,textBoxWidth:b=100,verticalGap:m,entriesCount:h,lightbox:f,imageDisplay:v,imageCorners:C,lightboxImageDisplay:y,slider:S,sliderTiming:j,direction:N,transition:U,titleMarginTop:W,subtitleMarginTop:R,titleColor:B,subtitleColor:$,lightboxCounterColor:T,titleFontFamily:k,titleFontSettings:E,titleFontSize:g,titleLineHeight:A,titleLetterSpacing:F,titleWordSpacing:X,titleTextAppearance:ee,subtitleFontFamily:P,subtitleFontSettings:D,subtitleFontSize:K,subtitleLineHeight:le,subtitleLetterSpacing:re,subtitleWordSpacing:M,subtitleTextAppearance:ie,lightboxCounterFontFamily:G,lightboxCounterFontSettings:oe,lightboxCounterFontSize:te,lightboxCounterLineHeight:ye,lightboxCounterLetterSpacing:Me,lightboxCounterWordSpacing:w,lightboxCounterTextAppearance:Y,showText:I="always",alignEntries:z="off",align:H="top"}=e,Te={fontSettings:{fontFamily:k,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:g??.01,lineHeight:A,letterSpacing:F??0,wordSpacing:X??0,textAppearance:ee,color:B},ve={...an(Ut(Te,n))},de={fontSettings:{fontFamily:P,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:K??.01,lineHeight:le,letterSpacing:re??0,wordSpacing:M??0,textAppearance:ie,color:$},we={...an(Ut(de,n))},Z={fontSettings:{fontFamily:G,fontWeight:(oe==null?void 0:oe.fontWeight)??400,fontStyle:(oe==null?void 0:oe.fontStyle)??"normal"},fontSize:te??.01,lineHeight:ye,letterSpacing:Me??0,wordSpacing:w??0,textAppearance:Y,color:T},ae={...an(Ut(Z,n)),...$a(te,ye,u,n)},$e=Ca(g,A,`${u}-item-title`,`${u}-text-tight-leading`),ke=Ca(K,le,`${u}-item-subtitle`,`${u}-text-tight-leading`),xe=$a(g,A,u,n),V=$a(K,le,u,n),pe=Ca(te,ye,`${u}-lightbox-counter`,`${u}-text-tight-leading`),se=O.buildColorVars(u,{titleColor:B,subtitleColor:$,lightboxCounterColor:T},bf,wf),We=`${l&&l!=="default"?`${u}-state-${l}`:""}${I==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),ge=h===0?1/0:h,J=(t??[]).slice(0,ge),Ke=s.useMemo(()=>f==="on"?pf(J):[],[J,f]),_e=x.entryWidth??.2,rt=(v==null?void 0:v.display)==="cover",Ye=(v==null?void 0:v.ratioValue)??"1:1",dt=(v==null?void 0:v.reversed)??!1,[at,Xe]=Ye.split(":").map(Number),Be=`${dt?Xe:at} / ${dt?at:Xe}`,Ze=x.columnsCount,me=O.scalingValue(_e??0,n),be=me,Ne=!rt&&S!=="off",Je=J.length%Ze||Ze,Se=Je<Ze&&J.length>0,Ie=J.length-Je,qe=Se?Math.floor((Ze-Je)/2)+1:1,ze=C?O.scalingValue(C,n):void 0,Re={width:be,...rt?{aspectRatio:Be,height:"auto",overflow:"hidden"}:{height:"auto"},...ze?{borderRadius:ze,overflow:"hidden"}:{}},Ve=`${u}-item-image-wrapper${Ne?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),De=p==="d"||p==="e"||p==="f",tt=z==="on",nt=`calc(${O.scalingValue(_e??0,n)} * (${b} / 100))`,ct=O.scalingValue(_e*b/100,n),St=rt?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...ze?{borderRadius:ze}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...ze?{borderRadius:ze}:{}},[Bt,zt]=s.useState(0),ft=s.useRef(null),wt=U==="fade"||N==="horizontal"?"ltr":N==="vertical"?"ttb":"ltr";s.useEffect(()=>{const gt=ft.current;if(!gt)return;const Ae=new ResizeObserver(Ge=>{zt(Math.round(Ge[0].contentRect.width))});return Ae.observe(gt),()=>Ae.disconnect()},[]);const jt=(()=>{const gt={...se},Ae=ft.current?getComputedStyle(ft.current).getPropertyValue("--cntrl-article-width").trim():"";return Ae&&(gt["--cntrl-article-width"]=Ae),gt})(),[At,vt]=s.useState(!1),[Ft,Nt]=s.useState([]),[Kt,Jt]=s.useState(0),Tt=f==="on"&&(!n||i),Wt=(gt,Ae)=>{n&&!i||f!=="off"&&(Nt(gt),Jt(Ae),vt(!0))};s.useEffect(()=>{if(!At||f!=="on"||typeof document>"u")return;const gt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=gt}},[At,f]),s.useEffect(()=>{!n||i||vt(!1)},[n,i]);const rn=s.useMemo(()=>tf(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:rn}}),f==="on"&&a.jsx(mf,{mediaList:Ke}),a.jsx("div",{style:se,children:a.jsx("div",{ref:ft,className:`${u}-wrapper ${u}-type-${p}${tt?` ${u}-align-entries`:""} ${u}-image-align-${H} ${We}`.trim(),style:{gridTemplateColumns:`repeat(${Ze}, ${me})`,rowGap:tt?0:O.scalingValue(m??0,n),columnGap:O.scalingValue(x.horizontalGap??0,n),width:O.scalingValue(x.wrapperWidth??0,n),...tt?{[`--${u}-align-entries-row-gap`]:O.scalingValue(m??0,n)}:{}},children:J.map((gt,Ae)=>{var _t;const Ge=Il(gt.title),st=Il(gt.subtitle),ht=(((_t=gt.link)==null?void 0:_t.length)??0)>0&&f==="off"?gt.link:void 0,yt=Math.floor(Ae/Ze)===Math.ceil(J.length/Ze)-1,Lt=Se&&Ae>=Ie?`${qe+(Ae-Ie)}`:void 0,mt=De?a.jsxs("div",{className:`${u}-item-text-block`,children:[Ge&&a.jsx("p",{className:$e,style:{width:nt,...ve,...xe},children:gt.title}),Ge&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:O.scalingValue(W??0,n),width:ct}}),st&&a.jsx("p",{className:ke,style:{width:nt,...we,...V},children:gt.subtitle}),st&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:O.scalingValue(R??0,n),width:ct}})]}):null,Vt=tt?a.jsxs("div",{className:`${u}-item-title-row`,children:[!De&&a.jsx("div",{"data-controls":o&&Ge?"titleMarginTop":void 0,className:o&&Ge?`${u}-control`:void 0,style:{height:Ge?O.scalingValue(W??0,n):0,width:ct}}),Ge&&a.jsx("p",{className:$e,style:{width:nt,...ve,...xe},children:gt.title}),De&&Ge&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:O.scalingValue(W??0,n),width:ct}})]}):null,kt=tt?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!De&&a.jsx("div",{"data-controls":o&&st?"subtitleMarginTop":void 0,className:o&&st?`${u}-control`:void 0,style:{height:st?O.scalingValue(R??0,n):0,width:ct}}),st&&a.jsx("p",{className:ke,style:{width:nt,...we,...V},children:gt.subtitle}),De&&st&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:O.scalingValue(R??0,n),width:ct}})]}):null,Mt=ht?a.jsxs("a",{href:ht,target:"_blank",className:`${u}-item-text-link`,children:[Vt,kt]}):a.jsxs(a.Fragment,{children:[Vt,kt]}),Xt=Id(gt.gallery),Yt=Xt.filter(Ct=>Ct.lightboxMedia).map(Ct=>Ct.lightboxMedia),Ht=a.jsx("div",{className:Ve,style:Re,children:Xt.length===0?null:S==="off"?(()=>{const{displayMedia:Ct,lightboxMedia:_}=Xt[0],Pe=_?Yt.findIndex(Fe=>Fe.url===_.url):-1;return a.jsx(Rl,{media:Ct,className:`${u}-item-${$i(Ct)?"video":"image"}`.trim(),style:St,onMediaClick:Tt&&Pe>=0?()=>Wt(Yt,Pe):void 0})})():a.jsxs(a.Fragment,{children:[Ne&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Xt.map(({displayMedia:Ct})=>$i(Ct)?a.jsx("video",{src:Ct.url,muted:!0,playsInline:!0},`sizer-${Ct.url}`):a.jsx("img",{src:Ct.url,alt:""},`sizer-${Ct.url}`))}),a.jsx(Os,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:j*1e3,width:"100%",height:"100%",speed:af,type:U==="fade"?"fade":"loop",rewind:U==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:wt},onMoved:Ct=>{N!=="random"||U==="fade"||rf(Ct)},children:Xt.map(({displayMedia:Ct,lightboxMedia:_},Pe)=>{const Fe=_?Yt.findIndex(Oe=>Oe.url===_.url):-1;return a.jsx(Bs,{children:a.jsx(Rl,{media:Ct,className:`${u}-item-${$i(Ct)?"video":"image"}`.trim(),style:St,onMediaClick:Tt&&Fe>=0?()=>Wt(Yt,Fe):void 0})},Pe)})},`${U}-${_e}-${N}-${j}-${Bt}-${d}`)]})}),Dt=De?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&Ge?"titleMarginTop":void 0,className:o&&Ge?`${u}-control`:void 0,style:{height:Ge?O.scalingValue(W??0,n):0,width:ct}}),a.jsx("p",{className:$e,style:{width:nt,...ve,...xe},children:gt.title}),a.jsx("div",{"data-controls":o&&st?"subtitleMarginTop":void 0,className:o&&st?`${u}-control`:void 0,style:{height:st?O.scalingValue(R??0,n):0,width:ct}}),a.jsx("p",{className:ke,style:{width:nt,...we,...V},children:gt.subtitle})]});return a.jsx("div",{className:`${u}-item`.trim(),style:Lt&&!tt?{gridColumn:Lt}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${tt&&yt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(b??0)>100?`calc(${me} * (${b} / 100))`:me,...Lt&&tt?{gridColumn:Lt}:{}},children:tt?a.jsx(a.Fragment,{children:De?a.jsxs(a.Fragment,{children:[Mt,a.jsx("a",{href:ht,target:"_blank",className:`${u}-item-image-link`,children:Ht})]}):a.jsxs(a.Fragment,{children:[a.jsx("a",{href:ht,target:"_blank",className:`${u}-item-image-link`,children:Ht}),Mt]})}):ht?a.jsxs(a.Fragment,{children:[a.jsxs("a",{href:ht,target:"_blank",className:`${u}-item-image-link`,children:[mt,Ht]}),!De&&a.jsx("a",{href:ht,target:"_blank",className:`${u}-item-text-link`,children:Dt})]}):a.jsxs(a.Fragment,{children:[mt,Ht,Dt]})})},Ae)})})}),(!n||i)&&At&&typeof document<"u"&&f==="on"&&(()=>{const gt=(c?document.getElementById(c):null)??document.body;return zn.createPortal(a.jsx("div",{style:jt,"data-selection":"none",children:a.jsx(yf,{prefix:u,items:Ft,index:Kt,imageDisplay:xf(y),isEditor:n,onClose:()=>vt(!1),onPrev:()=>Jt(Ae=>(Ae-1+Ft.length)%Ft.length),onNext:()=>Jt(Ae=>(Ae+1)%Ft.length),counterClassName:pe,counterStyle:ae})}),gt)})()]})}const bf={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},wf=["hover","focus","filled","success","error"],Sf=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5133
5137
  import '@splidejs/react-splide/css/core';
5134
5138
  import { CommonComponentProps } from '../props';
5135
5139
  import {
@@ -7182,12 +7186,12 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
7182
7186
  };
7183
7187
 
7184
7188
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7185
- `,Sa={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},xf=["titleColor","subtitleColor","lightboxCounterColor"],bf={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:{...Sa.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:{...Sa.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:{...Sa.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:[...xf],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},wf={element:hf,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:bf,sourceCode:vf},Sf=50,Tl=10,Hs="cntrl-lightbox-journal",ia=Hs,ns=`${Hs}-`,oa=e=>`${Hs}-${e}`,Ds=e=>e===ia||e.startsWith(ns),Il=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Rl=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Il(t.get(oa(e)));if(i)return i}const n=Il(t.get(ia));if(n)return n;for(const[i]of t){if(!i.startsWith(ns))continue;const o=i.slice(ns.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},Ll=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Sd=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Ds(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(oa(t),String(e)):i.searchParams.set(ia,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},Cf=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===oa(e)||i===ia:Ds(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)}},Cd=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(oa(e)):[...t.keys()].some(n=>Ds(n))},$f=(e,t)=>{if(Cd(t)){if(e){window.history.back();return}Cf(t)}},Tf=20,If=2,Ca=e=>`max(${e}, ${Tf}px)`,Ki=e=>((e==null?void 0:e.image)??[]).slice(0,If),$d=e=>e.reduce((t,n)=>t+Ki(n).length,0),Rf=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+Ki(r).length,1),i=Ki(e[t]).length;return{start:n,end:n+i-1}},Lf=(e,t)=>{const n=$d(e),{start:i,end:o}=Rf(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Ir=(e,t)=>t==="B"?e.flatMap((n,i)=>Ki(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Ki(n)})),Pf=(e,t,n,i)=>{var r;if(n==="B")return`${t+1} / ${e.length}`;const o=((r=e[t])==null?void 0:r.entryIndex)??0;return Lf(i,o)},Pl=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Ef=(e,t,n)=>e==="B"?t.length>1:$d(n)>1,fn=.004,Un=.004,Gi={title1Width:.13,title2Width:.13,title3Width:.14},Kn=(e,t,n,i,o)=>{const r=[];return t.title1&&r.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&r.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&r.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),r},Zi=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},d)=>{if(r<=0||d<=0)return{overflow:r,widths:[d,...l]};const c=Math.min(r,d);return{overflow:r-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},No=(e,t)=>Zi(e,t),cn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Zn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Zi(e.length,n),effective:No(e.length,n)}},Td=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Id=(e,t,n,i)=>e.slice(0,i+1).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),ii=["title1","title2","title3","count"],ot=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Os={title1:"1",title2:"2",title3:"3",count:"Count"},Bs=e=>[ot(e,"fontFamily"),ot(e,"fontSettings"),{type:"row",items:[ot(e,"fontSize"),ot(e,"lineHeight"),ot(e,"letterSpacing"),ot(e,"wordSpacing")]},ot(e,"textAlign"),ot(e,"textAppearance")],Mf=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(ii.map(e=>[Os[e],Bs(e)]))}),kf={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Af={title1:.02,title2:.02,title3:.02,count:.017},xi=(e,t)=>{const n=i=>{const o=ot(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[kf[t]]}},bi=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Af[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Ut(i,n)};function Rd({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:v=0,title3MarginLeft:w=0,titleRowMarginBottom:m=0,titleHeaderLayout:h="desktop",contentMarginTop:f=0,iconMarginRight:x=0,closeIcon:C=null,closeIconMaxWidth:y=0,closeIconColor:S="#000000",closeIconHoverColor:z="#cccccc"}=n,N=W.scalingValue(f,i),Y=W.scalingValue(x,i),B=W.scalingValue(m,i),T=h==="mobile",H=bi("title1",xi(n,"title1"),i),$=bi("title2",xi(n,"title2"),i),I=bi("title3",xi(n,"title3"),i),P=s.useMemo(()=>({title1Width:d??Gi.title1Width,title2Width:c??Gi.title2Width,title3Width:u??Gi.title3Width}),[d,c,u]),M=s.useMemo(()=>({title2MarginLeft:v,title3MarginLeft:w}),[v,w]),g=s.useMemo(()=>Kn(e,t,H,$,I),[e,t,H,$,I]),D=s.useMemo(()=>g.map(U=>P[U.widthKey]),[g,P]),A=s.useMemo(()=>Zi(g.length,D),[g.length,D]),X=s.useMemo(()=>No(g.length,D),[g.length,D]),ie=s.useMemo(()=>g.filter(U=>U.prefix==="title1"),[g]),L=s.useMemo(()=>g.filter(U=>U.prefix==="title2"||U.prefix==="title3"),[g]),_=s.useMemo(()=>Zn(ie,P),[ie,P]),V=s.useMemo(()=>Zn(L,P),[L,P]),se=!!(t.title1||t.title2||t.title3),re=C!==null;if(!(se||re))return null;const le=(p??0)>0||o,G=(U,de)=>{const He=g.findIndex(ee=>ee.prefix===U.prefix);if(!T||de==="single-row")return{effectiveWidth:X[He]??0,resolvedWidth:A[He]??0,maxWidth:cn(He,A)};if(de==="two-row-top"){const ee=ie.findIndex(Je=>Je.prefix===U.prefix);return{effectiveWidth:_.effective[ee]??0,resolvedWidth:_.resolved[ee]??0,maxWidth:cn(ee,_.resolved)}}const he=L.findIndex(ee=>ee.prefix===U.prefix);return{effectiveWidth:V.effective[he]??0,resolvedWidth:V.resolved[he]??0,maxWidth:cn(he,V.resolved)}},b=(U,de,He)=>{if(!T||He==="single-row"){const ct=U.findIndex(Ye=>Ye.prefix===de.prefix),Ke=U.map(Ye=>P[Ye.widthKey]),ut=Zi(U.length,Ke);return{effectiveWidth:No(U.length,Ke)[ct]??0,resolvedWidth:ut[ct]??0,maxWidth:cn(ct,ut)}}if(He==="two-row-top"){const ct=U.filter(Ye=>Ye.prefix==="title1"),Ke=ct.findIndex(Ye=>Ye.prefix===de.prefix),{resolved:ut,effective:lt}=Zn(ct,P);return{effectiveWidth:lt[Ke]??0,resolvedWidth:ut[Ke]??0,maxWidth:cn(Ke,ut)}}const he=U.filter(ct=>ct.prefix==="title2"||ct.prefix==="title3"),ee=he.findIndex(ct=>ct.prefix===de.prefix),{resolved:Je,effective:Ne}=Zn(he,P);return{effectiveWidth:Ne[ee]??0,resolvedWidth:Je[ee]??0,maxWidth:cn(ee,Je)}},E=U=>Id(g,A,M,U)+(T?0:p??0),j=()=>T?0:p??0,me=U=>L.slice(0,U).reduce((de,He,he)=>de+(He.marginLeftKey?M[He.marginLeftKey]??0:0)+(V.resolved[he]??0),0),K=U=>{const de=L[U];return me(U)+(de.marginLeftKey?M[de.marginLeftKey]??0:0)+(V.resolved[U]??0)},te=(U,de,He)=>{const he=U.marginLeftKey?M[U.marginLeftKey]??0:0,{effectiveWidth:ee,resolvedWidth:Je,maxWidth:Ne}=He??G(U,de),ct=Math.max(he,Un),Ke=o&&de==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":U.prefix,style:{width:W.scalingValue(ee,i),...he>0?{marginLeft:W.scalingValue(he,i)}:{}},children:[a.jsx("p",{className:U.className,style:U.style,children:U.text}),Ke&&U.marginLeftKey?a.jsx("div",{"data-controls":U.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Je),style:{position:"absolute",top:0,left:W.scalingValue(-he,i),width:W.scalingValue(ct,i),height:"100%",pointerEvents:"auto"}}):null,Ke?a.jsx("div",{"data-controls":U.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ne),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:W.scalingValue(-fn/2,i),width:W.scalingValue(fn,i),height:"100%",pointerEvents:"auto"}}):null]},U.className)},O=(U="two-row")=>{const de=g.findIndex(ee=>ee.prefix==="title1"),He=de>=0?A[de]:P.title1Width,he=U==="two-row"&&o;return a.jsx("div",{...he?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(He)}:{},style:{width:W.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...he?{pointerEvents:"auto"}:{}}})},J=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:H,"aria-hidden":"true",children:" "}),ne=U=>{const de=Kn(e,U,H,$,I);return a.jsx(a.Fragment,{children:de.map(He=>te(He,"single-row",b(de,He,"single-row")))})},Pe=U=>{const de=Kn(e,U,H,$,I),He=de.find(he=>he.prefix==="title1");return He?te(He,"two-row-top",b(de,He,"two-row-top")):null},be=(U,de=!1)=>{const He=Kn(e,U,H,$,I),he=He.filter(Ne=>Ne.prefix==="title2"||Ne.prefix==="title3"),ee=o&&de;return he.length>0||ee||(m??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[he.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:he.map(Ne=>te(Ne,"two-row-bottom",b(He,Ne,"two-row-bottom")))}),de&&o?a.jsxs(a.Fragment,{children:[xe(),ke()]}):null]}):null,(m??0)>0||ee?a.jsx("div",{"data-controls":ee?"titleRowMarginBottom":void 0,"data-controls-axis":ee?"y":void 0,"data-controls-reverse":ee?"":void 0,className:ee?`${e}-control`:void 0,style:{height:B,width:"100%",flexShrink:0,pointerEvents:ee?"auto":"none"}}):null]}):null},Re=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:W.scalingValue(y??0,i),height:W.scalingValue(y??0,i),marginRight:Y,"--close-icon-hover-color":z},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:U=>{U.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(sn,{url:C??"",fill:S,hoverFill:i&&!r?S:z,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:Y,height:"100%",pointerEvents:"auto"}})]}),ue=()=>re?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:Re()}):null,fe=U=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:U})}),$e=U=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[re||se?J():null,le?O("two-row"):null,fe(U),ue()]}),Q=(U,de=!1)=>a.jsxs(a.Fragment,{children:[$e(Pe(U)),be(U,de)]}),Z=()=>{const U=T?-1:g.findIndex(he=>he.prefix==="title1"),de=!T&&(o||(p??0)>0)?(()=>{const he=p??0,ee=U>=0?A[U]:P.title1Width,Je=Math.max(he,Un);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ee),style:{position:"absolute",top:0,left:0,width:W.scalingValue(Je,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,He=g.flatMap((he,ee)=>{if(!he.marginLeftKey)return[];const Je=M[he.marginLeftKey]??0,Ne=Td(g,A,M,ee)+j(),ct=Math.max(Je,Un);return a.jsx("div",{"data-controls":he.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(A[ee]),style:{position:"absolute",top:0,left:W.scalingValue(Ne,i),width:W.scalingValue(ct,i),height:"100%",pointerEvents:"auto"}},he.marginLeftKey)});return de?[de,...He]:He},ae=()=>g.map((U,de)=>{const He=cn(de,A),ee=E(de)-fn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":U.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(He),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:W.scalingValue(ee,i),width:W.scalingValue(fn,i),height:"100%",pointerEvents:"auto"}})},`${U.widthKey}-junction`)}),xe=()=>L.flatMap((U,de)=>{if(!U.marginLeftKey)return[];const He=M[U.marginLeftKey]??0,he=me(de),ee=Math.max(He,Un),{resolvedWidth:Je}=G(U,"two-row-bottom");return a.jsx("div",{"data-controls":U.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Je),style:{position:"absolute",top:0,left:W.scalingValue(he,i),width:W.scalingValue(ee,i),height:"100%",pointerEvents:"auto"}},U.marginLeftKey)}),ke=()=>L.map((U,de)=>{const{maxWidth:He}=G(U,"two-row-bottom"),ee=K(de)-fn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":U.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(He),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:W.scalingValue(ee,i),width:W.scalingValue(fn,i),height:"100%",pointerEvents:"auto"}})},`${U.widthKey}-junction`)}),Ce=()=>!o||T?null:a.jsxs(a.Fragment,{children:[Z(),ae()]}),q=!!(t.title2||t.title3||(m??0)>0||o),ye=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[re||se?J():null,le?O("single-row"):null,se?fe(ne(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),ue(),Ce()]}),ce=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...q?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:q?void 0:{flex:"0 0 auto",height:"auto"},children:Q(t,!0)}),Ce()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:N,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...T?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${T?` ${e}-lightbox-content-area-stacked`:""}`,children:a.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?ce():ye()})})})]})}function Ff(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function _f(e){return`
7189
+ `,Ta={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Cf=["titleColor","subtitleColor","lightboxCounterColor"],$f={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:{...Ta.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:{...Ta.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:{...Ta.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:[...Cf],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Tf={element:vf,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:$f,sourceCode:Sf},If=50,Pl=10,zs="cntrl-lightbox-journal",aa=zs,rs=`${zs}-`,sa=e=>`${zs}-${e}`,js=e=>e===aa||e.startsWith(rs),El=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Ml=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=El(t.get(sa(e)));if(i)return i}const n=El(t.get(aa));if(n)return n;for(const[i]of t){if(!i.startsWith(rs))continue;const o=i.slice(rs.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},kl=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Rd=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{js(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(sa(t),String(e)):i.searchParams.set(aa,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},Rf=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===sa(e)||i===aa:js(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)}},Ld=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(sa(e)):[...t.keys()].some(n=>js(n))},Lf=(e,t)=>{if(Ld(t)){if(e){window.history.back();return}Rf(t)}},Pf=20,Ef=2,Ia=e=>`max(${e}, ${Pf}px)`,Zi=e=>((e==null?void 0:e.image)??[]).slice(0,Ef),Pd=e=>e.reduce((t,n)=>t+Zi(n).length,0),Mf=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+Zi(r).length,1),i=Zi(e[t]).length;return{start:n,end:n+i-1}},kf=(e,t)=>{const n=Pd(e),{start:i,end:o}=Mf(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Pr=(e,t)=>t==="B"?e.flatMap((n,i)=>Zi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Zi(n)})),Af=(e,t,n,i)=>{var r;if(n==="B")return`${t+1} / ${e.length}`;const o=((r=e[t])==null?void 0:r.entryIndex)??0;return kf(i,o)},Al=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Ff=(e,t,n)=>e==="B"?t.length>1:Pd(n)>1,fn=.004,Un=.004,Xi={title1Width:.13,title2Width:.13,title3Width:.14},Kn=(e,t,n,i,o)=>{const r=[];return t.title1&&r.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&r.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&r.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),r},Ji=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},d)=>{if(r<=0||d<=0)return{overflow:r,widths:[d,...l]};const c=Math.min(r,d);return{overflow:r-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},Ho=(e,t)=>Ji(e,t),cn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Zn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ji(e.length,n),effective:Ho(e.length,n)}},Ed=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Md=(e,t,n,i)=>e.slice(0,i+1).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),ii=["title1","title2","title3","count"],ot=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Vs={title1:"1",title2:"2",title3:"3",count:"Count"},Gs=e=>[ot(e,"fontFamily"),ot(e,"fontSettings"),{type:"row",items:[ot(e,"fontSize"),ot(e,"lineHeight"),ot(e,"letterSpacing"),ot(e,"wordSpacing")]},ot(e,"textAlign"),ot(e,"textAppearance")],_f=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(ii.map(e=>[Vs[e],Gs(e)]))}),Nf={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Wf={title1:.02,title2:.02,title3:.02,count:.017},vi=(e,t)=>{const n=i=>{const o=ot(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[Nf[t]]}},bi=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Wf[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Ut(i,n)};function kd({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:x=0,title3MarginLeft:b=0,titleRowMarginBottom:m=0,titleHeaderLayout:h="desktop",contentMarginTop:f=0,iconMarginRight:v=0,closeIcon:C=null,closeIconMaxWidth:y=0,closeIconColor:S="#000000",closeIconHoverColor:j="#cccccc"}=n,N=O.scalingValue(f,i),U=O.scalingValue(v,i),W=O.scalingValue(m,i),R=h==="mobile",B=bi("title1",vi(n,"title1"),i),$=bi("title2",vi(n,"title2"),i),T=bi("title3",vi(n,"title3"),i),k=s.useMemo(()=>({title1Width:d??Xi.title1Width,title2Width:c??Xi.title2Width,title3Width:u??Xi.title3Width}),[d,c,u]),E=s.useMemo(()=>({title2MarginLeft:x,title3MarginLeft:b}),[x,b]),g=s.useMemo(()=>Kn(e,t,B,$,T),[e,t,B,$,T]),A=s.useMemo(()=>g.map(q=>k[q.widthKey]),[g,k]),F=s.useMemo(()=>Ji(g.length,A),[g.length,A]),X=s.useMemo(()=>Ho(g.length,A),[g.length,A]),ee=s.useMemo(()=>g.filter(q=>q.prefix==="title1"),[g]),P=s.useMemo(()=>g.filter(q=>q.prefix==="title2"||q.prefix==="title3"),[g]),D=s.useMemo(()=>Zn(ee,k),[ee,k]),K=s.useMemo(()=>Zn(P,k),[P,k]),le=!!(t.title1||t.title2||t.title3),re=C!==null;if(!(le||re))return null;const ie=(p??0)>0||o,G=(q,ce)=>{const We=g.findIndex(J=>J.prefix===q.prefix);if(!R||ce==="single-row")return{effectiveWidth:X[We]??0,resolvedWidth:F[We]??0,maxWidth:cn(We,F)};if(ce==="two-row-top"){const J=ee.findIndex(Ke=>Ke.prefix===q.prefix);return{effectiveWidth:D.effective[J]??0,resolvedWidth:D.resolved[J]??0,maxWidth:cn(J,D.resolved)}}const ge=P.findIndex(J=>J.prefix===q.prefix);return{effectiveWidth:K.effective[ge]??0,resolvedWidth:K.resolved[ge]??0,maxWidth:cn(ge,K.resolved)}},oe=(q,ce,We)=>{if(!R||We==="single-row"){const rt=q.findIndex(Xe=>Xe.prefix===ce.prefix),Ye=q.map(Xe=>k[Xe.widthKey]),dt=Ji(q.length,Ye);return{effectiveWidth:Ho(q.length,Ye)[rt]??0,resolvedWidth:dt[rt]??0,maxWidth:cn(rt,dt)}}if(We==="two-row-top"){const rt=q.filter(Xe=>Xe.prefix==="title1"),Ye=rt.findIndex(Xe=>Xe.prefix===ce.prefix),{resolved:dt,effective:at}=Zn(rt,k);return{effectiveWidth:at[Ye]??0,resolvedWidth:dt[Ye]??0,maxWidth:cn(Ye,dt)}}const ge=q.filter(rt=>rt.prefix==="title2"||rt.prefix==="title3"),J=ge.findIndex(rt=>rt.prefix===ce.prefix),{resolved:Ke,effective:_e}=Zn(ge,k);return{effectiveWidth:_e[J]??0,resolvedWidth:Ke[J]??0,maxWidth:cn(J,Ke)}},te=q=>Md(g,F,E,q)+(R?0:p??0),ye=()=>R?0:p??0,Me=q=>P.slice(0,q).reduce((ce,We,ge)=>ce+(We.marginLeftKey?E[We.marginLeftKey]??0:0)+(K.resolved[ge]??0),0),w=q=>{const ce=P[q];return Me(q)+(ce.marginLeftKey?E[ce.marginLeftKey]??0:0)+(K.resolved[q]??0)},Y=(q,ce,We)=>{const ge=q.marginLeftKey?E[q.marginLeftKey]??0:0,{effectiveWidth:J,resolvedWidth:Ke,maxWidth:_e}=We??G(q,ce),rt=Math.max(ge,Un),Ye=o&&ce==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":q.prefix,style:{width:O.scalingValue(J,i),...ge>0?{marginLeft:O.scalingValue(ge,i)}:{}},children:[a.jsx("p",{className:q.className,style:q.style,children:q.text}),Ye&&q.marginLeftKey?a.jsx("div",{"data-controls":q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ke),style:{position:"absolute",top:0,left:O.scalingValue(-ge,i),width:O.scalingValue(rt,i),height:"100%",pointerEvents:"auto"}}):null,Ye?a.jsx("div",{"data-controls":q.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(_e),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:O.scalingValue(-fn/2,i),width:O.scalingValue(fn,i),height:"100%",pointerEvents:"auto"}}):null]},q.className)},I=(q="two-row")=>{const ce=g.findIndex(J=>J.prefix==="title1"),We=ce>=0?F[ce]:k.title1Width,ge=q==="two-row"&&o;return a.jsx("div",{...ge?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(We)}:{},style:{width:O.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...ge?{pointerEvents:"auto"}:{}}})},z=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:B,"aria-hidden":"true",children:" "}),H=q=>{const ce=Kn(e,q,B,$,T);return a.jsx(a.Fragment,{children:ce.map(We=>Y(We,"single-row",oe(ce,We,"single-row")))})},Te=q=>{const ce=Kn(e,q,B,$,T),We=ce.find(ge=>ge.prefix==="title1");return We?Y(We,"two-row-top",oe(ce,We,"two-row-top")):null},fe=(q,ce=!1)=>{const We=Kn(e,q,B,$,T),ge=We.filter(_e=>_e.prefix==="title2"||_e.prefix==="title3"),J=o&&ce;return ge.length>0||J||(m??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[ge.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:ge.map(_e=>Y(_e,"two-row-bottom",oe(We,_e,"two-row-bottom")))}),ce&&o?a.jsxs(a.Fragment,{children:[$e(),ke()]}):null]}):null,(m??0)>0||J?a.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:W,width:"100%",flexShrink:0,pointerEvents:J?"auto":"none"}}):null]}):null},ve=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:O.scalingValue(y??0,i),height:O.scalingValue(y??0,i),marginRight:U,"--close-icon-hover-color":j},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:q=>{q.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(sn,{url:C??"",fill:S,hoverFill:i&&!r?S:j,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:U,height:"100%",pointerEvents:"auto"}})]}),de=()=>re?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:ve()}):null,he=q=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:q})}),we=q=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[re||le?z():null,ie?I("two-row"):null,he(q),de()]}),Z=(q,ce=!1)=>a.jsxs(a.Fragment,{children:[we(Te(q)),fe(q,ce)]}),Q=()=>{const q=R?-1:g.findIndex(ge=>ge.prefix==="title1"),ce=!R&&(o||(p??0)>0)?(()=>{const ge=p??0,J=q>=0?F[q]:k.title1Width,Ke=Math.max(ge,Un);return a.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:O.scalingValue(Ke,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,We=g.flatMap((ge,J)=>{if(!ge.marginLeftKey)return[];const Ke=E[ge.marginLeftKey]??0,_e=Ed(g,F,E,J)+ye(),rt=Math.max(Ke,Un);return a.jsx("div",{"data-controls":ge.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(F[J]),style:{position:"absolute",top:0,left:O.scalingValue(_e,i),width:O.scalingValue(rt,i),height:"100%",pointerEvents:"auto"}},ge.marginLeftKey)});return ce?[ce,...We]:We},ae=()=>g.map((q,ce)=>{const We=cn(ce,F),J=te(ce)-fn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":q.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(We),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:O.scalingValue(J,i),width:O.scalingValue(fn,i),height:"100%",pointerEvents:"auto"}})},`${q.widthKey}-junction`)}),$e=()=>P.flatMap((q,ce)=>{if(!q.marginLeftKey)return[];const We=E[q.marginLeftKey]??0,ge=Me(ce),J=Math.max(We,Un),{resolvedWidth:Ke}=G(q,"two-row-bottom");return a.jsx("div",{"data-controls":q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ke),style:{position:"absolute",top:0,left:O.scalingValue(ge,i),width:O.scalingValue(J,i),height:"100%",pointerEvents:"auto"}},q.marginLeftKey)}),ke=()=>P.map((q,ce)=>{const{maxWidth:We}=G(q,"two-row-bottom"),J=w(ce)-fn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":q.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(We),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:O.scalingValue(J,i),width:O.scalingValue(fn,i),height:"100%",pointerEvents:"auto"}})},`${q.widthKey}-junction`)}),xe=()=>!o||R?null:a.jsxs(a.Fragment,{children:[Q(),ae()]}),V=!!(t.title2||t.title3||(m??0)>0||o),pe=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[re||le?z():null,ie?I("single-row"):null,le?he(H(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),de(),xe()]}),se=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...V?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:V?void 0:{flex:"0 0 auto",height:"auto"},children:Z(t,!0)}),xe()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:N,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...R?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${R?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${R?` ${e}-text-bar-cell-stacked`:""}`,style:R?void 0:{flex:1,minWidth:0,width:"100%"},children:R?se():pe()})})})]})}function Hf(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Df(e){return`
7186
7190
  .${e}-wrapper {
7187
7191
  display: grid;
7188
7192
  align-items: start;
7189
7193
  justify-content: center;
7190
- min-height: ${Ff(48)};
7194
+ min-height: ${Hf(48)};
7191
7195
  }
7192
7196
  .${e}-item {
7193
7197
  display: flex;
@@ -7502,7 +7506,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7502
7506
  pointer-events: auto;
7503
7507
  flex-shrink: 0;
7504
7508
  }
7505
- `}const El={url:"",name:"",objectFit:"cover"},Tn=500,go=650,pn="cubic-bezier(0.22, 1, 0.36, 1)",Nf=72,Wf=50,Hf=1e4,Df=650,Of=500;function Bf(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Ld(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Nr(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 zf(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Ld(i,n):null}function jf(e){return e.reduce((t,n,i)=>{const o=zs(n.gallery),l=js(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 So(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 Ml(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return So(e,i,n)}const Vf=.03;function Pd(e){return e.width*Vf}const $a={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function dr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function kl(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Gf(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function is(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,d=o/r;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const c=r*l;return{width:c,height:r,left:i.left+(o-c)/2,top:i.top}}function Xf(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:is(e,t.width,t.height)}function qf(e,t){if(uo(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 Yf(e){const t=new Set,n=[];for(const i of e){const o=zs(i.gallery),r=js(o);for(const l of r)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 Uf({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>uo(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Ji(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:d}=n,c=Pd(n);return t==="left"?{left:l+c-i,top:r,width:i,height:o}:{left:l+d-c,top:r,width:i,height:o}}function Wr(e,t,n){const i=Ji(e,t,n);return{...i,left:2*i.left-e.left}}function Kf(e,t,n){const{left:i,width:o}=n,r=Pd(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function Ed(e,t,n,i){const o=Ji(e,"left",i),r=Ji(e,"right",i),l=Wr(e,"left",i),d=Wr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Zf(e,t,n,i){const{start:o,end:r}=Ed(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function Jf(e,t,n){const i=Ji(e,t,n),o=Wr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Md(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 zs(e){if(!e)return;if(Md(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??El,i??o??El]}]}function Qf(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function ey(e){const[t]=e.media;return t!=null&&t.url?t:null}function js(e){if(!Array.isArray(e)||e.length===0)return[];if(Md(e)){const t=[];for(const n of e){const i=Qf(n);if(!i)continue;const o=ey(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 uo(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function ty({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return uo(e)?a.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}):a.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function ny({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const d=s.useRef(null);return s.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:c=>c.stopPropagation(),style:o},e)})}function ur({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return uo(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function iy({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:w,resolveCloseSourceRect:m,onClose:h,onPrev:f,onNext:x}){const C=s.useRef(null),y=s.useRef(null),S=s.useRef(null),z=s.useRef(new Map),[N,Y]=s.useState(0),B=s.useRef(null),T=s.useRef(0),H=s.useRef(0),$=s.useRef("none"),I=s.useRef(!1),P=s.useRef(!1),M=s.useRef(!1),g=s.useRef(null),D=s.useRef(null),A=s.useRef(null),X=s.useRef(()=>{}),ie=s.useRef(null),L=s.useRef(null),_=s.useRef(null),V=s.useRef(!1),[se,re]=s.useState(null),[k,le]=s.useState($a),[G,b]=s.useState(0),[E,j]=s.useState("opening"),[me,K]=s.useState(0),[te,O]=s.useState(0),[J,ne]=s.useState(!1),[Pe,be]=s.useState(null),[Re,ue]=s.useState(null),[fe,$e]=s.useState(null),[Q,Z]=s.useState(!1),[ae,xe]=s.useState(null),[ke,Ce]=s.useState(!1),q=s.useRef(!1),[ye,ce]=s.useState(!1),[U,de]=s.useState(!1),He=s.useRef(n),he=s.useRef(void 0),ee=t[n],Je=ee?uo(ee):!1,Ne=te!==0||J,ct=!l&&(!r||!!d),Ke=c&&!l,ut=u.length>1,lt=s.useCallback((F,Ee)=>t.length<=1?null:t[(F+Ee+t.length)%t.length]??null,[t]),Ye=ut?So(u,p,-1):lt(n,-1),Le=ut?So(u,p,1):lt(n,1),We=Pe===-1&&Ne?ut&&Re!==null?So(u,Re,-1):fe!==null?lt(fe,-1):null:null,Be=Pe===1&&Ne?ut&&Re!==null?So(u,Re,1):fe!==null?lt(fe,1):null:null,Ue=We&&We.url!==(Ye==null?void 0:Ye.url)?We:null,ge=Be&&Be.url!==(Le==null?void 0:Le.url)?Be:null,ve=Ye&&Ke?(()=>{const F=ut?Ml(u,p,-1):t.length>2?lt((n-1+t.length)%t.length,-1):null;return F&&F.url!==Ye.url?F:null})():null,_e=Le&&Ke?(()=>{const F=ut?Ml(u,p,1):t.length>2?lt((n+1)%t.length,1):null;return F&&F.url!==Le.url?F:null})():null,Ze=Ue??ve,we=ge??_e,Te=s.useCallback((F,Ee,Fe)=>{if(!F||!Ee||!Fe)return;const Oe=z.current,at=Oe.get(F);(at==null?void 0:at.width)===Ee&&(at==null?void 0:at.height)===Fe||(Oe.set(F,{width:Ee,height:Fe}),Y(Et=>Et+1))},[]),Xe=s.useCallback(F=>{if(!(F!=null&&F.url))return null;const Ee=z.current.get(F.url);return Xf(y.current,Ee)},[N,G]),ze=s.useCallback(()=>{if(!ee)return;const F=Xe(ee);if(F){re(F);return}const Ee=y.current;Ee&&re(kl(Ee))},[ee,Xe]),Ie=s.useCallback(F=>{if(ut){const Ee=u.length;ue((p+F+Ee)%Ee),$e(null);return}t.length>1&&($e((n+F+t.length)%t.length),ue(null))},[ut,u.length,p,t.length,n]),Ve=s.useCallback(F=>{M.current=F,ne(F)},[]),De=s.useCallback(()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null)},[]),tt=s.useCallback(()=>{De(),g.current=window.setTimeout(()=>{De(),Ve(!1)},go+32)},[De,Ve]),nt=s.useCallback(()=>{const F=C.current;if(!F){le({left:0,top:0,width:typeof window<"u"?window.innerWidth:$a.width,height:typeof window<"u"?window.innerHeight:$a.height});return}const Ee=F.getBoundingClientRect();le({left:Ee.left,top:Ee.top,width:Ee.width,height:Ee.height})},[]),st=s.useCallback((F,Ee)=>{if(Ne){if(ye&&!J)return`translate(${te}px, 0px)`;if(J&&Pe!==null){const Fe=Xe(F);if(!Fe)return;const{x:Oe,y:at}=Zf(Fe,Ee,Pe,k);return`translate(${Oe}px, ${at}px)`}if(J)return"translate(0px, 0px)"}},[Ne,ye,J,te,Pe,k,Xe]),St=s.useCallback(()=>{const F=D.current;D.current=null,De(),Ve(!1),be(null),ue(null),$e(null),O(0),ce(!1),I.current=!1,H.current=0,$.current="none",F===-1?f():F===1&&x()},[De,Ve,f,x]),Bt=s.useCallback(()=>{De(),g.current=window.setTimeout(()=>{D.current!==null&&St()},go+32)},[De,St]),zt=s.useCallback(()=>{De(),D.current=null,Ve(!1),be(null),ue(null),$e(null),O(0),ce(!1),I.current=!1,H.current=0,$.current="none"},[De,Ve]),ft=s.useCallback(F=>{if(!(!Ke||!se)){if(M.current){if(D.current===F){A.current=F,St();return}zt()}De(),Ie(F),D.current=F,be(F),Ve(!0),Bt()}},[Ke,se,St,zt,De,Ie,Ve,Bt]);X.current=ft;const wt=s.useCallback(()=>{ie.current=null,V.current=!1,L.current!==null&&(window.clearInterval(L.current),L.current=null),_.current!==null&&(window.clearTimeout(_.current),_.current=null)},[]),jt=s.useCallback(F=>{L.current!==null&&window.clearInterval(L.current);const Ee=V.current?Of:Df;L.current=window.setInterval(()=>{X.current(F)},Ee)},[]),At=s.useCallback(F=>{ie.current!==F&&(wt(),ie.current=F,V.current=!1,X.current(F),jt(F),_.current=window.setTimeout(()=>{_.current=null,ie.current===F&&(V.current=!0,jt(F))},Hf))},[wt,jt]),xt=s.useCallback(()=>{const F=y.current;if(!F)return;const Ee=ee==null?void 0:ee.url,Fe=Ee?z.current.get(Ee):void 0;if(Fe!=null&&Fe.width&&(Fe!=null&&Fe.height)){re(is(F,Fe.width,Fe.height));return}const Oe=S.current;if(Oe&&Ee&&(Oe.src===Ee||Oe.currentSrc===Ee)){const{width:Et,height:it}=Gf(Oe);if(Et&&it){Te(Ee,Et,it),re(is(F,Et,it));return}}const at=kl(F);!at.width||!at.height||re(at)},[ee==null?void 0:ee.url,Te]),Ft=s.useCallback(F=>{if(S.current=F,!!F){if(F instanceof HTMLVideoElement){F.readyState>=1&&F.videoWidth>0&&xt();return}F.complete&&F.naturalWidth>0&&xt()}},[xt]),Nt=s.useCallback(()=>{nt(),xt(),b(F=>F+1)},[nt,xt]);s.useEffect(()=>{Nt();const F=y.current,Ee=C.current,Fe=new ResizeObserver(()=>Nt());return F&&Fe.observe(F),Ee&&Fe.observe(Ee),window.addEventListener("resize",Nt),()=>{Fe.disconnect(),window.removeEventListener("resize",Nt)}},[Nt,n,v]),s.useLayoutEffect(()=>{if(!ee)return;const F=S.current;if(F){if(F instanceof HTMLImageElement&&F.complete&&F.naturalWidth>0){xt();return}F instanceof HTMLVideoElement&&F.readyState>=1&&F.videoWidth>0&&xt()}},[ee==null?void 0:ee.url,n,xt]),s.useEffect(()=>{ze()},[ze,N]),s.useEffect(()=>{const F=new Set,Ee=[],Fe=Oe=>{!(Oe!=null&&Oe.url)||F.has(Oe.url)||(F.add(Oe.url),Ee.push(Oe))};t.forEach(Fe),u.forEach(Oe=>Oe.items.forEach(Fe)),Ee.forEach(Oe=>{z.current.has(Oe.url)||qf(Oe,Te)})},[t,u,Te]),s.useEffect(()=>{if(E!=="opening"||!se)return;if(!w){j("open");return}Z(!1);const F=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Z(!0),j("open")})});return()=>cancelAnimationFrame(F)},[E,se,w]),s.useEffect(()=>{if(E!=="closing")return;const F=setTimeout(()=>h(),Tn);return()=>clearTimeout(F)},[E,h]),s.useEffect(()=>()=>{De()},[De]),s.useLayoutEffect(()=>{He.current===n&&he.current===(ee==null?void 0:ee.url)||(De(),D.current=null,be(null),ue(null),$e(null),K(0),O(0),Ve(!1),de(!1),ce(!1),T.current=0,H.current=0,$.current="none",I.current=!1,B.current=null,P.current=!1,S.current=null,ze(),He.current=n,he.current=ee==null?void 0:ee.url)},[n,ee==null?void 0:ee.url,Ve,De,ze]),s.useLayoutEffect(()=>{const F=A.current;F!==null&&(A.current=null,requestAnimationFrame(()=>{X.current(F)}))},[n,p,ee==null?void 0:ee.url]),s.useLayoutEffect(()=>{if(E==="opening"){q.current=!1,Ce(!1);return}if(E!=="open"||q.current)return;if(!Ye&&!Le){q.current=!0;return}Ce(!1);const F=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Ce(!0),q.current=!0})});return()=>cancelAnimationFrame(F)},[E,Ye==null?void 0:Ye.url,Le==null?void 0:Le.url]),s.useEffect(()=>{if(E!=="open")return;const F=()=>{const it=vt=>{vt.stopPropagation(),vt.preventDefault(),document.removeEventListener("click",it,!0)};document.addEventListener("click",it,!0)},Ee=it=>{const vt=it<0?1:-1;De(),Ie(vt),D.current=vt,be(vt),Ve(!0),Bt()},Fe=it=>{if(Math.abs(it)>Wf&&Ke){Ee(it);return}D.current=null,be(null),ue(null),$e(null),Ve(!0),O(0),tt()},Oe=it=>{if(it.touches.length!==1||M.current)return;const vt=it.touches[0];P.current=!0,B.current={x:vt.clientX,y:vt.clientY},$.current="none",H.current=0,I.current=!1},at=it=>{if(!B.current||it.touches.length!==1||M.current)return;const vt=it.touches[0],Ot=vt.clientX-B.current.x,It=vt.clientY-B.current.y;if($.current==="none"){if(Math.abs(Ot)<10&&Math.abs(It)<10)return;if(Math.abs(Ot)>Math.abs(It)){if(!Ke)return;$.current="horizontal"}else if(It>0){if(!ct)return;$.current="vertical"}else return}if($.current==="horizontal"){I.current=!0,ce(!0),H.current=Ot,O(Ot),it.preventDefault();return}$.current==="vertical"&&(I.current=!0,ce(!0),T.current=It,K(It),it.preventDefault())},Et=()=>{if(!B.current)return;const it=$.current,vt=I.current;if(vt&&it==="horizontal")Fe(H.current),F();else if(vt&&it==="vertical"){const Ot=T.current;if(ct&&Ot>Nf){const It=window.innerHeight;T.current=It,de(!0),K(It),j("closing")}else T.current=0,K(0);F()}else it==="horizontal"&&Math.abs(H.current)>0&&(Fe(H.current),F());B.current=null,$.current="none",H.current=0,I.current=!1,ce(!1)};return document.addEventListener("touchstart",Oe,{passive:!0}),document.addEventListener("touchmove",at,{passive:!1}),document.addEventListener("touchend",Et),document.addEventListener("touchcancel",Et),()=>{document.removeEventListener("touchstart",Oe),document.removeEventListener("touchmove",at),document.removeEventListener("touchend",Et),document.removeEventListener("touchcancel",Et)}},[E,Ke,Ve,tt,De,ct,Bt,Ie]);const Kt=s.useCallback(()=>{const F=(m==null?void 0:m())??w??null;F&&se&&(xe(F),Z(!0)),j("closing")},[m,w,se]);s.useEffect(()=>{const F=Oe=>{if(Oe.key==="Escape"){if(r&&d||E==="closing")return;wt(),Kt();return}if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight"||E!=="open"||!Ke)return;Oe.preventDefault();const at=Oe.key==="ArrowLeft"?-1:1;Oe.repeat&&ie.current===at||At(at)},Ee=Oe=>{if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight")return;const at=Oe.key==="ArrowLeft"?-1:1;ie.current===at&&wt()},Fe=()=>{wt()};return window.addEventListener("keydown",F),window.addEventListener("keyup",Ee),window.addEventListener("blur",Fe),()=>{window.removeEventListener("keydown",F),window.removeEventListener("keyup",Ee),window.removeEventListener("blur",Fe),wt()}},[E,r,d,Kt,Ke,At,wt]),s.useEffect(()=>{E!=="open"&&wt()},[E,wt]);const Jt=()=>{E==="closing"||l||Kt()},Tt=E==="open",Wt=E==="closing",rn=me>0?Math.max(0,1-me/500):1,gt=me>0?Math.max(.35,1-me/500):1,Ae=s.useCallback(F=>{if(!(F.propertyName!=="transform"||!M.current)){if(D.current!==null){St();return}De(),Ve(!1)}},[De,Ve,St]),Ge=E==="closing"?ae??w:w,rt=Ge&&se&&(E==="opening"||Wt)?Bf(Ge,se):void 0,ht=Ne&&ee?st(ee,"center"):me>0?`translateY(${me}px)`:rt,yt=se?dr(se,k):null,Lt=!!(Ge&&se),mt=Lt&&(E==="closing"||E==="open"&&Q),Vt={position:"absolute",top:yt==null?void 0:yt.top,left:yt==null?void 0:yt.left,width:yt==null?void 0:yt.width,height:yt==null?void 0:yt.height,objectFit:"contain",transformOrigin:"top left",transform:ht,opacity:me>0?gt:Lt?1:E==="opening"||Wt?0:1,transition:ye&&!J?"none":J?`transform ${go}ms ${pn}`:U?`transform ${Tn}ms ${pn}, opacity ${Tn}ms ${pn}`:mt?`transform ${Tn}ms ${pn}`:E==="opening"||Wt?`opacity ${Tn}ms ${pn}`:"none",pointerEvents:Je&&Tt&&!Ne?"auto":"none",touchAction:Je&&Tt?"none":void 0,zIndex:1,overflow:Je?"hidden":void 0},kt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Tt&&!Ne?"auto":"none"},Mt=(F,Ee,Fe="adjacent")=>{const Oe=Xe(F);if(!Oe)return{display:"none"};const at=Fe==="far"?Ee==="left"?"far-left":"far-right":Ee==="left"?"left-adjacent":"right-adjacent",{start:Et}=Pe!==null?Ed(Oe,at,Pe,k):{start:Fe==="far"?Wr(Oe,Ee,k):Ji(Oe,Ee,k)},it=dr(Et,k),vt=st(F,at),Ot=!Ne&&Fe==="adjacent"&&Tt&&!ke?Jf(Oe,Ee,k):null,It=Fe==="far"&&Ne&&Pe===(Ee==="left"?-1:1),nn=ye&&!J?!1:J,un=Fe==="adjacent"&&Tt&&ke&&!Ne;return{position:"absolute",top:it.top,left:it.left,width:it.width,height:it.height,objectFit:"contain",transform:vt??(Ot?`translate(${Ot.x}px, ${Ot.y}px)`:void 0),opacity:Fe==="far"?Tt&&It?1:0:Tt?1:0,transition:nn?Fe==="far"?`transform ${go}ms ${pn}`:`transform ${go}ms ${pn}, opacity ${Tn}ms ${pn}`:un?`transform ${Tn}ms ${pn}`:E==="opening"||Wt?`opacity ${Tn}ms ${pn}`:"none",pointerEvents:"none",zIndex:1}},Xt=(F,Ee)=>{const Fe=Xe(F);return Fe?Kf(Ji(Fe,Ee,k),Ee,k):null},qt=F=>Ee=>{if(!l){if(P.current){P.current=!1;return}Ee.stopPropagation(),ft(F)}},Ht=Ye?Xt(Ye,"left"):null,Dt=Le?Xt(Le,"right"):null,_t=Ht?dr(Ht,k):null,Ct=Dt?dr(Dt,k):null;return a.jsxs("div",{ref:C,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:E==="open"?"none":void 0},onClick:Jt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Tt?rn:0,transition:ye?"none":`opacity ${Tn}ms ${pn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Tt?1:0,transition:ye?"none":`opacity ${Tn}ms ${pn}`,pointerEvents:"none"},children:a.jsx(Rd,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,onClose:Jt})})]}),Tt&&Ze&&a.jsx(ur,{media:Ze,style:Mt(Ze,"left","far"),onMeasure:Te,onTransitionEnd:Ae},`far-prev-${Ze.url}`),Tt&&Ye&&a.jsxs(a.Fragment,{children:[a.jsx(ur,{media:Ye,style:Mt(Ye,"left"),onMeasure:Te,onTransitionEnd:Ae},`prev-${Ye.url}`),_t&&a.jsx("div",{style:{position:"absolute",top:_t.top,left:_t.left,width:_t.width,height:_t.height,cursor:l||ye?"default":"pointer",pointerEvents:l||ye?"none":"auto",zIndex:3},onClick:qt(-1)})]}),Tt&&Le&&a.jsxs(a.Fragment,{children:[a.jsx(ur,{media:Le,style:Mt(Le,"right"),onMeasure:Te,onTransitionEnd:Ae},`next-${Le.url}`),Ct&&a.jsx("div",{style:{position:"absolute",top:Ct.top,left:Ct.left,width:Ct.width,height:Ct.height,cursor:l||ye?"default":"pointer",pointerEvents:l||ye?"none":"auto",zIndex:3},onClick:qt(1)})]}),Tt&&we&&a.jsx(ur,{media:we,style:Mt(we,"right","far"),onMeasure:Te,onTransitionEnd:Ae},`far-next-${we.url}`),se&&ee&&(Je?a.jsx(ny,{src:ee.url,phase:E,onMediaElement:Ft,wrapperStyle:Vt,videoStyle:kt,onLoadedMetadata:xt,onTransitionEnd:Ae},`${n}-${ee.url}`):a.jsx("img",{ref:Ft,src:ee.url,alt:ee.name,onLoad:xt,onTransitionEnd:Ae,style:Vt},`${n}-${ee.url}`))]})}function oy({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:d}=W.useScopedStyles(),{gridLayout:c,verticalGap:u,align:p="top",imageDisplay:v}=e,w=(v==null?void 0:v.display)==="cover",m=(v==null?void 0:v.ratioValue)??"1:1",h=(v==null?void 0:v.reversed)??!1,[f,x]=m.split(":").map(Number),S=`${h?x:f} / ${h?f:x}`,z=c.entryWidth??.2,N=c.columnsCount,Y=W.scalingValue(z,n),B=W.scalingValue(c.horizontalGap??0,n),T=Y,H=Y,$={width:T,...w?{aspectRatio:S,height:"auto",overflow:"hidden"}:{height:"auto"}},I=w?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},P=s.useRef(null),[M,g]=s.useState(!1),[D,A]=s.useState([]),[X,ie]=s.useState(0),[L,_]=s.useState(0),[V,se]=s.useState(null),[re,k]=s.useState({title1:"",title2:"",title3:""}),le=(()=>{const fe={},$e=P.current?getComputedStyle(P.current).getPropertyValue("--cntrl-article-width").trim():"";return $e&&(fe["--cntrl-article-width"]=$e),fe})(),G=!n||i||o,b=s.useMemo(()=>_f(d),[d]),E=t??[],j=E.length%N||N,me=j<N&&E.length>0,K=E.length-j,te=me?Math.floor((N-j)/2)+1:1,O=s.useMemo(()=>jf(E),[E]),J=s.useMemo(()=>Yf(E),[E]),ne=(fe,$e,Q)=>{if(n&&!o&&!i)return;const Z=O.findIndex(xe=>xe.gridIndex===fe);if(Z<0)return;const ae=O[Z];_(Z),A(ae.items),ie($e),k(ae.entry),se(Q??null),g(!0)},Pe=s.useCallback(()=>{g(!1),se(null)},[]),be=s.useCallback(()=>{const fe=O[L];return!fe||!P.current?V:zf(P.current,fe.gridIndex,w?"cover":"contain")??V},[O,L,V,w]),Re=s.useCallback(fe=>{if(O.length>1){const $e=O.length,Q=(L+fe+$e)%$e,Z=O[Q],ae=Math.min(X,Z.items.length-1);_(Q),A(Z.items),ie(ae),k(Z.entry);return}ie($e=>($e+fe+D.length)%D.length)},[O,L,X,D.length]),ue=O.length>1||D.length>1;return s.useEffect(()=>{if(!M||typeof document>"u")return;const fe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=fe}},[M]),s.useEffect(()=>{!n||o||i||g(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:b}}),a.jsx(Uf,{mediaList:J}),a.jsx("div",{ref:P,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${N}, ${Y})`,rowGap:0,columnGap:B,width:W.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:W.scalingValue(u??0,n)},children:E.map((fe,$e)=>{const Q=zs(fe.gallery),Z=js(Q),ae=Z.filter(ce=>ce.lightboxMedia).map(ce=>ce.lightboxMedia),xe=Math.floor($e/N)===Math.ceil(E.length/N)-1,ke=me&&$e>=K?`${te+($e-K)}`:void 0,Ce=Z[0],q=Ce!=null&&Ce.lightboxMedia?ae.findIndex(ce=>ce.url===Ce.lightboxMedia.url):-1,ye=a.jsx("div",{className:`${d}-item-image-wrapper`,style:$,children:Z.length>0&&a.jsx(ty,{media:Ce.displayMedia,gridIndex:$e,className:`${d}-item-${uo(Ce.displayMedia)?"video":"image"}`.trim(),style:I,onMediaClick:G&&q>=0?ce=>ne($e,q,Ld(ce.currentTarget,w?"cover":"contain")):void 0})});return a.jsx("div",{className:`${d}-item`,children:a.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,xe?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:Y,...ke?{gridColumn:ke}:{}},children:[a.jsx("div",{className:`${d}-item-title-row`,children:a.jsx("div",{style:{height:0,width:H}})}),a.jsx("a",{className:`${d}-item-image-link`,children:ye}),a.jsx("div",{className:`${d}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:H}})})]})},$e)})}),M&&typeof document<"u"&&(()=>{const fe=(l?document.getElementById(l):null)??document.body;return zn.createPortal(a.jsx("div",{style:le,"data-selection":"none",children:a.jsx(iy,{prefix:d,items:D,index:X,entry:re,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ue,lightboxEntries:O,entryIdx:L,layoutId:r,sourceRect:V,resolveCloseSourceRect:be,onClose:Pe,onPrev:()=>Re(-1),onNext:()=>Re(1)})}),fe)})()]})}const ry=`import { CommonComponentProps } from '../props';
7509
+ `}const Fl={url:"",name:"",objectFit:"cover"},Tn=500,ho=650,pn="cubic-bezier(0.22, 1, 0.36, 1)",Of=72,Bf=50,zf=1e4,jf=650,Vf=500;function Gf(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Ad(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Dr(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 Xf(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Ad(i,n):null}function Yf(e){return e.reduce((t,n,i)=>{const o=Xs(n.gallery),l=Ys(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 Co(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 _l(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Co(e,i,n)}const qf=.03;function Fd(e){return e.width*qf}const Ra={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function pr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Nl(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Uf(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function as(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,d=o/r;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const c=r*l;return{width:c,height:r,left:i.left+(o-c)/2,top:i.top}}function Kf(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:as(e,t.width,t.height)}function Zf(e,t){if(po(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 Jf(e){const t=new Set,n=[];for(const i of e){const o=Xs(i.gallery),r=Ys(o);for(const l of r)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 Qf({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>po(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Qi(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:d}=n,c=Fd(n);return t==="left"?{left:l+c-i,top:r,width:i,height:o}:{left:l+d-c,top:r,width:i,height:o}}function Or(e,t,n){const i=Qi(e,t,n);return{...i,left:2*i.left-e.left}}function ey(e,t,n){const{left:i,width:o}=n,r=Fd(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function _d(e,t,n,i){const o=Qi(e,"left",i),r=Qi(e,"right",i),l=Or(e,"left",i),d=Or(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function ty(e,t,n,i){const{start:o,end:r}=_d(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function ny(e,t,n){const i=Qi(e,t,n),o=Or(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Nd(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 Xs(e){if(!e)return;if(Nd(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??Fl,i??o??Fl]}]}function iy(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function oy(e){const[t]=e.media;return t!=null&&t.url?t:null}function Ys(e){if(!Array.isArray(e)||e.length===0)return[];if(Nd(e)){const t=[];for(const n of e){const i=iy(n);if(!i)continue;const o=oy(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 po(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function ry({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return po(e)?a.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}):a.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function ay({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const d=s.useRef(null);return s.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:c=>c.stopPropagation(),style:o},e)})}function mr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return po(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function sy({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:x,sourceRect:b,resolveCloseSourceRect:m,onClose:h,onPrev:f,onNext:v}){const C=s.useRef(null),y=s.useRef(null),S=s.useRef(null),j=s.useRef(new Map),[N,U]=s.useState(0),W=s.useRef(null),R=s.useRef(0),B=s.useRef(0),$=s.useRef("none"),T=s.useRef(!1),k=s.useRef(!1),E=s.useRef(!1),g=s.useRef(null),A=s.useRef(null),F=s.useRef(null),X=s.useRef(()=>{}),ee=s.useRef(null),P=s.useRef(null),D=s.useRef(null),K=s.useRef(!1),[le,re]=s.useState(null),[M,ie]=s.useState(Ra),[G,oe]=s.useState(0),[te,ye]=s.useState("opening"),[Me,w]=s.useState(0),[Y,I]=s.useState(0),[z,H]=s.useState(!1),[Te,fe]=s.useState(null),[ve,de]=s.useState(null),[he,we]=s.useState(null),[Z,Q]=s.useState(!1),[ae,$e]=s.useState(null),[ke,xe]=s.useState(!1),V=s.useRef(!1),[pe,se]=s.useState(!1),[q,ce]=s.useState(!1),We=s.useRef(n),ge=s.useRef(void 0),J=t[n],Ke=J?po(J):!1,_e=Y!==0||z,rt=!l&&(!r||!!d),Ye=c&&!l,dt=u.length>1,at=s.useCallback((_,Pe)=>t.length<=1?null:t[(_+Pe+t.length)%t.length]??null,[t]),Xe=dt?Co(u,p,-1):at(n,-1),Le=dt?Co(u,p,1):at(n,1),He=Te===-1&&_e?dt&&ve!==null?Co(u,ve,-1):he!==null?at(he,-1):null:null,Be=Te===1&&_e?dt&&ve!==null?Co(u,ve,1):he!==null?at(he,1):null:null,Ze=He&&He.url!==(Xe==null?void 0:Xe.url)?He:null,me=Be&&Be.url!==(Le==null?void 0:Le.url)?Be:null,be=Xe&&Ye?(()=>{const _=dt?_l(u,p,-1):t.length>2?at((n-1+t.length)%t.length,-1):null;return _&&_.url!==Xe.url?_:null})():null,Ne=Le&&Ye?(()=>{const _=dt?_l(u,p,1):t.length>2?at((n+1)%t.length,1):null;return _&&_.url!==Le.url?_:null})():null,Je=Ze??be,Se=me??Ne,Ie=s.useCallback((_,Pe,Fe)=>{if(!_||!Pe||!Fe)return;const Oe=j.current,lt=Oe.get(_);(lt==null?void 0:lt.width)===Pe&&(lt==null?void 0:lt.height)===Fe||(Oe.set(_,{width:Pe,height:Fe}),U(Et=>Et+1))},[]),qe=s.useCallback(_=>{if(!(_!=null&&_.url))return null;const Pe=j.current.get(_.url);return Kf(y.current,Pe)},[N,G]),ze=s.useCallback(()=>{if(!J)return;const _=qe(J);if(_){re(_);return}const Pe=y.current;Pe&&re(Nl(Pe))},[J,qe]),Re=s.useCallback(_=>{if(dt){const Pe=u.length;de((p+_+Pe)%Pe),we(null);return}t.length>1&&(we((n+_+t.length)%t.length),de(null))},[dt,u.length,p,t.length,n]),Ve=s.useCallback(_=>{E.current=_,H(_)},[]),De=s.useCallback(()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null)},[]),tt=s.useCallback(()=>{De(),g.current=window.setTimeout(()=>{De(),Ve(!1)},ho+32)},[De,Ve]),nt=s.useCallback(()=>{const _=C.current;if(!_){ie({left:0,top:0,width:typeof window<"u"?window.innerWidth:Ra.width,height:typeof window<"u"?window.innerHeight:Ra.height});return}const Pe=_.getBoundingClientRect();ie({left:Pe.left,top:Pe.top,width:Pe.width,height:Pe.height})},[]),ct=s.useCallback((_,Pe)=>{if(_e){if(pe&&!z)return`translate(${Y}px, 0px)`;if(z&&Te!==null){const Fe=qe(_);if(!Fe)return;const{x:Oe,y:lt}=ty(Fe,Pe,Te,M);return`translate(${Oe}px, ${lt}px)`}if(z)return"translate(0px, 0px)"}},[_e,pe,z,Y,Te,M,qe]),St=s.useCallback(()=>{const _=A.current;A.current=null,De(),Ve(!1),fe(null),de(null),we(null),I(0),se(!1),T.current=!1,B.current=0,$.current="none",_===-1?f():_===1&&v()},[De,Ve,f,v]),Bt=s.useCallback(()=>{De(),g.current=window.setTimeout(()=>{A.current!==null&&St()},ho+32)},[De,St]),zt=s.useCallback(()=>{De(),A.current=null,Ve(!1),fe(null),de(null),we(null),I(0),se(!1),T.current=!1,B.current=0,$.current="none"},[De,Ve]),ft=s.useCallback(_=>{if(!(!Ye||!le)){if(E.current){if(A.current===_){F.current=_,St();return}zt()}De(),Re(_),A.current=_,fe(_),Ve(!0),Bt()}},[Ye,le,St,zt,De,Re,Ve,Bt]);X.current=ft;const wt=s.useCallback(()=>{ee.current=null,K.current=!1,P.current!==null&&(window.clearInterval(P.current),P.current=null),D.current!==null&&(window.clearTimeout(D.current),D.current=null)},[]),jt=s.useCallback(_=>{P.current!==null&&window.clearInterval(P.current);const Pe=K.current?Vf:jf;P.current=window.setInterval(()=>{X.current(_)},Pe)},[]),At=s.useCallback(_=>{ee.current!==_&&(wt(),ee.current=_,K.current=!1,X.current(_),jt(_),D.current=window.setTimeout(()=>{D.current=null,ee.current===_&&(K.current=!0,jt(_))},zf))},[wt,jt]),vt=s.useCallback(()=>{const _=y.current;if(!_)return;const Pe=J==null?void 0:J.url,Fe=Pe?j.current.get(Pe):void 0;if(Fe!=null&&Fe.width&&(Fe!=null&&Fe.height)){re(as(_,Fe.width,Fe.height));return}const Oe=S.current;if(Oe&&Pe&&(Oe.src===Pe||Oe.currentSrc===Pe)){const{width:Et,height:it}=Uf(Oe);if(Et&&it){Ie(Pe,Et,it),re(as(_,Et,it));return}}const lt=Nl(_);!lt.width||!lt.height||re(lt)},[J==null?void 0:J.url,Ie]),Ft=s.useCallback(_=>{if(S.current=_,!!_){if(_ instanceof HTMLVideoElement){_.readyState>=1&&_.videoWidth>0&&vt();return}_.complete&&_.naturalWidth>0&&vt()}},[vt]),Nt=s.useCallback(()=>{nt(),vt(),oe(_=>_+1)},[nt,vt]);s.useEffect(()=>{Nt();const _=y.current,Pe=C.current,Fe=new ResizeObserver(()=>Nt());return _&&Fe.observe(_),Pe&&Fe.observe(Pe),window.addEventListener("resize",Nt),()=>{Fe.disconnect(),window.removeEventListener("resize",Nt)}},[Nt,n,x]),s.useLayoutEffect(()=>{if(!J)return;const _=S.current;if(_){if(_ instanceof HTMLImageElement&&_.complete&&_.naturalWidth>0){vt();return}_ instanceof HTMLVideoElement&&_.readyState>=1&&_.videoWidth>0&&vt()}},[J==null?void 0:J.url,n,vt]),s.useEffect(()=>{ze()},[ze,N]),s.useEffect(()=>{const _=new Set,Pe=[],Fe=Oe=>{!(Oe!=null&&Oe.url)||_.has(Oe.url)||(_.add(Oe.url),Pe.push(Oe))};t.forEach(Fe),u.forEach(Oe=>Oe.items.forEach(Fe)),Pe.forEach(Oe=>{j.current.has(Oe.url)||Zf(Oe,Ie)})},[t,u,Ie]),s.useEffect(()=>{if(te!=="opening"||!le)return;if(!b){ye("open");return}Q(!1);const _=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Q(!0),ye("open")})});return()=>cancelAnimationFrame(_)},[te,le,b]),s.useEffect(()=>{if(te!=="closing")return;const _=setTimeout(()=>h(),Tn);return()=>clearTimeout(_)},[te,h]),s.useEffect(()=>()=>{De()},[De]),s.useLayoutEffect(()=>{We.current===n&&ge.current===(J==null?void 0:J.url)||(De(),A.current=null,fe(null),de(null),we(null),w(0),I(0),Ve(!1),ce(!1),se(!1),R.current=0,B.current=0,$.current="none",T.current=!1,W.current=null,k.current=!1,S.current=null,ze(),We.current=n,ge.current=J==null?void 0:J.url)},[n,J==null?void 0:J.url,Ve,De,ze]),s.useLayoutEffect(()=>{const _=F.current;_!==null&&(F.current=null,requestAnimationFrame(()=>{X.current(_)}))},[n,p,J==null?void 0:J.url]),s.useLayoutEffect(()=>{if(te==="opening"){V.current=!1,xe(!1);return}if(te!=="open"||V.current)return;if(!Xe&&!Le){V.current=!0;return}xe(!1);const _=requestAnimationFrame(()=>{requestAnimationFrame(()=>{xe(!0),V.current=!0})});return()=>cancelAnimationFrame(_)},[te,Xe==null?void 0:Xe.url,Le==null?void 0:Le.url]),s.useEffect(()=>{if(te!=="open")return;const _=()=>{const it=xt=>{xt.stopPropagation(),xt.preventDefault(),document.removeEventListener("click",it,!0)};document.addEventListener("click",it,!0)},Pe=it=>{const xt=it<0?1:-1;De(),Re(xt),A.current=xt,fe(xt),Ve(!0),Bt()},Fe=it=>{if(Math.abs(it)>Bf&&Ye){Pe(it);return}A.current=null,fe(null),de(null),we(null),Ve(!0),I(0),tt()},Oe=it=>{if(it.touches.length!==1||E.current)return;const xt=it.touches[0];k.current=!0,W.current={x:xt.clientX,y:xt.clientY},$.current="none",B.current=0,T.current=!1},lt=it=>{if(!W.current||it.touches.length!==1||E.current)return;const xt=it.touches[0],Ot=xt.clientX-W.current.x,It=xt.clientY-W.current.y;if($.current==="none"){if(Math.abs(Ot)<10&&Math.abs(It)<10)return;if(Math.abs(Ot)>Math.abs(It)){if(!Ye)return;$.current="horizontal"}else if(It>0){if(!rt)return;$.current="vertical"}else return}if($.current==="horizontal"){T.current=!0,se(!0),B.current=Ot,I(Ot),it.preventDefault();return}$.current==="vertical"&&(T.current=!0,se(!0),R.current=It,w(It),it.preventDefault())},Et=()=>{if(!W.current)return;const it=$.current,xt=T.current;if(xt&&it==="horizontal")Fe(B.current),_();else if(xt&&it==="vertical"){const Ot=R.current;if(rt&&Ot>Of){const It=window.innerHeight;R.current=It,ce(!0),w(It),ye("closing")}else R.current=0,w(0);_()}else it==="horizontal"&&Math.abs(B.current)>0&&(Fe(B.current),_());W.current=null,$.current="none",B.current=0,T.current=!1,se(!1)};return document.addEventListener("touchstart",Oe,{passive:!0}),document.addEventListener("touchmove",lt,{passive:!1}),document.addEventListener("touchend",Et),document.addEventListener("touchcancel",Et),()=>{document.removeEventListener("touchstart",Oe),document.removeEventListener("touchmove",lt),document.removeEventListener("touchend",Et),document.removeEventListener("touchcancel",Et)}},[te,Ye,Ve,tt,De,rt,Bt,Re]);const Kt=s.useCallback(()=>{const _=(m==null?void 0:m())??b??null;_&&le&&($e(_),Q(!0)),ye("closing")},[m,b,le]);s.useEffect(()=>{const _=Oe=>{if(Oe.key==="Escape"){if(r&&d||te==="closing")return;wt(),Kt();return}if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight"||te!=="open"||!Ye)return;Oe.preventDefault();const lt=Oe.key==="ArrowLeft"?-1:1;Oe.repeat&&ee.current===lt||At(lt)},Pe=Oe=>{if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight")return;const lt=Oe.key==="ArrowLeft"?-1:1;ee.current===lt&&wt()},Fe=()=>{wt()};return window.addEventListener("keydown",_),window.addEventListener("keyup",Pe),window.addEventListener("blur",Fe),()=>{window.removeEventListener("keydown",_),window.removeEventListener("keyup",Pe),window.removeEventListener("blur",Fe),wt()}},[te,r,d,Kt,Ye,At,wt]),s.useEffect(()=>{te!=="open"&&wt()},[te,wt]);const Jt=()=>{te==="closing"||l||Kt()},Tt=te==="open",Wt=te==="closing",rn=Me>0?Math.max(0,1-Me/500):1,gt=Me>0?Math.max(.35,1-Me/500):1,Ae=s.useCallback(_=>{if(!(_.propertyName!=="transform"||!E.current)){if(A.current!==null){St();return}De(),Ve(!1)}},[De,Ve,St]),Ge=te==="closing"?ae??b:b,st=Ge&&le&&(te==="opening"||Wt)?Gf(Ge,le):void 0,ht=_e&&J?ct(J,"center"):Me>0?`translateY(${Me}px)`:st,yt=le?pr(le,M):null,Lt=!!(Ge&&le),mt=Lt&&(te==="closing"||te==="open"&&Z),Vt={position:"absolute",top:yt==null?void 0:yt.top,left:yt==null?void 0:yt.left,width:yt==null?void 0:yt.width,height:yt==null?void 0:yt.height,objectFit:"contain",transformOrigin:"top left",transform:ht,opacity:Me>0?gt:Lt?1:te==="opening"||Wt?0:1,transition:pe&&!z?"none":z?`transform ${ho}ms ${pn}`:q?`transform ${Tn}ms ${pn}, opacity ${Tn}ms ${pn}`:mt?`transform ${Tn}ms ${pn}`:te==="opening"||Wt?`opacity ${Tn}ms ${pn}`:"none",pointerEvents:Ke&&Tt&&!_e?"auto":"none",touchAction:Ke&&Tt?"none":void 0,zIndex:1,overflow:Ke?"hidden":void 0},kt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Tt&&!_e?"auto":"none"},Mt=(_,Pe,Fe="adjacent")=>{const Oe=qe(_);if(!Oe)return{display:"none"};const lt=Fe==="far"?Pe==="left"?"far-left":"far-right":Pe==="left"?"left-adjacent":"right-adjacent",{start:Et}=Te!==null?_d(Oe,lt,Te,M):{start:Fe==="far"?Or(Oe,Pe,M):Qi(Oe,Pe,M)},it=pr(Et,M),xt=ct(_,lt),Ot=!_e&&Fe==="adjacent"&&Tt&&!ke?ny(Oe,Pe,M):null,It=Fe==="far"&&_e&&Te===(Pe==="left"?-1:1),nn=pe&&!z?!1:z,un=Fe==="adjacent"&&Tt&&ke&&!_e;return{position:"absolute",top:it.top,left:it.left,width:it.width,height:it.height,objectFit:"contain",transform:xt??(Ot?`translate(${Ot.x}px, ${Ot.y}px)`:void 0),opacity:Fe==="far"?Tt&&It?1:0:Tt?1:0,transition:nn?Fe==="far"?`transform ${ho}ms ${pn}`:`transform ${ho}ms ${pn}, opacity ${Tn}ms ${pn}`:un?`transform ${Tn}ms ${pn}`:te==="opening"||Wt?`opacity ${Tn}ms ${pn}`:"none",pointerEvents:"none",zIndex:1}},Xt=(_,Pe)=>{const Fe=qe(_);return Fe?ey(Qi(Fe,Pe,M),Pe,M):null},Yt=_=>Pe=>{if(!l){if(k.current){k.current=!1;return}Pe.stopPropagation(),ft(_)}},Ht=Xe?Xt(Xe,"left"):null,Dt=Le?Xt(Le,"right"):null,_t=Ht?pr(Ht,M):null,Ct=Dt?pr(Dt,M):null;return a.jsxs("div",{ref:C,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:te==="open"?"none":void 0},onClick:Jt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Tt?rn:0,transition:pe?"none":`opacity ${Tn}ms ${pn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Tt?1:0,transition:pe?"none":`opacity ${Tn}ms ${pn}`,pointerEvents:"none"},children:a.jsx(kd,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,onClose:Jt})})]}),Tt&&Je&&a.jsx(mr,{media:Je,style:Mt(Je,"left","far"),onMeasure:Ie,onTransitionEnd:Ae},`far-prev-${Je.url}`),Tt&&Xe&&a.jsxs(a.Fragment,{children:[a.jsx(mr,{media:Xe,style:Mt(Xe,"left"),onMeasure:Ie,onTransitionEnd:Ae},`prev-${Xe.url}`),_t&&a.jsx("div",{style:{position:"absolute",top:_t.top,left:_t.left,width:_t.width,height:_t.height,cursor:l||pe?"default":"pointer",pointerEvents:l||pe?"none":"auto",zIndex:3},onClick:Yt(-1)})]}),Tt&&Le&&a.jsxs(a.Fragment,{children:[a.jsx(mr,{media:Le,style:Mt(Le,"right"),onMeasure:Ie,onTransitionEnd:Ae},`next-${Le.url}`),Ct&&a.jsx("div",{style:{position:"absolute",top:Ct.top,left:Ct.left,width:Ct.width,height:Ct.height,cursor:l||pe?"default":"pointer",pointerEvents:l||pe?"none":"auto",zIndex:3},onClick:Yt(1)})]}),Tt&&Se&&a.jsx(mr,{media:Se,style:Mt(Se,"right","far"),onMeasure:Ie,onTransitionEnd:Ae},`far-next-${Se.url}`),le&&J&&(Ke?a.jsx(ay,{src:J.url,phase:te,onMediaElement:Ft,wrapperStyle:Vt,videoStyle:kt,onLoadedMetadata:vt,onTransitionEnd:Ae},`${n}-${J.url}`):a.jsx("img",{ref:Ft,src:J.url,alt:J.name,onLoad:vt,onTransitionEnd:Ae,style:Vt},`${n}-${J.url}`))]})}function ly({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:d}=O.useScopedStyles(),{gridLayout:c,verticalGap:u,align:p="top",imageDisplay:x}=e,b=(x==null?void 0:x.display)==="cover",m=(x==null?void 0:x.ratioValue)??"1:1",h=(x==null?void 0:x.reversed)??!1,[f,v]=m.split(":").map(Number),S=`${h?v:f} / ${h?f:v}`,j=c.entryWidth??.2,N=c.columnsCount,U=O.scalingValue(j,n),W=O.scalingValue(c.horizontalGap??0,n),R=U,B=U,$={width:R,...b?{aspectRatio:S,height:"auto",overflow:"hidden"}:{height:"auto"}},T=b?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},k=s.useRef(null),[E,g]=s.useState(!1),[A,F]=s.useState([]),[X,ee]=s.useState(0),[P,D]=s.useState(0),[K,le]=s.useState(null),[re,M]=s.useState({title1:"",title2:"",title3:""}),ie=(()=>{const he={},we=k.current?getComputedStyle(k.current).getPropertyValue("--cntrl-article-width").trim():"";return we&&(he["--cntrl-article-width"]=we),he})(),G=!n||i||o,oe=s.useMemo(()=>Df(d),[d]),te=t??[],ye=te.length%N||N,Me=ye<N&&te.length>0,w=te.length-ye,Y=Me?Math.floor((N-ye)/2)+1:1,I=s.useMemo(()=>Yf(te),[te]),z=s.useMemo(()=>Jf(te),[te]),H=(he,we,Z)=>{if(n&&!o&&!i)return;const Q=I.findIndex($e=>$e.gridIndex===he);if(Q<0)return;const ae=I[Q];D(Q),F(ae.items),ee(we),M(ae.entry),le(Z??null),g(!0)},Te=s.useCallback(()=>{g(!1),le(null)},[]),fe=s.useCallback(()=>{const he=I[P];return!he||!k.current?K:Xf(k.current,he.gridIndex,b?"cover":"contain")??K},[I,P,K,b]),ve=s.useCallback(he=>{if(I.length>1){const we=I.length,Z=(P+he+we)%we,Q=I[Z],ae=Math.min(X,Q.items.length-1);D(Z),F(Q.items),ee(ae),M(Q.entry);return}ee(we=>(we+he+A.length)%A.length)},[I,P,X,A.length]),de=I.length>1||A.length>1;return s.useEffect(()=>{if(!E||typeof document>"u")return;const he=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=he}},[E]),s.useEffect(()=>{!n||o||i||g(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:oe}}),a.jsx(Qf,{mediaList:z}),a.jsx("div",{ref:k,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${N}, ${U})`,rowGap:0,columnGap:W,width:O.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:O.scalingValue(u??0,n)},children:te.map((he,we)=>{const Z=Xs(he.gallery),Q=Ys(Z),ae=Q.filter(se=>se.lightboxMedia).map(se=>se.lightboxMedia),$e=Math.floor(we/N)===Math.ceil(te.length/N)-1,ke=Me&&we>=w?`${Y+(we-w)}`:void 0,xe=Q[0],V=xe!=null&&xe.lightboxMedia?ae.findIndex(se=>se.url===xe.lightboxMedia.url):-1,pe=a.jsx("div",{className:`${d}-item-image-wrapper`,style:$,children:Q.length>0&&a.jsx(ry,{media:xe.displayMedia,gridIndex:we,className:`${d}-item-${po(xe.displayMedia)?"video":"image"}`.trim(),style:T,onMediaClick:G&&V>=0?se=>H(we,V,Ad(se.currentTarget,b?"cover":"contain")):void 0})});return a.jsx("div",{className:`${d}-item`,children:a.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,$e?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:U,...ke?{gridColumn:ke}:{}},children:[a.jsx("div",{className:`${d}-item-title-row`,children:a.jsx("div",{style:{height:0,width:B}})}),a.jsx("a",{className:`${d}-item-image-link`,children:pe}),a.jsx("div",{className:`${d}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:B}})})]})},we)})}),E&&typeof document<"u"&&(()=>{const he=(l?document.getElementById(l):null)??document.body;return zn.createPortal(a.jsx("div",{style:ie,"data-selection":"none",children:a.jsx(sy,{prefix:d,items:A,index:X,entry:re,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:de,lightboxEntries:I,entryIdx:P,layoutId:r,sourceRect:K,resolveCloseSourceRect:fe,onClose:Te,onPrev:()=>ve(-1),onNext:()=>ve(1)})}),he)})()]})}const cy=`import { CommonComponentProps } from '../props';
7506
7510
  import { scalingValue, useScopedStyles } from '../utils/index';
7507
7511
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
7508
7512
  import { createPortal } from 'react-dom';
@@ -9845,11 +9849,11 @@ export function Hive({
9845
9849
  </>
9846
9850
  );
9847
9851
  }
9848
- `,ay="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>'),pi={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 sy(e){const t={};return t[ot(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSettings")]={...pi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSize")]={...pi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ot(e,"lineHeight")]={...pi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ot(e,"letterSpacing")]={...pi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ot(e,"wordSpacing")]={...pi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ot(e,"textAlign")]={...pi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ot(e,"textAppearance")]={...pi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Qi=ii.filter(e=>e!=="count"),ly=Qi.reduce((e,t)=>({...e,...sy(t)}),{}),cy=Qi.reduce((e,t)=>({...e,[ot(t,"fontFamily")]:"Arial",[ot(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ot(t,"letterSpacing")]:0,[ot(t,"wordSpacing")]:0,[ot(t,"textAlign")]:"left",[ot(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ta(e){return Qi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ot(n,"fontSize")]=i),o!==void 0&&(t[ot(n,"lineHeight")]=o),t},{})}const dy={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Qi.map(e=>[Os[e],Bs(e)]))},uy={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},py=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...uy,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),my={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:py},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"}},...ly},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:ay,closeIconColor:"#000000",closeIconHoverColor:"#999999",...cy},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,...Ta({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,...Ta({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,...Ta({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:[dy]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},gy={element:oy,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:[...Qi.map(e=>({path:`${ot(e,"fontFamily")}`}))]},fontRelations:{...Qi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ot(t,"fontFamily")}`}),{})},schema:my,sourceCode:ry};function hy(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 fy({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function Ia(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function yy(e){return String(e??"").trim().length>0}function Al(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 Fl(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 _l(e,t,n,i,o,r,l){const d=W.scalingValue(r,l),c=W.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!p||i?d:c}}function vy(e,t,n){const i=W.scalingValue(t,n),o=W.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Nl=10,Wl=10,ho={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function xy(e,t,n){return Math.max(t,Math.min(n,e))}function Ra(e,t,n){return e+(t-e)*n}function by(e,t,n,i){if(!t)return{x:0,y:0};const o=t.offsetWidth,l=t.offsetHeight/2;if(e==="cursor"&&n){const d=t.getBoundingClientRect();return{x:n.clientX-d.left+Nl,y:n.clientY-d.top+Nl}}switch(e){case"left":return{x:Wl+i/2,y:l};case"center":return{x:o/2,y:l};case"right":return{x:o-Wl-i/2,y:l};default:return{x:o/2,y:l}}}function wy(e,t){const n=s.useRef(null),i=s.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=s.useRef(null),r=s.useCallback(()=>{const m=n.current,h=i.current;m&&(m.style.transform=`translate3d(${h.x}px, ${h.y}px, 0) translate(-50%, -50%) rotate(${h.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),d=s.useCallback(()=>{const m=i.current;t?(m.x=Ra(m.x,m.targetX,ho.positionEase),m.y=Ra(m.y,m.targetY,ho.positionEase),m.rotation=Ra(m.rotation,m.targetRotation,ho.rotationEase)):(m.x=m.targetX,m.y=m.targetY,m.rotation=m.targetRotation),r();const h=Math.abs(m.x-m.targetX)<.4&&Math.abs(m.y-m.targetY)<.4,f=Math.abs(m.rotation-m.targetRotation)<.08;!h||!f?o.current=requestAnimationFrame(d):o.current=null},[r,t]),c=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(d))},[d]),u=s.useCallback((m,h)=>{const f=i.current;f.targetX=m,f.targetY=h,f.targetRotation=0,f.x=m,f.y=h,f.rotation=0,f.lastX=m,f.hasLastX=!0,r(),t&&c()},[r,t,c]),p=s.useCallback((m,h)=>{if(!e)return;const f=i.current;if(t&&f.hasLastX){const x=m-f.lastX;f.targetRotation=xy(x*ho.rotationFactor,-20,ho.maxRotation)}else f.targetRotation=0;if(f.lastX=m,f.hasLastX=!0,f.targetX=m,f.targetY=h,t){c();return}f.x=m,f.y=h,f.rotation=f.targetRotation,r()},[e,r,t,c]),v=s.useCallback(m=>{l(),i.current.hasLastX=!1,m==null||m()},[l]),w=s.useCallback(()=>{l(),i.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},n.current&&(n.current.style.transform="")},[l]);return s.useEffect(()=>(e||w(),l),[e,w,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:v,reset:w}}function Sy(e){return`
9852
+ `,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>'),pi={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[ot(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSettings")]={...pi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSize")]={...pi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ot(e,"lineHeight")]={...pi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ot(e,"letterSpacing")]={...pi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ot(e,"wordSpacing")]={...pi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ot(e,"textAlign")]={...pi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ot(e,"textAppearance")]={...pi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const eo=ii.filter(e=>e!=="count"),py=eo.reduce((e,t)=>({...e,...uy(t)}),{}),my=eo.reduce((e,t)=>({...e,[ot(t,"fontFamily")]:"Arial",[ot(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ot(t,"letterSpacing")]:0,[ot(t,"wordSpacing")]:0,[ot(t,"textAlign")]:"left",[ot(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function La(e){return eo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ot(n,"fontSize")]=i),o!==void 0&&(t[ot(n,"lineHeight")]=o),t},{})}const gy={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(eo.map(e=>[Vs[e],Gs(e)]))},hy={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},fy=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...hy,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),yy={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:fy},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"}},...py},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:dy,closeIconColor:"#000000",closeIconHoverColor:"#999999",...my},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,...La({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,...La({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,...La({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:[gy]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},xy={element:ly,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:[...eo.map(e=>({path:`${ot(e,"fontFamily")}`}))]},fontRelations:{...eo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ot(t,"fontFamily")}`}),{})},schema:yy,sourceCode:cy};function vy(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 by({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function Pa(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function wy(e){return String(e??"").trim().length>0}function Wl(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 Hl(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 Dl(e,t,n,i,o,r,l){const d=O.scalingValue(r,l),c=O.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!p||i?d:c}}function Sy(e,t,n){const i=O.scalingValue(t,n),o=O.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Ol=10,Bl=10,fo={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function Cy(e,t,n){return Math.max(t,Math.min(n,e))}function Ea(e,t,n){return e+(t-e)*n}function $y(e,t,n,i){if(!t)return{x:0,y:0};const o=t.offsetWidth,l=t.offsetHeight/2;if(e==="cursor"&&n){const d=t.getBoundingClientRect();return{x:n.clientX-d.left+Ol,y:n.clientY-d.top+Ol}}switch(e){case"left":return{x:Bl+i/2,y:l};case"center":return{x:o/2,y:l};case"right":return{x:o-Bl-i/2,y:l};default:return{x:o/2,y:l}}}function Ty(e,t){const n=s.useRef(null),i=s.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=s.useRef(null),r=s.useCallback(()=>{const m=n.current,h=i.current;m&&(m.style.transform=`translate3d(${h.x}px, ${h.y}px, 0) translate(-50%, -50%) rotate(${h.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),d=s.useCallback(()=>{const m=i.current;t?(m.x=Ea(m.x,m.targetX,fo.positionEase),m.y=Ea(m.y,m.targetY,fo.positionEase),m.rotation=Ea(m.rotation,m.targetRotation,fo.rotationEase)):(m.x=m.targetX,m.y=m.targetY,m.rotation=m.targetRotation),r();const h=Math.abs(m.x-m.targetX)<.4&&Math.abs(m.y-m.targetY)<.4,f=Math.abs(m.rotation-m.targetRotation)<.08;!h||!f?o.current=requestAnimationFrame(d):o.current=null},[r,t]),c=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(d))},[d]),u=s.useCallback((m,h)=>{const f=i.current;f.targetX=m,f.targetY=h,f.targetRotation=0,f.x=m,f.y=h,f.rotation=0,f.lastX=m,f.hasLastX=!0,r(),t&&c()},[r,t,c]),p=s.useCallback((m,h)=>{if(!e)return;const f=i.current;if(t&&f.hasLastX){const v=m-f.lastX;f.targetRotation=Cy(v*fo.rotationFactor,-20,fo.maxRotation)}else f.targetRotation=0;if(f.lastX=m,f.hasLastX=!0,f.targetX=m,f.targetY=h,t){c();return}f.x=m,f.y=h,f.rotation=f.targetRotation,r()},[e,r,t,c]),x=s.useCallback(m=>{l(),i.current.hasLastX=!1,m==null||m()},[l]),b=s.useCallback(()=>{l(),i.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},n.current&&(n.current.style.transform="")},[l]);return s.useEffect(()=>(e||b(),l),[e,b,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:x,reset:b}}function Iy(e){return`
9849
9853
  .${e}-wrapper {
9850
9854
  display: grid;
9851
9855
  align-items: start;
9852
- min-height: ${Ia(48)};
9856
+ min-height: ${Pa(48)};
9853
9857
  position: relative;
9854
9858
  overflow: visible;
9855
9859
  box-sizing: border-box;
@@ -9978,7 +9982,7 @@ a.${e}-list-item {
9978
9982
  flex-shrink: 0;
9979
9983
  overflow: visible;
9980
9984
  box-sizing: border-box;
9981
- min-width: ${Ia(50)};
9985
+ min-width: ${Pa(50)};
9982
9986
  position: relative;
9983
9987
  display: flex;
9984
9988
  align-items: flex-start;
@@ -9986,7 +9990,7 @@ a.${e}-list-item {
9986
9990
 
9987
9991
  .${e}-list-col-last {
9988
9992
  flex: 1 1 auto;
9989
- min-width: ${Ia(50)};
9993
+ min-width: ${Pa(50)};
9990
9994
  }
9991
9995
 
9992
9996
  .${e}-list-col-title {
@@ -10221,7 +10225,7 @@ a.${e}-list-item {
10221
10225
  overflow-wrap: anywhere;
10222
10226
  word-break: break-word;
10223
10227
  }
10224
- `}const oi=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Vs=["AColumn","BColumn","CColumn","DColumn","EColumn"],Hn="cutLabel",Wo=[...Vs,Hn],ra=["A","B","C","D","E"];function kd(e){return`${e}ColumnVerticalAlign`}const os=["Top","Center","Bottom"];function Gs(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return ra.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Cy(e){const t=Gs(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function $y(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return ra.includes(n)?n:null}function Ad(e,t,n){const i=$y(e);return i?i===t?!1:Cy(n[kd(i)]):!0}function Ho(e){const t=Gs(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return ra.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Ty(e,t,n){if(Fd(e,t,n))return Ho(e);const i=Ho(e);return i.kind==="baseline"?{kind:"top"}:i}function Iy(e){const t=Ho(e);return t.kind==="baseline"?{kind:"top"}:t}function Fd(e,t,n){return Ad(e,n,t)?Ho(e).kind==="baseline":!1}function Ry(e){const t={};let n=!1;for(const i of ra){const o=kd(i),r=e[o];if(e.type==="b"){const l=String(r??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}Ad(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function Ly(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Py(e){const t=Ho(e).kind;return t==="baseline"?"center":t}function Ey(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Hl(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function My(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(),r=o-i;return n.remove(),r}function La(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=My(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const d=r.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 ky(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const r=o.querySelector(`.${n}`);r&&(r.style.minHeight=`${i}px`,r.style.height=`${i}px`)}),i)}function Ay(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Fy={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Pt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const _y={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Ny(e){return[Pt(e,"textFontFamily"),Pt(e,"textFontSettings"),{type:"row",items:[Pt(e,"textFontSize"),Pt(e,"textLineHeight"),Pt(e,"textLetterSpacing"),Pt(e,"textWordSpacing")]},Pt(e,"textTextAlign"),Pt(e,"textTextAppearance"),`${e}VerticalAlign`]}function Wy(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Wo.map(e=>[_y[e],Ny(e)]))}}function Hr(e,t){const n=i=>{const o=Pt(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===Hn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Dl(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 an(Ut(n,t))}function Ol(e,t,n,i){const o=Hr(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function Bl(e,t,n,i){const o=Hr(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:W.scalingValue((r-l)/2,i)}}const vn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],eo=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],to=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],no=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Hy={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Dy=["hover","focus","filled","success","error"],zl=.004,Di=.004,Pa=Di,Xs=50,Do=1440,Oo=Xs/Do;function _d(e){const t=typeof e=="number"&&e>0?e:Do;return Xs/t}function Oy(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 Do}const Nd={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Ro(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function By(e,t=1){const n=t/e;return Object.fromEntries(vn.map(i=>[i,n]))}function zy(){return Object.fromEntries([...eo.map(e=>[e,0]),...to.map(e=>[e,0])])}function jy(){return Object.fromEntries(no.map(e=>[e,0]))}function pr(e){return Object.fromEntries(vn.map(t=>[t,typeof e[t]=="number"?e[t]:Nd[t]]))}function Wd(e,t,n){const i=e-Oo,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const r=i/o;return{paddingLeft:t*r,paddingRight:n*r}}function Rr(e,t,n){const i=qs(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((r,l)=>r+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Vy(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=eo[o],l=to[o],d=typeof n[r]=="number"?n[r]:0,c=typeof n[l]=="number"?n[l]:0,u=Wd(t[o]??0,d,c);u.paddingLeft!==d&&(i[r]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function qs(e,t,n){if(e<=0)return[];const i=vn.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)+Oo;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]-Oo;if(p<=0)continue;const v=Math.min(c,p);d[u]-=v,c-=v}return[...d,i[e-1]]}function Gy(e,t,n){if(e<=1)return{};const i=qs(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=vn[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function jl(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...oi]}function Xy(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function qy(e,t,n,i){const o=Math.min(i,e.length,vn.length),r={};for(let l=0;l<o;l+=1){const d=e[l],c=t.indexOf(d);if(c===-1)continue;const u=vn[c],p=eo[c],v=to[c],w=no[c],m=vn[l],h=eo[l],f=to[l],x=no[l],C=n[u],y=n[p],S=n[v],z=n[w];typeof C=="number"&&(r[m]=C),typeof y=="number"&&(r[h]=y),typeof S=="number"&&(r[f]=S),typeof z=="number"&&(r[x]=z)}return r}function Hd(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 Yy(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Ro(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...By(n,o),...zy()};if(r)for(const d of no)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,jy());return Hd(e,l)?l:e}function Uy(e,t,n){const i=Ry(e);i&&(e={...e,...i});const o=_d(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,d=Ro(e),c=Ro(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:oi.length,v=S=>{if(u)return S;const z=pr({...t,...S}),N=Ro(S),Y=Rr(p,N,z),B=Vy(p,Y,{...t,...S});return Object.keys(B).length===0?S:{...S,...B}};if(typeof r=="number"&&r!==l)return e;const w=jl(e),m=jl(t);if(!Xy(w,m))return v({...e,...qy(w,m,t,p)});if(d<c&&typeof p=="number"&&!u){const S=pr({...t,...e});return v({...e,...Gy(p,d,S)})}if(u){const S=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,z=Math.max(0,(d-o)/2);return S>z?{...e,textPaddingLR:z}:e}const h=pr({...t,...e}),f=Rr(p,c,pr(t)),C=Rr(p,d,h).some((S,z)=>S<(f[z]??S)),y=vn.some(S=>{const z=e[S],N=t[S];return typeof z=="number"&&typeof N=="number"&&z!==N});return C||y?v(e):e}function Ky(e,t,n,i){const o=t.slice(0,e).reduce((l,d)=>l+d,0),r=n.slice(e+1,t.length-1).reduce((l,d)=>l+d,0);return Math.max(Oo,i-o-r-Oo)}function Zy(e,t){return Math.random()*(t-e)+e}function Jy(e){return Object.fromEntries(vn.map(t=>[t,typeof e[t]=="number"?e[t]:Nd[t]]))}function Ea(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Qy(e,t,n,i,o,r){return e.slice(0,t).map((l,d)=>{const c=eo[d],u=to[d],p=no[d];return{key:l,textPrefix:Fy[l],widthKey:vn[d],width:n[vn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[u],paddingBottom:r[p]}})}function ev({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,onUpdateSettings:d}){const{prefix:c}=W.useScopedStyles(),u=!!o,{columns:p,type:v,wrapperWidth:w,entriesCount:m,cellMinHeight:h,dividerWidth:f,showVisibility:x,cut:C,showCut:y,cutCellMinHeight:S,cutLabel:z,imageSize:N,imageOnHover:Y,imagePosition:B="cursor",imageInterpolation:T="on",entryHoverEffect:H,entryHoverShowOption:$,rowPaddingTop:I,rowPaddingBottom:P,rowPaddingTopB:M,columnsOrder:g,textPaddingLR:D,textColor:A,backgroundColor:X,dividerColor:ie,textHoverColor:L,backgroundHoverColor:_,dividerHoverColor:V}=e,[se,re]=s.useState(void 0),[k,le]=s.useState(null),G=s.useRef(null),b=Y==="on"&&(!n||i),E=B==="cursor",j=E&&T==="on",{anchorRef:me,onShow:K,onCursorMove:te,exit:O}=wy(!!(b&&k!==null),j),J=(C??0)>0,ne=v==="b",Pe=s.useRef(null),be=s.useRef(null),[Re,ue]=s.useState(null),[fe,$e]=s.useState(Do),Q=_d(fe),Z=Math.max(0,((w??0)-Q)/2),ae=Math.min(D??0,Z),xe=Math.max(ae,Di),ke=((w??0)+Q)/2;s.useLayoutEffect(()=>{if(!n){$e(Do);return}const Ae=()=>{$e(Oy(Pe.current))};Ae();const Ge=Pe.current;if(!Ge)return;const rt=new ResizeObserver(Ae);rt.observe(Ge);let ht=Ge;for(;ht&&!ht.style.getPropertyValue("--cntrl-article-width");)ht=ht.parentElement;return ht&&rt.observe(ht),()=>rt.disconnect()},[n,l]),s.useEffect(()=>{re(void 0)},[C,y,t,m]),s.useEffect(()=>{n&&!i&&re(void 0)},[n,i]);const Ce=W.buildColorVars(c,{textColor:A,backgroundColor:X,dividerColor:ie,textHoverColor:L,backgroundHoverColor:_,dividerHoverColor:V},Hy,Dy),q=r&&r!=="default"?`${c}-state-${r}`:"",ce=`${!n||i?H==="default"?`${c}-entry-hover-default`:H==="blinds"?`${c}-entry-hover-blinds`:H==="reveal"?`${c}-entry-hover-reveal`:"":""} ${q}`.trim(),U=H==="reveal"&&(!n||i),de=(x==null?void 0:x[0])??!1,He=(x==null?void 0:x[1])??!1,he=s.useRef(e),ee=s.useRef(l);s.useEffect(()=>{if(!d||!n){he.current=e,ee.current=l;return}if(ee.current!==l){he.current=e,ee.current=l;return}const Ae=he.current;if(!(Ae!==e))return;if(typeof Ae.columns=="number"&&typeof e.columns=="number"&&Ae.columns!==e.columns){he.current=e;return}const rt=Uy(e,Ae,{designWidth:fe});he.current=e,Hd(e,rt)&&d(rt)},[e,d,n,l,fe]);const Je=s.useMemo(()=>Jy(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),Ne=s.useMemo(()=>Ea(e,eo),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),ct=s.useMemo(()=>Ea(e,to),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Ke=s.useMemo(()=>Ea(e,no),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),ut=s.useMemo(()=>Array.isArray(g)&&g.length>0?g:[...oi],[g]),lt=s.useMemo(()=>Qy(ut,p,Je,Ne,ct,Ke),[ut,p,Je,Ne,ct,Ke]),Ye=Ro(e),Le=s.useMemo(()=>vn.slice(0,p).map(Ae=>Je[Ae]),[p,Je]),We=s.useMemo(()=>qs(p,Ye,Je),[p,Ye,Je]),Be=s.useMemo(()=>Rr(p,Ye,Je),[p,Ye,Je]),Ue=s.useMemo(()=>lt.map((Ae,Ge)=>Wd(Be[Ge]??0,Ae.paddingLeft,Ae.paddingRight)),[lt,Be]),ge=s.useMemo(()=>{const Ae=m===0?1/0:m;return(t??[]).slice(0,Ae).map((rt,ht)=>({id:ht,cells:Object.fromEntries(oi.map(yt=>[yt,rt[yt]??""])),image:rt.image,link:rt.link}))},[t,m]),ve=J?se??C:ge.length,_e=s.useMemo(()=>J?ge.slice(0,ve):ge,[ge,J,ve]),Ze=J&&ve<ge.length,we=_e.length>1||Ze,Te=[de?`${c}-divider-top`:"",He||we?`${c}-divider-bottom`:""].filter(Boolean).join(" "),Xe=!n||i,ze=()=>{if(!Xe)return;const Ae=se??C;if(!y){re(ge.length);return}re(Math.min(Ae+y,ge.length))},Ie=Ae=>W.scalingValue(Ae,n??!1),Ve=ne?M??0:I??0,De=P??0,tt=h??0,nt=Math.max(De,Pa),st=_l(0,_e.length,de,He,Ze,f??0,n??!1).borderTopWidth,St=ne?"rowPaddingTopB":"rowPaddingTop",Bt=lt[0],zt=lt[lt.length-1],ft=Ue[0],wt=Ue[Ue.length-1],jt=Bt&&ft?Math.max(ft.paddingLeft,Di):0,At=zt&&wt?Math.max(wt.paddingRight,Di):0,xt=Ye,Ft=(Ae,Ge)=>by(B,Pe.current,E?Ae:null,Ge),Nt=(Ae,Ge)=>{if(!b)return;const rt=Ae.image;if(!(rt!=null&&rt.url)){O(()=>le(null));return}const ht=(N==null?void 0:N.min)??80,yt=(N==null?void 0:N.max)??320,Lt=(k==null?void 0:k.rowId)===Ae.id,mt=Lt?k.widthPx:Zy(ht,yt),{x:Vt,y:kt}=Ft(Ge,mt);if(Lt&&E){te(Vt,kt);return}le({rowId:Ae.id,url:rt.url,objectFit:"contain",isVideo:hy(rt),widthPx:mt}),G.current={x:Vt,y:kt}},Kt=Ae=>{if(!b||!k||!E)return;const{x:Ge,y:rt}=Ft(Ae,k.widthPx);te(Ge,rt)},Jt=()=>{k&&O(()=>le(null))},Tt=Ae=>{U&&Al(Ae,c),!(!b||!k)&&O(()=>le(null))},Wt=Ae=>{U&&Fl(Ae,c)};s.useLayoutEffect(()=>{if(!k||!G.current)return;const{x:Ae,y:Ge}=G.current;G.current=null,K(Ae,Ge)},[k==null?void 0:k.rowId,k==null?void 0:k.url,K]),s.useLayoutEffect(()=>{if(!u||ne){ue(null);return}const Ae=be.current,Ge=Ae==null?void 0:Ae.parentElement;if(!Ae||!Ge){ue(null);return}const rt=()=>{const yt=Ae.querySelector("[data-list-row]");if(!yt){ue(null);return}const Lt=Ge.getBoundingClientRect(),mt=yt.getBoundingClientRect();ue(mt.top-Lt.top+mt.height/2)};rt();const ht=new ResizeObserver(rt);return ht.observe(Ae),ht.observe(Ge),()=>ht.disconnect()},[u,ne,_e,Ve,De,tt,t,e,lt,Be,fe,f,de,He,Ze]);const rn=s.useMemo(()=>!ne&&Vs.some(Ae=>{const Ge=Ae.charAt(0),rt=e[`${Ae}VerticalAlign`];return Fd(rt,e,Ge)}),[ne,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var Vt;const Ae=Pe.current;if(!Ae)return;const Ge=()=>{Ae.querySelectorAll("[data-list-col]").forEach(kt=>{kt.style.transform="";const Mt=kt.querySelector(`.${c}-list-col`);Mt&&(Mt.style.minHeight="",Mt.style.height="");const Xt=kt.querySelector(`.${c}-list-col-title`);Xt&&(Xt.style.transform="")})};if(ne||!rn){Ge();return}const rt=()=>{const kt=Array.from(Ae.querySelectorAll("[data-list-row]")),Mt=`${c}-list-col`,Xt=`${c}-baseline-probe`;kt.forEach(qt=>{qt.querySelectorAll("[data-list-col]").forEach(Ht=>{Ht.style.transform="";const Dt=Ht.querySelector(`.${Mt}`);Dt&&(Dt.style.minHeight="",Dt.style.height="");const _t=Ht.querySelector(`.${c}-list-col-title`);_t&&(_t.style.transform="")})}),kt.forEach(qt=>{const Ht=Array.from(qt.querySelectorAll("[data-list-col]"));ky(qt,Ht,Mt)}),Ae.offsetHeight,kt.forEach(qt=>{const Ht=Array.from(qt.querySelectorAll("[data-list-col]")),Dt=qt.getBoundingClientRect().top,_t=new Map,Ct=Ht.map(Fe=>{const Oe=Fe.querySelector(`.${c}-list-col-title`),at={el:Fe,titleEl:Oe,letter:Fe.getAttribute("data-col-letter")??"",kind:Fe.getAttribute("data-valign")??"top",anchor:Fe.getAttribute("data-valign-anchor")};return _t.set(at.letter,at),at}),F=new Map,Ee=(Fe,Oe)=>{const at=F.get(Fe.letter);if(at!==void 0)return at;const Et=Fe.anchor?_t.get(Fe.anchor):void 0;if(Fe.kind!=="baseline"||!Et||Oe.has(Fe.letter)){const nn=La(Fe,Dt,Mt,Xt);return F.set(Fe.letter,nn),nn}Oe.add(Fe.letter);const it=Ee(Et,Oe);Oe.delete(Fe.letter);const vt=La(Fe,Dt,Mt,Xt),Ot=it-vt;Ay(Fe.titleEl,Ot);const It=La(Fe,Dt,Mt,Xt);return F.set(Fe.letter,It),It};Ct.forEach(Fe=>Ee(Fe,new Set))})};let ht=null;const yt=()=>{ht===null&&(ht=requestAnimationFrame(()=>{ht=null,rt()}))};rt();const Lt=new ResizeObserver(()=>yt());Lt.observe(Ae);let mt=!1;return typeof document<"u"&&((Vt=document.fonts)!=null&&Vt.ready)&&document.fonts.ready.then(()=>{mt||yt()}),()=>{mt=!0,ht!==null&&(cancelAnimationFrame(ht),ht=null),Lt.disconnect(),Ge()}},[rn,ne,e,t,fe,_e,Be]);const gt=s.useMemo(()=>Sy(c),[c]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:gt}}),a.jsx("div",{style:Ce,children:a.jsxs("div",{ref:Pe,className:`${c}-wrapper ${ce}${Te?` ${Te}`:""}${ne?` ${c}-type-b`:""}`.trim(),style:{width:W.scalingValue(w??0,n)},onMouseMove:b?Kt:void 0,onMouseLeave:b?Jt:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[_e.map((Ae,Ge)=>{var Lt;const rt=(((Lt=Ae.link)==null?void 0:Lt.length)??0)>0,ht=rt&&(!n||i)?"a":"div",yt=_l(Ge,_e.length,de,He,Ze,f??0,n??!1);return a.jsxs(ht,{ref:Ge===0?mt=>{be.current=mt}:void 0,className:`${c}-list-item${rt||$==="always"?` ${c}-list-item-has-link`:""}${Ze&&Ge===_e.length-1?` ${c}-list-item-before-cut`:""}`,...rt?{href:Ae.link,target:"_blank"}:{},style:yt,onMouseEnter:mt=>{U&&(rt||$==="always")&&Al(mt,c),b&&Nt(Ae,mt)},onMouseLeave:mt=>{U&&(rt||$==="always")&&Fl(mt,c)},children:[Ve>0&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ie(Ve)}}),a.jsxs("div",{className:`${c}-list-cols-row${ne?"":` ${c}-list-cols-row-h`}${u&&Ge===0&&ne?` ${c}-list-cols-row-controls`:""}`,...ne?{}:{"data-list-row":""},style:ne?void 0:{minHeight:Ie(tt)},children:[lt.map((mt,Vt)=>{const kt=Vt===lt.length-1,Mt=Ue[Vt],Xt=mt.paddingBottom,qt=yy(Ae.cells[mt.key]),Ht=ne&&qt&&Xt>0,Dt=ne?{minHeight:Ie(tt)}:{width:Ie(Be[Vt])},_t=ne?{paddingLeft:Ie(ae),paddingRight:Ie(ae)}:{paddingLeft:Ie(Mt.paddingLeft),paddingRight:Ie(Mt.paddingRight)},Ct=mt.textPrefix.charAt(0),F=ne?Iy(e[`${mt.textPrefix}VerticalAlign`]):Ty(e[`${mt.textPrefix}VerticalAlign`],e,Ct),Ee=ne&&qt&&u&&Ge===0;return ne&&!qt?null:a.jsxs("div",{className:ne?`${c}-list-col-wrap`:void 0,...ne?{}:{"data-list-col":"","data-col-letter":Ct,"data-valign":F.kind,...F.kind==="baseline"?{"data-valign-anchor":F.anchorLetter}:{}},children:[a.jsx("div",{className:`${c}-list-col${kt?` ${c}-list-col-last`:""}`,style:{..._t,...Dt,...ne?{justifyContent:Hl(F.kind)}:{}},"data-test":mt.width,children:a.jsx("span",{className:Ol(e,mt.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...Dl(Hr(e,mt.textPrefix),n),...Bl(e,mt.textPrefix,c,n),...ne?{}:Ly(F.kind)},children:Ae.cells[mt.key]??null})}),Ht&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ie(Xt)}}),Ee&&a.jsx("div",{"data-controls":mt.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:Ie(Math.max(Xt,Pa))}})]},mt.key)}),u&&Ge===0&&ne&&a.jsxs(a.Fragment,{children:[a.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(ke),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:0,width:Ie(xe),height:"100%"}}),a.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(ke),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:Ie(Math.max(xe,Ye-xe)),width:Ie(xe),height:"100%"}})]})]}),!ne&&De>0&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ie(De)}}),u&&Ge===0&&!ne&&a.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:Ie(nt)}})]},Ae.id)}),u&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":St,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":ne?"center":"left-y",className:`${c}-control-anchor`,style:{top:st,left:0,width:"100%",height:Ie(Math.max(Ve,Pa))}})},"row-padding-handles"),u&&!ne&&Bt&&zt&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Bt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Be[0]-((ft==null?void 0:ft.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Re??void 0,className:`${c}-control-anchor`,style:{top:0,left:0,width:Ie(jt),height:"100%"}}),a.jsx("div",{"data-controls":zt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Be[lt.length-1]-((wt==null?void 0:wt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Re??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ie(xt-At),width:Ie(At),height:"100%"}})]},"column-edge-padding-handles"),u&&!ne&&lt.slice(0,-1).map((Ae,Ge)=>{const rt=lt[Ge+1],ht=We.slice(0,Ge+1).reduce((kt,Mt)=>kt+Mt,0),yt=Ue[Ge],Lt=Ue[Ge+1],mt=Math.max(yt.paddingRight,Di),Vt=Math.max(Lt.paddingLeft,Di);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Ae.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Be[Ge]-yt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Re??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ie(ht-mt),width:Ie(mt),height:"100%"}}),a.jsx("div",{"data-controls":rt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Be[Ge+1]-Lt.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Re??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ie(ht),width:Ie(Vt),height:"100%"}})]},`${Ae.paddingRightKey}-padding`)}),u&&!ne&&lt.slice(0,-1).map((Ae,Ge)=>{const rt=Ky(Ge,We,Le,Ye),yt=We.slice(0,Ge+1).reduce((Lt,mt)=>Lt+mt,0)-zl/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Ae.widthKey,"data-controls-axis":"x","data-controls-min":String(Xs),"data-controls-max-fraction":String(rt),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ie(yt),width:Ie(zl),height:"calc(100%)",pointerEvents:"auto"}})},`${Ae.widthKey}-junction`)})]}),Ze&&(()=>{const Ae=Hr(e,Hn),Ge=Py(e.cutLabelVerticalAlign),rt=Ae.textTextAlign==="justify"||ne;return a.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ie(S??0),cursor:Xe?"pointer":"default",...vy(He,f??0,n??!1)},onClick:Xe?ze:void 0,onMouseEnter:U||b?Tt:void 0,onMouseLeave:U?Wt:void 0,children:a.jsx("div",{className:`${c}-list-cols-row`,style:{...ne?{paddingLeft:Ie(ae),paddingRight:Ie(ae)}:{},justifyContent:Ey(Ae.textTextAlign),alignItems:Hl(Ge)},children:a.jsx("span",{className:Ol(e,Hn,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...Dl(Ae,n),...Bl(e,Hn,c,n),...rt?{width:"100%"}:{}},children:z})})})})(),b&&k&&(()=>{const Ae=`${k.widthPx}px`,Ge={width:Ae,height:"auto",maxHeight:Ae,objectFit:"contain"};return a.jsx("div",{ref:me,className:`${c}-hover-media-anchor`,children:a.jsx(fy,{media:k,className:k.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:Ge},`${k.rowId}-${k.url}`)})})()]})})]})}const tv=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10228
+ `}const oi=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],qs=["AColumn","BColumn","CColumn","DColumn","EColumn"],Hn="cutLabel",Do=[...qs,Hn],la=["A","B","C","D","E"];function Wd(e){return`${e}ColumnVerticalAlign`}const ss=["Top","Center","Bottom"];function Us(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return la.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Ry(e){const t=Us(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Ly(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return la.includes(n)?n:null}function Hd(e,t,n){const i=Ly(e);return i?i===t?!1:Ry(n[Wd(i)]):!0}function Oo(e){const t=Us(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return la.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Py(e,t,n){if(Dd(e,t,n))return Oo(e);const i=Oo(e);return i.kind==="baseline"?{kind:"top"}:i}function Ey(e){const t=Oo(e);return t.kind==="baseline"?{kind:"top"}:t}function Dd(e,t,n){return Hd(e,n,t)?Oo(e).kind==="baseline":!1}function My(e){const t={};let n=!1;for(const i of la){const o=Wd(i),r=e[o];if(e.type==="b"){const l=String(r??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}Hd(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function ky(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Ay(e){const t=Oo(e).kind;return t==="baseline"?"center":t}function Fy(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function zl(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function _y(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(),r=o-i;return n.remove(),r}function Ma(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=_y(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const d=r.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 Ny(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const r=o.querySelector(`.${n}`);r&&(r.style.minHeight=`${i}px`,r.style.height=`${i}px`)}),i)}function Wy(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Hy={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Pt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Dy={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Oy(e){return[Pt(e,"textFontFamily"),Pt(e,"textFontSettings"),{type:"row",items:[Pt(e,"textFontSize"),Pt(e,"textLineHeight"),Pt(e,"textLetterSpacing"),Pt(e,"textWordSpacing")]},Pt(e,"textTextAlign"),Pt(e,"textTextAppearance"),`${e}VerticalAlign`]}function By(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Do.map(e=>[Dy[e],Oy(e)]))}}function Br(e,t){const n=i=>{const o=Pt(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===Hn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function jl(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 an(Ut(n,t))}function Vl(e,t,n,i){const o=Br(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function Gl(e,t,n,i){const o=Br(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:O.scalingValue((r-l)/2,i)}}const xn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],to=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],no=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],io=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],zy={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},jy=["hover","focus","filled","success","error"],Xl=.004,Di=.004,ka=Di,Ks=50,Bo=1440,zo=Ks/Bo;function Od(e){const t=typeof e=="number"&&e>0?e:Bo;return Ks/t}function Vy(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 Bo}const Bd={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Lo(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Gy(e,t=1){const n=t/e;return Object.fromEntries(xn.map(i=>[i,n]))}function Xy(){return Object.fromEntries([...to.map(e=>[e,0]),...no.map(e=>[e,0])])}function Yy(){return Object.fromEntries(io.map(e=>[e,0]))}function gr(e){return Object.fromEntries(xn.map(t=>[t,typeof e[t]=="number"?e[t]:Bd[t]]))}function zd(e,t,n){const i=e-zo,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const r=i/o;return{paddingLeft:t*r,paddingRight:n*r}}function Er(e,t,n){const i=Zs(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((r,l)=>r+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function qy(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=to[o],l=no[o],d=typeof n[r]=="number"?n[r]:0,c=typeof n[l]=="number"?n[l]:0,u=zd(t[o]??0,d,c);u.paddingLeft!==d&&(i[r]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function Zs(e,t,n){if(e<=0)return[];const i=xn.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)+zo;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]-zo;if(p<=0)continue;const x=Math.min(c,p);d[u]-=x,c-=x}return[...d,i[e-1]]}function Uy(e,t,n){if(e<=1)return{};const i=Zs(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=xn[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function Yl(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...oi]}function Ky(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Zy(e,t,n,i){const o=Math.min(i,e.length,xn.length),r={};for(let l=0;l<o;l+=1){const d=e[l],c=t.indexOf(d);if(c===-1)continue;const u=xn[c],p=to[c],x=no[c],b=io[c],m=xn[l],h=to[l],f=no[l],v=io[l],C=n[u],y=n[p],S=n[x],j=n[b];typeof C=="number"&&(r[m]=C),typeof y=="number"&&(r[h]=y),typeof S=="number"&&(r[f]=S),typeof j=="number"&&(r[v]=j)}return r}function jd(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 Jy(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Lo(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...Gy(n,o),...Xy()};if(r)for(const d of io)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,Yy());return jd(e,l)?l:e}function Qy(e,t,n){const i=My(e);i&&(e={...e,...i});const o=Od(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,d=Lo(e),c=Lo(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:oi.length,x=S=>{if(u)return S;const j=gr({...t,...S}),N=Lo(S),U=Er(p,N,j),W=qy(p,U,{...t,...S});return Object.keys(W).length===0?S:{...S,...W}};if(typeof r=="number"&&r!==l)return e;const b=Yl(e),m=Yl(t);if(!Ky(b,m))return x({...e,...Zy(b,m,t,p)});if(d<c&&typeof p=="number"&&!u){const S=gr({...t,...e});return x({...e,...Uy(p,d,S)})}if(u){const S=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,j=Math.max(0,(d-o)/2);return S>j?{...e,textPaddingLR:j}:e}const h=gr({...t,...e}),f=Er(p,c,gr(t)),C=Er(p,d,h).some((S,j)=>S<(f[j]??S)),y=xn.some(S=>{const j=e[S],N=t[S];return typeof j=="number"&&typeof N=="number"&&j!==N});return C||y?x(e):e}function ex(e,t,n,i){const o=t.slice(0,e).reduce((l,d)=>l+d,0),r=n.slice(e+1,t.length-1).reduce((l,d)=>l+d,0);return Math.max(zo,i-o-r-zo)}function tx(e,t){return Math.random()*(t-e)+e}function nx(e){return Object.fromEntries(xn.map(t=>[t,typeof e[t]=="number"?e[t]:Bd[t]]))}function Aa(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function ix(e,t,n,i,o,r){return e.slice(0,t).map((l,d)=>{const c=to[d],u=no[d],p=io[d];return{key:l,textPrefix:Hy[l],widthKey:xn[d],width:n[xn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[u],paddingBottom:r[p]}})}function ox({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,onUpdateSettings:d}){const{prefix:c}=O.useScopedStyles(),u=!!o,{columns:p,type:x,wrapperWidth:b,entriesCount:m,cellMinHeight:h,dividerWidth:f,showVisibility:v,cut:C,showCut:y,cutCellMinHeight:S,cutLabel:j,imageSize:N,imageOnHover:U,imagePosition:W="cursor",imageInterpolation:R="on",entryHoverEffect:B,entryHoverShowOption:$,rowPaddingTop:T,rowPaddingBottom:k,rowPaddingTopB:E,columnsOrder:g,textPaddingLR:A,textColor:F,backgroundColor:X,dividerColor:ee,textHoverColor:P,backgroundHoverColor:D,dividerHoverColor:K}=e,[le,re]=s.useState(void 0),[M,ie]=s.useState(null),G=s.useRef(null),oe=U==="on"&&(!n||i),te=W==="cursor",ye=te&&R==="on",{anchorRef:Me,onShow:w,onCursorMove:Y,exit:I}=Ty(!!(oe&&M!==null),ye),z=(C??0)>0,H=x==="b",Te=s.useRef(null),fe=s.useRef(null),[ve,de]=s.useState(null),[he,we]=s.useState(Bo),Z=Od(he),Q=Math.max(0,((b??0)-Z)/2),ae=Math.min(A??0,Q),$e=Math.max(ae,Di),ke=((b??0)+Z)/2;s.useLayoutEffect(()=>{if(!n){we(Bo);return}const Ae=()=>{we(Vy(Te.current))};Ae();const Ge=Te.current;if(!Ge)return;const st=new ResizeObserver(Ae);st.observe(Ge);let ht=Ge;for(;ht&&!ht.style.getPropertyValue("--cntrl-article-width");)ht=ht.parentElement;return ht&&st.observe(ht),()=>st.disconnect()},[n,l]),s.useEffect(()=>{re(void 0)},[C,y,t,m]),s.useEffect(()=>{n&&!i&&re(void 0)},[n,i]);const xe=O.buildColorVars(c,{textColor:F,backgroundColor:X,dividerColor:ee,textHoverColor:P,backgroundHoverColor:D,dividerHoverColor:K},zy,jy),V=r&&r!=="default"?`${c}-state-${r}`:"",se=`${!n||i?B==="default"?`${c}-entry-hover-default`:B==="blinds"?`${c}-entry-hover-blinds`:B==="reveal"?`${c}-entry-hover-reveal`:"":""} ${V}`.trim(),q=B==="reveal"&&(!n||i),ce=(v==null?void 0:v[0])??!1,We=(v==null?void 0:v[1])??!1,ge=s.useRef(e),J=s.useRef(l);s.useEffect(()=>{if(!d||!n){ge.current=e,J.current=l;return}if(J.current!==l){ge.current=e,J.current=l;return}const Ae=ge.current;if(!(Ae!==e))return;if(typeof Ae.columns=="number"&&typeof e.columns=="number"&&Ae.columns!==e.columns){ge.current=e;return}const st=Qy(e,Ae,{designWidth:he});ge.current=e,jd(e,st)&&d(st)},[e,d,n,l,he]);const Ke=s.useMemo(()=>nx(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),_e=s.useMemo(()=>Aa(e,to),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),rt=s.useMemo(()=>Aa(e,no),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Ye=s.useMemo(()=>Aa(e,io),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),dt=s.useMemo(()=>Array.isArray(g)&&g.length>0?g:[...oi],[g]),at=s.useMemo(()=>ix(dt,p,Ke,_e,rt,Ye),[dt,p,Ke,_e,rt,Ye]),Xe=Lo(e),Le=s.useMemo(()=>xn.slice(0,p).map(Ae=>Ke[Ae]),[p,Ke]),He=s.useMemo(()=>Zs(p,Xe,Ke),[p,Xe,Ke]),Be=s.useMemo(()=>Er(p,Xe,Ke),[p,Xe,Ke]),Ze=s.useMemo(()=>at.map((Ae,Ge)=>zd(Be[Ge]??0,Ae.paddingLeft,Ae.paddingRight)),[at,Be]),me=s.useMemo(()=>{const Ae=m===0?1/0:m;return(t??[]).slice(0,Ae).map((st,ht)=>({id:ht,cells:Object.fromEntries(oi.map(yt=>[yt,st[yt]??""])),image:st.image,link:st.link}))},[t,m]),be=z?le??C:me.length,Ne=s.useMemo(()=>z?me.slice(0,be):me,[me,z,be]),Je=z&&be<me.length,Se=Ne.length>1||Je,Ie=[ce?`${c}-divider-top`:"",We||Se?`${c}-divider-bottom`:""].filter(Boolean).join(" "),qe=!n||i,ze=()=>{if(!qe)return;const Ae=le??C;if(!y){re(me.length);return}re(Math.min(Ae+y,me.length))},Re=Ae=>O.scalingValue(Ae,n??!1),Ve=H?E??0:T??0,De=k??0,tt=h??0,nt=Math.max(De,ka),ct=Dl(0,Ne.length,ce,We,Je,f??0,n??!1).borderTopWidth,St=H?"rowPaddingTopB":"rowPaddingTop",Bt=at[0],zt=at[at.length-1],ft=Ze[0],wt=Ze[Ze.length-1],jt=Bt&&ft?Math.max(ft.paddingLeft,Di):0,At=zt&&wt?Math.max(wt.paddingRight,Di):0,vt=Xe,Ft=(Ae,Ge)=>$y(W,Te.current,te?Ae:null,Ge),Nt=(Ae,Ge)=>{if(!oe)return;const st=Ae.image;if(!(st!=null&&st.url)){I(()=>ie(null));return}const ht=(N==null?void 0:N.min)??80,yt=(N==null?void 0:N.max)??320,Lt=(M==null?void 0:M.rowId)===Ae.id,mt=Lt?M.widthPx:tx(ht,yt),{x:Vt,y:kt}=Ft(Ge,mt);if(Lt&&te){Y(Vt,kt);return}ie({rowId:Ae.id,url:st.url,objectFit:"contain",isVideo:vy(st),widthPx:mt}),G.current={x:Vt,y:kt}},Kt=Ae=>{if(!oe||!M||!te)return;const{x:Ge,y:st}=Ft(Ae,M.widthPx);Y(Ge,st)},Jt=()=>{M&&I(()=>ie(null))},Tt=Ae=>{q&&Wl(Ae,c),!(!oe||!M)&&I(()=>ie(null))},Wt=Ae=>{q&&Hl(Ae,c)};s.useLayoutEffect(()=>{if(!M||!G.current)return;const{x:Ae,y:Ge}=G.current;G.current=null,w(Ae,Ge)},[M==null?void 0:M.rowId,M==null?void 0:M.url,w]),s.useLayoutEffect(()=>{if(!u||H){de(null);return}const Ae=fe.current,Ge=Ae==null?void 0:Ae.parentElement;if(!Ae||!Ge){de(null);return}const st=()=>{const yt=Ae.querySelector("[data-list-row]");if(!yt){de(null);return}const Lt=Ge.getBoundingClientRect(),mt=yt.getBoundingClientRect();de(mt.top-Lt.top+mt.height/2)};st();const ht=new ResizeObserver(st);return ht.observe(Ae),ht.observe(Ge),()=>ht.disconnect()},[u,H,Ne,Ve,De,tt,t,e,at,Be,he,f,ce,We,Je]);const rn=s.useMemo(()=>!H&&qs.some(Ae=>{const Ge=Ae.charAt(0),st=e[`${Ae}VerticalAlign`];return Dd(st,e,Ge)}),[H,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var Vt;const Ae=Te.current;if(!Ae)return;const Ge=()=>{Ae.querySelectorAll("[data-list-col]").forEach(kt=>{kt.style.transform="";const Mt=kt.querySelector(`.${c}-list-col`);Mt&&(Mt.style.minHeight="",Mt.style.height="");const Xt=kt.querySelector(`.${c}-list-col-title`);Xt&&(Xt.style.transform="")})};if(H||!rn){Ge();return}const st=()=>{const kt=Array.from(Ae.querySelectorAll("[data-list-row]")),Mt=`${c}-list-col`,Xt=`${c}-baseline-probe`;kt.forEach(Yt=>{Yt.querySelectorAll("[data-list-col]").forEach(Ht=>{Ht.style.transform="";const Dt=Ht.querySelector(`.${Mt}`);Dt&&(Dt.style.minHeight="",Dt.style.height="");const _t=Ht.querySelector(`.${c}-list-col-title`);_t&&(_t.style.transform="")})}),kt.forEach(Yt=>{const Ht=Array.from(Yt.querySelectorAll("[data-list-col]"));Ny(Yt,Ht,Mt)}),Ae.offsetHeight,kt.forEach(Yt=>{const Ht=Array.from(Yt.querySelectorAll("[data-list-col]")),Dt=Yt.getBoundingClientRect().top,_t=new Map,Ct=Ht.map(Fe=>{const Oe=Fe.querySelector(`.${c}-list-col-title`),lt={el:Fe,titleEl:Oe,letter:Fe.getAttribute("data-col-letter")??"",kind:Fe.getAttribute("data-valign")??"top",anchor:Fe.getAttribute("data-valign-anchor")};return _t.set(lt.letter,lt),lt}),_=new Map,Pe=(Fe,Oe)=>{const lt=_.get(Fe.letter);if(lt!==void 0)return lt;const Et=Fe.anchor?_t.get(Fe.anchor):void 0;if(Fe.kind!=="baseline"||!Et||Oe.has(Fe.letter)){const nn=Ma(Fe,Dt,Mt,Xt);return _.set(Fe.letter,nn),nn}Oe.add(Fe.letter);const it=Pe(Et,Oe);Oe.delete(Fe.letter);const xt=Ma(Fe,Dt,Mt,Xt),Ot=it-xt;Wy(Fe.titleEl,Ot);const It=Ma(Fe,Dt,Mt,Xt);return _.set(Fe.letter,It),It};Ct.forEach(Fe=>Pe(Fe,new Set))})};let ht=null;const yt=()=>{ht===null&&(ht=requestAnimationFrame(()=>{ht=null,st()}))};st();const Lt=new ResizeObserver(()=>yt());Lt.observe(Ae);let mt=!1;return typeof document<"u"&&((Vt=document.fonts)!=null&&Vt.ready)&&document.fonts.ready.then(()=>{mt||yt()}),()=>{mt=!0,ht!==null&&(cancelAnimationFrame(ht),ht=null),Lt.disconnect(),Ge()}},[rn,H,e,t,he,Ne,Be]);const gt=s.useMemo(()=>Iy(c),[c]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:gt}}),a.jsx("div",{style:xe,children:a.jsxs("div",{ref:Te,className:`${c}-wrapper ${se}${Ie?` ${Ie}`:""}${H?` ${c}-type-b`:""}`.trim(),style:{width:O.scalingValue(b??0,n)},onMouseMove:oe?Kt:void 0,onMouseLeave:oe?Jt:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ne.map((Ae,Ge)=>{var Lt;const st=(((Lt=Ae.link)==null?void 0:Lt.length)??0)>0,ht=st&&(!n||i)?"a":"div",yt=Dl(Ge,Ne.length,ce,We,Je,f??0,n??!1);return a.jsxs(ht,{ref:Ge===0?mt=>{fe.current=mt}:void 0,className:`${c}-list-item${st||$==="always"?` ${c}-list-item-has-link`:""}${Je&&Ge===Ne.length-1?` ${c}-list-item-before-cut`:""}`,...st?{href:Ae.link,target:"_blank"}:{},style:yt,onMouseEnter:mt=>{q&&(st||$==="always")&&Wl(mt,c),oe&&Nt(Ae,mt)},onMouseLeave:mt=>{q&&(st||$==="always")&&Hl(mt,c)},children:[Ve>0&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Re(Ve)}}),a.jsxs("div",{className:`${c}-list-cols-row${H?"":` ${c}-list-cols-row-h`}${u&&Ge===0&&H?` ${c}-list-cols-row-controls`:""}`,...H?{}:{"data-list-row":""},style:H?void 0:{minHeight:Re(tt)},children:[at.map((mt,Vt)=>{const kt=Vt===at.length-1,Mt=Ze[Vt],Xt=mt.paddingBottom,Yt=wy(Ae.cells[mt.key]),Ht=H&&Yt&&Xt>0,Dt=H?{minHeight:Re(tt)}:{width:Re(Be[Vt])},_t=H?{paddingLeft:Re(ae),paddingRight:Re(ae)}:{paddingLeft:Re(Mt.paddingLeft),paddingRight:Re(Mt.paddingRight)},Ct=mt.textPrefix.charAt(0),_=H?Ey(e[`${mt.textPrefix}VerticalAlign`]):Py(e[`${mt.textPrefix}VerticalAlign`],e,Ct),Pe=H&&Yt&&u&&Ge===0;return H&&!Yt?null:a.jsxs("div",{className:H?`${c}-list-col-wrap`:void 0,...H?{}:{"data-list-col":"","data-col-letter":Ct,"data-valign":_.kind,..._.kind==="baseline"?{"data-valign-anchor":_.anchorLetter}:{}},children:[a.jsx("div",{className:`${c}-list-col${kt?` ${c}-list-col-last`:""}`,style:{..._t,...Dt,...H?{justifyContent:zl(_.kind)}:{}},"data-test":mt.width,children:a.jsx("span",{className:Vl(e,mt.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...jl(Br(e,mt.textPrefix),n),...Gl(e,mt.textPrefix,c,n),...H?{}:ky(_.kind)},children:Ae.cells[mt.key]??null})}),Ht&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Re(Xt)}}),Pe&&a.jsx("div",{"data-controls":mt.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:Re(Math.max(Xt,ka))}})]},mt.key)}),u&&Ge===0&&H&&a.jsxs(a.Fragment,{children:[a.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(ke),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:0,width:Re($e),height:"100%"}}),a.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(ke),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:Re(Math.max($e,Xe-$e)),width:Re($e),height:"100%"}})]})]}),!H&&De>0&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Re(De)}}),u&&Ge===0&&!H&&a.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:Re(nt)}})]},Ae.id)}),u&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":St,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":H?"center":"left-y",className:`${c}-control-anchor`,style:{top:ct,left:0,width:"100%",height:Re(Math.max(Ve,ka))}})},"row-padding-handles"),u&&!H&&Bt&&zt&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Bt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Be[0]-((ft==null?void 0:ft.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ve??void 0,className:`${c}-control-anchor`,style:{top:0,left:0,width:Re(jt),height:"100%"}}),a.jsx("div",{"data-controls":zt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Be[at.length-1]-((wt==null?void 0:wt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ve??void 0,className:`${c}-control-anchor`,style:{top:0,left:Re(vt-At),width:Re(At),height:"100%"}})]},"column-edge-padding-handles"),u&&!H&&at.slice(0,-1).map((Ae,Ge)=>{const st=at[Ge+1],ht=He.slice(0,Ge+1).reduce((kt,Mt)=>kt+Mt,0),yt=Ze[Ge],Lt=Ze[Ge+1],mt=Math.max(yt.paddingRight,Di),Vt=Math.max(Lt.paddingLeft,Di);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Ae.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Be[Ge]-yt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ve??void 0,className:`${c}-control-anchor`,style:{top:0,left:Re(ht-mt),width:Re(mt),height:"100%"}}),a.jsx("div",{"data-controls":st.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Be[Ge+1]-Lt.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ve??void 0,className:`${c}-control-anchor`,style:{top:0,left:Re(ht),width:Re(Vt),height:"100%"}})]},`${Ae.paddingRightKey}-padding`)}),u&&!H&&at.slice(0,-1).map((Ae,Ge)=>{const st=ex(Ge,He,Le,Xe),yt=He.slice(0,Ge+1).reduce((Lt,mt)=>Lt+mt,0)-Xl/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Ae.widthKey,"data-controls-axis":"x","data-controls-min":String(Ks),"data-controls-max-fraction":String(st),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Re(yt),width:Re(Xl),height:"calc(100%)",pointerEvents:"auto"}})},`${Ae.widthKey}-junction`)})]}),Je&&(()=>{const Ae=Br(e,Hn),Ge=Ay(e.cutLabelVerticalAlign),st=Ae.textTextAlign==="justify"||H;return a.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Re(S??0),cursor:qe?"pointer":"default",...Sy(We,f??0,n??!1)},onClick:qe?ze:void 0,onMouseEnter:q||oe?Tt:void 0,onMouseLeave:q?Wt:void 0,children:a.jsx("div",{className:`${c}-list-cols-row`,style:{...H?{paddingLeft:Re(ae),paddingRight:Re(ae)}:{},justifyContent:Fy(Ae.textTextAlign),alignItems:zl(Ge)},children:a.jsx("span",{className:Vl(e,Hn,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...jl(Ae,n),...Gl(e,Hn,c,n),...st?{width:"100%"}:{}},children:j})})})})(),oe&&M&&(()=>{const Ae=`${M.widthPx}px`,Ge={width:Ae,height:"auto",maxHeight:Ae,objectFit:"contain"};return a.jsx("div",{ref:Me,className:`${c}-hover-media-anchor`,children:a.jsx(by,{media:M,className:M.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:Ge},`${M.rowId}-${M.url}`)})})()]})})]})}const rx=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10225
10229
  import { CommonComponentProps } from '../props';
10226
10230
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
10227
10231
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -13309,7 +13313,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13309
13313
  </>
13310
13314
  );
13311
13315
  }
13312
- `,po=["A","B","C","D","E"],Vl=[...os,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],mi={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 nv(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function mr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function iv(){return Object.fromEntries(po.map((e,t)=>{const n=oi[t],i=`${e} column`;return[n,nv(i)]}))}function ov(){const e={};for(const t of po)e[`${t}ColumnWidth`]=mr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=mr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=mr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=mr(`${t} column padding bottom`);return e}function Gl(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...oi]};for(const r of po)i[`${r}ColumnWidth`]=r==="A"?.0798:.32,i[`${r}ColumnPaddingLeft`]=0,i[`${r}ColumnPaddingRight`]=0,i[`${r}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function rv(e){const t={};if(e===Hn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...os]},enum:[...os]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Vl],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Vl]}}return t[Pt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Pt(e,"textFontSettings")]={...mi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Pt(e,"textFontSize")]={...mi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Pt(e,"textLineHeight")]={...mi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Pt(e,"textLetterSpacing")]={...mi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Pt(e,"textWordSpacing")]={...mi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Pt(e,"textTextAlign")]={...mi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Pt(e,"textTextAppearance")]={...mi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const av=Wo.reduce((e,t)=>({...e,...rv(t)}),{});function sv(e){return{verticalAlign:e===Hn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Hn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function lv(e,t={}){var n;return{...sv(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Xl=new Set(["textFontFamily","textFontSettings"]);function cv(e,t,n){const i=r=>n===void 0?!0:n==="common"?Xl.has(r):!Xl.has(r),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Gs(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Pt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Pt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Pt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Pt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Pt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Pt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Pt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Pt(e,"textTextAppearance")]=t.textTextAppearance),o}function Lr(e={},t){return Wo.reduce((n,i)=>({...n,...cv(i,lv(i,e),t)}),{})}const dv=Lr(),uv=Wy();function Dd(e){return[Pt(e,"textFontFamily"),Pt(e,"textFontSettings"),Pt(e,"textFontSize"),Pt(e,"textLineHeight"),Pt(e,"textLetterSpacing"),Pt(e,"textWordSpacing"),Pt(e,"textTextAlign"),Pt(e,"textTextAppearance"),`${e}VerticalAlign`]}function pv(){const e=[];return Vs.forEach((t,n)=>{const i=oi[n],o=Dd(t);for(let r=1;r<oi.length;r+=1){const l=[{name:"columns",value:r},...Array.from({length:r},(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 mv=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Dd(Hn);const gv=[...po.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],gi=[{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"}],hv=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:gi[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:gi[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:gi[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:gi[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:gi[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:gi[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:gi[6],link:""}],fv=[...po.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],yv={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:{...iv(),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:hv},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"]}},imagePosition:{type:"string",scope:"layout",title:"Image Position",display:{type:"toggle-cycle",enum:["left","center","right","cursor"]}},imageInterpolation:{type:"boolean",scope:"common",title:"Interpolation",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"}},...ov(),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"}},...av,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",imagePosition:"cursor",imageInterpolation:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...dv,...Lr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Gl({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},...Lr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Gl({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},...Lr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...pv(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...gv.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}},...po.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}})),{if:{name:"imagePosition",value:"cursor",isNotEqual:!0},then:{name:"properties.imageInterpolation.display.enabled",value:!1}}],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imagePosition","imageInterpolation","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...fv]},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:"",items:["imagePosition","imageInterpolation"]},{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__",uv]}],paletteBookmark:{items:[...mv],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},vv={element:ev,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Yy(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:[...Wo.map(e=>({path:`${Pt(e,"textFontFamily")}`}))]},fontRelations:{...Wo.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Pt(t,"textFontFamily")}`}),{})},schema:yv,sourceCode:tv},ql=300,Vn=.004,xv={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"},bv=["hover","focus","filled","success","error"];function wv(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Yl(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Ul(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 Sv(e){return`
13316
+ `,mo=["A","B","C","D","E"],ql=[...ss,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],mi={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 ax(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function hr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function sx(){return Object.fromEntries(mo.map((e,t)=>{const n=oi[t],i=`${e} column`;return[n,ax(i)]}))}function lx(){const e={};for(const t of mo)e[`${t}ColumnWidth`]=hr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=hr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=hr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=hr(`${t} column padding bottom`);return e}function Ul(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...oi]};for(const r of mo)i[`${r}ColumnWidth`]=r==="A"?.0798:.32,i[`${r}ColumnPaddingLeft`]=0,i[`${r}ColumnPaddingRight`]=0,i[`${r}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function cx(e){const t={};if(e===Hn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...ss]},enum:[...ss]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...ql],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...ql]}}return t[Pt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Pt(e,"textFontSettings")]={...mi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Pt(e,"textFontSize")]={...mi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Pt(e,"textLineHeight")]={...mi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Pt(e,"textLetterSpacing")]={...mi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Pt(e,"textWordSpacing")]={...mi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Pt(e,"textTextAlign")]={...mi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Pt(e,"textTextAppearance")]={...mi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const dx=Do.reduce((e,t)=>({...e,...cx(t)}),{});function ux(e){return{verticalAlign:e===Hn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Hn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function px(e,t={}){var n;return{...ux(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Kl=new Set(["textFontFamily","textFontSettings"]);function mx(e,t,n){const i=r=>n===void 0?!0:n==="common"?Kl.has(r):!Kl.has(r),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Us(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Pt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Pt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Pt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Pt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Pt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Pt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Pt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Pt(e,"textTextAppearance")]=t.textTextAppearance),o}function Mr(e={},t){return Do.reduce((n,i)=>({...n,...mx(i,px(i,e),t)}),{})}const gx=Mr(),hx=By();function Vd(e){return[Pt(e,"textFontFamily"),Pt(e,"textFontSettings"),Pt(e,"textFontSize"),Pt(e,"textLineHeight"),Pt(e,"textLetterSpacing"),Pt(e,"textWordSpacing"),Pt(e,"textTextAlign"),Pt(e,"textTextAppearance"),`${e}VerticalAlign`]}function fx(){const e=[];return qs.forEach((t,n)=>{const i=oi[n],o=Vd(t);for(let r=1;r<oi.length;r+=1){const l=[{name:"columns",value:r},...Array.from({length:r},(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 yx=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Vd(Hn);const xx=[...mo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],gi=[{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"}],vx=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:gi[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:gi[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:gi[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:gi[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:gi[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:gi[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:gi[6],link:""}],bx=[...mo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],wx={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:{...sx(),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:vx},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"]}},imagePosition:{type:"string",scope:"layout",title:"Image Position",display:{type:"toggle-cycle",enum:["left","center","right","cursor"]}},imageInterpolation:{type:"boolean",scope:"common",title:"Interpolation",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"}},...lx(),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"}},...dx,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",imagePosition:"cursor",imageInterpolation:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...gx,...Mr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Ul({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},...Mr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Ul({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},...Mr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...fx(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...xx.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}},...mo.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}})),{if:{name:"imagePosition",value:"cursor",isNotEqual:!0},then:{name:"properties.imageInterpolation.display.enabled",value:!1}}],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imagePosition","imageInterpolation","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...bx]},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:"",items:["imagePosition","imageInterpolation"]},{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__",hx]}],paletteBookmark:{items:[...yx],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Sx={element:ox,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Jy(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:[...Do.map(e=>({path:`${Pt(e,"textFontFamily")}`}))]},fontRelations:{...Do.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Pt(t,"textFontFamily")}`}),{})},schema:wx,sourceCode:rx},Zl=300,Vn=.004,Cx={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"},$x=["hover","focus","filled","success","error"];function Tx(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Jl(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Ql(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:O.scalingValue((o-t)/2,i)}}function Ix(e){return`
13313
13317
  .${e}-wrapper {
13314
13318
  box-sizing: border-box;
13315
13319
  display: flex;
@@ -13371,7 +13375,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13371
13375
  display: flex;
13372
13376
  align-items: center;
13373
13377
  justify-content: space-between;
13374
- gap: ${wv(20)};
13378
+ gap: ${Tx(20)};
13375
13379
  width: 100%;
13376
13380
  min-width: 0;
13377
13381
  min-height: var(--${e}-question-min-height, unset);
@@ -13399,7 +13403,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13399
13403
  width: var(--${e}-icon-max-width);
13400
13404
  height: var(--${e}-icon-max-width);
13401
13405
  position: relative;
13402
- transition: transform ${ql}ms ease;
13406
+ transition: transform ${Zl}ms ease;
13403
13407
  }
13404
13408
  .${e}-icon-custom {
13405
13409
  display: flex;
@@ -13436,7 +13440,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13436
13440
  .${e}-panel {
13437
13441
  display: grid;
13438
13442
  grid-template-rows: 0fr;
13439
- transition: grid-template-rows ${ql}ms ease;
13443
+ transition: grid-template-rows ${Zl}ms ease;
13440
13444
  }
13441
13445
  .${e}-item-open .${e}-panel {
13442
13446
  grid-template-rows: 1fr;
@@ -13474,7 +13478,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13474
13478
  pointer-events: none;
13475
13479
  z-index: 2;
13476
13480
  }
13477
- `}function Kl(e,t,n,i,o,r,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:r??0,textAppearance:l,color:d??"#000000"}}function Cv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=W.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:v="solid",entryHoverEffect:w="default",autoclose:m="off",icon:h,iconMaxWidth:f=.00833,iconPaddingRight:x=0,iconAnimation:C="rotate 45",questionColor:y="#000000",answerColor:S="#000000",dividerColor:z="#0000001F",iconColor:N="#000000",questionHoverColor:Y="#666666",iconHoverColor:B="#666666",iconActiveColor:T="#000000",dividerHoverColor:H="#000000",questionFontFamily:$,questionFontSettings:I,questionFontSize:P,questionLineHeight:M,questionLetterSpacing:g,questionWordSpacing:D,questionTextAppearance:A,answerFontFamily:X,answerFontSettings:ie,answerFontSize:L,answerLineHeight:_,answerLetterSpacing:V,answerWordSpacing:se,answerTextAppearance:re,questionPaddingLeft:k=0,questionPaddingTop:le=0,questionPaddingBottom:G=0,answerPaddingLeft:b=0,answerPaddingRight:E=0,answerPaddingTop:j=0,answerPaddingBottom:me=0}=e,K=t??[],[te,O]=s.useState(()=>new Set),J=!n||i;s.useEffect(()=>{O(new Set)},[m]),s.useEffect(()=>{n&&!o&&!i&&O(new Set)},[n,o,i]);const ne=Ue=>W.scalingValue(Ue,n??!1),Pe=Math.max(k,Vn),be=Math.max(le,Vn),Re=Math.max(G,Vn),ue=Math.max(b,Vn),fe=Math.max(E,Vn),$e=Math.max(j,Vn),Q=Math.max(me,Vn),Z=Math.max(0,(c??1)-x-f),ae=Math.max(0,(c??1)-E),xe=Math.max(0,(c??1)-b),ke=Math.max(x,Vn),Ce=Math.max(0,(c??1)-k-f),q=s.useMemo(()=>te.size===0?0:Math.min(...te),[te]),ye=s.useCallback(Ue=>te.has(Ue),[te]),ce=J&&w==="default"?`${l}-entry-hover-default`:"",U=h??"",de=U!=="",He=C.replace(/^rotate /,""),he=`${l}-icon-anim-${He}`,ee=an(Ut(Kl($,I,P,M,g,D,A,y),n)),Je=an(Ut(Kl(X,ie,L,_,V,se,re,S),n)),Ne=Yl(P,M,`${l}-question`,`${l}-text-tight-leading`),ct=Yl(L,_,`${l}-answer-text`,`${l}-text-tight-leading`),Ke=Ul(P,M,l,n),ut=Ul(L,_,l,n),lt=W.buildColorVars(l,{questionColor:y,answerColor:S,dividerColor:z,iconColor:N,questionHoverColor:Y,iconHoverColor:B,iconActiveColor:T,dividerHoverColor:H},xv,bv),Ye=r&&r!=="default"?`${l}-state-${r}`:"",Le=s.useCallback(Ue=>{J&&O(ge=>{if(ge.has(Ue)){const _e=new Set(ge);return _e.delete(Ue),_e}if(m==="on")return new Set([Ue]);const ve=new Set(ge);return ve.add(Ue),ve})},[J,m]),We=s.useMemo(()=>Sv(l),[l]),Be={[`--${l}-divider-width`]:W.scalingValue(p,n??!1),[`--${l}-divider-style`]:v,[`--${l}-icon-max-width`]:W.scalingValue(f,n??!1),...u>0?{[`--${l}-question-min-height`]:W.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:We}}),a.jsx("div",{style:lt,children:a.jsx("div",{className:pt(`${l}-wrapper`,n&&!i&&`${l}-editor`,ce,Ye),style:{width:W.scalingValue(c,n??!1),maxWidth:"100%",...Be},children:K.map((Ue,ge)=>{var Xe;const ve=ye(ge),_e=((Xe=Ue.question)==null?void 0:Xe.trim())??"",Ze=Ue.answer,we=((Ze==null?void 0:Ze.length)??0)>0,Te=d&&ge===q;return a.jsxs("div",{className:pt(`${l}-item`,ve&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[Te&&a.jsxs(a.Fragment,{children:[a.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:ne(be)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Z),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:ne(Pe),height:"100%"}}),a.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(Ce),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:ne(ke),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":ve,style:{...ee,...Ke,paddingLeft:ne(k),paddingRight:ne(x)},onClick:()=>Le(ge),children:[le>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:ne(le)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:Ne,children:_e}),we&&(de?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${he}`,"aria-hidden":"true",children:a.jsx(sn,{url:U,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):a.jsx("span",{className:`${l}-icon ${l}-icon-default ${he}`,"aria-hidden":"true"}))]}),G>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:ne(G)},"aria-hidden":"true"})]}),Te&&a.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:ne(Re)}})]}),we&&Ze&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!ve,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[Te&&ve&&a.jsxs(a.Fragment,{children:[a.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:ne($e)}}),a.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ae),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:ne(ue),height:"100%"}}),a.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:ne(fe),height:"100%"}})]}),j>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:ne(j)}}),a.jsx("div",{className:`${l}-answer`,style:{...Je,...ut,paddingLeft:ne(b),paddingRight:ne(E)},children:a.jsx("div",{className:ct,children:a.jsx(Ri,{content:Ze})})}),me>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:ne(me)}}),Te&&ve&&a.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:ne(Q)}})]})})})]},ge)})})})]})}const $v=`import { useCallback, useEffect, useMemo, useState } from 'react';
13481
+ `}function ec(e,t,n,i,o,r,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:r??0,textAppearance:l,color:d??"#000000"}}function Rx({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=O.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:x="solid",entryHoverEffect:b="default",autoclose:m="off",icon:h,iconMaxWidth:f=.00833,iconPaddingRight:v=0,iconAnimation:C="rotate 45",questionColor:y="#000000",answerColor:S="#000000",dividerColor:j="#0000001F",iconColor:N="#000000",questionHoverColor:U="#666666",iconHoverColor:W="#666666",iconActiveColor:R="#000000",dividerHoverColor:B="#000000",questionFontFamily:$,questionFontSettings:T,questionFontSize:k,questionLineHeight:E,questionLetterSpacing:g,questionWordSpacing:A,questionTextAppearance:F,answerFontFamily:X,answerFontSettings:ee,answerFontSize:P,answerLineHeight:D,answerLetterSpacing:K,answerWordSpacing:le,answerTextAppearance:re,questionPaddingLeft:M=0,questionPaddingTop:ie=0,questionPaddingBottom:G=0,answerPaddingLeft:oe=0,answerPaddingRight:te=0,answerPaddingTop:ye=0,answerPaddingBottom:Me=0}=e,w=t??[],[Y,I]=s.useState(()=>new Set),z=!n||i;s.useEffect(()=>{I(new Set)},[m]),s.useEffect(()=>{n&&!o&&!i&&I(new Set)},[n,o,i]);const H=Ze=>O.scalingValue(Ze,n??!1),Te=Math.max(M,Vn),fe=Math.max(ie,Vn),ve=Math.max(G,Vn),de=Math.max(oe,Vn),he=Math.max(te,Vn),we=Math.max(ye,Vn),Z=Math.max(Me,Vn),Q=Math.max(0,(c??1)-v-f),ae=Math.max(0,(c??1)-te),$e=Math.max(0,(c??1)-oe),ke=Math.max(v,Vn),xe=Math.max(0,(c??1)-M-f),V=s.useMemo(()=>Y.size===0?0:Math.min(...Y),[Y]),pe=s.useCallback(Ze=>Y.has(Ze),[Y]),se=z&&b==="default"?`${l}-entry-hover-default`:"",q=h??"",ce=q!=="",We=C.replace(/^rotate /,""),ge=`${l}-icon-anim-${We}`,J=an(Ut(ec($,T,k,E,g,A,F,y),n)),Ke=an(Ut(ec(X,ee,P,D,K,le,re,S),n)),_e=Jl(k,E,`${l}-question`,`${l}-text-tight-leading`),rt=Jl(P,D,`${l}-answer-text`,`${l}-text-tight-leading`),Ye=Ql(k,E,l,n),dt=Ql(P,D,l,n),at=O.buildColorVars(l,{questionColor:y,answerColor:S,dividerColor:j,iconColor:N,questionHoverColor:U,iconHoverColor:W,iconActiveColor:R,dividerHoverColor:B},Cx,$x),Xe=r&&r!=="default"?`${l}-state-${r}`:"",Le=s.useCallback(Ze=>{z&&I(me=>{if(me.has(Ze)){const Ne=new Set(me);return Ne.delete(Ze),Ne}if(m==="on")return new Set([Ze]);const be=new Set(me);return be.add(Ze),be})},[z,m]),He=s.useMemo(()=>Ix(l),[l]),Be={[`--${l}-divider-width`]:O.scalingValue(p,n??!1),[`--${l}-divider-style`]:x,[`--${l}-icon-max-width`]:O.scalingValue(f,n??!1),...u>0?{[`--${l}-question-min-height`]:O.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:He}}),a.jsx("div",{style:at,children:a.jsx("div",{className:pt(`${l}-wrapper`,n&&!i&&`${l}-editor`,se,Xe),style:{width:O.scalingValue(c,n??!1),maxWidth:"100%",...Be},children:w.map((Ze,me)=>{var qe;const be=pe(me),Ne=((qe=Ze.question)==null?void 0:qe.trim())??"",Je=Ze.answer,Se=((Je==null?void 0:Je.length)??0)>0,Ie=d&&me===V;return a.jsxs("div",{className:pt(`${l}-item`,be&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[Ie&&a.jsxs(a.Fragment,{children:[a.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:H(fe)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Q),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:H(Te),height:"100%"}}),a.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(xe),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:H(ke),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":be,style:{...J,...Ye,paddingLeft:H(M),paddingRight:H(v)},onClick:()=>Le(me),children:[ie>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:H(ie)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:_e,children:Ne}),Se&&(ce?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${ge}`,"aria-hidden":"true",children:a.jsx(sn,{url:q,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):a.jsx("span",{className:`${l}-icon ${l}-icon-default ${ge}`,"aria-hidden":"true"}))]}),G>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:H(G)},"aria-hidden":"true"})]}),Ie&&a.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:H(ve)}})]}),Se&&Je&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!be,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[Ie&&be&&a.jsxs(a.Fragment,{children:[a.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:H(we)}}),a.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ae),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:H(de),height:"100%"}}),a.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($e),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:H(he),height:"100%"}})]}),ye>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:H(ye)}}),a.jsx("div",{className:`${l}-answer`,style:{...Ke,...dt,paddingLeft:H(oe),paddingRight:H(te)},children:a.jsx("div",{className:rt,children:a.jsx(Ri,{content:Je})})}),Me>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:H(Me)}}),Ie&&be&&a.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:H(Z)}})]})})})]},me)})})})]})}const Lx=`import { useCallback, useEffect, useMemo, useState } from 'react';
13478
13482
  import cn from 'classnames';
13479
13483
  import { CommonComponentProps } from '../props';
13480
13484
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -14222,7 +14226,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14222
14226
  </>
14223
14227
  );
14224
14228
  }
14225
- `;function Gn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Zl={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Tv=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Iv={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:Gn("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:{...Zl.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:{...Zl.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:Gn("Question Padding Left"),questionPaddingTop:Gn("Question Padding Top"),questionPaddingBottom:Gn("Question Padding Bottom"),answerPaddingLeft:Gn("Answer Padding Left"),answerPaddingRight:Gn("Answer Padding Right"),answerPaddingTop:Gn("Answer Padding Top"),answerPaddingBottom:Gn("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01M0GB8Z9EQFMGYA20F2J0ACA8.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:[...Tv],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Rv={element:Cv,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:Iv,sourceCode:$v},Dn=e=>e.display==="cover",aa=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Jl=100,Lv=.2,Ql=8,Od=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,r]=s.useState(0),[l,d]=s.useState(!1),c=s.useRef(null),u=s.useRef(0);u.current=o;const p=s.useMemo(()=>typeof window>"u"?Jl:Math.max(Jl,window.innerHeight*Lv),[]),v=s.useCallback($=>Math.max(0,1-$/(p*1.5)),[p]),w=s.useCallback($=>Math.max(0,1-$/(p*.45)),[p]),m=s.useCallback($=>{const I=typeof window<"u"?window.innerHeight:800,P=Math.max(.88,1-$/I*.12);return`translateY(${$}px) scale(${P})`},[]),h=s.useCallback(()=>{c.current=null},[]),f=s.useCallback(()=>{d(!0),r(0),window.setTimeout(()=>d(!1),n),h()},[n,h]),x=s.useCallback(()=>{const $=typeof window<"u"?window.innerHeight:800;d(!0),r($),window.setTimeout(()=>{t(),h(),d(!1)},Math.min(n,200))},[n,t,h]),C=s.useCallback($=>{!e||l||$.pointerType==="touch"&&(i!=null&&i($.target)||(c.current={startX:$.clientX,startY:$.clientY,isLocked:null,pointerId:$.pointerId}))},[e,l,i]),y=s.useCallback($=>{const I=c.current;if(!e||!I||$.pointerType!=="touch"||I.pointerId!==$.pointerId)return;const P=$.clientX-I.startX,M=$.clientY-I.startY;if(I.isLocked===null){if(Math.abs(P)<Ql&&Math.abs(M)<Ql)return;if(M>0&&M>Math.abs(P))I.isLocked=!0,$.currentTarget.setPointerCapture($.pointerId);else{I.isLocked=!1,h();return}}if(!I.isLocked)return;$.preventDefault();const g=Math.max(0,M);u.current=g,r(g)},[e,h]),S=s.useCallback($=>{const I=c.current;if(!e||!I||$.pointerType!=="touch"||I.pointerId!==$.pointerId)return;const P=I.isLocked===!0;if($.currentTarget.hasPointerCapture($.pointerId)&&$.currentTarget.releasePointerCapture($.pointerId),!P){h();return}$.clientY-I.startY>=p?x():f()},[p,x,e,h,f]),z=s.useCallback($=>{S($)},[S]),N=s.useCallback($=>{S($)},[S]),Y=o>0,B=l?`transform ${n}ms ease`:"none",T=l?`opacity ${n}ms ease`:"none",H=o>0||l;return{isSwipeDragging:Y,backdropStyle:{opacity:v(o),transition:T},mediaAreaStyle:{transform:m(o),transition:B,touchAction:Y?"none":void 0,willChange:Y?"transform":void 0},overlayContentStyle:H?{opacity:w(o),transition:T}:void 0,swipeHandlers:e?{onPointerDown:C,onPointerMove:y,onPointerUp:z,onPointerCancel:N}:{},dismissAreaStyle:e?{touchAction:Y?"none":"pan-x"}:void 0}},Pv="[data-lightbox-scrollable]",Bd=()=>{s.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,r=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(Pv)||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=r,window.scrollTo({top:e,left:0,behavior:"instant"})}},[])},Ev=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Mv=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},kv=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Av=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(h,f)=>{Mv(t),e.scrollLeft=h,f&&(r==null||r())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let p=!1,v=0;const w=()=>{t.removeEventListener("transitionend",m),clearTimeout(v)},m=h=>{h.target!==t||h.propertyName!=="transform"||p||(p=!0,w(),u(n,!0))};return t.addEventListener("transitionend",m),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,w(),u(n,!0))},i+64),()=>{p||(p=!0,w(),u(l-kv(t),!1))}},Lo=300,Fv=900,_v=1500,Nv="cubic-bezier(0.16, 1, 0.3, 1)",Wv=3e3,Hv=2,Dv=16,Ov=.05,Bv=1,gr=.3,zv=50,jv=20,Ai=.004,io=["title1","title2","title3"],Vv={title1:"1",title2:"2",title3:"3"},Gv={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Xv={title1:.02,title2:.02,title3:.02},hr=e=>`max(${e}, ${jv}px)`,qv=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]}},Yv=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=qv(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Gt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Uv=e=>[Gt(e,"fontFamily"),Gt(e,"fontSettings"),{type:"row",items:[Gt(e,"fontSize"),Gt(e,"lineHeight"),Gt(e,"letterSpacing"),Gt(e,"wordSpacing")]},Gt(e,"textAlign"),Gt(e,"textAppearance")],Kv=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(io.map(e=>[Vv[e],Uv(e)]))}),Ys=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},d)=>{if(r<=0||d<=0)return{overflow:r,widths:[d,...l]};const c=Math.min(r,d);return{overflow:r-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},zd=(e,t)=>Ys(e,t),fr=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},ec=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ys(e.length,n),effective:zd(e.length,n)}},Zv=(e,t,n,i,o,r,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:r,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),d},Ma=(e,t)=>{const n=i=>{const o=Gt(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[Gv[t]]}},Jv=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),ka=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Xv[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Ut(i,n)},Qv=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:v,closeIcon:w,closeIconMaxWidth:m,closeIconColor:h,closeIconHoverColor:f,thumbnailTrigger:x,thumbnailVisibility:C,thumbnailObjectFit:y,thumbnailActive:S,thumbnailActiveColor:z,title1Width:N,title2Width:Y,title3Width:B,title1MarginLeft:T=0,title2MarginLeft:H=0,title3MarginLeft:$=0,titleRowMarginBottom:I=0,titleHeaderLayout:P="desktop",contentMarginTop:M,iconMarginLeft:g}=n,D=R=>W.scalingValue(R,i??!1),A=c??n.thumnailSize??.03,X=D(A),ie=D(u),L=D(p??.02),_=D(v??0),V=D(M??0),se=hr(V),re=D(g??0),[k,le]=s.useState(0),G=s.useRef(k);G.current=k;const b=t[k],{title1:E,title2:j,title3:me}=Yv(b),K=ka("title1",Ma(n,"title1"),i),te=ka("title2",Ma(n,"title2"),i),O=ka("title3",Ma(n,"title3"),i),J=P==="mobile",ne=!o&&(!i||r),Pe=ne,be=ne,Re=ne,ue=Dn(y),fe=ue?{"--image-aspect-ratio":aa(y)}:void 0,$e=!!(E||j||me),Q=s.useMemo(()=>Zv(e,E,j,me,K,te,O),[e,k,E,j,me,K,te,O]),Z=s.useMemo(()=>({title1Width:N,title2Width:Y,title3Width:B}),[N,Y,B]),ae=s.useMemo(()=>Q.map(R=>Z[R.widthKey]),[Q,Z]),xe=s.useMemo(()=>Ys(Q.length,ae),[Q.length,ae]),ke=s.useMemo(()=>zd(Q.length,ae),[Q.length,ae]),Ce=s.useMemo(()=>Q.filter(R=>R.prefix==="title1"),[Q]),q=s.useMemo(()=>Q.filter(R=>R.prefix==="title2"||R.prefix==="title3"),[Q]),ye=s.useMemo(()=>ec(Ce,Z),[Ce,Z]),ce=s.useMemo(()=>ec(q,Z),[q,Z]),U=s.useCallback((R,oe)=>{const pe=Q.indexOf(R);if(!J||oe==="single-row")return{effectiveWidth:ke[pe]??0,resolvedWidth:xe[pe]??0,maxWidth:fr(pe,xe)};if(oe==="two-row-top"){const je=Ce.indexOf(R);return{effectiveWidth:ye.effective[je]??0,resolvedWidth:ye.resolved[je]??0,maxWidth:fr(je,ye.resolved)}}const Me=q.indexOf(R);return{effectiveWidth:ce.effective[Me]??0,resolvedWidth:ce.resolved[Me]??0,maxWidth:fr(Me,ce.resolved)}},[q,ce,ke,xe,Q,Ce,ye,J]),de=s.useCallback(R=>W.scalingValue(R,i??!1),[i]),He=de(I??0),he=s.useMemo(()=>({title1MarginLeft:T,title2MarginLeft:H,title3MarginLeft:$}),[T,H,$]),ee=s.useCallback(R=>Q.slice(0,R+1).reduce((oe,pe,Me)=>oe+(pe!=null&&pe.marginLeftKey?he[pe.marginLeftKey]??0:0)+(xe[Me]??0),0)+(J?0:T??0),[Q,he,xe,J,T]),Je=s.useCallback(()=>J?0:T??0,[J,T]),Ne=s.useCallback(R=>q.slice(0,R).reduce((oe,pe,Me)=>oe+(pe.marginLeftKey?he[pe.marginLeftKey]??0:0)+(ce.resolved[Me]??0),0),[q,ce.resolved,he]),ct=s.useCallback(R=>{const oe=q[R];return Ne(R)+(oe.marginLeftKey?he[oe.marginLeftKey]??0:0)+(ce.resolved[R]??0)},[q,ce.resolved,Ne,he]),Ke=(R,oe)=>{const pe=R.marginLeftKey?he[R.marginLeftKey]??0:0,{effectiveWidth:Me,resolvedWidth:je,maxWidth:et}=U(R,oe),bt=o&&oe==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":R.prefix,style:{...oe==="single-row"?{gridArea:R.prefix}:{},width:de(Me),...pe>0?{marginLeft:de(pe)}:{}},children:[a.jsx("p",{className:R.className,style:R.style,children:R.text}),bt&&R.marginLeftKey&&a.jsx("div",{"data-controls":R.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:de(-pe),width:`max(${de(pe)}, 10px)`,height:"100%",pointerEvents:"auto"}}),bt&&a.jsx("div",{"data-controls":R.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(et),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:de(-Ai/2),width:de(Ai),height:"100%",pointerEvents:"auto"}})]},R.className)},ut=()=>{const R=J?-1:Q.findIndex(Me=>Me.prefix==="title1"),oe=!J&&(o||(T??0)>0)?(()=>{const Me=T??0,je=R>=0?xe[R]:N??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:0,width:`max(${de(Me)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,pe=Q.flatMap((Me,je)=>{if(!Me.marginLeftKey)return[];const et=he[Me.marginLeftKey]??0,bt=Jv(Q,xe,he,je)+Je();return a.jsx("div",{"data-controls":Me.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(xe[je]),style:{position:"absolute",top:0,left:de(bt),width:`max(${de(et)}, 10px)`,height:"100%",pointerEvents:"auto"}},Me.marginLeftKey)});return oe?[oe,...pe]:pe},lt=()=>Q.map((R,oe)=>{const pe=fr(oe,xe),je=ee(oe)-Ai/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":R.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(pe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:de(je),width:de(Ai),height:"100%",pointerEvents:"auto"}})},`${R.widthKey}-junction`)}),Ye=()=>q.flatMap((R,oe)=>{if(!R.marginLeftKey)return[];const pe=he[R.marginLeftKey]??0,Me=Ne(oe),{resolvedWidth:je}=U(R,"two-row-bottom");return a.jsx("div",{"data-controls":R.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:de(Me),width:`max(${de(pe)}, 10px)`,height:"100%",pointerEvents:"auto"}},R.marginLeftKey)}),Le=()=>q.map((R,oe)=>{const{maxWidth:pe}=U(R,"two-row-bottom"),je=ct(oe)-Ai/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":R.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(pe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:de(je),width:de(Ai),height:"100%",pointerEvents:"auto"}})},`${R.widthKey}-junction`)}),We=s.useRef(null),Be=s.useRef(null),Ue=s.useRef(null),ge=s.useRef(null),ve=s.useRef([]),_e=s.useRef([]),Ze=s.useRef(0),we=s.useRef(null),Te=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Xe=s.useRef(null),ze=s.useRef(null),Ie=s.useRef(0),Ve=s.useRef("forward"),De=s.useRef(0),tt=s.useRef(null),nt=s.useRef(!1),st=t.length>1&&(!o||!!r),St=st?3:1,Bt=s.useMemo(()=>Array.from({length:St},()=>t).flat(),[t,St]),[zt,ft]=s.useState(!1),[wt,jt]=s.useState(!1),[At,xt]=s.useState(!0),Ft=s.useRef(null),Nt=s.useRef(null),Kt=s.useRef(!1),Jt=s.useRef(!1),Tt=s.useRef(null),Wt=s.useRef(null),rn=Pe&&!At,gt=s.useCallback(()=>{Pe&&(xt(!0),Wt.current&&clearTimeout(Wt.current),Wt.current=setTimeout(()=>{Te.current.isActive||xt(!1)},Wv))},[Pe]),Ae=s.useCallback(()=>{o||Jt.current||(Jt.current=!0,jt(!1),Tt.current=setTimeout(()=>{l()},Lo))},[o,l]),Ge=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":rn?"true":"false",style:{width:W.scalingValue(m??0,i),height:W.scalingValue(m??0,i),marginRight:re,"--close-icon-hover-color":f},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Ae,"aria-label":"Close",children:a.jsx(sn,{url:w,fill:h,hoverFill:i&&!r?h:f,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:re,height:"100%",pointerEvents:"auto"}})]}),rt=(R="two-row")=>a.jsx("div",{...R==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:de(T??0),flexShrink:0,...R==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...R==="two-row"&&o?{pointerEvents:"auto"}:{}}}),ht=()=>{const R=Q.find(Me=>Me.prefix==="title1"),oe=Q.filter(Me=>Me.prefix==="title2"||Me.prefix==="title3"),pe=oe.length>0||o||(I??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(T??0)>0||o?rt():null,R&&Ke(R,"two-row-top"),w&&Ge()]}),pe?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[oe.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[oe.map(Me=>Ke(Me,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[Ye(),Le()]})]}):null,a.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:He,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},yt=()=>a.jsxs(a.Fragment,{children:[(T??0)>0||o?rt("single-row"):null,Q.map(R=>Ke(R,"single-row")),o?a.jsxs(a.Fragment,{children:[ut(),lt()]}):null,w?Ge():null]}),Lt=s.useCallback(R=>!!(R.closest("[data-controls]")||R.closest(`.${e}-thumbnails`)||R.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:mt,backdropStyle:Vt,mediaAreaStyle:kt,overlayContentStyle:Mt,swipeHandlers:Xt,dismissAreaStyle:qt}=Od({enabled:ne??!1,onClose:Ae,animMs:Lo,isBlockedTarget:Lt}),Ht=()=>{if(!st||t.length===0)return Ze.current=0,0;const R=_e.current[0],oe=_e.current[t.length];if(!R||!oe)return Ze.current;const pe=oe.offsetLeft-R.offsetLeft;return pe>0&&(Ze.current=pe),Ze.current},Dt=(R=!1)=>{if(!st)return;const oe=Be.current,pe=Ht();!oe||pe<=0||pe<oe.clientWidth*.25||(oe.scrollLeft<=0?(oe.scrollLeft+=pe,R&&(Te.current.scrollLeft+=pe),nt.current&&(De.current+=pe)):oe.scrollLeft>=pe*2&&(oe.scrollLeft-=pe,R&&(Te.current.scrollLeft-=pe),nt.current&&(De.current-=pe)))},_t=(R,oe=(pe=>(pe=Be.current)==null?void 0:pe.scrollLeft)()??0)=>{if(!st)return R;let Me=t.length+R,je=1/0;for(let et=0;et<St;et++){const bt=et*t.length+R,Rt=_e.current[bt];if(!Rt)continue;const tn=Math.abs(Rt.offsetLeft-oe);tn<je&&(je=tn,Me=bt)}return Me},Ct=R=>{const oe=Be.current;return!R||!oe?!1:R.offsetWidth>oe.clientWidth+1},F=R=>{const oe=Be.current;if(!R||!oe||!Ct(R))return!1;const pe=R.offsetLeft,Me=pe+R.offsetWidth;return oe.scrollLeft>=pe-1&&oe.scrollLeft+oe.clientWidth<=Me+1},Ee=(R=(oe=>(oe=Be.current)==null?void 0:oe.scrollLeft)()??0)=>{for(let Me=0;Me<_e.current.length;Me+=1){const je=_e.current[Me];if(je&&F(je))return Me}let pe={flatIndex:0,distance:1/0};return _e.current.forEach((Me,je)=>{if(!Me)return;const et=Math.abs(Me.offsetLeft-R);et<pe.distance&&(pe={flatIndex:je,distance:et})}),pe.flatIndex},Fe=R=>{Be.current&&_e.current.forEach(oe=>{oe&&(oe.style.scrollSnapAlign=Ct(oe)&&R==="backward"?"end":"start")})},Oe=(R,oe,pe)=>{const Me=R-oe,je=Ee(oe),et=_e.current[je];if(F(et))return Ee(R)%t.length;const bt=_e.current[je+1],Rt=et?bt?bt.offsetLeft-et.offsetLeft:et.offsetWidth:0,tn=Rt>0?Me>Rt*gr?1:Me<-Rt*gr?-1:0:0;return tn===0?pe:st?(pe+tn+t.length)%t.length:Math.max(0,Math.min(t.length-1,pe+tn))},at=s.useCallback((R=!1)=>{if(C!=="on"||o)return;const oe=ge.current,pe=G.current,Me=ve.current[pe];if(!oe||!Me||oe.scrollWidth<=oe.clientWidth)return;const je=oe.scrollLeft,et=je+oe.clientWidth,bt=Me.offsetLeft,Rt=bt+Me.offsetWidth;if(bt>=je&&Rt<=et)return;const tn=oe.scrollWidth-oe.clientWidth;let Qt=je;if(!R&&Ft.current===null){const Ei=ve.current[pe-1],mo=ve.current[pe+1],or=Ei?Me.offsetLeft-Ei.offsetLeft:mo?mo.offsetLeft-Me.offsetLeft:Me.offsetWidth;Rt>et?Qt+=or:bt<je&&(Qt-=or)}else Rt>et?Qt=Rt-oe.clientWidth:Qt=bt;oe.scrollLeft=Math.max(0,Math.min(tn,Qt))},[o,C]),Et=s.useCallback((R=!1)=>{R&&(Kt.current=!0),Nt.current===null&&(Nt.current=requestAnimationFrame(()=>{Nt.current=null;const oe=Kt.current;Kt.current=!1,at(oe)}))},[at]),it=s.useCallback(R=>{if(R===G.current)return;const oe=G.current;G.current=R;const pe=Math.abs(R-oe)>1,Me=st&&t.length>1&&(oe===t.length-1&&R===0||oe===0&&R===t.length-1);le(R),Et(pe||Me)},[t.length,st,Et]),vt=()=>{if(!Be.current||t.length===0||Ft.current!==null||Te.current.isActive&&Te.current.hasMoved)return;const R=Be.current.scrollLeft,oe=Ee(R)%t.length;oe!==G.current&&it(oe)},Ot=()=>{Ft.current=null},It=R=>{const oe=Be.current;oe&&(oe.style.scrollSnapType=R?"":"none")},nn=()=>{var R;(R=ze.current)==null||R.call(ze),ze.current=null},un=()=>{tt.current!==null&&(cancelAnimationFrame(tt.current),tt.current=null),nt.current=!1},li=()=>{const R=Be.current;if(!R){tt.current=null,nt.current=!1;return}const oe=De.current-R.scrollLeft;if(Math.abs(oe)<.5){R.scrollLeft=De.current,Dt(),vt(),tt.current=null,nt.current=!1;return}R.scrollLeft+=oe*Ov,Dt(),vt(),gt(),tt.current=requestAnimationFrame(li)},ci=()=>{const R=Ue.current;R&&(R.style.transition="",R.style.transform="",R.style.willChange="")},er=(R,oe,pe,Me)=>{ci(),R.scrollLeft=oe,Ie.current=R.scrollLeft,Dt(),pe!==void 0?(G.current=pe,le(pe)):vt(),It(!0),Me==null||Me()},tr=(R,{behavior:oe="smooth",activeIndex:pe,onComplete:Me}={})=>{const je=Be.current,et=Ue.current;if(!je||!et)return;if(un(),nn(),It(!1),oe==="auto"){er(je,R,pe,Me);return}const bt=Math.abs(R-je.scrollLeft),Rt=Ev(bt,Fv,_v,je.clientWidth*.55);ze.current=Av(je,et,R,{duration:Rt,easing:Nv,onComplete:()=>{ze.current=null,er(je,R,pe,Me)}})},la=(R="smooth")=>{const oe=Be.current;if(!oe||t.length===0)return;const pe=Ee()%t.length,Me=_t(pe,oe.scrollLeft),je=_e.current[Me];je&&tr(je.offsetLeft,{behavior:R,activeIndex:pe})},ca=(R,oe="smooth",pe,Me)=>{const je=Be.current;if(!je||t.length===0)return;const et=(Me??je.scrollLeft)-R,bt=Ee(R),Rt=_e.current[bt];if(F(Rt)){It(!0),vt();return}const tn=_e.current[bt+1],Qt=Rt?tn?tn.offsetLeft-Rt.offsetLeft:Rt.offsetWidth:0;if((Qt>0?et>Qt*gr?1:et<-Qt*gr?-1:0:0)!==0){const fu=pe??bt%t.length,yu=Oe(Me??je.scrollLeft,R,fu);$n(yu,oe);return}const mo=Me??je.scrollLeft,or=Ee(mo),Zs=_e.current[or];if(Zs&&Math.abs(Zs.offsetLeft-mo)<1){It(!0),vt();return}la("auto")},$n=(R,oe="smooth")=>{const pe=Be.current;if(!pe||t.length===0)return;const Me=_t(R,pe.scrollLeft),je=_e.current[Me];je&&(oe==="smooth"?Ft.current=R:Ft.current=null,G.current=R,le(R),Et(!0),tr(je.offsetLeft,{behavior:oe,activeIndex:R,onComplete:oe==="smooth"?Ot:void 0}))},Pi=()=>{Xe.current&&(window.removeEventListener("pointerup",Xe.current),window.removeEventListener("pointercancel",Xe.current),Xe.current=null)},nr=(R,oe,pe,Me,je)=>{const et=pe-R,bt=Me-oe,Rt=Math.abs(et),tn=Math.abs(bt);if(Rt<zv||Rt<=tn)return!1;const Qt=et<0?1:-1,Ei=st?(je+Qt+t.length)%t.length:Math.max(0,Math.min(t.length-1,je+Qt));return Ei===je?!1:($n(Ei),!0)},di=R=>{if(!Te.current.isActive)return;Pi();const oe=Be.current;if(!oe)return;const{scrollLeft:pe,startActiveIndex:Me,hasMoved:je}=Te.current,et=oe.scrollLeft;Dt(!0),Te.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},ft(!1),R!==void 0&&oe.hasPointerCapture(R)&&oe.releasePointerCapture(R),je?ca(pe,"smooth",Me,et):(It(!0),vt()),gt()},ir=(R,oe)=>{const pe=we.current;we.current=null,pe&&(nr(pe.startX,pe.startY,R,oe,pe.startActiveIndex),gt())},da=R=>{if(!be)return;if(R.pointerType==="touch"){if(un(),It(!0),Lt(R.target))return;we.current={startX:R.clientX,startY:R.clientY,startActiveIndex:G.current};return}if(R.pointerType!=="mouse"||R.button!==0||Lt(R.target))return;const oe=Be.current;if(!oe)return;un(),nn(),ci(),Ft.current=null,Te.current={isActive:!0,startX:R.clientX,scrollLeft:oe.scrollLeft,startActiveIndex:G.current,hasMoved:!1},It(!1),gt(),oe.setPointerCapture(R.pointerId),Pi();const pe=Me=>{Me.pointerType==="mouse"&&di(Me.pointerId)};Xe.current=pe,window.addEventListener("pointerup",pe),window.addEventListener("pointercancel",pe)},ua=R=>{if(!be||R.pointerType!=="mouse")return;const oe=Be.current;if(!oe||!Te.current.isActive)return;if(R.buttons===0){di(R.pointerId);return}const pe=R.clientX-Te.current.startX;Math.abs(pe)>Bv&&(Te.current.hasMoved=!0,ft(!0)),Te.current.hasMoved&&(R.preventDefault(),oe.scrollLeft=Te.current.scrollLeft-pe,Dt(!0),vt(),gt())},Se=R=>{if(be){if(R.pointerType==="touch"){R.type==="pointerup"?ir(R.clientX,R.clientY):we.current=null;return}R.pointerType==="mouse"&&di(R.pointerId)}},qe=R=>{!be||R.pointerType!=="mouse"||di(R.pointerId)};return Bd(),s.useEffect(()=>{const R=requestAnimationFrame(()=>jt(!0));return()=>{cancelAnimationFrame(R),nn(),Pi(),Nt.current!==null&&(cancelAnimationFrame(Nt.current),Nt.current=null),Tt.current&&clearTimeout(Tt.current),Wt.current&&clearTimeout(Wt.current)}},[]),s.useEffect(()=>{if(!Pe){xt(!0);return}gt();const R=We.current;if(!R)return;const oe=()=>gt();return R.addEventListener("pointermove",oe),R.addEventListener("pointerdown",oe),()=>{R.removeEventListener("pointermove",oe),R.removeEventListener("pointerdown",oe),Wt.current&&clearTimeout(Wt.current)}},[Pe,gt]),s.useEffect(()=>{const R=oe=>{oe.key==="Escape"&&Ae()};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[Ae]),s.useLayoutEffect(()=>{Ht()},[_,t.length,st]),s.useLayoutEffect(()=>{o||$n(G.current,"auto")},[_,o]),s.useLayoutEffect(()=>{$n(0,"auto")},[t.length,st]),s.useEffect(()=>{const R=Be.current;if(!R||o||!ne)return;const oe=pe=>{if(pe.preventDefault(),Math.abs(pe.deltaY)<=Math.abs(pe.deltaX))return;const Me=pe.deltaMode===1?Dv:pe.deltaMode===2?R.clientHeight:1,je=pe.deltaY*Me*Hv;if(je!==0){if(nn(),nt.current||(nt.current=!0,De.current=R.scrollLeft,Ft.current=null,It(!1)),De.current+=je,!st){const et=R.scrollWidth-R.clientWidth;De.current=Math.max(0,Math.min(et,De.current))}gt(),tt.current===null&&(tt.current=requestAnimationFrame(li))}};return R.addEventListener("wheel",oe,{passive:!1}),()=>{R.removeEventListener("wheel",oe),un()}},[o,ne,st]),s.useEffect(()=>{const R=Be.current;if(!R)return;const oe=()=>{Dt(Te.current.isActive);const Me=R.scrollLeft,je=Me-Ie.current;Ie.current=Me;const et=Ze.current>0?Ze.current*.5:1/0;if(je!==0&&Math.abs(je)<et){const bt=je>0?"forward":"backward";bt!==Ve.current&&(Ve.current=bt,Fe(bt))}Te.current.isActive&&Te.current.hasMoved||vt()};R.addEventListener("scroll",oe,{passive:!0});const pe=new ResizeObserver(()=>{Ht(),Dt(Te.current.isActive),Fe(Ve.current),vt()});return pe.observe(R),()=>{nn(),R.removeEventListener("scroll",oe),pe.disconnect()}},[t.length,st]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{mt||Ae()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:wt?1:0,transition:`opacity ${Lo}ms ease`,pointerEvents:wt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Vt}}),a.jsxs("div",{ref:We,className:`${e}-lightbox-dismiss-area`,style:qt,...Xt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:kt,onClick:R=>R.stopPropagation(),children:a.jsx("div",{ref:Be,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":be&&t.length>0?"true":"false","data-mouse-dragging":zt?"true":"false",onPointerDown:da,onPointerMove:ua,onPointerUp:Se,onPointerCancel:Se,onLostPointerCapture:qe,children:a.jsx("div",{ref:Ue,className:`${e}-lightbox-strip-track`,style:{gap:_},children:Bt.map((R,oe)=>{const pe=R.image.objectFit??"contain",Me=oe%t.length,je=Math.floor(oe/t.length),et=hr(_),bt=`calc(-0.5 * (${et} + ${_}))`;return a.jsxs("div",{ref:Rt=>_e.current[oe]=Rt,className:`${e}-strip-item`,style:{height:P==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:R.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:pe}}),o&&Me<t.length-1&&je===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:bt,width:et,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${je}-${R.image.url}-${Me}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":rn?"true":"false",style:Mt,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:V,flexShrink:0,pointerEvents:"none"},children:o&&a.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:se,pointerEvents:"auto",zIndex:3}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:a.jsx("div",{className:`${e}-lightbox-content-area${J?` ${e}-lightbox-content-area-stacked`:""}`,children:($e||w)&&a.jsx("div",{className:`${e}-header ${J?`${e}-header-two-row`:`${e}-header-single-row`}`,children:J?ht():$e||w?yt():null})})})]}),t.length>1&&C==="on"&&(()=>{const R=hr(L),oe=`calc(-0.5 * (${L} + ${R}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:L},children:a.jsx("div",{ref:ge,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:pe=>pe.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":S,style:{gap:ie,"--thumbnail-active-color":z},children:[t.map((pe,Me)=>{const je=hr(ie),et=`calc(-0.5 * (${je} + ${ie}))`;return a.jsxs("div",{ref:bt=>{ve.current[Me]=bt},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":k===Me?"true":"false",onClick:()=>ne&&x==="click"&&$n(Me),onMouseEnter:()=>Re&&x==="hover"&&$n(Me),"aria-label":pe.image.name?`View ${pe.image.name}`:`View image ${Me+1}`,"aria-current":k===Me?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${ue?` ${e}-thumb-image-cover`:""}`,src:pe.image.url,alt:"",draggable:!1,style:{...fe,maxWidth:X,maxHeight:X,width:y.display==="cover"?"auto":"100%",height:"auto",objectFit:y.display==="cover"?"cover":"contain"}})}),o&&Me<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:et,width:je,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${pe.image.url}-${Me}`)}),o&&a.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:oe,height:R,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function ex(e){return`
14229
+ `;function Gn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const tc={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Px=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Ex={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:Gn("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:{...tc.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:{...tc.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:Gn("Question Padding Left"),questionPaddingTop:Gn("Question Padding Top"),questionPaddingBottom:Gn("Question Padding Bottom"),answerPaddingLeft:Gn("Answer Padding Left"),answerPaddingRight:Gn("Answer Padding Right"),answerPaddingTop:Gn("Answer Padding Top"),answerPaddingBottom:Gn("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01M0GB8Z9EQFMGYA20F2J0ACA8.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:[...Px],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Mx={element:Rx,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:Ex,sourceCode:Lx},Dn=e=>e.display==="cover",ca=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},nc=100,kx=.2,ic=8,Gd=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,r]=s.useState(0),[l,d]=s.useState(!1),c=s.useRef(null),u=s.useRef(0);u.current=o;const p=s.useMemo(()=>typeof window>"u"?nc:Math.max(nc,window.innerHeight*kx),[]),x=s.useCallback($=>Math.max(0,1-$/(p*1.5)),[p]),b=s.useCallback($=>Math.max(0,1-$/(p*.45)),[p]),m=s.useCallback($=>{const T=typeof window<"u"?window.innerHeight:800,k=Math.max(.88,1-$/T*.12);return`translateY(${$}px) scale(${k})`},[]),h=s.useCallback(()=>{c.current=null},[]),f=s.useCallback(()=>{d(!0),r(0),window.setTimeout(()=>d(!1),n),h()},[n,h]),v=s.useCallback(()=>{const $=typeof window<"u"?window.innerHeight:800;d(!0),r($),window.setTimeout(()=>{t(),h(),d(!1)},Math.min(n,200))},[n,t,h]),C=s.useCallback($=>{!e||l||$.pointerType==="touch"&&(i!=null&&i($.target)||(c.current={startX:$.clientX,startY:$.clientY,isLocked:null,pointerId:$.pointerId}))},[e,l,i]),y=s.useCallback($=>{const T=c.current;if(!e||!T||$.pointerType!=="touch"||T.pointerId!==$.pointerId)return;const k=$.clientX-T.startX,E=$.clientY-T.startY;if(T.isLocked===null){if(Math.abs(k)<ic&&Math.abs(E)<ic)return;if(E>0&&E>Math.abs(k))T.isLocked=!0,$.currentTarget.setPointerCapture($.pointerId);else{T.isLocked=!1,h();return}}if(!T.isLocked)return;$.preventDefault();const g=Math.max(0,E);u.current=g,r(g)},[e,h]),S=s.useCallback($=>{const T=c.current;if(!e||!T||$.pointerType!=="touch"||T.pointerId!==$.pointerId)return;const k=T.isLocked===!0;if($.currentTarget.hasPointerCapture($.pointerId)&&$.currentTarget.releasePointerCapture($.pointerId),!k){h();return}$.clientY-T.startY>=p?v():f()},[p,v,e,h,f]),j=s.useCallback($=>{S($)},[S]),N=s.useCallback($=>{S($)},[S]),U=o>0,W=l?`transform ${n}ms ease`:"none",R=l?`opacity ${n}ms ease`:"none",B=o>0||l;return{isSwipeDragging:U,backdropStyle:{opacity:x(o),transition:R},mediaAreaStyle:{transform:m(o),transition:W,touchAction:U?"none":void 0,willChange:U?"transform":void 0},overlayContentStyle:B?{opacity:b(o),transition:R}:void 0,swipeHandlers:e?{onPointerDown:C,onPointerMove:y,onPointerUp:j,onPointerCancel:N}:{},dismissAreaStyle:e?{touchAction:U?"none":"pan-x"}:void 0}},Ax="[data-lightbox-scrollable]",Xd=()=>{s.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,r=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(Ax)||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=r,window.scrollTo({top:e,left:0,behavior:"instant"})}},[])},Fx=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},_x=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Nx=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Wx=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(h,f)=>{_x(t),e.scrollLeft=h,f&&(r==null||r())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let p=!1,x=0;const b=()=>{t.removeEventListener("transitionend",m),clearTimeout(x)},m=h=>{h.target!==t||h.propertyName!=="transform"||p||(p=!0,b(),u(n,!0))};return t.addEventListener("transitionend",m),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${c}px, 0, 0)`,x=window.setTimeout(()=>{p||(p=!0,b(),u(n,!0))},i+64),()=>{p||(p=!0,b(),u(l-Nx(t),!1))}},Po=300,Hx=900,Dx=1500,Ox="cubic-bezier(0.16, 1, 0.3, 1)",Bx=3e3,zx=2,jx=16,Vx=.05,Gx=1,fr=.3,Xx=50,Yx=20,Ai=.004,oo=["title1","title2","title3"],qx={title1:"1",title2:"2",title3:"3"},Ux={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Kx={title1:.02,title2:.02,title3:.02},yr=e=>`max(${e}, ${Yx}px)`,Zx=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]}},Jx=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=Zx(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Gt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Qx=e=>[Gt(e,"fontFamily"),Gt(e,"fontSettings"),{type:"row",items:[Gt(e,"fontSize"),Gt(e,"lineHeight"),Gt(e,"letterSpacing"),Gt(e,"wordSpacing")]},Gt(e,"textAlign"),Gt(e,"textAppearance")],ev=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(oo.map(e=>[qx[e],Qx(e)]))}),Js=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},d)=>{if(r<=0||d<=0)return{overflow:r,widths:[d,...l]};const c=Math.min(r,d);return{overflow:r-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},Yd=(e,t)=>Js(e,t),xr=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},oc=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Js(e.length,n),effective:Yd(e.length,n)}},tv=(e,t,n,i,o,r,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:r,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),d},Fa=(e,t)=>{const n=i=>{const o=Gt(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[Ux[t]]}},nv=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),_a=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Kx[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Ut(i,n)},iv=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:x,closeIcon:b,closeIconMaxWidth:m,closeIconColor:h,closeIconHoverColor:f,thumbnailTrigger:v,thumbnailVisibility:C,thumbnailObjectFit:y,thumbnailActive:S,thumbnailActiveColor:j,title1Width:N,title2Width:U,title3Width:W,title1MarginLeft:R=0,title2MarginLeft:B=0,title3MarginLeft:$=0,titleRowMarginBottom:T=0,titleHeaderLayout:k="desktop",contentMarginTop:E,iconMarginLeft:g}=n,A=L=>O.scalingValue(L,i??!1),F=c??n.thumnailSize??.03,X=A(F),ee=A(u),P=A(p??.02),D=A(x??0),K=A(E??0),le=yr(K),re=A(g??0),[M,ie]=s.useState(0),G=s.useRef(M);G.current=M;const oe=t[M],{title1:te,title2:ye,title3:Me}=Jx(oe),w=_a("title1",Fa(n,"title1"),i),Y=_a("title2",Fa(n,"title2"),i),I=_a("title3",Fa(n,"title3"),i),z=k==="mobile",H=!o&&(!i||r),Te=H,fe=H,ve=H,de=Dn(y),he=de?{"--image-aspect-ratio":ca(y)}:void 0,we=!!(te||ye||Me),Z=s.useMemo(()=>tv(e,te,ye,Me,w,Y,I),[e,M,te,ye,Me,w,Y,I]),Q=s.useMemo(()=>({title1Width:N,title2Width:U,title3Width:W}),[N,U,W]),ae=s.useMemo(()=>Z.map(L=>Q[L.widthKey]),[Z,Q]),$e=s.useMemo(()=>Js(Z.length,ae),[Z.length,ae]),ke=s.useMemo(()=>Yd(Z.length,ae),[Z.length,ae]),xe=s.useMemo(()=>Z.filter(L=>L.prefix==="title1"),[Z]),V=s.useMemo(()=>Z.filter(L=>L.prefix==="title2"||L.prefix==="title3"),[Z]),pe=s.useMemo(()=>oc(xe,Q),[xe,Q]),se=s.useMemo(()=>oc(V,Q),[V,Q]),q=s.useCallback((L,ne)=>{const ue=Z.indexOf(L);if(!z||ne==="single-row")return{effectiveWidth:ke[ue]??0,resolvedWidth:$e[ue]??0,maxWidth:xr(ue,$e)};if(ne==="two-row-top"){const je=xe.indexOf(L);return{effectiveWidth:pe.effective[je]??0,resolvedWidth:pe.resolved[je]??0,maxWidth:xr(je,pe.resolved)}}const Ee=V.indexOf(L);return{effectiveWidth:se.effective[Ee]??0,resolvedWidth:se.resolved[Ee]??0,maxWidth:xr(Ee,se.resolved)}},[V,se,ke,$e,Z,xe,pe,z]),ce=s.useCallback(L=>O.scalingValue(L,i??!1),[i]),We=ce(T??0),ge=s.useMemo(()=>({title1MarginLeft:R,title2MarginLeft:B,title3MarginLeft:$}),[R,B,$]),J=s.useCallback(L=>Z.slice(0,L+1).reduce((ne,ue,Ee)=>ne+(ue!=null&&ue.marginLeftKey?ge[ue.marginLeftKey]??0:0)+($e[Ee]??0),0)+(z?0:R??0),[Z,ge,$e,z,R]),Ke=s.useCallback(()=>z?0:R??0,[z,R]),_e=s.useCallback(L=>V.slice(0,L).reduce((ne,ue,Ee)=>ne+(ue.marginLeftKey?ge[ue.marginLeftKey]??0:0)+(se.resolved[Ee]??0),0),[V,se.resolved,ge]),rt=s.useCallback(L=>{const ne=V[L];return _e(L)+(ne.marginLeftKey?ge[ne.marginLeftKey]??0:0)+(se.resolved[L]??0)},[V,se.resolved,_e,ge]),Ye=(L,ne)=>{const ue=L.marginLeftKey?ge[L.marginLeftKey]??0:0,{effectiveWidth:Ee,resolvedWidth:je,maxWidth:et}=q(L,ne),bt=o&&ne==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":L.prefix,style:{...ne==="single-row"?{gridArea:L.prefix}:{},width:ce(Ee),...ue>0?{marginLeft:ce(ue)}:{}},children:[a.jsx("p",{className:L.className,style:L.style,children:L.text}),bt&&L.marginLeftKey&&a.jsx("div",{"data-controls":L.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:ce(-ue),width:`max(${ce(ue)}, 10px)`,height:"100%",pointerEvents:"auto"}}),bt&&a.jsx("div",{"data-controls":L.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(et),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:ce(-Ai/2),width:ce(Ai),height:"100%",pointerEvents:"auto"}})]},L.className)},dt=()=>{const L=z?-1:Z.findIndex(Ee=>Ee.prefix==="title1"),ne=!z&&(o||(R??0)>0)?(()=>{const Ee=R??0,je=L>=0?$e[L]:N??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:0,width:`max(${ce(Ee)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,ue=Z.flatMap((Ee,je)=>{if(!Ee.marginLeftKey)return[];const et=ge[Ee.marginLeftKey]??0,bt=nv(Z,$e,ge,je)+Ke();return a.jsx("div",{"data-controls":Ee.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String($e[je]),style:{position:"absolute",top:0,left:ce(bt),width:`max(${ce(et)}, 10px)`,height:"100%",pointerEvents:"auto"}},Ee.marginLeftKey)});return ne?[ne,...ue]:ue},at=()=>Z.map((L,ne)=>{const ue=xr(ne,$e),je=J(ne)-Ai/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":L.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ue),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:ce(je),width:ce(Ai),height:"100%",pointerEvents:"auto"}})},`${L.widthKey}-junction`)}),Xe=()=>V.flatMap((L,ne)=>{if(!L.marginLeftKey)return[];const ue=ge[L.marginLeftKey]??0,Ee=_e(ne),{resolvedWidth:je}=q(L,"two-row-bottom");return a.jsx("div",{"data-controls":L.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:ce(Ee),width:`max(${ce(ue)}, 10px)`,height:"100%",pointerEvents:"auto"}},L.marginLeftKey)}),Le=()=>V.map((L,ne)=>{const{maxWidth:ue}=q(L,"two-row-bottom"),je=rt(ne)-Ai/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":L.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ue),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:ce(je),width:ce(Ai),height:"100%",pointerEvents:"auto"}})},`${L.widthKey}-junction`)}),He=s.useRef(null),Be=s.useRef(null),Ze=s.useRef(null),me=s.useRef(null),be=s.useRef([]),Ne=s.useRef([]),Je=s.useRef(0),Se=s.useRef(null),Ie=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),qe=s.useRef(null),ze=s.useRef(null),Re=s.useRef(0),Ve=s.useRef("forward"),De=s.useRef(0),tt=s.useRef(null),nt=s.useRef(!1),ct=t.length>1&&(!o||!!r),St=ct?3:1,Bt=s.useMemo(()=>Array.from({length:St},()=>t).flat(),[t,St]),[zt,ft]=s.useState(!1),[wt,jt]=s.useState(!1),[At,vt]=s.useState(!0),Ft=s.useRef(null),Nt=s.useRef(null),Kt=s.useRef(!1),Jt=s.useRef(!1),Tt=s.useRef(null),Wt=s.useRef(null),rn=Te&&!At,gt=s.useCallback(()=>{Te&&(vt(!0),Wt.current&&clearTimeout(Wt.current),Wt.current=setTimeout(()=>{Ie.current.isActive||vt(!1)},Bx))},[Te]),Ae=s.useCallback(()=>{o||Jt.current||(Jt.current=!0,jt(!1),Tt.current=setTimeout(()=>{l()},Po))},[o,l]),Ge=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":rn?"true":"false",style:{width:O.scalingValue(m??0,i),height:O.scalingValue(m??0,i),marginRight:re,"--close-icon-hover-color":f},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Ae,"aria-label":"Close",children:a.jsx(sn,{url:b,fill:h,hoverFill:i&&!r?h:f,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:re,height:"100%",pointerEvents:"auto"}})]}),st=(L="two-row")=>a.jsx("div",{...L==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:ce(R??0),flexShrink:0,...L==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...L==="two-row"&&o?{pointerEvents:"auto"}:{}}}),ht=()=>{const L=Z.find(Ee=>Ee.prefix==="title1"),ne=Z.filter(Ee=>Ee.prefix==="title2"||Ee.prefix==="title3"),ue=ne.length>0||o||(T??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(R??0)>0||o?st():null,L&&Ye(L,"two-row-top"),b&&Ge()]}),ue?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[ne.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[ne.map(Ee=>Ye(Ee,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[Xe(),Le()]})]}):null,a.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:We,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},yt=()=>a.jsxs(a.Fragment,{children:[(R??0)>0||o?st("single-row"):null,Z.map(L=>Ye(L,"single-row")),o?a.jsxs(a.Fragment,{children:[dt(),at()]}):null,b?Ge():null]}),Lt=s.useCallback(L=>!!(L.closest("[data-controls]")||L.closest(`.${e}-thumbnails`)||L.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:mt,backdropStyle:Vt,mediaAreaStyle:kt,overlayContentStyle:Mt,swipeHandlers:Xt,dismissAreaStyle:Yt}=Gd({enabled:H??!1,onClose:Ae,animMs:Po,isBlockedTarget:Lt}),Ht=()=>{if(!ct||t.length===0)return Je.current=0,0;const L=Ne.current[0],ne=Ne.current[t.length];if(!L||!ne)return Je.current;const ue=ne.offsetLeft-L.offsetLeft;return ue>0&&(Je.current=ue),Je.current},Dt=(L=!1)=>{if(!ct)return;const ne=Be.current,ue=Ht();!ne||ue<=0||ue<ne.clientWidth*.25||(ne.scrollLeft<=0?(ne.scrollLeft+=ue,L&&(Ie.current.scrollLeft+=ue),nt.current&&(De.current+=ue)):ne.scrollLeft>=ue*2&&(ne.scrollLeft-=ue,L&&(Ie.current.scrollLeft-=ue),nt.current&&(De.current-=ue)))},_t=(L,ne=(ue=>(ue=Be.current)==null?void 0:ue.scrollLeft)()??0)=>{if(!ct)return L;let Ee=t.length+L,je=1/0;for(let et=0;et<St;et++){const bt=et*t.length+L,Rt=Ne.current[bt];if(!Rt)continue;const tn=Math.abs(Rt.offsetLeft-ne);tn<je&&(je=tn,Ee=bt)}return Ee},Ct=L=>{const ne=Be.current;return!L||!ne?!1:L.offsetWidth>ne.clientWidth+1},_=L=>{const ne=Be.current;if(!L||!ne||!Ct(L))return!1;const ue=L.offsetLeft,Ee=ue+L.offsetWidth;return ne.scrollLeft>=ue-1&&ne.scrollLeft+ne.clientWidth<=Ee+1},Pe=(L=(ne=>(ne=Be.current)==null?void 0:ne.scrollLeft)()??0)=>{for(let Ee=0;Ee<Ne.current.length;Ee+=1){const je=Ne.current[Ee];if(je&&_(je))return Ee}let ue={flatIndex:0,distance:1/0};return Ne.current.forEach((Ee,je)=>{if(!Ee)return;const et=Math.abs(Ee.offsetLeft-L);et<ue.distance&&(ue={flatIndex:je,distance:et})}),ue.flatIndex},Fe=L=>{Be.current&&Ne.current.forEach(ne=>{ne&&(ne.style.scrollSnapAlign=Ct(ne)&&L==="backward"?"end":"start")})},Oe=(L,ne,ue)=>{const Ee=L-ne,je=Pe(ne),et=Ne.current[je];if(_(et))return Pe(L)%t.length;const bt=Ne.current[je+1],Rt=et?bt?bt.offsetLeft-et.offsetLeft:et.offsetWidth:0,tn=Rt>0?Ee>Rt*fr?1:Ee<-Rt*fr?-1:0:0;return tn===0?ue:ct?(ue+tn+t.length)%t.length:Math.max(0,Math.min(t.length-1,ue+tn))},lt=s.useCallback((L=!1)=>{if(C!=="on"||o)return;const ne=me.current,ue=G.current,Ee=be.current[ue];if(!ne||!Ee||ne.scrollWidth<=ne.clientWidth)return;const je=ne.scrollLeft,et=je+ne.clientWidth,bt=Ee.offsetLeft,Rt=bt+Ee.offsetWidth;if(bt>=je&&Rt<=et)return;const tn=ne.scrollWidth-ne.clientWidth;let Qt=je;if(!L&&Ft.current===null){const Ei=be.current[ue-1],go=be.current[ue+1],ar=Ei?Ee.offsetLeft-Ei.offsetLeft:go?go.offsetLeft-Ee.offsetLeft:Ee.offsetWidth;Rt>et?Qt+=ar:bt<je&&(Qt-=ar)}else Rt>et?Qt=Rt-ne.clientWidth:Qt=bt;ne.scrollLeft=Math.max(0,Math.min(tn,Qt))},[o,C]),Et=s.useCallback((L=!1)=>{L&&(Kt.current=!0),Nt.current===null&&(Nt.current=requestAnimationFrame(()=>{Nt.current=null;const ne=Kt.current;Kt.current=!1,lt(ne)}))},[lt]),it=s.useCallback(L=>{if(L===G.current)return;const ne=G.current;G.current=L;const ue=Math.abs(L-ne)>1,Ee=ct&&t.length>1&&(ne===t.length-1&&L===0||ne===0&&L===t.length-1);ie(L),Et(ue||Ee)},[t.length,ct,Et]),xt=()=>{if(!Be.current||t.length===0||Ft.current!==null||Ie.current.isActive&&Ie.current.hasMoved)return;const L=Be.current.scrollLeft,ne=Pe(L)%t.length;ne!==G.current&&it(ne)},Ot=()=>{Ft.current=null},It=L=>{const ne=Be.current;ne&&(ne.style.scrollSnapType=L?"":"none")},nn=()=>{var L;(L=ze.current)==null||L.call(ze),ze.current=null},un=()=>{tt.current!==null&&(cancelAnimationFrame(tt.current),tt.current=null),nt.current=!1},li=()=>{const L=Be.current;if(!L){tt.current=null,nt.current=!1;return}const ne=De.current-L.scrollLeft;if(Math.abs(ne)<.5){L.scrollLeft=De.current,Dt(),xt(),tt.current=null,nt.current=!1;return}L.scrollLeft+=ne*Vx,Dt(),xt(),gt(),tt.current=requestAnimationFrame(li)},ci=()=>{const L=Ze.current;L&&(L.style.transition="",L.style.transform="",L.style.willChange="")},nr=(L,ne,ue,Ee)=>{ci(),L.scrollLeft=ne,Re.current=L.scrollLeft,Dt(),ue!==void 0?(G.current=ue,ie(ue)):xt(),It(!0),Ee==null||Ee()},ir=(L,{behavior:ne="smooth",activeIndex:ue,onComplete:Ee}={})=>{const je=Be.current,et=Ze.current;if(!je||!et)return;if(un(),nn(),It(!1),ne==="auto"){nr(je,L,ue,Ee);return}const bt=Math.abs(L-je.scrollLeft),Rt=Fx(bt,Hx,Dx,je.clientWidth*.55);ze.current=Wx(je,et,L,{duration:Rt,easing:Ox,onComplete:()=>{ze.current=null,nr(je,L,ue,Ee)}})},ua=(L="smooth")=>{const ne=Be.current;if(!ne||t.length===0)return;const ue=Pe()%t.length,Ee=_t(ue,ne.scrollLeft),je=Ne.current[Ee];je&&ir(je.offsetLeft,{behavior:L,activeIndex:ue})},pa=(L,ne="smooth",ue,Ee)=>{const je=Be.current;if(!je||t.length===0)return;const et=(Ee??je.scrollLeft)-L,bt=Pe(L),Rt=Ne.current[bt];if(_(Rt)){It(!0),xt();return}const tn=Ne.current[bt+1],Qt=Rt?tn?tn.offsetLeft-Rt.offsetLeft:Rt.offsetWidth:0;if((Qt>0?et>Qt*fr?1:et<-Qt*fr?-1:0:0)!==0){const bu=ue??bt%t.length,wu=Oe(Ee??je.scrollLeft,L,bu);$n(wu,ne);return}const go=Ee??je.scrollLeft,ar=Pe(go),tl=Ne.current[ar];if(tl&&Math.abs(tl.offsetLeft-go)<1){It(!0),xt();return}ua("auto")},$n=(L,ne="smooth")=>{const ue=Be.current;if(!ue||t.length===0)return;const Ee=_t(L,ue.scrollLeft),je=Ne.current[Ee];je&&(ne==="smooth"?Ft.current=L:Ft.current=null,G.current=L,ie(L),Et(!0),ir(je.offsetLeft,{behavior:ne,activeIndex:L,onComplete:ne==="smooth"?Ot:void 0}))},Pi=()=>{qe.current&&(window.removeEventListener("pointerup",qe.current),window.removeEventListener("pointercancel",qe.current),qe.current=null)},or=(L,ne,ue,Ee,je)=>{const et=ue-L,bt=Ee-ne,Rt=Math.abs(et),tn=Math.abs(bt);if(Rt<Xx||Rt<=tn)return!1;const Qt=et<0?1:-1,Ei=ct?(je+Qt+t.length)%t.length:Math.max(0,Math.min(t.length-1,je+Qt));return Ei===je?!1:($n(Ei),!0)},di=L=>{if(!Ie.current.isActive)return;Pi();const ne=Be.current;if(!ne)return;const{scrollLeft:ue,startActiveIndex:Ee,hasMoved:je}=Ie.current,et=ne.scrollLeft;Dt(!0),Ie.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},ft(!1),L!==void 0&&ne.hasPointerCapture(L)&&ne.releasePointerCapture(L),je?pa(ue,"smooth",Ee,et):(It(!0),xt()),gt()},rr=(L,ne)=>{const ue=Se.current;Se.current=null,ue&&(or(ue.startX,ue.startY,L,ne,ue.startActiveIndex),gt())},ma=L=>{if(!fe)return;if(L.pointerType==="touch"){if(un(),It(!0),Lt(L.target))return;Se.current={startX:L.clientX,startY:L.clientY,startActiveIndex:G.current};return}if(L.pointerType!=="mouse"||L.button!==0||Lt(L.target))return;const ne=Be.current;if(!ne)return;un(),nn(),ci(),Ft.current=null,Ie.current={isActive:!0,startX:L.clientX,scrollLeft:ne.scrollLeft,startActiveIndex:G.current,hasMoved:!1},It(!1),gt(),ne.setPointerCapture(L.pointerId),Pi();const ue=Ee=>{Ee.pointerType==="mouse"&&di(Ee.pointerId)};qe.current=ue,window.addEventListener("pointerup",ue),window.addEventListener("pointercancel",ue)},ga=L=>{if(!fe||L.pointerType!=="mouse")return;const ne=Be.current;if(!ne||!Ie.current.isActive)return;if(L.buttons===0){di(L.pointerId);return}const ue=L.clientX-Ie.current.startX;Math.abs(ue)>Gx&&(Ie.current.hasMoved=!0,ft(!0)),Ie.current.hasMoved&&(L.preventDefault(),ne.scrollLeft=Ie.current.scrollLeft-ue,Dt(!0),xt(),gt())},Ce=L=>{if(fe){if(L.pointerType==="touch"){L.type==="pointerup"?rr(L.clientX,L.clientY):Se.current=null;return}L.pointerType==="mouse"&&di(L.pointerId)}},Ue=L=>{!fe||L.pointerType!=="mouse"||di(L.pointerId)};return Xd(),s.useEffect(()=>{const L=requestAnimationFrame(()=>jt(!0));return()=>{cancelAnimationFrame(L),nn(),Pi(),Nt.current!==null&&(cancelAnimationFrame(Nt.current),Nt.current=null),Tt.current&&clearTimeout(Tt.current),Wt.current&&clearTimeout(Wt.current)}},[]),s.useEffect(()=>{if(!Te){vt(!0);return}gt();const L=He.current;if(!L)return;const ne=()=>gt();return L.addEventListener("pointermove",ne),L.addEventListener("pointerdown",ne),()=>{L.removeEventListener("pointermove",ne),L.removeEventListener("pointerdown",ne),Wt.current&&clearTimeout(Wt.current)}},[Te,gt]),s.useEffect(()=>{const L=ne=>{ne.key==="Escape"&&Ae()};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[Ae]),s.useLayoutEffect(()=>{Ht()},[D,t.length,ct]),s.useLayoutEffect(()=>{o||$n(G.current,"auto")},[D,o]),s.useLayoutEffect(()=>{$n(0,"auto")},[t.length,ct]),s.useEffect(()=>{const L=Be.current;if(!L||o||!H)return;const ne=ue=>{if(ue.preventDefault(),Math.abs(ue.deltaY)<=Math.abs(ue.deltaX))return;const Ee=ue.deltaMode===1?jx:ue.deltaMode===2?L.clientHeight:1,je=ue.deltaY*Ee*zx;if(je!==0){if(nn(),nt.current||(nt.current=!0,De.current=L.scrollLeft,Ft.current=null,It(!1)),De.current+=je,!ct){const et=L.scrollWidth-L.clientWidth;De.current=Math.max(0,Math.min(et,De.current))}gt(),tt.current===null&&(tt.current=requestAnimationFrame(li))}};return L.addEventListener("wheel",ne,{passive:!1}),()=>{L.removeEventListener("wheel",ne),un()}},[o,H,ct]),s.useEffect(()=>{const L=Be.current;if(!L)return;const ne=()=>{Dt(Ie.current.isActive);const Ee=L.scrollLeft,je=Ee-Re.current;Re.current=Ee;const et=Je.current>0?Je.current*.5:1/0;if(je!==0&&Math.abs(je)<et){const bt=je>0?"forward":"backward";bt!==Ve.current&&(Ve.current=bt,Fe(bt))}Ie.current.isActive&&Ie.current.hasMoved||xt()};L.addEventListener("scroll",ne,{passive:!0});const ue=new ResizeObserver(()=>{Ht(),Dt(Ie.current.isActive),Fe(Ve.current),xt()});return ue.observe(L),()=>{nn(),L.removeEventListener("scroll",ne),ue.disconnect()}},[t.length,ct]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{mt||Ae()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:wt?1:0,transition:`opacity ${Po}ms ease`,pointerEvents:wt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Vt}}),a.jsxs("div",{ref:He,className:`${e}-lightbox-dismiss-area`,style:Yt,...Xt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:kt,onClick:L=>L.stopPropagation(),children:a.jsx("div",{ref:Be,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":fe&&t.length>0?"true":"false","data-mouse-dragging":zt?"true":"false",onPointerDown:ma,onPointerMove:ga,onPointerUp:Ce,onPointerCancel:Ce,onLostPointerCapture:Ue,children:a.jsx("div",{ref:Ze,className:`${e}-lightbox-strip-track`,style:{gap:D},children:Bt.map((L,ne)=>{const ue=L.image.objectFit??"contain",Ee=ne%t.length,je=Math.floor(ne/t.length),et=yr(D),bt=`calc(-0.5 * (${et} + ${D}))`;return a.jsxs("div",{ref:Rt=>Ne.current[ne]=Rt,className:`${e}-strip-item`,style:{height:k==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:L.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:ue}}),o&&Ee<t.length-1&&je===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:bt,width:et,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${je}-${L.image.url}-${Ee}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":rn?"true":"false",style:Mt,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:K,flexShrink:0,pointerEvents:"none"},children:o&&a.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:le,pointerEvents:"auto",zIndex:3}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:a.jsx("div",{className:`${e}-lightbox-content-area${z?` ${e}-lightbox-content-area-stacked`:""}`,children:(we||b)&&a.jsx("div",{className:`${e}-header ${z?`${e}-header-two-row`:`${e}-header-single-row`}`,children:z?ht():we||b?yt():null})})})]}),t.length>1&&C==="on"&&(()=>{const L=yr(P),ne=`calc(-0.5 * (${P} + ${L}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:P},children:a.jsx("div",{ref:me,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:ue=>ue.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":S,style:{gap:ee,"--thumbnail-active-color":j},children:[t.map((ue,Ee)=>{const je=yr(ee),et=`calc(-0.5 * (${je} + ${ee}))`;return a.jsxs("div",{ref:bt=>{be.current[Ee]=bt},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":M===Ee?"true":"false",onClick:()=>H&&v==="click"&&$n(Ee),onMouseEnter:()=>ve&&v==="hover"&&$n(Ee),"aria-label":ue.image.name?`View ${ue.image.name}`:`View image ${Ee+1}`,"aria-current":M===Ee?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${de?` ${e}-thumb-image-cover`:""}`,src:ue.image.url,alt:"",draggable:!1,style:{...he,maxWidth:X,maxHeight:X,width:y.display==="cover"?"auto":"100%",height:"auto",objectFit:y.display==="cover"?"cover":"contain"}})}),o&&Ee<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:et,width:je,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${ue.image.url}-${Ee}`)}),o&&a.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:ne,height:L,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function ov(e){return`
14226
14230
  .${e}-wrapper {
14227
14231
  position: relative;
14228
14232
  width: 100%;
@@ -14453,7 +14457,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14453
14457
  background-color: transparent;
14454
14458
  padding: 0;
14455
14459
  opacity: 1;
14456
- transition: opacity ${Lo}ms ease;
14460
+ transition: opacity ${Po}ms ease;
14457
14461
  }
14458
14462
 
14459
14463
  .${e}-close-icon[data-overlay-content-hidden="true"] {
@@ -14566,7 +14570,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14566
14570
  display: flex;
14567
14571
  flex-direction: column;
14568
14572
  opacity: 1;
14569
- transition: opacity ${Lo}ms ease;
14573
+ transition: opacity ${Po}ms ease;
14570
14574
  }
14571
14575
 
14572
14576
  .${e}-lightbox-content-inner[data-overlay-content-hidden="true"] {
@@ -14607,7 +14611,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14607
14611
  pointer-events: auto;
14608
14612
  z-index: 10;
14609
14613
  }
14610
- `}const tx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=W.useScopedStyles(),{cover:d,coverFit:c}=e,u=s.useRef(null),[p,v]=s.useState(!1),w=t??[],m=p&&w.length>0,h=()=>{w.length!==0&&v(!0)};return s.useEffect(()=>{!n||i||o||v(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ex(l)}}),d&&a.jsx("div",{className:`${l}-cover ${Dn(c)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>h(),style:{...Dn(c)?{"--image-aspect-ratio":aa(c)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${Dn(c)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:d,alt:"cover"})})]}),m&&typeof document<"u"&&(()=>{const f=(r?document.getElementById(r):null)??document.body;return zn.createPortal(a.jsx(Qv,{prefix:l,images:w,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>v(!1)}),f)})()]})},nx=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
14614
+ `}const rv=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=O.useScopedStyles(),{cover:d,coverFit:c}=e,u=s.useRef(null),[p,x]=s.useState(!1),b=t??[],m=p&&b.length>0,h=()=>{b.length!==0&&x(!0)};return s.useEffect(()=>{!n||i||o||x(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ov(l)}}),d&&a.jsx("div",{className:`${l}-cover ${Dn(c)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>h(),style:{...Dn(c)?{"--image-aspect-ratio":ca(c)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${Dn(c)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:d,alt:"cover"})})]}),m&&typeof document<"u"&&(()=>{const f=(r?document.getElementById(r):null)??document.body;return zn.createPortal(a.jsx(iv,{prefix:l,images:b,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>x(!1)}),f)})()]})},av=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
14611
14615
  import { createPortal } from 'react-dom';
14612
14616
  import { CommonComponentProps } from '../props';
14613
14617
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -15153,7 +15157,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15153
15157
  </>
15154
15158
  );
15155
15159
  };
15156
- `,ix="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>'),hi={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 ox(e){const t={};return t[Gt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Gt(e,"fontSettings")]={...hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Gt(e,"fontSize")]={...hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Gt(e,"lineHeight")]={...hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Gt(e,"letterSpacing")]={...hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Gt(e,"wordSpacing")]={...hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Gt(e,"textAlign")]={...hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Gt(e,"textAppearance")]={...hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const rx=io.reduce((e,t)=>({...e,...ox(t)}),{}),ax=io.reduce((e,t)=>({...e,[Gt(t,"fontFamily")]:"Goudy Bookletter 1911",[Gt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Gt(t,"letterSpacing")]:0,[Gt(t,"wordSpacing")]:0,[Gt(t,"textAlign")]:"left",[Gt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Aa(e){return io.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Gt(n,"fontSize")]=i),o!==void 0&&(t[Gt(n,"lineHeight")]=o),t},{})}const sx=Kv(),lx={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"}},...rx,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:ix,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...ax},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,...Aa({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,...Aa({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,...Aa({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:[sx]}],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"}]}},cx={element:tx,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:lx,sourceCode:nx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...io.map(e=>({path:`${Gt(e,"fontFamily")}`}))]},fontRelations:{...io.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Gt(t,"fontFamily")}`}),{})}},dx=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,initialSlideIndex:l=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:p})=>{const{type:v,coverFit:w,backgroundColor:m,imageGap:h,maxWidth:f,maxHeight:x,textTransition:C,title1Width:y,title2Width:S,title3Width:z,title1MarginLeft:N=0,title2MarginLeft:Y=0,title3MarginLeft:B=0,titleRowMarginBottom:T=0,titleHeaderLayout:H="single-row",countCloseGap:$=0,closeIcon:I,closeIconMaxWidth:P,closeIconColor:M,closeIconHoverColor:g,contentMarginTop:D=0,iconMarginRight:A=0}=n,X=s.useCallback(Se=>W.scalingValue(Se,i??!1),[i]),ie=X(h??0),L=`${f}%`,_=`${x}%`,V=X($),se=X(D),re=X(A),k=bi("title1",xi(n,"title1"),i),le=bi("title2",xi(n,"title2"),i),G=bi("title3",xi(n,"title3"),i),b=bi("count",xi(n,"count"),i),E=H==="mobile",j=!i||!!r,me=!o&&(!i||!!r),K=s.useMemo(()=>Ir(t,v),[t,v]),[te,O]=s.useState(l),J=K[te],ne=J==null?void 0:J.entry,[Pe,be]=s.useState(!1),[Re,ue]=s.useState(null),[fe,$e]=s.useState(!1),[Q,Z]=s.useState(null),[ae,xe]=s.useState(!1),[ke,Ce]=s.useState(0),[q,ye]=s.useState(),[ce,U]=s.useState(),[de,He]=s.useState(null),he=s.useRef(null),ee=s.useRef(0),Je=s.useRef(0),Ne=s.useRef(0),ct=s.useRef(!1),Ke=s.useRef(null),ut=s.useRef(null),lt=s.useRef(null),Ye=s.useRef(null),Le=s.useRef(null),We=s.useRef(null),Be=s.useRef(null),Ue=s.useCallback(()=>{const Se=ut.current;if(!Se)return;const qe=Se.closest(`.${e}-lightbox-content-area`);if(!qe)return Se.getBoundingClientRect().width;const R=Array.from(qe.children).reduce((oe,pe)=>!(pe instanceof HTMLElement)||pe.contains(Se)?oe:oe+pe.getBoundingClientRect().width,0);return qe.getBoundingClientRect().width-R},[e]),ge=s.useCallback(()=>{he.current&&(clearTimeout(he.current),he.current=null)},[]),ve=s.useCallback(Se=>{Se===ee.current&&(Z(null),xe(!1))},[]),_e=s.useCallback(()=>{o||ct.current||(ct.current=!0,u==null||u(),be(!1),Ke.current=setTimeout(()=>{p()},300))},[o,u,p]),Ze=s.useCallback(Se=>!!(Se.closest("[data-controls]")||Se.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:we,backdropStyle:Te,mediaAreaStyle:Xe,overlayContentStyle:ze,swipeHandlers:Ie,dismissAreaStyle:Ve}=Od({enabled:me,onClose:_e,animMs:300,isBlockedTarget:Ze}),De=s.useCallback(Se=>{d&&Sd(Se+1,c,!0)},[d,c]),tt=s.useCallback(Se=>{if(Se)return Se.getBoundingClientRect().height},[]),nt=s.useCallback(Se=>{if(K.length===0)return;const qe=(Se%K.length+K.length)%K.length;if(qe===te)return;const R=K[te],oe=K[qe];ee.current+=1;const pe=ee.current,Me=C==="fade"&&Pl(R==null?void 0:R.entry)!==Pl(oe==null?void 0:oe.entry),je=tt(lt.current),et=Me?(()=>{const Rt=Ue();zn.flushSync(()=>{He(oe.entry)}),lt.current&&Rt&&(lt.current.style.width=`${Rt}px`);const tn=tt(lt.current);return lt.current&&(lt.current.style.width=""),{measuredIncomingTitlesHeight:tn,incomingTitlesMeasureWidth:Rt}})():void 0,bt=Math.max(je??0,(et==null?void 0:et.measuredIncomingTitlesHeight)??0)||void 0;Ce(pe),Z(te),xe(!0),O(qe),De(qe),Ne.current=qe,Me?(ge(),bt&&ye(bt),et!=null&&et.incomingTitlesMeasureWidth&&U(et.incomingTitlesMeasureWidth),ue((R==null?void 0:R.entryIndex)??null),$e(!0),Je.current=oe.entryIndex,he.current=setTimeout(()=>{ue(null),$e(!1),ye(void 0),U(void 0),He(null),he.current=null},400)):(ge(),ue(null),$e(!1),ye(void 0),U(void 0),He(null),Je.current=oe.entryIndex)},[te,ge,Ue,tt,K,De,C]),st=s.useCallback(()=>{Be.current=null},[]),St=s.useCallback(Se=>{!j||K.length<=1||Se.pointerType==="mouse"&&Se.button!==0||Se.target.closest("[data-controls]")||(Be.current={startX:Se.clientX,startY:Se.clientY,pointerId:Se.pointerId})},[j,K.length]),Bt=s.useCallback(Se=>{var Rt;if(!j||K.length<=1||Se.pointerType==="mouse"&&Se.button!==0)return;if(we){st();return}const qe=Be.current;if(!qe||qe.pointerId!==Se.pointerId||(st(),Se.target.closest("[data-controls]")))return;const oe=Se.clientX-qe.startX,pe=Se.clientY-qe.startY,Me=Math.abs(oe),je=Math.abs(pe);if(Me>=Sf&&Me>je){nt(oe>0?te-1:te+1);return}if(Me>Tl||je>Tl)return;const et=(Rt=Ye.current)==null?void 0:Rt.getBoundingClientRect(),bt=et?et.left+et.width/2:window.innerWidth/2;nt(Se.clientX<bt?te-1:te+1)},[te,j,nt,we,st,K.length]),zt=s.useCallback(Se=>{const qe=Be.current;(qe==null?void 0:qe.pointerId)===Se.pointerId&&st()},[st]);Bd(),s.useEffect(()=>{We.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const Se=requestAnimationFrame(()=>{be(!0),requestAnimationFrame(()=>{Le.current?Le.current.focus():Ye.current&&Ye.current.focus()})});return()=>{cancelAnimationFrame(Se),Ke.current&&clearTimeout(Ke.current),he.current&&clearTimeout(he.current);const qe=We.current;qe&&document.contains(qe)&&qe.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var Se;C!=="fade"&&(Je.current=((Se=K[te])==null?void 0:Se.entryIndex)??0,ge(),ue(null),$e(!1),ye(void 0),U(void 0))},[te,ge,K,C]),s.useEffect(()=>{const Se=qe=>{if(qe.key==="Escape"){_e();return}if(qe.key==="ArrowLeft"&&K.length>1){nt(te-1);return}if(qe.key==="ArrowRight"&&K.length>1){nt(te+1);return}if(qe.key==="Tab"&&Ye.current){const R=Ye.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),oe=Array.from(R).filter(et=>!et.closest('[aria-hidden="true"]'));if(oe.length===0)return;const pe=oe[0],Me=oe[oe.length-1],je=document.activeElement;qe.shiftKey?(je===pe||!Ye.current.contains(je))&&(qe.preventDefault(),Me.focus()):(je===Me||!Ye.current.contains(je))&&(qe.preventDefault(),pe.focus())}};return window.addEventListener("keydown",Se),()=>window.removeEventListener("keydown",Se)},[nt,_e,te,K.length]),s.useLayoutEffect(()=>{ge(),ee.current=0,Ce(0),Z(null),xe(!1),ue(null),$e(!1),ye(void 0),U(void 0),He(null),O(Se=>{const qe=Math.max(0,K.length-1);return Math.min(Se,qe)})},[ge,t.length,v,K.length]),s.useLayoutEffect(()=>{var R;const Se=Math.max(0,K.length-1),qe=Math.min(Math.max(0,l),Se);Ne.current=qe,Je.current=((R=K[qe])==null?void 0:R.entryIndex)??0,O(qe)},[l]);const ft=Re!==null?t[Re]:null,wt=Q!==null?K[Q]:null,jt=(ne==null?void 0:ne.title1)||(ne==null?void 0:ne.title2)||(ne==null?void 0:ne.title3)||(ft==null?void 0:ft.title1)||(ft==null?void 0:ft.title2)||(ft==null?void 0:ft.title3),At=Ef(v,K,t),xt=I!==null,Ft=jt||At||xt,Nt=At&&xt?{gap:V}:void 0,Kt=`${e}-titles-stack${E?` ${e}-titles-stack-stacked`:""}`,Jt=`${e}-titles-layer-out${E?` ${e}-titles-layer-out-stacked`:""}`,Tt=`${e}-titles-layer-out`,Wt=(N??0)>0||o,rn=X(T),gt=s.useMemo(()=>({title1Width:y??Gi.title1Width,title2Width:S??Gi.title2Width,title3Width:z??Gi.title3Width}),[y,S,z]),Ae=s.useMemo(()=>({title2MarginLeft:Y,title3MarginLeft:B}),[Y,B]),Ge=s.useMemo(()=>ne?Kn(e,ne,k,le,G):[],[e,ne,k,le,G]),rt=s.useMemo(()=>Ge.map(Se=>gt[Se.widthKey]),[Ge,gt]),ht=s.useMemo(()=>Zi(Ge.length,rt),[Ge.length,rt]),yt=s.useMemo(()=>No(Ge.length,rt),[Ge.length,rt]),Lt=s.useMemo(()=>Ge.filter(Se=>Se.prefix==="title1"),[Ge]),mt=s.useMemo(()=>Ge.filter(Se=>Se.prefix==="title2"||Se.prefix==="title3"),[Ge]),Vt=s.useMemo(()=>Zn(Lt,gt),[Lt,gt]),kt=s.useMemo(()=>Zn(mt,gt),[mt,gt]),Mt=s.useCallback((Se,qe)=>{const R=Ge.findIndex(pe=>pe.prefix===Se.prefix);if(!E||qe==="single-row")return{effectiveWidth:yt[R]??0,resolvedWidth:ht[R]??0,maxWidth:cn(R,ht)};if(qe==="two-row-top"){const pe=Lt.findIndex(Me=>Me.prefix===Se.prefix);return{effectiveWidth:Vt.effective[pe]??0,resolvedWidth:Vt.resolved[pe]??0,maxWidth:cn(pe,Vt.resolved)}}const oe=mt.findIndex(pe=>pe.prefix===Se.prefix);return{effectiveWidth:kt.effective[oe]??0,resolvedWidth:kt.resolved[oe]??0,maxWidth:cn(oe,kt.resolved)}},[Ge,mt,kt,yt,ht,Lt,Vt,E]),Xt=s.useCallback(Se=>Id(Ge,ht,Ae,Se)+(E?0:N??0),[Ge,ht,Ae,E,N]),qt=s.useCallback(()=>E?0:N??0,[E,N]),Ht=s.useCallback(Se=>mt.slice(0,Se).reduce((qe,R,oe)=>qe+(R.marginLeftKey?Ae[R.marginLeftKey]??0:0)+(kt.resolved[oe]??0),0),[mt,kt.resolved,Ae]),Dt=s.useCallback(Se=>{const qe=mt[Se];return Ht(Se)+(qe.marginLeftKey?Ae[qe.marginLeftKey]??0:0)+(kt.resolved[Se]??0)},[mt,kt.resolved,Ht,Ae]),_t=s.useCallback((Se,qe,R)=>{if(!E||R==="single-row"){const et=Se.findIndex(Qt=>Qt.prefix===qe.prefix),bt=Se.map(Qt=>gt[Qt.widthKey]),Rt=Zi(Se.length,bt);return{effectiveWidth:No(Se.length,bt)[et]??0,resolvedWidth:Rt[et]??0,maxWidth:cn(et,Rt)}}if(R==="two-row-top"){const et=Se.filter(Qt=>Qt.prefix==="title1"),bt=et.findIndex(Qt=>Qt.prefix===qe.prefix),{resolved:Rt,effective:tn}=Zn(et,gt);return{effectiveWidth:tn[bt]??0,resolvedWidth:Rt[bt]??0,maxWidth:cn(bt,Rt)}}const oe=Se.filter(et=>et.prefix==="title2"||et.prefix==="title3"),pe=oe.findIndex(et=>et.prefix===qe.prefix),{resolved:Me,effective:je}=Zn(oe,gt);return{effectiveWidth:je[pe]??0,resolvedWidth:Me[pe]??0,maxWidth:cn(pe,Me)}},[gt,E]),Ct=(Se,qe,R)=>{const oe=Se.marginLeftKey?Ae[Se.marginLeftKey]??0:0,{effectiveWidth:pe,resolvedWidth:Me,maxWidth:je}=R??Mt(Se,qe),et=Math.max(oe,Un),bt=o&&qe==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":Se.prefix,style:{width:X(pe),...oe>0?{marginLeft:X(oe)}:{}},children:[a.jsx("p",{className:Se.className,style:Se.style,children:Se.text}),bt&&Se.marginLeftKey?a.jsx("div",{"data-controls":Se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Me),style:{position:"absolute",top:0,left:X(-oe),width:X(et),height:"100%",pointerEvents:"auto"}}):null,bt?a.jsx("div",{"data-controls":Se.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(je),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:X(-fn/2),width:X(fn),height:"100%",pointerEvents:"auto"}}):null]},Se.className)},F=(Se="two-row")=>{const qe=Ge.findIndex(pe=>pe.prefix==="title1"),R=qe>=0?ht[qe]:gt.title1Width,oe=Se==="two-row"&&o;return a.jsx("div",{...oe?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(R)}:{},style:{width:X(N??0),flexShrink:0,alignSelf:"stretch",...oe?{pointerEvents:"auto"}:{}}})},Ee=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:k,"aria-hidden":"true",children:" "}),Fe=()=>a.jsx("span",{className:`${e}-entry-counter`,style:b,"aria-live":"polite","aria-atomic":"true",children:Pf(K,te,v,t)}),Oe=()=>At?o&&xt?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Fe(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Ca(V)} + ${V}))`,width:Ca(V),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Fe():null,at=()=>!At&&!xt?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Nt,children:[Oe(),xt?vt():null]}),Et=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||jt?Ee():null,Wt?F("single-row"):null,It(ne),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),at(),$n()]}),it=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||jt?Ee():null,Wt?F("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:fe&&q?{minHeight:q}:void 0,children:[a.jsx("div",{ref:lt,className:Kt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ci(de||ne)}),a.jsxs("div",{ref:ut,className:Kt,style:{position:fe?"absolute":"relative",inset:fe?0:void 0,width:"100%",...fe&&ce?{width:ce,maxWidth:"100%"}:void 0},children:[ft&&fe?a.jsx("div",{className:`${Jt} ${e}-titles-fade-out`,children:ci(ft)}):null,a.jsx("div",{className:`${e}-titles-layer-in${fe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:ci(ne)})]})]}),at(),$n()]}),vt=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:W.scalingValue(P??0,i),height:W.scalingValue(P??0,i),marginRight:re,"--close-icon-hover-color":g},children:[a.jsx("button",{ref:Le,type:"button",className:`${e}-close-icon-inner`,onClick:_e,"aria-label":"Close",children:a.jsx(sn,{url:I??"",fill:M,hoverFill:i&&!r?M:g,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:re,height:"100%",pointerEvents:"auto"}})]}),Ot=(Se,qe)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[At||jt?Ee():null,Wt?F("two-row"):null,qe!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:qe},children:Se}):a.jsxs(a.Fragment,{children:[Se,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),at()]}),It=Se=>{if(!Se)return null;const qe=Kn(e,Se,k,le,G);return a.jsx(a.Fragment,{children:qe.map(R=>Ct(R,"single-row",_t(qe,R,"single-row")))})},nn=Se=>{if(!Se)return null;const qe=Kn(e,Se,k,le,G),R=qe.find(oe=>oe.prefix==="title1");return R?Ct(R,"two-row-top",_t(qe,R,"two-row-top")):null},un=(Se,qe=!1)=>{const R=Se?Kn(e,Se,k,le,G):[],oe=R.filter(je=>je.prefix==="title2"||je.prefix==="title3"),pe=o&&qe;return oe.length>0||pe||(T??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[oe.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[oe.map(je=>Ct(je,"two-row-bottom",_t(R,je,"two-row-bottom"))),qe&&o?a.jsxs(a.Fragment,{children:[la(),ca()]}):null]}):null,(T??0)>0||pe?a.jsx("div",{"data-controls":pe?"titleRowMarginBottom":void 0,"data-controls-axis":pe?"y":void 0,"data-controls-reverse":pe?"":void 0,className:pe?`${e}-control`:void 0,style:{height:rn,width:"100%",flexShrink:0,pointerEvents:pe?"auto":"none"}}):null]}):null},li=(Se,qe=!1)=>a.jsxs(a.Fragment,{children:[Ot(nn(Se)),un(Se,qe)]}),ci=Se=>E?a.jsx("div",{className:`${e}-titles-row-two-row`,children:li(Se)}):Se?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:It(Se)}):null,er=()=>{const Se=E?-1:Ge.findIndex(oe=>oe.prefix==="title1"),qe=!E&&(o||(N??0)>0)?(()=>{const oe=N??0,pe=Se>=0?ht[Se]:gt.title1Width,Me=Math.max(oe,Un);return a.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:X(Me),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,R=Ge.flatMap((oe,pe)=>{if(!oe.marginLeftKey)return[];const Me=Ae[oe.marginLeftKey]??0,je=Td(Ge,ht,Ae,pe)+qt(),et=Math.max(Me,Un);return a.jsx("div",{"data-controls":oe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ht[pe]),style:{position:"absolute",top:0,left:X(je),width:X(et),height:"100%",pointerEvents:"auto"}},oe.marginLeftKey)});return qe?[qe,...R]:R},tr=()=>Ge.map((Se,qe)=>{const R=cn(qe,ht),pe=Xt(qe)-fn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Se.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(R),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:X(pe),width:X(fn),height:"100%",pointerEvents:"auto"}})},`${Se.widthKey}-junction`)}),la=()=>mt.flatMap((Se,qe)=>{if(!Se.marginLeftKey)return[];const R=Ae[Se.marginLeftKey]??0,oe=Ht(qe),pe=Math.max(R,Un),{resolvedWidth:Me}=Mt(Se,"two-row-bottom");return a.jsx("div",{"data-controls":Se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Me),style:{position:"absolute",top:0,left:X(oe),width:X(pe),height:"100%",pointerEvents:"auto"}},Se.marginLeftKey)}),ca=()=>mt.map((Se,qe)=>{const{maxWidth:R}=Mt(Se,"two-row-bottom"),pe=Dt(qe)-fn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Se.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(R),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:X(pe),width:X(fn),height:"100%",pointerEvents:"auto"}})},`${Se.widthKey}-junction`)}),$n=()=>!o||E?null:a.jsxs(a.Fragment,{children:[er(),tr()]}),Pi=Se=>{const qe=!Se.objectFit&&Dn(w);return{className:`${e}-slide-image-cell${qe?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:L,maxHeight:_,...qe?{"--image-aspect-ratio":aa(w)}:{}}}},nr=Se=>Se.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":Se.objectFit}}:Dn(w)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},di=Se=>{if(Se.length===0)return null;const qe=Se.length>1,R=Ca(ie),oe=`calc(-0.5 * (${R} + ${ie}))`;if(Se.length===1){const pe=Se[0];return a.jsx("div",{...Pi(pe),children:a.jsx("img",{...nr(pe),src:pe.url,alt:pe.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:qe?{gap:ie}:void 0,children:Se.map((pe,Me)=>a.jsxs("div",{...Pi(pe),children:[a.jsx("img",{...nr(pe),src:pe.url,alt:pe.name??"",draggable:!1}),o&&qe&&Me<Se.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:oe,width:R,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${pe.url}-${Me}`))})},ir=!!(ne!=null&&ne.title2||ne!=null&&ne.title3||ft!=null&&ft.title2||ft!=null&&ft.title3||(T??0)>0||o),da=()=>a.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[a.jsx("div",{ref:lt,className:Kt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:li(de||ne)}),a.jsxs("div",{ref:ut,className:`${e}-titles-row-two-row`,style:{...fe&&q?{minHeight:q}:void 0,...fe&&ce?{width:ce,maxWidth:"100%"}:void 0},children:[Ot(a.jsxs("div",{className:Kt,style:{position:fe?"absolute":"relative",inset:fe?0:void 0,width:"100%"},children:[ft&&fe?a.jsx("div",{className:`${Tt} ${e}-titles-fade-out`,children:nn(ft)}):null,a.jsx("div",{className:`${e}-titles-layer-in${fe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:nn(ne)})]}),fe&&q?q:void 0),ir?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[ft&&fe?a.jsx("div",{className:`${Jt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:un(ft)}):null,a.jsx("div",{className:`${e}-titles-layer-in${fe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${E?` ${e}-titles-layer-in-stacked`:""}`,children:un(ne,!0)})]}):null]})]}),ua=()=>{const Se=ir;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...Se?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:Se?void 0:{flex:"0 0 auto",height:"auto"},children:li(ne,!0)}),$n()]})};return a.jsxs("div",{ref:Ye,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{we||_e()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:xt?void 0:-1,style:{opacity:Pe?1:0,transition:"opacity 300ms ease",pointerEvents:Pe?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:m,...Te}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Ve,...Ie,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Xe,onClick:Se=>Se.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":j&&K.length>1?"true":"false",onPointerDown:j?St:void 0,onPointerUp:j?Bt:void 0,onPointerCancel:j?zt:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[wt&&ae?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:Se=>{Se.target===Se.currentTarget&&ve(ke)},children:a.jsx("div",{className:`${e}-slide-area`,children:di(wt.images)})},`slide-out-${ke}`):null,a.jsx("div",{className:`${e}-slide-layer-in${ae?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:J?di(J.images):null})},`slide-in-${ke}-${te}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:ze,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:se,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...E?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${E?` ${e}-lightbox-content-area-stacked`:""}`,children:Ft&&a.jsx("div",{className:`${e}-text-bar-cell${E?` ${e}-text-bar-cell-stacked`:""}`,style:E?void 0:{flex:1,minWidth:0,width:"100%"},children:E?C==="fade"?da():ua():C==="fade"?it():Et()})})})]})]})]})};function ux(e){return`
15160
+ `,sv="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>'),hi={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 lv(e){const t={};return t[Gt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Gt(e,"fontSettings")]={...hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Gt(e,"fontSize")]={...hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Gt(e,"lineHeight")]={...hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Gt(e,"letterSpacing")]={...hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Gt(e,"wordSpacing")]={...hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Gt(e,"textAlign")]={...hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Gt(e,"textAppearance")]={...hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const cv=oo.reduce((e,t)=>({...e,...lv(t)}),{}),dv=oo.reduce((e,t)=>({...e,[Gt(t,"fontFamily")]:"Goudy Bookletter 1911",[Gt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Gt(t,"letterSpacing")]:0,[Gt(t,"wordSpacing")]:0,[Gt(t,"textAlign")]:"left",[Gt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Na(e){return oo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Gt(n,"fontSize")]=i),o!==void 0&&(t[Gt(n,"lineHeight")]=o),t},{})}const uv=ev(),pv={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"}},...cv,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:sv,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...dv},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:[uv]}],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"}]}},mv={element:rv,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:pv,sourceCode:av,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...oo.map(e=>({path:`${Gt(e,"fontFamily")}`}))]},fontRelations:{...oo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Gt(t,"fontFamily")}`}),{})}},gv=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,initialSlideIndex:l=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:p})=>{const{type:x,coverFit:b,backgroundColor:m,imageGap:h,maxWidth:f,maxHeight:v,textTransition:C,title1Width:y,title2Width:S,title3Width:j,title1MarginLeft:N=0,title2MarginLeft:U=0,title3MarginLeft:W=0,titleRowMarginBottom:R=0,titleHeaderLayout:B="single-row",countCloseGap:$=0,closeIcon:T,closeIconMaxWidth:k,closeIconColor:E,closeIconHoverColor:g,contentMarginTop:A=0,iconMarginRight:F=0}=n,X=s.useCallback(Ce=>O.scalingValue(Ce,i??!1),[i]),ee=X(h??0),P=`${f}%`,D=`${v}%`,K=X($),le=X(A),re=X(F),M=bi("title1",vi(n,"title1"),i),ie=bi("title2",vi(n,"title2"),i),G=bi("title3",vi(n,"title3"),i),oe=bi("count",vi(n,"count"),i),te=B==="mobile",ye=!i||!!r,Me=!o&&(!i||!!r),w=s.useMemo(()=>Pr(t,x),[t,x]),[Y,I]=s.useState(l),z=w[Y],H=z==null?void 0:z.entry,[Te,fe]=s.useState(!1),[ve,de]=s.useState(null),[he,we]=s.useState(!1),[Z,Q]=s.useState(null),[ae,$e]=s.useState(!1),[ke,xe]=s.useState(0),[V,pe]=s.useState(),[se,q]=s.useState(),[ce,We]=s.useState(null),ge=s.useRef(null),J=s.useRef(0),Ke=s.useRef(0),_e=s.useRef(0),rt=s.useRef(!1),Ye=s.useRef(null),dt=s.useRef(null),at=s.useRef(null),Xe=s.useRef(null),Le=s.useRef(null),He=s.useRef(null),Be=s.useRef(null),Ze=s.useCallback(()=>{const Ce=dt.current;if(!Ce)return;const Ue=Ce.closest(`.${e}-lightbox-content-area`);if(!Ue)return Ce.getBoundingClientRect().width;const L=Array.from(Ue.children).reduce((ne,ue)=>!(ue instanceof HTMLElement)||ue.contains(Ce)?ne:ne+ue.getBoundingClientRect().width,0);return Ue.getBoundingClientRect().width-L},[e]),me=s.useCallback(()=>{ge.current&&(clearTimeout(ge.current),ge.current=null)},[]),be=s.useCallback(Ce=>{Ce===J.current&&(Q(null),$e(!1))},[]),Ne=s.useCallback(()=>{o||rt.current||(rt.current=!0,u==null||u(),fe(!1),Ye.current=setTimeout(()=>{p()},300))},[o,u,p]),Je=s.useCallback(Ce=>!!(Ce.closest("[data-controls]")||Ce.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Se,backdropStyle:Ie,mediaAreaStyle:qe,overlayContentStyle:ze,swipeHandlers:Re,dismissAreaStyle:Ve}=Gd({enabled:Me,onClose:Ne,animMs:300,isBlockedTarget:Je}),De=s.useCallback(Ce=>{d&&Rd(Ce+1,c,!0)},[d,c]),tt=s.useCallback(Ce=>{if(Ce)return Ce.getBoundingClientRect().height},[]),nt=s.useCallback(Ce=>{if(w.length===0)return;const Ue=(Ce%w.length+w.length)%w.length;if(Ue===Y)return;const L=w[Y],ne=w[Ue];J.current+=1;const ue=J.current,Ee=C==="fade"&&Al(L==null?void 0:L.entry)!==Al(ne==null?void 0:ne.entry),je=tt(at.current),et=Ee?(()=>{const Rt=Ze();zn.flushSync(()=>{We(ne.entry)}),at.current&&Rt&&(at.current.style.width=`${Rt}px`);const tn=tt(at.current);return at.current&&(at.current.style.width=""),{measuredIncomingTitlesHeight:tn,incomingTitlesMeasureWidth:Rt}})():void 0,bt=Math.max(je??0,(et==null?void 0:et.measuredIncomingTitlesHeight)??0)||void 0;xe(ue),Q(Y),$e(!0),I(Ue),De(Ue),_e.current=Ue,Ee?(me(),bt&&pe(bt),et!=null&&et.incomingTitlesMeasureWidth&&q(et.incomingTitlesMeasureWidth),de((L==null?void 0:L.entryIndex)??null),we(!0),Ke.current=ne.entryIndex,ge.current=setTimeout(()=>{de(null),we(!1),pe(void 0),q(void 0),We(null),ge.current=null},400)):(me(),de(null),we(!1),pe(void 0),q(void 0),We(null),Ke.current=ne.entryIndex)},[Y,me,Ze,tt,w,De,C]),ct=s.useCallback(()=>{Be.current=null},[]),St=s.useCallback(Ce=>{!ye||w.length<=1||Ce.pointerType==="mouse"&&Ce.button!==0||Ce.target.closest("[data-controls]")||(Be.current={startX:Ce.clientX,startY:Ce.clientY,pointerId:Ce.pointerId})},[ye,w.length]),Bt=s.useCallback(Ce=>{var Rt;if(!ye||w.length<=1||Ce.pointerType==="mouse"&&Ce.button!==0)return;if(Se){ct();return}const Ue=Be.current;if(!Ue||Ue.pointerId!==Ce.pointerId||(ct(),Ce.target.closest("[data-controls]")))return;const ne=Ce.clientX-Ue.startX,ue=Ce.clientY-Ue.startY,Ee=Math.abs(ne),je=Math.abs(ue);if(Ee>=If&&Ee>je){nt(ne>0?Y-1:Y+1);return}if(Ee>Pl||je>Pl)return;const et=(Rt=Xe.current)==null?void 0:Rt.getBoundingClientRect(),bt=et?et.left+et.width/2:window.innerWidth/2;nt(Ce.clientX<bt?Y-1:Y+1)},[Y,ye,nt,Se,ct,w.length]),zt=s.useCallback(Ce=>{const Ue=Be.current;(Ue==null?void 0:Ue.pointerId)===Ce.pointerId&&ct()},[ct]);Xd(),s.useEffect(()=>{He.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const Ce=requestAnimationFrame(()=>{fe(!0),requestAnimationFrame(()=>{Le.current?Le.current.focus():Xe.current&&Xe.current.focus()})});return()=>{cancelAnimationFrame(Ce),Ye.current&&clearTimeout(Ye.current),ge.current&&clearTimeout(ge.current);const Ue=He.current;Ue&&document.contains(Ue)&&Ue.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var Ce;C!=="fade"&&(Ke.current=((Ce=w[Y])==null?void 0:Ce.entryIndex)??0,me(),de(null),we(!1),pe(void 0),q(void 0))},[Y,me,w,C]),s.useEffect(()=>{const Ce=Ue=>{if(Ue.key==="Escape"){Ne();return}if(Ue.key==="ArrowLeft"&&w.length>1){nt(Y-1);return}if(Ue.key==="ArrowRight"&&w.length>1){nt(Y+1);return}if(Ue.key==="Tab"&&Xe.current){const L=Xe.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),ne=Array.from(L).filter(et=>!et.closest('[aria-hidden="true"]'));if(ne.length===0)return;const ue=ne[0],Ee=ne[ne.length-1],je=document.activeElement;Ue.shiftKey?(je===ue||!Xe.current.contains(je))&&(Ue.preventDefault(),Ee.focus()):(je===Ee||!Xe.current.contains(je))&&(Ue.preventDefault(),ue.focus())}};return window.addEventListener("keydown",Ce),()=>window.removeEventListener("keydown",Ce)},[nt,Ne,Y,w.length]),s.useLayoutEffect(()=>{me(),J.current=0,xe(0),Q(null),$e(!1),de(null),we(!1),pe(void 0),q(void 0),We(null),I(Ce=>{const Ue=Math.max(0,w.length-1);return Math.min(Ce,Ue)})},[me,t.length,x,w.length]),s.useLayoutEffect(()=>{var L;const Ce=Math.max(0,w.length-1),Ue=Math.min(Math.max(0,l),Ce);_e.current=Ue,Ke.current=((L=w[Ue])==null?void 0:L.entryIndex)??0,I(Ue)},[l]);const ft=ve!==null?t[ve]:null,wt=Z!==null?w[Z]:null,jt=(H==null?void 0:H.title1)||(H==null?void 0:H.title2)||(H==null?void 0:H.title3)||(ft==null?void 0:ft.title1)||(ft==null?void 0:ft.title2)||(ft==null?void 0:ft.title3),At=Ff(x,w,t),vt=T!==null,Ft=jt||At||vt,Nt=At&&vt?{gap:K}:void 0,Kt=`${e}-titles-stack${te?` ${e}-titles-stack-stacked`:""}`,Jt=`${e}-titles-layer-out${te?` ${e}-titles-layer-out-stacked`:""}`,Tt=`${e}-titles-layer-out`,Wt=(N??0)>0||o,rn=X(R),gt=s.useMemo(()=>({title1Width:y??Xi.title1Width,title2Width:S??Xi.title2Width,title3Width:j??Xi.title3Width}),[y,S,j]),Ae=s.useMemo(()=>({title2MarginLeft:U,title3MarginLeft:W}),[U,W]),Ge=s.useMemo(()=>H?Kn(e,H,M,ie,G):[],[e,H,M,ie,G]),st=s.useMemo(()=>Ge.map(Ce=>gt[Ce.widthKey]),[Ge,gt]),ht=s.useMemo(()=>Ji(Ge.length,st),[Ge.length,st]),yt=s.useMemo(()=>Ho(Ge.length,st),[Ge.length,st]),Lt=s.useMemo(()=>Ge.filter(Ce=>Ce.prefix==="title1"),[Ge]),mt=s.useMemo(()=>Ge.filter(Ce=>Ce.prefix==="title2"||Ce.prefix==="title3"),[Ge]),Vt=s.useMemo(()=>Zn(Lt,gt),[Lt,gt]),kt=s.useMemo(()=>Zn(mt,gt),[mt,gt]),Mt=s.useCallback((Ce,Ue)=>{const L=Ge.findIndex(ue=>ue.prefix===Ce.prefix);if(!te||Ue==="single-row")return{effectiveWidth:yt[L]??0,resolvedWidth:ht[L]??0,maxWidth:cn(L,ht)};if(Ue==="two-row-top"){const ue=Lt.findIndex(Ee=>Ee.prefix===Ce.prefix);return{effectiveWidth:Vt.effective[ue]??0,resolvedWidth:Vt.resolved[ue]??0,maxWidth:cn(ue,Vt.resolved)}}const ne=mt.findIndex(ue=>ue.prefix===Ce.prefix);return{effectiveWidth:kt.effective[ne]??0,resolvedWidth:kt.resolved[ne]??0,maxWidth:cn(ne,kt.resolved)}},[Ge,mt,kt,yt,ht,Lt,Vt,te]),Xt=s.useCallback(Ce=>Md(Ge,ht,Ae,Ce)+(te?0:N??0),[Ge,ht,Ae,te,N]),Yt=s.useCallback(()=>te?0:N??0,[te,N]),Ht=s.useCallback(Ce=>mt.slice(0,Ce).reduce((Ue,L,ne)=>Ue+(L.marginLeftKey?Ae[L.marginLeftKey]??0:0)+(kt.resolved[ne]??0),0),[mt,kt.resolved,Ae]),Dt=s.useCallback(Ce=>{const Ue=mt[Ce];return Ht(Ce)+(Ue.marginLeftKey?Ae[Ue.marginLeftKey]??0:0)+(kt.resolved[Ce]??0)},[mt,kt.resolved,Ht,Ae]),_t=s.useCallback((Ce,Ue,L)=>{if(!te||L==="single-row"){const et=Ce.findIndex(Qt=>Qt.prefix===Ue.prefix),bt=Ce.map(Qt=>gt[Qt.widthKey]),Rt=Ji(Ce.length,bt);return{effectiveWidth:Ho(Ce.length,bt)[et]??0,resolvedWidth:Rt[et]??0,maxWidth:cn(et,Rt)}}if(L==="two-row-top"){const et=Ce.filter(Qt=>Qt.prefix==="title1"),bt=et.findIndex(Qt=>Qt.prefix===Ue.prefix),{resolved:Rt,effective:tn}=Zn(et,gt);return{effectiveWidth:tn[bt]??0,resolvedWidth:Rt[bt]??0,maxWidth:cn(bt,Rt)}}const ne=Ce.filter(et=>et.prefix==="title2"||et.prefix==="title3"),ue=ne.findIndex(et=>et.prefix===Ue.prefix),{resolved:Ee,effective:je}=Zn(ne,gt);return{effectiveWidth:je[ue]??0,resolvedWidth:Ee[ue]??0,maxWidth:cn(ue,Ee)}},[gt,te]),Ct=(Ce,Ue,L)=>{const ne=Ce.marginLeftKey?Ae[Ce.marginLeftKey]??0:0,{effectiveWidth:ue,resolvedWidth:Ee,maxWidth:je}=L??Mt(Ce,Ue),et=Math.max(ne,Un),bt=o&&Ue==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":Ce.prefix,style:{width:X(ue),...ne>0?{marginLeft:X(ne)}:{}},children:[a.jsx("p",{className:Ce.className,style:Ce.style,children:Ce.text}),bt&&Ce.marginLeftKey?a.jsx("div",{"data-controls":Ce.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ee),style:{position:"absolute",top:0,left:X(-ne),width:X(et),height:"100%",pointerEvents:"auto"}}):null,bt?a.jsx("div",{"data-controls":Ce.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(je),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:X(-fn/2),width:X(fn),height:"100%",pointerEvents:"auto"}}):null]},Ce.className)},_=(Ce="two-row")=>{const Ue=Ge.findIndex(ue=>ue.prefix==="title1"),L=Ue>=0?ht[Ue]:gt.title1Width,ne=Ce==="two-row"&&o;return a.jsx("div",{...ne?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(L)}:{},style:{width:X(N??0),flexShrink:0,alignSelf:"stretch",...ne?{pointerEvents:"auto"}:{}}})},Pe=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:M,"aria-hidden":"true",children:" "}),Fe=()=>a.jsx("span",{className:`${e}-entry-counter`,style:oe,"aria-live":"polite","aria-atomic":"true",children:Af(w,Y,x,t)}),Oe=()=>At?o&&vt?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Fe(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Ia(K)} + ${K}))`,width:Ia(K),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Fe():null,lt=()=>!At&&!vt?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Nt,children:[Oe(),vt?xt():null]}),Et=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||jt?Pe():null,Wt?_("single-row"):null,It(H),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),lt(),$n()]}),it=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||jt?Pe():null,Wt?_("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:he&&V?{minHeight:V}:void 0,children:[a.jsx("div",{ref:at,className:Kt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ci(ce||H)}),a.jsxs("div",{ref:dt,className:Kt,style:{position:he?"absolute":"relative",inset:he?0:void 0,width:"100%",...he&&se?{width:se,maxWidth:"100%"}:void 0},children:[ft&&he?a.jsx("div",{className:`${Jt} ${e}-titles-fade-out`,children:ci(ft)}):null,a.jsx("div",{className:`${e}-titles-layer-in${he?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:ci(H)})]})]}),lt(),$n()]}),xt=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:O.scalingValue(k??0,i),height:O.scalingValue(k??0,i),marginRight:re,"--close-icon-hover-color":g},children:[a.jsx("button",{ref:Le,type:"button",className:`${e}-close-icon-inner`,onClick:Ne,"aria-label":"Close",children:a.jsx(sn,{url:T??"",fill:E,hoverFill:i&&!r?E:g,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:re,height:"100%",pointerEvents:"auto"}})]}),Ot=(Ce,Ue)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[At||jt?Pe():null,Wt?_("two-row"):null,Ue!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ue},children:Ce}):a.jsxs(a.Fragment,{children:[Ce,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),lt()]}),It=Ce=>{if(!Ce)return null;const Ue=Kn(e,Ce,M,ie,G);return a.jsx(a.Fragment,{children:Ue.map(L=>Ct(L,"single-row",_t(Ue,L,"single-row")))})},nn=Ce=>{if(!Ce)return null;const Ue=Kn(e,Ce,M,ie,G),L=Ue.find(ne=>ne.prefix==="title1");return L?Ct(L,"two-row-top",_t(Ue,L,"two-row-top")):null},un=(Ce,Ue=!1)=>{const L=Ce?Kn(e,Ce,M,ie,G):[],ne=L.filter(je=>je.prefix==="title2"||je.prefix==="title3"),ue=o&&Ue;return ne.length>0||ue||(R??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[ne.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[ne.map(je=>Ct(je,"two-row-bottom",_t(L,je,"two-row-bottom"))),Ue&&o?a.jsxs(a.Fragment,{children:[ua(),pa()]}):null]}):null,(R??0)>0||ue?a.jsx("div",{"data-controls":ue?"titleRowMarginBottom":void 0,"data-controls-axis":ue?"y":void 0,"data-controls-reverse":ue?"":void 0,className:ue?`${e}-control`:void 0,style:{height:rn,width:"100%",flexShrink:0,pointerEvents:ue?"auto":"none"}}):null]}):null},li=(Ce,Ue=!1)=>a.jsxs(a.Fragment,{children:[Ot(nn(Ce)),un(Ce,Ue)]}),ci=Ce=>te?a.jsx("div",{className:`${e}-titles-row-two-row`,children:li(Ce)}):Ce?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:It(Ce)}):null,nr=()=>{const Ce=te?-1:Ge.findIndex(ne=>ne.prefix==="title1"),Ue=!te&&(o||(N??0)>0)?(()=>{const ne=N??0,ue=Ce>=0?ht[Ce]:gt.title1Width,Ee=Math.max(ne,Un);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ue),style:{position:"absolute",top:0,left:0,width:X(Ee),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,L=Ge.flatMap((ne,ue)=>{if(!ne.marginLeftKey)return[];const Ee=Ae[ne.marginLeftKey]??0,je=Ed(Ge,ht,Ae,ue)+Yt(),et=Math.max(Ee,Un);return a.jsx("div",{"data-controls":ne.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ht[ue]),style:{position:"absolute",top:0,left:X(je),width:X(et),height:"100%",pointerEvents:"auto"}},ne.marginLeftKey)});return Ue?[Ue,...L]:L},ir=()=>Ge.map((Ce,Ue)=>{const L=cn(Ue,ht),ue=Xt(Ue)-fn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Ce.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(L),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:X(ue),width:X(fn),height:"100%",pointerEvents:"auto"}})},`${Ce.widthKey}-junction`)}),ua=()=>mt.flatMap((Ce,Ue)=>{if(!Ce.marginLeftKey)return[];const L=Ae[Ce.marginLeftKey]??0,ne=Ht(Ue),ue=Math.max(L,Un),{resolvedWidth:Ee}=Mt(Ce,"two-row-bottom");return a.jsx("div",{"data-controls":Ce.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ee),style:{position:"absolute",top:0,left:X(ne),width:X(ue),height:"100%",pointerEvents:"auto"}},Ce.marginLeftKey)}),pa=()=>mt.map((Ce,Ue)=>{const{maxWidth:L}=Mt(Ce,"two-row-bottom"),ue=Dt(Ue)-fn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Ce.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(L),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:X(ue),width:X(fn),height:"100%",pointerEvents:"auto"}})},`${Ce.widthKey}-junction`)}),$n=()=>!o||te?null:a.jsxs(a.Fragment,{children:[nr(),ir()]}),Pi=Ce=>{const Ue=!Ce.objectFit&&Dn(b);return{className:`${e}-slide-image-cell${Ue?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:P,maxHeight:D,...Ue?{"--image-aspect-ratio":ca(b)}:{}}}},or=Ce=>Ce.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":Ce.objectFit}}:Dn(b)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},di=Ce=>{if(Ce.length===0)return null;const Ue=Ce.length>1,L=Ia(ee),ne=`calc(-0.5 * (${L} + ${ee}))`;if(Ce.length===1){const ue=Ce[0];return a.jsx("div",{...Pi(ue),children:a.jsx("img",{...or(ue),src:ue.url,alt:ue.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:Ue?{gap:ee}:void 0,children:Ce.map((ue,Ee)=>a.jsxs("div",{...Pi(ue),children:[a.jsx("img",{...or(ue),src:ue.url,alt:ue.name??"",draggable:!1}),o&&Ue&&Ee<Ce.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:ne,width:L,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${ue.url}-${Ee}`))})},rr=!!(H!=null&&H.title2||H!=null&&H.title3||ft!=null&&ft.title2||ft!=null&&ft.title3||(R??0)>0||o),ma=()=>a.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[a.jsx("div",{ref:at,className:Kt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:li(ce||H)}),a.jsxs("div",{ref:dt,className:`${e}-titles-row-two-row`,style:{...he&&V?{minHeight:V}:void 0,...he&&se?{width:se,maxWidth:"100%"}:void 0},children:[Ot(a.jsxs("div",{className:Kt,style:{position:he?"absolute":"relative",inset:he?0:void 0,width:"100%"},children:[ft&&he?a.jsx("div",{className:`${Tt} ${e}-titles-fade-out`,children:nn(ft)}):null,a.jsx("div",{className:`${e}-titles-layer-in${he?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:nn(H)})]}),he&&V?V:void 0),rr?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[ft&&he?a.jsx("div",{className:`${Jt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:un(ft)}):null,a.jsx("div",{className:`${e}-titles-layer-in${he?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${te?` ${e}-titles-layer-in-stacked`:""}`,children:un(H,!0)})]}):null]})]}),ga=()=>{const Ce=rr;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...Ce?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:Ce?void 0:{flex:"0 0 auto",height:"auto"},children:li(H,!0)}),$n()]})};return a.jsxs("div",{ref:Xe,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Se||Ne()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:vt?void 0:-1,style:{opacity:Te?1:0,transition:"opacity 300ms ease",pointerEvents:Te?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:m,...Ie}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Ve,...Re,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:qe,onClick:Ce=>Ce.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":ye&&w.length>1?"true":"false",onPointerDown:ye?St:void 0,onPointerUp:ye?Bt:void 0,onPointerCancel:ye?zt:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[wt&&ae?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:Ce=>{Ce.target===Ce.currentTarget&&be(ke)},children:a.jsx("div",{className:`${e}-slide-area`,children:di(wt.images)})},`slide-out-${ke}`):null,a.jsx("div",{className:`${e}-slide-layer-in${ae?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:z?di(z.images):null})},`slide-in-${ke}-${Y}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:ze,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:le,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...te?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${te?` ${e}-lightbox-content-area-stacked`:""}`,children:Ft&&a.jsx("div",{className:`${e}-text-bar-cell${te?` ${e}-text-bar-cell-stacked`:""}`,style:te?void 0:{flex:1,minWidth:0,width:"100%"},children:te?C==="fade"?ma():ga():C==="fade"?it():Et()})})})]})]})]})};function hv(e){return`
15157
15161
  .${e}-wrapper {
15158
15162
  position: relative;
15159
15163
  width: 100%;
@@ -15675,7 +15679,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15675
15679
  pointer-events: auto;
15676
15680
  z-index: 10;
15677
15681
  }
15678
- `}const px=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:d}=W.useScopedStyles(),c=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:v}=e,w=s.useRef(null),[m,h]=s.useState(!1),[f,x]=s.useState(0),C=s.useRef(!1),y=s.useRef(!1),S=s.useRef(!1),z=s.useMemo(()=>(t??[]).filter($=>Ki($).length>0),[t]),N=m&&z.length>0,Y=!n,B=s.useCallback(()=>{Y&&(S.current=!0,$f(y.current,c),y.current=!1)},[Y,c]),T=($=0)=>{if(z.length===0||n&&!i&&!o)return;const I=Ir(z,v),P=Math.max(0,Math.min($,I.length-1));if(x(P),Y){const M=Cd();Sd(P+1,c,M),y.current=!M}h(!0)},H=s.useCallback(()=>{h(!1),S.current=!1},[]);return s.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),s.useEffect(()=>{if(!Y||C.current)return;C.current=!0;const $=Rl(c);if(!$)return;const I=Ll($,Ir(z,v).length);I<0||(x(I),h(!0))},[z,c,Y,v]),s.useEffect(()=>{if(!Y)return;const $=()=>{if(S.current){S.current=!1,h(!1);return}const I=Rl(c);if(!I){h(!1);return}const P=Ll(I,Ir(z,v).length);if(P<0){h(!1);return}y.current=!1,x(P),h(!0)};return window.addEventListener("popstate",$),()=>window.removeEventListener("popstate",$)},[z,c,Y,v]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:w,className:`${d}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ux(d)}}),u?a.jsx("button",{type:"button",className:`${d}-cover ${Dn(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,...Dn(p)?{"--image-aspect-ratio":aa(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${d}-cover-image ${Dn(p)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),N&&typeof document<"u"&&(()=>{const $=(r?document.getElementById(r):null)??document.body;return zn.createPortal(a.jsx(dx,{prefix:d,entries:z,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:f,enableUrlSync:Y,journalItemId:c,onBeforeClose:B,onClose:H}),$)})()]})},mx=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
15682
+ `}const fv=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:d}=O.useScopedStyles(),c=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:x}=e,b=s.useRef(null),[m,h]=s.useState(!1),[f,v]=s.useState(0),C=s.useRef(!1),y=s.useRef(!1),S=s.useRef(!1),j=s.useMemo(()=>(t??[]).filter($=>Zi($).length>0),[t]),N=m&&j.length>0,U=!n,W=s.useCallback(()=>{U&&(S.current=!0,Lf(y.current,c),y.current=!1)},[U,c]),R=($=0)=>{if(j.length===0||n&&!i&&!o)return;const T=Pr(j,x),k=Math.max(0,Math.min($,T.length-1));if(v(k),U){const E=Ld();Rd(k+1,c,E),y.current=!E}h(!0)},B=s.useCallback(()=>{h(!1),S.current=!1},[]);return s.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),s.useEffect(()=>{if(!U||C.current)return;C.current=!0;const $=Ml(c);if(!$)return;const T=kl($,Pr(j,x).length);T<0||(v(T),h(!0))},[j,c,U,x]),s.useEffect(()=>{if(!U)return;const $=()=>{if(S.current){S.current=!1,h(!1);return}const T=Ml(c);if(!T){h(!1);return}const k=kl(T,Pr(j,x).length);if(k<0){h(!1);return}y.current=!1,v(k),h(!0)};return window.addEventListener("popstate",$),()=>window.removeEventListener("popstate",$)},[j,c,U,x]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:b,className:`${d}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:hv(d)}}),u?a.jsx("button",{type:"button",className:`${d}-cover ${Dn(p)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>R(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...Dn(p)?{"--image-aspect-ratio":ca(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${d}-cover-image ${Dn(p)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),N&&typeof document<"u"&&(()=>{const $=(r?document.getElementById(r):null)??document.body;return zn.createPortal(a.jsx(gv,{prefix:d,entries:j,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:f,enableUrlSync:U,journalItemId:c,onBeforeClose:W,onClose:B}),$)})()]})},yv=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
15679
15683
  import { createPortal } from 'react-dom';
15680
15684
  import { CommonComponentProps } from '../props';
15681
15685
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -16431,7 +16435,7 @@ export type LightboxJournalSettings = {
16431
16435
  closeIconColor: string;
16432
16436
  closeIconHoverColor: string;
16433
16437
  };
16434
- `,gx="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>'),fi={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 hx(e){const t={};return t[ot(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSettings")]={...fi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSize")]={...fi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ot(e,"lineHeight")]={...fi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ot(e,"letterSpacing")]={...fi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ot(e,"wordSpacing")]={...fi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ot(e,"textAlign")]={...fi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ot(e,"textAppearance")]={...fi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const fx=ii.reduce((e,t)=>({...e,...hx(t)}),{}),yx=ii.reduce((e,t)=>({...e,[ot(t,"fontFamily")]:"Goudy Bookletter 1911",[ot(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ot(t,"letterSpacing")]:0,[ot(t,"wordSpacing")]:0,[ot(t,"textAlign")]:"left",[ot(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Fa(e){return ii.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ot(n,"fontSize")]=i),o!==void 0&&(t[ot(n,"lineHeight")]=o),t},{})}const vx=Mf(),xx={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"}},...fx,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:gx,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...yx,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,...Fa({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,...Fa({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,...Fa({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:[vx]}],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"}]}]}},bx={element:px,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:xx,sourceCode:mx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...ii.map(e=>({path:`${ot(e,"fontFamily")}`}))]},fontRelations:{...ii.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ot(t,"fontFamily")}`}),{})}},wx={sizeType:"custom",value:700,min:400,max:700};function Dr(e,t){return{widthPx:e,heightPx:e*t}}function rs(e,t,n,i,o,r){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,r/2),i-r/2)}}function tc(e,t,n,i){const{heightPx:o}=Dr(n,i);return rs(e/2,t/2,e,t,n,o)}function jd(e,t,n){for(const i of n){const{heightPx:o}=Dr(i.widthPx,i.aspectRatio),r=i.widthPx/2,l=o/2;if(e>=i.x-r&&e<=i.x+r&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function Sx(e,t,n,i,o,r,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":jd(e,t,n)||r==="area"?l??"none":d??"none"}function nc(e,t,n){var d;const{sizeType:i,value:o,min:r,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-r)+r)}function Cx(e){return`
16438
+ `,xv="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>'),fi={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 vv(e){const t={};return t[ot(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSettings")]={...fi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSize")]={...fi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ot(e,"lineHeight")]={...fi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ot(e,"letterSpacing")]={...fi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ot(e,"wordSpacing")]={...fi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ot(e,"textAlign")]={...fi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ot(e,"textAppearance")]={...fi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const bv=ii.reduce((e,t)=>({...e,...vv(t)}),{}),wv=ii.reduce((e,t)=>({...e,[ot(t,"fontFamily")]:"Goudy Bookletter 1911",[ot(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ot(t,"letterSpacing")]:0,[ot(t,"wordSpacing")]:0,[ot(t,"textAlign")]:"left",[ot(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Wa(e){return ii.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ot(n,"fontSize")]=i),o!==void 0&&(t[ot(n,"lineHeight")]=o),t},{})}const Sv=_f(),Cv={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"}},...bv,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:xv,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...wv,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,...Wa({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,...Wa({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,...Wa({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:[Sv]}],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"}]}]}},$v={element:fv,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:Cv,sourceCode:yv,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...ii.map(e=>({path:`${ot(e,"fontFamily")}`}))]},fontRelations:{...ii.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ot(t,"fontFamily")}`}),{})}},Tv={sizeType:"custom",value:700,min:400,max:700};function zr(e,t){return{widthPx:e,heightPx:e*t}}function ls(e,t,n,i,o,r){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,r/2),i-r/2)}}function rc(e,t,n,i){const{heightPx:o}=zr(n,i);return ls(e/2,t/2,e,t,n,o)}function qd(e,t,n){for(const i of n){const{heightPx:o}=zr(i.widthPx,i.aspectRatio),r=i.widthPx/2,l=o/2;if(e>=i.x-r&&e<=i.x+r&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function Iv(e,t,n,i,o,r,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":qd(e,t,n)||r==="area"?l??"none":d??"none"}function ac(e,t,n){var d;const{sizeType:i,value:o,min:r,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-r)+r)}function Rv(e){return`
16435
16439
  .${e}-root {
16436
16440
  position: absolute;
16437
16441
  top: 0;
@@ -16466,7 +16470,7 @@ export type LightboxJournalSettings = {
16466
16470
  width: 32px;
16467
16471
  height: 32px;
16468
16472
  }
16469
- `}function $x(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 Tx(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await $x(i)]));return new Map(n)}function Ix({settings:e,content:t=[],isEditor:n}){const{prefix:i}=W.useScopedStyles(),[o,r]=s.useState(null),[l,d]=s.useState([]),[c,u]=s.useState(0),p=s.useRef(0),[v,w]=s.useState({x:0,y:0}),[m,h]=s.useState("none"),f=s.useRef({x:0,y:0}),[x,C]=s.useState(!1),[y,S]=s.useState(!1),z=s.useRef(new Map),{imageSize:N=wx,cursor:Y="system",target:B="area",position:T="random",visible:H="all",defaultCursor:$=null,hoverCursor:I=null}=e,P=t.filter(L=>{var _;return!!((_=L==null?void 0:L.image)!=null&&_.url)}),M=s.useMemo(()=>Cx(i),[i]),g=s.useCallback((L,_,V=l)=>{if(!o)return;const se=o.getBoundingClientRect(),re=L-se.left,k=_-se.top;w({x:re,y:k}),h(Sx(re,k,V,o,Y,B,I,$))},[o,l,Y,B,I,$]);s.useEffect(()=>{const L=[...P.map(V=>V.image.url),$,I].filter(V=>!!V);if(L.length===0){z.current=new Map,S(!0);return}let _=!1;return S(!1),Tx(L).then(V=>{_||(z.current=V,S(!0))}),()=>{_=!0}},[t,$,I]),s.useEffect(()=>{if(!o)return;const L=V=>{V.stopPropagation(),f.current={x:V.clientX,y:V.clientY},g(V.clientX,V.clientY)},_=()=>{x&&g(f.current.x,f.current.y)};return o.addEventListener("mousemove",L),window.addEventListener("scroll",_,!0),()=>{o.removeEventListener("mousemove",L),window.removeEventListener("scroll",_,!0)}},[o,x,g]),s.useEffect(()=>{!o||!x||g(f.current.x,f.current.y)},[l,o,x,g]),s.useEffect(()=>{x||h("none")},[x]);const D=(L,_,V,se={})=>{var E,j;if(!((E=L==null?void 0:L.image)!=null&&E.url))return null;const re=((j=z.current.get(L.image.url))==null?void 0:j.aspectRatio)??1,k=nc(L.image.url,N,z.current),{heightPx:le}=Dr(k,re);let G=0,b=0;return T==="same"?{x:G,y:b}=tc(_,V,k,re):(G=se.x??Math.random()*_,b=se.y??Math.random()*V,{x:G,y:b}=rs(G,b,_,V,k,le)),{id:p.current++,url:L.image.url,link:L.link,name:L.image.name,x:G,y:b,xRatio:G/_,yRatio:b/V,aspectRatio:re,widthPx:k}},A=()=>{if(!o)return;const L=o.getBoundingClientRect(),_=L.width,V=L.height;_===0||V===0||d(se=>se.length===0?se:se.map(re=>{const k=N.sizeType==="random"?re.widthPx:nc(re.url,N,z.current),{heightPx:le}=Dr(k,re.aspectRatio);if(T==="same"){const{x:E,y:j}=tc(_,V,k,re.aspectRatio);return{...re,x:E,y:j,widthPx:k}}const{x:G,y:b}=rs(re.xRatio*_,re.yRatio*V,_,V,k,le);return{...re,x:G,y:b,widthPx:k}}))};s.useEffect(()=>{if(!o||P.length===0||!y)return;const L=o.getBoundingClientRect(),_=L.width,V=L.height,se=D(P[0],_,V);se&&(d([se]),u(P.length>1?1:0))},[N,T,o,t,y]),s.useEffect(()=>{if(!o)return;A();const L=new ResizeObserver(A);return L.observe(o),window.addEventListener("resize",A),()=>{L.disconnect(),window.removeEventListener("resize",A)}},[o,T,N,l.length]),s.useEffect(()=>{H==="last One"&&d(L=>L.length>0?[L[L.length-1]]:[])},[H]);const X=L=>{if(!o||P.length===0||!y)return;const _=o.getBoundingClientRect(),V=L.clientX-_.left,se=L.clientY-_.top;if(B==="image"&&!jd(V,se,l))return;let re=0,k=0;T==="on Click"?(re=V,k=se):T==="same"?(re=_.width/2,k=_.height/2):(re=Math.random()*_.width,k=Math.random()*_.height);const le=P[c%P.length],G=D(le,_.width,_.height,{x:re,y:k});if(!G)return;const b=H==="all"?[...l,G]:[G];d(b),u(E=>(E+1)%P.length),g(L.clientX,L.clientY,b)},ie=Y==="custom"&&m!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:M}}),a.jsxs("div",{ref:r,onClick:X,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),className:`${i}-root`,style:{cursor:ie?"none":"default"},children:[l.map(L=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${L.y}px`,left:`${L.x}px`,width:`${L.widthPx}px`,cursor:ie?"none":"default"},children:B==="area"&&L.link?a.jsx("a",{href:L.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:a.jsx("img",{src:L.url,alt:L.name,className:`${i}-image`})}):a.jsx("img",{src:L.url,alt:L.name,className:`${i}-image`})},L.id)),x&&ie&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${v.x}px`,top:`${v.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const Rx=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16473
+ `}function Lv(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 Pv(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await Lv(i)]));return new Map(n)}function Ev({settings:e,content:t=[],isEditor:n}){const{prefix:i}=O.useScopedStyles(),[o,r]=s.useState(null),[l,d]=s.useState([]),[c,u]=s.useState(0),p=s.useRef(0),[x,b]=s.useState({x:0,y:0}),[m,h]=s.useState("none"),f=s.useRef({x:0,y:0}),[v,C]=s.useState(!1),[y,S]=s.useState(!1),j=s.useRef(new Map),{imageSize:N=Tv,cursor:U="system",target:W="area",position:R="random",visible:B="all",defaultCursor:$=null,hoverCursor:T=null}=e,k=t.filter(P=>{var D;return!!((D=P==null?void 0:P.image)!=null&&D.url)}),E=s.useMemo(()=>Rv(i),[i]),g=s.useCallback((P,D,K=l)=>{if(!o)return;const le=o.getBoundingClientRect(),re=P-le.left,M=D-le.top;b({x:re,y:M}),h(Iv(re,M,K,o,U,W,T,$))},[o,l,U,W,T,$]);s.useEffect(()=>{const P=[...k.map(K=>K.image.url),$,T].filter(K=>!!K);if(P.length===0){j.current=new Map,S(!0);return}let D=!1;return S(!1),Pv(P).then(K=>{D||(j.current=K,S(!0))}),()=>{D=!0}},[t,$,T]),s.useEffect(()=>{if(!o)return;const P=K=>{K.stopPropagation(),f.current={x:K.clientX,y:K.clientY},g(K.clientX,K.clientY)},D=()=>{v&&g(f.current.x,f.current.y)};return o.addEventListener("mousemove",P),window.addEventListener("scroll",D,!0),()=>{o.removeEventListener("mousemove",P),window.removeEventListener("scroll",D,!0)}},[o,v,g]),s.useEffect(()=>{!o||!v||g(f.current.x,f.current.y)},[l,o,v,g]),s.useEffect(()=>{v||h("none")},[v]);const A=(P,D,K,le={})=>{var te,ye;if(!((te=P==null?void 0:P.image)!=null&&te.url))return null;const re=((ye=j.current.get(P.image.url))==null?void 0:ye.aspectRatio)??1,M=ac(P.image.url,N,j.current),{heightPx:ie}=zr(M,re);let G=0,oe=0;return R==="same"?{x:G,y:oe}=rc(D,K,M,re):(G=le.x??Math.random()*D,oe=le.y??Math.random()*K,{x:G,y:oe}=ls(G,oe,D,K,M,ie)),{id:p.current++,url:P.image.url,link:P.link,name:P.image.name,x:G,y:oe,xRatio:G/D,yRatio:oe/K,aspectRatio:re,widthPx:M}},F=()=>{if(!o)return;const P=o.getBoundingClientRect(),D=P.width,K=P.height;D===0||K===0||d(le=>le.length===0?le:le.map(re=>{const M=N.sizeType==="random"?re.widthPx:ac(re.url,N,j.current),{heightPx:ie}=zr(M,re.aspectRatio);if(R==="same"){const{x:te,y:ye}=rc(D,K,M,re.aspectRatio);return{...re,x:te,y:ye,widthPx:M}}const{x:G,y:oe}=ls(re.xRatio*D,re.yRatio*K,D,K,M,ie);return{...re,x:G,y:oe,widthPx:M}}))};s.useEffect(()=>{if(!o||k.length===0||!y)return;const P=o.getBoundingClientRect(),D=P.width,K=P.height,le=A(k[0],D,K);le&&(d([le]),u(k.length>1?1:0))},[N,R,o,t,y]),s.useEffect(()=>{if(!o)return;F();const P=new ResizeObserver(F);return P.observe(o),window.addEventListener("resize",F),()=>{P.disconnect(),window.removeEventListener("resize",F)}},[o,R,N,l.length]),s.useEffect(()=>{B==="last One"&&d(P=>P.length>0?[P[P.length-1]]:[])},[B]);const X=P=>{if(!o||k.length===0||!y)return;const D=o.getBoundingClientRect(),K=P.clientX-D.left,le=P.clientY-D.top;if(W==="image"&&!qd(K,le,l))return;let re=0,M=0;R==="on Click"?(re=K,M=le):R==="same"?(re=D.width/2,M=D.height/2):(re=Math.random()*D.width,M=Math.random()*D.height);const ie=k[c%k.length],G=A(ie,D.width,D.height,{x:re,y:M});if(!G)return;const oe=B==="all"?[...l,G]:[G];d(oe),u(te=>(te+1)%k.length),g(P.clientX,P.clientY,oe)},ee=U==="custom"&&m!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:E}}),a.jsxs("div",{ref:r,onClick:X,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),className:`${i}-root`,style:{cursor:ee?"none":"default"},children:[l.map(P=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${P.y}px`,left:`${P.x}px`,width:`${P.widthPx}px`,cursor:ee?"none":"default"},children:W==="area"&&P.link?a.jsx("a",{href:P.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:a.jsx("img",{src:P.url,alt:P.name,className:`${i}-image`})}):a.jsx("img",{src:P.url,alt:P.name,className:`${i}-image`})},P.id)),v&&ee&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${x.x}px`,top:`${x.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const Mv=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16470
16474
  import { CommonComponentProps } from '../props';
16471
16475
  import { useScopedStyles } from '../utils/index';
16472
16476
 
@@ -16996,7 +17000,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
16996
17000
  </>
16997
17001
  );
16998
17002
  }
16999
- `,Lx={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"]}]}]},Px={element:Ix,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:Lx,sourceCode:Rx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},Ex=100,Mx=70,Xn="cubic-bezier(0.86, 0, 0.07, 1)";function kx(e){return`
17003
+ `,kv={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"]}]}]},Av={element:Ev,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:kv,sourceCode:Mv,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},Fv=100,_v=70,Xn="cubic-bezier(0.86, 0, 0.07, 1)";function Nv(e){return`
17000
17004
  .${e}-wrapper {
17001
17005
  position: relative;
17002
17006
  width: 100%;
@@ -17106,7 +17110,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17106
17110
  display: block;
17107
17111
  pointer-events: none;
17108
17112
  }
17109
- `}function Ax(e){return e==="blur"?Mx:e==="greyscale"?Ex:0}function fo(e,t=1,n=1){const i=Ax(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 ic(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Fx(e,t){return t<=1?0:(e-1+t)%t}function _x(e,t=1){return!e||e.height===0?t:e.width/e.height}function Nx(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const r=e*i/100,l=t*o/100;let d=r,c=d/n;return c>l&&(c=l,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function oc(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 Vd(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function rc(e,t,n){return{...Vd(e),[`--${n}-stage-scale`]:t}}function Wx(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 Hx({settings:e,content:t,isEditor:n,isPreviewMode:i}){var $e,Q,Z,ae,xe,ke,Ce;const{prefix:o}=W.useScopedStyles(),r=s.useMemo(()=>kx(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:p="greyscale"}=e,v=t??[],w=ic(v.length),[m,h]=s.useState(w.activeIndex),[f,x]=s.useState(w.backgroundIndex),[C,y]=s.useState(!1),[S,z]=s.useState(!1),[N,Y]=s.useState(null),[B,T]=s.useState(null),[H,$]=s.useState(0),[I,P]=s.useState(1),[M,g]=s.useState("none"),[D,A]=s.useState("next"),[X,ie]=s.useState({}),[L,_]=s.useState({width:0,height:0}),V=s.useRef(null),se=s.useRef(null),re=!n||!!i,k=l??60,le=Math.max(10,Math.min(100,d??k)),G=Math.max(10,Math.min(100,c??k)),b=Math.max(100,u),E=fo(p),j=s.useCallback(q=>{const ye=_x(q?X[q]:void 0);return Nx(L.width,L.height,ye,le,G)},[L.height,L.width,X,G,le]);s.useEffect(()=>{const q=se.current;if(!q)return;const ye=new ResizeObserver(([ce])=>{const{width:U,height:de}=ce.contentRect;_({width:U,height:de})});return ye.observe(q),()=>ye.disconnect()},[]),s.useEffect(()=>{const q=(t??[]).map(ye=>{var ce;return(ce=ye.image)==null?void 0:ce.url}).filter(ye=>!!ye);Wx(q,(ye,ce)=>{ie(U=>{var de,He;return((de=U[ye])==null?void 0:de.width)===ce.width&&((He=U[ye])==null?void 0:He.height)===ce.height?U:{...U,[ye]:ce}})})},[t]),s.useEffect(()=>{const{backgroundIndex:q,activeIndex:ye}=ic(v.length);h(ye),x(q),y(!1),z(!1),Y(null),T(null),$(0),P(1),g("none"),A("next")},[v.length,t]),s.useEffect(()=>()=>{V.current&&clearTimeout(V.current)},[]);const me=s.useCallback(q=>{var he,ee,Je,Ne;if(!re||C||v.length<=1)return;const ye=q==="next"?(m+1)%v.length:(m-1+v.length)%v.length,ce=j((ee=(he=v[m])==null?void 0:he.image)==null?void 0:ee.url),U=j((Ne=(Je=v[ye])==null?void 0:Je.image)==null?void 0:Ne.url),de=oc(L.width,L.height,ce),He=oc(L.width,L.height,U);V.current&&clearTimeout(V.current),A(q),z(!0),y(!0),q==="next"?(Y(m),T(ye),$(0),P(1),g(fo(p,0,1))):(x(Fx(ye,v.length)),Y(ye),T(m),$(1),P(He),g(fo(p,1,He))),requestAnimationFrame(()=>{z(!1),requestAnimationFrame(()=>{q==="next"?($(1),P(de),g(fo(p,1,de))):($(0),P(1),g(fo(p,0,1)))})}),V.current=setTimeout(()=>{q==="next"&&x(m),h(ye),Y(null),T(null),y(!1)},b)},[m,p,L.height,L.width,j,C,re,v,b]),K=v[m],te=f!==null?v[f]:null,O=N!==null?v[N]:null,J=B!==null?v[B]:null,ne=v.length<=1?0:(m-1+v.length)%v.length,Pe=v.length<=1?0:(m+1)%v.length,be=j(($e=K==null?void 0:K.image)==null?void 0:$e.url),Re=j((Q=O==null?void 0:O.image)==null?void 0:Q.url),ue=j((Z=J==null?void 0:J.image)==null?void 0:Z.url),fe={[`--${o}-transition-ms`]:`${b}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:se,className:pt(`${o}-wrapper`,S&&`${o}-snap`,n&&!i&&`${o}-editor`),style:fe,"aria-label":"Zoom gallery",children:[((ae=te==null?void 0:te.image)==null?void 0:ae.url)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:te.image.url,alt:"",style:{filter:E}})}),C&&((xe=O==null?void 0:O.image)==null?void 0:xe.url)&&a.jsx("div",{className:pt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${D}`),style:rc(Re,I,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:O.image.url,alt:"",style:{filter:M}})}),C&&((ke=J==null?void 0:J.image)==null?void 0:ke.url)&&a.jsx("div",{className:pt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${D}`),style:rc(ue,H,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:J.image.url,alt:""})}),!C&&((Ce=K==null?void 0:K.image)==null?void 0:Ce.url)&&a.jsx("div",{className:pt(`${o}-stage`,`${o}-foreground`),style:Vd(be),children:a.jsx("img",{className:`${o}-image`,src:K.image.url,alt:K.image.name??""})}),re&&v.length>1&&!C&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:pt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>me("prev"),"aria-label":`Show previous image (${ne+1} of ${v.length})`}),a.jsx("button",{type:"button",className:pt(`${o}-nav`,`${o}-nav-next`),onClick:()=>me("next"),"aria-label":`Show next image (${Pe+1} of ${v.length})`})]})]})]})}const Dx=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17113
+ `}function Wv(e){return e==="blur"?_v:e==="greyscale"?Fv:0}function yo(e,t=1,n=1){const i=Wv(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 sc(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Hv(e,t){return t<=1?0:(e-1+t)%t}function Dv(e,t=1){return!e||e.height===0?t:e.width/e.height}function Ov(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const r=e*i/100,l=t*o/100;let d=r,c=d/n;return c>l&&(c=l,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function lc(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 Ud(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function cc(e,t,n){return{...Ud(e),[`--${n}-stage-scale`]:t}}function Bv(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 zv({settings:e,content:t,isEditor:n,isPreviewMode:i}){var we,Z,Q,ae,$e,ke,xe;const{prefix:o}=O.useScopedStyles(),r=s.useMemo(()=>Nv(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:p="greyscale"}=e,x=t??[],b=sc(x.length),[m,h]=s.useState(b.activeIndex),[f,v]=s.useState(b.backgroundIndex),[C,y]=s.useState(!1),[S,j]=s.useState(!1),[N,U]=s.useState(null),[W,R]=s.useState(null),[B,$]=s.useState(0),[T,k]=s.useState(1),[E,g]=s.useState("none"),[A,F]=s.useState("next"),[X,ee]=s.useState({}),[P,D]=s.useState({width:0,height:0}),K=s.useRef(null),le=s.useRef(null),re=!n||!!i,M=l??60,ie=Math.max(10,Math.min(100,d??M)),G=Math.max(10,Math.min(100,c??M)),oe=Math.max(100,u),te=yo(p),ye=s.useCallback(V=>{const pe=Dv(V?X[V]:void 0);return Ov(P.width,P.height,pe,ie,G)},[P.height,P.width,X,G,ie]);s.useEffect(()=>{const V=le.current;if(!V)return;const pe=new ResizeObserver(([se])=>{const{width:q,height:ce}=se.contentRect;D({width:q,height:ce})});return pe.observe(V),()=>pe.disconnect()},[]),s.useEffect(()=>{const V=(t??[]).map(pe=>{var se;return(se=pe.image)==null?void 0:se.url}).filter(pe=>!!pe);Bv(V,(pe,se)=>{ee(q=>{var ce,We;return((ce=q[pe])==null?void 0:ce.width)===se.width&&((We=q[pe])==null?void 0:We.height)===se.height?q:{...q,[pe]:se}})})},[t]),s.useEffect(()=>{const{backgroundIndex:V,activeIndex:pe}=sc(x.length);h(pe),v(V),y(!1),j(!1),U(null),R(null),$(0),k(1),g("none"),F("next")},[x.length,t]),s.useEffect(()=>()=>{K.current&&clearTimeout(K.current)},[]);const Me=s.useCallback(V=>{var ge,J,Ke,_e;if(!re||C||x.length<=1)return;const pe=V==="next"?(m+1)%x.length:(m-1+x.length)%x.length,se=ye((J=(ge=x[m])==null?void 0:ge.image)==null?void 0:J.url),q=ye((_e=(Ke=x[pe])==null?void 0:Ke.image)==null?void 0:_e.url),ce=lc(P.width,P.height,se),We=lc(P.width,P.height,q);K.current&&clearTimeout(K.current),F(V),j(!0),y(!0),V==="next"?(U(m),R(pe),$(0),k(1),g(yo(p,0,1))):(v(Hv(pe,x.length)),U(pe),R(m),$(1),k(We),g(yo(p,1,We))),requestAnimationFrame(()=>{j(!1),requestAnimationFrame(()=>{V==="next"?($(1),k(ce),g(yo(p,1,ce))):($(0),k(1),g(yo(p,0,1)))})}),K.current=setTimeout(()=>{V==="next"&&v(m),h(pe),U(null),R(null),y(!1)},oe)},[m,p,P.height,P.width,ye,C,re,x,oe]),w=x[m],Y=f!==null?x[f]:null,I=N!==null?x[N]:null,z=W!==null?x[W]:null,H=x.length<=1?0:(m-1+x.length)%x.length,Te=x.length<=1?0:(m+1)%x.length,fe=ye((we=w==null?void 0:w.image)==null?void 0:we.url),ve=ye((Z=I==null?void 0:I.image)==null?void 0:Z.url),de=ye((Q=z==null?void 0:z.image)==null?void 0:Q.url),he={[`--${o}-transition-ms`]:`${oe}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:le,className:pt(`${o}-wrapper`,S&&`${o}-snap`,n&&!i&&`${o}-editor`),style:he,"aria-label":"Zoom gallery",children:[((ae=Y==null?void 0:Y.image)==null?void 0:ae.url)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:Y.image.url,alt:"",style:{filter:te}})}),C&&(($e=I==null?void 0:I.image)==null?void 0:$e.url)&&a.jsx("div",{className:pt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${A}`),style:cc(ve,T,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:I.image.url,alt:"",style:{filter:E}})}),C&&((ke=z==null?void 0:z.image)==null?void 0:ke.url)&&a.jsx("div",{className:pt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${A}`),style:cc(de,B,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:z.image.url,alt:""})}),!C&&((xe=w==null?void 0:w.image)==null?void 0:xe.url)&&a.jsx("div",{className:pt(`${o}-stage`,`${o}-foreground`),style:Ud(fe),children:a.jsx("img",{className:`${o}-image`,src:w.image.url,alt:w.image.name??""})}),re&&x.length>1&&!C&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:pt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Me("prev"),"aria-label":`Show previous image (${H+1} of ${x.length})`}),a.jsx("button",{type:"button",className:pt(`${o}-nav`,`${o}-nav-next`),onClick:()=>Me("next"),"aria-label":`Show next image (${Te+1} of ${x.length})`})]})]})]})}const jv=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17110
17114
  import cn from 'classnames';
17111
17115
  import { CommonComponentProps } from '../props';
17112
17116
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -17625,7 +17629,7 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
17625
17629
  </>
17626
17630
  );
17627
17631
  }
17628
- `,Ox={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:""}}]}},Bx={element:Hx,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:Ox,sourceCode:Dx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},zx={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},jx=["hover","active"],_a={left:"flex-start",center:"center",right:"flex-end"};function Vx(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 Gx(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 Xx(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))`,r=`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}, ${r}`,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`,w=`.${e}-button:hover, ${v}`,m=h=>`.${e}-hover-effect-${h}:hover, .${e}-hover-effect-${h}:focus-visible, a:focus-visible .${e}-hover-effect-${h}`;return`
17632
+ `,Vv={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:""}}]}},Gv={element:zv,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:Vv,sourceCode:jv,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Xv={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},Yv=["hover","active"],Ha={left:"flex-start",center:"center",right:"flex-end"};function qv(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 Uv(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 Kv(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))`,r=`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}, ${r}`,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}`,x=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,b=`.${e}-button:hover, ${x}`,m=h=>`.${e}-hover-effect-${h}:hover, .${e}-hover-effect-${h}:focus-visible, a:focus-visible .${e}-hover-effect-${h}`;return`
17629
17633
  .${e}-root {
17630
17634
  line-height: 0;
17631
17635
  }
@@ -17786,7 +17790,7 @@ a:focus-visible .${e}-hover-effect-content-roll .${e}-content-roll-layer-hover,
17786
17790
  transform: translateY(-50%);
17787
17791
  opacity: 1;
17788
17792
  }
17789
- ${w} {
17793
+ ${b} {
17790
17794
  background-color: var(--${e}-hover-background-color, var(--${e}-background-color));
17791
17795
  color: var(--${e}-hover-text-color, var(--${e}-text-color));
17792
17796
  border-color: var(--${e}-hover-border-color, var(--${e}-border-color));
@@ -17865,7 +17869,7 @@ a:active .${e}-button .${e}-icon-image,
17865
17869
  height: calc(1em * var(--${e}-icon-scale, 1));
17866
17870
  width: calc(1em * var(--${e}-icon-scale, 1));
17867
17871
  }
17868
- `}function Na(e,t,n="",i,o){const r=t();return a.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[a.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:r}),a.jsxs("span",{className:`${e}-content-roll-viewport`,children:[a.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),a.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function ac(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(sn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return a.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=W.scalingValue(o,r);return a.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:l})}return a.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function qx({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=W.useScopedStyles(),l=s.useMemo(()=>Xx(r),[r]),{type:d="a",label:c="Button",icon:u,alignment:p="center",alignA:v,order:w="text-icon",gap:m=0,iconSize:h=0,iconWidthC:f=0,dimensions:x=!1,padding:C={top:0,right:0,bottom:0,left:0},cornerRadius:y=0,boxShadow:S={top:0,left:0,right:0,bottom:0},boxShadowColor:z="rgba(0, 0, 0, 0)",innerBoxShadow:N={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:Y="rgba(0, 0, 0, 0)",stroke:B=0,backgroundColor:T="#000000",textColor:H="#ffffff",borderColor:$="#ffffff",iconColor:I="#ffffff",hoverEffect:P="none",fontFamily:M,fontSettings:g,fontSize:D,lineHeight:A,letterSpacing:X=0,wordSpacing:ie=0,textAppearance:L,stateOverrides:_,minWidth:V=0,minHeight:se=0,width:re=0,height:k=0}=e,le=W.buildColorVars(r,{backgroundColor:T,textColor:H,borderColor:$,iconColor:I,boxShadowColor:z,innerBoxShadowColor:Y},zx,jx,_),G=i&&i!=="default"?`${r}-state-${i}`:"",b=t&&!n?`${r}-editing`:"",E=P!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${P}`:"",j=P==="reveal"||P==="swipe",me=P==="content-roll",K=P==="reveal"&&(!t||n),te=x===!0,J=d==="a"?v??p:p,ne=d==="c",Pe=d!=="b",be={fontSettings:{fontFamily:M,fontWeight:(g==null?void 0:g.fontWeight)??400,fontStyle:(g==null?void 0:g.fontStyle)??"normal"},fontSize:D??.01,lineHeight:A,letterSpacing:X,wordSpacing:ie,textAppearance:L,color:H},ue={...Pe?an(Ut(be,t)):{},[`--${r}-box-shadow-x`]:W.scalingValue(S.left,t),[`--${r}-box-shadow-y`]:W.scalingValue(S.top,t),[`--${r}-box-shadow-blur`]:W.scalingValue(S.right,t),[`--${r}-box-shadow-spread`]:W.scalingValue(S.bottom,t),[`--${r}-inner-box-shadow-x`]:W.scalingValue(N.left,t),[`--${r}-inner-box-shadow-y`]:W.scalingValue(N.top,t),[`--${r}-inner-box-shadow-blur`]:W.scalingValue(N.right,t),[`--${r}-inner-box-shadow-spread`]:W.scalingValue(N.bottom,t),paddingTop:W.scalingValue(C.top,t),paddingRight:W.scalingValue(C.right,t),paddingBottom:W.scalingValue(C.bottom,t),paddingLeft:W.scalingValue(C.left,t),borderRadius:W.scalingValue(y,t),borderWidth:W.scalingValue(B,t),...ne?{}:{justifyContent:_a[J],textAlign:J},...ne&&!me?{gap:W.scalingValue(m,t)}:{},...te?{width:W.scalingValue(re,t),height:W.scalingValue(k,t)}:{minWidth:W.scalingValue(V,t),minHeight:W.scalingValue(se,t),...ne?{width:"100%"}:{}}};let fe;const $e={display:"inline-flex",alignItems:"center",justifyContent:ne?_a[J]:_a[d==="a"?J:"center"],gap:ne?W.scalingValue(m,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:J}:{}};if(d==="b"){const ae=()=>ac(r,u,h>0?"fixed":"fill",100,h,t);fe=me?Na(r,ae,`${r}-icon-roll`,void 0,$e):ae()}else if(d==="c"){const ae=()=>{const xe=a.jsx("span",{className:`${r}-text`,style:{textAlign:J},children:c}),ke=ac(r,u,f>0?"fixed":"fill",100,f,t);return w==="icon-text"?a.jsxs(a.Fragment,{children:[ke,xe]}):a.jsxs(a.Fragment,{children:[xe,ke]})};fe=me?Na(r,ae,`${r}-icon-text-roll`,void 0,$e):ae()}else fe=me?Na(r,()=>c,`${r}-label-roll`,void 0,$e):j?a.jsx("span",{className:`${r}-button-inner`,children:c}):c;const Q=K?ae=>Vx(ae,r):void 0,Z=K?ae=>Gx(ae,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:le,children:a.jsx("div",{className:`${r}-wrapper ${G} ${b}`.trim(),children:a.jsx("div",{className:`${r}-button ${E}`.trim(),style:ue,onMouseEnter:Q,onMouseLeave:Z,role:"button",tabIndex:o||t&&!n?void 0:0,children:fe})})})]})}const Yx=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
17872
+ `}function Da(e,t,n="",i,o){const r=t();return a.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[a.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:r}),a.jsxs("span",{className:`${e}-content-roll-viewport`,children:[a.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),a.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function dc(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(sn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return a.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=O.scalingValue(o,r);return a.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:l})}return a.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function Zv({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=O.useScopedStyles(),l=s.useMemo(()=>Kv(r),[r]),{type:d="a",label:c="Button",icon:u,alignment:p="center",alignA:x,order:b="text-icon",gap:m=0,iconSize:h=0,iconWidthC:f=0,dimensions:v=!1,padding:C={top:0,right:0,bottom:0,left:0},cornerRadius:y=0,boxShadow:S={top:0,left:0,right:0,bottom:0},boxShadowColor:j="rgba(0, 0, 0, 0)",innerBoxShadow:N={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:U="rgba(0, 0, 0, 0)",stroke:W=0,backgroundColor:R="#000000",textColor:B="#ffffff",borderColor:$="#ffffff",iconColor:T="#ffffff",hoverEffect:k="none",fontFamily:E,fontSettings:g,fontSize:A,lineHeight:F,letterSpacing:X=0,wordSpacing:ee=0,textAppearance:P,stateOverrides:D,minWidth:K=0,minHeight:le=0,width:re=0,height:M=0}=e,ie=O.buildColorVars(r,{backgroundColor:R,textColor:B,borderColor:$,iconColor:T,boxShadowColor:j,innerBoxShadowColor:U},Xv,Yv,D),G=i&&i!=="default"?`${r}-state-${i}`:"",oe=t&&!n?`${r}-editing`:"",te=k!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${k}`:"",ye=k==="reveal"||k==="swipe",Me=k==="content-roll",w=k==="reveal"&&(!t||n),Y=v===!0,z=d==="a"?x??p:p,H=d==="c",Te=d!=="b",fe={fontSettings:{fontFamily:E,fontWeight:(g==null?void 0:g.fontWeight)??400,fontStyle:(g==null?void 0:g.fontStyle)??"normal"},fontSize:A??.01,lineHeight:F,letterSpacing:X,wordSpacing:ee,textAppearance:P,color:B},de={...Te?an(Ut(fe,t)):{},[`--${r}-box-shadow-x`]:O.scalingValue(S.left,t),[`--${r}-box-shadow-y`]:O.scalingValue(S.top,t),[`--${r}-box-shadow-blur`]:O.scalingValue(S.right,t),[`--${r}-box-shadow-spread`]:O.scalingValue(S.bottom,t),[`--${r}-inner-box-shadow-x`]:O.scalingValue(N.left,t),[`--${r}-inner-box-shadow-y`]:O.scalingValue(N.top,t),[`--${r}-inner-box-shadow-blur`]:O.scalingValue(N.right,t),[`--${r}-inner-box-shadow-spread`]:O.scalingValue(N.bottom,t),paddingTop:O.scalingValue(C.top,t),paddingRight:O.scalingValue(C.right,t),paddingBottom:O.scalingValue(C.bottom,t),paddingLeft:O.scalingValue(C.left,t),borderRadius:O.scalingValue(y,t),borderWidth:O.scalingValue(W,t),...H?{}:{justifyContent:Ha[z],textAlign:z},...H&&!Me?{gap:O.scalingValue(m,t)}:{},...Y?{width:O.scalingValue(re,t),height:O.scalingValue(M,t)}:{minWidth:O.scalingValue(K,t),minHeight:O.scalingValue(le,t),...H?{width:"100%"}:{}}};let he;const we={display:"inline-flex",alignItems:"center",justifyContent:H?Ha[z]:Ha[d==="a"?z:"center"],gap:H?O.scalingValue(m,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:z}:{}};if(d==="b"){const ae=()=>dc(r,u,h>0?"fixed":"fill",100,h,t);he=Me?Da(r,ae,`${r}-icon-roll`,void 0,we):ae()}else if(d==="c"){const ae=()=>{const $e=a.jsx("span",{className:`${r}-text`,style:{textAlign:z},children:c}),ke=dc(r,u,f>0?"fixed":"fill",100,f,t);return b==="icon-text"?a.jsxs(a.Fragment,{children:[ke,$e]}):a.jsxs(a.Fragment,{children:[$e,ke]})};he=Me?Da(r,ae,`${r}-icon-text-roll`,void 0,we):ae()}else he=Me?Da(r,()=>c,`${r}-label-roll`,void 0,we):ye?a.jsx("span",{className:`${r}-button-inner`,children:c}):c;const Z=w?ae=>qv(ae,r):void 0,Q=w?ae=>Uv(ae,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:ie,children:a.jsx("div",{className:`${r}-wrapper ${G} ${oe}`.trim(),children:a.jsx("div",{className:`${r}-button ${te}`.trim(),style:de,onMouseEnter:Z,onMouseLeave:Q,role:"button",tabIndex:o||t&&!n?void 0:0,children:he})})})]})}const Jv=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
17869
17873
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
17870
17874
  import { CommonComponentProps } from '../props';
17871
17875
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
@@ -18492,7 +18496,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18492
18496
  </>
18493
18497
  );
18494
18498
  }
18495
- `,Ux={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Kx=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],Zx={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:"BG Default",titleByState:{default:"BG Default",hover:"BG Hover",active:"BG 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:{...Ux.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:[...Kx],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"]},Jx={element:qx,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:Zx,sourceCode:Yx,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function Qx(e){return`
18499
+ `,Qv={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},e0=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],t0={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:"BG Default",titleByState:{default:"BG Default",hover:"BG Hover",active:"BG 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:{...Qv.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:[...e0],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"]},n0={element:Zv,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:t0,sourceCode:Jv,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function i0(e){return`
18496
18500
  .${e}-titles-row {
18497
18501
  position: relative;
18498
18502
  flex: 0 1 auto;
@@ -18690,7 +18694,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18690
18694
  pointer-events: auto;
18691
18695
  flex-shrink: 0;
18692
18696
  }
18693
- `}const In=500,yo=650,mn="cubic-bezier(0.22, 1, 0.36, 1)",e0=72,t0=50,n0=1e4,i0=650,o0=500;function r0(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Gd(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Nr(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 a0(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Gd(i,n):null}function s0(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 Co(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 sc(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Co(e,i,n)}const l0=.03;function Xd(e){return e.width*l0}const Wa={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function yr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function lc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function c0(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function as(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,d=o/r;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const c=r*l;return{width:c,height:r,left:i.left+(o-c)/2,top:i.top}}function d0(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:as(e,t.width,t.height)}function u0(e,t){if(sa(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 p0(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 m0({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>sa(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function oo(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:d}=n,c=Xd(n);return t==="left"?{left:l+c-i,top:r,width:i,height:o}:{left:l+d-c,top:r,width:i,height:o}}function Or(e,t,n){const i=oo(e,t,n);return{...i,left:2*i.left-e.left}}function g0(e,t,n){const{left:i,width:o}=n,r=Xd(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function qd(e,t,n,i){const o=oo(e,"left",i),r=oo(e,"right",i),l=Or(e,"left",i),d=Or(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function h0(e,t,n,i){const{start:o,end:r}=qd(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function f0(e,t,n){const i=oo(e,t,n),o=Or(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function sa(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function y0({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const d=s.useRef(null);return s.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:c=>c.stopPropagation(),style:o},e)})}function vr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return sa(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function v0({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:w,resolveCloseSourceRect:m,onClose:h,onPrev:f,onNext:x}){const C=s.useRef(null),y=s.useRef(null),S=s.useRef(null),z=s.useRef(new Map),[N,Y]=s.useState(0),B=s.useRef(null),T=s.useRef(0),H=s.useRef(0),$=s.useRef("none"),I=s.useRef(!1),P=s.useRef(!1),M=s.useRef(!1),g=s.useRef(null),D=s.useRef(null),A=s.useRef(null),X=s.useRef(()=>{}),ie=s.useRef(null),L=s.useRef(null),_=s.useRef(null),V=s.useRef(!1),[se,re]=s.useState(null),[k,le]=s.useState(Wa),[G,b]=s.useState(0),[E,j]=s.useState("opening"),[me,K]=s.useState(0),[te,O]=s.useState(0),[J,ne]=s.useState(!1),[Pe,be]=s.useState(null),[Re,ue]=s.useState(null),[fe,$e]=s.useState(null),[Q,Z]=s.useState(!1),[ae,xe]=s.useState(null),[ke,Ce]=s.useState(!1),q=s.useRef(!1),[ye,ce]=s.useState(!1),[U,de]=s.useState(!1),He=s.useRef(n),he=s.useRef(void 0),ee=t[n],Je=ee?sa(ee):!1,Ne=te!==0||J,ct=!l&&(!r||!!d),Ke=c&&!l,ut=u.length>1,lt=s.useCallback((F,Ee)=>t.length<=1?null:t[(F+Ee+t.length)%t.length]??null,[t]),Ye=ut?Co(u,p,-1):lt(n,-1),Le=ut?Co(u,p,1):lt(n,1),We=Pe===-1&&Ne?ut&&Re!==null?Co(u,Re,-1):fe!==null?lt(fe,-1):null:null,Be=Pe===1&&Ne?ut&&Re!==null?Co(u,Re,1):fe!==null?lt(fe,1):null:null,Ue=We&&We.url!==(Ye==null?void 0:Ye.url)?We:null,ge=Be&&Be.url!==(Le==null?void 0:Le.url)?Be:null,ve=Ye&&Ke?(()=>{const F=ut?sc(u,p,-1):t.length>2?lt((n-1+t.length)%t.length,-1):null;return F&&F.url!==Ye.url?F:null})():null,_e=Le&&Ke?(()=>{const F=ut?sc(u,p,1):t.length>2?lt((n+1)%t.length,1):null;return F&&F.url!==Le.url?F:null})():null,Ze=Ue??ve,we=ge??_e,Te=s.useCallback((F,Ee,Fe)=>{if(!F||!Ee||!Fe)return;const Oe=z.current,at=Oe.get(F);(at==null?void 0:at.width)===Ee&&(at==null?void 0:at.height)===Fe||(Oe.set(F,{width:Ee,height:Fe}),Y(Et=>Et+1))},[]),Xe=s.useCallback(F=>{if(!(F!=null&&F.url))return null;const Ee=z.current.get(F.url);return d0(y.current,Ee)},[N,G]),ze=s.useCallback(()=>{if(!ee)return;const F=Xe(ee);if(F){re(F);return}const Ee=y.current;Ee&&re(lc(Ee))},[ee,Xe]),Ie=s.useCallback(F=>{if(ut){const Ee=u.length;ue((p+F+Ee)%Ee),$e(null);return}t.length>1&&($e((n+F+t.length)%t.length),ue(null))},[ut,u.length,p,t.length,n]),Ve=s.useCallback(F=>{M.current=F,ne(F)},[]),De=s.useCallback(()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null)},[]),tt=s.useCallback(()=>{De(),g.current=window.setTimeout(()=>{De(),Ve(!1)},yo+32)},[De,Ve]),nt=s.useCallback(()=>{const F=C.current;if(!F){le({left:0,top:0,width:typeof window<"u"?window.innerWidth:Wa.width,height:typeof window<"u"?window.innerHeight:Wa.height});return}const Ee=F.getBoundingClientRect();le({left:Ee.left,top:Ee.top,width:Ee.width,height:Ee.height})},[]),st=s.useCallback((F,Ee)=>{if(Ne){if(ye&&!J)return`translate(${te}px, 0px)`;if(J&&Pe!==null){const Fe=Xe(F);if(!Fe)return;const{x:Oe,y:at}=h0(Fe,Ee,Pe,k);return`translate(${Oe}px, ${at}px)`}if(J)return"translate(0px, 0px)"}},[Ne,ye,J,te,Pe,k,Xe]),St=s.useCallback(()=>{const F=D.current;D.current=null,De(),Ve(!1),be(null),ue(null),$e(null),O(0),ce(!1),I.current=!1,H.current=0,$.current="none",F===-1?f():F===1&&x()},[De,Ve,f,x]),Bt=s.useCallback(()=>{De(),g.current=window.setTimeout(()=>{D.current!==null&&St()},yo+32)},[De,St]),zt=s.useCallback(()=>{De(),D.current=null,Ve(!1),be(null),ue(null),$e(null),O(0),ce(!1),I.current=!1,H.current=0,$.current="none"},[De,Ve]),ft=s.useCallback(F=>{if(!(!Ke||!se)){if(M.current){if(D.current===F){A.current=F,St();return}zt()}De(),Ie(F),D.current=F,be(F),Ve(!0),Bt()}},[Ke,se,St,zt,De,Ie,Ve,Bt]);X.current=ft;const wt=s.useCallback(()=>{ie.current=null,V.current=!1,L.current!==null&&(window.clearInterval(L.current),L.current=null),_.current!==null&&(window.clearTimeout(_.current),_.current=null)},[]),jt=s.useCallback(F=>{L.current!==null&&window.clearInterval(L.current);const Ee=V.current?o0:i0;L.current=window.setInterval(()=>{X.current(F)},Ee)},[]),At=s.useCallback(F=>{ie.current!==F&&(wt(),ie.current=F,V.current=!1,X.current(F),jt(F),_.current=window.setTimeout(()=>{_.current=null,ie.current===F&&(V.current=!0,jt(F))},n0))},[wt,jt]),xt=s.useCallback(()=>{const F=y.current;if(!F)return;const Ee=ee==null?void 0:ee.url,Fe=Ee?z.current.get(Ee):void 0;if(Fe!=null&&Fe.width&&(Fe!=null&&Fe.height)){re(as(F,Fe.width,Fe.height));return}const Oe=S.current;if(Oe&&Ee&&(Oe.src===Ee||Oe.currentSrc===Ee)){const{width:Et,height:it}=c0(Oe);if(Et&&it){Te(Ee,Et,it),re(as(F,Et,it));return}}const at=lc(F);!at.width||!at.height||re(at)},[ee==null?void 0:ee.url,Te]),Ft=s.useCallback(F=>{if(S.current=F,!!F){if(F instanceof HTMLVideoElement){F.readyState>=1&&F.videoWidth>0&&xt();return}F.complete&&F.naturalWidth>0&&xt()}},[xt]),Nt=s.useCallback(()=>{nt(),xt(),b(F=>F+1)},[nt,xt]);s.useEffect(()=>{Nt();const F=y.current,Ee=C.current,Fe=new ResizeObserver(()=>Nt());return F&&Fe.observe(F),Ee&&Fe.observe(Ee),window.addEventListener("resize",Nt),()=>{Fe.disconnect(),window.removeEventListener("resize",Nt)}},[Nt,n,v]),s.useLayoutEffect(()=>{if(!ee)return;const F=S.current;if(F){if(F instanceof HTMLImageElement&&F.complete&&F.naturalWidth>0){xt();return}F instanceof HTMLVideoElement&&F.readyState>=1&&F.videoWidth>0&&xt()}},[ee==null?void 0:ee.url,n,xt]),s.useEffect(()=>{ze()},[ze,N]),s.useEffect(()=>{const F=new Set,Ee=[],Fe=Oe=>{!(Oe!=null&&Oe.url)||F.has(Oe.url)||(F.add(Oe.url),Ee.push(Oe))};t.forEach(Fe),u.forEach(Oe=>Oe.items.forEach(Fe)),Ee.forEach(Oe=>{z.current.has(Oe.url)||u0(Oe,Te)})},[t,u,Te]),s.useEffect(()=>{if(E!=="opening"||!se)return;if(!w){j("open");return}Z(!1);const F=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Z(!0),j("open")})});return()=>cancelAnimationFrame(F)},[E,se,w]),s.useEffect(()=>{if(E!=="closing")return;const F=setTimeout(()=>h(),In);return()=>clearTimeout(F)},[E,h]),s.useEffect(()=>()=>{De()},[De]),s.useLayoutEffect(()=>{He.current===n&&he.current===(ee==null?void 0:ee.url)||(De(),D.current=null,be(null),ue(null),$e(null),K(0),O(0),Ve(!1),de(!1),ce(!1),T.current=0,H.current=0,$.current="none",I.current=!1,B.current=null,P.current=!1,S.current=null,ze(),He.current=n,he.current=ee==null?void 0:ee.url)},[n,ee==null?void 0:ee.url,Ve,De,ze]),s.useLayoutEffect(()=>{const F=A.current;F!==null&&(A.current=null,requestAnimationFrame(()=>{X.current(F)}))},[n,p,ee==null?void 0:ee.url]),s.useLayoutEffect(()=>{if(E==="opening"){q.current=!1,Ce(!1);return}if(E!=="open"||q.current)return;if(!Ye&&!Le){q.current=!0;return}Ce(!1);const F=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Ce(!0),q.current=!0})});return()=>cancelAnimationFrame(F)},[E,Ye==null?void 0:Ye.url,Le==null?void 0:Le.url]),s.useEffect(()=>{if(E!=="open")return;const F=()=>{const it=vt=>{vt.stopPropagation(),vt.preventDefault(),document.removeEventListener("click",it,!0)};document.addEventListener("click",it,!0)},Ee=it=>{const vt=it<0?1:-1;De(),Ie(vt),D.current=vt,be(vt),Ve(!0),Bt()},Fe=it=>{if(Math.abs(it)>t0&&Ke){Ee(it);return}D.current=null,be(null),ue(null),$e(null),Ve(!0),O(0),tt()},Oe=it=>{if(it.touches.length!==1||M.current)return;const vt=it.touches[0];P.current=!0,B.current={x:vt.clientX,y:vt.clientY},$.current="none",H.current=0,I.current=!1},at=it=>{if(!B.current||it.touches.length!==1||M.current)return;const vt=it.touches[0],Ot=vt.clientX-B.current.x,It=vt.clientY-B.current.y;if($.current==="none"){if(Math.abs(Ot)<10&&Math.abs(It)<10)return;if(Math.abs(Ot)>Math.abs(It)){if(!Ke)return;$.current="horizontal"}else if(It>0){if(!ct)return;$.current="vertical"}else return}if($.current==="horizontal"){I.current=!0,ce(!0),H.current=Ot,O(Ot),it.preventDefault();return}$.current==="vertical"&&(I.current=!0,ce(!0),T.current=It,K(It),it.preventDefault())},Et=()=>{if(!B.current)return;const it=$.current,vt=I.current;if(vt&&it==="horizontal")Fe(H.current),F();else if(vt&&it==="vertical"){const Ot=T.current;if(ct&&Ot>e0){const It=window.innerHeight;T.current=It,de(!0),K(It),j("closing")}else T.current=0,K(0);F()}else it==="horizontal"&&Math.abs(H.current)>0&&(Fe(H.current),F());B.current=null,$.current="none",H.current=0,I.current=!1,ce(!1)};return document.addEventListener("touchstart",Oe,{passive:!0}),document.addEventListener("touchmove",at,{passive:!1}),document.addEventListener("touchend",Et),document.addEventListener("touchcancel",Et),()=>{document.removeEventListener("touchstart",Oe),document.removeEventListener("touchmove",at),document.removeEventListener("touchend",Et),document.removeEventListener("touchcancel",Et)}},[E,Ke,Ve,tt,De,ct,Bt,Ie]);const Kt=s.useCallback(()=>{const F=(m==null?void 0:m())??w??null;F&&se&&(xe(F),Z(!0)),j("closing")},[m,w,se]);s.useEffect(()=>{const F=Oe=>{if(Oe.key==="Escape"){if(r&&d||E==="closing")return;wt(),Kt();return}if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight"||E!=="open"||!Ke)return;Oe.preventDefault();const at=Oe.key==="ArrowLeft"?-1:1;Oe.repeat&&ie.current===at||At(at)},Ee=Oe=>{if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight")return;const at=Oe.key==="ArrowLeft"?-1:1;ie.current===at&&wt()},Fe=()=>{wt()};return window.addEventListener("keydown",F),window.addEventListener("keyup",Ee),window.addEventListener("blur",Fe),()=>{window.removeEventListener("keydown",F),window.removeEventListener("keyup",Ee),window.removeEventListener("blur",Fe),wt()}},[E,r,d,Kt,Ke,At,wt]),s.useEffect(()=>{E!=="open"&&wt()},[E,wt]);const Jt=()=>{E==="closing"||l||Kt()},Tt=E==="open",Wt=E==="closing",rn=me>0?Math.max(0,1-me/500):1,gt=me>0?Math.max(.35,1-me/500):1,Ae=s.useCallback(F=>{if(!(F.propertyName!=="transform"||!M.current)){if(D.current!==null){St();return}De(),Ve(!1)}},[De,Ve,St]),Ge=E==="closing"?ae??w:w,rt=Ge&&se&&(E==="opening"||Wt)?r0(Ge,se):void 0,ht=Ne&&ee?st(ee,"center"):me>0?`translateY(${me}px)`:rt,yt=se?yr(se,k):null,Lt=!!(Ge&&se),mt=Lt&&(E==="closing"||E==="open"&&Q),Vt={position:"absolute",top:yt==null?void 0:yt.top,left:yt==null?void 0:yt.left,width:yt==null?void 0:yt.width,height:yt==null?void 0:yt.height,objectFit:"contain",transformOrigin:"top left",transform:ht,opacity:me>0?gt:Lt?1:E==="opening"||Wt?0:1,transition:ye&&!J?"none":J?`transform ${yo}ms ${mn}`:U?`transform ${In}ms ${mn}, opacity ${In}ms ${mn}`:mt?`transform ${In}ms ${mn}`:E==="opening"||Wt?`opacity ${In}ms ${mn}`:"none",pointerEvents:Je&&Tt&&!Ne?"auto":"none",touchAction:Je&&Tt?"none":void 0,zIndex:1,overflow:Je?"hidden":void 0},kt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Tt&&!Ne?"auto":"none"},Mt=(F,Ee,Fe="adjacent")=>{const Oe=Xe(F);if(!Oe)return{display:"none"};const at=Fe==="far"?Ee==="left"?"far-left":"far-right":Ee==="left"?"left-adjacent":"right-adjacent",{start:Et}=Pe!==null?qd(Oe,at,Pe,k):{start:Fe==="far"?Or(Oe,Ee,k):oo(Oe,Ee,k)},it=yr(Et,k),vt=st(F,at),Ot=!Ne&&Fe==="adjacent"&&Tt&&!ke?f0(Oe,Ee,k):null,It=Fe==="far"&&Ne&&Pe===(Ee==="left"?-1:1),nn=ye&&!J?!1:J,un=Fe==="adjacent"&&Tt&&ke&&!Ne;return{position:"absolute",top:it.top,left:it.left,width:it.width,height:it.height,objectFit:"contain",transform:vt??(Ot?`translate(${Ot.x}px, ${Ot.y}px)`:void 0),opacity:Fe==="far"?Tt&&It?1:0:Tt?1:0,transition:nn?Fe==="far"?`transform ${yo}ms ${mn}`:`transform ${yo}ms ${mn}, opacity ${In}ms ${mn}`:un?`transform ${In}ms ${mn}`:E==="opening"||Wt?`opacity ${In}ms ${mn}`:"none",pointerEvents:"none",zIndex:1}},Xt=(F,Ee)=>{const Fe=Xe(F);return Fe?g0(oo(Fe,Ee,k),Ee,k):null},qt=F=>Ee=>{if(!l){if(P.current){P.current=!1;return}Ee.stopPropagation(),ft(F)}},Ht=Ye?Xt(Ye,"left"):null,Dt=Le?Xt(Le,"right"):null,_t=Ht?yr(Ht,k):null,Ct=Dt?yr(Dt,k):null;return a.jsxs("div",{ref:C,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:E==="open"?"none":void 0},onClick:Jt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Tt?rn:0,transition:ye?"none":`opacity ${In}ms ${mn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Tt?1:0,transition:ye?"none":`opacity ${In}ms ${mn}`,pointerEvents:"none"},children:a.jsx(Rd,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,onClose:Jt})})]}),Tt&&Ze&&a.jsx(vr,{media:Ze,style:Mt(Ze,"left","far"),onMeasure:Te,onTransitionEnd:Ae},`far-prev-${Ze.url}`),Tt&&Ye&&a.jsxs(a.Fragment,{children:[a.jsx(vr,{media:Ye,style:Mt(Ye,"left"),onMeasure:Te,onTransitionEnd:Ae},`prev-${Ye.url}`),_t&&a.jsx("div",{style:{position:"absolute",top:_t.top,left:_t.left,width:_t.width,height:_t.height,cursor:l||ye?"default":"pointer",pointerEvents:l||ye?"none":"auto",zIndex:3},onClick:qt(-1)})]}),Tt&&Le&&a.jsxs(a.Fragment,{children:[a.jsx(vr,{media:Le,style:Mt(Le,"right"),onMeasure:Te,onTransitionEnd:Ae},`next-${Le.url}`),Ct&&a.jsx("div",{style:{position:"absolute",top:Ct.top,left:Ct.left,width:Ct.width,height:Ct.height,cursor:l||ye?"default":"pointer",pointerEvents:l||ye?"none":"auto",zIndex:3},onClick:qt(1)})]}),Tt&&we&&a.jsx(vr,{media:we,style:Mt(we,"right","far"),onMeasure:Te,onTransitionEnd:Ae},`far-next-${we.url}`),se&&ee&&(Je?a.jsx(y0,{src:ee.url,phase:E,onMediaElement:Ft,wrapperStyle:Vt,videoStyle:kt,onLoadedMetadata:xt,onTransitionEnd:Ae},`${n}-${ee.url}`):a.jsx("img",{ref:Ft,src:ee.url,alt:ee.name,onLoad:xt,onTransitionEnd:Ae,style:Vt},`${n}-${ee.url}`))]})}const x0=20,b0=.18;function w0(e){return`
18697
+ `}const In=500,xo=650,mn="cubic-bezier(0.22, 1, 0.36, 1)",o0=72,r0=50,a0=1e4,s0=650,l0=500;function c0(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Kd(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Dr(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 d0(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Kd(i,n):null}function u0(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 $o(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 uc(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return $o(e,i,n)}const p0=.03;function Zd(e){return e.width*p0}const Oa={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function vr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function pc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function m0(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function cs(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,d=o/r;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const c=r*l;return{width:c,height:r,left:i.left+(o-c)/2,top:i.top}}function g0(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:cs(e,t.width,t.height)}function h0(e,t){if(da(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 f0(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 y0({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>da(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function ro(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:d}=n,c=Zd(n);return t==="left"?{left:l+c-i,top:r,width:i,height:o}:{left:l+d-c,top:r,width:i,height:o}}function jr(e,t,n){const i=ro(e,t,n);return{...i,left:2*i.left-e.left}}function x0(e,t,n){const{left:i,width:o}=n,r=Zd(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function Jd(e,t,n,i){const o=ro(e,"left",i),r=ro(e,"right",i),l=jr(e,"left",i),d=jr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function v0(e,t,n,i){const{start:o,end:r}=Jd(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function b0(e,t,n){const i=ro(e,t,n),o=jr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function da(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function w0({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const d=s.useRef(null);return s.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:c=>c.stopPropagation(),style:o},e)})}function br({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return da(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function S0({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:x,sourceRect:b,resolveCloseSourceRect:m,onClose:h,onPrev:f,onNext:v}){const C=s.useRef(null),y=s.useRef(null),S=s.useRef(null),j=s.useRef(new Map),[N,U]=s.useState(0),W=s.useRef(null),R=s.useRef(0),B=s.useRef(0),$=s.useRef("none"),T=s.useRef(!1),k=s.useRef(!1),E=s.useRef(!1),g=s.useRef(null),A=s.useRef(null),F=s.useRef(null),X=s.useRef(()=>{}),ee=s.useRef(null),P=s.useRef(null),D=s.useRef(null),K=s.useRef(!1),[le,re]=s.useState(null),[M,ie]=s.useState(Oa),[G,oe]=s.useState(0),[te,ye]=s.useState("opening"),[Me,w]=s.useState(0),[Y,I]=s.useState(0),[z,H]=s.useState(!1),[Te,fe]=s.useState(null),[ve,de]=s.useState(null),[he,we]=s.useState(null),[Z,Q]=s.useState(!1),[ae,$e]=s.useState(null),[ke,xe]=s.useState(!1),V=s.useRef(!1),[pe,se]=s.useState(!1),[q,ce]=s.useState(!1),We=s.useRef(n),ge=s.useRef(void 0),J=t[n],Ke=J?da(J):!1,_e=Y!==0||z,rt=!l&&(!r||!!d),Ye=c&&!l,dt=u.length>1,at=s.useCallback((_,Pe)=>t.length<=1?null:t[(_+Pe+t.length)%t.length]??null,[t]),Xe=dt?$o(u,p,-1):at(n,-1),Le=dt?$o(u,p,1):at(n,1),He=Te===-1&&_e?dt&&ve!==null?$o(u,ve,-1):he!==null?at(he,-1):null:null,Be=Te===1&&_e?dt&&ve!==null?$o(u,ve,1):he!==null?at(he,1):null:null,Ze=He&&He.url!==(Xe==null?void 0:Xe.url)?He:null,me=Be&&Be.url!==(Le==null?void 0:Le.url)?Be:null,be=Xe&&Ye?(()=>{const _=dt?uc(u,p,-1):t.length>2?at((n-1+t.length)%t.length,-1):null;return _&&_.url!==Xe.url?_:null})():null,Ne=Le&&Ye?(()=>{const _=dt?uc(u,p,1):t.length>2?at((n+1)%t.length,1):null;return _&&_.url!==Le.url?_:null})():null,Je=Ze??be,Se=me??Ne,Ie=s.useCallback((_,Pe,Fe)=>{if(!_||!Pe||!Fe)return;const Oe=j.current,lt=Oe.get(_);(lt==null?void 0:lt.width)===Pe&&(lt==null?void 0:lt.height)===Fe||(Oe.set(_,{width:Pe,height:Fe}),U(Et=>Et+1))},[]),qe=s.useCallback(_=>{if(!(_!=null&&_.url))return null;const Pe=j.current.get(_.url);return g0(y.current,Pe)},[N,G]),ze=s.useCallback(()=>{if(!J)return;const _=qe(J);if(_){re(_);return}const Pe=y.current;Pe&&re(pc(Pe))},[J,qe]),Re=s.useCallback(_=>{if(dt){const Pe=u.length;de((p+_+Pe)%Pe),we(null);return}t.length>1&&(we((n+_+t.length)%t.length),de(null))},[dt,u.length,p,t.length,n]),Ve=s.useCallback(_=>{E.current=_,H(_)},[]),De=s.useCallback(()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null)},[]),tt=s.useCallback(()=>{De(),g.current=window.setTimeout(()=>{De(),Ve(!1)},xo+32)},[De,Ve]),nt=s.useCallback(()=>{const _=C.current;if(!_){ie({left:0,top:0,width:typeof window<"u"?window.innerWidth:Oa.width,height:typeof window<"u"?window.innerHeight:Oa.height});return}const Pe=_.getBoundingClientRect();ie({left:Pe.left,top:Pe.top,width:Pe.width,height:Pe.height})},[]),ct=s.useCallback((_,Pe)=>{if(_e){if(pe&&!z)return`translate(${Y}px, 0px)`;if(z&&Te!==null){const Fe=qe(_);if(!Fe)return;const{x:Oe,y:lt}=v0(Fe,Pe,Te,M);return`translate(${Oe}px, ${lt}px)`}if(z)return"translate(0px, 0px)"}},[_e,pe,z,Y,Te,M,qe]),St=s.useCallback(()=>{const _=A.current;A.current=null,De(),Ve(!1),fe(null),de(null),we(null),I(0),se(!1),T.current=!1,B.current=0,$.current="none",_===-1?f():_===1&&v()},[De,Ve,f,v]),Bt=s.useCallback(()=>{De(),g.current=window.setTimeout(()=>{A.current!==null&&St()},xo+32)},[De,St]),zt=s.useCallback(()=>{De(),A.current=null,Ve(!1),fe(null),de(null),we(null),I(0),se(!1),T.current=!1,B.current=0,$.current="none"},[De,Ve]),ft=s.useCallback(_=>{if(!(!Ye||!le)){if(E.current){if(A.current===_){F.current=_,St();return}zt()}De(),Re(_),A.current=_,fe(_),Ve(!0),Bt()}},[Ye,le,St,zt,De,Re,Ve,Bt]);X.current=ft;const wt=s.useCallback(()=>{ee.current=null,K.current=!1,P.current!==null&&(window.clearInterval(P.current),P.current=null),D.current!==null&&(window.clearTimeout(D.current),D.current=null)},[]),jt=s.useCallback(_=>{P.current!==null&&window.clearInterval(P.current);const Pe=K.current?l0:s0;P.current=window.setInterval(()=>{X.current(_)},Pe)},[]),At=s.useCallback(_=>{ee.current!==_&&(wt(),ee.current=_,K.current=!1,X.current(_),jt(_),D.current=window.setTimeout(()=>{D.current=null,ee.current===_&&(K.current=!0,jt(_))},a0))},[wt,jt]),vt=s.useCallback(()=>{const _=y.current;if(!_)return;const Pe=J==null?void 0:J.url,Fe=Pe?j.current.get(Pe):void 0;if(Fe!=null&&Fe.width&&(Fe!=null&&Fe.height)){re(cs(_,Fe.width,Fe.height));return}const Oe=S.current;if(Oe&&Pe&&(Oe.src===Pe||Oe.currentSrc===Pe)){const{width:Et,height:it}=m0(Oe);if(Et&&it){Ie(Pe,Et,it),re(cs(_,Et,it));return}}const lt=pc(_);!lt.width||!lt.height||re(lt)},[J==null?void 0:J.url,Ie]),Ft=s.useCallback(_=>{if(S.current=_,!!_){if(_ instanceof HTMLVideoElement){_.readyState>=1&&_.videoWidth>0&&vt();return}_.complete&&_.naturalWidth>0&&vt()}},[vt]),Nt=s.useCallback(()=>{nt(),vt(),oe(_=>_+1)},[nt,vt]);s.useEffect(()=>{Nt();const _=y.current,Pe=C.current,Fe=new ResizeObserver(()=>Nt());return _&&Fe.observe(_),Pe&&Fe.observe(Pe),window.addEventListener("resize",Nt),()=>{Fe.disconnect(),window.removeEventListener("resize",Nt)}},[Nt,n,x]),s.useLayoutEffect(()=>{if(!J)return;const _=S.current;if(_){if(_ instanceof HTMLImageElement&&_.complete&&_.naturalWidth>0){vt();return}_ instanceof HTMLVideoElement&&_.readyState>=1&&_.videoWidth>0&&vt()}},[J==null?void 0:J.url,n,vt]),s.useEffect(()=>{ze()},[ze,N]),s.useEffect(()=>{const _=new Set,Pe=[],Fe=Oe=>{!(Oe!=null&&Oe.url)||_.has(Oe.url)||(_.add(Oe.url),Pe.push(Oe))};t.forEach(Fe),u.forEach(Oe=>Oe.items.forEach(Fe)),Pe.forEach(Oe=>{j.current.has(Oe.url)||h0(Oe,Ie)})},[t,u,Ie]),s.useEffect(()=>{if(te!=="opening"||!le)return;if(!b){ye("open");return}Q(!1);const _=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Q(!0),ye("open")})});return()=>cancelAnimationFrame(_)},[te,le,b]),s.useEffect(()=>{if(te!=="closing")return;const _=setTimeout(()=>h(),In);return()=>clearTimeout(_)},[te,h]),s.useEffect(()=>()=>{De()},[De]),s.useLayoutEffect(()=>{We.current===n&&ge.current===(J==null?void 0:J.url)||(De(),A.current=null,fe(null),de(null),we(null),w(0),I(0),Ve(!1),ce(!1),se(!1),R.current=0,B.current=0,$.current="none",T.current=!1,W.current=null,k.current=!1,S.current=null,ze(),We.current=n,ge.current=J==null?void 0:J.url)},[n,J==null?void 0:J.url,Ve,De,ze]),s.useLayoutEffect(()=>{const _=F.current;_!==null&&(F.current=null,requestAnimationFrame(()=>{X.current(_)}))},[n,p,J==null?void 0:J.url]),s.useLayoutEffect(()=>{if(te==="opening"){V.current=!1,xe(!1);return}if(te!=="open"||V.current)return;if(!Xe&&!Le){V.current=!0;return}xe(!1);const _=requestAnimationFrame(()=>{requestAnimationFrame(()=>{xe(!0),V.current=!0})});return()=>cancelAnimationFrame(_)},[te,Xe==null?void 0:Xe.url,Le==null?void 0:Le.url]),s.useEffect(()=>{if(te!=="open")return;const _=()=>{const it=xt=>{xt.stopPropagation(),xt.preventDefault(),document.removeEventListener("click",it,!0)};document.addEventListener("click",it,!0)},Pe=it=>{const xt=it<0?1:-1;De(),Re(xt),A.current=xt,fe(xt),Ve(!0),Bt()},Fe=it=>{if(Math.abs(it)>r0&&Ye){Pe(it);return}A.current=null,fe(null),de(null),we(null),Ve(!0),I(0),tt()},Oe=it=>{if(it.touches.length!==1||E.current)return;const xt=it.touches[0];k.current=!0,W.current={x:xt.clientX,y:xt.clientY},$.current="none",B.current=0,T.current=!1},lt=it=>{if(!W.current||it.touches.length!==1||E.current)return;const xt=it.touches[0],Ot=xt.clientX-W.current.x,It=xt.clientY-W.current.y;if($.current==="none"){if(Math.abs(Ot)<10&&Math.abs(It)<10)return;if(Math.abs(Ot)>Math.abs(It)){if(!Ye)return;$.current="horizontal"}else if(It>0){if(!rt)return;$.current="vertical"}else return}if($.current==="horizontal"){T.current=!0,se(!0),B.current=Ot,I(Ot),it.preventDefault();return}$.current==="vertical"&&(T.current=!0,se(!0),R.current=It,w(It),it.preventDefault())},Et=()=>{if(!W.current)return;const it=$.current,xt=T.current;if(xt&&it==="horizontal")Fe(B.current),_();else if(xt&&it==="vertical"){const Ot=R.current;if(rt&&Ot>o0){const It=window.innerHeight;R.current=It,ce(!0),w(It),ye("closing")}else R.current=0,w(0);_()}else it==="horizontal"&&Math.abs(B.current)>0&&(Fe(B.current),_());W.current=null,$.current="none",B.current=0,T.current=!1,se(!1)};return document.addEventListener("touchstart",Oe,{passive:!0}),document.addEventListener("touchmove",lt,{passive:!1}),document.addEventListener("touchend",Et),document.addEventListener("touchcancel",Et),()=>{document.removeEventListener("touchstart",Oe),document.removeEventListener("touchmove",lt),document.removeEventListener("touchend",Et),document.removeEventListener("touchcancel",Et)}},[te,Ye,Ve,tt,De,rt,Bt,Re]);const Kt=s.useCallback(()=>{const _=(m==null?void 0:m())??b??null;_&&le&&($e(_),Q(!0)),ye("closing")},[m,b,le]);s.useEffect(()=>{const _=Oe=>{if(Oe.key==="Escape"){if(r&&d||te==="closing")return;wt(),Kt();return}if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight"||te!=="open"||!Ye)return;Oe.preventDefault();const lt=Oe.key==="ArrowLeft"?-1:1;Oe.repeat&&ee.current===lt||At(lt)},Pe=Oe=>{if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight")return;const lt=Oe.key==="ArrowLeft"?-1:1;ee.current===lt&&wt()},Fe=()=>{wt()};return window.addEventListener("keydown",_),window.addEventListener("keyup",Pe),window.addEventListener("blur",Fe),()=>{window.removeEventListener("keydown",_),window.removeEventListener("keyup",Pe),window.removeEventListener("blur",Fe),wt()}},[te,r,d,Kt,Ye,At,wt]),s.useEffect(()=>{te!=="open"&&wt()},[te,wt]);const Jt=()=>{te==="closing"||l||Kt()},Tt=te==="open",Wt=te==="closing",rn=Me>0?Math.max(0,1-Me/500):1,gt=Me>0?Math.max(.35,1-Me/500):1,Ae=s.useCallback(_=>{if(!(_.propertyName!=="transform"||!E.current)){if(A.current!==null){St();return}De(),Ve(!1)}},[De,Ve,St]),Ge=te==="closing"?ae??b:b,st=Ge&&le&&(te==="opening"||Wt)?c0(Ge,le):void 0,ht=_e&&J?ct(J,"center"):Me>0?`translateY(${Me}px)`:st,yt=le?vr(le,M):null,Lt=!!(Ge&&le),mt=Lt&&(te==="closing"||te==="open"&&Z),Vt={position:"absolute",top:yt==null?void 0:yt.top,left:yt==null?void 0:yt.left,width:yt==null?void 0:yt.width,height:yt==null?void 0:yt.height,objectFit:"contain",transformOrigin:"top left",transform:ht,opacity:Me>0?gt:Lt?1:te==="opening"||Wt?0:1,transition:pe&&!z?"none":z?`transform ${xo}ms ${mn}`:q?`transform ${In}ms ${mn}, opacity ${In}ms ${mn}`:mt?`transform ${In}ms ${mn}`:te==="opening"||Wt?`opacity ${In}ms ${mn}`:"none",pointerEvents:Ke&&Tt&&!_e?"auto":"none",touchAction:Ke&&Tt?"none":void 0,zIndex:1,overflow:Ke?"hidden":void 0},kt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Tt&&!_e?"auto":"none"},Mt=(_,Pe,Fe="adjacent")=>{const Oe=qe(_);if(!Oe)return{display:"none"};const lt=Fe==="far"?Pe==="left"?"far-left":"far-right":Pe==="left"?"left-adjacent":"right-adjacent",{start:Et}=Te!==null?Jd(Oe,lt,Te,M):{start:Fe==="far"?jr(Oe,Pe,M):ro(Oe,Pe,M)},it=vr(Et,M),xt=ct(_,lt),Ot=!_e&&Fe==="adjacent"&&Tt&&!ke?b0(Oe,Pe,M):null,It=Fe==="far"&&_e&&Te===(Pe==="left"?-1:1),nn=pe&&!z?!1:z,un=Fe==="adjacent"&&Tt&&ke&&!_e;return{position:"absolute",top:it.top,left:it.left,width:it.width,height:it.height,objectFit:"contain",transform:xt??(Ot?`translate(${Ot.x}px, ${Ot.y}px)`:void 0),opacity:Fe==="far"?Tt&&It?1:0:Tt?1:0,transition:nn?Fe==="far"?`transform ${xo}ms ${mn}`:`transform ${xo}ms ${mn}, opacity ${In}ms ${mn}`:un?`transform ${In}ms ${mn}`:te==="opening"||Wt?`opacity ${In}ms ${mn}`:"none",pointerEvents:"none",zIndex:1}},Xt=(_,Pe)=>{const Fe=qe(_);return Fe?x0(ro(Fe,Pe,M),Pe,M):null},Yt=_=>Pe=>{if(!l){if(k.current){k.current=!1;return}Pe.stopPropagation(),ft(_)}},Ht=Xe?Xt(Xe,"left"):null,Dt=Le?Xt(Le,"right"):null,_t=Ht?vr(Ht,M):null,Ct=Dt?vr(Dt,M):null;return a.jsxs("div",{ref:C,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:te==="open"?"none":void 0},onClick:Jt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Tt?rn:0,transition:pe?"none":`opacity ${In}ms ${mn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Tt?1:0,transition:pe?"none":`opacity ${In}ms ${mn}`,pointerEvents:"none"},children:a.jsx(kd,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,onClose:Jt})})]}),Tt&&Je&&a.jsx(br,{media:Je,style:Mt(Je,"left","far"),onMeasure:Ie,onTransitionEnd:Ae},`far-prev-${Je.url}`),Tt&&Xe&&a.jsxs(a.Fragment,{children:[a.jsx(br,{media:Xe,style:Mt(Xe,"left"),onMeasure:Ie,onTransitionEnd:Ae},`prev-${Xe.url}`),_t&&a.jsx("div",{style:{position:"absolute",top:_t.top,left:_t.left,width:_t.width,height:_t.height,cursor:l||pe?"default":"pointer",pointerEvents:l||pe?"none":"auto",zIndex:3},onClick:Yt(-1)})]}),Tt&&Le&&a.jsxs(a.Fragment,{children:[a.jsx(br,{media:Le,style:Mt(Le,"right"),onMeasure:Ie,onTransitionEnd:Ae},`next-${Le.url}`),Ct&&a.jsx("div",{style:{position:"absolute",top:Ct.top,left:Ct.left,width:Ct.width,height:Ct.height,cursor:l||pe?"default":"pointer",pointerEvents:l||pe?"none":"auto",zIndex:3},onClick:Yt(1)})]}),Tt&&Se&&a.jsx(br,{media:Se,style:Mt(Se,"right","far"),onMeasure:Ie,onTransitionEnd:Ae},`far-next-${Se.url}`),le&&J&&(Ke?a.jsx(w0,{src:J.url,phase:te,onMediaElement:Ft,wrapperStyle:Vt,videoStyle:kt,onLoadedMetadata:vt,onTransitionEnd:Ae},`${n}-${J.url}`):a.jsx("img",{ref:Ft,src:J.url,alt:J.name,onLoad:vt,onTransitionEnd:Ae,style:Vt},`${n}-${J.url}`))]})}const C0=20,$0=.18;function T0(e){return`
18694
18698
  .${e}-wrapper {
18695
18699
  box-sizing: border-box;
18696
18700
  max-width: 100%;
@@ -18777,8 +18781,8 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18777
18781
  z-index: 2;
18778
18782
  pointer-events: auto;
18779
18783
  }
18780
- ${Qx(e)}
18781
- `}function S0(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,r]=n.split(":").map(Number),l=i?r:o,d=i?o:r;return d>0?l/d:1}function C0(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 $0(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*b0,n??!1),[`--${t}-image-aspect`]:S0(e)}}function T0(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 Ut(n,t)}function I0(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 R0(e,t,n,i,o,r){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);r(n,d?Gd(d,o):void 0)}}function L0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:d}=W.useScopedStyles(),c=s.useMemo(()=>w0(d),[d]),u=t??[],p=(e==null?void 0:e.type)??"a",v=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,w=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,m=W.scalingValue(w,n??!1),h=`max(${m}, ${x0}px)`,{objectFitMode:f,imageStyle:x}=I0(e),C=T0(e,n),y=s.useRef(null),[S,z]=s.useState(!1),[N,Y]=s.useState([]),[B,T]=s.useState(0),[H,$]=s.useState(0),[I,P]=s.useState(null),[M,g]=s.useState({title1:"",title2:"",title3:""}),D=(!n||i)&&!S,A=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},X=A.sizeType??"none",ie=D&&X!=="none"?`${d}-item-image-hover-${X}`:void 0,L=(A.value??120)/100,_=s.useCallback(te=>{!te||X!=="scale"||(te.style.transformOrigin=Sg(te))},[X]),V=s.useCallback(te=>{if(te){if(f==="contain"){const O=C0(te);if(O){const J=te.closest(`.${d}-item-image`);J instanceof HTMLElement&&J.style.setProperty(`--${d}-item-media-aspect`,String(O))}}_(te)}},[d,_,f]),se={width:W.scalingValue(v,n??!1),...C,...$0(e,d,n),[`--${d}-image-hover-scale`]:String(L)},re=(()=>{const te={},O=y.current?getComputedStyle(y.current).getPropertyValue("--cntrl-article-width").trim():"";return O&&(te["--cntrl-article-width"]=O),te})(),k=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),le=s.useMemo(()=>s0(u),[u]),G=s.useMemo(()=>p0(u),[u]),b=(te,O)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const J=le.findIndex(Pe=>Pe.gridIndex===te);if(J<0)return;const ne=le[J];$(J),Y(ne.items),T(0),g(ne.entry),P(O??null),z(!0)},E=s.useCallback(()=>{z(!1),P(null)},[]),j=s.useCallback(()=>{const te=le[H];return!te||!y.current?I:a0(y.current,te.gridIndex,f)??I},[le,H,I,f]),me=s.useCallback(te=>{if(le.length>1){const O=le.length,J=(H+te+O)%O,ne=le[J];$(J),Y(ne.items),T(0),g(ne.entry);return}T(O=>(O+te+N.length)%N.length)},[le,H,N.length]),K=le.length>1||N.length>1;return s.useEffect(()=>{if(!S||typeof document>"u")return;const te=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=te}},[S]),s.useEffect(()=>{!n||o||i||z(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&z(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx(m0,{mediaList:G}),a.jsx("div",{ref:y,className:`${d}-wrapper ${d}-type-${p}`,style:se,children:u.map((te,O)=>{var Pe,be;const J=!!((Pe=te.image)!=null&&Pe.url),ne=R0(!!k,J,O,d,f,b);return a.jsxs("div",{className:`${d}-item`,children:[te.title?a.jsx("span",{className:`${d}-item-title`,onClick:ne,style:ne?{cursor:"pointer"}:void 0,children:te.title}):null,(be=te.image)!=null&&be.url?a.jsx("span",{className:[`${d}-item-image`,f==="contain"?`${d}-item-image-fit`:void 0,ie].filter(Boolean).join(" "),children:te.image.type==="video"?a.jsx("video",{ref:V,src:te.image.url,"data-waterfall-index":O,style:x,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:ne,onLoadedData:Re=>V(Re.currentTarget)}):a.jsx("img",{ref:V,src:te.image.url,alt:te.image.name??"","data-waterfall-index":O,style:x,onClick:ne,onLoad:Re=>V(Re.currentTarget)})}):null,O<u.length-1&&a.jsx("div",{className:`${d}-item-gap-host`,style:{width:m},children:o&&!S&&a.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%"}})})]},O)})}),S&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const te=(l?document.getElementById(l):null)??document.body;return zn.createPortal(a.jsx("div",{style:re,"data-selection":"none",children:a.jsx(v0,{prefix:d,items:N,index:B,entry:M,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:K,lightboxEntries:le,entryIdx:H,layoutId:r,sourceRect:I,resolveCloseSourceRect:j,onClose:E,onPrev:()=>me(-1),onNext:()=>me(1)})}),te)})()]})}const P0=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
18784
+ ${i0(e)}
18785
+ `}function I0(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,r]=n.split(":").map(Number),l=i?r:o,d=i?o:r;return d>0?l/d:1}function R0(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 L0(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:O.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:O.scalingValue(i*$0,n??!1),[`--${t}-image-aspect`]:I0(e)}}function P0(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 Ut(n,t)}function E0(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 M0(e,t,n,i,o,r){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);r(n,d?Kd(d,o):void 0)}}function k0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:d}=O.useScopedStyles(),c=s.useMemo(()=>T0(d),[d]),u=t??[],p=(e==null?void 0:e.type)??"a",x=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,b=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,m=O.scalingValue(b,n??!1),h=`max(${m}, ${C0}px)`,{objectFitMode:f,imageStyle:v}=E0(e),C=P0(e,n),y=s.useRef(null),[S,j]=s.useState(!1),[N,U]=s.useState([]),[W,R]=s.useState(0),[B,$]=s.useState(0),[T,k]=s.useState(null),[E,g]=s.useState({title1:"",title2:"",title3:""}),A=(!n||i)&&!S,F=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},X=F.sizeType??"none",ee=A&&X!=="none"?`${d}-item-image-hover-${X}`:void 0,P=(F.value??120)/100,D=s.useCallback(Y=>{!Y||X!=="scale"||(Y.style.transformOrigin=Ig(Y))},[X]),K=s.useCallback(Y=>{if(Y){if(f==="contain"){const I=R0(Y);if(I){const z=Y.closest(`.${d}-item-image`);z instanceof HTMLElement&&z.style.setProperty(`--${d}-item-media-aspect`,String(I))}}D(Y)}},[d,D,f]),le={width:O.scalingValue(x,n??!1),...C,...L0(e,d,n),[`--${d}-image-hover-scale`]:String(P)},re=(()=>{const Y={},I=y.current?getComputedStyle(y.current).getPropertyValue("--cntrl-article-width").trim():"";return I&&(Y["--cntrl-article-width"]=I),Y})(),M=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),ie=s.useMemo(()=>u0(u),[u]),G=s.useMemo(()=>f0(u),[u]),oe=(Y,I)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const z=ie.findIndex(Te=>Te.gridIndex===Y);if(z<0)return;const H=ie[z];$(z),U(H.items),R(0),g(H.entry),k(I??null),j(!0)},te=s.useCallback(()=>{j(!1),k(null)},[]),ye=s.useCallback(()=>{const Y=ie[B];return!Y||!y.current?T:d0(y.current,Y.gridIndex,f)??T},[ie,B,T,f]),Me=s.useCallback(Y=>{if(ie.length>1){const I=ie.length,z=(B+Y+I)%I,H=ie[z];$(z),U(H.items),R(0),g(H.entry);return}R(I=>(I+Y+N.length)%N.length)},[ie,B,N.length]),w=ie.length>1||N.length>1;return s.useEffect(()=>{if(!S||typeof document>"u")return;const Y=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Y}},[S]),s.useEffect(()=>{!n||o||i||j(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&j(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx(y0,{mediaList:G}),a.jsx("div",{ref:y,className:`${d}-wrapper ${d}-type-${p}`,style:le,children:u.map((Y,I)=>{var Te,fe;const z=!!((Te=Y.image)!=null&&Te.url),H=M0(!!M,z,I,d,f,oe);return a.jsxs("div",{className:`${d}-item`,children:[Y.title?a.jsx("span",{className:`${d}-item-title`,onClick:H,style:H?{cursor:"pointer"}:void 0,children:Y.title}):null,(fe=Y.image)!=null&&fe.url?a.jsx("span",{className:[`${d}-item-image`,f==="contain"?`${d}-item-image-fit`:void 0,ee].filter(Boolean).join(" "),children:Y.image.type==="video"?a.jsx("video",{ref:K,src:Y.image.url,"data-waterfall-index":I,style:v,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:H,onLoadedData:ve=>K(ve.currentTarget)}):a.jsx("img",{ref:K,src:Y.image.url,alt:Y.image.name??"","data-waterfall-index":I,style:v,onClick:H,onLoad:ve=>K(ve.currentTarget)})}):null,I<u.length-1&&a.jsx("div",{className:`${d}-item-gap-host`,style:{width:m},children:o&&!S&&a.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%"}})})]},I)})}),S&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const Y=(l?document.getElementById(l):null)??document.body;return zn.createPortal(a.jsx("div",{style:re,"data-selection":"none",children:a.jsx(S0,{prefix:d,items:N,index:W,entry:E,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:w,lightboxEntries:ie,entryIdx:B,layoutId:r,sourceRect:T,resolveCloseSourceRect:ye,onClose:te,onPrev:()=>Me(-1),onNext:()=>Me(1)})}),Y)})()]})}const A0=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
18782
18786
  import type React from 'react';
18783
18787
  import { createPortal } from 'react-dom';
18784
18788
  import { CommonComponentProps } from '../props';
@@ -19292,7 +19296,7 @@ export function Waterfall({
19292
19296
  </>
19293
19297
  );
19294
19298
  }
19295
- `,E0="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>'),qn={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 M0(e){const t={};return t[ot(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSettings")]={...qn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSize")]={...qn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ot(e,"lineHeight")]={...qn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ot(e,"letterSpacing")]={...qn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ot(e,"wordSpacing")]={...qn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ot(e,"textAlign")]={...qn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ot(e,"textAppearance")]={...qn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const ro=ii.filter(e=>e!=="count"),k0=ro.reduce((e,t)=>({...e,...M0(t)}),{}),A0=ro.reduce((e,t)=>({...e,[ot(t,"fontFamily")]:"Arial",[ot(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ot(t,"letterSpacing")]:0,[ot(t,"wordSpacing")]:0,[ot(t,"textAlign")]:"left",[ot(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ha(e){return ro.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ot(n,"fontSize")]=i),o!==void 0&&(t[ot(n,"lineHeight")]=o),t},{})}const F0={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(ro.map(e=>[Os[e],Bs(e)]))},xr={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},_0=[{title:"Salton Sea from Above",...xr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...xr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...xr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...xr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],N0={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:_0},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:{...qn.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"]}}},...k0},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:E0,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...A0},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,...Ha({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,...Ha({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,...Ha({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:[F0]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},W0={element:L0,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"},...ro.map(e=>({path:`${ot(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...ro.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ot(t,"fontFamily")}`}),{})},schema:N0,sourceCode:P0},Xi=500,Yd="cubic-bezier(0.25, 1, 0.5, 1)",H0=300,D0=5,O0=.15,B0=.4,z0=100,Fi=100,cc={color:"#000000",hover:"#cccccc"},vo={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},j0={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}},Da={offset:{x:0,y:0},linkColor:"#cccccc"},dc={sizeType:"drag",value:3},V0="left";function G0(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:V0,color:(e==null?void 0:e.titleColor)??"#000000"};return Ut(n,t)}function _i(e,t,n){return`${e}: ${W.scalingValue(t/1440,n)};`}function $o(e,t){return t<=0?0:(e%t+t)%t}function X0(e,t,n,i){if(!i)return{position:$o(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 q0(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function Y0(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 w=n.getBoundingClientRect();return{x:w.left,y:w.top}},o=i(0,0),r=i(Fi,0),l=i(0,Fi);e.removeChild(n);const d={x:(r.x-o.x)/Fi,y:(r.y-o.y)/Fi},c={x:(l.x-o.x)/Fi,y:(l.y-o.y)/Fi},u=d.x*c.y-c.x*d.y;return{ex:d,ey:c,det:u}}function U0(e,t,n){const{ex:i,ey:o,det:r}=e;return{x:(t*o.y-n*o.x)/r,y:(i.x*n-i.y*t)/r}}function K0(e,t){return`
19299
+ `,F0="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>'),Yn={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 _0(e){const t={};return t[ot(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSettings")]={...Yn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSize")]={...Yn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ot(e,"lineHeight")]={...Yn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ot(e,"letterSpacing")]={...Yn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ot(e,"wordSpacing")]={...Yn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ot(e,"textAlign")]={...Yn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ot(e,"textAppearance")]={...Yn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const ao=ii.filter(e=>e!=="count"),N0=ao.reduce((e,t)=>({...e,..._0(t)}),{}),W0=ao.reduce((e,t)=>({...e,[ot(t,"fontFamily")]:"Arial",[ot(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ot(t,"letterSpacing")]:0,[ot(t,"wordSpacing")]:0,[ot(t,"textAlign")]:"left",[ot(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ba(e){return ao.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ot(n,"fontSize")]=i),o!==void 0&&(t[ot(n,"lineHeight")]=o),t},{})}const H0={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(ao.map(e=>[Vs[e],Gs(e)]))},wr={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},D0=[{title:"Salton Sea from Above",...wr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...wr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...wr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...wr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],O0={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:D0},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:{...Yn.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"]}}},...N0},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:F0,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...W0},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,...Ba({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,...Ba({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,...Ba({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:[H0]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},B0={element:k0,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"},...ao.map(e=>({path:`${ot(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...ao.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ot(t,"fontFamily")}`}),{})},schema:O0,sourceCode:A0},Yi=500,Qd="cubic-bezier(0.25, 1, 0.5, 1)",z0=300,j0=5,V0=.15,G0=.4,X0=100,Fi=100,mc={color:"#000000",hover:"#cccccc"},vo={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},Y0={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}},za={offset:{x:0,y:0},linkColor:"#cccccc"},gc={sizeType:"drag",value:3},q0="left";function U0(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:q0,color:(e==null?void 0:e.titleColor)??"#000000"};return Ut(n,t)}function _i(e,t,n){return`${e}: ${O.scalingValue(t/1440,n)};`}function To(e,t){return t<=0?0:(e%t+t)%t}function K0(e,t,n,i){if(!i)return{position:To(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 Z0(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function J0(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,x)=>{n.style.transform=`translate(${p}px, ${x}px)`;const b=n.getBoundingClientRect();return{x:b.left,y:b.top}},o=i(0,0),r=i(Fi,0),l=i(0,Fi);e.removeChild(n);const d={x:(r.x-o.x)/Fi,y:(r.y-o.y)/Fi},c={x:(l.x-o.x)/Fi,y:(l.y-o.y)/Fi},u=d.x*c.y-c.x*d.y;return{ex:d,ey:c,det:u}}function Q0(e,t,n){const{ex:i,ey:o,det:r}=e;return{x:(t*o.y-n*o.x)/r,y:(i.x*n-i.y*t)/r}}function eb(e,t){return`
19296
19300
  .${e}-wrapper {
19297
19301
  position: relative;
19298
19302
  width: 100%;
@@ -19364,7 +19368,7 @@ export function Waterfall({
19364
19368
  top: 0;
19365
19369
  left: 0;
19366
19370
  opacity: 0;
19367
- transition: opacity ${Xi}ms ${Yd};
19371
+ transition: opacity ${Yi}ms ${Qd};
19368
19372
  }
19369
19373
  .${e}-list-fade .${e}-slide.${e}-is-active {
19370
19374
  opacity: 1;
@@ -19549,10 +19553,10 @@ export function Waterfall({
19549
19553
  object-fit: cover;
19550
19554
  }
19551
19555
  .${e}-transition-reveal .${e}-slide.${e}-is-active .${e}-slider-image {
19552
- animation: ${e}-reveal-horizontal ${Xi}ms ease;
19556
+ animation: ${e}-reveal-horizontal ${Yi}ms ease;
19553
19557
  }
19554
19558
  .${e}-transition-reveal-vertical .${e}-slide.${e}-is-active .${e}-slider-image {
19555
- animation: ${e}-reveal-vertical ${Xi}ms ease;
19559
+ animation: ${e}-reveal-vertical ${Yi}ms ease;
19556
19560
  }
19557
19561
  @keyframes ${e}-reveal-horizontal {
19558
19562
  from { clip-path: inset(0 100% 0 0); }
@@ -19562,7 +19566,7 @@ export function Waterfall({
19562
19566
  from { clip-path: inset(100% 0 0 0); }
19563
19567
  to { clip-path: inset(0 0 0 0); }
19564
19568
  }
19565
- `}function Z0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=W.useScopedStyles(),l=G0(e,n),d=t??[],c=d.length,u=(e==null?void 0:e.trigger)??dc,p=u.sizeType??"drag",v=u.value??dc.value,w=(e==null?void 0:e.direction)??"horizontal",m=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",f=(e==null?void 0:e.navSize)??"m",x=j0[f],C=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,y=Le=>W.scalingValue(Le*C,n),S=(e==null?void 0:e.show)??"always",z=(e==null?void 0:e.controls)??null,N=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,Y=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,B=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,T=(e==null?void 0:e.controlsColor)??cc.color,H=(e==null?void 0:e.controlsHoverColor)??cc.hover,$=(e==null?void 0:e.navColor)??vo.colors.inactive,I=(e==null?void 0:e.navPaginationColor)??vo.colors.pagination,P=(e==null?void 0:e.navBackgroundColor)??vo.colors.background,M=(e==null?void 0:e.linkColor)??Da.linkColor,g=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,D=w==="horizontal",A=p==="click",X=p==="drag",ie=p==="auto"&&(!n||!!i),L=!n,_=m==="slide",V=h==="classic",se=S!=="never",re=S==="on hover",k=W.scalingValue(N,n),le={width:k,height:k,maxWidth:k},G=_&&c>1,[b,E]=s.useState(0),[j,me]=s.useState(G?1:0),[K,te]=s.useState(!1),[O,J]=s.useState(!1),[ne,Pe]=s.useState(!1),[be,Re]=s.useState(0),[ue,fe]=s.useState(!1),[$e,Q]=s.useState(!1),Z=s.useRef(!1),ae=s.useRef(j);ae.current=j;const xe=s.useRef(null),ke=s.useRef(0),Ce=s.useRef(null),q=s.useRef(null),ye=s.useRef(null),ce=s.useRef(null),U=s.useCallback(Le=>{Z.current=Le,te(Le)},[]),de=s.useCallback(Le=>{if(c<2||Le===0)return;const We=Le>0?1:-1,Be=Math.abs(Le);if(fe(!0),U(!0),!_){E(we=>$o(we+Le,c));return}let Ue=ae.current;const ge=G&&(Ue===0||Ue===c+1),ve=ge?b+1:null;ge&&(Ue=b+1);let _e=Be;for(;_e>0;){const we=X0(Ue,We,c,G);if(Ue=we.position,_e-=1,we.hitBoundary){ke.current=_e*We;break}}const Ze=Be-_e;if(Ze>0&&E(we=>$o(we+Ze*We,c)),ae.current=Ue,ve!==null){if(ae.current=ve,Ue===ve){J(!0),me(Ue);return}xe.current=Ue,J(!0),me(ve);return}J(!1),me(Ue)},[b,c,G,_,U]),He=s.useCallback(Le=>{de(Le)},[de]),he=s.useCallback(Le=>{if(c<2)return;const We=$o(Le,c);if(!(We===b&&!Z.current)&&(fe(!0),U(!0),E(We),_)){const Be=We+(G?1:0);xe.current=null,ke.current=0,ae.current=Be,J(!1),me(Be)}},[b,c,G,_,U]);s.useEffect(()=>{if(!K)return;const Le=window.setTimeout(()=>{if(G&&(j===0||j===c+1)){xe.current=null,J(!0),me(b+1);return}U(!1)},Xi);return()=>window.clearTimeout(Le)},[b,c,G,K,U,j]),s.useEffect(()=>{if(!O)return;let Le=0;const We=requestAnimationFrame(()=>{Le=requestAnimationFrame(()=>{const Be=xe.current;xe.current=null;const Ue=ke.current;if(ke.current=0,J(!1),Be!==null){ae.current=Be,me(Be);return}if(Ue!==0){de(Ue);return}U(!1)})});return()=>{cancelAnimationFrame(We),cancelAnimationFrame(Le)}},[de,U,O]);const ee=`${G}:${c}`,Je=s.useRef(ee);s.useEffect(()=>{if(Je.current===ee)return;Je.current=ee;const Le=c>0?Math.min(b,c-1):0;ye.current=null,ce.current=null,Pe(!1),Re(0),E(Le),J(!0),me(Le+(G?1:0))},[b,c,G,ee]),s.useEffect(()=>{if(!ue)return;const Le=window.setTimeout(()=>fe(!1),H0);return()=>window.clearTimeout(Le)},[ue,b]),s.useEffect(()=>{if(!ie||c<2)return;const Le=Math.max(v,.1)*1e3,We=window.setInterval(()=>{L&&$e||He(1)},Le);return()=>window.clearInterval(We)},[v,c,He,ie,$e,L]);const Ne=s.useCallback(Le=>{const We=ye.current;if(!We||We.pointerId!==Le.pointerId)return;ye.current=null,ce.current=null;const Be=Ce.current;if(Be!=null&&Be.hasPointerCapture(Le.pointerId)&&Be.releasePointerCapture(Le.pointerId),!We.isActive){_&&Re(0);return}const ge=!(Le.timeStamp-We.lastTime>z0)&&Math.abs(We.velocity)>B0,ve=We.size>0&&Math.abs(We.offset-We.baseOffset)>We.size*O0;if(Pe(!1),!ge&&!ve){Re(0);return}const _e=ve?We.offset-We.baseOffset:We.velocity;let Ze=1;ve&&We.size>0&&(Ze=Math.max(1,Math.round(Math.abs(_e)/We.size))),Re(0),de(_e<0?Ze:-Ze)},[de,_]);s.useEffect(()=>{const Le=We=>{ce.current===null||We.pointerId!==ce.current||Ne(We)};return window.addEventListener("pointerup",Le),window.addEventListener("pointercancel",Le),()=>{window.removeEventListener("pointerup",Le),window.removeEventListener("pointercancel",Le)}},[Ne]);const ct=Le=>{const We=Ce.current;if(!X||c<2||!We||Le.pointerType==="mouse"&&Le.button!==0)return;xe.current=null,ke.current=0,Z.current&&U(!1);let Be=0;const Ue=q.current;if(_&&Ue){const ge=D?Ue.offsetWidth:Ue.offsetHeight;if(ge>0){const ve=q0(Ue,D);let _e=ae.current;G&&(_e===0||_e===c+1)?(_e=b+1,ae.current=_e,J(!0),me(_e),Be=0):Be=ve+_e*ge,Re(Be)}}We.setPointerCapture(Le.pointerId),ce.current=Le.pointerId,ye.current={pointerId:Le.pointerId,startClientX:Le.clientX,startClientY:Le.clientY,axes:Y0(We,`${r}-axis-probe`),size:D?We.offsetWidth:We.offsetHeight,isActive:!1,baseOffset:Be,offset:Be,lastTime:Le.timeStamp,velocity:0}},Ke=Le=>{const We=ye.current;if(!We||We.pointerId!==Le.pointerId)return;if(Le.pointerType==="mouse"&&Le.buttons===0){Ne(Le);return}const Be=Le.clientX-We.startClientX,Ue=Le.clientY-We.startClientY,ge=We.axes?U0(We.axes,Be,Ue):{x:Be,y:Ue},ve=D?ge.x:ge.y,_e=D?ge.y:ge.x,Ze=We.baseOffset+ve;if(!We.isActive){if(Math.max(Math.abs(ve),Math.abs(_e))<D0)return;if(Math.abs(_e)>Math.abs(ve)){const Te=Ce.current;Te!=null&&Te.hasPointerCapture(We.pointerId)&&Te.releasePointerCapture(We.pointerId),ye.current=null,ce.current=null,_&&Re(0);return}We.isActive=!0,Pe(!0)}const we=Le.timeStamp-We.lastTime;we>0&&(We.velocity=(Ze-We.offset)/we,We.lastTime=Le.timeStamp),We.offset=Ze,_&&Re(Ze)},ut=Le=>{Ne(Le)},lt=D?`translate3d(calc(${-j*100}% + ${be}px), 0, 0)`:`translate3d(0, calc(${-j*100}% + ${be}px), 0)`,Ye=G?[d[c-1],...d,d[0]]:d;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:K0(r,n)}}),a.jsxs("div",{className:pt(`${r}-wrapper`,{[`${r}-transition-reveal`]:m==="reveal",[`${r}-transition-reveal-vertical`]:m==="reveal"&&!D}),onMouseEnter:()=>Q(!0),onMouseLeave:()=>Q(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsx("div",{ref:Ce,className:pt(`${r}-track`,{[`${r}-track-draggable`]:X,[`${r}-track-draggable-vertical`]:X&&!D}),onPointerDown:ct,onPointerMove:Ke,onPointerUp:ut,onPointerCancel:ut,onLostPointerCapture:Le=>{ce.current===Le.pointerId&&Ne(Le)},children:a.jsx("div",{ref:q,className:pt(`${r}-list`,{[`${r}-list-slide`]:_,[`${r}-list-slide-vertical`]:_&&!D,[`${r}-list-fade`]:!_}),style:_?{transform:lt,transition:ne||O?"none":`transform ${Xi}ms ${Yd}`}:void 0,children:Ye.map((Le,We)=>{const Be=G?$o(We-1,c):We,ge=G&&(We===0||We===c+1)?`clone-${We===0?"start":"end"}`:`slide-${Be}`;return a.jsx("div",{className:pt(`${r}-slide`,{[`${r}-is-active`]:!_&&Be===b}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:pt(`${r}-slider-image`,{[`${r}-contain`]:Le.image.objectFit==="contain",[`${r}-cover`]:Le.image.objectFit==="cover"}),src:Le.image.url,alt:Le.image.name??"",draggable:!1})})})},ge)})})}),se&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:pt(`${r}-arrow`,{[`${r}-arrow-prev`]:D,[`${r}-arrow-prev-vertical`]:!D,[`${r}-hover-arrow`]:re}),style:{color:T,"--arrow-hover-color":H,...le},children:a.jsxs("button",{onClick:Le=>{Le.stopPropagation(),He(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${W.scalingValue(Y,n)}, ${W.scalingValue(B*(D?1:-1),n)}) rotate(${D?"0deg":"90deg"})`},children:[z&&a.jsx(sn,{url:z,fill:T,hoverFill:H,className:pt(`${r}-arrow-img`,`${r}-mirror`),style:le}),!z&&a.jsx(uc,{color:T,className:pt(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:pt(`${r}-arrow`,{[`${r}-arrow-next`]:D,[`${r}-arrow-next-vertical`]:!D,[`${r}-hover-arrow`]:re}),style:{color:T,"--arrow-hover-color":H,...le},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:Le=>{Le.stopPropagation(),He(1)},style:{transform:`translate(${W.scalingValue(Y*(D?-1:1),n)}, ${W.scalingValue(B,n)}) rotate(${D?"0deg":"90deg"})`},children:[z&&a.jsx(sn,{url:z,fill:T,hoverFill:H,className:`${r}-arrow-img`,style:le}),!z&&a.jsx(uc,{color:T,className:pt(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),A&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>He(1)}),V&&a.jsx("div",{className:pt(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:D,[`${r}-pagination-inside-left`]:!D}),style:D?{bottom:y(x.inset)}:{left:y(x.inset)},children:a.jsx("div",{className:pt(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!D,[`${r}-animate-dots`]:ue}),style:{backgroundColor:P,gap:y(x.gapInactive-x.activeDot+x.dot),...D?{height:y(x.activeDot+x.paddingY*2),paddingTop:y(x.paddingY),paddingBottom:y(x.paddingY),paddingLeft:y(x.paddingActive),paddingRight:y(x.paddingActive)}:{width:y(x.activeDot+x.paddingY*2),paddingLeft:y(x.paddingY),paddingRight:y(x.paddingY),paddingTop:y(x.paddingActive),paddingBottom:y(x.paddingActive)},borderRadius:y(x.borderRadius),transform:`translate(${W.scalingValue(vo.offset.x,n)}, ${W.scalingValue(vo.offset.y,n)})`},children:d.map((Le,We)=>{const Be=We===b,Ue=Be?x.activeDot:x.dot;return a.jsx("button",{onClick:()=>he(We),className:`${r}-pagination-item`,style:{width:y(x.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:Be?I:$,width:y(Ue)}})},We)})},`${f}-${w}`)})]}),a.jsxs("div",{className:`${r}-caption-block`,children:[a.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${r}-control`:void 0,style:{height:W.scalingValue(g,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:d.map((Le,We)=>a.jsx("div",{className:pt(`${r}-caption-text`,{[`${r}-with-pointer-events`]:We===b&&n,[`${r}-active`]:We===b}),style:{...l,width:"max-content",transitionDuration:`${Math.round(Xi/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":M,"--link-hover-color":M,position:"relative",top:W.scalingValue(Da.offset.y,n),left:W.scalingValue(Da.offset.x,n)},children:a.jsx(Ri,{content:Le.imageCaption})})},We))})]})]})]})}function uc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const J0=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19569
+ `}function tb({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=O.useScopedStyles(),l=U0(e,n),d=t??[],c=d.length,u=(e==null?void 0:e.trigger)??gc,p=u.sizeType??"drag",x=u.value??gc.value,b=(e==null?void 0:e.direction)??"horizontal",m=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",f=(e==null?void 0:e.navSize)??"m",v=Y0[f],C=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,y=Le=>O.scalingValue(Le*C,n),S=(e==null?void 0:e.show)??"always",j=(e==null?void 0:e.controls)??null,N=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,U=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,W=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,R=(e==null?void 0:e.controlsColor)??mc.color,B=(e==null?void 0:e.controlsHoverColor)??mc.hover,$=(e==null?void 0:e.navColor)??vo.colors.inactive,T=(e==null?void 0:e.navPaginationColor)??vo.colors.pagination,k=(e==null?void 0:e.navBackgroundColor)??vo.colors.background,E=(e==null?void 0:e.linkColor)??za.linkColor,g=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,A=b==="horizontal",F=p==="click",X=p==="drag",ee=p==="auto"&&(!n||!!i),P=!n,D=m==="slide",K=h==="classic",le=S!=="never",re=S==="on hover",M=O.scalingValue(N,n),ie={width:M,height:M,maxWidth:M},G=D&&c>1,[oe,te]=s.useState(0),[ye,Me]=s.useState(G?1:0),[w,Y]=s.useState(!1),[I,z]=s.useState(!1),[H,Te]=s.useState(!1),[fe,ve]=s.useState(0),[de,he]=s.useState(!1),[we,Z]=s.useState(!1),Q=s.useRef(!1),ae=s.useRef(ye);ae.current=ye;const $e=s.useRef(null),ke=s.useRef(0),xe=s.useRef(null),V=s.useRef(null),pe=s.useRef(null),se=s.useRef(null),q=s.useCallback(Le=>{Q.current=Le,Y(Le)},[]),ce=s.useCallback(Le=>{if(c<2||Le===0)return;const He=Le>0?1:-1,Be=Math.abs(Le);if(he(!0),q(!0),!D){te(Se=>To(Se+Le,c));return}let Ze=ae.current;const me=G&&(Ze===0||Ze===c+1),be=me?oe+1:null;me&&(Ze=oe+1);let Ne=Be;for(;Ne>0;){const Se=K0(Ze,He,c,G);if(Ze=Se.position,Ne-=1,Se.hitBoundary){ke.current=Ne*He;break}}const Je=Be-Ne;if(Je>0&&te(Se=>To(Se+Je*He,c)),ae.current=Ze,be!==null){if(ae.current=be,Ze===be){z(!0),Me(Ze);return}$e.current=Ze,z(!0),Me(be);return}z(!1),Me(Ze)},[oe,c,G,D,q]),We=s.useCallback(Le=>{ce(Le)},[ce]),ge=s.useCallback(Le=>{if(c<2)return;const He=To(Le,c);if(!(He===oe&&!Q.current)&&(he(!0),q(!0),te(He),D)){const Be=He+(G?1:0);$e.current=null,ke.current=0,ae.current=Be,z(!1),Me(Be)}},[oe,c,G,D,q]);s.useEffect(()=>{if(!w)return;const Le=window.setTimeout(()=>{if(G&&(ye===0||ye===c+1)){$e.current=null,z(!0),Me(oe+1);return}q(!1)},Yi);return()=>window.clearTimeout(Le)},[oe,c,G,w,q,ye]),s.useEffect(()=>{if(!I)return;let Le=0;const He=requestAnimationFrame(()=>{Le=requestAnimationFrame(()=>{const Be=$e.current;$e.current=null;const Ze=ke.current;if(ke.current=0,z(!1),Be!==null){ae.current=Be,Me(Be);return}if(Ze!==0){ce(Ze);return}q(!1)})});return()=>{cancelAnimationFrame(He),cancelAnimationFrame(Le)}},[ce,q,I]);const J=`${G}:${c}`,Ke=s.useRef(J);s.useEffect(()=>{if(Ke.current===J)return;Ke.current=J;const Le=c>0?Math.min(oe,c-1):0;pe.current=null,se.current=null,Te(!1),ve(0),te(Le),z(!0),Me(Le+(G?1:0))},[oe,c,G,J]),s.useEffect(()=>{if(!de)return;const Le=window.setTimeout(()=>he(!1),z0);return()=>window.clearTimeout(Le)},[de,oe]),s.useEffect(()=>{if(!ee||c<2)return;const Le=Math.max(x,.1)*1e3,He=window.setInterval(()=>{P&&we||We(1)},Le);return()=>window.clearInterval(He)},[x,c,We,ee,we,P]);const _e=s.useCallback(Le=>{const He=pe.current;if(!He||He.pointerId!==Le.pointerId)return;pe.current=null,se.current=null;const Be=xe.current;if(Be!=null&&Be.hasPointerCapture(Le.pointerId)&&Be.releasePointerCapture(Le.pointerId),!He.isActive){D&&ve(0);return}const me=!(Le.timeStamp-He.lastTime>X0)&&Math.abs(He.velocity)>G0,be=He.size>0&&Math.abs(He.offset-He.baseOffset)>He.size*V0;if(Te(!1),!me&&!be){ve(0);return}const Ne=be?He.offset-He.baseOffset:He.velocity;let Je=1;be&&He.size>0&&(Je=Math.max(1,Math.round(Math.abs(Ne)/He.size))),ve(0),ce(Ne<0?Je:-Je)},[ce,D]);s.useEffect(()=>{const Le=He=>{se.current===null||He.pointerId!==se.current||_e(He)};return window.addEventListener("pointerup",Le),window.addEventListener("pointercancel",Le),()=>{window.removeEventListener("pointerup",Le),window.removeEventListener("pointercancel",Le)}},[_e]);const rt=Le=>{const He=xe.current;if(!X||c<2||!He||Le.pointerType==="mouse"&&Le.button!==0)return;$e.current=null,ke.current=0,Q.current&&q(!1);let Be=0;const Ze=V.current;if(D&&Ze){const me=A?Ze.offsetWidth:Ze.offsetHeight;if(me>0){const be=Z0(Ze,A);let Ne=ae.current;G&&(Ne===0||Ne===c+1)?(Ne=oe+1,ae.current=Ne,z(!0),Me(Ne),Be=0):Be=be+Ne*me,ve(Be)}}He.setPointerCapture(Le.pointerId),se.current=Le.pointerId,pe.current={pointerId:Le.pointerId,startClientX:Le.clientX,startClientY:Le.clientY,axes:J0(He,`${r}-axis-probe`),size:A?He.offsetWidth:He.offsetHeight,isActive:!1,baseOffset:Be,offset:Be,lastTime:Le.timeStamp,velocity:0}},Ye=Le=>{const He=pe.current;if(!He||He.pointerId!==Le.pointerId)return;if(Le.pointerType==="mouse"&&Le.buttons===0){_e(Le);return}const Be=Le.clientX-He.startClientX,Ze=Le.clientY-He.startClientY,me=He.axes?Q0(He.axes,Be,Ze):{x:Be,y:Ze},be=A?me.x:me.y,Ne=A?me.y:me.x,Je=He.baseOffset+be;if(!He.isActive){if(Math.max(Math.abs(be),Math.abs(Ne))<j0)return;if(Math.abs(Ne)>Math.abs(be)){const Ie=xe.current;Ie!=null&&Ie.hasPointerCapture(He.pointerId)&&Ie.releasePointerCapture(He.pointerId),pe.current=null,se.current=null,D&&ve(0);return}He.isActive=!0,Te(!0)}const Se=Le.timeStamp-He.lastTime;Se>0&&(He.velocity=(Je-He.offset)/Se,He.lastTime=Le.timeStamp),He.offset=Je,D&&ve(Je)},dt=Le=>{_e(Le)},at=A?`translate3d(calc(${-ye*100}% + ${fe}px), 0, 0)`:`translate3d(0, calc(${-ye*100}% + ${fe}px), 0)`,Xe=G?[d[c-1],...d,d[0]]:d;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:eb(r,n)}}),a.jsxs("div",{className:pt(`${r}-wrapper`,{[`${r}-transition-reveal`]:m==="reveal",[`${r}-transition-reveal-vertical`]:m==="reveal"&&!A}),onMouseEnter:()=>Z(!0),onMouseLeave:()=>Z(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsx("div",{ref:xe,className:pt(`${r}-track`,{[`${r}-track-draggable`]:X,[`${r}-track-draggable-vertical`]:X&&!A}),onPointerDown:rt,onPointerMove:Ye,onPointerUp:dt,onPointerCancel:dt,onLostPointerCapture:Le=>{se.current===Le.pointerId&&_e(Le)},children:a.jsx("div",{ref:V,className:pt(`${r}-list`,{[`${r}-list-slide`]:D,[`${r}-list-slide-vertical`]:D&&!A,[`${r}-list-fade`]:!D}),style:D?{transform:at,transition:H||I?"none":`transform ${Yi}ms ${Qd}`}:void 0,children:Xe.map((Le,He)=>{const Be=G?To(He-1,c):He,me=G&&(He===0||He===c+1)?`clone-${He===0?"start":"end"}`:`slide-${Be}`;return a.jsx("div",{className:pt(`${r}-slide`,{[`${r}-is-active`]:!D&&Be===oe}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:pt(`${r}-slider-image`,{[`${r}-contain`]:Le.image.objectFit==="contain",[`${r}-cover`]:Le.image.objectFit==="cover"}),src:Le.image.url,alt:Le.image.name??"",draggable:!1})})})},me)})})}),le&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:pt(`${r}-arrow`,{[`${r}-arrow-prev`]:A,[`${r}-arrow-prev-vertical`]:!A,[`${r}-hover-arrow`]:re}),style:{color:R,"--arrow-hover-color":B,...ie},children:a.jsxs("button",{onClick:Le=>{Le.stopPropagation(),We(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${O.scalingValue(U,n)}, ${O.scalingValue(W*(A?1:-1),n)}) rotate(${A?"0deg":"90deg"})`},children:[j&&a.jsx(sn,{url:j,fill:R,hoverFill:B,className:pt(`${r}-arrow-img`,`${r}-mirror`),style:ie}),!j&&a.jsx(hc,{color:R,className:pt(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:pt(`${r}-arrow`,{[`${r}-arrow-next`]:A,[`${r}-arrow-next-vertical`]:!A,[`${r}-hover-arrow`]:re}),style:{color:R,"--arrow-hover-color":B,...ie},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:Le=>{Le.stopPropagation(),We(1)},style:{transform:`translate(${O.scalingValue(U*(A?-1:1),n)}, ${O.scalingValue(W,n)}) rotate(${A?"0deg":"90deg"})`},children:[j&&a.jsx(sn,{url:j,fill:R,hoverFill:B,className:`${r}-arrow-img`,style:ie}),!j&&a.jsx(hc,{color:R,className:pt(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),F&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>We(1)}),K&&a.jsx("div",{className:pt(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:A,[`${r}-pagination-inside-left`]:!A}),style:A?{bottom:y(v.inset)}:{left:y(v.inset)},children:a.jsx("div",{className:pt(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!A,[`${r}-animate-dots`]:de}),style:{backgroundColor:k,gap:y(v.gapInactive-v.activeDot+v.dot),...A?{height:y(v.activeDot+v.paddingY*2),paddingTop:y(v.paddingY),paddingBottom:y(v.paddingY),paddingLeft:y(v.paddingActive),paddingRight:y(v.paddingActive)}:{width:y(v.activeDot+v.paddingY*2),paddingLeft:y(v.paddingY),paddingRight:y(v.paddingY),paddingTop:y(v.paddingActive),paddingBottom:y(v.paddingActive)},borderRadius:y(v.borderRadius),transform:`translate(${O.scalingValue(vo.offset.x,n)}, ${O.scalingValue(vo.offset.y,n)})`},children:d.map((Le,He)=>{const Be=He===oe,Ze=Be?v.activeDot:v.dot;return a.jsx("button",{onClick:()=>ge(He),className:`${r}-pagination-item`,style:{width:y(v.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:Be?T:$,width:y(Ze)}})},He)})},`${f}-${b}`)})]}),a.jsxs("div",{className:`${r}-caption-block`,children:[a.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${r}-control`:void 0,style:{height:O.scalingValue(g,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:d.map((Le,He)=>a.jsx("div",{className:pt(`${r}-caption-text`,{[`${r}-with-pointer-events`]:He===oe&&n,[`${r}-active`]:He===oe}),style:{...l,width:"max-content",transitionDuration:`${Math.round(Yi/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":E,"--link-hover-color":E,position:"relative",top:O.scalingValue(za.offset.y,n),left:O.scalingValue(za.offset.x,n)},children:a.jsx(Ri,{content:Le.imageCaption})})},He))})]})]})]})}function hc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const nb=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19566
19570
  import cn from 'classnames';
19567
19571
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
19568
19572
  import { scalingValue } from '../utils/scalingValue';
@@ -20743,14 +20747,14 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
20743
20747
  </svg>
20744
20748
  );
20745
20749
  }
20746
- `,Q0={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"}]}]}]}},eb={element:Z0,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:Q0,sourceCode:J0,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},Oi=300/1440,tb=8/1440,vi=.004;function nb(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function pc(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function mc(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 ib(e){return`
20750
+ `,ib={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"}]}]}]}},ob={element:tb,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:ib,sourceCode:nb,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},Oi=300/1440,rb=8/1440,xi=.004;function ab(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function fc(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function yc(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:O.scalingValue((o-t)/2,i)}}function sb(e){return`
20747
20751
  .${e}-wrapper {
20748
20752
  box-sizing: border-box;
20749
20753
  display: flex;
20750
20754
  flex-direction: column;
20751
20755
  position: relative;
20752
20756
  width: 100%;
20753
- min-height: ${nb(48)};
20757
+ min-height: ${ab(48)};
20754
20758
  }
20755
20759
  .${e}-single-title-layer {
20756
20760
  position: absolute;
@@ -20960,7 +20964,7 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
20960
20964
  width: var(--cntrl-article-width, 100vw) !important;
20961
20965
  height: var(--cntrl-viewport-height, 100vh) !important;
20962
20966
  }
20963
- `}const ob="rgba(28,31,34,0.9)",An=500,yi="cubic-bezier(0.22, 1, 0.36, 1)",rb=72,ab=50,sb={titleColor:"title-color",lightboxCounterColor:"lightbox-counter-color"},lb=[];function cb(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 db(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function ub(e){const[t]=e.media;return t!=null&&t.url?t:null}function pb(e){if(!Array.isArray(e)||e.length===0)return[];if(cb(e)){const t=[];for(const n of e){const i=db(n);if(!i)continue;const o=ub(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 ss(e){return e.type==="video"}function mb(e){e.pause(),e.removeAttribute("src"),e.load()}function br(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function gb(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const hb=1140/1440;function fb(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 yb(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 vb(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function xb({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:d}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{mb(c)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:d,style:i})}function bb({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:d,counterClassName:c,counterStyle:u,backgroundColor:p}){const v=i==="cover",w=s.useRef(null),m=s.useRef(null),h=s.useRef(null),f=s.useRef(0),x=s.useRef(0),C=s.useRef("none"),y=s.useRef(!1),S=s.useRef(!1),z=s.useRef(!1),N=s.useRef(null),[Y,B]=s.useState(null),[T,H]=s.useState("opening"),[$,I]=s.useState(0),[P,M]=s.useState(0),[g,D]=s.useState(!1),[A,X]=s.useState(!1),[ie,L]=s.useState(!1),_=s.useRef(n),V=t[n],se=V?ss(V):!1,re=P!==0||g,k=s.useCallback(ue=>{z.current=ue,D(ue)},[]),le=s.useCallback(()=>{N.current!==null&&(window.clearTimeout(N.current),N.current=null)},[]),G=s.useCallback(()=>{le(),N.current=window.setTimeout(()=>{le(),k(!1)},An+32)},[le,k]),b=s.useCallback(()=>{const ue=w.current,fe=m.current;if(!ue)return;const $e=ue.getBoundingClientRect(),Q=$e.width,Z=$e.height;if(!Q||!Z)return;if(i==="cover"){B({width:Q,height:Z,left:$e.left,top:$e.top});return}if(!fe){B(br(ue));return}const{width:ae,height:xe}=gb(fe);if(!ae||!xe){B(br(ue));return}const ke=ae/xe,Ce=Q/Z;if(ke>Ce){const q=Q/ke;B({width:Q,height:q,left:$e.left,top:$e.top+(Z-q)/2})}else{const q=Z*ke;B({width:q,height:Z,left:$e.left+(Q-q)/2,top:$e.top})}},[i]);s.useEffect(()=>{b();const ue=w.current;if(!ue)return;const fe=new ResizeObserver(()=>b());return fe.observe(ue),()=>fe.disconnect()},[b,n]),s.useEffect(()=>{T==="opening"&&Y&&H("open")},[T,Y]),s.useEffect(()=>{if(T!=="closing")return;const ue=setTimeout(()=>r(),An);return()=>clearTimeout(ue)},[T,r]),s.useEffect(()=>()=>{le()},[le]),s.useLayoutEffect(()=>{if(_.current===n)return;le(),I(0),M(0),k(!1),L(!1),X(!1),f.current=0,x.current=0,C.current="none",y.current=!1,h.current=null,S.current=!1;const ue=w.current;ue&&B(br(ue)),_.current=n},[n,k,le]),s.useEffect(()=>{if(T!=="open")return;let ue=null;const fe=()=>{ue&&(document.removeEventListener("click",ue,!0),ue=null)},$e=()=>{fe(),ue=Ce=>{Ce.stopPropagation(),Ce.preventDefault(),fe()},document.addEventListener("click",ue,!0)},Q=Ce=>{le(),z.current=!1,D(!1),M(0),X(!1),y.current=!1,x.current=0,C.current="none";const q=w.current;q&&B(br(q)),Ce<0?d():l()},Z=Ce=>{if(Math.abs(Ce)>ab&&t.length>1){Q(Ce);return}k(!0),M(0),G()},ae=Ce=>{if(Ce.touches.length!==1||z.current)return;const q=Ce.touches[0];S.current=!0,h.current={x:q.clientX,y:q.clientY},C.current="none",x.current=0,y.current=!1},xe=Ce=>{if(!h.current||Ce.touches.length!==1||z.current)return;const q=Ce.touches[0],ye=q.clientX-h.current.x,ce=q.clientY-h.current.y;if(C.current==="none"){if(Math.abs(ye)<10&&Math.abs(ce)<10)return;if(Math.abs(ye)>Math.abs(ce)){if(t.length<=1)return;C.current="horizontal"}else if(ce>0)C.current="vertical";else return}if(C.current==="horizontal"){y.current=!0,X(!0),x.current=ye,M(ye),Ce.preventDefault();return}C.current==="vertical"&&(y.current=!0,X(!0),f.current=ce,I(ce),Ce.preventDefault())},ke=()=>{if(!h.current)return;const Ce=C.current,q=y.current;if(q&&Ce==="horizontal")Z(x.current),$e();else if(q&&Ce==="vertical")if(f.current>rb){const ce=window.innerHeight;f.current=ce,L(!0),I(ce),H("closing")}else f.current=0,I(0),$e();else Ce==="horizontal"&&Math.abs(x.current)>0&&(Z(x.current),$e());h.current=null,C.current="none",x.current=0,y.current=!1,X(!1)};return document.addEventListener("touchstart",ae,{passive:!0}),document.addEventListener("touchmove",xe,{passive:!1}),document.addEventListener("touchend",ke),document.addEventListener("touchcancel",ke),()=>{document.removeEventListener("touchstart",ae),document.removeEventListener("touchmove",xe),document.removeEventListener("touchend",ke),document.removeEventListener("touchcancel",ke),fe()}},[T,t.length,d,l,k,G,le]),s.useEffect(()=>{const ue=fe=>{fe.key==="Escape"&&(fe.preventDefault(),fe.stopPropagation(),T!=="closing"&&H("closing"))};return window.addEventListener("keydown",ue,!0),()=>window.removeEventListener("keydown",ue,!0)},[T]);const E=()=>{T!=="closing"&&H("closing")},j=T==="open",me=T==="closing",K=$>0?Math.max(0,1-$/500):1,te=$>0?Math.max(.35,1-$/500):1,O=ue=>{if(ue.stopPropagation(),S.current){S.current=!1;return}if(t.length<=1)return;const fe=ue.currentTarget.getBoundingClientRect(),$e=ue.clientY-fe.top,Q=Math.min(52,fe.height*.2);if(!($e>fe.height-Q)){if(ue.clientX-fe.left<fe.width/2){l();return}d()}},J=ue=>{if(t.length<=1)return;const fe=ue.currentTarget.getBoundingClientRect(),$e=ue.clientX-fe.left,Q=ue.clientY-fe.top,Z=Math.min(52,fe.height*.2);if(Q>fe.height-Z){ue.currentTarget.style.cursor="default";return}ue.currentTarget.style.cursor=$e<fe.width/2?"w-resize":"e-resize"},ne=s.useCallback(ue=>{ue.propertyName!=="transform"||!z.current||(le(),k(!1))},[le,k]),Pe=re?`translateX(${P}px)`:$>0?`translateY(${$}px)`:void 0,be={position:"fixed",top:Y==null?void 0:Y.top,left:Y==null?void 0:Y.left,width:Y==null?void 0:Y.width,height:Y==null?void 0:Y.height,objectFit:i==="cover"?"cover":"contain",transform:Pe,opacity:$>0?te:T==="opening"||me?0:1,transition:A&&!g?"none":g?`transform ${An}ms ${yi}`:ie?`transform ${An}ms ${yi}, opacity ${An}ms ${yi}`:T==="opening"||me?`opacity ${An}ms ${yi}`:"none",pointerEvents:se&&j&&!re?"auto":"none",touchAction:se&&j?"none":void 0,zIndex:9998},Re=Y?{position:"fixed",top:Y.top,height:Y.height,width:Y.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:T==="open"?"none":void 0},onClick:E,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:j?K:0,transition:A?"none":`opacity ${An}ms ${yi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:v?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:w,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:j?1:0,transition:`opacity ${An}ms ${yi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:w,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:j?1:0,transition:`opacity ${An}ms ${yi}`},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),Y&&V&&(se?a.jsx(xb,{src:V.url,phase:T,mediaRef:m,mediaStyle:be,onLoadedMetadata:b,onClick:O,onMouseMove:J,onTransitionEnd:ne},`${n}-${V.url}`):a.jsx("img",{ref:m,src:V.url,alt:V.name,onLoad:b,onTransitionEnd:ne,style:be},`${n}-${V.url}`)),j&&Re&&t.length>1&&!se&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Re,left:Y.left,cursor:"w-resize",pointerEvents:re?"none":"auto"},onClick:ue=>{if(S.current){S.current=!1;return}ue.stopPropagation(),l()}}),a.jsx("div",{style:{...Re,left:Y.left+Y.width/2,cursor:"e-resize",pointerEvents:re?"none":"auto"},onClick:ue=>{if(S.current){S.current=!1;return}ue.stopPropagation(),d()}})]})]})}function gc({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:r,isEditor:l,galleryPaddingBetween:d=0,showPaddingAfter:c=!1,showControls:u=!1,onMediaClick:p}){const v=`${e}-gallery-${ss(t)?"video":"image"}`,w=r.display==="cover",m=yb(r),h=T=>W.scalingValue(T,l??!1),f=n??Oi,x=o?{width:"100%",maxWidth:"100%"}:{width:h(f),maxWidth:"100%"},C=i?{borderRadius:h(i)}:{},y={...x,...w?{aspectRatio:m,height:"auto",overflow:"hidden"}:{},...C},S={...w?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":h(f)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...w?{}:C},N={className:v,style:S,onClick:p?T=>{T.stopPropagation(),p()}:void 0},Y=Math.max(d,vi),B=ss(t)?a.jsx("video",{...N,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...N,src:t.url,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[w?a.jsx("div",{style:y,children:B}):B,c&&d>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:h(d)},"aria-hidden":"true"}),u&&c&&a.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(Y)}})]})}function wb({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:d,showControls:c,scaled:u,children:p}){const v=t==="a"?i:t==="c"?o:0,w=v>0||c;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&w&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"aria-hidden":"true"}),c&&t==="c"&&a.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%"}}),a.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&w&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"aria-hidden":"true"}),c&&t==="a"&&a.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(r),height:"100%"}})]})}function Sb(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function hc({P:e,scaled:t,height:n,paired:i}){return a.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 fc({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:r,paired:l,anchorStyle:d}){return a.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...r==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...r==="left"?{left:0}:{right:0},width:n(i),height:"100%",...d}})}function Oa({P:e,title:t,position:n,titleRef:i,titleClassName:o,titleContainerStyle:r,titleTextBoxStyle:l,titleStyle:d,showTextBoxOutline:c=!1,topPaddingControl:u}){const p=s.useRef(null),[v,w]=s.useState(0),m=t??"",h=n==="left"||n==="center"||n==="right";return s.useLayoutEffect(()=>{if(!h)return;const f=p.current;if(!f||typeof ResizeObserver>"u")return;const x=()=>w(f.offsetHeight);x();const C=new ResizeObserver(x);return C.observe(f),()=>C.disconnect()},[m,h]),a.jsx("div",{ref:f=>{p.current=f,i(f)},className:[o,`${e}-title-position-${n}`].join(" "),style:{...h?{[`--${e}-title-height`]:`${v}px`}:{},...r},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:l,children:[u,a.jsx("div",{className:c?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:a.jsx("span",{className:`${e}-title-text`,style:d,children:m})})]})})}const yc=45;function vc(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const r=parseFloat(o);if(!Number.isNaN(r))return r}i=i.parentElement}return n}function Cb(e){const t=vc(e,"--cntrl-viewport-height",window.innerHeight),n=vc(e,"--cntrl-article-top",0);return{top:n,centerY:n+t/2}}function $b(e,t,n){const{top:i,centerY:o}=Cb(n);if(t==="top"){const l=n&&parseFloat(getComputedStyle(n).top)||i;return Math.abs(e.top-l)}const r=e.top+e.height/2;return Math.abs(r-o)}function Tb(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=$b(u,n,c);return Math.exp(-(p*p)/(2*yc*yc))});let o=0,r=-1;return i.forEach((l,d)=>{l>r&&(r=l,o=d)}),{opacities:i,dominantIndex:o}}function Ib(e,t,n){const i=s.useRef([]),[{opacities:o,dominantIndex:r},l]=s.useState(()=>({opacities:Array.from({length:e},(c,u)=>u===0?1:0),dominantIndex:0}));return s.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let c=0;const u=()=>{l(Tb(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:r}}function Rb(e,t){const[n,i]=s.useState(e),o=s.useRef(e);return s.useEffect(()=>{if(!t){o.current=e,i(e);return}const r=Array.from(o.current),l=Array.from(e),d=Math.max(r.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),...r.slice(c)].join("");o.current=p,i(p),c>=d&&window.clearInterval(u)},35);return()=>window.clearInterval(u)},[t,e]),n}function Lb({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var tt;const{prefix:l}=W.useScopedStyles(),d=s.useMemo(()=>ib(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)??Oi,w=(e==null?void 0:e.titleWidth)??hb,m=fb(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??tb,f=(e==null?void 0:e.position)??"center",x=(e==null?void 0:e.titleTopPadding)??0,C=(e==null?void 0:e.titleLeftPadding)??0,y=(e==null?void 0:e.titleRightPadding)??0,S=Sb(e==null?void 0:e.transition),z=(e==null?void 0:e.lightbox)??"on",N=p==="b",Y=S==="fade"||S==="retype",{setTitleRef:B,dominantIndex:T}=Ib(c.length,Y,f),H=((tt=c[T])==null?void 0:tt.title)??"",$=Rb(H,S==="retype"),I=S==="fade"||S==="retype",P=S==="retype"?$:H,M=N?void 0:{width:W.scalingValue(v,n??!1)},g=z==="on"&&(!n||i||o),D=o??!1,A=(e==null?void 0:e.galleryPaddingRight)??0,X=(e==null?void 0:e.galleryPaddingLeft)??0,ie=(e==null?void 0:e.galleryPaddingBetween)??0,L=nt=>W.scalingValue(nt,n??!1),V={width:L(w)},se=p==="a"?A:X,re=N?{width:"100%"}:{width:`calc(100% - ${L(v)} - ${L(se)})`,...p==="c"?{marginLeft:"auto"}:{}},k=Math.max(A,vi),le=Math.max(X,vi),G=Math.max(ie,vi),b=Math.max(x,vi),E=Math.max(C,vi),j=Math.max(y,vi),me=Math.max(0,(u??1)-(v??Oi)),K=p==="a"?Math.max(0,(u??1)-(v??Oi)-A):p==="c"?Math.max(0,(u??1)-(v??Oi)-X):p==="b"?u??1:1,te=D&&(p==="a"||p==="b"||p==="c")&&f==="top",O=D&&((p==="a"||p==="b")&&(f==="left"||f==="top")||p==="c"&&(f==="left"||f==="top")),J=D&&((p==="c"||p==="b")&&f==="right"||p==="a"&&f==="right"),ne=c.length>1,Pe=N?void 0:L((p==="c"?X:A)+(v??Oi)),be=p==="c"&&Pe?{left:Pe}:void 0,Re=p==="a"&&Pe?{right:Pe}:void 0,ue=N?{left:0,width:"100%"}:p==="a"?{right:L(A),width:L(v)}:{left:L(X),width:L(v)},{titleColor:fe,titleFontFamily:$e,titleFontSettings:Q,titleFontSize:Z,titleLineHeight:ae,titleLetterSpacing:xe,titleWordSpacing:ke,titleAlign:Ce,titleTextAppearance:q,lightboxCounterColor:ye,lightboxCounterFontFamily:ce,lightboxCounterFontSettings:U,lightboxCounterFontSize:de,lightboxCounterLineHeight:He,lightboxCounterLetterSpacing:he,lightboxCounterWordSpacing:ee,lightboxCounterTextAppearance:Je}=e??{},Ne={fontSettings:{fontFamily:$e,fontWeight:(Q==null?void 0:Q.fontWeight)??400,fontStyle:(Q==null?void 0:Q.fontStyle)??"normal"},fontSize:Z??.01,lineHeight:ae,letterSpacing:xe??0,wordSpacing:ke??0,textAlign:Ce??"left",textAppearance:q,color:fe??"#000000"},Ke=an(Ut(Ne,n)),ut=V,lt=mc(Z,ae,l,n),Ye=pc(Z,ae,`${l}-title`,`${l}-text-tight-leading`),Le={fontSettings:{fontFamily:ce,fontWeight:(U==null?void 0:U.fontWeight)??400,fontStyle:(U==null?void 0:U.fontStyle)??"normal"},fontSize:de??.01,lineHeight:He,letterSpacing:he??0,wordSpacing:ee??0,textAppearance:Je,color:ye??"#DEDDDD"},Be={...an(Ut(Le,n)),...mc(de,He,l,n)},Ue=pc(de,He,`${l}-lightbox-counter`,`${l}-text-tight-leading`),ge=W.buildColorVars(l,{titleColor:fe??"#000000",lightboxCounterColor:ye??"#DEDDDD"},sb,lb),ve=s.useRef(null),[_e,Ze]=s.useState(!1),[we,Te]=s.useState([]),[Xe,ze]=s.useState(0),Ie=s.useCallback((nt,st)=>{g&&(Te(nt),ze(st),Ze(!0))},[g]),Ve=s.useCallback(()=>{Ze(!1)},[]),De=s.useMemo(()=>{const nt={...ge},st=ve.current?getComputedStyle(ve.current).getPropertyValue("--cntrl-article-width").trim():"";return st&&(nt["--cntrl-article-width"]=st),nt},[ge,_e]);return s.useEffect(()=>{if(!_e||z!=="on"||typeof document>"u")return;const nt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=nt}},[_e,z]),s.useEffect(()=>{!n||o||i||Ze(!1)},[n,o,i]),s.useEffect(()=>{z==="off"&&Ze(!1)},[z]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx("div",{style:ge,children:a.jsxs("div",{ref:ve,className:`${l}-wrapper`,style:{width:W.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:(p==="a"||p==="b"||p==="c")&&f==="top"?L(x):void 0,[`--${l}-title-left-padding`]:(p==="a"||p==="b")&&(f==="left"||f==="top")||p==="c"&&(f==="left"||f==="top")?L(C):void 0,[`--${l}-title-right-padding`]:(p==="c"||p==="b")&&f==="right"||p==="a"&&f==="right"?L(y):void 0},children:[I&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Oa,{P:l,title:P,position:f,titleRef:()=>{},titleClassName:`${Ye} ${l}-single-title`,titleContainerStyle:{...lt,...re},titleTextBoxStyle:ut,titleStyle:Ke,showTextBoxOutline:D,topPaddingControl:te?hc({P:l,scaled:L,height:b,paired:!1}):void 0})}),c.map((nt,st)=>{const St=pb(nt.gallery),Bt=st<c.length-1,zt=St.filter(wt=>wt.lightboxMedia).map(wt=>wt.lightboxMedia),ft={P:l,position:f,titleRef:B(st),titleClassName:Ye,titleContainerStyle:lt,titleTextBoxStyle:I?{maxWidth:"100%"}:ut,titleStyle:Ke,showTextBoxOutline:D&&!I,topPaddingControl:te&&!I?hc({P:l,scaled:L,height:b,paired:ne}):void 0};return a.jsxs("div",{"data-item-index":st,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:Bt?L(ie):void 0},children:[O&&fc({P:l,controlKey:"titleLeftPadding",scaled:L,width:E,maxFraction:K,side:"left",paired:ne,anchorStyle:be}),J&&fc({P:l,controlKey:"titleRightPadding",scaled:L,width:j,maxFraction:K,side:"right",paired:ne,anchorStyle:Re}),D&&Bt&&a.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:L(G),...ue}}),N?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:St.map(({displayMedia:wt,lightboxMedia:jt},At)=>{const xt=jt?zt.findIndex(Ft=>Ft.url===jt.url):-1;return a.jsx(gc,{P:l,media:wt,imgWidth:v||void 0,cornerRadius:h||void 0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ie,showPaddingAfter:At<St.length-1,showControls:D,onMediaClick:g&&xt>=0?()=>Ie(zt,xt):void 0},`${wt.url}-${At}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Oa,{...ft,title:I?"":nt.title})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Oa,{...ft,title:I?"":nt.title}),St.length>0&&a.jsx(wb,{P:l,layoutType:p,galleryWidthStyle:M,galleryPaddingRight:A,galleryPaddingLeft:X,galleryPaddingRightWidth:k,galleryPaddingLeftWidth:le,galleryPaddingMaxFraction:me,showControls:D,scaled:L,children:St.map(({displayMedia:wt,lightboxMedia:jt},At)=>{const xt=jt?zt.findIndex(Ft=>Ft.url===jt.url):-1;return a.jsx(gc,{P:l,media:wt,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ie,showPaddingAfter:At<St.length-1,showControls:D,onMediaClick:g&&xt>=0?()=>Ie(zt,xt):void 0},`${wt.url}-${At}`)})})]})]},st)})]})}),_e&&z==="on"&&typeof document<"u"&&e&&(()=>{const nt=(r?document.getElementById(r):null)??document.body;return zn.createPortal(a.jsx("div",{style:De,"data-selection":"none",children:a.jsx(bb,{prefix:l,items:we,index:Xe,imageDisplay:vb(e.lightboxImageDisplay),isEditor:n,onClose:Ve,onPrev:()=>ze(st=>(st-1+we.length)%we.length),onNext:()=>ze(st=>(st+1)%we.length),counterClassName:Ue,counterStyle:Be,backgroundColor:e.backgroundColor??ob})}),nt)})()]})}const Pb=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
20967
+ `}const lb="rgba(28,31,34,0.9)",An=500,yi="cubic-bezier(0.22, 1, 0.36, 1)",cb=72,db=50,ub={titleColor:"title-color",lightboxCounterColor:"lightbox-counter-color"},pb=[];function mb(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 gb(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function hb(e){const[t]=e.media;return t!=null&&t.url?t:null}function fb(e){if(!Array.isArray(e)||e.length===0)return[];if(mb(e)){const t=[];for(const n of e){const i=gb(n);if(!i)continue;const o=hb(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 ds(e){return e.type==="video"}function yb(e){e.pause(),e.removeAttribute("src"),e.load()}function Sr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function xb(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const vb=1140/1440;function bb(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 wb(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 Sb(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Cb({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:d}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{yb(c)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:d,style:i})}function $b({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:d,counterClassName:c,counterStyle:u,backgroundColor:p}){const x=i==="cover",b=s.useRef(null),m=s.useRef(null),h=s.useRef(null),f=s.useRef(0),v=s.useRef(0),C=s.useRef("none"),y=s.useRef(!1),S=s.useRef(!1),j=s.useRef(!1),N=s.useRef(null),[U,W]=s.useState(null),[R,B]=s.useState("opening"),[$,T]=s.useState(0),[k,E]=s.useState(0),[g,A]=s.useState(!1),[F,X]=s.useState(!1),[ee,P]=s.useState(!1),D=s.useRef(n),K=t[n],le=K?ds(K):!1,re=k!==0||g,M=s.useCallback(de=>{j.current=de,A(de)},[]),ie=s.useCallback(()=>{N.current!==null&&(window.clearTimeout(N.current),N.current=null)},[]),G=s.useCallback(()=>{ie(),N.current=window.setTimeout(()=>{ie(),M(!1)},An+32)},[ie,M]),oe=s.useCallback(()=>{const de=b.current,he=m.current;if(!de)return;const we=de.getBoundingClientRect(),Z=we.width,Q=we.height;if(!Z||!Q)return;if(i==="cover"){W({width:Z,height:Q,left:we.left,top:we.top});return}if(!he){W(Sr(de));return}const{width:ae,height:$e}=xb(he);if(!ae||!$e){W(Sr(de));return}const ke=ae/$e,xe=Z/Q;if(ke>xe){const V=Z/ke;W({width:Z,height:V,left:we.left,top:we.top+(Q-V)/2})}else{const V=Q*ke;W({width:V,height:Q,left:we.left+(Z-V)/2,top:we.top})}},[i]);s.useEffect(()=>{oe();const de=b.current;if(!de)return;const he=new ResizeObserver(()=>oe());return he.observe(de),()=>he.disconnect()},[oe,n]),s.useEffect(()=>{R==="opening"&&U&&B("open")},[R,U]),s.useEffect(()=>{if(R!=="closing")return;const de=setTimeout(()=>r(),An);return()=>clearTimeout(de)},[R,r]),s.useEffect(()=>()=>{ie()},[ie]),s.useLayoutEffect(()=>{if(D.current===n)return;ie(),T(0),E(0),M(!1),P(!1),X(!1),f.current=0,v.current=0,C.current="none",y.current=!1,h.current=null,S.current=!1;const de=b.current;de&&W(Sr(de)),D.current=n},[n,M,ie]),s.useEffect(()=>{if(R!=="open")return;let de=null;const he=()=>{de&&(document.removeEventListener("click",de,!0),de=null)},we=()=>{he(),de=xe=>{xe.stopPropagation(),xe.preventDefault(),he()},document.addEventListener("click",de,!0)},Z=xe=>{ie(),j.current=!1,A(!1),E(0),X(!1),y.current=!1,v.current=0,C.current="none";const V=b.current;V&&W(Sr(V)),xe<0?d():l()},Q=xe=>{if(Math.abs(xe)>db&&t.length>1){Z(xe);return}M(!0),E(0),G()},ae=xe=>{if(xe.touches.length!==1||j.current)return;const V=xe.touches[0];S.current=!0,h.current={x:V.clientX,y:V.clientY},C.current="none",v.current=0,y.current=!1},$e=xe=>{if(!h.current||xe.touches.length!==1||j.current)return;const V=xe.touches[0],pe=V.clientX-h.current.x,se=V.clientY-h.current.y;if(C.current==="none"){if(Math.abs(pe)<10&&Math.abs(se)<10)return;if(Math.abs(pe)>Math.abs(se)){if(t.length<=1)return;C.current="horizontal"}else if(se>0)C.current="vertical";else return}if(C.current==="horizontal"){y.current=!0,X(!0),v.current=pe,E(pe),xe.preventDefault();return}C.current==="vertical"&&(y.current=!0,X(!0),f.current=se,T(se),xe.preventDefault())},ke=()=>{if(!h.current)return;const xe=C.current,V=y.current;if(V&&xe==="horizontal")Q(v.current),we();else if(V&&xe==="vertical")if(f.current>cb){const se=window.innerHeight;f.current=se,P(!0),T(se),B("closing")}else f.current=0,T(0),we();else xe==="horizontal"&&Math.abs(v.current)>0&&(Q(v.current),we());h.current=null,C.current="none",v.current=0,y.current=!1,X(!1)};return document.addEventListener("touchstart",ae,{passive:!0}),document.addEventListener("touchmove",$e,{passive:!1}),document.addEventListener("touchend",ke),document.addEventListener("touchcancel",ke),()=>{document.removeEventListener("touchstart",ae),document.removeEventListener("touchmove",$e),document.removeEventListener("touchend",ke),document.removeEventListener("touchcancel",ke),he()}},[R,t.length,d,l,M,G,ie]),s.useEffect(()=>{const de=he=>{he.key==="Escape"&&(he.preventDefault(),he.stopPropagation(),R!=="closing"&&B("closing"))};return window.addEventListener("keydown",de,!0),()=>window.removeEventListener("keydown",de,!0)},[R]);const te=()=>{R!=="closing"&&B("closing")},ye=R==="open",Me=R==="closing",w=$>0?Math.max(0,1-$/500):1,Y=$>0?Math.max(.35,1-$/500):1,I=de=>{if(de.stopPropagation(),S.current){S.current=!1;return}if(t.length<=1)return;const he=de.currentTarget.getBoundingClientRect(),we=de.clientY-he.top,Z=Math.min(52,he.height*.2);if(!(we>he.height-Z)){if(de.clientX-he.left<he.width/2){l();return}d()}},z=de=>{if(t.length<=1)return;const he=de.currentTarget.getBoundingClientRect(),we=de.clientX-he.left,Z=de.clientY-he.top,Q=Math.min(52,he.height*.2);if(Z>he.height-Q){de.currentTarget.style.cursor="default";return}de.currentTarget.style.cursor=we<he.width/2?"w-resize":"e-resize"},H=s.useCallback(de=>{de.propertyName!=="transform"||!j.current||(ie(),M(!1))},[ie,M]),Te=re?`translateX(${k}px)`:$>0?`translateY(${$}px)`:void 0,fe={position:"fixed",top:U==null?void 0:U.top,left:U==null?void 0:U.left,width:U==null?void 0:U.width,height:U==null?void 0:U.height,objectFit:i==="cover"?"cover":"contain",transform:Te,opacity:$>0?Y:R==="opening"||Me?0:1,transition:F&&!g?"none":g?`transform ${An}ms ${yi}`:ee?`transform ${An}ms ${yi}, opacity ${An}ms ${yi}`:R==="opening"||Me?`opacity ${An}ms ${yi}`:"none",pointerEvents:le&&ye&&!re?"auto":"none",touchAction:le&&ye?"none":void 0,zIndex:9998},ve=U?{position:"fixed",top:U.top,height:U.height,width:U.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:R==="open"?"none":void 0},onClick:te,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:ye?w:0,transition:F?"none":`opacity ${An}ms ${yi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:x?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:b,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:ye?1:0,transition:`opacity ${An}ms ${yi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:b,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:ye?1:0,transition:`opacity ${An}ms ${yi}`},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),U&&K&&(le?a.jsx(Cb,{src:K.url,phase:R,mediaRef:m,mediaStyle:fe,onLoadedMetadata:oe,onClick:I,onMouseMove:z,onTransitionEnd:H},`${n}-${K.url}`):a.jsx("img",{ref:m,src:K.url,alt:K.name,onLoad:oe,onTransitionEnd:H,style:fe},`${n}-${K.url}`)),ye&&ve&&t.length>1&&!le&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...ve,left:U.left,cursor:"w-resize",pointerEvents:re?"none":"auto"},onClick:de=>{if(S.current){S.current=!1;return}de.stopPropagation(),l()}}),a.jsx("div",{style:{...ve,left:U.left+U.width/2,cursor:"e-resize",pointerEvents:re?"none":"auto"},onClick:de=>{if(S.current){S.current=!1;return}de.stopPropagation(),d()}})]})]})}function xc({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:r,isEditor:l,galleryPaddingBetween:d=0,showPaddingAfter:c=!1,showControls:u=!1,onMediaClick:p}){const x=`${e}-gallery-${ds(t)?"video":"image"}`,b=r.display==="cover",m=wb(r),h=R=>O.scalingValue(R,l??!1),f=n??Oi,v=o?{width:"100%",maxWidth:"100%"}:{width:h(f),maxWidth:"100%"},C=i?{borderRadius:h(i)}:{},y={...v,...b?{aspectRatio:m,height:"auto",overflow:"hidden"}:{},...C},S={...b?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":h(f)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...b?{}:C},N={className:x,style:S,onClick:p?R=>{R.stopPropagation(),p()}:void 0},U=Math.max(d,xi),W=ds(t)?a.jsx("video",{...N,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...N,src:t.url,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[b?a.jsx("div",{style:y,children:W}):W,c&&d>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:h(d)},"aria-hidden":"true"}),u&&c&&a.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(U)}})]})}function Tb({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:d,showControls:c,scaled:u,children:p}){const x=t==="a"?i:t==="c"?o:0,b=x>0||c;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&b&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(x)},"aria-hidden":"true"}),c&&t==="c"&&a.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%"}}),a.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&b&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(x)},"aria-hidden":"true"}),c&&t==="a"&&a.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(r),height:"100%"}})]})}function Ib(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function vc({P:e,scaled:t,height:n,paired:i}){return a.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 bc({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:r,paired:l,anchorStyle:d}){return a.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...r==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...r==="left"?{left:0}:{right:0},width:n(i),height:"100%",...d}})}function ja({P:e,title:t,position:n,titleRef:i,titleClassName:o,titleContainerStyle:r,titleTextBoxStyle:l,titleStyle:d,showTextBoxOutline:c=!1,topPaddingControl:u}){const p=s.useRef(null),[x,b]=s.useState(0),m=t??"",h=n==="left"||n==="center"||n==="right";return s.useLayoutEffect(()=>{if(!h)return;const f=p.current;if(!f||typeof ResizeObserver>"u")return;const v=()=>b(f.offsetHeight);v();const C=new ResizeObserver(v);return C.observe(f),()=>C.disconnect()},[m,h]),a.jsx("div",{ref:f=>{p.current=f,i(f)},className:[o,`${e}-title-position-${n}`].join(" "),style:{...h?{[`--${e}-title-height`]:`${x}px`}:{},...r},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:l,children:[u,a.jsx("div",{className:c?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:a.jsx("span",{className:`${e}-title-text`,style:d,children:m})})]})})}const wc=45;function Sc(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const r=parseFloat(o);if(!Number.isNaN(r))return r}i=i.parentElement}return n}function Rb(e){const t=Sc(e,"--cntrl-viewport-height",window.innerHeight),n=Sc(e,"--cntrl-article-top",0);return{top:n,centerY:n+t/2}}function Lb(e,t,n){const{top:i,centerY:o}=Rb(n);if(t==="top"){const l=n&&parseFloat(getComputedStyle(n).top)||i;return Math.abs(e.top-l)}const r=e.top+e.height/2;return Math.abs(r-o)}function Pb(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=Lb(u,n,c);return Math.exp(-(p*p)/(2*wc*wc))});let o=0,r=-1;return i.forEach((l,d)=>{l>r&&(r=l,o=d)}),{opacities:i,dominantIndex:o}}function Eb(e,t,n){const i=s.useRef([]),[{opacities:o,dominantIndex:r},l]=s.useState(()=>({opacities:Array.from({length:e},(c,u)=>u===0?1:0),dominantIndex:0}));return s.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let c=0;const u=()=>{l(Pb(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:r}}function Mb(e,t){const[n,i]=s.useState(e),o=s.useRef(e);return s.useEffect(()=>{if(!t){o.current=e,i(e);return}const r=Array.from(o.current),l=Array.from(e),d=Math.max(r.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),...r.slice(c)].join("");o.current=p,i(p),c>=d&&window.clearInterval(u)},35);return()=>window.clearInterval(u)},[t,e]),n}function kb({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var tt;const{prefix:l}=O.useScopedStyles(),d=s.useMemo(()=>sb(l),[l]),c=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",x=(e==null?void 0:e.imgWidth)??Oi,b=(e==null?void 0:e.titleWidth)??vb,m=bb(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??rb,f=(e==null?void 0:e.position)??"center",v=(e==null?void 0:e.titleTopPadding)??0,C=(e==null?void 0:e.titleLeftPadding)??0,y=(e==null?void 0:e.titleRightPadding)??0,S=Ib(e==null?void 0:e.transition),j=(e==null?void 0:e.lightbox)??"on",N=p==="b",U=S==="fade"||S==="retype",{setTitleRef:W,dominantIndex:R}=Eb(c.length,U,f),B=((tt=c[R])==null?void 0:tt.title)??"",$=Mb(B,S==="retype"),T=S==="fade"||S==="retype",k=S==="retype"?$:B,E=N?void 0:{width:O.scalingValue(x,n??!1)},g=j==="on"&&(!n||i||o),A=o??!1,F=(e==null?void 0:e.galleryPaddingRight)??0,X=(e==null?void 0:e.galleryPaddingLeft)??0,ee=(e==null?void 0:e.galleryPaddingBetween)??0,P=nt=>O.scalingValue(nt,n??!1),K={width:P(b)},le=p==="a"?F:X,re=N?{width:"100%"}:{width:`calc(100% - ${P(x)} - ${P(le)})`,...p==="c"?{marginLeft:"auto"}:{}},M=Math.max(F,xi),ie=Math.max(X,xi),G=Math.max(ee,xi),oe=Math.max(v,xi),te=Math.max(C,xi),ye=Math.max(y,xi),Me=Math.max(0,(u??1)-(x??Oi)),w=p==="a"?Math.max(0,(u??1)-(x??Oi)-F):p==="c"?Math.max(0,(u??1)-(x??Oi)-X):p==="b"?u??1:1,Y=A&&(p==="a"||p==="b"||p==="c")&&f==="top",I=A&&((p==="a"||p==="b")&&(f==="left"||f==="top")||p==="c"&&(f==="left"||f==="top")),z=A&&((p==="c"||p==="b")&&f==="right"||p==="a"&&f==="right"),H=c.length>1,Te=N?void 0:P((p==="c"?X:F)+(x??Oi)),fe=p==="c"&&Te?{left:Te}:void 0,ve=p==="a"&&Te?{right:Te}:void 0,de=N?{left:0,width:"100%"}:p==="a"?{right:P(F),width:P(x)}:{left:P(X),width:P(x)},{titleColor:he,titleFontFamily:we,titleFontSettings:Z,titleFontSize:Q,titleLineHeight:ae,titleLetterSpacing:$e,titleWordSpacing:ke,titleAlign:xe,titleTextAppearance:V,lightboxCounterColor:pe,lightboxCounterFontFamily:se,lightboxCounterFontSettings:q,lightboxCounterFontSize:ce,lightboxCounterLineHeight:We,lightboxCounterLetterSpacing:ge,lightboxCounterWordSpacing:J,lightboxCounterTextAppearance:Ke}=e??{},_e={fontSettings:{fontFamily:we,fontWeight:(Z==null?void 0:Z.fontWeight)??400,fontStyle:(Z==null?void 0:Z.fontStyle)??"normal"},fontSize:Q??.01,lineHeight:ae,letterSpacing:$e??0,wordSpacing:ke??0,textAlign:xe??"left",textAppearance:V,color:he??"#000000"},Ye=an(Ut(_e,n)),dt=K,at=yc(Q,ae,l,n),Xe=fc(Q,ae,`${l}-title`,`${l}-text-tight-leading`),Le={fontSettings:{fontFamily:se,fontWeight:(q==null?void 0:q.fontWeight)??400,fontStyle:(q==null?void 0:q.fontStyle)??"normal"},fontSize:ce??.01,lineHeight:We,letterSpacing:ge??0,wordSpacing:J??0,textAppearance:Ke,color:pe??"#DEDDDD"},Be={...an(Ut(Le,n)),...yc(ce,We,l,n)},Ze=fc(ce,We,`${l}-lightbox-counter`,`${l}-text-tight-leading`),me=O.buildColorVars(l,{titleColor:he??"#000000",lightboxCounterColor:pe??"#DEDDDD"},ub,pb),be=s.useRef(null),[Ne,Je]=s.useState(!1),[Se,Ie]=s.useState([]),[qe,ze]=s.useState(0),Re=s.useCallback((nt,ct)=>{g&&(Ie(nt),ze(ct),Je(!0))},[g]),Ve=s.useCallback(()=>{Je(!1)},[]),De=s.useMemo(()=>{const nt={...me},ct=be.current?getComputedStyle(be.current).getPropertyValue("--cntrl-article-width").trim():"";return ct&&(nt["--cntrl-article-width"]=ct),nt},[me,Ne]);return s.useEffect(()=>{if(!Ne||j!=="on"||typeof document>"u")return;const nt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=nt}},[Ne,j]),s.useEffect(()=>{!n||o||i||Je(!1)},[n,o,i]),s.useEffect(()=>{j==="off"&&Je(!1)},[j]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx("div",{style:me,children:a.jsxs("div",{ref:be,className:`${l}-wrapper`,style:{width:O.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:(p==="a"||p==="b"||p==="c")&&f==="top"?P(v):void 0,[`--${l}-title-left-padding`]:(p==="a"||p==="b")&&(f==="left"||f==="top")||p==="c"&&(f==="left"||f==="top")?P(C):void 0,[`--${l}-title-right-padding`]:(p==="c"||p==="b")&&f==="right"||p==="a"&&f==="right"?P(y):void 0},children:[T&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(ja,{P:l,title:k,position:f,titleRef:()=>{},titleClassName:`${Xe} ${l}-single-title`,titleContainerStyle:{...at,...re},titleTextBoxStyle:dt,titleStyle:Ye,showTextBoxOutline:A,topPaddingControl:Y?vc({P:l,scaled:P,height:oe,paired:!1}):void 0})}),c.map((nt,ct)=>{const St=fb(nt.gallery),Bt=ct<c.length-1,zt=St.filter(wt=>wt.lightboxMedia).map(wt=>wt.lightboxMedia),ft={P:l,position:f,titleRef:W(ct),titleClassName:Xe,titleContainerStyle:at,titleTextBoxStyle:T?{maxWidth:"100%"}:dt,titleStyle:Ye,showTextBoxOutline:A&&!T,topPaddingControl:Y&&!T?vc({P:l,scaled:P,height:oe,paired:H}):void 0};return a.jsxs("div",{"data-item-index":ct,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:Bt?P(ee):void 0},children:[I&&bc({P:l,controlKey:"titleLeftPadding",scaled:P,width:te,maxFraction:w,side:"left",paired:H,anchorStyle:fe}),z&&bc({P:l,controlKey:"titleRightPadding",scaled:P,width:ye,maxFraction:w,side:"right",paired:H,anchorStyle:ve}),A&&Bt&&a.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:P(G),...de}}),N?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:St.map(({displayMedia:wt,lightboxMedia:jt},At)=>{const vt=jt?zt.findIndex(Ft=>Ft.url===jt.url):-1;return a.jsx(xc,{P:l,media:wt,imgWidth:x||void 0,cornerRadius:h||void 0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ee,showPaddingAfter:At<St.length-1,showControls:A,onMediaClick:g&&vt>=0?()=>Re(zt,vt):void 0},`${wt.url}-${At}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(ja,{...ft,title:T?"":nt.title})})]}):a.jsxs(a.Fragment,{children:[a.jsx(ja,{...ft,title:T?"":nt.title}),St.length>0&&a.jsx(Tb,{P:l,layoutType:p,galleryWidthStyle:E,galleryPaddingRight:F,galleryPaddingLeft:X,galleryPaddingRightWidth:M,galleryPaddingLeftWidth:ie,galleryPaddingMaxFraction:Me,showControls:A,scaled:P,children:St.map(({displayMedia:wt,lightboxMedia:jt},At)=>{const vt=jt?zt.findIndex(Ft=>Ft.url===jt.url):-1;return a.jsx(xc,{P:l,media:wt,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ee,showPaddingAfter:At<St.length-1,showControls:A,onMediaClick:g&&vt>=0?()=>Re(zt,vt):void 0},`${wt.url}-${At}`)})})]})]},ct)})]})}),Ne&&j==="on"&&typeof document<"u"&&e&&(()=>{const nt=(r?document.getElementById(r):null)??document.body;return zn.createPortal(a.jsx("div",{style:De,"data-selection":"none",children:a.jsx($b,{prefix:l,items:Se,index:qe,imageDisplay:Sb(e.lightboxImageDisplay),isEditor:n,onClose:Ve,onPrev:()=>ze(ct=>(ct-1+Se.length)%Se.length),onNext:()=>ze(ct=>(ct+1)%Se.length),counterClassName:Ze,counterStyle:Be,backgroundColor:e.backgroundColor??lb})}),nt)})()]})}const Ab=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
20964
20968
  import { createPortal } from 'react-dom';
20965
20969
  import type React from 'react';
20966
20970
  import { CommonComponentProps } from '../props';
@@ -23010,7 +23014,7 @@ export function Mercury({
23010
23014
  </>
23011
23015
  );
23012
23016
  }
23013
- `;function Ni(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ba={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"}}},Eb={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:Ni("Gallery Padding Right"),galleryPaddingLeft:Ni("Gallery Padding Left"),galleryPaddingBetween:Ni("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:Ni("Title Top Padding"),titleLeftPadding:Ni("Title Left Padding"),titleRightPadding:Ni("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:{...Ba.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:{...Ba.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:{...Ba.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"]}},Mb={element:Lb,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:Eb,sourceCode:Pb,assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},xc=48,kb=10,Ab=400,Fb=1,_b=1120/1440,Nb=140/1440,Wb=550/1440,Hb=13,Db=4,Ob=38/100,Bb=28/100,Ud=2.8,zb=.9,Kd=.22,jb=.5,Vb=1,Gb=1.5,Xb=0,qb=.85;function Yb(e,t){return`
23017
+ `;function Ni(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Va={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"}}},Fb={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:Ni("Gallery Padding Right"),galleryPaddingLeft:Ni("Gallery Padding Left"),galleryPaddingBetween:Ni("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:Ni("Title Top Padding"),titleLeftPadding:Ni("Title Left Padding"),titleRightPadding:Ni("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:{...Va.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:{...Va.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:{...Va.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"]}},_b={element:kb,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:Fb,sourceCode:Ab,assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},Cc=48,Nb=10,Wb=400,Hb=1,Db=1120/1440,Ob=140/1440,Bb=550/1440,zb=13,jb=4,Vb=38/100,Gb=28/100,eu=2.8,Xb=.9,tu=.22,Yb=.5,qb=1,Ub=1.5,Kb=0,Zb=.85;function Jb(e,t){return`
23014
23018
  .${e}-wrapper {
23015
23019
  position: relative;
23016
23020
  box-sizing: border-box;
@@ -23055,10 +23059,10 @@ export function Mercury({
23055
23059
  object-position: center;
23056
23060
  }
23057
23061
  ${t}
23058
- `}function Jo(e){return Number(e.toFixed(4))}function bc(e,t,n,i){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,Math.round(r))):t}function za(e,t,n=0,i=9999){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,r)):t}function Ub(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 Kb(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function Zb(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 Zd(e,t){return(1-e)/(1-e*Math.cos(t))}function Jb(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)*Zd(e,i)))}return t||1}function Qb(e,t){return e?1:1+Kd*(.35+t)}function ew(e,t,n,i){const o=t*Qb(n,i);return Math.max(0,(e-o)/2)}function Jd(e,t,n){const i=Zd(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function Qd(e,t,n){return e/2+t*n}function tw(e,t,n){return e(t-n/2)}function nw(e,t){return e*t}function eu(e){return Math.round(e*1e3)}function tu(e,t,n){const i=Math.cos(e),o=Math.cos(qb*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return Jo(t+(n-t)*r)}function nu(e){return tu(e,jb,Vb)}function iw(e){return tu(e,Gb,Xb)}function iu(e,t){if(!t)return"none";const n=iw(e);return n<=0?"none":`blur(${n}px)`}function ow(e,t,n,i,o,r,l,d){const{offset:c,scale:u}=Jd(i,o,r*Math.PI*2),p=r*Math.PI*2,v=Qd(t,n,c),w=Jo(u),m=`calc(${e(v)} - var(--helix-base-w) * ${w} / 2)`,h=`calc(var(--helix-base-w) * ${w})`,f=l?`height: calc(var(--helix-base-h) * ${w});`:"";return`left: ${m}; width: ${h}; ${f} z-index: ${eu(u)}; transform: translateY(-50%); opacity: ${nu(p)}; filter: ${iu(p,d)};`}function rw(e,t,n,i,o,r,l,d){const c=[];for(let u=0;u<=xc;u+=1){const p=u/xc;c.push(` ${Jo(p*100)}% { ${ow(t,n,i,o,r,p,l,d)} }`)}return`@keyframes ${e}-orbit {
23062
+ `}function er(e){return Number(e.toFixed(4))}function $c(e,t,n,i){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,Math.round(r))):t}function Ga(e,t,n=0,i=9999){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,r)):t}function Qb(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 ew(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function tw(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 nu(e,t){return(1-e)/(1-e*Math.cos(t))}function nw(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)*nu(e,i)))}return t||1}function iw(e,t){return e?1:1+tu*(.35+t)}function ow(e,t,n,i){const o=t*iw(n,i);return Math.max(0,(e-o)/2)}function iu(e,t,n){const i=nu(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function ou(e,t,n){return e/2+t*n}function rw(e,t,n){return e(t-n/2)}function aw(e,t){return e*t}function ru(e){return Math.round(e*1e3)}function au(e,t,n){const i=Math.cos(e),o=Math.cos(Zb*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return er(t+(n-t)*r)}function su(e){return au(e,Yb,qb)}function sw(e){return au(e,Ub,Kb)}function lu(e,t){if(!t)return"none";const n=sw(e);return n<=0?"none":`blur(${n}px)`}function lw(e,t,n,i,o,r,l,d){const{offset:c,scale:u}=iu(i,o,r*Math.PI*2),p=r*Math.PI*2,x=ou(t,n,c),b=er(u),m=`calc(${e(x)} - var(--helix-base-w) * ${b} / 2)`,h=`calc(var(--helix-base-w) * ${b})`,f=l?`height: calc(var(--helix-base-h) * ${b});`:"";return`left: ${m}; width: ${h}; ${f} z-index: ${ru(u)}; transform: translateY(-50%); opacity: ${su(p)}; filter: ${lu(p,d)};`}function cw(e,t,n,i,o,r,l,d){const c=[];for(let u=0;u<=Cc;u+=1){const p=u/Cc;c.push(` ${er(p*100)}% { ${lw(t,n,i,o,r,p,l,d)} }`)}return`@keyframes ${e}-orbit {
23059
23063
  ${c.join(`
23060
23064
  `)}
23061
- }`}function ou(e,t){return(e%t+t)%t}function aw(e,t){return Us(e,t)/t}function Us(e,t){return ou(e,t)}function sw(e,t){return Math.floor(e/t)}function lw(e,t,n,i){return sw(e,t)*n+Us(e,t)*i}function cw(e,t,n){const i=n==="left"?1-e:e;return`${Jo(-i*t)}s`}function wc(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function ru(e){const t=e%1;return t<0?t+1:t}function dw(e,t,n){const i=t/Ud,o=n==="left"?-e*i:e*i;return ru(o)}function uw({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=W.useScopedStyles(),r=s.useRef(null),l=za((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),_b),d=za(e==null?void 0:e.imageWidth,Nb),c=za(e==null?void 0:e.turnHeight,Wb),u=bc(e==null?void 0:e.itemsPerTurn,Hb,3,40),p=bc(e==null?void 0:e.turns,Db,1,30),v=Math.min(zb,Math.max(0,Ob)),w=Math.min(1,Math.max(0,Bb)),m=Math.max(0,(e==null?void 0:e.speed)??Ud),h=(e==null?void 0:e.direction)==="left"?"left":"right",f=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",x=(e==null?void 0:e.cornerRadius)??0,C=(e==null?void 0:e.blur)!=="off",y=s.useMemo(()=>Ub(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),S=y.display==="cover",z=re=>W.scalingValue(re,n??!1),N=s.useMemo(()=>Jb(v),[v]),Y=s.useMemo(()=>ew(l,d,S,w),[l,d,S,w]),B=s.useMemo(()=>Yb(o,rw(o,z,l,Y,v,N,S,C)),[o,l,Y,v,N,S,C,n]),T=s.useMemo(()=>(t??[]).filter(re=>{var k;return!!((k=re.image)!=null&&k.url)}),[t]),H=c/u,$=d*Kb(y),I=Math.min(Ab,p*u),P=Fb*u,M=I+P*2,D=Math.max(0,p-1)*c+(u-1)*H,A=m>0,X=f==="scroll"&&A,ie=f==="autoplay"&&A&&(n?!!i:!0),[L,_]=s.useState(0);s.useEffect(()=>{if(!X)return;const re=r.current;if(!re)return;const k=()=>{const G=re.getBoundingClientRect(),b=window.innerHeight||document.documentElement.clientHeight,E=b+G.height;E<=0||_(Math.min(1,Math.max(0,(b-G.top)/E)))};k(),window.addEventListener("scroll",k,{passive:!0}),window.addEventListener("resize",k);const le=new ResizeObserver(k);return le.observe(re),()=>{window.removeEventListener("scroll",k),window.removeEventListener("resize",k),le.disconnect()}},[X]);const V=X?dw(L,m,h):0,se=A&&f==="autoplay"?360/(m*kb):0;return T.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:B}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:z(l),marginInline:"auto"}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:B}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:z(l),height:z(D),marginInline:"auto"},children:Array.from({length:M},(re,k)=>{const le=k-P,b=T[ou(le,T.length)].image,E=Us(le,u),j=aw(le,u),me=X?ru(j+V):j,K=lw(le,u,c,H),te=w===0?0:(wc(E+7.3)-.5)*w*H,O=S?1:1+(wc(E+3.1)-.5)*2*Kd*(.35+w),J=me*Math.PI*2,{offset:ne,scale:Pe}=Jd(v,N,J),be=d*O,Re=nw(be,Pe),ue=Qd(l,Y,ne),fe={"--helix-base-w":z(be),...S?{"--helix-base-h":z($)}:{}},$e={top:z(K+te),transform:"translateY(-50%)",...fe,...ie?{animationDuration:`${Jo(se)}s`,animationDelay:cw(j,se,h),animationDirection:h==="left"?"reverse":"normal"}:{left:tw(z,ue,Re),width:z(Re),...S?{height:z($*Pe)}:{},zIndex:eu(Pe),opacity:nu(J),filter:iu(J,C)}},Q=x>0?{borderRadius:z(x)}:{},Z=S?{...Q,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:Q,ae=Zb(b)?a.jsx("video",{className:`${o}-media`,style:Z,src:b.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:Z,src:b.url,alt:b.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{className:ie?`${o}-item`:`${o}-item ${o}-item-static`,style:$e,children:S?a.jsx("div",{className:`${o}-cover`,style:Q,children:ae}):ae},`${p}-${u}-${le}`)})})]})}const pw=`import { useEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
23065
+ }`}function cu(e,t){return(e%t+t)%t}function dw(e,t){return Qs(e,t)/t}function Qs(e,t){return cu(e,t)}function uw(e,t){return Math.floor(e/t)}function pw(e,t,n,i){return uw(e,t)*n+Qs(e,t)*i}function mw(e,t,n){const i=n==="left"?1-e:e;return`${er(-i*t)}s`}function Tc(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function du(e){const t=e%1;return t<0?t+1:t}function gw(e,t,n){const i=t/eu,o=n==="left"?-e*i:e*i;return du(o)}function hw({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=O.useScopedStyles(),r=s.useRef(null),l=Ga((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),Db),d=Ga(e==null?void 0:e.imageWidth,Ob),c=Ga(e==null?void 0:e.turnHeight,Bb),u=$c(e==null?void 0:e.itemsPerTurn,zb,3,40),p=$c(e==null?void 0:e.turns,jb,1,30),x=Math.min(Xb,Math.max(0,Vb)),b=Math.min(1,Math.max(0,Gb)),m=Math.max(0,(e==null?void 0:e.speed)??eu),h=(e==null?void 0:e.direction)==="left"?"left":"right",f=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",v=(e==null?void 0:e.cornerRadius)??0,C=(e==null?void 0:e.blur)!=="off",y=s.useMemo(()=>Qb(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),S=y.display==="cover",j=re=>O.scalingValue(re,n??!1),N=s.useMemo(()=>nw(x),[x]),U=s.useMemo(()=>ow(l,d,S,b),[l,d,S,b]),W=s.useMemo(()=>Jb(o,cw(o,j,l,U,x,N,S,C)),[o,l,U,x,N,S,C,n]),R=s.useMemo(()=>(t??[]).filter(re=>{var M;return!!((M=re.image)!=null&&M.url)}),[t]),B=c/u,$=d*ew(y),T=Math.min(Wb,p*u),k=Hb*u,E=T+k*2,A=Math.max(0,p-1)*c+(u-1)*B,F=m>0,X=f==="scroll"&&F,ee=f==="autoplay"&&F&&(n?!!i:!0),[P,D]=s.useState(0);s.useEffect(()=>{if(!X)return;const re=r.current;if(!re)return;const M=()=>{const G=re.getBoundingClientRect(),oe=window.innerHeight||document.documentElement.clientHeight,te=oe+G.height;te<=0||D(Math.min(1,Math.max(0,(oe-G.top)/te)))};M(),window.addEventListener("scroll",M,{passive:!0}),window.addEventListener("resize",M);const ie=new ResizeObserver(M);return ie.observe(re),()=>{window.removeEventListener("scroll",M),window.removeEventListener("resize",M),ie.disconnect()}},[X]);const K=X?gw(P,m,h):0,le=F&&f==="autoplay"?360/(m*Nb):0;return R.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:W}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:j(l),marginInline:"auto"}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:W}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:j(l),height:j(A),marginInline:"auto"},children:Array.from({length:E},(re,M)=>{const ie=M-k,oe=R[cu(ie,R.length)].image,te=Qs(ie,u),ye=dw(ie,u),Me=X?du(ye+K):ye,w=pw(ie,u,c,B),Y=b===0?0:(Tc(te+7.3)-.5)*b*B,I=S?1:1+(Tc(te+3.1)-.5)*2*tu*(.35+b),z=Me*Math.PI*2,{offset:H,scale:Te}=iu(x,N,z),fe=d*I,ve=aw(fe,Te),de=ou(l,U,H),he={"--helix-base-w":j(fe),...S?{"--helix-base-h":j($)}:{}},we={top:j(w+Y),transform:"translateY(-50%)",...he,...ee?{animationDuration:`${er(le)}s`,animationDelay:mw(ye,le,h),animationDirection:h==="left"?"reverse":"normal"}:{left:rw(j,de,ve),width:j(ve),...S?{height:j($*Te)}:{},zIndex:ru(Te),opacity:su(z),filter:lu(z,C)}},Z=v>0?{borderRadius:j(v)}:{},Q=S?{...Z,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:Z,ae=tw(oe)?a.jsx("video",{className:`${o}-media`,style:Q,src:oe.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:Q,src:oe.url,alt:oe.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{className:ee?`${o}-item`:`${o}-item ${o}-item-static`,style:we,children:S?a.jsx("div",{className:`${o}-cover`,style:Z,children:ae}):ae},`${p}-${u}-${ie}`)})})]})}const fw=`import { useEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
23062
23066
  import { CommonComponentProps } from '../props';
23063
23067
  import { scalingValue } from '../utils/scalingValue';
23064
23068
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -23596,7 +23600,7 @@ export function Helix({
23596
23600
  </>
23597
23601
  );
23598
23602
  }
23599
- `,mw=["https://cdn.cntrl.site/component-assets/Helix-default-1.png","https://cdn.cntrl.site/component-assets/Helix-default-2.png","https://cdn.cntrl.site/component-assets/Helix-default-3.png","https://cdn.cntrl.site/component-assets/Helix-default-4.png","https://cdn.cntrl.site/component-assets/Helix-default-5.png"],gw={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:mw.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},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},hw={element:uw,id:"helix",name:"Helix",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Helix.mp4"},version:1,defaultSize:{d:{width:720,height:540}},schema:gw,sourceCode:pw,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},wr=typeof window>"u"?s.useEffect:s.useLayoutEffect,Bo=120,Sc=3,fw=.12,ja=.25,yw=10,vw=4e3,xw=.12,bw=3,ww=3,au=["rectangle","ellipse","circle","triangle-up","triangle-down","diamond","hourglass","teardrop","leaf","wave","custom"];function Br(e){return e<0?0:e>1?1:e}function Sw(e,t){return e.filter(n=>n.length>0).map(n=>`M ${n.map(i=>`${i.x*t.width} ${i.y*t.height}`).join(" L ")} Z`).join(" ")}function Cw(e,t){let n=1/0,i=1/0,o=-1/0,r=-1/0;for(const c of e)for(const u of c){const p=u.x*t.width,v=u.y*t.height;p<n&&(n=p),p>o&&(o=p),v<i&&(i=v),v>r&&(r=v)}const l=o-n,d=r-i;return!isFinite(l)||!isFinite(d)||l<=0||d<=0?null:{x:n,y:i,width:l,height:d}}function xo(e){return e.map(([t,n])=>({x:t,y:n}))}function Va(e,t=Bo){const n=[];for(let i=0;i<t;i+=1)n.push(e(i/t));return n}function Pr(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const d of e)for(const c of d)c.x<t&&(t=c.x),c.x>i&&(i=c.x),c.y<n&&(n=c.y),c.y>o&&(o=c.y);const r=i-t,l=o-n;return!isFinite(r)||!isFinite(l)||r<=0||l<=0?e:e.map(d=>d.map(c=>({x:(c.x-t)/r,y:(c.y-n)/l})))}function ls(e,t){switch(e){case"ellipse":return[Va(n=>{const i=n*Math.PI*2;return{x:.5+Math.cos(i)*.5,y:.5+Math.sin(i)*.5}})];case"circle":{const n=t>=1?.5/t:.5,i=t>=1?.5:.5*t;return[Va(o=>{const r=o*Math.PI*2;return{x:.5+Math.cos(r)*n,y:.5+Math.sin(r)*i}})]}case"triangle-up":return[xo([[.5,0],[1,1],[0,1]])];case"triangle-down":return[xo([[0,0],[1,0],[.5,1]])];case"diamond":return[xo([[.5,0],[1,.5],[.5,1],[0,.5]])];case"hourglass":return[xo([[0,0],[1,0],[.56,.5],[1,1],[0,1],[.44,.5]])];case"teardrop":return Pr([Va(n=>{const i=n*Math.PI*2,o=Math.cos(i);return{x:.5+Math.sin(i)*Math.pow(Math.sin(i/2),2)*.5,y:.5-o*.5}})]);case"leaf":{const n=Math.round(Bo/2),i=[];for(let o=0;o<=n;o+=1){const r=o/n;i.push({x:.5+Math.sin(Math.PI*r)*.5,y:r})}for(let o=n;o>=0;o-=1){const r=o/n;i.push({x:.5-Math.sin(Math.PI*r)*.5,y:r})}return[i]}case"wave":{const o=Bo,r=[];for(let l=0;l<=o;l+=1){const d=l/o;r.push({x:.09+Math.sin(Math.PI*2*2*d)*.09,y:d})}for(let l=o;l>=0;l-=1){const d=l/o;r.push({x:1-.09+Math.sin(Math.PI*2*2*d+Math.PI/3)*.09,y:d})}return[r]}case"rectangle":case"custom":default:return[xo([[0,0],[1,0],[1,1],[0,1]])]}}const su={x:0,y:0,width:100,height:100};function $w(e){const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?su:{x:t[0],y:t[1],width:t[2],height:t[3]}}function Er(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}const cs=16,Tw=12,Iw=16,zr="0 0 100 100",jr=100,Ga=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,Rw=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g;function Lw(e){const t=e.match(Rw);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function gn(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function ds(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function on(e){return{x:e.x,y:e.y}}function Pw(e){return{p:on(e.p),in:e.in?on(e.in):null,out:e.out?on(e.out):null}}function Pn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(Pw)}))}function ei(e,t){return e.map(n=>({closed:n.closed,nodes:n.nodes.map(i=>({p:t(i.p),in:i.in?t(i.in):null,out:i.out?t(i.out):null}))}))}function Cc(e,t,n,i=n){return ei(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function Ew(e,t,n,i,o,r,l){let d=Math.abs(t),c=Math.abs(n);if(!d||!c||e.x===l.x&&e.y===l.y)return[{c1:on(e),c2:on(l),p:on(l)}];const u=i*Math.PI/180,p=Math.cos(u),v=Math.sin(u),w=(e.x-l.x)/2,m=(e.y-l.y)/2,h=p*w+v*m,f=-v*w+p*m,x=h*h/(d*d)+f*f/(c*c);if(x>1){const ie=Math.sqrt(x);d*=ie,c*=ie}const C=o===r?-1:1,y=d*d*f*f+c*c*h*h,S=Math.max(0,d*d*c*c-y),z=y===0?0:C*Math.sqrt(S/y),N=z*d*f/c,Y=-z*c*h/d,B=p*N-v*Y+(e.x+l.x)/2,T=v*N+p*Y+(e.y+l.y)/2,H=Math.atan2((f-Y)/c,(h-N)/d);let I=Math.atan2((-f-Y)/c,(-h-N)/d)-H;!r&&I>0&&(I-=Math.PI*2),r&&I<0&&(I+=Math.PI*2);const P=Math.max(1,Math.ceil(Math.abs(I)/(Math.PI/2))),M=I/P,g=4/3*Math.tan(M/4),D=(ie,L)=>({x:B+p*d*ie-v*c*L,y:T+v*d*ie+p*c*L}),A=[];let X=H;for(let ie=0;ie<P;ie+=1){const L=X+M,_=Math.cos(X),V=Math.sin(X),se=Math.cos(L),re=Math.sin(L);A.push({c1:D(_-g*V,V+g*_),c2:D(se+g*re,re-g*se),p:ie===P-1?on(l):D(se,re)}),X=L}return A}function zo(e){const t=(e??"").trim();if(!t)return[];const n=[];let i=[],o=!1,r={x:0,y:0},l={x:0,y:0},d=null,c=null;const u=()=>{if(o&&i.length>2){const m=i[0],h=i[i.length-1];Math.abs(m.p.x-h.p.x)<1e-6&&Math.abs(m.p.y-h.p.y)<1e-6&&(m.in=h.in??m.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(m,h)=>{i.push({p:m,in:h??null,out:null}),r=m},v=m=>{i.length&&(i[i.length-1].out=m)};Ga.lastIndex=0;let w=Ga.exec(t);for(;w!==null;){const m=w[1],h=m.toUpperCase(),f=m!==h,x=Lw(w[2]),C=y=>f?{x:r.x+x[y],y:r.y+x[y+1]}:{x:x[y],y:x[y+1]};if(h==="Z")o=!0,u(),r=on(l),d=null,c=null;else if(h==="M"){for(let y=0;y+1<x.length;y+=2){const S=C(y);y===0&&(u(),l=on(S)),p(S)}d=null,c=null}else if(h==="L"){for(let y=0;y+1<x.length;y+=2)p(C(y));d=null,c=null}else if(h==="H"){for(const y of x)p({x:f?r.x+y:y,y:r.y});d=null,c=null}else if(h==="V"){for(const y of x)p({x:r.x,y:f?r.y+y:y});d=null,c=null}else if(h==="C"){for(let y=0;y+5<x.length;y+=6){const S=C(y),z=C(y+2),N=C(y+4);v(S),p(N,z),d=z}c=null}else if(h==="S"){for(let y=0;y+3<x.length;y+=4){const S=d?ds(d,r):on(r),z=C(y),N=C(y+2);v(S),p(N,z),d=z}c=null}else if(h==="Q")for(let y=0;y+3<x.length;y+=4){const S=C(y),z=C(y+2);v(gn(r,S,2/3)),p(z,gn(z,S,2/3)),c=S,d=null}else if(h==="T")for(let y=0;y+1<x.length;y+=2){const S=c?ds(c,r):on(r),z=C(y);v(gn(r,S,2/3)),p(z,gn(z,S,2/3)),c=S,d=null}else if(h==="A")for(let y=0;y+6<x.length;y+=7){const S=f?{x:r.x+x[y+5],y:r.y+x[y+6]}:{x:x[y+5],y:x[y+6]};for(const z of Ew(r,x[y],x[y+1],x[y+2],x[y+3]!==0,x[y+4]!==0,S))v(z.c1),p(z.p,z.c2);d=null,c=null}w=Ga.exec(t)}return u(),n}function Rn(e){return`${Number(e.toFixed(2))}`}function Qo(e,t){return!e.out&&!t.in}function $c(e,t){if(Qo(e,t))return`L${Rn(t.p.x)},${Rn(t.p.y)}`;const n=e.out??e.p,i=t.in??t.p;return`C${Rn(n.x)},${Rn(n.y)} ${Rn(i.x)},${Rn(i.y)} ${Rn(t.p.x)},${Rn(t.p.y)}`}function jo(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${Rn(i.p.x)},${Rn(i.p.y)}`);let r=i;for(const l of o)t.push($c(r,l)),r=l;if(n.closed){const l=$c(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function lu(e){const t=[];for(let n=0;n+1<e.nodes.length;n+=1)t.push({from:e.nodes[n],to:e.nodes[n+1],index:n});if(e.closed&&e.nodes.length>2){const n=e.nodes.length-1;t.push({from:e.nodes[n],to:e.nodes[0],index:n})}return t}function us(e,t,n){if(Qo(e,t))return gn(e.p,t.p,n);const i=e.out??e.p,o=t.in??t.p,r=1-n,l=r*r*r,d=3*r*r*n,c=3*r*n*n,u=n*n*n;return{x:l*e.p.x+d*i.x+c*o.x+u*t.p.x,y:l*e.p.y+d*i.y+c*o.y+u*t.p.y}}function Ks(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of lu(n)){if(Qo(o.from,o.to)){i.push(on(o.from.p));continue}for(let r=0;r<cs;r+=1)i.push(us(o.from,o.to,r/cs))}n.closed||i.push(on(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function wi(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of Ks(e))for(const l of r)l.x<t&&(t=l.x),l.x>i&&(i=l.x),l.y<n&&(n=l.y),l.y>o&&(o=l.y);return{minX:t,minY:n,maxX:i,maxY:o}}function cu(e,t,n){const i={x:(n.x-e.x)/6,y:(n.y-e.y)/6};return{in:{x:t.x-i.x,y:t.y-i.y},out:{x:t.x+i.x,y:t.y+i.y}}}function du(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=Tw)return{closed:!0,nodes:t.map(r=>({p:on(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/Iw)),i=[];for(let r=0;r<t.length;r+=n)i.push(t[r]);const o=i.length;return{closed:!0,nodes:i.map((r,l)=>({p:on(r),...cu(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function Mw(e){const t={x:0,y:0,width:jr,height:jr};if(!e||e.pathFit!=="viewbox"||e.pathViewBox!==zr||!e.customPath)return t;const n=zo(e.customPath);if(!n.length)return t;const i=wi(n),o=i.maxX-i.minX,r=i.maxY-i.minY;return!isFinite(i.minX)||!isFinite(i.minY)||!(o>0)||!(r>0)?t:{x:i.minX,y:i.minY,width:o,height:r}}function uu(e,t,n=1){if(!e.length)return!1;const i=wi(e);if(!isFinite(i.minX)||!isFinite(i.maxX))return!1;const o=Math.max(n,t.width*.5),r=Math.max(n,t.height*.5);return i.minX<t.x-o||i.minY<t.y-r||i.maxX>t.x+t.width+o||i.maxY>t.y+t.height+r}function kw(e,t){if(!e.length)return e;const n=wi(e),i=n.maxX-n.minX,o=n.maxY-n.minY;if(!(i>0)||!(o>0)||n.minX>=t.x-1e-6&&n.minY>=t.y-1e-6&&n.maxX<=t.x+t.width+1e-6&&n.maxY<=t.y+t.height+1e-6)return e;const l=Math.min(t.width/i,t.height/o),d=t.x+(t.width-i*l)/2,c=t.y+(t.height-o*l)/2;return ei(e,u=>({x:d+(u.x-n.minX)*l,y:c+(u.y-n.minY)*l}))}function Aw(e,t=1,n){const i=Mw(n),o=ls(e==="custom"?"rectangle":e,t),r=kw(ei(du(o),l=>({x:l.x*i.width+i.x,y:l.y*i.height+i.y})),i);return{shape:e,customPath:jo(r),pathFit:"viewbox",pathViewBox:zr}}function Tc(e,t){return t>0?Math.round(e/t)*t:e}function Fw(e,t,n,i){var u;const o=(u=e[t])==null?void 0:u.nodes[n];if(!o)return e;const r=i.x-o.p.x,l=i.y-o.p.y,d=Pn(e),c=d[t].nodes[n];return c.p={x:o.p.x+r,y:o.p.y+l},c.in&&(c.in={x:c.in.x+r,y:c.in.y+l}),c.out&&(c.out={x:c.out.x+r,y:c.out.y+l}),d}function Ic(e,t,n,i){var r;if(!t.length)return e;const o=Pn(e);for(const{contour:l,node:d}of t){const c=(r=o[l])==null?void 0:r.nodes[d];c&&(c.p={x:c.p.x+n,y:c.p.y+i},c.in&&(c.in={x:c.in.x+n,y:c.in.y+i}),c.out&&(c.out={x:c.out.x+n,y:c.out.y+i}))}return o}function _w(e,t){const n=new Map;for(const{contour:o,node:r}of t){const l=n.get(o)??[];l.push(r),n.set(o,l)}let i=e;return n.forEach((o,r)=>{const l=[...o].sort((d,c)=>c-d);for(const d of l)i=pu(i,r,d)}),i}function Nw(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const d=Pn(e),c=d[t].nodes[n];if(c[i]=on(o),r){const p=i==="in"?"out":"in";c[p]=ds(o,c.p)}return d}function Ww(e,t,n,i){var l;const o=(l=e[t])==null?void 0:l.nodes[n];if(!o||!o[i])return e;const r=Pn(e);return r[t].nodes[n][i]=null,r}function Hw(e,t,n,i){const o=e[t];if(!o)return{contours:e,nodeIndex:-1};const r=o.nodes[n],l=o.nodes[(n+1)%o.nodes.length];if(!r||!l)return{contours:e,nodeIndex:-1};const d=Pn(e),c=d[t].nodes,u=n+1;if(Qo(r,l))return c.splice(u,0,{p:gn(r.p,l.p,i),in:null,out:null}),{contours:d,nodeIndex:u};const p=r.out??r.p,v=l.in??l.p,w=gn(r.p,p,i),m=gn(p,v,i),h=gn(v,l.p,i),f=gn(w,m,i),x=gn(m,h,i),C=gn(f,x,i),y=(n+1)%o.nodes.length;return c[n].out=w,c[y].in=h,c.splice(u,0,{p:C,in:f,out:x}),{contours:d,nodeIndex:u}}function pu(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=Pn(e);return o[t].nodes.splice(n,1),o}function Rc(e,t,n){const i=e[t];if(!(i==null?void 0:i.nodes[n]))return e;const r=Pn(e),l=r[t].nodes[n];if(l.in||l.out)return l.in=null,l.out=null,r;const d=i.nodes.length,c=i.nodes[(n-1+d)%d].p,u=i.nodes[(n+1)%d].p,p=cu(c,l.p,u);return l.in=p.in,l.out=p.out,r}function Dw(e,t,n){const i=n.x-t.x,o=n.y-t.y,r=i*i+o*o,l=r===0?0:Math.max(0,Math.min(1,((e.x-t.x)*i+(e.y-t.y)*o)/r)),d={x:t.x+i*l,y:t.y+o*l};return{t:l,distance:Math.hypot(e.x-d.x,e.y-d.y)}}function Ow(e,t){let n=null;return e.forEach((i,o)=>{for(const r of lu(i)){const l=Qo(r.from,r.to)?1:cs;for(let d=0;d<l;d+=1){const c=d/l,u=(d+1)/l,p=Dw(t,us(r.from,r.to,c),us(r.from,r.to,u));(!n||p.distance<n.distance)&&(n={contour:o,segment:r.index,t:c+(u-c)*p.t,distance:p.distance})}}}),n}function mu(e){return!e.in&&!e.out}function Bw(e,t){const n=[];return e.forEach((i,o)=>{i.nodes.forEach((r,l)=>{o===t.contour&&l===t.node||mu(r)&&n.push(r.p)})}),n}function Lc(e,t,n,i,o){const r=i(t);let l=null,d=o;for(const c of e){const u=i(c),p=Math.abs(u[n]-r[n]);p<=d&&(d=p,l=c[n])}return l}function Pc(e,t="stretch",n=su){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=zo(i),d=Ks(l);if(d.length)return t==="viewbox"?Er(d,n):Pr(d);if(typeof document>"u")return null;const c=i.split(/(?=[Mm])/).map(v=>v.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const v of c){const w=document.createElementNS("http://www.w3.org/2000/svg","path");w.setAttribute("d",v),u.appendChild(w);let m=0;try{m=w.getTotalLength()}catch{m=0}if(!m)continue;const h=[];for(let f=0;f<Bo;f+=1){const x=w.getPointAtLength(f/Bo*m);h.push({x:x.x,y:x.y})}p.push(h)}return p.length?t==="viewbox"?Er(p,n):Pr(p):null}const o=i.split(/[\s,]+/).map(Number).filter(l=>!Number.isNaN(l));if(o.length<6)return null;const r=[];for(let l=0;l+1<o.length;l+=2)r.push({x:o[l],y:o[l+1]});return t==="viewbox"?Er([r],n):Pr([r])}function zw(e,t){const n=[];for(const o of e)for(let r=0;r<o.length;r+=1){const l=o[r],d=o[(r+1)%o.length];(l.y<=t&&d.y>t||d.y<=t&&l.y>t)&&n.push(l.x+(t-l.y)/(d.y-l.y)*(d.x-l.x))}n.sort((o,r)=>o-r);const i=[];for(let o=0;o+1<n.length;o+=2){const r=Br(n[o]),l=Br(n[o+1]);l>r&&i.push({x0:r,x1:l})}return jw(i)}function jw(e){if(e.length<2)return e;const t=[...e].sort((i,o)=>i.x0-o.x0),n=[t[0]];for(let i=1;i<t.length;i+=1){const o=n[n.length-1],r=t[i];r.x0<=o.x1?o.x1=Math.max(o.x1,r.x1):n.push({...r})}return n}function Vw(e,t){const n=[];let i=0,o=0;for(;i<e.length&&o<t.length;){const r=Math.max(e[i].x0,t[o].x0),l=Math.min(e[i].x1,t[o].x1);l>r&&n.push({x0:r,x1:l}),e[i].x1<t[o].x1?i+=1:o+=1}return n}function Gw(e){const t=[];let n=0;for(const i of e)i.x0>n&&t.push({x0:n,x1:i.x0}),n=Math.max(n,i.x1);return n<1&&t.push({x0:n,x1:1}),t}function Xw(e,t){const n=[];for(const i of e){if(t.x1<=i.x0||t.x0>=i.x1){n.push(i);continue}t.x0>i.x0&&n.push({x0:i.x0,x1:t.x0}),t.x1<i.x1&&n.push({x0:t.x1,x1:i.x1})}return n}function qw(e,t,n,i){let o=null;for(let r=0;r<Sc;r+=1){const l=Br(t+(n-t)*r/Math.max(1,Sc-1)),d=zw(e,l),c=i==="avoid"?Gw(d):d;if(o=o===null?c:Vw(o,c),o.length===0)return[]}return o??[]}function gu(e){return!!e&&typeof e=="object"&&e.type==="link"}function Yw(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,d)=>{for(const c of r){if(gu(c)){o(c.children??[],c.value,c.target);continue}const u=c,p=(u==null?void 0:u.text)??"";if(p.trim())for(const v of p.split(/\s+/))v&&t.push({text:v,leaf:u,href:l,target:d,para:i})}};o((n==null?void 0:n.children)??[])}),t}function Ec(e){return{...e.fontFamily&&{fontFamily:co(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"}}}function Uw(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(gu(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function Mc(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:d,height:c,allowOverflow:u,capInset:p,capLines:v}=e,w=e.lineHeight*l,m=e.spaceWidth*l,h=[];if(!t.length||d<=0||w<=0)return{segments:h,placed:0,height:0,capLeft:0,capTop:0};const f=Math.max(1,m*.5),x=w*fw;let C=0,y=0,S=0,z=t[0].para,N=0,Y=0,B=null;for(;C<t.length&&S<vw;){const T=y+w>c;if(T&&!u)break;const H=t[C].para;if(H>z+1){y+=w*(H-z-1),z=H-1,S+=1;continue}let $=T?[{x0:0,x1:d}]:qw(i,(y+x)/c,(y+w-x)/c,o).map(P=>({x0:P.x0*d,x1:P.x1*d}));p>0&&v>0&&!T&&$.length&&(B===null&&(B=S,N=$[0].x0,Y=y),S-B<v&&($=Xw($,{x0:N,x1:N+p})));const I=$.reduce((P,M)=>Math.max(P,M.x1-M.x0),0);for(const P of $){const M=P.x1-P.x0;if(M<f)continue;if(C>=t.length||t[C].para!==H)break;const g=C;let D=0;for(;C<t.length&&t[C].para===H;){const A=n[C]*l,X=C===g?A:m+A;if(D+X>M&&!(C===g&&M>=I-.5&&A>d-.5))break;D+=X,C+=1}if(C>g){const A=C>=t.length||t[C].para!==H;h.push({top:y,left:P.x0,width:M,from:g,to:C,justify:r==="justify"&&!A})}if(C>=t.length||t[C].para!==H)break}z=H,y+=w,S+=1}return{segments:h,placed:C,height:h.length?y:0,capLeft:N,capTop:Y}}function Kw(e){return`
23603
+ `,yw=["https://cdn.cntrl.site/component-assets/Helix-default-1.png","https://cdn.cntrl.site/component-assets/Helix-default-2.png","https://cdn.cntrl.site/component-assets/Helix-default-3.png","https://cdn.cntrl.site/component-assets/Helix-default-4.png","https://cdn.cntrl.site/component-assets/Helix-default-5.png"],xw={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:yw.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},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},vw={element:hw,id:"helix",name:"Helix",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Helix.mp4"},version:1,defaultSize:{d:{width:720,height:540}},schema:xw,sourceCode:fw,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Cr=typeof window>"u"?s.useEffect:s.useLayoutEffect,jo=120,Ic=3,bw=.12,Xa=.25,ww=10,Sw=4e3,Cw=.12,$w=3,Tw=3,uu=["rectangle","ellipse","circle","triangle-up","triangle-down","diamond","hourglass","teardrop","leaf","wave","custom"];function Vr(e){return e<0?0:e>1?1:e}function Iw(e,t){return e.filter(n=>n.length>0).map(n=>`M ${n.map(i=>`${i.x*t.width} ${i.y*t.height}`).join(" L ")} Z`).join(" ")}function Rw(e,t){let n=1/0,i=1/0,o=-1/0,r=-1/0;for(const c of e)for(const u of c){const p=u.x*t.width,x=u.y*t.height;p<n&&(n=p),p>o&&(o=p),x<i&&(i=x),x>r&&(r=x)}const l=o-n,d=r-i;return!isFinite(l)||!isFinite(d)||l<=0||d<=0?null:{x:n,y:i,width:l,height:d}}function bo(e){return e.map(([t,n])=>({x:t,y:n}))}function Ya(e,t=jo){const n=[];for(let i=0;i<t;i+=1)n.push(e(i/t));return n}function kr(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const d of e)for(const c of d)c.x<t&&(t=c.x),c.x>i&&(i=c.x),c.y<n&&(n=c.y),c.y>o&&(o=c.y);const r=i-t,l=o-n;return!isFinite(r)||!isFinite(l)||r<=0||l<=0?e:e.map(d=>d.map(c=>({x:(c.x-t)/r,y:(c.y-n)/l})))}function us(e,t){switch(e){case"ellipse":return[Ya(n=>{const i=n*Math.PI*2;return{x:.5+Math.cos(i)*.5,y:.5+Math.sin(i)*.5}})];case"circle":{const n=t>=1?.5/t:.5,i=t>=1?.5:.5*t;return[Ya(o=>{const r=o*Math.PI*2;return{x:.5+Math.cos(r)*n,y:.5+Math.sin(r)*i}})]}case"triangle-up":return[bo([[.5,0],[1,1],[0,1]])];case"triangle-down":return[bo([[0,0],[1,0],[.5,1]])];case"diamond":return[bo([[.5,0],[1,.5],[.5,1],[0,.5]])];case"hourglass":return[bo([[0,0],[1,0],[.56,.5],[1,1],[0,1],[.44,.5]])];case"teardrop":return kr([Ya(n=>{const i=n*Math.PI*2,o=Math.cos(i);return{x:.5+Math.sin(i)*Math.pow(Math.sin(i/2),2)*.5,y:.5-o*.5}})]);case"leaf":{const n=Math.round(jo/2),i=[];for(let o=0;o<=n;o+=1){const r=o/n;i.push({x:.5+Math.sin(Math.PI*r)*.5,y:r})}for(let o=n;o>=0;o-=1){const r=o/n;i.push({x:.5-Math.sin(Math.PI*r)*.5,y:r})}return[i]}case"wave":{const o=jo,r=[];for(let l=0;l<=o;l+=1){const d=l/o;r.push({x:.09+Math.sin(Math.PI*2*2*d)*.09,y:d})}for(let l=o;l>=0;l-=1){const d=l/o;r.push({x:1-.09+Math.sin(Math.PI*2*2*d+Math.PI/3)*.09,y:d})}return[r]}case"rectangle":case"custom":default:return[bo([[0,0],[1,0],[1,1],[0,1]])]}}const pu={x:0,y:0,width:100,height:100};function Lw(e){const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?pu:{x:t[0],y:t[1],width:t[2],height:t[3]}}function Ar(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}const ps=16,Pw=12,Ew=16,Gr="0 0 100 100",Xr=100,qa=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,Mw=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g;function kw(e){const t=e.match(Mw);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function gn(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function ms(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function on(e){return{x:e.x,y:e.y}}function Aw(e){return{p:on(e.p),in:e.in?on(e.in):null,out:e.out?on(e.out):null}}function Pn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(Aw)}))}function ei(e,t){return e.map(n=>({closed:n.closed,nodes:n.nodes.map(i=>({p:t(i.p),in:i.in?t(i.in):null,out:i.out?t(i.out):null}))}))}function Rc(e,t,n,i=n){return ei(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function Fw(e,t,n,i,o,r,l){let d=Math.abs(t),c=Math.abs(n);if(!d||!c||e.x===l.x&&e.y===l.y)return[{c1:on(e),c2:on(l),p:on(l)}];const u=i*Math.PI/180,p=Math.cos(u),x=Math.sin(u),b=(e.x-l.x)/2,m=(e.y-l.y)/2,h=p*b+x*m,f=-x*b+p*m,v=h*h/(d*d)+f*f/(c*c);if(v>1){const ee=Math.sqrt(v);d*=ee,c*=ee}const C=o===r?-1:1,y=d*d*f*f+c*c*h*h,S=Math.max(0,d*d*c*c-y),j=y===0?0:C*Math.sqrt(S/y),N=j*d*f/c,U=-j*c*h/d,W=p*N-x*U+(e.x+l.x)/2,R=x*N+p*U+(e.y+l.y)/2,B=Math.atan2((f-U)/c,(h-N)/d);let T=Math.atan2((-f-U)/c,(-h-N)/d)-B;!r&&T>0&&(T-=Math.PI*2),r&&T<0&&(T+=Math.PI*2);const k=Math.max(1,Math.ceil(Math.abs(T)/(Math.PI/2))),E=T/k,g=4/3*Math.tan(E/4),A=(ee,P)=>({x:W+p*d*ee-x*c*P,y:R+x*d*ee+p*c*P}),F=[];let X=B;for(let ee=0;ee<k;ee+=1){const P=X+E,D=Math.cos(X),K=Math.sin(X),le=Math.cos(P),re=Math.sin(P);F.push({c1:A(D-g*K,K+g*D),c2:A(le+g*re,re-g*le),p:ee===k-1?on(l):A(le,re)}),X=P}return F}function Vo(e){const t=(e??"").trim();if(!t)return[];const n=[];let i=[],o=!1,r={x:0,y:0},l={x:0,y:0},d=null,c=null;const u=()=>{if(o&&i.length>2){const m=i[0],h=i[i.length-1];Math.abs(m.p.x-h.p.x)<1e-6&&Math.abs(m.p.y-h.p.y)<1e-6&&(m.in=h.in??m.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(m,h)=>{i.push({p:m,in:h??null,out:null}),r=m},x=m=>{i.length&&(i[i.length-1].out=m)};qa.lastIndex=0;let b=qa.exec(t);for(;b!==null;){const m=b[1],h=m.toUpperCase(),f=m!==h,v=kw(b[2]),C=y=>f?{x:r.x+v[y],y:r.y+v[y+1]}:{x:v[y],y:v[y+1]};if(h==="Z")o=!0,u(),r=on(l),d=null,c=null;else if(h==="M"){for(let y=0;y+1<v.length;y+=2){const S=C(y);y===0&&(u(),l=on(S)),p(S)}d=null,c=null}else if(h==="L"){for(let y=0;y+1<v.length;y+=2)p(C(y));d=null,c=null}else if(h==="H"){for(const y of v)p({x:f?r.x+y:y,y:r.y});d=null,c=null}else if(h==="V"){for(const y of v)p({x:r.x,y:f?r.y+y:y});d=null,c=null}else if(h==="C"){for(let y=0;y+5<v.length;y+=6){const S=C(y),j=C(y+2),N=C(y+4);x(S),p(N,j),d=j}c=null}else if(h==="S"){for(let y=0;y+3<v.length;y+=4){const S=d?ms(d,r):on(r),j=C(y),N=C(y+2);x(S),p(N,j),d=j}c=null}else if(h==="Q")for(let y=0;y+3<v.length;y+=4){const S=C(y),j=C(y+2);x(gn(r,S,2/3)),p(j,gn(j,S,2/3)),c=S,d=null}else if(h==="T")for(let y=0;y+1<v.length;y+=2){const S=c?ms(c,r):on(r),j=C(y);x(gn(r,S,2/3)),p(j,gn(j,S,2/3)),c=S,d=null}else if(h==="A")for(let y=0;y+6<v.length;y+=7){const S=f?{x:r.x+v[y+5],y:r.y+v[y+6]}:{x:v[y+5],y:v[y+6]};for(const j of Fw(r,v[y],v[y+1],v[y+2],v[y+3]!==0,v[y+4]!==0,S))x(j.c1),p(j.p,j.c2);d=null,c=null}b=qa.exec(t)}return u(),n}function Rn(e){return`${Number(e.toFixed(2))}`}function tr(e,t){return!e.out&&!t.in}function Lc(e,t){if(tr(e,t))return`L${Rn(t.p.x)},${Rn(t.p.y)}`;const n=e.out??e.p,i=t.in??t.p;return`C${Rn(n.x)},${Rn(n.y)} ${Rn(i.x)},${Rn(i.y)} ${Rn(t.p.x)},${Rn(t.p.y)}`}function Go(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${Rn(i.p.x)},${Rn(i.p.y)}`);let r=i;for(const l of o)t.push(Lc(r,l)),r=l;if(n.closed){const l=Lc(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function mu(e){const t=[];for(let n=0;n+1<e.nodes.length;n+=1)t.push({from:e.nodes[n],to:e.nodes[n+1],index:n});if(e.closed&&e.nodes.length>2){const n=e.nodes.length-1;t.push({from:e.nodes[n],to:e.nodes[0],index:n})}return t}function gs(e,t,n){if(tr(e,t))return gn(e.p,t.p,n);const i=e.out??e.p,o=t.in??t.p,r=1-n,l=r*r*r,d=3*r*r*n,c=3*r*n*n,u=n*n*n;return{x:l*e.p.x+d*i.x+c*o.x+u*t.p.x,y:l*e.p.y+d*i.y+c*o.y+u*t.p.y}}function el(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of mu(n)){if(tr(o.from,o.to)){i.push(on(o.from.p));continue}for(let r=0;r<ps;r+=1)i.push(gs(o.from,o.to,r/ps))}n.closed||i.push(on(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function wi(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of el(e))for(const l of r)l.x<t&&(t=l.x),l.x>i&&(i=l.x),l.y<n&&(n=l.y),l.y>o&&(o=l.y);return{minX:t,minY:n,maxX:i,maxY:o}}function gu(e,t,n){const i={x:(n.x-e.x)/6,y:(n.y-e.y)/6};return{in:{x:t.x-i.x,y:t.y-i.y},out:{x:t.x+i.x,y:t.y+i.y}}}function hu(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=Pw)return{closed:!0,nodes:t.map(r=>({p:on(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/Ew)),i=[];for(let r=0;r<t.length;r+=n)i.push(t[r]);const o=i.length;return{closed:!0,nodes:i.map((r,l)=>({p:on(r),...gu(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function _w(e){const t={x:0,y:0,width:Xr,height:Xr};if(!e||e.pathFit!=="viewbox"||e.pathViewBox!==Gr||!e.customPath)return t;const n=Vo(e.customPath);if(!n.length)return t;const i=wi(n),o=i.maxX-i.minX,r=i.maxY-i.minY;return!isFinite(i.minX)||!isFinite(i.minY)||!(o>0)||!(r>0)?t:{x:i.minX,y:i.minY,width:o,height:r}}function fu(e,t,n=1){if(!e.length)return!1;const i=wi(e);if(!isFinite(i.minX)||!isFinite(i.maxX))return!1;const o=Math.max(n,t.width*.5),r=Math.max(n,t.height*.5);return i.minX<t.x-o||i.minY<t.y-r||i.maxX>t.x+t.width+o||i.maxY>t.y+t.height+r}function Nw(e,t){if(!e.length)return e;const n=wi(e),i=n.maxX-n.minX,o=n.maxY-n.minY;if(!(i>0)||!(o>0)||n.minX>=t.x-1e-6&&n.minY>=t.y-1e-6&&n.maxX<=t.x+t.width+1e-6&&n.maxY<=t.y+t.height+1e-6)return e;const l=Math.min(t.width/i,t.height/o),d=t.x+(t.width-i*l)/2,c=t.y+(t.height-o*l)/2;return ei(e,u=>({x:d+(u.x-n.minX)*l,y:c+(u.y-n.minY)*l}))}function Ww(e,t=1,n){const i=_w(n),o=us(e==="custom"?"rectangle":e,t),r=Nw(ei(hu(o),l=>({x:l.x*i.width+i.x,y:l.y*i.height+i.y})),i);return{shape:e,customPath:Go(r),pathFit:"viewbox",pathViewBox:Gr}}function $r(e,t){return t>0?Math.round(e/t)*t:e}function Hw(e,t,n,i){var u;const o=(u=e[t])==null?void 0:u.nodes[n];if(!o)return e;const r=i.x-o.p.x,l=i.y-o.p.y,d=Pn(e),c=d[t].nodes[n];return c.p={x:o.p.x+r,y:o.p.y+l},c.in&&(c.in={x:c.in.x+r,y:c.in.y+l}),c.out&&(c.out={x:c.out.x+r,y:c.out.y+l}),d}function Pc(e,t,n,i){var r;if(!t.length)return e;const o=Pn(e);for(const{contour:l,node:d}of t){const c=(r=o[l])==null?void 0:r.nodes[d];c&&(c.p={x:c.p.x+n,y:c.p.y+i},c.in&&(c.in={x:c.in.x+n,y:c.in.y+i}),c.out&&(c.out={x:c.out.x+n,y:c.out.y+i}))}return o}function Dw(e,t){const n=new Map;for(const{contour:o,node:r}of t){const l=n.get(o)??[];l.push(r),n.set(o,l)}let i=e;return n.forEach((o,r)=>{const l=[...o].sort((d,c)=>c-d);for(const d of l)i=yu(i,r,d)}),i}function Ow(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const d=Pn(e),c=d[t].nodes[n];if(c[i]=on(o),r){const p=i==="in"?"out":"in";c[p]=ms(o,c.p)}return d}function Bw(e,t,n,i){var l;const o=(l=e[t])==null?void 0:l.nodes[n];if(!o||!o[i])return e;const r=Pn(e);return r[t].nodes[n][i]=null,r}function zw(e,t,n,i){const o=e[t];if(!o)return{contours:e,nodeIndex:-1};const r=o.nodes[n],l=o.nodes[(n+1)%o.nodes.length];if(!r||!l)return{contours:e,nodeIndex:-1};const d=Pn(e),c=d[t].nodes,u=n+1;if(tr(r,l))return c.splice(u,0,{p:gn(r.p,l.p,i),in:null,out:null}),{contours:d,nodeIndex:u};const p=r.out??r.p,x=l.in??l.p,b=gn(r.p,p,i),m=gn(p,x,i),h=gn(x,l.p,i),f=gn(b,m,i),v=gn(m,h,i),C=gn(f,v,i),y=(n+1)%o.nodes.length;return c[n].out=b,c[y].in=h,c.splice(u,0,{p:C,in:f,out:v}),{contours:d,nodeIndex:u}}function yu(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=Pn(e);return o[t].nodes.splice(n,1),o}function Ec(e,t,n){const i=e[t];if(!(i==null?void 0:i.nodes[n]))return e;const r=Pn(e),l=r[t].nodes[n];if(l.in||l.out)return l.in=null,l.out=null,r;const d=i.nodes.length,c=i.nodes[(n-1+d)%d].p,u=i.nodes[(n+1)%d].p,p=gu(c,l.p,u);return l.in=p.in,l.out=p.out,r}function jw(e,t,n){const i=n.x-t.x,o=n.y-t.y,r=i*i+o*o,l=r===0?0:Math.max(0,Math.min(1,((e.x-t.x)*i+(e.y-t.y)*o)/r)),d={x:t.x+i*l,y:t.y+o*l};return{t:l,distance:Math.hypot(e.x-d.x,e.y-d.y)}}function Vw(e,t){let n=null;return e.forEach((i,o)=>{for(const r of mu(i)){const l=tr(r.from,r.to)?1:ps;for(let d=0;d<l;d+=1){const c=d/l,u=(d+1)/l,p=jw(t,gs(r.from,r.to,c),gs(r.from,r.to,u));(!n||p.distance<n.distance)&&(n={contour:o,segment:r.index,t:c+(u-c)*p.t,distance:p.distance})}}}),n}function Gw(e,t){const n=[];return e.forEach((i,o)=>{i.nodes.forEach((r,l)=>{o===t.contour&&l===t.node||n.push(r.p)})}),n}function Mc(e,t,n,i,o){const r=i(t);let l=null,d=o;for(const c of e){const u=i(c),p=Math.abs(u[n]-r[n]);p<=d&&(d=p,l={value:c[n],from:c})}return l}const kc=Math.PI/4,Xw=8,Yw=Math.PI/18,qw=8,zi=24,Eo=[];function Uw(e,t){return e.length===t.length&&e.every((n,i)=>n.kind===t[i].kind&&n.a.x===t[i].a.x&&n.a.y===t[i].a.y&&n.b.x===t[i].b.x&&n.b.y===t[i].b.y)}function Kw(e){const t=Math.PI*2;return((e+Math.PI)%t+t)%t-Math.PI}function hs(e,t){const n=t.x-e.x,i=t.y-e.y,o=Math.hypot(n,i);return o<1e-6?null:{x:n/o,y:i/o}}function Ac(e,t){const n=hs(e,t);return n?{kind:"align",a:{x:e.x-n.x*zi,y:e.y-n.y*zi},b:{x:t.x+n.x*zi,y:t.y+n.y*zi}}:{kind:"align",a:e,b:t}}function Zw(e,t,n,i){const o=[],r=i(e);return t&&e.x===t.value&&o.push(Ac(r,i(t.from))),n&&e.y===n.value&&o.push(Ac(r,i(n.from))),o}function Jw(e,t,n,i){const o=e==null?void 0:e.nodes[t];if(!e||!o)return null;const r=i(o.p),l=n==="in"?o.out:o.in;if(l)return hs(i(l),r);const d=e.nodes.length,c=t+(n==="in"?1:-1);if(!e.closed&&(c<0||c>=d))return null;const u=e.nodes[(c+d)%d];if(!u)return null;const p=(n==="in"?u.in:u.out)??u.p;return hs(i(p),r)}function Qw(e,t,n,i,o,r,l){const d=r(t),c=r(e),u=c.x-d.x,p=c.y-d.y,x=Math.hypot(u,p);if(x<1e-6)return{point:e,guides:Eo};const b=Math.atan2(p,u),m=Math.round(b/kc)*kc;let h=o?m:null,f=!1;if(!o){const U=[];n&&U.push({angle:Math.atan2(n.y,n.x),smooth:!0}),U.push({angle:m,smooth:!1});for(const W of U){const R=Kw(W.angle-b);if(!(Math.abs(R)>Yw)&&!(Math.abs(Math.sin(R))*x>Xw)){h=W.angle,f=W.smooth;break}}}const v=i!==null&&i>0&&Math.abs(x-i)<=qw;if(h===null&&!v)return{point:e,guides:Eo};const C=h??b,y=v?i:x,S={x:Math.cos(C),y:Math.sin(C)},j=y+(h===null?0:zi),N=v?y:f?zi:0;return{point:l({x:d.x+S.x*y,y:d.y+S.y*y}),guides:[{kind:"angle",a:{x:d.x-S.x*N,y:d.y-S.y*N},b:{x:d.x+S.x*j,y:d.y+S.y*j}}]}}function Fc(e,t="stretch",n=pu){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=Vo(i),d=el(l);if(d.length)return t==="viewbox"?Ar(d,n):kr(d);if(typeof document>"u")return null;const c=i.split(/(?=[Mm])/).map(x=>x.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const x of c){const b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("d",x),u.appendChild(b);let m=0;try{m=b.getTotalLength()}catch{m=0}if(!m)continue;const h=[];for(let f=0;f<jo;f+=1){const v=b.getPointAtLength(f/jo*m);h.push({x:v.x,y:v.y})}p.push(h)}return p.length?t==="viewbox"?Ar(p,n):kr(p):null}const o=i.split(/[\s,]+/).map(Number).filter(l=>!Number.isNaN(l));if(o.length<6)return null;const r=[];for(let l=0;l+1<o.length;l+=2)r.push({x:o[l],y:o[l+1]});return t==="viewbox"?Ar([r],n):kr([r])}function eS(e,t){const n=[];for(const o of e)for(let r=0;r<o.length;r+=1){const l=o[r],d=o[(r+1)%o.length];(l.y<=t&&d.y>t||d.y<=t&&l.y>t)&&n.push(l.x+(t-l.y)/(d.y-l.y)*(d.x-l.x))}n.sort((o,r)=>o-r);const i=[];for(let o=0;o+1<n.length;o+=2){const r=Vr(n[o]),l=Vr(n[o+1]);l>r&&i.push({x0:r,x1:l})}return tS(i)}function tS(e){if(e.length<2)return e;const t=[...e].sort((i,o)=>i.x0-o.x0),n=[t[0]];for(let i=1;i<t.length;i+=1){const o=n[n.length-1],r=t[i];r.x0<=o.x1?o.x1=Math.max(o.x1,r.x1):n.push({...r})}return n}function nS(e,t){const n=[];let i=0,o=0;for(;i<e.length&&o<t.length;){const r=Math.max(e[i].x0,t[o].x0),l=Math.min(e[i].x1,t[o].x1);l>r&&n.push({x0:r,x1:l}),e[i].x1<t[o].x1?i+=1:o+=1}return n}function iS(e){const t=[];let n=0;for(const i of e)i.x0>n&&t.push({x0:n,x1:i.x0}),n=Math.max(n,i.x1);return n<1&&t.push({x0:n,x1:1}),t}function oS(e,t){const n=[];for(const i of e){if(t.x1<=i.x0||t.x0>=i.x1){n.push(i);continue}t.x0>i.x0&&n.push({x0:i.x0,x1:t.x0}),t.x1<i.x1&&n.push({x0:t.x1,x1:i.x1})}return n}function rS(e,t,n,i){let o=null;for(let r=0;r<Ic;r+=1){const l=Vr(t+(n-t)*r/Math.max(1,Ic-1)),d=eS(e,l),c=i==="avoid"?iS(d):d;if(o=o===null?c:nS(o,c),o.length===0)return[]}return o??[]}function xu(e){return!!e&&typeof e=="object"&&e.type==="link"}function aS(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,d)=>{for(const c of r){if(xu(c)){o(c.children??[],c.value,c.target);continue}const u=c,p=(u==null?void 0:u.text)??"";if(p.trim())for(const x of p.split(/\s+/))x&&t.push({text:x,leaf:u,href:l,target:d,para:i})}};o((n==null?void 0:n.children)??[])}),t}function _c(e){return{...e.fontFamily&&{fontFamily:uo(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"}}}function sS(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(xu(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function Nc(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:d,height:c,allowOverflow:u,capInset:p,capLines:x}=e,b=e.lineHeight*l,m=e.spaceWidth*l,h=[];if(!t.length||d<=0||b<=0)return{segments:h,placed:0,height:0,capLeft:0,capTop:0};const f=Math.max(1,m*.5),v=b*bw;let C=0,y=0,S=0,j=t[0].para,N=0,U=0,W=null;for(;C<t.length&&S<Sw;){const R=y+b>c;if(R&&!u)break;const B=t[C].para;if(B>j+1){y+=b*(B-j-1),j=B-1,S+=1;continue}let $=R?[{x0:0,x1:d}]:rS(i,(y+v)/c,(y+b-v)/c,o).map(k=>({x0:k.x0*d,x1:k.x1*d}));p>0&&x>0&&!R&&$.length&&(W===null&&(W=S,N=$[0].x0,U=y),S-W<x&&($=oS($,{x0:N,x1:N+p})));const T=$.reduce((k,E)=>Math.max(k,E.x1-E.x0),0);for(const k of $){const E=k.x1-k.x0;if(E<f)continue;if(C>=t.length||t[C].para!==B)break;const g=C;let A=0;for(;C<t.length&&t[C].para===B;){const F=n[C]*l,X=C===g?F:m+F;if(A+X>E&&!(C===g&&E>=T-.5&&F>d-.5))break;A+=X,C+=1}if(C>g){const F=C>=t.length||t[C].para!==B;h.push({top:y,left:k.x0,width:E,from:g,to:C,justify:r==="justify"&&!F})}if(C>=t.length||t[C].para!==B)break}j=B,y+=b,S+=1}return{segments:h,placed:C,height:h.length?y:0,capLeft:N,capTop:U}}function lS(e){return`
23600
23604
  .${e}-wrapper {
23601
23605
  box-sizing: border-box;
23602
23606
  display: flex;
@@ -23762,6 +23766,16 @@ export function Helix({
23762
23766
  .${e}-editor-scale-grab-nesw {
23763
23767
  cursor: nesw-resize;
23764
23768
  }
23769
+ /* Snap feedback. Deliberately not the editor's orange: a guide has to be
23770
+ readable *through* the outline and handles it is drawn across. */
23771
+ .${e}-editor-snap {
23772
+ stroke: #00B2FF;
23773
+ stroke-width: 1;
23774
+ pointer-events: none;
23775
+ }
23776
+ .${e}-editor-snap-angle {
23777
+ stroke-dasharray: 4 3;
23778
+ }
23765
23779
  .${e}-editor-handle-line {
23766
23780
  stroke: #FF5C02;
23767
23781
  stroke-width: 1;
@@ -23809,7 +23823,7 @@ export function Helix({
23809
23823
  clip-path: inset(50%);
23810
23824
  white-space: nowrap;
23811
23825
  }
23812
- `}const bo=7,Zw=3.5,wo=9,Jn=8,Qn=14,kc=10,Jw=24,Ac=14,Qw=1,eS=.05,Vr=1.08;function Gr(e,t){switch(t){case"nw":return{x:e.minX,y:e.minY};case"ne":return{x:e.maxX,y:e.minY};case"se":return{x:e.maxX,y:e.maxY};case"sw":return{x:e.minX,y:e.maxY}}}function hu(e){switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}}function ps(e,t){const n=Gr(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*kc,y:n.y+o*kc}}const ms=.1,gs=8,tS=4;function hs(e,t){return!(t.width>0)||!(t.height>0)||!(e.width>0)||!(e.height>0)?1:Math.max(e.width/t.width,e.height/t.height)}function Si(e,t,n){const i=hs(e,t)*n;return{width:t.width*i,height:t.height*i}}function Ln(e,t,n){return(e-t)*n}function zi(e,t,n){const i=e-t;return Math.abs(i)<tS?.5:Br(n/i)}function nS(e,t,n,i,o,r){const l=Si(e,n,r),d=e.x+Ln(e.width,l.width,i),c=e.y+Ln(e.height,l.height,o),u=hs(e,n),p=hs(t,n),v=Math.min(gs,Math.max(ms,p>0?r*(u/p):r)),w=Si(t,n,v);return{focalX:zi(t.width,w.width,d-t.x),focalY:zi(t.height,w.height,c-t.y),scale:v}}function iS({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,stage:l,onStageChange:d,onSelectionChange:c,onChange:u,onCommit:p}){const v=s.useRef(null),w=s.useRef(null),m=s.useRef(i);m.current=i;const h=s.useRef(null),f=s.useRef(null),x=s.useRef(null),C=s.useRef(null),[y,S]=s.useState([]),z=l==="shape";s.useEffect(()=>{var b;z&&((b=v.current)==null||b.focus({preventScroll:!0}))},[z]),s.useEffect(()=>{z||S(b=>b.length?[]:b)},[z]);const N=y.length>0;s.useEffect(()=>{c==null||c(N)},[N,c]),s.useEffect(()=>()=>c==null?void 0:c(!1),[c]);const Y=n.width>0?t.width/n.width:1,B=n.height>0?t.height/n.height:1,T=s.useCallback(b=>r?{x:(b.x-n.x)*Y,y:(b.y-n.y)*B}:{x:b.x-n.x,y:b.y-n.y},[r,n,Y,B]),H=s.useCallback((b,E)=>{var me;const j=(me=v.current)==null?void 0:me.getBoundingClientRect();return!j||j.width<=0||j.height<=0?{x:0,y:0}:r?{x:n.x+(b-j.left)/j.width*n.width,y:n.y+(E-j.top)/j.height*n.height}:{x:n.x+(b-j.left),y:n.y+(E-j.top)}},[r,n]),$=s.useCallback((b,E)=>{var me;const j=(me=v.current)==null?void 0:me.getBoundingClientRect();return!j||j.width<=0||j.height<=0?{x:0,y:0}:{x:(b-j.left)/j.width*t.width,y:(E-j.top)/j.height*t.height}},[t.width,t.height]),I=s.useCallback((b,E)=>{p(b,E)},[p]),P=b=>{const E=x.current;if(E&&b.pointerId===E.pointerId){if(b.stopPropagation(),b.preventDefault(),E.startDistance<=0)return;const be=H(b.clientX,b.clientY),Re=Math.hypot(be.x-E.origin.x,be.y-E.origin.y),ue=Math.max(eS,Re/E.startDistance);if(!E.moved&&Math.abs(ue-1)<1e-4)return;E.moved=!0,u(Cc(E.startContours,E.origin,ue));return}const j=f.current;if(j&&b.pointerId===j.pointerId){b.stopPropagation(),b.preventDefault();const be=H(b.clientX,b.clientY),{bbox:Re}=j,ue=Re.maxX-Re.minX,fe=Re.maxY-Re.minY,$e=be.x-j.origin.x,Q=be.y-j.origin.y;let Z=$e,ae=Q;if(isFinite(ue)&&isFinite(fe))if(r){const xe=Math.min(n.x,n.x+n.width-ue),ke=Math.max(n.x,n.x+n.width-ue),Ce=Math.min(n.y,n.y+n.height-fe),q=Math.max(n.y,n.y+n.height-fe),ye=Math.min(ke,Math.max(xe,Re.minX+$e)),ce=Math.min(q,Math.max(Ce,Re.minY+Q));Z=ye-Re.minX,ae=ce-Re.minY}else{const xe=Re.minX-n.x,ke=Re.minY-n.y,Ce=Math.min(0,t.width-ue),q=Math.max(0,t.width-ue),ye=Math.min(0,t.height-fe),ce=Math.max(0,t.height-fe),U=Math.min(q,Math.max(Ce,xe+$e)),de=Math.min(ce,Math.max(ye,ke+Q));Z=U-xe,ae=de-ke}if(!j.moved&&Z===0&&ae===0)return;j.moved=!0,u(ei(j.startContours,xe=>({x:xe.x+Z,y:xe.y+ae})),{carryImage:!0});return}const me=C.current;if(me&&b.pointerId===me.pointerId){b.stopPropagation(),b.preventDefault();const be=H(b.clientX,b.clientY);let Re=be.x-me.origin.x,ue=be.y-me.origin.y;if(b.shiftKey&&(Math.abs(Re)>Math.abs(ue)?ue=0:Re=0),!me.moved&&Re===0&&ue===0)return;me.moved=!0,u(Ic(me.startContours,me.selection,Re,ue));return}const K=h.current;if(!K||b.pointerId!==K.pointerId)return;b.stopPropagation(),b.preventDefault();const te=H(b.clientX,b.clientY),O=K.snapEligible?Bw(m.current,{contour:K.contour,node:K.node}):[],J=K.snapEligible?Lc(O,te,"x",T,Ac):null,ne=K.snapEligible?Lc(O,te,"y",T,Ac):null,Pe={x:J??Tc(te.x,o),y:ne??Tc(te.y,o)};if(K.kind==="anchor"){let be=Pe.x-K.origin.x,Re=Pe.y-K.origin.y;if(b.shiftKey&&(Math.abs(be)>Math.abs(Re)?Re=0:be=0),!K.moved&&be===0&&Re===0)return;K.moved=!0,u(Fw(m.current,K.contour,K.node,{x:K.anchor.x+be,y:K.anchor.y+Re}));return}K.moved=!0,u(Nw(m.current,K.contour,K.node,K.kind,Pe,K.mirror&&!b.altKey))},M=b=>{const E=x.current;if(E&&b.pointerId===E.pointerId){x.current=null,b.stopPropagation();const O=v.current;O!=null&&O.hasPointerCapture(E.pointerId)&&O.releasePointerCapture(E.pointerId),E.moved&&I(m.current,{preserveShape:!0});return}const j=f.current;if(j&&b.pointerId===j.pointerId){f.current=null,b.stopPropagation();const O=v.current;O!=null&&O.hasPointerCapture(j.pointerId)&&O.releasePointerCapture(j.pointerId),j.moved?I(m.current,{preserveShape:!0}):S([]);return}const me=C.current;if(me&&b.pointerId===me.pointerId){C.current=null,b.stopPropagation();const O=v.current;O!=null&&O.hasPointerCapture(me.pointerId)&&O.releasePointerCapture(me.pointerId),me.moved&&I(m.current);return}const K=h.current;if(!K||b.pointerId!==K.pointerId)return;h.current=null,b.stopPropagation();const te=v.current;te!=null&&te.hasPointerCapture(K.pointerId)&&te.releasePointerCapture(K.pointerId),K.moved&&I(m.current)},g=b=>{b.stopPropagation()},D=b=>{var E,j;b.stopPropagation(),b.preventDefault(),(E=v.current)==null||E.focus({preventScroll:!0}),f.current={pointerId:b.pointerId,origin:H(b.clientX,b.clientY),startContours:Pn(i),bbox:wi(i),moved:!1},(j=v.current)==null||j.setPointerCapture(b.pointerId)},A=(b,E)=>{var O,J;b.stopPropagation(),b.preventDefault(),(O=v.current)==null||O.focus({preventScroll:!0}),S([]),d("shape");const j=wi(i),me=Gr(j,hu(E)),K=ps(j,E),te=Math.hypot(K.x-me.x,K.y-me.y);!isFinite(te)||te<=0||(x.current={pointerId:b.pointerId,corner:E,origin:me,startDistance:te,startContours:Pn(i),moved:!1},(J=v.current)==null||J.setPointerCapture(b.pointerId))},X=(b,E,j,me)=>{var te,O,J,ne;b.stopPropagation(),b.preventDefault(),(te=v.current)==null||te.focus({preventScroll:!0});const K=(O=i[j])==null?void 0:O.nodes[me];if(K){if(b.altKey){const Pe=E==="anchor"?pu(i,j,me):Ww(i,j,me,E);if(Pe===i)return;S(E==="anchor"?[]:[{contour:j,node:me}]),u(Pe),I(Pe);return}if(b.metaKey||b.ctrlKey){const Pe=Rc(i,j,me);if(Pe===i)return;S([{contour:j,node:me}]),u(Pe),I(Pe);return}if(E==="anchor"&&b.shiftKey){S(Pe=>Pe.some(be=>be.contour===j&&be.node===me)?Pe.filter(be=>!(be.contour===j&&be.node===me)):[...Pe,{contour:j,node:me}]);return}if(E==="anchor"&&y.length>1&&y.some(Pe=>Pe.contour===j&&Pe.node===me)){C.current={pointerId:b.pointerId,origin:H(b.clientX,b.clientY),startContours:Pn(i),selection:y,moved:!1},(J=v.current)==null||J.setPointerCapture(b.pointerId);return}S([{contour:j,node:me}]),h.current={kind:E,contour:j,node:me,pointerId:b.pointerId,origin:H(b.clientX,b.clientY),anchor:K.p,mirror:E!=="anchor"&&!!(K.in&&K.out),snapEligible:E==="anchor"&&mu(K),moved:!1},(ne=v.current)==null||ne.setPointerCapture(b.pointerId)}},ie=b=>{b.stopPropagation(),b.preventDefault();const E=ei(i,T),j=Ow(E,$(b.clientX,b.clientY));if(!j||j.distance>Jw)return;const{contours:me,nodeIndex:K}=Hw(i,j.contour,j.segment,j.t);K<0||(S([{contour:j.contour,node:K}]),u(me),I(me))},L=b=>{if(b.key==="="||b.key==="+"||b.key==="-"||b.key==="_"){b.preventDefault(),b.stopPropagation();const te=wi(i);if(!isFinite(te.minX)||!isFinite(te.maxX))return;const O={x:(te.minX+te.maxX)/2,y:(te.minY+te.maxY)/2},ne=b.key==="="||b.key==="+"?Vr:1/Vr,Pe=Cc(i,O,ne);u(Pe),I(Pe,{preserveShape:!0});return}if(b.key==="Escape"){b.stopPropagation(),S([]),d("none");return}if(!y.length)return;if(b.key==="Backspace"||b.key==="Delete"){b.preventDefault(),b.stopPropagation();const te=_w(i,y);if(te===i)return;S([]),u(te),I(te);return}const E=o>0?o:Qw,j=b.shiftKey?E*10:E,me={ArrowLeft:[-j,0],ArrowRight:[j,0],ArrowUp:[0,-j],ArrowDown:[0,j]}[b.key];if(!me)return;b.preventDefault(),b.stopPropagation();const K=Ic(i,y,me[0],me[1]);u(K),I(K)},_=s.useMemo(()=>jo(ei(i,T)),[i,T]),V=s.useMemo(()=>wi(i),[i]),se=T({x:V.minX,y:V.minY}),re={width:T({x:V.maxX,y:V.minY}).x-se.x,height:T({x:V.minX,y:V.maxY}).y-se.y},k=z&&y.length===0&&isFinite(V.minX)&&isFinite(V.maxX)&&V.maxX>V.minX&&V.maxY>V.minY,le=y.length>0||z,G=le;return a.jsxs("svg",{ref:v,className:`${e}-editor${le?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:L,onPointerDown:()=>{var b;return(b=v.current)==null?void 0:b.focus({preventScroll:!0})},onPointerMove:P,onPointerUp:M,onPointerCancel:M,onLostPointerCapture:M,"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{S([]),d("none")},onClick:ie}),G&&a.jsx("path",{className:`${e}-editor-hit`,d:_,onClick:ie}),G&&a.jsx("path",{className:`${e}-editor-outline`,d:_}),a.jsx("path",{ref:w,className:`${e}-editor-body`,d:_,fillRule:"evenodd",onPointerDown:D,onClick:ie}),G&&i.map((b,E)=>b.nodes.map((j,me)=>{const K=y.some(O=>O.contour===E&&O.node===me),te=T(j.p);return a.jsxs("g",{children:[K&&y.length===1&&["in","out"].map(O=>{const J=j[O];if(!J)return null;const ne=T(J);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:te.x,y1:te.y,x2:ne.x,y2:ne.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:ne.x,cy:ne.y,r:Zw}),a.jsx("circle",{className:`${e}-editor-grab`,cx:ne.x,cy:ne.y,r:wo,onPointerDown:Pe=>X(Pe,O,E,me),onClick:g})]},O)}),a.jsx("rect",{className:`${e}-editor-anchor${K?` ${e}-editor-anchor-selected`:""}`,x:te.x-bo/2,y:te.y-bo/2,width:bo,height:bo,rx:j.in||j.out?bo/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:te.x-wo,y:te.y-wo,width:wo*2,height:wo*2,onPointerDown:O=>X(O,"anchor",E,me),onClick:g,onDoubleClick:O=>{O.stopPropagation(),O.preventDefault();const J=Rc(i,E,me);u(J),I(J)}})]},`${E}-${me}`)})),k&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:se.x,y:se.y,width:re.width,height:re.height}),["nw","ne","se","sw"].map(b=>{const E=T(ps(V,b)),j=b==="ne"||b==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:E.x-Jn/2,y:E.y-Jn/2,width:Jn,height:Jn}),a.jsx("rect",{className:`${e}-editor-scale-grab${j?` ${e}-editor-scale-grab-nesw`:""}`,x:E.x-Qn/2,y:E.y-Qn/2,width:Qn,height:Qn,onPointerDown:me=>A(me,b),onClick:g})]},b)})]})]})}function oS({P:e,box:t,bounds:n,natural:i,imageUrl:o,maskPath:r,stage:l,onStageChange:d,focalX:c,focalY:u,scale:p,onChange:v,onCommit:w}){const m=s.useRef(null),h=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,f=s.useRef(null),x=s.useRef(null),C=s.useRef({focalX:c,focalY:u,scale:p});C.current={focalX:c,focalY:u,scale:p};const y=l==="image";s.useEffect(()=>{var M;y&&((M=m.current)==null||M.focus({preventScroll:!0}))},[y]);const S=s.useCallback((M,g)=>{var A;const D=(A=m.current)==null?void 0:A.getBoundingClientRect();return!D||D.width<=0||D.height<=0?{x:0,y:0}:{x:(M-D.left)/D.width*t.width,y:(g-D.top)/D.height*t.height}},[t.width,t.height]),z=M=>{var D,A;if(!i)return;M.stopPropagation(),M.preventDefault(),(D=m.current)==null||D.focus({preventScroll:!0});const g=Si(n,i,p);f.current={pointerId:M.pointerId,origin:S(M.clientX,M.clientY),startX:Ln(n.width,g.width,c),startY:Ln(n.height,g.height,u),width:g.width,height:g.height,moved:!1},(A=m.current)==null||A.setPointerCapture(M.pointerId)},N=(M,g)=>{var se,re;if(!i)return;M.stopPropagation(),M.preventDefault(),(se=m.current)==null||se.focus({preventScroll:!0});const D=Si(n,i,p),A=Ln(n.width,D.width,c),X=Ln(n.height,D.height,u),ie={minX:A,minY:X,maxX:A+D.width,maxY:X+D.height},L=Gr(ie,hu(g)),_=Gr(ie,g),V=Math.hypot(_.x-L.x,_.y-L.y);!isFinite(V)||V<=0||(x.current={pointerId:M.pointerId,anchor:L,startDistance:V,startScale:p,startX:A,startY:X,moved:!1},(re=m.current)==null||re.setPointerCapture(M.pointerId))},Y=M=>{if(!i)return;const g=x.current;if(g&&M.pointerId===g.pointerId){M.stopPropagation(),M.preventDefault();const A=S(M.clientX,M.clientY),X={x:A.x-n.x,y:A.y-n.y},ie=Math.hypot(X.x-g.anchor.x,X.y-g.anchor.y),L=Math.min(gs,Math.max(ms,g.startScale*(ie/g.startDistance)));if(!g.moved&&Math.abs(L-g.startScale)<1e-4)return;g.moved=!0;const _=L/g.startScale,V=g.anchor.x+(g.startX-g.anchor.x)*_,se=g.anchor.y+(g.startY-g.anchor.y)*_,re=Si(n,i,L);v({focalX:zi(n.width,re.width,V),focalY:zi(n.height,re.height,se),scale:L});return}const D=f.current;if(D&&M.pointerId===D.pointerId){M.stopPropagation(),M.preventDefault();const A=S(M.clientX,M.clientY),X=A.x-D.origin.x,ie=A.y-D.origin.y;if(!D.moved&&X===0&&ie===0)return;D.moved=!0,v({focalX:zi(n.width,D.width,D.startX+X),focalY:zi(n.height,D.height,D.startY+ie),scale:p})}},B=M=>{var A,X;const g=f.current;if(g&&M.pointerId===g.pointerId){f.current=null,M.stopPropagation(),(A=m.current)!=null&&A.hasPointerCapture(g.pointerId)&&m.current.releasePointerCapture(g.pointerId),g.moved&&w(C.current);return}const D=x.current;D&&M.pointerId===D.pointerId&&(x.current=null,M.stopPropagation(),(X=m.current)!=null&&X.hasPointerCapture(D.pointerId)&&m.current.releasePointerCapture(D.pointerId),D.moved&&w(C.current))},T=M=>{if(M.key==="Escape"){M.stopPropagation(),d("none");return}if(M.key==="="||M.key==="+"||M.key==="-"||M.key==="_"){M.preventDefault(),M.stopPropagation();const g=M.key==="="||M.key==="+",D=Math.min(gs,Math.max(ms,p*(g?Vr:1/Vr))),A={focalX:c,focalY:u,scale:D};v(A),w(A)}},H=["nw","ne","se","sw"],$={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},I=s.useMemo(()=>{const M=i??{width:n.width,height:n.height},g=Si(n,M,p);return!(g.width>0)||!(g.height>0)?null:{x:n.x+Ln(n.width,g.width,c),y:n.y+Ln(n.height,g.height,u),width:g.width,height:g.height}},[i,n.x,n.y,n.width,n.height,c,u,p]),P=I?{minX:I.x,minY:I.y,maxX:I.x+I.width,maxY:I.y+I.height}:$;return a.jsxs("svg",{ref:m,className:`${e}-editor${y?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:T,onPointerMove:Y,onPointerUp:B,onPointerCancel:B,onLostPointerCapture:B,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>d("none")}),y&&o&&I&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:h,maskUnits:"userSpaceOnUse",x:I.x,y:I.y,width:I.width,height:I.height,children:[a.jsx("rect",{x:I.x,y:I.y,width:I.width,height:I.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:I.x,y:I.y,width:I.width,height:I.height,preserveAspectRatio:"none",mask:`url(#${h})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:I.x,y:I.y,width:I.width,height:I.height})]}),y&&a.jsxs(a.Fragment,{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:n.x,y:n.y,width:n.width,height:n.height}),a.jsx("rect",{className:`${e}-editor-body`,x:n.x,y:n.y,width:n.width,height:n.height,onPointerDown:z}),H.map(M=>{const g=ps(P,M),D=M==="ne"||M==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:g.x-Jn/2,y:g.y-Jn/2,width:Jn,height:Jn}),a.jsx("rect",{className:`${e}-editor-scale-grab${D?` ${e}-editor-scale-grab-nesw`:""}`,x:g.x-Qn/2,y:g.y-Qn/2,width:Qn,height:Qn,onPointerDown:A=>N(A,M)})]},M)})]})]})}function rS(e){const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}}function aS(e,t){return Math.abs(e.top-t.top)<.5&&Math.abs(e.left-t.left)<.5&&Math.abs(e.width-t.width)<.5&&Math.abs(e.height-t.height)<.5}function sS(e,t){const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e||!t){i(null);return}let o=0,r=null;const l=()=>{const d=rS(e);(!r||!aS(r,d))&&(r=d,i(d)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n}function lS(){return typeof document>"u"?null:document.body}function cS({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:d,allowOverflow:c,fitEnabled:u,scale:p,onFitScale:v,dropCapLines:w,dropCapSize:m,showGuides:h,typography:f,imageUrl:x,imageFocalX:C,imageFocalY:y,imageScale:S,imageCustomPath:z,pathDragActive:N,pathCarryImage:Y,onCarryImageConsumed:B,pathEditor:T,imageEditor:H}){var _e,Ze;const $=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[I,P]=s.useState(null),M=s.useRef(null),[g,D]=s.useState({width:0,height:0}),[A,X]=s.useState(null),[ie,L]=s.useState(0),[_,V]=s.useState("none");s.useEffect(()=>{!T&&!H&&V("none")},[T,H]);const[se,re]=s.useState(null);s.useEffect(()=>{if(!x||typeof Image>"u"){re(null);return}let we=!1;const Te=new Image;return Te.onload=()=>{we||re({width:Te.naturalWidth,height:Te.naturalHeight})},Te.src=x,()=>{we=!0}},[x]);const k=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),le=s.useMemo(()=>Yw(k),[k]),G=s.useMemo(()=>Uw(k),[k]),b=w>0?((Ze=(_e=le[0])==null?void 0:_e.text)==null?void 0:Ze.charAt(0))??"":"",E=g.height>0?g.width/g.height:1,j=(T==null?void 0:T.contours)??null,me=s.useMemo(()=>{if(j){const Xe=Ks(j);if(Xe.length)return Er(Xe,r)}const we=i.trim(),Te=we?Pc(we,o,r):null;return Te&&Te.length?Te:ls(n==="custom"?"rectangle":n,E)},[j,n,i,o,r,Math.round(E*100)/100]),K=T==null?void 0:T.onConvert,te=(T==null?void 0:T.needsConversion)??!1,O=s.useMemo(()=>{const we=j??(i.trim()?zo(i):null);return!!(we&&uu(we,r))},[j,i,r]),[J,ne]=s.useState(null);wr(()=>{if(!O){J&&ne(null);return}!J&&g.width>0&&g.height>0&&ne({width:g.width,height:g.height})},[O,g.width,g.height,J]);const Pe=s.useMemo(()=>{if(!O||g.width<=0||g.height<=0)return me;const we=J??g,Te=r.width/we.width,Xe=r.height/we.height;return me.map(ze=>ze.map(Ie=>({x:Ie.x*Te,y:Ie.y*Xe})))},[me,O,J,r.width,r.height,g.width,g.height]),be=s.useMemo(()=>{const we=z.trim(),Te=we?Pc(we,o,r):null;return Te&&Te.length?Te:ls(n==="custom"?"rectangle":n,E)},[n,z,o,r,Math.round(E*100)/100]),Re=s.useMemo(()=>{if(!O||g.width<=0||g.height<=0)return be;const we=J??g,Te=r.width/we.width,Xe=r.height/we.height;return be.map(ze=>ze.map(Ie=>({x:Ie.x*Te,y:Ie.y*Xe})))},[be,O,J,r.width,r.height,g.width,g.height]),ue=s.useRef(null);s.useEffect(()=>{if(!(!K||g.width<=0||g.height<=0)){if(O){if(ue.current===i)return;const we=j??(i.trim()?zo(i):null);if(!(we!=null&&we.length))return;const Te=ei(we,Xe=>({x:r.x+(Xe.x-r.x)/g.width*r.width,y:r.y+(Xe.y-r.y)/g.height*r.height}));ue.current=jo(Te),K(Te);return}!te||!me.length||K(ei(du(me),we=>({x:we.x*jr,y:we.y*jr})))}},[te,O,K,me,j,i,r,g.width,g.height]),wr(()=>{const we=I;if(!we||typeof ResizeObserver>"u")return;const Te=()=>{const ze=we.getBoundingClientRect();D(Ie=>Math.abs(Ie.width-ze.width)<.5&&Math.abs(Ie.height-ze.height)<.5?Ie:{width:ze.width,height:ze.height})};Te();const Xe=new ResizeObserver(Te);return Xe.observe(we),()=>Xe.disconnect()},[I]),s.useEffect(()=>{const we=typeof document<"u"?document.fonts:void 0;we!=null&&we.ready&&we.ready.then(()=>{L(Te=>Te+1)})},[]),wr(()=>{const we=M.current;if(!we)return;if(!le.length){X(null);return}const Te=[],Xe=document.createDocumentFragment();for(const zt of le){const ft=document.createElement("span");Object.assign(ft.style,Ec(zt.leaf)),ft.textContent=zt.text,Xe.appendChild(ft),Te.push(ft)}const ze=document.createElement("span");ze.textContent=" ",Xe.appendChild(ze);const Ie=document.createElement("span");Ie.textContent=b||"H",Ie.style.lineHeight="1",Xe.appendChild(Ie),we.replaceChildren(Xe);const Ve=window.getComputedStyle(we),De=parseFloat(Ve.fontSize)||16,tt=parseFloat(Ve.lineHeight),nt=Number.isNaN(tt)?De*1.2:tt;Ie.style.fontSize=`${nt*m}px`;const st=Te.map(zt=>zt.getBoundingClientRect().width),St=ze.getBoundingClientRect().width,Bt=b?Ie.getBoundingClientRect().width:0;we.replaceChildren(),X({widths:st,spaceWidth:St,lineHeight:nt,capWidth:Bt})},[le,f,b,w,m,ie,g.width]);const fe=A&&b?A.capWidth+A.lineHeight*xw:0,$e=Math.max(w,Math.ceil(m)),Q=s.useMemo(()=>{if(!A||!le.length||g.width<=0||g.height<=0||!u)return 1;const we=ze=>Mc({tokens:le,widths:A.widths,spaceWidth:A.spaceWidth,lineHeight:A.lineHeight,width:g.width,height:g.height,rings:Pe,mode:l,align:d,scale:ze,allowOverflow:!1,capInset:fe*ze,capLines:b?$e:0});if(we(1).placed>=le.length)return 1;if(we(ja).placed<le.length)return ja;let Te=ja,Xe=1;for(let ze=0;ze<yw;ze+=1){const Ie=(Te+Xe)/2;we(Ie).placed>=le.length?Te=Ie:Xe=Ie}return Te},[A,le,g.width,g.height,Pe,l,d,u,fe,b,$e]);s.useEffect(()=>{v(Q)},[Q,v]);const Z=u?Math.min(p,Q):1,ae=s.useMemo(()=>!A||!le.length||g.width<=0||g.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0}:Mc({tokens:le,widths:A.widths,spaceWidth:A.spaceWidth,lineHeight:A.lineHeight,width:g.width,height:g.height,rings:Pe,mode:l,align:d,scale:Z,allowOverflow:c,capInset:fe*Z,capLines:b?$e:0}),[A,le,g.width,g.height,Pe,l,d,Z,c,fe,b,$e]),xe=A?A.lineHeight*Z:0,ke=d==="justify"?"left":d,Ce=!!(T&&j&&g.width>0&&g.height>0),q=!!H,ye=(Ce||q)&&g.width>0&&g.height>0,ce=sS(I,ye),U=ye&&ce?lS():null,de=s.useRef(!1),He=s.useCallback(we=>{de.current=we},[]);s.useEffect(()=>{if(!Ce&&!q)return;const we=Te=>{const Xe=I;if(!Xe)return;const ze=Xe.getBoundingClientRect();Te.clientX>=ze.left&&Te.clientX<=ze.right&&Te.clientY>=ze.top&&Te.clientY<=ze.bottom&&(Te.preventDefault(),Te.stopPropagation(),V(Ve=>Ve==="shape"&&de.current?Ve:Ve==="shape"&&q?"image":Ce?"shape":"image"))};return document.addEventListener("dblclick",we,!0),()=>document.removeEventListener("dblclick",we,!0)},[Ce,q,I]);const he=s.useMemo(()=>x&&g.width>0&&g.height>0?Cw(Re,g):null,[x,Re,g.width,g.height]),ee=N&&!Y&&_!=="image",Je=s.useRef(null);!N&&x&&he&&(Je.current={rings:Re,bounds:he,focalX:C,focalY:y,scale:S,customPath:z});const Ne=ee?Je.current:null,ct=s.useRef(null),Ke=(()=>{const we=ct.current;return N||Y||!H||!se||!he||!we||z===we.customPath?null:nS(we.bounds,he,se,we.focalX,we.focalY,we.scale)})();wr(()=>{if(N||!H||!se||!he)return;const we=ct.current,Te=!!(we&&z!==we.customPath);Te&&Ke&&H.onCommit(Ke),Te&&Y&&(B==null||B()),ct.current={rings:Re,bounds:he,focalX:(Ke==null?void 0:Ke.focalX)??C,focalY:(Ke==null?void 0:Ke.focalY)??y,scale:(Ke==null?void 0:Ke.scale)??S,customPath:z}},[N,Y,z,Re,he,H,se,C,y,S,Ke,B]);const ut=(Ne==null?void 0:Ne.rings)??Re,lt=(Ne==null?void 0:Ne.bounds)??he,Ye=(Ne==null?void 0:Ne.focalX)??(Ke==null?void 0:Ke.focalX)??C,Le=(Ne==null?void 0:Ne.focalY)??(Ke==null?void 0:Ke.focalY)??y,We=(Ne==null?void 0:Ne.scale)??(Ke==null?void 0:Ke.scale)??S,Be=s.useMemo(()=>x&&g.width>0&&g.height>0?Sw(ut,g):"",[x,ut,g.width,g.height]),Ue=lt,ge=`${$}-clip`,ve=s.useMemo(()=>{if(!Ue)return null;const we=se??{width:Ue.width,height:Ue.height},Te=Si(Ue,we,We);return{x:Ln(Ue.width,Te.width,Ye),y:Ln(Ue.height,Te.height,Le),width:Te.width,height:Te.height}},[Ue,se,Ye,Le,We]);return a.jsxs("div",{className:`${e}-column`,ref:P,children:[x&&Be&&Ue&&ve?a.jsxs("svg",{className:`${e}-shape-image`,viewBox:`0 0 ${g.width} ${g.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("defs",{children:a.jsx("clipPath",{id:ge,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:Be,fillRule:"evenodd"})})}),a.jsx("image",{href:x,x:Ue.x+ve.x,y:Ue.y+ve.y,width:ve.width,height:ve.height,preserveAspectRatio:"none",clipPath:`url(#${ge})`})]}):null,a.jsxs("div",{className:`${e}-flow${c?"":` ${e}-clip`}`,style:{...f,["--"+e+"-fit"]:Z},children:[a.jsx("div",{className:`${e}-measure`,ref:M,style:f,"aria-hidden":!0}),ae.segments.map((we,Te)=>{const Xe=le.slice(we.from,we.to),ze=Te===0;return a.jsx("div",{className:`${e}-line${we.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${we.top}px`,left:`${we.left}px`,width:`${we.width}px`,textAlign:we.justify?void 0:ke},children:Xe.map((Ie,Ve)=>{const tt=b&&ze&&we.from===0&&Ve===0?Ie.text.slice(1):Ie.text,nt=Ec(Ie.leaf),st=Ie.href?a.jsx("a",{className:`${e}-link`,href:Ie.href,target:Ie.target,style:nt,children:tt}):a.jsx("span",{style:nt,children:tt});return a.jsxs("span",{children:[!we.justify&&Ve>0?" ":null,st]},Ve)})},`${we.from}-${we.to}-${Te}`)}),h&&!j&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:Pe.map((we,Te)=>a.jsx("polygon",{points:we.map(Xe=>`${Xe.x},${Xe.y}`).join(" ")},Te))})]}),b&&A&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...f,top:`${ae.capTop}px`,left:`${ae.capLeft}px`,fontSize:`${xe*m}px`,lineHeight:`${xe*m}px`},children:b}),U&&ce&&(j&&T||H)&&zn.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:ce.top,left:ce.left,width:ce.width,height:ce.height,zIndex:ww,pointerEvents:"none"},children:[j&&T&&a.jsx(iS,{P:e,box:{width:ce.width,height:ce.height},viewBox:r,contours:j,snap:T.snap,stretchToBox:!O,stage:_,onStageChange:V,onSelectionChange:He,onChange:T.onChange,onCommit:T.onCommit}),H&&Ue&&a.jsx(oS,{P:e,box:{width:ce.width,height:ce.height},bounds:Ue,natural:se,imageUrl:x,maskPath:Be,stage:_,onStageChange:V,focalX:Ye,focalY:Le,scale:We,onChange:H.onChange,onCommit:H.onCommit})]}),U),a.jsx("div",{className:`${e}-a11y`,children:G.map((we,Te)=>a.jsx("p",{children:we},Te))})]})}function dS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:d}=W.useScopedStyles(),c=s.useMemo(()=>Kw(d),[d]),u=n??!1,p=!!r||!!o,v=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),w=(e==null?void 0:e.shape)??"rectangle",m=(e==null?void 0:e.customPath)??"",h=(e==null?void 0:e.pathFit)??"stretch",f=s.useMemo(()=>$w(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),x=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",C=(e==null?void 0:e.textAlign)??"left",y=((e==null?void 0:e.overflowMode)??"clip")==="visible",S=((e==null?void 0:e.fitText)??"off")==="on",z=((e==null?void 0:e.dropCap)??"off")==="on"?Math.max(2,Math.round((e==null?void 0:e.dropCapLines)??3)):0,N=(e==null?void 0:e.dropCapSize)??bw,Y=u&&p&&!i,[B,T]=s.useState(!1);s.useEffect(()=>{if(!u||!p){T(!1);return}const Z=()=>T(!0),ae=()=>T(!1),xe=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],ke=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const Ce of xe)window.addEventListener(Ce,Z);for(const Ce of ke)window.addEventListener(Ce,ae);return()=>{for(const Ce of xe)window.removeEventListener(Ce,Z);for(const Ce of ke)window.removeEventListener(Ce,ae)}},[u,p]);const H=u&&p&&!i&&typeof l=="function",$=!B,I=Math.max(0,(e==null?void 0:e.pathSnap)??0),P=s.useRef(e??{}),M=s.useRef(""),g=[e==null?void 0:e.customPath,e==null?void 0:e.shape,e==null?void 0:e.pathFit,e==null?void 0:e.pathViewBox,e==null?void 0:e.imageScale,e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.image].join("\0");g!==M.current&&(M.current=g,P.current=e??{});const[D,A]=s.useState(null),[X,ie]=s.useState(!1),[L,_]=s.useState(!1),V=s.useCallback(()=>_(!1),[]),se=s.useMemo(()=>!D||D.serialized===m?m:D.serialized,[D,m]);s.useEffect(()=>{H||(ie(!1),_(!1))},[H]);const re=s.useMemo(()=>{if(!H)return null;if(D&&(D.base===m||D.serialized===m))return D.contours;const Z=zo(m);return Z.length?Z:null},[H,D,m]),k=h==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===zr&&!!(re&&!uu(re,f)),le=s.useCallback((Z,ae,xe)=>{const ke=jo(Z);if(A(Ce=>({base:Ce&&(Ce.base===m||Ce.serialized===m)?Ce.base:m,serialized:ke,contours:Z})),ae){const Ce=P.current,q=xe!=null&&xe.preserveShape?Ce.shape:"custom",ye={...Ce,shape:q,customPath:ke};P.current=ye,l==null||l(ye)}},[m,l]),G=s.useMemo(()=>H?{contours:k?re:null,snap:I,needsConversion:!k,onConvert:Z=>{const ae=jo(Z);A({base:ae,serialized:ae,contours:Z});const xe={...P.current,pathFit:"viewbox",pathViewBox:zr,customPath:ae};P.current=xe,l==null||l(xe)},onChange:(Z,ae)=>{ie(!0),_(!!(ae!=null&&ae.carryImage)),le(Z,!1)},onCommit:(Z,ae)=>{le(Z,!0,ae),ie(!1)}}:null,[H,k,re,I,l,le]),b=x==="avoid"&&!!(e!=null&&e.image),E=s.useMemo(()=>({focalX:(e==null?void 0:e.imageFocalX)??.5,focalY:(e==null?void 0:e.imageFocalY)??.5,scale:(e==null?void 0:e.imageScale)??1}),[e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.imageScale]),[j,me]=s.useState(null),K=j??E,te=s.useCallback(Z=>me(Z),[]),O=s.useCallback(Z=>{me(Z);const ae={...P.current,imageFocalX:Z.focalX,imageFocalY:Z.focalY,imageScale:Z.scale};P.current=ae,l==null||l(ae)},[l]);s.useEffect(()=>{j&&Math.abs(j.focalX-E.focalX)<1e-9&&Math.abs(j.focalY-E.focalY)<1e-9&&Math.abs(j.scale-E.scale)<1e-9&&me(null)},[j,E]);const J=s.useMemo(()=>!H||!b?null:{onChange:te,onCommit:O},[H,b,te,O]),[ne,Pe]=s.useState(void 0),be=s.useRef(void 0),Re=s.useCallback(Z=>{const ae=be.current;ae!==void 0&&Math.abs(ae-Z)<.005||(be.current=Z,Pe(Z))},[]),ue=s.useMemo(()=>S&&typeof ne=="number"?ne:1,[ne,S]),fe=Z=>`calc(${Z} * var(--${d}-fit, 1))`,$e=s.useMemo(()=>{var Z,ae,xe,ke,Ce;return{fontFamily:co(e==null?void 0:e.textFontFamily),fontWeight:(Z=e==null?void 0:e.textFontSettings)==null?void 0:Z.fontWeight,fontStyle:(ae=e==null?void 0:e.textFontSettings)==null?void 0:ae.fontStyle,fontSize:fe(W.scalingValue((e==null?void 0:e.textFontSize)??.012,u)),lineHeight:fe(W.scalingValue((e==null?void 0:e.textLineHeight)??(e==null?void 0:e.textFontSize)??.012,u)),letterSpacing:fe(W.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:fe(W.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:(xe=e==null?void 0:e.textTextAppearance)==null?void 0:xe.textTransform,textDecoration:(ke=e==null?void 0:e.textTextAppearance)==null?void 0:ke.textDecoration,fontVariant:(Ce=e==null?void 0:e.textTextAppearance)==null?void 0:Ce.fontVariant}},[e,u,d]),Q={[`--${d}-text-color`]:(e==null?void 0:e.textColor)??"#000000",[`--${d}-link-color`]:(e==null?void 0:e.linkColor)??(e==null?void 0:e.textColor)??"#000000",[`--${d}-background-color`]:(e==null?void 0:e.backgroundColor)??"transparent"};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{className:`${d}-wrapper`,style:{...Q},children:a.jsx(cS,{P:d,item:v,shape:w,customPath:m,pathFit:h,viewBox:f,mode:x,align:C,allowOverflow:y,fitEnabled:S,scale:ue,onFitScale:Re,dropCapLines:z,dropCapSize:N,showGuides:(Y||H)&&$,typography:$e,imageUrl:x==="avoid"?e==null?void 0:e.image:null,imageFocalX:K.focalX,imageFocalY:K.focalY,imageScale:K.scale,imageCustomPath:se,pathDragActive:X,pathCarryImage:L,onCarryImageConsumed:V,pathEditor:$?G:null,imageEditor:$?J:null})})]})}const uS=`import { useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from 'react';
23826
+ `}const wo=7,cS=3.5,So=9,Jn=8,Qn=14,Wc=10,dS=24,Hc=14,uS=1,pS=.05,Yr=1.08;function qr(e,t){switch(t){case"nw":return{x:e.minX,y:e.minY};case"ne":return{x:e.maxX,y:e.minY};case"se":return{x:e.maxX,y:e.maxY};case"sw":return{x:e.minX,y:e.maxY}}}function vu(e){switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}}function fs(e,t){const n=qr(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*Wc,y:n.y+o*Wc}}const ys=.1,xs=8,mS=4;function vs(e,t){return!(t.width>0)||!(t.height>0)||!(e.width>0)||!(e.height>0)?1:Math.max(e.width/t.width,e.height/t.height)}function Si(e,t,n){const i=vs(e,t)*n;return{width:t.width*i,height:t.height*i}}function Ln(e,t,n){return(e-t)*n}function ji(e,t,n){const i=e-t;return Math.abs(i)<mS?.5:Vr(n/i)}function gS(e,t,n,i,o,r){const l=Si(e,n,r),d=e.x+Ln(e.width,l.width,i),c=e.y+Ln(e.height,l.height,o),u=vs(e,n),p=vs(t,n),x=Math.min(xs,Math.max(ys,p>0?r*(u/p):r)),b=Si(t,n,x);return{focalX:ji(t.width,b.width,d-t.x),focalY:ji(t.height,b.height,c-t.y),scale:x}}function hS({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,stage:l,onStageChange:d,onSelectionChange:c,onChange:u,onCommit:p}){const x=s.useRef(null),b=s.useRef(null),m=s.useRef(i);m.current=i;const h=s.useRef(null),f=s.useRef(null),v=s.useRef(null),C=s.useRef(null),[y,S]=s.useState([]),[j,N]=s.useState(Eo),U=s.useCallback(w=>{N(Y=>Uw(Y,w)?Y:w)},[]),W=l==="shape";s.useEffect(()=>{var w;W&&((w=x.current)==null||w.focus({preventScroll:!0}))},[W]),s.useEffect(()=>{W||S(w=>w.length?[]:w)},[W]);const R=y.length>0;s.useEffect(()=>{c==null||c(R)},[R,c]),s.useEffect(()=>()=>c==null?void 0:c(!1),[c]);const B=n.width>0?t.width/n.width:1,$=n.height>0?t.height/n.height:1,T=s.useCallback(w=>r?{x:(w.x-n.x)*B,y:(w.y-n.y)*$}:{x:w.x-n.x,y:w.y-n.y},[r,n,B,$]),k=s.useCallback(w=>r?{x:n.x+(B>0?w.x/B:0),y:n.y+($>0?w.y/$:0)}:{x:n.x+w.x,y:n.y+w.y},[r,n,B,$]),E=s.useCallback((w,Y)=>{var z;const I=(z=x.current)==null?void 0:z.getBoundingClientRect();return!I||I.width<=0||I.height<=0?{x:0,y:0}:r?{x:n.x+(w-I.left)/I.width*n.width,y:n.y+(Y-I.top)/I.height*n.height}:{x:n.x+(w-I.left),y:n.y+(Y-I.top)}},[r,n]),g=s.useCallback((w,Y)=>{var z;const I=(z=x.current)==null?void 0:z.getBoundingClientRect();return!I||I.width<=0||I.height<=0?{x:0,y:0}:{x:(w-I.left)/I.width*t.width,y:(Y-I.top)/I.height*t.height}},[t.width,t.height]),A=s.useCallback((w,Y)=>{p(w,Y)},[p]),F=w=>{var ke;const Y=v.current;if(Y&&w.pointerId===Y.pointerId){if(w.stopPropagation(),w.preventDefault(),Y.startDistance<=0)return;const xe=E(w.clientX,w.clientY),V=Math.hypot(xe.x-Y.origin.x,xe.y-Y.origin.y),pe=Math.max(pS,V/Y.startDistance);if(!Y.moved&&Math.abs(pe-1)<1e-4)return;Y.moved=!0,u(Rc(Y.startContours,Y.origin,pe));return}const I=f.current;if(I&&w.pointerId===I.pointerId){w.stopPropagation(),w.preventDefault();const xe=E(w.clientX,w.clientY),{bbox:V}=I,pe=V.maxX-V.minX,se=V.maxY-V.minY,q=xe.x-I.origin.x,ce=xe.y-I.origin.y;let We=q,ge=ce;if(isFinite(pe)&&isFinite(se))if(r){const J=Math.min(n.x,n.x+n.width-pe),Ke=Math.max(n.x,n.x+n.width-pe),_e=Math.min(n.y,n.y+n.height-se),rt=Math.max(n.y,n.y+n.height-se),Ye=Math.min(Ke,Math.max(J,V.minX+q)),dt=Math.min(rt,Math.max(_e,V.minY+ce));We=Ye-V.minX,ge=dt-V.minY}else{const J=V.minX-n.x,Ke=V.minY-n.y,_e=Math.min(0,t.width-pe),rt=Math.max(0,t.width-pe),Ye=Math.min(0,t.height-se),dt=Math.max(0,t.height-se),at=Math.min(rt,Math.max(_e,J+q)),Xe=Math.min(dt,Math.max(Ye,Ke+ce));We=at-J,ge=Xe-Ke}if(!I.moved&&We===0&&ge===0)return;I.moved=!0,u(ei(I.startContours,J=>({x:J.x+We,y:J.y+ge})),{carryImage:!0});return}const z=C.current;if(z&&w.pointerId===z.pointerId){w.stopPropagation(),w.preventDefault();const xe=E(w.clientX,w.clientY);let V=xe.x-z.origin.x,pe=xe.y-z.origin.y;if(w.shiftKey&&(Math.abs(V)>Math.abs(pe)?pe=0:V=0),!z.moved&&V===0&&pe===0)return;z.moved=!0,u(Pc(z.startContours,z.selection,V,pe));return}const H=h.current;if(!H||w.pointerId!==H.pointerId)return;w.stopPropagation(),w.preventDefault();const Te=E(w.clientX,w.clientY),fe=w.metaKey||w.ctrlKey;if(H.kind==="anchor"){const xe={x:H.anchor.x+(Te.x-H.origin.x),y:H.anchor.y+(Te.y-H.origin.y)},V=fe?[]:Gw(m.current,{contour:H.contour,node:H.node}),pe=Mc(V,xe,"x",T,Hc),se=Mc(V,xe,"y",T,Hc),q=fe?xe:{x:(pe==null?void 0:pe.value)??$r(xe.x,o),y:(se==null?void 0:se.value)??$r(xe.y,o)};if(w.shiftKey&&(Math.abs(q.x-H.anchor.x)>Math.abs(q.y-H.anchor.y)?q.y=H.anchor.y:q.x=H.anchor.x),!H.moved&&q.x===H.anchor.x&&q.y===H.anchor.y)return;H.moved=!0,U(Zw(q,pe,se,T)),u(Hw(m.current,H.contour,H.node,q));return}const ve=(ke=m.current[H.contour])==null?void 0:ke.nodes[H.node],de=H.mirror&&!w.altKey,he=de||fe?null:H.kind==="in"?ve==null?void 0:ve.out:ve==null?void 0:ve.in,we=ve?T(ve.p):null,Z=he?T(he):null,Q=ve&&(!fe||w.shiftKey)?Qw(Te,ve.p,de||fe?null:Jw(m.current[H.contour],H.node,H.kind,T),we&&Z?Math.hypot(Z.x-we.x,Z.y-we.y):null,w.shiftKey,T,k):{point:Te,guides:Eo},ae=Q.guides.length?Q.point:fe?Te:{x:$r(Te.x,o),y:$r(Te.y,o)},$e=H.kind==="in"?ve==null?void 0:ve.in:ve==null?void 0:ve.out;!H.moved&&$e&&ae.x===$e.x&&ae.y===$e.y||(H.moved=!0,U(Q.guides),u(Ow(m.current,H.contour,H.node,H.kind,ae,de)))},X=w=>{U(Eo);const Y=v.current;if(Y&&w.pointerId===Y.pointerId){v.current=null,w.stopPropagation();const ve=x.current;ve!=null&&ve.hasPointerCapture(Y.pointerId)&&ve.releasePointerCapture(Y.pointerId),Y.moved&&A(m.current,{preserveShape:!0});return}const I=f.current;if(I&&w.pointerId===I.pointerId){f.current=null,w.stopPropagation();const ve=x.current;ve!=null&&ve.hasPointerCapture(I.pointerId)&&ve.releasePointerCapture(I.pointerId),I.moved?A(m.current,{preserveShape:!0}):S([]);return}const z=C.current;if(z&&w.pointerId===z.pointerId){C.current=null,w.stopPropagation();const ve=x.current;ve!=null&&ve.hasPointerCapture(z.pointerId)&&ve.releasePointerCapture(z.pointerId),z.moved&&A(m.current);return}const H=h.current;if(!H||w.pointerId!==H.pointerId)return;h.current=null,w.stopPropagation();const Te=x.current;if(Te!=null&&Te.hasPointerCapture(H.pointerId)&&Te.releasePointerCapture(H.pointerId),H.moved){A(m.current);return}if(!H.toggleOnRelease)return;const fe=Ec(m.current,H.contour,H.node);fe!==m.current&&(u(fe),A(fe))},ee=w=>{w.stopPropagation()},P=w=>{var Y,I;w.stopPropagation(),w.preventDefault(),(Y=x.current)==null||Y.focus({preventScroll:!0}),f.current={pointerId:w.pointerId,origin:E(w.clientX,w.clientY),startContours:Pn(i),bbox:wi(i),moved:!1},(I=x.current)==null||I.setPointerCapture(w.pointerId)},D=(w,Y)=>{var fe,ve;w.stopPropagation(),w.preventDefault(),(fe=x.current)==null||fe.focus({preventScroll:!0}),S([]),d("shape");const I=wi(i),z=qr(I,vu(Y)),H=fs(I,Y),Te=Math.hypot(H.x-z.x,H.y-z.y);!isFinite(Te)||Te<=0||(v.current={pointerId:w.pointerId,corner:Y,origin:z,startDistance:Te,startContours:Pn(i),moved:!1},(ve=x.current)==null||ve.setPointerCapture(w.pointerId))},K=(w,Y,I,z)=>{var fe,ve,de,he;w.stopPropagation(),w.preventDefault(),(fe=x.current)==null||fe.focus({preventScroll:!0});const H=(ve=i[I])==null?void 0:ve.nodes[z];if(!H)return;if(w.altKey){const we=Y==="anchor"?yu(i,I,z):Bw(i,I,z,Y);if(we===i)return;S(Y==="anchor"?[]:[{contour:I,node:z}]),u(we),A(we);return}const Te=w.metaKey||w.ctrlKey;if(Y==="anchor"&&w.shiftKey&&!Te){S(we=>we.some(Z=>Z.contour===I&&Z.node===z)?we.filter(Z=>!(Z.contour===I&&Z.node===z)):[...we,{contour:I,node:z}]);return}if(Y==="anchor"&&!Te&&y.length>1&&y.some(we=>we.contour===I&&we.node===z)){C.current={pointerId:w.pointerId,origin:E(w.clientX,w.clientY),startContours:Pn(i),selection:y,moved:!1},(de=x.current)==null||de.setPointerCapture(w.pointerId);return}S([{contour:I,node:z}]),h.current={kind:Y,contour:I,node:z,pointerId:w.pointerId,origin:E(w.clientX,w.clientY),anchor:H.p,mirror:Y!=="anchor"&&!!(H.in&&H.out),toggleOnRelease:Te,moved:!1},(he=x.current)==null||he.setPointerCapture(w.pointerId)},le=w=>{w.stopPropagation(),w.preventDefault();const Y=ei(i,T),I=Vw(Y,g(w.clientX,w.clientY));if(!I||I.distance>dS)return;const{contours:z,nodeIndex:H}=zw(i,I.contour,I.segment,I.t);H<0||(S([{contour:I.contour,node:H}]),u(z),A(z))},re=w=>{if(w.key==="="||w.key==="+"||w.key==="-"||w.key==="_"){w.preventDefault(),w.stopPropagation();const Te=wi(i);if(!isFinite(Te.minX)||!isFinite(Te.maxX))return;const fe={x:(Te.minX+Te.maxX)/2,y:(Te.minY+Te.maxY)/2},de=w.key==="="||w.key==="+"?Yr:1/Yr,he=Rc(i,fe,de);u(he),A(he,{preserveShape:!0});return}if(w.key==="Escape"){w.stopPropagation(),S([]),d("none");return}if(!y.length)return;if(w.key==="Backspace"||w.key==="Delete"){w.preventDefault(),w.stopPropagation();const Te=Dw(i,y);if(Te===i)return;S([]),u(Te),A(Te);return}const Y=o>0?o:uS,I=w.shiftKey?Y*10:Y,z={ArrowLeft:[-I,0],ArrowRight:[I,0],ArrowUp:[0,-I],ArrowDown:[0,I]}[w.key];if(!z)return;w.preventDefault(),w.stopPropagation();const H=Pc(i,y,z[0],z[1]);u(H),A(H)},M=s.useMemo(()=>Go(ei(i,T)),[i,T]),ie=s.useMemo(()=>wi(i),[i]),G=T({x:ie.minX,y:ie.minY}),oe={width:T({x:ie.maxX,y:ie.minY}).x-G.x,height:T({x:ie.minX,y:ie.maxY}).y-G.y},te=W&&y.length===0&&isFinite(ie.minX)&&isFinite(ie.maxX)&&ie.maxX>ie.minX&&ie.maxY>ie.minY,ye=y.length>0||W,Me=ye;return a.jsxs("svg",{ref:x,className:`${e}-editor${ye?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:re,onPointerDown:()=>{var w;return(w=x.current)==null?void 0:w.focus({preventScroll:!0})},onPointerMove:F,onPointerUp:X,onPointerCancel:X,onLostPointerCapture:X,"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{S([]),d("none")},onClick:le}),Me&&a.jsx("path",{className:`${e}-editor-hit`,d:M,onClick:le}),Me&&a.jsx("path",{className:`${e}-editor-outline`,d:M}),Me&&j.map((w,Y)=>a.jsx("line",{className:`${e}-editor-snap ${e}-editor-snap-${w.kind}`,x1:w.a.x,y1:w.a.y,x2:w.b.x,y2:w.b.y},`${w.kind}-${Y}`)),a.jsx("path",{ref:b,className:`${e}-editor-body`,d:M,fillRule:"evenodd",onPointerDown:P,onClick:le}),Me&&i.map((w,Y)=>w.nodes.map((I,z)=>{const H=y.some(fe=>fe.contour===Y&&fe.node===z),Te=T(I.p);return a.jsxs("g",{children:[H&&y.length===1&&["in","out"].map(fe=>{const ve=I[fe];if(!ve)return null;const de=T(ve);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:Te.x,y1:Te.y,x2:de.x,y2:de.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:de.x,cy:de.y,r:cS}),a.jsx("circle",{className:`${e}-editor-grab`,cx:de.x,cy:de.y,r:So,onPointerDown:he=>K(he,fe,Y,z),onClick:ee})]},fe)}),a.jsx("rect",{className:`${e}-editor-anchor${H?` ${e}-editor-anchor-selected`:""}`,x:Te.x-wo/2,y:Te.y-wo/2,width:wo,height:wo,rx:I.in||I.out?wo/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:Te.x-So,y:Te.y-So,width:So*2,height:So*2,onPointerDown:fe=>K(fe,"anchor",Y,z),onClick:ee,onDoubleClick:fe=>{fe.stopPropagation(),fe.preventDefault();const ve=Ec(i,Y,z);u(ve),A(ve)}})]},`${Y}-${z}`)})),te&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:G.x,y:G.y,width:oe.width,height:oe.height}),["nw","ne","se","sw"].map(w=>{const Y=T(fs(ie,w)),I=w==="ne"||w==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:Y.x-Jn/2,y:Y.y-Jn/2,width:Jn,height:Jn}),a.jsx("rect",{className:`${e}-editor-scale-grab${I?` ${e}-editor-scale-grab-nesw`:""}`,x:Y.x-Qn/2,y:Y.y-Qn/2,width:Qn,height:Qn,onPointerDown:z=>D(z,w),onClick:ee})]},w)})]})]})}function fS({P:e,box:t,bounds:n,natural:i,imageUrl:o,maskPath:r,stage:l,onStageChange:d,focalX:c,focalY:u,scale:p,onChange:x,onCommit:b}){const m=s.useRef(null),h=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,f=s.useRef(null),v=s.useRef(null),C=s.useRef({focalX:c,focalY:u,scale:p});C.current={focalX:c,focalY:u,scale:p};const y=l==="image";s.useEffect(()=>{var E;y&&((E=m.current)==null||E.focus({preventScroll:!0}))},[y]);const S=s.useCallback((E,g)=>{var F;const A=(F=m.current)==null?void 0:F.getBoundingClientRect();return!A||A.width<=0||A.height<=0?{x:0,y:0}:{x:(E-A.left)/A.width*t.width,y:(g-A.top)/A.height*t.height}},[t.width,t.height]),j=E=>{var A,F;if(!i)return;E.stopPropagation(),E.preventDefault(),(A=m.current)==null||A.focus({preventScroll:!0});const g=Si(n,i,p);f.current={pointerId:E.pointerId,origin:S(E.clientX,E.clientY),startX:Ln(n.width,g.width,c),startY:Ln(n.height,g.height,u),width:g.width,height:g.height,moved:!1},(F=m.current)==null||F.setPointerCapture(E.pointerId)},N=(E,g)=>{var le,re;if(!i)return;E.stopPropagation(),E.preventDefault(),(le=m.current)==null||le.focus({preventScroll:!0});const A=Si(n,i,p),F=Ln(n.width,A.width,c),X=Ln(n.height,A.height,u),ee={minX:F,minY:X,maxX:F+A.width,maxY:X+A.height},P=qr(ee,vu(g)),D=qr(ee,g),K=Math.hypot(D.x-P.x,D.y-P.y);!isFinite(K)||K<=0||(v.current={pointerId:E.pointerId,anchor:P,startDistance:K,startScale:p,startX:F,startY:X,moved:!1},(re=m.current)==null||re.setPointerCapture(E.pointerId))},U=E=>{if(!i)return;const g=v.current;if(g&&E.pointerId===g.pointerId){E.stopPropagation(),E.preventDefault();const F=S(E.clientX,E.clientY),X={x:F.x-n.x,y:F.y-n.y},ee=Math.hypot(X.x-g.anchor.x,X.y-g.anchor.y),P=Math.min(xs,Math.max(ys,g.startScale*(ee/g.startDistance)));if(!g.moved&&Math.abs(P-g.startScale)<1e-4)return;g.moved=!0;const D=P/g.startScale,K=g.anchor.x+(g.startX-g.anchor.x)*D,le=g.anchor.y+(g.startY-g.anchor.y)*D,re=Si(n,i,P);x({focalX:ji(n.width,re.width,K),focalY:ji(n.height,re.height,le),scale:P});return}const A=f.current;if(A&&E.pointerId===A.pointerId){E.stopPropagation(),E.preventDefault();const F=S(E.clientX,E.clientY),X=F.x-A.origin.x,ee=F.y-A.origin.y;if(!A.moved&&X===0&&ee===0)return;A.moved=!0,x({focalX:ji(n.width,A.width,A.startX+X),focalY:ji(n.height,A.height,A.startY+ee),scale:p})}},W=E=>{var F,X;const g=f.current;if(g&&E.pointerId===g.pointerId){f.current=null,E.stopPropagation(),(F=m.current)!=null&&F.hasPointerCapture(g.pointerId)&&m.current.releasePointerCapture(g.pointerId),g.moved&&b(C.current);return}const A=v.current;A&&E.pointerId===A.pointerId&&(v.current=null,E.stopPropagation(),(X=m.current)!=null&&X.hasPointerCapture(A.pointerId)&&m.current.releasePointerCapture(A.pointerId),A.moved&&b(C.current))},R=E=>{if(E.key==="Escape"){E.stopPropagation(),d("none");return}if(E.key==="="||E.key==="+"||E.key==="-"||E.key==="_"){E.preventDefault(),E.stopPropagation();const g=E.key==="="||E.key==="+",A=Math.min(xs,Math.max(ys,p*(g?Yr:1/Yr))),F={focalX:c,focalY:u,scale:A};x(F),b(F)}},B=["nw","ne","se","sw"],$={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},T=s.useMemo(()=>{const E=i??{width:n.width,height:n.height},g=Si(n,E,p);return!(g.width>0)||!(g.height>0)?null:{x:n.x+Ln(n.width,g.width,c),y:n.y+Ln(n.height,g.height,u),width:g.width,height:g.height}},[i,n.x,n.y,n.width,n.height,c,u,p]),k=T?{minX:T.x,minY:T.y,maxX:T.x+T.width,maxY:T.y+T.height}:$;return a.jsxs("svg",{ref:m,className:`${e}-editor${y?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:R,onPointerMove:U,onPointerUp:W,onPointerCancel:W,onLostPointerCapture:W,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>d("none")}),y&&o&&T&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:h,maskUnits:"userSpaceOnUse",x:T.x,y:T.y,width:T.width,height:T.height,children:[a.jsx("rect",{x:T.x,y:T.y,width:T.width,height:T.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:T.x,y:T.y,width:T.width,height:T.height,preserveAspectRatio:"none",mask:`url(#${h})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:T.x,y:T.y,width:T.width,height:T.height})]}),y&&a.jsxs(a.Fragment,{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:n.x,y:n.y,width:n.width,height:n.height}),a.jsx("rect",{className:`${e}-editor-body`,x:n.x,y:n.y,width:n.width,height:n.height,onPointerDown:j}),B.map(E=>{const g=fs(k,E),A=E==="ne"||E==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:g.x-Jn/2,y:g.y-Jn/2,width:Jn,height:Jn}),a.jsx("rect",{className:`${e}-editor-scale-grab${A?` ${e}-editor-scale-grab-nesw`:""}`,x:g.x-Qn/2,y:g.y-Qn/2,width:Qn,height:Qn,onPointerDown:F=>N(F,E)})]},E)})]})]})}function yS(e){const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}}function xS(e,t){return Math.abs(e.top-t.top)<.5&&Math.abs(e.left-t.left)<.5&&Math.abs(e.width-t.width)<.5&&Math.abs(e.height-t.height)<.5}function vS(e,t){const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e||!t){i(null);return}let o=0,r=null;const l=()=>{const d=yS(e);(!r||!xS(r,d))&&(r=d,i(d)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n}function bS(){return typeof document>"u"?null:document.body}function wS({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:d,allowOverflow:c,fitEnabled:u,scale:p,onFitScale:x,dropCapLines:b,dropCapSize:m,showGuides:h,typography:f,imageUrl:v,imageFocalX:C,imageFocalY:y,imageScale:S,imageCustomPath:j,pathDragActive:N,pathCarryImage:U,onCarryImageConsumed:W,pathEditor:R,imageEditor:B}){var Ne,Je;const $=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[T,k]=s.useState(null),E=s.useRef(null),[g,A]=s.useState({width:0,height:0}),[F,X]=s.useState(null),[ee,P]=s.useState(0),[D,K]=s.useState("none");s.useEffect(()=>{!R&&!B&&K("none")},[R,B]);const[le,re]=s.useState(null);s.useEffect(()=>{if(!v||typeof Image>"u"){re(null);return}let Se=!1;const Ie=new Image;return Ie.onload=()=>{Se||re({width:Ie.naturalWidth,height:Ie.naturalHeight})},Ie.src=v,()=>{Se=!0}},[v]);const M=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),ie=s.useMemo(()=>aS(M),[M]),G=s.useMemo(()=>sS(M),[M]),oe=b>0?((Je=(Ne=ie[0])==null?void 0:Ne.text)==null?void 0:Je.charAt(0))??"":"",te=g.height>0?g.width/g.height:1,ye=(R==null?void 0:R.contours)??null,Me=s.useMemo(()=>{if(ye){const qe=el(ye);if(qe.length)return Ar(qe,r)}const Se=i.trim(),Ie=Se?Fc(Se,o,r):null;return Ie&&Ie.length?Ie:us(n==="custom"?"rectangle":n,te)},[ye,n,i,o,r,Math.round(te*100)/100]),w=R==null?void 0:R.onConvert,Y=(R==null?void 0:R.needsConversion)??!1,I=s.useMemo(()=>{const Se=ye??(i.trim()?Vo(i):null);return!!(Se&&fu(Se,r))},[ye,i,r]),[z,H]=s.useState(null);Cr(()=>{if(!I){z&&H(null);return}!z&&g.width>0&&g.height>0&&H({width:g.width,height:g.height})},[I,g.width,g.height,z]);const Te=s.useMemo(()=>{if(!I||g.width<=0||g.height<=0)return Me;const Se=z??g,Ie=r.width/Se.width,qe=r.height/Se.height;return Me.map(ze=>ze.map(Re=>({x:Re.x*Ie,y:Re.y*qe})))},[Me,I,z,r.width,r.height,g.width,g.height]),fe=s.useMemo(()=>{const Se=j.trim(),Ie=Se?Fc(Se,o,r):null;return Ie&&Ie.length?Ie:us(n==="custom"?"rectangle":n,te)},[n,j,o,r,Math.round(te*100)/100]),ve=s.useMemo(()=>{if(!I||g.width<=0||g.height<=0)return fe;const Se=z??g,Ie=r.width/Se.width,qe=r.height/Se.height;return fe.map(ze=>ze.map(Re=>({x:Re.x*Ie,y:Re.y*qe})))},[fe,I,z,r.width,r.height,g.width,g.height]),de=s.useRef(null);s.useEffect(()=>{if(!(!w||g.width<=0||g.height<=0)){if(I){if(de.current===i)return;const Se=ye??(i.trim()?Vo(i):null);if(!(Se!=null&&Se.length))return;const Ie=ei(Se,qe=>({x:r.x+(qe.x-r.x)/g.width*r.width,y:r.y+(qe.y-r.y)/g.height*r.height}));de.current=Go(Ie),w(Ie);return}!Y||!Me.length||w(ei(hu(Me),Se=>({x:Se.x*Xr,y:Se.y*Xr})))}},[Y,I,w,Me,ye,i,r,g.width,g.height]),Cr(()=>{const Se=T;if(!Se||typeof ResizeObserver>"u")return;const Ie=()=>{const ze=Se.getBoundingClientRect();A(Re=>Math.abs(Re.width-ze.width)<.5&&Math.abs(Re.height-ze.height)<.5?Re:{width:ze.width,height:ze.height})};Ie();const qe=new ResizeObserver(Ie);return qe.observe(Se),()=>qe.disconnect()},[T]),s.useEffect(()=>{const Se=typeof document<"u"?document.fonts:void 0;Se!=null&&Se.ready&&Se.ready.then(()=>{P(Ie=>Ie+1)})},[]),Cr(()=>{const Se=E.current;if(!Se)return;if(!ie.length){X(null);return}const Ie=[],qe=document.createDocumentFragment();for(const zt of ie){const ft=document.createElement("span");Object.assign(ft.style,_c(zt.leaf)),ft.textContent=zt.text,qe.appendChild(ft),Ie.push(ft)}const ze=document.createElement("span");ze.textContent=" ",qe.appendChild(ze);const Re=document.createElement("span");Re.textContent=oe||"H",Re.style.lineHeight="1",qe.appendChild(Re),Se.replaceChildren(qe);const Ve=window.getComputedStyle(Se),De=parseFloat(Ve.fontSize)||16,tt=parseFloat(Ve.lineHeight),nt=Number.isNaN(tt)?De*1.2:tt;Re.style.fontSize=`${nt*m}px`;const ct=Ie.map(zt=>zt.getBoundingClientRect().width),St=ze.getBoundingClientRect().width,Bt=oe?Re.getBoundingClientRect().width:0;Se.replaceChildren(),X({widths:ct,spaceWidth:St,lineHeight:nt,capWidth:Bt})},[ie,f,oe,b,m,ee,g.width]);const he=F&&oe?F.capWidth+F.lineHeight*Cw:0,we=Math.max(b,Math.ceil(m)),Z=s.useMemo(()=>{if(!F||!ie.length||g.width<=0||g.height<=0||!u)return 1;const Se=ze=>Nc({tokens:ie,widths:F.widths,spaceWidth:F.spaceWidth,lineHeight:F.lineHeight,width:g.width,height:g.height,rings:Te,mode:l,align:d,scale:ze,allowOverflow:!1,capInset:he*ze,capLines:oe?we:0});if(Se(1).placed>=ie.length)return 1;if(Se(Xa).placed<ie.length)return Xa;let Ie=Xa,qe=1;for(let ze=0;ze<ww;ze+=1){const Re=(Ie+qe)/2;Se(Re).placed>=ie.length?Ie=Re:qe=Re}return Ie},[F,ie,g.width,g.height,Te,l,d,u,he,oe,we]);s.useEffect(()=>{x(Z)},[Z,x]);const Q=u?Math.min(p,Z):1,ae=s.useMemo(()=>!F||!ie.length||g.width<=0||g.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0}:Nc({tokens:ie,widths:F.widths,spaceWidth:F.spaceWidth,lineHeight:F.lineHeight,width:g.width,height:g.height,rings:Te,mode:l,align:d,scale:Q,allowOverflow:c,capInset:he*Q,capLines:oe?we:0}),[F,ie,g.width,g.height,Te,l,d,Q,c,he,oe,we]),$e=F?F.lineHeight*Q:0,ke=d==="justify"?"left":d,xe=!!(R&&ye&&g.width>0&&g.height>0),V=!!B,pe=(xe||V)&&g.width>0&&g.height>0,se=vS(T,pe),q=pe&&se?bS():null,ce=s.useRef(!1),We=s.useCallback(Se=>{ce.current=Se},[]);s.useEffect(()=>{if(!xe&&!V)return;const Se=Ie=>{const qe=T;if(!qe)return;const ze=qe.getBoundingClientRect();Ie.clientX>=ze.left&&Ie.clientX<=ze.right&&Ie.clientY>=ze.top&&Ie.clientY<=ze.bottom&&(Ie.preventDefault(),Ie.stopPropagation(),K(Ve=>Ve==="shape"&&ce.current?Ve:Ve==="shape"&&V?"image":xe?"shape":"image"))};return document.addEventListener("dblclick",Se,!0),()=>document.removeEventListener("dblclick",Se,!0)},[xe,V,T]);const ge=s.useMemo(()=>v&&g.width>0&&g.height>0?Rw(ve,g):null,[v,ve,g.width,g.height]),J=N&&!U&&D!=="image",Ke=s.useRef(null);!N&&v&&ge&&(Ke.current={rings:ve,bounds:ge,focalX:C,focalY:y,scale:S,customPath:j});const _e=J?Ke.current:null,rt=s.useRef(null),Ye=(()=>{const Se=rt.current;return N||U||!B||!le||!ge||!Se||j===Se.customPath?null:gS(Se.bounds,ge,le,Se.focalX,Se.focalY,Se.scale)})();Cr(()=>{if(N||!B||!le||!ge)return;const Se=rt.current,Ie=!!(Se&&j!==Se.customPath);Ie&&Ye&&B.onCommit(Ye),Ie&&U&&(W==null||W()),rt.current={rings:ve,bounds:ge,focalX:(Ye==null?void 0:Ye.focalX)??C,focalY:(Ye==null?void 0:Ye.focalY)??y,scale:(Ye==null?void 0:Ye.scale)??S,customPath:j}},[N,U,j,ve,ge,B,le,C,y,S,Ye,W]);const dt=(_e==null?void 0:_e.rings)??ve,at=(_e==null?void 0:_e.bounds)??ge,Xe=(_e==null?void 0:_e.focalX)??(Ye==null?void 0:Ye.focalX)??C,Le=(_e==null?void 0:_e.focalY)??(Ye==null?void 0:Ye.focalY)??y,He=(_e==null?void 0:_e.scale)??(Ye==null?void 0:Ye.scale)??S,Be=s.useMemo(()=>v&&g.width>0&&g.height>0?Iw(dt,g):"",[v,dt,g.width,g.height]),Ze=at,me=`${$}-clip`,be=s.useMemo(()=>{if(!Ze)return null;const Se=le??{width:Ze.width,height:Ze.height},Ie=Si(Ze,Se,He);return{x:Ln(Ze.width,Ie.width,Xe),y:Ln(Ze.height,Ie.height,Le),width:Ie.width,height:Ie.height}},[Ze,le,Xe,Le,He]);return a.jsxs("div",{className:`${e}-column`,ref:k,children:[v&&Be&&Ze&&be?a.jsxs("svg",{className:`${e}-shape-image`,viewBox:`0 0 ${g.width} ${g.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("defs",{children:a.jsx("clipPath",{id:me,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:Be,fillRule:"evenodd"})})}),a.jsx("image",{href:v,x:Ze.x+be.x,y:Ze.y+be.y,width:be.width,height:be.height,preserveAspectRatio:"none",clipPath:`url(#${me})`})]}):null,a.jsxs("div",{className:`${e}-flow${c?"":` ${e}-clip`}`,style:{...f,["--"+e+"-fit"]:Q},children:[a.jsx("div",{className:`${e}-measure`,ref:E,style:f,"aria-hidden":!0}),ae.segments.map((Se,Ie)=>{const qe=ie.slice(Se.from,Se.to),ze=Ie===0;return a.jsx("div",{className:`${e}-line${Se.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${Se.top}px`,left:`${Se.left}px`,width:`${Se.width}px`,textAlign:Se.justify?void 0:ke},children:qe.map((Re,Ve)=>{const tt=oe&&ze&&Se.from===0&&Ve===0?Re.text.slice(1):Re.text,nt=_c(Re.leaf),ct=Re.href?a.jsx("a",{className:`${e}-link`,href:Re.href,target:Re.target,style:nt,children:tt}):a.jsx("span",{style:nt,children:tt});return a.jsxs("span",{children:[!Se.justify&&Ve>0?" ":null,ct]},Ve)})},`${Se.from}-${Se.to}-${Ie}`)}),h&&!ye&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:Te.map((Se,Ie)=>a.jsx("polygon",{points:Se.map(qe=>`${qe.x},${qe.y}`).join(" ")},Ie))})]}),oe&&F&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...f,top:`${ae.capTop}px`,left:`${ae.capLeft}px`,fontSize:`${$e*m}px`,lineHeight:`${$e*m}px`},children:oe}),q&&se&&(ye&&R||B)&&zn.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:se.top,left:se.left,width:se.width,height:se.height,zIndex:Tw,pointerEvents:"none"},children:[ye&&R&&a.jsx(hS,{P:e,box:{width:se.width,height:se.height},viewBox:r,contours:ye,snap:R.snap,stretchToBox:!I,stage:D,onStageChange:K,onSelectionChange:We,onChange:R.onChange,onCommit:R.onCommit}),B&&Ze&&a.jsx(fS,{P:e,box:{width:se.width,height:se.height},bounds:Ze,natural:le,imageUrl:v,maskPath:Be,stage:D,onStageChange:K,focalX:Xe,focalY:Le,scale:He,onChange:B.onChange,onCommit:B.onCommit})]}),q),a.jsx("div",{className:`${e}-a11y`,children:G.map((Se,Ie)=>a.jsx("p",{children:Se},Ie))})]})}function SS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:d}=O.useScopedStyles(),c=s.useMemo(()=>lS(d),[d]),u=n??!1,p=!!r||!!o,x=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),b=(e==null?void 0:e.shape)??"rectangle",m=(e==null?void 0:e.customPath)??"",h=(e==null?void 0:e.pathFit)??"stretch",f=s.useMemo(()=>Lw(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),v=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",C=(e==null?void 0:e.textAlign)??"left",y=((e==null?void 0:e.overflowMode)??"clip")==="visible",S=((e==null?void 0:e.fitText)??"off")==="on",j=((e==null?void 0:e.dropCap)??"off")==="on"?Math.max(2,Math.round((e==null?void 0:e.dropCapLines)??3)):0,N=(e==null?void 0:e.dropCapSize)??$w,U=u&&p&&!i,[W,R]=s.useState(!1);s.useEffect(()=>{if(!u||!p){R(!1);return}const Q=()=>R(!0),ae=()=>R(!1),$e=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],ke=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const xe of $e)window.addEventListener(xe,Q);for(const xe of ke)window.addEventListener(xe,ae);return()=>{for(const xe of $e)window.removeEventListener(xe,Q);for(const xe of ke)window.removeEventListener(xe,ae)}},[u,p]);const B=u&&p&&!i&&typeof l=="function",$=!W,T=Math.max(0,(e==null?void 0:e.pathSnap)??0),k=s.useRef(e??{}),E=s.useRef(""),g=[e==null?void 0:e.customPath,e==null?void 0:e.shape,e==null?void 0:e.pathFit,e==null?void 0:e.pathViewBox,e==null?void 0:e.imageScale,e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.image].join("\0");g!==E.current&&(E.current=g,k.current=e??{});const[A,F]=s.useState(null),[X,ee]=s.useState(!1),[P,D]=s.useState(!1),K=s.useCallback(()=>D(!1),[]),le=s.useMemo(()=>!A||A.serialized===m?m:A.serialized,[A,m]);s.useEffect(()=>{B||(ee(!1),D(!1))},[B]);const re=s.useMemo(()=>{if(!B)return null;if(A&&(A.base===m||A.serialized===m))return A.contours;const Q=Vo(m);return Q.length?Q:null},[B,A,m]),M=h==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===Gr&&!!(re&&!fu(re,f)),ie=s.useCallback((Q,ae,$e)=>{const ke=Go(Q);if(F(xe=>({base:xe&&(xe.base===m||xe.serialized===m)?xe.base:m,serialized:ke,contours:Q})),ae){const xe=k.current,V=$e!=null&&$e.preserveShape?xe.shape:"custom",pe={...xe,shape:V,customPath:ke};k.current=pe,l==null||l(pe)}},[m,l]),G=s.useMemo(()=>B?{contours:M?re:null,snap:T,needsConversion:!M,onConvert:Q=>{const ae=Go(Q);F({base:ae,serialized:ae,contours:Q});const $e={...k.current,pathFit:"viewbox",pathViewBox:Gr,customPath:ae};k.current=$e,l==null||l($e)},onChange:(Q,ae)=>{ee(!0),D(!!(ae!=null&&ae.carryImage)),ie(Q,!1)},onCommit:(Q,ae)=>{ie(Q,!0,ae),ee(!1)}}:null,[B,M,re,T,l,ie]),oe=v==="avoid"&&!!(e!=null&&e.image),te=s.useMemo(()=>({focalX:(e==null?void 0:e.imageFocalX)??.5,focalY:(e==null?void 0:e.imageFocalY)??.5,scale:(e==null?void 0:e.imageScale)??1}),[e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.imageScale]),[ye,Me]=s.useState(null),w=ye??te,Y=s.useCallback(Q=>Me(Q),[]),I=s.useCallback(Q=>{Me(Q);const ae={...k.current,imageFocalX:Q.focalX,imageFocalY:Q.focalY,imageScale:Q.scale};k.current=ae,l==null||l(ae)},[l]);s.useEffect(()=>{ye&&Math.abs(ye.focalX-te.focalX)<1e-9&&Math.abs(ye.focalY-te.focalY)<1e-9&&Math.abs(ye.scale-te.scale)<1e-9&&Me(null)},[ye,te]);const z=s.useMemo(()=>!B||!oe?null:{onChange:Y,onCommit:I},[B,oe,Y,I]),[H,Te]=s.useState(void 0),fe=s.useRef(void 0),ve=s.useCallback(Q=>{const ae=fe.current;ae!==void 0&&Math.abs(ae-Q)<.005||(fe.current=Q,Te(Q))},[]),de=s.useMemo(()=>S&&typeof H=="number"?H:1,[H,S]),he=Q=>`calc(${Q} * var(--${d}-fit, 1))`,we=s.useMemo(()=>{var Q,ae,$e,ke,xe;return{fontFamily:uo(e==null?void 0:e.textFontFamily),fontWeight:(Q=e==null?void 0:e.textFontSettings)==null?void 0:Q.fontWeight,fontStyle:(ae=e==null?void 0:e.textFontSettings)==null?void 0:ae.fontStyle,fontSize:he(O.scalingValue((e==null?void 0:e.textFontSize)??.012,u)),lineHeight:he(O.scalingValue((e==null?void 0:e.textLineHeight)??(e==null?void 0:e.textFontSize)??.012,u)),letterSpacing:he(O.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:he(O.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:($e=e==null?void 0:e.textTextAppearance)==null?void 0:$e.textTransform,textDecoration:(ke=e==null?void 0:e.textTextAppearance)==null?void 0:ke.textDecoration,fontVariant:(xe=e==null?void 0:e.textTextAppearance)==null?void 0:xe.fontVariant}},[e,u,d]),Z={[`--${d}-text-color`]:(e==null?void 0:e.textColor)??"#000000",[`--${d}-link-color`]:(e==null?void 0:e.linkColor)??(e==null?void 0:e.textColor)??"#000000",[`--${d}-background-color`]:(e==null?void 0:e.backgroundColor)??"transparent"};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{className:`${d}-wrapper`,style:{...Z},children:a.jsx(wS,{P:d,item:x,shape:b,customPath:m,pathFit:h,viewBox:f,mode:v,align:C,allowOverflow:y,fitEnabled:S,scale:de,onFitScale:ve,dropCapLines:j,dropCapSize:N,showGuides:(U||B)&&$,typography:we,imageUrl:v==="avoid"?e==null?void 0:e.image:null,imageFocalX:w.focalX,imageFocalY:w.focalY,imageScale:w.scale,imageCustomPath:le,pathDragActive:X,pathCarryImage:P,onCarryImageConsumed:K,pathEditor:$?G:null,imageEditor:$?z:null})})]})}const CS=`import { useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from 'react';
23813
23827
  import type React from 'react';
23814
23828
  import { createPortal } from 'react-dom';
23815
23829
  import { CommonComponentProps } from '../props';
@@ -24811,49 +24825,223 @@ export function nearestSegmentHit(contours: VecContour[], point: Pt): {
24811
24825
  return best;
24812
24826
  }
24813
24827
 
24814
- /** No bezier handles on either side — a plain straight-line corner. */
24815
- function isCornerNode(node: VecNode): boolean {
24816
- return !node.in && !node.out;
24817
- }
24818
-
24819
24828
  /**
24820
- * Anchors of the shape's other straight-line corners — targets a dragged
24821
- * corner can axis-align with. Curve anchors and handles are excluded: lining
24822
- * a bezier point up on an axis fights the curve rather than helping it.
24829
+ * Every other anchor in the shape — what a dragged anchor can axis-align
24830
+ * with. Curve anchors count as targets and as draggers: an anchor carries its
24831
+ * handles with it, so lining one up on an axis slides the curve rather than
24832
+ * reshaping it. Handle tips stay out; those snap by angle, not by axis.
24823
24833
  */
24824
24834
  function collectSnapTargets(contours: VecContour[], exclude: { contour: number; node: number }): Pt[] {
24825
24835
  const points: Pt[] = [];
24826
24836
  contours.forEach((contour, contourIndex) => {
24827
24837
  contour.nodes.forEach((node, nodeIndex) => {
24828
24838
  if (contourIndex === exclude.contour && nodeIndex === exclude.node) return;
24829
- if (!isCornerNode(node)) return;
24830
24839
  points.push(node.p);
24831
24840
  });
24832
24841
  });
24833
24842
  return points;
24834
24843
  }
24835
24844
 
24845
+ /** A snapped coordinate on one axis, plus the point it was borrowed from. */
24846
+ type AxisSnap = { value: number; from: Pt };
24847
+
24836
24848
  /**
24837
24849
  * Nearest candidate's coordinate on one axis, independent of the other axis —
24838
24850
  * so a point can align its X with another point's X (or Y with Y) no matter
24839
24851
  * how far apart they sit on the other axis, the way alignment guides work.
24840
24852
  * Compared in pixel space via \`toPx\`. Null when nothing is within \`reach\`.
24841
24853
  */
24842
- function nearestAxisSnap(points: Pt[], target: Pt, axis: 'x' | 'y', toPx: (point: Pt) => Pt, reach: number): number | null {
24854
+ function nearestAxisSnap(points: Pt[], target: Pt, axis: 'x' | 'y', toPx: (point: Pt) => Pt, reach: number): AxisSnap | null {
24843
24855
  const targetPx = toPx(target);
24844
- let best: number | null = null;
24856
+ let best: AxisSnap | null = null;
24845
24857
  let bestDistance = reach;
24846
24858
  for (const point of points) {
24847
24859
  const pointPx = toPx(point);
24848
24860
  const distance = Math.abs(pointPx[axis] - targetPx[axis]);
24849
24861
  if (distance <= bestDistance) {
24850
24862
  bestDistance = distance;
24851
- best = point[axis];
24863
+ best = { value: point[axis], from: point };
24852
24864
  }
24853
24865
  }
24854
24866
  return best;
24855
24867
  }
24856
24868
 
24869
+ /* ------------------------------------------------------------------ *
24870
+ * Smart snapping for curve points
24871
+ *
24872
+ * An anchor snaps by axis (above) whether or not it carries handles. A
24873
+ * bezier handle can't: its X and Y mean nothing on their own, only the ray
24874
+ * it makes with its anchor does. So handles snap by direction and length
24875
+ * instead — the tangent that keeps the node smooth, the 45° family, and the
24876
+ * opposite handle's length.
24877
+ * ------------------------------------------------------------------ */
24878
+
24879
+ /** Directions a dragged handle settles onto, on top of the smooth tangent. */
24880
+ const HANDLE_ANGLE_STEP = Math.PI / 4;
24881
+ /** How far off that ray a handle may sit and still snap onto it, in pixels. */
24882
+ const HANDLE_ANGLE_REACH = 8;
24883
+ /** ...and how far off in angle, so a short handle doesn't snap from anywhere. */
24884
+ const HANDLE_ANGLE_LIMIT = Math.PI / 18;
24885
+ /** Pixel gap that still reads as "the same length as the other handle". */
24886
+ const HANDLE_LENGTH_REACH = 8;
24887
+ /** How far past the points it explains a guide keeps drawing, in pixels. */
24888
+ const GUIDE_OVERSHOOT = 24;
24889
+
24890
+ /**
24891
+ * A line painted while a snap is holding, in the editor's own pixel space.
24892
+ * Without it a snap that moved the point three pixels is indistinguishable
24893
+ * from a steady hand, and the user never learns the snaps are there.
24894
+ */
24895
+ type SnapGuide = { kind: 'align' | 'angle'; a: Pt; b: Pt };
24896
+
24897
+ const NO_GUIDES: SnapGuide[] = [];
24898
+
24899
+ function sameGuides(a: SnapGuide[], b: SnapGuide[]): boolean {
24900
+ return a.length === b.length && a.every((guide, index) => (
24901
+ guide.kind === b[index].kind
24902
+ && guide.a.x === b[index].a.x && guide.a.y === b[index].a.y
24903
+ && guide.b.x === b[index].b.x && guide.b.y === b[index].b.y
24904
+ ));
24905
+ }
24906
+
24907
+ /** Wraps an angle into (-π, π], so two directions can be compared. */
24908
+ function normalizeAngle(angle: number): number {
24909
+ const turn = Math.PI * 2;
24910
+ return ((angle + Math.PI) % turn + turn) % turn - Math.PI;
24911
+ }
24912
+
24913
+ function unitVector(from: Pt, to: Pt): Pt | null {
24914
+ const dx = to.x - from.x;
24915
+ const dy = to.y - from.y;
24916
+ const length = Math.hypot(dx, dy);
24917
+ if (length < 1e-6) return null;
24918
+ return { x: dx / length, y: dy / length };
24919
+ }
24920
+
24921
+ /** One alignment line, run past both ends so it reads as a guide, not a chord. */
24922
+ function alignmentGuide(from: Pt, to: Pt): SnapGuide {
24923
+ const direction = unitVector(from, to);
24924
+ if (!direction) return { kind: 'align', a: from, b: to };
24925
+ return {
24926
+ kind: 'align',
24927
+ a: { x: from.x - direction.x * GUIDE_OVERSHOOT, y: from.y - direction.y * GUIDE_OVERSHOOT },
24928
+ b: { x: to.x + direction.x * GUIDE_OVERSHOOT, y: to.y + direction.y * GUIDE_OVERSHOOT },
24929
+ };
24930
+ }
24931
+
24932
+ /**
24933
+ * Lines for whichever axis snaps actually decided where the anchor landed.
24934
+ * Shift-locking an axis can override a snap, and a guide for an alignment
24935
+ * that isn't holding is worse than no guide at all.
24936
+ */
24937
+ function axisGuides(landing: Pt, snapX: AxisSnap | null, snapY: AxisSnap | null, toPx: (point: Pt) => Pt): SnapGuide[] {
24938
+ const guides: SnapGuide[] = [];
24939
+ const landingPx = toPx(landing);
24940
+ if (snapX && landing.x === snapX.value) guides.push(alignmentGuide(landingPx, toPx(snapX.from)));
24941
+ if (snapY && landing.y === snapY.value) guides.push(alignmentGuide(landingPx, toPx(snapY.from)));
24942
+ return guides;
24943
+ }
24944
+
24945
+ /**
24946
+ * The direction that keeps a node smooth: the continuation, through the
24947
+ * anchor, of whatever enters it from the handle's other side — the opposite
24948
+ * handle if the node has one, else the neighbour's control point on that
24949
+ * segment, else the neighbouring anchor itself when the segment is straight.
24950
+ * Snapping onto it is what lets a curve leave a straight edge, or a corner
24951
+ * become properly smooth, without eyeballing the angle. Pixel space, so the
24952
+ * snap follows what the user sees even on a stretched preset.
24953
+ */
24954
+ function smoothTangent(
24955
+ contour: VecContour | undefined,
24956
+ nodeIndex: number,
24957
+ which: 'in' | 'out',
24958
+ toPx: (point: Pt) => Pt,
24959
+ ): Pt | null {
24960
+ const node = contour?.nodes[nodeIndex];
24961
+ if (!contour || !node) return null;
24962
+ const anchorPx = toPx(node.p);
24963
+ const opposite = which === 'in' ? node.out : node.in;
24964
+ if (opposite) return unitVector(toPx(opposite), anchorPx);
24965
+ const count = contour.nodes.length;
24966
+ const neighbourIndex = nodeIndex + (which === 'in' ? 1 : -1);
24967
+ if (!contour.closed && (neighbourIndex < 0 || neighbourIndex >= count)) return null;
24968
+ const neighbour = contour.nodes[(neighbourIndex + count) % count];
24969
+ if (!neighbour) return null;
24970
+ // With our own handle missing, the segment's tangent at this anchor runs
24971
+ // from the neighbour's control point — or from the neighbour itself when
24972
+ // that side has no handles either, i.e. a plain straight edge.
24973
+ const control = (which === 'in' ? neighbour.in : neighbour.out) ?? neighbour.p;
24974
+ return unitVector(toPx(control), anchorPx);
24975
+ }
24976
+
24977
+ /**
24978
+ * Settles a dragged handle onto whichever smart target it is already close
24979
+ * to: the smooth tangent first — a curve that doesn't kink beats a round
24980
+ * angle — then the 45° family, which is where the horizontal and vertical
24981
+ * tangents that make circles and rounded corners come out clean live. Length
24982
+ * is decided separately, so a curve can be made symmetric with its other
24983
+ * handle without measuring. \`lock\` (shift) takes the nearest 45° step no
24984
+ * matter how far off it is. Empty guides mean nothing snapped.
24985
+ */
24986
+ function snapHandlePoint(
24987
+ point: Pt,
24988
+ anchor: Pt,
24989
+ tangent: Pt | null,
24990
+ oppositeLength: number | null,
24991
+ lock: boolean,
24992
+ toPx: (point: Pt) => Pt,
24993
+ fromPx: (point: Pt) => Pt,
24994
+ ): { point: Pt; guides: SnapGuide[] } {
24995
+ const anchorPx = toPx(anchor);
24996
+ const pointPx = toPx(point);
24997
+ const dx = pointPx.x - anchorPx.x;
24998
+ const dy = pointPx.y - anchorPx.y;
24999
+ const length = Math.hypot(dx, dy);
25000
+ // A handle sitting on its anchor has no direction to snap.
25001
+ if (length < 1e-6) return { point, guides: NO_GUIDES };
25002
+ const angle = Math.atan2(dy, dx);
25003
+ const step = Math.round(angle / HANDLE_ANGLE_STEP) * HANDLE_ANGLE_STEP;
25004
+
25005
+ let snappedAngle: number | null = lock ? step : null;
25006
+ let smooth = false;
25007
+ if (!lock) {
25008
+ const candidates: { angle: number; smooth: boolean }[] = [];
25009
+ if (tangent) candidates.push({ angle: Math.atan2(tangent.y, tangent.x), smooth: true });
25010
+ candidates.push({ angle: step, smooth: false });
25011
+ for (const candidate of candidates) {
25012
+ const delta = normalizeAngle(candidate.angle - angle);
25013
+ if (Math.abs(delta) > HANDLE_ANGLE_LIMIT) continue;
25014
+ // Perpendicular distance, not raw angle: a long handle has to be held
25015
+ // much straighter than a short one to read as "on the ray".
25016
+ if (Math.abs(Math.sin(delta)) * length > HANDLE_ANGLE_REACH) continue;
25017
+ snappedAngle = candidate.angle;
25018
+ smooth = candidate.smooth;
25019
+ break;
25020
+ }
25021
+ }
25022
+
25023
+ const matchLength = oppositeLength !== null
25024
+ && oppositeLength > 0
25025
+ && Math.abs(length - oppositeLength) <= HANDLE_LENGTH_REACH;
25026
+ if (snappedAngle === null && !matchLength) return { point, guides: NO_GUIDES };
25027
+
25028
+ const finalAngle = snappedAngle ?? angle;
25029
+ const finalLength = matchLength ? oppositeLength as number : length;
25030
+ const direction = { x: Math.cos(finalAngle), y: Math.sin(finalAngle) };
25031
+ // The guide runs past the handle, and back through the anchor whenever the
25032
+ // far side is part of what snapped — a smooth ray, or a matched length.
25033
+ const forward = finalLength + (snappedAngle === null ? 0 : GUIDE_OVERSHOOT);
25034
+ const back = matchLength ? finalLength : (smooth ? GUIDE_OVERSHOOT : 0);
25035
+ return {
25036
+ point: fromPx({ x: anchorPx.x + direction.x * finalLength, y: anchorPx.y + direction.y * finalLength }),
25037
+ guides: [{
25038
+ kind: 'angle',
25039
+ a: { x: anchorPx.x - direction.x * back, y: anchorPx.y - direction.y * back },
25040
+ b: { x: anchorPx.x + direction.x * forward, y: anchorPx.y + direction.y * forward },
25041
+ }],
25042
+ };
25043
+ }
25044
+
24857
25045
  /**
24858
25046
  * Parses a user-authored path: either an SVG path (\`M0,0 C…\`, several subpaths
24859
25047
  * allowed — each becomes a ring, so overlaps read as holes) or a plain point
@@ -25369,6 +25557,16 @@ function getCSS(P: string): string {
25369
25557
  .\${P}-editor-scale-grab-nesw {
25370
25558
  cursor: nesw-resize;
25371
25559
  }
25560
+ /* Snap feedback. Deliberately not the editor's orange: a guide has to be
25561
+ readable *through* the outline and handles it is drawn across. */
25562
+ .\${P}-editor-snap {
25563
+ stroke: #00B2FF;
25564
+ stroke-width: 1;
25565
+ pointer-events: none;
25566
+ }
25567
+ .\${P}-editor-snap-angle {
25568
+ stroke-dasharray: 4 3;
25569
+ }
25372
25570
  .\${P}-editor-handle-line {
25373
25571
  stroke: #FF5C02;
25374
25572
  stroke-width: 1;
@@ -25454,8 +25652,8 @@ type PathDrag = {
25454
25652
  origin: Pt;
25455
25653
  anchor: Pt;
25456
25654
  mirror: boolean;
25457
- /** Axis snapping only makes sense for a straight-line corner, not a curve's anchor or handle. */
25458
- snapEligible: boolean;
25655
+ /** ⌘/Ctrl was down at pointer-down: switch the node's type if it never moves. */
25656
+ toggleOnRelease: boolean;
25459
25657
  moved: boolean;
25460
25658
  };
25461
25659
 
@@ -25659,6 +25857,13 @@ function PretextPathEditor({ P, box, viewBox, contours, snap, stretchToBox, stag
25659
25857
  const groupDragRef = useRef<GroupDrag | null>(null);
25660
25858
  /** Multiple nodes at once — shift-click adds/removes a node from this set. */
25661
25859
  const [selection, setSelection] = useState<PathSelection[]>([]);
25860
+ /** Lines for the snap currently holding, in this editor's px space. */
25861
+ const [snapGuides, setSnapGuides] = useState<SnapGuide[]>(NO_GUIDES);
25862
+ // Guides are recomputed on every pointer move but only change on the frames
25863
+ // a snap starts or stops, so bail out of the identical ones.
25864
+ const showSnapGuides = useCallback((next: SnapGuide[]) => {
25865
+ setSnapGuides(current => (sameGuides(current, next) ? current : next));
25866
+ }, []);
25662
25867
  const shapeArmed = stage === 'shape';
25663
25868
 
25664
25869
  // Move keyboard focus onto this editor whenever the host arms shape editing,
@@ -25702,6 +25907,18 @@ function PretextPathEditor({ P, box, viewBox, contours, snap, stretchToBox, stag
25702
25907
  }
25703
25908
  ), [stretchToBox, viewBox, scaleX, scaleY]);
25704
25909
 
25910
+ const fromPx = useCallback((point: Pt): Pt => (
25911
+ stretchToBox
25912
+ ? {
25913
+ x: viewBox.x + (scaleX > 0 ? point.x / scaleX : 0),
25914
+ y: viewBox.y + (scaleY > 0 ? point.y / scaleY : 0),
25915
+ }
25916
+ : {
25917
+ x: viewBox.x + point.x,
25918
+ y: viewBox.y + point.y,
25919
+ }
25920
+ ), [stretchToBox, viewBox, scaleX, scaleY]);
25921
+
25705
25922
  const toPath = useCallback((clientX: number, clientY: number): Pt => {
25706
25923
  const rect = svgRef.current?.getBoundingClientRect();
25707
25924
  if (!rect || rect.width <= 0 || rect.height <= 0) return { x: 0, y: 0 };
@@ -25822,36 +26039,80 @@ function PretextPathEditor({ P, box, viewBox, contours, snap, stretchToBox, stag
25822
26039
  event.stopPropagation();
25823
26040
  event.preventDefault();
25824
26041
  const point = toPath(event.clientX, event.clientY);
25825
- const targets = drag.snapEligible
25826
- ? collectSnapTargets(contoursRef.current, { contour: drag.contour, node: drag.node })
25827
- : [];
25828
- const snapX = drag.snapEligible ? nearestAxisSnap(targets, point, 'x', toPx, NODE_SNAP_REACH) : null;
25829
- const snapY = drag.snapEligible ? nearestAxisSnap(targets, point, 'y', toPx, NODE_SNAP_REACH) : null;
25830
- const snapped = {
25831
- x: snapX ?? snapValue(point.x, snap),
25832
- y: snapY ?? snapValue(point.y, snap),
25833
- };
26042
+ // ⌘/Ctrl suspends snapping for as long as it's held — for the times a
26043
+ // point belongs a hair off the alignment the editor keeps offering. It
26044
+ // takes the grid with it: "free" has to mean free, or the user is still
26045
+ // fighting something. Shift's constraints are asked for outright, so they
26046
+ // go on working alongside it. Read live off the move rather than latched
26047
+ // at pointer-down, so it can be pressed and released mid-drag.
26048
+ const freeDrag = event.metaKey || event.ctrlKey;
25834
26049
  if (drag.kind === 'anchor') {
25835
- let dx = snapped.x - drag.origin.x;
25836
- let dy = snapped.y - drag.origin.y;
26050
+ // Snap where the *anchor* would land, not where the pointer is: the grab
26051
+ // radius puts the two a few pixels apart, so aligning the pointer leaves
26052
+ // the point itself that far out of line.
26053
+ const raw = {
26054
+ x: drag.anchor.x + (point.x - drag.origin.x),
26055
+ y: drag.anchor.y + (point.y - drag.origin.y),
26056
+ };
26057
+ const targets = freeDrag ? [] : collectSnapTargets(contoursRef.current, { contour: drag.contour, node: drag.node });
26058
+ const snapX = nearestAxisSnap(targets, raw, 'x', toPx, NODE_SNAP_REACH);
26059
+ const snapY = nearestAxisSnap(targets, raw, 'y', toPx, NODE_SNAP_REACH);
26060
+ const landing = freeDrag
26061
+ ? raw
26062
+ : {
26063
+ x: snapX?.value ?? snapValue(raw.x, snap),
26064
+ y: snapY?.value ?? snapValue(raw.y, snap),
26065
+ };
25837
26066
  if (event.shiftKey) {
25838
- if (Math.abs(dx) > Math.abs(dy)) dy = 0;
25839
- else dx = 0;
26067
+ if (Math.abs(landing.x - drag.anchor.x) > Math.abs(landing.y - drag.anchor.y)) landing.y = drag.anchor.y;
26068
+ else landing.x = drag.anchor.x;
25840
26069
  }
25841
26070
  // A click that never travels selects and nothing more.
25842
- if (!drag.moved && dx === 0 && dy === 0) return;
26071
+ if (!drag.moved && landing.x === drag.anchor.x && landing.y === drag.anchor.y) return;
25843
26072
  drag.moved = true;
25844
- onChange(moveNodeTo(contoursRef.current, drag.contour, drag.node, {
25845
- x: drag.anchor.x + dx,
25846
- y: drag.anchor.y + dy,
25847
- }));
26073
+ showSnapGuides(axisGuides(landing, snapX, snapY, toPx));
26074
+ onChange(moveNodeTo(contoursRef.current, drag.contour, drag.node, landing));
25848
26075
  return;
25849
26076
  }
26077
+ // A handle's X and Y mean nothing on their own, so it snaps by the ray it
26078
+ // makes with its anchor instead: the smooth tangent, the 45° family, and
26079
+ // the opposite handle's length. Only when none of those catch does it fall
26080
+ // back to the coordinate grid.
26081
+ const node = contoursRef.current[drag.contour]?.nodes[drag.node];
26082
+ const mirroring = drag.mirror && !event.altKey;
26083
+ // A mirrored opposite is a reflection of the handle being dragged: it is
26084
+ // collinear and equal-length by construction, so offering it as a target
26085
+ // would only snap the handle onto where it already is.
26086
+ const opposite = mirroring || freeDrag ? null : (drag.kind === 'in' ? node?.out : node?.in);
26087
+ const anchorPx = node ? toPx(node.p) : null;
26088
+ const oppositePx = opposite ? toPx(opposite) : null;
26089
+ // Under ⌘/Ctrl the only thing left is shift's outright 45° lock, so skip
26090
+ // the search entirely unless shift is down — every target it could offer
26091
+ // has just been withdrawn.
26092
+ const smart = node && (!freeDrag || event.shiftKey)
26093
+ ? snapHandlePoint(
26094
+ point,
26095
+ node.p,
26096
+ mirroring || freeDrag ? null : smoothTangent(contoursRef.current[drag.contour], drag.node, drag.kind, toPx),
26097
+ anchorPx && oppositePx ? Math.hypot(oppositePx.x - anchorPx.x, oppositePx.y - anchorPx.y) : null,
26098
+ event.shiftKey,
26099
+ toPx,
26100
+ fromPx,
26101
+ )
26102
+ : { point, guides: NO_GUIDES };
26103
+ const landing = smart.guides.length
26104
+ ? smart.point
26105
+ : (freeDrag ? point : { x: snapValue(point.x, snap), y: snapValue(point.y, snap) });
26106
+ const current = drag.kind === 'in' ? node?.in : node?.out;
26107
+ // A click that never travels leaves the handle alone, same as an anchor.
26108
+ if (!drag.moved && current && landing.x === current.x && landing.y === current.y) return;
25850
26109
  drag.moved = true;
25851
- onChange(setNodeHandle(contoursRef.current, drag.contour, drag.node, drag.kind, snapped, drag.mirror && !event.altKey));
26110
+ showSnapGuides(smart.guides);
26111
+ onChange(setNodeHandle(contoursRef.current, drag.contour, drag.node, drag.kind, landing, mirroring));
25852
26112
  };
25853
26113
 
25854
26114
  const endDrag = (event: React.PointerEvent) => {
26115
+ showSnapGuides(NO_GUIDES);
25855
26116
  const shapeScale = shapeScaleRef.current;
25856
26117
  if (shapeScale && event.pointerId === shapeScale.pointerId) {
25857
26118
  shapeScaleRef.current = null;
@@ -25890,7 +26151,15 @@ function PretextPathEditor({ P, box, viewBox, contours, snap, stretchToBox, stag
25890
26151
  event.stopPropagation();
25891
26152
  const svg = svgRef.current;
25892
26153
  if (svg?.hasPointerCapture(drag.pointerId)) svg.releasePointerCapture(drag.pointerId);
25893
- if (drag.moved) commitContours(contoursRef.current);
26154
+ if (drag.moved) {
26155
+ commitContours(contoursRef.current);
26156
+ return;
26157
+ }
26158
+ if (!drag.toggleOnRelease) return;
26159
+ const next = toggleNodeSmooth(contoursRef.current, drag.contour, drag.node);
26160
+ if (next === contoursRef.current) return;
26161
+ onChange(next);
26162
+ commitContours(next);
25894
26163
  };
25895
26164
 
25896
26165
 
@@ -25959,22 +26228,17 @@ function PretextPathEditor({ P, box, viewBox, contours, snap, stretchToBox, stag
25959
26228
  commitContours(next);
25960
26229
  return;
25961
26230
  }
25962
- // Cmd (ctrl off Mac) switches the node's type instead of dragging: a
25963
- // straight corner grows bezier handles from its neighbours, a curve point
25964
- // drops them. Handles crowd the anchor on tight curves, so a click that
25965
- // lands on one still targets the node it belongs to rather than missing.
25966
- if (event.metaKey || event.ctrlKey) {
25967
- const next = toggleNodeSmooth(contours, contourIndex, nodeIndex);
25968
- if (next === contours) return;
25969
- // Single selection so the new handles (single-node controls) show up.
25970
- setSelection([{ contour: contourIndex, node: nodeIndex }]);
25971
- onChange(next);
25972
- commitContours(next);
25973
- return;
25974
- }
26231
+ // Cmd (ctrl off Mac) switches the node's type: a straight corner grows
26232
+ // bezier handles from its neighbours, a curve point drops them. Handles
26233
+ // crowd the anchor on tight curves, so a click that lands on one still
26234
+ // targets the node it belongs to rather than missing. Held through a drag
26235
+ // the same key means the opposite — leave the node as it is and let it
26236
+ // move unsnapped — so the switch waits for a release that never travelled,
26237
+ // and the branches below stand aside for it.
26238
+ const toggleOnRelease = event.metaKey || event.ctrlKey;
25975
26239
  // Shift-click an anchor toggles it into/out of the multi-selection
25976
26240
  // instead of dragging — mirrors the usual vector-editor convention.
25977
- if (kind === 'anchor' && event.shiftKey) {
26241
+ if (kind === 'anchor' && event.shiftKey && !toggleOnRelease) {
25978
26242
  setSelection(current => (
25979
26243
  current.some(entry => entry.contour === contourIndex && entry.node === nodeIndex)
25980
26244
  ? current.filter(entry => !(entry.contour === contourIndex && entry.node === nodeIndex))
@@ -25984,7 +26248,7 @@ function PretextPathEditor({ P, box, viewBox, contours, snap, stretchToBox, stag
25984
26248
  }
25985
26249
  // A plain click on an anchor that's already part of a multi-selection
25986
26250
  // drags the whole group together; anything else replaces the selection.
25987
- if (kind === 'anchor' && selection.length > 1
26251
+ if (kind === 'anchor' && !toggleOnRelease && selection.length > 1
25988
26252
  && selection.some(entry => entry.contour === contourIndex && entry.node === nodeIndex)) {
25989
26253
  groupDragRef.current = {
25990
26254
  pointerId: event.pointerId,
@@ -26005,7 +26269,7 @@ function PretextPathEditor({ P, box, viewBox, contours, snap, stretchToBox, stag
26005
26269
  origin: toPath(event.clientX, event.clientY),
26006
26270
  anchor: node.p,
26007
26271
  mirror: kind !== 'anchor' && Boolean(node.in && node.out),
26008
- snapEligible: kind === 'anchor' && isCornerNode(node),
26272
+ toggleOnRelease,
26009
26273
  moved: false,
26010
26274
  };
26011
26275
  svgRef.current?.setPointerCapture(event.pointerId);
@@ -26122,6 +26386,16 @@ function PretextPathEditor({ P, box, viewBox, contours, snap, stretchToBox, stag
26122
26386
  />
26123
26387
  {showControls && <path className={\`\${P}-editor-hit\`} d={outline} onClick={insertNode} />}
26124
26388
  {showControls && <path className={\`\${P}-editor-outline\`} d={outline} />}
26389
+ {showControls && snapGuides.map((guide, index) => (
26390
+ <line
26391
+ key={\`\${guide.kind}-\${index}\`}
26392
+ className={\`\${P}-editor-snap \${P}-editor-snap-\${guide.kind}\`}
26393
+ x1={guide.a.x}
26394
+ y1={guide.a.y}
26395
+ x2={guide.b.x}
26396
+ y2={guide.b.y}
26397
+ />
26398
+ ))}
26125
26399
  {/* Body hit target for whole-shape drag while armed. */}
26126
26400
  <path
26127
26401
  ref={bodyPathRef}
@@ -27534,4 +27808,4 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
27534
27808
  </>
27535
27809
  );
27536
27810
  }
27537
- `,Fc=[...au],pS={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},mS={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",title:"Shape",display:{type:"drop-down",label:"Shape",enum:Fc},enum:Fc},customPath:{type:"string",scope:"layout",title:"Path",tooltip:"SVG path (M…) or a point list (0,0 100,0 50,100). Used when Shape is set to custom.",display:{type:"full-width-input",placeholder:"M0,0 C…"}},pathSnap:{type:"number",scope:"common",title:"Snap",tooltip:"Grid the points snap to while dragging, in path units (the path box is 100 x 100). 0 is off.",min:0,max:25,step:.5,display:{type:"numeric-input"}},pathFit:{type:"string",scope:"common",title:"Path fit",tooltip:"Stretch — the drawing fills the box. Viewbox — the drawing keeps its position in path coordinates (0–100).",display:{type:"toggle-cycle",enum:["stretch","viewbox"]}},shapeMode:{type:"string",scope:"common",title:"",tooltip:"A — text fills the path. B — text flows around the path.",display:{type:"radio-group"},enum:["A","B"]},fitText:{type:"string",scope:"common",title:"Fit text",tooltip:"Scales the type down until all text fits the path.",display:{type:"toggle-cycle",enum:["off","on"]}},dropCap:{type:"string",scope:"common",title:"Drop cap",display:{type:"toggle-cycle",enum:["off","on"]}},dropCapLines:{type:"number",scope:"common",title:"Drop cap lines",min:2,max:8,step:1,display:{type:"numeric-input"}},dropCapSize:{type:"number",scope:"common",title:"Drop cap size",tooltip:"Height of the drop cap, in lines of body text.",min:1,max:8,step:.5,display:{type:"common-numeric-input"}},image:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},backgroundColor:{type:"string",scope:"common",title:"Background",display:{type:"settings-color-picker"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...pS.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textAlign:{type:"string",scope:"layout",title:"",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textTextAppearance:{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"]}}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"style-panel-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link",display:{type:"style-panel-color-picker"}}},defaults:{shape:"diamond",customPath:"",pathSnap:0,pathFit:"stretch",shapeMode:"A",fitText:"off",dropCap:"off",dropCapLines:3,dropCapSize:3,image:null,backgroundColor:"rgba(0, 0, 0, 0)",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textAlign:"center",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",linkColor:"#000000"},layoutDefaults:{m:{textFontSize:.037,textLineHeight:.048,textLetterSpacing:0,textWordSpacing:0},t:{textFontSize:.018,textLineHeight:.024,textLetterSpacing:0,textWordSpacing:0},d:{textFontSize:.011,textLineHeight:.0155,textLetterSpacing:0,textWordSpacing:0}},layout:["__componentName__","shape","customPath","pathSnap","pathFit","shapeMode","fitText","dropCap","dropCapLines","dropCapSize","image"],displayRules:[{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.image.display.visible",value:!1}},{if:{name:"dropCap",value:"on",isNotEqual:!0},then:{name:"properties.dropCapSize.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["shapeMode"]},{type:"row",items:["shape"]},{type:"row",items:["image","dropCap"]},{type:"row",items:["dropCapSize"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textAlign","textTextAppearance"]}]}],paletteBookmark:{items:["textColor","linkColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0,addItemFromFileExplorer:!1},display:{type:"array"},items:{type:"object",properties:{text:{label:"Text",placeholder:"Add Text...",display:{type:"rich-text"}}}},default:[{text:[{type:"paragraph",children:[{text:"Style is viewed by many as a shallow obsession with disembodied surfaces. However our activities as designers are based on style’s function as a cultural communicator. A vocabulary or set of formal characteristics constitutes a particular style, recognized most frequently in retrospect. Style itself is the visual language of a culture: in fashion, in consumer goods, in art, in literature, in all media. Style is ephemeral; it is timely. To be in style is to embody the influences and values of your time."}]}]}]}},gS={element:dS,id:"pretext",name:"Pretext",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||au.indexOf(n)===-1?e:{...e,...Aw(n,1,t)}},defaultSize:{d:{width:380,height:382},t:{width:380,height:382},m:{width:334,height:336}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple-Marquee.mp4"},schema:mS,sourceCode:uS,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},hS=[Rm,Fm,Px,Ig,_g,Gg,dh,_h,zh,Uh,wf,gy,vv,Rv,cx,bx,Bx,W0,Jx,eb,Mb,hw,gS];exports.components=hS;exports.isSchemaV1=vu;
27811
+ `,Dc=[...uu],$S={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},TS={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",title:"Shape",display:{type:"drop-down",label:"Shape",enum:Dc},enum:Dc},customPath:{type:"string",scope:"layout",title:"Path",tooltip:"SVG path (M…) or a point list (0,0 100,0 50,100). Used when Shape is set to custom.",display:{type:"full-width-input",placeholder:"M0,0 C…"}},pathSnap:{type:"number",scope:"common",title:"Snap",tooltip:"Grid the points snap to while dragging, in path units (the path box is 100 x 100). 0 is off.",min:0,max:25,step:.5,display:{type:"numeric-input"}},pathFit:{type:"string",scope:"common",title:"Path fit",tooltip:"Stretch — the drawing fills the box. Viewbox — the drawing keeps its position in path coordinates (0–100).",display:{type:"toggle-cycle",enum:["stretch","viewbox"]}},shapeMode:{type:"string",scope:"common",title:"",tooltip:"A — text fills the path. B — text flows around the path.",display:{type:"radio-group"},enum:["A","B"]},fitText:{type:"string",scope:"common",title:"Fit text",tooltip:"Scales the type down until all text fits the path.",display:{type:"toggle-cycle",enum:["off","on"]}},dropCap:{type:"string",scope:"common",title:"Drop cap",display:{type:"toggle-cycle",enum:["off","on"]}},dropCapLines:{type:"number",scope:"common",title:"Drop cap lines",min:2,max:8,step:1,display:{type:"numeric-input"}},dropCapSize:{type:"number",scope:"common",title:"Drop cap size",tooltip:"Height of the drop cap, in lines of body text.",min:1,max:8,step:.5,display:{type:"common-numeric-input"}},image:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},backgroundColor:{type:"string",scope:"common",title:"Background",display:{type:"settings-color-picker"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...$S.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textAlign:{type:"string",scope:"layout",title:"",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textTextAppearance:{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"]}}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"style-panel-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link",display:{type:"style-panel-color-picker"}}},defaults:{shape:"diamond",customPath:"",pathSnap:0,pathFit:"stretch",shapeMode:"A",fitText:"off",dropCap:"off",dropCapLines:3,dropCapSize:3,image:null,backgroundColor:"rgba(0, 0, 0, 0)",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textAlign:"center",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",linkColor:"#000000"},layoutDefaults:{m:{textFontSize:.037,textLineHeight:.048,textLetterSpacing:0,textWordSpacing:0},t:{textFontSize:.018,textLineHeight:.024,textLetterSpacing:0,textWordSpacing:0},d:{textFontSize:.011,textLineHeight:.0155,textLetterSpacing:0,textWordSpacing:0}},layout:["__componentName__","shape","customPath","pathSnap","pathFit","shapeMode","fitText","dropCap","dropCapLines","dropCapSize","image"],displayRules:[{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.image.display.visible",value:!1}},{if:{name:"dropCap",value:"on",isNotEqual:!0},then:{name:"properties.dropCapSize.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["shapeMode"]},{type:"row",items:["shape"]},{type:"row",items:["image","dropCap"]},{type:"row",items:["dropCapSize"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textAlign","textTextAppearance"]}]}],paletteBookmark:{items:["textColor","linkColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0,addItemFromFileExplorer:!1},display:{type:"array"},items:{type:"object",properties:{text:{label:"Text",placeholder:"Add Text...",display:{type:"rich-text"}}}},default:[{text:[{type:"paragraph",children:[{text:"Style is viewed by many as a shallow obsession with disembodied surfaces. However our activities as designers are based on style’s function as a cultural communicator. A vocabulary or set of formal characteristics constitutes a particular style, recognized most frequently in retrospect. Style itself is the visual language of a culture: in fashion, in consumer goods, in art, in literature, in all media. Style is ephemeral; it is timely. To be in style is to embody the influences and values of your time."}]}]}]}},IS={element:SS,id:"pretext",name:"Pretext",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||uu.indexOf(n)===-1?e:{...e,...Ww(n,1,t)}},defaultSize:{d:{width:380,height:382},t:{width:380,height:382},m:{width:334,height:336}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple-Marquee.mp4"},schema:TS,sourceCode:CS,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},RS=[Mm,Hm,Av,Eg,Dg,Ug,gh,Dh,Xh,Qh,Tf,xy,Sx,Mx,mv,$v,Gv,B0,n0,ob,_b,vw,IS];exports.components=RS;exports.isSchemaV1=Su;