@cntrl-site/components 1.0.17-alpha.4 → 1.0.17-alpha.6

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 +807 -611
  2. package/dist/index.mjs +4079 -3802
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,150 +1,150 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),c=require("react"),Xt=require("classnames"),I=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Li=require("react-dom");function Ks(t){return t.type==="object"&&t.version===1}const Us="ControlSlider-module__wrapper___sHEkd",Gs="ControlSlider-module__hoverArrow___A-dOH",qs="ControlSlider-module__sliderItem___QQSkR",Xs="ControlSlider-module__sliderImage___9hRl-",Ys="ControlSlider-module__arrow___05ghY",Js="ControlSlider-module__arrowVertical___tBfVN",Zs="ControlSlider-module__nextArrow___-30Yc",Qs="ControlSlider-module__arrowInner___aEra3",ta="ControlSlider-module__arrowIcon___S4ztF",ea="ControlSlider-module__arrowImg___2dwJW",na="ControlSlider-module__mirror___brd6U",ia="ControlSlider-module__pagination___bicLF",oa="ControlSlider-module__paginationInner___bT-P-",ra="ControlSlider-module__paginationVertical___zYqKw",la="ControlSlider-module__paginationItem___nTRbk",sa="ControlSlider-module__dot___p1Qun",aa="ControlSlider-module__activeDot___LHFaj",ca="ControlSlider-module__paginationInsideBottom___R3FWn",da="ControlSlider-module__paginationInsideTop___V-qb-",ua="ControlSlider-module__paginationOutsideBottom___14w8D",pa="ControlSlider-module__paginationOutsideTop___SCLqB",ma="ControlSlider-module__paginationInsideLeft___yOBRZ",ga="ControlSlider-module__paginationInsideRight___Rtt3o",ha="ControlSlider-module__paginationOutsideLeft___lahaw",fa="ControlSlider-module__paginationOutsideRight___EtuQa",ya="ControlSlider-module__imgWrapper___UjEgB",va="ControlSlider-module__captionBlock___dJ6-j",xa="ControlSlider-module__captionTextWrapper___HFlpf",ba="ControlSlider-module__captionText___uGBVc",Sa="ControlSlider-module__active___WZK4G",wa="ControlSlider-module__withPointerEvents___t-18M",Ca="ControlSlider-module__topLeftAlignment___zjnGM",Ta="ControlSlider-module__topCenterAlignment___gD1xW",$a="ControlSlider-module__topRightAlignment___NMapS",La="ControlSlider-module__middleLeftAlignment___OnUrY",Ia="ControlSlider-module__middleCenterAlignment___Tdkl0",Ea="ControlSlider-module__middleRightAlignment___wEbfX",Ra="ControlSlider-module__bottomLeftAlignment___cTP2-",Ma="ControlSlider-module__bottomCenterAlignment___c54fB",_a="ControlSlider-module__bottomRightAlignment___kEwrz",Wa="ControlSlider-module__clickOverlay___DZA28",Aa="ControlSlider-module__contain___pLyq7",Pa="ControlSlider-module__cover___KdDat",bt={wrapper:Us,hoverArrow:Gs,sliderItem:qs,sliderImage:Xs,arrow:Ys,arrowVertical:Js,nextArrow:Zs,arrowInner:Qs,arrowIcon:ta,arrowImg:ea,mirror:na,pagination:ia,paginationInner:oa,paginationVertical:ra,paginationItem:la,dot:sa,activeDot:aa,paginationInsideBottom:ca,paginationInsideTop:da,paginationOutsideBottom:ua,paginationOutsideTop:pa,paginationInsideLeft:ma,paginationInsideRight:ga,paginationOutsideLeft:ha,paginationOutsideRight:fa,imgWrapper:ya,captionBlock:va,captionTextWrapper:xa,captionText:ba,active:Sa,withPointerEvents:wa,topLeftAlignment:Ca,topCenterAlignment:Ta,topRightAlignment:$a,middleLeftAlignment:La,middleCenterAlignment:Ia,middleRightAlignment:Ea,bottomLeftAlignment:Ra,bottomCenterAlignment:Ma,bottomRightAlignment:_a,clickOverlay:Wa,contain:Aa,cover:Pa};function ka(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Fa(t,e,n){return e&&ka(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var Kr="(prefers-reduced-motion: reduce)",Yn=1,Na=2,ti=3,si=4,Ii=5,Qi=6,ao=7,Ha={CREATED:Yn,MOUNTED:Na,IDLE:ti,MOVING:si,SCROLLING:Ii,DRAGGING:Qi,DESTROYED:ao};function vn(t){t.length=0}function Rn(t,e,n){return Array.prototype.slice.call(t,e,n)}function ae(t){return t.bind.apply(t,[null].concat(Rn(arguments,1)))}var Vl=setTimeout,Jo=function(){};function Ur(t){return requestAnimationFrame(t)}function fo(t,e){return typeof e===t}function hi(t){return!ur(t)&&fo("object",t)}var dr=Array.isArray,Kl=ae(fo,"function"),Ln=ae(fo,"string"),Ei=ae(fo,"undefined");function ur(t){return t===null}function Ul(t){try{return t instanceof(t.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ri(t){return dr(t)?t:[t]}function qe(t,e){Ri(t).forEach(e)}function pr(t,e){return t.indexOf(e)>-1}function to(t,e){return t.push.apply(t,Ri(e)),t}function mn(t,e,n){t&&qe(e,function(i){i&&t.classList[n?"add":"remove"](i)})}function on(t,e){mn(t,Ln(e)?e.split(" "):e,!0)}function Mi(t,e){qe(e,t.appendChild.bind(t))}function mr(t,e){qe(t,function(n){var i=(e||n).parentNode;i&&i.insertBefore(n,e)})}function fi(t,e){return Ul(t)&&(t.msMatchesSelector||t.matches).call(t,e)}function Gl(t,e){var n=t?Rn(t.children):[];return e?n.filter(function(i){return fi(i,e)}):n}function _i(t,e){return e?Gl(t,e)[0]:t.firstElementChild}var yi=Object.keys;function Bn(t,e,n){return t&&(n?yi(t).reverse():yi(t)).forEach(function(i){i!=="__proto__"&&e(t[i],i)}),t}function vi(t){return Rn(arguments,1).forEach(function(e){Bn(e,function(n,i){t[i]=e[i]})}),t}function $n(t){return Rn(arguments,1).forEach(function(e){Bn(e,function(n,i){dr(n)?t[i]=n.slice():hi(n)?t[i]=$n({},hi(t[i])?t[i]:{},n):t[i]=n})}),t}function Gr(t,e){qe(e||yi(t),function(n){delete t[n]})}function rn(t,e){qe(t,function(n){qe(e,function(i){n&&n.removeAttribute(i)})})}function Bt(t,e,n){hi(e)?Bn(e,function(i,r){Bt(t,r,i)}):qe(t,function(i){ur(n)||n===""?rn(i,e):i.setAttribute(e,String(n))})}function Jn(t,e,n){var i=document.createElement(t);return e&&(Ln(e)?on(i,e):Bt(i,e)),n&&Mi(n,i),i}function Ye(t,e,n){if(Ei(n))return getComputedStyle(t)[e];ur(n)||(t.style[e]=""+n)}function xi(t,e){Ye(t,"display",e)}function ql(t){t.setActive&&t.setActive()||t.focus({preventScroll:!0})}function Je(t,e){return t.getAttribute(e)}function qr(t,e){return t&&t.classList.contains(e)}function Ke(t){return t.getBoundingClientRect()}function On(t){qe(t,function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})}function Xl(t){return _i(new DOMParser().parseFromString(t,"text/html").body)}function pn(t,e){t.preventDefault(),e&&(t.stopPropagation(),t.stopImmediatePropagation())}function Yl(t,e){return t&&t.querySelector(e)}function gr(t,e){return e?Rn(t.querySelectorAll(e)):[]}function gn(t,e){mn(t,e,!1)}function Zo(t){return t.timeStamp}function An(t){return Ln(t)?t:t?t+"px":""}var Wi="splide",hr="data-"+Wi;function pi(t,e){if(!t)throw new Error("["+Wi+"] "+(e||""))}var In=Math.min,co=Math.max,uo=Math.floor,bi=Math.ceil,Be=Math.abs;function Jl(t,e,n){return Be(t-e)<n}function eo(t,e,n,i){var r=In(e,n),l=co(e,n);return i?r<t&&t<l:r<=t&&t<=l}function Gn(t,e,n){var i=In(e,n),r=co(e,n);return In(co(i,t),r)}function Qo(t){return+(t>0)-+(t<0)}function tr(t,e){return qe(e,function(n){t=t.replace("%s",""+n)}),t}function fr(t){return t<10?"0"+t:""+t}var Xr={};function Ba(t){return""+t+fr(Xr[t]=(Xr[t]||0)+1)}function Zl(){var t=[];function e(s,d,a,p){r(s,d,function(u,S,x){var y="addEventListener"in u,m=y?u.removeEventListener.bind(u,S,a,p):u.removeListener.bind(u,a);y?u.addEventListener(S,a,p):u.addListener(a),t.push([u,S,x,a,m])})}function n(s,d,a){r(s,d,function(p,u,S){t=t.filter(function(x){return x[0]===p&&x[1]===u&&x[2]===S&&(!a||x[3]===a)?(x[4](),!1):!0})})}function i(s,d,a){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(d,{bubbles:u,detail:a}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(d,u,!1,a)),s.dispatchEvent(p),p}function r(s,d,a){qe(s,function(p){p&&qe(d,function(u){u.split(" ").forEach(function(S){var x=S.split(".");a(p,x[0],x[1])})})})}function l(){t.forEach(function(s){s[4]()}),vn(t)}return{bind:e,unbind:n,dispatch:i,destroy:l}}var Mn="mounted",er="ready",xn="move",ai="moved",yr="click",Ql="active",ts="inactive",es="visible",ns="hidden",Le="refresh",Pe="updated",ei="resize",yo="resized",is="drag",os="dragging",rs="dragged",vo="scroll",jn="scrolled",Oa="overflow",vr="destroy",ls="arrows:mounted",ss="arrows:updated",as="pagination:mounted",cs="pagination:updated",xr="navigation:mounted",br="autoplay:play",ds="autoplay:playing",Sr="autoplay:pause",wr="lazyload:loaded",us="sk",ps="sh",po="ei";function xe(t){var e=t?t.event.bus:document.createDocumentFragment(),n=Zl();function i(l,s){n.bind(e,Ri(l).join(" "),function(d){s.apply(s,dr(d.detail)?d.detail:[])})}function r(l){n.dispatch(e,l,Rn(arguments,1))}return t&&t.event.on(vr,n.destroy),vi(n,{bus:e,on:i,off:ae(n.unbind,e),emit:r})}function xo(t,e,n,i){var r=Date.now,l,s=0,d,a=!0,p=0;function u(){if(!a){if(s=t?In((r()-l)/t,1):1,n&&n(s),s>=1&&(e(),l=r(),i&&++p>=i))return x();d=Ur(u)}}function S(w){w||m(),l=r()-(w?s*t:0),a=!1,d=Ur(u)}function x(){a=!0}function y(){l=r(),s=0,n&&n(s)}function m(){d&&cancelAnimationFrame(d),s=0,d=0,a=!0}function f(w){t=w}function L(){return a}return{start:S,rewind:y,pause:x,cancel:m,set:f,isPaused:L}}function Da(t){var e=t;function n(r){e=r}function i(r){return pr(Ri(r),e)}return{set:n,is:i}}function ja(t,e){var n=xo(0,t,null,1);return function(){n.isPaused()&&n.start()}}function za(t,e,n){var i=t.state,r=n.breakpoints||{},l=n.reducedMotion||{},s=Zl(),d=[];function a(){var m=n.mediaQuery==="min";yi(r).sort(function(f,L){return m?+f-+L:+L-+f}).forEach(function(f){u(r[f],"("+(m?"min":"max")+"-width:"+f+"px)")}),u(l,Kr),S()}function p(m){m&&s.destroy()}function u(m,f){var L=matchMedia(f);s.bind(L,"change",S),d.push([m,L])}function S(){var m=i.is(ao),f=n.direction,L=d.reduce(function(w,$){return $n(w,$[1].matches?$[0]:{})},{});Gr(n),y(L),n.destroy?t.destroy(n.destroy==="completely"):m?(p(!0),t.mount()):f!==n.direction&&t.refresh()}function x(m){matchMedia(Kr).matches&&(m?$n(n,l):Gr(n,yi(l)))}function y(m,f,L){$n(n,m),f&&$n(Object.getPrototypeOf(n),m),(L||!i.is(Yn))&&t.emit(Pe,n)}return{setup:a,destroy:p,reduce:x,set:y}}var bo="Arrow",So=bo+"Left",wo=bo+"Right",ms=bo+"Up",gs=bo+"Down",Yr="rtl",Co="ttb",Wo={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[ms,wo],ArrowRight:[gs,So]};function Va(t,e,n){function i(l,s,d){d=d||n.direction;var a=d===Yr&&!s?1:d===Co?0:-1;return Wo[l]&&Wo[l][a]||l.replace(/width|left|right/i,function(p,u){var S=Wo[p.toLowerCase()][a]||p;return u>0?S.charAt(0).toUpperCase()+S.slice(1):S})}function r(l){return l*(n.direction===Yr?1:-1)}return{resolve:i,orient:r}}var hn="role",Zn="tabindex",Ka="disabled",Ze="aria-",Ai=Ze+"controls",hs=Ze+"current",Jr=Ze+"selected",Ue=Ze+"label",Cr=Ze+"labelledby",fs=Ze+"hidden",Tr=Ze+"orientation",Si=Ze+"roledescription",Zr=Ze+"live",Qr=Ze+"busy",tl=Ze+"atomic",$r=[hn,Zn,Ka,Ai,hs,Ue,Cr,fs,Tr,Si],ln=Wi+"__",_n="is-",Ao=Wi,el=ln+"track",Ua=ln+"list",To=ln+"slide",ys=To+"--clone",Ga=To+"__container",Lr=ln+"arrows",$o=ln+"arrow",vs=$o+"--prev",xs=$o+"--next",Lo=ln+"pagination",bs=Lo+"__page",qa=ln+"progress",Xa=qa+"__bar",Ya=ln+"toggle",Ja=ln+"spinner",Za=ln+"sr",Qa=_n+"initialized",Dn=_n+"active",Ss=_n+"prev",ws=_n+"next",nr=_n+"visible",ir=_n+"loading",Cs=_n+"focus-in",Ts=_n+"overflow",tc=[Dn,nr,Ss,ws,ir,Cs,Ts],ec={slide:To,clone:ys,arrows:Lr,arrow:$o,prev:vs,next:xs,pagination:Lo,page:bs,spinner:Ja};function nc(t,e){if(Kl(t.closest))return t.closest(e);for(var n=t;n&&n.nodeType===1&&!fi(n,e);)n=n.parentElement;return n}var ic=5,nl=200,$s="touchstart mousedown",Po="touchmove mousemove",ko="touchend touchcancel mouseup click";function oc(t,e,n){var i=xe(t),r=i.on,l=i.bind,s=t.root,d=n.i18n,a={},p=[],u=[],S=[],x,y,m;function f(){C(),P(),$()}function L(){r(Le,w),r(Le,f),r(Pe,$),l(document,$s+" keydown",function(b){m=b.type==="keydown"},{capture:!0}),l(s,"focusin",function(){mn(s,Cs,!!m)})}function w(b){var M=$r.concat("style");vn(p),gn(s,u),gn(x,S),rn([x,y],M),rn(s,b?M:["style",Si])}function $(){gn(s,u),gn(x,S),u=k(Ao),S=k(el),on(s,u),on(x,S),Bt(s,Ue,n.label),Bt(s,Cr,n.labelledby)}function C(){x=E("."+el),y=_i(x,"."+Ua),pi(x&&y,"A track/list element is missing."),to(p,Gl(y,"."+To+":not(."+ys+")")),Bn({arrows:Lr,pagination:Lo,prev:vs,next:xs,bar:Xa,toggle:Ya},function(b,M){a[M]=E("."+b)}),vi(a,{root:s,track:x,list:y,slides:p})}function P(){var b=s.id||Ba(Wi),M=n.role;s.id=b,x.id=x.id||b+"-track",y.id=y.id||b+"-list",!Je(s,hn)&&s.tagName!=="SECTION"&&M&&Bt(s,hn,M),Bt(s,Si,d.carousel),Bt(y,hn,"presentation")}function E(b){var M=Yl(s,b);return M&&nc(M,"."+Ao)===s?M:void 0}function k(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===Ao&&Dn]}return vi(a,{setup:f,mount:L,destroy:w})}var ni="slide",ci="loop",Pi="fade";function rc(t,e,n,i){var r=xe(t),l=r.on,s=r.emit,d=r.bind,a=t.Components,p=t.root,u=t.options,S=u.isNavigation,x=u.updateOnMove,y=u.i18n,m=u.pagination,f=u.slideFocus,L=a.Direction.resolve,w=Je(i,"style"),$=Je(i,Ue),C=n>-1,P=_i(i,"."+Ga),E;function k(){C||(i.id=p.id+"-slide"+fr(e+1),Bt(i,hn,m?"tabpanel":"group"),Bt(i,Si,y.slide),Bt(i,Ue,$||tr(y.slideLabel,[e+1,t.length]))),b()}function b(){d(i,"click",ae(s,yr,G)),d(i,"keydown",ae(s,us,G)),l([ai,ps,jn],T),l(xr,z),x&&l(xn,h)}function M(){E=!0,r.destroy(),gn(i,tc),rn(i,$r),Bt(i,"style",w),Bt(i,Ue,$||"")}function z(){var K=t.splides.map(function(H){var q=H.splide.Components.Slides.getAt(e);return q?q.slide.id:""}).join(" ");Bt(i,Ue,tr(y.slideX,(C?n:e)+1)),Bt(i,Ai,K),Bt(i,hn,f?"button":""),f&&rn(i,Si)}function h(){E||T()}function T(){if(!E){var K=t.index;_(),N(),mn(i,Ss,e===K-1),mn(i,ws,e===K+1)}}function _(){var K=at();K!==qr(i,Dn)&&(mn(i,Dn,K),Bt(i,hs,S&&K||""),s(K?Ql:ts,G))}function N(){var K=O(),H=!K&&(!at()||C);if(t.state.is([si,Ii])||Bt(i,fs,H||""),Bt(gr(i,u.focusableNodes||""),Zn,H?-1:""),f&&Bt(i,Zn,H?-1:0),K!==qr(i,nr)&&(mn(i,nr,K),s(K?es:ns,G)),!K&&document.activeElement===i){var q=a.Slides.getAt(t.index);q&&ql(q.slide)}}function V(K,H,q){Ye(q&&P||i,K,H)}function at(){var K=t.index;return K===e||u.cloneStatus&&K===n}function O(){if(t.is(Pi))return at();var K=Ke(a.Elements.track),H=Ke(i),q=L("left",!0),et=L("right",!0);return uo(K[q])<=bi(H[q])&&uo(H[et])<=bi(K[et])}function W(K,H){var q=Be(K-e);return!C&&(u.rewind||t.is(ci))&&(q=In(q,t.length-q)),q<=H}var G={index:e,slideIndex:n,slide:i,container:P,isClone:C,mount:k,destroy:M,update:T,style:V,isWithin:W};return G}function lc(t,e,n){var i=xe(t),r=i.on,l=i.emit,s=i.bind,d=e.Elements,a=d.slides,p=d.list,u=[];function S(){x(),r(Le,y),r(Le,x)}function x(){a.forEach(function(T,_){f(T,_,-1)})}function y(){E(function(T){T.destroy()}),vn(u)}function m(){E(function(T){T.update()})}function f(T,_,N){var V=rc(t,_,N,T);V.mount(),u.push(V),u.sort(function(at,O){return at.index-O.index})}function L(T){return T?k(function(_){return!_.isClone}):u}function w(T){var _=e.Controller,N=_.toIndex(T),V=_.hasFocus()?1:n.perPage;return k(function(at){return eo(at.index,N,N+V-1)})}function $(T){return k(T)[0]}function C(T,_){qe(T,function(N){if(Ln(N)&&(N=Xl(N)),Ul(N)){var V=a[_];V?mr(N,V):Mi(p,N),on(N,n.classes.slide),M(N,ae(l,ei))}}),l(Le)}function P(T){On(k(T).map(function(_){return _.slide})),l(Le)}function E(T,_){L(_).forEach(T)}function k(T){return u.filter(Kl(T)?T:function(_){return Ln(T)?fi(_.slide,T):pr(Ri(T),_.index)})}function b(T,_,N){E(function(V){V.style(T,_,N)})}function M(T,_){var N=gr(T,"img"),V=N.length;V?N.forEach(function(at){s(at,"load error",function(){--V||_()})}):_()}function z(T){return T?a.length:u.length}function h(){return u.length>n.perPage}return{mount:S,destroy:y,update:m,register:f,get:L,getIn:w,getAt:$,add:C,remove:P,forEach:E,filter:k,style:b,getLength:z,isEnough:h}}function sc(t,e,n){var i=xe(t),r=i.on,l=i.bind,s=i.emit,d=e.Slides,a=e.Direction.resolve,p=e.Elements,u=p.root,S=p.track,x=p.list,y=d.getAt,m=d.style,f,L,w;function $(){C(),l(window,"resize load",ja(ae(s,ei))),r([Pe,Le],C),r(ei,P)}function C(){f=n.direction===Co,Ye(u,"maxWidth",An(n.width)),Ye(S,a("paddingLeft"),E(!1)),Ye(S,a("paddingRight"),E(!0)),P(!0)}function P(G){var K=Ke(u);(G||L.width!==K.width||L.height!==K.height)&&(Ye(S,"height",k()),m(a("marginRight"),An(n.gap)),m("width",M()),m("height",z(),!0),L=K,s(yo),w!==(w=W())&&(mn(u,Ts,w),s(Oa,w)))}function E(G){var K=n.padding,H=a(G?"right":"left");return K&&An(K[H]||(hi(K)?0:K))||"0px"}function k(){var G="";return f&&(G=b(),pi(G,"height or heightRatio is missing."),G="calc("+G+" - "+E(!1)+" - "+E(!0)+")"),G}function b(){return An(n.height||Ke(x).width*n.heightRatio)}function M(){return n.autoWidth?null:An(n.fixedWidth)||(f?"":h())}function z(){return An(n.fixedHeight)||(f?n.autoHeight?null:h():b())}function h(){var G=An(n.gap);return"calc((100%"+(G&&" + "+G)+")/"+(n.perPage||1)+(G&&" - "+G)+")"}function T(){return Ke(x)[a("width")]}function _(G,K){var H=y(G||0);return H?Ke(H.slide)[a("width")]+(K?0:at()):0}function N(G,K){var H=y(G);if(H){var q=Ke(H.slide)[a("right")],et=Ke(x)[a("left")];return Be(q-et)+(K?0:at())}return 0}function V(G){return N(t.length-1)-N(0)+_(0,G)}function at(){var G=y(0);return G&&parseFloat(Ye(G.slide,a("marginRight")))||0}function O(G){return parseFloat(Ye(S,a("padding"+(G?"Right":"Left"))))||0}function W(){return t.is(Pi)||V(!0)>T()}return{mount:$,resize:P,listSize:T,slideSize:_,sliderSize:V,totalSize:N,getPadding:O,isOverflow:W}}var ac=2;function cc(t,e,n){var i=xe(t),r=i.on,l=e.Elements,s=e.Slides,d=e.Direction.resolve,a=[],p;function u(){r(Le,S),r([Pe,ei],y),(p=L())&&(m(p),e.Layout.resize(!0))}function S(){x(),u()}function x(){On(a),vn(a),i.destroy()}function y(){var w=L();p!==w&&(p<w||!w)&&i.emit(Le)}function m(w){var $=s.get().slice(),C=$.length;if(C){for(;$.length<w;)to($,$);to($.slice(-w),$.slice(0,w)).forEach(function(P,E){var k=E<w,b=f(P.slide,E);k?mr(b,$[0].slide):Mi(l.list,b),to(a,b),s.register(b,E-w+(k?0:C),P.index)})}}function f(w,$){var C=w.cloneNode(!0);return on(C,n.classes.clone),C.id=t.root.id+"-clone"+fr($+1),C}function L(){var w=n.clones;if(!t.is(ci))w=0;else if(Ei(w)){var $=n[d("fixedWidth")]&&e.Layout.slideSize(0),C=$&&bi(Ke(l.track)[d("width")]/$);w=C||n[d("autoWidth")]&&t.length||n.perPage*ac}return w}return{mount:u,destroy:x}}function dc(t,e,n){var i=xe(t),r=i.on,l=i.emit,s=t.state.set,d=e.Layout,a=d.slideSize,p=d.getPadding,u=d.totalSize,S=d.listSize,x=d.sliderSize,y=e.Direction,m=y.resolve,f=y.orient,L=e.Elements,w=L.list,$=L.track,C;function P(){C=e.Transition,r([Mn,yo,Pe,Le],E)}function E(){e.Controller.isBusy()||(e.Scroll.cancel(),b(t.index),e.Slides.update())}function k(H,q,et,lt){H!==q&&G(H>et)&&(T(),M(h(V(),H>et),!0)),s(si),l(xn,q,et,H),C.start(q,function(){s(ti),l(ai,q,et,H),lt&&lt()})}function b(H){M(N(H,!0))}function M(H,q){if(!t.is(Pi)){var et=q?H:z(H);Ye(w,"transform","translate"+m("X")+"("+et+"px)"),H!==et&&l(ps)}}function z(H){if(t.is(ci)){var q=_(H),et=q>e.Controller.getEnd(),lt=q<0;(lt||et)&&(H=h(H,et))}return H}function h(H,q){var et=H-W(q),lt=x();return H-=f(lt*(bi(Be(et)/lt)||1))*(q?1:-1),H}function T(){M(V(),!0),C.cancel()}function _(H){for(var q=e.Slides.get(),et=0,lt=1/0,F=0;F<q.length;F++){var ct=q[F].index,g=Be(N(ct,!0)-H);if(g<=lt)lt=g,et=ct;else break}return et}function N(H,q){var et=f(u(H-1)-O(H));return q?at(et):et}function V(){var H=m("left");return Ke(w)[H]-Ke($)[H]+f(p(!1))}function at(H){return n.trimSpace&&t.is(ni)&&(H=Gn(H,0,f(x(!0)-S()))),H}function O(H){var q=n.focus;return q==="center"?(S()-a(H,!0))/2:+q*a(H)||0}function W(H){return N(H?e.Controller.getEnd():0,!!n.trimSpace)}function G(H){var q=f(h(V(),H));return H?q>=0:q<=w[m("scrollWidth")]-Ke($)[m("width")]}function K(H,q){q=Ei(q)?V():q;var et=H!==!0&&f(q)<f(W(!1)),lt=H!==!1&&f(q)>f(W(!0));return et||lt}return{mount:P,move:k,jump:b,translate:M,shift:h,cancel:T,toIndex:_,toPosition:N,getPosition:V,getLimit:W,exceededLimit:K,reposition:E}}function uc(t,e,n){var i=xe(t),r=i.on,l=i.emit,s=e.Move,d=s.getPosition,a=s.getLimit,p=s.toPosition,u=e.Slides,S=u.isEnough,x=u.getLength,y=n.omitEnd,m=t.is(ci),f=t.is(ni),L=ae(V,!1),w=ae(V,!0),$=n.start||0,C,P=$,E,k,b;function M(){z(),r([Pe,Le,po],z),r(yo,h)}function z(){E=x(!0),k=n.perMove,b=n.perPage,C=G();var g=Gn($,0,y?C:E-1);g!==$&&($=g,s.reposition())}function h(){C!==G()&&l(po)}function T(g,nt,ft){if(!ct()){var it=N(g),wt=W(it);wt>-1&&(nt||wt!==$)&&(et(wt),s.move(it,wt,P,ft))}}function _(g,nt,ft,it){e.Scroll.scroll(g,nt,ft,function(){var wt=W(s.toIndex(d()));et(y?In(wt,C):wt),it&&it()})}function N(g){var nt=$;if(Ln(g)){var ft=g.match(/([+\-<>])(\d+)?/)||[],it=ft[1],wt=ft[2];it==="+"||it==="-"?nt=at($+ +(""+it+(+wt||1)),$):it===">"?nt=wt?K(+wt):L(!0):it==="<"&&(nt=w(!0))}else nt=m?g:Gn(g,0,C);return nt}function V(g,nt){var ft=k||(F()?1:b),it=at($+ft*(g?-1:1),$,!(k||F()));return it===-1&&f&&!Jl(d(),a(!g),1)?g?0:C:nt?it:W(it)}function at(g,nt,ft){if(S()||F()){var it=O(g);it!==g&&(nt=g,g=it,ft=!1),g<0||g>C?!k&&(eo(0,g,nt,!0)||eo(C,nt,g,!0))?g=K(H(g)):m?g=ft?g<0?-(E%b||b):E:g:n.rewind?g=g<0?C:0:g=-1:ft&&g!==nt&&(g=K(H(nt)+(g<nt?-1:1)))}else g=-1;return g}function O(g){if(f&&n.trimSpace==="move"&&g!==$)for(var nt=d();nt===p(g,!0)&&eo(g,0,t.length-1,!n.rewind);)g<$?--g:++g;return g}function W(g){return m?(g+E)%E||0:g}function G(){for(var g=E-(F()||m&&k?1:b);y&&g-- >0;)if(p(E-1,!0)!==p(g,!0)){g++;break}return Gn(g,0,E-1)}function K(g){return Gn(F()?g:b*g,0,C)}function H(g){return F()?In(g,C):uo((g>=C?E-1:g)/b)}function q(g){var nt=s.toIndex(g);return f?Gn(nt,0,C):nt}function et(g){g!==$&&(P=$,$=g)}function lt(g){return g?P:$}function F(){return!Ei(n.focus)||n.isNavigation}function ct(){return t.state.is([si,Ii])&&!!n.waitForTransition}return{mount:M,go:T,scroll:_,getNext:L,getPrev:w,getAdjacent:V,getEnd:G,setIndex:et,getIndex:lt,toIndex:K,toPage:H,toDest:q,hasFocus:F,isBusy:ct}}var pc="http://www.w3.org/2000/svg",mc="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",Bi=40;function gc(t,e,n){var i=xe(t),r=i.on,l=i.bind,s=i.emit,d=n.classes,a=n.i18n,p=e.Elements,u=e.Controller,S=p.arrows,x=p.track,y=S,m=p.prev,f=p.next,L,w,$={};function C(){E(),r(Pe,P)}function P(){k(),C()}function E(){var _=n.arrows;_&&!(m&&f)&&z(),m&&f&&(vi($,{prev:m,next:f}),xi(y,_?"":"none"),on(y,w=Lr+"--"+n.direction),_&&(b(),T(),Bt([m,f],Ai,x.id),s(ls,m,f)))}function k(){i.destroy(),gn(y,w),L?(On(S?[m,f]:y),m=f=null):rn([m,f],$r)}function b(){r([Mn,ai,Le,jn,po],T),l(f,"click",ae(M,">")),l(m,"click",ae(M,"<"))}function M(_){u.go(_,!0)}function z(){y=S||Jn("div",d.arrows),m=h(!0),f=h(!1),L=!0,Mi(y,[m,f]),!S&&mr(y,x)}function h(_){var N='<button class="'+d.arrow+" "+(_?d.prev:d.next)+'" type="button"><svg xmlns="'+pc+'" viewBox="0 0 '+Bi+" "+Bi+'" width="'+Bi+'" height="'+Bi+'" focusable="false"><path d="'+(n.arrowPath||mc)+'" />';return Xl(N)}function T(){if(m&&f){var _=t.index,N=u.getPrev(),V=u.getNext(),at=N>-1&&_<N?a.last:a.prev,O=V>-1&&_>V?a.first:a.next;m.disabled=N<0,f.disabled=V<0,Bt(m,Ue,at),Bt(f,Ue,O),s(ss,m,f,N,V)}}return{arrows:$,mount:C,destroy:k,update:T}}var hc=hr+"-interval";function fc(t,e,n){var i=xe(t),r=i.on,l=i.bind,s=i.emit,d=xo(n.interval,t.go.bind(t,">"),b),a=d.isPaused,p=e.Elements,u=e.Elements,S=u.root,x=u.toggle,y=n.autoplay,m,f,L=y==="pause";function w(){y&&($(),x&&Bt(x,Ai,p.track.id),L||C(),k())}function $(){n.pauseOnHover&&l(S,"mouseenter mouseleave",function(z){m=z.type==="mouseenter",E()}),n.pauseOnFocus&&l(S,"focusin focusout",function(z){f=z.type==="focusin",E()}),x&&l(x,"click",function(){L?C():P(!0)}),r([xn,vo,Le],d.rewind),r(xn,M)}function C(){a()&&e.Slides.isEnough()&&(d.start(!n.resetProgress),f=m=L=!1,k(),s(br))}function P(z){z===void 0&&(z=!0),L=!!z,k(),a()||(d.pause(),s(Sr))}function E(){L||(m||f?P(!1):C())}function k(){x&&(mn(x,Dn,!L),Bt(x,Ue,n.i18n[L?"play":"pause"]))}function b(z){var h=p.bar;h&&Ye(h,"width",z*100+"%"),s(ds,z)}function M(z){var h=e.Slides.getAt(z);d.set(h&&+Je(h.slide,hc)||n.interval)}return{mount:w,destroy:d.cancel,play:C,pause:P,isPaused:a}}function yc(t,e,n){var i=xe(t),r=i.on;function l(){n.cover&&(r(wr,ae(d,!0)),r([Mn,Pe,Le],ae(s,!0)))}function s(a){e.Slides.forEach(function(p){var u=_i(p.container||p.slide,"img");u&&u.src&&d(a,u,p)})}function d(a,p,u){u.style("background",a?'center/cover no-repeat url("'+p.src+'")':"",!0),xi(p,a?"none":"")}return{mount:l,destroy:ae(s,!1)}}var vc=10,xc=600,bc=.6,Sc=1.5,wc=800;function Cc(t,e,n){var i=xe(t),r=i.on,l=i.emit,s=t.state.set,d=e.Move,a=d.getPosition,p=d.getLimit,u=d.exceededLimit,S=d.translate,x=t.is(ni),y,m,f=1;function L(){r(xn,P),r([Pe,Le],E)}function w(b,M,z,h,T){var _=a();if(P(),z&&(!x||!u())){var N=e.Layout.sliderSize(),V=Qo(b)*N*uo(Be(b)/N)||0;b=d.toPosition(e.Controller.toDest(b%N))+V}var at=Jl(_,b,1);f=1,M=at?0:M||co(Be(b-_)/Sc,wc),m=h,y=xo(M,$,ae(C,_,b,T),1),s(Ii),l(vo),y.start()}function $(){s(ti),m&&m(),l(jn)}function C(b,M,z,h){var T=a(),_=b+(M-b)*k(h),N=(_-T)*f;S(T+N),x&&!z&&u()&&(f*=bc,Be(N)<vc&&w(p(u(!0)),xc,!1,m,!0))}function P(){y&&y.cancel()}function E(){y&&!y.isPaused()&&(P(),$())}function k(b){var M=n.easingFunc;return M?M(b):1-Math.pow(1-b,4)}return{mount:L,destroy:P,scroll:w,cancel:E}}var qn={passive:!1,capture:!0};function Tc(t,e,n){var i=xe(t),r=i.on,l=i.emit,s=i.bind,d=i.unbind,a=t.state,p=e.Move,u=e.Scroll,S=e.Controller,x=e.Elements.track,y=e.Media.reduce,m=e.Direction,f=m.resolve,L=m.orient,w=p.getPosition,$=p.exceededLimit,C,P,E,k,b,M=!1,z,h,T;function _(){s(x,Po,Jo,qn),s(x,ko,Jo,qn),s(x,$s,V,qn),s(x,"click",W,{capture:!0}),s(x,"dragstart",pn),r([Mn,Pe],N)}function N(){var B=n.drag;ot(!B),k=B==="free"}function V(B){if(z=!1,!h){var Q=wt(B);it(B.target)&&(Q||!B.button)&&(S.isBusy()?pn(B,!0):(T=Q?x:window,b=a.is([si,Ii]),E=null,s(T,Po,at,qn),s(T,ko,O,qn),p.cancel(),u.cancel(),G(B)))}}function at(B){if(a.is(Qi)||(a.set(Qi),l(is)),B.cancelable)if(b){p.translate(C+ft(F(B)));var Q=ct(B)>nl,U=M!==(M=$());(Q||U)&&G(B),z=!0,l(os),pn(B)}else q(B)&&(b=H(B),pn(B))}function O(B){a.is(Qi)&&(a.set(ti),l(rs)),b&&(K(B),pn(B)),d(T,Po,at),d(T,ko,O),b=!1}function W(B){!h&&z&&pn(B,!0)}function G(B){E=P,P=B,C=w()}function K(B){var Q=et(B),U=lt(Q),Y=n.rewind&&n.rewindByDrag;y(!1),k?S.scroll(U,0,n.snap):t.is(Pi)?S.go(L(Qo(Q))<0?Y?"<":"-":Y?">":"+"):t.is(ni)&&M&&Y?S.go($(!0)?">":"<"):S.go(S.toDest(U),!0),y(!0)}function H(B){var Q=n.dragMinThreshold,U=hi(Q),Y=U&&Q.mouse||0,It=(U?Q.touch:+Q)||10;return Be(F(B))>(wt(B)?It:Y)}function q(B){return Be(F(B))>Be(F(B,!0))}function et(B){if(t.is(ci)||!M){var Q=ct(B);if(Q&&Q<nl)return F(B)/Q}return 0}function lt(B){return w()+Qo(B)*In(Be(B)*(n.flickPower||600),k?1/0:e.Layout.listSize()*(n.flickMaxPages||1))}function F(B,Q){return nt(B,Q)-nt(g(B),Q)}function ct(B){return Zo(B)-Zo(g(B))}function g(B){return P===B&&E||P}function nt(B,Q){return(wt(B)?B.changedTouches[0]:B)["page"+f(Q?"Y":"X")]}function ft(B){return B/(M&&t.is(ni)?ic:1)}function it(B){var Q=n.noDrag;return!fi(B,"."+bs+", ."+$o)&&(!Q||!fi(B,Q))}function wt(B){return typeof TouchEvent<"u"&&B instanceof TouchEvent}function mt(){return b}function ot(B){h=B}return{mount:_,disable:ot,isDragging:mt}}var $c={Spacebar:" ",Right:wo,Left:So,Up:ms,Down:gs};function Ir(t){return t=Ln(t)?t:t.key,$c[t]||t}var il="keydown";function Lc(t,e,n){var i=xe(t),r=i.on,l=i.bind,s=i.unbind,d=t.root,a=e.Direction.resolve,p,u;function S(){x(),r(Pe,y),r(Pe,x),r(xn,f)}function x(){var w=n.keyboard;w&&(p=w==="global"?window:d,l(p,il,L))}function y(){s(p,il)}function m(w){u=w}function f(){var w=u;u=!0,Vl(function(){u=w})}function L(w){if(!u){var $=Ir(w);$===a(So)?t.go("<"):$===a(wo)&&t.go(">")}}return{mount:S,destroy:y,disable:m}}var mi=hr+"-lazy",no=mi+"-srcset",Ic="["+mi+"], ["+no+"]";function Ec(t,e,n){var i=xe(t),r=i.on,l=i.off,s=i.bind,d=i.emit,a=n.lazyLoad==="sequential",p=[ai,jn],u=[];function S(){n.lazyLoad&&(x(),r(Le,x))}function x(){vn(u),y(),a?w():(l(p),r(p,m),m())}function y(){e.Slides.forEach(function($){gr($.slide,Ic).forEach(function(C){var P=Je(C,mi),E=Je(C,no);if(P!==C.src||E!==C.srcset){var k=n.classes.spinner,b=C.parentElement,M=_i(b,"."+k)||Jn("span",k,b);u.push([C,$,M]),C.src||xi(C,"none")}})})}function m(){u=u.filter(function($){var C=n.perPage*((n.preloadPages||1)+1)-1;return $[1].isWithin(t.index,C)?f($):!0}),u.length||l(p)}function f($){var C=$[0];on($[1].slide,ir),s(C,"load error",ae(L,$)),Bt(C,"src",Je(C,mi)),Bt(C,"srcset",Je(C,no)),rn(C,mi),rn(C,no)}function L($,C){var P=$[0],E=$[1];gn(E.slide,ir),C.type!=="error"&&(On($[2]),xi(P,""),d(wr,P,E),d(ei)),a&&w()}function w(){u.length&&f(u.shift())}return{mount:S,destroy:ae(vn,u),check:m}}function Rc(t,e,n){var i=xe(t),r=i.on,l=i.emit,s=i.bind,d=e.Slides,a=e.Elements,p=e.Controller,u=p.hasFocus,S=p.getIndex,x=p.go,y=e.Direction.resolve,m=a.pagination,f=[],L,w;function $(){C(),r([Pe,Le,po],$);var h=n.pagination;m&&xi(m,h?"":"none"),h&&(r([xn,vo,jn],z),P(),z(),l(as,{list:L,items:f},M(t.index)))}function C(){L&&(On(m?Rn(L.children):L),gn(L,w),vn(f),L=null),i.destroy()}function P(){var h=t.length,T=n.classes,_=n.i18n,N=n.perPage,V=u()?p.getEnd()+1:bi(h/N);L=m||Jn("ul",T.pagination,a.track.parentElement),on(L,w=Lo+"--"+b()),Bt(L,hn,"tablist"),Bt(L,Ue,_.select),Bt(L,Tr,b()===Co?"vertical":"");for(var at=0;at<V;at++){var O=Jn("li",null,L),W=Jn("button",{class:T.page,type:"button"},O),G=d.getIn(at).map(function(H){return H.slide.id}),K=!u()&&N>1?_.pageX:_.slideX;s(W,"click",ae(E,at)),n.paginationKeyboard&&s(W,"keydown",ae(k,at)),Bt(O,hn,"presentation"),Bt(W,hn,"tab"),Bt(W,Ai,G.join(" ")),Bt(W,Ue,tr(K,at+1)),Bt(W,Zn,-1),f.push({li:O,button:W,page:at})}}function E(h){x(">"+h,!0)}function k(h,T){var _=f.length,N=Ir(T),V=b(),at=-1;N===y(wo,!1,V)?at=++h%_:N===y(So,!1,V)?at=(--h+_)%_:N==="Home"?at=0:N==="End"&&(at=_-1);var O=f[at];O&&(ql(O.button),x(">"+at),pn(T,!0))}function b(){return n.paginationDirection||n.direction}function M(h){return f[p.toPage(h)]}function z(){var h=M(S(!0)),T=M(S());if(h){var _=h.button;gn(_,Dn),rn(_,Jr),Bt(_,Zn,-1)}if(T){var N=T.button;on(N,Dn),Bt(N,Jr,!0),Bt(N,Zn,"")}l(cs,{list:L,items:f},h,T)}return{items:f,mount:$,destroy:C,getAt:M,update:z}}var Mc=[" ","Enter"];function _c(t,e,n){var i=n.isNavigation,r=n.slideFocus,l=[];function s(){t.splides.forEach(function(m){m.isParent||(p(t,m.splide),p(m.splide,t))}),i&&u()}function d(){l.forEach(function(m){m.destroy()}),vn(l)}function a(){d(),s()}function p(m,f){var L=xe(m);L.on(xn,function(w,$,C){f.go(f.is(ci)?C:w)}),l.push(L)}function u(){var m=xe(t),f=m.on;f(yr,x),f(us,y),f([Mn,Pe],S),l.push(m),m.emit(xr,t.splides)}function S(){Bt(e.Elements.list,Tr,n.direction===Co?"vertical":"")}function x(m){t.go(m.index)}function y(m,f){pr(Mc,Ir(f))&&(x(m),pn(f))}return{setup:ae(e.Media.set,{slideFocus:Ei(r)?i:r},!0),mount:s,destroy:d,remount:a}}function Wc(t,e,n){var i=xe(t),r=i.bind,l=0;function s(){n.wheel&&r(e.Elements.track,"wheel",d,qn)}function d(p){if(p.cancelable){var u=p.deltaY,S=u<0,x=Zo(p),y=n.wheelMinThreshold||0,m=n.wheelSleep||0;Be(u)>y&&x-l>m&&(t.go(S?"<":">"),l=x),a(S)&&pn(p)}}function a(p){return!n.releaseWheel||t.state.is(si)||e.Controller.getAdjacent(p)!==-1}return{mount:s}}var Ac=90;function Pc(t,e,n){var i=xe(t),r=i.on,l=e.Elements.track,s=n.live&&!n.isNavigation,d=Jn("span",Za),a=xo(Ac,ae(u,!1));function p(){s&&(x(!e.Autoplay.isPaused()),Bt(l,tl,!0),d.textContent="…",r(br,ae(x,!0)),r(Sr,ae(x,!1)),r([ai,jn],ae(u,!0)))}function u(y){Bt(l,Qr,y),y?(Mi(l,d),a.start()):(On(d),a.cancel())}function S(){rn(l,[Zr,tl,Qr]),On(d)}function x(y){s&&Bt(l,Zr,y?"off":"polite")}return{mount:p,disable:x,destroy:S}}var kc=Object.freeze({__proto__:null,Media:za,Direction:Va,Elements:oc,Slides:lc,Layout:sc,Clones:cc,Move:dc,Controller:uc,Arrows:gc,Autoplay:fc,Cover:yc,Scroll:Cc,Drag:Tc,Keyboard:Lc,LazyLoad:Ec,Pagination:Rc,Sync:_c,Wheel:Wc,Live:Pc}),Fc={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"},Nc={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:ec,i18n:Fc,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Hc(t,e,n){var i=e.Slides;function r(){xe(t).on([Mn,Le],l)}function l(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function s(d,a){i.style("transition","opacity "+n.speed+"ms "+n.easing),Vl(a)}return{mount:r,start:s,cancel:Jo}}function Bc(t,e,n){var i=e.Move,r=e.Controller,l=e.Scroll,s=e.Elements.list,d=ae(Ye,s,"transition"),a;function p(){xe(t).bind(s,"transitionend",function(y){y.target===s&&a&&(S(),a())})}function u(y,m){var f=i.toPosition(y,!0),L=i.getPosition(),w=x(y);Be(f-L)>=1&&w>=1?n.useScroll?l.scroll(f,w,!1,m):(d("transform "+w+"ms "+n.easing),i.translate(f,!0),a=m):(i.jump(y),m())}function S(){d(""),l.cancel()}function x(y){var m=n.rewindSpeed;if(t.is(ni)&&m){var f=r.getIndex(!0),L=r.getEnd();if(f===0&&y>=L||f>=L&&y===0)return m}return n.speed}return{mount:p,start:u,cancel:S}}var Oc=(function(){function t(n,i){this.event=xe(),this.Components={},this.state=Da(Yn),this.splides=[],this._o={},this._E={};var r=Ln(n)?Yl(document,n):n;pi(r,r+" is invalid."),this.root=r,i=$n({label:Je(r,Ue)||"",labelledby:Je(r,Cr)||""},Nc,t.defaults,i||{});try{$n(i,JSON.parse(Je(r,hr)))}catch{pi(!1,"Invalid JSON")}this._o=Object.create($n({},i))}var e=t.prototype;return e.mount=function(i,r){var l=this,s=this.state,d=this.Components;pi(s.is([Yn,ao]),"Already mounted!"),s.set(Yn),this._C=d,this._T=r||this._T||(this.is(Pi)?Hc:Bc),this._E=i||this._E;var a=vi({},kc,this._E,{Transition:this._T});return Bn(a,function(p,u){var S=p(l,d,l._o);d[u]=S,S.setup&&S.setup()}),Bn(d,function(p){p.mount&&p.mount()}),this.emit(Mn),on(this.root,Qa),s.set(ti),this.emit(er),this},e.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(ti)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},e.go=function(i){return this._C.Controller.go(i),this},e.on=function(i,r){return this.event.on(i,r),this},e.off=function(i){return this.event.off(i),this},e.emit=function(i){var r;return(r=this.event).emit.apply(r,[i].concat(Rn(arguments,1))),this},e.add=function(i,r){return this._C.Slides.add(i,r),this},e.remove=function(i){return this._C.Slides.remove(i),this},e.is=function(i){return this._o.type===i},e.refresh=function(){return this.emit(Le),this},e.destroy=function(i){i===void 0&&(i=!0);var r=this.event,l=this.state;return l.is(Yn)?xe(this).on(er,this.destroy.bind(this,i)):(Bn(this._C,function(s){s.destroy&&s.destroy(i)},!0),r.emit(vr),r.destroy(),i&&vn(this.splides),l.set(ao)),this},Fa(t,[{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()}}]),t})(),Er=Oc;Er.defaults={};Er.STATES=Ha;var ol=[[Mn,"onMounted"],[er,"onReady"],[xn,"onMove"],[ai,"onMoved"],[yr,"onClick"],[Ql,"onActive"],[ts,"onInactive"],[es,"onVisible"],[ns,"onHidden"],[Le,"onRefresh"],[Pe,"onUpdated"],[ei,"onResize"],[yo,"onResized"],[is,"onDrag"],[os,"onDragging"],[rs,"onDragged"],[vo,"onScroll"],[jn,"onScrolled"],[vr,"onDestroy"],[ls,"onArrowsMounted"],[ss,"onArrowsUpdated"],[as,"onPaginationMounted"],[cs,"onPaginationUpdated"],[xr,"onNavigationMounted"],[br,"onAutoplayPlay"],[ds,"onAutoplayPlaying"],[Sr,"onAutoplayPause"],[wr,"onLazyLoadLoaded"]];function Rr(...t){return t.filter(Boolean).join(" ")}function mo(t){return t!==null&&typeof t=="object"}function or(t,e){if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&!t.some((n,i)=>!or(n,e[i]));if(mo(t)&&mo(e)){const n=Object.keys(t),i=Object.keys(e);return n.length===i.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(e,r)||!or(t[r],e[r]))}return t===e}function Dc(t,e){return t.length===e.length&&!t.some((n,i)=>n!==e[i])}function jc(t,e){if(t){const n=Object.keys(t);for(let i=0;i<n.length;i++){const r=n[i];if(r!=="__proto__"&&e(t[r],r)===!1)break}}return t}function rr(t,e){const n=t;return jc(e,(i,r)=>{Array.isArray(i)?n[r]=i.slice():mo(i)?n[r]=rr(mo(n[r])?n[r]:{},i):n[r]=i}),n}var zc=({children:t,className:e,...n})=>c.createElement("div",{className:Rr("splide__track",e),...n},c.createElement("ul",{className:"splide__list"},t)),Mr=class extends c.Component{constructor(){super(...arguments),this.splideRef=c.createRef(),this.slides=[]}componentDidMount(){const{options:t,extensions:e,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Er(i,t),this.bind(this.splide),this.splide.mount(e,n),this.options=rr({},t||{}),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:t}=this.props;t&&!or(this.options,t)&&(this.splide.options=t,this.options=rr({},t));const e=this.getSlides();Dc(this.slides,e)||(this.splide.refresh(),this.slides=e)}sync(t){var e;(e=this.splide)==null||e.sync(t)}go(t){var e;(e=this.splide)==null||e.go(t)}getSlides(){var t;if(this.splide){const e=(t=this.splide.Components.Elements)==null?void 0:t.list.children;return e&&Array.prototype.slice.call(e)||[]}return[]}bind(t){ol.forEach(([e,n])=>{const i=this.props[n];typeof i=="function"&&t.on(e,(...r)=>{i(t,...r)})})}omit(t,e){return e.forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&delete t[n]}),t}render(){const{className:t,tag:e="div",hasTrack:n=!0,children:i,...r}=this.props;return c.createElement(e,{className:Rr("splide",t),ref:this.splideRef,...this.omit(r,["options",...ol.map(l=>l[1])])},n?c.createElement(zc,null,i):i)}},_r=({children:t,className:e,...n})=>c.createElement("li",{className:Rr("splide__slide",e),...n},t);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("react"),Ye=require("classnames"),R=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Fi=require("react-dom");function Ks(e){return e.type==="object"&&e.version===1}const Gs="ControlSlider-module__wrapper___sHEkd",Us="ControlSlider-module__hoverArrow___A-dOH",qs="ControlSlider-module__sliderItem___QQSkR",Xs="ControlSlider-module__sliderImage___9hRl-",Ys="ControlSlider-module__arrow___05ghY",Js="ControlSlider-module__arrowVertical___tBfVN",Zs="ControlSlider-module__nextArrow___-30Yc",Qs="ControlSlider-module__arrowInner___aEra3",ea="ControlSlider-module__arrowIcon___S4ztF",ta="ControlSlider-module__arrowImg___2dwJW",na="ControlSlider-module__mirror___brd6U",ia="ControlSlider-module__pagination___bicLF",oa="ControlSlider-module__paginationInner___bT-P-",ra="ControlSlider-module__paginationVertical___zYqKw",la="ControlSlider-module__paginationItem___nTRbk",sa="ControlSlider-module__dot___p1Qun",aa="ControlSlider-module__activeDot___LHFaj",ca="ControlSlider-module__paginationInsideBottom___R3FWn",da="ControlSlider-module__paginationInsideTop___V-qb-",ua="ControlSlider-module__paginationOutsideBottom___14w8D",pa="ControlSlider-module__paginationOutsideTop___SCLqB",ma="ControlSlider-module__paginationInsideLeft___yOBRZ",ga="ControlSlider-module__paginationInsideRight___Rtt3o",ha="ControlSlider-module__paginationOutsideLeft___lahaw",fa="ControlSlider-module__paginationOutsideRight___EtuQa",ya="ControlSlider-module__imgWrapper___UjEgB",va="ControlSlider-module__captionBlock___dJ6-j",xa="ControlSlider-module__captionTextWrapper___HFlpf",ba="ControlSlider-module__captionText___uGBVc",Sa="ControlSlider-module__active___WZK4G",wa="ControlSlider-module__withPointerEvents___t-18M",Ca="ControlSlider-module__topLeftAlignment___zjnGM",Ta="ControlSlider-module__topCenterAlignment___gD1xW",$a="ControlSlider-module__topRightAlignment___NMapS",La="ControlSlider-module__middleLeftAlignment___OnUrY",Ea="ControlSlider-module__middleCenterAlignment___Tdkl0",Ia="ControlSlider-module__middleRightAlignment___wEbfX",Ra="ControlSlider-module__bottomLeftAlignment___cTP2-",Ma="ControlSlider-module__bottomCenterAlignment___c54fB",Wa="ControlSlider-module__bottomRightAlignment___kEwrz",_a="ControlSlider-module__clickOverlay___DZA28",Aa="ControlSlider-module__contain___pLyq7",Pa="ControlSlider-module__cover___KdDat",be={wrapper:Gs,hoverArrow:Us,sliderItem:qs,sliderImage:Xs,arrow:Ys,arrowVertical:Js,nextArrow:Zs,arrowInner:Qs,arrowIcon:ea,arrowImg:ta,mirror:na,pagination:ia,paginationInner:oa,paginationVertical:ra,paginationItem:la,dot:sa,activeDot:aa,paginationInsideBottom:ca,paginationInsideTop:da,paginationOutsideBottom:ua,paginationOutsideTop:pa,paginationInsideLeft:ma,paginationInsideRight:ga,paginationOutsideLeft:ha,paginationOutsideRight:fa,imgWrapper:ya,captionBlock:va,captionTextWrapper:xa,captionText:ba,active:Sa,withPointerEvents:wa,topLeftAlignment:Ca,topCenterAlignment:Ta,topRightAlignment:$a,middleLeftAlignment:La,middleCenterAlignment:Ea,middleRightAlignment:Ia,bottomLeftAlignment:Ra,bottomCenterAlignment:Ma,bottomRightAlignment:Wa,clickOverlay:_a,contain:Aa,cover:Pa};function ka(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 Fa(e,t,n){return t&&ka(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Xr="(prefers-reduced-motion: reduce)",li=1,Na=2,di=3,yi=4,Ni=5,so=6,yo=7,Ha={CREATED:li,MOUNTED:Na,IDLE:di,MOVING:yi,SCROLLING:Ni,DRAGGING:so,DESTROYED:yo};function Cn(e){e.length=0}function Fn(e,t,n){return Array.prototype.slice.call(e,t,n)}function ct(e){return e.bind.apply(e,[null].concat(Fn(arguments,1)))}var ql=setTimeout,rr=function(){};function Yr(e){return requestAnimationFrame(e)}function To(e,t){return typeof t===e}function $i(e){return!xr(e)&&To("object",e)}var vr=Array.isArray,Xl=ct(To,"function"),An=ct(To,"string"),Hi=ct(To,"undefined");function xr(e){return e===null}function Yl(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Bi(e){return vr(e)?e:[e]}function Xt(e,t){Bi(e).forEach(t)}function br(e,t){return e.indexOf(t)>-1}function ao(e,t){return e.push.apply(e,Bi(t)),e}function vn(e,t,n){e&&Xt(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function cn(e,t){vn(e,An(t)?t.split(" "):t,!0)}function Oi(e,t){Xt(t,e.appendChild.bind(e))}function Sr(e,t){Xt(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Li(e,t){return Yl(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Jl(e,t){var n=e?Fn(e.children):[];return t?n.filter(function(i){return Li(i,t)}):n}function Di(e,t){return t?Jl(e,t)[0]:e.firstElementChild}var Ei=Object.keys;function Gn(e,t,n){return e&&(n?Ei(e).reverse():Ei(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Ii(e){return Fn(arguments,1).forEach(function(t){Gn(t,function(n,i){e[i]=t[i]})}),e}function _n(e){return Fn(arguments,1).forEach(function(t){Gn(t,function(n,i){vr(n)?e[i]=n.slice():$i(n)?e[i]=_n({},$i(e[i])?e[i]:{},n):e[i]=n})}),e}function Jr(e,t){Xt(t||Ei(e),function(n){delete e[n]})}function dn(e,t){Xt(e,function(n){Xt(t,function(i){n&&n.removeAttribute(i)})})}function Oe(e,t,n){$i(t)?Gn(t,function(i,o){Oe(e,o,i)}):Xt(e,function(i){xr(n)||n===""?dn(i,t):i.setAttribute(t,String(n))})}function si(e,t,n){var i=document.createElement(e);return t&&(An(t)?cn(i,t):Oe(i,t)),n&&Oi(n,i),i}function tn(e,t,n){if(Hi(n))return getComputedStyle(e)[t];xr(n)||(e.style[t]=""+n)}function Ri(e,t){tn(e,"display",t)}function Zl(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function nn(e,t){return e.getAttribute(t)}function Zr(e,t){return e&&e.classList.contains(t)}function Gt(e){return e.getBoundingClientRect()}function Un(e){Xt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Ql(e){return Di(new DOMParser().parseFromString(e,"text/html").body)}function yn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function es(e,t){return e&&e.querySelector(t)}function wr(e,t){return t?Fn(e.querySelectorAll(t)):[]}function xn(e,t){vn(e,t,!1)}function lr(e){return e.timeStamp}function On(e){return An(e)?e:e?e+"px":""}var ji="splide",Cr="data-"+ji;function wi(e,t){if(!e)throw new Error("["+ji+"] "+(t||""))}var Pn=Math.min,vo=Math.max,xo=Math.floor,Mi=Math.ceil,Dt=Math.abs;function ts(e,t,n){return Dt(e-t)<n}function co(e,t,n,i){var o=Pn(t,n),l=vo(t,n);return i?o<e&&e<l:o<=e&&e<=l}function ii(e,t,n){var i=Pn(t,n),o=vo(t,n);return Pn(vo(i,e),o)}function sr(e){return+(e>0)-+(e<0)}function ar(e,t){return Xt(t,function(n){e=e.replace("%s",""+n)}),e}function Tr(e){return e<10?"0"+e:""+e}var Qr={};function Ba(e){return""+e+Tr(Qr[e]=(Qr[e]||0)+1)}function ns(){var e=[];function t(s,d,a,p){o(s,d,function(u,S,x){var v="addEventListener"in u,m=v?u.removeEventListener.bind(u,S,a,p):u.removeListener.bind(u,a);v?u.addEventListener(S,a,p):u.addListener(a),e.push([u,S,x,a,m])})}function n(s,d,a){o(s,d,function(p,u,S){e=e.filter(function(x){return x[0]===p&&x[1]===u&&x[2]===S&&(!a||x[3]===a)?(x[4](),!1):!0})})}function i(s,d,a){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(d,{bubbles:u,detail:a}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(d,u,!1,a)),s.dispatchEvent(p),p}function o(s,d,a){Xt(s,function(p){p&&Xt(d,function(u){u.split(" ").forEach(function(S){var x=S.split(".");a(p,x[0],x[1])})})})}function l(){e.forEach(function(s){s[4]()}),Cn(e)}return{bind:t,unbind:n,dispatch:i,destroy:l}}var Nn="mounted",cr="ready",Tn="move",vi="moved",$r="click",is="active",os="inactive",rs="visible",ls="hidden",Et="refresh",Nt="updated",ui="resize",$o="resized",ss="drag",as="dragging",cs="dragged",Lo="scroll",Xn="scrolled",Oa="overflow",Lr="destroy",ds="arrows:mounted",us="arrows:updated",ps="pagination:mounted",ms="pagination:updated",Er="navigation:mounted",Ir="autoplay:play",gs="autoplay:playing",Rr="autoplay:pause",Mr="lazyload:loaded",hs="sk",fs="sh",bo="ei";function xt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=ns();function i(l,s){n.bind(t,Bi(l).join(" "),function(d){s.apply(s,vr(d.detail)?d.detail:[])})}function o(l){n.dispatch(t,l,Fn(arguments,1))}return e&&e.event.on(Lr,n.destroy),Ii(n,{bus:t,on:i,off:ct(n.unbind,t),emit:o})}function Eo(e,t,n,i){var o=Date.now,l,s=0,d,a=!0,p=0;function u(){if(!a){if(s=e?Pn((o()-l)/e,1):1,n&&n(s),s>=1&&(t(),l=o(),i&&++p>=i))return x();d=Yr(u)}}function S(w){w||m(),l=o()-(w?s*e:0),a=!1,d=Yr(u)}function x(){a=!0}function v(){l=o(),s=0,n&&n(s)}function m(){d&&cancelAnimationFrame(d),s=0,d=0,a=!0}function y(w){e=w}function $(){return a}return{start:S,rewind:v,pause:x,cancel:m,set:y,isPaused:$}}function Da(e){var t=e;function n(o){t=o}function i(o){return br(Bi(o),t)}return{set:n,is:i}}function ja(e,t){var n=Eo(0,e,null,1);return function(){n.isPaused()&&n.start()}}function za(e,t,n){var i=e.state,o=n.breakpoints||{},l=n.reducedMotion||{},s=ns(),d=[];function a(){var m=n.mediaQuery==="min";Ei(o).sort(function(y,$){return m?+y-+$:+$-+y}).forEach(function(y){u(o[y],"("+(m?"min":"max")+"-width:"+y+"px)")}),u(l,Xr),S()}function p(m){m&&s.destroy()}function u(m,y){var $=matchMedia(y);s.bind($,"change",S),d.push([m,$])}function S(){var m=i.is(yo),y=n.direction,$=d.reduce(function(w,C){return _n(w,C[1].matches?C[0]:{})},{});Jr(n),v($),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):y!==n.direction&&e.refresh()}function x(m){matchMedia(Xr).matches&&(m?_n(n,l):Jr(n,Ei(l)))}function v(m,y,$){_n(n,m),y&&_n(Object.getPrototypeOf(n),m),($||!i.is(li))&&e.emit(Nt,n)}return{setup:a,destroy:p,reduce:x,set:v}}var Io="Arrow",Ro=Io+"Left",Mo=Io+"Right",ys=Io+"Up",vs=Io+"Down",el="rtl",Wo="ttb",Oo={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[ys,Mo],ArrowRight:[vs,Ro]};function Va(e,t,n){function i(l,s,d){d=d||n.direction;var a=d===el&&!s?1:d===Wo?0:-1;return Oo[l]&&Oo[l][a]||l.replace(/width|left|right/i,function(p,u){var S=Oo[p.toLowerCase()][a]||p;return u>0?S.charAt(0).toUpperCase()+S.slice(1):S})}function o(l){return l*(n.direction===el?1:-1)}return{resolve:i,orient:o}}var bn="role",ai="tabindex",Ka="disabled",on="aria-",zi=on+"controls",xs=on+"current",tl=on+"selected",Ut=on+"label",Wr=on+"labelledby",bs=on+"hidden",_r=on+"orientation",Wi=on+"roledescription",nl=on+"live",il=on+"busy",ol=on+"atomic",Ar=[bn,ai,Ka,zi,xs,Ut,Wr,bs,_r,Wi],un=ji+"__",Hn="is-",Do=ji,rl=un+"track",Ga=un+"list",_o=un+"slide",Ss=_o+"--clone",Ua=_o+"__container",Pr=un+"arrows",Ao=un+"arrow",ws=Ao+"--prev",Cs=Ao+"--next",Po=un+"pagination",Ts=Po+"__page",qa=un+"progress",Xa=qa+"__bar",Ya=un+"toggle",Ja=un+"spinner",Za=un+"sr",Qa=Hn+"initialized",qn=Hn+"active",$s=Hn+"prev",Ls=Hn+"next",dr=Hn+"visible",ur=Hn+"loading",Es=Hn+"focus-in",Is=Hn+"overflow",ec=[qn,dr,$s,Ls,ur,Es,Is],tc={slide:_o,clone:Ss,arrows:Pr,arrow:Ao,prev:ws,next:Cs,pagination:Po,page:Ts,spinner:Ja};function nc(e,t){if(Xl(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Li(n,t);)n=n.parentElement;return n}var ic=5,ll=200,Rs="touchstart mousedown",jo="touchmove mousemove",zo="touchend touchcancel mouseup click";function oc(e,t,n){var i=xt(e),o=i.on,l=i.bind,s=e.root,d=n.i18n,a={},p=[],u=[],S=[],x,v,m;function y(){T(),P(),C()}function $(){o(Et,w),o(Et,y),o(Nt,C),l(document,Rs+" keydown",function(b){m=b.type==="keydown"},{capture:!0}),l(s,"focusin",function(){vn(s,Es,!!m)})}function w(b){var W=Ar.concat("style");Cn(p),xn(s,u),xn(x,S),dn([x,v],W),dn(s,b?W:["style",Wi])}function C(){xn(s,u),xn(x,S),u=F(Do),S=F(rl),cn(s,u),cn(x,S),Oe(s,Ut,n.label),Oe(s,Wr,n.labelledby)}function T(){x=M("."+rl),v=Di(x,"."+Ga),wi(x&&v,"A track/list element is missing."),ao(p,Jl(v,"."+_o+":not(."+Ss+")")),Gn({arrows:Pr,pagination:Po,prev:ws,next:Cs,bar:Xa,toggle:Ya},function(b,W){a[W]=M("."+b)}),Ii(a,{root:s,track:x,list:v,slides:p})}function P(){var b=s.id||Ba(ji),W=n.role;s.id=b,x.id=x.id||b+"-track",v.id=v.id||b+"-list",!nn(s,bn)&&s.tagName!=="SECTION"&&W&&Oe(s,bn,W),Oe(s,Wi,d.carousel),Oe(v,bn,"presentation")}function M(b){var W=es(s,b);return W&&nc(W,"."+Do)===s?W:void 0}function F(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===Do&&qn]}return Ii(a,{setup:y,mount:$,destroy:w})}var pi="slide",xi="loop",Vi="fade";function rc(e,t,n,i){var o=xt(e),l=o.on,s=o.emit,d=o.bind,a=e.Components,p=e.root,u=e.options,S=u.isNavigation,x=u.updateOnMove,v=u.i18n,m=u.pagination,y=u.slideFocus,$=a.Direction.resolve,w=nn(i,"style"),C=nn(i,Ut),T=n>-1,P=Di(i,"."+Ua),M;function F(){T||(i.id=p.id+"-slide"+Tr(t+1),Oe(i,bn,m?"tabpanel":"group"),Oe(i,Wi,v.slide),Oe(i,Ut,C||ar(v.slideLabel,[t+1,e.length]))),b()}function b(){d(i,"click",ct(s,$r,q)),d(i,"keydown",ct(s,hs,q)),l([vi,fs,Xn],L),l(Er,K),x&&l(Tn,h)}function W(){M=!0,o.destroy(),xn(i,ec),dn(i,Ar),Oe(i,"style",w),Oe(i,Ut,C||"")}function K(){var G=e.splides.map(function(H){var X=H.splide.Components.Slides.getAt(t);return X?X.slide.id:""}).join(" ");Oe(i,Ut,ar(v.slideX,(T?n:t)+1)),Oe(i,zi,G),Oe(i,bn,y?"button":""),y&&dn(i,Wi)}function h(){M||L()}function L(){if(!M){var G=e.index;E(),k(),vn(i,$s,t===G-1),vn(i,Ls,t===G+1)}}function E(){var G=le();G!==Zr(i,qn)&&(vn(i,qn,G),Oe(i,xs,S&&G||""),s(G?is:os,q))}function k(){var G=O(),H=!G&&(!le()||T);if(e.state.is([yi,Ni])||Oe(i,bs,H||""),Oe(wr(i,u.focusableNodes||""),ai,H?-1:""),y&&Oe(i,ai,H?-1:0),G!==Zr(i,dr)&&(vn(i,dr,G),s(G?rs:ls,q)),!G&&document.activeElement===i){var X=a.Slides.getAt(e.index);X&&Zl(X.slide)}}function z(G,H,X){tn(X&&P||i,G,H)}function le(){var G=e.index;return G===t||u.cloneStatus&&G===n}function O(){if(e.is(Vi))return le();var G=Gt(a.Elements.track),H=Gt(i),X=$("left",!0),ne=$("right",!0);return xo(G[X])<=Mi(H[X])&&xo(H[ne])<=Mi(G[ne])}function _(G,H){var X=Dt(G-t);return!T&&(u.rewind||e.is(xi))&&(X=Pn(X,e.length-X)),X<=H}var q={index:t,slideIndex:n,slide:i,container:P,isClone:T,mount:F,destroy:W,update:L,style:z,isWithin:_};return q}function lc(e,t,n){var i=xt(e),o=i.on,l=i.emit,s=i.bind,d=t.Elements,a=d.slides,p=d.list,u=[];function S(){x(),o(Et,v),o(Et,x)}function x(){a.forEach(function(L,E){y(L,E,-1)})}function v(){M(function(L){L.destroy()}),Cn(u)}function m(){M(function(L){L.update()})}function y(L,E,k){var z=rc(e,E,k,L);z.mount(),u.push(z),u.sort(function(le,O){return le.index-O.index})}function $(L){return L?F(function(E){return!E.isClone}):u}function w(L){var E=t.Controller,k=E.toIndex(L),z=E.hasFocus()?1:n.perPage;return F(function(le){return co(le.index,k,k+z-1)})}function C(L){return F(L)[0]}function T(L,E){Xt(L,function(k){if(An(k)&&(k=Ql(k)),Yl(k)){var z=a[E];z?Sr(k,z):Oi(p,k),cn(k,n.classes.slide),W(k,ct(l,ui))}}),l(Et)}function P(L){Un(F(L).map(function(E){return E.slide})),l(Et)}function M(L,E){$(E).forEach(L)}function F(L){return u.filter(Xl(L)?L:function(E){return An(L)?Li(E.slide,L):br(Bi(L),E.index)})}function b(L,E,k){M(function(z){z.style(L,E,k)})}function W(L,E){var k=wr(L,"img"),z=k.length;z?k.forEach(function(le){s(le,"load error",function(){--z||E()})}):E()}function K(L){return L?a.length:u.length}function h(){return u.length>n.perPage}return{mount:S,destroy:v,update:m,register:y,get:$,getIn:w,getAt:C,add:T,remove:P,forEach:M,filter:F,style:b,getLength:K,isEnough:h}}function sc(e,t,n){var i=xt(e),o=i.on,l=i.bind,s=i.emit,d=t.Slides,a=t.Direction.resolve,p=t.Elements,u=p.root,S=p.track,x=p.list,v=d.getAt,m=d.style,y,$,w;function C(){T(),l(window,"resize load",ja(ct(s,ui))),o([Nt,Et],T),o(ui,P)}function T(){y=n.direction===Wo,tn(u,"maxWidth",On(n.width)),tn(S,a("paddingLeft"),M(!1)),tn(S,a("paddingRight"),M(!0)),P(!0)}function P(q){var G=Gt(u);(q||$.width!==G.width||$.height!==G.height)&&(tn(S,"height",F()),m(a("marginRight"),On(n.gap)),m("width",W()),m("height",K(),!0),$=G,s($o),w!==(w=_())&&(vn(u,Is,w),s(Oa,w)))}function M(q){var G=n.padding,H=a(q?"right":"left");return G&&On(G[H]||($i(G)?0:G))||"0px"}function F(){var q="";return y&&(q=b(),wi(q,"height or heightRatio is missing."),q="calc("+q+" - "+M(!1)+" - "+M(!0)+")"),q}function b(){return On(n.height||Gt(x).width*n.heightRatio)}function W(){return n.autoWidth?null:On(n.fixedWidth)||(y?"":h())}function K(){return On(n.fixedHeight)||(y?n.autoHeight?null:h():b())}function h(){var q=On(n.gap);return"calc((100%"+(q&&" + "+q)+")/"+(n.perPage||1)+(q&&" - "+q)+")"}function L(){return Gt(x)[a("width")]}function E(q,G){var H=v(q||0);return H?Gt(H.slide)[a("width")]+(G?0:le()):0}function k(q,G){var H=v(q);if(H){var X=Gt(H.slide)[a("right")],ne=Gt(x)[a("left")];return Dt(X-ne)+(G?0:le())}return 0}function z(q){return k(e.length-1)-k(0)+E(0,q)}function le(){var q=v(0);return q&&parseFloat(tn(q.slide,a("marginRight")))||0}function O(q){return parseFloat(tn(S,a("padding"+(q?"Right":"Left"))))||0}function _(){return e.is(Vi)||z(!0)>L()}return{mount:C,resize:P,listSize:L,slideSize:E,sliderSize:z,totalSize:k,getPadding:O,isOverflow:_}}var ac=2;function cc(e,t,n){var i=xt(e),o=i.on,l=t.Elements,s=t.Slides,d=t.Direction.resolve,a=[],p;function u(){o(Et,S),o([Nt,ui],v),(p=$())&&(m(p),t.Layout.resize(!0))}function S(){x(),u()}function x(){Un(a),Cn(a),i.destroy()}function v(){var w=$();p!==w&&(p<w||!w)&&i.emit(Et)}function m(w){var C=s.get().slice(),T=C.length;if(T){for(;C.length<w;)ao(C,C);ao(C.slice(-w),C.slice(0,w)).forEach(function(P,M){var F=M<w,b=y(P.slide,M);F?Sr(b,C[0].slide):Oi(l.list,b),ao(a,b),s.register(b,M-w+(F?0:T),P.index)})}}function y(w,C){var T=w.cloneNode(!0);return cn(T,n.classes.clone),T.id=e.root.id+"-clone"+Tr(C+1),T}function $(){var w=n.clones;if(!e.is(xi))w=0;else if(Hi(w)){var C=n[d("fixedWidth")]&&t.Layout.slideSize(0),T=C&&Mi(Gt(l.track)[d("width")]/C);w=T||n[d("autoWidth")]&&e.length||n.perPage*ac}return w}return{mount:u,destroy:x}}function dc(e,t,n){var i=xt(e),o=i.on,l=i.emit,s=e.state.set,d=t.Layout,a=d.slideSize,p=d.getPadding,u=d.totalSize,S=d.listSize,x=d.sliderSize,v=t.Direction,m=v.resolve,y=v.orient,$=t.Elements,w=$.list,C=$.track,T;function P(){T=t.Transition,o([Nn,$o,Nt,Et],M)}function M(){t.Controller.isBusy()||(t.Scroll.cancel(),b(e.index),t.Slides.update())}function F(H,X,ne,se){H!==X&&q(H>ne)&&(L(),W(h(z(),H>ne),!0)),s(yi),l(Tn,X,ne,H),T.start(X,function(){s(di),l(vi,X,ne,H),se&&se()})}function b(H){W(k(H,!0))}function W(H,X){if(!e.is(Vi)){var ne=X?H:K(H);tn(w,"transform","translate"+m("X")+"("+ne+"px)"),H!==ne&&l(fs)}}function K(H){if(e.is(xi)){var X=E(H),ne=X>t.Controller.getEnd(),se=X<0;(se||ne)&&(H=h(H,ne))}return H}function h(H,X){var ne=H-_(X),se=x();return H-=y(se*(Mi(Dt(ne)/se)||1))*(X?1:-1),H}function L(){W(z(),!0),T.cancel()}function E(H){for(var X=t.Slides.get(),ne=0,se=1/0,N=0;N<X.length;N++){var de=X[N].index,g=Dt(k(de,!0)-H);if(g<=se)se=g,ne=de;else break}return ne}function k(H,X){var ne=y(u(H-1)-O(H));return X?le(ne):ne}function z(){var H=m("left");return Gt(w)[H]-Gt(C)[H]+y(p(!1))}function le(H){return n.trimSpace&&e.is(pi)&&(H=ii(H,0,y(x(!0)-S()))),H}function O(H){var X=n.focus;return X==="center"?(S()-a(H,!0))/2:+X*a(H)||0}function _(H){return k(H?t.Controller.getEnd():0,!!n.trimSpace)}function q(H){var X=y(h(z(),H));return H?X>=0:X<=w[m("scrollWidth")]-Gt(C)[m("width")]}function G(H,X){X=Hi(X)?z():X;var ne=H!==!0&&y(X)<y(_(!1)),se=H!==!1&&y(X)>y(_(!0));return ne||se}return{mount:P,move:F,jump:b,translate:W,shift:h,cancel:L,toIndex:E,toPosition:k,getPosition:z,getLimit:_,exceededLimit:G,reposition:M}}function uc(e,t,n){var i=xt(e),o=i.on,l=i.emit,s=t.Move,d=s.getPosition,a=s.getLimit,p=s.toPosition,u=t.Slides,S=u.isEnough,x=u.getLength,v=n.omitEnd,m=e.is(xi),y=e.is(pi),$=ct(z,!1),w=ct(z,!0),C=n.start||0,T,P=C,M,F,b;function W(){K(),o([Nt,Et,bo],K),o($o,h)}function K(){M=x(!0),F=n.perMove,b=n.perPage,T=q();var g=ii(C,0,v?T:M-1);g!==C&&(C=g,s.reposition())}function h(){T!==q()&&l(bo)}function L(g,ie,fe){if(!de()){var oe=k(g),Ce=_(oe);Ce>-1&&(ie||Ce!==C)&&(ne(Ce),s.move(oe,Ce,P,fe))}}function E(g,ie,fe,oe){t.Scroll.scroll(g,ie,fe,function(){var Ce=_(s.toIndex(d()));ne(v?Pn(Ce,T):Ce),oe&&oe()})}function k(g){var ie=C;if(An(g)){var fe=g.match(/([+\-<>])(\d+)?/)||[],oe=fe[1],Ce=fe[2];oe==="+"||oe==="-"?ie=le(C+ +(""+oe+(+Ce||1)),C):oe===">"?ie=Ce?G(+Ce):$(!0):oe==="<"&&(ie=w(!0))}else ie=m?g:ii(g,0,T);return ie}function z(g,ie){var fe=F||(N()?1:b),oe=le(C+fe*(g?-1:1),C,!(F||N()));return oe===-1&&y&&!ts(d(),a(!g),1)?g?0:T:ie?oe:_(oe)}function le(g,ie,fe){if(S()||N()){var oe=O(g);oe!==g&&(ie=g,g=oe,fe=!1),g<0||g>T?!F&&(co(0,g,ie,!0)||co(T,ie,g,!0))?g=G(H(g)):m?g=fe?g<0?-(M%b||b):M:g:n.rewind?g=g<0?T:0:g=-1:fe&&g!==ie&&(g=G(H(ie)+(g<ie?-1:1)))}else g=-1;return g}function O(g){if(y&&n.trimSpace==="move"&&g!==C)for(var ie=d();ie===p(g,!0)&&co(g,0,e.length-1,!n.rewind);)g<C?--g:++g;return g}function _(g){return m?(g+M)%M||0:g}function q(){for(var g=M-(N()||m&&F?1:b);v&&g-- >0;)if(p(M-1,!0)!==p(g,!0)){g++;break}return ii(g,0,M-1)}function G(g){return ii(N()?g:b*g,0,T)}function H(g){return N()?Pn(g,T):xo((g>=T?M-1:g)/b)}function X(g){var ie=s.toIndex(g);return y?ii(ie,0,T):ie}function ne(g){g!==C&&(P=C,C=g)}function se(g){return g?P:C}function N(){return!Hi(n.focus)||n.isNavigation}function de(){return e.state.is([yi,Ni])&&!!n.waitForTransition}return{mount:W,go:L,scroll:E,getNext:$,getPrev:w,getAdjacent:z,getEnd:q,setIndex:ne,getIndex:se,toIndex:G,toPage:H,toDest:X,hasFocus:N,isBusy:de}}var pc="http://www.w3.org/2000/svg",mc="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",Ui=40;function gc(e,t,n){var i=xt(e),o=i.on,l=i.bind,s=i.emit,d=n.classes,a=n.i18n,p=t.Elements,u=t.Controller,S=p.arrows,x=p.track,v=S,m=p.prev,y=p.next,$,w,C={};function T(){M(),o(Nt,P)}function P(){F(),T()}function M(){var E=n.arrows;E&&!(m&&y)&&K(),m&&y&&(Ii(C,{prev:m,next:y}),Ri(v,E?"":"none"),cn(v,w=Pr+"--"+n.direction),E&&(b(),L(),Oe([m,y],zi,x.id),s(ds,m,y)))}function F(){i.destroy(),xn(v,w),$?(Un(S?[m,y]:v),m=y=null):dn([m,y],Ar)}function b(){o([Nn,vi,Et,Xn,bo],L),l(y,"click",ct(W,">")),l(m,"click",ct(W,"<"))}function W(E){u.go(E,!0)}function K(){v=S||si("div",d.arrows),m=h(!0),y=h(!1),$=!0,Oi(v,[m,y]),!S&&Sr(v,x)}function h(E){var k='<button class="'+d.arrow+" "+(E?d.prev:d.next)+'" type="button"><svg xmlns="'+pc+'" viewBox="0 0 '+Ui+" "+Ui+'" width="'+Ui+'" height="'+Ui+'" focusable="false"><path d="'+(n.arrowPath||mc)+'" />';return Ql(k)}function L(){if(m&&y){var E=e.index,k=u.getPrev(),z=u.getNext(),le=k>-1&&E<k?a.last:a.prev,O=z>-1&&E>z?a.first:a.next;m.disabled=k<0,y.disabled=z<0,Oe(m,Ut,le),Oe(y,Ut,O),s(us,m,y,k,z)}}return{arrows:C,mount:T,destroy:F,update:L}}var hc=Cr+"-interval";function fc(e,t,n){var i=xt(e),o=i.on,l=i.bind,s=i.emit,d=Eo(n.interval,e.go.bind(e,">"),b),a=d.isPaused,p=t.Elements,u=t.Elements,S=u.root,x=u.toggle,v=n.autoplay,m,y,$=v==="pause";function w(){v&&(C(),x&&Oe(x,zi,p.track.id),$||T(),F())}function C(){n.pauseOnHover&&l(S,"mouseenter mouseleave",function(K){m=K.type==="mouseenter",M()}),n.pauseOnFocus&&l(S,"focusin focusout",function(K){y=K.type==="focusin",M()}),x&&l(x,"click",function(){$?T():P(!0)}),o([Tn,Lo,Et],d.rewind),o(Tn,W)}function T(){a()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),y=m=$=!1,F(),s(Ir))}function P(K){K===void 0&&(K=!0),$=!!K,F(),a()||(d.pause(),s(Rr))}function M(){$||(m||y?P(!1):T())}function F(){x&&(vn(x,qn,!$),Oe(x,Ut,n.i18n[$?"play":"pause"]))}function b(K){var h=p.bar;h&&tn(h,"width",K*100+"%"),s(gs,K)}function W(K){var h=t.Slides.getAt(K);d.set(h&&+nn(h.slide,hc)||n.interval)}return{mount:w,destroy:d.cancel,play:T,pause:P,isPaused:a}}function yc(e,t,n){var i=xt(e),o=i.on;function l(){n.cover&&(o(Mr,ct(d,!0)),o([Nn,Nt,Et],ct(s,!0)))}function s(a){t.Slides.forEach(function(p){var u=Di(p.container||p.slide,"img");u&&u.src&&d(a,u,p)})}function d(a,p,u){u.style("background",a?'center/cover no-repeat url("'+p.src+'")':"",!0),Ri(p,a?"none":"")}return{mount:l,destroy:ct(s,!1)}}var vc=10,xc=600,bc=.6,Sc=1.5,wc=800;function Cc(e,t,n){var i=xt(e),o=i.on,l=i.emit,s=e.state.set,d=t.Move,a=d.getPosition,p=d.getLimit,u=d.exceededLimit,S=d.translate,x=e.is(pi),v,m,y=1;function $(){o(Tn,P),o([Nt,Et],M)}function w(b,W,K,h,L){var E=a();if(P(),K&&(!x||!u())){var k=t.Layout.sliderSize(),z=sr(b)*k*xo(Dt(b)/k)||0;b=d.toPosition(t.Controller.toDest(b%k))+z}var le=ts(E,b,1);y=1,W=le?0:W||vo(Dt(b-E)/Sc,wc),m=h,v=Eo(W,C,ct(T,E,b,L),1),s(Ni),l(Lo),v.start()}function C(){s(di),m&&m(),l(Xn)}function T(b,W,K,h){var L=a(),E=b+(W-b)*F(h),k=(E-L)*y;S(L+k),x&&!K&&u()&&(y*=bc,Dt(k)<vc&&w(p(u(!0)),xc,!1,m,!0))}function P(){v&&v.cancel()}function M(){v&&!v.isPaused()&&(P(),C())}function F(b){var W=n.easingFunc;return W?W(b):1-Math.pow(1-b,4)}return{mount:$,destroy:P,scroll:w,cancel:M}}var oi={passive:!1,capture:!0};function Tc(e,t,n){var i=xt(e),o=i.on,l=i.emit,s=i.bind,d=i.unbind,a=e.state,p=t.Move,u=t.Scroll,S=t.Controller,x=t.Elements.track,v=t.Media.reduce,m=t.Direction,y=m.resolve,$=m.orient,w=p.getPosition,C=p.exceededLimit,T,P,M,F,b,W=!1,K,h,L;function E(){s(x,jo,rr,oi),s(x,zo,rr,oi),s(x,Rs,z,oi),s(x,"click",_,{capture:!0}),s(x,"dragstart",yn),o([Nn,Nt],k)}function k(){var B=n.drag;re(!B),F=B==="free"}function z(B){if(K=!1,!h){var Q=Ce(B);oe(B.target)&&(Q||!B.button)&&(S.isBusy()?yn(B,!0):(L=Q?x:window,b=a.is([yi,Ni]),M=null,s(L,jo,le,oi),s(L,zo,O,oi),p.cancel(),u.cancel(),q(B)))}}function le(B){if(a.is(so)||(a.set(so),l(ss)),B.cancelable)if(b){p.translate(T+fe(N(B)));var Q=de(B)>ll,U=W!==(W=C());(Q||U)&&q(B),K=!0,l(as),yn(B)}else X(B)&&(b=H(B),yn(B))}function O(B){a.is(so)&&(a.set(di),l(cs)),b&&(G(B),yn(B)),d(L,jo,le),d(L,zo,O),b=!1}function _(B){!h&&K&&yn(B,!0)}function q(B){M=P,P=B,T=w()}function G(B){var Q=ne(B),U=se(Q),J=n.rewind&&n.rewindByDrag;v(!1),F?S.scroll(U,0,n.snap):e.is(Vi)?S.go($(sr(Q))<0?J?"<":"-":J?">":"+"):e.is(pi)&&W&&J?S.go(C(!0)?">":"<"):S.go(S.toDest(U),!0),v(!0)}function H(B){var Q=n.dragMinThreshold,U=$i(Q),J=U&&Q.mouse||0,Me=(U?Q.touch:+Q)||10;return Dt(N(B))>(Ce(B)?Me:J)}function X(B){return Dt(N(B))>Dt(N(B,!0))}function ne(B){if(e.is(xi)||!W){var Q=de(B);if(Q&&Q<ll)return N(B)/Q}return 0}function se(B){return w()+sr(B)*Pn(Dt(B)*(n.flickPower||600),F?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function N(B,Q){return ie(B,Q)-ie(g(B),Q)}function de(B){return lr(B)-lr(g(B))}function g(B){return P===B&&M||P}function ie(B,Q){return(Ce(B)?B.changedTouches[0]:B)["page"+y(Q?"Y":"X")]}function fe(B){return B/(W&&e.is(pi)?ic:1)}function oe(B){var Q=n.noDrag;return!Li(B,"."+Ts+", ."+Ao)&&(!Q||!Li(B,Q))}function Ce(B){return typeof TouchEvent<"u"&&B instanceof TouchEvent}function me(){return b}function re(B){h=B}return{mount:E,disable:re,isDragging:me}}var $c={Spacebar:" ",Right:Mo,Left:Ro,Up:ys,Down:vs};function kr(e){return e=An(e)?e:e.key,$c[e]||e}var sl="keydown";function Lc(e,t,n){var i=xt(e),o=i.on,l=i.bind,s=i.unbind,d=e.root,a=t.Direction.resolve,p,u;function S(){x(),o(Nt,v),o(Nt,x),o(Tn,y)}function x(){var w=n.keyboard;w&&(p=w==="global"?window:d,l(p,sl,$))}function v(){s(p,sl)}function m(w){u=w}function y(){var w=u;u=!0,ql(function(){u=w})}function $(w){if(!u){var C=kr(w);C===a(Ro)?e.go("<"):C===a(Mo)&&e.go(">")}}return{mount:S,destroy:v,disable:m}}var Ci=Cr+"-lazy",uo=Ci+"-srcset",Ec="["+Ci+"], ["+uo+"]";function Ic(e,t,n){var i=xt(e),o=i.on,l=i.off,s=i.bind,d=i.emit,a=n.lazyLoad==="sequential",p=[vi,Xn],u=[];function S(){n.lazyLoad&&(x(),o(Et,x))}function x(){Cn(u),v(),a?w():(l(p),o(p,m),m())}function v(){t.Slides.forEach(function(C){wr(C.slide,Ec).forEach(function(T){var P=nn(T,Ci),M=nn(T,uo);if(P!==T.src||M!==T.srcset){var F=n.classes.spinner,b=T.parentElement,W=Di(b,"."+F)||si("span",F,b);u.push([T,C,W]),T.src||Ri(T,"none")}})})}function m(){u=u.filter(function(C){var T=n.perPage*((n.preloadPages||1)+1)-1;return C[1].isWithin(e.index,T)?y(C):!0}),u.length||l(p)}function y(C){var T=C[0];cn(C[1].slide,ur),s(T,"load error",ct($,C)),Oe(T,"src",nn(T,Ci)),Oe(T,"srcset",nn(T,uo)),dn(T,Ci),dn(T,uo)}function $(C,T){var P=C[0],M=C[1];xn(M.slide,ur),T.type!=="error"&&(Un(C[2]),Ri(P,""),d(Mr,P,M),d(ui)),a&&w()}function w(){u.length&&y(u.shift())}return{mount:S,destroy:ct(Cn,u),check:m}}function Rc(e,t,n){var i=xt(e),o=i.on,l=i.emit,s=i.bind,d=t.Slides,a=t.Elements,p=t.Controller,u=p.hasFocus,S=p.getIndex,x=p.go,v=t.Direction.resolve,m=a.pagination,y=[],$,w;function C(){T(),o([Nt,Et,bo],C);var h=n.pagination;m&&Ri(m,h?"":"none"),h&&(o([Tn,Lo,Xn],K),P(),K(),l(ps,{list:$,items:y},W(e.index)))}function T(){$&&(Un(m?Fn($.children):$),xn($,w),Cn(y),$=null),i.destroy()}function P(){var h=e.length,L=n.classes,E=n.i18n,k=n.perPage,z=u()?p.getEnd()+1:Mi(h/k);$=m||si("ul",L.pagination,a.track.parentElement),cn($,w=Po+"--"+b()),Oe($,bn,"tablist"),Oe($,Ut,E.select),Oe($,_r,b()===Wo?"vertical":"");for(var le=0;le<z;le++){var O=si("li",null,$),_=si("button",{class:L.page,type:"button"},O),q=d.getIn(le).map(function(H){return H.slide.id}),G=!u()&&k>1?E.pageX:E.slideX;s(_,"click",ct(M,le)),n.paginationKeyboard&&s(_,"keydown",ct(F,le)),Oe(O,bn,"presentation"),Oe(_,bn,"tab"),Oe(_,zi,q.join(" ")),Oe(_,Ut,ar(G,le+1)),Oe(_,ai,-1),y.push({li:O,button:_,page:le})}}function M(h){x(">"+h,!0)}function F(h,L){var E=y.length,k=kr(L),z=b(),le=-1;k===v(Mo,!1,z)?le=++h%E:k===v(Ro,!1,z)?le=(--h+E)%E:k==="Home"?le=0:k==="End"&&(le=E-1);var O=y[le];O&&(Zl(O.button),x(">"+le),yn(L,!0))}function b(){return n.paginationDirection||n.direction}function W(h){return y[p.toPage(h)]}function K(){var h=W(S(!0)),L=W(S());if(h){var E=h.button;xn(E,qn),dn(E,tl),Oe(E,ai,-1)}if(L){var k=L.button;cn(k,qn),Oe(k,tl,!0),Oe(k,ai,"")}l(ms,{list:$,items:y},h,L)}return{items:y,mount:C,destroy:T,getAt:W,update:K}}var Mc=[" ","Enter"];function Wc(e,t,n){var i=n.isNavigation,o=n.slideFocus,l=[];function s(){e.splides.forEach(function(m){m.isParent||(p(e,m.splide),p(m.splide,e))}),i&&u()}function d(){l.forEach(function(m){m.destroy()}),Cn(l)}function a(){d(),s()}function p(m,y){var $=xt(m);$.on(Tn,function(w,C,T){y.go(y.is(xi)?T:w)}),l.push($)}function u(){var m=xt(e),y=m.on;y($r,x),y(hs,v),y([Nn,Nt],S),l.push(m),m.emit(Er,e.splides)}function S(){Oe(t.Elements.list,_r,n.direction===Wo?"vertical":"")}function x(m){e.go(m.index)}function v(m,y){br(Mc,kr(y))&&(x(m),yn(y))}return{setup:ct(t.Media.set,{slideFocus:Hi(o)?i:o},!0),mount:s,destroy:d,remount:a}}function _c(e,t,n){var i=xt(e),o=i.bind,l=0;function s(){n.wheel&&o(t.Elements.track,"wheel",d,oi)}function d(p){if(p.cancelable){var u=p.deltaY,S=u<0,x=lr(p),v=n.wheelMinThreshold||0,m=n.wheelSleep||0;Dt(u)>v&&x-l>m&&(e.go(S?"<":">"),l=x),a(S)&&yn(p)}}function a(p){return!n.releaseWheel||e.state.is(yi)||t.Controller.getAdjacent(p)!==-1}return{mount:s}}var Ac=90;function Pc(e,t,n){var i=xt(e),o=i.on,l=t.Elements.track,s=n.live&&!n.isNavigation,d=si("span",Za),a=Eo(Ac,ct(u,!1));function p(){s&&(x(!t.Autoplay.isPaused()),Oe(l,ol,!0),d.textContent="…",o(Ir,ct(x,!0)),o(Rr,ct(x,!1)),o([vi,Xn],ct(u,!0)))}function u(v){Oe(l,il,v),v?(Oi(l,d),a.start()):(Un(d),a.cancel())}function S(){dn(l,[nl,ol,il]),Un(d)}function x(v){s&&Oe(l,nl,v?"off":"polite")}return{mount:p,disable:x,destroy:S}}var kc=Object.freeze({__proto__:null,Media:za,Direction:Va,Elements:oc,Slides:lc,Layout:sc,Clones:cc,Move:dc,Controller:uc,Arrows:gc,Autoplay:fc,Cover:yc,Scroll:Cc,Drag:Tc,Keyboard:Lc,LazyLoad:Ic,Pagination:Rc,Sync:Wc,Wheel:_c,Live:Pc}),Fc={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"},Nc={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:tc,i18n:Fc,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Hc(e,t,n){var i=t.Slides;function o(){xt(e).on([Nn,Et],l)}function l(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function s(d,a){i.style("transition","opacity "+n.speed+"ms "+n.easing),ql(a)}return{mount:o,start:s,cancel:rr}}function Bc(e,t,n){var i=t.Move,o=t.Controller,l=t.Scroll,s=t.Elements.list,d=ct(tn,s,"transition"),a;function p(){xt(e).bind(s,"transitionend",function(v){v.target===s&&a&&(S(),a())})}function u(v,m){var y=i.toPosition(v,!0),$=i.getPosition(),w=x(v);Dt(y-$)>=1&&w>=1?n.useScroll?l.scroll(y,w,!1,m):(d("transform "+w+"ms "+n.easing),i.translate(y,!0),a=m):(i.jump(v),m())}function S(){d(""),l.cancel()}function x(v){var m=n.rewindSpeed;if(e.is(pi)&&m){var y=o.getIndex(!0),$=o.getEnd();if(y===0&&v>=$||y>=$&&v===0)return m}return n.speed}return{mount:p,start:u,cancel:S}}var Oc=(function(){function e(n,i){this.event=xt(),this.Components={},this.state=Da(li),this.splides=[],this._o={},this._E={};var o=An(n)?es(document,n):n;wi(o,o+" is invalid."),this.root=o,i=_n({label:nn(o,Ut)||"",labelledby:nn(o,Wr)||""},Nc,e.defaults,i||{});try{_n(i,JSON.parse(nn(o,Cr)))}catch{wi(!1,"Invalid JSON")}this._o=Object.create(_n({},i))}var t=e.prototype;return t.mount=function(i,o){var l=this,s=this.state,d=this.Components;wi(s.is([li,yo]),"Already mounted!"),s.set(li),this._C=d,this._T=o||this._T||(this.is(Vi)?Hc:Bc),this._E=i||this._E;var a=Ii({},kc,this._E,{Transition:this._T});return Gn(a,function(p,u){var S=p(l,d,l._o);d[u]=S,S.setup&&S.setup()}),Gn(d,function(p){p.mount&&p.mount()}),this.emit(Nn),cn(this.root,Qa),s.set(di),this.emit(cr),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(di)&&(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(Fn(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(Et),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,l=this.state;return l.is(li)?xt(this).on(cr,this.destroy.bind(this,i)):(Gn(this._C,function(s){s.destroy&&s.destroy(i)},!0),o.emit(Lr),o.destroy(),i&&Cn(this.splides),l.set(yo)),this},Fa(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})(),Fr=Oc;Fr.defaults={};Fr.STATES=Ha;var al=[[Nn,"onMounted"],[cr,"onReady"],[Tn,"onMove"],[vi,"onMoved"],[$r,"onClick"],[is,"onActive"],[os,"onInactive"],[rs,"onVisible"],[ls,"onHidden"],[Et,"onRefresh"],[Nt,"onUpdated"],[ui,"onResize"],[$o,"onResized"],[ss,"onDrag"],[as,"onDragging"],[cs,"onDragged"],[Lo,"onScroll"],[Xn,"onScrolled"],[Lr,"onDestroy"],[ds,"onArrowsMounted"],[us,"onArrowsUpdated"],[ps,"onPaginationMounted"],[ms,"onPaginationUpdated"],[Er,"onNavigationMounted"],[Ir,"onAutoplayPlay"],[gs,"onAutoplayPlaying"],[Rr,"onAutoplayPause"],[Mr,"onLazyLoadLoaded"]];function Nr(...e){return e.filter(Boolean).join(" ")}function So(e){return e!==null&&typeof e=="object"}function pr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!pr(n,t[i]));if(So(e)&&So(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!pr(e[o],t[o]))}return e===t}function Dc(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function jc(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 mr(e,t){const n=e;return jc(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():So(i)?n[o]=mr(So(n[o])?n[o]:{},i):n[o]=i}),n}var zc=({children:e,className:t,...n})=>c.createElement("div",{className:Nr("splide__track",t),...n},c.createElement("ul",{className:"splide__list"},e)),Hr=class extends c.Component{constructor(){super(...arguments),this.splideRef=c.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Fr(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=mr({},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&&!pr(this.options,e)&&(this.splide.options=e,this.options=mr({},e));const t=this.getSlides();Dc(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){al.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 c.createElement(t,{className:Nr("splide",e),ref:this.splideRef,...this.omit(o,["options",...al.map(l=>l[1])])},n?c.createElement(zc,null,i):i)}},Br=({children:e,className:t,...n})=>c.createElement("li",{className:Nr("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 Vc="RichTextRenderer-module__link___BWeZ2",Kc={link:Vc},Uc=t=>{const e=t.trim();return!e||e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?!1:e.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},Io=t=>t&&t.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Uc(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function en(t){const{color:e,...n}=t;return n}function We(t,e){var r,l,s;const{fontSize:n,lineHeight:i}=t;return{fontFamily:Io(t.fontSettings.fontFamily),fontWeight:t.fontSettings.fontWeight,fontStyle:t.fontSettings.fontStyle,letterSpacing:I.scalingValue(t.letterSpacing,e),wordSpacing:I.scalingValue(t.wordSpacing,e),fontSize:I.scalingValue(n,e),lineHeight:i!==void 0?I.scalingValue(i,e):void 0,textTransform:(r=t.textAppearance)==null?void 0:r.textTransform,textDecoration:(l=t.textAppearance)==null?void 0:l.textDecoration,fontVariant:(s=t.textAppearance)==null?void 0:s.fontVariant,textAlign:t.textAlign,color:t.color}}const wi=({content:t})=>{const e=n=>n.map((i,r)=>i.type==="link"?o.jsx("a",{className:Kc.link,href:i.value,target:i.target,children:e(i.children)},r):o.jsx("span",{style:Gc(i),children:i.text},r));return o.jsx(o.Fragment,{children:t.map((n,i)=>{const r=n.children;return o.jsx("div",{children:e(r)},i)})})};function Gc(t){return{...t.fontFamily&&{fontFamily:Io(t.fontFamily)},...t.fontWeight&&{fontWeight:t.fontWeight},...t.fontStyle&&{fontStyle:t.fontStyle},...t.textDecoration&&{textDecoration:t.textDecoration},...t.textTransform&&{textTransform:t.textTransform},...t.fontVariant&&{fontVariant:t.fontVariant},...t.verticalAlign&&{verticalAlign:t.verticalAlign,lineHeight:"0px"}}}const qc="SvgImage-module__svg___q3xE-",Xc="SvgImage-module__img___VsTm-",rl={svg:qc,img:Xc},Yc=t=>{const e=t.trim();return e.startsWith("data:image/svg+xml")?!0:(e.split(/[?#]/)[0]??e).endsWith(".svg")},Jc=t=>`url("${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,nn=({url:t,fill:e="#000000",hoverFill:n="#CCCCCC",className:i="",style:r})=>{const[l,s]=c.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return c.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');s(d)}},[]),!Yc(t)||!l?o.jsx("img",{src:t,alt:"",className:Xt(rl.img,i),style:r}):o.jsx("span",{"data-supports-mask":l,className:Xt(rl.svg,i),style:{"--svg":Jc(t),"--fill":e,"--hover-fill":n,...r??{}}})},Zc={"top-left":bt.topLeftAlignment,"top-center":bt.topCenterAlignment,"top-right":bt.topRightAlignment,"middle-left":bt.middleLeftAlignment,"middle-center":bt.middleCenterAlignment,"middle-right":bt.middleRightAlignment,"bottom-left":bt.bottomLeftAlignment,"bottom-center":bt.bottomCenterAlignment,"bottom-right":bt.bottomRightAlignment};function Qc({settings:t,content:e,styles:n,isEditor:i}){const[r,l]=c.useState(null),{widthSettings:s,fontSettings:d,letterSpacing:a,textAlign:p,wordSpacing:u,fontSizeLineHeight:S,textAppearance:x,color:y}=n.imageCaption??{},[m,f]=c.useState(void 0),[L,w]=c.useState(null),[$,C]=c.useState(0),[P,E]=c.useState(0),{direction:k,transition:b,controls:M,pagination:z,imageCaption:h,triggers:T}=t,_=c.useRef(b.type),{x:N,y:V}=t.controls.offset,at=O=>{r&&r.go(O)};return c.useEffect(()=>{if(!L)return;const O=new ResizeObserver(W=>{if(!r)return;const[G]=W;f({width:Math.round(G.contentRect.width),height:Math.round(G.contentRect.height)})});return O.observe(L),()=>O.unobserve(L)},[L]),c.useEffect(()=>{!r||_.current===b.type||(E(O=>O+1),_.current=b.type)},[b.type]),o.jsx("div",{className:Xt(bt.wrapper,{[bt.editor]:i}),ref:w,children:o.jsxs("div",{className:bt.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[t.imageCaption.isActive&&o.jsx("div",{className:Xt(bt.captionBlock),children:o.jsx("div",{className:bt.captionTextWrapper,children:e.map((O,W)=>o.jsx("div",{className:Xt(bt.captionText,Zc[h.alignment],{[bt.withPointerEvents]:W===$&&i,[bt.active]:W===$}),style:{fontFamily:Io(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:s.sizing==="auto"?"max-content":I.scalingValue(s.width,i),letterSpacing:I.scalingValue(a,i),wordSpacing:I.scalingValue(u,i),textAlign:p,fontSize:I.scalingValue(S.fontSize,i),lineHeight:I.scalingValue(S.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:y,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:o.jsx("div",{"data-styles":"imageCaption",className:bt.captionTextInner,style:{"--link-hover-color":h.linkHoverColor,"--link-color":h.linkColor,position:"relative",top:I.scalingValue(h.offset.y,i),left:I.scalingValue(h.offset.x,i)},children:o.jsx(wi,{content:O.imageCaption})})},W))})}),o.jsx(Mr,{onMove:O=>{C(O.index)},ref:l,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:T.autoPlay!==null,...T.autoPlay!==null&&{interval:parseInt(T.autoPlay)*1e3},direction:k==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:T.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:e.map((O,W)=>o.jsx(_r,{children:o.jsx("div",{className:bt.sliderItem,children:o.jsx("div",{className:bt.imgWrapper,children:o.jsx("img",{className:Xt(bt.sliderImage,{[bt.contain]:O.image.objectFit==="contain",[bt.cover]:O.image.objectFit==="cover"}),src:O.image.url,alt:O.image.name??""})})})},W))},P),M.isActive&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:Xt(bt.arrow,{[bt.arrowVertical]:k==="vert",[bt.hoverArrow]:M.show==="on hover"}),style:{color:M.color,"--arrow-hover-color":M.hover},children:o.jsxs("button",{onClick:()=>{at("-1")},className:bt.arrowInner,style:{transform:`translate(${I.scalingValue(N,i)}, ${I.scalingValue(V*(k==="horiz"?1:-1),i)}) scale(${t.controls.scale/100}) rotate(${k==="horiz"?"0deg":"90deg"})`},children:[M.arrowsImgUrl&&o.jsx(nn,{url:M.arrowsImgUrl,fill:M.color,hoverFill:M.hover,className:Xt(bt.arrowImg,bt.mirror)}),!M.arrowsImgUrl&&o.jsx(ll,{color:M.color,className:Xt(bt.arrowIcon,bt.arrowImg,bt.mirror)})]})}),o.jsx("div",{className:Xt(bt.arrow,bt.nextArrow,{[bt.arrowVertical]:k==="vert",[bt.hoverArrow]:M.show==="on hover"}),style:{color:M.color,"--arrow-hover-color":M.hover},children:o.jsxs("button",{className:bt.arrowInner,onClick:()=>at("+1"),style:{transform:`translate(${I.scalingValue(N*(k==="horiz"?-1:1),i)}, ${I.scalingValue(V,i)}) scale(${t.controls.scale/100}) rotate(${k==="horiz"?"0deg":"90deg"})`},children:[M.arrowsImgUrl&&o.jsx(nn,{url:M.arrowsImgUrl,fill:M.color,hoverFill:M.hover,className:bt.arrowImg}),!M.arrowsImgUrl&&o.jsx(ll,{color:M.color,className:Xt(bt.arrowIcon,bt.arrowImg)})]})})]}),T.triggersList.click&&o.jsx("div",{className:bt.clickOverlay,onClick:()=>{r&&r.go("+1")}}),z.isActive&&o.jsx("div",{className:Xt(bt.pagination,{[bt.paginationInsideBottom]:z.position==="inside-1"&&k==="horiz",[bt.paginationInsideTop]:z.position==="inside-2"&&k==="horiz",[bt.paginationOutsideBottom]:z.position==="outside-1"&&k==="horiz",[bt.paginationOutsideTop]:z.position==="outside-2"&&k==="horiz",[bt.paginationInsideLeft]:z.position==="inside-1"&&k==="vert",[bt.paginationInsideRight]:z.position==="inside-2"&&k==="vert",[bt.paginationOutsideLeft]:z.position==="outside-1"&&k==="vert",[bt.paginationOutsideRight]:z.position==="outside-2"&&k==="vert",[bt.paginationVertical]:k==="vert"}),children:o.jsx("div",{className:bt.paginationInner,style:{backgroundColor:z.colors[2],transform:`scale(${z.scale/100}) translate(${I.scalingValue(z.offset.x,i)}, ${I.scalingValue(z.offset.y,i)}) rotate(${k==="horiz"?"0deg":"90deg"})`},children:e.map((O,W)=>o.jsx("button",{onClick:()=>{r&&r.go(W)},className:Xt(bt.paginationItem),children:o.jsx("div",{className:Xt(bt.dot,{[bt.activeDot]:W===$}),style:{backgroundColor:W===$?z.colors[0]:z.colors[1],"--pagination-hover-color":z.hover}})},W))})})]})})}function ll({color:t,className:e}){return o.jsx("svg",{viewBox:"0 0 10 18",className:e,children:o.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:o.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:t,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const td={element:Qc,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"]}},ed="ImageRevealSlider-module__imageRevealSlider___UE5Ob",nd="ImageRevealSlider-module__image___Qjt-e",id="ImageRevealSlider-module__link___N-iLG",od="ImageRevealSlider-module__cursor___2U03d",Vn={imageRevealSlider:ed,image:nd,link:id,cursor:od};function sl(t,e,n){for(const i of n){const r=new Image;r.src=i.url;const l=i.width?Number.parseFloat(i.width):r.naturalWidth,s=r.naturalHeight/r.naturalWidth*l,d=l/2,a=s/2;if(t>=i.x-d&&t<=i.x+d&&e>=i.y-a&&e<=i.y+a)return!0}return!1}function Fo(t){return new Promise(e=>{const n=new Image;n.src=t,n.onload=()=>{e({width:n.naturalWidth,height:n.naturalHeight})}})}async function rd(t,e,n,i){let r,l;if(e==="custom"){r=n;const s=await Fo(t);l=s.height/s.width*r}else if(e==="random"){r=Math.random()*(i.max-i.min)+i.min;const s=await Fo(t);l=s.height/s.width*r}else{const s=await Fo(t);r=s.width,l=s.height}return{width:r,height:l,finalWidth:`${r}px`}}function ld({settings:t,content:e,isEditor:n}){const[i,r]=c.useState(null),[l,s]=c.useState([]),[d,a]=c.useState(0),p=c.useRef(0),[u,S]=c.useState({x:0,y:0}),[x,y]=c.useState(1),[m,f]=c.useState("none"),L=c.useRef({x:0,y:0}),[w,$]=c.useState(!1),{sizeType:C,imageWidth:P,randomRangeImageWidth:E}=t.imageSize,{revealPosition:k,visible:b}=t.position,{cursorType:M,target:z,defaultCursorScale:h,defaultCursor:T,hoverCursorScale:_,hoverCursor:N}=t.cursor;c.useEffect(()=>{if(!i)return;const O=(K,H)=>{const q=i.getBoundingClientRect(),et=K-q.left,lt=H-q.top;if(S({x:et,y:lt}),M==="system"){f("none"),y(1);return}const F=et,ct=lt,g=document.elementFromPoint(q.left+F,q.top+ct);if(g&&g.closest("a")){f("none"),y(1);return}const nt=sl(F,ct,l)||z==="area"?{img:N??"none",scale:_}:{img:T??"none",scale:h};f(nt.img),y(nt.scale)},W=K=>{K.stopPropagation(),L.current={x:K.clientX,y:K.clientY},O(K.clientX,K.clientY)},G=()=>{w&&O(L.current.x,L.current.y)};return i.addEventListener("mousemove",W),window.addEventListener("scroll",G,!0),()=>{i.removeEventListener("mousemove",W),window.removeEventListener("scroll",G,!0)}},[i,w,u,M,z,N,T,_,h,l]),c.useEffect(()=>{w||(f("none"),y(0))},[w]);const V=async(O,W,G,K={})=>{const{width:H,height:q,finalWidth:et}=await rd(O.image.url,C,P,E);let lt=0,F=0;k==="same"?(lt=W/2,F=G/2):(lt=K.x??Math.random()*W,F=K.y??Math.random()*G);const ct=Math.min(Math.max(lt,H/2),W-H/2),g=Math.min(Math.max(F,q/2),G-q/2);return{id:p.current++,url:O.image.url,link:O.link,name:O.image.name,x:ct,y:g,width:et}};c.useEffect(()=>{if(!i||e.length===0)return;const O=i.getBoundingClientRect(),W=O.width,G=O.height,K=[];(async()=>{const q=e[0],et=await V(q,W,G);K.push(et),s(K),a(1)})()},[C,P,E,k,i]),c.useEffect(()=>{b==="last One"&&s(O=>O.length>0?[O[O.length-1]]:[])},[b]);const at=async O=>{if(!i)return;const W=i.getBoundingClientRect(),G=O.clientX-W.left,K=O.clientY-W.top;if(z==="image"&&!sl(G,K,l))return;let H=0,q=0;k==="on Click"?(H=G,q=K):k==="same"?(H=W.width/2,q=W.height/2):(H=Math.random()*W.width,q=Math.random()*W.height);const et=e[d],lt=await V(et,W.width,W.height,{x:H,y:q});s(F=>b==="all"?[...F,lt]:[lt]),a(F=>F>=e.length-1?0:F+1)};return o.jsxs("div",{ref:r,onClick:at,onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),className:Vn.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[l.map(O=>o.jsx("div",{className:Vn.wrapper,style:{top:`${O.y}px`,left:`${O.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:O.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:z==="area"&&O.link?o.jsx("a",{href:O.link,target:"_blank",className:Vn.link,children:o.jsx("img",{src:O.url,alt:O.name,className:Vn.image},O.id)}):o.jsx("img",{src:O.url,alt:O.name,className:Vn.image},O.id)},O.id)),w&&o.jsx("div",{className:Vn.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const sd={element:ld,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:""}]}}}},ad="LightBox-module__hidden___9s-9x",cd="LightBox-module__heroImage___sTxNF",dd="LightBox-module__background___rm9ml",ud="LightBox-module__editor___4ACaY",pd="LightBox-module__contentStyle___Bgnsq",md="LightBox-module__imageStyle___tLIlB",gd="LightBox-module__imgWrapper___LuFUp",hd="LightBox-module__contain___8-yaS",fd="LightBox-module__cover___hNvOG",yd="LightBox-module__caption___b6L2I",vd="LightBox-module__captionTextInner___rCGNH",xd="LightBox-module__lightboxSplide___XFuWC",bd="LightBox-module__arrow___iz38X",Sd="LightBox-module__arrowVertical___Zfz81",wd="LightBox-module__nextArrow___zkAQN",Cd="LightBox-module__arrowInner___p48sW",Td="LightBox-module__arrowIcon___3VaFf",$d="LightBox-module__arrowImg___pNV88",Ld="LightBox-module__mirror___pjeXc",Id="LightBox-module__thumbsWrapper___GB-nU",Ed="LightBox-module__thumbsContainerVertical___wttk5",Rd="LightBox-module__thumbsContainer___osSma",Md="LightBox-module__thumbsAlignStart___MO6tY",_d="LightBox-module__thumbsAlignCenter___Q4sUx",Wd="LightBox-module__thumbsAlignEnd___p4y9R",Ad="LightBox-module__thumbItem___HvnF3",Pd="LightBox-module__closeButton___g2khP",kd="LightBox-module__fadeIn___0m5GW",Fd="LightBox-module__slideInLeft___gPYwC",Nd="LightBox-module__slideInRight___S-pPp",Hd="LightBox-module__slideInTop___DFdAj",Bd="LightBox-module__slideInBottom___m27kZ",Od="LightBox-module__fadeOut___55qBR",Dd="LightBox-module__slideOutLeft___NvU7P",jd="LightBox-module__slideOutRight___SK7eC",zd="LightBox-module__slideOutTop___Vgg0z",Vd="LightBox-module__slideOutBottom___nJ0Ef",Kd="LightBox-module__scaleSlide___vZriG",ut={hidden:ad,heroImage:cd,background:dd,editor:ud,contentStyle:pd,imageStyle:md,imgWrapper:gd,contain:hd,cover:fd,caption:yd,captionTextInner:vd,lightboxSplide:xd,arrow:bd,arrowVertical:Sd,nextArrow:wd,arrowInner:Cd,arrowIcon:Td,arrowImg:$d,mirror:Ld,thumbsWrapper:Id,thumbsContainerVertical:Ed,thumbsContainer:Rd,thumbsAlignStart:Md,thumbsAlignCenter:_d,thumbsAlignEnd:Wd,thumbItem:Ad,closeButton:Pd,fadeIn:kd,slideInLeft:Fd,slideInRight:Nd,slideInTop:Hd,slideInBottom:Bd,fadeOut:Od,slideOutLeft:Dd,slideOutRight:jd,slideOutTop:zd,slideOutBottom:Vd,scaleSlide:Kd},Oi=(t,e,n)=>{const i={},[r,l]=t.split("-");return r==="top"?(i.top="0",i.bottom="auto"):r==="middle"?(i.top="50%",i.bottom="auto"):r==="bottom"&&(i.top="auto",i.bottom="0"),l==="left"?(i.left="0",i.right="auto"):l==="center"?(i.left="50%",i.right="auto"):l==="right"&&(i.left="auto",i.right="0"),r==="middle"&&l==="center"?i.transform=`translate(calc(-50% + ${I.scalingValue(e.x,n)}), calc(-50% + ${I.scalingValue(e.y,n)}))`:r==="middle"?i.transform=`translate(${I.scalingValue(e.x,n)}, calc(-50% + ${I.scalingValue(e.y,n)}))`:l==="center"?i.transform=`translate(calc(-50% + ${I.scalingValue(e.x,n)}), ${I.scalingValue(e.y,n)})`:i.transform=`translate(${I.scalingValue(e.x,n)}, ${I.scalingValue(e.y,n)})`,i};function Ls(t){const e=window.getComputedStyle(t);return{top:parseFloat(e.paddingTop)||0,right:parseFloat(e.paddingRight)||0,bottom:parseFloat(e.paddingBottom)||0,left:parseFloat(e.paddingLeft)||0}}function al(t){const e=t.getBoundingClientRect(),n=Ls(t),i=Math.max(0,e.width-n.left-n.right),r=Math.max(0,e.height-n.top-n.bottom),l=t.naturalWidth,s=t.naturalHeight,d=i/r,a=l/s;let p,u;a>d?(p=i,u=i/a):(u=r,p=r*a);const S=e.left+n.left,x=e.top+n.top,y=(i-p)/2+S,m=(r-u)/2+x;return{x:y,y:m,width:p,height:u}}function cl(t){const e=t.getBoundingClientRect(),n=Ls(t);return{left:e.left+n.left,right:e.right-n.right,top:e.top+n.top,bottom:e.bottom-n.bottom}}function dl(t){const e=t.match(/rgba?\(([^)]+)\)/);if(e){const i=e[1].split(",").map(r=>parseFloat(r.trim()));return i.length===4?i[3]:1}const n=t.match(/^#([0-9a-fA-F]{8})$/);if(n){const i=n[1].substring(6,8);return parseInt(i,16)/255}return t.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Ud(t,e){const n=(()=>{if(t==="fade in")return ut.fadeIn;if(t==="slide in"||t==="mix")switch(e){case"left":return ut.slideInLeft;case"right":return ut.slideInRight;case"top":return ut.slideInTop;case"bottom":return ut.slideInBottom;default:return ut.slideInRight}return ut.fadeIn})(),i=(()=>{if(t==="fade in"||t==="mix")return ut.fadeIn;if(t==="slide in")switch(e){case"left":return ut.slideInLeft;case"right":return ut.slideInRight;case"top":return ut.slideInTop;case"bottom":return ut.slideInBottom;default:return ut.slideInRight}return ut.fadeIn})(),r=(()=>{if(t==="fade in"||t==="mix")return ut.fadeOut;if(t==="slide in")switch(e){case"left":return ut.slideOutLeft;case"right":return ut.slideOutRight;case"top":return ut.slideOutTop;case"bottom":return ut.slideOutBottom;default:return ut.slideOutRight}return ut.fadeOut})(),l=(()=>{if(t==="fade in")return ut.fadeOut;if(t==="slide in"||t==="mix")switch(e){case"left":return ut.slideOutLeft;case"right":return ut.slideOutRight;case"top":return ut.slideOutTop;case"bottom":return ut.slideOutBottom;default:return ut.slideOutRight}return ut.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:r,disappearClass:l}}const Gd=({settings:t,content:e,styles:n,portalId:i,activeEvent:r,isEditor:l,isPreviewMode:s})=>{const[d,a]=c.useState(!1),{url:p}=t.thumbnailBlock.cover;return c.useEffect(()=>{r==="close"&&a(!1),r==="open"&&a(!0)},[r]),o.jsxs(o.Fragment,{children:[o.jsx("img",{src:p,alt:"Cover",className:ut.heroImage,onClick:()=>a(!0)}),o.jsx(qd,{isOpen:d,onClose:()=>a(!1),content:e,settings:t,lightboxStyles:n,portalId:i,isEditor:l})]})},qd=({isOpen:t,onClose:e,content:n,lightboxStyles:i,settings:r,portalId:l,isEditor:s,metadata:d})=>{var xt;const{widthSettings:a,fontSettings:p,letterSpacing:u,textAlign:S,wordSpacing:x,fontSizeLineHeight:y,textAppearance:m,color:f}=i.imageCaption??{},[L,w]=c.useState(0),[$,C]=c.useState(0),[P,E]=c.useState(!1),[k,b]=c.useState(!1),[M,z]=c.useState({}),h=c.useRef(null),T=c.useRef(null),_=c.useRef(null),N=c.useRef(!1),V=c.useRef(null),at=c.useRef(null),O=c.useRef(null),W=c.useRef(null),G=c.useRef(!1),K=c.useRef(null),[H,q]=c.useState(!1),{appear:et,triggers:lt,slider:F,thumbnail:ct,controls:g,area:nt,caption:ft,layout:it}=r.lightboxBlock,{appearClass:wt,backdropAppearClass:mt,backdropDisappearClass:ot,disappearClass:B}=Ud(et.type,et.direction),Q=(d==null?void 0:d.itemId)??null;c.useEffect(()=>{const j=()=>{setTimeout(()=>{var A,D;(D=(A=h.current)==null?void 0:A.splide)==null||D.refresh()},16)},st=()=>{C(A=>A+1)};return window.addEventListener("ArticleEditor.Layout:change",j),window.addEventListener("ArticleEditor.ComponentContent:change",st),()=>{window.removeEventListener("ArticleEditor.Layout:change",j),window.removeEventListener("ArticleEditor.ComponentContent:change",st)}},[]),c.useEffect(()=>{if(!t||!ct.isActive){q(!1);return}const j=K.current;if(!j)return;const st=()=>{F.direction==="horiz"?q(j.scrollWidth>j.clientWidth):q(j.scrollHeight>j.clientHeight)};st();const A=new ResizeObserver(st);return A.observe(j),()=>A.disconnect()},[t,ct.isActive,n.length,M,F.direction]);const U=c.useCallback(()=>{const j=window.matchMedia("(max-width: 768px)").matches,st=dl(nt.color);j&&!s&&st>.9&&(document.body.style.backgroundColor=""),E(!0),N.current=!0;const A=D=>{D.target===V.current&&D.animationName&&(V.current&&at.current&&V.current.removeEventListener("animationend",at.current),at.current=null,N.current&&(N.current=!1,e()),E(!1))};V.current&&(at.current=A,V.current.addEventListener("animationend",A))},[e,nt.color,s]),Y=(j,st,A)=>{var D,X;if(j){if(lt.type==="click"&&lt.switch==="image")lt.repeat==="close"&&L===n.length-1?U():(D=h.current)==null||D.go("+1");else if(lt.type==="click"&&lt.switch==="50/50"){const J=j.getBoundingClientRect(),gt=st-J.left,Ct=A-J.top,Dt=J.width,Rt=J.height;let $t;F.direction==="horiz"?$t=gt<Dt/2?"-1":"+1":$t=Ct<Rt/2?"-1":"+1",(X=h.current)==null||X.go($t)}}},It=j=>{if(G.current){G.current=!1;return}const st=n[L],A=(st==null?void 0:st.image.objectFit)==="cover";let D,X;if("changedTouches"in j&&j.changedTouches.length>0)D=j.changedTouches[0].clientX,X=j.changedTouches[0].clientY;else if("clientX"in j)D=j.clientX,X=j.clientY;else return;let J;if(A&&_.current){const gt=cl(_.current);J=D>=gt.left&&D<=gt.right&&X>=gt.top&&X<=gt.bottom}else{const gt=_.current?al(_.current):null;if(!gt){j.target===j.currentTarget&&U();return}J=D>=gt.x&&D<=gt.x+gt.width&&X>=gt.y&&X<=gt.y+gt.height}J?Y(_.current,D,X):U()},Mt=j=>{const st=j.target;(st.classList.contains(ut.thumbsWrapper)||st.classList.contains(ut.thumbsContainer))&&It(j)};c.useEffect(()=>{if(!t)return;const j=st=>{var A,D;if(st.key==="Escape"){U();return}if(st.key==="ArrowRight"){w(X=>(X+1)%Math.max(n.length,1)),(A=h.current)==null||A.go("+1");return}st.key==="ArrowLeft"&&(w(X=>(X-1+Math.max(n.length,1))%Math.max(n.length,1)),(D=h.current)==null||D.go("-1"))};return window.addEventListener("keydown",j),()=>{window.removeEventListener("keydown",j)}},[t,U,n.length]),c.useEffect(()=>{if(t){if(w(0),C(st=>st+1),N.current=!1,E(!1),b(!1),z({}),!Q)return;const j=new CustomEvent("page-overlay",{detail:{itemId:Q}});window.dispatchEvent(j)}return()=>{V.current&&at.current&&(V.current.removeEventListener("animationend",at.current),at.current=null),b(!1)}},[t,Q]),c.useEffect(()=>{T.current!==null&&T.current!==F.type&&C(j=>j+1),T.current=F.type},[F.type]),c.useEffect(()=>{if(!t)return;const j=document.body.style.overflow,st=window.matchMedia("(max-width: 768px)").matches,A=dl(nt.color);document.body.style.overflow="hidden",b(!1);const D=J=>{J.target===V.current&&!N.current&&J.animationName&&(st&&!s&&A>.9&&(document.body.style.backgroundColor=nt.color),b(!0),V.current&&O.current&&V.current.removeEventListener("animationend",O.current),O.current=null)};V.current&&(O.current=D,V.current.addEventListener("animationend",D));const X=J=>{const gt=J.target;gt&&(gt.closest(`.${ut.thumbsWrapper}`)||gt.closest(`.${ut.thumbsContainer}`))||F.type!=="slide"&&J.preventDefault()};return document.addEventListener("touchmove",X,{passive:!1}),()=>{document.body.style.overflow=j,document.removeEventListener("touchmove",X),V.current&&O.current&&(V.current.removeEventListener("animationend",O.current),O.current=null),b(!1)}},[t,s,nt.color,F.type]),c.useEffect(()=>{if(!t)return;const j=st=>{var D,X;if(N.current){st.stopPropagation();return}if(G.current){G.current=!1;return}const A=st.target;if(!(A&&(A.closest(`.${ut.thumbsContainer}`)||A.closest(`.${ut.thumbItem}`)||A.closest(`.${ut.arrow}`)||A.closest(`.${ut.closeButton}`)||A.closest(`.${ut.caption}`)))){if(F.type==="slide"&&lt.type==="drag"&&((X=(D=h.current)==null?void 0:D.splide)!=null&&X.root)){const J=h.current.splide.root;if(A&&(J.contains(A)||J===A))return}if(st.touches.length===0&&st.changedTouches.length>0){const J=n[L],gt=(J==null?void 0:J.image.objectFit)==="cover",Ct=st.changedTouches[0];let Dt;if(gt&&_.current){const Rt=cl(_.current);Dt=Ct.clientX>=Rt.left&&Ct.clientX<=Rt.right&&Ct.clientY>=Rt.top&&Ct.clientY<=Rt.bottom}else{const Rt=_.current?al(_.current):null;if(!Rt)return;Dt=Ct.clientX>=Rt.x&&Ct.clientX<=Rt.x+Rt.width&&Ct.clientY>=Rt.y&&Ct.clientY<=Rt.y+Rt.height}if(!Dt){st.stopPropagation(),N.current=!0;const Rt=$t=>{$t.stopPropagation(),$t.preventDefault(),document.removeEventListener("click",Rt,!0)};document.addEventListener("click",Rt,!0),U()}}}};return document.addEventListener("touchend",j,{passive:!0}),()=>{document.removeEventListener("touchend",j)}},[t,U,L,n]);const At=(F.type==="scale"||F.type==="fade")&&F.direction==="vert"&&lt.type==="drag";c.useEffect(()=>{var $t,Gt;if(!t||!At||!((Gt=($t=h.current)==null?void 0:$t.splide)!=null&&Gt.root))return;const j=h.current.splide.root,st=30,A=(pt,Et)=>{if(W.current){const jt=Math.abs(pt-W.current.x),zt=Math.abs(Et-W.current.y);(jt>0||zt>0)&&(G.current=!0)}},D=pt=>{W.current&&(pt.preventDefault(),A(pt.clientX,pt.clientY))},X=pt=>{W.current&&pt.touches.length>0&&(pt.preventDefault(),A(pt.touches[0].clientX,pt.touches[0].clientY))},J=(pt,Et)=>{if(!W.current||!h.current){W.current=null;return}const jt=Math.abs(pt-W.current.x),zt=Math.abs(Et-W.current.y);zt>st&&zt>jt&&h.current.go(Et<W.current.y?"+1":"-1"),W.current=null},gt=pt=>{W.current&&J(pt.clientX,pt.clientY),document.removeEventListener("pointerup",gt),document.removeEventListener("pointercancel",gt),document.removeEventListener("pointermove",D)},Ct=pt=>{if(W.current){if(pt.changedTouches.length>0){const Et=pt.changedTouches[0];J(Et.clientX,Et.clientY)}document.removeEventListener("touchend",Ct),document.removeEventListener("touchcancel",Ct),document.removeEventListener("touchmove",X)}},Dt=pt=>{W.current={x:pt.clientX,y:pt.clientY},G.current=!1,document.addEventListener("pointermove",D,{passive:!1}),document.addEventListener("pointerup",gt),document.addEventListener("pointercancel",gt)},Rt=pt=>{pt.touches.length>0&&(W.current={x:pt.touches[0].clientX,y:pt.touches[0].clientY},G.current=!1,document.addEventListener("touchmove",X,{passive:!1}),document.addEventListener("touchend",Ct),document.addEventListener("touchcancel",Ct))};return j.addEventListener("pointerdown",Dt),j.addEventListener("touchstart",Rt),()=>{j.removeEventListener("pointerdown",Dt),j.removeEventListener("touchstart",Rt),document.removeEventListener("pointermove",D),document.removeEventListener("pointerup",gt),document.removeEventListener("pointercancel",gt),document.removeEventListener("touchmove",X),document.removeEventListener("touchend",Ct),document.removeEventListener("touchcancel",Ct),W.current=null,G.current=!1}},[t,At,$]);const Pt={backgroundColor:nt.color,backdropFilter:`blur(${nt.blur}px)`,animationDuration:`${parseInt(et.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:Li.createPortal(o.jsxs(o.Fragment,{children:[o.jsx("div",{ref:s?null:V,className:Xt(ut.background,P?ot:mt,{[ut.editor]:s},{[ut.hidden]:!t}),style:{...Pt,...k&&!s&&!P?{position:"absolute"}:{}}}),o.jsxs("div",{ref:s?V:null,className:Xt(ut.contentStyle,P?B:wt,{[ut.editor]:s},{[ut.hidden]:!t}),style:{animationDuration:`${parseInt(et.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[o.jsx(Mr,{onMove:j=>w(j.index),ref:h,className:ut.lightboxSplide,options:{arrows:!1,speed:F.duration?parseInt(F.duration):500,direction:F.direction==="horiz"||F.type==="fade"||F.type==="scale"?"ltr":"ttb",pagination:!1,drag:lt.type==="drag"&&!At,perPage:1,width:"100%",height:"100%",type:F.type==="fade"||F.type==="scale"?"fade":"loop",padding:0,rewind:lt.repeat!=="close",start:0},style:{"--splide-speed":F.duration},children:n.map((j,st)=>{const A=Oi(it.position,it.offset,s),D=`${I.scalingValue(it.padding.top,s)} ${I.scalingValue(it.padding.right,s)} ${I.scalingValue(it.padding.bottom,s)} ${I.scalingValue(it.padding.left,s)}`,X=F.type==="scale"?(()=>{const{transform:J,...gt}=A;return{...gt,position:"absolute",padding:D,boxSizing:"border-box","--position-transform":J||"none"}})():{...A,position:"absolute",padding:D,boxSizing:"border-box"};return o.jsx(_r,{children:o.jsx("div",{className:ut.imgWrapper,onClick:It,children:o.jsx("img",{ref:st===L?_:null,className:Xt(ut.imageStyle,{[ut.contain]:j.image.objectFit==="contain",[ut.cover]:j.image.objectFit==="cover",[ut.scaleSlide]:F.type==="scale"}),src:j.image.url,alt:j.image.name??"",style:{...X,pointerEvents:j.image.objectFit==="contain"?"none":"auto"}})})},st)})},$),g.isActive&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:Xt(ut.arrow,{[ut.arrowVertical]:F.direction==="vert"}),style:{color:g.color,"--arrow-hover-color":g.hover},children:o.jsxs("button",{className:ut.arrowInner,style:{transform:`translate(${I.scalingValue(g.offset.x,s)}, ${I.scalingValue(g.offset.y*(F.direction==="horiz"?1:-1),s)}) scale(${g.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var j;return(j=h.current)==null?void 0:j.go("-1")},"aria-label":"Previous",children:[g.arrowsImgUrl&&o.jsx(nn,{url:g.arrowsImgUrl,fill:g.color,hoverFill:g.hover,className:Xt(ut.arrowImg,ut.mirror)}),!g.arrowsImgUrl&&o.jsx(ul,{color:g.color,className:Xt(ut.arrowIcon,ut.arrowImg,ut.mirror)})]})}),o.jsx("div",{className:Xt(ut.arrow,ut.nextArrow,{[ut.arrowVertical]:F.direction==="vert"}),style:{color:g.color,"--arrow-hover-color":g.hover},children:o.jsxs("button",{className:ut.arrowInner,style:{transform:`translate(${I.scalingValue(g.offset.x*(F.direction==="horiz"?-1:1),s)}, ${I.scalingValue(g.offset.y,s)}) scale(${g.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var j;return(j=h.current)==null?void 0:j.go("+1")},"aria-label":"Next",children:[g.arrowsImgUrl&&o.jsx(nn,{url:g.arrowsImgUrl,fill:g.color,hoverFill:g.hover,className:ut.arrowImg}),!g.arrowsImgUrl&&o.jsx(ul,{color:g.color,className:Xt(ut.arrowIcon,ut.arrowImg)})]})})]}),nt.closeIconUrl&&(()=>{const j=Oi(nt.closeIconAlign,nt.closeIconOffset,s),st=`scale(${nt.closeIconScale})`,A=j.transform?`${j.transform} ${st}`:st;return o.jsx("button",{className:ut.closeButton,style:{...j,transform:A},onClick:U,"aria-label":"Close lightbox",children:o.jsx(nn,{url:nt.closeIconUrl,fill:nt.closeIconColor??"#000000",hoverFill:nt.closeIconHover??"#cccccc"})})})(),ft&&ft.isActive&&i.imageCaption&&((xt=n[L])==null?void 0:xt.imageCaption)&&o.jsx("div",{className:ut.caption,style:{...Oi(ft.alignment,ft.offset,s),fontFamily:Io(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:a.sizing==="auto"?"max-content":I.scalingValue(a.width,s),letterSpacing:I.scalingValue(u,s),wordSpacing:I.scalingValue(x,s),textAlign:S,fontSize:I.scalingValue(y.fontSize,s),lineHeight:I.scalingValue(y.lineHeight,s),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:f},onClick:j=>j.stopPropagation(),children:o.jsx("div",{"data-styles":"imageCaption",className:ut.captionTextInner,style:{"--link-color":ft.linkColor,"--link-hover-color":ft.linkHoverColor},children:o.jsx(wi,{content:n[L].imageCaption})})}),ct.isActive&&(()=>{const[j,st]=ct.position.split("-"),A=F.direction==="horiz"?`${j}-left`:ct.position,D=Oi(A,ct.offset,s),X=()=>{if(F.direction==="horiz"){if(st==="left")return"flex-start";if(st==="center")return"center";if(st==="right")return"flex-end"}else{if(j==="top")return"flex-start";if(j==="middle")return"center";if(j==="bottom")return"flex-end"}return"flex-start"};return o.jsx("div",{ref:K,className:ut.thumbsWrapper,onClick:J=>Mt(J),style:{position:s?"absolute":"fixed",...D,...F.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:o.jsx("div",{className:Xt(ut.thumbsContainer,{[ut.thumbsContainerVertical]:F.direction==="vert",[ut.thumbsAlignStart]:ct.align==="start",[ut.thumbsAlignCenter]:ct.align==="center",[ut.thumbsAlignEnd]:ct.align==="end"}),style:{gap:I.scalingValue(ct.grid.gap,s),justifyContent:H?"flex-start":X()},children:n.map((J,gt)=>{const Ct=gt===L,Dt=M[gt],$t=ct.grid.size*(Ct?ct.activeState.scale:1),Gt=()=>{if(ct.fit!=="fit")return{};if(!Dt)return F.direction==="horiz"?{height:I.scalingValue($t,s)}:{width:I.scalingValue($t,s)};const pt=Dt.width/Dt.height;if(F.direction==="horiz"){const Et=$t,jt=Et*pt;return{width:I.scalingValue(jt,s),height:I.scalingValue(Et,s)}}else{const Et=$t,jt=Et/pt;return{width:I.scalingValue(Et,s),height:I.scalingValue(jt,s)}}};return o.jsx("button",{className:ut.thumbItem,style:{...F.direction==="horiz"&&ct.fit!=="fit"?{height:I.scalingValue($t,s)}:{},...F.direction==="vert"&&ct.fit!=="fit"?{width:I.scalingValue($t,s)}:{},...ct.fit==="cover"?{width:I.scalingValue($t,s),height:I.scalingValue($t,s)}:{},...Gt(),transition:Ct?"all 0.25s ease-out":"none",opacity:Ct?ct.activeState.opacity/100:ct.opacity/100,"--thumb-hover":ct.activeState.opacity/100},onClick:pt=>{var Et;pt.stopPropagation(),w(gt),(Et=h.current)==null||Et.go(gt)},onMouseEnter:()=>{var pt;ct.triggers==="hov"&&((pt=h.current)==null||pt.go(gt))},children:o.jsx("img",{src:J.image.url,alt:J.image.name??"",onLoad:pt=>{const Et=pt.currentTarget;Et.naturalWidth&&Et.naturalHeight&&z(jt=>({...jt,[gt]:{width:Et.naturalWidth,height:Et.naturalHeight}}))},style:{objectFit:ct.fit==="cover"?"cover":"contain",...ct.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ct.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${J.image.name}-${gt}`)})})})})()]})]}),document.getElementById(l))};function ul({color:t,className:e}){return o.jsx("svg",{viewBox:"0 0 10 18",className:e,children:o.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:o.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:t,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Xd={element:Gd,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 Di(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Yd(t){return`
7
- .${t}-wrapper {
6
+ */const Vc="RichTextRenderer-module__link___BWeZ2",Kc={link:Vc},Gc=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))},ko=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Gc(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function sn(e){const{color:t,...n}=e;return n}function Pt(e,t){var o,l,s;const{fontSize:n,lineHeight:i}=e;return{fontFamily:ko(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:R.scalingValue(e.letterSpacing,t),wordSpacing:R.scalingValue(e.wordSpacing,t),fontSize:R.scalingValue(n,t),lineHeight:i!==void 0?R.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(l=e.textAppearance)==null?void 0:l.textDecoration,fontVariant:(s=e.textAppearance)==null?void 0:s.fontVariant,textAlign:e.textAlign,color:e.color}}const _i=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:Kc.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:Uc(i),children:i.text},o));return r.jsx(r.Fragment,{children:e.map((n,i)=>{const o=n.children;return r.jsx("div",{children:t(o)},i)})})};function Uc(e){return{...e.fontFamily&&{fontFamily:ko(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 qc="SvgImage-module__svg___q3xE-",Xc="SvgImage-module__img___VsTm-",cl={svg:qc,img:Xc},Yc=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Jc=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,an=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[l,s]=c.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return c.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');s(d)}},[]),!Yc(e)||!l?r.jsx("img",{src:e,alt:"",className:Ye(cl.img,i),style:o}):r.jsx("span",{"data-supports-mask":l,className:Ye(cl.svg,i),style:{"--svg":Jc(e),"--fill":t,"--hover-fill":n,...o??{}}})},Zc={"top-left":be.topLeftAlignment,"top-center":be.topCenterAlignment,"top-right":be.topRightAlignment,"middle-left":be.middleLeftAlignment,"middle-center":be.middleCenterAlignment,"middle-right":be.middleRightAlignment,"bottom-left":be.bottomLeftAlignment,"bottom-center":be.bottomCenterAlignment,"bottom-right":be.bottomRightAlignment};function Qc({settings:e,content:t,styles:n,isEditor:i}){const[o,l]=c.useState(null),{widthSettings:s,fontSettings:d,letterSpacing:a,textAlign:p,wordSpacing:u,fontSizeLineHeight:S,textAppearance:x,color:v}=n.imageCaption??{},[m,y]=c.useState(void 0),[$,w]=c.useState(null),[C,T]=c.useState(0),[P,M]=c.useState(0),{direction:F,transition:b,controls:W,pagination:K,imageCaption:h,triggers:L}=e,E=c.useRef(b.type),{x:k,y:z}=e.controls.offset,le=O=>{o&&o.go(O)};return c.useEffect(()=>{if(!$)return;const O=new ResizeObserver(_=>{if(!o)return;const[q]=_;y({width:Math.round(q.contentRect.width),height:Math.round(q.contentRect.height)})});return O.observe($),()=>O.unobserve($)},[$]),c.useEffect(()=>{!o||E.current===b.type||(M(O=>O+1),E.current=b.type)},[b.type]),r.jsx("div",{className:Ye(be.wrapper,{[be.editor]:i}),ref:w,children:r.jsxs("div",{className:be.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:Ye(be.captionBlock),children:r.jsx("div",{className:be.captionTextWrapper,children:t.map((O,_)=>r.jsx("div",{className:Ye(be.captionText,Zc[h.alignment],{[be.withPointerEvents]:_===C&&i,[be.active]:_===C}),style:{fontFamily:ko(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:s.sizing==="auto"?"max-content":R.scalingValue(s.width,i),letterSpacing:R.scalingValue(a,i),wordSpacing:R.scalingValue(u,i),textAlign:p,fontSize:R.scalingValue(S.fontSize,i),lineHeight:R.scalingValue(S.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:v,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:be.captionTextInner,style:{"--link-hover-color":h.linkHoverColor,"--link-color":h.linkColor,position:"relative",top:R.scalingValue(h.offset.y,i),left:R.scalingValue(h.offset.x,i)},children:r.jsx(_i,{content:O.imageCaption})})},_))})}),r.jsx(Hr,{onMove:O=>{T(O.index)},ref:l,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:L.autoPlay!==null,...L.autoPlay!==null&&{interval:parseInt(L.autoPlay)*1e3},direction:F==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:L.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((O,_)=>r.jsx(Br,{children:r.jsx("div",{className:be.sliderItem,children:r.jsx("div",{className:be.imgWrapper,children:r.jsx("img",{className:Ye(be.sliderImage,{[be.contain]:O.image.objectFit==="contain",[be.cover]:O.image.objectFit==="cover"}),src:O.image.url,alt:O.image.name??""})})})},_))},P),W.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ye(be.arrow,{[be.arrowVertical]:F==="vert",[be.hoverArrow]:W.show==="on hover"}),style:{color:W.color,"--arrow-hover-color":W.hover},children:r.jsxs("button",{onClick:()=>{le("-1")},className:be.arrowInner,style:{transform:`translate(${R.scalingValue(k,i)}, ${R.scalingValue(z*(F==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${F==="horiz"?"0deg":"90deg"})`},children:[W.arrowsImgUrl&&r.jsx(an,{url:W.arrowsImgUrl,fill:W.color,hoverFill:W.hover,className:Ye(be.arrowImg,be.mirror)}),!W.arrowsImgUrl&&r.jsx(dl,{color:W.color,className:Ye(be.arrowIcon,be.arrowImg,be.mirror)})]})}),r.jsx("div",{className:Ye(be.arrow,be.nextArrow,{[be.arrowVertical]:F==="vert",[be.hoverArrow]:W.show==="on hover"}),style:{color:W.color,"--arrow-hover-color":W.hover},children:r.jsxs("button",{className:be.arrowInner,onClick:()=>le("+1"),style:{transform:`translate(${R.scalingValue(k*(F==="horiz"?-1:1),i)}, ${R.scalingValue(z,i)}) scale(${e.controls.scale/100}) rotate(${F==="horiz"?"0deg":"90deg"})`},children:[W.arrowsImgUrl&&r.jsx(an,{url:W.arrowsImgUrl,fill:W.color,hoverFill:W.hover,className:be.arrowImg}),!W.arrowsImgUrl&&r.jsx(dl,{color:W.color,className:Ye(be.arrowIcon,be.arrowImg)})]})})]}),L.triggersList.click&&r.jsx("div",{className:be.clickOverlay,onClick:()=>{o&&o.go("+1")}}),K.isActive&&r.jsx("div",{className:Ye(be.pagination,{[be.paginationInsideBottom]:K.position==="inside-1"&&F==="horiz",[be.paginationInsideTop]:K.position==="inside-2"&&F==="horiz",[be.paginationOutsideBottom]:K.position==="outside-1"&&F==="horiz",[be.paginationOutsideTop]:K.position==="outside-2"&&F==="horiz",[be.paginationInsideLeft]:K.position==="inside-1"&&F==="vert",[be.paginationInsideRight]:K.position==="inside-2"&&F==="vert",[be.paginationOutsideLeft]:K.position==="outside-1"&&F==="vert",[be.paginationOutsideRight]:K.position==="outside-2"&&F==="vert",[be.paginationVertical]:F==="vert"}),children:r.jsx("div",{className:be.paginationInner,style:{backgroundColor:K.colors[2],transform:`scale(${K.scale/100}) translate(${R.scalingValue(K.offset.x,i)}, ${R.scalingValue(K.offset.y,i)}) rotate(${F==="horiz"?"0deg":"90deg"})`},children:t.map((O,_)=>r.jsx("button",{onClick:()=>{o&&o.go(_)},className:Ye(be.paginationItem),children:r.jsx("div",{className:Ye(be.dot,{[be.activeDot]:_===C}),style:{backgroundColor:_===C?K.colors[0]:K.colors[1],"--pagination-hover-color":K.hover}})},_))})})]})})}function dl({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const ed={element:Qc,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"]}},td="ImageRevealSlider-module__imageRevealSlider___UE5Ob",nd="ImageRevealSlider-module__image___Qjt-e",id="ImageRevealSlider-module__link___N-iLG",od="ImageRevealSlider-module__cursor___2U03d",ei={imageRevealSlider:td,image:nd,link:id,cursor:od};function ul(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const l=i.width?Number.parseFloat(i.width):o.naturalWidth,s=o.naturalHeight/o.naturalWidth*l,d=l/2,a=s/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-a&&t<=i.y+a)return!0}return!1}function Vo(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function rd(e,t,n,i){let o,l;if(t==="custom"){o=n;const s=await Vo(e);l=s.height/s.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const s=await Vo(e);l=s.height/s.width*o}else{const s=await Vo(e);o=s.width,l=s.height}return{width:o,height:l,finalWidth:`${o}px`}}function ld({settings:e,content:t,isEditor:n}){const[i,o]=c.useState(null),[l,s]=c.useState([]),[d,a]=c.useState(0),p=c.useRef(0),[u,S]=c.useState({x:0,y:0}),[x,v]=c.useState(1),[m,y]=c.useState("none"),$=c.useRef({x:0,y:0}),[w,C]=c.useState(!1),{sizeType:T,imageWidth:P,randomRangeImageWidth:M}=e.imageSize,{revealPosition:F,visible:b}=e.position,{cursorType:W,target:K,defaultCursorScale:h,defaultCursor:L,hoverCursorScale:E,hoverCursor:k}=e.cursor;c.useEffect(()=>{if(!i)return;const O=(G,H)=>{const X=i.getBoundingClientRect(),ne=G-X.left,se=H-X.top;if(S({x:ne,y:se}),W==="system"){y("none"),v(1);return}const N=ne,de=se,g=document.elementFromPoint(X.left+N,X.top+de);if(g&&g.closest("a")){y("none"),v(1);return}const ie=ul(N,de,l)||K==="area"?{img:k??"none",scale:E}:{img:L??"none",scale:h};y(ie.img),v(ie.scale)},_=G=>{G.stopPropagation(),$.current={x:G.clientX,y:G.clientY},O(G.clientX,G.clientY)},q=()=>{w&&O($.current.x,$.current.y)};return i.addEventListener("mousemove",_),window.addEventListener("scroll",q,!0),()=>{i.removeEventListener("mousemove",_),window.removeEventListener("scroll",q,!0)}},[i,w,u,W,K,k,L,E,h,l]),c.useEffect(()=>{w||(y("none"),v(0))},[w]);const z=async(O,_,q,G={})=>{const{width:H,height:X,finalWidth:ne}=await rd(O.image.url,T,P,M);let se=0,N=0;F==="same"?(se=_/2,N=q/2):(se=G.x??Math.random()*_,N=G.y??Math.random()*q);const de=Math.min(Math.max(se,H/2),_-H/2),g=Math.min(Math.max(N,X/2),q-X/2);return{id:p.current++,url:O.image.url,link:O.link,name:O.image.name,x:de,y:g,width:ne}};c.useEffect(()=>{if(!i||t.length===0)return;const O=i.getBoundingClientRect(),_=O.width,q=O.height,G=[];(async()=>{const X=t[0],ne=await z(X,_,q);G.push(ne),s(G),a(1)})()},[T,P,M,F,i]),c.useEffect(()=>{b==="last One"&&s(O=>O.length>0?[O[O.length-1]]:[])},[b]);const le=async O=>{if(!i)return;const _=i.getBoundingClientRect(),q=O.clientX-_.left,G=O.clientY-_.top;if(K==="image"&&!ul(q,G,l))return;let H=0,X=0;F==="on Click"?(H=q,X=G):F==="same"?(H=_.width/2,X=_.height/2):(H=Math.random()*_.width,X=Math.random()*_.height);const ne=t[d],se=await z(ne,_.width,_.height,{x:H,y:X});s(N=>b==="all"?[...N,se]:[se]),a(N=>N>=t.length-1?0:N+1)};return r.jsxs("div",{ref:o,onClick:le,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),className:ei.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[l.map(O=>r.jsx("div",{className:ei.wrapper,style:{top:`${O.y}px`,left:`${O.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:O.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:K==="area"&&O.link?r.jsx("a",{href:O.link,target:"_blank",className:ei.link,children:r.jsx("img",{src:O.url,alt:O.name,className:ei.image},O.id)}):r.jsx("img",{src:O.url,alt:O.name,className:ei.image},O.id)},O.id)),w&&r.jsx("div",{className:ei.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const sd={element:ld,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:""}]}}}},ad="LightBox-module__hidden___9s-9x",cd="LightBox-module__heroImage___sTxNF",dd="LightBox-module__background___rm9ml",ud="LightBox-module__editor___4ACaY",pd="LightBox-module__contentStyle___Bgnsq",md="LightBox-module__imageStyle___tLIlB",gd="LightBox-module__imgWrapper___LuFUp",hd="LightBox-module__contain___8-yaS",fd="LightBox-module__cover___hNvOG",yd="LightBox-module__caption___b6L2I",vd="LightBox-module__captionTextInner___rCGNH",xd="LightBox-module__lightboxSplide___XFuWC",bd="LightBox-module__arrow___iz38X",Sd="LightBox-module__arrowVertical___Zfz81",wd="LightBox-module__nextArrow___zkAQN",Cd="LightBox-module__arrowInner___p48sW",Td="LightBox-module__arrowIcon___3VaFf",$d="LightBox-module__arrowImg___pNV88",Ld="LightBox-module__mirror___pjeXc",Ed="LightBox-module__thumbsWrapper___GB-nU",Id="LightBox-module__thumbsContainerVertical___wttk5",Rd="LightBox-module__thumbsContainer___osSma",Md="LightBox-module__thumbsAlignStart___MO6tY",Wd="LightBox-module__thumbsAlignCenter___Q4sUx",_d="LightBox-module__thumbsAlignEnd___p4y9R",Ad="LightBox-module__thumbItem___HvnF3",Pd="LightBox-module__closeButton___g2khP",kd="LightBox-module__fadeIn___0m5GW",Fd="LightBox-module__slideInLeft___gPYwC",Nd="LightBox-module__slideInRight___S-pPp",Hd="LightBox-module__slideInTop___DFdAj",Bd="LightBox-module__slideInBottom___m27kZ",Od="LightBox-module__fadeOut___55qBR",Dd="LightBox-module__slideOutLeft___NvU7P",jd="LightBox-module__slideOutRight___SK7eC",zd="LightBox-module__slideOutTop___Vgg0z",Vd="LightBox-module__slideOutBottom___nJ0Ef",Kd="LightBox-module__scaleSlide___vZriG",ue={hidden:ad,heroImage:cd,background:dd,editor:ud,contentStyle:pd,imageStyle:md,imgWrapper:gd,contain:hd,cover:fd,caption:yd,captionTextInner:vd,lightboxSplide:xd,arrow:bd,arrowVertical:Sd,nextArrow:wd,arrowInner:Cd,arrowIcon:Td,arrowImg:$d,mirror:Ld,thumbsWrapper:Ed,thumbsContainerVertical:Id,thumbsContainer:Rd,thumbsAlignStart:Md,thumbsAlignCenter:Wd,thumbsAlignEnd:_d,thumbItem:Ad,closeButton:Pd,fadeIn:kd,slideInLeft:Fd,slideInRight:Nd,slideInTop:Hd,slideInBottom:Bd,fadeOut:Od,slideOutLeft:Dd,slideOutRight:jd,slideOutTop:zd,slideOutBottom:Vd,scaleSlide:Kd},qi=(e,t,n)=>{const i={},[o,l]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),l==="left"?(i.left="0",i.right="auto"):l==="center"?(i.left="50%",i.right="auto"):l==="right"&&(i.left="auto",i.right="0"),o==="middle"&&l==="center"?i.transform=`translate(calc(-50% + ${R.scalingValue(t.x,n)}), calc(-50% + ${R.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${R.scalingValue(t.x,n)}, calc(-50% + ${R.scalingValue(t.y,n)}))`:l==="center"?i.transform=`translate(calc(-50% + ${R.scalingValue(t.x,n)}), ${R.scalingValue(t.y,n)})`:i.transform=`translate(${R.scalingValue(t.x,n)}, ${R.scalingValue(t.y,n)})`,i};function Ms(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 pl(e){const t=e.getBoundingClientRect(),n=Ms(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),l=e.naturalWidth,s=e.naturalHeight,d=i/o,a=l/s;let p,u;a>d?(p=i,u=i/a):(u=o,p=o*a);const S=t.left+n.left,x=t.top+n.top,v=(i-p)/2+S,m=(o-u)/2+x;return{x:v,y:m,width:p,height:u}}function ml(e){const t=e.getBoundingClientRect(),n=Ms(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function gl(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 Gd(e,t){const n=(()=>{if(e==="fade in")return ue.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return ue.slideInLeft;case"right":return ue.slideInRight;case"top":return ue.slideInTop;case"bottom":return ue.slideInBottom;default:return ue.slideInRight}return ue.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return ue.fadeIn;if(e==="slide in")switch(t){case"left":return ue.slideInLeft;case"right":return ue.slideInRight;case"top":return ue.slideInTop;case"bottom":return ue.slideInBottom;default:return ue.slideInRight}return ue.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return ue.fadeOut;if(e==="slide in")switch(t){case"left":return ue.slideOutLeft;case"right":return ue.slideOutRight;case"top":return ue.slideOutTop;case"bottom":return ue.slideOutBottom;default:return ue.slideOutRight}return ue.fadeOut})(),l=(()=>{if(e==="fade in")return ue.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return ue.slideOutLeft;case"right":return ue.slideOutRight;case"top":return ue.slideOutTop;case"bottom":return ue.slideOutBottom;default:return ue.slideOutRight}return ue.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:l}}const Ud=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:l,isPreviewMode:s})=>{const[d,a]=c.useState(!1),{url:p}=e.thumbnailBlock.cover;return c.useEffect(()=>{o==="close"&&a(!1),o==="open"&&a(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:p,alt:"Cover",className:ue.heroImage,onClick:()=>a(!0)}),r.jsx(qd,{isOpen:d,onClose:()=>a(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:l})]})},qd=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:l,isEditor:s,metadata:d})=>{var xe;const{widthSettings:a,fontSettings:p,letterSpacing:u,textAlign:S,wordSpacing:x,fontSizeLineHeight:v,textAppearance:m,color:y}=i.imageCaption??{},[$,w]=c.useState(0),[C,T]=c.useState(0),[P,M]=c.useState(!1),[F,b]=c.useState(!1),[W,K]=c.useState({}),h=c.useRef(null),L=c.useRef(null),E=c.useRef(null),k=c.useRef(!1),z=c.useRef(null),le=c.useRef(null),O=c.useRef(null),_=c.useRef(null),q=c.useRef(!1),G=c.useRef(null),[H,X]=c.useState(!1),{appear:ne,triggers:se,slider:N,thumbnail:de,controls:g,area:ie,caption:fe,layout:oe}=o.lightboxBlock,{appearClass:Ce,backdropAppearClass:me,backdropDisappearClass:re,disappearClass:B}=Gd(ne.type,ne.direction),Q=(d==null?void 0:d.itemId)??null;c.useEffect(()=>{const j=()=>{setTimeout(()=>{var A,D;(D=(A=h.current)==null?void 0:A.splide)==null||D.refresh()},16)},ae=()=>{T(A=>A+1)};return window.addEventListener("ArticleEditor.Layout:change",j),window.addEventListener("ArticleEditor.ComponentContent:change",ae),()=>{window.removeEventListener("ArticleEditor.Layout:change",j),window.removeEventListener("ArticleEditor.ComponentContent:change",ae)}},[]),c.useEffect(()=>{if(!e||!de.isActive){X(!1);return}const j=G.current;if(!j)return;const ae=()=>{N.direction==="horiz"?X(j.scrollWidth>j.clientWidth):X(j.scrollHeight>j.clientHeight)};ae();const A=new ResizeObserver(ae);return A.observe(j),()=>A.disconnect()},[e,de.isActive,n.length,W,N.direction]);const U=c.useCallback(()=>{const j=window.matchMedia("(max-width: 768px)").matches,ae=gl(ie.color);j&&!s&&ae>.9&&(document.body.style.backgroundColor=""),M(!0),k.current=!0;const A=D=>{D.target===z.current&&D.animationName&&(z.current&&le.current&&z.current.removeEventListener("animationend",le.current),le.current=null,k.current&&(k.current=!1,t()),M(!1))};z.current&&(le.current=A,z.current.addEventListener("animationend",A))},[t,ie.color,s]),J=(j,ae,A)=>{var D,Y;if(j){if(se.type==="click"&&se.switch==="image")se.repeat==="close"&&$===n.length-1?U():(D=h.current)==null||D.go("+1");else if(se.type==="click"&&se.switch==="50/50"){const Z=j.getBoundingClientRect(),ge=ae-Z.left,Te=A-Z.top,je=Z.width,_e=Z.height;let Le;N.direction==="horiz"?Le=ge<je/2?"-1":"+1":Le=Te<_e/2?"-1":"+1",(Y=h.current)==null||Y.go(Le)}}},Me=j=>{if(q.current){q.current=!1;return}const ae=n[$],A=(ae==null?void 0:ae.image.objectFit)==="cover";let D,Y;if("changedTouches"in j&&j.changedTouches.length>0)D=j.changedTouches[0].clientX,Y=j.changedTouches[0].clientY;else if("clientX"in j)D=j.clientX,Y=j.clientY;else return;let Z;if(A&&E.current){const ge=ml(E.current);Z=D>=ge.left&&D<=ge.right&&Y>=ge.top&&Y<=ge.bottom}else{const ge=E.current?pl(E.current):null;if(!ge){j.target===j.currentTarget&&U();return}Z=D>=ge.x&&D<=ge.x+ge.width&&Y>=ge.y&&Y<=ge.y+ge.height}Z?J(E.current,D,Y):U()},Ae=j=>{const ae=j.target;(ae.classList.contains(ue.thumbsWrapper)||ae.classList.contains(ue.thumbsContainer))&&Me(j)};c.useEffect(()=>{if(!e)return;const j=ae=>{var A,D;if(ae.key==="Escape"){U();return}if(ae.key==="ArrowRight"){w(Y=>(Y+1)%Math.max(n.length,1)),(A=h.current)==null||A.go("+1");return}ae.key==="ArrowLeft"&&(w(Y=>(Y-1+Math.max(n.length,1))%Math.max(n.length,1)),(D=h.current)==null||D.go("-1"))};return window.addEventListener("keydown",j),()=>{window.removeEventListener("keydown",j)}},[e,U,n.length]),c.useEffect(()=>{if(e){if(w(0),T(ae=>ae+1),k.current=!1,M(!1),b(!1),K({}),!Q)return;const j=new CustomEvent("page-overlay",{detail:{itemId:Q}});window.dispatchEvent(j)}return()=>{z.current&&le.current&&(z.current.removeEventListener("animationend",le.current),le.current=null),b(!1)}},[e,Q]),c.useEffect(()=>{L.current!==null&&L.current!==N.type&&T(j=>j+1),L.current=N.type},[N.type]),c.useEffect(()=>{if(!e)return;const j=document.body.style.overflow,ae=window.matchMedia("(max-width: 768px)").matches,A=gl(ie.color);document.body.style.overflow="hidden",b(!1);const D=Z=>{Z.target===z.current&&!k.current&&Z.animationName&&(ae&&!s&&A>.9&&(document.body.style.backgroundColor=ie.color),b(!0),z.current&&O.current&&z.current.removeEventListener("animationend",O.current),O.current=null)};z.current&&(O.current=D,z.current.addEventListener("animationend",D));const Y=Z=>{const ge=Z.target;ge&&(ge.closest(`.${ue.thumbsWrapper}`)||ge.closest(`.${ue.thumbsContainer}`))||N.type!=="slide"&&Z.preventDefault()};return document.addEventListener("touchmove",Y,{passive:!1}),()=>{document.body.style.overflow=j,document.removeEventListener("touchmove",Y),z.current&&O.current&&(z.current.removeEventListener("animationend",O.current),O.current=null),b(!1)}},[e,s,ie.color,N.type]),c.useEffect(()=>{if(!e)return;const j=ae=>{var D,Y;if(k.current){ae.stopPropagation();return}if(q.current){q.current=!1;return}const A=ae.target;if(!(A&&(A.closest(`.${ue.thumbsContainer}`)||A.closest(`.${ue.thumbItem}`)||A.closest(`.${ue.arrow}`)||A.closest(`.${ue.closeButton}`)||A.closest(`.${ue.caption}`)))){if(N.type==="slide"&&se.type==="drag"&&((Y=(D=h.current)==null?void 0:D.splide)!=null&&Y.root)){const Z=h.current.splide.root;if(A&&(Z.contains(A)||Z===A))return}if(ae.touches.length===0&&ae.changedTouches.length>0){const Z=n[$],ge=(Z==null?void 0:Z.image.objectFit)==="cover",Te=ae.changedTouches[0];let je;if(ge&&E.current){const _e=ml(E.current);je=Te.clientX>=_e.left&&Te.clientX<=_e.right&&Te.clientY>=_e.top&&Te.clientY<=_e.bottom}else{const _e=E.current?pl(E.current):null;if(!_e)return;je=Te.clientX>=_e.x&&Te.clientX<=_e.x+_e.width&&Te.clientY>=_e.y&&Te.clientY<=_e.y+_e.height}if(!je){ae.stopPropagation(),k.current=!0;const _e=Le=>{Le.stopPropagation(),Le.preventDefault(),document.removeEventListener("click",_e,!0)};document.addEventListener("click",_e,!0),U()}}}};return document.addEventListener("touchend",j,{passive:!0}),()=>{document.removeEventListener("touchend",j)}},[e,U,$,n]);const ke=(N.type==="scale"||N.type==="fade")&&N.direction==="vert"&&se.type==="drag";c.useEffect(()=>{var Le,Ge;if(!e||!ke||!((Ge=(Le=h.current)==null?void 0:Le.splide)!=null&&Ge.root))return;const j=h.current.splide.root,ae=30,A=(pe,We)=>{if(_.current){const ze=Math.abs(pe-_.current.x),Ve=Math.abs(We-_.current.y);(ze>0||Ve>0)&&(q.current=!0)}},D=pe=>{_.current&&(pe.preventDefault(),A(pe.clientX,pe.clientY))},Y=pe=>{_.current&&pe.touches.length>0&&(pe.preventDefault(),A(pe.touches[0].clientX,pe.touches[0].clientY))},Z=(pe,We)=>{if(!_.current||!h.current){_.current=null;return}const ze=Math.abs(pe-_.current.x),Ve=Math.abs(We-_.current.y);Ve>ae&&Ve>ze&&h.current.go(We<_.current.y?"+1":"-1"),_.current=null},ge=pe=>{_.current&&Z(pe.clientX,pe.clientY),document.removeEventListener("pointerup",ge),document.removeEventListener("pointercancel",ge),document.removeEventListener("pointermove",D)},Te=pe=>{if(_.current){if(pe.changedTouches.length>0){const We=pe.changedTouches[0];Z(We.clientX,We.clientY)}document.removeEventListener("touchend",Te),document.removeEventListener("touchcancel",Te),document.removeEventListener("touchmove",Y)}},je=pe=>{_.current={x:pe.clientX,y:pe.clientY},q.current=!1,document.addEventListener("pointermove",D,{passive:!1}),document.addEventListener("pointerup",ge),document.addEventListener("pointercancel",ge)},_e=pe=>{pe.touches.length>0&&(_.current={x:pe.touches[0].clientX,y:pe.touches[0].clientY},q.current=!1,document.addEventListener("touchmove",Y,{passive:!1}),document.addEventListener("touchend",Te),document.addEventListener("touchcancel",Te))};return j.addEventListener("pointerdown",je),j.addEventListener("touchstart",_e),()=>{j.removeEventListener("pointerdown",je),j.removeEventListener("touchstart",_e),document.removeEventListener("pointermove",D),document.removeEventListener("pointerup",ge),document.removeEventListener("pointercancel",ge),document.removeEventListener("touchmove",Y),document.removeEventListener("touchend",Te),document.removeEventListener("touchcancel",Te),_.current=null,q.current=!1}},[e,ke,C]);const Fe={backgroundColor:ie.color,backdropFilter:`blur(${ie.blur}px)`,animationDuration:`${parseInt(ne.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:Fi.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:s?null:z,className:Ye(ue.background,P?re:me,{[ue.editor]:s},{[ue.hidden]:!e}),style:{...Fe,...F&&!s&&!P?{position:"absolute"}:{}}}),r.jsxs("div",{ref:s?z:null,className:Ye(ue.contentStyle,P?B:Ce,{[ue.editor]:s},{[ue.hidden]:!e}),style:{animationDuration:`${parseInt(ne.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Hr,{onMove:j=>w(j.index),ref:h,className:ue.lightboxSplide,options:{arrows:!1,speed:N.duration?parseInt(N.duration):500,direction:N.direction==="horiz"||N.type==="fade"||N.type==="scale"?"ltr":"ttb",pagination:!1,drag:se.type==="drag"&&!ke,perPage:1,width:"100%",height:"100%",type:N.type==="fade"||N.type==="scale"?"fade":"loop",padding:0,rewind:se.repeat!=="close",start:0},style:{"--splide-speed":N.duration},children:n.map((j,ae)=>{const A=qi(oe.position,oe.offset,s),D=`${R.scalingValue(oe.padding.top,s)} ${R.scalingValue(oe.padding.right,s)} ${R.scalingValue(oe.padding.bottom,s)} ${R.scalingValue(oe.padding.left,s)}`,Y=N.type==="scale"?(()=>{const{transform:Z,...ge}=A;return{...ge,position:"absolute",padding:D,boxSizing:"border-box","--position-transform":Z||"none"}})():{...A,position:"absolute",padding:D,boxSizing:"border-box"};return r.jsx(Br,{children:r.jsx("div",{className:ue.imgWrapper,onClick:Me,children:r.jsx("img",{ref:ae===$?E:null,className:Ye(ue.imageStyle,{[ue.contain]:j.image.objectFit==="contain",[ue.cover]:j.image.objectFit==="cover",[ue.scaleSlide]:N.type==="scale"}),src:j.image.url,alt:j.image.name??"",style:{...Y,pointerEvents:j.image.objectFit==="contain"?"none":"auto"}})})},ae)})},C),g.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ye(ue.arrow,{[ue.arrowVertical]:N.direction==="vert"}),style:{color:g.color,"--arrow-hover-color":g.hover},children:r.jsxs("button",{className:ue.arrowInner,style:{transform:`translate(${R.scalingValue(g.offset.x,s)}, ${R.scalingValue(g.offset.y*(N.direction==="horiz"?1:-1),s)}) scale(${g.scale}) rotate(${N.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var j;return(j=h.current)==null?void 0:j.go("-1")},"aria-label":"Previous",children:[g.arrowsImgUrl&&r.jsx(an,{url:g.arrowsImgUrl,fill:g.color,hoverFill:g.hover,className:Ye(ue.arrowImg,ue.mirror)}),!g.arrowsImgUrl&&r.jsx(hl,{color:g.color,className:Ye(ue.arrowIcon,ue.arrowImg,ue.mirror)})]})}),r.jsx("div",{className:Ye(ue.arrow,ue.nextArrow,{[ue.arrowVertical]:N.direction==="vert"}),style:{color:g.color,"--arrow-hover-color":g.hover},children:r.jsxs("button",{className:ue.arrowInner,style:{transform:`translate(${R.scalingValue(g.offset.x*(N.direction==="horiz"?-1:1),s)}, ${R.scalingValue(g.offset.y,s)}) scale(${g.scale}) rotate(${N.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var j;return(j=h.current)==null?void 0:j.go("+1")},"aria-label":"Next",children:[g.arrowsImgUrl&&r.jsx(an,{url:g.arrowsImgUrl,fill:g.color,hoverFill:g.hover,className:ue.arrowImg}),!g.arrowsImgUrl&&r.jsx(hl,{color:g.color,className:Ye(ue.arrowIcon,ue.arrowImg)})]})})]}),ie.closeIconUrl&&(()=>{const j=qi(ie.closeIconAlign,ie.closeIconOffset,s),ae=`scale(${ie.closeIconScale})`,A=j.transform?`${j.transform} ${ae}`:ae;return r.jsx("button",{className:ue.closeButton,style:{...j,transform:A},onClick:U,"aria-label":"Close lightbox",children:r.jsx(an,{url:ie.closeIconUrl,fill:ie.closeIconColor??"#000000",hoverFill:ie.closeIconHover??"#cccccc"})})})(),fe&&fe.isActive&&i.imageCaption&&((xe=n[$])==null?void 0:xe.imageCaption)&&r.jsx("div",{className:ue.caption,style:{...qi(fe.alignment,fe.offset,s),fontFamily:ko(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:a.sizing==="auto"?"max-content":R.scalingValue(a.width,s),letterSpacing:R.scalingValue(u,s),wordSpacing:R.scalingValue(x,s),textAlign:S,fontSize:R.scalingValue(v.fontSize,s),lineHeight:R.scalingValue(v.lineHeight,s),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:y},onClick:j=>j.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:ue.captionTextInner,style:{"--link-color":fe.linkColor,"--link-hover-color":fe.linkHoverColor},children:r.jsx(_i,{content:n[$].imageCaption})})}),de.isActive&&(()=>{const[j,ae]=de.position.split("-"),A=N.direction==="horiz"?`${j}-left`:de.position,D=qi(A,de.offset,s),Y=()=>{if(N.direction==="horiz"){if(ae==="left")return"flex-start";if(ae==="center")return"center";if(ae==="right")return"flex-end"}else{if(j==="top")return"flex-start";if(j==="middle")return"center";if(j==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:G,className:ue.thumbsWrapper,onClick:Z=>Ae(Z),style:{position:s?"absolute":"fixed",...D,...N.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:Ye(ue.thumbsContainer,{[ue.thumbsContainerVertical]:N.direction==="vert",[ue.thumbsAlignStart]:de.align==="start",[ue.thumbsAlignCenter]:de.align==="center",[ue.thumbsAlignEnd]:de.align==="end"}),style:{gap:R.scalingValue(de.grid.gap,s),justifyContent:H?"flex-start":Y()},children:n.map((Z,ge)=>{const Te=ge===$,je=W[ge],Le=de.grid.size*(Te?de.activeState.scale:1),Ge=()=>{if(de.fit!=="fit")return{};if(!je)return N.direction==="horiz"?{height:R.scalingValue(Le,s)}:{width:R.scalingValue(Le,s)};const pe=je.width/je.height;if(N.direction==="horiz"){const We=Le,ze=We*pe;return{width:R.scalingValue(ze,s),height:R.scalingValue(We,s)}}else{const We=Le,ze=We/pe;return{width:R.scalingValue(We,s),height:R.scalingValue(ze,s)}}};return r.jsx("button",{className:ue.thumbItem,style:{...N.direction==="horiz"&&de.fit!=="fit"?{height:R.scalingValue(Le,s)}:{},...N.direction==="vert"&&de.fit!=="fit"?{width:R.scalingValue(Le,s)}:{},...de.fit==="cover"?{width:R.scalingValue(Le,s),height:R.scalingValue(Le,s)}:{},...Ge(),transition:Te?"all 0.25s ease-out":"none",opacity:Te?de.activeState.opacity/100:de.opacity/100,"--thumb-hover":de.activeState.opacity/100},onClick:pe=>{var We;pe.stopPropagation(),w(ge),(We=h.current)==null||We.go(ge)},onMouseEnter:()=>{var pe;de.triggers==="hov"&&((pe=h.current)==null||pe.go(ge))},children:r.jsx("img",{src:Z.image.url,alt:Z.image.name??"",onLoad:pe=>{const We=pe.currentTarget;We.naturalWidth&&We.naturalHeight&&K(ze=>({...ze,[ge]:{width:We.naturalWidth,height:We.naturalHeight}}))},style:{objectFit:de.fit==="cover"?"cover":"contain",...de.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...de.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Z.image.name}-${ge}`)})})})})()]})]}),document.getElementById(l))};function hl({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Xd={element:Ud,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 Xi(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Yd(e){return`
7
+ .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${Di(48)};
11
+ min-height: ${Xi(48)};
12
12
  }
13
- .${t}-wrapper.${t}-type-C .${t}-input:focus-visible,
14
- .${t}-wrapper.${t}-type-C .${t}-button:focus-visible {
13
+ .${e}-wrapper.${e}-type-C .${e}-input:focus-visible,
14
+ .${e}-wrapper.${e}-type-C .${e}-button:focus-visible {
15
15
  outline: none;
16
16
  }
17
- .${t}-form {
17
+ .${e}-form {
18
18
  display: flex;
19
19
  flex-direction: column;
20
20
  width: 100%;
21
21
  }
22
- .${t}-fields {
22
+ .${e}-fields {
23
23
  display: flex;
24
24
  flex-direction: column;
25
25
  flex: 1;
26
26
  min-width: 0;
27
27
  }
28
- .${t}-field-group {
28
+ .${e}-field-group {
29
29
  display: flex;
30
30
  flex-direction: column;
31
31
  flex: 1;
32
32
  min-width: 0;
33
33
  }
34
- .${t}-field-group.${t}-labeled {
35
- gap: ${Di(4)};
34
+ .${e}-field-group.${e}-labeled {
35
+ gap: ${Xi(4)};
36
36
  }
37
- .${t}-field-label {
37
+ .${e}-field-label {
38
38
  white-space: nowrap;
39
- color: var(--${t}-label-text-color);
39
+ color: var(--${e}-label-text-color);
40
40
  }
41
- .${t}-input {
41
+ .${e}-input {
42
42
  width: 100%;
43
43
  box-sizing: border-box;
44
44
  outline: none;
45
45
  -webkit-tap-highlight-color: transparent;
46
- background-color: var(--${t}-input-color);
47
- color: var(--${t}-input-text-color);
48
- border-color: var(--${t}-input-border-color);
46
+ background-color: var(--${e}-input-color);
47
+ color: var(--${e}-input-text-color);
48
+ border-color: var(--${e}-input-border-color);
49
49
  transition: color 250ms, border-color 250ms, background-color 250ms;
50
50
  }
51
- .${t}-input::placeholder {
52
- color: var(--${t}-placeholder-color);
51
+ .${e}-input::placeholder {
52
+ color: var(--${e}-placeholder-color);
53
53
  opacity: 1;
54
54
  transition: color 250ms, opacity 250ms;
55
55
  }
56
- .${t}-input:hover {
57
- background-color: var(--${t}-hover-input-color, var(--${t}-input-color));
58
- color: var(--${t}-hover-input-text-color, var(--${t}-input-text-color));
59
- border-color: var(--${t}-hover-input-border-color, var(--${t}-input-border-color));
60
- }
61
- .${t}-wrapper.${t}-state-hover .${t}-input {
62
- background-color: var(--${t}-hover-input-color, var(--${t}-input-color));
63
- color: var(--${t}-hover-input-text-color, var(--${t}-input-text-color));
64
- border-color: var(--${t}-hover-input-border-color, var(--${t}-input-border-color));
65
- }
66
- .${t}-input:focus,
67
- .${t}-input:focus-visible,
68
- .${t}-wrapper.${t}-state-focus .${t}-input {
69
- background-color: var(--${t}-focus-input-color, var(--${t}-input-color));
70
- color: var(--${t}-focus-input-text-color, var(--${t}-input-text-color));
71
- border-color: var(--${t}-focus-input-border-color, var(--${t}-input-border-color));
72
- }
73
- .${t}-input[data-filled="true"] {
74
- background-color: var(--${t}-filled-input-color, var(--${t}-input-color));
75
- color: var(--${t}-filled-input-text-color, var(--${t}-input-text-color));
76
- border-color: var(--${t}-filled-input-border-color, var(--${t}-input-border-color));
77
- }
78
- .${t}-wrapper.${t}-state-filled .${t}-button {
79
- background-color: var(--${t}-filled-button-color, var(--${t}-button-color));
80
- color: var(--${t}-filled-button-text-color, var(--${t}-button-text-color));
81
- border-color: var(--${t}-filled-button-border-color, var(--${t}-button-border-color));
82
- }
83
- .${t}-wrapper.${t}-state-success .${t}-input,
84
- .${t}-wrapper.${t}-state-success .${t}-button {
56
+ .${e}-input:hover {
57
+ background-color: var(--${e}-hover-input-color, var(--${e}-input-color));
58
+ color: var(--${e}-hover-input-text-color, var(--${e}-input-text-color));
59
+ border-color: var(--${e}-hover-input-border-color, var(--${e}-input-border-color));
60
+ }
61
+ .${e}-wrapper.${e}-state-hover .${e}-input {
62
+ background-color: var(--${e}-hover-input-color, var(--${e}-input-color));
63
+ color: var(--${e}-hover-input-text-color, var(--${e}-input-text-color));
64
+ border-color: var(--${e}-hover-input-border-color, var(--${e}-input-border-color));
65
+ }
66
+ .${e}-input:focus,
67
+ .${e}-input:focus-visible,
68
+ .${e}-wrapper.${e}-state-focus .${e}-input {
69
+ background-color: var(--${e}-focus-input-color, var(--${e}-input-color));
70
+ color: var(--${e}-focus-input-text-color, var(--${e}-input-text-color));
71
+ border-color: var(--${e}-focus-input-border-color, var(--${e}-input-border-color));
72
+ }
73
+ .${e}-input[data-filled="true"] {
74
+ background-color: var(--${e}-filled-input-color, var(--${e}-input-color));
75
+ color: var(--${e}-filled-input-text-color, var(--${e}-input-text-color));
76
+ border-color: var(--${e}-filled-input-border-color, var(--${e}-input-border-color));
77
+ }
78
+ .${e}-wrapper.${e}-state-filled .${e}-button {
79
+ background-color: var(--${e}-filled-button-color, var(--${e}-button-color));
80
+ color: var(--${e}-filled-button-text-color, var(--${e}-button-text-color));
81
+ border-color: var(--${e}-filled-button-border-color, var(--${e}-button-border-color));
82
+ }
83
+ .${e}-wrapper.${e}-state-success .${e}-input,
84
+ .${e}-wrapper.${e}-state-success .${e}-button {
85
85
  pointer-events: none;
86
86
  }
87
- .${t}-wrapper.${t}-state-error .${t}-input {
87
+ .${e}-wrapper.${e}-state-error .${e}-input {
88
88
  }
89
- .${t}-input[data-field-type="textarea"] {
89
+ .${e}-input[data-field-type="textarea"] {
90
90
  resize: vertical;
91
91
  }
92
- .${t}-input:disabled {
92
+ .${e}-input:disabled {
93
93
  cursor: not-allowed;
94
94
  }
95
- .${t}-button {
95
+ .${e}-button {
96
96
  cursor: pointer;
97
97
  white-space: nowrap;
98
98
  box-sizing: border-box;
99
99
  outline: none;
100
- background-color: var(--${t}-button-color);
101
- color: var(--${t}-button-text-color);
102
- border-color: var(--${t}-button-border-color);
100
+ background-color: var(--${e}-button-color);
101
+ color: var(--${e}-button-text-color);
102
+ border-color: var(--${e}-button-border-color);
103
103
  transition: color 250ms, background-color 250ms, border-color 250ms;
104
104
  }
105
- .${t}-button:hover {
106
- background-color: var(--${t}-hover-button-color, var(--${t}-button-color));
107
- color: var(--${t}-hover-button-text-color, var(--${t}-button-text-color));
108
- border-color: var(--${t}-hover-button-border-color, var(--${t}-button-border-color));
109
- }
110
- .${t}-wrapper.${t}-state-hover .${t}-button {
111
- background-color: var(--${t}-hover-button-color, var(--${t}-button-color));
112
- color: var(--${t}-hover-button-text-color, var(--${t}-button-text-color));
113
- border-color: var(--${t}-hover-button-border-color, var(--${t}-button-border-color));
114
- }
115
- .${t}-button:focus,
116
- .${t}-button:focus-visible,
117
- .${t}-wrapper.${t}-state-focus .${t}-button {
118
- background-color: var(--${t}-focus-button-color, var(--${t}-button-color));
119
- color: var(--${t}-focus-button-text-color, var(--${t}-button-text-color));
120
- border-color: var(--${t}-focus-button-border-color, var(--${t}-button-border-color));
121
- }
122
- .${t}-input:focus-visible,
123
- .${t}-wrapper.${t}-state-focus .${t}-input {
105
+ .${e}-button:hover {
106
+ background-color: var(--${e}-hover-button-color, var(--${e}-button-color));
107
+ color: var(--${e}-hover-button-text-color, var(--${e}-button-text-color));
108
+ border-color: var(--${e}-hover-button-border-color, var(--${e}-button-border-color));
109
+ }
110
+ .${e}-wrapper.${e}-state-hover .${e}-button {
111
+ background-color: var(--${e}-hover-button-color, var(--${e}-button-color));
112
+ color: var(--${e}-hover-button-text-color, var(--${e}-button-text-color));
113
+ border-color: var(--${e}-hover-button-border-color, var(--${e}-button-border-color));
114
+ }
115
+ .${e}-button:focus,
116
+ .${e}-button:focus-visible,
117
+ .${e}-wrapper.${e}-state-focus .${e}-button {
118
+ background-color: var(--${e}-focus-button-color, var(--${e}-button-color));
119
+ color: var(--${e}-focus-button-text-color, var(--${e}-button-text-color));
120
+ border-color: var(--${e}-focus-button-border-color, var(--${e}-button-border-color));
121
+ }
122
+ .${e}-input:focus-visible,
123
+ .${e}-wrapper.${e}-state-focus .${e}-input {
124
124
  outline: none;
125
125
  }
126
- .${t}-button:focus-visible,
127
- .${t}-wrapper.${t}-state-focus .${t}-button {
126
+ .${e}-button:focus-visible,
127
+ .${e}-wrapper.${e}-state-focus .${e}-button {
128
128
  outline: none;
129
129
  }
130
- .${t}-success {
131
- margin-top: ${Di(8)};
132
- color: var(--${t}-success-success-color, var(--${t}-success-color));
130
+ .${e}-success {
131
+ margin-top: ${Xi(8)};
132
+ color: var(--${e}-success-success-color, var(--${e}-success-color));
133
133
  }
134
- .${t}-error {
135
- margin-top: ${Di(8)};
136
- color: var(--${t}-error-error-color, var(--${t}-error-color));
134
+ .${e}-error {
135
+ margin-top: ${Xi(8)};
136
+ color: var(--${e}-error-error-color, var(--${e}-error-color));
137
137
  }
138
- .${t}-overlay-anchor {
138
+ .${e}-overlay-anchor {
139
139
  position: relative;
140
140
  height: auto;
141
141
  }
142
- .${t}-control {
142
+ .${e}-control {
143
143
  position: relative;
144
144
  z-index: 2;
145
145
  width: 100%;
146
146
  }
147
- .${t}-control::before {
147
+ .${e}-control::before {
148
148
  content: "";
149
149
  position: absolute;
150
150
  top: 0;
@@ -155,7 +155,7 @@
155
155
  pointer-events: auto;
156
156
  z-index: 10;
157
157
  }
158
- `}function Jd({settings:t,isEditor:e,isEditMode:n,isPreviewMode:i,metadata:r,activeEvent:l}){const s=!!n,d=i&&e||!e,{prefix:a}=I.useScopedStyles(),{type:p="A",fieldsToShow:u=2,fields:S=[],buttonLabel:x,gap:y,fieldsGap:m,buttonCorners:f,buttonStroke:L,buttonPadding:w,isButtonFullWidth:$,inputCorners:C,inputStroke:P,inputPadding:E,inputColor:k,inputTextColor:b,inputBorderColor:M,placeholderColor:z,buttonColor:h,buttonTextColor:T,buttonBorderColor:_,labelTextColor:N,successColor:V,errorColor:at,fontFamily:O,inputFontSettings:W,inputFontSize:G,inputLineHeight:K,inputLetterSpacing:H,inputWordSpacing:q,inputTextAppearance:et,buttonFontSettings:lt,buttonFontSize:F,buttonLineHeight:ct,buttonLetterSpacing:g,buttonWordSpacing:nt,buttonTextAppearance:ft,labelFontSettings:it,labelFontSize:wt,labelLineHeight:mt,labelLetterSpacing:ot,labelWordSpacing:B,labelTextAppearance:Q,statusFontSettings:U,statusFontSize:Y,statusLineHeight:It,statusLetterSpacing:Mt,statusWordSpacing:At,statusTextAppearance:Pt,successMessage:xt,errorMessage:j,stateOverrides:st}=t,A=p==="B",D=S.slice(0,Math.min(u,S.length)),X={fontSettings:{fontFamily:O,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:G??.01,lineHeight:K,letterSpacing:H??0,wordSpacing:q??0,textAppearance:et,color:b},J=en(We(X,e)),gt=I.scalingValue(P??0,e),Ct=I.scalingValue((K??G??.01)+((E==null?void 0:E.top)??0)+((E==null?void 0:E.bottom)??0)+(p==="C"?P??0:(P??0)*2),e),Dt={...J,borderStyle:"solid",borderRadius:p==="C"?0:I.scalingValue(C??0,e),...p==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:gt,borderLeftWidth:0}:{borderWidth:gt},paddingTop:I.scalingValue((E==null?void 0:E.top)??0,e),paddingRight:I.scalingValue((E==null?void 0:E.right)??0,e),paddingBottom:I.scalingValue((E==null?void 0:E.bottom)??0,e),paddingLeft:I.scalingValue((E==null?void 0:E.left)??0,e),height:Ct,minHeight:Ct},Rt={fontSettings:{fontFamily:O,fontWeight:(lt==null?void 0:lt.fontWeight)??400,fontStyle:(lt==null?void 0:lt.fontStyle)??"normal"},fontSize:F??.01,lineHeight:ct,letterSpacing:g??0,wordSpacing:nt??0,textAppearance:ft,color:T},$t=en(We(Rt,e)),Gt=I.scalingValue(L??0,e),pt={fontSettings:{fontFamily:O,fontWeight:(it==null?void 0:it.fontWeight)??400,fontStyle:(it==null?void 0:it.fontStyle)??"normal"},fontSize:wt??.01,lineHeight:mt,letterSpacing:ot??0,wordSpacing:B??0,textAppearance:Q,color:N},Et=We(pt,e),jt={fontSettings:{fontFamily:O,fontWeight:(U==null?void 0:U.fontWeight)??400,fontStyle:(U==null?void 0:U.fontStyle)??"normal"},fontSize:Y??.01,lineHeight:It,letterSpacing:Mt??0,wordSpacing:At??0,textAppearance:Pt,color:V},zt=en(We(jt,e)),Vt=I.buildColorVars(a,{inputColor:k,inputTextColor:b,inputBorderColor:M,placeholderColor:z!=null&&z.trim()?z:"#cccccc",buttonColor:h,buttonTextColor:T,buttonBorderColor:_,labelTextColor:N,successColor:V,errorColor:at},Zd,Qd,st),[Ie,pe]=c.useState(()=>Object.fromEntries(D.map(Ft=>[Ft.name,""]))),[$e,Yt]=c.useState("idle"),[fe,be]=c.useState(null),Oe=l==="success"?"success":l==="error"?"error":$e,Wt=l==="error"?j:fe,we=l==="filled",Qt=c.useMemo(()=>{if(!we)return Ie;let Ft=null;for(const ce of D)(Ie[ce.name]??"").trim().length>0||(Ft=Ft??{...Ie},Ft[ce.name]="Filled");return Ft??Ie},[Ie,we,D]),Ee=Oe==="error"?I.getFormFieldValidationError(D,Qt):null,sn=`${l&&l!=="default"?`${a}-state-${l}`:""}`.trim(),Ae=r==null?void 0:r.submitUrl,De=(Ft,ce)=>{pe(me=>({...me,[Ft]:ce}))},ze=async Ft=>{if(Ft.preventDefault(),!d)return;const ce=Object.fromEntries(D.map(te=>{var ee;return[te.name,((ee=Ie[te.name])==null?void 0:ee.trim())??""]}).filter(([,te])=>te));if(!Ae){Yt("error"),be("No integrations were found for this form.");return}if(Object.keys(ce).length===0)return;const me=I.getFormFieldValidationError(D,Ie);if(me){Yt("error"),be(me);return}Yt("submitting"),be(null);try{const te=await fetch(Ae,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ce)});if(!te.ok){const ee=await te.text();throw new Error(ee||`Request failed: ${te.status}`)}Yt("success"),pe(Object.fromEntries(D.map(ee=>[ee.name,""])))}catch(te){Yt("error"),be(te instanceof Error?te.message:"Something went wrong")}};return o.jsxs("div",{className:`${a}-wrapper ${a}-type-${p} ${sn}`.trim(),style:Vt,children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:Yd(a)}}),o.jsxs("form",{onSubmit:ze,className:`${a}-form`,children:[o.jsx("div",{className:`${a}-fields`,children:D.map((Ft,ce)=>o.jsxs(c.Fragment,{children:[ce>0&&o.jsx("div",{"data-controls":s?"fieldsGap":void 0,className:s?`${a}-control`:void 0,style:{height:I.scalingValue(m??0,e)}}),o.jsxs("div",{className:`${a}-field-group${A?` ${a}-labeled`:""}`,children:[A&&o.jsx("span",{className:`${a}-field-label`,style:Et?{...Et,lineHeight:Et.fontSize}:void 0,children:Ft.label||Ft.name}),Ft.type==="textarea"?o.jsx("textarea",{name:Ft.name,autoComplete:"off",value:Qt[Ft.name]??"",onChange:me=>De(Ft.name,me.target.value),placeholder:Ft.placeholder,className:`${a}-input`,style:Dt,rows:1,"data-filled":we||(Qt[Ft.name]??"").trim().length>0,"data-field-type":"textarea"}):o.jsx("input",{type:Ft.type==="phone"?"tel":Ft.type==="email"?"email":"text",name:Ft.name,autoComplete:"off",value:Qt[Ft.name]??"",onChange:me=>De(Ft.name,me.target.value),placeholder:Ft.placeholder,required:Ft.isRequired??Ft.type==="email",className:`${a}-input`,style:Dt,"data-filled":we||(Qt[Ft.name]??"").trim().length>0})]})]},ce))}),o.jsx("div",{"data-controls":s?"gap":void 0,className:s?`${a}-control`:void 0,style:{height:I.scalingValue(y??0,e)}}),o.jsx("div",{className:`${a}-overlay-anchor`,children:o.jsx("button",{type:d?"submit":"button",className:`${a}-button`,style:{borderStyle:"solid",borderRadius:I.scalingValue(f??0,e),borderWidth:Gt,paddingTop:I.scalingValue((w==null?void 0:w.top)??0,e),paddingRight:I.scalingValue((w==null?void 0:w.right)??0,e),paddingBottom:I.scalingValue((w==null?void 0:w.bottom)??0,e),paddingLeft:I.scalingValue((w==null?void 0:w.left)??0,e),pointerEvents:d?"auto":void 0,...$t,...$?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:o.jsx("span",{className:`${a}-overlay-anchor`,style:$?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:$e==="submitting"?"...":x})})})]}),Oe==="success"&&o.jsx("p",{className:`${a}-success`,style:{...zt},children:xt}),Oe==="error"&&o.jsx("p",{className:`${a}-error`,style:{...zt},role:"alert",children:Ee??Wt??j})]})}const Zd={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"},Qd=["hover","focus","filled","success","error"],tu=`import React, { useMemo, useState } from 'react';
158
+ `}function Jd({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:l}){const s=!!n,d=i&&t||!t,{prefix:a}=R.useScopedStyles(),{type:p="A",fieldsToShow:u=2,fields:S=[],buttonLabel:x,gap:v,fieldsGap:m,buttonCorners:y,buttonStroke:$,buttonPadding:w,isButtonFullWidth:C,inputCorners:T,inputStroke:P,inputPadding:M,inputColor:F,inputTextColor:b,inputBorderColor:W,placeholderColor:K,buttonColor:h,buttonTextColor:L,buttonBorderColor:E,labelTextColor:k,successColor:z,errorColor:le,fontFamily:O,inputFontSettings:_,inputFontSize:q,inputLineHeight:G,inputLetterSpacing:H,inputWordSpacing:X,inputTextAppearance:ne,buttonFontSettings:se,buttonFontSize:N,buttonLineHeight:de,buttonLetterSpacing:g,buttonWordSpacing:ie,buttonTextAppearance:fe,labelFontSettings:oe,labelFontSize:Ce,labelLineHeight:me,labelLetterSpacing:re,labelWordSpacing:B,labelTextAppearance:Q,statusFontSettings:U,statusFontSize:J,statusLineHeight:Me,statusLetterSpacing:Ae,statusWordSpacing:ke,statusTextAppearance:Fe,successMessage:xe,errorMessage:j,stateOverrides:ae}=e,A=p==="B",D=S.slice(0,Math.min(u,S.length)),Y={fontSettings:{fontFamily:O,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:q??.01,lineHeight:G,letterSpacing:H??0,wordSpacing:X??0,textAppearance:ne,color:b},Z=sn(Pt(Y,t)),ge=R.scalingValue(P??0,t),Te=R.scalingValue((G??q??.01)+((M==null?void 0:M.top)??0)+((M==null?void 0:M.bottom)??0)+(p==="C"?P??0:(P??0)*2),t),je={...Z,borderStyle:"solid",borderRadius:p==="C"?0:R.scalingValue(T??0,t),...p==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ge,borderLeftWidth:0}:{borderWidth:ge},paddingTop:R.scalingValue((M==null?void 0:M.top)??0,t),paddingRight:R.scalingValue((M==null?void 0:M.right)??0,t),paddingBottom:R.scalingValue((M==null?void 0:M.bottom)??0,t),paddingLeft:R.scalingValue((M==null?void 0:M.left)??0,t),height:Te,minHeight:Te},_e={fontSettings:{fontFamily:O,fontWeight:(se==null?void 0:se.fontWeight)??400,fontStyle:(se==null?void 0:se.fontStyle)??"normal"},fontSize:N??.01,lineHeight:de,letterSpacing:g??0,wordSpacing:ie??0,textAppearance:fe,color:L},Le=sn(Pt(_e,t)),Ge=R.scalingValue($??0,t),pe={fontSettings:{fontFamily:O,fontWeight:(oe==null?void 0:oe.fontWeight)??400,fontStyle:(oe==null?void 0:oe.fontStyle)??"normal"},fontSize:Ce??.01,lineHeight:me,letterSpacing:re??0,wordSpacing:B??0,textAppearance:Q,color:k},We=Pt(pe,t),ze={fontSettings:{fontFamily:O,fontWeight:(U==null?void 0:U.fontWeight)??400,fontStyle:(U==null?void 0:U.fontStyle)??"normal"},fontSize:J??.01,lineHeight:Me,letterSpacing:Ae??0,wordSpacing:ke??0,textAppearance:Fe,color:z},Ve=sn(Pt(ze,t)),Ne=R.buildColorVars(a,{inputColor:F,inputTextColor:b,inputBorderColor:W,placeholderColor:K!=null&&K.trim()?K:"#cccccc",buttonColor:h,buttonTextColor:L,buttonBorderColor:E,labelTextColor:k,successColor:z,errorColor:le},Zd,Qd,ae),[It,dt]=c.useState(()=>Object.fromEntries(D.map(He=>[He.name,""]))),[bt,Ze]=c.useState("idle"),[yt,Mt]=c.useState(null),Ht=l==="success"?"success":l==="error"?"error":bt,Ee=l==="error"?j:yt,it=l==="filled",Ue=c.useMemo(()=>{if(!it)return It;let He=null;for(const Tt of D)(It[Tt.name]??"").trim().length>0||(He=He??{...It},He[Tt.name]="Filled");return He??It},[It,it,D]),ut=Ht==="error"?R.getFormFieldValidationError(D,Ue):null,rn=`${l&&l!=="default"?`${a}-state-${l}`:""}`.trim(),jt=o==null?void 0:o.submitUrl,Yt=(He,Tt)=>{dt(pt=>({...pt,[He]:Tt}))},ln=async He=>{if(He.preventDefault(),!d)return;const Tt=Object.fromEntries(D.map(et=>{var mt;return[et.name,((mt=It[et.name])==null?void 0:mt.trim())??""]}).filter(([,et])=>et));if(!jt){Ze("error"),Mt("No integrations were found for this form.");return}if(Object.keys(Tt).length===0)return;const pt=R.getFormFieldValidationError(D,It);if(pt){Ze("error"),Mt(pt);return}Ze("submitting"),Mt(null);try{const et=await fetch(jt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Tt)});if(!et.ok){const mt=await et.text();throw new Error(mt||`Request failed: ${et.status}`)}Ze("success"),dt(Object.fromEntries(D.map(mt=>[mt.name,""])))}catch(et){Ze("error"),Mt(et instanceof Error?et.message:"Something went wrong")}};return r.jsxs("div",{className:`${a}-wrapper ${a}-type-${p} ${rn}`.trim(),style:Ne,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Yd(a)}}),r.jsxs("form",{onSubmit:ln,className:`${a}-form`,children:[r.jsx("div",{className:`${a}-fields`,children:D.map((He,Tt)=>r.jsxs(c.Fragment,{children:[Tt>0&&r.jsx("div",{"data-controls":s?"fieldsGap":void 0,className:s?`${a}-control`:void 0,style:{height:R.scalingValue(m??0,t)}}),r.jsxs("div",{className:`${a}-field-group${A?` ${a}-labeled`:""}`,children:[A&&r.jsx("span",{className:`${a}-field-label`,style:We?{...We,lineHeight:We.fontSize}:void 0,children:He.label||He.name}),He.type==="textarea"?r.jsx("textarea",{name:He.name,autoComplete:"off",value:Ue[He.name]??"",onChange:pt=>Yt(He.name,pt.target.value),placeholder:He.placeholder,className:`${a}-input`,style:je,rows:1,"data-filled":it||(Ue[He.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:He.type==="phone"?"tel":He.type==="email"?"email":"text",name:He.name,autoComplete:"off",value:Ue[He.name]??"",onChange:pt=>Yt(He.name,pt.target.value),placeholder:He.placeholder,required:He.isRequired??He.type==="email",className:`${a}-input`,style:je,"data-filled":it||(Ue[He.name]??"").trim().length>0})]})]},Tt))}),r.jsx("div",{"data-controls":s?"gap":void 0,className:s?`${a}-control`:void 0,style:{height:R.scalingValue(v??0,t)}}),r.jsx("div",{className:`${a}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${a}-button`,style:{borderStyle:"solid",borderRadius:R.scalingValue(y??0,t),borderWidth:Ge,paddingTop:R.scalingValue((w==null?void 0:w.top)??0,t),paddingRight:R.scalingValue((w==null?void 0:w.right)??0,t),paddingBottom:R.scalingValue((w==null?void 0:w.bottom)??0,t),paddingLeft:R.scalingValue((w==null?void 0:w.left)??0,t),pointerEvents:d?"auto":void 0,...Le,...C?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${a}-overlay-anchor`,style:C?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:bt==="submitting"?"...":x})})})]}),Ht==="success"&&r.jsx("p",{className:`${a}-success`,style:{...Ve},children:xe}),Ht==="error"&&r.jsx("p",{className:`${a}-error`,style:{...Ve},role:"alert",children:ut??Ee??j})]})}const Zd={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"},Qd=["hover","focus","filled","success","error"],eu=`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,8 +789,8 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
789
789
  };
790
790
 
791
791
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
792
- `,eu=[{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"}],ji={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},nu=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],iu={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:{...ji.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:{...ji.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:{...ji.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:{...ji.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:eu,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...nu],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"]},ou={element:Jd,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300,height:42},t:{width:346,height:42},m:{width:300,height:42}},schema:iu,sourceCode:tu};function zi(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function ru(t){return`
793
- .${t}-wrapper {
792
+ `,tu=[{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"}],Yi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},nu=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],iu={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:{...Yi.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:{...Yi.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:{...Yi.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:{...Yi.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:tu,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...nu],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"]},ou={element:Jd,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300,height:42},t:{width:346,height:42},m:{width:300,height:42}},schema:iu,sourceCode:eu};function Ji(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ru(e){return`
793
+ .${e}-wrapper {
794
794
  display: flex;
795
795
  flex-direction: column;
796
796
  width: 100%;
@@ -798,90 +798,90 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
798
798
  align-items: stretch;
799
799
  justify-content: center;
800
800
  }
801
- .${t}-form {
801
+ .${e}-form {
802
802
  display: flex;
803
803
  width: 100%;
804
804
  align-items: stretch;
805
805
  overflow: hidden;
806
- border-color: var(--${t}-stroke-color);
806
+ border-color: var(--${e}-stroke-color);
807
807
  transition: border-color 250ms;
808
808
  }
809
- .${t}-form:hover {
810
- border-color: var(--${t}-hover-stroke-color, var(--${t}-stroke-color));
809
+ .${e}-form:hover {
810
+ border-color: var(--${e}-hover-stroke-color, var(--${e}-stroke-color));
811
811
  }
812
- .${t}-form:focus-within {
813
- border-color: var(--${t}-focus-stroke-color, var(--${t}-stroke-color));
812
+ .${e}-form:focus-within {
813
+ border-color: var(--${e}-focus-stroke-color, var(--${e}-stroke-color));
814
814
  }
815
- .${t}-wrapper.${t}-state-hover .${t}-form {
816
- border-color: var(--${t}-hover-stroke-color, var(--${t}-stroke-color));
815
+ .${e}-wrapper.${e}-state-hover .${e}-form {
816
+ border-color: var(--${e}-hover-stroke-color, var(--${e}-stroke-color));
817
817
  }
818
- .${t}-wrapper.${t}-state-focus .${t}-form {
819
- border-color: var(--${t}-focus-stroke-color, var(--${t}-stroke-color));
818
+ .${e}-wrapper.${e}-state-focus .${e}-form {
819
+ border-color: var(--${e}-focus-stroke-color, var(--${e}-stroke-color));
820
820
  }
821
- .${t}-wrapper.${t}-state-filled .${t}-form {
822
- border-color: var(--${t}-filled-stroke-color, var(--${t}-stroke-color));
821
+ .${e}-wrapper.${e}-state-filled .${e}-form {
822
+ border-color: var(--${e}-filled-stroke-color, var(--${e}-stroke-color));
823
823
  }
824
- .${t}-inputWrap {
824
+ .${e}-inputWrap {
825
825
  position: relative;
826
826
  display: flex;
827
827
  align-items: center;
828
828
  flex: 1;
829
829
  min-width: 0;
830
- background-color: var(--${t}-input-color);
830
+ background-color: var(--${e}-input-color);
831
831
  transition: background-color 250ms;
832
832
  }
833
- .${t}-inputWrap:hover,
834
- .${t}-wrapper.${t}-state-hover .${t}-inputWrap {
835
- background-color: var(--${t}-hover-input-color, var(--${t}-input-color));
833
+ .${e}-inputWrap:hover,
834
+ .${e}-wrapper.${e}-state-hover .${e}-inputWrap {
835
+ background-color: var(--${e}-hover-input-color, var(--${e}-input-color));
836
836
  }
837
- .${t}-inputWrap:focus-within,
838
- .${t}-wrapper.${t}-state-focus .${t}-inputWrap {
839
- background-color: var(--${t}-focus-input-color, var(--${t}-input-color));
837
+ .${e}-inputWrap:focus-within,
838
+ .${e}-wrapper.${e}-state-focus .${e}-inputWrap {
839
+ background-color: var(--${e}-focus-input-color, var(--${e}-input-color));
840
840
  }
841
- .${t}-wrapper.${t}-state-filled .${t}-inputWrap {
842
- background-color: var(--${t}-filled-input-color, var(--${t}-input-color));
841
+ .${e}-wrapper.${e}-state-filled .${e}-inputWrap {
842
+ background-color: var(--${e}-filled-input-color, var(--${e}-input-color));
843
843
  }
844
- .${t}-input {
844
+ .${e}-input {
845
845
  flex: 1;
846
846
  min-width: 0;
847
847
  background: transparent;
848
848
  border: none;
849
849
  outline: none;
850
850
  -webkit-tap-highlight-color: transparent;
851
- color: var(--${t}-input-text-color);
851
+ color: var(--${e}-input-text-color);
852
852
  transition: color 250ms, background-color 250ms, border-color 250ms;
853
853
  }
854
- .${t}-input:hover {
855
- color: var(--${t}-hover-input-text-color, var(--${t}-input-text-color));
854
+ .${e}-input:hover {
855
+ color: var(--${e}-hover-input-text-color, var(--${e}-input-text-color));
856
856
  }
857
- .${t}-inputWrap:hover .${t}-input,
858
- .${t}-wrapper.${t}-state-hover .${t}-input {
859
- color: var(--${t}-hover-input-text-color, var(--${t}-input-text-color));
857
+ .${e}-inputWrap:hover .${e}-input,
858
+ .${e}-wrapper.${e}-state-hover .${e}-input {
859
+ color: var(--${e}-hover-input-text-color, var(--${e}-input-text-color));
860
860
  }
861
- .${t}-input:focus,
862
- .${t}-wrapper.${t}-state-focus .${t}-input {
863
- color: var(--${t}-focus-input-text-color, var(--${t}-input-text-color));
861
+ .${e}-input:focus,
862
+ .${e}-wrapper.${e}-state-focus .${e}-input {
863
+ color: var(--${e}-focus-input-text-color, var(--${e}-input-text-color));
864
864
  }
865
- .${t}-wrapper.${t}-state-filled .${t}-input {
866
- color: var(--${t}-filled-input-text-color, var(--${t}-input-text-color));
865
+ .${e}-wrapper.${e}-state-filled .${e}-input {
866
+ color: var(--${e}-filled-input-text-color, var(--${e}-input-text-color));
867
867
  }
868
- .${t}-input::placeholder {
869
- color: var(--${t}-placeholder-color);
868
+ .${e}-input::placeholder {
869
+ color: var(--${e}-placeholder-color);
870
870
  opacity: 1;
871
871
  transition: color 250ms, opacity 250ms;
872
872
  }
873
- .${t}-inputWrap:hover .${t}-input::placeholder,
874
- .${t}-wrapper.${t}-state-hover .${t}-input::placeholder {
875
- color: var(--${t}-hover-placeholder-color, var(--${t}-placeholder-color));
873
+ .${e}-inputWrap:hover .${e}-input::placeholder,
874
+ .${e}-wrapper.${e}-state-hover .${e}-input::placeholder {
875
+ color: var(--${e}-hover-placeholder-color, var(--${e}-placeholder-color));
876
876
  }
877
- .${t}-inputWrap:focus-within .${t}-input::placeholder,
878
- .${t}-wrapper.${t}-state-focus .${t}-input::placeholder {
879
- color: var(--${t}-focus-placeholder-color, var(--${t}-placeholder-color));
877
+ .${e}-inputWrap:focus-within .${e}-input::placeholder,
878
+ .${e}-wrapper.${e}-state-focus .${e}-input::placeholder {
879
+ color: var(--${e}-focus-placeholder-color, var(--${e}-placeholder-color));
880
880
  }
881
- .${t}-wrapper.${t}-state-filled .${t}-input::placeholder {
882
- color: var(--${t}-filled-placeholder-color, var(--${t}-placeholder-color));
881
+ .${e}-wrapper.${e}-state-filled .${e}-input::placeholder {
882
+ color: var(--${e}-filled-placeholder-color, var(--${e}-placeholder-color));
883
883
  }
884
- .${t}-submitBtn {
884
+ .${e}-submitBtn {
885
885
  box-sizing: border-box;
886
886
  height: 100%;
887
887
  display: flex;
@@ -890,13 +890,13 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
890
890
  border: none;
891
891
  cursor: pointer;
892
892
  white-space: nowrap;
893
- background-color: var(--${t}-button-color);
894
- color: var(--${t}-button-text-color);
893
+ background-color: var(--${e}-button-color);
894
+ color: var(--${e}-button-text-color);
895
895
  border-left-style: solid;
896
- border-left-color: var(--${t}-stroke-color);
896
+ border-left-color: var(--${e}-stroke-color);
897
897
  transition: color 250ms, background-color 250ms, border-color 250ms;
898
898
  }
899
- .${t}-submitBtn img {
899
+ .${e}-submitBtn img {
900
900
  display: block;
901
901
  box-sizing: border-box;
902
902
  flex: 0 1 auto;
@@ -907,7 +907,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
907
907
  max-height: 100%;
908
908
  object-fit: contain;
909
909
  }
910
- .${t}-submitBtn svg {
910
+ .${e}-submitBtn svg {
911
911
  display: block;
912
912
  box-sizing: border-box;
913
913
  flex: 0 1 auto;
@@ -917,7 +917,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
917
917
  max-width: 100%;
918
918
  max-height: 100%;
919
919
  }
920
- .${t}-submitBtn .${t}-submitBtnIcon {
920
+ .${e}-submitBtn .${e}-submitBtnIcon {
921
921
  position: relative;
922
922
  top: auto;
923
923
  left: auto;
@@ -933,54 +933,54 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
933
933
  max-width: 100%;
934
934
  max-height: 100%;
935
935
  }
936
- .${t}-submitBtn:hover,
937
- .${t}-wrapper.${t}-state-hover .${t}-submitBtn {
938
- background-color: var(--${t}-hover-button-color, var(--${t}-button-color));
939
- color: var(--${t}-hover-button-text-color, var(--${t}-button-text-color));
940
- border-left-color: var(--${t}-hover-stroke-color, var(--${t}-stroke-color));
936
+ .${e}-submitBtn:hover,
937
+ .${e}-wrapper.${e}-state-hover .${e}-submitBtn {
938
+ background-color: var(--${e}-hover-button-color, var(--${e}-button-color));
939
+ color: var(--${e}-hover-button-text-color, var(--${e}-button-text-color));
940
+ border-left-color: var(--${e}-hover-stroke-color, var(--${e}-stroke-color));
941
941
  }
942
- .${t}-submitBtn:focus,
943
- .${t}-wrapper.${t}-state-focus .${t}-submitBtn {
944
- background-color: var(--${t}-focus-button-color, var(--${t}-button-color));
945
- color: var(--${t}-focus-button-text-color, var(--${t}-button-text-color));
946
- border-left-color: var(--${t}-focus-stroke-color, var(--${t}-stroke-color));
942
+ .${e}-submitBtn:focus,
943
+ .${e}-wrapper.${e}-state-focus .${e}-submitBtn {
944
+ background-color: var(--${e}-focus-button-color, var(--${e}-button-color));
945
+ color: var(--${e}-focus-button-text-color, var(--${e}-button-text-color));
946
+ border-left-color: var(--${e}-focus-stroke-color, var(--${e}-stroke-color));
947
947
  }
948
- .${t}-wrapper.${t}-state-filled .${t}-submitBtn {
949
- background-color: var(--${t}-filled-button-color, var(--${t}-button-color));
950
- color: var(--${t}-filled-button-text-color, var(--${t}-button-text-color));
951
- border-left-color: var(--${t}-filled-stroke-color, var(--${t}-stroke-color));
948
+ .${e}-wrapper.${e}-state-filled .${e}-submitBtn {
949
+ background-color: var(--${e}-filled-button-color, var(--${e}-button-color));
950
+ color: var(--${e}-filled-button-text-color, var(--${e}-button-text-color));
951
+ border-left-color: var(--${e}-filled-stroke-color, var(--${e}-stroke-color));
952
952
  }
953
- .${t}-submitBtn:hover .${t}-submitBtnIcon,
954
- .${t}-wrapper.${t}-state-hover .${t}-submitBtn .${t}-submitBtnIcon {
955
- background-color: var(--${t}-hover-button-text-color, var(--${t}-button-text-color));
953
+ .${e}-submitBtn:hover .${e}-submitBtnIcon,
954
+ .${e}-wrapper.${e}-state-hover .${e}-submitBtn .${e}-submitBtnIcon {
955
+ background-color: var(--${e}-hover-button-text-color, var(--${e}-button-text-color));
956
956
  }
957
- .${t}-submitBtn:focus .${t}-submitBtnIcon,
958
- .${t}-wrapper.${t}-state-focus .${t}-submitBtn .${t}-submitBtnIcon {
959
- background-color: var(--${t}-focus-button-text-color, var(--${t}-button-text-color));
957
+ .${e}-submitBtn:focus .${e}-submitBtnIcon,
958
+ .${e}-wrapper.${e}-state-focus .${e}-submitBtn .${e}-submitBtnIcon {
959
+ background-color: var(--${e}-focus-button-text-color, var(--${e}-button-text-color));
960
960
  }
961
- .${t}-wrapper.${t}-state-filled .${t}-submitBtn .${t}-submitBtnIcon {
962
- background-color: var(--${t}-filled-button-text-color, var(--${t}-button-text-color));
961
+ .${e}-wrapper.${e}-state-filled .${e}-submitBtn .${e}-submitBtnIcon {
962
+ background-color: var(--${e}-filled-button-text-color, var(--${e}-button-text-color));
963
963
  }
964
- .${t}-wrapper.${t}-state-success .${t}-input,
965
- .${t}-wrapper.${t}-state-success .${t}-submitBtn {
964
+ .${e}-wrapper.${e}-state-success .${e}-input,
965
+ .${e}-wrapper.${e}-state-success .${e}-submitBtn {
966
966
  pointer-events: none;
967
967
  }
968
- .${t}-overlayAnchor {
968
+ .${e}-overlayAnchor {
969
969
  position: relative;
970
970
  display: flex;
971
971
  align-items: center;
972
972
  }
973
- .${t}-success {
974
- margin-top: ${zi(8)};
975
- font-size: ${zi(14)};
976
- color: var(--${t}-success-success-color, var(--${t}-success-color));
973
+ .${e}-success {
974
+ margin-top: ${Ji(8)};
975
+ font-size: ${Ji(14)};
976
+ color: var(--${e}-success-success-color, var(--${e}-success-color));
977
977
  }
978
- .${t}-error {
979
- margin-top: ${zi(8)};
980
- font-size: ${zi(14)};
981
- color: var(--${t}-error-error-color, var(--${t}-error-color));
978
+ .${e}-error {
979
+ margin-top: ${Ji(8)};
980
+ font-size: ${Ji(14)};
981
+ color: var(--${e}-error-error-color, var(--${e}-error-color));
982
982
  }
983
- `}const lu=({settings:t,isEditor:e,isPreviewMode:n,metadata:i,activeEvent:r})=>{const{prefix:l}=I.useScopedStyles(),s=n&&e||!e,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:a,buttonLabel:p,fieldsToShow:u=1,fontFamily:S,inputFontSettings:x,inputFontSize:y,inputLineHeight:m,inputLetterSpacing:f,inputWordSpacing:L,inputTextAppearance:w,buttonFontSettings:$,buttonFontSize:C,buttonLineHeight:P,buttonLetterSpacing:E,buttonWordSpacing:k,buttonTextAppearance:b,statusFontSettings:M,statusFontSize:z,statusLineHeight:h,statusLetterSpacing:T,statusWordSpacing:_,statusTextAppearance:N,iconMaxWidth:V,minHeight:at,corners:O,stroke:W,stateOverrides:G,inputPadding:K,buttonPadding:H,successMessage:q="Thanks for subscribing!",errorMessage:et="Please, fill all required fields."}=t,lt=d.slice(0,Math.min(u,d.length)),[F,ct]=c.useState(()=>Object.fromEntries(lt.map(pt=>[pt.name,""]))),[g,nt]=c.useState("idle"),[ft,it]=c.useState(null),wt=r==="success"?"success":r==="error"?"error":g,mt=r==="error"?et:ft,ot=r==="filled",B=c.useMemo(()=>{if(!ot)return F;let pt=null;for(const Et of lt)(F[Et.name]??"").trim().length>0||(pt=pt??{...F},pt[Et.name]="Filled");return pt??F},[ot,F,lt]),Q=wt==="error"?I.getFormFieldValidationError(lt,B):null,U=r&&r!=="default"?`${l}-state-${r}`:"",Y=lt.some(pt=>(B[pt.name]??"").trim().length>0),It=U!==`${l}-state-filled`&&Y?`${l}-state-filled`:"",Mt=`${U} ${It}`.trim(),At=i==null?void 0:i.submitUrl,Pt=p??"",xt=(a==null?void 0:a.icon)??"",j=(a==null?void 0:a.mode)==="On",st=Pt||"Submit",A={fontSettings:{fontFamily:S,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:y??.01,lineHeight:m,letterSpacing:f??0,wordSpacing:L??0,textAppearance:w,color:t.inputTextColor??"#111111"},D={fontSettings:{fontFamily:S,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:C??.01,lineHeight:P,letterSpacing:E??0,wordSpacing:k??0,textAppearance:b,color:t.buttonTextColor??"#ffffff"},X={fontSettings:{fontFamily:S,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:z??.01,lineHeight:h,letterSpacing:T??0,wordSpacing:_??0,textAppearance:N,color:t.successColor??"#22c55e"},J=en(We(A,e)),gt=en(We(D,e)),Ct=en(We(X,e)),Dt=I.buildColorVars(l,{strokeColor:t.strokeColor,inputColor:t.inputColor,placeholderColor:t.placeholderColor,buttonColor:t.buttonColor,successColor:t.successColor,errorColor:t.errorColor,inputTextColor:t.inputTextColor??(A==null?void 0:A.color)??"#111111",buttonTextColor:t.buttonTextColor??(D==null?void 0:D.color)??"#ffffff"},su,au,G),Rt={borderRadius:I.scalingValue(O,e),borderWidth:I.scalingValue(W,e),borderStyle:"solid"},$t={borderLeftWidth:I.scalingValue(W,e)},Gt=async pt=>{if(pt.preventDefault(),!s)return;const Et=Object.fromEntries(lt.map(zt=>{var Vt;return[zt.name,((Vt=F[zt.name])==null?void 0:Vt.trim())??""]}).filter(([,zt])=>zt));if(!At){nt("error"),it("No integrations were found for this form.");return}if(Object.keys(Et).length===0)return;const jt=I.getFormFieldValidationError(lt,F);if(jt){nt("error"),it(jt);return}nt("submitting"),it(null);try{const zt=await fetch(At,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Et)});if(!zt.ok){const Vt=await zt.text();throw new Error(Vt||`Request failed: ${zt.status}`)}nt("success"),ct(Object.fromEntries(lt.map(Vt=>[Vt.name,""])))}catch(zt){nt("error"),it(zt instanceof Error?zt.message:"Something went wrong")}};return o.jsxs("div",{className:`${l}-wrapper ${Mt}`.trim(),style:Dt,children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:ru(l)}}),o.jsxs("form",{onSubmit:Gt,className:`${l}-form`,style:{...Rt,height:I.scalingValue(at,e),minHeight:I.scalingValue(at,e)},children:[o.jsx("div",{className:`${l}-inputWrap ${l}-overlayAnchor`,style:{flex:1,minWidth:0},children:lt.map(pt=>o.jsx("input",{type:pt.type==="email"?"email":pt.type==="phone"?"tel":"text",name:pt.name,autoComplete:"off",value:B[pt.name]??"",onChange:Et=>ct(jt=>({...jt,[pt.name]:Et.target.value})),placeholder:pt.placeholder,required:pt.isRequired??pt.type==="email",className:`${l}-input`,style:{...J,paddingRight:I.scalingValue(K.right,e),paddingLeft:I.scalingValue(K.left,e),paddingTop:I.scalingValue(K.top,e),paddingBottom:I.scalingValue(K.bottom,e)}},pt.name))}),o.jsx("div",{className:`${l}-overlayAnchor`,children:o.jsx("button",{type:s?"submit":"button",className:`${l}-submitBtn`,"aria-label":st,style:{...gt,...$t,paddingRight:I.scalingValue(H.right,e),paddingLeft:I.scalingValue(H.left,e),paddingTop:I.scalingValue(H.top,e),paddingBottom:I.scalingValue(H.bottom,e),pointerEvents:s?"auto":void 0},children:g==="submitting"?"...":j?xt&&o.jsx(nn,{url:xt,className:`${l}-submitBtnIcon`,style:{maxWidth:I.scalingValue(V??0,e)},fill:`var(--${l}-button-text-color)`,hoverFill:`var(--${l}-button-text-color)`}):Pt})})]}),wt==="success"&&o.jsx("p",{className:`${l}-success`,style:{...Ct},children:q}),wt==="error"&&o.jsx("p",{className:`${l}-error`,style:{...Ct},role:"alert",children:Q??mt??et})]})},su={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"},au=["hover","focus","filled","success","error"],cu=`import React, { useMemo, useState } from 'react';
983
+ `}const lu=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:l}=R.useScopedStyles(),s=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:a,buttonLabel:p,fieldsToShow:u=1,fontFamily:S,inputFontSettings:x,inputFontSize:v,inputLineHeight:m,inputLetterSpacing:y,inputWordSpacing:$,inputTextAppearance:w,buttonFontSettings:C,buttonFontSize:T,buttonLineHeight:P,buttonLetterSpacing:M,buttonWordSpacing:F,buttonTextAppearance:b,statusFontSettings:W,statusFontSize:K,statusLineHeight:h,statusLetterSpacing:L,statusWordSpacing:E,statusTextAppearance:k,iconMaxWidth:z,minHeight:le,corners:O,stroke:_,stateOverrides:q,inputPadding:G,buttonPadding:H,successMessage:X="Thanks for subscribing!",errorMessage:ne="Please, fill all required fields."}=e,se=d.slice(0,Math.min(u,d.length)),[N,de]=c.useState(()=>Object.fromEntries(se.map(pe=>[pe.name,""]))),[g,ie]=c.useState("idle"),[fe,oe]=c.useState(null),Ce=o==="success"?"success":o==="error"?"error":g,me=o==="error"?ne:fe,re=o==="filled",B=c.useMemo(()=>{if(!re)return N;let pe=null;for(const We of se)(N[We.name]??"").trim().length>0||(pe=pe??{...N},pe[We.name]="Filled");return pe??N},[re,N,se]),Q=Ce==="error"?R.getFormFieldValidationError(se,B):null,U=o&&o!=="default"?`${l}-state-${o}`:"",J=se.some(pe=>(B[pe.name]??"").trim().length>0),Me=U!==`${l}-state-filled`&&J?`${l}-state-filled`:"",Ae=`${U} ${Me}`.trim(),ke=i==null?void 0:i.submitUrl,Fe=p??"",xe=(a==null?void 0:a.icon)??"",j=(a==null?void 0:a.mode)==="On",ae=Fe||"Submit",A={fontSettings:{fontFamily:S,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:v??.01,lineHeight:m,letterSpacing:y??0,wordSpacing:$??0,textAppearance:w,color:e.inputTextColor??"#111111"},D={fontSettings:{fontFamily:S,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:T??.01,lineHeight:P,letterSpacing:M??0,wordSpacing:F??0,textAppearance:b,color:e.buttonTextColor??"#ffffff"},Y={fontSettings:{fontFamily:S,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:K??.01,lineHeight:h,letterSpacing:L??0,wordSpacing:E??0,textAppearance:k,color:e.successColor??"#22c55e"},Z=sn(Pt(A,t)),ge=sn(Pt(D,t)),Te=sn(Pt(Y,t)),je=R.buildColorVars(l,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(A==null?void 0:A.color)??"#111111",buttonTextColor:e.buttonTextColor??(D==null?void 0:D.color)??"#ffffff"},su,au,q),_e={borderRadius:R.scalingValue(O,t),borderWidth:R.scalingValue(_,t),borderStyle:"solid"},Le={borderLeftWidth:R.scalingValue(_,t)},Ge=async pe=>{if(pe.preventDefault(),!s)return;const We=Object.fromEntries(se.map(Ve=>{var Ne;return[Ve.name,((Ne=N[Ve.name])==null?void 0:Ne.trim())??""]}).filter(([,Ve])=>Ve));if(!ke){ie("error"),oe("No integrations were found for this form.");return}if(Object.keys(We).length===0)return;const ze=R.getFormFieldValidationError(se,N);if(ze){ie("error"),oe(ze);return}ie("submitting"),oe(null);try{const Ve=await fetch(ke,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(We)});if(!Ve.ok){const Ne=await Ve.text();throw new Error(Ne||`Request failed: ${Ve.status}`)}ie("success"),de(Object.fromEntries(se.map(Ne=>[Ne.name,""])))}catch(Ve){ie("error"),oe(Ve instanceof Error?Ve.message:"Something went wrong")}};return r.jsxs("div",{className:`${l}-wrapper ${Ae}`.trim(),style:je,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ru(l)}}),r.jsxs("form",{onSubmit:Ge,className:`${l}-form`,style:{..._e,height:R.scalingValue(le,t),minHeight:R.scalingValue(le,t)},children:[r.jsx("div",{className:`${l}-inputWrap ${l}-overlayAnchor`,style:{flex:1,minWidth:0},children:se.map(pe=>r.jsx("input",{type:pe.type==="email"?"email":pe.type==="phone"?"tel":"text",name:pe.name,autoComplete:"off",value:B[pe.name]??"",onChange:We=>de(ze=>({...ze,[pe.name]:We.target.value})),placeholder:pe.placeholder,required:pe.isRequired??pe.type==="email",className:`${l}-input`,style:{...Z,paddingRight:R.scalingValue(G.right,t),paddingLeft:R.scalingValue(G.left,t),paddingTop:R.scalingValue(G.top,t),paddingBottom:R.scalingValue(G.bottom,t)}},pe.name))}),r.jsx("div",{className:`${l}-overlayAnchor`,children:r.jsx("button",{type:s?"submit":"button",className:`${l}-submitBtn`,"aria-label":ae,style:{...ge,...Le,paddingRight:R.scalingValue(H.right,t),paddingLeft:R.scalingValue(H.left,t),paddingTop:R.scalingValue(H.top,t),paddingBottom:R.scalingValue(H.bottom,t),pointerEvents:s?"auto":void 0},children:g==="submitting"?"...":j?xe&&r.jsx(an,{url:xe,className:`${l}-submitBtnIcon`,style:{maxWidth:R.scalingValue(z??0,t)},fill:`var(--${l}-button-text-color)`,hoverFill:`var(--${l}-button-text-color)`}):Fe})})]}),Ce==="success"&&r.jsx("p",{className:`${l}-success`,style:{...Te},children:X}),Ce==="error"&&r.jsx("p",{className:`${l}-error`,style:{...Te},role:"alert",children:Q??me??ne})]})},su={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"},au=["hover","focus","filled","success","error"],cu=`import React, { useMemo, useState } from 'react';
984
984
  import { CommonComponentProps } from '../props';
985
985
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
986
986
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -1557,24 +1557,24 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
1557
1557
  };
1558
1558
 
1559
1559
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1560
- `,du="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>'),uu=[{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."}],No={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},pu=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],mu={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:{...No.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:{...No.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:{...No.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:uu,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:du},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["fieldsToShow","minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...pu],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"]},gu={element:lu,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:mu,sourceCode:cu};function hu(t){return`
1561
- .${t}-marquee-wrapper {
1560
+ `,du="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>'),uu=[{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."}],Ko={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},pu=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],mu={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:{...Ko.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:{...Ko.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:{...Ko.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:uu,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:du},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["fieldsToShow","minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...pu],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"]},gu={element:lu,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:mu,sourceCode:cu};function hu(e){return`
1561
+ .${e}-marquee-wrapper {
1562
1562
  overflow: hidden;
1563
1563
  width: 100%;
1564
1564
  height: auto;
1565
1565
  }
1566
1566
 
1567
- @keyframes ${t}-marquee-left {
1567
+ @keyframes ${e}-marquee-left {
1568
1568
  from { transform: translate3d(0, 0, 0); }
1569
1569
  to { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
1570
1570
  }
1571
1571
 
1572
- @keyframes ${t}-marquee-right {
1572
+ @keyframes ${e}-marquee-right {
1573
1573
  from { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
1574
1574
  to { transform: translate3d(0, 0, 0); }
1575
1575
  }
1576
1576
 
1577
- .${t}-marquee-track {
1577
+ .${e}-marquee-track {
1578
1578
  display: flex;
1579
1579
  flex-direction: row;
1580
1580
  width: max-content;
@@ -1590,26 +1590,26 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1590
1590
  animation-play-state: var(--marquee-play-state, running);
1591
1591
  }
1592
1592
 
1593
- .${t}-marquee-track[data-direction="left"] {
1594
- animation-name: ${t}-marquee-left;
1593
+ .${e}-marquee-track[data-direction="left"] {
1594
+ animation-name: ${e}-marquee-left;
1595
1595
  }
1596
1596
 
1597
- .${t}-marquee-track[data-direction="right"] {
1598
- animation-name: ${t}-marquee-right;
1597
+ .${e}-marquee-track[data-direction="right"] {
1598
+ animation-name: ${e}-marquee-right;
1599
1599
  }
1600
- .${t}-marquee-row {
1600
+ .${e}-marquee-row {
1601
1601
  display: flex;
1602
1602
  flex-direction: row;
1603
1603
  align-items: flex-start;
1604
1604
  }
1605
- .${t}-marquee-set {
1605
+ .${e}-marquee-set {
1606
1606
  flex: 0 0 auto;
1607
1607
  }
1608
- .${t}-marquee-static {
1608
+ .${e}-marquee-static {
1609
1609
  justify-content: center;
1610
1610
  overflow-x: auto;
1611
1611
  }
1612
- .${t}-marquee-card {
1612
+ .${e}-marquee-card {
1613
1613
  position: relative;
1614
1614
  flex: 0 0 auto;
1615
1615
  align-self: flex-start;
@@ -1618,33 +1618,33 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1618
1618
  -webkit-backface-visibility: hidden;
1619
1619
  will-change: transform;
1620
1620
  }
1621
- .${t}-wrapper {
1621
+ .${e}-wrapper {
1622
1622
  position: relative;
1623
1623
  width: 100%;
1624
1624
  height: 100%;
1625
1625
  order: 1;
1626
1626
  }
1627
- .${t}-cover {
1627
+ .${e}-cover {
1628
1628
  position: absolute;
1629
1629
  width: 100%;
1630
1630
  height: 100%;
1631
1631
  top: 0;
1632
1632
  left: 0;
1633
1633
  }
1634
- .${t}-elements-overlay {
1634
+ .${e}-elements-overlay {
1635
1635
  position: relative;
1636
1636
  inset: 0;
1637
1637
  display: flex;
1638
1638
  flex-direction: column;
1639
1639
  pointer-events: none;
1640
1640
  }
1641
- .${t}-control {
1641
+ .${e}-control {
1642
1642
  position: relative;
1643
1643
  z-index: 2;
1644
1644
  width: 100%;
1645
1645
  }
1646
1646
 
1647
- .${t}-marquee-link {
1647
+ .${e}-marquee-link {
1648
1648
  display: flex;
1649
1649
  flex-direction: column;
1650
1650
  justify-content: center;
@@ -1654,12 +1654,12 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1654
1654
  text-decoration: none;
1655
1655
  color: inherit;
1656
1656
  }
1657
- .${t}-marquee-link-contain {
1657
+ .${e}-marquee-link-contain {
1658
1658
  width: auto;
1659
1659
  height: auto;
1660
1660
  }
1661
1661
 
1662
- .${t}-control::before {
1662
+ .${e}-control::before {
1663
1663
  content: "";
1664
1664
  position: absolute;
1665
1665
  top: 0;
@@ -1671,25 +1671,25 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1671
1671
  z-index: 10;
1672
1672
  }
1673
1673
 
1674
- .${t}-gap-control {
1674
+ .${e}-gap-control {
1675
1675
  position: relative;
1676
1676
  z-index: 2;
1677
1677
  pointer-events: auto;
1678
1678
  height: 100%;
1679
1679
  }
1680
- .${t}-image-hover-brightness img {
1680
+ .${e}-image-hover-brightness img {
1681
1681
  transition: filter 0.3s ease;
1682
1682
  }
1683
- .${t}-image-hover-brightness:hover img {
1683
+ .${e}-image-hover-brightness:hover img {
1684
1684
  filter: brightness(1.25);
1685
1685
  }
1686
- .${t}-image-hover-grayscale img {
1686
+ .${e}-image-hover-grayscale img {
1687
1687
  transition: filter 0.3s ease;
1688
1688
  }
1689
- .${t}-image-hover-grayscale:hover img {
1689
+ .${e}-image-hover-grayscale:hover img {
1690
1690
  filter: grayscale(100%);
1691
1691
  }
1692
- `}const fu=30,yu=20,Ho=2,vu=2,xu=(t,e)=>Array.from({length:e},()=>t).flat(),bu=(t,e)=>{const n=e.getBoundingClientRect(),i=t.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Su=(t,e)=>{const n=t.querySelectorAll(`[data-marquee-item-index="${e}"]`);return Array.from(n).some(i=>bu(i,t))},wu=({item:t,prefix:e,imageFit:n,imageMaxWidth:i,imageMaxHeight:r,imageHoverClass:l,isFirstSet:s,scaled:d,onFirstSetImageDone:a})=>{var b,M,z;const p=c.useRef(null);c.useLayoutEffect(()=>{if(!s)return;const h=p.current;h!=null&&h.complete&&(a==null||a())},[s,(b=t.image)==null?void 0:b.url,a]);const u=n.display==="Cover",S=n.ratioValue??"1:1",x=n.reversed??!1,[y,m]=S.split(":").map(Number),w=(x?m:y)/(x?y:m);let $=i,C=$/w;C>r&&(C=r,$=C*w);const P=d($),E=d(C),k=((M=t.image)==null?void 0:M.url)&&o.jsx("img",{ref:p,src:t.image.url,alt:((z=t.image)==null?void 0:z.name)??"",style:u?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:d(i),objectFit:"contain"},onLoad:s?a:void 0,onError:s?a:void 0});return o.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:P}:{width:"fit-content",maxWidth:d(i),minWidth:0}},children:o.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...u?{width:P,height:E,overflow:"hidden"}:{width:"fit-content",maxWidth:d(i),height:d(r)}},children:k&&t.link?o.jsx("a",{href:t.link,target:"_blank",rel:"noopener noreferrer",className:Xt(`${e}-marquee-link`,!u&&`${e}-marquee-link-contain`),children:k}):k})})},Cu=({settings:t,content:e,isEditor:n,isPreviewMode:i,isEditMode:r})=>{const{prefix:l}=I.useScopedStyles(),s=c.useMemo(()=>hu(l),[l]),{speed:d,direction:a,pauseOnHover:p,gap:u,imageMaxWidth:S,imageMaxHeight:x,imageFit:y,hoverEffect:m}=t,f=!!r,L=!n||!!i,w=L&&m!=="off"&&m!=="randomize"?`${l}-image-hover-${m}`:void 0,$=n?!!i:!0,P=((e==null?void 0:e.length)??0)>0&&($||!!n),E=Math.max(0,d)*fu,k=Q=>I.scalingValue(Q,n??!1),b=c.useRef(null),M=c.useRef(null),z=c.useRef(null),[h,T]=c.useState(0),[_,N]=c.useState(0),V=$&&p==="on",[at,O]=c.useState(!1),[W,G]=c.useState({}),K=c.useRef(W);K.current=W;const H=c.useRef(null),q=c.useRef(0),et=c.useRef(null),lt=c.useMemo(()=>(e??[]).map(Q=>{var U;return((U=Q.image)==null?void 0:U.url)??""}).join("\0"),[e]),[F,ct]=c.useState(Ho),g=c.useMemo(()=>{const Q=e??[];return!$||Q.length===0?Q:xu(Q,F)},[e,$,F]),nt=c.useMemo(()=>g.filter(Q=>{var U;return!!((U=Q.image)!=null&&U.url)}).length,[g]),ft=P?vu:1;c.useLayoutEffect(()=>{q.current=0,G({}),H.current=null,ct(Ho),T(0)},[lt]),c.useEffect(()=>{if(!L||m!=="randomize")return;const Q=b.current;if(!Q)return;const U=At=>{G(Pt=>{let xt=null;for(const j of At)j in Pt&&(Su(Q,j)||(xt||(xt={...Pt}),delete xt[j]));return xt??Pt})},Y=new IntersectionObserver(At=>{const Pt=new Set;for(const xt of At){const j=xt.target.dataset.marqueeItemIndex,st=j!==void 0?Number(j):NaN;Number.isNaN(st)||Pt.add(st)}Pt.size>0&&U(Pt)},{root:Q,threshold:0});Object.keys(W).forEach(At=>{const Pt=Number(At);Q.querySelectorAll(`[data-marquee-item-index="${Pt}"]`).forEach(xt=>Y.observe(xt))});let It=0;const Mt=()=>{const At=Object.keys(K.current);At.length!==0&&(U(At.map(Number)),It=requestAnimationFrame(Mt))};return Object.keys(K.current).length>0&&(It=requestAnimationFrame(Mt)),()=>{cancelAnimationFrame(It),Y.disconnect()}},[m,W,L]),c.useLayoutEffect(()=>{if(!P)return;const Q=b.current,U=z.current;if(!Q||!U)return;let Y=0;const It=()=>{const Pt=Q.getBoundingClientRect().width,xt=U.getBoundingClientRect().width,j=H.current,st=typeof j=="number"&&Math.abs(j-xt)<=.25;if(H.current=xt,$&&xt>0&&F>0){const A=xt/F;if(A>0&&Pt>0){const D=Math.max(Ho,Math.ceil(Pt/A)+1);if(D!==F){ct(D);return}}}if(xt>0&&h<=0){T(xt);return}st&&xt!==h?T(xt):!st&&h<=0&&(cancelAnimationFrame(Y),Y=requestAnimationFrame(It))},Mt=()=>{cancelAnimationFrame(Y),Y=requestAnimationFrame(It)};et.current=Mt,Mt();const At=new ResizeObserver(Mt);return At.observe(Q),At.observe(U),()=>{et.current=null,cancelAnimationFrame(Y),At.disconnect()}},[$,P,h,lt,F]),c.useLayoutEffect(()=>{const Q=M.current;if(!P||!Q)return;const U=h>0?h:0,Y=U>0&&E>0?U/E*1e3:0,It=`${Math.max(0,Y)/1e3}s`;Q.style.setProperty("--marquee-distance",`${U}px`),Q.style.setProperty("--marquee-duration",It)},[$,P,E,h]),c.useLayoutEffect(()=>{if(!P){N(0);return}if(h<=0){N(0);return}const Q=M.current;if(!Q)return;const U=()=>{const It=Q.getBoundingClientRect().height;N(It>0?It:0)};U();const Y=new ResizeObserver(U);return Y.observe(Q),()=>Y.disconnect()},[P,ft,g,n,u,S,x,h,y,W]);const it=()=>{V&&O(!0)},wt=()=>{V&&O(!1)},mt=c.useCallback(()=>{var Q;q.current=Math.min(nt,q.current+1),(Q=et.current)==null||Q.call(et)},[nt]),ot=c.useCallback((Q,U)=>{G(Y=>{const It=Y[Q]??U,Mt=(e??[]).filter(Pt=>Pt!==It);if(Mt.length===0)return Y;const At=Mt[Math.floor(Math.random()*Mt.length)];return{...Y,[Q]:At}})},[e]),B=(Q,U,Y,It)=>{const Mt=L&&m==="randomize"&&y.display==="Cover"?W[Y]??Q:Q,At=`max(${k(u)}, ${yu}px)`,Pt=`calc(-0.5 * (${At} + ${k(u)}))`;return o.jsxs("div",{className:`${l}-marquee-card`,"data-marquee-item-index":Y,onMouseEnter:L&&m==="randomize"&&y.display==="Cover"?()=>ot(Y,Q):void 0,children:[o.jsx(wu,{item:Mt,prefix:l,imageFit:y,imageMaxWidth:S,imageMaxHeight:x,imageHoverClass:w,isEditor:n,isFirstSet:It,scaled:k,onFirstSetImageDone:mt}),f&&o.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${l}-gap-control`,style:{position:"absolute",top:0,right:Pt,width:At,height:"100%"}})]},`${U}-${Y}`)};if(P){const Q=$?V&&at?"paused":"running":"paused";return o.jsxs("div",{ref:b,className:Xt(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Marquee",style:h>0&&_>0?{height:_}:void 0,children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),o.jsx("div",{ref:M,className:`${l}-marquee-track`,"data-direction":a,onMouseEnter:it,onMouseLeave:wt,style:{"--marquee-play-state":Q},children:Array.from({length:ft},(U,Y)=>o.jsx("div",{ref:Y===0?z:void 0,className:Xt(`${l}-marquee-row`,`${l}-marquee-set`),style:{gap:k(u),paddingRight:k(u)},"aria-hidden":Y>0,children:g.map((It,Mt)=>B(It,Y,Mt,Y===0))},`set-${Y}`))},"marquee-track")]})}return o.jsxs("div",{ref:b,className:`${l}-wrapper`,children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),o.jsx("div",{className:Xt(`${l}-marquee-row`,`${l}-marquee-static`),style:{gap:k(u),transform:"none"},"aria-label":"Marquee",children:e==null?void 0:e.map((Q,U)=>B(Q,0,U))},"marquee-static")]})},Tu=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1692
+ `}const fu=30,yu=20,Go=2,vu=2,xu=(e,t)=>Array.from({length:t},()=>e).flat(),bu=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Su=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>bu(i,e))},wu=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,imageHoverClass:l,isFirstSet:s,scaled:d,onFirstSetImageDone:a})=>{var b,W,K;const p=c.useRef(null);c.useLayoutEffect(()=>{if(!s)return;const h=p.current;h!=null&&h.complete&&(a==null||a())},[s,(b=e.image)==null?void 0:b.url,a]);const u=n.display==="Cover",S=n.ratioValue??"1:1",x=n.reversed??!1,[v,m]=S.split(":").map(Number),w=(x?m:v)/(x?v:m);let C=i,T=C/w;T>o&&(T=o,C=T*w);const P=d(C),M=d(T),F=((W=e.image)==null?void 0:W.url)&&r.jsx("img",{ref:p,src:e.image.url,alt:((K=e.image)==null?void 0:K.name)??"",style:u?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:d(i),objectFit:"contain"},onLoad:s?a:void 0,onError:s?a:void 0});return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:P}:{width:"fit-content",maxWidth:d(i),minWidth:0}},children:r.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...u?{width:P,height:M,overflow:"hidden"}:{width:"fit-content",maxWidth:d(i),height:d(o)}},children:F&&e.link?r.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Ye(`${t}-marquee-link`,!u&&`${t}-marquee-link-contain`),children:F}):F})})},Cu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=R.useScopedStyles(),s=c.useMemo(()=>hu(l),[l]),{speed:d,direction:a,pauseOnHover:p,gap:u,imageMaxWidth:S,imageMaxHeight:x,imageFit:v,hoverEffect:m}=e,y=!!o,$=!n||!!i,w=$&&m!=="off"&&m!=="randomize"?`${l}-image-hover-${m}`:void 0,C=n?!!i:!0,P=((t==null?void 0:t.length)??0)>0&&(C||!!n),M=Math.max(0,d)*fu,F=Q=>R.scalingValue(Q,n??!1),b=c.useRef(null),W=c.useRef(null),K=c.useRef(null),[h,L]=c.useState(0),[E,k]=c.useState(0),z=C&&p==="on",[le,O]=c.useState(!1),[_,q]=c.useState({}),G=c.useRef(_);G.current=_;const H=c.useRef(null),X=c.useRef(0),ne=c.useRef(null),se=c.useMemo(()=>(t??[]).map(Q=>{var U;return((U=Q.image)==null?void 0:U.url)??""}).join("\0"),[t]),[N,de]=c.useState(Go),g=c.useMemo(()=>{const Q=t??[];return!C||Q.length===0?Q:xu(Q,N)},[t,C,N]),ie=c.useMemo(()=>g.filter(Q=>{var U;return!!((U=Q.image)!=null&&U.url)}).length,[g]),fe=P?vu:1;c.useLayoutEffect(()=>{X.current=0,q({}),H.current=null,de(Go),L(0)},[se]),c.useEffect(()=>{if(!$||m!=="randomize")return;const Q=b.current;if(!Q)return;const U=ke=>{q(Fe=>{let xe=null;for(const j of ke)j in Fe&&(Su(Q,j)||(xe||(xe={...Fe}),delete xe[j]));return xe??Fe})},J=new IntersectionObserver(ke=>{const Fe=new Set;for(const xe of ke){const j=xe.target.dataset.marqueeItemIndex,ae=j!==void 0?Number(j):NaN;Number.isNaN(ae)||Fe.add(ae)}Fe.size>0&&U(Fe)},{root:Q,threshold:0});Object.keys(_).forEach(ke=>{const Fe=Number(ke);Q.querySelectorAll(`[data-marquee-item-index="${Fe}"]`).forEach(xe=>J.observe(xe))});let Me=0;const Ae=()=>{const ke=Object.keys(G.current);ke.length!==0&&(U(ke.map(Number)),Me=requestAnimationFrame(Ae))};return Object.keys(G.current).length>0&&(Me=requestAnimationFrame(Ae)),()=>{cancelAnimationFrame(Me),J.disconnect()}},[m,_,$]),c.useLayoutEffect(()=>{if(!P)return;const Q=b.current,U=K.current;if(!Q||!U)return;let J=0;const Me=()=>{const Fe=Q.getBoundingClientRect().width,xe=U.getBoundingClientRect().width,j=H.current,ae=typeof j=="number"&&Math.abs(j-xe)<=.25;if(H.current=xe,C&&xe>0&&N>0){const A=xe/N;if(A>0&&Fe>0){const D=Math.max(Go,Math.ceil(Fe/A)+1);if(D!==N){de(D);return}}}if(xe>0&&h<=0){L(xe);return}ae&&xe!==h?L(xe):!ae&&h<=0&&(cancelAnimationFrame(J),J=requestAnimationFrame(Me))},Ae=()=>{cancelAnimationFrame(J),J=requestAnimationFrame(Me)};ne.current=Ae,Ae();const ke=new ResizeObserver(Ae);return ke.observe(Q),ke.observe(U),()=>{ne.current=null,cancelAnimationFrame(J),ke.disconnect()}},[C,P,h,se,N]),c.useLayoutEffect(()=>{const Q=W.current;if(!P||!Q)return;const U=h>0?h:0,J=U>0&&M>0?U/M*1e3:0,Me=`${Math.max(0,J)/1e3}s`;Q.style.setProperty("--marquee-distance",`${U}px`),Q.style.setProperty("--marquee-duration",Me)},[C,P,M,h]),c.useLayoutEffect(()=>{if(!P){k(0);return}if(h<=0){k(0);return}const Q=W.current;if(!Q)return;const U=()=>{const Me=Q.getBoundingClientRect().height;k(Me>0?Me:0)};U();const J=new ResizeObserver(U);return J.observe(Q),()=>J.disconnect()},[P,fe,g,n,u,S,x,h,v,_]);const oe=()=>{z&&O(!0)},Ce=()=>{z&&O(!1)},me=c.useCallback(()=>{var Q;X.current=Math.min(ie,X.current+1),(Q=ne.current)==null||Q.call(ne)},[ie]),re=c.useCallback((Q,U)=>{q(J=>{const Me=J[Q]??U,Ae=(t??[]).filter(Fe=>Fe!==Me);if(Ae.length===0)return J;const ke=Ae[Math.floor(Math.random()*Ae.length)];return{...J,[Q]:ke}})},[t]),B=(Q,U,J,Me)=>{const Ae=$&&m==="randomize"&&v.display==="Cover"?_[J]??Q:Q,ke=`max(${F(u)}, ${yu}px)`,Fe=`calc(-0.5 * (${ke} + ${F(u)}))`;return r.jsxs("div",{className:`${l}-marquee-card`,"data-marquee-item-index":J,onMouseEnter:$&&m==="randomize"&&v.display==="Cover"?()=>re(J,Q):void 0,children:[r.jsx(wu,{item:Ae,prefix:l,imageFit:v,imageMaxWidth:S,imageMaxHeight:x,imageHoverClass:w,isEditor:n,isFirstSet:Me,scaled:F,onFirstSetImageDone:me}),y&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${l}-gap-control`,style:{position:"absolute",top:0,right:Fe,width:ke,height:"100%"}})]},`${U}-${J}`)};if(P){const Q=C?z&&le?"paused":"running":"paused";return r.jsxs("div",{ref:b,className:Ye(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Marquee",style:h>0&&E>0?{height:E}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),r.jsx("div",{ref:W,className:`${l}-marquee-track`,"data-direction":a,onMouseEnter:oe,onMouseLeave:Ce,style:{"--marquee-play-state":Q},children:Array.from({length:fe},(U,J)=>r.jsx("div",{ref:J===0?K:void 0,className:Ye(`${l}-marquee-row`,`${l}-marquee-set`),style:{gap:F(u),paddingRight:F(u)},"aria-hidden":J>0,children:g.map((Me,Ae)=>B(Me,J,Ae,J===0))},`set-${J}`))},"marquee-track")]})}return r.jsxs("div",{ref:b,className:`${l}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),r.jsx("div",{className:Ye(`${l}-marquee-row`,`${l}-marquee-static`),style:{gap:F(u),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((Q,U)=>B(Q,0,U))},"marquee-static")]})},Tu=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1693
1693
  import cn from 'classnames';
1694
1694
  import { CommonComponentProps } from '../props';
1695
1695
  import { scalingValue } from '../utils/scalingValue';
@@ -2320,24 +2320,24 @@ type MarqueeProps = {
2320
2320
  isPreviewMode?: boolean;
2321
2321
  isEditMode?: boolean;
2322
2322
  } & CommonComponentProps;
2323
- `,$u={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"Fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278}},displayRules:[{if:{name:"imageFit.display",value:"Cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:""},link:""}]}},Lu={element:Cu,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:400},m:{width:390,height:80}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:$u,sourceCode:Tu,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function pl(t){return`
2324
- .${t}-marquee-wrapper {
2323
+ `,$u={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"Fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278}},displayRules:[{if:{name:"imageFit.display",value:"Cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:""},link:""}]}},Lu={element:Cu,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:400},m:{width:390,height:80}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:$u,sourceCode:Tu,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function fl(e){return`
2324
+ .${e}-marquee-wrapper {
2325
2325
  overflow: hidden;
2326
2326
  width: 100%;
2327
2327
  height: auto;
2328
2328
  }
2329
2329
 
2330
- @keyframes ${t}-marquee-left {
2330
+ @keyframes ${e}-marquee-left {
2331
2331
  from { transform: translate3d(0, 0, 0); }
2332
2332
  to { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
2333
2333
  }
2334
2334
 
2335
- @keyframes ${t}-marquee-right {
2335
+ @keyframes ${e}-marquee-right {
2336
2336
  from { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
2337
2337
  to { transform: translate3d(0, 0, 0); }
2338
2338
  }
2339
2339
 
2340
- .${t}-marquee-track {
2340
+ .${e}-marquee-track {
2341
2341
  display: flex;
2342
2342
  flex-direction: row;
2343
2343
  width: max-content;
@@ -2353,28 +2353,28 @@ type MarqueeProps = {
2353
2353
  animation-play-state: var(--marquee-play-state, running);
2354
2354
  }
2355
2355
 
2356
- .${t}-marquee-track[data-direction="left"] {
2357
- animation-name: ${t}-marquee-left;
2356
+ .${e}-marquee-track[data-direction="left"] {
2357
+ animation-name: ${e}-marquee-left;
2358
2358
  }
2359
2359
 
2360
- .${t}-marquee-track[data-direction="right"] {
2361
- animation-name: ${t}-marquee-right;
2360
+ .${e}-marquee-track[data-direction="right"] {
2361
+ animation-name: ${e}-marquee-right;
2362
2362
  }
2363
2363
 
2364
- .${t}-marquee-set {
2364
+ .${e}-marquee-set {
2365
2365
  display: flex;
2366
2366
  flex-direction: row;
2367
2367
  flex: 0 0 auto;
2368
2368
  }
2369
2369
 
2370
- .${t}-wrapper {
2370
+ .${e}-wrapper {
2371
2371
  position: relative;
2372
2372
  width: 100%;
2373
2373
  height: 100%;
2374
2374
  order: 1;
2375
2375
  }
2376
2376
 
2377
- .${t}-cover {
2377
+ .${e}-cover {
2378
2378
  position: absolute;
2379
2379
  width: 100%;
2380
2380
  height: 100%;
@@ -2382,7 +2382,7 @@ type MarqueeProps = {
2382
2382
  left: 0;
2383
2383
  }
2384
2384
 
2385
- .${t}-elements-overlay {
2385
+ .${e}-elements-overlay {
2386
2386
  position: relative;
2387
2387
  inset: 0;
2388
2388
  display: flex;
@@ -2390,13 +2390,13 @@ type MarqueeProps = {
2390
2390
  pointer-events: none;
2391
2391
  }
2392
2392
 
2393
- .${t}-control {
2393
+ .${e}-control {
2394
2394
  position: relative;
2395
2395
  z-index: 2;
2396
2396
  width: 100%;
2397
2397
  }
2398
2398
 
2399
- .${t}-control::before {
2399
+ .${e}-control::before {
2400
2400
  content: "";
2401
2401
  position: absolute;
2402
2402
  top: 0;
@@ -2407,7 +2407,7 @@ type MarqueeProps = {
2407
2407
  pointer-events: auto;
2408
2408
  z-index: 10;
2409
2409
  }
2410
- `}const Iu=30,ml=2,Eu=({settings:t,content:e,isEditor:n,isPreviewMode:i,isEditMode:r})=>{const{prefix:l}=I.useScopedStyles(),{align:s,speed:d,direction:a,pauseOnHover:p,gap:u,cardWidth:S,corners:x,stroke:y,strokeColor:m,bgColor:f,padding:L,logoMarginTop:w,logoWidth:$,logoHeight:C,captionMarginTop:P}=t,E=!!r,k=((e==null?void 0:e.length)??0)>0,b=d>0&&(!n||i),M=k&&(b||n),z=Math.max(0,d)*Iu,h=A=>I.scalingValue(A,n??!1),T=c.useRef(null),_=c.useRef(null),N=c.useRef(null),[V,at]=c.useState(0),[O,W]=c.useState(0),[G,K]=c.useState(0),H=b&&p==="on",[q,et]=c.useState(!1),lt=c.useRef(null),[F,ct]=c.useState(0),[g,nt]=c.useState(0),ft=c.useRef(null),it=A=>{var X,J,gt,Ct,Dt;return{fontSettings:{fontFamily:(t==null?void 0:t[`${A}FontFamily`])??"Arial",fontWeight:((X=t==null?void 0:t[`${A}FontSettings`])==null?void 0:X.fontWeight)??400,fontStyle:((J=t==null?void 0:t[`${A}FontSettings`])==null?void 0:J.fontStyle)??"normal"},textAppearance:{textTransform:((gt=t==null?void 0:t[`${A}TextAppearance`])==null?void 0:gt.textTransform)??"none",textDecoration:((Ct=t==null?void 0:t[`${A}TextAppearance`])==null?void 0:Ct.textDecoration)??"none",fontVariant:((Dt=t==null?void 0:t[`${A}TextAppearance`])==null?void 0:Dt.fontVariant)??"normal"},letterSpacing:(t==null?void 0:t[`${A}LetterSpacing`])??0,wordSpacing:(t==null?void 0:t[`${A}WordSpacing`])??0,fontSize:(t==null?void 0:t[`${A}FontSize`])??.01,lineHeight:(t==null?void 0:t[`${A}LineHeight`])??.01,color:(t==null?void 0:t[`${A}Color`])??"#000000"}},wt=it("text"),mt=it("caption"),ot=c.useMemo(()=>((e==null?void 0:e.length)??0)>1&&(e??[]).some(A=>{var D,X;return(((D=A.text)==null?void 0:D.length)??0)>0||(((X=A.caption)==null?void 0:X.length)??0)>0}),[e]),B=c.useMemo(()=>!M||(e==null?void 0:e.length)===0?1:O<=0||V<=0?ml:Math.max(ml,Math.ceil(V/O)+1),[M,e==null?void 0:e.length,O,V]);c.useLayoutEffect(()=>{if(!M)return;const A=T.current,D=N.current;if(!A||!D)return;let X=0;const J=()=>{const Dt=A.getBoundingClientRect().width,Rt=D.getBoundingClientRect().width,$t=ft.current,Gt=typeof $t=="number"&&Math.abs($t-Rt)<=.25;if(ft.current=Rt,at(Dt),typeof Rt=="number"&&Rt>0&&O<=0){W(Rt);return}Gt&&Rt!==O?W(Rt):!Gt&&O<=0&&(cancelAnimationFrame(X),X=requestAnimationFrame(J))},gt=()=>{cancelAnimationFrame(X),X=requestAnimationFrame(J)};gt();const Ct=new ResizeObserver(gt);return Ct.observe(A),Ct.observe(D),()=>{cancelAnimationFrame(X),Ct.disconnect()}},[b,M,O]),c.useLayoutEffect(()=>{const A=_.current;if(!M||!A)return;const D=O>0?O:0,X=D>0&&z>0?D/z*1e3:0,J=`${Math.max(0,X)/1e3}s`;A.style.setProperty("--marquee-distance",`${D}px`),A.style.setProperty("--marquee-duration",J)},[b,M,z,O]),c.useLayoutEffect(()=>{if(!M){K(0);return}const A=N.current,D=_.current;if(!A||!D)return;const X=()=>{let gt=0;for(let Ct=0;Ct<A.children.length;Ct++){const Rt=A.children[Ct].firstElementChild;Rt&&(gt=Math.max(gt,Rt.offsetHeight))}gt<=0&&(gt=D.offsetHeight),K(gt>0?gt:0)};X();const J=new ResizeObserver(X);return J.observe(A),J.observe(D),()=>{J.disconnect()}},[M,B,e,n,u,S,L,y,x,$,C,F,g]);const Q=()=>{H&&et(!0)},U=()=>{H&&et(!1)},Y=c.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),It=c.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]),Mt=c.useCallback((A,D,X,J)=>o.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Y,width:"100%"},children:[o.jsx("div",{"data-controls":E?J==null?void 0:J.controlsName:void 0,"data-controls-axis":E?"y":void 0,className:E?`${l}-control`:void 0,style:{height:h((J==null?void 0:J.marginTop)??0)}}),o.jsx("div",{...J!=null&&J.dataMeasureKind?{"data-testimonial-measure":J.dataMeasureKind}:{},style:{...We(A,n),textAlign:It,pointerEvents:"auto",...typeof(J==null?void 0:J.minHeightPx)=="number"&&J.minHeightPx>0?{minHeight:J.minHeightPx}:{}},children:o.jsx(wi,{content:D})})]},X),[Y,It,n,E,l,h]),At=c.useCallback((A,D,X)=>{var J,gt,Ct;return o.jsxs("div",{style:{padding:`${h(L.top)} ${h(L.right)} ${h(L.bottom)} ${h(L.left)}`,width:h(S+y*2),height:"100%",borderRadius:h(x),border:`${h(y)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[o.jsx("div",{className:`${l}-cover`,style:{background:f}}),o.jsxs("div",{className:`${l}-elements-overlay`,style:{alignItems:Y,textAlign:It},children:[A.text&&Mt(wt,A.text,"text",X!=null&&X.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(X==null?void 0:X.textMinHeightPx)=="number"&&X.textMinHeightPx>0?{minHeightPx:X.textMinHeightPx}:void 0),o.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Y,width:"100%"},children:[o.jsx("div",{"data-controls":E&&!(X!=null&&X.dataMeasureAttrs)?"logoMarginTop":void 0,className:E&&!(X!=null&&X.dataMeasureAttrs)?`${l}-control`:void 0,style:{height:h(w)}}),o.jsx("div",{style:{width:h($),height:h(C)},children:((J=A.logo)==null?void 0:J.url)&&o.jsx("img",{src:A.logo.url,alt:((gt=A.logo)==null?void 0:gt.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Ct=A.logo)==null?void 0:Ct.objectFit)||"contain"}})})]}),A.caption&&Mt(mt,A.caption,"caption",{...X!=null&&X.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:P,...X!=null&&X.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(X==null?void 0:X.captionMinHeightPx)=="number"&&X.captionMinHeightPx>0?{minHeightPx:X.captionMinHeightPx}:{}})]})]},D)},[f,P,mt,S,x,C,w,$,Y,It,L.bottom,L.left,L.right,L.top,Mt,y,m,wt,n,E,l]),Pt=c.useCallback(A=>{ct(A.maxTextPx),nt(A.maxCaptionPx)},[]);c.useLayoutEffect(()=>{if(!ot){Pt({maxTextPx:0,maxCaptionPx:0});return}const A=lt.current;if(!A)return;const D=()=>{I.readTestimonialTextMeasure(A,Pt)};D();const X=new ResizeObserver(D);return X.observe(A),()=>{X.disconnect()}},[ot,Pt,e,At]);const xt=ot?{textMinHeightPx:F,captionMinHeightPx:g}:void 0,j=ot?o.jsx("div",{ref:lt,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(e??[]).map((A,D)=>At(A,`measure-${D}`,{dataMeasureAttrs:!0}))}):null,st=(A,D)=>o.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[At(A,`card-${D}`,xt),E&&o.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${h(u)})`,width:h(u),height:"100%",pointerEvents:"auto",zIndex:2}})]},D);if(M){const A=b?H&&q?"paused":"running":"paused";return o.jsxs("div",{ref:T,className:Xt(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...G>0?{height:G}:{}},children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:pl(l)}}),j,o.jsx("div",{ref:_,className:`${l}-marquee-track`,"data-direction":a,onMouseEnter:Q,onMouseLeave:U,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":A},children:Array.from({length:B},(D,X)=>o.jsx("div",{ref:X===0?N:void 0,className:`${l}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:h(u),paddingRight:h(u)},"aria-hidden":X>0,children:e==null?void 0:e.map((J,gt)=>st(J,`${X}-${gt}`))},`set-${X}`))})]})}return o.jsxs("div",{className:`${l}-wrapper`,children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:pl(l)}}),j,o.jsx("div",{style:{gap:h(u),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:e==null?void 0:e.map((A,D)=>st(A,D))})]})},Ru=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2410
+ `}const Eu=30,yl=2,Iu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=R.useScopedStyles(),{align:s,speed:d,direction:a,pauseOnHover:p,gap:u,cardWidth:S,corners:x,stroke:v,strokeColor:m,bgColor:y,padding:$,logoMarginTop:w,logoWidth:C,logoHeight:T,captionMarginTop:P}=e,M=!!o,F=((t==null?void 0:t.length)??0)>0,b=d>0&&(!n||i),W=F&&(b||n),K=Math.max(0,d)*Eu,h=A=>R.scalingValue(A,n??!1),L=c.useRef(null),E=c.useRef(null),k=c.useRef(null),[z,le]=c.useState(0),[O,_]=c.useState(0),[q,G]=c.useState(0),H=b&&p==="on",[X,ne]=c.useState(!1),se=c.useRef(null),[N,de]=c.useState(0),[g,ie]=c.useState(0),fe=c.useRef(null),oe=A=>{var Y,Z,ge,Te,je;return{fontSettings:{fontFamily:(e==null?void 0:e[`${A}FontFamily`])??"Arial",fontWeight:((Y=e==null?void 0:e[`${A}FontSettings`])==null?void 0:Y.fontWeight)??400,fontStyle:((Z=e==null?void 0:e[`${A}FontSettings`])==null?void 0:Z.fontStyle)??"normal"},textAppearance:{textTransform:((ge=e==null?void 0:e[`${A}TextAppearance`])==null?void 0:ge.textTransform)??"none",textDecoration:((Te=e==null?void 0:e[`${A}TextAppearance`])==null?void 0:Te.textDecoration)??"none",fontVariant:((je=e==null?void 0:e[`${A}TextAppearance`])==null?void 0:je.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${A}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${A}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${A}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${A}LineHeight`])??.01,color:(e==null?void 0:e[`${A}Color`])??"#000000"}},Ce=oe("text"),me=oe("caption"),re=c.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(A=>{var D,Y;return(((D=A.text)==null?void 0:D.length)??0)>0||(((Y=A.caption)==null?void 0:Y.length)??0)>0}),[t]),B=c.useMemo(()=>!W||(t==null?void 0:t.length)===0?1:O<=0||z<=0?yl:Math.max(yl,Math.ceil(z/O)+1),[W,t==null?void 0:t.length,O,z]);c.useLayoutEffect(()=>{if(!W)return;const A=L.current,D=k.current;if(!A||!D)return;let Y=0;const Z=()=>{const je=A.getBoundingClientRect().width,_e=D.getBoundingClientRect().width,Le=fe.current,Ge=typeof Le=="number"&&Math.abs(Le-_e)<=.25;if(fe.current=_e,le(je),typeof _e=="number"&&_e>0&&O<=0){_(_e);return}Ge&&_e!==O?_(_e):!Ge&&O<=0&&(cancelAnimationFrame(Y),Y=requestAnimationFrame(Z))},ge=()=>{cancelAnimationFrame(Y),Y=requestAnimationFrame(Z)};ge();const Te=new ResizeObserver(ge);return Te.observe(A),Te.observe(D),()=>{cancelAnimationFrame(Y),Te.disconnect()}},[b,W,O]),c.useLayoutEffect(()=>{const A=E.current;if(!W||!A)return;const D=O>0?O:0,Y=D>0&&K>0?D/K*1e3:0,Z=`${Math.max(0,Y)/1e3}s`;A.style.setProperty("--marquee-distance",`${D}px`),A.style.setProperty("--marquee-duration",Z)},[b,W,K,O]),c.useLayoutEffect(()=>{if(!W){G(0);return}const A=k.current,D=E.current;if(!A||!D)return;const Y=()=>{let ge=0;for(let Te=0;Te<A.children.length;Te++){const _e=A.children[Te].firstElementChild;_e&&(ge=Math.max(ge,_e.offsetHeight))}ge<=0&&(ge=D.offsetHeight),G(ge>0?ge:0)};Y();const Z=new ResizeObserver(Y);return Z.observe(A),Z.observe(D),()=>{Z.disconnect()}},[W,B,t,n,u,S,$,v,x,C,T,N,g]);const Q=()=>{H&&ne(!0)},U=()=>{H&&ne(!1)},J=c.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),Me=c.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]),Ae=c.useCallback((A,D,Y,Z)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:J,width:"100%"},children:[r.jsx("div",{"data-controls":M?Z==null?void 0:Z.controlsName:void 0,"data-controls-axis":M?"y":void 0,className:M?`${l}-control`:void 0,style:{height:h((Z==null?void 0:Z.marginTop)??0)}}),r.jsx("div",{...Z!=null&&Z.dataMeasureKind?{"data-testimonial-measure":Z.dataMeasureKind}:{},style:{...Pt(A,n),textAlign:Me,pointerEvents:"auto",...typeof(Z==null?void 0:Z.minHeightPx)=="number"&&Z.minHeightPx>0?{minHeight:Z.minHeightPx}:{}},children:r.jsx(_i,{content:D})})]},Y),[J,Me,n,M,l,h]),ke=c.useCallback((A,D,Y)=>{var Z,ge,Te;return r.jsxs("div",{style:{padding:`${h($.top)} ${h($.right)} ${h($.bottom)} ${h($.left)}`,width:h(S+v*2),height:"100%",borderRadius:h(x),border:`${h(v)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${l}-cover`,style:{background:y}}),r.jsxs("div",{className:`${l}-elements-overlay`,style:{alignItems:J,textAlign:Me},children:[A.text&&Ae(Ce,A.text,"text",Y!=null&&Y.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(Y==null?void 0:Y.textMinHeightPx)=="number"&&Y.textMinHeightPx>0?{minHeightPx:Y.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:J,width:"100%"},children:[r.jsx("div",{"data-controls":M&&!(Y!=null&&Y.dataMeasureAttrs)?"logoMarginTop":void 0,className:M&&!(Y!=null&&Y.dataMeasureAttrs)?`${l}-control`:void 0,style:{height:h(w)}}),r.jsx("div",{style:{width:h(C),height:h(T)},children:((Z=A.logo)==null?void 0:Z.url)&&r.jsx("img",{src:A.logo.url,alt:((ge=A.logo)==null?void 0:ge.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Te=A.logo)==null?void 0:Te.objectFit)||"contain"}})})]}),A.caption&&Ae(me,A.caption,"caption",{...Y!=null&&Y.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:P,...Y!=null&&Y.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(Y==null?void 0:Y.captionMinHeightPx)=="number"&&Y.captionMinHeightPx>0?{minHeightPx:Y.captionMinHeightPx}:{}})]})]},D)},[y,P,me,S,x,T,w,C,J,Me,$.bottom,$.left,$.right,$.top,Ae,v,m,Ce,n,M,l]),Fe=c.useCallback(A=>{de(A.maxTextPx),ie(A.maxCaptionPx)},[]);c.useLayoutEffect(()=>{if(!re){Fe({maxTextPx:0,maxCaptionPx:0});return}const A=se.current;if(!A)return;const D=()=>{R.readTestimonialTextMeasure(A,Fe)};D();const Y=new ResizeObserver(D);return Y.observe(A),()=>{Y.disconnect()}},[re,Fe,t,ke]);const xe=re?{textMinHeightPx:N,captionMinHeightPx:g}:void 0,j=re?r.jsx("div",{ref:se,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((A,D)=>ke(A,`measure-${D}`,{dataMeasureAttrs:!0}))}):null,ae=(A,D)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[ke(A,`card-${D}`,xe),M&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${h(u)})`,width:h(u),height:"100%",pointerEvents:"auto",zIndex:2}})]},D);if(W){const A=b?H&&X?"paused":"running":"paused";return r.jsxs("div",{ref:L,className:Ye(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...q>0?{height:q}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:fl(l)}}),j,r.jsx("div",{ref:E,className:`${l}-marquee-track`,"data-direction":a,onMouseEnter:Q,onMouseLeave:U,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":A},children:Array.from({length:B},(D,Y)=>r.jsx("div",{ref:Y===0?k:void 0,className:`${l}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:h(u),paddingRight:h(u)},"aria-hidden":Y>0,children:t==null?void 0:t.map((Z,ge)=>ae(Z,`${Y}-${ge}`))},`set-${Y}`))})]})}return r.jsxs("div",{className:`${l}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:fl(l)}}),j,r.jsx("div",{style:{gap:h(u),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((A,D)=>ae(A,D))})]})},Ru=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2411
2411
  import cn from 'classnames';
2412
2412
  import { CommonComponentProps } from '../props';
2413
2413
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3022,8 +3022,8 @@ type TestimonialsSettings = {
3022
3022
  logoHeight: number;
3023
3023
  captionMarginTop: number;
3024
3024
  };
3025
- `,gl={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Mu={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...gl.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:{...gl.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},_u={element:Eu,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:Mu,sourceCode:Ru,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Wu(t){return`
3026
- .${t}-container {
3025
+ `,vl={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Mu={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...vl.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:{...vl.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Wu={element:Iu,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:Mu,sourceCode:Ru,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function _u(e){return`
3026
+ .${e}-container {
3027
3027
  position: relative;
3028
3028
  overflow-x: clip;
3029
3029
  display: flex;
@@ -3032,7 +3032,7 @@ type TestimonialsSettings = {
3032
3032
  align-items: center;
3033
3033
  }
3034
3034
 
3035
- .${t}-wrapper {
3035
+ .${e}-wrapper {
3036
3036
  position: relative;
3037
3037
  width: 100%;
3038
3038
  order: 1;
@@ -3044,42 +3044,42 @@ type TestimonialsSettings = {
3044
3044
  height: auto;
3045
3045
  }
3046
3046
 
3047
- .${t}-fade-stack {
3047
+ .${e}-fade-stack {
3048
3048
  position: relative;
3049
3049
  width: 100%;
3050
3050
  }
3051
3051
 
3052
- .${t}-fade-item-prev {
3052
+ .${e}-fade-item-prev {
3053
3053
  position: absolute;
3054
3054
  inset: 0;
3055
3055
  width: 100%;
3056
3056
  height: 100%;
3057
3057
  }
3058
3058
 
3059
- .${t}-fade-item-current {
3059
+ .${e}-fade-item-current {
3060
3060
  position: relative;
3061
3061
  width: 100%;
3062
3062
  }
3063
3063
 
3064
- @keyframes ${t}-testimonial-fade-in {
3064
+ @keyframes ${e}-testimonial-fade-in {
3065
3065
  from { opacity: 0; }
3066
3066
  to { opacity: 1; }
3067
3067
  }
3068
3068
 
3069
- @keyframes ${t}-testimonial-fade-out {
3069
+ @keyframes ${e}-testimonial-fade-out {
3070
3070
  from { opacity: 1; }
3071
3071
  to { opacity: 0; }
3072
3072
  }
3073
3073
 
3074
- .${t}-fade-in {
3075
- animation: ${t}-testimonial-fade-in 300ms ease-in forwards;
3074
+ .${e}-fade-in {
3075
+ animation: ${e}-testimonial-fade-in 300ms ease-in forwards;
3076
3076
  }
3077
3077
 
3078
- .${t}-fade-out {
3079
- animation: ${t}-testimonial-fade-out 300ms ease-in forwards;
3078
+ .${e}-fade-out {
3079
+ animation: ${e}-testimonial-fade-out 300ms ease-in forwards;
3080
3080
  }
3081
3081
 
3082
- .${t}-controls {
3082
+ .${e}-controls {
3083
3083
  position: absolute;
3084
3084
  inset: 0;
3085
3085
  pointer-events: none;
@@ -3089,7 +3089,7 @@ type TestimonialsSettings = {
3089
3089
  justify-content: space-between;
3090
3090
  }
3091
3091
 
3092
- .${t}-arrow {
3092
+ .${e}-arrow {
3093
3093
  pointer-events: auto;
3094
3094
  position: relative;
3095
3095
  display: flex;
@@ -3101,11 +3101,11 @@ type TestimonialsSettings = {
3101
3101
  padding: 0;
3102
3102
  }
3103
3103
 
3104
- .${t}-next-arrow {
3104
+ .${e}-next-arrow {
3105
3105
  left: unset;
3106
3106
  }
3107
3107
 
3108
- .${t}-arrow-inner {
3108
+ .${e}-arrow-inner {
3109
3109
  all: unset;
3110
3110
  cursor: pointer;
3111
3111
  width: 100%;
@@ -3113,25 +3113,25 @@ type TestimonialsSettings = {
3113
3113
  pointer-events: auto;
3114
3114
  }
3115
3115
 
3116
- .${t}-arrow-img {
3116
+ .${e}-arrow-img {
3117
3117
  position: absolute;
3118
3118
  top: 50%;
3119
3119
  left: 50%;
3120
3120
  transform: translate(-50%, -50%);
3121
3121
  }
3122
3122
 
3123
- .${t}-mirror {
3123
+ .${e}-mirror {
3124
3124
  transform: translate(-50%, -50%) scaleX(-1) !important;
3125
3125
  }
3126
3126
 
3127
- .${t}-control {
3127
+ .${e}-control {
3128
3128
  position: relative;
3129
3129
  z-index: 2;
3130
3130
  pointer-events: auto;
3131
3131
  width: 100%;
3132
3132
  }
3133
3133
 
3134
- .${t}-control::before {
3134
+ .${e}-control::before {
3135
3135
  content: "";
3136
3136
  position: absolute;
3137
3137
  top: 0;
@@ -3141,12 +3141,12 @@ type TestimonialsSettings = {
3141
3141
  pointer-events: auto;
3142
3142
  z-index: 10;
3143
3143
  }
3144
- .${t}-icon {
3144
+ .${e}-icon {
3145
3145
  pointer-events: auto;
3146
3146
  width: 100%;
3147
3147
  height: 100%;
3148
3148
  }
3149
- `}const Au=3e3,Pu=({settings:t,content:e,isEditor:n,isPreviewMode:i,isEditMode:r})=>{const{prefix:l}=I.useScopedStyles(),s=e||[],{speed:d,align:a,width:p,imageMarginTop:u,textMarginTop:S,captionMarginTop:x,imageWidth:y,imageHeight:m,controlsWidth:f,controlsColor:L,controlsHoverColor:w}=t,$=d>0&&(!n||!!i),[C,P]=c.useState(0),[E,k]=c.useState(null),[b,M]=c.useState(!1),z=c.useRef(null),h=c.useMemo(()=>{switch(a){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[a]),T=c.useMemo(()=>{switch(a){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[a]);c.useEffect(()=>{P(0),k(null),M(!1)},[s.length]);const _=s[C],N=E===null?null:s[E],V=mt=>{var B,Q,U,Y,It;return{fontSettings:{fontFamily:(t==null?void 0:t[`${mt}FontFamily`])??"Arial",fontWeight:((B=t==null?void 0:t[`${mt}FontSettings`])==null?void 0:B.fontWeight)??400,fontStyle:((Q=t==null?void 0:t[`${mt}FontSettings`])==null?void 0:Q.fontStyle)??"normal"},textAppearance:{textTransform:((U=t==null?void 0:t[`${mt}TextAppearance`])==null?void 0:U.textTransform)??"none",textDecoration:((Y=t==null?void 0:t[`${mt}TextAppearance`])==null?void 0:Y.textDecoration)??"none",fontVariant:((It=t==null?void 0:t[`${mt}TextAppearance`])==null?void 0:It.fontVariant)??"normal"},fontSize:(t==null?void 0:t[`${mt}FontSize`])??.01,lineHeight:(t==null?void 0:t[`${mt}LineHeight`])??.01,letterSpacing:(t==null?void 0:t[`${mt}LetterSpacing`])??0,wordSpacing:(t==null?void 0:t[`${mt}WordSpacing`])??0,color:(t==null?void 0:t[`${mt}Color`])??"#000000"}},at=V("text"),O=V("caption"),W=s.length>1&&s.some(mt=>{var ot,B;return(((ot=mt.text)==null?void 0:ot.length)??0)>0||(((B=mt.caption)==null?void 0:B.length)??0)>0}),G=c.useRef(null),[K,H]=c.useState(0),[q,et]=c.useState(0),lt=t.controls??{mode:"Off",icon:null},F=s.length>1,ct=c.useCallback((mt,ot)=>!F||ot===mt?mt:(z.current&&window.clearTimeout(z.current),k(mt),M(!0),z.current=window.setTimeout(()=>{k(null),M(!1),z.current=null},300),ot),[F]),g=c.useCallback(()=>{F&&P(mt=>ct(mt,(mt-1+s.length)%s.length))},[F,ct,s.length]),nt=c.useCallback(()=>{F&&P(mt=>ct(mt,(mt+1)%s.length))},[F,ct,s.length]);c.useEffect(()=>{if(!$||!F)return;const mt=Math.max(300,Au/d),ot=window.setInterval(()=>{P(B=>ct(B,(B+1)%s.length))},mt);return()=>{window.clearInterval(ot)}},[$,F,ct,s.length,d]),c.useEffect(()=>()=>{z.current&&window.clearTimeout(z.current)},[]);const ft=(mt,ot)=>{var It,Mt,At,Pt;const B=ot==null?void 0:ot.textMinHeightPx,Q=ot==null?void 0:ot.captionMinHeightPx,U=ot==null?void 0:ot.dataMeasureAttrs,Y=r&&!(ot!=null&&ot.dataMeasureAttrs)&&!(ot!=null&&ot.hideControls);return o.jsxs(o.Fragment,{children:[mt.text&&o.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[o.jsx("div",{"data-controls":Y?"textMarginTop":void 0,className:Y?`${l}-control`:void 0,style:{height:I.scalingValue(S??0,n??!1)}}),o.jsx("div",{...U&&{"data-testimonial-measure":"text"},style:{...We(at,n),...B&&B>0?{minHeight:B}:{},textAlign:T,pointerEvents:"auto"},children:o.jsx(wi,{content:mt.text})})]}),o.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[o.jsx("div",{"data-controls":Y?"imageMarginTop":void 0,className:Y?`${l}-control`:void 0,style:{height:I.scalingValue(u??0,n??!1)}}),o.jsx("div",{style:{width:I.scalingValue(y??0,n??!1),height:I.scalingValue(m??0,n??!1)},children:((It=mt.image)==null?void 0:It.url)&&o.jsx("img",{src:(Mt=mt.image)==null?void 0:Mt.url,alt:((At=mt.image)==null?void 0:At.name)??"",className:`${l}-icon`,style:{objectFit:((Pt=mt.image)==null?void 0:Pt.objectFit)||"contain"}})})]}),mt.caption&&o.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[o.jsx("div",{"data-controls":Y?"captionMarginTop":void 0,className:Y?`${l}-control`:void 0,style:{height:I.scalingValue(x??0,n??!1)}}),o.jsx("div",{...U?{"data-testimonial-measure":"caption"}:{},style:{...We(O,n),...Q&&Q>0?{minHeight:Q}:{},textAlign:T,pointerEvents:"auto"},children:o.jsx(wi,{content:mt.caption})})]})]})},it=c.useCallback(mt=>{H(mt.maxTextPx),et(mt.maxCaptionPx)},[]);if(c.useLayoutEffect(()=>{if(!W){it({maxTextPx:0,maxCaptionPx:0});return}const mt=G.current;if(!mt)return;const ot=()=>{I.readTestimonialTextMeasure(mt,it)};ot();const B=new ResizeObserver(ot);return B.observe(mt),()=>{B.disconnect()}},[W,it,e]),!_)return o.jsx(o.Fragment,{});const wt=W?{textMinHeightPx:K,captionMinHeightPx:q}:void 0;return o.jsx(o.Fragment,{children:o.jsxs("div",{className:`${l}-container`,children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:Wu(l)}}),o.jsxs("div",{className:`${l}-wrapper`,style:{width:I.scalingValue(p??0,n??!1),alignItems:h},children:[W&&o.jsx("div",{ref:G,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((mt,ot)=>o.jsx("div",{style:{width:"100%"},children:ft(mt,{dataMeasureAttrs:!0})},ot))}),o.jsxs("div",{className:`${l}-fade-stack`,children:[N&&b&&o.jsx("div",{className:Xt(`${l}-fade-item-prev`,`${l}-fade-out`),children:ft(N,{...wt,hideControls:!0})}),o.jsx("div",{className:Xt(`${l}-fade-item-current`,b?`${l}-fade-in`:void 0),children:ft(_,wt)})]})]}),lt.mode==="On"&&o.jsxs("div",{className:`${l}-controls`,children:[o.jsx("div",{className:`${l}-arrow`,style:{width:I.scalingValue(f??.02,n??!1),height:I.scalingValue(f??.02,n??!1),"--arrow-hover-color":w},children:o.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:g,disabled:!F,"aria-label":"Previous testimonial",children:lt.icon&&o.jsx(nn,{url:lt.icon,fill:L,hoverFill:w,className:Xt(`${l}-arrow-img`,`${l}-mirror`)})})}),o.jsx("div",{className:Xt(`${l}-arrow`,`${l}-next-arrow`),style:{width:I.scalingValue(f??.02,n??!1),height:I.scalingValue(f??.02,n??!1),"--arrow-hover-color":w},children:o.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:nt,disabled:!F,"aria-label":"Next testimonial",children:lt.icon&&o.jsx(nn,{url:lt.icon,fill:L,hoverFill:w,className:`${l}-arrow-img`})})})]})]})})},ku=`import cn from 'classnames';
3149
+ `}const Au=3e3,Pu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:l}=R.useScopedStyles(),s=t||[],{speed:d,align:a,width:p,imageMarginTop:u,textMarginTop:S,captionMarginTop:x,imageWidth:v,imageHeight:m,controlsWidth:y,controlsColor:$,controlsHoverColor:w}=e,C=d>0&&(!n||!!i),[T,P]=c.useState(0),[M,F]=c.useState(null),[b,W]=c.useState(!1),K=c.useRef(null),h=c.useMemo(()=>{switch(a){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[a]),L=c.useMemo(()=>{switch(a){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[a]);c.useEffect(()=>{P(0),F(null),W(!1)},[s.length]);const E=s[T],k=M===null?null:s[M],z=me=>{var B,Q,U,J,Me;return{fontSettings:{fontFamily:(e==null?void 0:e[`${me}FontFamily`])??"Arial",fontWeight:((B=e==null?void 0:e[`${me}FontSettings`])==null?void 0:B.fontWeight)??400,fontStyle:((Q=e==null?void 0:e[`${me}FontSettings`])==null?void 0:Q.fontStyle)??"normal"},textAppearance:{textTransform:((U=e==null?void 0:e[`${me}TextAppearance`])==null?void 0:U.textTransform)??"none",textDecoration:((J=e==null?void 0:e[`${me}TextAppearance`])==null?void 0:J.textDecoration)??"none",fontVariant:((Me=e==null?void 0:e[`${me}TextAppearance`])==null?void 0:Me.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${me}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${me}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${me}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${me}WordSpacing`])??0,color:(e==null?void 0:e[`${me}Color`])??"#000000"}},le=z("text"),O=z("caption"),_=s.length>1&&s.some(me=>{var re,B;return(((re=me.text)==null?void 0:re.length)??0)>0||(((B=me.caption)==null?void 0:B.length)??0)>0}),q=c.useRef(null),[G,H]=c.useState(0),[X,ne]=c.useState(0),se=e.controls??{mode:"Off",icon:null},N=s.length>1,de=c.useCallback((me,re)=>!N||re===me?me:(K.current&&window.clearTimeout(K.current),F(me),W(!0),K.current=window.setTimeout(()=>{F(null),W(!1),K.current=null},300),re),[N]),g=c.useCallback(()=>{N&&P(me=>de(me,(me-1+s.length)%s.length))},[N,de,s.length]),ie=c.useCallback(()=>{N&&P(me=>de(me,(me+1)%s.length))},[N,de,s.length]);c.useEffect(()=>{if(!C||!N)return;const me=Math.max(300,Au/d),re=window.setInterval(()=>{P(B=>de(B,(B+1)%s.length))},me);return()=>{window.clearInterval(re)}},[C,N,de,s.length,d]),c.useEffect(()=>()=>{K.current&&window.clearTimeout(K.current)},[]);const fe=(me,re)=>{var Me,Ae,ke,Fe;const B=re==null?void 0:re.textMinHeightPx,Q=re==null?void 0:re.captionMinHeightPx,U=re==null?void 0:re.dataMeasureAttrs,J=o&&!(re!=null&&re.dataMeasureAttrs)&&!(re!=null&&re.hideControls);return r.jsxs(r.Fragment,{children:[me.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[r.jsx("div",{"data-controls":J?"textMarginTop":void 0,className:J?`${l}-control`:void 0,style:{height:R.scalingValue(S??0,n??!1)}}),r.jsx("div",{...U&&{"data-testimonial-measure":"text"},style:{...Pt(le,n),...B&&B>0?{minHeight:B}:{},textAlign:L,pointerEvents:"auto"},children:r.jsx(_i,{content:me.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[r.jsx("div",{"data-controls":J?"imageMarginTop":void 0,className:J?`${l}-control`:void 0,style:{height:R.scalingValue(u??0,n??!1)}}),r.jsx("div",{style:{width:R.scalingValue(v??0,n??!1),height:R.scalingValue(m??0,n??!1)},children:((Me=me.image)==null?void 0:Me.url)&&r.jsx("img",{src:(Ae=me.image)==null?void 0:Ae.url,alt:((ke=me.image)==null?void 0:ke.name)??"",className:`${l}-icon`,style:{objectFit:((Fe=me.image)==null?void 0:Fe.objectFit)||"contain"}})})]}),me.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[r.jsx("div",{"data-controls":J?"captionMarginTop":void 0,className:J?`${l}-control`:void 0,style:{height:R.scalingValue(x??0,n??!1)}}),r.jsx("div",{...U?{"data-testimonial-measure":"caption"}:{},style:{...Pt(O,n),...Q&&Q>0?{minHeight:Q}:{},textAlign:L,pointerEvents:"auto"},children:r.jsx(_i,{content:me.caption})})]})]})},oe=c.useCallback(me=>{H(me.maxTextPx),ne(me.maxCaptionPx)},[]);if(c.useLayoutEffect(()=>{if(!_){oe({maxTextPx:0,maxCaptionPx:0});return}const me=q.current;if(!me)return;const re=()=>{R.readTestimonialTextMeasure(me,oe)};re();const B=new ResizeObserver(re);return B.observe(me),()=>{B.disconnect()}},[_,oe,t]),!E)return r.jsx(r.Fragment,{});const Ce=_?{textMinHeightPx:G,captionMinHeightPx:X}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${l}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:_u(l)}}),r.jsxs("div",{className:`${l}-wrapper`,style:{width:R.scalingValue(p??0,n??!1),alignItems:h},children:[_&&r.jsx("div",{ref:q,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((me,re)=>r.jsx("div",{style:{width:"100%"},children:fe(me,{dataMeasureAttrs:!0})},re))}),r.jsxs("div",{className:`${l}-fade-stack`,children:[k&&b&&r.jsx("div",{className:Ye(`${l}-fade-item-prev`,`${l}-fade-out`),children:fe(k,{...Ce,hideControls:!0})}),r.jsx("div",{className:Ye(`${l}-fade-item-current`,b?`${l}-fade-in`:void 0),children:fe(E,Ce)})]})]}),se.mode==="On"&&r.jsxs("div",{className:`${l}-controls`,children:[r.jsx("div",{className:`${l}-arrow`,style:{width:R.scalingValue(y??.02,n??!1),height:R.scalingValue(y??.02,n??!1),"--arrow-hover-color":w},children:r.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:g,disabled:!N,"aria-label":"Previous testimonial",children:se.icon&&r.jsx(an,{url:se.icon,fill:$,hoverFill:w,className:Ye(`${l}-arrow-img`,`${l}-mirror`)})})}),r.jsx("div",{className:Ye(`${l}-arrow`,`${l}-next-arrow`),style:{width:R.scalingValue(y??.02,n??!1),height:R.scalingValue(y??.02,n??!1),"--arrow-hover-color":w},children:r.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:ie,disabled:!N,"aria-label":"Next testimonial",children:se.icon&&r.jsx(an,{url:se.icon,fill:$,hoverFill:w,className:`${l}-arrow-img`})})})]})]})})},ku=`import cn from 'classnames';
3150
3150
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
3151
3151
  import { CommonComponentProps } from '../props';
3152
3152
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3642,199 +3642,199 @@ type TestimonialsSettings = {
3642
3642
  icon?: string | null;
3643
3643
  };
3644
3644
  };
3645
- `,Fu="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>'),hl={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Nu={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...hl.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...hl.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{controls:{mode:"On",icon:Fu},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Hu={element:Pu,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:Nu,sourceCode:ku,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Bu(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function fl(t){return((t==null?void 0:t.trim().length)??0)>0}function Bo(t,e,n,i){return e!==void 0&&e<(t??.01)?`${n} ${i}`:n}function Oo(t,e,n,i){const r=t??.01;return e===void 0||e>=r?{}:{[`--${n}-title-leading-gap`]:I.scalingValue((r-e)/2,i)}}function Ou(t){return`
3646
- .${t}-wrapper {
3645
+ `,Fu="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>'),xl={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Nu={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...xl.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...xl.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{controls:{mode:"On",icon:Fu},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Hu={element:Pu,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:Nu,sourceCode:ku,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Bu(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function bl(e){return((e==null?void 0:e.trim().length)??0)>0}function Uo(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function qo(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:R.scalingValue((o-t)/2,i)}}function Ou(e){return`
3646
+ .${e}-wrapper {
3647
3647
  display: grid;
3648
3648
  align-items: start;
3649
3649
  min-height: ${Bu(48)};
3650
3650
  }
3651
- .${t}-item {
3651
+ .${e}-item {
3652
3652
  display: flex;
3653
3653
  flex-direction: column;
3654
3654
  justify-content: center;
3655
3655
  align-items: center;
3656
3656
  }
3657
- .${t}-item-inner {
3657
+ .${e}-item-inner {
3658
3658
  display: flex;
3659
3659
  flex-direction: column;
3660
3660
  align-items: center;
3661
3661
  outline: 1px solid #ccc;
3662
3662
  }
3663
- .${t}-item-inner-hidden {
3663
+ .${e}-item-inner-hidden {
3664
3664
  display: flex;
3665
3665
  flex-direction: column;
3666
3666
  align-items: center;
3667
3667
  }
3668
- .${t}-item-image-wrapper {
3668
+ .${e}-item-image-wrapper {
3669
3669
  display: flex;
3670
3670
  justify-content: center;
3671
3671
  align-items: center;
3672
3672
  align-self: center;
3673
3673
  }
3674
- .${t}-item-image-wrapper-fit-slider {
3674
+ .${e}-item-image-wrapper-fit-slider {
3675
3675
  display: grid;
3676
3676
  }
3677
- .${t}-item-image-wrapper-fit-slider > .${t}-item-image-wrapper-sizer,
3678
- .${t}-item-image-wrapper-fit-slider > .${t}-item-slider {
3677
+ .${e}-item-image-wrapper-fit-slider > .${e}-item-image-wrapper-sizer,
3678
+ .${e}-item-image-wrapper-fit-slider > .${e}-item-slider {
3679
3679
  grid-area: 1 / 1;
3680
3680
  width: 100%;
3681
3681
  }
3682
- .${t}-item-image-wrapper-fit-slider > .${t}-item-image-wrapper-sizer {
3682
+ .${e}-item-image-wrapper-fit-slider > .${e}-item-image-wrapper-sizer {
3683
3683
  display: grid;
3684
3684
  visibility: hidden;
3685
3685
  pointer-events: none;
3686
3686
  }
3687
- .${t}-item-image-wrapper-fit-slider > .${t}-item-image-wrapper-sizer img {
3687
+ .${e}-item-image-wrapper-fit-slider > .${e}-item-image-wrapper-sizer img {
3688
3688
  grid-area: 1 / 1;
3689
3689
  width: auto;
3690
3690
  height: auto;
3691
3691
  max-width: 100%;
3692
3692
  object-fit: contain;
3693
3693
  }
3694
- .${t}-item-image-wrapper-fit-slider > .${t}-item-image-wrapper-sizer video {
3694
+ .${e}-item-image-wrapper-fit-slider > .${e}-item-image-wrapper-sizer video {
3695
3695
  grid-area: 1 / 1;
3696
3696
  width: auto;
3697
3697
  height: auto;
3698
3698
  max-width: 100%;
3699
3699
  object-fit: contain;
3700
3700
  }
3701
- .${t}-item-image-wrapper-fit-slider > .${t}-item-slider {
3701
+ .${e}-item-image-wrapper-fit-slider > .${e}-item-slider {
3702
3702
  align-self: stretch;
3703
3703
  min-height: 0;
3704
3704
  }
3705
- .${t}-item-image-link {
3705
+ .${e}-item-image-link {
3706
3706
  width: 100%;
3707
3707
  height: 100%;
3708
3708
  display: flex;
3709
3709
  flex-direction: column;
3710
3710
  align-items: center;
3711
3711
  }
3712
- .${t}-item-image {
3712
+ .${e}-item-image {
3713
3713
  width: 100%;
3714
3714
  height: 100%;
3715
3715
  display: block;
3716
3716
  max-width: 100%;
3717
3717
  }
3718
- .${t}-item-video {
3718
+ .${e}-item-video {
3719
3719
  width: 100%;
3720
3720
  height: 100%;
3721
3721
  display: block;
3722
3722
  max-width: 100%;
3723
3723
  }
3724
- .${t}-item-slider,
3725
- .${t}-item-slider .splide__track,
3726
- .${t}-item-slider .splide__list,
3727
- .${t}-item-slider .splide__slide {
3724
+ .${e}-item-slider,
3725
+ .${e}-item-slider .splide__track,
3726
+ .${e}-item-slider .splide__list,
3727
+ .${e}-item-slider .splide__slide {
3728
3728
  width: 100%;
3729
3729
  height: 100%;
3730
3730
  }
3731
- .${t}-item-slider .splide__slide {
3731
+ .${e}-item-slider .splide__slide {
3732
3732
  display: flex;
3733
3733
  justify-content: center;
3734
3734
  align-items: center;
3735
3735
  }
3736
- .${t}-item-title {
3736
+ .${e}-item-title {
3737
3737
  white-space: normal;
3738
3738
  overflow-wrap: anywhere;
3739
3739
  word-break: break-word;
3740
3740
  text-align: center;
3741
3741
  margin-bottom: 0px;
3742
3742
  margin-top: 0px;
3743
- color: var(--${t}-title-color);
3743
+ color: var(--${e}-title-color);
3744
3744
  }
3745
- .${t}-item-subtitle {
3745
+ .${e}-item-subtitle {
3746
3746
  white-space: normal;
3747
3747
  overflow-wrap: anywhere;
3748
3748
  word-break: break-word;
3749
3749
  text-align: center;
3750
3750
  margin-bottom: 0px;
3751
3751
  margin-top: 0px;
3752
- color: var(--${t}-subtitle-color);
3752
+ color: var(--${e}-subtitle-color);
3753
3753
  }
3754
- .${t}-text-tight-leading {
3754
+ .${e}-text-tight-leading {
3755
3755
  display: block;
3756
3756
  flex-shrink: 0;
3757
- padding-top: var(--${t}-title-leading-gap, 0);
3758
- padding-bottom: var(--${t}-title-leading-gap, 0);
3757
+ padding-top: var(--${e}-title-leading-gap, 0);
3758
+ padding-bottom: var(--${e}-title-leading-gap, 0);
3759
3759
  }
3760
- .${t}-show-text-hover .${t}-item-title,
3761
- .${t}-show-text-hover .${t}-item-subtitle {
3760
+ .${e}-show-text-hover .${e}-item-title,
3761
+ .${e}-show-text-hover .${e}-item-subtitle {
3762
3762
  opacity: 0;
3763
3763
  transition: opacity 250ms;
3764
3764
  }
3765
- .${t}-show-text-hover .${t}-item-inner:hover .${t}-item-title,
3766
- .${t}-show-text-hover .${t}-item-inner:hover .${t}-item-subtitle,
3767
- .${t}-show-text-hover .${t}-item-inner-hidden:hover .${t}-item-title,
3768
- .${t}-show-text-hover .${t}-item-inner-hidden:hover .${t}-item-subtitle {
3765
+ .${e}-show-text-hover .${e}-item-inner:hover .${e}-item-title,
3766
+ .${e}-show-text-hover .${e}-item-inner:hover .${e}-item-subtitle,
3767
+ .${e}-show-text-hover .${e}-item-inner-hidden:hover .${e}-item-title,
3768
+ .${e}-show-text-hover .${e}-item-inner-hidden:hover .${e}-item-subtitle {
3769
3769
  opacity: 1;
3770
3770
  }
3771
- .${t}-type-b .${t}-item-inner,
3772
- .${t}-type-b .${t}-item-inner-hidden,
3773
- .${t}-type-c .${t}-item-inner,
3774
- .${t}-type-c .${t}-item-inner-hidden {
3771
+ .${e}-type-b .${e}-item-inner,
3772
+ .${e}-type-b .${e}-item-inner-hidden,
3773
+ .${e}-type-c .${e}-item-inner,
3774
+ .${e}-type-c .${e}-item-inner-hidden {
3775
3775
  align-items: flex-start;
3776
3776
  }
3777
- .${t}-type-b .${t}-item-image-link,
3778
- .${t}-type-c .${t}-item-image-link {
3777
+ .${e}-type-b .${e}-item-image-link,
3778
+ .${e}-type-c .${e}-item-image-link {
3779
3779
  align-items: center;
3780
3780
  }
3781
- .${t}-type-b .${t}-item-title,
3782
- .${t}-type-b .${t}-item-subtitle,
3783
- .${t}-type-c .${t}-item-title,
3784
- .${t}-type-c .${t}-item-subtitle {
3781
+ .${e}-type-b .${e}-item-title,
3782
+ .${e}-type-b .${e}-item-subtitle,
3783
+ .${e}-type-c .${e}-item-title,
3784
+ .${e}-type-c .${e}-item-subtitle {
3785
3785
  text-align: left;
3786
3786
  }
3787
- .${t}-item-text-block {
3787
+ .${e}-item-text-block {
3788
3788
  display: flex;
3789
3789
  flex-direction: column;
3790
3790
  align-items: flex-start;
3791
3791
  width: 100%;
3792
3792
  flex-shrink: 0;
3793
3793
  }
3794
- .${t}-align-entries .${t}-item {
3794
+ .${e}-align-entries .${e}-item {
3795
3795
  display: contents;
3796
3796
  }
3797
- .${t}-align-entries .${t}-item-inner,
3798
- .${t}-align-entries .${t}-item-inner-hidden {
3797
+ .${e}-align-entries .${e}-item-inner,
3798
+ .${e}-align-entries .${e}-item-inner-hidden {
3799
3799
  display: grid;
3800
3800
  grid-template-rows: subgrid;
3801
3801
  grid-row: span 3;
3802
3802
  justify-self: center;
3803
- margin-bottom: var(--${t}-align-entries-row-gap, 0);
3803
+ margin-bottom: var(--${e}-align-entries-row-gap, 0);
3804
3804
  }
3805
- .${t}-align-entries .${t}-item-inner-last-row {
3805
+ .${e}-align-entries .${e}-item-inner-last-row {
3806
3806
  margin-bottom: 0;
3807
3807
  }
3808
- .${t}-align-entries .${t}-item-text-link {
3808
+ .${e}-align-entries .${e}-item-text-link {
3809
3809
  display: contents;
3810
3810
  }
3811
- .${t}-align-entries .${t}-item-title-row,
3812
- .${t}-align-entries .${t}-item-subtitle-row {
3811
+ .${e}-align-entries .${e}-item-title-row,
3812
+ .${e}-align-entries .${e}-item-subtitle-row {
3813
3813
  display: flex;
3814
3814
  flex-direction: column;
3815
3815
  align-items: flex-start;
3816
3816
  width: 100%;
3817
3817
  min-height: 100%;
3818
3818
  }
3819
- .${t}-align-entries .${t}-item-image-link {
3819
+ .${e}-align-entries .${e}-item-image-link {
3820
3820
  width: 100%;
3821
3821
  height: auto;
3822
3822
  display: flex;
3823
3823
  flex-direction: column;
3824
3824
  align-items: center;
3825
3825
  }
3826
- .${t}-lightbox-counter {
3826
+ .${e}-lightbox-counter {
3827
3827
  margin: 0;
3828
- color: var(--${t}-lightbox-counter-color);
3828
+ color: var(--${e}-lightbox-counter-color);
3829
3829
  }
3830
3830
 
3831
- .${t}-control {
3831
+ .${e}-control {
3832
3832
  position: relative;
3833
3833
  z-index: 2;
3834
3834
  width: 100%;
3835
3835
  }
3836
3836
 
3837
- .${t}-control::before {
3837
+ .${e}-control::before {
3838
3838
  content: "";
3839
3839
  position: absolute;
3840
3840
  top: 0;
@@ -3845,7 +3845,7 @@ type TestimonialsSettings = {
3845
3845
  pointer-events: auto;
3846
3846
  z-index: 10;
3847
3847
  }
3848
- `}const dn=500,Du=750,Cn="cubic-bezier(0.22, 1, 0.36, 1)";function Tn(t){return t.type==="video"?!0:t.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t.url)}function yl({media:t,className:e,style:n,onImageClick:i}){return Tn(t)?o.jsx("video",{src:t.url,className:e,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):o.jsx("img",{src:t.url,alt:t.name,className:e,style:n,onClick:i})}function ju({images:t,index:e,imageDisplay:n,originRect:i,reverseClose:r,onClose:l,onPrev:s,onNext:d,counterClassName:a,counterStyle:p}){const u=n==="cover",S=c.useRef(null),x=c.useRef(null),[y,m]=c.useState(null),[f,L]=c.useState(i?"opening":"open"),[w,$]=c.useState(!0),C=c.useRef(e),P=c.useCallback(()=>{const h=S.current,T=x.current;if(!h||!T)return;const _=h.getBoundingClientRect(),N=_.width,V=_.height,at=T.naturalWidth,O=T.naturalHeight;if(!N||!V||!at||!O)return;if(n==="cover"){m({width:N,height:V,left:_.left,top:_.top});return}const W=at/O,G=N/V;if(W>G){const K=N/W;m({width:N,height:K,left:_.left,top:_.top+(V-K)/2})}else{const K=V*W;m({width:K,height:V,left:_.left+(N-K)/2,top:_.top})}},[n]);c.useEffect(()=>{P();const h=S.current;if(!h)return;const T=new ResizeObserver(()=>P());return T.observe(h),()=>T.disconnect()},[P,e]),c.useEffect(()=>{f==="opening"&&y&&L("open")},[f,y]),c.useEffect(()=>{if(f!=="closing")return;const h=setTimeout(()=>l(),dn);return()=>clearTimeout(h)},[f,l]),c.useEffect(()=>{C.current!==e&&$(!1),C.current=e},[e]),c.useEffect(()=>{const h=T=>{T.key==="Escape"&&(T.preventDefault(),T.stopPropagation(),f!=="closing"&&L("closing"))};return window.addEventListener("keydown",h,!0),()=>window.removeEventListener("keydown",h,!0)},[f]);const E=()=>{f!=="closing"&&L("closing")},k=f==="open",b=f==="closing",M=b&&r&&!!i,z=f==="opening"?i??y:M?i:y;return o.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:E,children:[o.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:k?1:0,transition:`opacity ${dn}ms ${Cn}`,pointerEvents:"none"}}),o.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?o.jsxs(o.Fragment,{children:[o.jsx("div",{ref:S,style:{position:"absolute",inset:0}}),o.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:k?1:0,transition:`opacity ${dn}ms ${Cn}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&o.jsxs("p",{className:a,style:p,children:[e+1," / ",t.length]})})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{style:{height:"10%"}}),o.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:o.jsx("div",{ref:S,style:{width:"100%",height:"100%"}})}),o.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:k?1:0,transition:`opacity ${dn}ms ${Cn}`},children:t.length>1&&o.jsxs("p",{className:a,style:p,children:[e+1," / ",t.length]})})]})}),z&&o.jsx("img",{ref:x,src:t[e],onLoad:P,style:{position:"fixed",top:z.top,left:z.left,width:z.width,height:z.height,objectFit:n==="cover"?"cover":"contain",opacity:b&&!M?0:1,transition:b&&!M?`opacity ${dn}ms ${Cn}`:M||w?`top ${dn}ms ${Cn}, left ${dn}ms ${Cn}, width ${dn}ms ${Cn}, height ${dn}ms ${Cn}`:"none",pointerEvents:"none",zIndex:9998}}),k&&y&&o.jsxs(o.Fragment,{children:[o.jsx("div",{style:{position:"fixed",top:y.top,left:y.left,width:y.width/2,height:y.height,cursor:"w-resize",zIndex:9999},onClick:h=>{h.stopPropagation(),s()}}),o.jsx("div",{style:{position:"fixed",top:y.top,left:y.left+y.width/2,width:y.width/2,height:y.height,cursor:"e-resize",zIndex:9999},onClick:h=>{h.stopPropagation(),d()}})]})]})}function zu(t){return typeof t=="string"?t==="cover"?"cover":"fit":(t==null?void 0:t.display)==="cover"?"cover":"fit"}function Vu({settings:t,content:e,isEditor:n,isPreviewMode:i,isEditMode:r,metadata:l,activeEvent:s,layoutId:d}){const{prefix:a}=I.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:S=100,verticalGap:x,entriesCount:y,lightbox:m,imageDisplay:f,lightboxImageDisplay:L,slider:w,sliderTiming:$,direction:C,transition:P,titleMarginTop:E,subtitleMarginTop:k,titleColor:b,subtitleColor:M,lightboxCounterColor:z,titleFontFamily:h,titleFontSettings:T,titleFontSize:_,titleLineHeight:N,titleLetterSpacing:V,titleWordSpacing:at,titleTextAppearance:O,subtitleFontFamily:W,subtitleFontSettings:G,subtitleFontSize:K,subtitleLineHeight:H,subtitleLetterSpacing:q,subtitleWordSpacing:et,subtitleTextAppearance:lt,lightboxCounterFontFamily:F,lightboxCounterFontSettings:ct,lightboxCounterFontSize:g,lightboxCounterLineHeight:nt,lightboxCounterLetterSpacing:ft,lightboxCounterWordSpacing:it,lightboxCounterTextAppearance:wt,showText:mt="always",alignEntries:ot="off"}=t,B={fontSettings:{fontFamily:h,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:_??.01,lineHeight:N,letterSpacing:V??0,wordSpacing:at??0,textAppearance:O,color:b},U={...en(We(B,n))},Y={fontSettings:{fontFamily:W,fontWeight:(G==null?void 0:G.fontWeight)??400,fontStyle:(G==null?void 0:G.fontStyle)??"normal"},fontSize:K??.01,lineHeight:H,letterSpacing:q??0,wordSpacing:et??0,textAppearance:lt,color:M},Mt={...en(We(Y,n))},At={fontSettings:{fontFamily:F,fontWeight:(ct==null?void 0:ct.fontWeight)??400,fontStyle:(ct==null?void 0:ct.fontStyle)??"normal"},fontSize:g??.01,lineHeight:nt,letterSpacing:ft??0,wordSpacing:it??0,textAppearance:wt,color:z},xt={...en(We(At,n)),...Oo(g,nt,a,n)},j=Bo(_,N,`${a}-item-title`,`${a}-text-tight-leading`),st=Bo(K,H,`${a}-item-subtitle`,`${a}-text-tight-leading`),A=Oo(_,N,a,n),D=Oo(K,H,a,n),X=Bo(g,nt,`${a}-lightbox-counter`,`${a}-text-tight-leading`),J=I.buildColorVars(a,{titleColor:b,subtitleColor:M,lightboxCounterColor:z},Ku,Uu),Dt=`${s&&s!=="default"?`${a}-state-${s}`:""}${mt==="on hover"&&(!n||i)?` ${a}-show-text-hover`:""}`.trim(),Rt=y===0?1/0:y,$t=(e??[]).slice(0,Rt),Gt=u.entryWidth??.2,pt=(f==null?void 0:f.display)==="cover",Et=(f==null?void 0:f.ratioValue)??"1:1",jt=(f==null?void 0:f.reversed)??!1,[zt,Vt]=Et.split(":").map(Number),$e=`${jt?Vt:zt} / ${jt?zt:Vt}`,Yt=I.scalingValue(Gt??0,n),fe=!pt&&w!=="off",be={width:Yt,...pt?{aspectRatio:$e,height:"auto",overflow:"hidden"}:{height:"auto"}},Oe=`${a}-item-image-wrapper${fe?` ${a}-item-image-wrapper-fit-slider`:""}`.trim(),Wt=p==="c",we=Wt&&ot==="on",Qt=`calc(${I.scalingValue(Gt??0,n)} * (${S} / 100))`,Ee=I.scalingValue(Gt*S/100,n),ke=pt?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[sn,Ae]=c.useState("ltr"),[De,ze]=c.useState(0),Ft=c.useRef(null);c.useEffect(()=>{const Nt=Ft.current;if(!Nt)return;const ye=new ResizeObserver(Re=>{ze(Math.round(Re[0].contentRect.width))});return ye.observe(Nt),()=>ye.disconnect()},[]);const ce=(()=>{const Nt={...J},ye=Ft.current?getComputedStyle(Ft.current).getPropertyValue("--cntrl-article-width").trim():"";return ye&&(Nt["--cntrl-article-width"]=ye),Nt})(),[me,te]=c.useState(!1),[ee,Fe]=c.useState([]),[Ve,Ne]=c.useState(0),[bn,Jt]=c.useState(null),an=(Nt,ye,Re)=>{if(n&&!i||m==="off")return;const tt=Nt.currentTarget.getBoundingClientRect();Jt({top:tt.top,left:tt.left,width:tt.width,height:tt.height}),Fe(ye),Ne(Re),te(!0)};c.useEffect(()=>{if(!me||m!=="on"||typeof document>"u")return;const Nt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Nt}},[me,m]),c.useEffect(()=>{!n||i||(te(!1),Jt(null))},[n,i]);const Sn=c.useMemo(()=>Ou(a),[a]);return o.jsxs(o.Fragment,{children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:Sn}}),o.jsx("div",{style:J,children:o.jsx("div",{ref:Ft,className:`${a}-wrapper ${a}-type-${p}${we?` ${a}-align-entries`:""} ${Dt}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:we?0:I.scalingValue(x??0,n),columnGap:I.scalingValue(u.horizontalGap??0,n),width:I.scalingValue(u.wrapperWidth??0,n),...we?{[`--${a}-align-entries-row-gap`]:I.scalingValue(x??0,n)}:{}},children:$t.map((Nt,ye)=>{var de,ve;const Re=fl(Nt.title),tt=fl(Nt.subtitle),yt=(((de=Nt.link)==null?void 0:de.length)??0)>0&&m==="off"?Nt.link:void 0,Lt=Math.floor(ye/u.columnsCount)===Math.ceil($t.length/u.columnsCount)-1,Ot=Wt?o.jsxs("div",{className:`${a}-item-text-block`,children:[Re&&o.jsx("p",{className:j,style:{width:Qt,...U,...A},children:Nt.title}),Re&&o.jsx("div",{"data-controls":r?"titleMarginTop":void 0,className:r?`${a}-control`:void 0,style:{height:I.scalingValue(E??0,n),width:Ee}}),tt&&o.jsx("p",{className:st,style:{width:Qt,...Mt,...D},children:Nt.subtitle}),tt&&o.jsx("div",{"data-controls":r?"subtitleMarginTop":void 0,className:r?`${a}-control`:void 0,style:{height:I.scalingValue(k??0,n),width:Ee}})]}):null,Kt=Wt?o.jsxs("div",{className:`${a}-item-title-row`,children:[Re&&o.jsx("p",{className:j,style:{width:Qt,...U,...A},children:Nt.title}),Re&&o.jsx("div",{"data-controls":r?"titleMarginTop":void 0,className:r?`${a}-control`:void 0,style:{height:I.scalingValue(E??0,n),width:Ee}})]}):null,Ut=Wt?o.jsxs("div",{className:`${a}-item-subtitle-row`,children:[tt&&o.jsx("p",{className:st,style:{width:Qt,...Mt,...D},children:Nt.subtitle}),tt&&o.jsx("div",{"data-controls":r?"subtitleMarginTop":void 0,className:r?`${a}-control`:void 0,style:{height:I.scalingValue(k??0,n),width:Ee}})]}):null,vt=yt?o.jsxs("a",{href:yt,target:"_blank",className:`${a}-item-text-link`,children:[Kt,Ut]}):o.jsxs(o.Fragment,{children:[Kt,Ut]}),ge=o.jsx("div",{className:Oe,style:be,children:(((ve=Nt.image)==null?void 0:ve.length)??0)===0?null:w==="off"?(()=>{const Ht=Nt.image[0],ne=Nt.image.filter(Ce=>!Tn(Ce)).map(Ce=>Ce.url);return o.jsx(yl,{media:Ht,className:`${a}-item-${Tn(Ht)?"video":"image"}`.trim(),style:ke,onImageClick:Tn(Ht)?void 0:Ce=>an(Ce,ne,0)})})():o.jsxs(o.Fragment,{children:[fe&&o.jsx("div",{className:`${a}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Nt.image.map(Ht=>Tn(Ht)?o.jsx("video",{src:Ht.url,muted:!0,playsInline:!0},`sizer-${Ht.url}`):o.jsx("img",{src:Ht.url,alt:""},`sizer-${Ht.url}`))}),o.jsx(Mr,{className:`${a}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:$*1e3,width:"100%",height:"100%",speed:Du,type:P==="fade"?"fade":"loop",rewind:P==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:P==="fade"?"ltr":C!=="random"?C==="horizontal"?"ltr":"ttb":sn},onMoved:Ht=>{if(C!=="random"||P==="fade")return;const Se=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Ae(Se),setTimeout(()=>{Ht.refresh()},0)},children:Nt.image.map((Ht,Se)=>{const ne=Nt.image.filter(he=>!Tn(he)),Ce=ne.map(he=>he.url),Qe=ne.findIndex(he=>he.url===Ht.url);return o.jsx(_r,{children:o.jsx(yl,{media:Ht,className:`${a}-item-${Tn(Ht)?"video":"image"}`.trim(),style:ke,onImageClick:Tn(Ht)?void 0:he=>an(he,Ce,Qe)})},Se)})},`${P}-${Gt}-${C}-${$}-${De}-${d}`)]})}),oe=Wt?null:o.jsxs(o.Fragment,{children:[o.jsx("div",{"data-controls":r&&Re?"titleMarginTop":void 0,className:r&&Re?`${a}-control`:void 0,style:{height:Re?I.scalingValue(E??0,n):0,width:Ee}}),o.jsx("p",{className:j,style:{width:Qt,...U,...A},children:Nt.title}),o.jsx("div",{"data-controls":r&&tt?"subtitleMarginTop":void 0,className:r&&tt?`${a}-control`:void 0,style:{height:tt?I.scalingValue(k??0,n):0,width:Ee}}),o.jsx("p",{className:st,style:{width:Qt,...Mt,...D},children:Nt.subtitle})]});return o.jsx("div",{className:`${a}-item`.trim(),children:o.jsx("div",{className:`${r?`${a}-item-inner`:`${a}-item-inner-hidden`}${we&&Lt?` ${a}-item-inner-last-row`:""}`.trim(),style:{width:(S??0)>100?`calc(${I.scalingValue(Gt??0,n)} * (${S} / 100))`:I.scalingValue(Gt??0,n)},children:we?o.jsxs(o.Fragment,{children:[vt,o.jsx("a",{href:yt,target:"_blank",className:`${a}-item-image-link`,children:ge})]}):o.jsxs("a",{href:yt,target:"_blank",className:`${a}-item-image-link`,children:[Ot,ge,oe]})})},ye)})})}),(!n||i)&&me&&typeof document<"u"&&m==="on"&&Li.createPortal(o.jsx("div",{style:ce,"data-selection":"none",children:o.jsx(ju,{images:ee,index:Ve,imageDisplay:zu(L),originRect:bn,reverseClose:w==="off",onClose:()=>te(!1),onPrev:()=>Ne(Nt=>(Nt-1+ee.length)%ee.length),onNext:()=>Ne(Nt=>(Nt+1)%ee.length),counterClassName:X,counterStyle:xt})}),document.body)]})}const Ku={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Uu=["hover","focus","filled","success","error"],Gu=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3848
+ `}const hn=500,Du=750,Mn="cubic-bezier(0.22, 1, 0.36, 1)";function Wn(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function Sl({media:e,className:t,style:n,onImageClick:i}){return Wn(e)?r.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:i})}function ju({images:e,index:t,imageDisplay:n,originRect:i,reverseClose:o,onClose:l,onPrev:s,onNext:d,counterClassName:a,counterStyle:p}){const u=n==="cover",S=c.useRef(null),x=c.useRef(null),[v,m]=c.useState(null),[y,$]=c.useState(i?"opening":"open"),[w,C]=c.useState(!0),T=c.useRef(t),P=c.useCallback(()=>{const h=S.current,L=x.current;if(!h||!L)return;const E=h.getBoundingClientRect(),k=E.width,z=E.height,le=L.naturalWidth,O=L.naturalHeight;if(!k||!z||!le||!O)return;if(n==="cover"){m({width:k,height:z,left:E.left,top:E.top});return}const _=le/O,q=k/z;if(_>q){const G=k/_;m({width:k,height:G,left:E.left,top:E.top+(z-G)/2})}else{const G=z*_;m({width:G,height:z,left:E.left+(k-G)/2,top:E.top})}},[n]);c.useEffect(()=>{P();const h=S.current;if(!h)return;const L=new ResizeObserver(()=>P());return L.observe(h),()=>L.disconnect()},[P,t]),c.useEffect(()=>{y==="opening"&&v&&$("open")},[y,v]),c.useEffect(()=>{if(y!=="closing")return;const h=setTimeout(()=>l(),hn);return()=>clearTimeout(h)},[y,l]),c.useEffect(()=>{T.current!==t&&C(!1),T.current=t},[t]),c.useEffect(()=>{const h=L=>{L.key==="Escape"&&(L.preventDefault(),L.stopPropagation(),y!=="closing"&&$("closing"))};return window.addEventListener("keydown",h,!0),()=>window.removeEventListener("keydown",h,!0)},[y]);const M=()=>{y!=="closing"&&$("closing")},F=y==="open",b=y==="closing",W=b&&o&&!!i,K=y==="opening"?i??v:W?i:v;return r.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:M,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:F?1:0,transition:`opacity ${hn}ms ${Mn}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:S,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:F?1:0,transition:`opacity ${hn}ms ${Mn}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:a,style:p,children:[t+1," / ",e.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:S,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:F?1:0,transition:`opacity ${hn}ms ${Mn}`},children:e.length>1&&r.jsxs("p",{className:a,style:p,children:[t+1," / ",e.length]})})]})}),K&&r.jsx("img",{ref:x,src:e[t],onLoad:P,style:{position:"fixed",top:K.top,left:K.left,width:K.width,height:K.height,objectFit:n==="cover"?"cover":"contain",opacity:b&&!W?0:1,transition:b&&!W?`opacity ${hn}ms ${Mn}`:W||w?`top ${hn}ms ${Mn}, left ${hn}ms ${Mn}, width ${hn}ms ${Mn}, height ${hn}ms ${Mn}`:"none",pointerEvents:"none",zIndex:9998}}),F&&v&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{position:"fixed",top:v.top,left:v.left,width:v.width/2,height:v.height,cursor:"w-resize",zIndex:9999},onClick:h=>{h.stopPropagation(),s()}}),r.jsx("div",{style:{position:"fixed",top:v.top,left:v.left+v.width/2,width:v.width/2,height:v.height,cursor:"e-resize",zIndex:9999},onClick:h=>{h.stopPropagation(),d()}})]})]})}function zu(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Vu({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:l,activeEvent:s,layoutId:d}){const{prefix:a}=R.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:S=100,verticalGap:x,entriesCount:v,lightbox:m,imageDisplay:y,lightboxImageDisplay:$,slider:w,sliderTiming:C,direction:T,transition:P,titleMarginTop:M,subtitleMarginTop:F,titleColor:b,subtitleColor:W,lightboxCounterColor:K,titleFontFamily:h,titleFontSettings:L,titleFontSize:E,titleLineHeight:k,titleLetterSpacing:z,titleWordSpacing:le,titleTextAppearance:O,subtitleFontFamily:_,subtitleFontSettings:q,subtitleFontSize:G,subtitleLineHeight:H,subtitleLetterSpacing:X,subtitleWordSpacing:ne,subtitleTextAppearance:se,lightboxCounterFontFamily:N,lightboxCounterFontSettings:de,lightboxCounterFontSize:g,lightboxCounterLineHeight:ie,lightboxCounterLetterSpacing:fe,lightboxCounterWordSpacing:oe,lightboxCounterTextAppearance:Ce,showText:me="always",alignEntries:re="off"}=e,B={fontSettings:{fontFamily:h,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:E??.01,lineHeight:k,letterSpacing:z??0,wordSpacing:le??0,textAppearance:O,color:b},U={...sn(Pt(B,n))},J={fontSettings:{fontFamily:_,fontWeight:(q==null?void 0:q.fontWeight)??400,fontStyle:(q==null?void 0:q.fontStyle)??"normal"},fontSize:G??.01,lineHeight:H,letterSpacing:X??0,wordSpacing:ne??0,textAppearance:se,color:W},Ae={...sn(Pt(J,n))},ke={fontSettings:{fontFamily:N,fontWeight:(de==null?void 0:de.fontWeight)??400,fontStyle:(de==null?void 0:de.fontStyle)??"normal"},fontSize:g??.01,lineHeight:ie,letterSpacing:fe??0,wordSpacing:oe??0,textAppearance:Ce,color:K},xe={...sn(Pt(ke,n)),...qo(g,ie,a,n)},j=Uo(E,k,`${a}-item-title`,`${a}-text-tight-leading`),ae=Uo(G,H,`${a}-item-subtitle`,`${a}-text-tight-leading`),A=qo(E,k,a,n),D=qo(G,H,a,n),Y=Uo(g,ie,`${a}-lightbox-counter`,`${a}-text-tight-leading`),Z=R.buildColorVars(a,{titleColor:b,subtitleColor:W,lightboxCounterColor:K},Ku,Gu),je=`${s&&s!=="default"?`${a}-state-${s}`:""}${me==="on hover"&&(!n||i)?` ${a}-show-text-hover`:""}`.trim(),_e=v===0?1/0:v,Le=(t??[]).slice(0,_e),Ge=u.entryWidth??.2,pe=(y==null?void 0:y.display)==="cover",We=(y==null?void 0:y.ratioValue)??"1:1",ze=(y==null?void 0:y.reversed)??!1,[Ve,Ne]=We.split(":").map(Number),bt=`${ze?Ne:Ve} / ${ze?Ve:Ne}`,Ze=R.scalingValue(Ge??0,n),yt=!pe&&w!=="off",Mt={width:Ze,...pe?{aspectRatio:bt,height:"auto",overflow:"hidden"}:{height:"auto"}},Ht=`${a}-item-image-wrapper${yt?` ${a}-item-image-wrapper-fit-slider`:""}`.trim(),Ee=p==="c",it=Ee&&re==="on",Ue=`calc(${R.scalingValue(Ge??0,n)} * (${S} / 100))`,ut=R.scalingValue(Ge*S/100,n),Bt=pe?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[rn,jt]=c.useState("ltr"),[Yt,ln]=c.useState(0),He=c.useRef(null);c.useEffect(()=>{const Pe=He.current;if(!Pe)return;const ft=new ResizeObserver(Wt=>{ln(Math.round(Wt[0].contentRect.width))});return ft.observe(Pe),()=>ft.disconnect()},[]);const Tt=(()=>{const Pe={...Z},ft=He.current?getComputedStyle(He.current).getPropertyValue("--cntrl-article-width").trim():"";return ft&&(Pe["--cntrl-article-width"]=ft),Pe})(),[pt,et]=c.useState(!1),[mt,zt]=c.useState([]),[Vt,Jt]=c.useState(0),[pn,Ke]=c.useState(null),Zt=(Pe,ft,Wt)=>{if(n&&!i||m==="off")return;const te=Pe.currentTarget.getBoundingClientRect();Ke({top:te.top,left:te.left,width:te.width,height:te.height}),zt(ft),Jt(Wt),et(!0)};c.useEffect(()=>{if(!pt||m!=="on"||typeof document>"u")return;const Pe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Pe}},[pt,m]),c.useEffect(()=>{!n||i||(et(!1),Ke(null))},[n,i]);const kt=c.useMemo(()=>Ou(a),[a]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:kt}}),r.jsx("div",{style:Z,children:r.jsx("div",{ref:He,className:`${a}-wrapper ${a}-type-${p}${it?` ${a}-align-entries`:""} ${je}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:it?0:R.scalingValue(x??0,n),columnGap:R.scalingValue(u.horizontalGap??0,n),width:R.scalingValue(u.wrapperWidth??0,n),...it?{[`--${a}-align-entries-row-gap`]:R.scalingValue(x??0,n)}:{}},children:Le.map((Pe,ft)=>{var ht,ot;const Wt=bl(Pe.title),te=bl(Pe.subtitle),ye=(((ht=Pe.link)==null?void 0:ht.length)??0)>0&&m==="off"?Pe.link:void 0,Ie=Math.floor(ft/u.columnsCount)===Math.ceil(Le.length/u.columnsCount)-1,De=Ee?r.jsxs("div",{className:`${a}-item-text-block`,children:[Wt&&r.jsx("p",{className:j,style:{width:Ue,...U,...A},children:Pe.title}),Wt&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${a}-control`:void 0,style:{height:R.scalingValue(M??0,n),width:ut}}),te&&r.jsx("p",{className:ae,style:{width:Ue,...Ae,...D},children:Pe.subtitle}),te&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${a}-control`:void 0,style:{height:R.scalingValue(F??0,n),width:ut}})]}):null,qe=Ee?r.jsxs("div",{className:`${a}-item-title-row`,children:[Wt&&r.jsx("p",{className:j,style:{width:Ue,...U,...A},children:Pe.title}),Wt&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${a}-control`:void 0,style:{height:R.scalingValue(M??0,n),width:ut}})]}):null,Qe=Ee?r.jsxs("div",{className:`${a}-item-subtitle-row`,children:[te&&r.jsx("p",{className:ae,style:{width:Ue,...Ae,...D},children:Pe.subtitle}),te&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${a}-control`:void 0,style:{height:R.scalingValue(F??0,n),width:ut}})]}):null,ve=ye?r.jsxs("a",{href:ye,target:"_blank",className:`${a}-item-text-link`,children:[qe,Qe]}):r.jsxs(r.Fragment,{children:[qe,Qe]}),$t=r.jsx("div",{className:Ht,style:Mt,children:(((ot=Pe.image)==null?void 0:ot.length)??0)===0?null:w==="off"?(()=>{const Be=Pe.image[0],rt=Pe.image.filter(wt=>!Wn(wt)).map(wt=>wt.url);return r.jsx(Sl,{media:Be,className:`${a}-item-${Wn(Be)?"video":"image"}`.trim(),style:Bt,onImageClick:Wn(Be)?void 0:wt=>Zt(wt,rt,0)})})():r.jsxs(r.Fragment,{children:[yt&&r.jsx("div",{className:`${a}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Pe.image.map(Be=>Wn(Be)?r.jsx("video",{src:Be.url,muted:!0,playsInline:!0},`sizer-${Be.url}`):r.jsx("img",{src:Be.url,alt:""},`sizer-${Be.url}`))}),r.jsx(Hr,{className:`${a}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:C*1e3,width:"100%",height:"100%",speed:Du,type:P==="fade"?"fade":"loop",rewind:P==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:P==="fade"?"ltr":T!=="random"?T==="horizontal"?"ltr":"ttb":rn},onMoved:Be=>{if(T!=="random"||P==="fade")return;const vt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";jt(vt),setTimeout(()=>{Be.refresh()},0)},children:Pe.image.map((Be,vt)=>{const rt=Pe.image.filter(St=>!Wn(St)),wt=rt.map(St=>St.url),_t=rt.findIndex(St=>St.url===Be.url);return r.jsx(Br,{children:r.jsx(Sl,{media:Be,className:`${a}-item-${Wn(Be)?"video":"image"}`.trim(),style:Bt,onImageClick:Wn(Be)?void 0:St=>Zt(St,wt,_t)})},vt)})},`${P}-${Ge}-${T}-${C}-${Yt}-${d}`)]})}),gt=Ee?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&Wt?"titleMarginTop":void 0,className:o&&Wt?`${a}-control`:void 0,style:{height:Wt?R.scalingValue(M??0,n):0,width:ut}}),r.jsx("p",{className:j,style:{width:Ue,...U,...A},children:Pe.title}),r.jsx("div",{"data-controls":o&&te?"subtitleMarginTop":void 0,className:o&&te?`${a}-control`:void 0,style:{height:te?R.scalingValue(F??0,n):0,width:ut}}),r.jsx("p",{className:ae,style:{width:Ue,...Ae,...D},children:Pe.subtitle})]});return r.jsx("div",{className:`${a}-item`.trim(),children:r.jsx("div",{className:`${o?`${a}-item-inner`:`${a}-item-inner-hidden`}${it&&Ie?` ${a}-item-inner-last-row`:""}`.trim(),style:{width:(S??0)>100?`calc(${R.scalingValue(Ge??0,n)} * (${S} / 100))`:R.scalingValue(Ge??0,n)},children:it?r.jsxs(r.Fragment,{children:[ve,r.jsx("a",{href:ye,target:"_blank",className:`${a}-item-image-link`,children:$t})]}):r.jsxs("a",{href:ye,target:"_blank",className:`${a}-item-image-link`,children:[De,$t,gt]})})},ft)})})}),(!n||i)&&pt&&typeof document<"u"&&m==="on"&&Fi.createPortal(r.jsx("div",{style:Tt,"data-selection":"none",children:r.jsx(ju,{images:mt,index:Vt,imageDisplay:zu($),originRect:pn,reverseClose:w==="off",onClose:()=>et(!1),onPrev:()=>Jt(Pe=>(Pe-1+mt.length)%mt.length),onNext:()=>Jt(Pe=>(Pe+1)%mt.length),counterClassName:Y,counterStyle:xe})}),document.body)]})}const Ku={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Gu=["hover","focus","filled","success","error"],Uu=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3849
3849
  import '@splidejs/react-splide/css/core';
3850
3850
  import { CommonComponentProps } from '../props';
3851
3851
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
@@ -5014,18 +5014,18 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
5014
5014
  };
5015
5015
 
5016
5016
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
5017
- `,Do={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},qu=["titleColor","subtitleColor","lightboxCounterColor"],Xu={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",objectFit:"cover"}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",objectFit:"cover"}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",objectFit:"cover"}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",objectFit:"cover"}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",objectFit:"cover"}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",objectFit:"cover"}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",objectFit:"cover"}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",objectFit:"cover"}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Do.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:{...Do.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:{...Do.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"a",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignEntries.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.alignEntries.display.visible",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap","showText"]},{type:"row",title:"",items:["alignEntries"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...qu],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Yu={element:Vu,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Xu,sourceCode:Gu};function Ju(t){if(t.type==="video")return!0;if(t.type==="image")return!1;const e=t.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t.url)}function Zu({media:t,className:e,style:n}){const i=c.useRef(null);return c.useEffect(()=>{if(!t.isVideo)return;const r=i.current;if(!r)return;const l=r.play();l&&l.catch(()=>{})},[t.isVideo,t.url]),t.isVideo?o.jsx("video",{ref:i,className:e,src:t.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):o.jsx("img",{className:e,src:t.url,alt:"",style:n})}function io(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Qu(t){return String(t??"").trim().length>0}function vl(t,e){const n=t.currentTarget,i=n.getBoundingClientRect(),r=t.clientY-i.top>i.height/2;n.classList.toggle(`${e}-reveal-from-bottom`,r)}function xl(t,e){const n=t.currentTarget,i=n.getBoundingClientRect(),r=t.clientY<i.top+i.height/2;n.classList.toggle(`${e}-reveal-from-bottom`,r)}function bl(t,e,n,i,r,l,s){const d=I.scalingValue(l,s),a=I.scalingValue(0,s),p=t===0,u=t===e-1&&!r;return{borderTopWidth:p&&n?d:a,borderBottomWidth:!u||i?d:a}}function tp(t,e,n){const i=I.scalingValue(e,n),r=I.scalingValue(0,n);return{borderTopWidth:r,borderBottomWidth:t?i:r}}const Sl=10;function ep(t){return`
5018
- .${t}-wrapper {
5017
+ `,Xo={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},qu=["titleColor","subtitleColor","lightboxCounterColor"],Xu={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",objectFit:"cover"}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",objectFit:"cover"}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",objectFit:"cover"}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",objectFit:"cover"}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",objectFit:"cover"}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",objectFit:"cover"}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",objectFit:"cover"}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",objectFit:"cover"}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Xo.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:{...Xo.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:{...Xo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"a",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignEntries.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.alignEntries.display.visible",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap","showText"]},{type:"row",title:"",items:["alignEntries"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...qu],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Yu={element:Vu,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Xu,sourceCode:Uu};function Ju(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 Zu({media:e,className:t,style:n}){const i=c.useRef(null);return c.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const l=o.play();l&&l.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function po(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Qu(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 Cl(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 Tl(e,t,n,i,o,l,s){const d=R.scalingValue(l,s),a=R.scalingValue(0,s),p=e===0,u=e===t-1&&!o;return{borderTopWidth:p&&n?d:a,borderBottomWidth:!u||i?d:a}}function ep(e,t,n){const i=R.scalingValue(t,n),o=R.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const $l=10;function tp(e){return`
5018
+ .${e}-wrapper {
5019
5019
  display: grid;
5020
5020
  align-items: start;
5021
- min-height: ${io(48)};
5021
+ min-height: ${po(48)};
5022
5022
  position: relative;
5023
5023
  overflow: visible;
5024
5024
  box-sizing: border-box;
5025
5025
  }
5026
5026
 
5027
- .${t}-hover-image,
5028
- .${t}-hover-video {
5027
+ .${e}-hover-image,
5028
+ .${e}-hover-video {
5029
5029
  position: absolute;
5030
5030
  left: 0;
5031
5031
  top: 0;
@@ -5034,7 +5034,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
5034
5034
  display: block;
5035
5035
  }
5036
5036
 
5037
- .${t}-list-item {
5037
+ .${e}-list-item {
5038
5038
  display: flex;
5039
5039
  flex-direction: column;
5040
5040
  align-items: stretch;
@@ -5043,38 +5043,38 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
5043
5043
  position: relative;
5044
5044
  box-sizing: content-box;
5045
5045
  user-select: none;
5046
- background: var(--${t}-background-color);
5046
+ background: var(--${e}-background-color);
5047
5047
  }
5048
5048
 
5049
- .${t}-wrapper.${t}-divider-top .${t}-list-item {
5049
+ .${e}-wrapper.${e}-divider-top .${e}-list-item {
5050
5050
  border-top-style: solid;
5051
- border-top-color: var(--${t}-divider-color);
5051
+ border-top-color: var(--${e}-divider-color);
5052
5052
  }
5053
5053
 
5054
- .${t}-wrapper.${t}-divider-bottom .${t}-list-item {
5054
+ .${e}-wrapper.${e}-divider-bottom .${e}-list-item {
5055
5055
  border-bottom-style: solid;
5056
- border-bottom-color: var(--${t}-divider-color);
5056
+ border-bottom-color: var(--${e}-divider-color);
5057
5057
  }
5058
5058
 
5059
- .${t}-list-cols-row {
5059
+ .${e}-list-cols-row {
5060
5060
  display: flex;
5061
5061
  align-items: start;
5062
5062
  width: 100%;
5063
5063
  box-sizing: border-box;
5064
5064
  }
5065
5065
 
5066
- .${t}-list-cols-row-h {
5066
+ .${e}-list-cols-row-h {
5067
5067
  align-items: stretch;
5068
5068
  }
5069
5069
 
5070
- .${t}-list-cols-row-h [data-list-col] {
5070
+ .${e}-list-cols-row-h [data-list-col] {
5071
5071
  display: grid;
5072
5072
  grid-template-rows: minmax(0, 1fr);
5073
5073
  align-self: stretch;
5074
5074
  min-height: min-content;
5075
5075
  }
5076
5076
 
5077
- .${t}-list-cols-row-h .${t}-list-col {
5077
+ .${e}-list-cols-row-h .${e}-list-col {
5078
5078
  display: flex;
5079
5079
  flex-direction: column;
5080
5080
  align-items: flex-start;
@@ -5083,25 +5083,25 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
5083
5083
  min-height: 0;
5084
5084
  }
5085
5085
 
5086
- .${t}-list-cols-row-h .${t}-list-col-title {
5086
+ .${e}-list-cols-row-h .${e}-list-col-title {
5087
5087
  display: block;
5088
5088
  flex: 0 0 auto;
5089
5089
  align-self: stretch;
5090
5090
  }
5091
5091
 
5092
- .${t}-text-tight-leading {
5092
+ .${e}-text-tight-leading {
5093
5093
  display: block;
5094
5094
  flex-shrink: 0;
5095
- padding-top: var(--${t}-title-leading-gap, 0);
5096
- padding-bottom: var(--${t}-title-leading-gap, 0);
5095
+ padding-top: var(--${e}-title-leading-gap, 0);
5096
+ padding-bottom: var(--${e}-title-leading-gap, 0);
5097
5097
  }
5098
5098
 
5099
- .${t}-wrapper.${t}-type-b .${t}-list-cols-row {
5099
+ .${e}-wrapper.${e}-type-b .${e}-list-cols-row {
5100
5100
  flex-direction: column;
5101
5101
  align-items: stretch;
5102
5102
  }
5103
5103
 
5104
- .${t}-wrapper.${t}-type-b .${t}-list-col {
5104
+ .${e}-wrapper.${e}-type-b .${e}-list-col {
5105
5105
  width: 100%;
5106
5106
  min-width: 0;
5107
5107
  flex-direction: column;
@@ -5110,49 +5110,49 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
5110
5110
  min-height: min-content;
5111
5111
  }
5112
5112
 
5113
- .${t}-wrapper.${t}-type-b .${t}-list-col-title {
5113
+ .${e}-wrapper.${e}-type-b .${e}-list-col-title {
5114
5114
  display: block;
5115
5115
  flex: 0 0 auto;
5116
5116
  align-self: stretch;
5117
5117
  text-align: center;
5118
5118
  }
5119
5119
 
5120
- .${t}-wrapper.${t}-type-b .${t}-cut-item .${t}-list-cols-row {
5120
+ .${e}-wrapper.${e}-type-b .${e}-cut-item .${e}-list-cols-row {
5121
5121
  flex-direction: row;
5122
5122
  }
5123
5123
 
5124
- .${t}-wrapper.${t}-type-b .${t}-cut-label {
5124
+ .${e}-wrapper.${e}-type-b .${e}-cut-label {
5125
5125
  box-sizing: border-box;
5126
5126
  }
5127
5127
 
5128
- .${t}-wrapper.${t}-type-b .${t}-list-col-last {
5128
+ .${e}-wrapper.${e}-type-b .${e}-list-col-last {
5129
5129
  flex: 0 0 auto;
5130
5130
  min-width: 0;
5131
5131
  }
5132
5132
 
5133
- a.${t}-list-item {
5133
+ a.${e}-list-item {
5134
5134
  text-decoration: none;
5135
5135
  color: inherit;
5136
5136
  cursor: pointer;
5137
5137
  }
5138
5138
 
5139
- .${t}-list-col {
5139
+ .${e}-list-col {
5140
5140
  flex-shrink: 0;
5141
5141
  overflow: visible;
5142
5142
  box-sizing: border-box;
5143
- min-width: ${io(50)};
5143
+ min-width: ${po(50)};
5144
5144
  position: relative;
5145
5145
  display: flex;
5146
5146
  align-items: flex-start;
5147
5147
  }
5148
5148
 
5149
- .${t}-list-col-last {
5149
+ .${e}-list-col-last {
5150
5150
  flex: 1 1 auto;
5151
- min-width: ${io(50)};
5151
+ min-width: ${po(50)};
5152
5152
  }
5153
5153
 
5154
- .${t}-list-col-title {
5155
- color: var(--${t}-text-color);
5154
+ .${e}-list-col-title {
5155
+ color: var(--${e}-text-color);
5156
5156
  white-space: pre-wrap;
5157
5157
  overflow-wrap: anywhere;
5158
5158
  word-break: break-word;
@@ -5162,7 +5162,7 @@ a.${t}-list-item {
5162
5162
  box-sizing: border-box;
5163
5163
  }
5164
5164
 
5165
- .${t}-baseline-probe {
5165
+ .${e}-baseline-probe {
5166
5166
  display: inline-block;
5167
5167
  width: 0;
5168
5168
  height: 0;
@@ -5170,17 +5170,17 @@ a.${t}-list-item {
5170
5170
  vertical-align: baseline;
5171
5171
  }
5172
5172
 
5173
- .${t}-col-resize-handle,
5174
- .${t}-padding-control-handle,
5175
- .${t}-text-padding-lr-handle {
5173
+ .${e}-col-resize-handle,
5174
+ .${e}-padding-control-handle,
5175
+ .${e}-text-padding-lr-handle {
5176
5176
  background: transparent;
5177
5177
  }
5178
5178
 
5179
- .${t}-padding-control-handle[data-controls-axis="x"][data-controls-variant="column-padding"]::after,
5180
- .${t}-text-padding-lr-handle::after {
5179
+ .${e}-padding-control-handle[data-controls-axis="x"][data-controls-variant="column-padding"]::after,
5180
+ .${e}-text-padding-lr-handle::after {
5181
5181
  content: '';
5182
5182
  position: absolute;
5183
- top: var(--${t}-first-entry-handle-top, 50%);
5183
+ top: var(--${e}-first-entry-handle-top, 50%);
5184
5184
  left: 50%;
5185
5185
  transform: translate(-50%, -50%);
5186
5186
  width: 4px;
@@ -5192,11 +5192,11 @@ a.${t}-list-item {
5192
5192
  pointer-events: none;
5193
5193
  }
5194
5194
 
5195
- .${t}-text-padding-lr-handle::after {
5195
+ .${e}-text-padding-lr-handle::after {
5196
5196
  top: 50%;
5197
5197
  }
5198
5198
 
5199
- .${t}-padding-control-handle[data-controls-axis="y"]::after {
5199
+ .${e}-padding-control-handle[data-controls-axis="y"]::after {
5200
5200
  content: '';
5201
5201
  position: absolute;
5202
5202
  top: 50%;
@@ -5211,33 +5211,33 @@ a.${t}-list-item {
5211
5211
  pointer-events: none;
5212
5212
  }
5213
5213
 
5214
- .${t}-padding-control-handle[data-controls-variant="row-padding"][data-controls-axis="y"]::after,
5215
- .${t}-padding-control-handle[data-controls-variant="column-padding"][data-controls-axis="y"]::after {
5214
+ .${e}-padding-control-handle[data-controls-variant="row-padding"][data-controls-axis="y"]::after,
5215
+ .${e}-padding-control-handle[data-controls-variant="column-padding"][data-controls-axis="y"]::after {
5216
5216
  left: 20px;
5217
5217
  transform: translateY(-50%);
5218
5218
  }
5219
5219
 
5220
- .${t}-wrapper.${t}-type-b .${t}-padding-control-handle[data-controls-variant="row-padding"][data-controls-axis="y"]::after,
5221
- .${t}-wrapper.${t}-type-b .${t}-padding-control-handle[data-controls-variant="column-padding"][data-controls-axis="y"]::after {
5220
+ .${e}-wrapper.${e}-type-b .${e}-padding-control-handle[data-controls-variant="row-padding"][data-controls-axis="y"]::after,
5221
+ .${e}-wrapper.${e}-type-b .${e}-padding-control-handle[data-controls-variant="column-padding"][data-controls-axis="y"]::after {
5222
5222
  left: 50%;
5223
5223
  transform: translate(-50%, -50%);
5224
5224
  }
5225
5225
 
5226
- .${t}-row-padding-handle {
5226
+ .${e}-row-padding-handle {
5227
5227
  width: 100%;
5228
5228
  flex-shrink: 0;
5229
5229
  background: transparent;
5230
5230
  }
5231
5231
 
5232
- .${t}-list-col-wrap {
5232
+ .${e}-list-col-wrap {
5233
5233
  position: relative;
5234
5234
  }
5235
5235
 
5236
- .${t}-list-cols-row-controls {
5236
+ .${e}-list-cols-row-controls {
5237
5237
  position: relative;
5238
5238
  }
5239
5239
 
5240
- .${t}-col-resize-handle::after {
5240
+ .${e}-col-resize-handle::after {
5241
5241
  content: '';
5242
5242
  position: absolute;
5243
5243
  top: 0;
@@ -5249,7 +5249,7 @@ a.${t}-list-item {
5249
5249
  pointer-events: none;
5250
5250
  }
5251
5251
 
5252
- .${t}-wrapper.${t}-type-b .${t}-col-resize-handle::after {
5252
+ .${e}-wrapper.${e}-type-b .${e}-col-resize-handle::after {
5253
5253
  top: 50%;
5254
5254
  left: 0;
5255
5255
  transform: translateY(-50%);
@@ -5257,91 +5257,91 @@ a.${t}-list-item {
5257
5257
  height: 2px;
5258
5258
  }
5259
5259
 
5260
- .${t}-wrapper.${t}-entry-hover-default .${t}-list-item-has-link,
5261
- .${t}-wrapper.${t}-entry-hover-blinds .${t}-list-item-has-link,
5262
- .${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link,
5263
- .${t}-wrapper.${t}-entry-hover-default .${t}-cut-item,
5264
- .${t}-wrapper.${t}-entry-hover-blinds .${t}-cut-item,
5265
- .${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item {
5260
+ .${e}-wrapper.${e}-entry-hover-default .${e}-list-item-has-link,
5261
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-list-item-has-link,
5262
+ .${e}-wrapper.${e}-entry-hover-reveal .${e}-list-item-has-link,
5263
+ .${e}-wrapper.${e}-entry-hover-default .${e}-cut-item,
5264
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-cut-item,
5265
+ .${e}-wrapper.${e}-entry-hover-reveal .${e}-cut-item {
5266
5266
  transition: background-color 250ms, border-color 250ms;
5267
5267
  }
5268
5268
 
5269
- .${t}-wrapper.${t}-entry-hover-default .${t}-list-item-has-link .${t}-list-col-title,
5270
- .${t}-wrapper.${t}-entry-hover-blinds .${t}-list-item-has-link .${t}-list-col-title,
5271
- .${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link .${t}-list-col-title,
5272
- .${t}-wrapper.${t}-entry-hover-default .${t}-cut-label,
5273
- .${t}-wrapper.${t}-entry-hover-blinds .${t}-cut-label,
5274
- .${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-label {
5269
+ .${e}-wrapper.${e}-entry-hover-default .${e}-list-item-has-link .${e}-list-col-title,
5270
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-list-item-has-link .${e}-list-col-title,
5271
+ .${e}-wrapper.${e}-entry-hover-reveal .${e}-list-item-has-link .${e}-list-col-title,
5272
+ .${e}-wrapper.${e}-entry-hover-default .${e}-cut-label,
5273
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-cut-label,
5274
+ .${e}-wrapper.${e}-entry-hover-reveal .${e}-cut-label {
5275
5275
  transition: color 250ms;
5276
5276
  }
5277
5277
 
5278
- .${t}-wrapper.${t}-entry-hover-default .${t}-list-item-has-link:hover,
5279
- .${t}-wrapper.${t}-entry-hover-default.${t}-state-hover .${t}-list-item-has-link,
5280
- .${t}-wrapper.${t}-entry-hover-default .${t}-cut-item:hover,
5281
- .${t}-wrapper.${t}-entry-hover-default.${t}-state-hover .${t}-cut-item {
5282
- background: var(--${t}-background-hover-color);
5283
- }
5284
-
5285
- .${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-default .${t}-list-item-has-link:hover,
5286
- .${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-default .${t}-list-item:has(+ .${t}-list-item-has-link:hover),
5287
- .${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-default .${t}-list-item:has(+ .${t}-cut-item:hover),
5288
- .${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-default.${t}-state-hover .${t}-list-item-has-link,
5289
- .${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-default .${t}-cut-item:hover,
5290
- .${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-default.${t}-state-hover .${t}-cut-item,
5291
- .${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-blinds .${t}-list-item-has-link:hover,
5292
- .${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-blinds .${t}-list-item:has(+ .${t}-list-item-has-link:hover),
5293
- .${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-blinds .${t}-list-item:has(+ .${t}-cut-item:hover),
5294
- .${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-blinds.${t}-state-hover .${t}-list-item-has-link,
5295
- .${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-blinds .${t}-cut-item:hover,
5296
- .${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-blinds.${t}-state-hover .${t}-cut-item,
5297
- .${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-reveal .${t}-list-item-has-link:hover,
5298
- .${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-reveal .${t}-list-item:has(+ .${t}-list-item-has-link:hover),
5299
- .${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-reveal .${t}-list-item:has(+ .${t}-cut-item:hover),
5300
- .${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-reveal.${t}-state-hover .${t}-list-item-has-link,
5301
- .${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-reveal .${t}-cut-item:hover,
5302
- .${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-reveal.${t}-state-hover .${t}-cut-item {
5303
- border-bottom-color: var(--${t}-divider-hover-color);
5304
- }
5305
-
5306
- .${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-default .${t}-list-item-has-link:hover:first-child,
5307
- .${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-default.${t}-state-hover .${t}-list-item-has-link:first-child,
5308
- .${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-blinds .${t}-list-item-has-link:hover:first-child,
5309
- .${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-blinds.${t}-state-hover .${t}-list-item-has-link:first-child,
5310
- .${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-reveal .${t}-list-item-has-link:hover:first-child,
5311
- .${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-reveal.${t}-state-hover .${t}-list-item-has-link:first-child {
5312
- border-top-color: var(--${t}-divider-hover-color);
5313
- }
5314
-
5315
- .${t}-wrapper.${t}-divider-top.${t}-divider-bottom.${t}-entry-hover-default .${t}-list-item-has-link:hover:first-child,
5316
- .${t}-wrapper.${t}-divider-top.${t}-divider-bottom.${t}-entry-hover-default.${t}-state-hover .${t}-list-item-has-link:first-child,
5317
- .${t}-wrapper.${t}-divider-top.${t}-divider-bottom.${t}-entry-hover-blinds .${t}-list-item-has-link:hover:first-child,
5318
- .${t}-wrapper.${t}-divider-top.${t}-divider-bottom.${t}-entry-hover-blinds.${t}-state-hover .${t}-list-item-has-link:first-child,
5319
- .${t}-wrapper.${t}-divider-top.${t}-divider-bottom.${t}-entry-hover-reveal .${t}-list-item-has-link:hover:first-child,
5320
- .${t}-wrapper.${t}-divider-top.${t}-divider-bottom.${t}-entry-hover-reveal.${t}-state-hover .${t}-list-item-has-link:first-child {
5321
- border-top-color: var(--${t}-divider-hover-color);
5322
- }
5323
-
5324
- .${t}-wrapper.${t}-entry-hover-default .${t}-list-item-has-link:hover .${t}-list-col-title,
5325
- .${t}-wrapper.${t}-entry-hover-default.${t}-state-hover .${t}-list-item-has-link .${t}-list-col-title,
5326
- .${t}-wrapper.${t}-entry-hover-default .${t}-cut-item:hover .${t}-cut-label,
5327
- .${t}-wrapper.${t}-entry-hover-default.${t}-state-hover .${t}-cut-item .${t}-cut-label,
5328
- .${t}-wrapper.${t}-entry-hover-blinds .${t}-list-item-has-link:hover .${t}-list-col-title,
5329
- .${t}-wrapper.${t}-entry-hover-blinds.${t}-state-hover .${t}-list-item-has-link .${t}-list-col-title,
5330
- .${t}-wrapper.${t}-entry-hover-blinds .${t}-cut-item:hover .${t}-cut-label,
5331
- .${t}-wrapper.${t}-entry-hover-blinds.${t}-state-hover .${t}-cut-item .${t}-cut-label,
5332
- .${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link:hover .${t}-list-col-title,
5333
- .${t}-wrapper.${t}-entry-hover-reveal.${t}-state-hover .${t}-list-item-has-link .${t}-list-col-title,
5334
- .${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item:hover .${t}-cut-label,
5335
- .${t}-wrapper.${t}-entry-hover-reveal.${t}-state-hover .${t}-cut-item .${t}-cut-label {
5336
- color: var(--${t}-text-hover-color);
5337
- }
5338
-
5339
- .${t}-wrapper.${t}-entry-hover-blinds .${t}-list-item-has-link::before,
5340
- .${t}-wrapper.${t}-entry-hover-blinds .${t}-cut-item::before {
5278
+ .${e}-wrapper.${e}-entry-hover-default .${e}-list-item-has-link:hover,
5279
+ .${e}-wrapper.${e}-entry-hover-default.${e}-state-hover .${e}-list-item-has-link,
5280
+ .${e}-wrapper.${e}-entry-hover-default .${e}-cut-item:hover,
5281
+ .${e}-wrapper.${e}-entry-hover-default.${e}-state-hover .${e}-cut-item {
5282
+ background: var(--${e}-background-hover-color);
5283
+ }
5284
+
5285
+ .${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-default .${e}-list-item-has-link:hover,
5286
+ .${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-default .${e}-list-item:has(+ .${e}-list-item-has-link:hover),
5287
+ .${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-default .${e}-list-item:has(+ .${e}-cut-item:hover),
5288
+ .${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-default.${e}-state-hover .${e}-list-item-has-link,
5289
+ .${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-default .${e}-cut-item:hover,
5290
+ .${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-default.${e}-state-hover .${e}-cut-item,
5291
+ .${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-blinds .${e}-list-item-has-link:hover,
5292
+ .${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-blinds .${e}-list-item:has(+ .${e}-list-item-has-link:hover),
5293
+ .${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-blinds .${e}-list-item:has(+ .${e}-cut-item:hover),
5294
+ .${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-blinds.${e}-state-hover .${e}-list-item-has-link,
5295
+ .${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-blinds .${e}-cut-item:hover,
5296
+ .${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-blinds.${e}-state-hover .${e}-cut-item,
5297
+ .${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-reveal .${e}-list-item-has-link:hover,
5298
+ .${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-reveal .${e}-list-item:has(+ .${e}-list-item-has-link:hover),
5299
+ .${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-reveal .${e}-list-item:has(+ .${e}-cut-item:hover),
5300
+ .${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-reveal.${e}-state-hover .${e}-list-item-has-link,
5301
+ .${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-reveal .${e}-cut-item:hover,
5302
+ .${e}-wrapper.${e}-divider-bottom.${e}-entry-hover-reveal.${e}-state-hover .${e}-cut-item {
5303
+ border-bottom-color: var(--${e}-divider-hover-color);
5304
+ }
5305
+
5306
+ .${e}-wrapper.${e}-divider-top:not(.${e}-divider-bottom).${e}-entry-hover-default .${e}-list-item-has-link:hover:first-child,
5307
+ .${e}-wrapper.${e}-divider-top:not(.${e}-divider-bottom).${e}-entry-hover-default.${e}-state-hover .${e}-list-item-has-link:first-child,
5308
+ .${e}-wrapper.${e}-divider-top:not(.${e}-divider-bottom).${e}-entry-hover-blinds .${e}-list-item-has-link:hover:first-child,
5309
+ .${e}-wrapper.${e}-divider-top:not(.${e}-divider-bottom).${e}-entry-hover-blinds.${e}-state-hover .${e}-list-item-has-link:first-child,
5310
+ .${e}-wrapper.${e}-divider-top:not(.${e}-divider-bottom).${e}-entry-hover-reveal .${e}-list-item-has-link:hover:first-child,
5311
+ .${e}-wrapper.${e}-divider-top:not(.${e}-divider-bottom).${e}-entry-hover-reveal.${e}-state-hover .${e}-list-item-has-link:first-child {
5312
+ border-top-color: var(--${e}-divider-hover-color);
5313
+ }
5314
+
5315
+ .${e}-wrapper.${e}-divider-top.${e}-divider-bottom.${e}-entry-hover-default .${e}-list-item-has-link:hover:first-child,
5316
+ .${e}-wrapper.${e}-divider-top.${e}-divider-bottom.${e}-entry-hover-default.${e}-state-hover .${e}-list-item-has-link:first-child,
5317
+ .${e}-wrapper.${e}-divider-top.${e}-divider-bottom.${e}-entry-hover-blinds .${e}-list-item-has-link:hover:first-child,
5318
+ .${e}-wrapper.${e}-divider-top.${e}-divider-bottom.${e}-entry-hover-blinds.${e}-state-hover .${e}-list-item-has-link:first-child,
5319
+ .${e}-wrapper.${e}-divider-top.${e}-divider-bottom.${e}-entry-hover-reveal .${e}-list-item-has-link:hover:first-child,
5320
+ .${e}-wrapper.${e}-divider-top.${e}-divider-bottom.${e}-entry-hover-reveal.${e}-state-hover .${e}-list-item-has-link:first-child {
5321
+ border-top-color: var(--${e}-divider-hover-color);
5322
+ }
5323
+
5324
+ .${e}-wrapper.${e}-entry-hover-default .${e}-list-item-has-link:hover .${e}-list-col-title,
5325
+ .${e}-wrapper.${e}-entry-hover-default.${e}-state-hover .${e}-list-item-has-link .${e}-list-col-title,
5326
+ .${e}-wrapper.${e}-entry-hover-default .${e}-cut-item:hover .${e}-cut-label,
5327
+ .${e}-wrapper.${e}-entry-hover-default.${e}-state-hover .${e}-cut-item .${e}-cut-label,
5328
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-list-item-has-link:hover .${e}-list-col-title,
5329
+ .${e}-wrapper.${e}-entry-hover-blinds.${e}-state-hover .${e}-list-item-has-link .${e}-list-col-title,
5330
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-cut-item:hover .${e}-cut-label,
5331
+ .${e}-wrapper.${e}-entry-hover-blinds.${e}-state-hover .${e}-cut-item .${e}-cut-label,
5332
+ .${e}-wrapper.${e}-entry-hover-reveal .${e}-list-item-has-link:hover .${e}-list-col-title,
5333
+ .${e}-wrapper.${e}-entry-hover-reveal.${e}-state-hover .${e}-list-item-has-link .${e}-list-col-title,
5334
+ .${e}-wrapper.${e}-entry-hover-reveal .${e}-cut-item:hover .${e}-cut-label,
5335
+ .${e}-wrapper.${e}-entry-hover-reveal.${e}-state-hover .${e}-cut-item .${e}-cut-label {
5336
+ color: var(--${e}-text-hover-color);
5337
+ }
5338
+
5339
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-list-item-has-link::before,
5340
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-cut-item::before {
5341
5341
  content: '';
5342
5342
  position: absolute;
5343
5343
  inset: 0;
5344
- background: var(--${t}-background-hover-color);
5344
+ background: var(--${e}-background-hover-color);
5345
5345
  transform: scaleY(0);
5346
5346
  transform-origin: center center;
5347
5347
  opacity: 0;
@@ -5350,27 +5350,27 @@ a.${t}-list-item {
5350
5350
  pointer-events: none;
5351
5351
  }
5352
5352
 
5353
- .${t}-wrapper.${t}-entry-hover-blinds .${t}-list-col,
5354
- .${t}-wrapper.${t}-entry-hover-blinds .${t}-cut-label {
5353
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-list-col,
5354
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-cut-label {
5355
5355
  position: relative;
5356
5356
  z-index: 1;
5357
5357
  }
5358
5358
 
5359
- .${t}-wrapper.${t}-entry-hover-blinds .${t}-list-item-has-link:hover::before,
5360
- .${t}-wrapper.${t}-entry-hover-blinds.${t}-state-hover .${t}-list-item-has-link::before,
5361
- .${t}-wrapper.${t}-entry-hover-blinds .${t}-cut-item:hover::before,
5362
- .${t}-wrapper.${t}-entry-hover-blinds.${t}-state-hover .${t}-cut-item::before {
5359
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-list-item-has-link:hover::before,
5360
+ .${e}-wrapper.${e}-entry-hover-blinds.${e}-state-hover .${e}-list-item-has-link::before,
5361
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-cut-item:hover::before,
5362
+ .${e}-wrapper.${e}-entry-hover-blinds.${e}-state-hover .${e}-cut-item::before {
5363
5363
  transform: scaleY(1);
5364
5364
  opacity: 1;
5365
5365
  transition: transform 250ms, opacity 250ms;
5366
5366
  }
5367
5367
 
5368
- .${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link::before,
5369
- .${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item::before {
5368
+ .${e}-wrapper.${e}-entry-hover-reveal .${e}-list-item-has-link::before,
5369
+ .${e}-wrapper.${e}-entry-hover-reveal .${e}-cut-item::before {
5370
5370
  content: '';
5371
5371
  position: absolute;
5372
5372
  inset: 0;
5373
- background: var(--${t}-background-hover-color);
5373
+ background: var(--${e}-background-hover-color);
5374
5374
  transform: scaleY(0);
5375
5375
  transform-origin: bottom center;
5376
5376
  transition: transform 120ms;
@@ -5378,33 +5378,33 @@ a.${t}-list-item {
5378
5378
  pointer-events: none;
5379
5379
  }
5380
5380
 
5381
- .${t}-wrapper.${t}-entry-hover-reveal .${t}-list-col,
5382
- .${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-label {
5381
+ .${e}-wrapper.${e}-entry-hover-reveal .${e}-list-col,
5382
+ .${e}-wrapper.${e}-entry-hover-reveal .${e}-cut-label {
5383
5383
  position: relative;
5384
5384
  z-index: 1;
5385
5385
  }
5386
5386
 
5387
- .${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link:hover::before,
5388
- .${t}-wrapper.${t}-entry-hover-reveal.${t}-state-hover .${t}-list-item-has-link::before,
5389
- .${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item:hover::before,
5390
- .${t}-wrapper.${t}-entry-hover-reveal.${t}-state-hover .${t}-cut-item::before {
5387
+ .${e}-wrapper.${e}-entry-hover-reveal .${e}-list-item-has-link:hover::before,
5388
+ .${e}-wrapper.${e}-entry-hover-reveal.${e}-state-hover .${e}-list-item-has-link::before,
5389
+ .${e}-wrapper.${e}-entry-hover-reveal .${e}-cut-item:hover::before,
5390
+ .${e}-wrapper.${e}-entry-hover-reveal.${e}-state-hover .${e}-cut-item::before {
5391
5391
  transform: scaleY(1);
5392
5392
  transform-origin: top center;
5393
5393
  }
5394
5394
 
5395
- .${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link.${t}-reveal-from-bottom::before,
5396
- .${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item.${t}-reveal-from-bottom::before {
5395
+ .${e}-wrapper.${e}-entry-hover-reveal .${e}-list-item-has-link.${e}-reveal-from-bottom::before,
5396
+ .${e}-wrapper.${e}-entry-hover-reveal .${e}-cut-item.${e}-reveal-from-bottom::before {
5397
5397
  transform-origin: top center;
5398
5398
  }
5399
5399
 
5400
- .${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link.${t}-reveal-from-bottom:hover::before,
5401
- .${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link.${t}-reveal-from-bottom.${t}-state-hover::before,
5402
- .${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item.${t}-reveal-from-bottom:hover::before,
5403
- .${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item.${t}-reveal-from-bottom.${t}-state-hover::before {
5400
+ .${e}-wrapper.${e}-entry-hover-reveal .${e}-list-item-has-link.${e}-reveal-from-bottom:hover::before,
5401
+ .${e}-wrapper.${e}-entry-hover-reveal .${e}-list-item-has-link.${e}-reveal-from-bottom.${e}-state-hover::before,
5402
+ .${e}-wrapper.${e}-entry-hover-reveal .${e}-cut-item.${e}-reveal-from-bottom:hover::before,
5403
+ .${e}-wrapper.${e}-entry-hover-reveal .${e}-cut-item.${e}-reveal-from-bottom.${e}-state-hover::before {
5404
5404
  transform-origin: bottom center;
5405
5405
  }
5406
5406
 
5407
- .${t}-cut-item {
5407
+ .${e}-cut-item {
5408
5408
  display: flex;
5409
5409
  align-items: stretch;
5410
5410
  width: 100%;
@@ -5413,7 +5413,7 @@ a.${t}-list-item {
5413
5413
  z-index: 3;
5414
5414
  box-sizing: border-box;
5415
5415
  user-select: none;
5416
- background: var(--${t}-background-color);
5416
+ background: var(--${e}-background-color);
5417
5417
  cursor: pointer;
5418
5418
  padding: 0;
5419
5419
  border: none;
@@ -5423,29 +5423,29 @@ a.${t}-list-item {
5423
5423
  -webkit-appearance: none;
5424
5424
  }
5425
5425
 
5426
- .${t}-cut-item .${t}-list-cols-row {
5426
+ .${e}-cut-item .${e}-list-cols-row {
5427
5427
  flex: 1;
5428
5428
  min-height: 100%;
5429
5429
  width: 100%;
5430
5430
  display: flex;
5431
5431
  }
5432
5432
 
5433
- .${t}-wrapper.${t}-divider-bottom .${t}-cut-item {
5433
+ .${e}-wrapper.${e}-divider-bottom .${e}-cut-item {
5434
5434
  border-bottom-style: solid;
5435
- border-bottom-color: var(--${t}-divider-color);
5435
+ border-bottom-color: var(--${e}-divider-color);
5436
5436
  }
5437
5437
 
5438
- .${t}-cut-label {
5438
+ .${e}-cut-label {
5439
5439
  display: block;
5440
5440
  position: relative;
5441
5441
  z-index: 1;
5442
5442
  margin: 0;
5443
- color: var(--${t}-text-color);
5443
+ color: var(--${e}-text-color);
5444
5444
  white-space: pre-wrap;
5445
5445
  overflow-wrap: anywhere;
5446
5446
  word-break: break-word;
5447
5447
  }
5448
- `}const En=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Wr=["AColumn","BColumn","CColumn","DColumn","EColumn"],fn="cutLabel",Ar=[...Wr,fn],Eo=["A","B","C","D","E"];function Is(t){return`${t}ColumnVerticalAlign`}const lr=["Top","Center","Bottom"];function Pr(t){const e=String(t??"Top").trim();if(e.toLowerCase().startsWith("baseline")){const i=e.slice(-1).toUpperCase();return Eo.includes(i)?`Baseline ${i}`:"Top"}const n=e.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":e}function np(t){const e=Pr(t);return e.toLowerCase().startsWith("baseline")?!1:e==="Top"||e==="Center"||e==="Bottom"}function ip(t){const e=String(t??"").trim();if(!e.toLowerCase().startsWith("baseline"))return null;const n=e.slice(-1).toUpperCase();return Eo.includes(n)?n:null}function Es(t,e,n){const i=ip(t);return i?i===e?!1:np(n[Is(i)]):!0}function Ci(t){const e=Pr(t);if(e.toLowerCase().startsWith("baseline")){const n=e.slice(-1).toUpperCase();return Eo.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return e==="Center"?{kind:"center"}:e==="Bottom"?{kind:"bottom"}:{kind:"top"}}function op(t,e,n){if(Rs(t,e,n))return Ci(t);const i=Ci(t);return i.kind==="baseline"?{kind:"top"}:i}function rp(t){const e=Ci(t);return e.kind==="baseline"?{kind:"top"}:e}function Rs(t,e,n){return Es(t,n,e)?Ci(t).kind==="baseline":!1}function lp(t){const e={};let n=!1;for(const i of Eo){const r=Is(i),l=t[r];if(t.type==="b"){const s=String(l??"Top").trim();s!=="Top"&&s!=="Center"&&s!=="Bottom"&&(e[r]="Top",n=!0);continue}Es(l,i,t)||(e[r]="Top",n=!0)}return n?e:null}function sp(t){return t==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:t==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function ap(t){const e=Ci(t).kind;return e==="baseline"?"center":e}function cp(t){return t==="right"?"flex-end":t==="center"?"center":"flex-start"}function wl(t){return t==="center"?"center":t==="bottom"?"flex-end":"flex-start"}function dp(t,e){const n=document.createElement("i");n.className=e,n.setAttribute("aria-hidden","true"),t.prepend(n);const{top:i}=t.getBoundingClientRect(),{bottom:r}=n.getBoundingClientRect(),l=r-i;return n.remove(),l}function jo(t,e,n,i){const r=t.titleEl;if(!r)return 0;const l=r.closest(`.${n}`);if(!l)return 0;const s=dp(r,i);if(t.kind==="baseline")return r.getBoundingClientRect().top-e+s;const d=l.getBoundingClientRect(),a=r.getBoundingClientRect().height;let p=0;return t.kind==="center"?p=(d.height-a)/2:t.kind==="bottom"&&(p=d.height-a),d.top-e+p+s}function up(t,e,n){const i=t.getBoundingClientRect().height;return i<=0?0:(e.forEach(r=>{const l=r.querySelector(`.${n}`);l&&(l.style.minHeight=`${i}px`,l.style.height=`${i}px`)}),i)}function pp(t,e){return!t||!e?(t&&(t.style.transform=""),0):(t.style.transform=`translateY(${e}px)`,e)}const mp={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function qt(t,e){return`${t}${e.replace(/^text/,"Text")}`}const gp={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function hp(t){return[qt(t,"textFontFamily"),qt(t,"textFontSettings"),{type:"row",items:[qt(t,"textFontSize"),qt(t,"textLineHeight"),qt(t,"textLetterSpacing"),qt(t,"textWordSpacing")]},qt(t,"textTextAlign"),qt(t,"textTextAppearance"),`${t}VerticalAlign`]}function fp(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Ar.map(t=>[gp[t],hp(t)]))}}function go(t,e){const n=i=>{const r=qt(e,i);return t[r]};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")??(e===fn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:t.textColor}}function Cl(t,e){var i,r;const n={fontSettings:{fontFamily:t.textFontFamily,fontWeight:((i=t.textFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((r=t.textFontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.textFontSize??.01,lineHeight:t.textLineHeight,letterSpacing:t.textLetterSpacing,wordSpacing:t.textWordSpacing,textAlign:t.textTextAlign,textAppearance:t.textTextAppearance,color:t.textColor??"#767676"};return en(We(n,e))}function Tl(t,e,n,i){const r=go(t,e),l=r.textFontSize??.01,s=r.textLineHeight;return s!==void 0&&s<l?`${n} ${i}`:n}function $l(t,e,n,i){const r=go(t,e),l=r.textFontSize??.01,s=r.textLineHeight;return s===void 0||s>=l?{}:{[`--${n}-title-leading-gap`]:I.scalingValue((l-s)/2,i)}}const Ge=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ii=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],oi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],ri=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],yp={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},vp=["hover","focus","filled","success","error"],Ll=.004,Xn=.004,zo=Xn,Il=12,kr=50,Ti=1440,$i=kr/Ti;function Ms(t){const e=typeof t=="number"&&t>0?t:Ti;return kr/e}function xp(t,e){const n={position:"absolute",width:Il,height:Il,pointerEvents:"auto"};return e==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:e==="center-x"?{...n,left:"50%",top:`var(--${t}-first-entry-handle-top, 50%)`,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function un({P:t,className:e,areaStyle:n,hitPlacement:i,...r}){return o.jsx("div",{className:e,style:{...n,pointerEvents:"none"},...r,children:o.jsx("div",{style:xp(t,i)})})}function bp(t){let e=t??null;for(;e;){const n=e.style.getPropertyValue("--cntrl-article-width").trim();if(n){const r=parseFloat(n);if(Number.isFinite(r)&&r>0)return r}const i=getComputedStyle(e).getPropertyValue("--cntrl-article-width").trim();if(i){const r=parseFloat(i);if(Number.isFinite(r)&&r>0)return r}e=e.parentElement}return Ti}const _s={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function gi(t){const e=typeof t.wrapperWidth=="number"?t.wrapperWidth:1;return Math.max(0,e)}function Sp(t,e=1){const n=e/t;return Object.fromEntries(Ge.map(i=>[i,n]))}function wp(){return Object.fromEntries([...ii.map(t=>[t,0]),...oi.map(t=>[t,0])])}function Cp(){return Object.fromEntries(ri.map(t=>[t,0]))}function Vi(t){return Object.fromEntries(Ge.map(e=>[e,typeof t[e]=="number"?t[e]:_s[e]]))}function Ws(t,e,n){const i=t-$i,r=e+n;if(r<=0||r<=i)return{paddingLeft:e,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const l=i/r;return{paddingLeft:e*l,paddingRight:n*l}}function oo(t,e,n){const i=Fr(t,e,n);if(t<=0)return[];const r=i.slice(0,t-1).reduce((l,s)=>l+s,0);return[...i.slice(0,t-1),Math.max(0,e-r)]}function Tp(t,e,n){const i={};for(let r=0;r<t;r+=1){const l=ii[r],s=oi[r],d=typeof n[l]=="number"?n[l]:0,a=typeof n[s]=="number"?n[s]:0,p=Ws(e[r]??0,d,a);p.paddingLeft!==d&&(i[l]=p.paddingLeft),p.paddingRight!==a&&(i[s]=p.paddingRight)}return i}function Fr(t,e,n){if(t<=0)return[];const i=Ge.slice(0,t).map(p=>n[p]);if(t===1)return i;const r=i.slice(0,t-1),s=r.reduce((p,u)=>p+u,0)+$i;if(e>=s)return i;const d=[...r];let a=s-e;for(let p=d.length-1;p>=0&&a>0;p-=1){const u=d[p]-$i;if(u<=0)continue;const S=Math.min(a,u);d[p]-=S,a-=S}return[...d,i[t-1]]}function $p(t,e,n){if(t<=1)return{};const i=Fr(t,e,n),r={};for(let l=0;l<t-1;l+=1){const s=Ge[l];i[l]!==n[s]&&(r[s]=i[l])}return r}function El(t){return Array.isArray(t.columnsOrder)&&t.columnsOrder.length>0?t.columnsOrder:[...En]}function Lp(t,e){return t.length!==e.length?!1:t.every((n,i)=>n===e[i])}function Ip(t,e,n,i){const r=Math.min(i,t.length,Ge.length),l={};for(let s=0;s<r;s+=1){const d=t[s],a=e.indexOf(d);if(a===-1)continue;const p=Ge[a],u=ii[a],S=oi[a],x=ri[a],y=Ge[s],m=ii[s],f=oi[s],L=ri[s],w=n[p],$=n[u],C=n[S],P=n[x];typeof w=="number"&&(l[y]=w),typeof $=="number"&&(l[m]=$),typeof C=="number"&&(l[f]=C),typeof P=="number"&&(l[L]=P)}return l}function As(t,e){const n=new Set([...Object.keys(t),...Object.keys(e)]);for(const i of n)if(t[i]!==e[i])return!0;return!1}function Ep(t,e){const n=t.columns,i=e.columns;if(typeof n!="number"||n===i)return t;const r=gi(t),l=t.type==="b"||t.type===void 0&&e.type==="b",s={...t,...Sp(n,r),...wp()};if(l)for(const d of ri)typeof e[d]=="number"&&(s[d]=e[d]);else Object.assign(s,Cp());return As(t,s)?s:t}function Rp(t,e,n){const i=lp(t);i&&(t={...t,...i});const r=Ms(n==null?void 0:n.designWidth),l=t.columns,s=e.columns,d=gi(t),a=gi(e),p=t.type==="b"||t.type===void 0&&e.type==="b",u=typeof l=="number"?l:typeof s=="number"?s:En.length,S=C=>{if(p)return C;const P=Vi({...e,...C}),E=gi(C),k=oo(u,E,P),b=Tp(u,k,{...e,...C});return Object.keys(b).length===0?C:{...C,...b}};if(typeof l=="number"&&l!==s)return t;const x=El(t),y=El(e);if(!Lp(x,y))return S({...t,...Ip(x,y,e,u)});if(d<a&&typeof u=="number"&&!p){const C=Vi({...e,...t});return S({...t,...$p(u,d,C)})}if(p){const C=typeof t.textPaddingLR=="number"?t.textPaddingLR:0,P=Math.max(0,(d-r)/2);return C>P?{...t,textPaddingLR:P}:t}const m=Vi({...e,...t}),f=oo(u,a,Vi(e)),w=oo(u,d,m).some((C,P)=>C<(f[P]??C)),$=Ge.some(C=>{const P=t[C],E=e[C];return typeof P=="number"&&typeof E=="number"&&P!==E});return w||$?S(t):t}function Mp(t,e,n,i){const r=e.slice(0,t).reduce((s,d)=>s+d,0),l=n.slice(t+1,e.length-1).reduce((s,d)=>s+d,0);return Math.max($i,i-r-l-$i)}function _p(t,e){return Math.random()*(e-t)+t}function Wp(t){return Object.fromEntries(Ge.map(e=>[e,typeof t[e]=="number"?t[e]:_s[e]]))}function Vo(t,e,n=0){return Object.fromEntries(e.map(i=>[i,typeof t[i]=="number"?t[i]:n]))}function Ap(t,e,n,i,r,l){return t.slice(0,e).map((s,d)=>{const a=ii[d],p=oi[d],u=ri[d];return{key:s,textPrefix:mp[s],widthKey:Ge[d],width:n[Ge[d]],paddingLeftKey:a,paddingRightKey:p,paddingBottomKey:u,paddingLeft:i[a],paddingRight:r[p],paddingBottom:l[u]}})}function Pp({settings:t,content:e,isEditor:n,isPreviewMode:i,isEditMode:r,activeEvent:l,layoutId:s,onUpdateSettings:d}){const{prefix:a}=I.useScopedStyles(),p=!!r,{columns:u,type:S,wrapperWidth:x,entriesCount:y,cellMinHeight:m,dividerWidth:f,showVisibility:L,cut:w,showCut:$,cutCellMinHeight:C,cutLabel:P,imageSize:E,imageOnHover:k,entryHoverEffect:b,entryHoverShowOption:M,rowPaddingTop:z,rowPaddingBottom:h,rowPaddingTopB:T,columnsOrder:_,textPaddingLR:N,textColor:V,backgroundColor:at,dividerColor:O,textHoverColor:W,backgroundHoverColor:G,dividerHoverColor:K}=t,[H,q]=c.useState(void 0),[et,lt]=c.useState(null),F=k==="on"&&(!n||i),ct=(w??0)>0,g=S==="b",nt=c.useRef(null),ft=c.useRef(null),[it,wt]=c.useState(null),[mt,ot]=c.useState(Ti),B=Ms(mt),Q=Math.max(0,((x??0)-B)/2),U=Math.min(N??0,Q),Y=Math.max(U,Xn),It=((x??0)+B)/2;c.useLayoutEffect(()=>{if(!n){ot(Ti);return}const tt=()=>{ot(bp(nt.current))};tt();const yt=nt.current;if(!yt)return;const Lt=new ResizeObserver(tt);Lt.observe(yt);let Ot=yt;for(;Ot&&!Ot.style.getPropertyValue("--cntrl-article-width");)Ot=Ot.parentElement;return Ot&&Lt.observe(Ot),()=>Lt.disconnect()},[n,s]),c.useEffect(()=>{q(void 0)},[w,$,e,y]),c.useEffect(()=>{n&&!i&&q(void 0)},[n,i]);const Mt=I.buildColorVars(a,{textColor:V,backgroundColor:at,dividerColor:O,textHoverColor:W,backgroundHoverColor:G,dividerHoverColor:K},yp,vp),At=l&&l!=="default"?`${a}-state-${l}`:"",xt=`${!n||i?b==="default"?`${a}-entry-hover-default`:b==="blinds"?`${a}-entry-hover-blinds`:b==="reveal"?`${a}-entry-hover-reveal`:"":""} ${At}`.trim(),j=b==="reveal"&&(!n||i),st=(L==null?void 0:L[0])??!1,A=(L==null?void 0:L[1])??!1,D=c.useRef(t),X=c.useRef(s);c.useEffect(()=>{if(!d||!n){D.current=t,X.current=s;return}if(X.current!==s){D.current=t,X.current=s;return}const tt=D.current;if(!(tt!==t))return;if(typeof tt.columns=="number"&&typeof t.columns=="number"&&tt.columns!==t.columns){D.current=t;return}const Lt=Rp(t,tt,{designWidth:mt});D.current=t,As(t,Lt)&&d(Lt)},[t,d,n,s,mt]);const J=c.useMemo(()=>Wp(t),[t.AColumnWidth,t.BColumnWidth,t.CColumnWidth,t.DColumnWidth,t.EColumnWidth]),gt=c.useMemo(()=>Vo(t,ii),[t.AColumnPaddingLeft,t.BColumnPaddingLeft,t.CColumnPaddingLeft,t.DColumnPaddingLeft,t.EColumnPaddingLeft]),Ct=c.useMemo(()=>Vo(t,oi),[t.AColumnPaddingRight,t.BColumnPaddingRight,t.CColumnPaddingRight,t.DColumnPaddingRight,t.EColumnPaddingRight]),Dt=c.useMemo(()=>Vo(t,ri),[t.AColumnPaddingBottom,t.BColumnPaddingBottom,t.CColumnPaddingBottom,t.DColumnPaddingBottom,t.EColumnPaddingBottom]),Rt=c.useMemo(()=>Array.isArray(_)&&_.length>0?_:[...En],[_]),$t=c.useMemo(()=>Ap(Rt,u,J,gt,Ct,Dt),[Rt,u,J,gt,Ct,Dt]),Gt=gi(t),pt=c.useMemo(()=>Ge.slice(0,u).map(tt=>J[tt]),[u,J]),Et=c.useMemo(()=>Fr(u,Gt,J),[u,Gt,J]),jt=c.useMemo(()=>oo(u,Gt,J),[u,Gt,J]),zt=c.useMemo(()=>$t.map((tt,yt)=>Ws(jt[yt]??0,tt.paddingLeft,tt.paddingRight)),[$t,jt]),Vt=c.useMemo(()=>{const tt=y===0?1/0:y;return(e??[]).slice(0,tt).map((Lt,Ot)=>({id:Ot,cells:Object.fromEntries(En.map(Kt=>[Kt,Lt[Kt]??""])),image:Lt.image,link:Lt.link}))},[e,y]),Ie=ct?H??w:Vt.length,pe=c.useMemo(()=>ct?Vt.slice(0,Ie):Vt,[Vt,ct,Ie]),$e=ct&&Ie<Vt.length,Yt=pe.length>1||$e,fe=[st?`${a}-divider-top`:"",A||Yt?`${a}-divider-bottom`:""].filter(Boolean).join(" "),be=!n||i,Oe=()=>{if(!be)return;const tt=H??w;if(!$){q(Vt.length);return}q(Math.min(tt+$,Vt.length))},Wt=tt=>I.scalingValue(tt,n??!1),we=g?T??0:z??0,Qt=h??0,Ee=m??0,ke=we+Ee/2,sn=Math.max(Qt,zo),Ae=bl(0,pe.length,st,A,$e,f??0,n??!1).borderTopWidth,De=it!=null?`${it}px`:`calc(${Ae} + ${Wt(ke)})`,ze=g?"rowPaddingTopB":"rowPaddingTop",Ft=$t[0],ce=$t[$t.length-1],me=zt[0],te=zt[zt.length-1],ee=Ft&&me?Math.max(me.paddingLeft,Xn):0,Fe=ce&&te?Math.max(te.paddingRight,Xn):0,Ve=Gt,Ne=tt=>{const yt=nt.current;if(!yt)return{x:0,y:0};const Lt=yt.getBoundingClientRect();return{x:tt.clientX-Lt.left+Sl,y:tt.clientY-Lt.top+Sl}},bn=(tt,yt)=>{if(!F)return;const Lt=tt.image;if(!(Lt!=null&&Lt.url)){lt(null);return}const{x:Ot,y:Kt}=Ne(yt),Ut=(E==null?void 0:E.min)??80,vt=(E==null?void 0:E.max)??320,ge=(et==null?void 0:et.rowId)===tt.id?et.widthPx:_p(Ut,vt);lt({rowId:tt.id,url:Lt.url,objectFit:"contain",isVideo:Ju(Lt),widthPx:ge,x:Ot,y:Kt})},Jt=tt=>{if(!F||!et)return;const{x:yt,y:Lt}=Ne(tt);lt(Ot=>!Ot||Ot.x===yt&&Ot.y===Lt?Ot:{...Ot,x:yt,y:Lt})},an=()=>{lt(null)},Sn=tt=>{j&&vl(tt,a),F&&lt(null)},Nt=tt=>{j&&xl(tt,a)};c.useLayoutEffect(()=>{if(!p||g){wt(null);return}const tt=ft.current,yt=tt==null?void 0:tt.parentElement;if(!tt||!yt){wt(null);return}const Lt=()=>{const Kt=tt.querySelector("[data-list-row]");if(!Kt){wt(null);return}const Ut=yt.getBoundingClientRect(),vt=Kt.getBoundingClientRect();wt(vt.top-Ut.top+vt.height/2)};Lt();const Ot=new ResizeObserver(Lt);return Ot.observe(tt),Ot.observe(yt),()=>Ot.disconnect()},[p,g,pe,we,Qt,Ee,e,t,$t,jt,mt,f,st,A,$e]);const ye=c.useMemo(()=>!g&&Wr.some(tt=>{const yt=tt.charAt(0),Lt=t[`${tt}VerticalAlign`];return Rs(Lt,t,yt)}),[g,t,t.AColumnVerticalAlign,t.BColumnVerticalAlign,t.CColumnVerticalAlign,t.DColumnVerticalAlign,t.EColumnVerticalAlign]);c.useLayoutEffect(()=>{var ge;const tt=nt.current;if(!tt)return;const yt=()=>{tt.querySelectorAll("[data-list-col]").forEach(oe=>{oe.style.transform="";const de=oe.querySelector(`.${a}-list-col`);de&&(de.style.minHeight="",de.style.height="");const ve=oe.querySelector(`.${a}-list-col-title`);ve&&(ve.style.transform="")})};if(g||!ye){yt();return}const Lt=()=>{const oe=Array.from(tt.querySelectorAll("[data-list-row]")),de=`${a}-list-col`,ve=`${a}-baseline-probe`;oe.forEach(Ht=>{Ht.querySelectorAll("[data-list-col]").forEach(Se=>{Se.style.transform="";const ne=Se.querySelector(`.${de}`);ne&&(ne.style.minHeight="",ne.style.height="");const Ce=Se.querySelector(`.${a}-list-col-title`);Ce&&(Ce.style.transform="")})}),oe.forEach(Ht=>{const Se=Array.from(Ht.querySelectorAll("[data-list-col]"));up(Ht,Se,de)}),tt.offsetHeight,oe.forEach(Ht=>{const Se=Array.from(Ht.querySelectorAll("[data-list-col]")),ne=Ht.getBoundingClientRect().top,Ce=new Map,Qe=Se.map(ue=>{const je=ue.querySelector(`.${a}-list-col-title`),v={el:ue,titleEl:je,letter:ue.getAttribute("data-col-letter")??"",kind:ue.getAttribute("data-valign")??"top",anchor:ue.getAttribute("data-valign-anchor")};return Ce.set(v.letter,v),v}),he=new Map,tn=(ue,je)=>{const v=he.get(ue.letter);if(v!==void 0)return v;const Z=ue.anchor?Ce.get(ue.anchor):void 0;if(ue.kind!=="baseline"||!Z||je.has(ue.letter)){const Me=jo(ue,ne,de,ve);return he.set(ue.letter,Me),Me}je.add(ue.letter);const rt=tn(Z,je);je.delete(ue.letter);const ht=jo(ue,ne,de,ve),kt=rt-ht;pp(ue.titleEl,kt);const ie=jo(ue,ne,de,ve);return he.set(ue.letter,ie),ie};Qe.forEach(ue=>tn(ue,new Set))})};let Ot=null;const Kt=()=>{Ot===null&&(Ot=requestAnimationFrame(()=>{Ot=null,Lt()}))};Lt();const Ut=new ResizeObserver(()=>Kt());Ut.observe(tt);let vt=!1;return typeof document<"u"&&((ge=document.fonts)!=null&&ge.ready)&&document.fonts.ready.then(()=>{vt||Kt()}),()=>{vt=!0,Ot!==null&&(cancelAnimationFrame(Ot),Ot=null),Ut.disconnect(),yt()}},[ye,g,t,e,mt,pe,jt]);const Re=c.useMemo(()=>ep(a),[a]);return o.jsxs(o.Fragment,{children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:Re}}),o.jsx("div",{style:Mt,children:o.jsxs("div",{ref:nt,className:`${a}-wrapper ${xt}${fe?` ${fe}`:""}${g?` ${a}-type-b`:""}`.trim(),style:{width:I.scalingValue(x??0,n),...!g&&p?{[`--${a}-first-entry-handle-top`]:De}:{}},onMouseMove:F?Jt:void 0,onMouseLeave:F?an:void 0,children:[o.jsxs("div",{style:{width:"100%",position:"relative"},children:[pe.map((tt,yt)=>{var Ut;const Lt=(((Ut=tt.link)==null?void 0:Ut.length)??0)>0,Ot=Lt&&(!n||i)?"a":"div",Kt=bl(yt,pe.length,st,A,$e,f??0,n??!1);return o.jsxs(Ot,{ref:yt===0?vt=>{ft.current=vt}:void 0,className:`${a}-list-item${Lt||M==="always"?` ${a}-list-item-has-link`:""}`,...Lt?{href:tt.link,target:"_blank"}:{},style:Kt,onMouseEnter:vt=>{j&&(Lt||M==="always")&&vl(vt,a),F&&bn(tt,vt)},onMouseLeave:vt=>{j&&(Lt||M==="always")&&xl(vt,a)},children:[we>0&&o.jsx("div",{className:`${a}-row-padding-handle`,style:{height:Wt(we)}}),o.jsxs("div",{className:`${a}-list-cols-row${g?"":` ${a}-list-cols-row-h`}${p&&yt===0&&g?` ${a}-list-cols-row-controls`:""}`,...g?{}:{"data-list-row":""},style:g?void 0:{minHeight:Wt(Ee)},children:[$t.map((vt,ge)=>{const oe=ge===$t.length-1,de=zt[ge],ve=vt.paddingBottom,Ht=Qu(tt.cells[vt.key]),Se=g&&Ht&&ve>0,ne=g?{minHeight:Wt(Ee)}:{width:Wt(jt[ge])},Ce=g?{paddingLeft:Wt(U),paddingRight:Wt(U)}:{paddingLeft:Wt(de.paddingLeft),paddingRight:Wt(de.paddingRight)},Qe=vt.textPrefix.charAt(0),he=g?rp(t[`${vt.textPrefix}VerticalAlign`]):op(t[`${vt.textPrefix}VerticalAlign`],t,Qe),tn=g&&Ht&&p&&yt===0;return o.jsxs("div",{className:g?`${a}-list-col-wrap`:void 0,...g?{}:{"data-list-col":"","data-col-letter":Qe,"data-valign":he.kind,...he.kind==="baseline"?{"data-valign-anchor":he.anchorLetter}:{}},children:[o.jsx("div",{className:`${a}-list-col${oe?` ${a}-list-col-last`:""}`,style:{...Ce,...ne,...g?{justifyContent:wl(he.kind)}:{}},"data-test":vt.width,children:o.jsx("span",{className:Tl(t,vt.textPrefix,`${a}-list-col-title`,`${a}-text-tight-leading`),style:{...Cl(go(t,vt.textPrefix),n),...$l(t,vt.textPrefix,a,n),...g?{}:sp(he.kind)},children:tt.cells[vt.key]??null})}),Se&&o.jsx("div",{className:`${a}-row-padding-handle`,style:{height:Wt(ve)}}),tn&&o.jsx(un,{P:a,"data-controls":vt.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Wt(Math.max(ve,zo))}})]},vt.key)}),p&&yt===0&&g&&o.jsxs(o.Fragment,{children:[o.jsx(un,{P:a,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(It),className:`${a}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:Wt(Y),height:"100%"}}),o.jsx(un,{P:a,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(It),className:`${a}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:Wt(Math.max(Y,Gt-Y)),width:Wt(Y),height:"100%"}})]})]}),!g&&Qt>0&&o.jsx("div",{className:`${a}-row-padding-handle`,style:{height:Wt(Qt)}}),p&&yt===0&&!g&&o.jsx(un,{P:a,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Wt(sn)}})]},tt.id)}),p&&o.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:o.jsx(un,{P:a,"data-controls":ze,"data-controls-static-handle":"",...g?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:g?"center":"left-y",areaStyle:{position:"absolute",top:Ae,left:0,width:"100%",height:Wt(Math.max(we,zo))}})},"row-padding-handles"),p&&!g&&Ft&&ce&&o.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[o.jsx(un,{P:a,"data-controls":Ft.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(jt[0]-((me==null?void 0:me.paddingRight)??0)),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:Wt(ee),height:"100%"}}),o.jsx(un,{P:a,"data-controls":ce.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(jt[$t.length-1]-((te==null?void 0:te.paddingLeft)??0)),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Wt(Ve-Fe),width:Wt(Fe),height:"100%"}})]},"column-edge-padding-handles"),p&&!g&&$t.slice(0,-1).map((tt,yt)=>{const Lt=$t[yt+1],Ot=Et.slice(0,yt+1).reduce((oe,de)=>oe+de,0),Kt=zt[yt],Ut=zt[yt+1],vt=Math.max(Kt.paddingRight,Xn),ge=Math.max(Ut.paddingLeft,Xn);return o.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[o.jsx(un,{P:a,"data-controls":tt.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(jt[yt]-Kt.paddingLeft),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Wt(Ot-vt),width:Wt(vt),height:"100%"}}),o.jsx(un,{P:a,"data-controls":Lt.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(jt[yt+1]-Ut.paddingRight),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Wt(Ot),width:Wt(ge),height:"100%"}})]},`${tt.paddingRightKey}-padding`)}),p&&!g&&$t.slice(0,-1).map((tt,yt)=>{const Lt=Mp(yt,Et,pt,Gt),Kt=Et.slice(0,yt+1).reduce((Ut,vt)=>Ut+vt,0)-Ll/2;return o.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:o.jsx("div",{"data-controls":tt.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(kr),"data-controls-max-fraction":String(Lt),"data-controls-variant":"column-width",className:`${a}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Wt(Kt),width:Wt(Ll),height:"calc(100%)",pointerEvents:"auto"}})},`${tt.widthKey}-junction`)})]}),$e&&(()=>{const tt=go(t,fn),yt=ap(t.cutLabelVerticalAlign),Lt=tt.textTextAlign==="justify"||g;return o.jsx("button",{type:"button",className:`${a}-cut-item`,style:{minHeight:Wt(C??0),cursor:be?"pointer":"default",...tp(A,f??0,n??!1)},onClick:be?Oe:void 0,onMouseEnter:j||F?Sn:void 0,onMouseLeave:j?Nt:void 0,children:o.jsx("div",{className:`${a}-list-cols-row`,style:{...g?{paddingLeft:Wt(U),paddingRight:Wt(U)}:{},justifyContent:cp(tt.textTextAlign),alignItems:wl(yt)},children:o.jsx("span",{className:Tl(t,fn,`${a}-cut-label`,`${a}-text-tight-leading`),style:{...Cl(tt,n),...$l(t,fn,a,n),...Lt?{width:"100%"}:{}},children:P})})})})(),F&&et&&(()=>{const tt=io(et.widthPx),yt={width:tt,height:"auto",maxHeight:tt,objectFit:"contain",left:et.x,top:et.y,position:"absolute"};return o.jsx(Zu,{media:et,className:et.isVideo?`${a}-hover-video`:`${a}-hover-image`,style:yt},`${et.rowId}-${et.url}`)})()]})})]})}const kp=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';
5448
+ `}const kn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Or=["AColumn","BColumn","CColumn","DColumn","EColumn"],Sn="cutLabel",Dr=[...Or,Sn],Fo=["A","B","C","D","E"];function Ws(e){return`${e}ColumnVerticalAlign`}const gr=["Top","Center","Bottom"];function jr(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Fo.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function np(e){const t=jr(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function ip(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Fo.includes(n)?n:null}function _s(e,t,n){const i=ip(e);return i?i===t?!1:np(n[Ws(i)]):!0}function Ai(e){const t=jr(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Fo.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function op(e,t,n){if(As(e,t,n))return Ai(e);const i=Ai(e);return i.kind==="baseline"?{kind:"top"}:i}function rp(e){const t=Ai(e);return t.kind==="baseline"?{kind:"top"}:t}function As(e,t,n){return _s(e,n,t)?Ai(e).kind==="baseline":!1}function lp(e){const t={};let n=!1;for(const i of Fo){const o=Ws(i),l=e[o];if(e.type==="b"){const s=String(l??"Top").trim();s!=="Top"&&s!=="Center"&&s!=="Bottom"&&(t[o]="Top",n=!0);continue}_s(l,i,e)||(t[o]="Top",n=!0)}return n?t:null}function sp(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function ap(e){const t=Ai(e).kind;return t==="baseline"?"center":t}function cp(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Ll(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function dp(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),l=o-i;return n.remove(),l}function Yo(e,t,n,i){const o=e.titleEl;if(!o)return 0;const l=o.closest(`.${n}`);if(!l)return 0;const s=dp(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+s;const d=l.getBoundingClientRect(),a=o.getBoundingClientRect().height;let p=0;return e.kind==="center"?p=(d.height-a)/2:e.kind==="bottom"&&(p=d.height-a),d.top-t+p+s}function up(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const l=o.querySelector(`.${n}`);l&&(l.style.minHeight=`${i}px`,l.style.height=`${i}px`)}),i)}function pp(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const mp={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Xe(e,t){return`${e}${t.replace(/^text/,"Text")}`}const gp={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function hp(e){return[Xe(e,"textFontFamily"),Xe(e,"textFontSettings"),{type:"row",items:[Xe(e,"textFontSize"),Xe(e,"textLineHeight"),Xe(e,"textLetterSpacing"),Xe(e,"textWordSpacing")]},Xe(e,"textTextAlign"),Xe(e,"textTextAppearance"),`${e}VerticalAlign`]}function fp(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Dr.map(e=>[gp[e],hp(e)]))}}function wo(e,t){const n=i=>{const o=Xe(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===Sn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function El(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 sn(Pt(n,t))}function Il(e,t,n,i){const o=wo(e,t),l=o.textFontSize??.01,s=o.textLineHeight;return s!==void 0&&s<l?`${n} ${i}`:n}function Rl(e,t,n,i){const o=wo(e,t),l=o.textFontSize??.01,s=o.textLineHeight;return s===void 0||s>=l?{}:{[`--${n}-title-leading-gap`]:R.scalingValue((l-s)/2,i)}}const qt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],mi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],gi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],hi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],yp={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},vp=["hover","focus","filled","success","error"],Ml=.004,ri=.004,Jo=ri,Wl=12,zr=50,Pi=1440,ki=zr/Pi;function Ps(e){const t=typeof e=="number"&&e>0?e:Pi;return zr/t}function xp(e,t){const n={position:"absolute",width:Wl,height:Wl,pointerEvents:"auto"};return t==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:t==="center-x"?{...n,left:"50%",top:`var(--${e}-first-entry-handle-top, 50%)`,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function fn({P:e,className:t,areaStyle:n,hitPlacement:i,...o}){return r.jsx("div",{className:t,style:{...n,pointerEvents:"none"},...o,children:r.jsx("div",{style:xp(e,i)})})}function bp(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 Pi}const ks={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Ti(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Sp(e,t=1){const n=t/e;return Object.fromEntries(qt.map(i=>[i,n]))}function wp(){return Object.fromEntries([...mi.map(e=>[e,0]),...gi.map(e=>[e,0])])}function Cp(){return Object.fromEntries(hi.map(e=>[e,0]))}function Zi(e){return Object.fromEntries(qt.map(t=>[t,typeof e[t]=="number"?e[t]:ks[t]]))}function Fs(e,t,n){const i=e-ki,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const l=i/o;return{paddingLeft:t*l,paddingRight:n*l}}function mo(e,t,n){const i=Vr(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((l,s)=>l+s,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Tp(e,t,n){const i={};for(let o=0;o<e;o+=1){const l=mi[o],s=gi[o],d=typeof n[l]=="number"?n[l]:0,a=typeof n[s]=="number"?n[s]:0,p=Fs(t[o]??0,d,a);p.paddingLeft!==d&&(i[l]=p.paddingLeft),p.paddingRight!==a&&(i[s]=p.paddingRight)}return i}function Vr(e,t,n){if(e<=0)return[];const i=qt.slice(0,e).map(p=>n[p]);if(e===1)return i;const o=i.slice(0,e-1),s=o.reduce((p,u)=>p+u,0)+ki;if(t>=s)return i;const d=[...o];let a=s-t;for(let p=d.length-1;p>=0&&a>0;p-=1){const u=d[p]-ki;if(u<=0)continue;const S=Math.min(a,u);d[p]-=S,a-=S}return[...d,i[e-1]]}function $p(e,t,n){if(e<=1)return{};const i=Vr(e,t,n),o={};for(let l=0;l<e-1;l+=1){const s=qt[l];i[l]!==n[s]&&(o[s]=i[l])}return o}function _l(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...kn]}function Lp(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Ep(e,t,n,i){const o=Math.min(i,e.length,qt.length),l={};for(let s=0;s<o;s+=1){const d=e[s],a=t.indexOf(d);if(a===-1)continue;const p=qt[a],u=mi[a],S=gi[a],x=hi[a],v=qt[s],m=mi[s],y=gi[s],$=hi[s],w=n[p],C=n[u],T=n[S],P=n[x];typeof w=="number"&&(l[v]=w),typeof C=="number"&&(l[m]=C),typeof T=="number"&&(l[y]=T),typeof P=="number"&&(l[$]=P)}return l}function Ns(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 Ip(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Ti(e),l=e.type==="b"||e.type===void 0&&t.type==="b",s={...e,...Sp(n,o),...wp()};if(l)for(const d of hi)typeof t[d]=="number"&&(s[d]=t[d]);else Object.assign(s,Cp());return Ns(e,s)?s:e}function Rp(e,t,n){const i=lp(e);i&&(e={...e,...i});const o=Ps(n==null?void 0:n.designWidth),l=e.columns,s=t.columns,d=Ti(e),a=Ti(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof l=="number"?l:typeof s=="number"?s:kn.length,S=T=>{if(p)return T;const P=Zi({...t,...T}),M=Ti(T),F=mo(u,M,P),b=Tp(u,F,{...t,...T});return Object.keys(b).length===0?T:{...T,...b}};if(typeof l=="number"&&l!==s)return e;const x=_l(e),v=_l(t);if(!Lp(x,v))return S({...e,...Ep(x,v,t,u)});if(d<a&&typeof u=="number"&&!p){const T=Zi({...t,...e});return S({...e,...$p(u,d,T)})}if(p){const T=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,P=Math.max(0,(d-o)/2);return T>P?{...e,textPaddingLR:P}:e}const m=Zi({...t,...e}),y=mo(u,a,Zi(t)),w=mo(u,d,m).some((T,P)=>T<(y[P]??T)),C=qt.some(T=>{const P=e[T],M=t[T];return typeof P=="number"&&typeof M=="number"&&P!==M});return w||C?S(e):e}function Mp(e,t,n,i){const o=t.slice(0,e).reduce((s,d)=>s+d,0),l=n.slice(e+1,t.length-1).reduce((s,d)=>s+d,0);return Math.max(ki,i-o-l-ki)}function Wp(e,t){return Math.random()*(t-e)+e}function _p(e){return Object.fromEntries(qt.map(t=>[t,typeof e[t]=="number"?e[t]:ks[t]]))}function Zo(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Ap(e,t,n,i,o,l){return e.slice(0,t).map((s,d)=>{const a=mi[d],p=gi[d],u=hi[d];return{key:s,textPrefix:mp[s],widthKey:qt[d],width:n[qt[d]],paddingLeftKey:a,paddingRightKey:p,paddingBottomKey:u,paddingLeft:i[a],paddingRight:o[p],paddingBottom:l[u]}})}function Pp({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:l,layoutId:s,onUpdateSettings:d}){const{prefix:a}=R.useScopedStyles(),p=!!o,{columns:u,type:S,wrapperWidth:x,entriesCount:v,cellMinHeight:m,dividerWidth:y,showVisibility:$,cut:w,showCut:C,cutCellMinHeight:T,cutLabel:P,imageSize:M,imageOnHover:F,entryHoverEffect:b,entryHoverShowOption:W,rowPaddingTop:K,rowPaddingBottom:h,rowPaddingTopB:L,columnsOrder:E,textPaddingLR:k,textColor:z,backgroundColor:le,dividerColor:O,textHoverColor:_,backgroundHoverColor:q,dividerHoverColor:G}=e,[H,X]=c.useState(void 0),[ne,se]=c.useState(null),N=F==="on"&&(!n||i),de=(w??0)>0,g=S==="b",ie=c.useRef(null),fe=c.useRef(null),[oe,Ce]=c.useState(null),[me,re]=c.useState(Pi),B=Ps(me),Q=Math.max(0,((x??0)-B)/2),U=Math.min(k??0,Q),J=Math.max(U,ri),Me=((x??0)+B)/2;c.useLayoutEffect(()=>{if(!n){re(Pi);return}const te=()=>{re(bp(ie.current))};te();const ye=ie.current;if(!ye)return;const Ie=new ResizeObserver(te);Ie.observe(ye);let De=ye;for(;De&&!De.style.getPropertyValue("--cntrl-article-width");)De=De.parentElement;return De&&Ie.observe(De),()=>Ie.disconnect()},[n,s]),c.useEffect(()=>{X(void 0)},[w,C,t,v]),c.useEffect(()=>{n&&!i&&X(void 0)},[n,i]);const Ae=R.buildColorVars(a,{textColor:z,backgroundColor:le,dividerColor:O,textHoverColor:_,backgroundHoverColor:q,dividerHoverColor:G},yp,vp),ke=l&&l!=="default"?`${a}-state-${l}`:"",xe=`${!n||i?b==="default"?`${a}-entry-hover-default`:b==="blinds"?`${a}-entry-hover-blinds`:b==="reveal"?`${a}-entry-hover-reveal`:"":""} ${ke}`.trim(),j=b==="reveal"&&(!n||i),ae=($==null?void 0:$[0])??!1,A=($==null?void 0:$[1])??!1,D=c.useRef(e),Y=c.useRef(s);c.useEffect(()=>{if(!d||!n){D.current=e,Y.current=s;return}if(Y.current!==s){D.current=e,Y.current=s;return}const te=D.current;if(!(te!==e))return;if(typeof te.columns=="number"&&typeof e.columns=="number"&&te.columns!==e.columns){D.current=e;return}const Ie=Rp(e,te,{designWidth:me});D.current=e,Ns(e,Ie)&&d(Ie)},[e,d,n,s,me]);const Z=c.useMemo(()=>_p(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ge=c.useMemo(()=>Zo(e,mi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),Te=c.useMemo(()=>Zo(e,gi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),je=c.useMemo(()=>Zo(e,hi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),_e=c.useMemo(()=>Array.isArray(E)&&E.length>0?E:[...kn],[E]),Le=c.useMemo(()=>Ap(_e,u,Z,ge,Te,je),[_e,u,Z,ge,Te,je]),Ge=Ti(e),pe=c.useMemo(()=>qt.slice(0,u).map(te=>Z[te]),[u,Z]),We=c.useMemo(()=>Vr(u,Ge,Z),[u,Ge,Z]),ze=c.useMemo(()=>mo(u,Ge,Z),[u,Ge,Z]),Ve=c.useMemo(()=>Le.map((te,ye)=>Fs(ze[ye]??0,te.paddingLeft,te.paddingRight)),[Le,ze]),Ne=c.useMemo(()=>{const te=v===0?1/0:v;return(t??[]).slice(0,te).map((Ie,De)=>({id:De,cells:Object.fromEntries(kn.map(qe=>[qe,Ie[qe]??""])),image:Ie.image,link:Ie.link}))},[t,v]),It=de?H??w:Ne.length,dt=c.useMemo(()=>de?Ne.slice(0,It):Ne,[Ne,de,It]),bt=de&&It<Ne.length,Ze=dt.length>1||bt,yt=[ae?`${a}-divider-top`:"",A||Ze?`${a}-divider-bottom`:""].filter(Boolean).join(" "),Mt=!n||i,Ht=()=>{if(!Mt)return;const te=H??w;if(!C){X(Ne.length);return}X(Math.min(te+C,Ne.length))},Ee=te=>R.scalingValue(te,n??!1),it=g?L??0:K??0,Ue=h??0,ut=m??0,Bt=it+ut/2,rn=Math.max(Ue,Jo),jt=Tl(0,dt.length,ae,A,bt,y??0,n??!1).borderTopWidth,Yt=oe!=null?`${oe}px`:`calc(${jt} + ${Ee(Bt)})`,ln=g?"rowPaddingTopB":"rowPaddingTop",He=Le[0],Tt=Le[Le.length-1],pt=Ve[0],et=Ve[Ve.length-1],mt=He&&pt?Math.max(pt.paddingLeft,ri):0,zt=Tt&&et?Math.max(et.paddingRight,ri):0,Vt=Ge,Jt=te=>{const ye=ie.current;if(!ye)return{x:0,y:0};const Ie=ye.getBoundingClientRect();return{x:te.clientX-Ie.left+$l,y:te.clientY-Ie.top+$l}},pn=(te,ye)=>{if(!N)return;const Ie=te.image;if(!(Ie!=null&&Ie.url)){se(null);return}const{x:De,y:qe}=Jt(ye),Qe=(M==null?void 0:M.min)??80,ve=(M==null?void 0:M.max)??320,$t=(ne==null?void 0:ne.rowId)===te.id?ne.widthPx:Wp(Qe,ve);se({rowId:te.id,url:Ie.url,objectFit:"contain",isVideo:Ju(Ie),widthPx:$t,x:De,y:qe})},Ke=te=>{if(!N||!ne)return;const{x:ye,y:Ie}=Jt(te);se(De=>!De||De.x===ye&&De.y===Ie?De:{...De,x:ye,y:Ie})},Zt=()=>{se(null)},kt=te=>{j&&wl(te,a),N&&se(null)},Pe=te=>{j&&Cl(te,a)};c.useLayoutEffect(()=>{if(!p||g){Ce(null);return}const te=fe.current,ye=te==null?void 0:te.parentElement;if(!te||!ye){Ce(null);return}const Ie=()=>{const qe=te.querySelector("[data-list-row]");if(!qe){Ce(null);return}const Qe=ye.getBoundingClientRect(),ve=qe.getBoundingClientRect();Ce(ve.top-Qe.top+ve.height/2)};Ie();const De=new ResizeObserver(Ie);return De.observe(te),De.observe(ye),()=>De.disconnect()},[p,g,dt,it,Ue,ut,t,e,Le,ze,me,y,ae,A,bt]);const ft=c.useMemo(()=>!g&&Or.some(te=>{const ye=te.charAt(0),Ie=e[`${te}VerticalAlign`];return As(Ie,e,ye)}),[g,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);c.useLayoutEffect(()=>{var $t;const te=ie.current;if(!te)return;const ye=()=>{te.querySelectorAll("[data-list-col]").forEach(gt=>{gt.style.transform="";const ht=gt.querySelector(`.${a}-list-col`);ht&&(ht.style.minHeight="",ht.style.height="");const ot=gt.querySelector(`.${a}-list-col-title`);ot&&(ot.style.transform="")})};if(g||!ft){ye();return}const Ie=()=>{const gt=Array.from(te.querySelectorAll("[data-list-row]")),ht=`${a}-list-col`,ot=`${a}-baseline-probe`;gt.forEach(Be=>{Be.querySelectorAll("[data-list-col]").forEach(vt=>{vt.style.transform="";const rt=vt.querySelector(`.${ht}`);rt&&(rt.style.minHeight="",rt.style.height="");const wt=vt.querySelector(`.${a}-list-col-title`);wt&&(wt.style.transform="")})}),gt.forEach(Be=>{const vt=Array.from(Be.querySelectorAll("[data-list-col]"));up(Be,vt,ht)}),te.offsetHeight,gt.forEach(Be=>{const vt=Array.from(Be.querySelectorAll("[data-list-col]")),rt=Be.getBoundingClientRect().top,wt=new Map,_t=vt.map(tt=>{const Ft=tt.querySelector(`.${a}-list-col-title`),Kt={el:tt,titleEl:Ft,letter:tt.getAttribute("data-col-letter")??"",kind:tt.getAttribute("data-valign")??"top",anchor:tt.getAttribute("data-valign-anchor")};return wt.set(Kt.letter,Kt),Kt}),St=new Map,At=(tt,Ft)=>{const Kt=St.get(tt.letter);if(Kt!==void 0)return Kt;const $n=tt.anchor?wt.get(tt.anchor):void 0;if(tt.kind!=="baseline"||!$n||Ft.has(tt.letter)){const Qt=Yo(tt,rt,ht,ot);return St.set(tt.letter,Qt),Qt}Ft.add(tt.letter);const Bn=At($n,Ft);Ft.delete(tt.letter);const Ln=Yo(tt,rt,ht,ot),Yn=Bn-Ln;pp(tt.titleEl,Yn);const Jn=Yo(tt,rt,ht,ot);return St.set(tt.letter,Jn),Jn};_t.forEach(tt=>At(tt,new Set))})};let De=null;const qe=()=>{De===null&&(De=requestAnimationFrame(()=>{De=null,Ie()}))};Ie();const Qe=new ResizeObserver(()=>qe());Qe.observe(te);let ve=!1;return typeof document<"u"&&(($t=document.fonts)!=null&&$t.ready)&&document.fonts.ready.then(()=>{ve||qe()}),()=>{ve=!0,De!==null&&(cancelAnimationFrame(De),De=null),Qe.disconnect(),ye()}},[ft,g,e,t,me,dt,ze]);const Wt=c.useMemo(()=>tp(a),[a]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Wt}}),r.jsx("div",{style:Ae,children:r.jsxs("div",{ref:ie,className:`${a}-wrapper ${xe}${yt?` ${yt}`:""}${g?` ${a}-type-b`:""}`.trim(),style:{width:R.scalingValue(x??0,n),...!g&&p?{[`--${a}-first-entry-handle-top`]:Yt}:{}},onMouseMove:N?Ke:void 0,onMouseLeave:N?Zt:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[dt.map((te,ye)=>{var Qe;const Ie=(((Qe=te.link)==null?void 0:Qe.length)??0)>0,De=Ie&&(!n||i)?"a":"div",qe=Tl(ye,dt.length,ae,A,bt,y??0,n??!1);return r.jsxs(De,{ref:ye===0?ve=>{fe.current=ve}:void 0,className:`${a}-list-item${Ie||W==="always"?` ${a}-list-item-has-link`:""}`,...Ie?{href:te.link,target:"_blank"}:{},style:qe,onMouseEnter:ve=>{j&&(Ie||W==="always")&&wl(ve,a),N&&pn(te,ve)},onMouseLeave:ve=>{j&&(Ie||W==="always")&&Cl(ve,a)},children:[it>0&&r.jsx("div",{className:`${a}-row-padding-handle`,style:{height:Ee(it)}}),r.jsxs("div",{className:`${a}-list-cols-row${g?"":` ${a}-list-cols-row-h`}${p&&ye===0&&g?` ${a}-list-cols-row-controls`:""}`,...g?{}:{"data-list-row":""},style:g?void 0:{minHeight:Ee(ut)},children:[Le.map((ve,$t)=>{const gt=$t===Le.length-1,ht=Ve[$t],ot=ve.paddingBottom,Be=Qu(te.cells[ve.key]),vt=g&&Be&&ot>0,rt=g?{minHeight:Ee(ut)}:{width:Ee(ze[$t])},wt=g?{paddingLeft:Ee(U),paddingRight:Ee(U)}:{paddingLeft:Ee(ht.paddingLeft),paddingRight:Ee(ht.paddingRight)},_t=ve.textPrefix.charAt(0),St=g?rp(e[`${ve.textPrefix}VerticalAlign`]):op(e[`${ve.textPrefix}VerticalAlign`],e,_t),At=g&&Be&&p&&ye===0;return r.jsxs("div",{className:g?`${a}-list-col-wrap`:void 0,...g?{}:{"data-list-col":"","data-col-letter":_t,"data-valign":St.kind,...St.kind==="baseline"?{"data-valign-anchor":St.anchorLetter}:{}},children:[r.jsx("div",{className:`${a}-list-col${gt?` ${a}-list-col-last`:""}`,style:{...wt,...rt,...g?{justifyContent:Ll(St.kind)}:{}},"data-test":ve.width,children:r.jsx("span",{className:Il(e,ve.textPrefix,`${a}-list-col-title`,`${a}-text-tight-leading`),style:{...El(wo(e,ve.textPrefix),n),...Rl(e,ve.textPrefix,a,n),...g?{}:sp(St.kind)},children:te.cells[ve.key]??null})}),vt&&r.jsx("div",{className:`${a}-row-padding-handle`,style:{height:Ee(ot)}}),At&&r.jsx(fn,{P:a,"data-controls":ve.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Ee(Math.max(ot,Jo))}})]},ve.key)}),p&&ye===0&&g&&r.jsxs(r.Fragment,{children:[r.jsx(fn,{P:a,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Me),className:`${a}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:Ee(J),height:"100%"}}),r.jsx(fn,{P:a,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Me),className:`${a}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:Ee(Math.max(J,Ge-J)),width:Ee(J),height:"100%"}})]})]}),!g&&Ue>0&&r.jsx("div",{className:`${a}-row-padding-handle`,style:{height:Ee(Ue)}}),p&&ye===0&&!g&&r.jsx(fn,{P:a,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Ee(rn)}})]},te.id)}),p&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(fn,{P:a,"data-controls":ln,"data-controls-static-handle":"",...g?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:g?"center":"left-y",areaStyle:{position:"absolute",top:jt,left:0,width:"100%",height:Ee(Math.max(it,Jo))}})},"row-padding-handles"),p&&!g&&He&&Tt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(fn,{P:a,"data-controls":He.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[0]-((pt==null?void 0:pt.paddingRight)??0)),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:Ee(mt),height:"100%"}}),r.jsx(fn,{P:a,"data-controls":Tt.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[Le.length-1]-((et==null?void 0:et.paddingLeft)??0)),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ee(Vt-zt),width:Ee(zt),height:"100%"}})]},"column-edge-padding-handles"),p&&!g&&Le.slice(0,-1).map((te,ye)=>{const Ie=Le[ye+1],De=We.slice(0,ye+1).reduce((gt,ht)=>gt+ht,0),qe=Ve[ye],Qe=Ve[ye+1],ve=Math.max(qe.paddingRight,ri),$t=Math.max(Qe.paddingLeft,ri);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(fn,{P:a,"data-controls":te.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[ye]-qe.paddingLeft),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ee(De-ve),width:Ee(ve),height:"100%"}}),r.jsx(fn,{P:a,"data-controls":Ie.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[ye+1]-Qe.paddingRight),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ee(De),width:Ee($t),height:"100%"}})]},`${te.paddingRightKey}-padding`)}),p&&!g&&Le.slice(0,-1).map((te,ye)=>{const Ie=Mp(ye,We,pe,Ge),qe=We.slice(0,ye+1).reduce((Qe,ve)=>Qe+ve,0)-Ml/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":te.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(zr),"data-controls-max-fraction":String(Ie),"data-controls-variant":"column-width",className:`${a}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ee(qe),width:Ee(Ml),height:"calc(100%)",pointerEvents:"auto"}})},`${te.widthKey}-junction`)})]}),bt&&(()=>{const te=wo(e,Sn),ye=ap(e.cutLabelVerticalAlign),Ie=te.textTextAlign==="justify"||g;return r.jsx("button",{type:"button",className:`${a}-cut-item`,style:{minHeight:Ee(T??0),cursor:Mt?"pointer":"default",...ep(A,y??0,n??!1)},onClick:Mt?Ht:void 0,onMouseEnter:j||N?kt:void 0,onMouseLeave:j?Pe:void 0,children:r.jsx("div",{className:`${a}-list-cols-row`,style:{...g?{paddingLeft:Ee(U),paddingRight:Ee(U)}:{},justifyContent:cp(te.textTextAlign),alignItems:Ll(ye)},children:r.jsx("span",{className:Il(e,Sn,`${a}-cut-label`,`${a}-text-tight-leading`),style:{...El(te,n),...Rl(e,Sn,a,n),...Ie?{width:"100%"}:{}},children:P})})})})(),N&&ne&&(()=>{const te=po(ne.widthPx),ye={width:te,height:"auto",maxHeight:te,objectFit:"contain",left:ne.x,top:ne.y,position:"absolute"};return r.jsx(Zu,{media:ne,className:ne.isVideo?`${a}-hover-video`:`${a}-hover-image`,style:ye},`${ne.rowId}-${ne.url}`)})()]})})]})}const kp=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';
5449
5449
  import { CommonComponentProps } from '../props';
5450
5450
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
5451
5451
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -8456,14 +8456,14 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8456
8456
  </>
8457
8457
  );
8458
8458
  }
8459
- `,di=["A","B","C","D","E"],Rl=[...lr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Pn={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 Fp(t){return{type:"string",label:t,placeholder:"Add Title...",display:{type:"text-input"}}}function Ki(t){return{type:"number",scope:"layout",title:t,min:0,max:100,display:{type:"range-control"}}}function Np(){return Object.fromEntries(di.map((t,e)=>{const n=En[e],i=`${t} column`;return[n,Fp(i)]}))}function Hp(){const t={};for(const e of di)t[`${e}ColumnWidth`]=Ki(`${e} column width`),t[`${e}ColumnPaddingLeft`]=Ki(`${e} column padding left`),t[`${e}ColumnPaddingRight`]=Ki(`${e} column padding right`),t[`${e}ColumnPaddingBottom`]=Ki(`${e} column padding bottom`);return t}function Ml(t={}){const{typeBDefaults:e,...n}=t,i={wrapperWidth:1,columnsOrder:[...En]};for(const l of di)i[`${l}ColumnWidth`]=l==="A"?.0798:.32,i[`${l}ColumnPaddingLeft`]=0,i[`${l}ColumnPaddingRight`]=0,i[`${l}ColumnPaddingBottom`]=0;const r=n.type==="b"&&e?e:{};return{...i,...r,...n}}function Bp(t){const e={};if(t===fn)e[`${t}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...lr]},enum:[...lr]};else{const n=t.charAt(0);e[`${t}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Rl],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Rl]}}return e[qt(t,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},e[qt(t,"textFontSettings")]={...Pn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},e[qt(t,"textFontSize")]={...Pn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},e[qt(t,"textLineHeight")]={...Pn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},e[qt(t,"textLetterSpacing")]={...Pn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},e[qt(t,"textWordSpacing")]={...Pn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},e[qt(t,"textTextAlign")]={...Pn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},e[qt(t,"textTextAppearance")]={...Pn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},e}const Op=Ar.reduce((t,e)=>({...t,...Bp(e)}),{});function Dp(t){return{verticalAlign:t===fn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:t===fn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function jp(t,e={}){var n;return{...Dp(t),...e.default,...(n=e.byPrefix)==null?void 0:n[t]}}const _l=new Set(["textFontFamily","textFontSettings"]);function zp(t,e,n){const i=l=>n===void 0?!0:n==="common"?_l.has(l):!_l.has(l),r={};return i("verticalAlign")&&e.verticalAlign!==void 0&&(r[`${t}VerticalAlign`]=Pr(e.verticalAlign)),i("textFontFamily")&&e.textFontFamily!==void 0&&(r[qt(t,"textFontFamily")]=e.textFontFamily),i("textFontSettings")&&e.textFontSettings!==void 0&&(r[qt(t,"textFontSettings")]=e.textFontSettings),i("textFontSize")&&e.textFontSize!==void 0&&(r[qt(t,"textFontSize")]=e.textFontSize),i("textLineHeight")&&e.textLineHeight!==void 0&&(r[qt(t,"textLineHeight")]=e.textLineHeight),i("textLetterSpacing")&&e.textLetterSpacing!==void 0&&(r[qt(t,"textLetterSpacing")]=e.textLetterSpacing),i("textWordSpacing")&&e.textWordSpacing!==void 0&&(r[qt(t,"textWordSpacing")]=e.textWordSpacing),i("textTextAlign")&&e.textTextAlign!==void 0&&(r[qt(t,"textTextAlign")]=e.textTextAlign),i("textTextAppearance")&&e.textTextAppearance!==void 0&&(r[qt(t,"textTextAppearance")]=e.textTextAppearance),r}function ro(t={},e){return Ar.reduce((n,i)=>({...n,...zp(i,jp(i,t),e)}),{})}const Vp=ro(),Kp=fp();function Ps(t){return[qt(t,"textFontFamily"),qt(t,"textFontSettings"),qt(t,"textFontSize"),qt(t,"textLineHeight"),qt(t,"textLetterSpacing"),qt(t,"textWordSpacing"),qt(t,"textTextAlign"),qt(t,"textTextAppearance"),`${t}VerticalAlign`]}function Up(){const t=[];return Wr.forEach((e,n)=>{const i=En[n],r=Ps(e);for(let l=1;l<En.length;l+=1){const s=[{name:"columns",value:l},...Array.from({length:l},(d,a)=>({name:`columnsOrder.${a}`,value:i,isNotEqual:!0}))];r.forEach(d=>{t.push({if:s,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),t}const Gp=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Ps(fn);const qp=[...di.flatMap(t=>[`${t}ColumnWidth`,`${t}ColumnPaddingLeft`,`${t}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],kn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],Xp=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:kn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:kn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:kn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:kn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:kn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:kn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:kn[6],link:""}],Yp=[...di.flatMap(t=>[`${t}ColumnWidth`,`${t}ColumnPaddingLeft`,`${t}ColumnPaddingRight`,`${t}ColumnPaddingBottom`]),"columnsOrder"],Jp={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Np(),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:Xp},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"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"}},...Hp(),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"}},...Op,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...Vp,...ro({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Ml({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},...ro({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Ml({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},...ro({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Up(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...qp.map(t=>({if:{name:"type",value:"b"},then:{name:`properties.${t}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...di.map(t=>({if:{name:"type",value:"a"},then:{name:`properties.${t}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Yp]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__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__",Kp]}],paletteBookmark:{items:[...Gp],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Zp={element:Pp,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(t,e)=>Ep(t,e),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Jp,sourceCode:kp},yn=t=>t.display==="Cover",Ro=t=>{const e=t.ratioValue??"1:1",n=t.reversed??!1,[i,r]=e.split(":").map(Number);return`${n?r:i} / ${n?i:r}`},Wl=100,Qp=.2,Al=8,ks=({enabled:t,onClose:e,animMs:n=300,isBlockedTarget:i})=>{const[r,l]=c.useState(0),[s,d]=c.useState(!1),a=c.useRef(null),p=c.useRef(0);p.current=r;const u=c.useMemo(()=>typeof window>"u"?Wl:Math.max(Wl,window.innerHeight*Qp),[]),S=c.useCallback(h=>Math.max(0,1-h/(u*1.5)),[u]),x=c.useCallback(h=>Math.max(0,1-h/(u*.45)),[u]),y=c.useCallback(h=>{const T=typeof window<"u"?window.innerHeight:800,_=Math.max(.88,1-h/T*.12);return`translateY(${h}px) scale(${_})`},[]),m=c.useCallback(()=>{a.current=null},[]),f=c.useCallback(()=>{d(!0),l(0),window.setTimeout(()=>d(!1),n),m()},[n,m]),L=c.useCallback(()=>{const h=typeof window<"u"?window.innerHeight:800;d(!0),l(h),window.setTimeout(()=>{e(),m(),d(!1)},Math.min(n,200))},[n,e,m]),w=c.useCallback(h=>{!t||s||h.pointerType==="touch"&&(i!=null&&i(h.target)||(a.current={startX:h.clientX,startY:h.clientY,isLocked:null,pointerId:h.pointerId}))},[t,s,i]),$=c.useCallback(h=>{const T=a.current;if(!t||!T||h.pointerType!=="touch"||T.pointerId!==h.pointerId)return;const _=h.clientX-T.startX,N=h.clientY-T.startY;if(T.isLocked===null){if(Math.abs(_)<Al&&Math.abs(N)<Al)return;if(N>0&&N>Math.abs(_))T.isLocked=!0,h.currentTarget.setPointerCapture(h.pointerId);else{T.isLocked=!1,m();return}}if(!T.isLocked)return;h.preventDefault();const V=Math.max(0,N);p.current=V,l(V)},[t,m]),C=c.useCallback(h=>{const T=a.current;if(!t||!T||h.pointerType!=="touch"||T.pointerId!==h.pointerId)return;const _=T.isLocked===!0;if(h.currentTarget.hasPointerCapture(h.pointerId)&&h.currentTarget.releasePointerCapture(h.pointerId),!_){m();return}h.clientY-T.startY>=u?L():f()},[u,L,t,m,f]),P=c.useCallback(h=>{C(h)},[C]),E=c.useCallback(h=>{C(h)},[C]),k=r>0,b=s?`transform ${n}ms ease`:"none",M=s?`opacity ${n}ms ease`:"none",z=r>0||s;return{isSwipeDragging:k,backdropStyle:{opacity:S(r),transition:M},mediaAreaStyle:{transform:y(r),transition:b,touchAction:k?"none":void 0,willChange:k?"transform":void 0},overlayContentStyle:z?{opacity:x(r),transition:M}:void 0,swipeHandlers:t?{onPointerDown:w,onPointerMove:$,onPointerUp:P,onPointerCancel:E}:{},dismissAreaStyle:t?{touchAction:"none"}:void 0}},tm="[data-lightbox-scrollable]",Fs=()=>{c.useEffect(()=>{const t=window.scrollY,e=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,r=document.body.style.width,l=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${t}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const s=d=>{const a=d.target;a instanceof Element&&a.closest(tm)||d.preventDefault()};return document.addEventListener("touchmove",s,{passive:!1}),()=>{document.removeEventListener("touchmove",s),document.body.style.overflow=e,document.body.style.position=n,document.body.style.top=i,document.body.style.width=r,document.documentElement.style.overflow=l,window.scrollTo(0,t)}},[])},em=(t,e,n,i)=>{const r=Math.min(Math.abs(t)/Math.max(i,1),1);return e+(n-e)*r},nm=t=>{t.style.transition="",t.style.transform="",t.style.willChange=""},im=t=>{const e=getComputedStyle(t).transform;return e==="none"?0:new DOMMatrixReadOnly(e).m41},om=(t,e,n,{duration:i,easing:r,onComplete:l})=>{const s=t.scrollLeft,d=n-s,a=s-n,p=(m,f)=>{nm(e),t.scrollLeft=m,f&&(l==null||l())};if(Math.abs(d)<.5)return p(n,!0),()=>{};let u=!1,S=0;const x=()=>{e.removeEventListener("transitionend",y),clearTimeout(S)},y=m=>{m.target!==e||m.propertyName!=="transform"||u||(u=!0,x(),p(n,!0))};return e.addEventListener("transitionend",y),e.style.willChange="transform",e.style.transition="none",e.style.transform="translate3d(0, 0, 0)",e.offsetHeight,e.style.transition=`transform ${i}ms ${r}`,e.style.transform=`translate3d(${a}px, 0, 0)`,S=window.setTimeout(()=>{u||(u=!0,x(),p(n,!0))},i+64),()=>{u||(u=!0,x(),p(s-im(e),!1))}},Qn=300,rm=900,lm=1500,sm="cubic-bezier(0.16, 1, 0.3, 1)",am=3e3,lo=42;function cm(t){return`
8460
- .${t}-wrapper {
8459
+ `,bi=["A","B","C","D","E"],Al=[...gr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Dn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Fp(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Qi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Np(){return Object.fromEntries(bi.map((e,t)=>{const n=kn[t],i=`${e} column`;return[n,Fp(i)]}))}function Hp(){const e={};for(const t of bi)e[`${t}ColumnWidth`]=Qi(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Qi(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Qi(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Qi(`${t} column padding bottom`);return e}function Pl(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...kn]};for(const l of bi)i[`${l}ColumnWidth`]=l==="A"?.0798:.32,i[`${l}ColumnPaddingLeft`]=0,i[`${l}ColumnPaddingRight`]=0,i[`${l}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function Bp(e){const t={};if(e===Sn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...gr]},enum:[...gr]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Al],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Al]}}return t[Xe(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Xe(e,"textFontSettings")]={...Dn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Xe(e,"textFontSize")]={...Dn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Xe(e,"textLineHeight")]={...Dn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Xe(e,"textLetterSpacing")]={...Dn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Xe(e,"textWordSpacing")]={...Dn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Xe(e,"textTextAlign")]={...Dn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Xe(e,"textTextAppearance")]={...Dn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Op=Dr.reduce((e,t)=>({...e,...Bp(t)}),{});function Dp(e){return{verticalAlign:e===Sn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Sn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function jp(e,t={}){var n;return{...Dp(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const kl=new Set(["textFontFamily","textFontSettings"]);function zp(e,t,n){const i=l=>n===void 0?!0:n==="common"?kl.has(l):!kl.has(l),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=jr(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Xe(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Xe(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Xe(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Xe(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Xe(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Xe(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Xe(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Xe(e,"textTextAppearance")]=t.textTextAppearance),o}function go(e={},t){return Dr.reduce((n,i)=>({...n,...zp(i,jp(i,e),t)}),{})}const Vp=go(),Kp=fp();function Hs(e){return[Xe(e,"textFontFamily"),Xe(e,"textFontSettings"),Xe(e,"textFontSize"),Xe(e,"textLineHeight"),Xe(e,"textLetterSpacing"),Xe(e,"textWordSpacing"),Xe(e,"textTextAlign"),Xe(e,"textTextAppearance"),`${e}VerticalAlign`]}function Gp(){const e=[];return Or.forEach((t,n)=>{const i=kn[n],o=Hs(t);for(let l=1;l<kn.length;l+=1){const s=[{name:"columns",value:l},...Array.from({length:l},(d,a)=>({name:`columnsOrder.${a}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:s,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const Up=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Hs(Sn);const qp=[...bi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],jn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],Xp=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:jn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:jn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:jn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:jn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:jn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:jn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:jn[6],link:""}],Yp=[...bi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Jp={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Np(),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:Xp},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"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"}},...Hp(),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"}},...Op,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...Vp,...go({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Pl({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},...go({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Pl({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},...go({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Gp(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...qp.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}},...bi.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Yp]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__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__",Kp]}],paletteBookmark:{items:[...Up],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Zp={element:Pp,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Ip(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Jp,sourceCode:kp},wn=e=>e.display==="Cover",No=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Fl=100,Qp=.2,Nl=8,Bs=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,l]=c.useState(0),[s,d]=c.useState(!1),a=c.useRef(null),p=c.useRef(0);p.current=o;const u=c.useMemo(()=>typeof window>"u"?Fl:Math.max(Fl,window.innerHeight*Qp),[]),S=c.useCallback(h=>Math.max(0,1-h/(u*1.5)),[u]),x=c.useCallback(h=>Math.max(0,1-h/(u*.45)),[u]),v=c.useCallback(h=>{const L=typeof window<"u"?window.innerHeight:800,E=Math.max(.88,1-h/L*.12);return`translateY(${h}px) scale(${E})`},[]),m=c.useCallback(()=>{a.current=null},[]),y=c.useCallback(()=>{d(!0),l(0),window.setTimeout(()=>d(!1),n),m()},[n,m]),$=c.useCallback(()=>{const h=typeof window<"u"?window.innerHeight:800;d(!0),l(h),window.setTimeout(()=>{t(),m(),d(!1)},Math.min(n,200))},[n,t,m]),w=c.useCallback(h=>{!e||s||h.pointerType==="touch"&&(i!=null&&i(h.target)||(a.current={startX:h.clientX,startY:h.clientY,isLocked:null,pointerId:h.pointerId}))},[e,s,i]),C=c.useCallback(h=>{const L=a.current;if(!e||!L||h.pointerType!=="touch"||L.pointerId!==h.pointerId)return;const E=h.clientX-L.startX,k=h.clientY-L.startY;if(L.isLocked===null){if(Math.abs(E)<Nl&&Math.abs(k)<Nl)return;if(k>0&&k>Math.abs(E))L.isLocked=!0,h.currentTarget.setPointerCapture(h.pointerId);else{L.isLocked=!1,m();return}}if(!L.isLocked)return;h.preventDefault();const z=Math.max(0,k);p.current=z,l(z)},[e,m]),T=c.useCallback(h=>{const L=a.current;if(!e||!L||h.pointerType!=="touch"||L.pointerId!==h.pointerId)return;const E=L.isLocked===!0;if(h.currentTarget.hasPointerCapture(h.pointerId)&&h.currentTarget.releasePointerCapture(h.pointerId),!E){m();return}h.clientY-L.startY>=u?$():y()},[u,$,e,m,y]),P=c.useCallback(h=>{T(h)},[T]),M=c.useCallback(h=>{T(h)},[T]),F=o>0,b=s?`transform ${n}ms ease`:"none",W=s?`opacity ${n}ms ease`:"none",K=o>0||s;return{isSwipeDragging:F,backdropStyle:{opacity:S(o),transition:W},mediaAreaStyle:{transform:v(o),transition:b,touchAction:F?"none":void 0,willChange:F?"transform":void 0},overlayContentStyle:K?{opacity:x(o),transition:W}:void 0,swipeHandlers:e?{onPointerDown:w,onPointerMove:C,onPointerUp:P,onPointerCancel:M}:{},dismissAreaStyle:e?{touchAction:"none"}:void 0}},em="[data-lightbox-scrollable]",Os=()=>{c.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,l=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const s=d=>{const a=d.target;a instanceof Element&&a.closest(em)||d.preventDefault()};return document.addEventListener("touchmove",s,{passive:!1}),()=>{document.removeEventListener("touchmove",s),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=l,window.scrollTo(0,e)}},[])},tm=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},nm=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},im=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},om=(e,t,n,{duration:i,easing:o,onComplete:l})=>{const s=e.scrollLeft,d=n-s,a=s-n,p=(m,y)=>{nm(t),e.scrollLeft=m,y&&(l==null||l())};if(Math.abs(d)<.5)return p(n,!0),()=>{};let u=!1,S=0;const x=()=>{t.removeEventListener("transitionend",v),clearTimeout(S)},v=m=>{m.target!==t||m.propertyName!=="transform"||u||(u=!0,x(),p(n,!0))};return t.addEventListener("transitionend",v),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(${a}px, 0, 0)`,S=window.setTimeout(()=>{u||(u=!0,x(),p(n,!0))},i+64),()=>{u||(u=!0,x(),p(s-im(t),!1))}},ci=300,rm=900,lm=1500,sm="cubic-bezier(0.16, 1, 0.3, 1)",am=3e3,ho=42,cm=2,dm=16,um=.05;function pm(e){return`
8460
+ .${e}-wrapper {
8461
8461
  position: relative;
8462
8462
  width: 100%;
8463
8463
  height: 100%;
8464
8464
  }
8465
8465
 
8466
- .${t}-cover {
8466
+ .${e}-cover {
8467
8467
  position: relative;
8468
8468
  width: 100%;
8469
8469
  height: 100%;
@@ -8471,37 +8471,37 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8471
8471
  pointer-events: auto;
8472
8472
  }
8473
8473
 
8474
- .${t}-ratio-wrapper-cover {
8474
+ .${e}-ratio-wrapper-cover {
8475
8475
  aspect-ratio: var(--image-aspect-ratio);
8476
8476
  height: auto;
8477
8477
  overflow: hidden;
8478
8478
  width: 100%;
8479
8479
  }
8480
8480
 
8481
- .${t}-ratio-wrapper-fit {
8481
+ .${e}-ratio-wrapper-fit {
8482
8482
  height: 100%;
8483
8483
  width: 100%;
8484
8484
  }
8485
8485
 
8486
- .${t}-cover-image {
8486
+ .${e}-cover-image {
8487
8487
  display: block;
8488
8488
  }
8489
8489
 
8490
- .${t}-cover-image-cover {
8490
+ .${e}-cover-image-cover {
8491
8491
  object-fit: cover;
8492
8492
  width: 100%;
8493
8493
  height: 100%;
8494
8494
  max-width: 100%;
8495
8495
  }
8496
8496
 
8497
- .${t}-cover-image-fit {
8497
+ .${e}-cover-image-fit {
8498
8498
  object-fit: contain;
8499
8499
  width: auto;
8500
8500
  height: auto;
8501
8501
  max-width: 100%;
8502
8502
  }
8503
8503
 
8504
- .${t}-lightbox {
8504
+ .${e}-lightbox {
8505
8505
  position: fixed;
8506
8506
  inset: 0;
8507
8507
  z-index: 9997;
@@ -8512,7 +8512,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8512
8512
  overscroll-behavior: none;
8513
8513
  }
8514
8514
 
8515
- .${t}-lightbox-editor {
8515
+ .${e}-lightbox-editor {
8516
8516
  inset: auto;
8517
8517
  top: 0;
8518
8518
  left: var(--cntrl-article-left, 0);
@@ -8520,17 +8520,17 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8520
8520
  height: var(--cntrl-viewport-height, 100vh) !important;
8521
8521
  }
8522
8522
 
8523
- .${t}-lightbox-edit-mode {
8523
+ .${e}-lightbox-edit-mode {
8524
8524
  z-index: 1;
8525
8525
  }
8526
8526
 
8527
- .${t}-lightbox-edit-mode .${t}-lightbox-strip {
8527
+ .${e}-lightbox-edit-mode .${e}-lightbox-strip {
8528
8528
  overflow-x: hidden;
8529
8529
  touch-action: none;
8530
8530
  scroll-snap-type: none;
8531
8531
  }
8532
8532
 
8533
- .${t}-lightbox-content {
8533
+ .${e}-lightbox-content {
8534
8534
  position: relative;
8535
8535
  z-index: 1;
8536
8536
  display: flex;
@@ -8542,13 +8542,13 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8542
8542
  box-sizing: border-box;
8543
8543
  }
8544
8544
 
8545
- .${t}-lightbox-backdrop {
8545
+ .${e}-lightbox-backdrop {
8546
8546
  position: absolute;
8547
8547
  inset: 0;
8548
8548
  pointer-events: none;
8549
8549
  }
8550
8550
 
8551
- .${t}-lightbox-strip {
8551
+ .${e}-lightbox-strip {
8552
8552
  position: relative;
8553
8553
  flex: 1;
8554
8554
  width: 100%;
@@ -8561,7 +8561,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8561
8561
  scrollbar-width: none;
8562
8562
  }
8563
8563
 
8564
- .${t}-lightbox-strip-track {
8564
+ .${e}-lightbox-strip-track {
8565
8565
  display: flex;
8566
8566
  flex-direction: row;
8567
8567
  flex-wrap: nowrap;
@@ -8571,28 +8571,28 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8571
8571
  backface-visibility: hidden;
8572
8572
  }
8573
8573
 
8574
- .${t}-lightbox-strip[data-mouse-dragging="true"] {
8574
+ .${e}-lightbox-strip[data-mouse-dragging="true"] {
8575
8575
  scroll-snap-type: none;
8576
8576
  cursor: grabbing;
8577
8577
  user-select: none;
8578
8578
  }
8579
8579
 
8580
- .${t}-lightbox-strip[data-mouse-draggable="true"] {
8580
+ .${e}-lightbox-strip[data-mouse-draggable="true"] {
8581
8581
  cursor: grab;
8582
8582
  }
8583
8583
 
8584
- .${t}-lightbox-strip::-webkit-scrollbar {
8584
+ .${e}-lightbox-strip::-webkit-scrollbar {
8585
8585
  display: none;
8586
8586
  }
8587
8587
 
8588
- .${t}-strip-item {
8588
+ .${e}-strip-item {
8589
8589
  position: relative;
8590
8590
  flex: 0 0 auto;
8591
8591
  height: 100%;
8592
8592
  scroll-snap-align: start;
8593
8593
  }
8594
8594
 
8595
- .${t}-thumbnails {
8595
+ .${e}-thumbnails {
8596
8596
  position: absolute;
8597
8597
  left: 50%;
8598
8598
  transform: translateX(-50%);
@@ -8607,23 +8607,23 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8607
8607
  scrollbar-width: none;
8608
8608
  pointer-events: auto;
8609
8609
  opacity: 1;
8610
- transition: opacity ${Qn}ms ease;
8610
+ transition: opacity ${ci}ms ease;
8611
8611
  }
8612
8612
 
8613
- .${t}-thumbnails[data-overlay-content-hidden="true"] {
8613
+ .${e}-thumbnails[data-overlay-content-hidden="true"] {
8614
8614
  opacity: 0;
8615
8615
  pointer-events: none;
8616
8616
  }
8617
8617
 
8618
- .${t}-lightbox-editor .${t}-thumbnails {
8618
+ .${e}-lightbox-editor .${e}-thumbnails {
8619
8619
  overflow: visible;
8620
8620
  }
8621
8621
 
8622
- .${t}-thumbnails::-webkit-scrollbar {
8622
+ .${e}-thumbnails::-webkit-scrollbar {
8623
8623
  display: none;
8624
8624
  }
8625
8625
 
8626
- .${t}-thumb {
8626
+ .${e}-thumb {
8627
8627
  flex: 0 0 auto;
8628
8628
  display: flex;
8629
8629
  align-items: center;
@@ -8636,39 +8636,39 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8636
8636
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
8637
8637
  }
8638
8638
 
8639
- .${t}-thumb[data-active="true"] {
8639
+ .${e}-thumb[data-active="true"] {
8640
8640
  opacity: 1;
8641
8641
  }
8642
8642
 
8643
- .${t}-thumbnails[data-thumbnail-active="outline"] .${t}-thumb[data-active="true"] {
8643
+ .${e}-thumbnails[data-thumbnail-active="outline"] .${e}-thumb[data-active="true"] {
8644
8644
  border-color: var(--thumbnail-active-color, #ffffff);
8645
8645
  }
8646
8646
 
8647
- .${t}-thumbnails[data-thumbnail-active="color"] .${t}-thumb:not([data-active="true"]) .${t}-thumb-image {
8647
+ .${e}-thumbnails[data-thumbnail-active="color"] .${e}-thumb:not([data-active="true"]) .${e}-thumb-image {
8648
8648
  filter: grayscale(1);
8649
8649
  }
8650
8650
 
8651
- .${t}-thumbnails[data-thumbnail-active="scale-up"] .${t}-thumb[data-active="true"] {
8651
+ .${e}-thumbnails[data-thumbnail-active="scale-up"] .${e}-thumb[data-active="true"] {
8652
8652
  transform: scale(1.15);
8653
8653
  }
8654
8654
 
8655
8655
 
8656
- .${t}-thumb-image {
8656
+ .${e}-thumb-image {
8657
8657
  display: block;
8658
- height: ${lo}px;
8658
+ height: ${ho}px;
8659
8659
  object-fit: contain;
8660
8660
  transition: filter 0.2s ease;
8661
8661
  }
8662
8662
 
8663
- .${t}-thumb-image-cover {
8663
+ .${e}-thumb-image-cover {
8664
8664
  aspect-ratio: var(--image-aspect-ratio);
8665
- max-width: ${lo}px;
8666
- max-height: ${lo}px;
8665
+ max-width: ${ho}px;
8666
+ max-height: ${ho}px;
8667
8667
  width: auto;
8668
8668
  height: auto;
8669
8669
  object-fit: cover;
8670
8670
  }
8671
- .${t}-close-icon {
8671
+ .${e}-close-icon {
8672
8672
  position: relative;
8673
8673
  flex-shrink: 0;
8674
8674
  grid-area: close;
@@ -8681,15 +8681,15 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8681
8681
  background-color: transparent;
8682
8682
  padding: 0;
8683
8683
  opacity: 1;
8684
- transition: opacity ${Qn}ms ease;
8684
+ transition: opacity ${ci}ms ease;
8685
8685
  }
8686
8686
 
8687
- .${t}-close-icon[data-overlay-content-hidden="true"] {
8687
+ .${e}-close-icon[data-overlay-content-hidden="true"] {
8688
8688
  opacity: 0;
8689
8689
  pointer-events: none;
8690
8690
  }
8691
8691
 
8692
- .${t}-close-icon-inner {
8692
+ .${e}-close-icon-inner {
8693
8693
  all: unset;
8694
8694
  position: relative;
8695
8695
  cursor: pointer;
@@ -8698,14 +8698,14 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8698
8698
  pointer-events: auto;
8699
8699
  }
8700
8700
 
8701
- .${t}-close-icon-img {
8701
+ .${e}-close-icon-img {
8702
8702
  position: absolute;
8703
8703
  top: 50%;
8704
8704
  left: 50%;
8705
8705
  transform: translate(-50%, -50%);
8706
8706
  }
8707
8707
 
8708
- .${t}-header {
8708
+ .${e}-header {
8709
8709
  position: relative;
8710
8710
  display: grid;
8711
8711
  flex: 1;
@@ -8718,12 +8718,12 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8718
8718
  align-items: center;
8719
8719
  }
8720
8720
 
8721
- .${t}-header-single-row {
8721
+ .${e}-header-single-row {
8722
8722
  grid-template-columns: auto auto auto auto 1fr auto;
8723
8723
  grid-template-areas: "margin title1 title2 title3 . close";
8724
8724
  }
8725
8725
 
8726
- .${t}-header-two-row {
8726
+ .${e}-header-two-row {
8727
8727
  height: 100%;
8728
8728
  align-self: stretch;
8729
8729
  display: flex;
@@ -8731,7 +8731,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8731
8731
  width: 100%;
8732
8732
  }
8733
8733
 
8734
- .${t}-header-row-top {
8734
+ .${e}-header-row-top {
8735
8735
  display: flex;
8736
8736
  flex-direction: row;
8737
8737
  align-items: center;
@@ -8739,17 +8739,17 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8739
8739
  flex-shrink: 0;
8740
8740
  }
8741
8741
 
8742
- .${t}-header-row-top .${t}-title-cell[data-title="title1"] {
8742
+ .${e}-header-row-top .${e}-title-cell[data-title="title1"] {
8743
8743
  flex: 0 0 auto;
8744
8744
  min-width: 0;
8745
8745
  }
8746
8746
 
8747
- .${t}-header-row-top .${t}-close-icon {
8747
+ .${e}-header-row-top .${e}-close-icon {
8748
8748
  flex-shrink: 0;
8749
8749
  margin-left: auto;
8750
8750
  }
8751
8751
 
8752
- .${t}-header-row-bottom-wrap {
8752
+ .${e}-header-row-bottom-wrap {
8753
8753
  display: flex;
8754
8754
  flex-direction: column;
8755
8755
  width: 100%;
@@ -8757,7 +8757,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8757
8757
  flex-shrink: 0;
8758
8758
  }
8759
8759
 
8760
- .${t}-header-row-bottom {
8760
+ .${e}-header-row-bottom {
8761
8761
  position: relative;
8762
8762
  display: flex;
8763
8763
  flex-direction: row;
@@ -8765,28 +8765,28 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8765
8765
  width: 100%;
8766
8766
  }
8767
8767
 
8768
- .${t}-header-row-bottom .${t}-title-cell {
8768
+ .${e}-header-row-bottom .${e}-title-cell {
8769
8769
  flex: 0 0 auto;
8770
8770
  }
8771
8771
 
8772
- .${t}-title-cell {
8772
+ .${e}-title-cell {
8773
8773
  position: relative;
8774
8774
  flex: 0 0 auto;
8775
8775
  min-width: 0;
8776
8776
  box-sizing: border-box;
8777
8777
  }
8778
- .${t}-title1,
8779
- .${t}-title2,
8780
- .${t}-title3 {
8778
+ .${e}-title1,
8779
+ .${e}-title2,
8780
+ .${e}-title3 {
8781
8781
  margin: 0;
8782
8782
  min-width: 0;
8783
8783
  }
8784
8784
 
8785
- .${t}-title-resize-handle {
8785
+ .${e}-title-resize-handle {
8786
8786
  background: transparent;
8787
8787
  }
8788
8788
 
8789
- .${t}-title-resize-handle::after {
8789
+ .${e}-title-resize-handle::after {
8790
8790
  content: '';
8791
8791
  position: absolute;
8792
8792
  top: 0;
@@ -8798,7 +8798,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8798
8798
  pointer-events: none;
8799
8799
  }
8800
8800
 
8801
- .${t}-lightbox-content-inner {
8801
+ .${e}-lightbox-content-inner {
8802
8802
  position: absolute;
8803
8803
  inset: 0;
8804
8804
  z-index: 2;
@@ -8806,15 +8806,15 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8806
8806
  display: flex;
8807
8807
  flex-direction: column;
8808
8808
  opacity: 1;
8809
- transition: opacity ${Qn}ms ease;
8809
+ transition: opacity ${ci}ms ease;
8810
8810
  }
8811
8811
 
8812
- .${t}-lightbox-content-inner[data-overlay-content-hidden="true"] {
8812
+ .${e}-lightbox-content-inner[data-overlay-content-hidden="true"] {
8813
8813
  opacity: 0;
8814
8814
  pointer-events: none;
8815
8815
  }
8816
8816
 
8817
- .${t}-lightbox-content-area {
8817
+ .${e}-lightbox-content-area {
8818
8818
  position: relative;
8819
8819
  display: flex;
8820
8820
  flex-direction: row;
@@ -8824,18 +8824,18 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8824
8824
  align-items: flex-start;
8825
8825
  }
8826
8826
 
8827
- .${t}-lightbox-content-area-stacked {
8827
+ .${e}-lightbox-content-area-stacked {
8828
8828
  align-items: stretch;
8829
8829
  }
8830
8830
 
8831
- .${t}-control {
8831
+ .${e}-control {
8832
8832
  position: relative;
8833
8833
  z-index: 2;
8834
8834
  pointer-events: auto;
8835
8835
  flex-shrink: 0;
8836
8836
  }
8837
8837
 
8838
- .${t}-control::before {
8838
+ .${e}-control::before {
8839
8839
  content: "";
8840
8840
  position: absolute;
8841
8841
  top: 0;
@@ -8847,7 +8847,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8847
8847
  pointer-events: auto;
8848
8848
  z-index: 10;
8849
8849
  }
8850
- `}function dm(t){if(!Array.isArray(t)||t.length===0)return{};const e=t.find(r=>(r==null?void 0:r.type)==="paragraph")??t[0],n=e==null?void 0:e.children;if(!Array.isArray(n))return{};const i=n.map(r=>typeof(r==null?void 0:r.text)=="string"?r.text.trim():"").filter(Boolean);return{title1:i[0],title2:i[1],title3:i[2]}}function um(t){for(const e of t)if(e.title1||e.title2||e.title3)return{title1:e.title1??"",title2:e.title2??"",title3:e.title3??""};for(const e of t){const n=dm(e.text);if(n.title1||n.title2||n.title3)return{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}return{title1:"",title2:"",title3:""}}const ki=["title1","title2","title3"];function le(t,e){return`${t}${e.charAt(0).toUpperCase()}${e.slice(1)}`}const pm={title1:"1",title2:"2",title3:"3"};function mm(t){return[le(t,"fontFamily"),le(t,"fontSettings"),{type:"row",items:[le(t,"fontSize"),le(t,"lineHeight"),le(t,"letterSpacing"),le(t,"wordSpacing")]},le(t,"textAlign"),le(t,"textAppearance")]}function gm(){return{type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(ki.map(t=>[pm[t],mm(t)]))}}const hm={title1:"title1Color",title2:"title2Color",title3:"title3Color"},fm={title1:.02,title2:.02,title3:.02},Kn=.004,Ui=.004;function Nr(t,e){if(t<=0)return[];const n=e.slice(0,t),i=n.reduce((l,s)=>l+s,0);if(i<=1)return n;const{widths:r}=[...n].reverse().reduce(({overflow:l,widths:s},d)=>{if(l<=0||d<=0)return{overflow:l,widths:[d,...s]};const a=Math.min(l,d);return{overflow:l-a,widths:[d-a,...s]}},{overflow:i-1,widths:[]});return r}function Ns(t,e){return Nr(t,e)}function Gi(t,e){const n=e.filter((i,r)=>r!==t).reduce((i,r)=>i+r,0);return Math.max(1-n,0)}function Pl(t,e){const n=t.map(i=>e[i.widthKey]??0);return{resolved:Nr(t.length,n),effective:Ns(t.length,n)}}function ym(t,e,n,i,r,l,s){const d=[];return e&&d.push({prefix:"title1",widthKey:"title1Width",className:`${t}-title1`,style:r,text:e}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${t}-title2`,style:l,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${t}-title3`,style:s,text:i}),d}function Ko(t,e){const n=i=>{const r=le(e,i);return t[r]};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:t[hm[e]]}}function vm(t,e,n,i){return t.slice(0,i).reduce((r,l,s)=>r+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(e[s]??0),0)}function Uo(t,e,n){var r,l;const i={fontSettings:{fontFamily:e.fontFamily,fontWeight:((r=e.fontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((l=e.fontSettings)==null?void 0:l.fontStyle)??"normal"},fontSize:e.fontSize??fm[t],lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,wordSpacing:e.wordSpacing,textAlign:e.textAlign,textAppearance:e.textAppearance,color:e.color??"#ffffff"};return We(i,n)}const xm=1,kl=.15,bm=3,Sm=20,Go=t=>`max(${t}, ${Sm}px)`,wm=({prefix:t,images:e,settings:n,isEditor:i,isEditMode:r,isPreviewMode:l,onClose:s})=>{const{backgroundColor:d,thumbnailGap:a,thumbnailMarginBottom:p,imageGap:u,closeIcon:S,closeIconMaxWidth:x,closeIconColor:y,closeIconHoverColor:m,thumbnailTrigger:f,thumbnailVisibility:L,thumbnailObjectFit:w,thumbnailActive:$,thumbnailActiveColor:C,title1Width:P,title2Width:E,title3Width:k,title1MarginLeft:b=0,title2MarginLeft:M=0,title3MarginLeft:z=0,titleRowMarginBottom:h=0,titleHeaderLayout:T="desktop",contentMarginTop:_,iconMarginLeft:N}=n,V=v=>I.scalingValue(v,i??!1),at=V(a),O=V(p??.02),W=V(u??0),G=V(_??0),K=V(N??0),{title1:H,title2:q,title3:et}=um(e),lt=Uo("title1",Ko(n,"title1"),i),F=Uo("title2",Ko(n,"title2"),i),ct=Uo("title3",Ko(n,"title3"),i),g=r,nt=T==="mobile",ft=!r&&(!i||l),it=ft,wt=ft,mt=ft,ot=yn(w),B=ot?{"--image-aspect-ratio":Ro(w)}:void 0,Q=!!(H||q||et),U=c.useMemo(()=>ym(t,H,q,et,lt,F,ct),[t,H,q,et,lt,F,ct]),Y=c.useMemo(()=>({title1Width:P,title2Width:E,title3Width:k}),[P,E,k]),It=c.useMemo(()=>U.map(v=>Y[v.widthKey]),[U,Y]),Mt=c.useMemo(()=>Nr(U.length,It),[U.length,It]),At=c.useMemo(()=>Ns(U.length,It),[U.length,It]),Pt=c.useMemo(()=>U.filter(v=>v.prefix==="title1"),[U]),xt=c.useMemo(()=>U.filter(v=>v.prefix==="title2"||v.prefix==="title3"),[U]),j=c.useMemo(()=>Pl(Pt,Y),[Pt,Y]),st=c.useMemo(()=>Pl(xt,Y),[xt,Y]),A=c.useCallback((v,Z)=>{const rt=U.indexOf(v);if(!nt||Z==="single-row")return{effectiveWidth:At[rt]??0,resolvedWidth:Mt[rt]??0,maxWidth:Gi(rt,Mt)};if(Z==="two-row-top"){const kt=Pt.indexOf(v);return{effectiveWidth:j.effective[kt]??0,resolvedWidth:j.resolved[kt]??0,maxWidth:Gi(kt,j.resolved)}}const ht=xt.indexOf(v);return{effectiveWidth:st.effective[ht]??0,resolvedWidth:st.resolved[ht]??0,maxWidth:Gi(ht,st.resolved)}},[xt,st,At,Mt,U,Pt,j,nt]),D=c.useCallback(v=>I.scalingValue(v,i??!1),[i]),X=D(h??0),J=c.useMemo(()=>({title1MarginLeft:b,title2MarginLeft:M,title3MarginLeft:z}),[b,M,z]),gt=c.useCallback(v=>U.slice(0,v+1).reduce((Z,rt,ht)=>Z+(rt!=null&&rt.marginLeftKey?J[rt.marginLeftKey]??0:0)+(Mt[ht]??0),0)+(nt?0:b??0),[U,J,Mt,nt,b]),Ct=c.useCallback(()=>nt?0:b??0,[nt,b]),Dt=c.useCallback(v=>xt.slice(0,v).reduce((Z,rt,ht)=>Z+(rt.marginLeftKey?J[rt.marginLeftKey]??0:0)+(st.resolved[ht]??0),0),[xt,st.resolved,J]),Rt=c.useCallback(v=>{const Z=xt[v];return Dt(v)+(Z.marginLeftKey?J[Z.marginLeftKey]??0:0)+(st.resolved[v]??0)},[xt,st.resolved,Dt,J]),$t=(v,Z)=>{const rt=v.marginLeftKey?J[v.marginLeftKey]??0:0,{effectiveWidth:ht,resolvedWidth:kt,maxWidth:ie}=A(v,Z),Me=Math.max(rt,Ui),_e=g&&Z==="two-row-top";return o.jsxs("div",{className:`${t}-title-cell`,"data-title":v.prefix,style:{...Z==="single-row"?{gridArea:v.prefix}:{},width:D(ht),...rt>0?{marginLeft:D(rt)}:{}},children:[o.jsx("p",{className:v.className,style:v.style,children:v.text}),_e&&v.marginLeftKey?o.jsx("div",{"data-controls":v.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(kt),style:{position:"absolute",top:0,left:D(-rt),width:D(Me),height:"100%",pointerEvents:"auto"}}):null,_e?o.jsx("div",{"data-controls":v.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ie),"data-controls-variant":"column-width",className:`${t}-title-resize-handle`,style:{position:"absolute",top:0,right:D(-Kn/2),width:D(Kn),height:"100%",pointerEvents:"auto"}}):null]},v.className)},Gt=()=>{const v=nt?-1:U.findIndex(ht=>ht.prefix==="title1"),Z=!nt&&(g||(b??0)>0)?(()=>{const kt=Math.max(b??0,Ui),ie=v>=0?Mt[v]:P;return o.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ie),style:{position:"absolute",top:0,left:0,width:D(kt),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,rt=U.flatMap((ht,kt)=>{if(!ht.marginLeftKey)return[];const ie=J[ht.marginLeftKey]??0,Me=vm(U,Mt,J,kt)+Ct(),_e=Math.max(ie,Ui);return o.jsx("div",{"data-controls":ht.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Mt[kt]),style:{position:"absolute",top:0,left:D(Me),width:D(_e),height:"100%",pointerEvents:"auto"}},ht.marginLeftKey)});return Z?[Z,...rt]:rt},pt=()=>U.map((v,Z)=>{const rt=Gi(Z,Mt),kt=gt(Z)-Kn/2;return o.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:o.jsx("div",{"data-controls":v.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(rt),"data-controls-variant":"column-width",className:`${t}-title-resize-handle`,style:{position:"absolute",top:0,left:D(kt),width:D(Kn),height:"100%",pointerEvents:"auto"}})},`${v.widthKey}-junction`)}),Et=()=>xt.flatMap((v,Z)=>{if(!v.marginLeftKey)return[];const rt=J[v.marginLeftKey]??0,ht=Dt(Z),kt=Math.max(rt,Ui),{resolvedWidth:ie}=A(v,"two-row-bottom");return o.jsx("div",{"data-controls":v.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ie),style:{position:"absolute",top:0,left:D(ht),width:D(kt),height:"100%",pointerEvents:"auto"}},v.marginLeftKey)}),jt=()=>xt.map((v,Z)=>{const{maxWidth:rt}=A(v,"two-row-bottom"),kt=Rt(Z)-Kn/2;return o.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:o.jsx("div",{"data-controls":v.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(rt),"data-controls-variant":"column-width",className:`${t}-title-resize-handle`,style:{position:"absolute",top:0,left:D(kt),width:D(Kn),height:"100%",pointerEvents:"auto"}})},`${v.widthKey}-junction`)}),zt=c.useRef(null),Vt=c.useRef(null),Ie=c.useRef(null),pe=c.useRef([]),$e=c.useRef(0),Yt=c.useRef({isActive:!1,startX:0,scrollLeft:0,hasMoved:!1}),fe=c.useRef(null),be=e.length>1,Oe=be?bm:1,Wt=c.useMemo(()=>Array.from({length:Oe},()=>e).flat(),[e,Oe]),[we,Qt]=c.useState(!1),[Ee,ke]=c.useState(!1),[sn,Ae]=c.useState(!0),[De,ze]=c.useState(0),Ft=c.useRef(De);Ft.current=De;const ce=c.useRef(null),me=c.useRef(!1),te=c.useRef(null),ee=c.useRef(null),Fe=it&&!sn,Ve=c.useCallback(()=>{it&&(Ae(!0),ee.current&&clearTimeout(ee.current),ee.current=setTimeout(()=>{Yt.current.isActive||Ae(!1)},am))},[it]),Ne=c.useCallback(()=>{r||me.current||(me.current=!0,ke(!1),te.current=setTimeout(()=>{s()},Qn))},[r,s]),bn=()=>o.jsxs("div",{className:`${t}-close-icon`,"data-overlay-content-hidden":Fe?"true":"false",style:{width:I.scalingValue(x??0,i),height:I.scalingValue(x??0,i),marginRight:K,"--close-icon-hover-color":m},children:[o.jsx("button",{type:"button",className:`${t}-close-icon-inner`,onClick:Ne,"aria-label":"Close",children:o.jsx(nn,{url:S,fill:y,hoverFill:m,className:`${t}-close-icon-img`})}),g?o.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${t}-control`,style:{position:"absolute",top:0,left:"100%",width:K,height:"100%",pointerEvents:"auto"}}):null]}),Jt=(v="two-row")=>o.jsx("div",{...v==="two-row"&&g?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:D(b??0),flexShrink:0,...v==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...v==="two-row"&&g?{pointerEvents:"auto"}:{}}}),an=()=>{const v=U.find(ht=>ht.prefix==="title1"),Z=U.filter(ht=>ht.prefix==="title2"||ht.prefix==="title3"),rt=Z.length>0||g||(h??0)>0;return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:`${t}-header-row-top`,children:[(b??0)>0||g?Jt():null,v?$t(v,"two-row-top"):null,S?bn():null]}),rt?o.jsxs("div",{className:`${t}-header-row-bottom-wrap`,children:[Z.length>0?o.jsxs("div",{className:`${t}-header-row-bottom`,children:[Z.map(ht=>$t(ht,"two-row-bottom")),g?o.jsxs(o.Fragment,{children:[Et(),jt()]}):null]}):null,o.jsx("div",{"data-controls":g?"titleRowMarginBottom":void 0,"data-controls-axis":g?"y":void 0,"data-controls-reverse":g?"":void 0,className:g?`${t}-control`:void 0,style:{height:X,width:"100%",flexShrink:0,pointerEvents:g?"auto":"none"}})]}):null]})},Sn=()=>o.jsxs(o.Fragment,{children:[(b??0)>0||g?Jt("single-row"):null,U.map(v=>$t(v,"single-row")),g?o.jsxs(o.Fragment,{children:[Gt(),pt()]}):null,S?bn():null]}),Nt=c.useCallback(v=>!!(v.closest("[data-controls]")||v.closest(`.${t}-thumbnails`)||v.closest(`.${t}-close-icon`)),[t]),{isSwipeDragging:ye,backdropStyle:Re,mediaAreaStyle:tt,overlayContentStyle:yt,swipeHandlers:Lt,dismissAreaStyle:Ot}=ks({enabled:ft??!1,onClose:Ne,animMs:Qn,isBlockedTarget:Nt}),Kt=()=>{if(!be||e.length===0)return $e.current=0,0;const v=pe.current[0],Z=pe.current[e.length];if(!v||!Z)return $e.current;const rt=Z.offsetLeft-v.offsetLeft;return rt>0&&($e.current=rt),$e.current},Ut=(v=!1)=>{if(!be)return;const Z=Vt.current,rt=Kt();!Z||rt<=0||(Z.scrollLeft<=0?(Z.scrollLeft+=rt,v&&(Yt.current.scrollLeft+=rt)):Z.scrollLeft>=rt*2&&(Z.scrollLeft-=rt,v&&(Yt.current.scrollLeft-=rt)))},vt=(v=(Z=>(Z=Vt.current)==null?void 0:Z.scrollLeft)()??0)=>pe.current.reduce((rt,ht,kt)=>{if(!ht)return rt;const ie=Math.abs(ht.offsetLeft-v);return ie<rt.distance?{flatIndex:kt,distance:ie}:rt},{flatIndex:0,distance:1/0}).flatIndex,ge=()=>{!Vt.current||e.length===0||ce.current===null&&ze(vt()%e.length)},oe=()=>{ce.current=null},de=v=>{const Z=Vt.current;Z&&(Z.style.scrollSnapType=v?"":"none")},ve=()=>{var v;(v=fe.current)==null||v.call(fe),fe.current=null},Ht=()=>{const v=Ie.current;v&&(v.style.transition="",v.style.transform="",v.style.willChange="")},Se=(v,Z,rt,ht)=>{Ht(),v.scrollLeft=Z,Ut(),rt!==void 0?ze(rt):ge(),de(!0),ht==null||ht()},ne=(v,{behavior:Z="smooth",activeIndex:rt,onComplete:ht}={})=>{const kt=Vt.current,ie=Ie.current;if(!kt||!ie)return;if(ve(),de(!1),Z==="auto"){Se(kt,v,rt,ht);return}const Me=Math.abs(v-kt.scrollLeft),_e=em(Me,rm,lm,kt.clientWidth*.55);fe.current=om(kt,ie,v,{duration:_e,easing:sm,onComplete:()=>{fe.current=null,Se(kt,v,rt,ht)}})},Ce=(v="smooth")=>{if(!Vt.current||e.length===0)return;const rt=vt(),ht=pe.current[rt];ht&&ne(ht.offsetLeft,{behavior:v,activeIndex:rt%e.length})},Qe=(v,Z="smooth")=>{const rt=Vt.current;if(!rt||e.length===0)return;const ht=rt.scrollLeft-v,kt=vt(rt.scrollLeft),ie=pe.current[kt],Me=pe.current[kt+1],_e=ie?Me?Me.offsetLeft-ie.offsetLeft:ie.offsetWidth:0,Wn=_e>0?ht>_e*kl?1:ht<-_e*kl?-1:0:0,wn=be?kt+Wn:Math.max(0,Math.min(Wt.length-1,kt+Wn)),Ni=pe.current[wn];if(!Ni){Ce(Z);return}const ui=wn%e.length;Z==="smooth"&&(ce.current=ui),ze(ui),ne(Ni.offsetLeft,{behavior:Z,activeIndex:ui,onComplete:Z==="smooth"?oe:void 0})},he=(v,Z="smooth")=>{const rt=Vt.current,ht=be?e.length+v:v,kt=pe.current[ht];!rt||!kt||(Z==="smooth"?ce.current=v:ce.current=null,ze(v),ne(kt.offsetLeft,{behavior:Z,activeIndex:v,onComplete:Z==="smooth"?oe:void 0}))},tn=v=>{if(!wt||v.pointerType!=="mouse"||v.button!==0||Nt(v.target))return;const Z=Vt.current;Z&&(ve(),Ht(),ce.current=null,Yt.current={isActive:!0,startX:v.clientX,scrollLeft:Z.scrollLeft,hasMoved:!1},de(!1),Ve(),Z.setPointerCapture(v.pointerId))},ue=v=>{if(!wt||v.pointerType!=="mouse")return;const Z=Vt.current;if(!Z||!Yt.current.isActive)return;const rt=v.clientX-Yt.current.startX;Math.abs(rt)>xm&&(Yt.current.hasMoved=!0,Qt(!0)),Yt.current.hasMoved&&(v.preventDefault(),Z.scrollLeft=Yt.current.scrollLeft-rt,Ut(!0),ge(),Ve())},je=v=>{if(!wt||v.pointerType!=="mouse")return;const Z=Vt.current;if(!Z)return;const rt=Yt.current.hasMoved,ht=Yt.current.scrollLeft;Yt.current.isActive=!1,Qt(!1),Z.hasPointerCapture(v.pointerId)&&Z.releasePointerCapture(v.pointerId),Ut(),rt?Qe(ht):(de(!0),ge()),Ve()};return Fs(),c.useEffect(()=>{const v=requestAnimationFrame(()=>ke(!0));return()=>{cancelAnimationFrame(v),ve(),te.current&&clearTimeout(te.current),ee.current&&clearTimeout(ee.current)}},[]),c.useEffect(()=>{if(!it){Ae(!0);return}Ve();const v=zt.current;if(!v)return;const Z=()=>Ve();return v.addEventListener("pointermove",Z),v.addEventListener("pointerdown",Z),()=>{v.removeEventListener("pointermove",Z),v.removeEventListener("pointerdown",Z),ee.current&&clearTimeout(ee.current)}},[it,Ve]),c.useEffect(()=>{const v=Z=>{Z.key==="Escape"&&Ne()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[Ne]),c.useLayoutEffect(()=>{Kt(),he(Ft.current,"auto")},[W]),c.useLayoutEffect(()=>{Kt(),he(0,"auto")},[e.length,be]),c.useEffect(()=>{if(!r)return;const v=Vt.current;if(!v)return;const Z=rt=>{rt.preventDefault()};return v.addEventListener("wheel",Z,{passive:!1}),v.addEventListener("touchmove",Z,{passive:!1}),()=>{v.removeEventListener("wheel",Z),v.removeEventListener("touchmove",Z)}},[r]),c.useEffect(()=>{const v=Vt.current;if(!v)return;const Z=()=>{Ut(),ge()};v.addEventListener("scroll",Z,{passive:!0});const rt=new ResizeObserver(()=>{Kt(),Ut(),ge()});return rt.observe(v),()=>{ve(),v.removeEventListener("scroll",Z),rt.disconnect()}},[e.length,be]),o.jsxs("div",{"data-selection":"none",className:`${t}-lightbox${i?` ${t}-lightbox-editor`:""}${r?` ${t}-lightbox-edit-mode`:""}`,onClick:()=>{ye||Ne()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Ee?1:0,transition:`opacity ${Qn}ms ease`,pointerEvents:Ee?"auto":"none"},children:[o.jsx("div",{className:`${t}-lightbox-backdrop`,style:{backgroundColor:d,...Re}}),o.jsxs("div",{ref:zt,className:`${t}-lightbox-dismiss-area`,style:{position:"relative",width:"100%",height:"100%",...Ot},...Lt,children:[o.jsx("div",{className:`${t}-lightbox-content`,style:tt,onClick:v=>v.stopPropagation(),children:o.jsx("div",{ref:Vt,className:`${t}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":wt&&e.length>0?"true":"false","data-mouse-dragging":we?"true":"false",onPointerDown:tn,onPointerMove:ue,onPointerUp:je,onPointerCancel:je,children:o.jsx("div",{ref:Ie,className:`${t}-lightbox-strip-track`,style:{gap:W},children:Wt.map((v,Z)=>{const rt=v.image.objectFit??"contain",ht=Z%e.length,kt=Math.floor(Z/e.length),ie=Go(W),Me=`calc(-0.5 * (${ie} + ${W}))`;return o.jsxs("div",{ref:_e=>pe.current[Z]=_e,className:`${t}-strip-item`,style:{height:T==="mobile"?"75vh":"100%"},children:[o.jsx("img",{src:v.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:rt}}),g&&ht<e.length-1&&o.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Me,width:ie,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${kt}-${v.image.url}-${ht}`)})})})}),o.jsxs("div",{className:`${t}-lightbox-content-inner`,"data-overlay-content-hidden":Fe?"true":"false",style:{width:"100%",height:"100%",top:0,bottom:0,...yt},children:[o.jsx("div",{"data-controls":g?"contentMarginTop":void 0,"data-controls-axis":g?"y":void 0,"data-controls-handle-left-fraction":g?"0.05":void 0,className:g?`${t}-control`:void 0,style:{height:G,width:"100%",pointerEvents:g?"auto":"none"}}),o.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0},children:o.jsx("div",{className:`${t}-lightbox-content-area${nt?` ${t}-lightbox-content-area-stacked`:""}`,children:(Q||S)&&o.jsx("div",{className:`${t}-header ${nt?`${t}-header-two-row`:`${t}-header-single-row`}`,children:nt?an():Q||S?Sn():null})})})]}),e.length>1&&L==="on"&&(()=>{const v=Go(O),Z=`calc(-0.5 * (${O} + ${v}))`;return o.jsxs("div",{className:`${t}-thumbnails`,"data-lightbox-scrollable":"","data-thumbnail-active":$,"data-overlay-content-hidden":Fe?"true":"false",onClick:rt=>rt.stopPropagation(),style:{gap:at,bottom:O,"--thumbnail-active-color":C,...yt},children:[e.map((rt,ht)=>{const kt=Go(at),ie=`calc(-0.5 * (${kt} + ${at}))`;return o.jsxs("div",{style:{position:"relative",flex:"0 0 auto"},children:[o.jsx("button",{type:"button",className:`${t}-thumb`,"data-active":De===ht?"true":"false",onClick:()=>ft&&f==="click"&&he(ht),onMouseEnter:()=>mt&&f==="hover"&&he(ht),"aria-label":rt.image.name?`View ${rt.image.name}`:`View image ${ht+1}`,"aria-current":De===ht?"true":void 0,children:o.jsx("img",{className:`${t}-thumb-image${ot?` ${t}-thumb-image-cover`:""}`,src:rt.image.url,alt:"",draggable:!1,style:{...B,...w.display==="Cover"?{width:lo}:{width:"100%"}}})}),g&&ht<e.length-1&&o.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:ie,width:kt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${rt.image.url}-${ht}`)}),g&&o.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":g?"":void 0,style:{position:"absolute",left:0,right:0,bottom:Z,height:v,pointerEvents:"auto",zIndex:3}})]})})()]})]})},Cm=({settings:t,content:e,isEditor:n,isEditMode:i,isPreviewMode:r,portalId:l})=>{const{prefix:s}=I.useScopedStyles(),{cover:d,coverFit:a}=t,p=c.useRef(null),[u,S]=c.useState(!1),x=e??[],y=u||!!i&&x.length>0,m=()=>{i||x.length===0||n&&!r||S(!0)},f=()=>{S(!1)};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{ref:p,className:`${s}-wrapper`,children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:cm(s)}}),d?o.jsx("button",{type:"button",className:`${s}-cover ${yn(a)?`${s}-ratio-wrapper-cover`:`${s}-ratio-wrapper-fit`}`,onClick:m,style:{display:"block",padding:0,border:"none",background:"transparent",...yn(a)?{"--image-aspect-ratio":Ro(a)}:{}},"aria-label":"Open image gallery",children:o.jsx("img",{className:`${s}-cover-image ${yn(a)?`${s}-cover-image-cover`:`${s}-cover-image-fit`}`,src:d,alt:"cover"})}):null]}),y&&typeof document<"u"&&(()=>{const L=(l?document.getElementById(l):null)??document.body;return Li.createPortal(o.jsx(wm,{prefix:s,images:x,settings:t,isEditor:n,isEditMode:i,isPreviewMode:r,onClose:f}),L)})()]})},Tm=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
8850
+ `}function mm(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]}}function gm(e){for(const t of e)if(t.title1||t.title2||t.title3)return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""};for(const t of e){const n=mm(t.text);if(n.title1||n.title2||n.title3)return{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}return{title1:"",title2:"",title3:""}}const Ki=["title1","title2","title3"];function st(e,t){return`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`}const hm={title1:"1",title2:"2",title3:"3"};function fm(e){return[st(e,"fontFamily"),st(e,"fontSettings"),{type:"row",items:[st(e,"fontSize"),st(e,"lineHeight"),st(e,"letterSpacing"),st(e,"wordSpacing")]},st(e,"textAlign"),st(e,"textAppearance")]}function ym(){return{type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ki.map(e=>[hm[e],fm(e)]))}}const vm={title1:"title1Color",title2:"title2Color",title3:"title3Color"},xm={title1:.02,title2:.02,title3:.02},ti=.004,eo=.004;function Kr(e,t){if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((l,s)=>l+s,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:l,widths:s},d)=>{if(l<=0||d<=0)return{overflow:l,widths:[d,...s]};const a=Math.min(l,d);return{overflow:l-a,widths:[d-a,...s]}},{overflow:i-1,widths:[]});return o}function Ds(e,t){return Kr(e,t)}function to(e,t){const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)}function Hl(e,t){const n=e.map(i=>t[i.widthKey]??0);return{resolved:Kr(e.length,n),effective:Ds(e.length,n)}}function bm(e,t,n,i,o,l,s){const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:l,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:s,text:i}),d}function Qo(e,t){const n=i=>{const o=st(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[vm[t]]}}function Sm(e,t,n,i){return e.slice(0,i).reduce((o,l,s)=>o+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(t[s]??0),0)}function er(e,t,n){var o,l;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((l=t.fontSettings)==null?void 0:l.fontStyle)??"normal"},fontSize:t.fontSize??xm[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Pt(i,n)}const wm=1,Bl=.15,Cm=3,Tm=20,tr=e=>`max(${e}, ${Tm}px)`,$m=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,onClose:s})=>{const{backgroundColor:d,thumbnailGap:a,thumbnailMarginBottom:p,imageGap:u,closeIcon:S,closeIconMaxWidth:x,closeIconColor:v,closeIconHoverColor:m,thumbnailTrigger:y,thumbnailVisibility:$,thumbnailObjectFit:w,thumbnailActive:C,thumbnailActiveColor:T,title1Width:P,title2Width:M,title3Width:F,title1MarginLeft:b=0,title2MarginLeft:W=0,title3MarginLeft:K=0,titleRowMarginBottom:h=0,titleHeaderLayout:L="desktop",contentMarginTop:E,iconMarginLeft:k}=n,z=f=>R.scalingValue(f,i??!1),le=z(a),O=z(p??.02),_=z(u??0),q=z(E??0),G=z(k??0),{title1:H,title2:X,title3:ne}=gm(t),se=er("title1",Qo(n,"title1"),i),N=er("title2",Qo(n,"title2"),i),de=er("title3",Qo(n,"title3"),i),g=o,ie=L==="mobile",fe=!o&&(!i||l),oe=fe,Ce=fe,me=fe,re=wn(w),B=re?{"--image-aspect-ratio":No(w)}:void 0,Q=!!(H||X||ne),U=c.useMemo(()=>bm(e,H,X,ne,se,N,de),[e,H,X,ne,se,N,de]),J=c.useMemo(()=>({title1Width:P,title2Width:M,title3Width:F}),[P,M,F]),Me=c.useMemo(()=>U.map(f=>J[f.widthKey]),[U,J]),Ae=c.useMemo(()=>Kr(U.length,Me),[U.length,Me]),ke=c.useMemo(()=>Ds(U.length,Me),[U.length,Me]),Fe=c.useMemo(()=>U.filter(f=>f.prefix==="title1"),[U]),xe=c.useMemo(()=>U.filter(f=>f.prefix==="title2"||f.prefix==="title3"),[U]),j=c.useMemo(()=>Hl(Fe,J),[Fe,J]),ae=c.useMemo(()=>Hl(xe,J),[xe,J]),A=c.useCallback((f,V)=>{const ee=U.indexOf(f);if(!ie||V==="single-row")return{effectiveWidth:ke[ee]??0,resolvedWidth:Ae[ee]??0,maxWidth:to(ee,Ae)};if(V==="two-row-top"){const we=Fe.indexOf(f);return{effectiveWidth:j.effective[we]??0,resolvedWidth:j.resolved[we]??0,maxWidth:to(we,j.resolved)}}const he=xe.indexOf(f);return{effectiveWidth:ae.effective[he]??0,resolvedWidth:ae.resolved[he]??0,maxWidth:to(he,ae.resolved)}},[xe,ae,ke,Ae,U,Fe,j,ie]),D=c.useCallback(f=>R.scalingValue(f,i??!1),[i]),Y=D(h??0),Z=c.useMemo(()=>({title1MarginLeft:b,title2MarginLeft:W,title3MarginLeft:K}),[b,W,K]),ge=c.useCallback(f=>U.slice(0,f+1).reduce((V,ee,he)=>V+(ee!=null&&ee.marginLeftKey?Z[ee.marginLeftKey]??0:0)+(Ae[he]??0),0)+(ie?0:b??0),[U,Z,Ae,ie,b]),Te=c.useCallback(()=>ie?0:b??0,[ie,b]),je=c.useCallback(f=>xe.slice(0,f).reduce((V,ee,he)=>V+(ee.marginLeftKey?Z[ee.marginLeftKey]??0:0)+(ae.resolved[he]??0),0),[xe,ae.resolved,Z]),_e=c.useCallback(f=>{const V=xe[f];return je(f)+(V.marginLeftKey?Z[V.marginLeftKey]??0:0)+(ae.resolved[f]??0)},[xe,ae.resolved,je,Z]),Le=(f,V)=>{const ee=f.marginLeftKey?Z[f.marginLeftKey]??0:0,{effectiveWidth:he,resolvedWidth:we,maxWidth:Je}=A(f,V),Lt=Math.max(ee,eo),Rt=g&&V==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":f.prefix,style:{...V==="single-row"?{gridArea:f.prefix}:{},width:D(he),...ee>0?{marginLeft:D(ee)}:{}},children:[r.jsx("p",{className:f.className,style:f.style,children:f.text}),Rt&&f.marginLeftKey?r.jsx("div",{"data-controls":f.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(we),style:{position:"absolute",top:0,left:D(-ee),width:D(Lt),height:"100%",pointerEvents:"auto"}}):null,Rt?r.jsx("div",{"data-controls":f.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:D(-ti/2),width:D(ti),height:"100%",pointerEvents:"auto"}}):null]},f.className)},Ge=()=>{const f=ie?-1:U.findIndex(he=>he.prefix==="title1"),V=!ie&&(g||(b??0)>0)?(()=>{const we=Math.max(b??0,eo),Je=f>=0?Ae[f]:P;return r.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:D(we),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,ee=U.flatMap((he,we)=>{if(!he.marginLeftKey)return[];const Je=Z[he.marginLeftKey]??0,Lt=Sm(U,Ae,Z,we)+Te(),Rt=Math.max(Je,eo);return r.jsx("div",{"data-controls":he.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae[we]),style:{position:"absolute",top:0,left:D(Lt),width:D(Rt),height:"100%",pointerEvents:"auto"}},he.marginLeftKey)});return V?[V,...ee]:ee},pe=()=>U.map((f,V)=>{const ee=to(V,Ae),we=ge(V)-ti/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":f.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ee),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:D(we),width:D(ti),height:"100%",pointerEvents:"auto"}})},`${f.widthKey}-junction`)}),We=()=>xe.flatMap((f,V)=>{if(!f.marginLeftKey)return[];const ee=Z[f.marginLeftKey]??0,he=je(V),we=Math.max(ee,eo),{resolvedWidth:Je}=A(f,"two-row-bottom");return r.jsx("div",{"data-controls":f.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Je),style:{position:"absolute",top:0,left:D(he),width:D(we),height:"100%",pointerEvents:"auto"}},f.marginLeftKey)}),ze=()=>xe.map((f,V)=>{const{maxWidth:ee}=A(f,"two-row-bottom"),we=_e(V)-ti/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":f.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ee),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:D(we),width:D(ti),height:"100%",pointerEvents:"auto"}})},`${f.widthKey}-junction`)}),Ve=c.useRef(null),Ne=c.useRef(null),It=c.useRef(null),dt=c.useRef([]),bt=c.useRef(0),Ze=c.useRef({isActive:!1,startX:0,scrollLeft:0,hasMoved:!1}),yt=c.useRef(null),Mt=c.useRef(0),Ht=c.useRef("forward"),Ee=c.useRef(0),it=c.useRef(null),Ue=c.useRef(!1),ut=t.length>1,Bt=ut?Cm:1,rn=c.useMemo(()=>Array.from({length:Bt},()=>t).flat(),[t,Bt]),[jt,Yt]=c.useState(!1),[ln,He]=c.useState(!1),[Tt,pt]=c.useState(!0),[et,mt]=c.useState(0),zt=c.useRef(et);zt.current=et;const Vt=c.useRef(null),Jt=c.useRef(!1),pn=c.useRef(null),Ke=c.useRef(null),Zt=oe&&!Tt,kt=c.useCallback(()=>{oe&&(pt(!0),Ke.current&&clearTimeout(Ke.current),Ke.current=setTimeout(()=>{Ze.current.isActive||pt(!1)},am))},[oe]),Pe=c.useCallback(()=>{o||Jt.current||(Jt.current=!0,He(!1),pn.current=setTimeout(()=>{s()},ci))},[o,s]),ft=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":Zt?"true":"false",style:{width:R.scalingValue(x??0,i),height:R.scalingValue(x??0,i),marginRight:G,"--close-icon-hover-color":m},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Pe,"aria-label":"Close",children:r.jsx(an,{url:S,fill:v,hoverFill:m,className:`${e}-close-icon-img`})}),g?r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:G,height:"100%",pointerEvents:"auto"}}):null]}),Wt=(f="two-row")=>r.jsx("div",{...f==="two-row"&&g?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:D(b??0),flexShrink:0,...f==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...f==="two-row"&&g?{pointerEvents:"auto"}:{}}}),te=()=>{const f=U.find(he=>he.prefix==="title1"),V=U.filter(he=>he.prefix==="title2"||he.prefix==="title3"),ee=V.length>0||g||(h??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(b??0)>0||g?Wt():null,f?Le(f,"two-row-top"):null,S?ft():null]}),ee?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[V.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[V.map(he=>Le(he,"two-row-bottom")),g?r.jsxs(r.Fragment,{children:[We(),ze()]}):null]}):null,r.jsx("div",{"data-controls":g?"titleRowMarginBottom":void 0,"data-controls-axis":g?"y":void 0,"data-controls-reverse":g?"":void 0,className:g?`${e}-control`:void 0,style:{height:Y,width:"100%",flexShrink:0,pointerEvents:g?"auto":"none"}})]}):null]})},ye=()=>r.jsxs(r.Fragment,{children:[(b??0)>0||g?Wt("single-row"):null,U.map(f=>Le(f,"single-row")),g?r.jsxs(r.Fragment,{children:[Ge(),pe()]}):null,S?ft():null]}),Ie=c.useCallback(f=>!!(f.closest("[data-controls]")||f.closest(`.${e}-thumbnails`)||f.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:De,backdropStyle:qe,mediaAreaStyle:Qe,overlayContentStyle:ve,swipeHandlers:$t,dismissAreaStyle:gt}=Bs({enabled:fe??!1,onClose:Pe,animMs:ci,isBlockedTarget:Ie}),ht=()=>{if(!ut||t.length===0)return bt.current=0,0;const f=dt.current[0],V=dt.current[t.length];if(!f||!V)return bt.current;const ee=V.offsetLeft-f.offsetLeft;return ee>0&&(bt.current=ee),bt.current},ot=(f=!1)=>{if(!ut)return;const V=Ne.current,ee=ht();!V||ee<=0||(V.scrollLeft<=0?(V.scrollLeft+=ee,f&&(Ze.current.scrollLeft+=ee),Ue.current&&(Ee.current+=ee)):V.scrollLeft>=ee*2&&(V.scrollLeft-=ee,f&&(Ze.current.scrollLeft-=ee),Ue.current&&(Ee.current-=ee)))},Be=(f=(V=>(V=Ne.current)==null?void 0:V.scrollLeft)()??0)=>{var Lt;const ee=((Lt=Ne.current)==null?void 0:Lt.clientWidth)??0,he=f+ee/2;let we=-1,Je={flatIndex:0,distance:1/0};return dt.current.forEach((Rt,In)=>{if(!Rt)return;const Rn=Rt.offsetLeft,mn=Rn+Rt.offsetWidth;we===-1&&he>=Rn&&he<mn&&(we=In);const I=Math.abs(Rn-f);I<Je.distance&&(Je={flatIndex:In,distance:I})}),we!==-1?we:Je.flatIndex},vt=f=>{const V=Ne.current;return!f||!V?!1:f.offsetWidth>V.clientWidth+1},rt=f=>{Ne.current&&dt.current.forEach(V=>{V&&(V.style.scrollSnapAlign=vt(V)&&f==="backward"?"end":"start")})},wt=f=>{const V=Ne.current;if(!f||!V||!vt(f))return!1;const ee=f.offsetLeft,he=ee+f.offsetWidth;return V.scrollLeft>=ee-1&&V.scrollLeft+V.clientWidth<=he+1},_t=()=>{!Ne.current||t.length===0||Vt.current===null&&mt(Be()%t.length)},St=()=>{Vt.current=null},At=f=>{const V=Ne.current;V&&(V.style.scrollSnapType=f?"":"none")},tt=()=>{var f;(f=yt.current)==null||f.call(yt),yt.current=null},Ft=()=>{it.current!==null&&(cancelAnimationFrame(it.current),it.current=null),Ue.current=!1},Kt=()=>{const f=Ne.current;if(!f){it.current=null,Ue.current=!1;return}const V=Ee.current-f.scrollLeft;if(Math.abs(V)<.5){f.scrollLeft=Ee.current,ot(),_t(),it.current=null,Ue.current=!1;return}f.scrollLeft+=V*um,ot(),_t(),kt(),it.current=requestAnimationFrame(Kt)},$n=()=>{const f=It.current;f&&(f.style.transition="",f.style.transform="",f.style.willChange="")},Bn=(f,V,ee,he)=>{$n(),f.scrollLeft=V,Mt.current=f.scrollLeft,ot(),ee!==void 0?mt(ee):_t(),At(!0),he==null||he()},Ln=(f,{behavior:V="smooth",activeIndex:ee,onComplete:he}={})=>{const we=Ne.current,Je=It.current;if(!we||!Je)return;if(Ft(),tt(),At(!1),V==="auto"){Bn(we,f,ee,he);return}const Lt=Math.abs(f-we.scrollLeft),Rt=tm(Lt,rm,lm,we.clientWidth*.55);yt.current=om(we,Je,f,{duration:Rt,easing:sm,onComplete:()=>{yt.current=null,Bn(we,f,ee,he)}})},Yn=(f="smooth")=>{if(!Ne.current||t.length===0)return;const ee=Be(),he=dt.current[ee];he&&Ln(he.offsetLeft,{behavior:f,activeIndex:ee%t.length})},Jn=(f,V="smooth")=>{const ee=Ne.current;if(!ee||t.length===0)return;const he=ee.scrollLeft-f,we=Be(ee.scrollLeft),Je=dt.current[we];if(wt(Je)){At(!0),_t();return}const Lt=dt.current[we+1],Rt=Je?Lt?Lt.offsetLeft-Je.offsetLeft:Je.offsetWidth:0,In=Rt>0?he>Rt*Bl?1:he<-Rt*Bl?-1:0:0,Rn=ut?we+In:Math.max(0,Math.min(rn.length-1,we+In)),mn=dt.current[Rn];if(!mn){Yn(V);return}const ce=he<0&&vt(mn)?mn.offsetLeft+mn.offsetWidth-ee.clientWidth:mn.offsetLeft,Re=Rn%t.length;V==="smooth"&&(Vt.current=Re),mt(Re),Ln(ce,{behavior:V,activeIndex:Re,onComplete:V==="smooth"?St:void 0})},Qt=(f,V="smooth")=>{const ee=Ne.current,he=ut?t.length+f:f,we=dt.current[he];!ee||!we||(V==="smooth"?Vt.current=f:Vt.current=null,mt(f),Ln(we.offsetLeft,{behavior:V,activeIndex:f,onComplete:V==="smooth"?St:void 0}))},Si=f=>{if(!Ce)return;if(f.pointerType==="touch"){Ft(),At(!0);return}if(f.pointerType!=="mouse"||f.button!==0||Ie(f.target))return;const V=Ne.current;V&&(Ft(),tt(),$n(),Vt.current=null,Ze.current={isActive:!0,startX:f.clientX,scrollLeft:V.scrollLeft,hasMoved:!1},At(!1),kt(),V.setPointerCapture(f.pointerId))},Zn=f=>{if(!Ce||f.pointerType!=="mouse")return;const V=Ne.current;if(!V||!Ze.current.isActive)return;const ee=f.clientX-Ze.current.startX;Math.abs(ee)>wm&&(Ze.current.hasMoved=!0,Yt(!0)),Ze.current.hasMoved&&(f.preventDefault(),V.scrollLeft=Ze.current.scrollLeft-ee,ot(!0),_t(),kt())},En=f=>{if(!Ce||f.pointerType!=="mouse")return;const V=Ne.current;if(!V)return;const ee=Ze.current.hasMoved,he=Ze.current.scrollLeft;Ze.current.isActive=!1,Yt(!1),V.hasPointerCapture(f.pointerId)&&V.releasePointerCapture(f.pointerId),ot(),ee?Jn(he):(At(!0),_t()),kt()};return Os(),c.useEffect(()=>{const f=requestAnimationFrame(()=>He(!0));return()=>{cancelAnimationFrame(f),tt(),pn.current&&clearTimeout(pn.current),Ke.current&&clearTimeout(Ke.current)}},[]),c.useEffect(()=>{if(!oe){pt(!0);return}kt();const f=Ve.current;if(!f)return;const V=()=>kt();return f.addEventListener("pointermove",V),f.addEventListener("pointerdown",V),()=>{f.removeEventListener("pointermove",V),f.removeEventListener("pointerdown",V),Ke.current&&clearTimeout(Ke.current)}},[oe,kt]),c.useEffect(()=>{const f=V=>{V.key==="Escape"&&Pe()};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[Pe]),c.useLayoutEffect(()=>{ht(),Qt(zt.current,"auto")},[_]),c.useLayoutEffect(()=>{ht(),Qt(0,"auto")},[t.length,ut]),c.useEffect(()=>{if(!o)return;const f=Ne.current;if(!f)return;const V=ee=>{ee.preventDefault()};return f.addEventListener("wheel",V,{passive:!1}),f.addEventListener("touchmove",V,{passive:!1}),()=>{f.removeEventListener("wheel",V),f.removeEventListener("touchmove",V)}},[o]),c.useEffect(()=>{const f=Ne.current;if(!f||!fe)return;const V=ee=>{if(ee.preventDefault(),Math.abs(ee.deltaY)<=Math.abs(ee.deltaX))return;const he=ee.deltaMode===1?dm:ee.deltaMode===2?f.clientHeight:1,we=ee.deltaY*he*cm;if(we!==0){if(tt(),Ue.current||(Ue.current=!0,Ee.current=f.scrollLeft,Vt.current=null,At(!1)),Ee.current+=we,!ut){const Je=f.scrollWidth-f.clientWidth;Ee.current=Math.max(0,Math.min(Je,Ee.current))}kt(),it.current===null&&(it.current=requestAnimationFrame(Kt))}};return f.addEventListener("wheel",V,{passive:!1}),()=>{f.removeEventListener("wheel",V),Ft()}},[fe,t.length,ut]),c.useEffect(()=>{const f=Ne.current;if(!f)return;const V=()=>{ot();const he=f.scrollLeft,we=he-Mt.current;Mt.current=he;const Je=bt.current>0?bt.current*.5:1/0;if(we!==0&&Math.abs(we)<Je){const Lt=we>0?"forward":"backward";Lt!==Ht.current&&(Ht.current=Lt,rt(Lt))}_t()};f.addEventListener("scroll",V,{passive:!0});const ee=new ResizeObserver(()=>{ht(),ot(),rt(Ht.current),_t()});return ee.observe(f),()=>{tt(),f.removeEventListener("scroll",V),ee.disconnect()}},[t.length,ut]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{De||Pe()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:ln?1:0,transition:`opacity ${ci}ms ease`,pointerEvents:ln?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...qe}}),r.jsxs("div",{ref:Ve,className:`${e}-lightbox-dismiss-area`,style:{position:"relative",width:"100%",height:"100%",...gt},...$t,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Qe,onClick:f=>f.stopPropagation(),children:r.jsx("div",{ref:Ne,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":Ce&&t.length>0?"true":"false","data-mouse-dragging":jt?"true":"false",onPointerDown:Si,onPointerMove:Zn,onPointerUp:En,onPointerCancel:En,children:r.jsx("div",{ref:It,className:`${e}-lightbox-strip-track`,style:{gap:_},children:rn.map((f,V)=>{const ee=f.image.objectFit??"contain",he=V%t.length,we=Math.floor(V/t.length),Je=tr(_),Lt=`calc(-0.5 * (${Je} + ${_}))`;return r.jsxs("div",{ref:Rt=>dt.current[V]=Rt,className:`${e}-strip-item`,style:{height:L==="mobile"?"75vh":"100%"},children:[r.jsx("img",{src:f.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:ee}}),g&&he<t.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Lt,width:Je,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${we}-${f.image.url}-${he}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":Zt?"true":"false",style:{width:"100%",height:"100%",top:0,bottom:0,...ve},children:[r.jsx("div",{"data-controls":g?"contentMarginTop":void 0,"data-controls-axis":g?"y":void 0,"data-controls-handle-left-fraction":g?"0.05":void 0,className:g?`${e}-control`:void 0,style:{height:q,width:"100%",pointerEvents:g?"auto":"none"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0},children:r.jsx("div",{className:`${e}-lightbox-content-area${ie?` ${e}-lightbox-content-area-stacked`:""}`,children:(Q||S)&&r.jsx("div",{className:`${e}-header ${ie?`${e}-header-two-row`:`${e}-header-single-row`}`,children:ie?te():Q||S?ye():null})})})]}),t.length>1&&$==="on"&&(()=>{const f=tr(O),V=`calc(-0.5 * (${O} + ${f}))`;return r.jsxs("div",{className:`${e}-thumbnails`,"data-lightbox-scrollable":"","data-thumbnail-active":C,"data-overlay-content-hidden":Zt?"true":"false",onClick:ee=>ee.stopPropagation(),style:{gap:le,bottom:O,"--thumbnail-active-color":T,...ve},children:[t.map((ee,he)=>{const we=tr(le),Je=`calc(-0.5 * (${we} + ${le}))`;return r.jsxs("div",{style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":et===he?"true":"false",onClick:()=>fe&&y==="click"&&Qt(he),onMouseEnter:()=>me&&y==="hover"&&Qt(he),"aria-label":ee.image.name?`View ${ee.image.name}`:`View image ${he+1}`,"aria-current":et===he?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${re?` ${e}-thumb-image-cover`:""}`,src:ee.image.url,alt:"",draggable:!1,style:{...B,...w.display==="Cover"?{width:ho}:{width:"100%"}}})}),g&&he<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Je,width:we,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${ee.image.url}-${he}`)}),g&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":g?"":void 0,style:{position:"absolute",left:0,right:0,bottom:V,height:f,pointerEvents:"auto",zIndex:3}})]})})()]})]})},Lm=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:l})=>{const{prefix:s}=R.useScopedStyles(),{cover:d,coverFit:a}=e,p=c.useRef(null),[u,S]=c.useState(!1),x=t??[],v=u&&x.length>0,m=()=>{x.length!==0&&(n&&!i&&!o||S(!0))},y=()=>{n||m()},$=C=>{n&&(C.stopPropagation(),m())},w=()=>{S(!1)};return c.useEffect(()=>{!n||i||o||S(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:p,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:pm(s)}}),d?r.jsx("button",{type:"button",className:`${s}-cover ${wn(a)?`${s}-ratio-wrapper-cover`:`${s}-ratio-wrapper-fit`}`,onClick:y,onDoubleClick:$,style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...wn(a)?{"--image-aspect-ratio":No(a)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${s}-cover-image ${wn(a)?`${s}-cover-image-cover`:`${s}-cover-image-fit`}`,src:d,alt:"cover"})}):null]}),v&&typeof document<"u"&&(()=>{const C=(l?document.getElementById(l):null)??document.body;return Fi.createPortal(r.jsx($m,{prefix:s,images:x,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:w}),C)})()]})},Em=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
8851
8851
  import { createPortal } from 'react-dom';
8852
8852
  import { CommonComponentProps } from '../props';
8853
8853
  import { scalingValue } from '../utils/scalingValue';
@@ -8866,6 +8866,9 @@ const SNAP_SCROLL_MAX_MS = 1500;
8866
8866
  const SNAP_SCROLL_EASING = 'cubic-bezier(0.16, 1, 0.3, 1)';
8867
8867
  const CONTROLS_IDLE_MS = 3000;
8868
8868
  const THUMB_MAX_SIZE_PX = 42;
8869
+ const WHEEL_SPEED = 2;
8870
+ const WHEEL_LINE_HEIGHT_PX = 16;
8871
+ const WHEEL_LERP = 0.05;
8869
8872
 
8870
8873
  function getCSS(P: string): string {
8871
8874
  return \`
@@ -10097,6 +10100,11 @@ const LightboxOverlay = ({
10097
10100
  hasMoved: false,
10098
10101
  });
10099
10102
  const scrollAnimRef = useRef<(() => void) | null>(null);
10103
+ const lastScrollLeftRef = useRef(0);
10104
+ const scrollDirRef = useRef<'forward' | 'backward'>('forward');
10105
+ const wheelTargetRef = useRef(0);
10106
+ const wheelRafRef = useRef<number | null>(null);
10107
+ const isWheelingRef = useRef(false);
10100
10108
  const isLoopEnabled = images.length > 1;
10101
10109
  const loopCopies = isLoopEnabled ? LOOP_COPIES : 1;
10102
10110
  const flatItems = useMemo(
@@ -10294,24 +10302,63 @@ const LightboxOverlay = ({
10294
10302
  if (adjustMouseDragAnchor) {
10295
10303
  mouseDragRef.current.scrollLeft += setWidth;
10296
10304
  }
10305
+ if (isWheelingRef.current) {
10306
+ wheelTargetRef.current += setWidth;
10307
+ }
10297
10308
  } else if (strip.scrollLeft >= setWidth * 2) {
10298
10309
  strip.scrollLeft -= setWidth;
10299
10310
  if (adjustMouseDragAnchor) {
10300
10311
  mouseDragRef.current.scrollLeft -= setWidth;
10301
10312
  }
10313
+ if (isWheelingRef.current) {
10314
+ wheelTargetRef.current -= setWidth;
10315
+ }
10302
10316
  }
10303
10317
  };
10304
10318
 
10305
- const getNearestFlatIndex = (scrollLeft = stripRef.current?.scrollLeft ?? 0) => itemRefs.current.reduce(
10306
- (closest, item, flatIndex) => {
10307
- if (!item) return closest;
10308
- const distance = Math.abs(item.offsetLeft - scrollLeft);
10309
- return distance < closest.distance
10310
- ? { flatIndex, distance }
10311
- : closest;
10312
- },
10313
- { flatIndex: 0, distance: Infinity },
10314
- ).flatIndex;
10319
+ const getNearestFlatIndex = (scrollLeft = stripRef.current?.scrollLeft ?? 0) => {
10320
+ const viewport = stripRef.current?.clientWidth ?? 0;
10321
+ const viewportCenter = scrollLeft + viewport / 2;
10322
+ let containingIndex = -1;
10323
+ let nearest = { flatIndex: 0, distance: Infinity };
10324
+ itemRefs.current.forEach((item, flatIndex) => {
10325
+ if (!item) return;
10326
+ const left = item.offsetLeft;
10327
+ const right = left + item.offsetWidth;
10328
+ if (containingIndex === -1 && viewportCenter >= left && viewportCenter < right) {
10329
+ containingIndex = flatIndex;
10330
+ }
10331
+ const distance = Math.abs(left - scrollLeft);
10332
+ if (distance < nearest.distance) {
10333
+ nearest = { flatIndex, distance };
10334
+ }
10335
+ });
10336
+ return containingIndex !== -1 ? containingIndex : nearest.flatIndex;
10337
+ };
10338
+
10339
+ const isOversizedItem = (item: HTMLDivElement | null) => {
10340
+ const strip = stripRef.current;
10341
+ if (!item || !strip) return false;
10342
+ return item.offsetWidth > strip.clientWidth + 1;
10343
+ };
10344
+
10345
+ const updateOversizedSnapAlign = (direction: 'forward' | 'backward') => {
10346
+ if (!stripRef.current) return;
10347
+ itemRefs.current.forEach((item) => {
10348
+ if (!item) return;
10349
+ item.style.scrollSnapAlign = isOversizedItem(item) && direction === 'backward'
10350
+ ? 'end'
10351
+ : 'start';
10352
+ });
10353
+ };
10354
+
10355
+ const isViewportWithinOversizedItem = (item: HTMLDivElement | null) => {
10356
+ const strip = stripRef.current;
10357
+ if (!item || !strip || !isOversizedItem(item)) return false;
10358
+ const left = item.offsetLeft;
10359
+ const right = left + item.offsetWidth;
10360
+ return strip.scrollLeft >= left - 1 && strip.scrollLeft + strip.clientWidth <= right + 1;
10361
+ };
10315
10362
 
10316
10363
  const updateActiveIndex = () => {
10317
10364
  if (!stripRef.current || images.length === 0) return;
@@ -10334,6 +10381,37 @@ const LightboxOverlay = ({
10334
10381
  scrollAnimRef.current = null;
10335
10382
  };
10336
10383
 
10384
+ const stopWheelAnimation = () => {
10385
+ if (wheelRafRef.current !== null) {
10386
+ cancelAnimationFrame(wheelRafRef.current);
10387
+ wheelRafRef.current = null;
10388
+ }
10389
+ isWheelingRef.current = false;
10390
+ };
10391
+
10392
+ const stepWheelAnimation = () => {
10393
+ const strip = stripRef.current;
10394
+ if (!strip) {
10395
+ wheelRafRef.current = null;
10396
+ isWheelingRef.current = false;
10397
+ return;
10398
+ }
10399
+ const distance = wheelTargetRef.current - strip.scrollLeft;
10400
+ if (Math.abs(distance) < 0.5) {
10401
+ strip.scrollLeft = wheelTargetRef.current;
10402
+ normalizeInfiniteScroll();
10403
+ updateActiveIndex();
10404
+ wheelRafRef.current = null;
10405
+ isWheelingRef.current = false;
10406
+ return;
10407
+ }
10408
+ strip.scrollLeft += distance * WHEEL_LERP;
10409
+ normalizeInfiniteScroll();
10410
+ updateActiveIndex();
10411
+ resetOverlayContentIdleTimer();
10412
+ wheelRafRef.current = requestAnimationFrame(stepWheelAnimation);
10413
+ };
10414
+
10337
10415
  const clearStripTrackTransform = () => {
10338
10416
  const track = trackRef.current;
10339
10417
  if (!track) return;
@@ -10350,6 +10428,7 @@ const LightboxOverlay = ({
10350
10428
  ) => {
10351
10429
  clearStripTrackTransform();
10352
10430
  strip.scrollLeft = targetLeft;
10431
+ lastScrollLeftRef.current = strip.scrollLeft;
10353
10432
  normalizeInfiniteScroll();
10354
10433
  if (activeIndex !== undefined) {
10355
10434
  setActiveIndex(activeIndex);
@@ -10376,6 +10455,7 @@ const LightboxOverlay = ({
10376
10455
  const track = trackRef.current;
10377
10456
  if (!strip || !track) return;
10378
10457
 
10458
+ stopWheelAnimation();
10379
10459
  cancelScrollAnimation();
10380
10460
  setStripSnapEnabled(false);
10381
10461
 
@@ -10418,6 +10498,13 @@ const LightboxOverlay = ({
10418
10498
  const scrollDelta = strip.scrollLeft - startScrollLeft;
10419
10499
  const currentFlatIndex = getNearestFlatIndex(strip.scrollLeft);
10420
10500
  const currentItem = itemRefs.current[currentFlatIndex];
10501
+
10502
+ if (isViewportWithinOversizedItem(currentItem)) {
10503
+ setStripSnapEnabled(true);
10504
+ updateActiveIndex();
10505
+ return;
10506
+ }
10507
+
10421
10508
  const nextItem = itemRefs.current[currentFlatIndex + 1];
10422
10509
  const span = currentItem
10423
10510
  ? (nextItem ? nextItem.offsetLeft - currentItem.offsetLeft : currentItem.offsetWidth)
@@ -10440,12 +10527,17 @@ const LightboxOverlay = ({
10440
10527
  return;
10441
10528
  }
10442
10529
 
10530
+ const movingBackward = scrollDelta < 0;
10531
+ const targetLeft = movingBackward && isOversizedItem(targetItem)
10532
+ ? targetItem.offsetLeft + targetItem.offsetWidth - strip.clientWidth
10533
+ : targetItem.offsetLeft;
10534
+
10443
10535
  const snapTargetIndex = targetFlatIndex % images.length;
10444
10536
  if (behavior === 'smooth') {
10445
10537
  lockedActiveIndexRef.current = snapTargetIndex;
10446
10538
  }
10447
10539
  setActiveIndex(snapTargetIndex);
10448
- scrollStripTo(targetItem.offsetLeft, {
10540
+ scrollStripTo(targetLeft, {
10449
10541
  behavior,
10450
10542
  activeIndex: snapTargetIndex,
10451
10543
  onComplete: behavior === 'smooth' ? releaseActiveIndexLock : undefined,
@@ -10472,10 +10564,18 @@ const LightboxOverlay = ({
10472
10564
 
10473
10565
  const onStripPointerDown = (event: React.PointerEvent<HTMLDivElement>) => {
10474
10566
  if (!allowMouseDrag) return;
10567
+ if (event.pointerType === 'touch') {
10568
+ // Free wheel scrolling leaves native snap disabled; restore it so the
10569
+ // touch swipe keeps its snapping behaviour.
10570
+ stopWheelAnimation();
10571
+ setStripSnapEnabled(true);
10572
+ return;
10573
+ }
10475
10574
  if (event.pointerType !== 'mouse' || event.button !== 0) return;
10476
10575
  if (isDragBlockedTarget(event.target as HTMLElement)) return;
10477
10576
  const strip = stripRef.current;
10478
10577
  if (!strip) return;
10578
+ stopWheelAnimation();
10479
10579
  cancelScrollAnimation();
10480
10580
  clearStripTrackTransform();
10481
10581
  lockedActiveIndexRef.current = null;
@@ -10602,17 +10702,77 @@ const LightboxOverlay = ({
10602
10702
  };
10603
10703
  }, [isEditMode]);
10604
10704
 
10705
+ useEffect(() => {
10706
+ const strip = stripRef.current;
10707
+ if (!strip || !allowImageScroll) return;
10708
+
10709
+ const onWheel = (event: WheelEvent) => {
10710
+ // Vertical wheel (top/bottom) drives the horizontal slide; horizontal
10711
+ // wheel/scroll is intentionally ignored so left/right scroll never navigates.
10712
+ event.preventDefault();
10713
+ if (Math.abs(event.deltaY) <= Math.abs(event.deltaX)) return;
10714
+ const unit = event.deltaMode === 1
10715
+ ? WHEEL_LINE_HEIGHT_PX
10716
+ : event.deltaMode === 2
10717
+ ? strip.clientHeight
10718
+ : 1;
10719
+ const delta = event.deltaY * unit * WHEEL_SPEED;
10720
+ if (delta === 0) return;
10721
+
10722
+ cancelScrollAnimation();
10723
+ if (!isWheelingRef.current) {
10724
+ // Start a new wheel session: anchor the target to the current position
10725
+ // so accumulated deltas interpolate smoothly from where we are.
10726
+ isWheelingRef.current = true;
10727
+ wheelTargetRef.current = strip.scrollLeft;
10728
+ lockedActiveIndexRef.current = null;
10729
+ setStripSnapEnabled(false);
10730
+ }
10731
+
10732
+ wheelTargetRef.current += delta;
10733
+ if (!isLoopEnabled) {
10734
+ const maxScrollLeft = strip.scrollWidth - strip.clientWidth;
10735
+ wheelTargetRef.current = Math.max(0, Math.min(maxScrollLeft, wheelTargetRef.current));
10736
+ }
10737
+ resetOverlayContentIdleTimer();
10738
+
10739
+ // No snap on wheel: the lerp eases toward the accumulated target and the
10740
+ // strip rests wherever it lands. Native snapping is restored on touch.
10741
+ if (wheelRafRef.current === null) {
10742
+ wheelRafRef.current = requestAnimationFrame(stepWheelAnimation);
10743
+ }
10744
+ };
10745
+
10746
+ strip.addEventListener('wheel', onWheel, { passive: false });
10747
+ return () => {
10748
+ strip.removeEventListener('wheel', onWheel);
10749
+ stopWheelAnimation();
10750
+ };
10751
+ }, [allowImageScroll, images.length, isLoopEnabled]);
10752
+
10605
10753
  useEffect(() => {
10606
10754
  const strip = stripRef.current;
10607
10755
  if (!strip) return;
10608
10756
  const onScroll = () => {
10609
10757
  normalizeInfiniteScroll();
10758
+ const current = strip.scrollLeft;
10759
+ const delta = current - lastScrollLeftRef.current;
10760
+ lastScrollLeftRef.current = current;
10761
+ const loopJump = setWidthRef.current > 0 ? setWidthRef.current * 0.5 : Infinity;
10762
+ if (delta !== 0 && Math.abs(delta) < loopJump) {
10763
+ const direction = delta > 0 ? 'forward' : 'backward';
10764
+ if (direction !== scrollDirRef.current) {
10765
+ scrollDirRef.current = direction;
10766
+ updateOversizedSnapAlign(direction);
10767
+ }
10768
+ }
10610
10769
  updateActiveIndex();
10611
10770
  };
10612
10771
  strip.addEventListener('scroll', onScroll, { passive: true });
10613
10772
  const observer = new ResizeObserver(() => {
10614
10773
  measureSetWidth();
10615
10774
  normalizeInfiniteScroll();
10775
+ updateOversizedSnapAlign(scrollDirRef.current);
10616
10776
  updateActiveIndex();
10617
10777
  });
10618
10778
  observer.observe(strip);
@@ -10857,18 +11017,34 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
10857
11017
  const wrapperRef = useRef<HTMLDivElement>(null);
10858
11018
  const [lightboxOpen, setLightboxOpen] = useState(false);
10859
11019
  const items = content ?? [];
10860
- const isOverlayVisible = lightboxOpen || (Boolean(isEditMode) && items.length > 0);
11020
+ const isOverlayVisible = lightboxOpen && items.length > 0;
10861
11021
 
10862
11022
  const openLightbox = () => {
10863
- if (isEditMode || items.length === 0) return;
10864
- if (isEditor && !isPreviewMode) return;
11023
+ if (items.length === 0) return;
11024
+ if (isEditor && !isEditMode && !isPreviewMode) return;
10865
11025
  setLightboxOpen(true);
10866
11026
  };
10867
11027
 
11028
+ const handleCoverClick = () => {
11029
+ if (isEditor) return;
11030
+ openLightbox();
11031
+ };
11032
+
11033
+ const handleCoverDoubleClick = (event: MouseEvent<HTMLButtonElement>) => {
11034
+ if (!isEditor) return;
11035
+ event.stopPropagation();
11036
+ openLightbox();
11037
+ };
11038
+
10868
11039
  const closeLightbox = () => {
10869
11040
  setLightboxOpen(false);
10870
11041
  };
10871
11042
 
11043
+ useEffect(() => {
11044
+ if (!isEditor || isEditMode || isPreviewMode) return;
11045
+ setLightboxOpen(false);
11046
+ }, [isEditor, isEditMode, isPreviewMode]);
11047
+
10872
11048
  return (
10873
11049
  <>
10874
11050
  <div ref={wrapperRef} className={\`\${P}-wrapper\`}>
@@ -10877,12 +11053,14 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
10877
11053
  <button
10878
11054
  type="button"
10879
11055
  className={\`\${P}-cover \${isImageRatioCover(coverFit) ? \`\${P}-ratio-wrapper-cover\` : \`\${P}-ratio-wrapper-fit\`}\`}
10880
- onClick={openLightbox}
11056
+ onClick={handleCoverClick}
11057
+ onDoubleClick={handleCoverDoubleClick}
10881
11058
  style={{
10882
11059
  display: 'block',
10883
11060
  padding: 0,
10884
11061
  border: 'none',
10885
11062
  background: 'transparent',
11063
+ pointerEvents: isEditor && !isEditMode && !isPreviewMode ? 'none' : undefined,
10886
11064
  ...(isImageRatioCover(coverFit)
10887
11065
  ? ({ '--image-aspect-ratio': getAspectRatio(coverFit) } as React.CSSProperties)
10888
11066
  : {}),
@@ -10916,14 +11094,14 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
10916
11094
  </>
10917
11095
  );
10918
11096
  };
10919
- `,$m="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#000000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>'),Fn={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 Lm(t){const e={};return e[le(t,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},e[le(t,"fontSettings")]={...Fn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},e[le(t,"fontSize")]={...Fn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},e[le(t,"lineHeight")]={...Fn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},e[le(t,"letterSpacing")]={...Fn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},e[le(t,"wordSpacing")]={...Fn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},e[le(t,"textAlign")]={...Fn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},e[le(t,"textAppearance")]={...Fn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},e}const Im=ki.reduce((t,e)=>({...t,...Lm(e)}),{}),Em=ki.reduce((t,e)=>({...t,[le(e,"fontFamily")]:"Arial",[le(e,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[le(e,"letterSpacing")]:0,[le(e,"wordSpacing")]:0,[le(e,"textAlign")]:"left",[le(e,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Fl(t){return ki.reduce((e,n)=>{const i=t[`${n}FontSize`],r=t[`${n}LineHeight`];return i!==void 0&&(e[le(n,"fontSize")]=i),r!==void 0&&(e[le(n,"lineHeight")]=r),e},{})}const Rm=gm(),Mm={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"}}},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:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",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"]}},thumbnailActiveColor:{type:"string",scope:"common",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:"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"}},...Im,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/LightboxJournal_1.jpg",coverFit:{display:"Cover",ratioValue:"16:9",reversed:!1},closeIcon:$m,closeIconColor:"#ffffff",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"Fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#ffffff",title2Color:"#ffffff",title3Color:"#ffffff",...Em},layoutDefaults:{m:{thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.08,iconMarginLeft:.02,...Fl({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.02,imageGap:.005,title1Width:.13,title2Width:.13,title3Width:.14,title1MarginLeft:.02,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.02,iconMarginLeft:.02,...Fl({title1FontSize:.015,title1LineHeight:.02,title2FontSize:.015,title2LineHeight:.02,title3FontSize:.015,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:[Rm]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0,stripFieldsOnAdd:["title1","title2","title3","text"]},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",supportsMainImage:!0}},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/LightboxStrip_1.jpg",name:"",objectFit:"contain"},title1:"Ethan Parker",title2:"Midnight Atlas",title3:"Portland, OR"},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_2.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_3.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_4.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_5.jpg",name:"",objectFit:"contain"}}]}},_m={element:Cm,id:"lightbox-strip",name:"Lightbox Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:Mm,sourceCode:Tm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:ki.map(t=>({path:`styles.${le(t,"fontSettings")}`}))}},qo=300,sr=400,Nl=300,Wm=50,Hl=10,Hr="cntrl-lightbox-journal",Mo=Hr,ar=`${Hr}-`,_o=t=>`${Hr}-${t}`,Br=t=>t===Mo||t.startsWith(ar),Bl=t=>{if(!t)return null;const e=Number.parseInt(t,10);return Number.isFinite(e)&&e>=1?e:null},Ol=t=>{if(typeof window>"u")return null;const e=new URLSearchParams(window.location.search);if(t){const i=Bl(e.get(_o(t)));if(i)return i}const n=Bl(e.get(Mo));if(n)return n;for(const[i]of e){if(!i.startsWith(ar))continue;const r=i.slice(ar.length);if(!/^\d+$/.test(r))continue;const l=Number.parseInt(r,10);if(Number.isFinite(l)&&l>=1)return l}return null},Dl=(t,e)=>{if(e<=0)return-1;const n=t-1;return n<0||n>=e?-1:n},Hs=(t,e,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(s=>{Br(s)&&i.searchParams.delete(s)}),e?i.searchParams.set(_o(e),String(t)):i.searchParams.set(Mo,String(t));const r=n?"replaceState":"pushState",l=`${i.pathname}${i.search}${i.hash}`;window.history[r](window.history.state,"",l)},Am=t=>{if(typeof window>"u")return;const e=new URL(window.location.href),n=[...e.searchParams.keys()].filter(i=>t?i===_o(t)||i===Mo:Br(i));if(n.forEach(i=>e.searchParams.delete(i)),n.length>0){const i=`${e.pathname}${e.search}${e.hash}`;window.history.replaceState(window.history.state,"",i)}},Bs=t=>{if(typeof window>"u")return!1;const e=new URLSearchParams(window.location.search);return t?e.has(_o(t)):[...e.keys()].some(n=>Br(n))},Pm=(t,e)=>{if(Bs(e)){if(t){window.history.back();return}Am(e)}};function km(t){return`
10920
- .${t}-wrapper {
11097
+ `,Im="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#000000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>'),zn={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 Rm(e){const t={};return t[st(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[st(e,"fontSettings")]={...zn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[st(e,"fontSize")]={...zn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[st(e,"lineHeight")]={...zn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[st(e,"letterSpacing")]={...zn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[st(e,"wordSpacing")]={...zn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[st(e,"textAlign")]={...zn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[st(e,"textAppearance")]={...zn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Mm=Ki.reduce((e,t)=>({...e,...Rm(t)}),{}),Wm=Ki.reduce((e,t)=>({...e,[st(t,"fontFamily")]:"Arial",[st(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[st(t,"letterSpacing")]:0,[st(t,"wordSpacing")]:0,[st(t,"textAlign")]:"left",[st(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ol(e){return Ki.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[st(n,"fontSize")]=i),o!==void 0&&(t[st(n,"lineHeight")]=o),t},{})}const _m=ym(),Am={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"}}},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:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",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"]}},thumbnailActiveColor:{type:"string",scope:"common",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:"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"}},...Mm,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/LightboxJournal_1.jpg",coverFit:{display:"Cover",ratioValue:"16:9",reversed:!1},closeIcon:Im,closeIconColor:"#ffffff",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"Fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#ffffff",title2Color:"#ffffff",title3Color:"#ffffff",...Wm},layoutDefaults:{m:{thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.08,iconMarginLeft:.02,...Ol({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.02,imageGap:.005,title1Width:.13,title2Width:.13,title3Width:.14,title1MarginLeft:.02,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.02,iconMarginLeft:.02,...Ol({title1FontSize:.015,title1LineHeight:.02,title2FontSize:.015,title2LineHeight:.02,title3FontSize:.015,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:[_m]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0,stripFieldsOnAdd:["title1","title2","title3","text"]},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",supportsMainImage:!0}},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/LightboxStrip_1.jpg",name:"",objectFit:"contain"},title1:"Ethan Parker",title2:"Midnight Atlas",title3:"Portland, OR"},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_2.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_3.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_4.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_5.jpg",name:"",objectFit:"contain"}}]}},Pm={element:Lm,id:"lightbox-strip",name:"Lightbox Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:Am,sourceCode:Em,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Ki.map(e=>({path:`styles.${st(e,"fontSettings")}`}))}},nr=300,hr=400,Dl=300,km=50,jl=10,Gr="cntrl-lightbox-journal",Ho=Gr,fr=`${Gr}-`,Bo=e=>`${Gr}-${e}`,Ur=e=>e===Ho||e.startsWith(fr),zl=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Vl=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=zl(t.get(Bo(e)));if(i)return i}const n=zl(t.get(Ho));if(n)return n;for(const[i]of t){if(!i.startsWith(fr))continue;const o=i.slice(fr.length);if(!/^\d+$/.test(o))continue;const l=Number.parseInt(o,10);if(Number.isFinite(l)&&l>=1)return l}return null},Kl=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},js=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(s=>{Ur(s)&&i.searchParams.delete(s)}),t?i.searchParams.set(Bo(t),String(e)):i.searchParams.set(Ho,String(e));const o=n?"replaceState":"pushState",l=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",l)},Fm=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Bo(e)||i===Ho:Ur(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)}},zs=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Bo(e)):[...t.keys()].some(n=>Ur(n))},Nm=(e,t)=>{if(zs(t)){if(e){window.history.back();return}Fm(t)}};function Hm(e){return`
11098
+ .${e}-wrapper {
10921
11099
  position: relative;
10922
11100
  width: 100%;
10923
11101
  height: 100%;
10924
11102
  }
10925
11103
 
10926
- .${t}-cover {
11104
+ .${e}-cover {
10927
11105
  position: relative;
10928
11106
  width: 100%;
10929
11107
  height: 100%;
@@ -10931,37 +11109,37 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
10931
11109
  pointer-events: auto;
10932
11110
  }
10933
11111
 
10934
- .${t}-ratio-wrapper-cover {
11112
+ .${e}-ratio-wrapper-cover {
10935
11113
  aspect-ratio: var(--image-aspect-ratio);
10936
11114
  height: auto;
10937
11115
  overflow: hidden;
10938
11116
  width: 100%;
10939
11117
  }
10940
11118
 
10941
- .${t}-ratio-wrapper-fit {
11119
+ .${e}-ratio-wrapper-fit {
10942
11120
  height: 100%;
10943
11121
  width: 100%;
10944
11122
  }
10945
11123
 
10946
- .${t}-cover-image {
11124
+ .${e}-cover-image {
10947
11125
  display: block;
10948
11126
  }
10949
11127
 
10950
- .${t}-cover-image-cover {
11128
+ .${e}-cover-image-cover {
10951
11129
  object-fit: cover;
10952
11130
  width: 100%;
10953
11131
  height: 100%;
10954
11132
  max-width: 100%;
10955
11133
  }
10956
11134
 
10957
- .${t}-cover-image-fit {
11135
+ .${e}-cover-image-fit {
10958
11136
  object-fit: contain;
10959
11137
  width: auto;
10960
11138
  height: auto;
10961
11139
  max-width: 100%;
10962
11140
  }
10963
11141
 
10964
- .${t}-lightbox {
11142
+ .${e}-lightbox {
10965
11143
  position: fixed;
10966
11144
  inset: 0;
10967
11145
  z-index: 9997;
@@ -10972,7 +11150,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
10972
11150
  overscroll-behavior: none;
10973
11151
  }
10974
11152
 
10975
- .${t}-lightbox-editor {
11153
+ .${e}-lightbox-editor {
10976
11154
  inset: auto;
10977
11155
  top: 0;
10978
11156
  left: var(--cntrl-article-left, 0);
@@ -10980,11 +11158,11 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
10980
11158
  height: var(--cntrl-viewport-height, 100vh) !important;
10981
11159
  }
10982
11160
 
10983
- .${t}-lightbox-edit-mode {
11161
+ .${e}-lightbox-edit-mode {
10984
11162
  z-index: 1;
10985
11163
  }
10986
11164
 
10987
- .${t}-lightbox-content {
11165
+ .${e}-lightbox-content {
10988
11166
  position: relative;
10989
11167
  z-index: 1;
10990
11168
  display: flex;
@@ -10996,13 +11174,13 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
10996
11174
  box-sizing: border-box;
10997
11175
  }
10998
11176
 
10999
- .${t}-lightbox-backdrop {
11177
+ .${e}-lightbox-backdrop {
11000
11178
  position: absolute;
11001
11179
  inset: 0;
11002
11180
  pointer-events: none;
11003
11181
  }
11004
11182
 
11005
- .${t}-lightbox-strip {
11183
+ .${e}-lightbox-strip {
11006
11184
  position: relative;
11007
11185
  flex: 1;
11008
11186
  width: 100%;
@@ -11015,8 +11193,8 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11015
11193
  box-sizing: border-box;
11016
11194
  }
11017
11195
 
11018
- .${t}-lightbox-strip[data-desktop-nav="true"]::before,
11019
- .${t}-lightbox-strip[data-desktop-nav="true"]::after {
11196
+ .${e}-lightbox-strip[data-desktop-nav="true"]::before,
11197
+ .${e}-lightbox-strip[data-desktop-nav="true"]::after {
11020
11198
  content: '';
11021
11199
  position: absolute;
11022
11200
  top: 0;
@@ -11025,17 +11203,17 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11025
11203
  z-index: 2;
11026
11204
  }
11027
11205
 
11028
- .${t}-lightbox-strip[data-desktop-nav="true"]::before {
11206
+ .${e}-lightbox-strip[data-desktop-nav="true"]::before {
11029
11207
  left: 0;
11030
11208
  cursor: w-resize;
11031
11209
  }
11032
11210
 
11033
- .${t}-lightbox-strip[data-desktop-nav="true"]::after {
11211
+ .${e}-lightbox-strip[data-desktop-nav="true"]::after {
11034
11212
  right: 0;
11035
11213
  cursor: e-resize;
11036
11214
  }
11037
11215
 
11038
- .${t}-slide-stack {
11216
+ .${e}-slide-stack {
11039
11217
  position: relative;
11040
11218
  width: 100%;
11041
11219
  height: 100%;
@@ -11044,7 +11222,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11044
11222
  justify-content: center;
11045
11223
  }
11046
11224
 
11047
- .${t}-slide-layer-out {
11225
+ .${e}-slide-layer-out {
11048
11226
  position: absolute;
11049
11227
  inset: 0;
11050
11228
  display: flex;
@@ -11053,7 +11231,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11053
11231
  z-index: 1;
11054
11232
  }
11055
11233
 
11056
- .${t}-slide-layer-in {
11234
+ .${e}-slide-layer-in {
11057
11235
  position: absolute;
11058
11236
  inset: 0;
11059
11237
  display: flex;
@@ -11062,26 +11240,26 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11062
11240
  z-index: 0;
11063
11241
  }
11064
11242
 
11065
- @keyframes ${t}-slide-fade-in {
11243
+ @keyframes ${e}-slide-fade-in {
11066
11244
  from { opacity: 0; }
11067
11245
  to { opacity: 1; }
11068
11246
  }
11069
11247
 
11070
- @keyframes ${t}-slide-fade-out {
11248
+ @keyframes ${e}-slide-fade-out {
11071
11249
  from { opacity: 1; }
11072
11250
  to { opacity: 0; }
11073
11251
  }
11074
11252
 
11075
- .${t}-slide-fade-in {
11253
+ .${e}-slide-fade-in {
11076
11254
  opacity: 0;
11077
- animation: ${t}-slide-fade-in ${Nl}ms ease-in-out forwards;
11255
+ animation: ${e}-slide-fade-in ${Dl}ms ease-in-out forwards;
11078
11256
  }
11079
11257
 
11080
- .${t}-slide-fade-out {
11081
- animation: ${t}-slide-fade-out ${Nl}ms ease-in-out forwards;
11258
+ .${e}-slide-fade-out {
11259
+ animation: ${e}-slide-fade-out ${Dl}ms ease-in-out forwards;
11082
11260
  }
11083
11261
 
11084
- .${t}-slide-area {
11262
+ .${e}-slide-area {
11085
11263
  position: relative;
11086
11264
  width: 100%;
11087
11265
  height: 100%;
@@ -11093,7 +11271,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11093
11271
  align-items: center;
11094
11272
  }
11095
11273
 
11096
- .${t}-slide-inner {
11274
+ .${e}-slide-inner {
11097
11275
  display: flex;
11098
11276
  flex-direction: row;
11099
11277
  align-items: center;
@@ -11103,44 +11281,44 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11103
11281
  box-sizing: border-box;
11104
11282
  }
11105
11283
 
11106
- .${t}-slide-image-cell {
11284
+ .${e}-slide-image-cell {
11107
11285
  position: relative;
11108
11286
  min-width: 0;
11109
11287
  height: 100%;
11110
11288
  }
11111
11289
 
11112
- .${t}-slide-image-cell-cover {
11290
+ .${e}-slide-image-cell-cover {
11113
11291
  aspect-ratio: var(--image-aspect-ratio);
11114
11292
  overflow: hidden;
11115
11293
  height: auto;
11116
11294
  width: 100%;
11117
11295
  }
11118
11296
 
11119
- .${t}-slide-image {
11297
+ .${e}-slide-image {
11120
11298
  display: block;
11121
11299
  }
11122
11300
 
11123
- .${t}-slide-image-cover {
11301
+ .${e}-slide-image-cover {
11124
11302
  object-fit: cover;
11125
11303
  width: 100%;
11126
11304
  height: 100%;
11127
11305
  max-width: 100%;
11128
11306
  }
11129
11307
 
11130
- .${t}-slide-image-fit {
11308
+ .${e}-slide-image-fit {
11131
11309
  object-fit: contain;
11132
11310
  width: auto;
11133
11311
  height: auto;
11134
11312
  max-width: 100%;
11135
11313
  }
11136
11314
 
11137
- .${t}-slide-image-custom {
11315
+ .${e}-slide-image-custom {
11138
11316
  object-fit: var(--image-object-fit);
11139
11317
  max-width: 100%;
11140
11318
  height: 100%;
11141
11319
  }
11142
11320
 
11143
- .${t}-close-icon {
11321
+ .${e}-close-icon {
11144
11322
  position: relative;
11145
11323
  flex-shrink: 0;
11146
11324
  pointer-events: auto;
@@ -11153,7 +11331,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11153
11331
  padding: 0;
11154
11332
  }
11155
11333
 
11156
- .${t}-close-icon-inner {
11334
+ .${e}-close-icon-inner {
11157
11335
  all: unset;
11158
11336
  position: relative;
11159
11337
  cursor: pointer;
@@ -11162,14 +11340,14 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11162
11340
  pointer-events: auto;
11163
11341
  }
11164
11342
 
11165
- .${t}-close-icon-img {
11343
+ .${e}-close-icon-img {
11166
11344
  position: absolute;
11167
11345
  top: 50%;
11168
11346
  left: 50%;
11169
11347
  transform: translate(-50%, -50%);
11170
11348
  }
11171
11349
 
11172
- .${t}-titles-row {
11350
+ .${e}-titles-row {
11173
11351
  position: relative;
11174
11352
  flex: 0 1 auto;
11175
11353
  z-index: 2;
@@ -11181,7 +11359,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11181
11359
  flex-direction: row;
11182
11360
  }
11183
11361
 
11184
- .${t}-titles-row-two-row {
11362
+ .${e}-titles-row-two-row {
11185
11363
  display: flex;
11186
11364
  flex: 1;
11187
11365
  height: 100%;
@@ -11191,7 +11369,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11191
11369
  width: 100%;
11192
11370
  }
11193
11371
 
11194
- .${t}-titles-row-top {
11372
+ .${e}-titles-row-top {
11195
11373
  display: flex;
11196
11374
  flex-direction: row;
11197
11375
  align-items: center;
@@ -11200,12 +11378,12 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11200
11378
  margin-bottom: 0;
11201
11379
  }
11202
11380
 
11203
- .${t}-titles-row-top .${t}-title-cell[data-title="title1"] {
11381
+ .${e}-titles-row-top .${e}-title-cell[data-title="title1"] {
11204
11382
  flex: 0 0 auto;
11205
11383
  min-width: 0;
11206
11384
  }
11207
11385
 
11208
- .${t}-titles-row-top-controls {
11386
+ .${e}-titles-row-top-controls {
11209
11387
  display: flex;
11210
11388
  flex-direction: row;
11211
11389
  align-items: center;
@@ -11213,7 +11391,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11213
11391
  margin-left: auto;
11214
11392
  }
11215
11393
 
11216
- .${t}-titles-row-bottom-wrap {
11394
+ .${e}-titles-row-bottom-wrap {
11217
11395
  display: flex;
11218
11396
  flex-direction: column;
11219
11397
  width: 100%;
@@ -11221,7 +11399,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11221
11399
  flex-shrink: 0;
11222
11400
  }
11223
11401
 
11224
- .${t}-titles-row-bottom-area {
11402
+ .${e}-titles-row-bottom-area {
11225
11403
  position: relative;
11226
11404
  flex: 1;
11227
11405
  min-height: 0;
@@ -11230,7 +11408,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11230
11408
  width: 100%;
11231
11409
  }
11232
11410
 
11233
- .${t}-titles-row-bottom {
11411
+ .${e}-titles-row-bottom {
11234
11412
  position: relative;
11235
11413
  display: flex;
11236
11414
  flex-direction: row;
@@ -11238,18 +11416,18 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11238
11416
  width: 100%;
11239
11417
  }
11240
11418
 
11241
- .${t}-titles-row-bottom .${t}-title-cell {
11419
+ .${e}-titles-row-bottom .${e}-title-cell {
11242
11420
  flex: 0 0 auto;
11243
11421
  }
11244
11422
 
11245
- .${t}-title-cell {
11423
+ .${e}-title-cell {
11246
11424
  position: relative;
11247
11425
  flex: 0 0 auto;
11248
11426
  min-width: 0;
11249
11427
  box-sizing: border-box;
11250
11428
  }
11251
11429
 
11252
- .${t}-text-bar-cell {
11430
+ .${e}-text-bar-cell {
11253
11431
  position: relative;
11254
11432
  flex: 0 1 auto;
11255
11433
  min-width: 0;
@@ -11257,18 +11435,18 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11257
11435
  align-items: center;
11258
11436
  }
11259
11437
 
11260
- .${t}-title1,
11261
- .${t}-title2,
11262
- .${t}-title3 {
11438
+ .${e}-title1,
11439
+ .${e}-title2,
11440
+ .${e}-title3 {
11263
11441
  margin: 0;
11264
11442
  min-width: 0;
11265
11443
  }
11266
11444
 
11267
- .${t}-title-resize-handle {
11445
+ .${e}-title-resize-handle {
11268
11446
  background: transparent;
11269
11447
  }
11270
11448
 
11271
- .${t}-title-resize-handle::after {
11449
+ .${e}-title-resize-handle::after {
11272
11450
  content: '';
11273
11451
  position: absolute;
11274
11452
  top: 0;
@@ -11280,7 +11458,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11280
11458
  pointer-events: none;
11281
11459
  }
11282
11460
 
11283
- .${t}-titles-stack {
11461
+ .${e}-titles-stack {
11284
11462
  position: relative;
11285
11463
  display: flex;
11286
11464
  flex-direction: row;
@@ -11288,13 +11466,13 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11288
11466
  min-width: 0;
11289
11467
  }
11290
11468
 
11291
- .${t}-titles-stack-stacked {
11469
+ .${e}-titles-stack-stacked {
11292
11470
  flex-direction: column;
11293
11471
  align-items: stretch;
11294
11472
  height: 100%;
11295
11473
  }
11296
11474
 
11297
- .${t}-titles-layer-out {
11475
+ .${e}-titles-layer-out {
11298
11476
  position: absolute;
11299
11477
  inset: 0;
11300
11478
  display: flex;
@@ -11303,16 +11481,16 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11303
11481
  z-index: 1;
11304
11482
  }
11305
11483
 
11306
- .${t}-titles-layer-out-stacked {
11484
+ .${e}-titles-layer-out-stacked {
11307
11485
  flex-direction: column;
11308
11486
  align-items: stretch;
11309
11487
  }
11310
11488
 
11311
- .${t}-titles-layer-out-bottom {
11489
+ .${e}-titles-layer-out-bottom {
11312
11490
  justify-content: flex-end;
11313
11491
  }
11314
11492
 
11315
- .${t}-titles-layer-in {
11493
+ .${e}-titles-layer-in {
11316
11494
  position: relative;
11317
11495
  display: flex;
11318
11496
  flex-direction: row;
@@ -11320,39 +11498,39 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11320
11498
  min-width: 0;
11321
11499
  }
11322
11500
 
11323
- .${t}-titles-layer-in-stacked {
11501
+ .${e}-titles-layer-in-stacked {
11324
11502
  flex-direction: column;
11325
11503
  align-items: stretch;
11326
11504
  flex: 1;
11327
11505
  min-height: 0;
11328
11506
  }
11329
11507
 
11330
- .${t}-titles-layer-in-fading {
11508
+ .${e}-titles-layer-in-fading {
11331
11509
  position: absolute;
11332
11510
  inset: 0;
11333
11511
  z-index: 0;
11334
11512
  }
11335
11513
 
11336
- @keyframes ${t}-titles-fade-in {
11514
+ @keyframes ${e}-titles-fade-in {
11337
11515
  from { opacity: 0; }
11338
11516
  to { opacity: 1; }
11339
11517
  }
11340
11518
 
11341
- @keyframes ${t}-titles-fade-out {
11519
+ @keyframes ${e}-titles-fade-out {
11342
11520
  from { opacity: 1; }
11343
11521
  to { opacity: 0; }
11344
11522
  }
11345
11523
 
11346
- .${t}-titles-fade-in {
11524
+ .${e}-titles-fade-in {
11347
11525
  opacity: 0;
11348
- animation: ${t}-titles-fade-in ${sr}ms ease-in-out forwards;
11526
+ animation: ${e}-titles-fade-in ${hr}ms ease-in-out forwards;
11349
11527
  }
11350
11528
 
11351
- .${t}-titles-fade-out {
11352
- animation: ${t}-titles-fade-out ${sr}ms ease-in-out forwards;
11529
+ .${e}-titles-fade-out {
11530
+ animation: ${e}-titles-fade-out ${hr}ms ease-in-out forwards;
11353
11531
  }
11354
11532
 
11355
- .${t}-lightbox-overlay-content {
11533
+ .${e}-lightbox-overlay-content {
11356
11534
  position: absolute;
11357
11535
  inset: 0;
11358
11536
  z-index: 3;
@@ -11362,7 +11540,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11362
11540
  isolation: isolate;
11363
11541
  }
11364
11542
 
11365
- .${t}-lightbox-persistent-controls {
11543
+ .${e}-lightbox-persistent-controls {
11366
11544
  position: relative;
11367
11545
  z-index: 1;
11368
11546
  display: flex;
@@ -11372,7 +11550,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11372
11550
  isolation: isolate;
11373
11551
  }
11374
11552
 
11375
- .${t}-lightbox-content-area {
11553
+ .${e}-lightbox-content-area {
11376
11554
  position: relative;
11377
11555
  display: flex;
11378
11556
  flex-direction: row;
@@ -11383,12 +11561,12 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11383
11561
  min-height: 0;
11384
11562
  }
11385
11563
 
11386
- .${t}-lightbox-content-area-stacked {
11564
+ .${e}-lightbox-content-area-stacked {
11387
11565
  align-items: stretch;
11388
11566
  align-self: stretch;
11389
11567
  }
11390
11568
 
11391
- .${t}-text-bar-cell-stacked {
11569
+ .${e}-text-bar-cell-stacked {
11392
11570
  align-self: stretch;
11393
11571
  flex: 1;
11394
11572
  min-width: 0;
@@ -11398,7 +11576,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11398
11576
  align-items: stretch;
11399
11577
  }
11400
11578
 
11401
- .${t}-entry-counter {
11579
+ .${e}-entry-counter {
11402
11580
  position: relative;
11403
11581
  z-index: 2;
11404
11582
  pointer-events: none;
@@ -11406,14 +11584,14 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11406
11584
  flex-shrink: 0;
11407
11585
  }
11408
11586
 
11409
- .${t}-control {
11587
+ .${e}-control {
11410
11588
  position: relative;
11411
11589
  z-index: 2;
11412
11590
  pointer-events: auto;
11413
11591
  flex-shrink: 0;
11414
11592
  }
11415
11593
 
11416
- .${t}-control::before {
11594
+ .${e}-control::before {
11417
11595
  content: "";
11418
11596
  position: absolute;
11419
11597
  top: 0;
@@ -11425,7 +11603,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
11425
11603
  pointer-events: auto;
11426
11604
  z-index: 10;
11427
11605
  }
11428
- `}const Fm=20,Nm=2,Xo=t=>`max(${t}, ${Fm}px)`,li=t=>((t==null?void 0:t.image)??[]).slice(0,Nm),Os=t=>t.reduce((e,n)=>e+li(n).length,0),Hm=(t,e)=>{const n=t.slice(0,e).reduce((r,l)=>r+li(l).length,1),i=li(t[e]).length;return{start:n,end:n+i-1}},Bm=(t,e)=>{const n=Os(t),{start:i,end:r}=Hm(t,e);return i===r?`${i} / ${n}`:`${i}-${r} / ${n}`},so=(t,e)=>e==="B"?t.flatMap((n,i)=>li(n).map(r=>({entry:n,entryIndex:i,images:[r]}))):t.map((n,i)=>({entry:n,entryIndex:i,images:li(n)})),Om=(t,e,n,i)=>{var l;if(n==="B")return`${e+1} / ${t.length}`;const r=((l=t[e])==null?void 0:l.entryIndex)??0;return Bm(i,r)},jl=t=>t?`${t.title1??""}|${t.title2??""}|${t.title3??""}`:"",Dm=(t,e,n)=>t==="B"?e.length>1:Os(n)>1,Un=.004,qi=.004,Yo={title1Width:.13,title2Width:.13,title3Width:.14};function Xi(t,e,n,i,r){const l=[];return e.title1&&l.push({prefix:"title1",widthKey:"title1Width",className:`${t}-title1`,style:n,text:e.title1}),e.title2&&l.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${t}-title2`,style:i,text:e.title2}),e.title3&&l.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${t}-title3`,style:r,text:e.title3}),l}function ho(t,e){if(t<=0)return[];const n=e.slice(0,t),i=n.reduce((l,s)=>l+s,0);if(i<=1)return n;const{widths:r}=[...n].reverse().reduce(({overflow:l,widths:s},d)=>{if(l<=0||d<=0)return{overflow:l,widths:[d,...s]};const a=Math.min(l,d);return{overflow:l-a,widths:[d-a,...s]}},{overflow:i-1,widths:[]});return r}function cr(t,e){return ho(t,e)}function Nn(t,e){const n=e.filter((i,r)=>r!==t).reduce((i,r)=>i+r,0);return Math.max(1-n,0)}function Yi(t,e){const n=t.map(i=>e[i.widthKey]??0);return{resolved:ho(t.length,n),effective:cr(t.length,n)}}function jm(t,e,n,i){return t.slice(0,i).reduce((r,l,s)=>r+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(e[s]??0),0)}function zm(t,e,n,i){return t.slice(0,i+1).reduce((r,l,s)=>r+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(e[s]??0),0)}const Vm=({prefix:t,entries:e,settings:n,isEditor:i,isEditMode:r,isPreviewMode:l,initialSlideIndex:s=0,enableUrlSync:d=!1,journalItemId:a=null,onBeforeClose:p,onClose:u})=>{const{type:S,coverFit:x,backgroundColor:y,imageGap:m,maxWidth:f,maxHeight:L,textTransition:w,title1Width:$,title2Width:C,title3Width:P,title1MarginLeft:E=0,title2MarginLeft:k=0,title3MarginLeft:b=0,titleRowMarginBottom:M=0,titleHeaderLayout:z="single-row",countCloseGap:h=0,closeIcon:T,closeIconMaxWidth:_,closeIconColor:N,closeIconHoverColor:V,contentMarginTop:at=0,iconMarginRight:O=0}=n,W=c.useCallback(R=>I.scalingValue(R,i??!1),[i]),G=W(m??0),K=`${f}%`,H=`${L}%`,q=W(h),et=W(at),lt=W(O),F=Zi("title1",Ji(n,"title1"),i),ct=Zi("title2",Ji(n,"title2"),i),g=Zi("title3",Ji(n,"title3"),i),nt=Zi("count",Ji(n,"count"),i),ft=!!r,it=z==="mobile",wt=!i||!!l,mt=!r&&(!i||!!l),ot=c.useMemo(()=>so(e,S),[e,S]),[B,Q]=c.useState(s),U=ot[B],Y=U==null?void 0:U.entry,[It,Mt]=c.useState(!1),[At,Pt]=c.useState(null),[xt,j]=c.useState(!1),[st,A]=c.useState(null),[D,X]=c.useState(!1),[J,gt]=c.useState(0),[Ct,Dt]=c.useState(),[Rt,$t]=c.useState(),[Gt,pt]=c.useState(null),Et=c.useRef(null),jt=c.useRef(0),zt=c.useRef(0),Vt=c.useRef(0),Ie=c.useRef(!1),pe=c.useRef(null),$e=c.useRef(null),Yt=c.useRef(null),fe=c.useRef(null),be=c.useRef(null),Oe=c.useRef(null),Wt=c.useRef(null),we=c.useCallback(()=>{const R=$e.current;if(!R)return;const dt=R.closest(`.${t}-lightbox-content-area`);if(!dt)return R.getBoundingClientRect().width;const _t=Array.from(dt.children).reduce((Tt,St)=>!(St instanceof HTMLElement)||St.contains(R)?Tt:Tt+St.getBoundingClientRect().width,0);return dt.getBoundingClientRect().width-_t},[t]),Qt=c.useCallback(()=>{Et.current&&(clearTimeout(Et.current),Et.current=null)},[]),Ee=c.useCallback(R=>{R===jt.current&&(A(null),X(!1))},[]),ke=c.useCallback(()=>{r||Ie.current||(Ie.current=!0,p==null||p(),Mt(!1),pe.current=setTimeout(()=>{u()},qo))},[r,p,u]),sn=c.useCallback(R=>!!(R.closest("[data-controls]")||R.closest(`.${t}-close-icon`)),[t]),{isSwipeDragging:Ae,backdropStyle:De,mediaAreaStyle:ze,overlayContentStyle:Ft,swipeHandlers:ce,dismissAreaStyle:me}=ks({enabled:mt,onClose:ke,animMs:qo,isBlockedTarget:sn}),te=c.useCallback(R=>{d&&Hs(R+1,a,!0)},[d,a]),ee=c.useCallback(R=>{var Xe;if(ot.length===0)return;const dt=(R%ot.length+ot.length)%ot.length;if(dt===B)return;const _t=ot[B],Tt=ot[dt];jt.current+=1;const St=jt.current,re=w==="fade"&&jl(_t==null?void 0:_t.entry)!==jl(Tt==null?void 0:Tt.entry),Te=(Xe=$e.current)==null?void 0:Xe.getBoundingClientRect().height,Zt=re?(()=>{var Vr;const zn=we();Li.flushSync(()=>{pt(Tt.entry)}),Yt.current&&zn&&(Yt.current.style.width=`${zn}px`);const cn=(Vr=Yt.current)==null?void 0:Vr.getBoundingClientRect().height;return Yt.current&&(Yt.current.style.width=""),{measuredIncomingTitlesHeight:cn,incomingTitlesMeasureWidth:zn}})():void 0,He=Math.max(Te??0,(Zt==null?void 0:Zt.measuredIncomingTitlesHeight)??0)||void 0;gt(St),A(B),X(!0),Q(dt),te(dt),Vt.current=dt,re?(Qt(),He&&Dt(He),Zt!=null&&Zt.incomingTitlesMeasureWidth&&$t(Zt.incomingTitlesMeasureWidth),Pt((_t==null?void 0:_t.entryIndex)??null),j(!0),zt.current=Tt.entryIndex,Et.current=setTimeout(()=>{Pt(null),j(!1),Dt(void 0),$t(void 0),pt(null),Et.current=null},sr)):(Qt(),Pt(null),j(!1),Dt(void 0),$t(void 0),pt(null),zt.current=Tt.entryIndex)},[B,Qt,we,ot,te,w]),Fe=c.useCallback(()=>{Wt.current=null},[]),Ve=c.useCallback(R=>{!wt||ot.length<=1||R.pointerType==="mouse"&&R.button!==0||R.target.closest("[data-controls]")||(Wt.current={startX:R.clientX,startY:R.clientY,pointerId:R.pointerId})},[wt,ot.length]),Ne=c.useCallback(R=>{var Xe;if(!wt||ot.length<=1||R.pointerType==="mouse"&&R.button!==0)return;if(Ae){Fe();return}const dt=Wt.current;if(!dt||dt.pointerId!==R.pointerId||(Fe(),R.target.closest("[data-controls]")))return;const Tt=R.clientX-dt.startX,St=R.clientY-dt.startY,re=Math.abs(Tt),Te=Math.abs(St);if(re>=Wm&&re>Te){ee(Tt>0?B-1:B+1);return}if(re>Hl||Te>Hl)return;const Zt=(Xe=fe.current)==null?void 0:Xe.getBoundingClientRect(),He=Zt?Zt.left+Zt.width/2:window.innerWidth/2;ee(R.clientX<He?B-1:B+1)},[B,wt,ee,Ae,Fe,ot.length]),bn=c.useCallback(R=>{const dt=Wt.current;(dt==null?void 0:dt.pointerId)===R.pointerId&&Fe()},[Fe]);Fs(),c.useEffect(()=>{Oe.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const R=requestAnimationFrame(()=>{Mt(!0),requestAnimationFrame(()=>{be.current?be.current.focus():fe.current&&fe.current.focus()})});return()=>{cancelAnimationFrame(R),pe.current&&clearTimeout(pe.current),Et.current&&clearTimeout(Et.current);const dt=Oe.current;dt&&document.contains(dt)&&dt.focus()}},[]),c.useEffect(()=>{var R;w!=="fade"&&(zt.current=((R=ot[B])==null?void 0:R.entryIndex)??0,Qt(),Pt(null),j(!1),Dt(void 0),$t(void 0))},[B,Qt,ot,w]),c.useEffect(()=>{const R=dt=>{if(dt.key==="Escape"){ke();return}if(dt.key==="ArrowLeft"&&ot.length>1){ee(B-1);return}if(dt.key==="ArrowRight"&&ot.length>1){ee(B+1);return}if(dt.key==="Tab"&&fe.current){const _t=fe.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),Tt=Array.from(_t).filter(Zt=>!Zt.closest('[aria-hidden="true"]'));if(Tt.length===0)return;const St=Tt[0],re=Tt[Tt.length-1],Te=document.activeElement;dt.shiftKey?(Te===St||!fe.current.contains(Te))&&(dt.preventDefault(),re.focus()):(Te===re||!fe.current.contains(Te))&&(dt.preventDefault(),St.focus())}};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[ee,ke,B,ot.length]),c.useLayoutEffect(()=>{Qt(),jt.current=0,gt(0),A(null),X(!1),Pt(null),j(!1),Dt(void 0),$t(void 0),pt(null),Q(R=>{const dt=Math.max(0,ot.length-1);return Math.min(R,dt)})},[Qt,e.length,S,ot.length]),c.useLayoutEffect(()=>{var R;Vt.current=s,zt.current=((R=ot[s])==null?void 0:R.entryIndex)??0,Q(s)},[s,ot.length]);const Jt=At!==null?e[At]:null,an=st!==null?ot[st]:null,Sn=(Y==null?void 0:Y.title1)||(Y==null?void 0:Y.title2)||(Y==null?void 0:Y.title3)||(Jt==null?void 0:Jt.title1)||(Jt==null?void 0:Jt.title2)||(Jt==null?void 0:Jt.title3),Nt=Dm(S,ot,e),ye=T!==null,Re=Sn||Nt||ye,tt=Nt&&ye?{gap:q}:void 0,yt=`${t}-titles-stack${it?` ${t}-titles-stack-stacked`:""}`,Lt=`${t}-titles-layer-out${it?` ${t}-titles-layer-out-stacked`:""}`,Ot=W(M),Kt=c.useMemo(()=>({title1Width:$??Yo.title1Width,title2Width:C??Yo.title2Width,title3Width:P??Yo.title3Width}),[$,C,P]),Ut=c.useMemo(()=>({title2MarginLeft:k,title3MarginLeft:b}),[k,b]),vt=c.useMemo(()=>Y?Xi(t,Y,F,ct,g):[],[t,Y,F,ct,g]),ge=c.useMemo(()=>vt.map(R=>Kt[R.widthKey]),[vt,Kt]),oe=c.useMemo(()=>ho(vt.length,ge),[vt.length,ge]),de=c.useMemo(()=>cr(vt.length,ge),[vt.length,ge]),ve=c.useMemo(()=>vt.filter(R=>R.prefix==="title1"),[vt]),Ht=c.useMemo(()=>vt.filter(R=>R.prefix==="title2"||R.prefix==="title3"),[vt]),Se=c.useMemo(()=>Yi(ve,Kt),[ve,Kt]),ne=c.useMemo(()=>Yi(Ht,Kt),[Ht,Kt]),Ce=c.useCallback((R,dt)=>{const _t=vt.findIndex(St=>St.prefix===R.prefix);if(!it||dt==="single-row")return{effectiveWidth:de[_t]??0,resolvedWidth:oe[_t]??0,maxWidth:Nn(_t,oe)};if(dt==="two-row-top"){const St=ve.findIndex(re=>re.prefix===R.prefix);return{effectiveWidth:Se.effective[St]??0,resolvedWidth:Se.resolved[St]??0,maxWidth:Nn(St,Se.resolved)}}const Tt=Ht.findIndex(St=>St.prefix===R.prefix);return{effectiveWidth:ne.effective[Tt]??0,resolvedWidth:ne.resolved[Tt]??0,maxWidth:Nn(Tt,ne.resolved)}},[vt,Ht,ne,de,oe,ve,Se,it]),Qe=c.useCallback(R=>zm(vt,oe,Ut,R)+(it?0:E??0),[vt,oe,Ut,it,E]),he=c.useCallback(()=>it?0:E??0,[it,E]),tn=c.useCallback(R=>Ht.slice(0,R).reduce((dt,_t,Tt)=>dt+(_t.marginLeftKey?Ut[_t.marginLeftKey]??0:0)+(ne.resolved[Tt]??0),0),[Ht,ne.resolved,Ut]),ue=c.useCallback(R=>{const dt=Ht[R];return tn(R)+(dt.marginLeftKey?Ut[dt.marginLeftKey]??0:0)+(ne.resolved[R]??0)},[Ht,ne.resolved,tn,Ut]),je=c.useCallback((R,dt,_t)=>{if(!it||_t==="single-row"){const Zt=R.findIndex(cn=>cn.prefix===dt.prefix),He=R.map(cn=>Kt[cn.widthKey]),Xe=ho(R.length,He);return{effectiveWidth:cr(R.length,He)[Zt]??0,resolvedWidth:Xe[Zt]??0,maxWidth:Nn(Zt,Xe)}}if(_t==="two-row-top"){const Zt=R.filter(cn=>cn.prefix==="title1"),He=Zt.findIndex(cn=>cn.prefix===dt.prefix),{resolved:Xe,effective:zn}=Yi(Zt,Kt);return{effectiveWidth:zn[He]??0,resolvedWidth:Xe[He]??0,maxWidth:Nn(He,Xe)}}const Tt=R.filter(Zt=>Zt.prefix==="title2"||Zt.prefix==="title3"),St=Tt.findIndex(Zt=>Zt.prefix===dt.prefix),{resolved:re,effective:Te}=Yi(Tt,Kt);return{effectiveWidth:Te[St]??0,resolvedWidth:re[St]??0,maxWidth:Nn(St,re)}},[Kt,it]),v=(R,dt,_t)=>{const Tt=R.marginLeftKey?Ut[R.marginLeftKey]??0:0,{effectiveWidth:St,resolvedWidth:re,maxWidth:Te}=_t??Ce(R,dt),Zt=Math.max(Tt,qi),He=ft&&dt==="two-row-top";return o.jsxs("div",{className:`${t}-title-cell`,"data-title":R.prefix,style:{width:W(St),...Tt>0?{marginLeft:W(Tt)}:{}},children:[o.jsx("p",{className:R.className,style:R.style,children:R.text}),He&&R.marginLeftKey?o.jsx("div",{"data-controls":R.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re),style:{position:"absolute",top:0,left:W(-Tt),width:W(Zt),height:"100%",pointerEvents:"auto"}}):null,He?o.jsx("div",{"data-controls":R.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Te),"data-controls-variant":"column-width",className:`${t}-title-resize-handle`,style:{position:"absolute",top:0,right:W(-Un/2),width:W(Un),height:"100%",pointerEvents:"auto"}}):null]},R.className)},Z=()=>o.jsx("div",{...ft?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:W(E??0),flexShrink:0,alignSelf:"stretch",...ft?{pointerEvents:"auto"}:{}}}),rt=()=>o.jsxs("div",{className:`${t}-text-bar-cell`,children:[o.jsx("span",{className:`${t}-entry-counter`,style:nt,"aria-live":"polite","aria-atomic":"true",children:Om(ot,B,S,e)}),ft&&ye?o.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Xo(q)} + ${q}))`,width:Xo(q),height:"100%",pointerEvents:"auto",zIndex:3}}):null]}),ht=()=>o.jsxs("div",{className:`${t}-close-icon`,style:{width:I.scalingValue(_??0,i),height:I.scalingValue(_??0,i),marginRight:lt,"--close-icon-hover-color":V},children:[o.jsx("button",{ref:be,type:"button",className:`${t}-close-icon-inner`,onClick:ke,"aria-label":"Close",children:o.jsx(nn,{url:T??"",fill:N,hoverFill:V,className:`${t}-close-icon-img`})}),ft?o.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${t}-control`,style:{position:"absolute",top:0,left:"100%",width:lt,height:"100%",pointerEvents:"auto"}}):null]}),kt=()=>!Nt&&!ye?null:o.jsxs("div",{className:`${t}-titles-row-top-controls`,style:tt,children:[Nt?rt():null,ye?ht():null]}),ie=R=>{if(!R)return null;const dt=Xi(t,R,F,ct,g);return o.jsxs(o.Fragment,{children:[E>0||ft?Z():null,dt.map(_t=>v(_t,"single-row",je(dt,_t,"single-row")))]})},Me=R=>{if(!R)return null;const dt=Xi(t,R,F,ct,g),_t=dt.find(Tt=>Tt.prefix==="title1");return!_t&&!(E>0||ft)?null:o.jsxs(o.Fragment,{children:[E>0||ft?Z():null,_t?v(_t,"two-row-top",je(dt,_t,"two-row-top")):null]})},_e=(R,dt=!1)=>{const _t=R?Xi(t,R,F,ct,g):[],Tt=_t.filter(Te=>Te.prefix==="title2"||Te.prefix==="title3"),St=ft&&dt;return Tt.length>0||St||(M??0)>0?o.jsxs("div",{className:`${t}-titles-row-bottom-wrap`,children:[Tt.length>0?o.jsxs("div",{className:`${t}-titles-row-bottom`,children:[Tt.map(Te=>v(Te,"two-row-bottom",je(_t,Te,"two-row-bottom"))),dt&&ft?o.jsxs(o.Fragment,{children:[Ds(),js()]}):null]}):null,(M??0)>0||St?o.jsx("div",{"data-controls":St?"titleRowMarginBottom":void 0,"data-controls-axis":St?"y":void 0,"data-controls-reverse":St?"":void 0,className:St?`${t}-control`:void 0,style:{height:Ot,width:"100%",flexShrink:0,pointerEvents:St?"auto":"none"}}):null]}):null},Wn=(R,dt=!1)=>o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:`${t}-titles-row-top`,children:[Me(R),kt()]}),_e(R,dt)]}),wn=R=>it?o.jsx("div",{className:`${t}-titles-row-two-row`,style:{width:"100%"},children:Wn(R)}):R?o.jsx("div",{className:`${t}-titles-row`,style:{width:"100%"},children:ie(R)}):null,Ni=()=>{const R=it?-1:vt.findIndex(Tt=>Tt.prefix==="title1"),dt=!it&&(ft||(E??0)>0)?(()=>{const St=Math.max(E??0,qi),re=R>=0?oe[R]:$;return o.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re),style:{position:"absolute",top:0,left:0,width:W(St),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,_t=vt.flatMap((Tt,St)=>{if(!Tt.marginLeftKey)return[];const re=Ut[Tt.marginLeftKey]??0,Te=jm(vt,oe,Ut,St)+he(),Zt=Math.max(re,qi);return o.jsx("div",{"data-controls":Tt.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(oe[St]),style:{position:"absolute",top:0,left:W(Te),width:W(Zt),height:"100%",pointerEvents:"auto"}},Tt.marginLeftKey)});return dt?[dt,..._t]:_t},ui=()=>vt.map((R,dt)=>{const _t=Nn(dt,oe),St=Qe(dt)-Un/2;return o.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:o.jsx("div",{"data-controls":R.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(_t),"data-controls-variant":"column-width",className:`${t}-title-resize-handle`,style:{position:"absolute",top:0,left:W(St),width:W(Un),height:"100%",pointerEvents:"auto"}})},`${R.widthKey}-junction`)}),Ds=()=>Ht.flatMap((R,dt)=>{if(!R.marginLeftKey)return[];const _t=Ut[R.marginLeftKey]??0,Tt=tn(dt),St=Math.max(_t,qi),{resolvedWidth:re}=Ce(R,"two-row-bottom");return o.jsx("div",{"data-controls":R.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re),style:{position:"absolute",top:0,left:W(Tt),width:W(St),height:"100%",pointerEvents:"auto"}},R.marginLeftKey)}),js=()=>Ht.map((R,dt)=>{const{maxWidth:_t}=Ce(R,"two-row-bottom"),St=ue(dt)-Un/2;return o.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:o.jsx("div",{"data-controls":R.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(_t),"data-controls-variant":"column-width",className:`${t}-title-resize-handle`,style:{position:"absolute",top:0,left:W(St),width:W(Un),height:"100%",pointerEvents:"auto"}})},`${R.widthKey}-junction`)}),Hi=()=>!ft||it?null:o.jsxs(o.Fragment,{children:[Ni(),ui()]}),Or=R=>{const dt=!R.objectFit&&yn(x);return{className:`${t}-slide-image-cell${dt?` ${t}-slide-image-cell-cover`:""}`,style:{maxWidth:K,maxHeight:H,...dt?{"--image-aspect-ratio":Ro(x)}:{}}}},Dr=R=>R.objectFit?{className:`${t}-slide-image ${t}-slide-image-custom`,style:{"--image-object-fit":R.objectFit}}:yn(x)?{className:`${t}-slide-image ${t}-slide-image-cover`}:{className:`${t}-slide-image ${t}-slide-image-fit`},jr=R=>{if(R.length===0)return null;const dt=R.length>1,_t=Xo(G),Tt=`calc(-0.5 * (${_t} + ${G}))`;if(R.length===1){const St=R[0];return o.jsx("div",{...Or(St),children:o.jsx("img",{...Dr(St),src:St.url,alt:St.name??"",draggable:!1})})}return o.jsx("div",{className:`${t}-slide-inner`,style:dt?{gap:G}:void 0,children:R.map((St,re)=>o.jsxs("div",{...Or(St),children:[o.jsx("img",{...Dr(St),src:St.url,alt:St.name??"",draggable:!1}),ft&&dt&&re<R.length-1&&o.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Tt,width:_t,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${St.url}-${re}`))})},zr=!!(Y!=null&&Y.title2||Y!=null&&Y.title3||Jt!=null&&Jt.title2||Jt!=null&&Jt.title3||(M??0)>0||ft),zs=()=>o.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[o.jsx("div",{ref:Yt,className:yt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Wn(Gt||Y)}),o.jsxs("div",{ref:$e,className:`${t}-titles-row-two-row`,style:{...xt&&Ct?{minHeight:Ct}:void 0,...xt&&Rt?{width:Rt,maxWidth:"100%"}:void 0,...xt?{overflow:"hidden"}:void 0},children:[o.jsxs("div",{className:`${t}-titles-row-top`,children:[o.jsxs("div",{className:yt,style:{position:"relative",flex:1,minWidth:0},children:[Jt&&xt?o.jsx("div",{className:`${Lt} ${t}-titles-fade-out`,children:Me(Jt)}):null,o.jsx("div",{className:`${t}-titles-layer-in${xt?` ${t}-titles-layer-in-fading ${t}-titles-fade-in`:""}`,children:Me(Y)})]}),kt()]}),zr?o.jsxs("div",{className:`${t}-titles-row-bottom-area`,children:[Jt&&xt?o.jsx("div",{className:`${Lt} ${t}-titles-layer-out-bottom ${t}-titles-fade-out`,children:_e(Jt)}):null,o.jsx("div",{className:`${t}-titles-layer-in${xt?` ${t}-titles-layer-in-fading ${t}-titles-fade-in`:""}${it?` ${t}-titles-layer-in-stacked`:""}`,children:_e(Y,!0)}),Hi()]}):null]})]}),Vs=()=>{const R=zr;return o.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...R?{flex:1,height:"100%"}:{}},children:[o.jsx("div",{className:`${t}-titles-row-two-row`,style:R?void 0:{flex:"0 0 auto",height:"auto"},children:Wn(Y,!0)}),Hi()]})};return o.jsxs("div",{ref:fe,"data-selection":"none",className:`${t}-lightbox${i?` ${t}-lightbox-editor`:""}${r?` ${t}-lightbox-edit-mode`:""}`,onClick:()=>{Ae||ke()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ye?void 0:-1,style:{opacity:It?1:0,transition:`opacity ${qo}ms ease`,pointerEvents:It?"auto":"none"},children:[o.jsx("div",{className:`${t}-lightbox-backdrop`,style:{backgroundColor:y,...De}}),o.jsxs("div",{className:`${t}-lightbox-dismiss-area`,style:{position:"relative",width:"100%",height:"100%",...me},...ce,children:[o.jsx("div",{className:`${t}-lightbox-content`,style:ze,onClick:R=>R.stopPropagation(),children:o.jsx("div",{className:`${t}-lightbox-strip`,"data-desktop-nav":wt&&ot.length>1?"true":"false",onPointerDown:wt?Ve:void 0,onPointerUp:wt?Ne:void 0,onPointerCancel:wt?bn:void 0,children:o.jsxs("div",{className:`${t}-slide-stack`,children:[an&&D?o.jsx("div",{className:`${t}-slide-layer-out ${t}-slide-fade-out`,onAnimationEnd:R=>{R.target===R.currentTarget&&Ee(J)},children:o.jsx("div",{className:`${t}-slide-area`,children:jr(an.images)})},`slide-out-${J}`):null,o.jsx("div",{className:`${t}-slide-layer-in${D?` ${t}-slide-fade-in`:""}`,children:o.jsx("div",{className:`${t}-slide-area`,children:U?jr(U.images):null})},`slide-in-${J}-${B}`)]})})}),o.jsxs("div",{className:`${t}-lightbox-overlay-content`,style:{width:"100%",height:"100%",...Ft},children:[o.jsx("div",{"data-controls":ft?"contentMarginTop":void 0,className:ft?`${t}-control`:void 0,style:{height:et,width:"100%"}}),o.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...it?{flex:1,minHeight:0}:{}},children:o.jsxs("div",{className:`${t}-lightbox-content-area${it?` ${t}-lightbox-content-area-stacked`:""}`,children:[(it?Re:Sn)&&o.jsx("div",{className:`${t}-text-bar-cell${it?` ${t}-text-bar-cell-stacked`:""}`,children:it?w==="fade"?zs():Vs():w==="fade"?o.jsxs(o.Fragment,{children:[o.jsx("div",{ref:Yt,className:yt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:wn(Gt||Y)}),o.jsxs("div",{ref:$e,className:yt,style:{width:"100%",...xt&&Ct?{minHeight:Ct}:void 0,...xt&&Rt?{width:Rt,maxWidth:"100%"}:void 0,...xt?{overflow:"hidden"}:void 0},children:[Jt&&xt?o.jsx("div",{className:`${Lt} ${t}-titles-fade-out`,children:wn(Jt)}):null,o.jsx("div",{className:`${t}-titles-layer-in${xt?` ${t}-titles-layer-in-fading ${t}-titles-fade-in`:""}`,children:wn(Y)}),Hi()]})]}):o.jsxs("div",{style:{position:"relative",width:"100%"},children:[wn(Y),Hi()]})}),!it&&o.jsxs("div",{className:`${t}-lightbox-persistent-controls`,style:tt,children:[Nt&&rt(),ye&&ht()]})]})})]})]})]})},Fi=["title1","title2","title3","count"];function se(t,e){return`${t}${e.charAt(0).toUpperCase()}${e.slice(1)}`}const Km={title1:"1",title2:"2",title3:"3",count:"Count"};function Um(t){return[se(t,"fontFamily"),se(t,"fontSettings"),{type:"row",items:[se(t,"fontSize"),se(t,"lineHeight"),se(t,"letterSpacing"),se(t,"wordSpacing")]},se(t,"textAlign"),se(t,"textAppearance")]}function Gm(){return{type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Fi.map(t=>[Km[t],Um(t)]))}}const qm={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Xm={title1:.02,title2:.02,title3:.02,count:.017};function Ji(t,e){const n=i=>{const r=se(e,i);return t[r]};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:t[qm[e]]}}function Zi(t,e,n){var r,l;const i={fontSettings:{fontFamily:e.fontFamily,fontWeight:((r=e.fontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((l=e.fontSettings)==null?void 0:l.fontStyle)??"normal"},fontSize:e.fontSize??Xm[t],lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,wordSpacing:e.wordSpacing,textAlign:e.textAlign,textAppearance:e.textAppearance,color:e.color??"#ffffff"};return We(i,n)}const Ym=({settings:t,content:e,isEditor:n,isEditMode:i,isPreviewMode:r,portalId:l,metadata:s})=>{const{prefix:d}=I.useScopedStyles(),a=(s==null?void 0:s.itemId)??null,{cover:p,coverFit:u,type:S}=t,x=c.useRef(null),[y,m]=c.useState(!1),[f,L]=c.useState(0),w=c.useRef(!1),$=c.useRef(!1),C=c.useRef(!1),P=c.useMemo(()=>(e??[]).filter(h=>li(h).length>0),[e]),E=y||!!i&&P.length>0,k=!n,b=c.useCallback(()=>{k&&(C.current=!0,Pm($.current,a),$.current=!1)},[k,a]),M=(h=0)=>{if(i||P.length===0||n&&!r)return;const T=so(P,S),_=Math.max(0,Math.min(h,T.length-1));if(L(_),k){const N=Bs();Hs(_+1,a,N),$.current=!N}m(!0)},z=c.useCallback(()=>{m(!1),C.current=!1},[]);return c.useEffect(()=>{if(!k||w.current)return;w.current=!0;const h=Ol(a);if(!h)return;const T=Dl(h,so(P,S).length);T<0||(L(T),m(!0))},[P,a,k,S]),c.useEffect(()=>{if(!k)return;const h=()=>{if(C.current){C.current=!1,m(!1);return}const T=Ol(a);if(!T){m(!1);return}const _=Dl(T,so(P,S).length);if(_<0){m(!1);return}$.current=!1,L(_),m(!0)};return window.addEventListener("popstate",h),()=>window.removeEventListener("popstate",h)},[P,a,k,S]),o.jsxs(o.Fragment,{children:[o.jsxs("div",{ref:x,className:`${d}-wrapper`,children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:km(d)}}),p?o.jsx("button",{type:"button",className:`${d}-cover ${yn(u)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>M(),style:{display:"block",padding:0,border:"none",background:"transparent",...yn(u)?{"--image-aspect-ratio":Ro(u)}:{}},"aria-label":"Open journal gallery",children:o.jsx("img",{className:`${d}-cover-image ${yn(u)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:p,alt:"cover"})}):null]}),E&&typeof document<"u"&&(()=>{const h=(l?document.getElementById(l):null)??document.body;return Li.createPortal(o.jsx(Vm,{prefix:d,entries:P,settings:t,isEditor:n,isEditMode:i,isPreviewMode:r,initialSlideIndex:f,enableUrlSync:k,journalItemId:a,onBeforeClose:b,onClose:z}),h)})()]})},Jm=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
11606
+ `}const Bm=20,Om=2,ir=e=>`max(${e}, ${Bm}px)`,fi=e=>((e==null?void 0:e.image)??[]).slice(0,Om),Vs=e=>e.reduce((t,n)=>t+fi(n).length,0),Dm=(e,t)=>{const n=e.slice(0,t).reduce((o,l)=>o+fi(l).length,1),i=fi(e[t]).length;return{start:n,end:n+i-1}},jm=(e,t)=>{const n=Vs(e),{start:i,end:o}=Dm(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},fo=(e,t)=>t==="B"?e.flatMap((n,i)=>fi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:fi(n)})),zm=(e,t,n,i)=>{var l;if(n==="B")return`${t+1} / ${e.length}`;const o=((l=e[t])==null?void 0:l.entryIndex)??0;return jm(i,o)},Gl=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Vm=(e,t,n)=>e==="B"?t.length>1:Vs(n)>1,ni=.004,no=.004,or={title1Width:.13,title2Width:.13,title3Width:.14};function io(e,t,n,i,o){const l=[];return t.title1&&l.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&l.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&l.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),l}function Co(e,t){if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((l,s)=>l+s,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:l,widths:s},d)=>{if(l<=0||d<=0)return{overflow:l,widths:[d,...s]};const a=Math.min(l,d);return{overflow:l-a,widths:[d-a,...s]}},{overflow:i-1,widths:[]});return o}function yr(e,t){return Co(e,t)}function Vn(e,t){const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)}function oo(e,t){const n=e.map(i=>t[i.widthKey]??0);return{resolved:Co(e.length,n),effective:yr(e.length,n)}}function Km(e,t,n,i){return e.slice(0,i).reduce((o,l,s)=>o+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(t[s]??0),0)}function Gm(e,t,n,i){return e.slice(0,i+1).reduce((o,l,s)=>o+(l!=null&&l.marginLeftKey?n[l.marginLeftKey]??0:0)+(t[s]??0),0)}const Um=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:l,initialSlideIndex:s=0,enableUrlSync:d=!1,journalItemId:a=null,onBeforeClose:p,onClose:u})=>{const{type:S,coverFit:x,backgroundColor:v,imageGap:m,maxWidth:y,maxHeight:$,textTransition:w,title1Width:C,title2Width:T,title3Width:P,title1MarginLeft:M=0,title2MarginLeft:F=0,title3MarginLeft:b=0,titleRowMarginBottom:W=0,titleHeaderLayout:K="single-row",countCloseGap:h=0,closeIcon:L,closeIconMaxWidth:E,closeIconColor:k,closeIconHoverColor:z,contentMarginTop:le=0,iconMarginRight:O=0}=n,_=c.useCallback(I=>R.scalingValue(I,i??!1),[i]),q=_(m??0),G=`${y}%`,H=`${$}%`,X=_(h),ne=_(le),se=_(O),N=lo("title1",ro(n,"title1"),i),de=lo("title2",ro(n,"title2"),i),g=lo("title3",ro(n,"title3"),i),ie=lo("count",ro(n,"count"),i),fe=!!o,oe=K==="mobile",Ce=!i||!!l,me=!o&&(!i||!!l),re=c.useMemo(()=>fo(t,S),[t,S]),[B,Q]=c.useState(s),U=re[B],J=U==null?void 0:U.entry,[Me,Ae]=c.useState(!1),[ke,Fe]=c.useState(null),[xe,j]=c.useState(!1),[ae,A]=c.useState(null),[D,Y]=c.useState(!1),[Z,ge]=c.useState(0),[Te,je]=c.useState(),[_e,Le]=c.useState(),[Ge,pe]=c.useState(null),We=c.useRef(null),ze=c.useRef(0),Ve=c.useRef(0),Ne=c.useRef(0),It=c.useRef(!1),dt=c.useRef(null),bt=c.useRef(null),Ze=c.useRef(null),yt=c.useRef(null),Mt=c.useRef(null),Ht=c.useRef(null),Ee=c.useRef(null),it=c.useCallback(()=>{const I=bt.current;if(!I)return;const ce=I.closest(`.${e}-lightbox-content-area`);if(!ce)return I.getBoundingClientRect().width;const Re=Array.from(ce.children).reduce(($e,Se)=>!(Se instanceof HTMLElement)||Se.contains(I)?$e:$e+Se.getBoundingClientRect().width,0);return ce.getBoundingClientRect().width-Re},[e]),Ue=c.useCallback(()=>{We.current&&(clearTimeout(We.current),We.current=null)},[]),ut=c.useCallback(I=>{I===ze.current&&(A(null),Y(!1))},[]),Bt=c.useCallback(()=>{o||It.current||(It.current=!0,p==null||p(),Ae(!1),dt.current=setTimeout(()=>{u()},nr))},[o,p,u]),rn=c.useCallback(I=>!!(I.closest("[data-controls]")||I.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:jt,backdropStyle:Yt,mediaAreaStyle:ln,overlayContentStyle:He,swipeHandlers:Tt,dismissAreaStyle:pt}=Bs({enabled:me,onClose:Bt,animMs:nr,isBlockedTarget:rn}),et=c.useCallback(I=>{d&&js(I+1,a,!0)},[d,a]),mt=c.useCallback(I=>{var en;if(re.length===0)return;const ce=(I%re.length+re.length)%re.length;if(ce===B)return;const Re=re[B],$e=re[ce];ze.current+=1;const Se=ze.current,lt=w==="fade"&&Gl(Re==null?void 0:Re.entry)!==Gl($e==null?void 0:$e.entry),Ct=(en=bt.current)==null?void 0:en.getBoundingClientRect().height,nt=lt?(()=>{var qr;const Qn=it();Fi.flushSync(()=>{pe($e.entry)}),Ze.current&&Qn&&(Ze.current.style.width=`${Qn}px`);const gn=(qr=Ze.current)==null?void 0:qr.getBoundingClientRect().height;return Ze.current&&(Ze.current.style.width=""),{measuredIncomingTitlesHeight:gn,incomingTitlesMeasureWidth:Qn}})():void 0,Ot=Math.max(Ct??0,(nt==null?void 0:nt.measuredIncomingTitlesHeight)??0)||void 0;ge(Se),A(B),Y(!0),Q(ce),et(ce),Ne.current=ce,lt?(Ue(),Ot&&je(Ot),nt!=null&&nt.incomingTitlesMeasureWidth&&Le(nt.incomingTitlesMeasureWidth),Fe((Re==null?void 0:Re.entryIndex)??null),j(!0),Ve.current=$e.entryIndex,We.current=setTimeout(()=>{Fe(null),j(!1),je(void 0),Le(void 0),pe(null),We.current=null},hr)):(Ue(),Fe(null),j(!1),je(void 0),Le(void 0),pe(null),Ve.current=$e.entryIndex)},[B,Ue,it,re,et,w]),zt=c.useCallback(()=>{Ee.current=null},[]),Vt=c.useCallback(I=>{!Ce||re.length<=1||I.pointerType==="mouse"&&I.button!==0||I.target.closest("[data-controls]")||(Ee.current={startX:I.clientX,startY:I.clientY,pointerId:I.pointerId})},[Ce,re.length]),Jt=c.useCallback(I=>{var en;if(!Ce||re.length<=1||I.pointerType==="mouse"&&I.button!==0)return;if(jt){zt();return}const ce=Ee.current;if(!ce||ce.pointerId!==I.pointerId||(zt(),I.target.closest("[data-controls]")))return;const $e=I.clientX-ce.startX,Se=I.clientY-ce.startY,lt=Math.abs($e),Ct=Math.abs(Se);if(lt>=km&&lt>Ct){mt($e>0?B-1:B+1);return}if(lt>jl||Ct>jl)return;const nt=(en=yt.current)==null?void 0:en.getBoundingClientRect(),Ot=nt?nt.left+nt.width/2:window.innerWidth/2;mt(I.clientX<Ot?B-1:B+1)},[B,Ce,mt,jt,zt,re.length]),pn=c.useCallback(I=>{const ce=Ee.current;(ce==null?void 0:ce.pointerId)===I.pointerId&&zt()},[zt]);Os(),c.useEffect(()=>{Ht.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const I=requestAnimationFrame(()=>{Ae(!0),requestAnimationFrame(()=>{Mt.current?Mt.current.focus():yt.current&&yt.current.focus()})});return()=>{cancelAnimationFrame(I),dt.current&&clearTimeout(dt.current),We.current&&clearTimeout(We.current);const ce=Ht.current;ce&&document.contains(ce)&&ce.focus()}},[]),c.useEffect(()=>{var I;w!=="fade"&&(Ve.current=((I=re[B])==null?void 0:I.entryIndex)??0,Ue(),Fe(null),j(!1),je(void 0),Le(void 0))},[B,Ue,re,w]),c.useEffect(()=>{const I=ce=>{if(ce.key==="Escape"){Bt();return}if(ce.key==="ArrowLeft"&&re.length>1){mt(B-1);return}if(ce.key==="ArrowRight"&&re.length>1){mt(B+1);return}if(ce.key==="Tab"&&yt.current){const Re=yt.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),$e=Array.from(Re).filter(nt=>!nt.closest('[aria-hidden="true"]'));if($e.length===0)return;const Se=$e[0],lt=$e[$e.length-1],Ct=document.activeElement;ce.shiftKey?(Ct===Se||!yt.current.contains(Ct))&&(ce.preventDefault(),lt.focus()):(Ct===lt||!yt.current.contains(Ct))&&(ce.preventDefault(),Se.focus())}};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[mt,Bt,B,re.length]),c.useLayoutEffect(()=>{Ue(),ze.current=0,ge(0),A(null),Y(!1),Fe(null),j(!1),je(void 0),Le(void 0),pe(null),Q(I=>{const ce=Math.max(0,re.length-1);return Math.min(I,ce)})},[Ue,t.length,S,re.length]),c.useLayoutEffect(()=>{var I;Ne.current=s,Ve.current=((I=re[s])==null?void 0:I.entryIndex)??0,Q(s)},[s,re.length]);const Ke=ke!==null?t[ke]:null,Zt=ae!==null?re[ae]:null,kt=(J==null?void 0:J.title1)||(J==null?void 0:J.title2)||(J==null?void 0:J.title3)||(Ke==null?void 0:Ke.title1)||(Ke==null?void 0:Ke.title2)||(Ke==null?void 0:Ke.title3),Pe=Vm(S,re,t),ft=L!==null,Wt=kt||Pe||ft,te=Pe&&ft?{gap:X}:void 0,ye=`${e}-titles-stack${oe?` ${e}-titles-stack-stacked`:""}`,Ie=`${e}-titles-layer-out${oe?` ${e}-titles-layer-out-stacked`:""}`,De=_(W),qe=c.useMemo(()=>({title1Width:C??or.title1Width,title2Width:T??or.title2Width,title3Width:P??or.title3Width}),[C,T,P]),Qe=c.useMemo(()=>({title2MarginLeft:F,title3MarginLeft:b}),[F,b]),ve=c.useMemo(()=>J?io(e,J,N,de,g):[],[e,J,N,de,g]),$t=c.useMemo(()=>ve.map(I=>qe[I.widthKey]),[ve,qe]),gt=c.useMemo(()=>Co(ve.length,$t),[ve.length,$t]),ht=c.useMemo(()=>yr(ve.length,$t),[ve.length,$t]),ot=c.useMemo(()=>ve.filter(I=>I.prefix==="title1"),[ve]),Be=c.useMemo(()=>ve.filter(I=>I.prefix==="title2"||I.prefix==="title3"),[ve]),vt=c.useMemo(()=>oo(ot,qe),[ot,qe]),rt=c.useMemo(()=>oo(Be,qe),[Be,qe]),wt=c.useCallback((I,ce)=>{const Re=ve.findIndex(Se=>Se.prefix===I.prefix);if(!oe||ce==="single-row")return{effectiveWidth:ht[Re]??0,resolvedWidth:gt[Re]??0,maxWidth:Vn(Re,gt)};if(ce==="two-row-top"){const Se=ot.findIndex(lt=>lt.prefix===I.prefix);return{effectiveWidth:vt.effective[Se]??0,resolvedWidth:vt.resolved[Se]??0,maxWidth:Vn(Se,vt.resolved)}}const $e=Be.findIndex(Se=>Se.prefix===I.prefix);return{effectiveWidth:rt.effective[$e]??0,resolvedWidth:rt.resolved[$e]??0,maxWidth:Vn($e,rt.resolved)}},[ve,Be,rt,ht,gt,ot,vt,oe]),_t=c.useCallback(I=>Gm(ve,gt,Qe,I)+(oe?0:M??0),[ve,gt,Qe,oe,M]),St=c.useCallback(()=>oe?0:M??0,[oe,M]),At=c.useCallback(I=>Be.slice(0,I).reduce((ce,Re,$e)=>ce+(Re.marginLeftKey?Qe[Re.marginLeftKey]??0:0)+(rt.resolved[$e]??0),0),[Be,rt.resolved,Qe]),tt=c.useCallback(I=>{const ce=Be[I];return At(I)+(ce.marginLeftKey?Qe[ce.marginLeftKey]??0:0)+(rt.resolved[I]??0)},[Be,rt.resolved,At,Qe]),Ft=c.useCallback((I,ce,Re)=>{if(!oe||Re==="single-row"){const nt=I.findIndex(gn=>gn.prefix===ce.prefix),Ot=I.map(gn=>qe[gn.widthKey]),en=Co(I.length,Ot);return{effectiveWidth:yr(I.length,Ot)[nt]??0,resolvedWidth:en[nt]??0,maxWidth:Vn(nt,en)}}if(Re==="two-row-top"){const nt=I.filter(gn=>gn.prefix==="title1"),Ot=nt.findIndex(gn=>gn.prefix===ce.prefix),{resolved:en,effective:Qn}=oo(nt,qe);return{effectiveWidth:Qn[Ot]??0,resolvedWidth:en[Ot]??0,maxWidth:Vn(Ot,en)}}const $e=I.filter(nt=>nt.prefix==="title2"||nt.prefix==="title3"),Se=$e.findIndex(nt=>nt.prefix===ce.prefix),{resolved:lt,effective:Ct}=oo($e,qe);return{effectiveWidth:Ct[Se]??0,resolvedWidth:lt[Se]??0,maxWidth:Vn(Se,lt)}},[qe,oe]),Kt=(I,ce,Re)=>{const $e=I.marginLeftKey?Qe[I.marginLeftKey]??0:0,{effectiveWidth:Se,resolvedWidth:lt,maxWidth:Ct}=Re??wt(I,ce),nt=Math.max($e,no),Ot=fe&&ce==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":I.prefix,style:{width:_(Se),...$e>0?{marginLeft:_($e)}:{}},children:[r.jsx("p",{className:I.className,style:I.style,children:I.text}),Ot&&I.marginLeftKey?r.jsx("div",{"data-controls":I.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(lt),style:{position:"absolute",top:0,left:_(-$e),width:_(nt),height:"100%",pointerEvents:"auto"}}):null,Ot?r.jsx("div",{"data-controls":I.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ct),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:_(-ni/2),width:_(ni),height:"100%",pointerEvents:"auto"}}):null]},I.className)},$n=()=>r.jsx("div",{...fe?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:_(M??0),flexShrink:0,alignSelf:"stretch",...fe?{pointerEvents:"auto"}:{}}}),Bn=()=>r.jsxs("div",{className:`${e}-text-bar-cell`,children:[r.jsx("span",{className:`${e}-entry-counter`,style:ie,"aria-live":"polite","aria-atomic":"true",children:zm(re,B,S,t)}),fe&&ft?r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${ir(X)} + ${X}))`,width:ir(X),height:"100%",pointerEvents:"auto",zIndex:3}}):null]}),Ln=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:R.scalingValue(E??0,i),height:R.scalingValue(E??0,i),marginRight:se,"--close-icon-hover-color":z},children:[r.jsx("button",{ref:Mt,type:"button",className:`${e}-close-icon-inner`,onClick:Bt,"aria-label":"Close",children:r.jsx(an,{url:L??"",fill:k,hoverFill:z,className:`${e}-close-icon-img`})}),fe?r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:se,height:"100%",pointerEvents:"auto"}}):null]}),Yn=()=>!Pe&&!ft?null:r.jsxs("div",{className:`${e}-titles-row-top-controls`,style:te,children:[Pe?Bn():null,ft?Ln():null]}),Jn=I=>{if(!I)return null;const ce=io(e,I,N,de,g);return r.jsxs(r.Fragment,{children:[M>0||fe?$n():null,ce.map(Re=>Kt(Re,"single-row",Ft(ce,Re,"single-row")))]})},Qt=I=>{if(!I)return null;const ce=io(e,I,N,de,g),Re=ce.find($e=>$e.prefix==="title1");return!Re&&!(M>0||fe)?null:r.jsxs(r.Fragment,{children:[M>0||fe?$n():null,Re?Kt(Re,"two-row-top",Ft(ce,Re,"two-row-top")):null]})},Si=(I,ce=!1)=>{const Re=I?io(e,I,N,de,g):[],$e=Re.filter(Ct=>Ct.prefix==="title2"||Ct.prefix==="title3"),Se=fe&&ce;return $e.length>0||Se||(W??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[$e.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[$e.map(Ct=>Kt(Ct,"two-row-bottom",Ft(Re,Ct,"two-row-bottom"))),ce&&fe?r.jsxs(r.Fragment,{children:[ee(),he()]}):null]}):null,(W??0)>0||Se?r.jsx("div",{"data-controls":Se?"titleRowMarginBottom":void 0,"data-controls-axis":Se?"y":void 0,"data-controls-reverse":Se?"":void 0,className:Se?`${e}-control`:void 0,style:{height:De,width:"100%",flexShrink:0,pointerEvents:Se?"auto":"none"}}):null]}):null},Zn=(I,ce=!1)=>r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-titles-row-top`,children:[Qt(I),Yn()]}),Si(I,ce)]}),En=I=>oe?r.jsx("div",{className:`${e}-titles-row-two-row`,style:{width:"100%"},children:Zn(I)}):I?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Jn(I)}):null,f=()=>{const I=oe?-1:ve.findIndex($e=>$e.prefix==="title1"),ce=!oe&&(fe||(M??0)>0)?(()=>{const Se=Math.max(M??0,no),lt=I>=0?gt[I]:C;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(lt),style:{position:"absolute",top:0,left:0,width:_(Se),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Re=ve.flatMap(($e,Se)=>{if(!$e.marginLeftKey)return[];const lt=Qe[$e.marginLeftKey]??0,Ct=Km(ve,gt,Qe,Se)+St(),nt=Math.max(lt,no);return r.jsx("div",{"data-controls":$e.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(gt[Se]),style:{position:"absolute",top:0,left:_(Ct),width:_(nt),height:"100%",pointerEvents:"auto"}},$e.marginLeftKey)});return ce?[ce,...Re]:Re},V=()=>ve.map((I,ce)=>{const Re=Vn(ce,gt),Se=_t(ce)-ni/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":I.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Re),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:_(Se),width:_(ni),height:"100%",pointerEvents:"auto"}})},`${I.widthKey}-junction`)}),ee=()=>Be.flatMap((I,ce)=>{if(!I.marginLeftKey)return[];const Re=Qe[I.marginLeftKey]??0,$e=At(ce),Se=Math.max(Re,no),{resolvedWidth:lt}=wt(I,"two-row-bottom");return r.jsx("div",{"data-controls":I.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(lt),style:{position:"absolute",top:0,left:_($e),width:_(Se),height:"100%",pointerEvents:"auto"}},I.marginLeftKey)}),he=()=>Be.map((I,ce)=>{const{maxWidth:Re}=wt(I,"two-row-bottom"),Se=tt(ce)-ni/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":I.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Re),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:_(Se),width:_(ni),height:"100%",pointerEvents:"auto"}})},`${I.widthKey}-junction`)}),we=()=>!fe||oe?null:r.jsxs(r.Fragment,{children:[f(),V()]}),Je=I=>{const ce=!I.objectFit&&wn(x);return{className:`${e}-slide-image-cell${ce?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:G,maxHeight:H,...ce?{"--image-aspect-ratio":No(x)}:{}}}},Lt=I=>I.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":I.objectFit}}:wn(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Rt=I=>{if(I.length===0)return null;const ce=I.length>1,Re=ir(q),$e=`calc(-0.5 * (${Re} + ${q}))`;if(I.length===1){const Se=I[0];return r.jsx("div",{...Je(Se),children:r.jsx("img",{...Lt(Se),src:Se.url,alt:Se.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:ce?{gap:q}:void 0,children:I.map((Se,lt)=>r.jsxs("div",{...Je(Se),children:[r.jsx("img",{...Lt(Se),src:Se.url,alt:Se.name??"",draggable:!1}),fe&&ce&&lt<I.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:$e,width:Re,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Se.url}-${lt}`))})},In=!!(J!=null&&J.title2||J!=null&&J.title3||Ke!=null&&Ke.title2||Ke!=null&&Ke.title3||(W??0)>0||fe),Rn=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:Ze,className:ye,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Zn(Ge||J)}),r.jsxs("div",{ref:bt,className:`${e}-titles-row-two-row`,style:{...xe&&Te?{minHeight:Te}:void 0,...xe&&_e?{width:_e,maxWidth:"100%"}:void 0,...xe?{overflow:"hidden"}:void 0},children:[r.jsxs("div",{className:`${e}-titles-row-top`,children:[r.jsxs("div",{className:ye,style:{position:"relative",flex:1,minWidth:0},children:[Ke&&xe?r.jsx("div",{className:`${Ie} ${e}-titles-fade-out`,children:Qt(Ke)}):null,r.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Qt(J)})]}),Yn()]}),In?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[Ke&&xe?r.jsx("div",{className:`${Ie} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:Si(Ke)}):null,r.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${oe?` ${e}-titles-layer-in-stacked`:""}`,children:Si(J,!0)}),we()]}):null]})]}),mn=()=>{const I=In;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...I?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:I?void 0:{flex:"0 0 auto",height:"auto"},children:Zn(J,!0)}),we()]})};return r.jsxs("div",{ref:yt,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{jt||Bt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ft?void 0:-1,style:{opacity:Me?1:0,transition:`opacity ${nr}ms ease`,pointerEvents:Me?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:v,...Yt}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:{position:"relative",width:"100%",height:"100%",...pt},...Tt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:ln,onClick:I=>I.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":Ce&&re.length>1?"true":"false",onPointerDown:Ce?Vt:void 0,onPointerUp:Ce?Jt:void 0,onPointerCancel:Ce?pn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[Zt&&D?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:I=>{I.target===I.currentTarget&&ut(Z)},children:r.jsx("div",{className:`${e}-slide-area`,children:Rt(Zt.images)})},`slide-out-${Z}`):null,r.jsx("div",{className:`${e}-slide-layer-in${D?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:U?Rt(U.images):null})},`slide-in-${Z}-${B}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:{width:"100%",height:"100%",...He},children:[r.jsx("div",{"data-controls":fe?"contentMarginTop":void 0,className:fe?`${e}-control`:void 0,style:{height:ne,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...oe?{flex:1,minHeight:0}:{}},children:r.jsxs("div",{className:`${e}-lightbox-content-area${oe?` ${e}-lightbox-content-area-stacked`:""}`,children:[(oe?Wt:kt)&&r.jsx("div",{className:`${e}-text-bar-cell${oe?` ${e}-text-bar-cell-stacked`:""}`,children:oe?w==="fade"?Rn():mn():w==="fade"?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:Ze,className:ye,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:En(Ge||J)}),r.jsxs("div",{ref:bt,className:ye,style:{width:"100%",...xe&&Te?{minHeight:Te}:void 0,...xe&&_e?{width:_e,maxWidth:"100%"}:void 0,...xe?{overflow:"hidden"}:void 0},children:[Ke&&xe?r.jsx("div",{className:`${Ie} ${e}-titles-fade-out`,children:En(Ke)}):null,r.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:En(J)}),we()]})]}):r.jsxs("div",{style:{position:"relative",width:"100%"},children:[En(J),we()]})}),!oe&&r.jsxs("div",{className:`${e}-lightbox-persistent-controls`,style:te,children:[Pe&&Bn(),ft&&Ln()]})]})})]})]})]})},Gi=["title1","title2","title3","count"];function at(e,t){return`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`}const qm={title1:"1",title2:"2",title3:"3",count:"Count"};function Xm(e){return[at(e,"fontFamily"),at(e,"fontSettings"),{type:"row",items:[at(e,"fontSize"),at(e,"lineHeight"),at(e,"letterSpacing"),at(e,"wordSpacing")]},at(e,"textAlign"),at(e,"textAppearance")]}function Ym(){return{type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Gi.map(e=>[qm[e],Xm(e)]))}}const Jm={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Zm={title1:.02,title2:.02,title3:.02,count:.017};function ro(e,t){const n=i=>{const o=at(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[Jm[t]]}}function lo(e,t,n){var o,l;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((l=t.fontSettings)==null?void 0:l.fontStyle)??"normal"},fontSize:t.fontSize??Zm[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Pt(i,n)}const Qm=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:l,metadata:s})=>{const{prefix:d}=R.useScopedStyles(),a=(s==null?void 0:s.itemId)??null,{cover:p,coverFit:u,type:S}=e,x=c.useRef(null),[v,m]=c.useState(!1),[y,$]=c.useState(0),w=c.useRef(!1),C=c.useRef(!1),T=c.useRef(!1),P=c.useMemo(()=>(t??[]).filter(E=>fi(E).length>0),[t]),M=v&&P.length>0,F=!n,b=c.useCallback(()=>{F&&(T.current=!0,Nm(C.current,a),C.current=!1)},[F,a]),W=(E=0)=>{if(P.length===0||n&&!i&&!o)return;const k=fo(P,S),z=Math.max(0,Math.min(E,k.length-1));if($(z),F){const le=zs();js(z+1,a,le),C.current=!le}m(!0)},K=()=>{n||W()},h=E=>{n&&(E.stopPropagation(),W())},L=c.useCallback(()=>{m(!1),T.current=!1},[]);return c.useEffect(()=>{!n||i||o||m(!1)},[n,i,o]),c.useEffect(()=>{if(!F||w.current)return;w.current=!0;const E=Vl(a);if(!E)return;const k=Kl(E,fo(P,S).length);k<0||($(k),m(!0))},[P,a,F,S]),c.useEffect(()=>{if(!F)return;const E=()=>{if(T.current){T.current=!1,m(!1);return}const k=Vl(a);if(!k){m(!1);return}const z=Kl(k,fo(P,S).length);if(z<0){m(!1);return}C.current=!1,$(z),m(!0)};return window.addEventListener("popstate",E),()=>window.removeEventListener("popstate",E)},[P,a,F,S]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:x,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Hm(d)}}),p?r.jsx("button",{type:"button",className:`${d}-cover ${wn(u)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:K,onDoubleClick:h,style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...wn(u)?{"--image-aspect-ratio":No(u)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${wn(u)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:p,alt:"cover"})}):null]}),M&&typeof document<"u"&&(()=>{const E=(l?document.getElementById(l):null)??document.body;return Fi.createPortal(r.jsx(Um,{prefix:d,entries:P,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:y,enableUrlSync:F,journalItemId:a,onBeforeClose:b,onClose:L}),E)})()]})},eg=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
11429
11607
  import { createPortal, flushSync } from 'react-dom';
11430
11608
  import { CommonComponentProps } from '../props';
11431
11609
  import { scalingValue } from '../utils/scalingValue';
@@ -13751,7 +13929,7 @@ export const LightboxJournal = ({ settings, content, isEditor, isEditMode, isPre
13751
13929
  () => (content ?? []).filter((entry) => getEntryImages(entry).length > 0),
13752
13930
  [content],
13753
13931
  );
13754
- const isOverlayVisible = lightboxOpen || (Boolean(isEditMode) && entries.length > 0);
13932
+ const isOverlayVisible = lightboxOpen && entries.length > 0;
13755
13933
  const shouldSyncUrl = !isEditor;
13756
13934
 
13757
13935
  const removeJournalUrl = useCallback(() => {
@@ -13762,8 +13940,8 @@ export const LightboxJournal = ({ settings, content, isEditor, isEditMode, isPre
13762
13940
  }, [shouldSyncUrl, itemId]);
13763
13941
 
13764
13942
  const openLightbox = (slideIndex = 0) => {
13765
- if (isEditMode || entries.length === 0) return;
13766
- if (isEditor && !isPreviewMode) return;
13943
+ if (entries.length === 0) return;
13944
+ if (isEditor && !isEditMode && !isPreviewMode) return;
13767
13945
  const slides = buildJournalSlides(entries, type);
13768
13946
  const normalizedSlideIndex = Math.max(0, Math.min(slideIndex, slides.length - 1));
13769
13947
  setLightboxInitialSlideIndex(normalizedSlideIndex);
@@ -13775,11 +13953,27 @@ export const LightboxJournal = ({ settings, content, isEditor, isEditMode, isPre
13775
13953
  setLightboxOpen(true);
13776
13954
  };
13777
13955
 
13956
+ const handleCoverClick = () => {
13957
+ if (isEditor) return;
13958
+ openLightbox();
13959
+ };
13960
+
13961
+ const handleCoverDoubleClick = (event: MouseEvent<HTMLButtonElement>) => {
13962
+ if (!isEditor) return;
13963
+ event.stopPropagation();
13964
+ openLightbox();
13965
+ };
13966
+
13778
13967
  const closeLightbox = useCallback(() => {
13779
13968
  setLightboxOpen(false);
13780
13969
  isClosingFromUrlRef.current = false;
13781
13970
  }, []);
13782
13971
 
13972
+ useEffect(() => {
13973
+ if (!isEditor || isEditMode || isPreviewMode) return;
13974
+ setLightboxOpen(false);
13975
+ }, [isEditor, isEditMode, isPreviewMode]);
13976
+
13783
13977
  useEffect(() => {
13784
13978
  if (!shouldSyncUrl || didApplyInitialUrlRef.current) return;
13785
13979
  didApplyInitialUrlRef.current = true;
@@ -13825,12 +14019,14 @@ export const LightboxJournal = ({ settings, content, isEditor, isEditMode, isPre
13825
14019
  <button
13826
14020
  type="button"
13827
14021
  className={\`\${P}-cover \${isImageRatioCover(coverFit) ? \`\${P}-ratio-wrapper-cover\` : \`\${P}-ratio-wrapper-fit\`}\`}
13828
- onClick={() => openLightbox()}
14022
+ onClick={handleCoverClick}
14023
+ onDoubleClick={handleCoverDoubleClick}
13829
14024
  style={{
13830
14025
  display: 'block',
13831
14026
  padding: 0,
13832
14027
  border: 'none',
13833
14028
  background: 'transparent',
14029
+ pointerEvents: isEditor && !isEditMode && !isPreviewMode ? 'none' : undefined,
13834
14030
  ...(isImageRatioCover(coverFit)
13835
14031
  ? ({ '--image-aspect-ratio': getAspectRatio(coverFit) } as React.CSSProperties)
13836
14032
  : {}),
@@ -13934,4 +14130,4 @@ export type LightboxJournalSettings = {
13934
14130
  closeIconColor: string;
13935
14131
  closeIconHoverColor: string;
13936
14132
  };
13937
- `,Zm="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#000000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>'),Hn={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 Qm(t){const e={};return e[se(t,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},e[se(t,"fontSettings")]={...Hn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},e[se(t,"fontSize")]={...Hn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},e[se(t,"lineHeight")]={...Hn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},e[se(t,"letterSpacing")]={...Hn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},e[se(t,"wordSpacing")]={...Hn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},e[se(t,"textAlign")]={...Hn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},e[se(t,"textAppearance")]={...Hn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},e}const tg=Fi.reduce((t,e)=>({...t,...Qm(e)}),{}),eg=Fi.reduce((t,e)=>({...t,[se(e,"fontFamily")]:"Arial",[se(e,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[se(e,"letterSpacing")]:0,[se(e,"wordSpacing")]:0,[se(e,"textAlign")]:"left",[se(e,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function zl(t){return Fi.reduce((e,n)=>{const i=t[`${n}FontSize`],r=t[`${n}LineHeight`];return i!==void 0&&(e[se(n,"fontSize")]=i),r!==void 0&&(e[se(n,"lineHeight")]=r),e},{})}const ng=Gm(),ig={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"}},...tg,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/LightboxJournal_1.jpg",coverFit:{display:"Cover",ratioValue:"16:9",reversed:!1},closeIcon:Zm,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#ffffff",...eg},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.05,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.005,...zl({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.015,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.13,title2Width:.13,title3Width:.14,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...zl({title1FontSize:.01,title1LineHeight:.01,title2FontSize:.01,title2LineHeight:.01,title3FontSize:.01,title3LineHeight:.01,countFontSize:.01,countLineHeight:.01})}},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:[ng]}],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:"Journal Entry 1",title2:"summer vacation",title3:"July 1978",image:[{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_1.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_2.jpg",name:"",objectFit:"contain"}]},{title1:"Journal Entry 2",title2:"spring break",title3:"March 1979",image:[{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_3.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_4.jpg",name:"",objectFit:"contain"}]},{title1:"Journal Entry 3",title2:"winter vacation",title3:"January 1980",image:[{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_5.jpg",name:"",objectFit:"contain"}]}]}},og={element:Ym,id:"lightbox-journal",name:"Lightbox Journal",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:ig,sourceCode:Jm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Fi.map(t=>({path:`styles.${se(t,"fontSettings")}`}))}},rg=[td,sd,Xd,_m,og,ou,gu,Lu,_u,Hu,Yu,Zp];exports.components=rg;exports.isSchemaV1=Ks;
14133
+ `,tg="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#000000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>'),Kn={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 ng(e){const t={};return t[at(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[at(e,"fontSettings")]={...Kn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[at(e,"fontSize")]={...Kn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[at(e,"lineHeight")]={...Kn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[at(e,"letterSpacing")]={...Kn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[at(e,"wordSpacing")]={...Kn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[at(e,"textAlign")]={...Kn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[at(e,"textAppearance")]={...Kn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const ig=Gi.reduce((e,t)=>({...e,...ng(t)}),{}),og=Gi.reduce((e,t)=>({...e,[at(t,"fontFamily")]:"Arial",[at(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[at(t,"letterSpacing")]:0,[at(t,"wordSpacing")]:0,[at(t,"textAlign")]:"left",[at(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ul(e){return Gi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[at(n,"fontSize")]=i),o!==void 0&&(t[at(n,"lineHeight")]=o),t},{})}const rg=Ym(),lg={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"}},...ig,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/LightboxJournal_1.jpg",coverFit:{display:"Cover",ratioValue:"16:9",reversed:!1},closeIcon:tg,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#ffffff",...og},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.05,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.005,...Ul({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.015,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.13,title2Width:.13,title3Width:.14,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...Ul({title1FontSize:.01,title1LineHeight:.01,title2FontSize:.01,title2LineHeight:.01,title3FontSize:.01,title3LineHeight:.01,countFontSize:.01,countLineHeight:.01})}},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:[rg]}],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:"Journal Entry 1",title2:"summer vacation",title3:"July 1978",image:[{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_1.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_2.jpg",name:"",objectFit:"contain"}]},{title1:"Journal Entry 2",title2:"spring break",title3:"March 1979",image:[{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_3.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_4.jpg",name:"",objectFit:"contain"}]},{title1:"Journal Entry 3",title2:"winter vacation",title3:"January 1980",image:[{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_5.jpg",name:"",objectFit:"contain"}]}]}},sg={element:Qm,id:"lightbox-journal",name:"Lightbox Journal",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:lg,sourceCode:eg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Gi.map(e=>({path:`styles.${at(e,"fontSettings")}`}))}},ag=[ed,sd,Xd,Pm,sg,ou,gu,Lu,Wu,Hu,Yu,Zp];exports.components=ag;exports.isSchemaV1=Ks;