@cntrl-site/components 1.0.79-alpha.2 → 1.0.79-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),St=require("classnames"),A=require("./panelAvailability-D8c7cdbu.js"),ri=require("react-dom");function xp(e){return e.type==="object"&&e.version===1}const bp="ControlSlider-module__wrapper___sHEkd",Sp="ControlSlider-module__hoverArrow___A-dOH",wp="ControlSlider-module__sliderItem___QQSkR",$p="ControlSlider-module__sliderImage___9hRl-",Cp="ControlSlider-module__arrow___05ghY",Tp="ControlSlider-module__arrowVertical___tBfVN",Lp="ControlSlider-module__nextArrow___-30Yc",Ip="ControlSlider-module__arrowInner___aEra3",Rp="ControlSlider-module__arrowIcon___S4ztF",Pp="ControlSlider-module__arrowImg___2dwJW",Ep="ControlSlider-module__mirror___brd6U",Mp="ControlSlider-module__pagination___bicLF",kp="ControlSlider-module__paginationInner___bT-P-",Ap="ControlSlider-module__paginationVertical___zYqKw",Fp="ControlSlider-module__paginationItem___nTRbk",Np="ControlSlider-module__dot___p1Qun",_p="ControlSlider-module__activeDot___LHFaj",Wp="ControlSlider-module__paginationInsideBottom___R3FWn",Hp="ControlSlider-module__paginationInsideTop___V-qb-",Op="ControlSlider-module__paginationOutsideBottom___14w8D",Dp="ControlSlider-module__paginationOutsideTop___SCLqB",zp="ControlSlider-module__paginationInsideLeft___yOBRZ",Bp="ControlSlider-module__paginationInsideRight___Rtt3o",jp="ControlSlider-module__paginationOutsideLeft___lahaw",Vp="ControlSlider-module__paginationOutsideRight___EtuQa",Gp="ControlSlider-module__imgWrapper___UjEgB",Xp="ControlSlider-module__captionBlock___dJ6-j",qp="ControlSlider-module__captionTextWrapper___HFlpf",Up="ControlSlider-module__captionText___uGBVc",Kp="ControlSlider-module__active___WZK4G",Yp="ControlSlider-module__withPointerEvents___t-18M",Zp="ControlSlider-module__topLeftAlignment___zjnGM",Jp="ControlSlider-module__topCenterAlignment___gD1xW",Qp="ControlSlider-module__topRightAlignment___NMapS",em="ControlSlider-module__middleLeftAlignment___OnUrY",tm="ControlSlider-module__middleCenterAlignment___Tdkl0",nm="ControlSlider-module__middleRightAlignment___wEbfX",im="ControlSlider-module__bottomLeftAlignment___cTP2-",om="ControlSlider-module__bottomCenterAlignment___c54fB",rm="ControlSlider-module__bottomRightAlignment___kEwrz",am="ControlSlider-module__clickOverlay___DZA28",sm="ControlSlider-module__contain___pLyq7",lm="ControlSlider-module__cover___KdDat",vt={wrapper:bp,hoverArrow:Sp,sliderItem:wp,sliderImage:$p,arrow:Cp,arrowVertical:Tp,nextArrow:Lp,arrowInner:Ip,arrowIcon:Rp,arrowImg:Pp,mirror:Ep,pagination:Mp,paginationInner:kp,paginationVertical:Ap,paginationItem:Fp,dot:Np,activeDot:_p,paginationInsideBottom:Wp,paginationInsideTop:Hp,paginationOutsideBottom:Op,paginationOutsideTop:Dp,paginationInsideLeft:zp,paginationInsideRight:Bp,paginationOutsideLeft:jp,paginationOutsideRight:Vp,imgWrapper:Gp,captionBlock:Xp,captionTextWrapper:qp,captionText:Up,active:Kp,withPointerEvents:Yp,topLeftAlignment:Zp,topCenterAlignment:Jp,topRightAlignment:Qp,middleLeftAlignment:em,middleCenterAlignment:tm,middleRightAlignment:nm,bottomLeftAlignment:im,bottomCenterAlignment:om,bottomRightAlignment:rm,clickOverlay:am,contain:sm,cover:lm};function cm(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 dm(e,t,n){return t&&cm(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var kl="(prefers-reduced-motion: reduce)",po=1,um=2,wo=3,_o=4,vr=5,Zr=6,oa=7,pm={CREATED:po,MOUNTED:um,IDLE:wo,MOVING:_o,SCROLLING:vr,DRAGGING:Zr,DESTROYED:oa};function ii(e){e.length=0}function Ii(e,t,n){return Array.prototype.slice.call(e,t,n)}function Jt(e){return e.bind.apply(e,[null].concat(Ii(arguments,1)))}var kd=setTimeout,bs=function(){};function Al(e){return requestAnimationFrame(e)}function ya(e,t){return typeof t===e}function rr(e){return!Ys(e)&&ya("object",e)}var Ks=Array.isArray,Ad=Jt(ya,"function"),wi=Jt(ya,"string"),xr=Jt(ya,"undefined");function Ys(e){return e===null}function Fd(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function br(e){return Ks(e)?e:[e]}function Rn(e,t){br(e).forEach(t)}function Zs(e,t){return e.indexOf(t)>-1}function Jr(e,t){return e.push.apply(e,br(t)),e}function Jn(e,t,n){e&&Rn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Bn(e,t){Jn(e,wi(t)?t.split(" "):t,!0)}function Sr(e,t){Rn(t,e.appendChild.bind(e))}function Js(e,t){Rn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ar(e,t){return Fd(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Nd(e,t){var n=e?Ii(e.children):[];return t?n.filter(function(i){return ar(i,t)}):n}function wr(e,t){return t?Nd(e,t)[0]:e.firstElementChild}var sr=Object.keys;function Xi(e,t,n){return e&&(n?sr(e).reverse():sr(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function lr(e){return Ii(arguments,1).forEach(function(t){Xi(t,function(n,i){e[i]=t[i]})}),e}function yi(e){return Ii(arguments,1).forEach(function(t){Xi(t,function(n,i){Ks(n)?e[i]=n.slice():rr(n)?e[i]=yi({},rr(e[i])?e[i]:{},n):e[i]=n})}),e}function Fl(e,t){Rn(t||sr(e),function(n){delete e[n]})}function jn(e,t){Rn(e,function(n){Rn(t,function(i){n&&n.removeAttribute(i)})})}function Rt(e,t,n){rr(t)?Xi(t,function(i,o){Rt(e,o,i)}):Rn(e,function(i){Ys(n)||n===""?jn(i,t):i.setAttribute(t,String(n))})}function yo(e,t,n){var i=document.createElement(e);return t&&(wi(t)?Bn(i,t):Rt(i,t)),n&&Sr(n,i),i}function kn(e,t,n){if(xr(n))return getComputedStyle(e)[t];Ys(n)||(e.style[t]=""+n)}function cr(e,t){kn(e,"display",t)}function _d(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function An(e,t){return e.getAttribute(t)}function Nl(e,t){return e&&e.classList.contains(t)}function Cn(e){return e.getBoundingClientRect()}function Ui(e){Rn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Wd(e){return wr(new DOMParser().parseFromString(e,"text/html").body)}function Zn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Hd(e,t){return e&&e.querySelector(t)}function Qs(e,t){return t?Ii(e.querySelectorAll(t)):[]}function Qn(e,t){Jn(e,t,!1)}function Ss(e){return e.timeStamp}function Ai(e){return wi(e)?e:e?e+"px":""}var $r="splide",el="data-"+$r;function tr(e,t){if(!e)throw new Error("["+$r+"] "+(t||""))}var $i=Math.min,ra=Math.max,aa=Math.floor,dr=Math.ceil,hn=Math.abs;function Od(e,t,n){return hn(e-t)<n}function Qr(e,t,n,i){var o=$i(t,n),r=ra(t,n);return i?o<e&&e<r:o<=e&&e<=r}function so(e,t,n){var i=$i(t,n),o=ra(t,n);return $i(ra(i,e),o)}function ws(e){return+(e>0)-+(e<0)}function $s(e,t){return Rn(t,function(n){e=e.replace("%s",""+n)}),e}function tl(e){return e<10?"0"+e:""+e}var _l={};function mm(e){return""+e+tl(_l[e]=(_l[e]||0)+1)}function Dd(){var e=[];function t(l,d,c,u){o(l,d,function(p,x,v){var m="addEventListener"in p,h=m?p.removeEventListener.bind(p,x,c,u):p.removeListener.bind(p,c);m?p.addEventListener(x,c,u):p.addListener(c),e.push([p,x,v,c,h])})}function n(l,d,c){o(l,d,function(u,p,x){e=e.filter(function(v){return v[0]===u&&v[1]===p&&v[2]===x&&(!c||v[3]===c)?(v[4](),!1):!0})})}function i(l,d,c){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:p,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,p,!1,c)),l.dispatchEvent(u),u}function o(l,d,c){Rn(l,function(u){u&&Rn(d,function(p){p.split(" ").forEach(function(x){var v=x.split(".");c(u,v[0],v[1])})})})}function r(){e.forEach(function(l){l[4]()}),ii(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var Ri="mounted",Cs="ready",oi="move",Wo="moved",nl="click",zd="active",Bd="inactive",jd="visible",Vd="hidden",an="refresh",pn="updated",$o="resize",va="resized",Gd="drag",Xd="dragging",qd="dragged",xa="scroll",Zi="scrolled",gm="overflow",il="destroy",Ud="arrows:mounted",Kd="arrows:updated",Yd="pagination:mounted",Zd="pagination:updated",ol="navigation:mounted",rl="autoplay:play",Jd="autoplay:playing",al="autoplay:pause",sl="lazyload:loaded",Qd="sk",eu="sh",sa="ei";function tn(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Dd();function i(r,l){n.bind(t,br(r).join(" "),function(d){l.apply(l,Ks(d.detail)?d.detail:[])})}function o(r){n.dispatch(t,r,Ii(arguments,1))}return e&&e.event.on(il,n.destroy),lr(n,{bus:t,on:i,off:Jt(n.unbind,t),emit:o})}function ba(e,t,n,i){var o=Date.now,r,l=0,d,c=!0,u=0;function p(){if(!c){if(l=e?$i((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return v();d=Al(p)}}function x(C){C||h(),r=o()-(C?l*e:0),c=!1,d=Al(p)}function v(){c=!0}function m(){r=o(),l=0,n&&n(l)}function h(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function y(C){e=C}function b(){return c}return{start:x,rewind:m,pause:v,cancel:h,set:y,isPaused:b}}function hm(e){var t=e;function n(o){t=o}function i(o){return Zs(br(o),t)}return{set:n,is:i}}function fm(e,t){var n=ba(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ym(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=Dd(),d=[];function c(){var h=n.mediaQuery==="min";sr(o).sort(function(y,b){return h?+y-+b:+b-+y}).forEach(function(y){p(o[y],"("+(h?"min":"max")+"-width:"+y+"px)")}),p(r,kl),x()}function u(h){h&&l.destroy()}function p(h,y){var b=matchMedia(y);l.bind(b,"change",x),d.push([h,b])}function x(){var h=i.is(oa),y=n.direction,b=d.reduce(function(C,S){return yi(C,S[1].matches?S[0]:{})},{});Fl(n),m(b),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):y!==n.direction&&e.refresh()}function v(h){matchMedia(kl).matches&&(h?yi(n,r):Fl(n,sr(r)))}function m(h,y,b){yi(n,h),y&&yi(Object.getPrototypeOf(n),h),(b||!i.is(po))&&e.emit(pn,n)}return{setup:c,destroy:u,reduce:v,set:m}}var Sa="Arrow",wa=Sa+"Left",$a=Sa+"Right",tu=Sa+"Up",nu=Sa+"Down",Wl="rtl",Ca="ttb",_a={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[tu,$a],ArrowRight:[nu,wa]};function vm(e,t,n){function i(r,l,d){d=d||n.direction;var c=d===Wl&&!l?1:d===Ca?0:-1;return _a[r]&&_a[r][c]||r.replace(/width|left|right/i,function(u,p){var x=_a[u.toLowerCase()][c]||u;return p>0?x.charAt(0).toUpperCase()+x.slice(1):x})}function o(r){return r*(n.direction===Wl?1:-1)}return{resolve:i,orient:o}}var ei="role",vo="tabindex",xm="disabled",Fn="aria-",Cr=Fn+"controls",iu=Fn+"current",Hl=Fn+"selected",Ln=Fn+"label",ll=Fn+"labelledby",ou=Fn+"hidden",cl=Fn+"orientation",ur=Fn+"roledescription",Ol=Fn+"live",Dl=Fn+"busy",zl=Fn+"atomic",dl=[ei,vo,xm,Cr,iu,Ln,ll,ou,cl,ur],Gn=$r+"__",Pi="is-",Wa=$r,Bl=Gn+"track",bm=Gn+"list",Ta=Gn+"slide",ru=Ta+"--clone",Sm=Ta+"__container",ul=Gn+"arrows",La=Gn+"arrow",au=La+"--prev",su=La+"--next",Ia=Gn+"pagination",lu=Ia+"__page",wm=Gn+"progress",$m=wm+"__bar",Cm=Gn+"toggle",Tm=Gn+"spinner",Lm=Gn+"sr",Im=Pi+"initialized",Ki=Pi+"active",cu=Pi+"prev",du=Pi+"next",Ts=Pi+"visible",Ls=Pi+"loading",uu=Pi+"focus-in",pu=Pi+"overflow",Rm=[Ki,Ts,cu,du,Ls,uu,pu],Pm={slide:Ta,clone:ru,arrows:ul,arrow:La,prev:au,next:su,pagination:Ia,page:lu,spinner:Tm};function Em(e,t){if(Ad(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ar(n,t);)n=n.parentElement;return n}var Mm=5,jl=200,mu="touchstart mousedown",Ha="touchmove mousemove",Oa="touchend touchcancel mouseup click";function km(e,t,n){var i=tn(e),o=i.on,r=i.bind,l=e.root,d=n.i18n,c={},u=[],p=[],x=[],v,m,h;function y(){w(),D(),S()}function b(){o(an,C),o(an,y),o(pn,S),r(document,mu+" keydown",function(H){h=H.type==="keydown"},{capture:!0}),r(l,"focusin",function(){Jn(l,uu,!!h)})}function C(H){var L=dl.concat("style");ii(u),Qn(l,p),Qn(v,x),jn([v,m],L),jn(l,H?L:["style",ur])}function S(){Qn(l,p),Qn(v,x),p=z(Wa),x=z(Bl),Bn(l,p),Bn(v,x),Rt(l,Ln,n.label),Rt(l,ll,n.labelledby)}function w(){v=_("."+Bl),m=wr(v,"."+bm),tr(v&&m,"A track/list element is missing."),Jr(u,Nd(m,"."+Ta+":not(."+ru+")")),Xi({arrows:ul,pagination:Ia,prev:au,next:su,bar:$m,toggle:Cm},function(H,L){c[L]=_("."+H)}),lr(c,{root:l,track:v,list:m,slides:u})}function D(){var H=l.id||mm($r),L=n.role;l.id=H,v.id=v.id||H+"-track",m.id=m.id||H+"-list",!An(l,ei)&&l.tagName!=="SECTION"&&L&&Rt(l,ei,L),Rt(l,ur,d.carousel),Rt(m,ei,"presentation")}function _(H){var L=Hd(l,H);return L&&Em(L,"."+Wa)===l?L:void 0}function z(H){return[H+"--"+n.type,H+"--"+n.direction,n.drag&&H+"--draggable",n.isNavigation&&H+"--nav",H===Wa&&Ki]}return lr(c,{setup:y,mount:b,destroy:C})}var Co="slide",Ho="loop",Tr="fade";function Am(e,t,n,i){var o=tn(e),r=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,p=e.options,x=p.isNavigation,v=p.updateOnMove,m=p.i18n,h=p.pagination,y=p.slideFocus,b=c.Direction.resolve,C=An(i,"style"),S=An(i,Ln),w=n>-1,D=wr(i,"."+Sm),_;function z(){w||(i.id=u.id+"-slide"+tl(t+1),Rt(i,ei,h?"tabpanel":"group"),Rt(i,ur,m.slide),Rt(i,Ln,S||$s(m.slideLabel,[t+1,e.length]))),H()}function H(){d(i,"click",Jt(l,nl,Z)),d(i,"keydown",Jt(l,Qd,Z)),r([Wo,eu,Zi],E),r(ol,V),v&&r(oi,$)}function L(){_=!0,o.destroy(),Qn(i,Rm),jn(i,dl),Rt(i,"style",C),Rt(i,Ln,S||"")}function V(){var T=e.splides.map(function(j){var Y=j.splide.Components.Slides.getAt(t);return Y?Y.slide.id:""}).join(" ");Rt(i,Ln,$s(m.slideX,(w?n:t)+1)),Rt(i,Cr,T),Rt(i,ei,y?"button":""),y&&jn(i,ur)}function $(){_||E()}function E(){if(!_){var T=e.index;F(),W(),Jn(i,cu,t===T-1),Jn(i,du,t===T+1)}}function F(){var T=M();T!==Nl(i,Ki)&&(Jn(i,Ki,T),Rt(i,iu,x&&T||""),l(T?zd:Bd,Z))}function W(){var T=R(),j=!T&&(!M()||w);if(e.state.is([_o,vr])||Rt(i,ou,j||""),Rt(Qs(i,p.focusableNodes||""),vo,j?-1:""),y&&Rt(i,vo,j?-1:0),T!==Nl(i,Ts)&&(Jn(i,Ts,T),l(T?jd:Vd,Z)),!T&&document.activeElement===i){var Y=c.Slides.getAt(e.index);Y&&_d(Y.slide)}}function g(T,j,Y){kn(Y&&D||i,T,j)}function M(){var T=e.index;return T===t||p.cloneStatus&&T===n}function R(){if(e.is(Tr))return M();var T=Cn(c.Elements.track),j=Cn(i),Y=b("left",!0),le=b("right",!0);return aa(T[Y])<=dr(j[Y])&&aa(j[le])<=dr(T[le])}function G(T,j){var Y=hn(T-t);return!w&&(p.rewind||e.is(Ho))&&(Y=$i(Y,e.length-Y)),Y<=j}var Z={index:t,slideIndex:n,slide:i,container:D,isClone:w,mount:z,destroy:L,update:E,style:g,isWithin:G};return Z}function Fm(e,t,n){var i=tn(e),o=i.on,r=i.emit,l=i.bind,d=t.Elements,c=d.slides,u=d.list,p=[];function x(){v(),o(an,m),o(an,v)}function v(){c.forEach(function(E,F){y(E,F,-1)})}function m(){_(function(E){E.destroy()}),ii(p)}function h(){_(function(E){E.update()})}function y(E,F,W){var g=Am(e,F,W,E);g.mount(),p.push(g),p.sort(function(M,R){return M.index-R.index})}function b(E){return E?z(function(F){return!F.isClone}):p}function C(E){var F=t.Controller,W=F.toIndex(E),g=F.hasFocus()?1:n.perPage;return z(function(M){return Qr(M.index,W,W+g-1)})}function S(E){return z(E)[0]}function w(E,F){Rn(E,function(W){if(wi(W)&&(W=Wd(W)),Fd(W)){var g=c[F];g?Js(W,g):Sr(u,W),Bn(W,n.classes.slide),L(W,Jt(r,$o))}}),r(an)}function D(E){Ui(z(E).map(function(F){return F.slide})),r(an)}function _(E,F){b(F).forEach(E)}function z(E){return p.filter(Ad(E)?E:function(F){return wi(E)?ar(F.slide,E):Zs(br(E),F.index)})}function H(E,F,W){_(function(g){g.style(E,F,W)})}function L(E,F){var W=Qs(E,"img"),g=W.length;g?W.forEach(function(M){l(M,"load error",function(){--g||F()})}):F()}function V(E){return E?c.length:p.length}function $(){return p.length>n.perPage}return{mount:x,destroy:m,update:h,register:y,get:b,getIn:C,getAt:S,add:w,remove:D,forEach:_,filter:z,style:H,getLength:V,isEnough:$}}function Nm(e,t,n){var i=tn(e),o=i.on,r=i.bind,l=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,p=u.root,x=u.track,v=u.list,m=d.getAt,h=d.style,y,b,C;function S(){w(),r(window,"resize load",fm(Jt(l,$o))),o([pn,an],w),o($o,D)}function w(){y=n.direction===Ca,kn(p,"maxWidth",Ai(n.width)),kn(x,c("paddingLeft"),_(!1)),kn(x,c("paddingRight"),_(!0)),D(!0)}function D(Z){var T=Cn(p);(Z||b.width!==T.width||b.height!==T.height)&&(kn(x,"height",z()),h(c("marginRight"),Ai(n.gap)),h("width",L()),h("height",V(),!0),b=T,l(va),C!==(C=G())&&(Jn(p,pu,C),l(gm,C)))}function _(Z){var T=n.padding,j=c(Z?"right":"left");return T&&Ai(T[j]||(rr(T)?0:T))||"0px"}function z(){var Z="";return y&&(Z=H(),tr(Z,"height or heightRatio is missing."),Z="calc("+Z+" - "+_(!1)+" - "+_(!0)+")"),Z}function H(){return Ai(n.height||Cn(v).width*n.heightRatio)}function L(){return n.autoWidth?null:Ai(n.fixedWidth)||(y?"":$())}function V(){return Ai(n.fixedHeight)||(y?n.autoHeight?null:$():H())}function $(){var Z=Ai(n.gap);return"calc((100%"+(Z&&" + "+Z)+")/"+(n.perPage||1)+(Z&&" - "+Z)+")"}function E(){return Cn(v)[c("width")]}function F(Z,T){var j=m(Z||0);return j?Cn(j.slide)[c("width")]+(T?0:M()):0}function W(Z,T){var j=m(Z);if(j){var Y=Cn(j.slide)[c("right")],le=Cn(v)[c("left")];return hn(Y-le)+(T?0:M())}return 0}function g(Z){return W(e.length-1)-W(0)+F(0,Z)}function M(){var Z=m(0);return Z&&parseFloat(kn(Z.slide,c("marginRight")))||0}function R(Z){return parseFloat(kn(x,c("padding"+(Z?"Right":"Left"))))||0}function G(){return e.is(Tr)||g(!0)>E()}return{mount:S,resize:D,listSize:E,slideSize:F,sliderSize:g,totalSize:W,getPadding:R,isOverflow:G}}var _m=2;function Wm(e,t,n){var i=tn(e),o=i.on,r=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function p(){o(an,x),o([pn,$o],m),(u=b())&&(h(u),t.Layout.resize(!0))}function x(){v(),p()}function v(){Ui(c),ii(c),i.destroy()}function m(){var C=b();u!==C&&(u<C||!C)&&i.emit(an)}function h(C){var S=l.get().slice(),w=S.length;if(w){for(;S.length<C;)Jr(S,S);Jr(S.slice(-C),S.slice(0,C)).forEach(function(D,_){var z=_<C,H=y(D.slide,_);z?Js(H,S[0].slide):Sr(r.list,H),Jr(c,H),l.register(H,_-C+(z?0:w),D.index)})}}function y(C,S){var w=C.cloneNode(!0);return Bn(w,n.classes.clone),w.id=e.root.id+"-clone"+tl(S+1),w}function b(){var C=n.clones;if(!e.is(Ho))C=0;else if(xr(C)){var S=n[d("fixedWidth")]&&t.Layout.slideSize(0),w=S&&dr(Cn(r.track)[d("width")]/S);C=w||n[d("autoWidth")]&&e.length||n.perPage*_m}return C}return{mount:p,destroy:v}}function Hm(e,t,n){var i=tn(e),o=i.on,r=i.emit,l=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,p=d.totalSize,x=d.listSize,v=d.sliderSize,m=t.Direction,h=m.resolve,y=m.orient,b=t.Elements,C=b.list,S=b.track,w;function D(){w=t.Transition,o([Ri,va,pn,an],_)}function _(){t.Controller.isBusy()||(t.Scroll.cancel(),H(e.index),t.Slides.update())}function z(j,Y,le,se){j!==Y&&Z(j>le)&&(E(),L($(g(),j>le),!0)),l(_o),r(oi,Y,le,j),w.start(Y,function(){l(wo),r(Wo,Y,le,j),se&&se()})}function H(j){L(W(j,!0))}function L(j,Y){if(!e.is(Tr)){var le=Y?j:V(j);kn(C,"transform","translate"+h("X")+"("+le+"px)"),j!==le&&r(eu)}}function V(j){if(e.is(Ho)){var Y=F(j),le=Y>t.Controller.getEnd(),se=Y<0;(se||le)&&(j=$(j,le))}return j}function $(j,Y){var le=j-G(Y),se=v();return j-=y(se*(dr(hn(le)/se)||1))*(Y?1:-1),j}function E(){L(g(),!0),w.cancel()}function F(j){for(var Y=t.Slides.get(),le=0,se=1/0,k=0;k<Y.length;k++){var re=Y[k].index,q=hn(W(re,!0)-j);if(q<=se)se=q,le=re;else break}return le}function W(j,Y){var le=y(p(j-1)-R(j));return Y?M(le):le}function g(){var j=h("left");return Cn(C)[j]-Cn(S)[j]+y(u(!1))}function M(j){return n.trimSpace&&e.is(Co)&&(j=so(j,0,y(v(!0)-x()))),j}function R(j){var Y=n.focus;return Y==="center"?(x()-c(j,!0))/2:+Y*c(j)||0}function G(j){return W(j?t.Controller.getEnd():0,!!n.trimSpace)}function Z(j){var Y=y($(g(),j));return j?Y>=0:Y<=C[h("scrollWidth")]-Cn(S)[h("width")]}function T(j,Y){Y=xr(Y)?g():Y;var le=j!==!0&&y(Y)<y(G(!1)),se=j!==!1&&y(Y)>y(G(!0));return le||se}return{mount:D,move:z,jump:H,translate:L,shift:$,cancel:E,toIndex:F,toPosition:W,getPosition:g,getLimit:G,exceededLimit:T,reposition:_}}function Om(e,t,n){var i=tn(e),o=i.on,r=i.emit,l=t.Move,d=l.getPosition,c=l.getLimit,u=l.toPosition,p=t.Slides,x=p.isEnough,v=p.getLength,m=n.omitEnd,h=e.is(Ho),y=e.is(Co),b=Jt(g,!1),C=Jt(g,!0),S=n.start||0,w,D=S,_,z,H;function L(){V(),o([pn,an,sa],V),o(va,$)}function V(){_=v(!0),z=n.perMove,H=n.perPage,w=Z();var q=so(S,0,m?w:_-1);q!==S&&(S=q,l.reposition())}function $(){w!==Z()&&r(sa)}function E(q,ce,J){if(!re()){var be=W(q),We=G(be);We>-1&&(ce||We!==S)&&(le(We),l.move(be,We,D,J))}}function F(q,ce,J,be){t.Scroll.scroll(q,ce,J,function(){var We=G(l.toIndex(d()));le(m?$i(We,w):We),be&&be()})}function W(q){var ce=S;if(wi(q)){var J=q.match(/([+\-<>])(\d+)?/)||[],be=J[1],We=J[2];be==="+"||be==="-"?ce=M(S+ +(""+be+(+We||1)),S):be===">"?ce=We?T(+We):b(!0):be==="<"&&(ce=C(!0))}else ce=h?q:so(q,0,w);return ce}function g(q,ce){var J=z||(k()?1:H),be=M(S+J*(q?-1:1),S,!(z||k()));return be===-1&&y&&!Od(d(),c(!q),1)?q?0:w:ce?be:G(be)}function M(q,ce,J){if(x()||k()){var be=R(q);be!==q&&(ce=q,q=be,J=!1),q<0||q>w?!z&&(Qr(0,q,ce,!0)||Qr(w,ce,q,!0))?q=T(j(q)):h?q=J?q<0?-(_%H||H):_:q:n.rewind?q=q<0?w:0:q=-1:J&&q!==ce&&(q=T(j(ce)+(q<ce?-1:1)))}else q=-1;return q}function R(q){if(y&&n.trimSpace==="move"&&q!==S)for(var ce=d();ce===u(q,!0)&&Qr(q,0,e.length-1,!n.rewind);)q<S?--q:++q;return q}function G(q){return h?(q+_)%_||0:q}function Z(){for(var q=_-(k()||h&&z?1:H);m&&q-- >0;)if(u(_-1,!0)!==u(q,!0)){q++;break}return so(q,0,_-1)}function T(q){return so(k()?q:H*q,0,w)}function j(q){return k()?$i(q,w):aa((q>=w?_-1:q)/H)}function Y(q){var ce=l.toIndex(q);return y?so(ce,0,w):ce}function le(q){q!==S&&(D=S,S=q)}function se(q){return q?D:S}function k(){return!xr(n.focus)||n.isNavigation}function re(){return e.state.is([_o,vr])&&!!n.waitForTransition}return{mount:L,go:E,scroll:F,getNext:b,getPrev:C,getAdjacent:g,getEnd:Z,setIndex:le,getIndex:se,toIndex:T,toPage:j,toDest:Y,hasFocus:k,isBusy:re}}var Dm="http://www.w3.org/2000/svg",zm="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",Rr=40;function Bm(e,t,n){var i=tn(e),o=i.on,r=i.bind,l=i.emit,d=n.classes,c=n.i18n,u=t.Elements,p=t.Controller,x=u.arrows,v=u.track,m=x,h=u.prev,y=u.next,b,C,S={};function w(){_(),o(pn,D)}function D(){z(),w()}function _(){var F=n.arrows;F&&!(h&&y)&&V(),h&&y&&(lr(S,{prev:h,next:y}),cr(m,F?"":"none"),Bn(m,C=ul+"--"+n.direction),F&&(H(),E(),Rt([h,y],Cr,v.id),l(Ud,h,y)))}function z(){i.destroy(),Qn(m,C),b?(Ui(x?[h,y]:m),h=y=null):jn([h,y],dl)}function H(){o([Ri,Wo,an,Zi,sa],E),r(y,"click",Jt(L,">")),r(h,"click",Jt(L,"<"))}function L(F){p.go(F,!0)}function V(){m=x||yo("div",d.arrows),h=$(!0),y=$(!1),b=!0,Sr(m,[h,y]),!x&&Js(m,v)}function $(F){var W='<button class="'+d.arrow+" "+(F?d.prev:d.next)+'" type="button"><svg xmlns="'+Dm+'" viewBox="0 0 '+Rr+" "+Rr+'" width="'+Rr+'" height="'+Rr+'" focusable="false"><path d="'+(n.arrowPath||zm)+'" />';return Wd(W)}function E(){if(h&&y){var F=e.index,W=p.getPrev(),g=p.getNext(),M=W>-1&&F<W?c.last:c.prev,R=g>-1&&F>g?c.first:c.next;h.disabled=W<0,y.disabled=g<0,Rt(h,Ln,M),Rt(y,Ln,R),l(Kd,h,y,W,g)}}return{arrows:S,mount:w,destroy:z,update:E}}var jm=el+"-interval";function Vm(e,t,n){var i=tn(e),o=i.on,r=i.bind,l=i.emit,d=ba(n.interval,e.go.bind(e,">"),H),c=d.isPaused,u=t.Elements,p=t.Elements,x=p.root,v=p.toggle,m=n.autoplay,h,y,b=m==="pause";function C(){m&&(S(),v&&Rt(v,Cr,u.track.id),b||w(),z())}function S(){n.pauseOnHover&&r(x,"mouseenter mouseleave",function(V){h=V.type==="mouseenter",_()}),n.pauseOnFocus&&r(x,"focusin focusout",function(V){y=V.type==="focusin",_()}),v&&r(v,"click",function(){b?w():D(!0)}),o([oi,xa,an],d.rewind),o(oi,L)}function w(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),y=h=b=!1,z(),l(rl))}function D(V){V===void 0&&(V=!0),b=!!V,z(),c()||(d.pause(),l(al))}function _(){b||(h||y?D(!1):w())}function z(){v&&(Jn(v,Ki,!b),Rt(v,Ln,n.i18n[b?"play":"pause"]))}function H(V){var $=u.bar;$&&kn($,"width",V*100+"%"),l(Jd,V)}function L(V){var $=t.Slides.getAt(V);d.set($&&+An($.slide,jm)||n.interval)}return{mount:C,destroy:d.cancel,play:w,pause:D,isPaused:c}}function Gm(e,t,n){var i=tn(e),o=i.on;function r(){n.cover&&(o(sl,Jt(d,!0)),o([Ri,pn,an],Jt(l,!0)))}function l(c){t.Slides.forEach(function(u){var p=wr(u.container||u.slide,"img");p&&p.src&&d(c,p,u)})}function d(c,u,p){p.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),cr(u,c?"none":"")}return{mount:r,destroy:Jt(l,!1)}}var Xm=10,qm=600,Um=.6,Km=1.5,Ym=800;function Zm(e,t,n){var i=tn(e),o=i.on,r=i.emit,l=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,p=d.exceededLimit,x=d.translate,v=e.is(Co),m,h,y=1;function b(){o(oi,D),o([pn,an],_)}function C(H,L,V,$,E){var F=c();if(D(),V&&(!v||!p())){var W=t.Layout.sliderSize(),g=ws(H)*W*aa(hn(H)/W)||0;H=d.toPosition(t.Controller.toDest(H%W))+g}var M=Od(F,H,1);y=1,L=M?0:L||ra(hn(H-F)/Km,Ym),h=$,m=ba(L,S,Jt(w,F,H,E),1),l(vr),r(xa),m.start()}function S(){l(wo),h&&h(),r(Zi)}function w(H,L,V,$){var E=c(),F=H+(L-H)*z($),W=(F-E)*y;x(E+W),v&&!V&&p()&&(y*=Um,hn(W)<Xm&&C(u(p(!0)),qm,!1,h,!0))}function D(){m&&m.cancel()}function _(){m&&!m.isPaused()&&(D(),S())}function z(H){var L=n.easingFunc;return L?L(H):1-Math.pow(1-H,4)}return{mount:b,destroy:D,scroll:C,cancel:_}}var lo={passive:!1,capture:!0};function Jm(e,t,n){var i=tn(e),o=i.on,r=i.emit,l=i.bind,d=i.unbind,c=e.state,u=t.Move,p=t.Scroll,x=t.Controller,v=t.Elements.track,m=t.Media.reduce,h=t.Direction,y=h.resolve,b=h.orient,C=u.getPosition,S=u.exceededLimit,w,D,_,z,H,L=!1,V,$,E;function F(){l(v,Ha,bs,lo),l(v,Oa,bs,lo),l(v,mu,g,lo),l(v,"click",G,{capture:!0}),l(v,"dragstart",Zn),o([Ri,pn],W)}function W(){var ee=n.drag;ue(!ee),z=ee==="free"}function g(ee){if(V=!1,!$){var de=We(ee);be(ee.target)&&(de||!ee.button)&&(x.isBusy()?Zn(ee,!0):(E=de?v:window,H=c.is([_o,vr]),_=null,l(E,Ha,M,lo),l(E,Oa,R,lo),u.cancel(),p.cancel(),Z(ee)))}}function M(ee){if(c.is(Zr)||(c.set(Zr),r(Gd)),ee.cancelable)if(H){u.translate(w+J(k(ee)));var de=re(ee)>jl,ne=L!==(L=S());(de||ne)&&Z(ee),V=!0,r(Xd),Zn(ee)}else Y(ee)&&(H=j(ee),Zn(ee))}function R(ee){c.is(Zr)&&(c.set(wo),r(qd)),H&&(T(ee),Zn(ee)),d(E,Ha,M),d(E,Oa,R),H=!1}function G(ee){!$&&V&&Zn(ee,!0)}function Z(ee){_=D,D=ee,w=C()}function T(ee){var de=le(ee),ne=se(de),Pe=n.rewind&&n.rewindByDrag;m(!1),z?x.scroll(ne,0,n.snap):e.is(Tr)?x.go(b(ws(de))<0?Pe?"<":"-":Pe?">":"+"):e.is(Co)&&L&&Pe?x.go(S(!0)?">":"<"):x.go(x.toDest(ne),!0),m(!0)}function j(ee){var de=n.dragMinThreshold,ne=rr(de),Pe=ne&&de.mouse||0,Te=(ne?de.touch:+de)||10;return hn(k(ee))>(We(ee)?Te:Pe)}function Y(ee){return hn(k(ee))>hn(k(ee,!0))}function le(ee){if(e.is(Ho)||!L){var de=re(ee);if(de&&de<jl)return k(ee)/de}return 0}function se(ee){return C()+ws(ee)*$i(hn(ee)*(n.flickPower||600),z?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function k(ee,de){return ce(ee,de)-ce(q(ee),de)}function re(ee){return Ss(ee)-Ss(q(ee))}function q(ee){return D===ee&&_||D}function ce(ee,de){return(We(ee)?ee.changedTouches[0]:ee)["page"+y(de?"Y":"X")]}function J(ee){return ee/(L&&e.is(Co)?Mm:1)}function be(ee){var de=n.noDrag;return!ar(ee,"."+lu+", ."+La)&&(!de||!ar(ee,de))}function We(ee){return typeof TouchEvent<"u"&&ee instanceof TouchEvent}function ye(){return H}function ue(ee){$=ee}return{mount:F,disable:ue,isDragging:ye}}var Qm={Spacebar:" ",Right:$a,Left:wa,Up:tu,Down:nu};function pl(e){return e=wi(e)?e:e.key,Qm[e]||e}var Vl="keydown";function eg(e,t,n){var i=tn(e),o=i.on,r=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,p;function x(){v(),o(pn,m),o(pn,v),o(oi,y)}function v(){var C=n.keyboard;C&&(u=C==="global"?window:d,r(u,Vl,b))}function m(){l(u,Vl)}function h(C){p=C}function y(){var C=p;p=!0,kd(function(){p=C})}function b(C){if(!p){var S=pl(C);S===c(wa)?e.go("<"):S===c($a)&&e.go(">")}}return{mount:x,destroy:m,disable:h}}var nr=el+"-lazy",ea=nr+"-srcset",tg="["+nr+"], ["+ea+"]";function ng(e,t,n){var i=tn(e),o=i.on,r=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[Wo,Zi],p=[];function x(){n.lazyLoad&&(v(),o(an,v))}function v(){ii(p),m(),c?C():(r(u),o(u,h),h())}function m(){t.Slides.forEach(function(S){Qs(S.slide,tg).forEach(function(w){var D=An(w,nr),_=An(w,ea);if(D!==w.src||_!==w.srcset){var z=n.classes.spinner,H=w.parentElement,L=wr(H,"."+z)||yo("span",z,H);p.push([w,S,L]),w.src||cr(w,"none")}})})}function h(){p=p.filter(function(S){var w=n.perPage*((n.preloadPages||1)+1)-1;return S[1].isWithin(e.index,w)?y(S):!0}),p.length||r(u)}function y(S){var w=S[0];Bn(S[1].slide,Ls),l(w,"load error",Jt(b,S)),Rt(w,"src",An(w,nr)),Rt(w,"srcset",An(w,ea)),jn(w,nr),jn(w,ea)}function b(S,w){var D=S[0],_=S[1];Qn(_.slide,Ls),w.type!=="error"&&(Ui(S[2]),cr(D,""),d(sl,D,_),d($o)),c&&C()}function C(){p.length&&y(p.shift())}return{mount:x,destroy:Jt(ii,p),check:h}}function ig(e,t,n){var i=tn(e),o=i.on,r=i.emit,l=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,p=u.hasFocus,x=u.getIndex,v=u.go,m=t.Direction.resolve,h=c.pagination,y=[],b,C;function S(){w(),o([pn,an,sa],S);var $=n.pagination;h&&cr(h,$?"":"none"),$&&(o([oi,xa,Zi],V),D(),V(),r(Yd,{list:b,items:y},L(e.index)))}function w(){b&&(Ui(h?Ii(b.children):b),Qn(b,C),ii(y),b=null),i.destroy()}function D(){var $=e.length,E=n.classes,F=n.i18n,W=n.perPage,g=p()?u.getEnd()+1:dr($/W);b=h||yo("ul",E.pagination,c.track.parentElement),Bn(b,C=Ia+"--"+H()),Rt(b,ei,"tablist"),Rt(b,Ln,F.select),Rt(b,cl,H()===Ca?"vertical":"");for(var M=0;M<g;M++){var R=yo("li",null,b),G=yo("button",{class:E.page,type:"button"},R),Z=d.getIn(M).map(function(j){return j.slide.id}),T=!p()&&W>1?F.pageX:F.slideX;l(G,"click",Jt(_,M)),n.paginationKeyboard&&l(G,"keydown",Jt(z,M)),Rt(R,ei,"presentation"),Rt(G,ei,"tab"),Rt(G,Cr,Z.join(" ")),Rt(G,Ln,$s(T,M+1)),Rt(G,vo,-1),y.push({li:R,button:G,page:M})}}function _($){v(">"+$,!0)}function z($,E){var F=y.length,W=pl(E),g=H(),M=-1;W===m($a,!1,g)?M=++$%F:W===m(wa,!1,g)?M=(--$+F)%F:W==="Home"?M=0:W==="End"&&(M=F-1);var R=y[M];R&&(_d(R.button),v(">"+M),Zn(E,!0))}function H(){return n.paginationDirection||n.direction}function L($){return y[u.toPage($)]}function V(){var $=L(x(!0)),E=L(x());if($){var F=$.button;Qn(F,Ki),jn(F,Hl),Rt(F,vo,-1)}if(E){var W=E.button;Bn(W,Ki),Rt(W,Hl,!0),Rt(W,vo,"")}r(Zd,{list:b,items:y},$,E)}return{items:y,mount:S,destroy:w,getAt:L,update:V}}var og=[" ","Enter"];function rg(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&p()}function d(){r.forEach(function(h){h.destroy()}),ii(r)}function c(){d(),l()}function u(h,y){var b=tn(h);b.on(oi,function(C,S,w){y.go(y.is(Ho)?w:C)}),r.push(b)}function p(){var h=tn(e),y=h.on;y(nl,v),y(Qd,m),y([Ri,pn],x),r.push(h),h.emit(ol,e.splides)}function x(){Rt(t.Elements.list,cl,n.direction===Ca?"vertical":"")}function v(h){e.go(h.index)}function m(h,y){Zs(og,pl(y))&&(v(h),Zn(y))}return{setup:Jt(t.Media.set,{slideFocus:xr(o)?i:o},!0),mount:l,destroy:d,remount:c}}function ag(e,t,n){var i=tn(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,lo)}function d(u){if(u.cancelable){var p=u.deltaY,x=p<0,v=Ss(u),m=n.wheelMinThreshold||0,h=n.wheelSleep||0;hn(p)>m&&v-r>h&&(e.go(x?"<":">"),r=v),c(x)&&Zn(u)}}function c(u){return!n.releaseWheel||e.state.is(_o)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var sg=90;function lg(e,t,n){var i=tn(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,d=yo("span",Lm),c=ba(sg,Jt(p,!1));function u(){l&&(v(!t.Autoplay.isPaused()),Rt(r,zl,!0),d.textContent="…",o(rl,Jt(v,!0)),o(al,Jt(v,!1)),o([Wo,Zi],Jt(p,!0)))}function p(m){Rt(r,Dl,m),m?(Sr(r,d),c.start()):(Ui(d),c.cancel())}function x(){jn(r,[Ol,zl,Dl]),Ui(d)}function v(m){l&&Rt(r,Ol,m?"off":"polite")}return{mount:u,disable:v,destroy:x}}var cg=Object.freeze({__proto__:null,Media:ym,Direction:vm,Elements:km,Slides:Fm,Layout:Nm,Clones:Wm,Move:Hm,Controller:Om,Arrows:Bm,Autoplay:Vm,Cover:Gm,Scroll:Zm,Drag:Jm,Keyboard:eg,LazyLoad:ng,Pagination:ig,Sync:rg,Wheel:ag,Live:lg}),dg={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"},ug={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:Pm,i18n:dg,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function pg(e,t,n){var i=t.Slides;function o(){tn(e).on([Ri,an],r)}function r(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function l(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),kd(c)}return{mount:o,start:l,cancel:bs}}function mg(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,d=Jt(kn,l,"transition"),c;function u(){tn(e).bind(l,"transitionend",function(m){m.target===l&&c&&(x(),c())})}function p(m,h){var y=i.toPosition(m,!0),b=i.getPosition(),C=v(m);hn(y-b)>=1&&C>=1?n.useScroll?r.scroll(y,C,!1,h):(d("transform "+C+"ms "+n.easing),i.translate(y,!0),c=h):(i.jump(m),h())}function x(){d(""),r.cancel()}function v(m){var h=n.rewindSpeed;if(e.is(Co)&&h){var y=o.getIndex(!0),b=o.getEnd();if(y===0&&m>=b||y>=b&&m===0)return h}return n.speed}return{mount:u,start:p,cancel:x}}var gg=(function(){function e(n,i){this.event=tn(),this.Components={},this.state=hm(po),this.splides=[],this._o={},this._E={};var o=wi(n)?Hd(document,n):n;tr(o,o+" is invalid."),this.root=o,i=yi({label:An(o,Ln)||"",labelledby:An(o,ll)||""},ug,e.defaults,i||{});try{yi(i,JSON.parse(An(o,el)))}catch{tr(!1,"Invalid JSON")}this._o=Object.create(yi({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,d=this.Components;tr(l.is([po,oa]),"Already mounted!"),l.set(po),this._C=d,this._T=o||this._T||(this.is(Tr)?pg:mg),this._E=i||this._E;var c=lr({},cg,this._E,{Transition:this._T});return Xi(c,function(u,p){var x=u(r,d,r._o);d[p]=x,x.setup&&x.setup()}),Xi(d,function(u){u.mount&&u.mount()}),this.emit(Ri),Bn(this.root,Im),l.set(wo),this.emit(Cs),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(wo)&&(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(Ii(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(an),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(po)?tn(this).on(Cs,this.destroy.bind(this,i)):(Xi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(il),o.destroy(),i&&ii(this.splides),r.set(oa)),this},dm(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})(),ml=gg;ml.defaults={};ml.STATES=pm;var Gl=[[Ri,"onMounted"],[Cs,"onReady"],[oi,"onMove"],[Wo,"onMoved"],[nl,"onClick"],[zd,"onActive"],[Bd,"onInactive"],[jd,"onVisible"],[Vd,"onHidden"],[an,"onRefresh"],[pn,"onUpdated"],[$o,"onResize"],[va,"onResized"],[Gd,"onDrag"],[Xd,"onDragging"],[qd,"onDragged"],[xa,"onScroll"],[Zi,"onScrolled"],[il,"onDestroy"],[Ud,"onArrowsMounted"],[Kd,"onArrowsUpdated"],[Yd,"onPaginationMounted"],[Zd,"onPaginationUpdated"],[ol,"onNavigationMounted"],[rl,"onAutoplayPlay"],[Jd,"onAutoplayPlaying"],[al,"onAutoplayPause"],[sl,"onLazyLoadLoaded"]];function gl(...e){return e.filter(Boolean).join(" ")}function la(e){return e!==null&&typeof e=="object"}function Is(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Is(n,t[i]));if(la(e)&&la(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Is(e[o],t[o]))}return e===t}function hg(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function fg(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 Rs(e,t){const n=e;return fg(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():la(i)?n[o]=Rs(la(n[o])?n[o]:{},i):n[o]=i}),n}var yg=({children:e,className:t,...n})=>s.createElement("div",{className:gl("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),hl=class extends s.Component{constructor(){super(...arguments),this.splideRef=s.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new ml(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Rs({},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&&!Is(this.options,e)&&(this.splide.options=e,this.options=Rs({},e));const t=this.getSlides();hg(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){Gl.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return s.createElement(t,{className:gl("splide",e),ref:this.splideRef,...this.omit(o,["options",...Gl.map(r=>r[1])])},n?s.createElement(yg,null,i):i)}},fl=({children:e,className:t,...n})=>s.createElement("li",{className:gl("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),St=require("classnames"),A=require("./panelAvailability-D8c7cdbu.js"),ri=require("react-dom");function $p(e){return e.type==="object"&&e.version===1}const Cp="ControlSlider-module__wrapper___sHEkd",Tp="ControlSlider-module__hoverArrow___A-dOH",Lp="ControlSlider-module__sliderItem___QQSkR",Ip="ControlSlider-module__sliderImage___9hRl-",Rp="ControlSlider-module__arrow___05ghY",Pp="ControlSlider-module__arrowVertical___tBfVN",kp="ControlSlider-module__nextArrow___-30Yc",Ep="ControlSlider-module__arrowInner___aEra3",Mp="ControlSlider-module__arrowIcon___S4ztF",Ap="ControlSlider-module__arrowImg___2dwJW",Fp="ControlSlider-module__mirror___brd6U",Np="ControlSlider-module__pagination___bicLF",_p="ControlSlider-module__paginationInner___bT-P-",Wp="ControlSlider-module__paginationVertical___zYqKw",Hp="ControlSlider-module__paginationItem___nTRbk",Op="ControlSlider-module__dot___p1Qun",Dp="ControlSlider-module__activeDot___LHFaj",zp="ControlSlider-module__paginationInsideBottom___R3FWn",Bp="ControlSlider-module__paginationInsideTop___V-qb-",jp="ControlSlider-module__paginationOutsideBottom___14w8D",Vp="ControlSlider-module__paginationOutsideTop___SCLqB",Gp="ControlSlider-module__paginationInsideLeft___yOBRZ",Xp="ControlSlider-module__paginationInsideRight___Rtt3o",qp="ControlSlider-module__paginationOutsideLeft___lahaw",Up="ControlSlider-module__paginationOutsideRight___EtuQa",Yp="ControlSlider-module__imgWrapper___UjEgB",Kp="ControlSlider-module__captionBlock___dJ6-j",Zp="ControlSlider-module__captionTextWrapper___HFlpf",Jp="ControlSlider-module__captionText___uGBVc",Qp="ControlSlider-module__active___WZK4G",em="ControlSlider-module__withPointerEvents___t-18M",tm="ControlSlider-module__topLeftAlignment___zjnGM",nm="ControlSlider-module__topCenterAlignment___gD1xW",im="ControlSlider-module__topRightAlignment___NMapS",om="ControlSlider-module__middleLeftAlignment___OnUrY",rm="ControlSlider-module__middleCenterAlignment___Tdkl0",am="ControlSlider-module__middleRightAlignment___wEbfX",sm="ControlSlider-module__bottomLeftAlignment___cTP2-",lm="ControlSlider-module__bottomCenterAlignment___c54fB",cm="ControlSlider-module__bottomRightAlignment___kEwrz",dm="ControlSlider-module__clickOverlay___DZA28",um="ControlSlider-module__contain___pLyq7",pm="ControlSlider-module__cover___KdDat",vt={wrapper:Cp,hoverArrow:Tp,sliderItem:Lp,sliderImage:Ip,arrow:Rp,arrowVertical:Pp,nextArrow:kp,arrowInner:Ep,arrowIcon:Mp,arrowImg:Ap,mirror:Fp,pagination:Np,paginationInner:_p,paginationVertical:Wp,paginationItem:Hp,dot:Op,activeDot:Dp,paginationInsideBottom:zp,paginationInsideTop:Bp,paginationOutsideBottom:jp,paginationOutsideTop:Vp,paginationInsideLeft:Gp,paginationInsideRight:Xp,paginationOutsideLeft:qp,paginationOutsideRight:Up,imgWrapper:Yp,captionBlock:Kp,captionTextWrapper:Zp,captionText:Jp,active:Qp,withPointerEvents:em,topLeftAlignment:tm,topCenterAlignment:nm,topRightAlignment:im,middleLeftAlignment:om,middleCenterAlignment:rm,middleRightAlignment:am,bottomLeftAlignment:sm,bottomCenterAlignment:lm,bottomRightAlignment:cm,clickOverlay:dm,contain:um,cover:pm};function mm(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 gm(e,t,n){return t&&mm(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Al="(prefers-reduced-motion: reduce)",po=1,hm=2,wo=3,_o=4,vr=5,Jr=6,ra=7,fm={CREATED:po,MOUNTED:hm,IDLE:wo,MOVING:_o,SCROLLING:vr,DRAGGING:Jr,DESTROYED:ra};function ii(e){e.length=0}function Ii(e,t,n){return Array.prototype.slice.call(e,t,n)}function Jt(e){return e.bind.apply(e,[null].concat(Ii(arguments,1)))}var Fd=setTimeout,Ss=function(){};function Fl(e){return requestAnimationFrame(e)}function va(e,t){return typeof t===e}function rr(e){return!Zs(e)&&va("object",e)}var Ks=Array.isArray,Nd=Jt(va,"function"),wi=Jt(va,"string"),xr=Jt(va,"undefined");function Zs(e){return e===null}function _d(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function br(e){return Ks(e)?e:[e]}function Rn(e,t){br(e).forEach(t)}function Js(e,t){return e.indexOf(t)>-1}function Qr(e,t){return e.push.apply(e,br(t)),e}function Jn(e,t,n){e&&Rn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Bn(e,t){Jn(e,wi(t)?t.split(" "):t,!0)}function Sr(e,t){Rn(t,e.appendChild.bind(e))}function Qs(e,t){Rn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ar(e,t){return _d(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Wd(e,t){var n=e?Ii(e.children):[];return t?n.filter(function(i){return ar(i,t)}):n}function wr(e,t){return t?Wd(e,t)[0]:e.firstElementChild}var sr=Object.keys;function Xi(e,t,n){return e&&(n?sr(e).reverse():sr(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function lr(e){return Ii(arguments,1).forEach(function(t){Xi(t,function(n,i){e[i]=t[i]})}),e}function yi(e){return Ii(arguments,1).forEach(function(t){Xi(t,function(n,i){Ks(n)?e[i]=n.slice():rr(n)?e[i]=yi({},rr(e[i])?e[i]:{},n):e[i]=n})}),e}function Nl(e,t){Rn(t||sr(e),function(n){delete e[n]})}function jn(e,t){Rn(e,function(n){Rn(t,function(i){n&&n.removeAttribute(i)})})}function Rt(e,t,n){rr(t)?Xi(t,function(i,o){Rt(e,o,i)}):Rn(e,function(i){Zs(n)||n===""?jn(i,t):i.setAttribute(t,String(n))})}function yo(e,t,n){var i=document.createElement(e);return t&&(wi(t)?Bn(i,t):Rt(i,t)),n&&Sr(n,i),i}function Mn(e,t,n){if(xr(n))return getComputedStyle(e)[t];Zs(n)||(e.style[t]=""+n)}function cr(e,t){Mn(e,"display",t)}function Hd(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function An(e,t){return e.getAttribute(t)}function _l(e,t){return e&&e.classList.contains(t)}function Cn(e){return e.getBoundingClientRect()}function Ui(e){Rn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Od(e){return wr(new DOMParser().parseFromString(e,"text/html").body)}function Zn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Dd(e,t){return e&&e.querySelector(t)}function el(e,t){return t?Ii(e.querySelectorAll(t)):[]}function Qn(e,t){Jn(e,t,!1)}function ws(e){return e.timeStamp}function Ai(e){return wi(e)?e:e?e+"px":""}var $r="splide",tl="data-"+$r;function tr(e,t){if(!e)throw new Error("["+$r+"] "+(t||""))}var $i=Math.min,aa=Math.max,sa=Math.floor,dr=Math.ceil,hn=Math.abs;function zd(e,t,n){return hn(e-t)<n}function ea(e,t,n,i){var o=$i(t,n),r=aa(t,n);return i?o<e&&e<r:o<=e&&e<=r}function so(e,t,n){var i=$i(t,n),o=aa(t,n);return $i(aa(i,e),o)}function $s(e){return+(e>0)-+(e<0)}function Cs(e,t){return Rn(t,function(n){e=e.replace("%s",""+n)}),e}function nl(e){return e<10?"0"+e:""+e}var Wl={};function ym(e){return""+e+nl(Wl[e]=(Wl[e]||0)+1)}function Bd(){var e=[];function t(l,d,c,u){o(l,d,function(p,x,y){var m="addEventListener"in p,h=m?p.removeEventListener.bind(p,x,c,u):p.removeListener.bind(p,c);m?p.addEventListener(x,c,u):p.addListener(c),e.push([p,x,y,c,h])})}function n(l,d,c){o(l,d,function(u,p,x){e=e.filter(function(y){return y[0]===u&&y[1]===p&&y[2]===x&&(!c||y[3]===c)?(y[4](),!1):!0})})}function i(l,d,c){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:p,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,p,!1,c)),l.dispatchEvent(u),u}function o(l,d,c){Rn(l,function(u){u&&Rn(d,function(p){p.split(" ").forEach(function(x){var y=x.split(".");c(u,y[0],y[1])})})})}function r(){e.forEach(function(l){l[4]()}),ii(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var Ri="mounted",Ts="ready",oi="move",Wo="moved",il="click",jd="active",Vd="inactive",Gd="visible",Xd="hidden",an="refresh",pn="updated",$o="resize",xa="resized",qd="drag",Ud="dragging",Yd="dragged",ba="scroll",Zi="scrolled",vm="overflow",ol="destroy",Kd="arrows:mounted",Zd="arrows:updated",Jd="pagination:mounted",Qd="pagination:updated",rl="navigation:mounted",al="autoplay:play",eu="autoplay:playing",sl="autoplay:pause",ll="lazyload:loaded",tu="sk",nu="sh",la="ei";function tn(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Bd();function i(r,l){n.bind(t,br(r).join(" "),function(d){l.apply(l,Ks(d.detail)?d.detail:[])})}function o(r){n.dispatch(t,r,Ii(arguments,1))}return e&&e.event.on(ol,n.destroy),lr(n,{bus:t,on:i,off:Jt(n.unbind,t),emit:o})}function Sa(e,t,n,i){var o=Date.now,r,l=0,d,c=!0,u=0;function p(){if(!c){if(l=e?$i((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return y();d=Fl(p)}}function x(C){C||h(),r=o()-(C?l*e:0),c=!1,d=Fl(p)}function y(){c=!0}function m(){r=o(),l=0,n&&n(l)}function h(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function v(C){e=C}function b(){return c}return{start:x,rewind:m,pause:y,cancel:h,set:v,isPaused:b}}function xm(e){var t=e;function n(o){t=o}function i(o){return Js(br(o),t)}return{set:n,is:i}}function bm(e,t){var n=Sa(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Sm(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=Bd(),d=[];function c(){var h=n.mediaQuery==="min";sr(o).sort(function(v,b){return h?+v-+b:+b-+v}).forEach(function(v){p(o[v],"("+(h?"min":"max")+"-width:"+v+"px)")}),p(r,Al),x()}function u(h){h&&l.destroy()}function p(h,v){var b=matchMedia(v);l.bind(b,"change",x),d.push([h,b])}function x(){var h=i.is(ra),v=n.direction,b=d.reduce(function(C,S){return yi(C,S[1].matches?S[0]:{})},{});Nl(n),m(b),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):v!==n.direction&&e.refresh()}function y(h){matchMedia(Al).matches&&(h?yi(n,r):Nl(n,sr(r)))}function m(h,v,b){yi(n,h),v&&yi(Object.getPrototypeOf(n),h),(b||!i.is(po))&&e.emit(pn,n)}return{setup:c,destroy:u,reduce:y,set:m}}var wa="Arrow",$a=wa+"Left",Ca=wa+"Right",iu=wa+"Up",ou=wa+"Down",Hl="rtl",Ta="ttb",Wa={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[iu,Ca],ArrowRight:[ou,$a]};function wm(e,t,n){function i(r,l,d){d=d||n.direction;var c=d===Hl&&!l?1:d===Ta?0:-1;return Wa[r]&&Wa[r][c]||r.replace(/width|left|right/i,function(u,p){var x=Wa[u.toLowerCase()][c]||u;return p>0?x.charAt(0).toUpperCase()+x.slice(1):x})}function o(r){return r*(n.direction===Hl?1:-1)}return{resolve:i,orient:o}}var ei="role",vo="tabindex",$m="disabled",Fn="aria-",Cr=Fn+"controls",ru=Fn+"current",Ol=Fn+"selected",Ln=Fn+"label",cl=Fn+"labelledby",au=Fn+"hidden",dl=Fn+"orientation",ur=Fn+"roledescription",Dl=Fn+"live",zl=Fn+"busy",Bl=Fn+"atomic",ul=[ei,vo,$m,Cr,ru,Ln,cl,au,dl,ur],Gn=$r+"__",Pi="is-",Ha=$r,jl=Gn+"track",Cm=Gn+"list",La=Gn+"slide",su=La+"--clone",Tm=La+"__container",pl=Gn+"arrows",Ia=Gn+"arrow",lu=Ia+"--prev",cu=Ia+"--next",Ra=Gn+"pagination",du=Ra+"__page",Lm=Gn+"progress",Im=Lm+"__bar",Rm=Gn+"toggle",Pm=Gn+"spinner",km=Gn+"sr",Em=Pi+"initialized",Yi=Pi+"active",uu=Pi+"prev",pu=Pi+"next",Ls=Pi+"visible",Is=Pi+"loading",mu=Pi+"focus-in",gu=Pi+"overflow",Mm=[Yi,Ls,uu,pu,Is,mu,gu],Am={slide:La,clone:su,arrows:pl,arrow:Ia,prev:lu,next:cu,pagination:Ra,page:du,spinner:Pm};function Fm(e,t){if(Nd(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ar(n,t);)n=n.parentElement;return n}var Nm=5,Vl=200,hu="touchstart mousedown",Oa="touchmove mousemove",Da="touchend touchcancel mouseup click";function _m(e,t,n){var i=tn(e),o=i.on,r=i.bind,l=e.root,d=n.i18n,c={},u=[],p=[],x=[],y,m,h;function v(){w(),D(),S()}function b(){o(an,C),o(an,v),o(pn,S),r(document,hu+" keydown",function(H){h=H.type==="keydown"},{capture:!0}),r(l,"focusin",function(){Jn(l,mu,!!h)})}function C(H){var L=ul.concat("style");ii(u),Qn(l,p),Qn(y,x),jn([y,m],L),jn(l,H?L:["style",ur])}function S(){Qn(l,p),Qn(y,x),p=z(Ha),x=z(jl),Bn(l,p),Bn(y,x),Rt(l,Ln,n.label),Rt(l,cl,n.labelledby)}function w(){y=_("."+jl),m=wr(y,"."+Cm),tr(y&&m,"A track/list element is missing."),Qr(u,Wd(m,"."+La+":not(."+su+")")),Xi({arrows:pl,pagination:Ra,prev:lu,next:cu,bar:Im,toggle:Rm},function(H,L){c[L]=_("."+H)}),lr(c,{root:l,track:y,list:m,slides:u})}function D(){var H=l.id||ym($r),L=n.role;l.id=H,y.id=y.id||H+"-track",m.id=m.id||H+"-list",!An(l,ei)&&l.tagName!=="SECTION"&&L&&Rt(l,ei,L),Rt(l,ur,d.carousel),Rt(m,ei,"presentation")}function _(H){var L=Dd(l,H);return L&&Fm(L,"."+Ha)===l?L:void 0}function z(H){return[H+"--"+n.type,H+"--"+n.direction,n.drag&&H+"--draggable",n.isNavigation&&H+"--nav",H===Ha&&Yi]}return lr(c,{setup:v,mount:b,destroy:C})}var Co="slide",Ho="loop",Tr="fade";function Wm(e,t,n,i){var o=tn(e),r=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,p=e.options,x=p.isNavigation,y=p.updateOnMove,m=p.i18n,h=p.pagination,v=p.slideFocus,b=c.Direction.resolve,C=An(i,"style"),S=An(i,Ln),w=n>-1,D=wr(i,"."+Tm),_;function z(){w||(i.id=u.id+"-slide"+nl(t+1),Rt(i,ei,h?"tabpanel":"group"),Rt(i,ur,m.slide),Rt(i,Ln,S||Cs(m.slideLabel,[t+1,e.length]))),H()}function H(){d(i,"click",Jt(l,il,Z)),d(i,"keydown",Jt(l,tu,Z)),r([Wo,nu,Zi],k),r(rl,V),y&&r(oi,$)}function L(){_=!0,o.destroy(),Qn(i,Mm),jn(i,ul),Rt(i,"style",C),Rt(i,Ln,S||"")}function V(){var T=e.splides.map(function(j){var K=j.splide.Components.Slides.getAt(t);return K?K.slide.id:""}).join(" ");Rt(i,Ln,Cs(m.slideX,(w?n:t)+1)),Rt(i,Cr,T),Rt(i,ei,v?"button":""),v&&jn(i,ur)}function $(){_||k()}function k(){if(!_){var T=e.index;F(),W(),Jn(i,uu,t===T-1),Jn(i,pu,t===T+1)}}function F(){var T=E();T!==_l(i,Yi)&&(Jn(i,Yi,T),Rt(i,ru,x&&T||""),l(T?jd:Vd,Z))}function W(){var T=R(),j=!T&&(!E()||w);if(e.state.is([_o,vr])||Rt(i,au,j||""),Rt(el(i,p.focusableNodes||""),vo,j?-1:""),v&&Rt(i,vo,j?-1:0),T!==_l(i,Ls)&&(Jn(i,Ls,T),l(T?Gd:Xd,Z)),!T&&document.activeElement===i){var K=c.Slides.getAt(e.index);K&&Hd(K.slide)}}function g(T,j,K){Mn(K&&D||i,T,j)}function E(){var T=e.index;return T===t||p.cloneStatus&&T===n}function R(){if(e.is(Tr))return E();var T=Cn(c.Elements.track),j=Cn(i),K=b("left",!0),le=b("right",!0);return sa(T[K])<=dr(j[K])&&sa(j[le])<=dr(T[le])}function G(T,j){var K=hn(T-t);return!w&&(p.rewind||e.is(Ho))&&(K=$i(K,e.length-K)),K<=j}var Z={index:t,slideIndex:n,slide:i,container:D,isClone:w,mount:z,destroy:L,update:k,style:g,isWithin:G};return Z}function Hm(e,t,n){var i=tn(e),o=i.on,r=i.emit,l=i.bind,d=t.Elements,c=d.slides,u=d.list,p=[];function x(){y(),o(an,m),o(an,y)}function y(){c.forEach(function(k,F){v(k,F,-1)})}function m(){_(function(k){k.destroy()}),ii(p)}function h(){_(function(k){k.update()})}function v(k,F,W){var g=Wm(e,F,W,k);g.mount(),p.push(g),p.sort(function(E,R){return E.index-R.index})}function b(k){return k?z(function(F){return!F.isClone}):p}function C(k){var F=t.Controller,W=F.toIndex(k),g=F.hasFocus()?1:n.perPage;return z(function(E){return ea(E.index,W,W+g-1)})}function S(k){return z(k)[0]}function w(k,F){Rn(k,function(W){if(wi(W)&&(W=Od(W)),_d(W)){var g=c[F];g?Qs(W,g):Sr(u,W),Bn(W,n.classes.slide),L(W,Jt(r,$o))}}),r(an)}function D(k){Ui(z(k).map(function(F){return F.slide})),r(an)}function _(k,F){b(F).forEach(k)}function z(k){return p.filter(Nd(k)?k:function(F){return wi(k)?ar(F.slide,k):Js(br(k),F.index)})}function H(k,F,W){_(function(g){g.style(k,F,W)})}function L(k,F){var W=el(k,"img"),g=W.length;g?W.forEach(function(E){l(E,"load error",function(){--g||F()})}):F()}function V(k){return k?c.length:p.length}function $(){return p.length>n.perPage}return{mount:x,destroy:m,update:h,register:v,get:b,getIn:C,getAt:S,add:w,remove:D,forEach:_,filter:z,style:H,getLength:V,isEnough:$}}function Om(e,t,n){var i=tn(e),o=i.on,r=i.bind,l=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,p=u.root,x=u.track,y=u.list,m=d.getAt,h=d.style,v,b,C;function S(){w(),r(window,"resize load",bm(Jt(l,$o))),o([pn,an],w),o($o,D)}function w(){v=n.direction===Ta,Mn(p,"maxWidth",Ai(n.width)),Mn(x,c("paddingLeft"),_(!1)),Mn(x,c("paddingRight"),_(!0)),D(!0)}function D(Z){var T=Cn(p);(Z||b.width!==T.width||b.height!==T.height)&&(Mn(x,"height",z()),h(c("marginRight"),Ai(n.gap)),h("width",L()),h("height",V(),!0),b=T,l(xa),C!==(C=G())&&(Jn(p,gu,C),l(vm,C)))}function _(Z){var T=n.padding,j=c(Z?"right":"left");return T&&Ai(T[j]||(rr(T)?0:T))||"0px"}function z(){var Z="";return v&&(Z=H(),tr(Z,"height or heightRatio is missing."),Z="calc("+Z+" - "+_(!1)+" - "+_(!0)+")"),Z}function H(){return Ai(n.height||Cn(y).width*n.heightRatio)}function L(){return n.autoWidth?null:Ai(n.fixedWidth)||(v?"":$())}function V(){return Ai(n.fixedHeight)||(v?n.autoHeight?null:$():H())}function $(){var Z=Ai(n.gap);return"calc((100%"+(Z&&" + "+Z)+")/"+(n.perPage||1)+(Z&&" - "+Z)+")"}function k(){return Cn(y)[c("width")]}function F(Z,T){var j=m(Z||0);return j?Cn(j.slide)[c("width")]+(T?0:E()):0}function W(Z,T){var j=m(Z);if(j){var K=Cn(j.slide)[c("right")],le=Cn(y)[c("left")];return hn(K-le)+(T?0:E())}return 0}function g(Z){return W(e.length-1)-W(0)+F(0,Z)}function E(){var Z=m(0);return Z&&parseFloat(Mn(Z.slide,c("marginRight")))||0}function R(Z){return parseFloat(Mn(x,c("padding"+(Z?"Right":"Left"))))||0}function G(){return e.is(Tr)||g(!0)>k()}return{mount:S,resize:D,listSize:k,slideSize:F,sliderSize:g,totalSize:W,getPadding:R,isOverflow:G}}var Dm=2;function zm(e,t,n){var i=tn(e),o=i.on,r=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function p(){o(an,x),o([pn,$o],m),(u=b())&&(h(u),t.Layout.resize(!0))}function x(){y(),p()}function y(){Ui(c),ii(c),i.destroy()}function m(){var C=b();u!==C&&(u<C||!C)&&i.emit(an)}function h(C){var S=l.get().slice(),w=S.length;if(w){for(;S.length<C;)Qr(S,S);Qr(S.slice(-C),S.slice(0,C)).forEach(function(D,_){var z=_<C,H=v(D.slide,_);z?Qs(H,S[0].slide):Sr(r.list,H),Qr(c,H),l.register(H,_-C+(z?0:w),D.index)})}}function v(C,S){var w=C.cloneNode(!0);return Bn(w,n.classes.clone),w.id=e.root.id+"-clone"+nl(S+1),w}function b(){var C=n.clones;if(!e.is(Ho))C=0;else if(xr(C)){var S=n[d("fixedWidth")]&&t.Layout.slideSize(0),w=S&&dr(Cn(r.track)[d("width")]/S);C=w||n[d("autoWidth")]&&e.length||n.perPage*Dm}return C}return{mount:p,destroy:y}}function Bm(e,t,n){var i=tn(e),o=i.on,r=i.emit,l=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,p=d.totalSize,x=d.listSize,y=d.sliderSize,m=t.Direction,h=m.resolve,v=m.orient,b=t.Elements,C=b.list,S=b.track,w;function D(){w=t.Transition,o([Ri,xa,pn,an],_)}function _(){t.Controller.isBusy()||(t.Scroll.cancel(),H(e.index),t.Slides.update())}function z(j,K,le,se){j!==K&&Z(j>le)&&(k(),L($(g(),j>le),!0)),l(_o),r(oi,K,le,j),w.start(K,function(){l(wo),r(Wo,K,le,j),se&&se()})}function H(j){L(W(j,!0))}function L(j,K){if(!e.is(Tr)){var le=K?j:V(j);Mn(C,"transform","translate"+h("X")+"("+le+"px)"),j!==le&&r(nu)}}function V(j){if(e.is(Ho)){var K=F(j),le=K>t.Controller.getEnd(),se=K<0;(se||le)&&(j=$(j,le))}return j}function $(j,K){var le=j-G(K),se=y();return j-=v(se*(dr(hn(le)/se)||1))*(K?1:-1),j}function k(){L(g(),!0),w.cancel()}function F(j){for(var K=t.Slides.get(),le=0,se=1/0,M=0;M<K.length;M++){var re=K[M].index,q=hn(W(re,!0)-j);if(q<=se)se=q,le=re;else break}return le}function W(j,K){var le=v(p(j-1)-R(j));return K?E(le):le}function g(){var j=h("left");return Cn(C)[j]-Cn(S)[j]+v(u(!1))}function E(j){return n.trimSpace&&e.is(Co)&&(j=so(j,0,v(y(!0)-x()))),j}function R(j){var K=n.focus;return K==="center"?(x()-c(j,!0))/2:+K*c(j)||0}function G(j){return W(j?t.Controller.getEnd():0,!!n.trimSpace)}function Z(j){var K=v($(g(),j));return j?K>=0:K<=C[h("scrollWidth")]-Cn(S)[h("width")]}function T(j,K){K=xr(K)?g():K;var le=j!==!0&&v(K)<v(G(!1)),se=j!==!1&&v(K)>v(G(!0));return le||se}return{mount:D,move:z,jump:H,translate:L,shift:$,cancel:k,toIndex:F,toPosition:W,getPosition:g,getLimit:G,exceededLimit:T,reposition:_}}function jm(e,t,n){var i=tn(e),o=i.on,r=i.emit,l=t.Move,d=l.getPosition,c=l.getLimit,u=l.toPosition,p=t.Slides,x=p.isEnough,y=p.getLength,m=n.omitEnd,h=e.is(Ho),v=e.is(Co),b=Jt(g,!1),C=Jt(g,!0),S=n.start||0,w,D=S,_,z,H;function L(){V(),o([pn,an,la],V),o(xa,$)}function V(){_=y(!0),z=n.perMove,H=n.perPage,w=Z();var q=so(S,0,m?w:_-1);q!==S&&(S=q,l.reposition())}function $(){w!==Z()&&r(la)}function k(q,ce,J){if(!re()){var be=W(q),We=G(be);We>-1&&(ce||We!==S)&&(le(We),l.move(be,We,D,J))}}function F(q,ce,J,be){t.Scroll.scroll(q,ce,J,function(){var We=G(l.toIndex(d()));le(m?$i(We,w):We),be&&be()})}function W(q){var ce=S;if(wi(q)){var J=q.match(/([+\-<>])(\d+)?/)||[],be=J[1],We=J[2];be==="+"||be==="-"?ce=E(S+ +(""+be+(+We||1)),S):be===">"?ce=We?T(+We):b(!0):be==="<"&&(ce=C(!0))}else ce=h?q:so(q,0,w);return ce}function g(q,ce){var J=z||(M()?1:H),be=E(S+J*(q?-1:1),S,!(z||M()));return be===-1&&v&&!zd(d(),c(!q),1)?q?0:w:ce?be:G(be)}function E(q,ce,J){if(x()||M()){var be=R(q);be!==q&&(ce=q,q=be,J=!1),q<0||q>w?!z&&(ea(0,q,ce,!0)||ea(w,ce,q,!0))?q=T(j(q)):h?q=J?q<0?-(_%H||H):_:q:n.rewind?q=q<0?w:0:q=-1:J&&q!==ce&&(q=T(j(ce)+(q<ce?-1:1)))}else q=-1;return q}function R(q){if(v&&n.trimSpace==="move"&&q!==S)for(var ce=d();ce===u(q,!0)&&ea(q,0,e.length-1,!n.rewind);)q<S?--q:++q;return q}function G(q){return h?(q+_)%_||0:q}function Z(){for(var q=_-(M()||h&&z?1:H);m&&q-- >0;)if(u(_-1,!0)!==u(q,!0)){q++;break}return so(q,0,_-1)}function T(q){return so(M()?q:H*q,0,w)}function j(q){return M()?$i(q,w):sa((q>=w?_-1:q)/H)}function K(q){var ce=l.toIndex(q);return v?so(ce,0,w):ce}function le(q){q!==S&&(D=S,S=q)}function se(q){return q?D:S}function M(){return!xr(n.focus)||n.isNavigation}function re(){return e.state.is([_o,vr])&&!!n.waitForTransition}return{mount:L,go:k,scroll:F,getNext:b,getPrev:C,getAdjacent:g,getEnd:Z,setIndex:le,getIndex:se,toIndex:T,toPage:j,toDest:K,hasFocus:M,isBusy:re}}var Vm="http://www.w3.org/2000/svg",Gm="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",Rr=40;function Xm(e,t,n){var i=tn(e),o=i.on,r=i.bind,l=i.emit,d=n.classes,c=n.i18n,u=t.Elements,p=t.Controller,x=u.arrows,y=u.track,m=x,h=u.prev,v=u.next,b,C,S={};function w(){_(),o(pn,D)}function D(){z(),w()}function _(){var F=n.arrows;F&&!(h&&v)&&V(),h&&v&&(lr(S,{prev:h,next:v}),cr(m,F?"":"none"),Bn(m,C=pl+"--"+n.direction),F&&(H(),k(),Rt([h,v],Cr,y.id),l(Kd,h,v)))}function z(){i.destroy(),Qn(m,C),b?(Ui(x?[h,v]:m),h=v=null):jn([h,v],ul)}function H(){o([Ri,Wo,an,Zi,la],k),r(v,"click",Jt(L,">")),r(h,"click",Jt(L,"<"))}function L(F){p.go(F,!0)}function V(){m=x||yo("div",d.arrows),h=$(!0),v=$(!1),b=!0,Sr(m,[h,v]),!x&&Qs(m,y)}function $(F){var W='<button class="'+d.arrow+" "+(F?d.prev:d.next)+'" type="button"><svg xmlns="'+Vm+'" viewBox="0 0 '+Rr+" "+Rr+'" width="'+Rr+'" height="'+Rr+'" focusable="false"><path d="'+(n.arrowPath||Gm)+'" />';return Od(W)}function k(){if(h&&v){var F=e.index,W=p.getPrev(),g=p.getNext(),E=W>-1&&F<W?c.last:c.prev,R=g>-1&&F>g?c.first:c.next;h.disabled=W<0,v.disabled=g<0,Rt(h,Ln,E),Rt(v,Ln,R),l(Zd,h,v,W,g)}}return{arrows:S,mount:w,destroy:z,update:k}}var qm=tl+"-interval";function Um(e,t,n){var i=tn(e),o=i.on,r=i.bind,l=i.emit,d=Sa(n.interval,e.go.bind(e,">"),H),c=d.isPaused,u=t.Elements,p=t.Elements,x=p.root,y=p.toggle,m=n.autoplay,h,v,b=m==="pause";function C(){m&&(S(),y&&Rt(y,Cr,u.track.id),b||w(),z())}function S(){n.pauseOnHover&&r(x,"mouseenter mouseleave",function(V){h=V.type==="mouseenter",_()}),n.pauseOnFocus&&r(x,"focusin focusout",function(V){v=V.type==="focusin",_()}),y&&r(y,"click",function(){b?w():D(!0)}),o([oi,ba,an],d.rewind),o(oi,L)}function w(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),v=h=b=!1,z(),l(al))}function D(V){V===void 0&&(V=!0),b=!!V,z(),c()||(d.pause(),l(sl))}function _(){b||(h||v?D(!1):w())}function z(){y&&(Jn(y,Yi,!b),Rt(y,Ln,n.i18n[b?"play":"pause"]))}function H(V){var $=u.bar;$&&Mn($,"width",V*100+"%"),l(eu,V)}function L(V){var $=t.Slides.getAt(V);d.set($&&+An($.slide,qm)||n.interval)}return{mount:C,destroy:d.cancel,play:w,pause:D,isPaused:c}}function Ym(e,t,n){var i=tn(e),o=i.on;function r(){n.cover&&(o(ll,Jt(d,!0)),o([Ri,pn,an],Jt(l,!0)))}function l(c){t.Slides.forEach(function(u){var p=wr(u.container||u.slide,"img");p&&p.src&&d(c,p,u)})}function d(c,u,p){p.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),cr(u,c?"none":"")}return{mount:r,destroy:Jt(l,!1)}}var Km=10,Zm=600,Jm=.6,Qm=1.5,eg=800;function tg(e,t,n){var i=tn(e),o=i.on,r=i.emit,l=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,p=d.exceededLimit,x=d.translate,y=e.is(Co),m,h,v=1;function b(){o(oi,D),o([pn,an],_)}function C(H,L,V,$,k){var F=c();if(D(),V&&(!y||!p())){var W=t.Layout.sliderSize(),g=$s(H)*W*sa(hn(H)/W)||0;H=d.toPosition(t.Controller.toDest(H%W))+g}var E=zd(F,H,1);v=1,L=E?0:L||aa(hn(H-F)/Qm,eg),h=$,m=Sa(L,S,Jt(w,F,H,k),1),l(vr),r(ba),m.start()}function S(){l(wo),h&&h(),r(Zi)}function w(H,L,V,$){var k=c(),F=H+(L-H)*z($),W=(F-k)*v;x(k+W),y&&!V&&p()&&(v*=Jm,hn(W)<Km&&C(u(p(!0)),Zm,!1,h,!0))}function D(){m&&m.cancel()}function _(){m&&!m.isPaused()&&(D(),S())}function z(H){var L=n.easingFunc;return L?L(H):1-Math.pow(1-H,4)}return{mount:b,destroy:D,scroll:C,cancel:_}}var lo={passive:!1,capture:!0};function ng(e,t,n){var i=tn(e),o=i.on,r=i.emit,l=i.bind,d=i.unbind,c=e.state,u=t.Move,p=t.Scroll,x=t.Controller,y=t.Elements.track,m=t.Media.reduce,h=t.Direction,v=h.resolve,b=h.orient,C=u.getPosition,S=u.exceededLimit,w,D,_,z,H,L=!1,V,$,k;function F(){l(y,Oa,Ss,lo),l(y,Da,Ss,lo),l(y,hu,g,lo),l(y,"click",G,{capture:!0}),l(y,"dragstart",Zn),o([Ri,pn],W)}function W(){var ee=n.drag;ue(!ee),z=ee==="free"}function g(ee){if(V=!1,!$){var de=We(ee);be(ee.target)&&(de||!ee.button)&&(x.isBusy()?Zn(ee,!0):(k=de?y:window,H=c.is([_o,vr]),_=null,l(k,Oa,E,lo),l(k,Da,R,lo),u.cancel(),p.cancel(),Z(ee)))}}function E(ee){if(c.is(Jr)||(c.set(Jr),r(qd)),ee.cancelable)if(H){u.translate(w+J(M(ee)));var de=re(ee)>Vl,ne=L!==(L=S());(de||ne)&&Z(ee),V=!0,r(Ud),Zn(ee)}else K(ee)&&(H=j(ee),Zn(ee))}function R(ee){c.is(Jr)&&(c.set(wo),r(Yd)),H&&(T(ee),Zn(ee)),d(k,Oa,E),d(k,Da,R),H=!1}function G(ee){!$&&V&&Zn(ee,!0)}function Z(ee){_=D,D=ee,w=C()}function T(ee){var de=le(ee),ne=se(de),Pe=n.rewind&&n.rewindByDrag;m(!1),z?x.scroll(ne,0,n.snap):e.is(Tr)?x.go(b($s(de))<0?Pe?"<":"-":Pe?">":"+"):e.is(Co)&&L&&Pe?x.go(S(!0)?">":"<"):x.go(x.toDest(ne),!0),m(!0)}function j(ee){var de=n.dragMinThreshold,ne=rr(de),Pe=ne&&de.mouse||0,Te=(ne?de.touch:+de)||10;return hn(M(ee))>(We(ee)?Te:Pe)}function K(ee){return hn(M(ee))>hn(M(ee,!0))}function le(ee){if(e.is(Ho)||!L){var de=re(ee);if(de&&de<Vl)return M(ee)/de}return 0}function se(ee){return C()+$s(ee)*$i(hn(ee)*(n.flickPower||600),z?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function M(ee,de){return ce(ee,de)-ce(q(ee),de)}function re(ee){return ws(ee)-ws(q(ee))}function q(ee){return D===ee&&_||D}function ce(ee,de){return(We(ee)?ee.changedTouches[0]:ee)["page"+v(de?"Y":"X")]}function J(ee){return ee/(L&&e.is(Co)?Nm:1)}function be(ee){var de=n.noDrag;return!ar(ee,"."+du+", ."+Ia)&&(!de||!ar(ee,de))}function We(ee){return typeof TouchEvent<"u"&&ee instanceof TouchEvent}function ye(){return H}function ue(ee){$=ee}return{mount:F,disable:ue,isDragging:ye}}var ig={Spacebar:" ",Right:Ca,Left:$a,Up:iu,Down:ou};function ml(e){return e=wi(e)?e:e.key,ig[e]||e}var Gl="keydown";function og(e,t,n){var i=tn(e),o=i.on,r=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,p;function x(){y(),o(pn,m),o(pn,y),o(oi,v)}function y(){var C=n.keyboard;C&&(u=C==="global"?window:d,r(u,Gl,b))}function m(){l(u,Gl)}function h(C){p=C}function v(){var C=p;p=!0,Fd(function(){p=C})}function b(C){if(!p){var S=ml(C);S===c($a)?e.go("<"):S===c(Ca)&&e.go(">")}}return{mount:x,destroy:m,disable:h}}var nr=tl+"-lazy",ta=nr+"-srcset",rg="["+nr+"], ["+ta+"]";function ag(e,t,n){var i=tn(e),o=i.on,r=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[Wo,Zi],p=[];function x(){n.lazyLoad&&(y(),o(an,y))}function y(){ii(p),m(),c?C():(r(u),o(u,h),h())}function m(){t.Slides.forEach(function(S){el(S.slide,rg).forEach(function(w){var D=An(w,nr),_=An(w,ta);if(D!==w.src||_!==w.srcset){var z=n.classes.spinner,H=w.parentElement,L=wr(H,"."+z)||yo("span",z,H);p.push([w,S,L]),w.src||cr(w,"none")}})})}function h(){p=p.filter(function(S){var w=n.perPage*((n.preloadPages||1)+1)-1;return S[1].isWithin(e.index,w)?v(S):!0}),p.length||r(u)}function v(S){var w=S[0];Bn(S[1].slide,Is),l(w,"load error",Jt(b,S)),Rt(w,"src",An(w,nr)),Rt(w,"srcset",An(w,ta)),jn(w,nr),jn(w,ta)}function b(S,w){var D=S[0],_=S[1];Qn(_.slide,Is),w.type!=="error"&&(Ui(S[2]),cr(D,""),d(ll,D,_),d($o)),c&&C()}function C(){p.length&&v(p.shift())}return{mount:x,destroy:Jt(ii,p),check:h}}function sg(e,t,n){var i=tn(e),o=i.on,r=i.emit,l=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,p=u.hasFocus,x=u.getIndex,y=u.go,m=t.Direction.resolve,h=c.pagination,v=[],b,C;function S(){w(),o([pn,an,la],S);var $=n.pagination;h&&cr(h,$?"":"none"),$&&(o([oi,ba,Zi],V),D(),V(),r(Jd,{list:b,items:v},L(e.index)))}function w(){b&&(Ui(h?Ii(b.children):b),Qn(b,C),ii(v),b=null),i.destroy()}function D(){var $=e.length,k=n.classes,F=n.i18n,W=n.perPage,g=p()?u.getEnd()+1:dr($/W);b=h||yo("ul",k.pagination,c.track.parentElement),Bn(b,C=Ra+"--"+H()),Rt(b,ei,"tablist"),Rt(b,Ln,F.select),Rt(b,dl,H()===Ta?"vertical":"");for(var E=0;E<g;E++){var R=yo("li",null,b),G=yo("button",{class:k.page,type:"button"},R),Z=d.getIn(E).map(function(j){return j.slide.id}),T=!p()&&W>1?F.pageX:F.slideX;l(G,"click",Jt(_,E)),n.paginationKeyboard&&l(G,"keydown",Jt(z,E)),Rt(R,ei,"presentation"),Rt(G,ei,"tab"),Rt(G,Cr,Z.join(" ")),Rt(G,Ln,Cs(T,E+1)),Rt(G,vo,-1),v.push({li:R,button:G,page:E})}}function _($){y(">"+$,!0)}function z($,k){var F=v.length,W=ml(k),g=H(),E=-1;W===m(Ca,!1,g)?E=++$%F:W===m($a,!1,g)?E=(--$+F)%F:W==="Home"?E=0:W==="End"&&(E=F-1);var R=v[E];R&&(Hd(R.button),y(">"+E),Zn(k,!0))}function H(){return n.paginationDirection||n.direction}function L($){return v[u.toPage($)]}function V(){var $=L(x(!0)),k=L(x());if($){var F=$.button;Qn(F,Yi),jn(F,Ol),Rt(F,vo,-1)}if(k){var W=k.button;Bn(W,Yi),Rt(W,Ol,!0),Rt(W,vo,"")}r(Qd,{list:b,items:v},$,k)}return{items:v,mount:S,destroy:w,getAt:L,update:V}}var lg=[" ","Enter"];function cg(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&p()}function d(){r.forEach(function(h){h.destroy()}),ii(r)}function c(){d(),l()}function u(h,v){var b=tn(h);b.on(oi,function(C,S,w){v.go(v.is(Ho)?w:C)}),r.push(b)}function p(){var h=tn(e),v=h.on;v(il,y),v(tu,m),v([Ri,pn],x),r.push(h),h.emit(rl,e.splides)}function x(){Rt(t.Elements.list,dl,n.direction===Ta?"vertical":"")}function y(h){e.go(h.index)}function m(h,v){Js(lg,ml(v))&&(y(h),Zn(v))}return{setup:Jt(t.Media.set,{slideFocus:xr(o)?i:o},!0),mount:l,destroy:d,remount:c}}function dg(e,t,n){var i=tn(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,lo)}function d(u){if(u.cancelable){var p=u.deltaY,x=p<0,y=ws(u),m=n.wheelMinThreshold||0,h=n.wheelSleep||0;hn(p)>m&&y-r>h&&(e.go(x?"<":">"),r=y),c(x)&&Zn(u)}}function c(u){return!n.releaseWheel||e.state.is(_o)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var ug=90;function pg(e,t,n){var i=tn(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,d=yo("span",km),c=Sa(ug,Jt(p,!1));function u(){l&&(y(!t.Autoplay.isPaused()),Rt(r,Bl,!0),d.textContent="…",o(al,Jt(y,!0)),o(sl,Jt(y,!1)),o([Wo,Zi],Jt(p,!0)))}function p(m){Rt(r,zl,m),m?(Sr(r,d),c.start()):(Ui(d),c.cancel())}function x(){jn(r,[Dl,Bl,zl]),Ui(d)}function y(m){l&&Rt(r,Dl,m?"off":"polite")}return{mount:u,disable:y,destroy:x}}var mg=Object.freeze({__proto__:null,Media:Sm,Direction:wm,Elements:_m,Slides:Hm,Layout:Om,Clones:zm,Move:Bm,Controller:jm,Arrows:Xm,Autoplay:Um,Cover:Ym,Scroll:tg,Drag:ng,Keyboard:og,LazyLoad:ag,Pagination:sg,Sync:cg,Wheel:dg,Live:pg}),gg={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"},hg={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:Am,i18n:gg,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function fg(e,t,n){var i=t.Slides;function o(){tn(e).on([Ri,an],r)}function r(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function l(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),Fd(c)}return{mount:o,start:l,cancel:Ss}}function yg(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,d=Jt(Mn,l,"transition"),c;function u(){tn(e).bind(l,"transitionend",function(m){m.target===l&&c&&(x(),c())})}function p(m,h){var v=i.toPosition(m,!0),b=i.getPosition(),C=y(m);hn(v-b)>=1&&C>=1?n.useScroll?r.scroll(v,C,!1,h):(d("transform "+C+"ms "+n.easing),i.translate(v,!0),c=h):(i.jump(m),h())}function x(){d(""),r.cancel()}function y(m){var h=n.rewindSpeed;if(e.is(Co)&&h){var v=o.getIndex(!0),b=o.getEnd();if(v===0&&m>=b||v>=b&&m===0)return h}return n.speed}return{mount:u,start:p,cancel:x}}var vg=(function(){function e(n,i){this.event=tn(),this.Components={},this.state=xm(po),this.splides=[],this._o={},this._E={};var o=wi(n)?Dd(document,n):n;tr(o,o+" is invalid."),this.root=o,i=yi({label:An(o,Ln)||"",labelledby:An(o,cl)||""},hg,e.defaults,i||{});try{yi(i,JSON.parse(An(o,tl)))}catch{tr(!1,"Invalid JSON")}this._o=Object.create(yi({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,d=this.Components;tr(l.is([po,ra]),"Already mounted!"),l.set(po),this._C=d,this._T=o||this._T||(this.is(Tr)?fg:yg),this._E=i||this._E;var c=lr({},mg,this._E,{Transition:this._T});return Xi(c,function(u,p){var x=u(r,d,r._o);d[p]=x,x.setup&&x.setup()}),Xi(d,function(u){u.mount&&u.mount()}),this.emit(Ri),Bn(this.root,Em),l.set(wo),this.emit(Ts),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(wo)&&(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(Ii(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(an),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(po)?tn(this).on(Ts,this.destroy.bind(this,i)):(Xi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(ol),o.destroy(),i&&ii(this.splides),r.set(ra)),this},gm(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})(),gl=vg;gl.defaults={};gl.STATES=fm;var Xl=[[Ri,"onMounted"],[Ts,"onReady"],[oi,"onMove"],[Wo,"onMoved"],[il,"onClick"],[jd,"onActive"],[Vd,"onInactive"],[Gd,"onVisible"],[Xd,"onHidden"],[an,"onRefresh"],[pn,"onUpdated"],[$o,"onResize"],[xa,"onResized"],[qd,"onDrag"],[Ud,"onDragging"],[Yd,"onDragged"],[ba,"onScroll"],[Zi,"onScrolled"],[ol,"onDestroy"],[Kd,"onArrowsMounted"],[Zd,"onArrowsUpdated"],[Jd,"onPaginationMounted"],[Qd,"onPaginationUpdated"],[rl,"onNavigationMounted"],[al,"onAutoplayPlay"],[eu,"onAutoplayPlaying"],[sl,"onAutoplayPause"],[ll,"onLazyLoadLoaded"]];function hl(...e){return e.filter(Boolean).join(" ")}function ca(e){return e!==null&&typeof e=="object"}function Rs(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Rs(n,t[i]));if(ca(e)&&ca(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Rs(e[o],t[o]))}return e===t}function xg(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function bg(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 Ps(e,t){const n=e;return bg(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():ca(i)?n[o]=Ps(ca(n[o])?n[o]:{},i):n[o]=i}),n}var Sg=({children:e,className:t,...n})=>s.createElement("div",{className:hl("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),fl=class extends s.Component{constructor(){super(...arguments),this.splideRef=s.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new gl(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Ps({},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&&!Rs(this.options,e)&&(this.splide.options=e,this.options=Ps({},e));const t=this.getSlides();xg(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){Xl.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return s.createElement(t,{className:hl("splide",e),ref:this.splideRef,...this.omit(o,["options",...Xl.map(r=>r[1])])},n?s.createElement(Sg,null,i):i)}},yl=({children:e,className:t,...n})=>s.createElement("li",{className:hl("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 vg="RichTextRenderer-module__link___BWeZ2",xg={link:vg},bg=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))},Oo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>bg(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function dn(e){const{color:t,...n}=e;return n}function Qt(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Oo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:A.scalingValue(e.letterSpacing,t),wordSpacing:A.scalingValue(e.wordSpacing,t),fontSize:A.scalingValue(n,t),lineHeight:i!==void 0?A.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}const Yi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx("a",{className:xg.link,href:i.value,target:i.target,children:t(i.children)},o):a.jsx("span",{style:Sg(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:t(o)},i)})})};function Sg(e){return{...e.fontFamily&&{fontFamily:Oo(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 wg="SvgImage-module__svg___q3xE-",$g="SvgImage-module__img___VsTm-",Xl={svg:wg,img:$g},Cg=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},Tg=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,un=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[r,l]=s.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return s.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(d)}},[]),!Cg(e)||!r?a.jsx("img",{src:e,alt:"",className:St(Xl.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:St(Xl.svg,i),style:{"--svg":Tg(e),"--fill":t,"--hover-fill":n,...o??{}}})},Lg={"top-left":vt.topLeftAlignment,"top-center":vt.topCenterAlignment,"top-right":vt.topRightAlignment,"middle-left":vt.middleLeftAlignment,"middle-center":vt.middleCenterAlignment,"middle-right":vt.middleRightAlignment,"bottom-left":vt.bottomLeftAlignment,"bottom-center":vt.bottomCenterAlignment,"bottom-right":vt.bottomRightAlignment};function Ig({settings:e,content:t,styles:n,isEditor:i}){const[o,r]=s.useState(null),{widthSettings:l,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:p,fontSizeLineHeight:x,textAppearance:v,color:m}=n.imageCaption??{},[h,y]=s.useState(void 0),[b,C]=s.useState(null),[S,w]=s.useState(0),[D,_]=s.useState(0),{direction:z,transition:H,controls:L,pagination:V,imageCaption:$,triggers:E}=e,F=s.useRef(H.type),{x:W,y:g}=e.controls.offset,M=R=>{o&&o.go(R)};return s.useEffect(()=>{if(!b)return;const R=new ResizeObserver(G=>{if(!o)return;const[Z]=G;y({width:Math.round(Z.contentRect.width),height:Math.round(Z.contentRect.height)})});return R.observe(b),()=>R.unobserve(b)},[b]),s.useEffect(()=>{!o||F.current===H.type||(_(R=>R+1),F.current=H.type)},[H.type]),a.jsx("div",{className:St(vt.wrapper,{[vt.editor]:i}),ref:C,children:a.jsxs("div",{className:vt.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:H.backgroundColor&&H.type==="fade in"?H.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:St(vt.captionBlock),children:a.jsx("div",{className:vt.captionTextWrapper,children:t.map((R,G)=>a.jsx("div",{className:St(vt.captionText,Lg[$.alignment],{[vt.withPointerEvents]:G===S&&i,[vt.active]:G===S}),style:{fontFamily:Oo(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":A.scalingValue(l.width,i),letterSpacing:A.scalingValue(c,i),wordSpacing:A.scalingValue(p,i),textAlign:u,fontSize:A.scalingValue(x.fontSize,i),lineHeight:A.scalingValue(x.lineHeight,i),textTransform:v.textTransform??"none",textDecoration:v.textDecoration??"none",fontVariant:v.fontVariant??"normal",color:m,transitionDuration:H.duration?`${Math.round(parseInt(H.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:vt.captionTextInner,style:{"--link-hover-color":$.linkHoverColor,"--link-color":$.linkColor,position:"relative",top:A.scalingValue($.offset.y,i),left:A.scalingValue($.offset.x,i)},children:a.jsx(Yi,{content:R.imageCaption})})},G))})}),a.jsx(hl,{onMove:R=>{w(R.index)},ref:r,options:{arrows:!1,speed:H.duration?parseInt(H.duration):500,autoplay:E.autoPlay!==null,...E.autoPlay!==null&&{interval:parseInt(E.autoPlay)*1e3},direction:z==="horiz"||H.type==="fade in"?"ltr":"ttb",pagination:!1,drag:E.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:H.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((R,G)=>a.jsx(fl,{children:a.jsx("div",{className:vt.sliderItem,children:a.jsx("div",{className:vt.imgWrapper,children:a.jsx("img",{className:St(vt.sliderImage,{[vt.contain]:R.image.objectFit==="contain",[vt.cover]:R.image.objectFit==="cover"}),src:R.image.url,alt:R.image.name??""})})})},G))},D),L.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:St(vt.arrow,{[vt.arrowVertical]:z==="vert",[vt.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:a.jsxs("button",{onClick:()=>{M("-1")},className:vt.arrowInner,style:{transform:`translate(${A.scalingValue(W,i)}, ${A.scalingValue(g*(z==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${z==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&a.jsx(un,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:St(vt.arrowImg,vt.mirror)}),!L.arrowsImgUrl&&a.jsx(ql,{color:L.color,className:St(vt.arrowIcon,vt.arrowImg,vt.mirror)})]})}),a.jsx("div",{className:St(vt.arrow,vt.nextArrow,{[vt.arrowVertical]:z==="vert",[vt.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:a.jsxs("button",{className:vt.arrowInner,onClick:()=>M("+1"),style:{transform:`translate(${A.scalingValue(W*(z==="horiz"?-1:1),i)}, ${A.scalingValue(g,i)}) scale(${e.controls.scale/100}) rotate(${z==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&a.jsx(un,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:vt.arrowImg}),!L.arrowsImgUrl&&a.jsx(ql,{color:L.color,className:St(vt.arrowIcon,vt.arrowImg)})]})})]}),E.triggersList.click&&a.jsx("div",{className:vt.clickOverlay,onClick:()=>{o&&o.go("+1")}}),V.isActive&&a.jsx("div",{className:St(vt.pagination,{[vt.paginationInsideBottom]:V.position==="inside-1"&&z==="horiz",[vt.paginationInsideTop]:V.position==="inside-2"&&z==="horiz",[vt.paginationOutsideBottom]:V.position==="outside-1"&&z==="horiz",[vt.paginationOutsideTop]:V.position==="outside-2"&&z==="horiz",[vt.paginationInsideLeft]:V.position==="inside-1"&&z==="vert",[vt.paginationInsideRight]:V.position==="inside-2"&&z==="vert",[vt.paginationOutsideLeft]:V.position==="outside-1"&&z==="vert",[vt.paginationOutsideRight]:V.position==="outside-2"&&z==="vert",[vt.paginationVertical]:z==="vert"}),children:a.jsx("div",{className:vt.paginationInner,style:{backgroundColor:V.colors[2],transform:`scale(${V.scale/100}) translate(${A.scalingValue(V.offset.x,i)}, ${A.scalingValue(V.offset.y,i)}) rotate(${z==="horiz"?"0deg":"90deg"})`},children:t.map((R,G)=>a.jsx("button",{onClick:()=>{o&&o.go(G)},className:St(vt.paginationItem),children:a.jsx("div",{className:St(vt.dot,{[vt.activeDot]:G===S}),style:{backgroundColor:G===S?V.colors[0]:V.colors[1],"--pagination-hover-color":V.hover}})},G))})})]})})}function ql({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Rg={element:Ig,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"]}},Pg="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Eg="ImageRevealSlider-module__image___Qjt-e",Mg="ImageRevealSlider-module__link___N-iLG",kg="ImageRevealSlider-module__cursor___2U03d",eo={imageRevealSlider:Pg,image:Eg,link:Mg,cursor:kg};function Ul(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,d=r/2,c=l/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function Da(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ag(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await Da(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Da(e);r=l.height/l.width*o}else{const l=await Da(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function Fg({settings:e,content:t,isEditor:n}){const[i,o]=s.useState(null),[r,l]=s.useState([]),[d,c]=s.useState(0),u=s.useRef(0),[p,x]=s.useState({x:0,y:0}),[v,m]=s.useState(1),[h,y]=s.useState("none"),b=s.useRef({x:0,y:0}),[C,S]=s.useState(!1),{sizeType:w,imageWidth:D,randomRangeImageWidth:_}=e.imageSize,{revealPosition:z,visible:H}=e.position,{cursorType:L,target:V,defaultCursorScale:$,defaultCursor:E,hoverCursorScale:F,hoverCursor:W}=e.cursor;s.useEffect(()=>{if(!i)return;const R=(T,j)=>{const Y=i.getBoundingClientRect(),le=T-Y.left,se=j-Y.top;if(x({x:le,y:se}),L==="system"){y("none"),m(1);return}const k=le,re=se,q=document.elementFromPoint(Y.left+k,Y.top+re);if(q&&q.closest("a")){y("none"),m(1);return}const ce=Ul(k,re,r)||V==="area"?{img:W??"none",scale:F}:{img:E??"none",scale:$};y(ce.img),m(ce.scale)},G=T=>{T.stopPropagation(),b.current={x:T.clientX,y:T.clientY},R(T.clientX,T.clientY)},Z=()=>{C&&R(b.current.x,b.current.y)};return i.addEventListener("mousemove",G),window.addEventListener("scroll",Z,!0),()=>{i.removeEventListener("mousemove",G),window.removeEventListener("scroll",Z,!0)}},[i,C,p,L,V,W,E,F,$,r]),s.useEffect(()=>{C||(y("none"),m(0))},[C]);const g=async(R,G,Z,T={})=>{const{width:j,height:Y,finalWidth:le}=await Ag(R.image.url,w,D,_);let se=0,k=0;z==="same"?(se=G/2,k=Z/2):(se=T.x??Math.random()*G,k=T.y??Math.random()*Z);const re=Math.min(Math.max(se,j/2),G-j/2),q=Math.min(Math.max(k,Y/2),Z-Y/2);return{id:u.current++,url:R.image.url,link:R.link,name:R.image.name,x:re,y:q,width:le}};s.useEffect(()=>{if(!i||t.length===0)return;const R=i.getBoundingClientRect(),G=R.width,Z=R.height,T=[];(async()=>{const Y=t[0],le=await g(Y,G,Z);T.push(le),l(T),c(1)})()},[w,D,_,z,i]),s.useEffect(()=>{H==="last One"&&l(R=>R.length>0?[R[R.length-1]]:[])},[H]);const M=async R=>{if(!i)return;const G=i.getBoundingClientRect(),Z=R.clientX-G.left,T=R.clientY-G.top;if(V==="image"&&!Ul(Z,T,r))return;let j=0,Y=0;z==="on Click"?(j=Z,Y=T):z==="same"?(j=G.width/2,Y=G.height/2):(j=Math.random()*G.width,Y=Math.random()*G.height);const le=t[d],se=await g(le,G.width,G.height,{x:j,y:Y});l(k=>H==="all"?[...k,se]:[se]),c(k=>k>=t.length-1?0:k+1)};return a.jsxs("div",{ref:o,onClick:M,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),className:eo.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[r.map(R=>a.jsx("div",{className:eo.wrapper,style:{top:`${R.y}px`,left:`${R.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:R.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:V==="area"&&R.link?a.jsx("a",{href:R.link,target:"_blank",className:eo.link,children:a.jsx("img",{src:R.url,alt:R.name,className:eo.image},R.id)}):a.jsx("img",{src:R.url,alt:R.name,className:eo.image},R.id)},R.id)),C&&a.jsx("div",{className:eo.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${v})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Ng={element:Fg,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:""}]}}}},_g="LightBox-module__hidden___9s-9x",Wg="LightBox-module__heroImage___sTxNF",Hg="LightBox-module__background___rm9ml",Og="LightBox-module__editor___4ACaY",Dg="LightBox-module__contentStyle___Bgnsq",zg="LightBox-module__imageStyle___tLIlB",Bg="LightBox-module__imgWrapper___LuFUp",jg="LightBox-module__contain___8-yaS",Vg="LightBox-module__cover___hNvOG",Gg="LightBox-module__caption___b6L2I",Xg="LightBox-module__captionTextInner___rCGNH",qg="LightBox-module__lightboxSplide___XFuWC",Ug="LightBox-module__arrow___iz38X",Kg="LightBox-module__arrowVertical___Zfz81",Yg="LightBox-module__nextArrow___zkAQN",Zg="LightBox-module__arrowInner___p48sW",Jg="LightBox-module__arrowIcon___3VaFf",Qg="LightBox-module__arrowImg___pNV88",eh="LightBox-module__mirror___pjeXc",th="LightBox-module__thumbsWrapper___GB-nU",nh="LightBox-module__thumbsContainerVertical___wttk5",ih="LightBox-module__thumbsContainer___osSma",oh="LightBox-module__thumbsAlignStart___MO6tY",rh="LightBox-module__thumbsAlignCenter___Q4sUx",ah="LightBox-module__thumbsAlignEnd___p4y9R",sh="LightBox-module__thumbItem___HvnF3",lh="LightBox-module__closeButton___g2khP",ch="LightBox-module__fadeIn___0m5GW",dh="LightBox-module__slideInLeft___gPYwC",uh="LightBox-module__slideInRight___S-pPp",ph="LightBox-module__slideInTop___DFdAj",mh="LightBox-module__slideInBottom___m27kZ",gh="LightBox-module__fadeOut___55qBR",hh="LightBox-module__slideOutLeft___NvU7P",fh="LightBox-module__slideOutRight___SK7eC",yh="LightBox-module__slideOutTop___Vgg0z",vh="LightBox-module__slideOutBottom___nJ0Ef",xh="LightBox-module__scaleSlide___vZriG",at={hidden:_g,heroImage:Wg,background:Hg,editor:Og,contentStyle:Dg,imageStyle:zg,imgWrapper:Bg,contain:jg,cover:Vg,caption:Gg,captionTextInner:Xg,lightboxSplide:qg,arrow:Ug,arrowVertical:Kg,nextArrow:Yg,arrowInner:Zg,arrowIcon:Jg,arrowImg:Qg,mirror:eh,thumbsWrapper:th,thumbsContainerVertical:nh,thumbsContainer:ih,thumbsAlignStart:oh,thumbsAlignCenter:rh,thumbsAlignEnd:ah,thumbItem:sh,closeButton:lh,fadeIn:ch,slideInLeft:dh,slideInRight:uh,slideInTop:ph,slideInBottom:mh,fadeOut:gh,slideOutLeft:hh,slideOutRight:fh,slideOutTop:yh,slideOutBottom:vh,scaleSlide:xh},Pr=(e,t,n)=>{const i={},[o,r]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),r==="left"?(i.left="0",i.right="auto"):r==="center"?(i.left="50%",i.right="auto"):r==="right"&&(i.left="auto",i.right="0"),o==="middle"&&r==="center"?i.transform=`translate(calc(-50% + ${A.scalingValue(t.x,n)}), calc(-50% + ${A.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${A.scalingValue(t.x,n)}, calc(-50% + ${A.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${A.scalingValue(t.x,n)}), ${A.scalingValue(t.y,n)})`:i.transform=`translate(${A.scalingValue(t.x,n)}, ${A.scalingValue(t.y,n)})`,i};function gu(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 bh(e){const t=e.trim().split(/\s+/),n=i=>{if(i.endsWith("%"))return parseFloat(i)/100;switch(i){case"left":case"top":return 0;case"right":case"bottom":return 1;case"center":return .5;default:return .5}};if(t.length===1){const i=t[0];return i==="center"?{x:.5,y:.5}:i==="top"||i==="bottom"?{x:.5,y:n(i)}:i==="left"||i==="right"?{x:n(i),y:.5}:{x:n(i),y:.5}}return{x:n(t[0]),y:n(t[1])}}function hu(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const d=e;return{renderedW:d,renderedH:d/r}}const l=t;return{renderedW:l*r,renderedH:l}}function Sh(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const d=t;return{renderedW:d*r,renderedH:d}}const l=e;return{renderedW:l,renderedH:l/r}}function fu(e,t,n,i,o){const{x:r,y:l}=bh(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function wh(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,r=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:d}=window.getComputedStyle(e),c=l==="cover"?Sh:hu,{renderedW:u,renderedH:p}=c(n,i,o,r),{offsetX:x,offsetY:v}=fu(n,i,u,p,d),m=(x+u/2)/n*100,h=(v+p/2)/i*100;return`${m}% ${h}%`}function $h(e){return wh(e)}function ca(e){const t=e.getBoundingClientRect(),n=gu(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),r=e.naturalWidth,l=e.naturalHeight,{renderedW:d,renderedH:c}=hu(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:x}=fu(i,o,d,c,u),v=t.left+n.left,m=t.top+n.top;return{x:p+v,y:x+m,width:d,height:c}}function Kl(e){const t=e.getBoundingClientRect(),n=gu(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Ch(e,t){const n=(()=>{if(e==="fade in")return at.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return at.slideInLeft;case"right":return at.slideInRight;case"top":return at.slideInTop;case"bottom":return at.slideInBottom;default:return at.slideInRight}return at.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return at.fadeIn;if(e==="slide in")switch(t){case"left":return at.slideInLeft;case"right":return at.slideInRight;case"top":return at.slideInTop;case"bottom":return at.slideInBottom;default:return at.slideInRight}return at.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return at.fadeOut;if(e==="slide in")switch(t){case"left":return at.slideOutLeft;case"right":return at.slideOutRight;case"top":return at.slideOutTop;case"bottom":return at.slideOutBottom;default:return at.slideOutRight}return at.fadeOut})(),r=(()=>{if(e==="fade in")return at.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return at.slideOutLeft;case"right":return at.slideOutRight;case"top":return at.slideOutTop;case"bottom":return at.slideOutBottom;default:return at.slideOutRight}return at.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const Th=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[d,c]=s.useState(!1),{url:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className:at.heroImage,onClick:()=>c(!0)}),a.jsx(Lh,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},Lh=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:d})=>{var $e;const{widthSettings:c,fontSettings:u,letterSpacing:p,textAlign:x,wordSpacing:v,fontSizeLineHeight:m,textAppearance:h,color:y}=i.imageCaption??{},[b,C]=s.useState(0),[S,w]=s.useState(0),[D,_]=s.useState(!1),[z,H]=s.useState(!1),[L,V]=s.useState({}),$=s.useRef(null),E=s.useRef(null),F=s.useRef(null),W=s.useRef(!1),g=s.useRef(null),M=s.useRef(null),R=s.useRef(null),G=s.useRef(null),Z=s.useRef(!1),T=s.useRef(null),[j,Y]=s.useState(!1),{appear:le,triggers:se,slider:k,thumbnail:re,controls:q,area:ce,caption:J,layout:be}=o.lightboxBlock,{appearClass:We,backdropAppearClass:ye,backdropDisappearClass:ue,disappearClass:ee}=Ch(le.type,le.direction),de=(d==null?void 0:d.itemId)??null;s.useEffect(()=>{const f=()=>{setTimeout(()=>{var N,U;(U=(N=$.current)==null?void 0:N.splide)==null||U.refresh()},16)},X=()=>{w(N=>N+1)};return window.addEventListener("ArticleEditor.Layout:change",f),window.addEventListener("ArticleEditor.ComponentContent:change",X),()=>{window.removeEventListener("ArticleEditor.Layout:change",f),window.removeEventListener("ArticleEditor.ComponentContent:change",X)}},[]),s.useEffect(()=>{if(!e||!re.isActive){Y(!1);return}const f=T.current;if(!f)return;const X=()=>{k.direction==="horiz"?Y(f.scrollWidth>f.clientWidth):Y(f.scrollHeight>f.clientHeight)};X();const N=new ResizeObserver(X);return N.observe(f),()=>N.disconnect()},[e,re.isActive,n.length,L,k.direction]);const ne=s.useCallback(()=>{const f=window.matchMedia("(max-width: 768px)").matches,X=A.getColorAlpha(ce.color);f&&!l&&X>.9&&(document.body.style.backgroundColor=""),_(!0),W.current=!0;const N=U=>{U.target===g.current&&U.animationName&&(g.current&&M.current&&g.current.removeEventListener("animationend",M.current),M.current=null,W.current&&(W.current=!1,t()),_(!1))};g.current&&(M.current=N,g.current.addEventListener("animationend",N))},[t,ce.color,l]),Pe=(f,X,N)=>{var U,me;if(f){if(se.type==="click"&&se.switch==="image")se.repeat==="close"&&b===n.length-1?ne():(U=$.current)==null||U.go("+1");else if(se.type==="click"&&se.switch==="50/50"){const K=f.getBoundingClientRect(),I=X-K.left,ie=N-K.top,oe=K.width,B=K.height;let te;k.direction==="horiz"?te=I<oe/2?"-1":"+1":te=ie<B/2?"-1":"+1",(me=$.current)==null||me.go(te)}}},Te=f=>{if(Z.current){Z.current=!1;return}const X=n[b],N=(X==null?void 0:X.image.objectFit)==="cover";let U,me;if("changedTouches"in f&&f.changedTouches.length>0)U=f.changedTouches[0].clientX,me=f.changedTouches[0].clientY;else if("clientX"in f)U=f.clientX,me=f.clientY;else return;let K;if(N&&F.current){const I=Kl(F.current);K=U>=I.left&&U<=I.right&&me>=I.top&&me<=I.bottom}else{const I=F.current?ca(F.current):null;if(!I){f.target===f.currentTarget&&ne();return}K=U>=I.x&&U<=I.x+I.width&&me>=I.y&&me<=I.y+I.height}K?Pe(F.current,U,me):ne()},Oe=f=>{const X=f.target;(X.classList.contains(at.thumbsWrapper)||X.classList.contains(at.thumbsContainer))&&Te(f)};s.useEffect(()=>{if(!e)return;const f=X=>{var N,U;if(X.key==="Escape"){ne();return}if(X.key==="ArrowRight"){C(me=>(me+1)%Math.max(n.length,1)),(N=$.current)==null||N.go("+1");return}X.key==="ArrowLeft"&&(C(me=>(me-1+Math.max(n.length,1))%Math.max(n.length,1)),(U=$.current)==null||U.go("-1"))};return window.addEventListener("keydown",f),()=>{window.removeEventListener("keydown",f)}},[e,ne,n.length]),s.useEffect(()=>{if(e){if(C(0),w(X=>X+1),W.current=!1,_(!1),H(!1),V({}),!de)return;const f=new CustomEvent("page-overlay",{detail:{itemId:de}});window.dispatchEvent(f)}return()=>{g.current&&M.current&&(g.current.removeEventListener("animationend",M.current),M.current=null),H(!1)}},[e,de]),s.useEffect(()=>{E.current!==null&&E.current!==k.type&&w(f=>f+1),E.current=k.type},[k.type]),s.useEffect(()=>{if(!e)return;const f=document.body.style.overflow,X=window.matchMedia("(max-width: 768px)").matches,N=A.getColorAlpha(ce.color);document.body.style.overflow="hidden",H(!1);const U=K=>{K.target===g.current&&!W.current&&K.animationName&&(X&&!l&&N>.9&&(document.body.style.backgroundColor=ce.color),H(!0),g.current&&R.current&&g.current.removeEventListener("animationend",R.current),R.current=null)};g.current&&(R.current=U,g.current.addEventListener("animationend",U));const me=K=>{const I=K.target;I&&(I.closest(`.${at.thumbsWrapper}`)||I.closest(`.${at.thumbsContainer}`))||k.type!=="slide"&&K.preventDefault()};return document.addEventListener("touchmove",me,{passive:!1}),()=>{document.body.style.overflow=f,document.removeEventListener("touchmove",me),g.current&&R.current&&(g.current.removeEventListener("animationend",R.current),R.current=null),H(!1)}},[e,l,ce.color,k.type]),s.useEffect(()=>{if(!e)return;const f=X=>{var U,me;if(W.current){X.stopPropagation();return}if(Z.current){Z.current=!1;return}const N=X.target;if(!(N&&(N.closest(`.${at.thumbsContainer}`)||N.closest(`.${at.thumbItem}`)||N.closest(`.${at.arrow}`)||N.closest(`.${at.closeButton}`)||N.closest(`.${at.caption}`)))){if(k.type==="slide"&&se.type==="drag"&&((me=(U=$.current)==null?void 0:U.splide)!=null&&me.root)){const K=$.current.splide.root;if(N&&(K.contains(N)||K===N))return}if(X.touches.length===0&&X.changedTouches.length>0){const K=n[b],I=(K==null?void 0:K.image.objectFit)==="cover",ie=X.changedTouches[0];let oe;if(I&&F.current){const B=Kl(F.current);oe=ie.clientX>=B.left&&ie.clientX<=B.right&&ie.clientY>=B.top&&ie.clientY<=B.bottom}else{const B=F.current?ca(F.current):null;if(!B)return;oe=ie.clientX>=B.x&&ie.clientX<=B.x+B.width&&ie.clientY>=B.y&&ie.clientY<=B.y+B.height}if(!oe){X.stopPropagation(),W.current=!0;const B=te=>{te.stopPropagation(),te.preventDefault(),document.removeEventListener("click",B,!0)};document.addEventListener("click",B,!0),ne()}}}};return document.addEventListener("touchend",f,{passive:!0}),()=>{document.removeEventListener("touchend",f)}},[e,ne,b,n]);const ve=(k.type==="scale"||k.type==="fade")&&k.direction==="vert"&&se.type==="drag";s.useEffect(()=>{var te,Ae;if(!e||!ve||!((Ae=(te=$.current)==null?void 0:te.splide)!=null&&Ae.root))return;const f=$.current.splide.root,X=30,N=(he,Q)=>{if(G.current){const Ze=Math.abs(he-G.current.x),Fe=Math.abs(Q-G.current.y);(Ze>0||Fe>0)&&(Z.current=!0)}},U=he=>{G.current&&(he.preventDefault(),N(he.clientX,he.clientY))},me=he=>{G.current&&he.touches.length>0&&(he.preventDefault(),N(he.touches[0].clientX,he.touches[0].clientY))},K=(he,Q)=>{if(!G.current||!$.current){G.current=null;return}const Ze=Math.abs(he-G.current.x),Fe=Math.abs(Q-G.current.y);Fe>X&&Fe>Ze&&$.current.go(Q<G.current.y?"+1":"-1"),G.current=null},I=he=>{G.current&&K(he.clientX,he.clientY),document.removeEventListener("pointerup",I),document.removeEventListener("pointercancel",I),document.removeEventListener("pointermove",U)},ie=he=>{if(G.current){if(he.changedTouches.length>0){const Q=he.changedTouches[0];K(Q.clientX,Q.clientY)}document.removeEventListener("touchend",ie),document.removeEventListener("touchcancel",ie),document.removeEventListener("touchmove",me)}},oe=he=>{G.current={x:he.clientX,y:he.clientY},Z.current=!1,document.addEventListener("pointermove",U,{passive:!1}),document.addEventListener("pointerup",I),document.addEventListener("pointercancel",I)},B=he=>{he.touches.length>0&&(G.current={x:he.touches[0].clientX,y:he.touches[0].clientY},Z.current=!1,document.addEventListener("touchmove",me,{passive:!1}),document.addEventListener("touchend",ie),document.addEventListener("touchcancel",ie))};return f.addEventListener("pointerdown",oe),f.addEventListener("touchstart",B),()=>{f.removeEventListener("pointerdown",oe),f.removeEventListener("touchstart",B),document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",I),document.removeEventListener("pointercancel",I),document.removeEventListener("touchmove",me),document.removeEventListener("touchend",ie),document.removeEventListener("touchcancel",ie),G.current=null,Z.current=!1}},[e,ve,S]);const Se={backgroundColor:ce.color,backdropFilter:`blur(${ce.blur}px)`,animationDuration:`${parseInt(le.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:ri.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:g,className:St(at.background,D?ue:ye,{[at.editor]:l},{[at.hidden]:!e}),style:{...Se,...z&&!l&&!D?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?g:null,className:St(at.contentStyle,D?ee:We,{[at.editor]:l},{[at.hidden]:!e}),style:{animationDuration:`${parseInt(le.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(hl,{onMove:f=>C(f.index),ref:$,className:at.lightboxSplide,options:{arrows:!1,speed:k.duration?parseInt(k.duration):500,direction:k.direction==="horiz"||k.type==="fade"||k.type==="scale"?"ltr":"ttb",pagination:!1,drag:se.type==="drag"&&!ve,perPage:1,width:"100%",height:"100%",type:k.type==="fade"||k.type==="scale"?"fade":"loop",padding:0,rewind:se.repeat!=="close",start:0},style:{"--splide-speed":k.duration},children:n.map((f,X)=>{const N=Pr(be.position,be.offset,l),U=`${A.scalingValue(be.padding.top,l)} ${A.scalingValue(be.padding.right,l)} ${A.scalingValue(be.padding.bottom,l)} ${A.scalingValue(be.padding.left,l)}`,me=k.type==="scale"?(()=>{const{transform:K,...I}=N;return{...I,position:"absolute",padding:U,boxSizing:"border-box","--position-transform":K||"none"}})():{...N,position:"absolute",padding:U,boxSizing:"border-box"};return a.jsx(fl,{children:a.jsx("div",{className:at.imgWrapper,onClick:Te,children:a.jsx("img",{ref:X===b?F:null,className:St(at.imageStyle,{[at.contain]:f.image.objectFit==="contain",[at.cover]:f.image.objectFit==="cover",[at.scaleSlide]:k.type==="scale"}),src:f.image.url,alt:f.image.name??"",style:{...me,pointerEvents:f.image.objectFit==="contain"?"none":"auto"}})})},X)})},S),q.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:St(at.arrow,{[at.arrowVertical]:k.direction==="vert"}),style:{color:q.color,"--arrow-hover-color":q.hover},children:a.jsxs("button",{className:at.arrowInner,style:{transform:`translate(${A.scalingValue(q.offset.x,l)}, ${A.scalingValue(q.offset.y*(k.direction==="horiz"?1:-1),l)}) scale(${q.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var f;return(f=$.current)==null?void 0:f.go("-1")},"aria-label":"Previous",children:[q.arrowsImgUrl&&a.jsx(un,{url:q.arrowsImgUrl,fill:q.color,hoverFill:q.hover,className:St(at.arrowImg,at.mirror)}),!q.arrowsImgUrl&&a.jsx(Yl,{color:q.color,className:St(at.arrowIcon,at.arrowImg,at.mirror)})]})}),a.jsx("div",{className:St(at.arrow,at.nextArrow,{[at.arrowVertical]:k.direction==="vert"}),style:{color:q.color,"--arrow-hover-color":q.hover},children:a.jsxs("button",{className:at.arrowInner,style:{transform:`translate(${A.scalingValue(q.offset.x*(k.direction==="horiz"?-1:1),l)}, ${A.scalingValue(q.offset.y,l)}) scale(${q.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var f;return(f=$.current)==null?void 0:f.go("+1")},"aria-label":"Next",children:[q.arrowsImgUrl&&a.jsx(un,{url:q.arrowsImgUrl,fill:q.color,hoverFill:q.hover,className:at.arrowImg}),!q.arrowsImgUrl&&a.jsx(Yl,{color:q.color,className:St(at.arrowIcon,at.arrowImg)})]})})]}),ce.closeIconUrl&&(()=>{const f=Pr(ce.closeIconAlign,ce.closeIconOffset,l),X=`scale(${ce.closeIconScale})`,N=f.transform?`${f.transform} ${X}`:X;return a.jsx("button",{className:at.closeButton,style:{...f,transform:N},onClick:ne,"aria-label":"Close lightbox",children:a.jsx(un,{url:ce.closeIconUrl,fill:ce.closeIconColor??"#000000",hoverFill:ce.closeIconHover??"#cccccc"})})})(),J&&J.isActive&&i.imageCaption&&(($e=n[b])==null?void 0:$e.imageCaption)&&a.jsx("div",{className:at.caption,style:{...Pr(J.alignment,J.offset,l),fontFamily:Oo(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":A.scalingValue(c.width,l),letterSpacing:A.scalingValue(p,l),wordSpacing:A.scalingValue(v,l),textAlign:x,fontSize:A.scalingValue(m.fontSize,l),lineHeight:A.scalingValue(m.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:y},onClick:f=>f.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:at.captionTextInner,style:{"--link-color":J.linkColor,"--link-hover-color":J.linkHoverColor},children:a.jsx(Yi,{content:n[b].imageCaption})})}),re.isActive&&(()=>{const[f,X]=re.position.split("-"),N=k.direction==="horiz"?`${f}-left`:re.position,U=Pr(N,re.offset,l),me=()=>{if(k.direction==="horiz"){if(X==="left")return"flex-start";if(X==="center")return"center";if(X==="right")return"flex-end"}else{if(f==="top")return"flex-start";if(f==="middle")return"center";if(f==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:T,className:at.thumbsWrapper,onClick:K=>Oe(K),style:{position:l?"absolute":"fixed",...U,...k.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:St(at.thumbsContainer,{[at.thumbsContainerVertical]:k.direction==="vert",[at.thumbsAlignStart]:re.align==="start",[at.thumbsAlignCenter]:re.align==="center",[at.thumbsAlignEnd]:re.align==="end"}),style:{gap:A.scalingValue(re.grid.gap,l),justifyContent:j?"flex-start":me()},children:n.map((K,I)=>{const ie=I===b,oe=L[I],te=re.grid.size*(ie?re.activeState.scale:1),Ae=()=>{if(re.fit!=="fit")return{};if(!oe)return k.direction==="horiz"?{height:A.scalingValue(te,l)}:{width:A.scalingValue(te,l)};const he=oe.width/oe.height;if(k.direction==="horiz"){const Q=te,Ze=Q*he;return{width:A.scalingValue(Ze,l),height:A.scalingValue(Q,l)}}else{const Q=te,Ze=Q/he;return{width:A.scalingValue(Q,l),height:A.scalingValue(Ze,l)}}};return a.jsx("button",{className:at.thumbItem,style:{...k.direction==="horiz"&&re.fit!=="fit"?{height:A.scalingValue(te,l)}:{},...k.direction==="vert"&&re.fit!=="fit"?{width:A.scalingValue(te,l)}:{},...re.fit==="cover"?{width:A.scalingValue(te,l),height:A.scalingValue(te,l)}:{},...Ae(),transition:ie?"all 0.25s ease-out":"none",opacity:ie?re.activeState.opacity/100:re.opacity/100,"--thumb-hover":re.activeState.opacity/100},onClick:he=>{var Q;he.stopPropagation(),C(I),(Q=$.current)==null||Q.go(I)},onMouseEnter:()=>{var he;re.triggers==="hov"&&((he=$.current)==null||he.go(I))},children:a.jsx("img",{src:K.image.url,alt:K.image.name??"",onLoad:he=>{const Q=he.currentTarget;Q.naturalWidth&&Q.naturalHeight&&V(Ze=>({...Ze,[I]:{width:Q.naturalWidth,height:Q.naturalHeight}}))},style:{objectFit:re.fit==="cover"?"cover":"contain",...re.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...re.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${K.image.name}-${I}`)})})})})()]})]}),document.getElementById(r))};function Yl({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ih={element:Th,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 Er(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rh(e){return`
6
+ */const wg="RichTextRenderer-module__link___BWeZ2",$g={link:wg},Cg=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))},Oo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Cg(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function dn(e){const{color:t,...n}=e;return n}function Qt(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Oo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:A.scalingValue(e.letterSpacing,t),wordSpacing:A.scalingValue(e.wordSpacing,t),fontSize:A.scalingValue(n,t),lineHeight:i!==void 0?A.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}const Ki=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx("a",{className:$g.link,href:i.value,target:i.target,children:t(i.children)},o):a.jsx("span",{style:Tg(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:t(o)},i)})})};function Tg(e){return{...e.fontFamily&&{fontFamily:Oo(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 Lg="SvgImage-module__svg___q3xE-",Ig="SvgImage-module__img___VsTm-",ql={svg:Lg,img:Ig},Rg=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},Pg=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,un=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[r,l]=s.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return s.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(d)}},[]),!Rg(e)||!r?a.jsx("img",{src:e,alt:"",className:St(ql.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:St(ql.svg,i),style:{"--svg":Pg(e),"--fill":t,"--hover-fill":n,...o??{}}})},kg={"top-left":vt.topLeftAlignment,"top-center":vt.topCenterAlignment,"top-right":vt.topRightAlignment,"middle-left":vt.middleLeftAlignment,"middle-center":vt.middleCenterAlignment,"middle-right":vt.middleRightAlignment,"bottom-left":vt.bottomLeftAlignment,"bottom-center":vt.bottomCenterAlignment,"bottom-right":vt.bottomRightAlignment};function Eg({settings:e,content:t,styles:n,isEditor:i}){const[o,r]=s.useState(null),{widthSettings:l,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:p,fontSizeLineHeight:x,textAppearance:y,color:m}=n.imageCaption??{},[h,v]=s.useState(void 0),[b,C]=s.useState(null),[S,w]=s.useState(0),[D,_]=s.useState(0),{direction:z,transition:H,controls:L,pagination:V,imageCaption:$,triggers:k}=e,F=s.useRef(H.type),{x:W,y:g}=e.controls.offset,E=R=>{o&&o.go(R)};return s.useEffect(()=>{if(!b)return;const R=new ResizeObserver(G=>{if(!o)return;const[Z]=G;v({width:Math.round(Z.contentRect.width),height:Math.round(Z.contentRect.height)})});return R.observe(b),()=>R.unobserve(b)},[b]),s.useEffect(()=>{!o||F.current===H.type||(_(R=>R+1),F.current=H.type)},[H.type]),a.jsx("div",{className:St(vt.wrapper,{[vt.editor]:i}),ref:C,children:a.jsxs("div",{className:vt.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:H.backgroundColor&&H.type==="fade in"?H.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:St(vt.captionBlock),children:a.jsx("div",{className:vt.captionTextWrapper,children:t.map((R,G)=>a.jsx("div",{className:St(vt.captionText,kg[$.alignment],{[vt.withPointerEvents]:G===S&&i,[vt.active]:G===S}),style:{fontFamily:Oo(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":A.scalingValue(l.width,i),letterSpacing:A.scalingValue(c,i),wordSpacing:A.scalingValue(p,i),textAlign:u,fontSize:A.scalingValue(x.fontSize,i),lineHeight:A.scalingValue(x.lineHeight,i),textTransform:y.textTransform??"none",textDecoration:y.textDecoration??"none",fontVariant:y.fontVariant??"normal",color:m,transitionDuration:H.duration?`${Math.round(parseInt(H.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:vt.captionTextInner,style:{"--link-hover-color":$.linkHoverColor,"--link-color":$.linkColor,position:"relative",top:A.scalingValue($.offset.y,i),left:A.scalingValue($.offset.x,i)},children:a.jsx(Ki,{content:R.imageCaption})})},G))})}),a.jsx(fl,{onMove:R=>{w(R.index)},ref:r,options:{arrows:!1,speed:H.duration?parseInt(H.duration):500,autoplay:k.autoPlay!==null,...k.autoPlay!==null&&{interval:parseInt(k.autoPlay)*1e3},direction:z==="horiz"||H.type==="fade in"?"ltr":"ttb",pagination:!1,drag:k.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:H.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((R,G)=>a.jsx(yl,{children:a.jsx("div",{className:vt.sliderItem,children:a.jsx("div",{className:vt.imgWrapper,children:a.jsx("img",{className:St(vt.sliderImage,{[vt.contain]:R.image.objectFit==="contain",[vt.cover]:R.image.objectFit==="cover"}),src:R.image.url,alt:R.image.name??""})})})},G))},D),L.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:St(vt.arrow,{[vt.arrowVertical]:z==="vert",[vt.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:a.jsxs("button",{onClick:()=>{E("-1")},className:vt.arrowInner,style:{transform:`translate(${A.scalingValue(W,i)}, ${A.scalingValue(g*(z==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${z==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&a.jsx(un,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:St(vt.arrowImg,vt.mirror)}),!L.arrowsImgUrl&&a.jsx(Ul,{color:L.color,className:St(vt.arrowIcon,vt.arrowImg,vt.mirror)})]})}),a.jsx("div",{className:St(vt.arrow,vt.nextArrow,{[vt.arrowVertical]:z==="vert",[vt.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:a.jsxs("button",{className:vt.arrowInner,onClick:()=>E("+1"),style:{transform:`translate(${A.scalingValue(W*(z==="horiz"?-1:1),i)}, ${A.scalingValue(g,i)}) scale(${e.controls.scale/100}) rotate(${z==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&a.jsx(un,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:vt.arrowImg}),!L.arrowsImgUrl&&a.jsx(Ul,{color:L.color,className:St(vt.arrowIcon,vt.arrowImg)})]})})]}),k.triggersList.click&&a.jsx("div",{className:vt.clickOverlay,onClick:()=>{o&&o.go("+1")}}),V.isActive&&a.jsx("div",{className:St(vt.pagination,{[vt.paginationInsideBottom]:V.position==="inside-1"&&z==="horiz",[vt.paginationInsideTop]:V.position==="inside-2"&&z==="horiz",[vt.paginationOutsideBottom]:V.position==="outside-1"&&z==="horiz",[vt.paginationOutsideTop]:V.position==="outside-2"&&z==="horiz",[vt.paginationInsideLeft]:V.position==="inside-1"&&z==="vert",[vt.paginationInsideRight]:V.position==="inside-2"&&z==="vert",[vt.paginationOutsideLeft]:V.position==="outside-1"&&z==="vert",[vt.paginationOutsideRight]:V.position==="outside-2"&&z==="vert",[vt.paginationVertical]:z==="vert"}),children:a.jsx("div",{className:vt.paginationInner,style:{backgroundColor:V.colors[2],transform:`scale(${V.scale/100}) translate(${A.scalingValue(V.offset.x,i)}, ${A.scalingValue(V.offset.y,i)}) rotate(${z==="horiz"?"0deg":"90deg"})`},children:t.map((R,G)=>a.jsx("button",{onClick:()=>{o&&o.go(G)},className:St(vt.paginationItem),children:a.jsx("div",{className:St(vt.dot,{[vt.activeDot]:G===S}),style:{backgroundColor:G===S?V.colors[0]:V.colors[1],"--pagination-hover-color":V.hover}})},G))})})]})})}function Ul({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Mg={element:Eg,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"]}},Ag="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Fg="ImageRevealSlider-module__image___Qjt-e",Ng="ImageRevealSlider-module__link___N-iLG",_g="ImageRevealSlider-module__cursor___2U03d",eo={imageRevealSlider:Ag,image:Fg,link:Ng,cursor:_g};function Yl(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,d=r/2,c=l/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function za(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Wg(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await za(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await za(e);r=l.height/l.width*o}else{const l=await za(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function Hg({settings:e,content:t,isEditor:n}){const[i,o]=s.useState(null),[r,l]=s.useState([]),[d,c]=s.useState(0),u=s.useRef(0),[p,x]=s.useState({x:0,y:0}),[y,m]=s.useState(1),[h,v]=s.useState("none"),b=s.useRef({x:0,y:0}),[C,S]=s.useState(!1),{sizeType:w,imageWidth:D,randomRangeImageWidth:_}=e.imageSize,{revealPosition:z,visible:H}=e.position,{cursorType:L,target:V,defaultCursorScale:$,defaultCursor:k,hoverCursorScale:F,hoverCursor:W}=e.cursor;s.useEffect(()=>{if(!i)return;const R=(T,j)=>{const K=i.getBoundingClientRect(),le=T-K.left,se=j-K.top;if(x({x:le,y:se}),L==="system"){v("none"),m(1);return}const M=le,re=se,q=document.elementFromPoint(K.left+M,K.top+re);if(q&&q.closest("a")){v("none"),m(1);return}const ce=Yl(M,re,r)||V==="area"?{img:W??"none",scale:F}:{img:k??"none",scale:$};v(ce.img),m(ce.scale)},G=T=>{T.stopPropagation(),b.current={x:T.clientX,y:T.clientY},R(T.clientX,T.clientY)},Z=()=>{C&&R(b.current.x,b.current.y)};return i.addEventListener("mousemove",G),window.addEventListener("scroll",Z,!0),()=>{i.removeEventListener("mousemove",G),window.removeEventListener("scroll",Z,!0)}},[i,C,p,L,V,W,k,F,$,r]),s.useEffect(()=>{C||(v("none"),m(0))},[C]);const g=async(R,G,Z,T={})=>{const{width:j,height:K,finalWidth:le}=await Wg(R.image.url,w,D,_);let se=0,M=0;z==="same"?(se=G/2,M=Z/2):(se=T.x??Math.random()*G,M=T.y??Math.random()*Z);const re=Math.min(Math.max(se,j/2),G-j/2),q=Math.min(Math.max(M,K/2),Z-K/2);return{id:u.current++,url:R.image.url,link:R.link,name:R.image.name,x:re,y:q,width:le}};s.useEffect(()=>{if(!i||t.length===0)return;const R=i.getBoundingClientRect(),G=R.width,Z=R.height,T=[];(async()=>{const K=t[0],le=await g(K,G,Z);T.push(le),l(T),c(1)})()},[w,D,_,z,i]),s.useEffect(()=>{H==="last One"&&l(R=>R.length>0?[R[R.length-1]]:[])},[H]);const E=async R=>{if(!i)return;const G=i.getBoundingClientRect(),Z=R.clientX-G.left,T=R.clientY-G.top;if(V==="image"&&!Yl(Z,T,r))return;let j=0,K=0;z==="on Click"?(j=Z,K=T):z==="same"?(j=G.width/2,K=G.height/2):(j=Math.random()*G.width,K=Math.random()*G.height);const le=t[d],se=await g(le,G.width,G.height,{x:j,y:K});l(M=>H==="all"?[...M,se]:[se]),c(M=>M>=t.length-1?0:M+1)};return a.jsxs("div",{ref:o,onClick:E,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),className:eo.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[r.map(R=>a.jsx("div",{className:eo.wrapper,style:{top:`${R.y}px`,left:`${R.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:R.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:V==="area"&&R.link?a.jsx("a",{href:R.link,target:"_blank",className:eo.link,children:a.jsx("img",{src:R.url,alt:R.name,className:eo.image},R.id)}):a.jsx("img",{src:R.url,alt:R.name,className:eo.image},R.id)},R.id)),C&&a.jsx("div",{className:eo.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${y})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Og={element:Hg,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:""}]}}}},Dg="LightBox-module__hidden___9s-9x",zg="LightBox-module__heroImage___sTxNF",Bg="LightBox-module__background___rm9ml",jg="LightBox-module__editor___4ACaY",Vg="LightBox-module__contentStyle___Bgnsq",Gg="LightBox-module__imageStyle___tLIlB",Xg="LightBox-module__imgWrapper___LuFUp",qg="LightBox-module__contain___8-yaS",Ug="LightBox-module__cover___hNvOG",Yg="LightBox-module__caption___b6L2I",Kg="LightBox-module__captionTextInner___rCGNH",Zg="LightBox-module__lightboxSplide___XFuWC",Jg="LightBox-module__arrow___iz38X",Qg="LightBox-module__arrowVertical___Zfz81",eh="LightBox-module__nextArrow___zkAQN",th="LightBox-module__arrowInner___p48sW",nh="LightBox-module__arrowIcon___3VaFf",ih="LightBox-module__arrowImg___pNV88",oh="LightBox-module__mirror___pjeXc",rh="LightBox-module__thumbsWrapper___GB-nU",ah="LightBox-module__thumbsContainerVertical___wttk5",sh="LightBox-module__thumbsContainer___osSma",lh="LightBox-module__thumbsAlignStart___MO6tY",ch="LightBox-module__thumbsAlignCenter___Q4sUx",dh="LightBox-module__thumbsAlignEnd___p4y9R",uh="LightBox-module__thumbItem___HvnF3",ph="LightBox-module__closeButton___g2khP",mh="LightBox-module__fadeIn___0m5GW",gh="LightBox-module__slideInLeft___gPYwC",hh="LightBox-module__slideInRight___S-pPp",fh="LightBox-module__slideInTop___DFdAj",yh="LightBox-module__slideInBottom___m27kZ",vh="LightBox-module__fadeOut___55qBR",xh="LightBox-module__slideOutLeft___NvU7P",bh="LightBox-module__slideOutRight___SK7eC",Sh="LightBox-module__slideOutTop___Vgg0z",wh="LightBox-module__slideOutBottom___nJ0Ef",$h="LightBox-module__scaleSlide___vZriG",at={hidden:Dg,heroImage:zg,background:Bg,editor:jg,contentStyle:Vg,imageStyle:Gg,imgWrapper:Xg,contain:qg,cover:Ug,caption:Yg,captionTextInner:Kg,lightboxSplide:Zg,arrow:Jg,arrowVertical:Qg,nextArrow:eh,arrowInner:th,arrowIcon:nh,arrowImg:ih,mirror:oh,thumbsWrapper:rh,thumbsContainerVertical:ah,thumbsContainer:sh,thumbsAlignStart:lh,thumbsAlignCenter:ch,thumbsAlignEnd:dh,thumbItem:uh,closeButton:ph,fadeIn:mh,slideInLeft:gh,slideInRight:hh,slideInTop:fh,slideInBottom:yh,fadeOut:vh,slideOutLeft:xh,slideOutRight:bh,slideOutTop:Sh,slideOutBottom:wh,scaleSlide:$h},Pr=(e,t,n)=>{const i={},[o,r]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),r==="left"?(i.left="0",i.right="auto"):r==="center"?(i.left="50%",i.right="auto"):r==="right"&&(i.left="auto",i.right="0"),o==="middle"&&r==="center"?i.transform=`translate(calc(-50% + ${A.scalingValue(t.x,n)}), calc(-50% + ${A.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${A.scalingValue(t.x,n)}, calc(-50% + ${A.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${A.scalingValue(t.x,n)}), ${A.scalingValue(t.y,n)})`:i.transform=`translate(${A.scalingValue(t.x,n)}, ${A.scalingValue(t.y,n)})`,i};function fu(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 Ch(e){const t=e.trim().split(/\s+/),n=i=>{if(i.endsWith("%"))return parseFloat(i)/100;switch(i){case"left":case"top":return 0;case"right":case"bottom":return 1;case"center":return .5;default:return .5}};if(t.length===1){const i=t[0];return i==="center"?{x:.5,y:.5}:i==="top"||i==="bottom"?{x:.5,y:n(i)}:i==="left"||i==="right"?{x:n(i),y:.5}:{x:n(i),y:.5}}return{x:n(t[0]),y:n(t[1])}}function yu(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const d=e;return{renderedW:d,renderedH:d/r}}const l=t;return{renderedW:l*r,renderedH:l}}function Th(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const d=t;return{renderedW:d*r,renderedH:d}}const l=e;return{renderedW:l,renderedH:l/r}}function vu(e,t,n,i,o){const{x:r,y:l}=Ch(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function Lh(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,r=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:d}=window.getComputedStyle(e),c=l==="cover"?Th:yu,{renderedW:u,renderedH:p}=c(n,i,o,r),{offsetX:x,offsetY:y}=vu(n,i,u,p,d),m=(x+u/2)/n*100,h=(y+p/2)/i*100;return`${m}% ${h}%`}function Ih(e){return Lh(e)}function da(e){const t=e.getBoundingClientRect(),n=fu(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),r=e.naturalWidth,l=e.naturalHeight,{renderedW:d,renderedH:c}=yu(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:x}=vu(i,o,d,c,u),y=t.left+n.left,m=t.top+n.top;return{x:p+y,y:x+m,width:d,height:c}}function Kl(e){const t=e.getBoundingClientRect(),n=fu(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Rh(e,t){const n=(()=>{if(e==="fade in")return at.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return at.slideInLeft;case"right":return at.slideInRight;case"top":return at.slideInTop;case"bottom":return at.slideInBottom;default:return at.slideInRight}return at.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return at.fadeIn;if(e==="slide in")switch(t){case"left":return at.slideInLeft;case"right":return at.slideInRight;case"top":return at.slideInTop;case"bottom":return at.slideInBottom;default:return at.slideInRight}return at.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return at.fadeOut;if(e==="slide in")switch(t){case"left":return at.slideOutLeft;case"right":return at.slideOutRight;case"top":return at.slideOutTop;case"bottom":return at.slideOutBottom;default:return at.slideOutRight}return at.fadeOut})(),r=(()=>{if(e==="fade in")return at.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return at.slideOutLeft;case"right":return at.slideOutRight;case"top":return at.slideOutTop;case"bottom":return at.slideOutBottom;default:return at.slideOutRight}return at.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const Ph=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[d,c]=s.useState(!1),{url:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className:at.heroImage,onClick:()=>c(!0)}),a.jsx(kh,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},kh=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:d})=>{var $e;const{widthSettings:c,fontSettings:u,letterSpacing:p,textAlign:x,wordSpacing:y,fontSizeLineHeight:m,textAppearance:h,color:v}=i.imageCaption??{},[b,C]=s.useState(0),[S,w]=s.useState(0),[D,_]=s.useState(!1),[z,H]=s.useState(!1),[L,V]=s.useState({}),$=s.useRef(null),k=s.useRef(null),F=s.useRef(null),W=s.useRef(!1),g=s.useRef(null),E=s.useRef(null),R=s.useRef(null),G=s.useRef(null),Z=s.useRef(!1),T=s.useRef(null),[j,K]=s.useState(!1),{appear:le,triggers:se,slider:M,thumbnail:re,controls:q,area:ce,caption:J,layout:be}=o.lightboxBlock,{appearClass:We,backdropAppearClass:ye,backdropDisappearClass:ue,disappearClass:ee}=Rh(le.type,le.direction),de=(d==null?void 0:d.itemId)??null;s.useEffect(()=>{const f=()=>{setTimeout(()=>{var N,U;(U=(N=$.current)==null?void 0:N.splide)==null||U.refresh()},16)},X=()=>{w(N=>N+1)};return window.addEventListener("ArticleEditor.Layout:change",f),window.addEventListener("ArticleEditor.ComponentContent:change",X),()=>{window.removeEventListener("ArticleEditor.Layout:change",f),window.removeEventListener("ArticleEditor.ComponentContent:change",X)}},[]),s.useEffect(()=>{if(!e||!re.isActive){K(!1);return}const f=T.current;if(!f)return;const X=()=>{M.direction==="horiz"?K(f.scrollWidth>f.clientWidth):K(f.scrollHeight>f.clientHeight)};X();const N=new ResizeObserver(X);return N.observe(f),()=>N.disconnect()},[e,re.isActive,n.length,L,M.direction]);const ne=s.useCallback(()=>{const f=window.matchMedia("(max-width: 768px)").matches,X=A.getColorAlpha(ce.color);f&&!l&&X>.9&&(document.body.style.backgroundColor=""),_(!0),W.current=!0;const N=U=>{U.target===g.current&&U.animationName&&(g.current&&E.current&&g.current.removeEventListener("animationend",E.current),E.current=null,W.current&&(W.current=!1,t()),_(!1))};g.current&&(E.current=N,g.current.addEventListener("animationend",N))},[t,ce.color,l]),Pe=(f,X,N)=>{var U,me;if(f){if(se.type==="click"&&se.switch==="image")se.repeat==="close"&&b===n.length-1?ne():(U=$.current)==null||U.go("+1");else if(se.type==="click"&&se.switch==="50/50"){const Y=f.getBoundingClientRect(),I=X-Y.left,ie=N-Y.top,oe=Y.width,B=Y.height;let te;M.direction==="horiz"?te=I<oe/2?"-1":"+1":te=ie<B/2?"-1":"+1",(me=$.current)==null||me.go(te)}}},Te=f=>{if(Z.current){Z.current=!1;return}const X=n[b],N=(X==null?void 0:X.image.objectFit)==="cover";let U,me;if("changedTouches"in f&&f.changedTouches.length>0)U=f.changedTouches[0].clientX,me=f.changedTouches[0].clientY;else if("clientX"in f)U=f.clientX,me=f.clientY;else return;let Y;if(N&&F.current){const I=Kl(F.current);Y=U>=I.left&&U<=I.right&&me>=I.top&&me<=I.bottom}else{const I=F.current?da(F.current):null;if(!I){f.target===f.currentTarget&&ne();return}Y=U>=I.x&&U<=I.x+I.width&&me>=I.y&&me<=I.y+I.height}Y?Pe(F.current,U,me):ne()},Oe=f=>{const X=f.target;(X.classList.contains(at.thumbsWrapper)||X.classList.contains(at.thumbsContainer))&&Te(f)};s.useEffect(()=>{if(!e)return;const f=X=>{var N,U;if(X.key==="Escape"){ne();return}if(X.key==="ArrowRight"){C(me=>(me+1)%Math.max(n.length,1)),(N=$.current)==null||N.go("+1");return}X.key==="ArrowLeft"&&(C(me=>(me-1+Math.max(n.length,1))%Math.max(n.length,1)),(U=$.current)==null||U.go("-1"))};return window.addEventListener("keydown",f),()=>{window.removeEventListener("keydown",f)}},[e,ne,n.length]),s.useEffect(()=>{if(e){if(C(0),w(X=>X+1),W.current=!1,_(!1),H(!1),V({}),!de)return;const f=new CustomEvent("page-overlay",{detail:{itemId:de}});window.dispatchEvent(f)}return()=>{g.current&&E.current&&(g.current.removeEventListener("animationend",E.current),E.current=null),H(!1)}},[e,de]),s.useEffect(()=>{k.current!==null&&k.current!==M.type&&w(f=>f+1),k.current=M.type},[M.type]),s.useEffect(()=>{if(!e)return;const f=document.body.style.overflow,X=window.matchMedia("(max-width: 768px)").matches,N=A.getColorAlpha(ce.color);document.body.style.overflow="hidden",H(!1);const U=Y=>{Y.target===g.current&&!W.current&&Y.animationName&&(X&&!l&&N>.9&&(document.body.style.backgroundColor=ce.color),H(!0),g.current&&R.current&&g.current.removeEventListener("animationend",R.current),R.current=null)};g.current&&(R.current=U,g.current.addEventListener("animationend",U));const me=Y=>{const I=Y.target;I&&(I.closest(`.${at.thumbsWrapper}`)||I.closest(`.${at.thumbsContainer}`))||M.type!=="slide"&&Y.preventDefault()};return document.addEventListener("touchmove",me,{passive:!1}),()=>{document.body.style.overflow=f,document.removeEventListener("touchmove",me),g.current&&R.current&&(g.current.removeEventListener("animationend",R.current),R.current=null),H(!1)}},[e,l,ce.color,M.type]),s.useEffect(()=>{if(!e)return;const f=X=>{var U,me;if(W.current){X.stopPropagation();return}if(Z.current){Z.current=!1;return}const N=X.target;if(!(N&&(N.closest(`.${at.thumbsContainer}`)||N.closest(`.${at.thumbItem}`)||N.closest(`.${at.arrow}`)||N.closest(`.${at.closeButton}`)||N.closest(`.${at.caption}`)))){if(M.type==="slide"&&se.type==="drag"&&((me=(U=$.current)==null?void 0:U.splide)!=null&&me.root)){const Y=$.current.splide.root;if(N&&(Y.contains(N)||Y===N))return}if(X.touches.length===0&&X.changedTouches.length>0){const Y=n[b],I=(Y==null?void 0:Y.image.objectFit)==="cover",ie=X.changedTouches[0];let oe;if(I&&F.current){const B=Kl(F.current);oe=ie.clientX>=B.left&&ie.clientX<=B.right&&ie.clientY>=B.top&&ie.clientY<=B.bottom}else{const B=F.current?da(F.current):null;if(!B)return;oe=ie.clientX>=B.x&&ie.clientX<=B.x+B.width&&ie.clientY>=B.y&&ie.clientY<=B.y+B.height}if(!oe){X.stopPropagation(),W.current=!0;const B=te=>{te.stopPropagation(),te.preventDefault(),document.removeEventListener("click",B,!0)};document.addEventListener("click",B,!0),ne()}}}};return document.addEventListener("touchend",f,{passive:!0}),()=>{document.removeEventListener("touchend",f)}},[e,ne,b,n]);const ve=(M.type==="scale"||M.type==="fade")&&M.direction==="vert"&&se.type==="drag";s.useEffect(()=>{var te,Ae;if(!e||!ve||!((Ae=(te=$.current)==null?void 0:te.splide)!=null&&Ae.root))return;const f=$.current.splide.root,X=30,N=(he,Q)=>{if(G.current){const Ze=Math.abs(he-G.current.x),Fe=Math.abs(Q-G.current.y);(Ze>0||Fe>0)&&(Z.current=!0)}},U=he=>{G.current&&(he.preventDefault(),N(he.clientX,he.clientY))},me=he=>{G.current&&he.touches.length>0&&(he.preventDefault(),N(he.touches[0].clientX,he.touches[0].clientY))},Y=(he,Q)=>{if(!G.current||!$.current){G.current=null;return}const Ze=Math.abs(he-G.current.x),Fe=Math.abs(Q-G.current.y);Fe>X&&Fe>Ze&&$.current.go(Q<G.current.y?"+1":"-1"),G.current=null},I=he=>{G.current&&Y(he.clientX,he.clientY),document.removeEventListener("pointerup",I),document.removeEventListener("pointercancel",I),document.removeEventListener("pointermove",U)},ie=he=>{if(G.current){if(he.changedTouches.length>0){const Q=he.changedTouches[0];Y(Q.clientX,Q.clientY)}document.removeEventListener("touchend",ie),document.removeEventListener("touchcancel",ie),document.removeEventListener("touchmove",me)}},oe=he=>{G.current={x:he.clientX,y:he.clientY},Z.current=!1,document.addEventListener("pointermove",U,{passive:!1}),document.addEventListener("pointerup",I),document.addEventListener("pointercancel",I)},B=he=>{he.touches.length>0&&(G.current={x:he.touches[0].clientX,y:he.touches[0].clientY},Z.current=!1,document.addEventListener("touchmove",me,{passive:!1}),document.addEventListener("touchend",ie),document.addEventListener("touchcancel",ie))};return f.addEventListener("pointerdown",oe),f.addEventListener("touchstart",B),()=>{f.removeEventListener("pointerdown",oe),f.removeEventListener("touchstart",B),document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",I),document.removeEventListener("pointercancel",I),document.removeEventListener("touchmove",me),document.removeEventListener("touchend",ie),document.removeEventListener("touchcancel",ie),G.current=null,Z.current=!1}},[e,ve,S]);const Se={backgroundColor:ce.color,backdropFilter:`blur(${ce.blur}px)`,animationDuration:`${parseInt(le.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:ri.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:g,className:St(at.background,D?ue:ye,{[at.editor]:l},{[at.hidden]:!e}),style:{...Se,...z&&!l&&!D?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?g:null,className:St(at.contentStyle,D?ee:We,{[at.editor]:l},{[at.hidden]:!e}),style:{animationDuration:`${parseInt(le.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(fl,{onMove:f=>C(f.index),ref:$,className:at.lightboxSplide,options:{arrows:!1,speed:M.duration?parseInt(M.duration):500,direction:M.direction==="horiz"||M.type==="fade"||M.type==="scale"?"ltr":"ttb",pagination:!1,drag:se.type==="drag"&&!ve,perPage:1,width:"100%",height:"100%",type:M.type==="fade"||M.type==="scale"?"fade":"loop",padding:0,rewind:se.repeat!=="close",start:0},style:{"--splide-speed":M.duration},children:n.map((f,X)=>{const N=Pr(be.position,be.offset,l),U=`${A.scalingValue(be.padding.top,l)} ${A.scalingValue(be.padding.right,l)} ${A.scalingValue(be.padding.bottom,l)} ${A.scalingValue(be.padding.left,l)}`,me=M.type==="scale"?(()=>{const{transform:Y,...I}=N;return{...I,position:"absolute",padding:U,boxSizing:"border-box","--position-transform":Y||"none"}})():{...N,position:"absolute",padding:U,boxSizing:"border-box"};return a.jsx(yl,{children:a.jsx("div",{className:at.imgWrapper,onClick:Te,children:a.jsx("img",{ref:X===b?F:null,className:St(at.imageStyle,{[at.contain]:f.image.objectFit==="contain",[at.cover]:f.image.objectFit==="cover",[at.scaleSlide]:M.type==="scale"}),src:f.image.url,alt:f.image.name??"",style:{...me,pointerEvents:f.image.objectFit==="contain"?"none":"auto"}})})},X)})},S),q.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:St(at.arrow,{[at.arrowVertical]:M.direction==="vert"}),style:{color:q.color,"--arrow-hover-color":q.hover},children:a.jsxs("button",{className:at.arrowInner,style:{transform:`translate(${A.scalingValue(q.offset.x,l)}, ${A.scalingValue(q.offset.y*(M.direction==="horiz"?1:-1),l)}) scale(${q.scale}) rotate(${M.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var f;return(f=$.current)==null?void 0:f.go("-1")},"aria-label":"Previous",children:[q.arrowsImgUrl&&a.jsx(un,{url:q.arrowsImgUrl,fill:q.color,hoverFill:q.hover,className:St(at.arrowImg,at.mirror)}),!q.arrowsImgUrl&&a.jsx(Zl,{color:q.color,className:St(at.arrowIcon,at.arrowImg,at.mirror)})]})}),a.jsx("div",{className:St(at.arrow,at.nextArrow,{[at.arrowVertical]:M.direction==="vert"}),style:{color:q.color,"--arrow-hover-color":q.hover},children:a.jsxs("button",{className:at.arrowInner,style:{transform:`translate(${A.scalingValue(q.offset.x*(M.direction==="horiz"?-1:1),l)}, ${A.scalingValue(q.offset.y,l)}) scale(${q.scale}) rotate(${M.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var f;return(f=$.current)==null?void 0:f.go("+1")},"aria-label":"Next",children:[q.arrowsImgUrl&&a.jsx(un,{url:q.arrowsImgUrl,fill:q.color,hoverFill:q.hover,className:at.arrowImg}),!q.arrowsImgUrl&&a.jsx(Zl,{color:q.color,className:St(at.arrowIcon,at.arrowImg)})]})})]}),ce.closeIconUrl&&(()=>{const f=Pr(ce.closeIconAlign,ce.closeIconOffset,l),X=`scale(${ce.closeIconScale})`,N=f.transform?`${f.transform} ${X}`:X;return a.jsx("button",{className:at.closeButton,style:{...f,transform:N},onClick:ne,"aria-label":"Close lightbox",children:a.jsx(un,{url:ce.closeIconUrl,fill:ce.closeIconColor??"#000000",hoverFill:ce.closeIconHover??"#cccccc"})})})(),J&&J.isActive&&i.imageCaption&&(($e=n[b])==null?void 0:$e.imageCaption)&&a.jsx("div",{className:at.caption,style:{...Pr(J.alignment,J.offset,l),fontFamily:Oo(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":A.scalingValue(c.width,l),letterSpacing:A.scalingValue(p,l),wordSpacing:A.scalingValue(y,l),textAlign:x,fontSize:A.scalingValue(m.fontSize,l),lineHeight:A.scalingValue(m.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:v},onClick:f=>f.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:at.captionTextInner,style:{"--link-color":J.linkColor,"--link-hover-color":J.linkHoverColor},children:a.jsx(Ki,{content:n[b].imageCaption})})}),re.isActive&&(()=>{const[f,X]=re.position.split("-"),N=M.direction==="horiz"?`${f}-left`:re.position,U=Pr(N,re.offset,l),me=()=>{if(M.direction==="horiz"){if(X==="left")return"flex-start";if(X==="center")return"center";if(X==="right")return"flex-end"}else{if(f==="top")return"flex-start";if(f==="middle")return"center";if(f==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:T,className:at.thumbsWrapper,onClick:Y=>Oe(Y),style:{position:l?"absolute":"fixed",...U,...M.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:St(at.thumbsContainer,{[at.thumbsContainerVertical]:M.direction==="vert",[at.thumbsAlignStart]:re.align==="start",[at.thumbsAlignCenter]:re.align==="center",[at.thumbsAlignEnd]:re.align==="end"}),style:{gap:A.scalingValue(re.grid.gap,l),justifyContent:j?"flex-start":me()},children:n.map((Y,I)=>{const ie=I===b,oe=L[I],te=re.grid.size*(ie?re.activeState.scale:1),Ae=()=>{if(re.fit!=="fit")return{};if(!oe)return M.direction==="horiz"?{height:A.scalingValue(te,l)}:{width:A.scalingValue(te,l)};const he=oe.width/oe.height;if(M.direction==="horiz"){const Q=te,Ze=Q*he;return{width:A.scalingValue(Ze,l),height:A.scalingValue(Q,l)}}else{const Q=te,Ze=Q/he;return{width:A.scalingValue(Q,l),height:A.scalingValue(Ze,l)}}};return a.jsx("button",{className:at.thumbItem,style:{...M.direction==="horiz"&&re.fit!=="fit"?{height:A.scalingValue(te,l)}:{},...M.direction==="vert"&&re.fit!=="fit"?{width:A.scalingValue(te,l)}:{},...re.fit==="cover"?{width:A.scalingValue(te,l),height:A.scalingValue(te,l)}:{},...Ae(),transition:ie?"all 0.25s ease-out":"none",opacity:ie?re.activeState.opacity/100:re.opacity/100,"--thumb-hover":re.activeState.opacity/100},onClick:he=>{var Q;he.stopPropagation(),C(I),(Q=$.current)==null||Q.go(I)},onMouseEnter:()=>{var he;re.triggers==="hov"&&((he=$.current)==null||he.go(I))},children:a.jsx("img",{src:Y.image.url,alt:Y.image.name??"",onLoad:he=>{const Q=he.currentTarget;Q.naturalWidth&&Q.naturalHeight&&V(Ze=>({...Ze,[I]:{width:Q.naturalWidth,height:Q.naturalHeight}}))},style:{objectFit:re.fit==="cover"?"cover":"contain",...re.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...re.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Y.image.name}-${I}`)})})})})()]})]}),document.getElementById(r))};function Zl({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Eh={element:Ph,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 kr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Mh(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${Er(48)};
11
+ min-height: ${kr(48)};
12
12
  }
13
13
  .${e}-wrapper.${e}-type-C .${e}-input:focus-visible,
14
14
  .${e}-wrapper.${e}-type-C .${e}-button:focus-visible {
@@ -32,7 +32,7 @@
32
32
  min-width: 0;
33
33
  }
34
34
  .${e}-field-group.${e}-labeled {
35
- gap: ${Er(4)};
35
+ gap: ${kr(4)};
36
36
  }
37
37
  .${e}-field-label {
38
38
  white-space: nowrap;
@@ -128,11 +128,11 @@
128
128
  outline: none;
129
129
  }
130
130
  .${e}-success {
131
- margin-top: ${Er(8)};
131
+ margin-top: ${kr(8)};
132
132
  color: var(--${e}-success-success-color, var(--${e}-success-color));
133
133
  }
134
134
  .${e}-error {
135
- margin-top: ${Er(8)};
135
+ margin-top: ${kr(8)};
136
136
  color: var(--${e}-error-error-color, var(--${e}-error-color));
137
137
  }
138
138
  .${e}-overlay-anchor {
@@ -155,7 +155,7 @@
155
155
  pointer-events: auto;
156
156
  z-index: 10;
157
157
  }
158
- `}function Ph({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,d=i&&t||!t,{prefix:c}=A.useScopedStyles(),{type:u="A",fieldsToShow:p=2,fields:x=[],buttonLabel:v,gap:m,fieldsGap:h,buttonCorners:y,buttonStroke:b,buttonPadding:C,isButtonFullWidth:S,inputCorners:w,inputStroke:D,inputPadding:_,inputColor:z,inputTextColor:H,inputBorderColor:L,placeholderColor:V,buttonColor:$,buttonTextColor:E,buttonBorderColor:F,labelTextColor:W,successColor:g,errorColor:M,fontFamily:R,inputFontSettings:G,inputFontSize:Z,inputLineHeight:T,inputLetterSpacing:j,inputWordSpacing:Y,inputTextAppearance:le,buttonFontSettings:se,buttonFontSize:k,buttonLineHeight:re,buttonLetterSpacing:q,buttonWordSpacing:ce,buttonTextAppearance:J,labelFontSettings:be,labelFontSize:We,labelLineHeight:ye,labelLetterSpacing:ue,labelWordSpacing:ee,labelTextAppearance:de,statusFontSettings:ne,statusFontSize:Pe,statusLineHeight:Te,statusLetterSpacing:Oe,statusWordSpacing:ve,statusTextAppearance:Se,successMessage:$e,errorMessage:f,stateOverrides:X}=e,N=u==="B",U=x.slice(0,Math.min(p,x.length)),me={fontSettings:{fontFamily:R,fontWeight:(G==null?void 0:G.fontWeight)??400,fontStyle:(G==null?void 0:G.fontStyle)??"normal"},fontSize:Z??.01,lineHeight:T,letterSpacing:j??0,wordSpacing:Y??0,textAppearance:le,color:H},K=dn(Qt(me,t)),I=A.scalingValue(D??0,t),ie=A.scalingValue((T??Z??.01)+((_==null?void 0:_.top)??0)+((_==null?void 0:_.bottom)??0)+(u==="C"?D??0:(D??0)*2),t),oe={...K,borderStyle:"solid",borderRadius:u==="C"?0:A.scalingValue(w??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:I,borderLeftWidth:0}:{borderWidth:I},paddingTop:A.scalingValue((_==null?void 0:_.top)??0,t),paddingRight:A.scalingValue((_==null?void 0:_.right)??0,t),paddingBottom:A.scalingValue((_==null?void 0:_.bottom)??0,t),paddingLeft:A.scalingValue((_==null?void 0:_.left)??0,t),height:ie,minHeight:ie},B={fontSettings:{fontFamily:R,fontWeight:(se==null?void 0:se.fontWeight)??400,fontStyle:(se==null?void 0:se.fontStyle)??"normal"},fontSize:k??.01,lineHeight:re,letterSpacing:q??0,wordSpacing:ce??0,textAppearance:J,color:E},te=dn(Qt(B,t)),Ae=A.scalingValue(b??0,t),he={fontSettings:{fontFamily:R,fontWeight:(be==null?void 0:be.fontWeight)??400,fontStyle:(be==null?void 0:be.fontStyle)??"normal"},fontSize:We??.01,lineHeight:ye,letterSpacing:ue??0,wordSpacing:ee??0,textAppearance:de,color:W},Q=Qt(he,t),Ze={fontSettings:{fontFamily:R,fontWeight:(ne==null?void 0:ne.fontWeight)??400,fontStyle:(ne==null?void 0:ne.fontStyle)??"normal"},fontSize:Pe??.01,lineHeight:Te,letterSpacing:Oe??0,wordSpacing:ve??0,textAppearance:Se,color:g},Fe=dn(Qt(Ze,t)),et=A.buildColorVars(c,{inputColor:z,inputTextColor:H,inputBorderColor:L,placeholderColor:V!=null&&V.trim()?V:"#cccccc",buttonColor:$,buttonTextColor:E,buttonBorderColor:F,labelTextColor:W,successColor:g,errorColor:M},Eh,Mh,X),[Ue,nt]=s.useState(()=>Object.fromEntries(U.map(Ie=>[Ie.name,""]))),[tt,Ve]=s.useState("idle"),[fe,He]=s.useState(null),Be=r==="success"?"success":r==="error"?"error":tt,Je=r==="error"?f:fe,Ce=r==="filled",De=s.useMemo(()=>{if(!Ce)return Ue;let Ie=null;for(const Ke of U)(Ue[Ke.name]??"").trim().length>0||(Ie=Ie??{...Ue},Ie[Ke.name]="Filled");return Ie??Ue},[Ue,Ce,U]),Xe=Be==="error"?A.getFormFieldValidationError(U,De):null,Me=`${r&&r!=="default"?`${c}-state-${r}`:""}`.trim(),ze=o==null?void 0:o.submitUrl,Re=(Ie,Ke)=>{nt(Ne=>({...Ne,[Ie]:Ke}))},xe=async Ie=>{if(Ie.preventDefault(),!d)return;const Ke=Object.fromEntries(U.map(it=>{var ot;return[it.name,((ot=Ue[it.name])==null?void 0:ot.trim())??""]}).filter(([,it])=>it));if(!ze){Ve("error"),He("No integrations were found for this form.");return}if(Object.keys(Ke).length===0)return;const Ne=A.getFormFieldValidationError(U,Ue);if(Ne){Ve("error"),He(Ne);return}Ve("submitting"),He(null);try{const it=await fetch(ze,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ke)});if(!it.ok){const ot=await it.text();throw new Error(ot||`Request failed: ${it.status}`)}Ve("success"),nt(Object.fromEntries(U.map(ot=>[ot.name,""])))}catch(it){Ve("error"),He(it instanceof Error?it.message:"Something went wrong")}};return a.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${Me}`.trim(),style:et,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Rh(c)}}),a.jsxs("form",{onSubmit:xe,className:`${c}-form`,children:[a.jsx("div",{className:`${c}-fields`,children:U.map((Ie,Ke)=>a.jsxs(s.Fragment,{children:[Ke>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${c}-control`:void 0,style:{height:A.scalingValue(h??0,t)}}),a.jsxs("div",{className:`${c}-field-group${N?` ${c}-labeled`:""}`,children:[N&&a.jsx("span",{className:`${c}-field-label`,style:Q?{...Q,lineHeight:Q.fontSize}:void 0,children:Ie.label||Ie.name}),Ie.type==="textarea"?a.jsx("textarea",{name:Ie.name,autoComplete:"off",value:De[Ie.name]??"",onChange:Ne=>Re(Ie.name,Ne.target.value),placeholder:Ie.placeholder,className:`${c}-input`,style:oe,rows:1,"data-filled":Ce||(De[Ie.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Ie.type==="phone"?"tel":Ie.type==="email"?"email":"text",name:Ie.name,autoComplete:"off",value:De[Ie.name]??"",onChange:Ne=>Re(Ie.name,Ne.target.value),placeholder:Ie.placeholder,required:Ie.isRequired??Ie.type==="email",className:`${c}-input`,style:oe,"data-filled":Ce||(De[Ie.name]??"").trim().length>0})]})]},Ke))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${c}-control`:void 0,style:{height:A.scalingValue(m??0,t)}}),a.jsx("div",{className:`${c}-overlay-anchor`,children:a.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:A.scalingValue(y??0,t),borderWidth:Ae,paddingTop:A.scalingValue((C==null?void 0:C.top)??0,t),paddingRight:A.scalingValue((C==null?void 0:C.right)??0,t),paddingBottom:A.scalingValue((C==null?void 0:C.bottom)??0,t),paddingLeft:A.scalingValue((C==null?void 0:C.left)??0,t),pointerEvents:d?"auto":void 0,...te,...S?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${c}-overlay-anchor`,style:S?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:tt==="submitting"?"...":v})})})]}),Be==="success"&&a.jsx("p",{className:`${c}-success`,style:{...Fe},children:$e}),Be==="error"&&a.jsx("p",{className:`${c}-error`,style:{...Fe},role:"alert",children:Xe??Je??f})]})}const Eh={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"},Mh=["hover","focus","filled","success","error"],kh=`import React, { useMemo, useState } from 'react';
158
+ `}function Ah({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,d=i&&t||!t,{prefix:c}=A.useScopedStyles(),{type:u="A",fieldsToShow:p=2,fields:x=[],buttonLabel:y,gap:m,fieldsGap:h,buttonCorners:v,buttonStroke:b,buttonPadding:C,isButtonFullWidth:S,inputCorners:w,inputStroke:D,inputPadding:_,inputColor:z,inputTextColor:H,inputBorderColor:L,placeholderColor:V,buttonColor:$,buttonTextColor:k,buttonBorderColor:F,labelTextColor:W,successColor:g,errorColor:E,fontFamily:R,inputFontSettings:G,inputFontSize:Z,inputLineHeight:T,inputLetterSpacing:j,inputWordSpacing:K,inputTextAppearance:le,buttonFontSettings:se,buttonFontSize:M,buttonLineHeight:re,buttonLetterSpacing:q,buttonWordSpacing:ce,buttonTextAppearance:J,labelFontSettings:be,labelFontSize:We,labelLineHeight:ye,labelLetterSpacing:ue,labelWordSpacing:ee,labelTextAppearance:de,statusFontSettings:ne,statusFontSize:Pe,statusLineHeight:Te,statusLetterSpacing:Oe,statusWordSpacing:ve,statusTextAppearance:Se,successMessage:$e,errorMessage:f,stateOverrides:X}=e,N=u==="B",U=x.slice(0,Math.min(p,x.length)),me={fontSettings:{fontFamily:R,fontWeight:(G==null?void 0:G.fontWeight)??400,fontStyle:(G==null?void 0:G.fontStyle)??"normal"},fontSize:Z??.01,lineHeight:T,letterSpacing:j??0,wordSpacing:K??0,textAppearance:le,color:H},Y=dn(Qt(me,t)),I=A.scalingValue(D??0,t),ie=A.scalingValue((T??Z??.01)+((_==null?void 0:_.top)??0)+((_==null?void 0:_.bottom)??0)+(u==="C"?D??0:(D??0)*2),t),oe={...Y,borderStyle:"solid",borderRadius:u==="C"?0:A.scalingValue(w??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:I,borderLeftWidth:0}:{borderWidth:I},paddingTop:A.scalingValue((_==null?void 0:_.top)??0,t),paddingRight:A.scalingValue((_==null?void 0:_.right)??0,t),paddingBottom:A.scalingValue((_==null?void 0:_.bottom)??0,t),paddingLeft:A.scalingValue((_==null?void 0:_.left)??0,t),height:ie,minHeight:ie},B={fontSettings:{fontFamily:R,fontWeight:(se==null?void 0:se.fontWeight)??400,fontStyle:(se==null?void 0:se.fontStyle)??"normal"},fontSize:M??.01,lineHeight:re,letterSpacing:q??0,wordSpacing:ce??0,textAppearance:J,color:k},te=dn(Qt(B,t)),Ae=A.scalingValue(b??0,t),he={fontSettings:{fontFamily:R,fontWeight:(be==null?void 0:be.fontWeight)??400,fontStyle:(be==null?void 0:be.fontStyle)??"normal"},fontSize:We??.01,lineHeight:ye,letterSpacing:ue??0,wordSpacing:ee??0,textAppearance:de,color:W},Q=Qt(he,t),Ze={fontSettings:{fontFamily:R,fontWeight:(ne==null?void 0:ne.fontWeight)??400,fontStyle:(ne==null?void 0:ne.fontStyle)??"normal"},fontSize:Pe??.01,lineHeight:Te,letterSpacing:Oe??0,wordSpacing:ve??0,textAppearance:Se,color:g},Fe=dn(Qt(Ze,t)),et=A.buildColorVars(c,{inputColor:z,inputTextColor:H,inputBorderColor:L,placeholderColor:V!=null&&V.trim()?V:"#cccccc",buttonColor:$,buttonTextColor:k,buttonBorderColor:F,labelTextColor:W,successColor:g,errorColor:E},Fh,Nh,X),[Ue,nt]=s.useState(()=>Object.fromEntries(U.map(Ie=>[Ie.name,""]))),[tt,Ve]=s.useState("idle"),[fe,He]=s.useState(null),Be=r==="success"?"success":r==="error"?"error":tt,Je=r==="error"?f:fe,Ce=r==="filled",De=s.useMemo(()=>{if(!Ce)return Ue;let Ie=null;for(const Ye of U)(Ue[Ye.name]??"").trim().length>0||(Ie=Ie??{...Ue},Ie[Ye.name]="Filled");return Ie??Ue},[Ue,Ce,U]),Xe=Be==="error"?A.getFormFieldValidationError(U,De):null,Ee=`${r&&r!=="default"?`${c}-state-${r}`:""}`.trim(),ze=o==null?void 0:o.submitUrl,Re=(Ie,Ye)=>{nt(Ne=>({...Ne,[Ie]:Ye}))},xe=async Ie=>{if(Ie.preventDefault(),!d)return;const Ye=Object.fromEntries(U.map(it=>{var ot;return[it.name,((ot=Ue[it.name])==null?void 0:ot.trim())??""]}).filter(([,it])=>it));if(!ze){Ve("error"),He("No integrations were found for this form.");return}if(Object.keys(Ye).length===0)return;const Ne=A.getFormFieldValidationError(U,Ue);if(Ne){Ve("error"),He(Ne);return}Ve("submitting"),He(null);try{const it=await fetch(ze,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ye)});if(!it.ok){const ot=await it.text();throw new Error(ot||`Request failed: ${it.status}`)}Ve("success"),nt(Object.fromEntries(U.map(ot=>[ot.name,""])))}catch(it){Ve("error"),He(it instanceof Error?it.message:"Something went wrong")}};return a.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${Ee}`.trim(),style:et,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Mh(c)}}),a.jsxs("form",{onSubmit:xe,className:`${c}-form`,children:[a.jsx("div",{className:`${c}-fields`,children:U.map((Ie,Ye)=>a.jsxs(s.Fragment,{children:[Ye>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${c}-control`:void 0,style:{height:A.scalingValue(h??0,t)}}),a.jsxs("div",{className:`${c}-field-group${N?` ${c}-labeled`:""}`,children:[N&&a.jsx("span",{className:`${c}-field-label`,style:Q?{...Q,lineHeight:Q.fontSize}:void 0,children:Ie.label||Ie.name}),Ie.type==="textarea"?a.jsx("textarea",{name:Ie.name,autoComplete:"off",value:De[Ie.name]??"",onChange:Ne=>Re(Ie.name,Ne.target.value),placeholder:Ie.placeholder,className:`${c}-input`,style:oe,rows:1,"data-filled":Ce||(De[Ie.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Ie.type==="phone"?"tel":Ie.type==="email"?"email":"text",name:Ie.name,autoComplete:"off",value:De[Ie.name]??"",onChange:Ne=>Re(Ie.name,Ne.target.value),placeholder:Ie.placeholder,required:Ie.isRequired??Ie.type==="email",className:`${c}-input`,style:oe,"data-filled":Ce||(De[Ie.name]??"").trim().length>0})]})]},Ye))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${c}-control`:void 0,style:{height:A.scalingValue(m??0,t)}}),a.jsx("div",{className:`${c}-overlay-anchor`,children:a.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:A.scalingValue(v??0,t),borderWidth:Ae,paddingTop:A.scalingValue((C==null?void 0:C.top)??0,t),paddingRight:A.scalingValue((C==null?void 0:C.right)??0,t),paddingBottom:A.scalingValue((C==null?void 0:C.bottom)??0,t),paddingLeft:A.scalingValue((C==null?void 0:C.left)??0,t),pointerEvents:d?"auto":void 0,...te,...S?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${c}-overlay-anchor`,style:S?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:tt==="submitting"?"...":y})})})]}),Be==="success"&&a.jsx("p",{className:`${c}-success`,style:{...Fe},children:$e}),Be==="error"&&a.jsx("p",{className:`${c}-error`,style:{...Fe},role:"alert",children:Xe??Je??f})]})}const Fh={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"},Nh=["hover","focus","filled","success","error"],_h=`import React, { useMemo, useState } from 'react';
159
159
  import { CommonComponentProps } from '../props';
160
160
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
161
161
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -789,7 +789,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
789
789
  };
790
790
 
791
791
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
792
- `,Ah=[{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"}],Mr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Fh=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Nh={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:{...Mr.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:{...Mr.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:{...Mr.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:{...Mr.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:Ah,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#A7A7A7",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!0,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0426,buttonLineHeight:.0426,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},t:{gap:.02604,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.039,buttonPadding:{top:.0195,right:.02604,bottom:.0195,left:.0195},inputPadding:{top:.0195,right:.0195,bottom:.0195,left:.0195},inputFontSize:.02083,inputLineHeight:.02604,buttonFontSize:.02083,buttonLineHeight:.02604,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Fh],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"]},_h={element:Ph,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300},t:{width:300},m:{width:340}},schema:Nh,sourceCode:kh,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function kr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Wh(e){return`
792
+ `,Wh=[{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"}],Er={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Hh=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Oh={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:{...Er.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:{...Er.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:{...Er.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:{...Er.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:Wh,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#A7A7A7",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!0,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0426,buttonLineHeight:.0426,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},t:{gap:.02604,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.039,buttonPadding:{top:.0195,right:.02604,bottom:.0195,left:.0195},inputPadding:{top:.0195,right:.0195,bottom:.0195,left:.0195},inputFontSize:.02083,inputLineHeight:.02604,buttonFontSize:.02083,buttonLineHeight:.02604,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Hh],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"]},Dh={element:Ah,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300},t:{width:300},m:{width:340}},schema:Oh,sourceCode:_h,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function Mr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function zh(e){return`
793
793
  .${e}-wrapper {
794
794
  display: flex;
795
795
  flex-direction: column;
@@ -973,16 +973,16 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
973
973
  align-items: center;
974
974
  }
975
975
  .${e}-success {
976
- margin-top: ${kr(8)};
977
- font-size: ${kr(14)};
976
+ margin-top: ${Mr(8)};
977
+ font-size: ${Mr(14)};
978
978
  color: var(--${e}-success-success-color, var(--${e}-success-color));
979
979
  }
980
980
  .${e}-error {
981
- margin-top: ${kr(8)};
982
- font-size: ${kr(14)};
981
+ margin-top: ${Mr(8)};
982
+ font-size: ${Mr(14)};
983
983
  color: var(--${e}-error-error-color, var(--${e}-error-color));
984
984
  }
985
- `}const Hh=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=A.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:p=1,fontFamily:x,inputFontSettings:v,inputFontSize:m,inputLineHeight:h,inputLetterSpacing:y,inputWordSpacing:b,inputTextAppearance:C,buttonFontSettings:S,buttonFontSize:w,buttonLineHeight:D,buttonLetterSpacing:_,buttonWordSpacing:z,buttonTextAppearance:H,statusFontSettings:L,statusFontSize:V,statusLineHeight:$,statusLetterSpacing:E,statusWordSpacing:F,statusTextAppearance:W,iconMaxWidth:g,minHeight:M,corners:R,stroke:G,stateOverrides:Z,inputPadding:T,buttonPadding:j,successMessage:Y="Thanks for subscribing!",errorMessage:le="Please, fill all required fields."}=e,se=d.slice(0,Math.min(p,d.length)),[k,re]=s.useState(()=>Object.fromEntries(se.map(he=>[he.name,""]))),[q,ce]=s.useState("idle"),[J,be]=s.useState(null),We=o==="success"?"success":o==="error"?"error":q,ye=o==="error"?le:J,ue=o==="filled",ee=s.useMemo(()=>{if(!ue)return k;let he=null;for(const Q of se)(k[Q.name]??"").trim().length>0||(he=he??{...k},he[Q.name]="Filled");return he??k},[ue,k,se]),de=We==="error"?A.getFormFieldValidationError(se,ee):null,ne=o&&o!=="default"?`${r}-state-${o}`:"",Pe=se.some(he=>(ee[he.name]??"").trim().length>0),Te=ne!==`${r}-state-filled`&&Pe?`${r}-state-filled`:"",Oe=`${ne} ${Te}`.trim(),ve=i==null?void 0:i.submitUrl,Se=u??"",$e=(c==null?void 0:c.icon)??"",f=(c==null?void 0:c.mode)==="On",X=Se||"Submit",N={fontSettings:{fontFamily:x,fontWeight:(v==null?void 0:v.fontWeight)??400,fontStyle:(v==null?void 0:v.fontStyle)??"normal"},fontSize:m??.01,lineHeight:h,letterSpacing:y??0,wordSpacing:b??0,textAppearance:C,color:e.inputTextColor??"#111111"},U={fontSettings:{fontFamily:x,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:w??.01,lineHeight:D,letterSpacing:_??0,wordSpacing:z??0,textAppearance:H,color:e.buttonTextColor??"#ffffff"},me={fontSettings:{fontFamily:x,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:V??.01,lineHeight:$,letterSpacing:E??0,wordSpacing:F??0,textAppearance:W,color:e.successColor??"#22c55e"},K=dn(Qt(N,t)),I=dn(Qt(U,t)),ie=dn(Qt(me,t)),oe=A.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(N==null?void 0:N.color)??"#111111",buttonTextColor:e.buttonTextColor??(U==null?void 0:U.color)??"#ffffff"},Oh,Dh,Z),B={borderRadius:A.scalingValue(R,t),borderWidth:A.scalingValue(G,t),borderStyle:"solid"},te={borderLeftWidth:A.scalingValue(G,t)},Ae=async he=>{if(he.preventDefault(),!l)return;const Q=Object.fromEntries(se.map(Fe=>{var et;return[Fe.name,((et=k[Fe.name])==null?void 0:et.trim())??""]}).filter(([,Fe])=>Fe));if(!ve){ce("error"),be("No integrations were found for this form.");return}if(Object.keys(Q).length===0)return;const Ze=A.getFormFieldValidationError(se,k);if(Ze){ce("error"),be(Ze);return}ce("submitting"),be(null);try{const Fe=await fetch(ve,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Q)});if(!Fe.ok){const et=await Fe.text();throw new Error(et||`Request failed: ${Fe.status}`)}ce("success"),re(Object.fromEntries(se.map(et=>[et.name,""])))}catch(Fe){ce("error"),be(Fe instanceof Error?Fe.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Oe}`.trim(),style:oe,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Wh(r)}}),a.jsxs("form",{onSubmit:Ae,className:`${r}-form`,style:{...B,height:A.scalingValue(M,t),minHeight:A.scalingValue(M,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:se.map(he=>a.jsx("input",{type:he.type==="email"?"email":he.type==="phone"?"tel":"text",name:he.name,autoComplete:"off",value:ee[he.name]??"",onChange:Q=>re(Ze=>({...Ze,[he.name]:Q.target.value})),placeholder:he.placeholder,required:he.isRequired??he.type==="email",className:`${r}-input`,style:{...K,paddingRight:A.scalingValue(T.right,t),paddingLeft:A.scalingValue(T.left,t),paddingTop:A.scalingValue(T.top,t),paddingBottom:A.scalingValue(T.bottom,t)}},he.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":X,style:{...I,...te,paddingRight:A.scalingValue(j.right,t),paddingLeft:A.scalingValue(j.left,t),paddingTop:A.scalingValue(j.top,t),paddingBottom:A.scalingValue(j.bottom,t),pointerEvents:l?"auto":void 0},children:q==="submitting"?"...":f?$e&&a.jsx(un,{url:$e,className:`${r}-submitBtnIcon`,style:{maxWidth:A.scalingValue(g??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):Se})})]}),We==="success"&&a.jsx("p",{className:`${r}-success`,style:{...ie},children:Y}),We==="error"&&a.jsx("p",{className:`${r}-error`,style:{...ie},role:"alert",children:de??ye??le})]})},Oh={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"},Dh=["hover","focus","filled","success","error"],zh=`import React, { useMemo, useState } from 'react';
985
+ `}const Bh=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=A.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:p=1,fontFamily:x,inputFontSettings:y,inputFontSize:m,inputLineHeight:h,inputLetterSpacing:v,inputWordSpacing:b,inputTextAppearance:C,buttonFontSettings:S,buttonFontSize:w,buttonLineHeight:D,buttonLetterSpacing:_,buttonWordSpacing:z,buttonTextAppearance:H,statusFontSettings:L,statusFontSize:V,statusLineHeight:$,statusLetterSpacing:k,statusWordSpacing:F,statusTextAppearance:W,iconMaxWidth:g,minHeight:E,corners:R,stroke:G,stateOverrides:Z,inputPadding:T,buttonPadding:j,successMessage:K="Thanks for subscribing!",errorMessage:le="Please, fill all required fields."}=e,se=d.slice(0,Math.min(p,d.length)),[M,re]=s.useState(()=>Object.fromEntries(se.map(he=>[he.name,""]))),[q,ce]=s.useState("idle"),[J,be]=s.useState(null),We=o==="success"?"success":o==="error"?"error":q,ye=o==="error"?le:J,ue=o==="filled",ee=s.useMemo(()=>{if(!ue)return M;let he=null;for(const Q of se)(M[Q.name]??"").trim().length>0||(he=he??{...M},he[Q.name]="Filled");return he??M},[ue,M,se]),de=We==="error"?A.getFormFieldValidationError(se,ee):null,ne=o&&o!=="default"?`${r}-state-${o}`:"",Pe=se.some(he=>(ee[he.name]??"").trim().length>0),Te=ne!==`${r}-state-filled`&&Pe?`${r}-state-filled`:"",Oe=`${ne} ${Te}`.trim(),ve=i==null?void 0:i.submitUrl,Se=u??"",$e=(c==null?void 0:c.icon)??"",f=(c==null?void 0:c.mode)==="On",X=Se||"Submit",N={fontSettings:{fontFamily:x,fontWeight:(y==null?void 0:y.fontWeight)??400,fontStyle:(y==null?void 0:y.fontStyle)??"normal"},fontSize:m??.01,lineHeight:h,letterSpacing:v??0,wordSpacing:b??0,textAppearance:C,color:e.inputTextColor??"#111111"},U={fontSettings:{fontFamily:x,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:w??.01,lineHeight:D,letterSpacing:_??0,wordSpacing:z??0,textAppearance:H,color:e.buttonTextColor??"#ffffff"},me={fontSettings:{fontFamily:x,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:V??.01,lineHeight:$,letterSpacing:k??0,wordSpacing:F??0,textAppearance:W,color:e.successColor??"#22c55e"},Y=dn(Qt(N,t)),I=dn(Qt(U,t)),ie=dn(Qt(me,t)),oe=A.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(N==null?void 0:N.color)??"#111111",buttonTextColor:e.buttonTextColor??(U==null?void 0:U.color)??"#ffffff"},jh,Vh,Z),B={borderRadius:A.scalingValue(R,t),borderWidth:A.scalingValue(G,t),borderStyle:"solid"},te={borderLeftWidth:A.scalingValue(G,t)},Ae=async he=>{if(he.preventDefault(),!l)return;const Q=Object.fromEntries(se.map(Fe=>{var et;return[Fe.name,((et=M[Fe.name])==null?void 0:et.trim())??""]}).filter(([,Fe])=>Fe));if(!ve){ce("error"),be("No integrations were found for this form.");return}if(Object.keys(Q).length===0)return;const Ze=A.getFormFieldValidationError(se,M);if(Ze){ce("error"),be(Ze);return}ce("submitting"),be(null);try{const Fe=await fetch(ve,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Q)});if(!Fe.ok){const et=await Fe.text();throw new Error(et||`Request failed: ${Fe.status}`)}ce("success"),re(Object.fromEntries(se.map(et=>[et.name,""])))}catch(Fe){ce("error"),be(Fe instanceof Error?Fe.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Oe}`.trim(),style:oe,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:zh(r)}}),a.jsxs("form",{onSubmit:Ae,className:`${r}-form`,style:{...B,height:A.scalingValue(E,t),minHeight:A.scalingValue(E,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:se.map(he=>a.jsx("input",{type:he.type==="email"?"email":he.type==="phone"?"tel":"text",name:he.name,autoComplete:"off",value:ee[he.name]??"",onChange:Q=>re(Ze=>({...Ze,[he.name]:Q.target.value})),placeholder:he.placeholder,required:he.isRequired??he.type==="email",className:`${r}-input`,style:{...Y,paddingRight:A.scalingValue(T.right,t),paddingLeft:A.scalingValue(T.left,t),paddingTop:A.scalingValue(T.top,t),paddingBottom:A.scalingValue(T.bottom,t)}},he.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":X,style:{...I,...te,paddingRight:A.scalingValue(j.right,t),paddingLeft:A.scalingValue(j.left,t),paddingTop:A.scalingValue(j.top,t),paddingBottom:A.scalingValue(j.bottom,t),pointerEvents:l?"auto":void 0},children:q==="submitting"?"...":f?$e&&a.jsx(un,{url:$e,className:`${r}-submitBtnIcon`,style:{maxWidth:A.scalingValue(g??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):Se})})]}),We==="success"&&a.jsx("p",{className:`${r}-success`,style:{...ie},children:K}),We==="error"&&a.jsx("p",{className:`${r}-error`,style:{...ie},role:"alert",children:de??ye??le})]})},jh={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"},Vh=["hover","focus","filled","success","error"],Gh=`import React, { useMemo, useState } from 'react';
986
986
  import { CommonComponentProps } from '../props';
987
987
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
988
988
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -1561,7 +1561,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
1561
1561
  };
1562
1562
 
1563
1563
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1564
- `,Bh="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>'),jh=[{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."}],za={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Vh=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Gh={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:{...za.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:{...za.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:{...za.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:jh,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Bh},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:.0053,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},t:{minHeight:.0651,iconMaxWidth:.1,stroke:.001,corners:.0026,buttonPadding:{top:.02604,right:.02604,bottom:.02604,left:.02604},inputPadding:{top:.02604,right:.02604,bottom:.02604,left:.0182},inputFontSize:.0208,inputLineHeight:.02604,buttonFontSize:.0208,buttonLineHeight:.02604,statusFontSize:.0208,statusLineHeight:.02604},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:.0027,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["fieldsToShow","minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Vh],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"]},Xh={element:Hh,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400},t:{width:500},m:{width:340}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",statusFontSettings:"fontFamily"},schema:Gh,sourceCode:zh};function qh(e,t){const n=t>0?`${t}px`:"0px";return`
1564
+ `,Xh="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>'),qh=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],Ba={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Uh=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Yh={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...Ba.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Ba.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...Ba.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:qh,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Xh},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:.0053,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},t:{minHeight:.0651,iconMaxWidth:.1,stroke:.001,corners:.0026,buttonPadding:{top:.02604,right:.02604,bottom:.02604,left:.02604},inputPadding:{top:.02604,right:.02604,bottom:.02604,left:.0182},inputFontSize:.0208,inputLineHeight:.02604,buttonFontSize:.0208,buttonLineHeight:.02604,statusFontSize:.0208,statusLineHeight:.02604},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:.0027,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["fieldsToShow","minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Uh],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"]},Kh={element:Bh,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400},t:{width:500},m:{width:340}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",statusFontSettings:"fontFamily"},schema:Yh,sourceCode:Gh};function Zh(e,t){const n=t>0?`${t}px`:"0px";return`
1565
1565
  .${e}-marquee-wrapper {
1566
1566
  overflow: hidden;
1567
1567
  width: 100%;
@@ -1693,7 +1693,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1693
1693
  .${e}-image-hover-grayscale:hover video {
1694
1694
  filter: grayscale(100%);
1695
1695
  }
1696
- `}const Uh=30,Kh=20,Ba=3,Yh=12,Zh=32,Jh=3,Qh=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},ef=(e,t)=>Array.from({length:t},()=>e).flat(),tf=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},yu=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Zl=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const d=Array.from({length:t},(u,p)=>e.children[p]),c=yu(d);return c<=0?0:c+r*Math.max(0,t-1)},nf=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=yu(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+r*Math.max(0,e.children.length-1)+l},of=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},rf=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>of(i,e))},af=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??"")},sf=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,lf=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var F,W,g,M;const p=s.useRef(null),x=!!((F=e.image)!=null&&F.url&&af(e.image));s.useLayoutEffect(()=>{d&&sf(p.current)&&(u==null||u())},[d,(W=e.image)==null?void 0:W.url,u]);const v=n.display==="cover",m=n.ratioValue??"1:1",h=n.reversed??!1,[y,b]=m.split(":").map(Number),w=(h?b:y)/(h?y:b),D=i/w,_=D>o?o:D,z=D>o?o*w:i,H=c(z),L=c(_),V={borderRadius:c(r)},$=v?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...V}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",...V},E=((g=e.image)==null?void 0:g.url)&&(x?a.jsx("video",{ref:R=>{p.current=R},src:e.image.url,style:$,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:d?u:void 0,onError:d?u:void 0}):a.jsx("img",{ref:R=>{p.current=R},src:e.image.url,alt:((M=e.image)==null?void 0:M.name)??"",style:$,onLoad:d?u:void 0,onError:d?u:void 0}));return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...v?{width:H}:{width:"max-content",maxWidth:c(i),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...v?{width:H,height:L,overflow:"hidden",...V}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:E&&e.link?a.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:St(`${t}-marquee-link`,!v&&`${t}-marquee-link-contain`),children:E}):E})})},cf=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=A.useScopedStyles(),[l,d]=s.useState(0),c=l>0?Math.round(l):0,u=s.useMemo(()=>qh(r,c),[r,c]),{speed:p,direction:x,pauseOnHover:v,gap:m,imageMaxWidth:h,imageMaxHeight:y,hoverEffect:b,cornerRadius:C=0}=e,S=s.useMemo(()=>tf(e.imageFit),[e.imageFit]),w=(t==null?void 0:t.length)??0,D=!!o,_=!n||!!i,z=_&&b!=="off"&&b!=="randomize"?`${r}-image-hover-${b}`:void 0,H=n?!!i:!0,V=((t==null?void 0:t.length)??0)>0&&(H||!!n),$=Math.max(0,p)*Uh,E=Te=>A.scalingValue(Te,n??!1),F=s.useRef(null),W=s.useRef(null),g=s.useRef(null),[M,R]=s.useState(0),G=H&&v==="on",[Z,T]=s.useState(!1),[j,Y]=s.useState({}),le=s.useRef(j);le.current=j;const se=s.useRef(null),k=s.useRef(0),re=s.useRef(null),q=s.useMemo(()=>(t??[]).map(Te=>{var Oe;return((Oe=Te.image)==null?void 0:Oe.url)??""}).join("\0"),[t]),[ce,J]=s.useState(Ba),be=s.useMemo(()=>{const Te=t??[];return Te.length===0||!(H||!!n)?Te:ef(Te,ce)},[t,H,ce,n]),We=s.useMemo(()=>(t??[]).filter(Te=>{var Oe;return!!((Oe=Te.image)!=null&&Oe.url)}).length,[t]),ye=V?Jh:1;s.useLayoutEffect(()=>{k.current=0,Y({}),se.current=null,J(Ba),d(0)},[q]),s.useEffect(()=>{if(!_||b!=="randomize")return;const Te=F.current;if(!Te)return;const Oe=f=>{Y(X=>{const N=Array.from(f).filter(me=>me in X&&!rf(Te,me));if(N.length===0)return X;const U={...X};return N.forEach(me=>{delete U[me]}),U})},ve=new IntersectionObserver(f=>{const X=new Set;for(const N of f){const U=N.target.dataset.marqueeItemIndex,me=U!==void 0?Number(U):NaN;Number.isNaN(me)||X.add(me)}X.size>0&&Oe(X)},{root:Te,threshold:0});Object.keys(j).forEach(f=>{const X=Number(f);Te.querySelectorAll(`[data-marquee-item-index="${X}"]`).forEach(N=>ve.observe(N))});const Se={current:0},$e=()=>{const f=Object.keys(le.current);f.length!==0&&(Oe(f.map(Number)),Se.current=requestAnimationFrame($e))};return Object.keys(le.current).length>0&&(Se.current=requestAnimationFrame($e)),()=>{cancelAnimationFrame(Se.current),ve.disconnect()}},[b,j,_]),s.useLayoutEffect(()=>{if(!V)return;const Te=F.current,Oe=g.current;if(!Te||!Oe)return;const ve={current:0},Se=()=>{const X=Te.getBoundingClientRect().width||Te.offsetWidth,N=nf(Oe),U=se.current,me=typeof U=="number"&&Math.abs(U-N)<=.25;se.current=N;let K=ce,I=0;if((H||n)&&w>0&&X>0){const B=Zl(Oe,w);if(B>=Zh){I=B;const te=Math.min(Yh,Math.max(Ba,Math.ceil(X/B)+1));K=te,te!==ce&&J(te)}}const oe=K!==ce&&I>0?I*K:N>0?N:I>0?I*K:(()=>{const B=Zl(Oe,w);return B>0?B*K:0})();oe>0?d(B=>B<=0?oe:!me||Math.round(B)===Math.round(oe)?B:oe):!me&&l<=0&&(cancelAnimationFrame(ve.current),ve.current=requestAnimationFrame(Se))},$e=()=>{cancelAnimationFrame(ve.current),ve.current=requestAnimationFrame(Se)};re.current=$e,$e();const f=new ResizeObserver($e);return f.observe(Te),f.observe(Oe),()=>{re.current=null,cancelAnimationFrame(ve.current),f.disconnect()}},[H,V,l,q,ce,w,n]),s.useLayoutEffect(()=>{if(!V||c<=0)return;const Te=W.current;Te&&Qh(Te)},[V,c,x,$]),s.useLayoutEffect(()=>{if(!V||l<=0){R(0);return}const Te=W.current,Oe=g.current;if(!Te||!Oe)return;const ve=()=>{const $e=Te.offsetHeight||Te.getBoundingClientRect().height,f=Array.from(Oe.children).reduce((N,U)=>Math.max(N,U.offsetHeight||U.getBoundingClientRect().height),0),X=$e>0?$e:f;R(X>0?X:0)};ve();const Se=new ResizeObserver(ve);return Se.observe(Te),Se.observe(Oe),()=>Se.disconnect()},[V,ye,be,n,m,h,y,l,S,j]),s.useLayoutEffect(()=>{if(!n||!D||!V||typeof window>"u")return;const Te=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(Te)},[n,D,V,x,l,M,m,be]);const ue=()=>{G&&T(!0)},ee=()=>{G&&T(!1)},de=s.useCallback(()=>{var Te;k.current=Math.min(We,k.current+1),(Te=re.current)==null||Te.call(re)},[We]),ne=s.useCallback((Te,Oe)=>{Y(ve=>{const Se=ve[Te]??Oe,$e=(t??[]).filter(X=>X!==Se);if($e.length===0)return ve;const f=$e[Math.floor(Math.random()*$e.length)];return{...ve,[Te]:f}})},[t]),Pe=(Te,Oe,ve,Se)=>{const $e=_&&b==="randomize"&&S.display==="cover"?j[ve]??Te:Te,f=`max(${E(m)}, ${Kh}px)`,X=`calc(-0.5 * (${f} + ${E(m)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":ve,onMouseEnter:_&&b==="randomize"&&S.display==="cover"?()=>ne(ve,Te):void 0,children:[a.jsx(lf,{item:$e,prefix:r,imageFit:S,imageMaxWidth:h,imageMaxHeight:y,cornerRadius:C,imageHoverClass:z,isEditor:n,isFirstSet:Se,scaled:E,onFirstSetImageDone:de}),D&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:X,width:f,height:"100%"}})]},`${Oe}-${ve}`)};if(V){const Te=H?G&&Z?"paused":"running":"paused",Oe=c>0&&$>0?c/$*1e3:0,ve=`${Math.max(0,Oe)/1e3}s`;return a.jsxs("div",{ref:F,className:St(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:M>0?{height:M}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:W,className:`${r}-marquee-track`,"data-direction":x,onMouseEnter:ue,onMouseLeave:ee,style:{WebkitAnimationDuration:ve,animationDuration:ve,WebkitAnimationPlayState:Te,animationPlayState:Te},children:Array.from({length:ye},(Se,$e)=>a.jsx("div",{ref:$e===0?g:void 0,className:St(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:E(m),paddingRight:E(m)},"aria-hidden":$e>0,children:be.map((f,X)=>Pe(f,$e,X,$e===0&&X<w))},`set-${$e}`))})]})}return a.jsxs("div",{ref:F,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:St(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:E(m),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((Te,Oe)=>Pe(Te,0,Oe))},"marquee-static")]})},df=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1696
+ `}const Jh=30,Qh=20,ja=3,ef=12,tf=32,nf=3,of=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},rf=(e,t)=>Array.from({length:t},()=>e).flat(),af=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},xu=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Jl=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const d=Array.from({length:t},(u,p)=>e.children[p]),c=xu(d);return c<=0?0:c+r*Math.max(0,t-1)},sf=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=xu(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+r*Math.max(0,e.children.length-1)+l},lf=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},cf=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>lf(i,e))},df=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??"")},uf=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,pf=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var F,W,g,E;const p=s.useRef(null),x=!!((F=e.image)!=null&&F.url&&df(e.image));s.useLayoutEffect(()=>{d&&uf(p.current)&&(u==null||u())},[d,(W=e.image)==null?void 0:W.url,u]);const y=n.display==="cover",m=n.ratioValue??"1:1",h=n.reversed??!1,[v,b]=m.split(":").map(Number),w=(h?b:v)/(h?v:b),D=i/w,_=D>o?o:D,z=D>o?o*w:i,H=c(z),L=c(_),V={borderRadius:c(r)},$=y?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...V}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",...V},k=((g=e.image)==null?void 0:g.url)&&(x?a.jsx("video",{ref:R=>{p.current=R},src:e.image.url,style:$,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:d?u:void 0,onError:d?u:void 0}):a.jsx("img",{ref:R=>{p.current=R},src:e.image.url,alt:((E=e.image)==null?void 0:E.name)??"",style:$,onLoad:d?u:void 0,onError:d?u:void 0}));return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...y?{width:H}:{width:"max-content",maxWidth:c(i),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...y?{width:H,height:L,overflow:"hidden",...V}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:k&&e.link?a.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:St(`${t}-marquee-link`,!y&&`${t}-marquee-link-contain`),children:k}):k})})},mf=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=A.useScopedStyles(),[l,d]=s.useState(0),c=l>0?Math.round(l):0,u=s.useMemo(()=>Zh(r,c),[r,c]),{speed:p,direction:x,pauseOnHover:y,gap:m,imageMaxWidth:h,imageMaxHeight:v,hoverEffect:b,cornerRadius:C=0}=e,S=s.useMemo(()=>af(e.imageFit),[e.imageFit]),w=(t==null?void 0:t.length)??0,D=!!o,_=!n||!!i,z=_&&b!=="off"&&b!=="randomize"?`${r}-image-hover-${b}`:void 0,H=n?!!i:!0,V=((t==null?void 0:t.length)??0)>0&&(H||!!n),$=Math.max(0,p)*Jh,k=Te=>A.scalingValue(Te,n??!1),F=s.useRef(null),W=s.useRef(null),g=s.useRef(null),[E,R]=s.useState(0),G=H&&y==="on",[Z,T]=s.useState(!1),[j,K]=s.useState({}),le=s.useRef(j);le.current=j;const se=s.useRef(null),M=s.useRef(0),re=s.useRef(null),q=s.useMemo(()=>(t??[]).map(Te=>{var Oe;return((Oe=Te.image)==null?void 0:Oe.url)??""}).join("\0"),[t]),[ce,J]=s.useState(ja),be=s.useMemo(()=>{const Te=t??[];return Te.length===0||!(H||!!n)?Te:rf(Te,ce)},[t,H,ce,n]),We=s.useMemo(()=>(t??[]).filter(Te=>{var Oe;return!!((Oe=Te.image)!=null&&Oe.url)}).length,[t]),ye=V?nf:1;s.useLayoutEffect(()=>{M.current=0,K({}),se.current=null,J(ja),d(0)},[q]),s.useEffect(()=>{if(!_||b!=="randomize")return;const Te=F.current;if(!Te)return;const Oe=f=>{K(X=>{const N=Array.from(f).filter(me=>me in X&&!cf(Te,me));if(N.length===0)return X;const U={...X};return N.forEach(me=>{delete U[me]}),U})},ve=new IntersectionObserver(f=>{const X=new Set;for(const N of f){const U=N.target.dataset.marqueeItemIndex,me=U!==void 0?Number(U):NaN;Number.isNaN(me)||X.add(me)}X.size>0&&Oe(X)},{root:Te,threshold:0});Object.keys(j).forEach(f=>{const X=Number(f);Te.querySelectorAll(`[data-marquee-item-index="${X}"]`).forEach(N=>ve.observe(N))});const Se={current:0},$e=()=>{const f=Object.keys(le.current);f.length!==0&&(Oe(f.map(Number)),Se.current=requestAnimationFrame($e))};return Object.keys(le.current).length>0&&(Se.current=requestAnimationFrame($e)),()=>{cancelAnimationFrame(Se.current),ve.disconnect()}},[b,j,_]),s.useLayoutEffect(()=>{if(!V)return;const Te=F.current,Oe=g.current;if(!Te||!Oe)return;const ve={current:0},Se=()=>{const X=Te.getBoundingClientRect().width||Te.offsetWidth,N=sf(Oe),U=se.current,me=typeof U=="number"&&Math.abs(U-N)<=.25;se.current=N;let Y=ce,I=0;if((H||n)&&w>0&&X>0){const B=Jl(Oe,w);if(B>=tf){I=B;const te=Math.min(ef,Math.max(ja,Math.ceil(X/B)+1));Y=te,te!==ce&&J(te)}}const oe=Y!==ce&&I>0?I*Y:N>0?N:I>0?I*Y:(()=>{const B=Jl(Oe,w);return B>0?B*Y:0})();oe>0?d(B=>B<=0?oe:!me||Math.round(B)===Math.round(oe)?B:oe):!me&&l<=0&&(cancelAnimationFrame(ve.current),ve.current=requestAnimationFrame(Se))},$e=()=>{cancelAnimationFrame(ve.current),ve.current=requestAnimationFrame(Se)};re.current=$e,$e();const f=new ResizeObserver($e);return f.observe(Te),f.observe(Oe),()=>{re.current=null,cancelAnimationFrame(ve.current),f.disconnect()}},[H,V,l,q,ce,w,n]),s.useLayoutEffect(()=>{if(!V||c<=0)return;const Te=W.current;Te&&of(Te)},[V,c,x,$]),s.useLayoutEffect(()=>{if(!V||l<=0){R(0);return}const Te=W.current,Oe=g.current;if(!Te||!Oe)return;const ve=()=>{const $e=Te.offsetHeight||Te.getBoundingClientRect().height,f=Array.from(Oe.children).reduce((N,U)=>Math.max(N,U.offsetHeight||U.getBoundingClientRect().height),0),X=$e>0?$e:f;R(X>0?X:0)};ve();const Se=new ResizeObserver(ve);return Se.observe(Te),Se.observe(Oe),()=>Se.disconnect()},[V,ye,be,n,m,h,v,l,S,j]),s.useLayoutEffect(()=>{if(!n||!D||!V||typeof window>"u")return;const Te=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(Te)},[n,D,V,x,l,E,m,be]);const ue=()=>{G&&T(!0)},ee=()=>{G&&T(!1)},de=s.useCallback(()=>{var Te;M.current=Math.min(We,M.current+1),(Te=re.current)==null||Te.call(re)},[We]),ne=s.useCallback((Te,Oe)=>{K(ve=>{const Se=ve[Te]??Oe,$e=(t??[]).filter(X=>X!==Se);if($e.length===0)return ve;const f=$e[Math.floor(Math.random()*$e.length)];return{...ve,[Te]:f}})},[t]),Pe=(Te,Oe,ve,Se)=>{const $e=_&&b==="randomize"&&S.display==="cover"?j[ve]??Te:Te,f=`max(${k(m)}, ${Qh}px)`,X=`calc(-0.5 * (${f} + ${k(m)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":ve,onMouseEnter:_&&b==="randomize"&&S.display==="cover"?()=>ne(ve,Te):void 0,children:[a.jsx(pf,{item:$e,prefix:r,imageFit:S,imageMaxWidth:h,imageMaxHeight:v,cornerRadius:C,imageHoverClass:z,isEditor:n,isFirstSet:Se,scaled:k,onFirstSetImageDone:de}),D&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:X,width:f,height:"100%"}})]},`${Oe}-${ve}`)};if(V){const Te=H?G&&Z?"paused":"running":"paused",Oe=c>0&&$>0?c/$*1e3:0,ve=`${Math.max(0,Oe)/1e3}s`;return a.jsxs("div",{ref:F,className:St(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:E>0?{height:E}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:W,className:`${r}-marquee-track`,"data-direction":x,onMouseEnter:ue,onMouseLeave:ee,style:{WebkitAnimationDuration:ve,animationDuration:ve,WebkitAnimationPlayState:Te,animationPlayState:Te},children:Array.from({length:ye},(Se,$e)=>a.jsx("div",{ref:$e===0?g:void 0,className:St(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:k(m),paddingRight:k(m)},"aria-hidden":$e>0,children:be.map((f,X)=>Pe(f,$e,X,$e===0&&X<w))},`set-${$e}`))})]})}return a.jsxs("div",{ref:F,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:St(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:k(m),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((Te,Oe)=>Pe(Te,0,Oe))},"marquee-static")]})},gf=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1697
1697
  import cn from 'classnames';
1698
1698
  import { CommonComponentProps } from '../props';
1699
1699
  import { scalingValue } from '../utils/scalingValue';
@@ -2476,7 +2476,7 @@ type MarqueeProps = {
2476
2476
  isPreviewMode?: boolean;
2477
2477
  isEditMode?: boolean;
2478
2478
  } & CommonComponentProps;
2479
- `,uf={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.8,cornerRadius:0},t:{speed:1.64,gap:.02,imageMaxWidth:.5208,imageMaxHeight:.5208,cornerRadius:0},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278,cornerRadius:0}},displayRules:[{if:{name:"imageFit.display",value:"cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit","cornerRadius"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["cornerRadius"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""},link:""}]}},pf={element:cf,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple-Marquee.mp4"},schema:uf,sourceCode:df,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function mf(e,t,n){const i=t>0?`${t}px`:"0px",o=n?`
2479
+ `,hf={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.8,cornerRadius:0},t:{speed:1.64,gap:.02,imageMaxWidth:.5208,imageMaxHeight:.5208,cornerRadius:0},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278,cornerRadius:0}},displayRules:[{if:{name:"imageFit.display",value:"cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit","cornerRadius"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["cornerRadius"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""},link:""}]}},ff={element:mf,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple-Marquee.mp4"},schema:hf,sourceCode:gf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function yf(e,t,n){const i=t>0?`${t}px`:"0px",o=n?`
2480
2480
  .${e}-item-image-wrap {
2481
2481
  display: flex;
2482
2482
  flex: 0 0 auto;
@@ -2605,7 +2605,7 @@ ${o}
2605
2605
  left: -9999px;
2606
2606
  top: 0;
2607
2607
  }
2608
- `}const gf=30,ja=3,hf=12,ff=96,Jl=3,Ps=.72,yf=100,vf=10,xf=e=>e/yf,bf=e=>Math.max(0,e)/vf,Sf=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},wf=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),to={ctx:void 0},$f=()=>to.ctx!==void 0?to.ctx:typeof document>"u"?(to.ctx=null,to.ctx):(to.ctx=document.createElement("canvas").getContext("2d"),to.ctx),Cf=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},Ql=e=>{e.style.transform=""},Tf=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},Lf=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const r=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?r:n(l,r)};return n(e,e.offsetWidth/2)},vu=96,xu=(e,t,n)=>{if(t<=0||Math.abs(e)<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),r=new Float64Array(n+1),l=e*t,d=u=>Math.sqrt(1+(l*Math.cos(t*u))**2),c=i/n;return Array.from({length:n},(u,p)=>{const x=p*c,v=x+c;o[p+1]=v,r[p+1]=r[p]+(d(x)+d(v))*.5*c}),{wavelength:i,periodArc:r[n],x:o,s:r}},If=(e,t)=>{const n=xu(e,t,vu);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},Rf=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),r=i-o*e.periodArc,{s:l,x:d}=e,c=(m,h)=>{if(h-m<=1)return[m,h];const y=m+h>>1;return l[y]<=r?c(y,h):c(m,y)},[u,p]=c(0,l.length-1),x=l[p]-l[u],v=x>0?(r-l[u])/x:0;return n*(o*e.wavelength+d[u]+(d[p]-d[u])*v)},Pf=(e,t,n,i,o=0)=>{const r=Math.max(0,n),l=e>0?2*Math.PI*r/e:0,d=h=>i+t*Math.sin(l*h),c=h=>t*l*Math.cos(l*h),u=-o,x=e+o-u,v=Math.max(4,Math.ceil(r*4*(x/Math.max(e,1)))),m=Array.from({length:v},(h,y)=>{const b=u+y/v*x,C=u+(y+1)/v*x,S=C-b,w=d(b),D=d(C),_=b+S/3,z=w+c(b)*S/3,H=C-S/3,L=D-c(C)*S/3;return`C${_.toFixed(2)} ${z.toFixed(2)} ${H.toFixed(2)} ${L.toFixed(2)} ${C.toFixed(2)} ${D.toFixed(2)}`});return[`M${u.toFixed(2)} ${d(u).toFixed(2)}`,...m].join(" ")},Ef=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var m;const d=o!==0?{...n,transform:`translateY(${o}px)`}:n,c=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${Ps}em`},u=((m=e.image)==null?void 0:m.url)&&a.jsx("img",{src:e.image.url,alt:e.image.name??"",className:`${t}-item-image`,style:c}),p=u&&(l?a.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),x=l?a.jsx("span",{className:`${t}-text`,style:d,children:Array.from(e.text).map((h,y)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:h===" "?" ":h})},y))}):a.jsx("span",{className:`${t}-text`,style:d,children:e.text}),v=a.jsxs(a.Fragment,{children:[p,x]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:e.link?a.jsx("a",{href:e.link,className:`${t}-item-link`,style:{gap:r},children:v}):v})},Mf=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=A.useScopedStyles(),[r,l]=s.useState(0),d=r>0?Math.round(r):0,{speed:c,direction:u,pauseOnHover:p,gap:x,layoutType:v,curveAmplitude:m,curveFrequency:h,textFontFamily:y,textFontSettings:b,textFontSize:C,textLineHeight:S,textLetterSpacing:w,textWordSpacing:D,textTextAppearance:_,textColor:z,backgroundColor:H,ribbonWidth:L}=e,V=L??S,$=v==="curve",E=xf(m),F=bf(h),W=s.useMemo(()=>mf(o,d,$),[o,d,$]),g=s.useMemo(()=>Qt({fontSettings:{fontFamily:y,fontWeight:b.fontWeight,fontStyle:b.fontStyle},letterSpacing:w,wordSpacing:D,fontSize:C,lineHeight:S,textAppearance:_,color:z},n),[y,b,w,D,C,S,_,z,n]),M=Re=>A.scalingValue(Re,n??!1),R=((t==null?void 0:t.length)??0)>0,G=n?!!i:!0,Z=R&&(G||!!n),T=Math.max(0,c)*gf,j=G&&p==="on",[Y,le]=s.useState(!1),se=G?j&&Y?"paused":"running":"paused",k=se==="running"&&T>0&&d>0,re=d>0&&T>0?d/T*1e3:0,q=s.useRef(null),ce=s.useRef(null),J=s.useRef(null),be=s.useRef(null),We=s.useRef(null),ye=s.useRef(null),ue=s.useRef(k),ee=s.useRef(null),de=s.useRef(null),ne=s.useRef(E),Pe=s.useRef(F);ue.current=k,ne.current=E,Pe.current=F;const[Te,Oe]=s.useState(0),[ve,Se]=s.useState(0),[$e,f]=s.useState(0),[X,N]=s.useState(0),[U,me]=s.useState(0),K=s.useMemo(()=>(t??[]).map(Re=>{var xe;return`${Re.text}\0${((xe=Re.image)==null?void 0:xe.url)??""}\0${Re.link??""}`}).join("\0"),[t]),[I,ie]=s.useState(ja),oe=s.useMemo(()=>{const Re=t??[];return Re.length===0||!(G||n)?Re:wf(Re,I)},[t,G,I,n]),B=Z?Jl:1;s.useLayoutEffect(()=>{ie(ja),l(0)},[K]),s.useLayoutEffect(()=>{var Ne;const Re=ye.current;if(!Re)return;const xe=()=>{const it=getComputedStyle(Re),ot=parseFloat(it.fontSize)||0;if(ot<=0)return;const rt=$f();if(!rt){Oe(ot*Ps),Se(0);return}rt.font=`${it.fontStyle} ${it.fontWeight} ${ot}px ${it.fontFamily}`;const ht=rt.measureText("H"),Pt=ht.actualBoundingBoxAscent>0?ht.actualBoundingBoxAscent:ot*Ps,Et=Math.max(0,ht.actualBoundingBoxDescent||0),ut=ht.fontBoundingBoxAscent||0,gt=ht.fontBoundingBoxDescent||0;Oe(Tt=>Math.abs(Tt-Pt)>.5?Pt:Tt);const $t=ut>0||gt>0?(gt-Et-(ut-Pt))/2:0;Se(Tt=>Math.abs(Tt-$t)>.25?$t:Tt)};xe();const Ie=typeof document<"u"?document.fonts:void 0;(Ne=Ie==null?void 0:Ie.ready)==null||Ne.then(xe).catch(()=>{});const Ke=new ResizeObserver(xe);return Ke.observe(Re),()=>Ke.disconnect()},[g.fontFamily,g.fontWeight,g.fontStyle,g.fontSize,g.lineHeight]),s.useLayoutEffect(()=>{if(!Z)return;const Re=q.current,xe=be.current;if(!Re||!xe)return;const Ie={id:0},Ke=()=>{const rt=Re.offsetWidth||Re.getBoundingClientRect().width,ht=xe.offsetWidth||xe.getBoundingClientRect().width;if(R&&rt>0&&ht>0){const Pt=ht/I;if(Pt>0){let Et=rt,ut=hf;if($){const $t=rt*ne.current,Tt=Pe.current,ft=Tt>0?2*Math.PI*Tt/rt:0,At=If($t,ft);Et=Math.max(rt,At*rt/(Jl-1)),ut=ff}const gt=Math.min(ut,Math.max(ja,Math.ceil(Et/Pt)+1));if(gt!==I){ie(gt);return}}}ht>0&&l(ht)},Ne=()=>{cancelAnimationFrame(Ie.id),Ie.id=requestAnimationFrame(Ke)};Ne();const it=new ResizeObserver(Ne);it.observe(Re),it.observe(xe);const ot=()=>{document.hidden||Ne()};return document.addEventListener("visibilitychange",ot),window.addEventListener("pageshow",ot),window.addEventListener("focus",ot),()=>{cancelAnimationFrame(Ie.id),it.disconnect(),document.removeEventListener("visibilitychange",ot),window.removeEventListener("pageshow",ot),window.removeEventListener("focus",ot)}},[Z,K,I,R,Te,$,E,F]),s.useLayoutEffect(()=>{const Re=We.current;if(!Re)return;const xe={id:0},Ie=()=>{const Ne=Re.offsetHeight;Ne>0&&me(it=>Math.abs(it-Ne)>.5?Ne:it)};xe.id=requestAnimationFrame(Ie);const Ke=new ResizeObserver(()=>{cancelAnimationFrame(xe.id),xe.id=requestAnimationFrame(Ie)});return Ke.observe(Re),()=>{cancelAnimationFrame(xe.id),Ke.disconnect()}},[V,n]),s.useLayoutEffect(()=>{if(!$){f(0),N(0);return}const Re=q.current,xe=be.current;if(!Re||!xe)return;const Ie={id:0},Ke=()=>{const it=Re.offsetWidth,ot=xe.offsetHeight;it>0&&N(rt=>Math.abs(rt-it)>.5?it:rt),ot>0&&f(rt=>Math.abs(rt-ot)>.5?ot:rt)};Ie.id=requestAnimationFrame(Ke);const Ne=new ResizeObserver(()=>{cancelAnimationFrame(Ie.id),Ie.id=requestAnimationFrame(Ke)});return Ne.observe(Re),Ne.observe(xe),()=>{cancelAnimationFrame(Ie.id),Ne.disconnect()}},[$,K,Te,S,C,Z]),s.useLayoutEffect(()=>{if(!Z||d<=0)return;const Re=J.current;Re&&Sf(Re)},[Z,d,u,T]),s.useLayoutEffect(()=>{if(!$||!R)return;const Re=q.current;if(!Re)return;const xe={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},Ie=()=>{for(const Pt of xe.itemsCache)for(const Et of Pt.glyphs)Ql(Et.inner)},Ke=()=>{const Pt=ce.current??Re;xe.itemsCache=Array.from(Re.querySelectorAll("[data-marquee-text-item]"),Et=>{const ut=[];return Et.querySelectorAll("[data-marquee-wave-node]").forEach(gt=>{const $t=gt.firstElementChild;$t&&ut.push({inner:$t,layoutLocalX:Lf(gt,Pt)})}),{item:Et,glyphs:ut}}),xe.cacheDirty=!1},Ne=()=>{xe.cacheDirty&&Ke();const Et=(ce.current??Re).offsetWidth||1,ut=Et*ne.current,gt=Pe.current,$t=2*Math.PI*gt/Et,Tt=`${Et}|${ut}|${$t}`;if(Tt!==xe.lutKey&&(xe.lutKey=Tt,xe.lut=xu(ut,$t,vu)),Math.abs(ut)<=0||$t<=0){Ie();return}const ft=J.current,At=ft?Tf(getComputedStyle(ft).transform):0,zt=Re.getBoundingClientRect(),jt=zt.left,Zt=zt.right,Ct=xe.lut&&xe.lut.wavelength>0?Math.max(0,(xe.lut.periodArc/xe.lut.wavelength-1)*Et):0;for(const{item:Vt,glyphs:rn}of xe.itemsCache){const lt=Vt.getBoundingClientRect();if(lt.right<jt||lt.left>Zt+Ct){for(const Ee of rn)Ql(Ee.inner);continue}for(const Ee of rn){const je=Ee.layoutLocalX+At,Qe=xe.lut?Rf(xe.lut,je):je,dt=$t*Qe,xt=ut*Math.sin(dt),Mt=ut*$t*Math.cos(dt),yt=Math.atan(Mt)*(180/Math.PI);Cf(Ee.inner,Qe-je,xt,yt)}}},it=()=>{xe.cancelled||(xe.raf=0,Ne(),ue.current&&!document.hidden&&(xe.raf=requestAnimationFrame(it)))},ot=()=>{xe.cancelled||xe.raf||(xe.raf=requestAnimationFrame(it))},rt=()=>{xe.cacheDirty=!0,Ne(),ot()};ee.current=ot,de.current=rt,Ne(),ot();const ht=()=>{if(document.hidden){cancelAnimationFrame(xe.raf),xe.raf=0;return}cancelAnimationFrame(xe.raf),xe.raf=0,rt()};return document.addEventListener("visibilitychange",ht),window.addEventListener("pageshow",ht),window.addEventListener("focus",ht),()=>{xe.cancelled=!0,ee.current=null,de.current=null,cancelAnimationFrame(xe.raf),document.removeEventListener("visibilitychange",ht),window.removeEventListener("pageshow",ht),window.removeEventListener("focus",ht),Ie()}},[$,R]),s.useLayoutEffect(()=>{var Re;!$||!R||(Re=de.current)==null||Re.call(de)},[$,R,r,K,I,Te,E,F,X]),s.useLayoutEffect(()=>{var Re;(Re=ee.current)==null||Re.call(ee)},[k,u]);const te=()=>{j&&le(!0)},Ae=()=>{j&&le(!1)},he=$?Math.abs(E)*100:0,Q=M(V),Ze={minHeight:Q,...$?{paddingTop:`${he}%`,paddingBottom:`${he}%`}:{}},Fe={height:Q,...$?{visibility:"hidden"}:{backgroundColor:H}},et={gap:M(x),minHeight:Q},Ue=X*E,nt=Math.abs(Ue),tt=U>0?U:$e,Ve=Math.max($e,tt),fe=nt+Ve/2,He=Math.max(tt,1),Be=$&&X>0&&Ve>0?Pf(X,Ue,F,fe,He):"",Je=nt*2+Ve,Ce=Be?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${X} ${Je}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:Be,fill:"none",stroke:H,strokeWidth:tt,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,De=a.jsx("div",{ref:We,className:`${o}-ribbon`,style:Fe,"aria-hidden":!0}),Xe=(Re,xe,Ie)=>a.jsx(Ef,{item:Re,prefix:o,textCss:g,capHeightPx:Te,opticalOffsetY:ve,imageGapPx:M(x),isCurve:$},`${xe}-${Ie}`),ge=a.jsx("span",{ref:ye,"aria-hidden":!0,className:`${o}-cap-ref`,style:g,children:"H"}),Me=`${Math.max(0,re)/1e3}s`,ze=Z?a.jsx("div",{ref:J,className:`${o}-marquee-track`,"data-direction":u,onMouseEnter:te,onMouseLeave:Ae,style:{WebkitAnimationDuration:Me,animationDuration:Me,WebkitAnimationPlayState:se,animationPlayState:se},children:Array.from({length:B},(Re,xe)=>a.jsx("div",{ref:xe===0?be:void 0,className:`${o}-marquee-set`,style:{...et,paddingRight:M(x)},"aria-hidden":xe>0,children:oe.map((Ie,Ke)=>Xe(Ie,xe,Ke))},`set-${xe}`))}):a.jsx("div",{ref:be,className:St(`${o}-marquee-set`,`${o}-marquee-static`),style:et,children:t==null?void 0:t.map((Re,xe)=>Xe(Re,0,xe))});return a.jsxs("div",{ref:q,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:W}}),ge,a.jsxs("div",{ref:ce,className:`${o}-marquee-wrapper`,style:Ze,children:[De,Ce,ze]})]})},kf=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
2608
+ `}const vf=30,Va=3,xf=12,bf=96,Ql=3,ks=.72,Sf=100,wf=10,$f=e=>e/Sf,Cf=e=>Math.max(0,e)/wf,Tf=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},Lf=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),to={ctx:void 0},If=()=>to.ctx!==void 0?to.ctx:typeof document>"u"?(to.ctx=null,to.ctx):(to.ctx=document.createElement("canvas").getContext("2d"),to.ctx),Rf=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},ec=e=>{e.style.transform=""},Pf=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},kf=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const r=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?r:n(l,r)};return n(e,e.offsetWidth/2)},bu=96,Su=(e,t,n)=>{if(t<=0||Math.abs(e)<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),r=new Float64Array(n+1),l=e*t,d=u=>Math.sqrt(1+(l*Math.cos(t*u))**2),c=i/n;return Array.from({length:n},(u,p)=>{const x=p*c,y=x+c;o[p+1]=y,r[p+1]=r[p]+(d(x)+d(y))*.5*c}),{wavelength:i,periodArc:r[n],x:o,s:r}},Ef=(e,t)=>{const n=Su(e,t,bu);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},Mf=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),r=i-o*e.periodArc,{s:l,x:d}=e,c=(m,h)=>{if(h-m<=1)return[m,h];const v=m+h>>1;return l[v]<=r?c(v,h):c(m,v)},[u,p]=c(0,l.length-1),x=l[p]-l[u],y=x>0?(r-l[u])/x:0;return n*(o*e.wavelength+d[u]+(d[p]-d[u])*y)},Af=(e,t,n,i,o=0)=>{const r=Math.max(0,n),l=e>0?2*Math.PI*r/e:0,d=h=>i+t*Math.sin(l*h),c=h=>t*l*Math.cos(l*h),u=-o,x=e+o-u,y=Math.max(4,Math.ceil(r*4*(x/Math.max(e,1)))),m=Array.from({length:y},(h,v)=>{const b=u+v/y*x,C=u+(v+1)/y*x,S=C-b,w=d(b),D=d(C),_=b+S/3,z=w+c(b)*S/3,H=C-S/3,L=D-c(C)*S/3;return`C${_.toFixed(2)} ${z.toFixed(2)} ${H.toFixed(2)} ${L.toFixed(2)} ${C.toFixed(2)} ${D.toFixed(2)}`});return[`M${u.toFixed(2)} ${d(u).toFixed(2)}`,...m].join(" ")},Ff=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var m;const d=o!==0?{...n,transform:`translateY(${o}px)`}:n,c=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${ks}em`},u=((m=e.image)==null?void 0:m.url)&&a.jsx("img",{src:e.image.url,alt:e.image.name??"",className:`${t}-item-image`,style:c}),p=u&&(l?a.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),x=l?a.jsx("span",{className:`${t}-text`,style:d,children:Array.from(e.text).map((h,v)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:h===" "?" ":h})},v))}):a.jsx("span",{className:`${t}-text`,style:d,children:e.text}),y=a.jsxs(a.Fragment,{children:[p,x]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:e.link?a.jsx("a",{href:e.link,className:`${t}-item-link`,style:{gap:r},children:y}):y})},Nf=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=A.useScopedStyles(),[r,l]=s.useState(0),d=r>0?Math.round(r):0,{speed:c,direction:u,pauseOnHover:p,gap:x,layoutType:y,curveAmplitude:m,curveFrequency:h,textFontFamily:v,textFontSettings:b,textFontSize:C,textLineHeight:S,textLetterSpacing:w,textWordSpacing:D,textTextAppearance:_,textColor:z,backgroundColor:H,ribbonWidth:L}=e,V=L??S,$=y==="curve",k=$f(m),F=Cf(h),W=s.useMemo(()=>yf(o,d,$),[o,d,$]),g=s.useMemo(()=>Qt({fontSettings:{fontFamily:v,fontWeight:b.fontWeight,fontStyle:b.fontStyle},letterSpacing:w,wordSpacing:D,fontSize:C,lineHeight:S,textAppearance:_,color:z},n),[v,b,w,D,C,S,_,z,n]),E=Re=>A.scalingValue(Re,n??!1),R=((t==null?void 0:t.length)??0)>0,G=n?!!i:!0,Z=R&&(G||!!n),T=Math.max(0,c)*vf,j=G&&p==="on",[K,le]=s.useState(!1),se=G?j&&K?"paused":"running":"paused",M=se==="running"&&T>0&&d>0,re=d>0&&T>0?d/T*1e3:0,q=s.useRef(null),ce=s.useRef(null),J=s.useRef(null),be=s.useRef(null),We=s.useRef(null),ye=s.useRef(null),ue=s.useRef(M),ee=s.useRef(null),de=s.useRef(null),ne=s.useRef(k),Pe=s.useRef(F);ue.current=M,ne.current=k,Pe.current=F;const[Te,Oe]=s.useState(0),[ve,Se]=s.useState(0),[$e,f]=s.useState(0),[X,N]=s.useState(0),[U,me]=s.useState(0),Y=s.useMemo(()=>(t??[]).map(Re=>{var xe;return`${Re.text}\0${((xe=Re.image)==null?void 0:xe.url)??""}\0${Re.link??""}`}).join("\0"),[t]),[I,ie]=s.useState(Va),oe=s.useMemo(()=>{const Re=t??[];return Re.length===0||!(G||n)?Re:Lf(Re,I)},[t,G,I,n]),B=Z?Ql:1;s.useLayoutEffect(()=>{ie(Va),l(0)},[Y]),s.useLayoutEffect(()=>{var Ne;const Re=ye.current;if(!Re)return;const xe=()=>{const it=getComputedStyle(Re),ot=parseFloat(it.fontSize)||0;if(ot<=0)return;const rt=If();if(!rt){Oe(ot*ks),Se(0);return}rt.font=`${it.fontStyle} ${it.fontWeight} ${ot}px ${it.fontFamily}`;const ht=rt.measureText("H"),Pt=ht.actualBoundingBoxAscent>0?ht.actualBoundingBoxAscent:ot*ks,kt=Math.max(0,ht.actualBoundingBoxDescent||0),ut=ht.fontBoundingBoxAscent||0,gt=ht.fontBoundingBoxDescent||0;Oe(Tt=>Math.abs(Tt-Pt)>.5?Pt:Tt);const $t=ut>0||gt>0?(gt-kt-(ut-Pt))/2:0;Se(Tt=>Math.abs(Tt-$t)>.25?$t:Tt)};xe();const Ie=typeof document<"u"?document.fonts:void 0;(Ne=Ie==null?void 0:Ie.ready)==null||Ne.then(xe).catch(()=>{});const Ye=new ResizeObserver(xe);return Ye.observe(Re),()=>Ye.disconnect()},[g.fontFamily,g.fontWeight,g.fontStyle,g.fontSize,g.lineHeight]),s.useLayoutEffect(()=>{if(!Z)return;const Re=q.current,xe=be.current;if(!Re||!xe)return;const Ie={id:0},Ye=()=>{const rt=Re.offsetWidth||Re.getBoundingClientRect().width,ht=xe.offsetWidth||xe.getBoundingClientRect().width;if(R&&rt>0&&ht>0){const Pt=ht/I;if(Pt>0){let kt=rt,ut=xf;if($){const $t=rt*ne.current,Tt=Pe.current,ft=Tt>0?2*Math.PI*Tt/rt:0,At=Ef($t,ft);kt=Math.max(rt,At*rt/(Ql-1)),ut=bf}const gt=Math.min(ut,Math.max(Va,Math.ceil(kt/Pt)+1));if(gt!==I){ie(gt);return}}}ht>0&&l(ht)},Ne=()=>{cancelAnimationFrame(Ie.id),Ie.id=requestAnimationFrame(Ye)};Ne();const it=new ResizeObserver(Ne);it.observe(Re),it.observe(xe);const ot=()=>{document.hidden||Ne()};return document.addEventListener("visibilitychange",ot),window.addEventListener("pageshow",ot),window.addEventListener("focus",ot),()=>{cancelAnimationFrame(Ie.id),it.disconnect(),document.removeEventListener("visibilitychange",ot),window.removeEventListener("pageshow",ot),window.removeEventListener("focus",ot)}},[Z,Y,I,R,Te,$,k,F]),s.useLayoutEffect(()=>{const Re=We.current;if(!Re)return;const xe={id:0},Ie=()=>{const Ne=Re.offsetHeight;Ne>0&&me(it=>Math.abs(it-Ne)>.5?Ne:it)};xe.id=requestAnimationFrame(Ie);const Ye=new ResizeObserver(()=>{cancelAnimationFrame(xe.id),xe.id=requestAnimationFrame(Ie)});return Ye.observe(Re),()=>{cancelAnimationFrame(xe.id),Ye.disconnect()}},[V,n]),s.useLayoutEffect(()=>{if(!$){f(0),N(0);return}const Re=q.current,xe=be.current;if(!Re||!xe)return;const Ie={id:0},Ye=()=>{const it=Re.offsetWidth,ot=xe.offsetHeight;it>0&&N(rt=>Math.abs(rt-it)>.5?it:rt),ot>0&&f(rt=>Math.abs(rt-ot)>.5?ot:rt)};Ie.id=requestAnimationFrame(Ye);const Ne=new ResizeObserver(()=>{cancelAnimationFrame(Ie.id),Ie.id=requestAnimationFrame(Ye)});return Ne.observe(Re),Ne.observe(xe),()=>{cancelAnimationFrame(Ie.id),Ne.disconnect()}},[$,Y,Te,S,C,Z]),s.useLayoutEffect(()=>{if(!Z||d<=0)return;const Re=J.current;Re&&Tf(Re)},[Z,d,u,T]),s.useLayoutEffect(()=>{if(!$||!R)return;const Re=q.current;if(!Re)return;const xe={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},Ie=()=>{for(const Pt of xe.itemsCache)for(const kt of Pt.glyphs)ec(kt.inner)},Ye=()=>{const Pt=ce.current??Re;xe.itemsCache=Array.from(Re.querySelectorAll("[data-marquee-text-item]"),kt=>{const ut=[];return kt.querySelectorAll("[data-marquee-wave-node]").forEach(gt=>{const $t=gt.firstElementChild;$t&&ut.push({inner:$t,layoutLocalX:kf(gt,Pt)})}),{item:kt,glyphs:ut}}),xe.cacheDirty=!1},Ne=()=>{xe.cacheDirty&&Ye();const kt=(ce.current??Re).offsetWidth||1,ut=kt*ne.current,gt=Pe.current,$t=2*Math.PI*gt/kt,Tt=`${kt}|${ut}|${$t}`;if(Tt!==xe.lutKey&&(xe.lutKey=Tt,xe.lut=Su(ut,$t,bu)),Math.abs(ut)<=0||$t<=0){Ie();return}const ft=J.current,At=ft?Pf(getComputedStyle(ft).transform):0,zt=Re.getBoundingClientRect(),jt=zt.left,Zt=zt.right,Ct=xe.lut&&xe.lut.wavelength>0?Math.max(0,(xe.lut.periodArc/xe.lut.wavelength-1)*kt):0;for(const{item:Vt,glyphs:rn}of xe.itemsCache){const lt=Vt.getBoundingClientRect();if(lt.right<jt||lt.left>Zt+Ct){for(const ke of rn)ec(ke.inner);continue}for(const ke of rn){const je=ke.layoutLocalX+At,Qe=xe.lut?Mf(xe.lut,je):je,dt=$t*Qe,xt=ut*Math.sin(dt),Et=ut*$t*Math.cos(dt),yt=Math.atan(Et)*(180/Math.PI);Rf(ke.inner,Qe-je,xt,yt)}}},it=()=>{xe.cancelled||(xe.raf=0,Ne(),ue.current&&!document.hidden&&(xe.raf=requestAnimationFrame(it)))},ot=()=>{xe.cancelled||xe.raf||(xe.raf=requestAnimationFrame(it))},rt=()=>{xe.cacheDirty=!0,Ne(),ot()};ee.current=ot,de.current=rt,Ne(),ot();const ht=()=>{if(document.hidden){cancelAnimationFrame(xe.raf),xe.raf=0;return}cancelAnimationFrame(xe.raf),xe.raf=0,rt()};return document.addEventListener("visibilitychange",ht),window.addEventListener("pageshow",ht),window.addEventListener("focus",ht),()=>{xe.cancelled=!0,ee.current=null,de.current=null,cancelAnimationFrame(xe.raf),document.removeEventListener("visibilitychange",ht),window.removeEventListener("pageshow",ht),window.removeEventListener("focus",ht),Ie()}},[$,R]),s.useLayoutEffect(()=>{var Re;!$||!R||(Re=de.current)==null||Re.call(de)},[$,R,r,Y,I,Te,k,F,X]),s.useLayoutEffect(()=>{var Re;(Re=ee.current)==null||Re.call(ee)},[M,u]);const te=()=>{j&&le(!0)},Ae=()=>{j&&le(!1)},he=$?Math.abs(k)*100:0,Q=E(V),Ze={minHeight:Q,...$?{paddingTop:`${he}%`,paddingBottom:`${he}%`}:{}},Fe={height:Q,...$?{visibility:"hidden"}:{backgroundColor:H}},et={gap:E(x),minHeight:Q},Ue=X*k,nt=Math.abs(Ue),tt=U>0?U:$e,Ve=Math.max($e,tt),fe=nt+Ve/2,He=Math.max(tt,1),Be=$&&X>0&&Ve>0?Af(X,Ue,F,fe,He):"",Je=nt*2+Ve,Ce=Be?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${X} ${Je}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:Be,fill:"none",stroke:H,strokeWidth:tt,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,De=a.jsx("div",{ref:We,className:`${o}-ribbon`,style:Fe,"aria-hidden":!0}),Xe=(Re,xe,Ie)=>a.jsx(Ff,{item:Re,prefix:o,textCss:g,capHeightPx:Te,opticalOffsetY:ve,imageGapPx:E(x),isCurve:$},`${xe}-${Ie}`),ge=a.jsx("span",{ref:ye,"aria-hidden":!0,className:`${o}-cap-ref`,style:g,children:"H"}),Ee=`${Math.max(0,re)/1e3}s`,ze=Z?a.jsx("div",{ref:J,className:`${o}-marquee-track`,"data-direction":u,onMouseEnter:te,onMouseLeave:Ae,style:{WebkitAnimationDuration:Ee,animationDuration:Ee,WebkitAnimationPlayState:se,animationPlayState:se},children:Array.from({length:B},(Re,xe)=>a.jsx("div",{ref:xe===0?be:void 0,className:`${o}-marquee-set`,style:{...et,paddingRight:E(x)},"aria-hidden":xe>0,children:oe.map((Ie,Ye)=>Xe(Ie,xe,Ye))},`set-${xe}`))}):a.jsx("div",{ref:be,className:St(`${o}-marquee-set`,`${o}-marquee-static`),style:et,children:t==null?void 0:t.map((Re,xe)=>Xe(Re,0,xe))});return a.jsxs("div",{ref:q,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:W}}),ge,a.jsxs("div",{ref:ce,className:`${o}-marquee-wrapper`,style:Ze,children:[De,Ce,ze]})]})},_f=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
2609
2609
  import cn from 'classnames';
2610
2610
  import { CommonComponentProps } from '../props';
2611
2611
  import { scalingValue } from '../utils/scalingValue';
@@ -3535,7 +3535,7 @@ type MarqueeTextProps = {
3535
3535
  isPreviewMode?: boolean;
3536
3536
  isEditMode?: boolean;
3537
3537
  } & CommonComponentProps;
3538
- `,Af={fontSettings:{type:"object",scope:"common",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ff={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},ribbonWidth:{type:"number",scope:"layout",title:"Ribbon Width",min:0,display:{type:"numeric-input"}},layoutType:{type:"string",scope:"common",title:"Path Type",display:{type:"toggle-cycle",enum:["straight","curve"]}},curveAmplitude:{type:"number",scope:"layout",title:"Amplitude",min:-30,max:30,step:1,display:{type:"common-numeric-input",visible:!1}},curveFrequency:{type:"number",scope:"layout",title:"Frequency",min:0,max:100,step:1,display:{type:"common-numeric-input",visible:!1}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Af.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"},backgroundColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Ribbon Color"}},defaults:{direction:"left",pauseOnHover:"off",layoutType:"curve",textFontFamily:"Antique Série",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#FFFFFF",backgroundColor:"#2E12F0"},layoutDefaults:{m:{speed:.55,gap:.04,ribbonWidth:.08,curveAmplitude:6,curveFrequency:15,textFontSize:.08,textLineHeight:.08},t:{speed:1.3,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:15,textFontSize:.07,textLineHeight:.05},d:{speed:2.5,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:18,textFontSize:.071,textLineHeight:.035}},displayRules:[{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveAmplitude.display.visible",value:!0}},{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveFrequency.display.visible",value:!0}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","ribbonWidth","layoutType","curveAmplitude","curveFrequency"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction","speed"]},{type:"row",items:["ribbonWidth","gap"]},{type:"row",items:["pauseOnHover","layoutType"]},{type:"row",items:["curveAmplitude","curveFrequency"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}],paletteBookmark:{items:["textColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{text:{placeholder:"Add text...",label:"Text",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-input"}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}}},default:[{text:"NEW WORK",image:{url:"https://cdn.cntrl.site/component-assets/marquee_text_icon.svg",name:""},link:""}]}},Nf={element:Mf,id:"marquee-text",name:"Marquee Text",category:"typography",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Text_Marquee.mp4"},schema:Ff,sourceCode:kf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}};function _f(e,t){const n=t>0?`${t}px`:"0px";return`
3538
+ `,Wf={fontSettings:{type:"object",scope:"common",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Hf={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},ribbonWidth:{type:"number",scope:"layout",title:"Ribbon Width",min:0,display:{type:"numeric-input"}},layoutType:{type:"string",scope:"common",title:"Path Type",display:{type:"toggle-cycle",enum:["straight","curve"]}},curveAmplitude:{type:"number",scope:"layout",title:"Amplitude",min:-30,max:30,step:1,display:{type:"common-numeric-input",visible:!1}},curveFrequency:{type:"number",scope:"layout",title:"Frequency",min:0,max:100,step:1,display:{type:"common-numeric-input",visible:!1}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Wf.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"},backgroundColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Ribbon Color"}},defaults:{direction:"left",pauseOnHover:"off",layoutType:"curve",textFontFamily:"Antique Série",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#FFFFFF",backgroundColor:"#2E12F0"},layoutDefaults:{m:{speed:.55,gap:.04,ribbonWidth:.08,curveAmplitude:6,curveFrequency:15,textFontSize:.08,textLineHeight:.08},t:{speed:1.3,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:15,textFontSize:.07,textLineHeight:.05},d:{speed:2.5,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:18,textFontSize:.071,textLineHeight:.035}},displayRules:[{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveAmplitude.display.visible",value:!0}},{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveFrequency.display.visible",value:!0}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","ribbonWidth","layoutType","curveAmplitude","curveFrequency"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction","speed"]},{type:"row",items:["ribbonWidth","gap"]},{type:"row",items:["pauseOnHover","layoutType"]},{type:"row",items:["curveAmplitude","curveFrequency"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}],paletteBookmark:{items:["textColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{text:{placeholder:"Add text...",label:"Text",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-input"}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}}},default:[{text:"NEW WORK",image:{url:"https://cdn.cntrl.site/component-assets/marquee_text_icon.svg",name:""},link:""}]}},Of={element:Nf,id:"marquee-text",name:"Marquee Text",category:"typography",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Text_Marquee.mp4"},schema:Hf,sourceCode:_f,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}};function Df(e,t){const n=t>0?`${t}px`:"0px";return`
3539
3539
  .${e}-marquee-wrapper {
3540
3540
  overflow: hidden;
3541
3541
  width: 100%;
@@ -3624,7 +3624,7 @@ type MarqueeTextProps = {
3624
3624
  pointer-events: auto;
3625
3625
  z-index: 10;
3626
3626
  }
3627
- `}const Wf=30,ec=2,Hf=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},Of=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=A.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:p,cardWidth:x,corners:v,stroke:m,strokeColor:h,bgColor:y,padding:b,logoMarginTop:C,logoWidth:S,logoHeight:w,captionMarginTop:D}=e,_=!!o,z=((t==null?void 0:t.length)??0)>0,H=d>0&&(!n||i),L=z&&(H||n),V=Math.max(0,d)*Wf,$=I=>A.scalingValue(I,n??!1),E=s.useRef(null),F=s.useRef(null),W=s.useRef(null),[g,M]=s.useState(0),[R,G]=s.useState(0),Z=R>0?R:0,T=s.useMemo(()=>_f(r,Z),[r,Z]),[j,Y]=s.useState(0),le=H&&u==="on",[se,k]=s.useState(!1),re=s.useRef(null),[q,ce]=s.useState(0),[J,be]=s.useState(0),We=s.useRef(null),ye=I=>{var oe,B,te,Ae,he;return{fontSettings:{fontFamily:(e==null?void 0:e[`${I}FontFamily`])??"Arial",fontWeight:((oe=e==null?void 0:e[`${I}FontSettings`])==null?void 0:oe.fontWeight)??400,fontStyle:((B=e==null?void 0:e[`${I}FontSettings`])==null?void 0:B.fontStyle)??"normal"},textAppearance:{textTransform:((te=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:te.textTransform)??"none",textDecoration:((Ae=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:Ae.textDecoration)??"none",fontVariant:((he=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:he.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${I}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${I}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${I}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${I}LineHeight`])??.01,color:(e==null?void 0:e[`${I}Color`])??"#000000"}},ue=ye("text"),ee=ye("caption"),de=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(I=>{var ie,oe;return(((ie=I.text)==null?void 0:ie.length)??0)>0||(((oe=I.caption)==null?void 0:oe.length)??0)>0}),[t]),ne=s.useMemo(()=>!L||(t==null?void 0:t.length)===0?1:R<=0||g<=0?ec:Math.max(ec,Math.ceil(g/R)+1),[L,t==null?void 0:t.length,R,g]);s.useLayoutEffect(()=>{if(!L)return;const I=E.current,ie=W.current;if(!I||!ie)return;let oe=0;const B=()=>{const he=I.getBoundingClientRect().width,Q=ie.getBoundingClientRect().width,Ze=We.current,Fe=typeof Ze=="number"&&Math.abs(Ze-Q)<=.25;if(We.current=Q,M(he),typeof Q=="number"&&Q>0&&R<=0){G(Q);return}Fe&&Q!==R?G(Q):!Fe&&R<=0&&(cancelAnimationFrame(oe),oe=requestAnimationFrame(B))},te=()=>{cancelAnimationFrame(oe),oe=requestAnimationFrame(B)};te();const Ae=new ResizeObserver(te);return Ae.observe(I),Ae.observe(ie),()=>{cancelAnimationFrame(oe),Ae.disconnect()}},[H,L,R]);const Pe=Z>0&&V>0?Z/V*1e3:0,Te=`${Math.max(0,Pe)/1e3}s`;s.useLayoutEffect(()=>{if(!L||Z<=0)return;const I=F.current;I&&Hf(I)},[L,Z,c]),s.useLayoutEffect(()=>{if(!L){Y(0);return}const I=W.current,ie=F.current;if(!I||!ie)return;const oe=()=>{let te=0;for(let Ae=0;Ae<I.children.length;Ae++){const Q=I.children[Ae].firstElementChild;Q&&(te=Math.max(te,Q.offsetHeight))}te<=0&&(te=ie.offsetHeight),Y(te>0?te:0)};oe();const B=new ResizeObserver(oe);return B.observe(I),B.observe(ie),()=>{B.disconnect()}},[L,ne,t,n,p,x,b,m,v,S,w,q,J]);const Oe=()=>{le&&k(!0)},ve=()=>{le&&k(!1)},Se=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),$e=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),f=s.useCallback((I,ie,oe,B)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Se,width:"100%"},children:[a.jsx("div",{"data-controls":_?B==null?void 0:B.controlsName:void 0,"data-controls-axis":_?"y":void 0,className:_?`${r}-control`:void 0,style:{height:$((B==null?void 0:B.marginTop)??0)}}),a.jsx("div",{...B!=null&&B.dataMeasureKind?{"data-testimonial-measure":B.dataMeasureKind}:{},style:{...Qt(I,n),textAlign:$e,pointerEvents:"auto",...typeof(B==null?void 0:B.minHeightPx)=="number"&&B.minHeightPx>0?{minHeight:B.minHeightPx}:{}},children:a.jsx(Yi,{content:ie})})]},oe),[Se,$e,n,_,r,$]),X=s.useCallback((I,ie,oe)=>{var B,te,Ae;return a.jsxs("div",{style:{padding:`${$(b.top)} ${$(b.right)} ${$(b.bottom)} ${$(b.left)}`,width:$(x+m*2),height:"100%",borderRadius:$(v),border:`${$(m)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:y}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:Se,textAlign:$e},children:[I.text&&f(ue,I.text,"text",oe!=null&&oe.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(oe==null?void 0:oe.textMinHeightPx)=="number"&&oe.textMinHeightPx>0?{minHeightPx:oe.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Se,width:"100%"},children:[a.jsx("div",{"data-controls":_&&!(oe!=null&&oe.dataMeasureAttrs)?"logoMarginTop":void 0,className:_&&!(oe!=null&&oe.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:$(C)}}),a.jsx("div",{style:{width:$(S),height:$(w)},children:((B=I.logo)==null?void 0:B.url)&&a.jsx("img",{src:I.logo.url,alt:((te=I.logo)==null?void 0:te.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Ae=I.logo)==null?void 0:Ae.objectFit)||"contain"}})})]}),I.caption&&f(ee,I.caption,"caption",{...oe!=null&&oe.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:D,...oe!=null&&oe.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(oe==null?void 0:oe.captionMinHeightPx)=="number"&&oe.captionMinHeightPx>0?{minHeightPx:oe.captionMinHeightPx}:{}})]})]},ie)},[y,D,ee,x,v,w,C,S,Se,$e,b.bottom,b.left,b.right,b.top,f,m,h,ue,n,_,r]),N=s.useCallback(I=>{ce(I.maxTextPx),be(I.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!de){N({maxTextPx:0,maxCaptionPx:0});return}const I=re.current;if(!I)return;const ie=()=>{A.readTestimonialTextMeasure(I,N)};ie();const oe=new ResizeObserver(ie);return oe.observe(I),()=>{oe.disconnect()}},[de,N,t,X]);const U=de?{textMinHeightPx:q,captionMinHeightPx:J}:void 0,me=de?a.jsx("div",{ref:re,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((I,ie)=>X(I,`measure-${ie}`,{dataMeasureAttrs:!0}))}):null,K=(I,ie)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[X(I,`card-${ie}`,U),_&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(p)})`,width:$(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},ie);if(L){const I=H?le&&se?"paused":"running":"paused";return a.jsxs("div",{ref:E,className:St(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...j>0?{height:j}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:T}}),me,a.jsx("div",{ref:F,className:`${r}-marquee-track`,"data-direction":c,onMouseEnter:Oe,onMouseLeave:ve,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",animationDuration:Te,WebkitAnimationDuration:Te,animationPlayState:I,WebkitAnimationPlayState:I},children:Array.from({length:ne},(ie,oe)=>a.jsx("div",{ref:oe===0?W:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(p),paddingRight:$(p)},"aria-hidden":oe>0,children:t==null?void 0:t.map((B,te)=>K(B,`${oe}-${te}`))},`set-${oe}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:T}}),me,a.jsx("div",{style:{gap:$(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((I,ie)=>K(I,ie))})]})},Df=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3627
+ `}const zf=30,tc=2,Bf=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},jf=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=A.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:p,cardWidth:x,corners:y,stroke:m,strokeColor:h,bgColor:v,padding:b,logoMarginTop:C,logoWidth:S,logoHeight:w,captionMarginTop:D}=e,_=!!o,z=((t==null?void 0:t.length)??0)>0,H=d>0&&(!n||i),L=z&&(H||n),V=Math.max(0,d)*zf,$=I=>A.scalingValue(I,n??!1),k=s.useRef(null),F=s.useRef(null),W=s.useRef(null),[g,E]=s.useState(0),[R,G]=s.useState(0),Z=R>0?R:0,T=s.useMemo(()=>Df(r,Z),[r,Z]),[j,K]=s.useState(0),le=H&&u==="on",[se,M]=s.useState(!1),re=s.useRef(null),[q,ce]=s.useState(0),[J,be]=s.useState(0),We=s.useRef(null),ye=I=>{var oe,B,te,Ae,he;return{fontSettings:{fontFamily:(e==null?void 0:e[`${I}FontFamily`])??"Arial",fontWeight:((oe=e==null?void 0:e[`${I}FontSettings`])==null?void 0:oe.fontWeight)??400,fontStyle:((B=e==null?void 0:e[`${I}FontSettings`])==null?void 0:B.fontStyle)??"normal"},textAppearance:{textTransform:((te=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:te.textTransform)??"none",textDecoration:((Ae=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:Ae.textDecoration)??"none",fontVariant:((he=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:he.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${I}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${I}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${I}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${I}LineHeight`])??.01,color:(e==null?void 0:e[`${I}Color`])??"#000000"}},ue=ye("text"),ee=ye("caption"),de=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(I=>{var ie,oe;return(((ie=I.text)==null?void 0:ie.length)??0)>0||(((oe=I.caption)==null?void 0:oe.length)??0)>0}),[t]),ne=s.useMemo(()=>!L||(t==null?void 0:t.length)===0?1:R<=0||g<=0?tc:Math.max(tc,Math.ceil(g/R)+1),[L,t==null?void 0:t.length,R,g]);s.useLayoutEffect(()=>{if(!L)return;const I=k.current,ie=W.current;if(!I||!ie)return;let oe=0;const B=()=>{const he=I.getBoundingClientRect().width,Q=ie.getBoundingClientRect().width,Ze=We.current,Fe=typeof Ze=="number"&&Math.abs(Ze-Q)<=.25;if(We.current=Q,E(he),typeof Q=="number"&&Q>0&&R<=0){G(Q);return}Fe&&Q!==R?G(Q):!Fe&&R<=0&&(cancelAnimationFrame(oe),oe=requestAnimationFrame(B))},te=()=>{cancelAnimationFrame(oe),oe=requestAnimationFrame(B)};te();const Ae=new ResizeObserver(te);return Ae.observe(I),Ae.observe(ie),()=>{cancelAnimationFrame(oe),Ae.disconnect()}},[H,L,R]);const Pe=Z>0&&V>0?Z/V*1e3:0,Te=`${Math.max(0,Pe)/1e3}s`;s.useLayoutEffect(()=>{if(!L||Z<=0)return;const I=F.current;I&&Bf(I)},[L,Z,c]),s.useLayoutEffect(()=>{if(!L){K(0);return}const I=W.current,ie=F.current;if(!I||!ie)return;const oe=()=>{let te=0;for(let Ae=0;Ae<I.children.length;Ae++){const Q=I.children[Ae].firstElementChild;Q&&(te=Math.max(te,Q.offsetHeight))}te<=0&&(te=ie.offsetHeight),K(te>0?te:0)};oe();const B=new ResizeObserver(oe);return B.observe(I),B.observe(ie),()=>{B.disconnect()}},[L,ne,t,n,p,x,b,m,y,S,w,q,J]);const Oe=()=>{le&&M(!0)},ve=()=>{le&&M(!1)},Se=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),$e=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),f=s.useCallback((I,ie,oe,B)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Se,width:"100%"},children:[a.jsx("div",{"data-controls":_?B==null?void 0:B.controlsName:void 0,"data-controls-axis":_?"y":void 0,className:_?`${r}-control`:void 0,style:{height:$((B==null?void 0:B.marginTop)??0)}}),a.jsx("div",{...B!=null&&B.dataMeasureKind?{"data-testimonial-measure":B.dataMeasureKind}:{},style:{...Qt(I,n),textAlign:$e,pointerEvents:"auto",...typeof(B==null?void 0:B.minHeightPx)=="number"&&B.minHeightPx>0?{minHeight:B.minHeightPx}:{}},children:a.jsx(Ki,{content:ie})})]},oe),[Se,$e,n,_,r,$]),X=s.useCallback((I,ie,oe)=>{var B,te,Ae;return a.jsxs("div",{style:{padding:`${$(b.top)} ${$(b.right)} ${$(b.bottom)} ${$(b.left)}`,width:$(x+m*2),height:"100%",borderRadius:$(y),border:`${$(m)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:v}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:Se,textAlign:$e},children:[I.text&&f(ue,I.text,"text",oe!=null&&oe.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(oe==null?void 0:oe.textMinHeightPx)=="number"&&oe.textMinHeightPx>0?{minHeightPx:oe.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Se,width:"100%"},children:[a.jsx("div",{"data-controls":_&&!(oe!=null&&oe.dataMeasureAttrs)?"logoMarginTop":void 0,className:_&&!(oe!=null&&oe.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:$(C)}}),a.jsx("div",{style:{width:$(S),height:$(w)},children:((B=I.logo)==null?void 0:B.url)&&a.jsx("img",{src:I.logo.url,alt:((te=I.logo)==null?void 0:te.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Ae=I.logo)==null?void 0:Ae.objectFit)||"contain"}})})]}),I.caption&&f(ee,I.caption,"caption",{...oe!=null&&oe.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:D,...oe!=null&&oe.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(oe==null?void 0:oe.captionMinHeightPx)=="number"&&oe.captionMinHeightPx>0?{minHeightPx:oe.captionMinHeightPx}:{}})]})]},ie)},[v,D,ee,x,y,w,C,S,Se,$e,b.bottom,b.left,b.right,b.top,f,m,h,ue,n,_,r]),N=s.useCallback(I=>{ce(I.maxTextPx),be(I.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!de){N({maxTextPx:0,maxCaptionPx:0});return}const I=re.current;if(!I)return;const ie=()=>{A.readTestimonialTextMeasure(I,N)};ie();const oe=new ResizeObserver(ie);return oe.observe(I),()=>{oe.disconnect()}},[de,N,t,X]);const U=de?{textMinHeightPx:q,captionMinHeightPx:J}:void 0,me=de?a.jsx("div",{ref:re,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((I,ie)=>X(I,`measure-${ie}`,{dataMeasureAttrs:!0}))}):null,Y=(I,ie)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[X(I,`card-${ie}`,U),_&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(p)})`,width:$(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},ie);if(L){const I=H?le&&se?"paused":"running":"paused";return a.jsxs("div",{ref:k,className:St(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...j>0?{height:j}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:T}}),me,a.jsx("div",{ref:F,className:`${r}-marquee-track`,"data-direction":c,onMouseEnter:Oe,onMouseLeave:ve,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",animationDuration:Te,WebkitAnimationDuration:Te,animationPlayState:I,WebkitAnimationPlayState:I},children:Array.from({length:ne},(ie,oe)=>a.jsx("div",{ref:oe===0?W:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(p),paddingRight:$(p)},"aria-hidden":oe>0,children:t==null?void 0:t.map((B,te)=>Y(B,`${oe}-${te}`))},`set-${oe}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:T}}),me,a.jsx("div",{style:{gap:$(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((I,ie)=>Y(I,ie))})]})},Vf=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3628
3628
  import cn from 'classnames';
3629
3629
  import { CommonComponentProps } from '../props';
3630
3630
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4255,7 +4255,7 @@ type TestimonialsSettings = {
4255
4255
  logoHeight: number;
4256
4256
  captionMarginTop: number;
4257
4257
  };
4258
- `,tc={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},zf={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...tc.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:{...tc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.069,textLineHeight:.093,captionFontSize:.053,captionLineHeight:.069},t:{speed:1.64,gap:.02,cardWidth:.44,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.065,left:.01},logoMarginTop:.1,logoWidth:.052,logoHeight:.052,captionMarginTop:.005,textFontSize:.035,textLineHeight:.04,captionFontSize:.023,captionLineHeight:.029},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Bf={element:Of,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:zf,sourceCode:Df,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function jf(e){return`
4258
+ `,nc={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Gf={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...nc.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:{...nc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.069,textLineHeight:.093,captionFontSize:.053,captionLineHeight:.069},t:{speed:1.64,gap:.02,cardWidth:.44,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.065,left:.01},logoMarginTop:.1,logoWidth:.052,logoHeight:.052,captionMarginTop:.005,textFontSize:.035,textLineHeight:.04,captionFontSize:.023,captionLineHeight:.029},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Xf={element:jf,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:Gf,sourceCode:Vf,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function qf(e){return`
4259
4259
  .${e}-container {
4260
4260
  position: relative;
4261
4261
  overflow-x: clip;
@@ -4379,7 +4379,7 @@ type TestimonialsSettings = {
4379
4379
  width: 100%;
4380
4380
  height: 100%;
4381
4381
  }
4382
- `}const Vf=3e3,Gf=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=A.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:p,textMarginTop:x,captionMarginTop:v,imageWidth:m,imageHeight:h,controlsWidth:y,controlsColor:b,controlsHoverColor:C}=e,S=d>0&&(!n||!!i),[w,D]=s.useState(0),[_,z]=s.useState(null),[H,L]=s.useState(!1),V=s.useRef(null),$=s.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),E=s.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);s.useEffect(()=>{D(0),z(null),L(!1)},[l.length]);const F=l[w],W=_===null?null:l[_],g=ye=>{var ee,de,ne,Pe,Te;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ye}FontFamily`])??"Arial",fontWeight:((ee=e==null?void 0:e[`${ye}FontSettings`])==null?void 0:ee.fontWeight)??400,fontStyle:((de=e==null?void 0:e[`${ye}FontSettings`])==null?void 0:de.fontStyle)??"normal"},textAppearance:{textTransform:((ne=e==null?void 0:e[`${ye}TextAppearance`])==null?void 0:ne.textTransform)??"none",textDecoration:((Pe=e==null?void 0:e[`${ye}TextAppearance`])==null?void 0:Pe.textDecoration)??"none",fontVariant:((Te=e==null?void 0:e[`${ye}TextAppearance`])==null?void 0:Te.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ye}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ye}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ye}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ye}WordSpacing`])??0,color:(e==null?void 0:e[`${ye}Color`])??"#000000"}},M=g("text"),R=g("caption"),G=l.length>1&&l.some(ye=>{var ue,ee;return(((ue=ye.text)==null?void 0:ue.length)??0)>0||(((ee=ye.caption)==null?void 0:ee.length)??0)>0}),Z=s.useRef(null),[T,j]=s.useState(0),[Y,le]=s.useState(0),se=e.controls??{mode:"Off",icon:null},k=l.length>1,re=s.useCallback((ye,ue)=>!k||ue===ye?ye:(V.current&&window.clearTimeout(V.current),z(ye),L(!0),V.current=window.setTimeout(()=>{z(null),L(!1),V.current=null},300),ue),[k]),q=s.useCallback(()=>{k&&D(ye=>re(ye,(ye-1+l.length)%l.length))},[k,re,l.length]),ce=s.useCallback(()=>{k&&D(ye=>re(ye,(ye+1)%l.length))},[k,re,l.length]);s.useEffect(()=>{if(!S||!k)return;const ye=Math.max(300,Vf/d),ue=window.setInterval(()=>{D(ee=>re(ee,(ee+1)%l.length))},ye);return()=>{window.clearInterval(ue)}},[S,k,re,l.length,d]),s.useEffect(()=>()=>{V.current&&window.clearTimeout(V.current)},[]);const J=(ye,ue)=>{var Te,Oe,ve,Se;const ee=ue==null?void 0:ue.textMinHeightPx,de=ue==null?void 0:ue.captionMinHeightPx,ne=ue==null?void 0:ue.dataMeasureAttrs,Pe=o&&!(ue!=null&&ue.dataMeasureAttrs)&&!(ue!=null&&ue.hideControls);return a.jsxs(a.Fragment,{children:[ye.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Pe?"textMarginTop":void 0,className:Pe?`${r}-control`:void 0,style:{height:A.scalingValue(x??0,n??!1)}}),a.jsx("div",{...ne&&{"data-testimonial-measure":"text"},style:{...Qt(M,n),...ee&&ee>0?{minHeight:ee}:{},textAlign:E,pointerEvents:"auto"},children:a.jsx(Yi,{content:ye.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Pe?"imageMarginTop":void 0,className:Pe?`${r}-control`:void 0,style:{height:A.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:A.scalingValue(m??0,n??!1),height:A.scalingValue(h??0,n??!1)},children:((Te=ye.image)==null?void 0:Te.url)&&a.jsx("img",{src:(Oe=ye.image)==null?void 0:Oe.url,alt:((ve=ye.image)==null?void 0:ve.name)??"",className:`${r}-icon`,style:{objectFit:((Se=ye.image)==null?void 0:Se.objectFit)||"contain"}})})]}),ye.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Pe?"captionMarginTop":void 0,className:Pe?`${r}-control`:void 0,style:{height:A.scalingValue(v??0,n??!1)}}),a.jsx("div",{...ne?{"data-testimonial-measure":"caption"}:{},style:{...Qt(R,n),...de&&de>0?{minHeight:de}:{},textAlign:E,pointerEvents:"auto"},children:a.jsx(Yi,{content:ye.caption})})]})]})},be=s.useCallback(ye=>{j(ye.maxTextPx),le(ye.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!G){be({maxTextPx:0,maxCaptionPx:0});return}const ye=Z.current;if(!ye)return;const ue=()=>{A.readTestimonialTextMeasure(ye,be)};ue();const ee=new ResizeObserver(ue);return ee.observe(ye),()=>{ee.disconnect()}},[G,be,t]),!F)return a.jsx(a.Fragment,{});const We=G?{textMinHeightPx:T,captionMinHeightPx:Y}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:jf(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:A.scalingValue(u??0,n??!1),alignItems:$},children:[G&&a.jsx("div",{ref:Z,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((ye,ue)=>a.jsx("div",{style:{width:"100%"},children:J(ye,{dataMeasureAttrs:!0})},ue))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[W&&H&&a.jsx("div",{className:St(`${r}-fade-item-prev`,`${r}-fade-out`),children:J(W,{...We,hideControls:!0})}),a.jsx("div",{className:St(`${r}-fade-item-current`,H?`${r}-fade-in`:void 0),children:J(F,We)})]})]}),se.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:A.scalingValue(y??.02,n??!1),height:A.scalingValue(y??.02,n??!1),"--arrow-hover-color":C},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:q,disabled:!k,"aria-label":"Previous testimonial",children:se.icon&&a.jsx(un,{url:se.icon,fill:b,hoverFill:C,className:St(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:St(`${r}-arrow`,`${r}-next-arrow`),style:{width:A.scalingValue(y??.02,n??!1),height:A.scalingValue(y??.02,n??!1),"--arrow-hover-color":C},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:ce,disabled:!k,"aria-label":"Next testimonial",children:se.icon&&a.jsx(un,{url:se.icon,fill:b,hoverFill:C,className:`${r}-arrow-img`})})})]})]})})},Xf=`import cn from 'classnames';
4382
+ `}const Uf=3e3,Yf=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=A.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:p,textMarginTop:x,captionMarginTop:y,imageWidth:m,imageHeight:h,controlsWidth:v,controlsColor:b,controlsHoverColor:C}=e,S=d>0&&(!n||!!i),[w,D]=s.useState(0),[_,z]=s.useState(null),[H,L]=s.useState(!1),V=s.useRef(null),$=s.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),k=s.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);s.useEffect(()=>{D(0),z(null),L(!1)},[l.length]);const F=l[w],W=_===null?null:l[_],g=ye=>{var ee,de,ne,Pe,Te;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ye}FontFamily`])??"Arial",fontWeight:((ee=e==null?void 0:e[`${ye}FontSettings`])==null?void 0:ee.fontWeight)??400,fontStyle:((de=e==null?void 0:e[`${ye}FontSettings`])==null?void 0:de.fontStyle)??"normal"},textAppearance:{textTransform:((ne=e==null?void 0:e[`${ye}TextAppearance`])==null?void 0:ne.textTransform)??"none",textDecoration:((Pe=e==null?void 0:e[`${ye}TextAppearance`])==null?void 0:Pe.textDecoration)??"none",fontVariant:((Te=e==null?void 0:e[`${ye}TextAppearance`])==null?void 0:Te.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ye}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ye}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ye}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ye}WordSpacing`])??0,color:(e==null?void 0:e[`${ye}Color`])??"#000000"}},E=g("text"),R=g("caption"),G=l.length>1&&l.some(ye=>{var ue,ee;return(((ue=ye.text)==null?void 0:ue.length)??0)>0||(((ee=ye.caption)==null?void 0:ee.length)??0)>0}),Z=s.useRef(null),[T,j]=s.useState(0),[K,le]=s.useState(0),se=e.controls??{mode:"Off",icon:null},M=l.length>1,re=s.useCallback((ye,ue)=>!M||ue===ye?ye:(V.current&&window.clearTimeout(V.current),z(ye),L(!0),V.current=window.setTimeout(()=>{z(null),L(!1),V.current=null},300),ue),[M]),q=s.useCallback(()=>{M&&D(ye=>re(ye,(ye-1+l.length)%l.length))},[M,re,l.length]),ce=s.useCallback(()=>{M&&D(ye=>re(ye,(ye+1)%l.length))},[M,re,l.length]);s.useEffect(()=>{if(!S||!M)return;const ye=Math.max(300,Uf/d),ue=window.setInterval(()=>{D(ee=>re(ee,(ee+1)%l.length))},ye);return()=>{window.clearInterval(ue)}},[S,M,re,l.length,d]),s.useEffect(()=>()=>{V.current&&window.clearTimeout(V.current)},[]);const J=(ye,ue)=>{var Te,Oe,ve,Se;const ee=ue==null?void 0:ue.textMinHeightPx,de=ue==null?void 0:ue.captionMinHeightPx,ne=ue==null?void 0:ue.dataMeasureAttrs,Pe=o&&!(ue!=null&&ue.dataMeasureAttrs)&&!(ue!=null&&ue.hideControls);return a.jsxs(a.Fragment,{children:[ye.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Pe?"textMarginTop":void 0,className:Pe?`${r}-control`:void 0,style:{height:A.scalingValue(x??0,n??!1)}}),a.jsx("div",{...ne&&{"data-testimonial-measure":"text"},style:{...Qt(E,n),...ee&&ee>0?{minHeight:ee}:{},textAlign:k,pointerEvents:"auto"},children:a.jsx(Ki,{content:ye.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Pe?"imageMarginTop":void 0,className:Pe?`${r}-control`:void 0,style:{height:A.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:A.scalingValue(m??0,n??!1),height:A.scalingValue(h??0,n??!1)},children:((Te=ye.image)==null?void 0:Te.url)&&a.jsx("img",{src:(Oe=ye.image)==null?void 0:Oe.url,alt:((ve=ye.image)==null?void 0:ve.name)??"",className:`${r}-icon`,style:{objectFit:((Se=ye.image)==null?void 0:Se.objectFit)||"contain"}})})]}),ye.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Pe?"captionMarginTop":void 0,className:Pe?`${r}-control`:void 0,style:{height:A.scalingValue(y??0,n??!1)}}),a.jsx("div",{...ne?{"data-testimonial-measure":"caption"}:{},style:{...Qt(R,n),...de&&de>0?{minHeight:de}:{},textAlign:k,pointerEvents:"auto"},children:a.jsx(Ki,{content:ye.caption})})]})]})},be=s.useCallback(ye=>{j(ye.maxTextPx),le(ye.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!G){be({maxTextPx:0,maxCaptionPx:0});return}const ye=Z.current;if(!ye)return;const ue=()=>{A.readTestimonialTextMeasure(ye,be)};ue();const ee=new ResizeObserver(ue);return ee.observe(ye),()=>{ee.disconnect()}},[G,be,t]),!F)return a.jsx(a.Fragment,{});const We=G?{textMinHeightPx:T,captionMinHeightPx:K}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:qf(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:A.scalingValue(u??0,n??!1),alignItems:$},children:[G&&a.jsx("div",{ref:Z,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((ye,ue)=>a.jsx("div",{style:{width:"100%"},children:J(ye,{dataMeasureAttrs:!0})},ue))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[W&&H&&a.jsx("div",{className:St(`${r}-fade-item-prev`,`${r}-fade-out`),children:J(W,{...We,hideControls:!0})}),a.jsx("div",{className:St(`${r}-fade-item-current`,H?`${r}-fade-in`:void 0),children:J(F,We)})]})]}),se.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:A.scalingValue(v??.02,n??!1),height:A.scalingValue(v??.02,n??!1),"--arrow-hover-color":C},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:q,disabled:!M,"aria-label":"Previous testimonial",children:se.icon&&a.jsx(un,{url:se.icon,fill:b,hoverFill:C,className:St(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:St(`${r}-arrow`,`${r}-next-arrow`),style:{width:A.scalingValue(v??.02,n??!1),height:A.scalingValue(v??.02,n??!1),"--arrow-hover-color":C},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:ce,disabled:!M,"aria-label":"Next testimonial",children:se.icon&&a.jsx(un,{url:se.icon,fill:b,hoverFill:C,className:`${r}-arrow-img`})})})]})]})})},Kf=`import cn from 'classnames';
4383
4383
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
4384
4384
  import { CommonComponentProps } from '../props';
4385
4385
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4875,12 +4875,12 @@ type TestimonialsSettings = {
4875
4875
  icon?: string | null;
4876
4876
  };
4877
4877
  };
4878
- `,qf="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>'),nc={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Uf={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...nc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Default"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...nc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Default"}},defaults:{controls:{mode:"On",icon:qf},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},t:{speed:1,width:.65,imageMarginTop:.026,captionMarginTop:.01,textMarginTop:0,textFontSize:.035,captionFontSize:.023,textLineHeight:.04,captionLineHeight:.029,imageWidth:.05,imageHeight:.05,controlsWidth:.026},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Kf={element:Gf,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700},t:{width:700},m:{width:334}},schema:Uf,sourceCode:Xf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function Yf(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ic(e){return((e==null?void 0:e.trim().length)??0)>0}function Va(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Ga(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:A.scalingValue((o-t)/2,i)}}function Zf(e){return`
4878
+ `,Zf="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>'),ic={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Jf={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...ic.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Default"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...ic.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Default"}},defaults:{controls:{mode:"On",icon:Zf},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},t:{speed:1,width:.65,imageMarginTop:.026,captionMarginTop:.01,textMarginTop:0,textFontSize:.035,captionFontSize:.023,textLineHeight:.04,captionLineHeight:.029,imageWidth:.05,imageHeight:.05,controlsWidth:.026},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Qf={element:Yf,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700},t:{width:700},m:{width:334}},schema:Jf,sourceCode:Kf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function ey(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function oc(e){return((e==null?void 0:e.trim().length)??0)>0}function Ga(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Xa(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:A.scalingValue((o-t)/2,i)}}function ty(e){return`
4879
4879
  .${e}-wrapper {
4880
4880
  display: grid;
4881
4881
  align-items: start;
4882
4882
  justify-content: center;
4883
- min-height: ${Yf(48)};
4883
+ min-height: ${ey(48)};
4884
4884
  }
4885
4885
  .${e}-item {
4886
4886
  display: flex;
@@ -5222,7 +5222,7 @@ type TestimonialsSettings = {
5222
5222
  z-index: 2;
5223
5223
  width: 100%;
5224
5224
  }
5225
- `}function Jf(){return Math.random()<.5?"ltr":"ttb"}function Qf(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function ey(e){const t=Jf();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Qf(e)})})}const Mn=500,ty=750,ci="cubic-bezier(0.22, 1, 0.36, 1)",ny=72,iy=50;function oy(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function ry(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function ay(e){const[t]=e.media;return t!=null&&t.url?t:null}function bu(e){return!Array.isArray(e)||e.length===0?[]:oy(e)?e.flatMap(t=>{const n=ry(t);if(!n)return[];const i=ay(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.url?i:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function qi(e){return e.type==="video"}function sy(e){const t=new Set,n=[];for(const i of e){const o=bu(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.url&&!t.has(l.url)&&(t.add(l.url),n.push(l))}}return n}function ly({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>qi(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function cy(e){e.pause(),e.removeAttribute("src"),e.load()}function oc({media:e,className:t,style:n,onMediaClick:i}){return qi(e)?a.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function rc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function dy(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const r=e.width/n;return{width:e.width,height:r,left:e.left,top:e.top+(e.height-r)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function uy({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const d=n.current;if(d)return()=>{cy(d)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,style:i})}function py({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:d,counterClassName:c,counterStyle:u}){const p=i==="cover",x=s.useRef(null),v=s.useRef(null),m=s.useRef(null),h=s.useRef(null),y=s.useRef(0),b=s.useRef(0),C=s.useRef("none"),S=s.useRef(!1),w=s.useRef(!1),D=s.useRef(null),_=s.useRef(0),z=s.useRef(null),H=s.useRef(!1),L=s.useRef(null),V=s.useRef(null),$=s.useRef(null),E=s.useRef(()=>{}),[F,W]=s.useState(null),[g,M]=s.useState(null),[R,G]=s.useState("opening"),[Z,T]=s.useState(0),[j,Y]=s.useState(0),[le,se]=s.useState(null),[k,re]=s.useState(!1),[q,ce]=s.useState(!1),[J,be]=s.useState(!1),[We,ye]=s.useState(null),ue=s.useRef(n),ee=s.useRef(void 0),de=t[n],ne=de?qi(de):!1,Pe=j!==0||k,Te=le!==null,Oe=s.useCallback(Ce=>{const De=Ce.currentTarget,Xe=De instanceof HTMLVideoElement?{width:De.videoWidth,height:De.videoHeight}:{width:De.naturalWidth,height:De.naturalHeight};!Xe.width||!Xe.height||ye(Xe)},[]);s.useEffect(()=>{D.current=g},[g]),s.useEffect(()=>{const Ce=x.current;if(!Ce)return;const De=()=>M(rc(Ce));De();const Xe=new ResizeObserver(De);return Xe.observe(Ce),()=>Xe.disconnect()},[]);const ve=s.useCallback(()=>{L.current!==null&&(window.clearTimeout(L.current),L.current=null)},[]),Se=s.useCallback(()=>{const Ce=V.current;V.current=null,ve(),z.current=null,H.current=!1,se(null),re(!1),Y(0),_.current=0,ce(!1),S.current=!1,b.current=0,C.current="none",Ce===1?d():Ce===-1&&l()},[ve,d,l]),$e=s.useCallback(()=>{ve(),V.current=null,z.current=null,H.current=!1,se(null),re(!1),Y(0),_.current=0},[ve]),f=s.useCallback(()=>{ve(),L.current=window.setTimeout(()=>{V.current!==null&&Se()},Mn+32)},[ve,Se]),X=s.useCallback((Ce,De)=>{var ge;const Xe=((ge=D.current)==null?void 0:ge.width)??0;if(ve(),z.current=Ce,se(Ce),H.current=!0,re(!0),De){V.current=Ce;const Me=-Ce*Xe;_.current=Me,Y(Me),f();return}_.current=0,Y(0),L.current=window.setTimeout(()=>{L.current=null,$e()},Mn+32)},[ve,$e,f]),N=s.useCallback(Ce=>{if(!(t.length<=1)){if(H.current){if(V.current===Ce){$.current=Ce,Se();return}$e()}ve(),z.current=Ce,se(Ce),H.current=!1,re(!1),_.current=0,Y(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{X(Ce,!0)})})}},[t.length,X,Se,$e,ve]);E.current=N;const U=s.useCallback(Ce=>{Ce.propertyName!=="transform"||!H.current||V.current!==null&&Se()},[Se]),me=s.useCallback(()=>{const Ce=v.current;if(!Ce)return;const De=rc(Ce);!De.width||!De.height||W(De)},[]);s.useEffect(()=>{me();const Ce=v.current;if(!Ce)return;const De=new ResizeObserver(()=>me());return De.observe(Ce),()=>De.disconnect()},[me]),s.useEffect(()=>{R==="opening"&&F&&G("open")},[R,F]),s.useEffect(()=>{if(R!=="closing")return;const Ce=setTimeout(()=>r(),Mn);return()=>clearTimeout(Ce)},[R,r]),s.useEffect(()=>()=>{ve()},[ve]),s.useLayoutEffect(()=>{ue.current===n&&ee.current===(de==null?void 0:de.url)||(ve(),V.current=null,se(null),T(0),Y(0),re(!1),be(!1),ce(!1),ye(null),y.current=0,b.current=0,C.current="none",S.current=!1,H.current=!1,_.current=0,z.current=null,h.current=null,w.current=!1,ue.current=n,ee.current=de==null?void 0:de.url)},[n,de==null?void 0:de.url,ve]),s.useLayoutEffect(()=>{const Ce=$.current;Ce!==null&&($.current=null,requestAnimationFrame(()=>{E.current(Ce)}))},[n,de==null?void 0:de.url]),s.useEffect(()=>{if(R!=="open")return;let Ce=null;const De=()=>{Ce&&(document.removeEventListener("click",Ce,!0),Ce=null)},Xe=()=>{De(),Ce=xe=>{xe.stopPropagation(),xe.preventDefault(),De()},document.addEventListener("click",Ce,!0)},ge=xe=>{const Ie=xe<0?1:-1;if(Math.abs(xe)>iy&&t.length>1){X(Ie,!0);return}X(Ie,!1)},Me=xe=>{if(xe.touches.length!==1||H.current)return;const Ie=xe.touches[0];w.current=!0,h.current={x:Ie.clientX,y:Ie.clientY},C.current="none",b.current=0,S.current=!1},ze=xe=>{if(!h.current||xe.touches.length!==1||H.current)return;const Ie=xe.touches[0],Ke=Ie.clientX-h.current.x,Ne=Ie.clientY-h.current.y;if(C.current==="none"){if(Math.abs(Ke)<10&&Math.abs(Ne)<10)return;if(Math.abs(Ke)>Math.abs(Ne)){if(t.length<=1)return;C.current="horizontal"}else if(Ne>0)C.current="vertical";else return}if(C.current==="horizontal"){S.current=!0,ce(!0),b.current=Ke;const it=Ke<0?1:-1;z.current!==it&&(z.current=it,se(it)),_.current=Ke,Y(Ke),xe.preventDefault();return}C.current==="vertical"&&(S.current=!0,ce(!0),y.current=Ne,T(Ne),xe.preventDefault())},Re=()=>{if(!h.current)return;const xe=C.current,Ie=S.current;if(Ie&&xe==="horizontal")ge(b.current),Xe();else if(Ie&&xe==="vertical")if(y.current>ny){const Ne=window.innerHeight;y.current=Ne,be(!0),T(Ne),G("closing")}else y.current=0,T(0),Xe();else xe==="horizontal"&&Math.abs(b.current)>0&&(ge(b.current),Xe());h.current=null,C.current="none",b.current=0,S.current=!1,ce(!1)};return document.addEventListener("touchstart",Me,{passive:!0}),document.addEventListener("touchmove",ze,{passive:!1}),document.addEventListener("touchend",Re),document.addEventListener("touchcancel",Re),()=>{document.removeEventListener("touchstart",Me),document.removeEventListener("touchmove",ze),document.removeEventListener("touchend",Re),document.removeEventListener("touchcancel",Re),De()}},[R,t.length,X]),s.useEffect(()=>{const Ce=De=>{De.key==="Escape"&&(De.preventDefault(),De.stopPropagation(),R!=="closing"&&G("closing"))};return window.addEventListener("keydown",Ce,!0),()=>window.removeEventListener("keydown",Ce,!0)},[R]);const K=()=>{R!=="closing"&&G("closing")},I=R==="open",ie=R==="closing",oe=Z>0?Math.max(0,1-Z/500):1,B=Z>0?Math.max(.35,1-Z/500):1,te=F?p?F:dy(F,We):null,Ae=Ce=>{if(Ce.stopPropagation(),w.current){w.current=!1;return}if(t.length<=1)return;const De=te??Ce.currentTarget.getBoundingClientRect(),Xe=Ce.clientY-De.top,ge=Math.min(52,De.height*.2);if(!(Xe>De.height-ge)){if(Ce.clientX-De.left<De.width/2){N(-1);return}N(1)}},he=Ce=>{if(t.length<=1)return;const De=te??Ce.currentTarget.getBoundingClientRect(),Xe=Ce.clientX-De.left,ge=Ce.clientY-De.top,Me=Math.min(52,De.height*.2);if(ge>De.height-Me){Ce.currentTarget.style.cursor="default";return}Ce.currentTarget.style.cursor=Xe<De.width/2?"w-resize":"e-resize"},Q={position:"fixed",top:g==null?void 0:g.top,left:g==null?void 0:g.left,width:g==null?void 0:g.width,height:g==null?void 0:g.height,zIndex:9998},Ze=p?"cover":"contain",Fe=j!==0||Z>0?`translate(${j}px, ${Z}px)`:void 0,et=q&&!k?"none":k?`transform ${Mn}ms ${ci}`:J?`transform ${Mn}ms ${ci}, opacity ${Mn}ms ${ci}`:R==="opening"||ie?`opacity ${Mn}ms ${ci}`:"none",Ue={...Q,transform:Fe,opacity:Z>0?B:R==="opening"||ie?0:1,transition:et,pointerEvents:"none"},nt={position:"absolute",top:((te==null?void 0:te.top)??0)-((g==null?void 0:g.top)??0),left:((te==null?void 0:te.left)??0)-((g==null?void 0:g.left)??0),width:te==null?void 0:te.width,height:te==null?void 0:te.height,objectFit:Ze,pointerEvents:ne&&I&&!Pe?"auto":"none",touchAction:ne&&I?"none":void 0},tt=(g==null?void 0:g.width)??0,Ve=Te?(n+le+t.length)%t.length:null,fe=Ve!==null?t[Ve]:null,He={...Q,transform:Te?`translateX(${le*tt+j}px)`:void 0,opacity:1,transition:k?`transform ${Mn}ms ${ci}`:"none",pointerEvents:"none"},Be={position:"absolute",top:((F==null?void 0:F.top)??0)-((g==null?void 0:g.top)??0),left:((F==null?void 0:F.left)??0)-((g==null?void 0:g.left)??0),width:F==null?void 0:F.width,height:F==null?void 0:F.height,objectFit:Ze,pointerEvents:"none"},Je=te?{position:"fixed",top:te.top,height:te.height,width:te.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:x,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:R==="open"?"none":void 0},onClick:K,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:I?oe:0,transition:q?"none":`opacity ${Mn}ms ${ci}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:v,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:I?1:0,transition:`opacity ${Mn}ms ${ci}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:I?1:0,transition:`opacity ${Mn}ms ${ci}`},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),F&&g&&fe&&a.jsx("div",{style:He,onTransitionEnd:U,children:qi(fe)?a.jsx("video",{src:fe.url,muted:!0,playsInline:!0,preload:"auto",style:Be},`neighbor-${Ve}-${fe.url}`):a.jsx("img",{src:fe.url,alt:fe.name,style:Be},`neighbor-${Ve}-${fe.url}`)}),F&&g&&de&&a.jsx("div",{style:Ue,onTransitionEnd:U,children:ne?a.jsx(uy,{src:de.url,phase:R,mediaRef:m,mediaStyle:nt,onLoadedMetadata:Oe,onClick:Ae,onMouseMove:he},`${n}-${de.url}`):a.jsx("img",{ref:m,src:de.url,alt:de.name,onLoad:Oe,style:nt},`${n}-${de.url}`)}),I&&Je&&t.length>1&&!ne&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Je,left:te.left,cursor:"w-resize",pointerEvents:q?"none":"auto"},onClick:Ce=>{if(w.current){w.current=!1;return}Ce.stopPropagation(),N(-1)}}),a.jsx("div",{style:{...Je,left:te.left+te.width/2,cursor:"e-resize",pointerEvents:q?"none":"auto"},onClick:Ce=>{if(w.current){w.current=!1;return}Ce.stopPropagation(),N(1)}})]})]})}function my(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function gy({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=A.useScopedStyles(),{type:p="a",gridLayout:x,textBoxWidth:v=100,verticalGap:m,entriesCount:h,lightbox:y,imageDisplay:b,imageCorners:C,lightboxImageDisplay:S,slider:w,sliderTiming:D,direction:_,transition:z,titleMarginTop:H,subtitleMarginTop:L,titleColor:V,subtitleColor:$,lightboxCounterColor:E,titleFontFamily:F,titleFontSettings:W,titleFontSize:g,titleLineHeight:M,titleLetterSpacing:R,titleWordSpacing:G,titleTextAppearance:Z,subtitleFontFamily:T,subtitleFontSettings:j,subtitleFontSize:Y,subtitleLineHeight:le,subtitleLetterSpacing:se,subtitleWordSpacing:k,subtitleTextAppearance:re,lightboxCounterFontFamily:q,lightboxCounterFontSettings:ce,lightboxCounterFontSize:J,lightboxCounterLineHeight:be,lightboxCounterLetterSpacing:We,lightboxCounterWordSpacing:ye,lightboxCounterTextAppearance:ue,showText:ee="always",alignEntries:de="off",align:ne="top"}=e,Pe={fontSettings:{fontFamily:F,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:g??.01,lineHeight:M,letterSpacing:R??0,wordSpacing:G??0,textAppearance:Z,color:V},Oe={...dn(Qt(Pe,n))},ve={fontSettings:{fontFamily:T,fontWeight:(j==null?void 0:j.fontWeight)??400,fontStyle:(j==null?void 0:j.fontStyle)??"normal"},fontSize:Y??.01,lineHeight:le,letterSpacing:se??0,wordSpacing:k??0,textAppearance:re,color:$},$e={...dn(Qt(ve,n))},f={fontSettings:{fontFamily:q,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:J??.01,lineHeight:be,letterSpacing:We??0,wordSpacing:ye??0,textAppearance:ue,color:E},N={...dn(Qt(f,n)),...Ga(J,be,u,n)},U=Va(g,M,`${u}-item-title`,`${u}-text-tight-leading`),me=Va(Y,le,`${u}-item-subtitle`,`${u}-text-tight-leading`),K=Ga(g,M,u,n),I=Ga(Y,le,u,n),ie=Va(J,be,`${u}-lightbox-counter`,`${u}-text-tight-leading`),oe=A.buildColorVars(u,{titleColor:V,subtitleColor:$,lightboxCounterColor:E},hy,fy),Ae=`${l&&l!=="default"?`${u}-state-${l}`:""}${ee==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),he=h===0?1/0:h,Q=(t??[]).slice(0,he),Ze=s.useMemo(()=>y==="on"?sy(Q):[],[Q,y]),Fe=x.entryWidth??.2,et=(b==null?void 0:b.display)==="cover",Ue=(b==null?void 0:b.ratioValue)??"1:1",nt=(b==null?void 0:b.reversed)??!1,[tt,Ve]=Ue.split(":").map(Number),Be=`${nt?Ve:tt} / ${nt?tt:Ve}`,Je=x.columnsCount,Ce=A.scalingValue(Fe??0,n),De=Ce,Xe=!et&&w!=="off",ge=Q.length%Je||Je,Me=ge<Je&&Q.length>0,ze=Q.length-ge,Re=Me?Math.floor((Je-ge)/2)+1:1,xe=C?A.scalingValue(C,n):void 0,Ie={width:De,...et?{aspectRatio:Be,height:"auto",overflow:"hidden"}:{height:"auto"},...xe?{borderRadius:xe,overflow:"hidden"}:{}},Ke=`${u}-item-image-wrapper${Xe?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),Ne=p==="d"||p==="e"||p==="f",it=de==="on",ot=`calc(${A.scalingValue(Fe??0,n)} * (${v} / 100))`,rt=A.scalingValue(Fe*v/100,n),ht=et?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...xe?{borderRadius:xe}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...xe?{borderRadius:xe}:{}},[Pt,Et]=s.useState(0),ut=s.useRef(null),gt=z==="fade"||_==="horizontal"?"ltr":_==="vertical"?"ttb":"ltr";s.useEffect(()=>{const lt=ut.current;if(!lt)return;const Ee=new ResizeObserver(je=>{Et(Math.round(je[0].contentRect.width))});return Ee.observe(lt),()=>Ee.disconnect()},[]);const $t=(()=>{const lt={...oe},Ee=ut.current?getComputedStyle(ut.current).getPropertyValue("--cntrl-article-width").trim():"";return Ee&&(lt["--cntrl-article-width"]=Ee),lt})(),[Tt,ft]=s.useState(!1),[At,zt]=s.useState([]),[jt,Zt]=s.useState(0),Ct=y==="on"&&(!n||i),Vt=(lt,Ee)=>{n&&!i||y!=="off"&&(zt(lt),Zt(Ee),ft(!0))};s.useEffect(()=>{if(!Tt||y!=="on"||typeof document>"u")return;const lt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=lt}},[Tt,y]),s.useEffect(()=>{!n||i||ft(!1)},[n,i]);const rn=s.useMemo(()=>Zf(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:rn}}),y==="on"&&a.jsx(ly,{mediaList:Ze}),a.jsx("div",{style:oe,children:a.jsx("div",{ref:ut,className:`${u}-wrapper ${u}-type-${p}${it?` ${u}-align-entries`:""} ${u}-image-align-${ne} ${Ae}`.trim(),style:{gridTemplateColumns:`repeat(${Je}, ${Ce})`,rowGap:it?0:A.scalingValue(m??0,n),columnGap:A.scalingValue(x.horizontalGap??0,n),width:A.scalingValue(x.wrapperWidth??0,n),...it?{[`--${u}-align-entries-row-gap`]:A.scalingValue(m??0,n)}:{}},children:Q.map((lt,Ee)=>{var Bt;const je=ic(lt.title),Qe=ic(lt.subtitle),dt=(((Bt=lt.link)==null?void 0:Bt.length)??0)>0&&y==="off"?lt.link:void 0,xt=Math.floor(Ee/Je)===Math.ceil(Q.length/Je)-1,Mt=Me&&Ee>=ze?`${Re+(Ee-ze)}`:void 0,yt=Ne?a.jsxs("div",{className:`${u}-item-text-block`,children:[je&&a.jsx("p",{className:U,style:{width:ot,...Oe,...K},children:lt.title}),je&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:A.scalingValue(H??0,n),width:rt}}),Qe&&a.jsx("p",{className:me,style:{width:ot,...$e,...I},children:lt.subtitle}),Qe&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:A.scalingValue(L??0,n),width:rt}})]}):null,Xt=it?a.jsxs("div",{className:`${u}-item-title-row`,children:[!Ne&&a.jsx("div",{"data-controls":o&&je?"titleMarginTop":void 0,className:o&&je?`${u}-control`:void 0,style:{height:je?A.scalingValue(H??0,n):0,width:rt}}),je&&a.jsx("p",{className:U,style:{width:ot,...Oe,...K},children:lt.title}),Ne&&je&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:A.scalingValue(H??0,n),width:rt}})]}):null,Ht=it?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!Ne&&a.jsx("div",{"data-controls":o&&Qe?"subtitleMarginTop":void 0,className:o&&Qe?`${u}-control`:void 0,style:{height:Qe?A.scalingValue(L??0,n):0,width:rt}}),Qe&&a.jsx("p",{className:me,style:{width:ot,...$e,...I},children:lt.subtitle}),Ne&&Qe&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:A.scalingValue(L??0,n),width:rt}})]}):null,Nt=dt?a.jsxs("a",{href:dt,target:"_blank",className:`${u}-item-text-link`,children:[Xt,Ht]}):a.jsxs(a.Fragment,{children:[Xt,Ht]}),qt=bu(lt.gallery),Ut=qt.filter(Lt=>Lt.lightboxMedia).map(Lt=>Lt.lightboxMedia),Ot=a.jsx("div",{className:Ke,style:Ie,children:qt.length===0?null:w==="off"?(()=>{const{displayMedia:Lt,lightboxMedia:O}=qt[0],Le=O?Ut.findIndex(_e=>_e.url===O.url):-1;return a.jsx(oc,{media:Lt,className:`${u}-item-${qi(Lt)?"video":"image"}`.trim(),style:ht,onMediaClick:Ct&&Le>=0?()=>Vt(Ut,Le):void 0})})():a.jsxs(a.Fragment,{children:[Xe&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:qt.map(({displayMedia:Lt})=>qi(Lt)?a.jsx("video",{src:Lt.url,muted:!0,playsInline:!0},`sizer-${Lt.url}`):a.jsx("img",{src:Lt.url,alt:""},`sizer-${Lt.url}`))}),a.jsx(hl,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:D*1e3,width:"100%",height:"100%",speed:ty,type:z==="fade"?"fade":"loop",rewind:z==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:gt},onMoved:Lt=>{_!=="random"||z==="fade"||ey(Lt)},children:qt.map(({displayMedia:Lt,lightboxMedia:O},Le)=>{const _e=O?Ut.findIndex(Ge=>Ge.url===O.url):-1;return a.jsx(fl,{children:a.jsx(oc,{media:Lt,className:`${u}-item-${qi(Lt)?"video":"image"}`.trim(),style:ht,onMediaClick:Ct&&_e>=0?()=>Vt(Ut,_e):void 0})},Le)})},`${z}-${Fe}-${_}-${D}-${Pt}-${d}`)]})}),Gt=Ne?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&je?"titleMarginTop":void 0,className:o&&je?`${u}-control`:void 0,style:{height:je?A.scalingValue(H??0,n):0,width:rt}}),a.jsx("p",{className:U,style:{width:ot,...Oe,...K},children:lt.title}),a.jsx("div",{"data-controls":o&&Qe?"subtitleMarginTop":void 0,className:o&&Qe?`${u}-control`:void 0,style:{height:Qe?A.scalingValue(L??0,n):0,width:rt}}),a.jsx("p",{className:me,style:{width:ot,...$e,...I},children:lt.subtitle})]});return a.jsx("div",{className:`${u}-item`.trim(),style:Mt&&!it?{gridColumn:Mt}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${it&&xt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(v??0)>100?`calc(${Ce} * (${v} / 100))`:Ce,...Mt&&it?{gridColumn:Mt}:{}},children:it?a.jsx(a.Fragment,{children:Ne?a.jsxs(a.Fragment,{children:[Nt,a.jsx("a",{href:dt,target:"_blank",className:`${u}-item-image-link`,children:Ot})]}):a.jsxs(a.Fragment,{children:[a.jsx("a",{href:dt,target:"_blank",className:`${u}-item-image-link`,children:Ot}),Nt]})}):dt?a.jsxs(a.Fragment,{children:[a.jsxs("a",{href:dt,target:"_blank",className:`${u}-item-image-link`,children:[yt,Ot]}),!Ne&&a.jsx("a",{href:dt,target:"_blank",className:`${u}-item-text-link`,children:Gt})]}):a.jsxs(a.Fragment,{children:[yt,Ot,Gt]})})},Ee)})})}),(!n||i)&&Tt&&typeof document<"u"&&y==="on"&&(()=>{const lt=(c?document.getElementById(c):null)??document.body;return ri.createPortal(a.jsx("div",{style:$t,"data-selection":"none",children:a.jsx(py,{prefix:u,items:At,index:jt,imageDisplay:my(S),isEditor:n,onClose:()=>ft(!1),onPrev:()=>Zt(Ee=>(Ee-1+At.length)%At.length),onNext:()=>Zt(Ee=>(Ee+1)%At.length),counterClassName:ie,counterStyle:N})}),lt)})()]})}const hy={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},fy=["hover","focus","filled","success","error"],yy=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5225
+ `}function ny(){return Math.random()<.5?"ltr":"ttb"}function iy(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function oy(e){const t=ny();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{iy(e)})})}const En=500,ry=750,ci="cubic-bezier(0.22, 1, 0.36, 1)",ay=72,sy=50;function ly(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function cy(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function dy(e){const[t]=e.media;return t!=null&&t.url?t:null}function wu(e){return!Array.isArray(e)||e.length===0?[]:ly(e)?e.flatMap(t=>{const n=cy(t);if(!n)return[];const i=dy(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.url?i:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function qi(e){return e.type==="video"}function uy(e){const t=new Set,n=[];for(const i of e){const o=wu(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.url&&!t.has(l.url)&&(t.add(l.url),n.push(l))}}return n}function py({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>qi(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function my(e){e.pause(),e.removeAttribute("src"),e.load()}function rc({media:e,className:t,style:n,onMediaClick:i}){return qi(e)?a.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function ac(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function gy(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const r=e.width/n;return{width:e.width,height:r,left:e.left,top:e.top+(e.height-r)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function hy({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const d=n.current;if(d)return()=>{my(d)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,style:i})}function fy({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:d,counterClassName:c,counterStyle:u}){const p=i==="cover",x=s.useRef(null),y=s.useRef(null),m=s.useRef(null),h=s.useRef(null),v=s.useRef(0),b=s.useRef(0),C=s.useRef("none"),S=s.useRef(!1),w=s.useRef(!1),D=s.useRef(null),_=s.useRef(0),z=s.useRef(null),H=s.useRef(!1),L=s.useRef(null),V=s.useRef(null),$=s.useRef(null),k=s.useRef(()=>{}),[F,W]=s.useState(null),[g,E]=s.useState(null),[R,G]=s.useState("opening"),[Z,T]=s.useState(0),[j,K]=s.useState(0),[le,se]=s.useState(null),[M,re]=s.useState(!1),[q,ce]=s.useState(!1),[J,be]=s.useState(!1),[We,ye]=s.useState(null),ue=s.useRef(n),ee=s.useRef(void 0),de=t[n],ne=de?qi(de):!1,Pe=j!==0||M,Te=le!==null,Oe=s.useCallback(Ce=>{const De=Ce.currentTarget,Xe=De instanceof HTMLVideoElement?{width:De.videoWidth,height:De.videoHeight}:{width:De.naturalWidth,height:De.naturalHeight};!Xe.width||!Xe.height||ye(Xe)},[]);s.useEffect(()=>{D.current=g},[g]),s.useEffect(()=>{const Ce=x.current;if(!Ce)return;const De=()=>E(ac(Ce));De();const Xe=new ResizeObserver(De);return Xe.observe(Ce),()=>Xe.disconnect()},[]);const ve=s.useCallback(()=>{L.current!==null&&(window.clearTimeout(L.current),L.current=null)},[]),Se=s.useCallback(()=>{const Ce=V.current;V.current=null,ve(),z.current=null,H.current=!1,se(null),re(!1),K(0),_.current=0,ce(!1),S.current=!1,b.current=0,C.current="none",Ce===1?d():Ce===-1&&l()},[ve,d,l]),$e=s.useCallback(()=>{ve(),V.current=null,z.current=null,H.current=!1,se(null),re(!1),K(0),_.current=0},[ve]),f=s.useCallback(()=>{ve(),L.current=window.setTimeout(()=>{V.current!==null&&Se()},En+32)},[ve,Se]),X=s.useCallback((Ce,De)=>{var ge;const Xe=((ge=D.current)==null?void 0:ge.width)??0;if(ve(),z.current=Ce,se(Ce),H.current=!0,re(!0),De){V.current=Ce;const Ee=-Ce*Xe;_.current=Ee,K(Ee),f();return}_.current=0,K(0),L.current=window.setTimeout(()=>{L.current=null,$e()},En+32)},[ve,$e,f]),N=s.useCallback(Ce=>{if(!(t.length<=1)){if(H.current){if(V.current===Ce){$.current=Ce,Se();return}$e()}ve(),z.current=Ce,se(Ce),H.current=!1,re(!1),_.current=0,K(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{X(Ce,!0)})})}},[t.length,X,Se,$e,ve]);k.current=N;const U=s.useCallback(Ce=>{Ce.propertyName!=="transform"||!H.current||V.current!==null&&Se()},[Se]),me=s.useCallback(()=>{const Ce=y.current;if(!Ce)return;const De=ac(Ce);!De.width||!De.height||W(De)},[]);s.useEffect(()=>{me();const Ce=y.current;if(!Ce)return;const De=new ResizeObserver(()=>me());return De.observe(Ce),()=>De.disconnect()},[me]),s.useEffect(()=>{R==="opening"&&F&&G("open")},[R,F]),s.useEffect(()=>{if(R!=="closing")return;const Ce=setTimeout(()=>r(),En);return()=>clearTimeout(Ce)},[R,r]),s.useEffect(()=>()=>{ve()},[ve]),s.useLayoutEffect(()=>{ue.current===n&&ee.current===(de==null?void 0:de.url)||(ve(),V.current=null,se(null),T(0),K(0),re(!1),be(!1),ce(!1),ye(null),v.current=0,b.current=0,C.current="none",S.current=!1,H.current=!1,_.current=0,z.current=null,h.current=null,w.current=!1,ue.current=n,ee.current=de==null?void 0:de.url)},[n,de==null?void 0:de.url,ve]),s.useLayoutEffect(()=>{const Ce=$.current;Ce!==null&&($.current=null,requestAnimationFrame(()=>{k.current(Ce)}))},[n,de==null?void 0:de.url]),s.useEffect(()=>{if(R!=="open")return;let Ce=null;const De=()=>{Ce&&(document.removeEventListener("click",Ce,!0),Ce=null)},Xe=()=>{De(),Ce=xe=>{xe.stopPropagation(),xe.preventDefault(),De()},document.addEventListener("click",Ce,!0)},ge=xe=>{const Ie=xe<0?1:-1;if(Math.abs(xe)>sy&&t.length>1){X(Ie,!0);return}X(Ie,!1)},Ee=xe=>{if(xe.touches.length!==1||H.current)return;const Ie=xe.touches[0];w.current=!0,h.current={x:Ie.clientX,y:Ie.clientY},C.current="none",b.current=0,S.current=!1},ze=xe=>{if(!h.current||xe.touches.length!==1||H.current)return;const Ie=xe.touches[0],Ye=Ie.clientX-h.current.x,Ne=Ie.clientY-h.current.y;if(C.current==="none"){if(Math.abs(Ye)<10&&Math.abs(Ne)<10)return;if(Math.abs(Ye)>Math.abs(Ne)){if(t.length<=1)return;C.current="horizontal"}else if(Ne>0)C.current="vertical";else return}if(C.current==="horizontal"){S.current=!0,ce(!0),b.current=Ye;const it=Ye<0?1:-1;z.current!==it&&(z.current=it,se(it)),_.current=Ye,K(Ye),xe.preventDefault();return}C.current==="vertical"&&(S.current=!0,ce(!0),v.current=Ne,T(Ne),xe.preventDefault())},Re=()=>{if(!h.current)return;const xe=C.current,Ie=S.current;if(Ie&&xe==="horizontal")ge(b.current),Xe();else if(Ie&&xe==="vertical")if(v.current>ay){const Ne=window.innerHeight;v.current=Ne,be(!0),T(Ne),G("closing")}else v.current=0,T(0),Xe();else xe==="horizontal"&&Math.abs(b.current)>0&&(ge(b.current),Xe());h.current=null,C.current="none",b.current=0,S.current=!1,ce(!1)};return document.addEventListener("touchstart",Ee,{passive:!0}),document.addEventListener("touchmove",ze,{passive:!1}),document.addEventListener("touchend",Re),document.addEventListener("touchcancel",Re),()=>{document.removeEventListener("touchstart",Ee),document.removeEventListener("touchmove",ze),document.removeEventListener("touchend",Re),document.removeEventListener("touchcancel",Re),De()}},[R,t.length,X]),s.useEffect(()=>{const Ce=De=>{De.key==="Escape"&&(De.preventDefault(),De.stopPropagation(),R!=="closing"&&G("closing"))};return window.addEventListener("keydown",Ce,!0),()=>window.removeEventListener("keydown",Ce,!0)},[R]);const Y=()=>{R!=="closing"&&G("closing")},I=R==="open",ie=R==="closing",oe=Z>0?Math.max(0,1-Z/500):1,B=Z>0?Math.max(.35,1-Z/500):1,te=F?p?F:gy(F,We):null,Ae=Ce=>{if(Ce.stopPropagation(),w.current){w.current=!1;return}if(t.length<=1)return;const De=te??Ce.currentTarget.getBoundingClientRect(),Xe=Ce.clientY-De.top,ge=Math.min(52,De.height*.2);if(!(Xe>De.height-ge)){if(Ce.clientX-De.left<De.width/2){N(-1);return}N(1)}},he=Ce=>{if(t.length<=1)return;const De=te??Ce.currentTarget.getBoundingClientRect(),Xe=Ce.clientX-De.left,ge=Ce.clientY-De.top,Ee=Math.min(52,De.height*.2);if(ge>De.height-Ee){Ce.currentTarget.style.cursor="default";return}Ce.currentTarget.style.cursor=Xe<De.width/2?"w-resize":"e-resize"},Q={position:"fixed",top:g==null?void 0:g.top,left:g==null?void 0:g.left,width:g==null?void 0:g.width,height:g==null?void 0:g.height,zIndex:9998},Ze=p?"cover":"contain",Fe=j!==0||Z>0?`translate(${j}px, ${Z}px)`:void 0,et=q&&!M?"none":M?`transform ${En}ms ${ci}`:J?`transform ${En}ms ${ci}, opacity ${En}ms ${ci}`:R==="opening"||ie?`opacity ${En}ms ${ci}`:"none",Ue={...Q,transform:Fe,opacity:Z>0?B:R==="opening"||ie?0:1,transition:et,pointerEvents:"none"},nt={position:"absolute",top:((te==null?void 0:te.top)??0)-((g==null?void 0:g.top)??0),left:((te==null?void 0:te.left)??0)-((g==null?void 0:g.left)??0),width:te==null?void 0:te.width,height:te==null?void 0:te.height,objectFit:Ze,pointerEvents:ne&&I&&!Pe?"auto":"none",touchAction:ne&&I?"none":void 0},tt=(g==null?void 0:g.width)??0,Ve=Te?(n+le+t.length)%t.length:null,fe=Ve!==null?t[Ve]:null,He={...Q,transform:Te?`translateX(${le*tt+j}px)`:void 0,opacity:1,transition:M?`transform ${En}ms ${ci}`:"none",pointerEvents:"none"},Be={position:"absolute",top:((F==null?void 0:F.top)??0)-((g==null?void 0:g.top)??0),left:((F==null?void 0:F.left)??0)-((g==null?void 0:g.left)??0),width:F==null?void 0:F.width,height:F==null?void 0:F.height,objectFit:Ze,pointerEvents:"none"},Je=te?{position:"fixed",top:te.top,height:te.height,width:te.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:x,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:R==="open"?"none":void 0},onClick:Y,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:I?oe:0,transition:q?"none":`opacity ${En}ms ${ci}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:y,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:I?1:0,transition:`opacity ${En}ms ${ci}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:I?1:0,transition:`opacity ${En}ms ${ci}`},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),F&&g&&fe&&a.jsx("div",{style:He,onTransitionEnd:U,children:qi(fe)?a.jsx("video",{src:fe.url,muted:!0,playsInline:!0,preload:"auto",style:Be},`neighbor-${Ve}-${fe.url}`):a.jsx("img",{src:fe.url,alt:fe.name,style:Be},`neighbor-${Ve}-${fe.url}`)}),F&&g&&de&&a.jsx("div",{style:Ue,onTransitionEnd:U,children:ne?a.jsx(hy,{src:de.url,phase:R,mediaRef:m,mediaStyle:nt,onLoadedMetadata:Oe,onClick:Ae,onMouseMove:he},`${n}-${de.url}`):a.jsx("img",{ref:m,src:de.url,alt:de.name,onLoad:Oe,style:nt},`${n}-${de.url}`)}),I&&Je&&t.length>1&&!ne&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Je,left:te.left,cursor:"w-resize",pointerEvents:q?"none":"auto"},onClick:Ce=>{if(w.current){w.current=!1;return}Ce.stopPropagation(),N(-1)}}),a.jsx("div",{style:{...Je,left:te.left+te.width/2,cursor:"e-resize",pointerEvents:q?"none":"auto"},onClick:Ce=>{if(w.current){w.current=!1;return}Ce.stopPropagation(),N(1)}})]})]})}function yy(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function vy({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=A.useScopedStyles(),{type:p="a",gridLayout:x,textBoxWidth:y=100,verticalGap:m,entriesCount:h,lightbox:v,imageDisplay:b,imageCorners:C,lightboxImageDisplay:S,slider:w,sliderTiming:D,direction:_,transition:z,titleMarginTop:H,subtitleMarginTop:L,titleColor:V,subtitleColor:$,lightboxCounterColor:k,titleFontFamily:F,titleFontSettings:W,titleFontSize:g,titleLineHeight:E,titleLetterSpacing:R,titleWordSpacing:G,titleTextAppearance:Z,subtitleFontFamily:T,subtitleFontSettings:j,subtitleFontSize:K,subtitleLineHeight:le,subtitleLetterSpacing:se,subtitleWordSpacing:M,subtitleTextAppearance:re,lightboxCounterFontFamily:q,lightboxCounterFontSettings:ce,lightboxCounterFontSize:J,lightboxCounterLineHeight:be,lightboxCounterLetterSpacing:We,lightboxCounterWordSpacing:ye,lightboxCounterTextAppearance:ue,showText:ee="always",alignEntries:de="off",align:ne="top"}=e,Pe={fontSettings:{fontFamily:F,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:g??.01,lineHeight:E,letterSpacing:R??0,wordSpacing:G??0,textAppearance:Z,color:V},Oe={...dn(Qt(Pe,n))},ve={fontSettings:{fontFamily:T,fontWeight:(j==null?void 0:j.fontWeight)??400,fontStyle:(j==null?void 0:j.fontStyle)??"normal"},fontSize:K??.01,lineHeight:le,letterSpacing:se??0,wordSpacing:M??0,textAppearance:re,color:$},$e={...dn(Qt(ve,n))},f={fontSettings:{fontFamily:q,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:J??.01,lineHeight:be,letterSpacing:We??0,wordSpacing:ye??0,textAppearance:ue,color:k},N={...dn(Qt(f,n)),...Xa(J,be,u,n)},U=Ga(g,E,`${u}-item-title`,`${u}-text-tight-leading`),me=Ga(K,le,`${u}-item-subtitle`,`${u}-text-tight-leading`),Y=Xa(g,E,u,n),I=Xa(K,le,u,n),ie=Ga(J,be,`${u}-lightbox-counter`,`${u}-text-tight-leading`),oe=A.buildColorVars(u,{titleColor:V,subtitleColor:$,lightboxCounterColor:k},xy,by),Ae=`${l&&l!=="default"?`${u}-state-${l}`:""}${ee==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),he=h===0?1/0:h,Q=(t??[]).slice(0,he),Ze=s.useMemo(()=>v==="on"?uy(Q):[],[Q,v]),Fe=x.entryWidth??.2,et=(b==null?void 0:b.display)==="cover",Ue=(b==null?void 0:b.ratioValue)??"1:1",nt=(b==null?void 0:b.reversed)??!1,[tt,Ve]=Ue.split(":").map(Number),Be=`${nt?Ve:tt} / ${nt?tt:Ve}`,Je=x.columnsCount,Ce=A.scalingValue(Fe??0,n),De=Ce,Xe=!et&&w!=="off",ge=Q.length%Je||Je,Ee=ge<Je&&Q.length>0,ze=Q.length-ge,Re=Ee?Math.floor((Je-ge)/2)+1:1,xe=C?A.scalingValue(C,n):void 0,Ie={width:De,...et?{aspectRatio:Be,height:"auto",overflow:"hidden"}:{height:"auto"},...xe?{borderRadius:xe,overflow:"hidden"}:{}},Ye=`${u}-item-image-wrapper${Xe?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),Ne=p==="d"||p==="e"||p==="f",it=de==="on",ot=`calc(${A.scalingValue(Fe??0,n)} * (${y} / 100))`,rt=A.scalingValue(Fe*y/100,n),ht=et?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...xe?{borderRadius:xe}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...xe?{borderRadius:xe}:{}},[Pt,kt]=s.useState(0),ut=s.useRef(null),gt=z==="fade"||_==="horizontal"?"ltr":_==="vertical"?"ttb":"ltr";s.useEffect(()=>{const lt=ut.current;if(!lt)return;const ke=new ResizeObserver(je=>{kt(Math.round(je[0].contentRect.width))});return ke.observe(lt),()=>ke.disconnect()},[]);const $t=(()=>{const lt={...oe},ke=ut.current?getComputedStyle(ut.current).getPropertyValue("--cntrl-article-width").trim():"";return ke&&(lt["--cntrl-article-width"]=ke),lt})(),[Tt,ft]=s.useState(!1),[At,zt]=s.useState([]),[jt,Zt]=s.useState(0),Ct=v==="on"&&(!n||i),Vt=(lt,ke)=>{n&&!i||v!=="off"&&(zt(lt),Zt(ke),ft(!0))};s.useEffect(()=>{if(!Tt||v!=="on"||typeof document>"u")return;const lt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=lt}},[Tt,v]),s.useEffect(()=>{!n||i||ft(!1)},[n,i]);const rn=s.useMemo(()=>ty(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:rn}}),v==="on"&&a.jsx(py,{mediaList:Ze}),a.jsx("div",{style:oe,children:a.jsx("div",{ref:ut,className:`${u}-wrapper ${u}-type-${p}${it?` ${u}-align-entries`:""} ${u}-image-align-${ne} ${Ae}`.trim(),style:{gridTemplateColumns:`repeat(${Je}, ${Ce})`,rowGap:it?0:A.scalingValue(m??0,n),columnGap:A.scalingValue(x.horizontalGap??0,n),width:A.scalingValue(x.wrapperWidth??0,n),...it?{[`--${u}-align-entries-row-gap`]:A.scalingValue(m??0,n)}:{}},children:Q.map((lt,ke)=>{var Bt;const je=oc(lt.title),Qe=oc(lt.subtitle),dt=(((Bt=lt.link)==null?void 0:Bt.length)??0)>0&&v==="off"?lt.link:void 0,xt=Math.floor(ke/Je)===Math.ceil(Q.length/Je)-1,Et=Ee&&ke>=ze?`${Re+(ke-ze)}`:void 0,yt=Ne?a.jsxs("div",{className:`${u}-item-text-block`,children:[je&&a.jsx("p",{className:U,style:{width:ot,...Oe,...Y},children:lt.title}),je&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:A.scalingValue(H??0,n),width:rt}}),Qe&&a.jsx("p",{className:me,style:{width:ot,...$e,...I},children:lt.subtitle}),Qe&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:A.scalingValue(L??0,n),width:rt}})]}):null,Xt=it?a.jsxs("div",{className:`${u}-item-title-row`,children:[!Ne&&a.jsx("div",{"data-controls":o&&je?"titleMarginTop":void 0,className:o&&je?`${u}-control`:void 0,style:{height:je?A.scalingValue(H??0,n):0,width:rt}}),je&&a.jsx("p",{className:U,style:{width:ot,...Oe,...Y},children:lt.title}),Ne&&je&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:A.scalingValue(H??0,n),width:rt}})]}):null,Ht=it?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!Ne&&a.jsx("div",{"data-controls":o&&Qe?"subtitleMarginTop":void 0,className:o&&Qe?`${u}-control`:void 0,style:{height:Qe?A.scalingValue(L??0,n):0,width:rt}}),Qe&&a.jsx("p",{className:me,style:{width:ot,...$e,...I},children:lt.subtitle}),Ne&&Qe&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:A.scalingValue(L??0,n),width:rt}})]}):null,Nt=dt?a.jsxs("a",{href:dt,target:"_blank",className:`${u}-item-text-link`,children:[Xt,Ht]}):a.jsxs(a.Fragment,{children:[Xt,Ht]}),qt=wu(lt.gallery),Ut=qt.filter(Lt=>Lt.lightboxMedia).map(Lt=>Lt.lightboxMedia),Ot=a.jsx("div",{className:Ye,style:Ie,children:qt.length===0?null:w==="off"?(()=>{const{displayMedia:Lt,lightboxMedia:O}=qt[0],Le=O?Ut.findIndex(_e=>_e.url===O.url):-1;return a.jsx(rc,{media:Lt,className:`${u}-item-${qi(Lt)?"video":"image"}`.trim(),style:ht,onMediaClick:Ct&&Le>=0?()=>Vt(Ut,Le):void 0})})():a.jsxs(a.Fragment,{children:[Xe&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:qt.map(({displayMedia:Lt})=>qi(Lt)?a.jsx("video",{src:Lt.url,muted:!0,playsInline:!0},`sizer-${Lt.url}`):a.jsx("img",{src:Lt.url,alt:""},`sizer-${Lt.url}`))}),a.jsx(fl,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:D*1e3,width:"100%",height:"100%",speed:ry,type:z==="fade"?"fade":"loop",rewind:z==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:gt},onMoved:Lt=>{_!=="random"||z==="fade"||oy(Lt)},children:qt.map(({displayMedia:Lt,lightboxMedia:O},Le)=>{const _e=O?Ut.findIndex(Ge=>Ge.url===O.url):-1;return a.jsx(yl,{children:a.jsx(rc,{media:Lt,className:`${u}-item-${qi(Lt)?"video":"image"}`.trim(),style:ht,onMediaClick:Ct&&_e>=0?()=>Vt(Ut,_e):void 0})},Le)})},`${z}-${Fe}-${_}-${D}-${Pt}-${d}`)]})}),Gt=Ne?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&je?"titleMarginTop":void 0,className:o&&je?`${u}-control`:void 0,style:{height:je?A.scalingValue(H??0,n):0,width:rt}}),a.jsx("p",{className:U,style:{width:ot,...Oe,...Y},children:lt.title}),a.jsx("div",{"data-controls":o&&Qe?"subtitleMarginTop":void 0,className:o&&Qe?`${u}-control`:void 0,style:{height:Qe?A.scalingValue(L??0,n):0,width:rt}}),a.jsx("p",{className:me,style:{width:ot,...$e,...I},children:lt.subtitle})]});return a.jsx("div",{className:`${u}-item`.trim(),style:Et&&!it?{gridColumn:Et}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${it&&xt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(y??0)>100?`calc(${Ce} * (${y} / 100))`:Ce,...Et&&it?{gridColumn:Et}:{}},children:it?a.jsx(a.Fragment,{children:Ne?a.jsxs(a.Fragment,{children:[Nt,a.jsx("a",{href:dt,target:"_blank",className:`${u}-item-image-link`,children:Ot})]}):a.jsxs(a.Fragment,{children:[a.jsx("a",{href:dt,target:"_blank",className:`${u}-item-image-link`,children:Ot}),Nt]})}):dt?a.jsxs(a.Fragment,{children:[a.jsxs("a",{href:dt,target:"_blank",className:`${u}-item-image-link`,children:[yt,Ot]}),!Ne&&a.jsx("a",{href:dt,target:"_blank",className:`${u}-item-text-link`,children:Gt})]}):a.jsxs(a.Fragment,{children:[yt,Ot,Gt]})})},ke)})})}),(!n||i)&&Tt&&typeof document<"u"&&v==="on"&&(()=>{const lt=(c?document.getElementById(c):null)??document.body;return ri.createPortal(a.jsx("div",{style:$t,"data-selection":"none",children:a.jsx(fy,{prefix:u,items:At,index:jt,imageDisplay:yy(S),isEditor:n,onClose:()=>ft(!1),onPrev:()=>Zt(ke=>(ke-1+At.length)%At.length),onNext:()=>Zt(ke=>(ke+1)%At.length),counterClassName:ie,counterStyle:N})}),lt)})()]})}const xy={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},by=["hover","focus","filled","success","error"],Sy=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5226
5226
  import '@splidejs/react-splide/css/core';
5227
5227
  import { CommonComponentProps } from '../props';
5228
5228
  import {
@@ -7275,12 +7275,12 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
7275
7275
  };
7276
7276
 
7277
7277
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7278
- `,Xa={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},vy=["titleColor","subtitleColor","lightboxCounterColor"],xy={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Xa.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:{...Xa.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:{...Xa.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"b",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,imageCorners:0,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","imageCorners","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay","imageCorners"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...vy],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},by={element:gy,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:xy,sourceCode:yy},Sy=50,ac=10,yl="cntrl-lightbox-journal",Ra=yl,Es=`${yl}-`,Pa=e=>`${yl}-${e}`,vl=e=>e===Ra||e.startsWith(Es),sc=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},lc=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=sc(t.get(Pa(e)));if(i)return i}const n=sc(t.get(Ra));if(n)return n;for(const[i]of t){if(!i.startsWith(Es))continue;const o=i.slice(Es.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},cc=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Su=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{vl(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(Pa(t),String(e)):i.searchParams.set(Ra,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},wy=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Pa(e)||i===Ra:vl(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)}},wu=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Pa(e)):[...t.keys()].some(n=>vl(n))},$y=(e,t)=>{if(wu(t)){if(e){window.history.back();return}wy(t)}},Cy=20,Ty=2,qa=e=>`max(${e}, ${Cy}px)`,To=e=>((e==null?void 0:e.image)??[]).slice(0,Ty),$u=e=>e.reduce((t,n)=>t+To(n).length,0),Ly=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+To(r).length,1),i=To(e[t]).length;return{start:n,end:n+i-1}},Iy=(e,t)=>{const n=$u(e),{start:i,end:o}=Ly(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},ta=(e,t)=>t==="B"?e.flatMap((n,i)=>To(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:To(n)})),Ry=(e,t,n,i)=>{var r;if(n==="B")return`${t+1} / ${e.length}`;const o=((r=e[t])==null?void 0:r.entryIndex)??0;return Iy(i,o)},dc=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Py=(e,t,n)=>e==="B"?t.length>1:$u(n)>1,Tn=.004,vi=.004,xo={title1Width:.13,title2Width:.13,title3Width:.14},xi=(e,t,n,i,o)=>{const r=[];return t.title1&&r.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&r.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&r.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),r},Lo=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},d)=>{if(r<=0||d<=0)return{overflow:r,widths:[d,...l]};const c=Math.min(r,d);return{overflow:r-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},pr=(e,t)=>Lo(e,t),gn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},bi=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Lo(e.length,n),effective:pr(e.length,n)}},Cu=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Tu=(e,t,n,i)=>e.slice(0,i+1).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Ci=["title1","title2","title3","count"],mt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,xl={title1:"1",title2:"2",title3:"3",count:"Count"},bl=e=>[mt(e,"fontFamily"),mt(e,"fontSettings"),{type:"row",items:[mt(e,"fontSize"),mt(e,"lineHeight"),mt(e,"letterSpacing"),mt(e,"wordSpacing")]},mt(e,"textAlign"),mt(e,"textAppearance")],Ey=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ci.map(e=>[xl[e],bl(e)]))}),My={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},ky={title1:.02,title2:.02,title3:.02,count:.017},Bi=(e,t)=>{const n=i=>{const o=mt(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[My[t]]}},ji=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??ky[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Qt(i,n)};function Lu({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:x=0,title3MarginLeft:v=0,titleRowMarginBottom:m=0,titleHeaderLayout:h="desktop",contentMarginTop:y=0,iconMarginRight:b=0,closeIcon:C=null,closeIconMaxWidth:S=0,closeIconColor:w="#000000",closeIconHoverColor:D="#cccccc"}=n,_=A.scalingValue(y,i),z=A.scalingValue(b,i),H=A.scalingValue(m,i),L=h==="mobile",V=ji("title1",Bi(n,"title1"),i),$=ji("title2",Bi(n,"title2"),i),E=ji("title3",Bi(n,"title3"),i),F=s.useMemo(()=>({title1Width:d??xo.title1Width,title2Width:c??xo.title2Width,title3Width:u??xo.title3Width}),[d,c,u]),W=s.useMemo(()=>({title2MarginLeft:x,title3MarginLeft:v}),[x,v]),g=s.useMemo(()=>xi(e,t,V,$,E),[e,t,V,$,E]),M=s.useMemo(()=>g.map(B=>F[B.widthKey]),[g,F]),R=s.useMemo(()=>Lo(g.length,M),[g.length,M]),G=s.useMemo(()=>pr(g.length,M),[g.length,M]),Z=s.useMemo(()=>g.filter(B=>B.prefix==="title1"),[g]),T=s.useMemo(()=>g.filter(B=>B.prefix==="title2"||B.prefix==="title3"),[g]),j=s.useMemo(()=>bi(Z,F),[Z,F]),Y=s.useMemo(()=>bi(T,F),[T,F]),le=!!(t.title1||t.title2||t.title3),se=C!==null;if(!(le||se))return null;const re=(p??0)>0||o,q=(B,te)=>{const Ae=g.findIndex(Q=>Q.prefix===B.prefix);if(!L||te==="single-row")return{effectiveWidth:G[Ae]??0,resolvedWidth:R[Ae]??0,maxWidth:gn(Ae,R)};if(te==="two-row-top"){const Q=Z.findIndex(Ze=>Ze.prefix===B.prefix);return{effectiveWidth:j.effective[Q]??0,resolvedWidth:j.resolved[Q]??0,maxWidth:gn(Q,j.resolved)}}const he=T.findIndex(Q=>Q.prefix===B.prefix);return{effectiveWidth:Y.effective[he]??0,resolvedWidth:Y.resolved[he]??0,maxWidth:gn(he,Y.resolved)}},ce=(B,te,Ae)=>{if(!L||Ae==="single-row"){const et=B.findIndex(Ve=>Ve.prefix===te.prefix),Ue=B.map(Ve=>F[Ve.widthKey]),nt=Lo(B.length,Ue);return{effectiveWidth:pr(B.length,Ue)[et]??0,resolvedWidth:nt[et]??0,maxWidth:gn(et,nt)}}if(Ae==="two-row-top"){const et=B.filter(Ve=>Ve.prefix==="title1"),Ue=et.findIndex(Ve=>Ve.prefix===te.prefix),{resolved:nt,effective:tt}=bi(et,F);return{effectiveWidth:tt[Ue]??0,resolvedWidth:nt[Ue]??0,maxWidth:gn(Ue,nt)}}const he=B.filter(et=>et.prefix==="title2"||et.prefix==="title3"),Q=he.findIndex(et=>et.prefix===te.prefix),{resolved:Ze,effective:Fe}=bi(he,F);return{effectiveWidth:Fe[Q]??0,resolvedWidth:Ze[Q]??0,maxWidth:gn(Q,Ze)}},J=B=>Tu(g,R,W,B)+(L?0:p??0),be=()=>L?0:p??0,We=B=>T.slice(0,B).reduce((te,Ae,he)=>te+(Ae.marginLeftKey?W[Ae.marginLeftKey]??0:0)+(Y.resolved[he]??0),0),ye=B=>{const te=T[B];return We(B)+(te.marginLeftKey?W[te.marginLeftKey]??0:0)+(Y.resolved[B]??0)},ue=(B,te,Ae)=>{const he=B.marginLeftKey?W[B.marginLeftKey]??0:0,{effectiveWidth:Q,resolvedWidth:Ze,maxWidth:Fe}=Ae??q(B,te),et=Math.max(he,vi),Ue=o&&te==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":B.prefix,style:{width:A.scalingValue(Q,i),...he>0?{marginLeft:A.scalingValue(he,i)}:{}},children:[a.jsx("p",{className:B.className,style:B.style,children:B.text}),Ue&&B.marginLeftKey?a.jsx("div",{"data-controls":B.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ze),style:{position:"absolute",top:0,left:A.scalingValue(-he,i),width:A.scalingValue(et,i),height:"100%",pointerEvents:"auto"}}):null,Ue?a.jsx("div",{"data-controls":B.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Fe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:A.scalingValue(-Tn/2,i),width:A.scalingValue(Tn,i),height:"100%",pointerEvents:"auto"}}):null]},B.className)},ee=(B="two-row")=>{const te=g.findIndex(Q=>Q.prefix==="title1"),Ae=te>=0?R[te]:F.title1Width,he=B==="two-row"&&o;return a.jsx("div",{...he?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae)}:{},style:{width:A.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...he?{pointerEvents:"auto"}:{}}})},de=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:V,"aria-hidden":"true",children:" "}),ne=B=>{const te=xi(e,B,V,$,E);return a.jsx(a.Fragment,{children:te.map(Ae=>ue(Ae,"single-row",ce(te,Ae,"single-row")))})},Pe=B=>{const te=xi(e,B,V,$,E),Ae=te.find(he=>he.prefix==="title1");return Ae?ue(Ae,"two-row-top",ce(te,Ae,"two-row-top")):null},Te=(B,te=!1)=>{const Ae=xi(e,B,V,$,E),he=Ae.filter(Fe=>Fe.prefix==="title2"||Fe.prefix==="title3"),Q=o&&te;return he.length>0||Q||(m??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[he.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:he.map(Fe=>ue(Fe,"two-row-bottom",ce(Ae,Fe,"two-row-bottom")))}),te&&o?a.jsxs(a.Fragment,{children:[U(),me()]}):null]}):null,(m??0)>0||Q?a.jsx("div",{"data-controls":Q?"titleRowMarginBottom":void 0,"data-controls-axis":Q?"y":void 0,"data-controls-reverse":Q?"":void 0,className:Q?`${e}-control`:void 0,style:{height:H,width:"100%",flexShrink:0,pointerEvents:Q?"auto":"none"}}):null]}):null},Oe=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:A.scalingValue(S??0,i),height:A.scalingValue(S??0,i),marginRight:z,"--close-icon-hover-color":D},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:B=>{B.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(un,{url:C??"",fill:w,hoverFill:i&&!r?w:D,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:z,height:"100%",pointerEvents:"auto"}})]}),ve=()=>se?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:Oe()}):null,Se=B=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:B})}),$e=B=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[se||le?de():null,re?ee("two-row"):null,Se(B),ve()]}),f=(B,te=!1)=>a.jsxs(a.Fragment,{children:[$e(Pe(B)),Te(B,te)]}),X=()=>{const B=L?-1:g.findIndex(he=>he.prefix==="title1"),te=!L&&(o||(p??0)>0)?(()=>{const he=p??0,Q=B>=0?R[B]:F.title1Width,Ze=Math.max(he,vi);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Q),style:{position:"absolute",top:0,left:0,width:A.scalingValue(Ze,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Ae=g.flatMap((he,Q)=>{if(!he.marginLeftKey)return[];const Ze=W[he.marginLeftKey]??0,Fe=Cu(g,R,W,Q)+be(),et=Math.max(Ze,vi);return a.jsx("div",{"data-controls":he.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(R[Q]),style:{position:"absolute",top:0,left:A.scalingValue(Fe,i),width:A.scalingValue(et,i),height:"100%",pointerEvents:"auto"}},he.marginLeftKey)});return te?[te,...Ae]:Ae},N=()=>g.map((B,te)=>{const Ae=gn(te,R),Q=J(te)-Tn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":B.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:A.scalingValue(Q,i),width:A.scalingValue(Tn,i),height:"100%",pointerEvents:"auto"}})},`${B.widthKey}-junction`)}),U=()=>T.flatMap((B,te)=>{if(!B.marginLeftKey)return[];const Ae=W[B.marginLeftKey]??0,he=We(te),Q=Math.max(Ae,vi),{resolvedWidth:Ze}=q(B,"two-row-bottom");return a.jsx("div",{"data-controls":B.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ze),style:{position:"absolute",top:0,left:A.scalingValue(he,i),width:A.scalingValue(Q,i),height:"100%",pointerEvents:"auto"}},B.marginLeftKey)}),me=()=>T.map((B,te)=>{const{maxWidth:Ae}=q(B,"two-row-bottom"),Q=ye(te)-Tn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":B.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:A.scalingValue(Q,i),width:A.scalingValue(Tn,i),height:"100%",pointerEvents:"auto"}})},`${B.widthKey}-junction`)}),K=()=>!o||L?null:a.jsxs(a.Fragment,{children:[X(),N()]}),I=!!(t.title2||t.title3||(m??0)>0||o),ie=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[se||le?de():null,re?ee("single-row"):null,le?Se(ne(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),ve(),K()]}),oe=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...I?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:I?void 0:{flex:"0 0 auto",height:"auto"},children:f(t,!0)}),K()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:_,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...L?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${L?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${L?` ${e}-text-bar-cell-stacked`:""}`,style:L?void 0:{flex:1,minWidth:0,width:"100%"},children:L?oe():ie()})})})]})}function Ay(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Fy(e){return`
7278
+ `,qa={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},wy=["titleColor","subtitleColor","lightboxCounterColor"],$y={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...qa.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:{...qa.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:{...qa.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"b",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,imageCorners:0,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","imageCorners","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay","imageCorners"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...wy],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Cy={element:vy,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:$y,sourceCode:Sy},Ty=50,sc=10,vl="cntrl-lightbox-journal",Pa=vl,Es=`${vl}-`,ka=e=>`${vl}-${e}`,xl=e=>e===Pa||e.startsWith(Es),lc=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},cc=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=lc(t.get(ka(e)));if(i)return i}const n=lc(t.get(Pa));if(n)return n;for(const[i]of t){if(!i.startsWith(Es))continue;const o=i.slice(Es.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},dc=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},$u=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{xl(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(ka(t),String(e)):i.searchParams.set(Pa,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},Ly=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===ka(e)||i===Pa:xl(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)}},Cu=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(ka(e)):[...t.keys()].some(n=>xl(n))},Iy=(e,t)=>{if(Cu(t)){if(e){window.history.back();return}Ly(t)}},Ry=20,Py=2,Ua=e=>`max(${e}, ${Ry}px)`,To=e=>((e==null?void 0:e.image)??[]).slice(0,Py),Tu=e=>e.reduce((t,n)=>t+To(n).length,0),ky=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+To(r).length,1),i=To(e[t]).length;return{start:n,end:n+i-1}},Ey=(e,t)=>{const n=Tu(e),{start:i,end:o}=ky(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},na=(e,t)=>t==="B"?e.flatMap((n,i)=>To(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:To(n)})),My=(e,t,n,i)=>{var r;if(n==="B")return`${t+1} / ${e.length}`;const o=((r=e[t])==null?void 0:r.entryIndex)??0;return Ey(i,o)},uc=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Ay=(e,t,n)=>e==="B"?t.length>1:Tu(n)>1,Tn=.004,vi=.004,xo={title1Width:.13,title2Width:.13,title3Width:.14},xi=(e,t,n,i,o)=>{const r=[];return t.title1&&r.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&r.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&r.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),r},Lo=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},d)=>{if(r<=0||d<=0)return{overflow:r,widths:[d,...l]};const c=Math.min(r,d);return{overflow:r-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},pr=(e,t)=>Lo(e,t),gn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},bi=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Lo(e.length,n),effective:pr(e.length,n)}},Lu=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Iu=(e,t,n,i)=>e.slice(0,i+1).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Ci=["title1","title2","title3","count"],mt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,bl={title1:"1",title2:"2",title3:"3",count:"Count"},Sl=e=>[mt(e,"fontFamily"),mt(e,"fontSettings"),{type:"row",items:[mt(e,"fontSize"),mt(e,"lineHeight"),mt(e,"letterSpacing"),mt(e,"wordSpacing")]},mt(e,"textAlign"),mt(e,"textAppearance")],Fy=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ci.map(e=>[bl[e],Sl(e)]))}),Ny={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},_y={title1:.02,title2:.02,title3:.02,count:.017},Bi=(e,t)=>{const n=i=>{const o=mt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Ny[t]]}},ji=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??_y[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Qt(i,n)};function Ru({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:x=0,title3MarginLeft:y=0,titleRowMarginBottom:m=0,titleHeaderLayout:h="desktop",contentMarginTop:v=0,iconMarginRight:b=0,closeIcon:C=null,closeIconMaxWidth:S=0,closeIconColor:w="#000000",closeIconHoverColor:D="#cccccc"}=n,_=A.scalingValue(v,i),z=A.scalingValue(b,i),H=A.scalingValue(m,i),L=h==="mobile",V=ji("title1",Bi(n,"title1"),i),$=ji("title2",Bi(n,"title2"),i),k=ji("title3",Bi(n,"title3"),i),F=s.useMemo(()=>({title1Width:d??xo.title1Width,title2Width:c??xo.title2Width,title3Width:u??xo.title3Width}),[d,c,u]),W=s.useMemo(()=>({title2MarginLeft:x,title3MarginLeft:y}),[x,y]),g=s.useMemo(()=>xi(e,t,V,$,k),[e,t,V,$,k]),E=s.useMemo(()=>g.map(B=>F[B.widthKey]),[g,F]),R=s.useMemo(()=>Lo(g.length,E),[g.length,E]),G=s.useMemo(()=>pr(g.length,E),[g.length,E]),Z=s.useMemo(()=>g.filter(B=>B.prefix==="title1"),[g]),T=s.useMemo(()=>g.filter(B=>B.prefix==="title2"||B.prefix==="title3"),[g]),j=s.useMemo(()=>bi(Z,F),[Z,F]),K=s.useMemo(()=>bi(T,F),[T,F]),le=!!(t.title1||t.title2||t.title3),se=C!==null;if(!(le||se))return null;const re=(p??0)>0||o,q=(B,te)=>{const Ae=g.findIndex(Q=>Q.prefix===B.prefix);if(!L||te==="single-row")return{effectiveWidth:G[Ae]??0,resolvedWidth:R[Ae]??0,maxWidth:gn(Ae,R)};if(te==="two-row-top"){const Q=Z.findIndex(Ze=>Ze.prefix===B.prefix);return{effectiveWidth:j.effective[Q]??0,resolvedWidth:j.resolved[Q]??0,maxWidth:gn(Q,j.resolved)}}const he=T.findIndex(Q=>Q.prefix===B.prefix);return{effectiveWidth:K.effective[he]??0,resolvedWidth:K.resolved[he]??0,maxWidth:gn(he,K.resolved)}},ce=(B,te,Ae)=>{if(!L||Ae==="single-row"){const et=B.findIndex(Ve=>Ve.prefix===te.prefix),Ue=B.map(Ve=>F[Ve.widthKey]),nt=Lo(B.length,Ue);return{effectiveWidth:pr(B.length,Ue)[et]??0,resolvedWidth:nt[et]??0,maxWidth:gn(et,nt)}}if(Ae==="two-row-top"){const et=B.filter(Ve=>Ve.prefix==="title1"),Ue=et.findIndex(Ve=>Ve.prefix===te.prefix),{resolved:nt,effective:tt}=bi(et,F);return{effectiveWidth:tt[Ue]??0,resolvedWidth:nt[Ue]??0,maxWidth:gn(Ue,nt)}}const he=B.filter(et=>et.prefix==="title2"||et.prefix==="title3"),Q=he.findIndex(et=>et.prefix===te.prefix),{resolved:Ze,effective:Fe}=bi(he,F);return{effectiveWidth:Fe[Q]??0,resolvedWidth:Ze[Q]??0,maxWidth:gn(Q,Ze)}},J=B=>Iu(g,R,W,B)+(L?0:p??0),be=()=>L?0:p??0,We=B=>T.slice(0,B).reduce((te,Ae,he)=>te+(Ae.marginLeftKey?W[Ae.marginLeftKey]??0:0)+(K.resolved[he]??0),0),ye=B=>{const te=T[B];return We(B)+(te.marginLeftKey?W[te.marginLeftKey]??0:0)+(K.resolved[B]??0)},ue=(B,te,Ae)=>{const he=B.marginLeftKey?W[B.marginLeftKey]??0:0,{effectiveWidth:Q,resolvedWidth:Ze,maxWidth:Fe}=Ae??q(B,te),et=Math.max(he,vi),Ue=o&&te==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":B.prefix,style:{width:A.scalingValue(Q,i),...he>0?{marginLeft:A.scalingValue(he,i)}:{}},children:[a.jsx("p",{className:B.className,style:B.style,children:B.text}),Ue&&B.marginLeftKey?a.jsx("div",{"data-controls":B.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ze),style:{position:"absolute",top:0,left:A.scalingValue(-he,i),width:A.scalingValue(et,i),height:"100%",pointerEvents:"auto"}}):null,Ue?a.jsx("div",{"data-controls":B.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Fe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:A.scalingValue(-Tn/2,i),width:A.scalingValue(Tn,i),height:"100%",pointerEvents:"auto"}}):null]},B.className)},ee=(B="two-row")=>{const te=g.findIndex(Q=>Q.prefix==="title1"),Ae=te>=0?R[te]:F.title1Width,he=B==="two-row"&&o;return a.jsx("div",{...he?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae)}:{},style:{width:A.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...he?{pointerEvents:"auto"}:{}}})},de=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:V,"aria-hidden":"true",children:" "}),ne=B=>{const te=xi(e,B,V,$,k);return a.jsx(a.Fragment,{children:te.map(Ae=>ue(Ae,"single-row",ce(te,Ae,"single-row")))})},Pe=B=>{const te=xi(e,B,V,$,k),Ae=te.find(he=>he.prefix==="title1");return Ae?ue(Ae,"two-row-top",ce(te,Ae,"two-row-top")):null},Te=(B,te=!1)=>{const Ae=xi(e,B,V,$,k),he=Ae.filter(Fe=>Fe.prefix==="title2"||Fe.prefix==="title3"),Q=o&&te;return he.length>0||Q||(m??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[he.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:he.map(Fe=>ue(Fe,"two-row-bottom",ce(Ae,Fe,"two-row-bottom")))}),te&&o?a.jsxs(a.Fragment,{children:[U(),me()]}):null]}):null,(m??0)>0||Q?a.jsx("div",{"data-controls":Q?"titleRowMarginBottom":void 0,"data-controls-axis":Q?"y":void 0,"data-controls-reverse":Q?"":void 0,className:Q?`${e}-control`:void 0,style:{height:H,width:"100%",flexShrink:0,pointerEvents:Q?"auto":"none"}}):null]}):null},Oe=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:A.scalingValue(S??0,i),height:A.scalingValue(S??0,i),marginRight:z,"--close-icon-hover-color":D},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:B=>{B.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(un,{url:C??"",fill:w,hoverFill:i&&!r?w:D,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:z,height:"100%",pointerEvents:"auto"}})]}),ve=()=>se?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:Oe()}):null,Se=B=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:B})}),$e=B=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[se||le?de():null,re?ee("two-row"):null,Se(B),ve()]}),f=(B,te=!1)=>a.jsxs(a.Fragment,{children:[$e(Pe(B)),Te(B,te)]}),X=()=>{const B=L?-1:g.findIndex(he=>he.prefix==="title1"),te=!L&&(o||(p??0)>0)?(()=>{const he=p??0,Q=B>=0?R[B]:F.title1Width,Ze=Math.max(he,vi);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Q),style:{position:"absolute",top:0,left:0,width:A.scalingValue(Ze,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Ae=g.flatMap((he,Q)=>{if(!he.marginLeftKey)return[];const Ze=W[he.marginLeftKey]??0,Fe=Lu(g,R,W,Q)+be(),et=Math.max(Ze,vi);return a.jsx("div",{"data-controls":he.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(R[Q]),style:{position:"absolute",top:0,left:A.scalingValue(Fe,i),width:A.scalingValue(et,i),height:"100%",pointerEvents:"auto"}},he.marginLeftKey)});return te?[te,...Ae]:Ae},N=()=>g.map((B,te)=>{const Ae=gn(te,R),Q=J(te)-Tn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":B.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:A.scalingValue(Q,i),width:A.scalingValue(Tn,i),height:"100%",pointerEvents:"auto"}})},`${B.widthKey}-junction`)}),U=()=>T.flatMap((B,te)=>{if(!B.marginLeftKey)return[];const Ae=W[B.marginLeftKey]??0,he=We(te),Q=Math.max(Ae,vi),{resolvedWidth:Ze}=q(B,"two-row-bottom");return a.jsx("div",{"data-controls":B.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ze),style:{position:"absolute",top:0,left:A.scalingValue(he,i),width:A.scalingValue(Q,i),height:"100%",pointerEvents:"auto"}},B.marginLeftKey)}),me=()=>T.map((B,te)=>{const{maxWidth:Ae}=q(B,"two-row-bottom"),Q=ye(te)-Tn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":B.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:A.scalingValue(Q,i),width:A.scalingValue(Tn,i),height:"100%",pointerEvents:"auto"}})},`${B.widthKey}-junction`)}),Y=()=>!o||L?null:a.jsxs(a.Fragment,{children:[X(),N()]}),I=!!(t.title2||t.title3||(m??0)>0||o),ie=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[se||le?de():null,re?ee("single-row"):null,le?Se(ne(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),ve(),Y()]}),oe=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...I?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:I?void 0:{flex:"0 0 auto",height:"auto"},children:f(t,!0)}),Y()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:_,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...L?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${L?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${L?` ${e}-text-bar-cell-stacked`:""}`,style:L?void 0:{flex:1,minWidth:0,width:"100%"},children:L?oe():ie()})})})]})}function Wy(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Hy(e){return`
7279
7279
  .${e}-wrapper {
7280
7280
  display: grid;
7281
7281
  align-items: start;
7282
7282
  justify-content: center;
7283
- min-height: ${Ay(48)};
7283
+ min-height: ${Wy(48)};
7284
7284
  }
7285
7285
  .${e}-item {
7286
7286
  display: flex;
@@ -7595,7 +7595,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7595
7595
  pointer-events: auto;
7596
7596
  flex-shrink: 0;
7597
7597
  }
7598
- `}const uc={url:"",name:"",objectFit:"cover"},_n=500,Xo=650,bn="cubic-bezier(0.22, 1, 0.36, 1)",Ny=72,_y=50,Wy=1e4,Hy=650,Oy=500;function Dy(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Iu(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=ca(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function zy(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Iu(i,n):null}function By(e){return e.reduce((t,n,i)=>{const o=Sl(n.gallery),l=wl(o).filter(d=>d.lightboxMedia).map(d=>d.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function Jo(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function pc(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Jo(e,i,n)}const jy=.03;function Ru(e){return e.width*jy}const Ua={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Ar(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function mc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Vy(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ms(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,d=o/r;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const c=r*l;return{width:c,height:r,left:i.left+(o-c)/2,top:i.top}}function Gy(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Ms(e,t.width,t.height)}function Xy(e,t){if(Do(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function qy(e){const t=new Set,n=[];for(const i of e){const o=Sl(i.gallery),r=wl(o);for(const l of r)for(const d of[l.displayMedia,l.lightboxMedia])d!=null&&d.url&&!t.has(d.url)&&(t.add(d.url),n.push(d))}return n}function Uy({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Do(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Io(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:d}=n,c=Ru(n);return t==="left"?{left:l+c-i,top:r,width:i,height:o}:{left:l+d-c,top:r,width:i,height:o}}function da(e,t,n){const i=Io(e,t,n);return{...i,left:2*i.left-e.left}}function Ky(e,t,n){const{left:i,width:o}=n,r=Ru(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function Pu(e,t,n,i){const o=Io(e,"left",i),r=Io(e,"right",i),l=da(e,"left",i),d=da(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Yy(e,t,n,i){const{start:o,end:r}=Pu(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function Zy(e,t,n){const i=Io(e,t,n),o=da(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Eu(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Sl(e){if(!e)return;if(Eu(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.url?t:void 0,o=n!=null&&n.url?n:void 0;if(!(!i&&!o))return[{media:[o??i??uc,i??o??uc]}]}function Jy(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Qy(e){const[t]=e.media;return t!=null&&t.url?t:null}function wl(e){if(!Array.isArray(e)||e.length===0)return[];if(Eu(e)){const t=[];for(const n of e){const i=Jy(n);if(!i)continue;const o=Qy(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Do(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function ev({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Do(e)?a.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):a.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function tv({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const d=s.useRef(null);return s.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:c=>c.stopPropagation(),style:o},e)})}function Fr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Do(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function nv({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:x,sourceRect:v,resolveCloseSourceRect:m,onClose:h,onPrev:y,onNext:b}){const C=s.useRef(null),S=s.useRef(null),w=s.useRef(null),D=s.useRef(new Map),[_,z]=s.useState(0),H=s.useRef(null),L=s.useRef(0),V=s.useRef(0),$=s.useRef("none"),E=s.useRef(!1),F=s.useRef(!1),W=s.useRef(!1),g=s.useRef(null),M=s.useRef(null),R=s.useRef(null),G=s.useRef(()=>{}),Z=s.useRef(null),T=s.useRef(null),j=s.useRef(null),Y=s.useRef(!1),[le,se]=s.useState(null),[k,re]=s.useState(Ua),[q,ce]=s.useState(0),[J,be]=s.useState("opening"),[We,ye]=s.useState(0),[ue,ee]=s.useState(0),[de,ne]=s.useState(!1),[Pe,Te]=s.useState(null),[Oe,ve]=s.useState(null),[Se,$e]=s.useState(null),[f,X]=s.useState(!1),[N,U]=s.useState(null),[me,K]=s.useState(!1),I=s.useRef(!1),[ie,oe]=s.useState(!1),[B,te]=s.useState(!1),Ae=s.useRef(n),he=s.useRef(void 0),Q=t[n],Ze=Q?Do(Q):!1,Fe=ue!==0||de,et=!l&&(!r||!!d),Ue=c&&!l,nt=u.length>1,tt=s.useCallback((O,Le)=>t.length<=1?null:t[(O+Le+t.length)%t.length]??null,[t]),Ve=nt?Jo(u,p,-1):tt(n,-1),fe=nt?Jo(u,p,1):tt(n,1),He=Pe===-1&&Fe?nt&&Oe!==null?Jo(u,Oe,-1):Se!==null?tt(Se,-1):null:null,Be=Pe===1&&Fe?nt&&Oe!==null?Jo(u,Oe,1):Se!==null?tt(Se,1):null:null,Je=He&&He.url!==(Ve==null?void 0:Ve.url)?He:null,Ce=Be&&Be.url!==(fe==null?void 0:fe.url)?Be:null,De=Ve&&Ue?(()=>{const O=nt?pc(u,p,-1):t.length>2?tt((n-1+t.length)%t.length,-1):null;return O&&O.url!==Ve.url?O:null})():null,Xe=fe&&Ue?(()=>{const O=nt?pc(u,p,1):t.length>2?tt((n+1)%t.length,1):null;return O&&O.url!==fe.url?O:null})():null,ge=Je??De,Me=Ce??Xe,ze=s.useCallback((O,Le,_e)=>{if(!O||!Le||!_e)return;const Ge=D.current,pt=Ge.get(O);(pt==null?void 0:pt.width)===Le&&(pt==null?void 0:pt.height)===_e||(Ge.set(O,{width:Le,height:_e}),z(Ft=>Ft+1))},[]),Re=s.useCallback(O=>{if(!(O!=null&&O.url))return null;const Le=D.current.get(O.url);return Gy(S.current,Le)},[_,q]),xe=s.useCallback(()=>{if(!Q)return;const O=Re(Q);if(O){se(O);return}const Le=S.current;Le&&se(mc(Le))},[Q,Re]),Ie=s.useCallback(O=>{if(nt){const Le=u.length;ve((p+O+Le)%Le),$e(null);return}t.length>1&&($e((n+O+t.length)%t.length),ve(null))},[nt,u.length,p,t.length,n]),Ke=s.useCallback(O=>{W.current=O,ne(O)},[]),Ne=s.useCallback(()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null)},[]),it=s.useCallback(()=>{Ne(),g.current=window.setTimeout(()=>{Ne(),Ke(!1)},Xo+32)},[Ne,Ke]),ot=s.useCallback(()=>{const O=C.current;if(!O){re({left:0,top:0,width:typeof window<"u"?window.innerWidth:Ua.width,height:typeof window<"u"?window.innerHeight:Ua.height});return}const Le=O.getBoundingClientRect();re({left:Le.left,top:Le.top,width:Le.width,height:Le.height})},[]),rt=s.useCallback((O,Le)=>{if(Fe){if(ie&&!de)return`translate(${ue}px, 0px)`;if(de&&Pe!==null){const _e=Re(O);if(!_e)return;const{x:Ge,y:pt}=Yy(_e,Le,Pe,k);return`translate(${Ge}px, ${pt}px)`}if(de)return"translate(0px, 0px)"}},[Fe,ie,de,ue,Pe,k,Re]),ht=s.useCallback(()=>{const O=M.current;M.current=null,Ne(),Ke(!1),Te(null),ve(null),$e(null),ee(0),oe(!1),E.current=!1,V.current=0,$.current="none",O===-1?y():O===1&&b()},[Ne,Ke,y,b]),Pt=s.useCallback(()=>{Ne(),g.current=window.setTimeout(()=>{M.current!==null&&ht()},Xo+32)},[Ne,ht]),Et=s.useCallback(()=>{Ne(),M.current=null,Ke(!1),Te(null),ve(null),$e(null),ee(0),oe(!1),E.current=!1,V.current=0,$.current="none"},[Ne,Ke]),ut=s.useCallback(O=>{if(!(!Ue||!le)){if(W.current){if(M.current===O){R.current=O,ht();return}Et()}Ne(),Ie(O),M.current=O,Te(O),Ke(!0),Pt()}},[Ue,le,ht,Et,Ne,Ie,Ke,Pt]);G.current=ut;const gt=s.useCallback(()=>{Z.current=null,Y.current=!1,T.current!==null&&(window.clearInterval(T.current),T.current=null),j.current!==null&&(window.clearTimeout(j.current),j.current=null)},[]),$t=s.useCallback(O=>{T.current!==null&&window.clearInterval(T.current);const Le=Y.current?Oy:Hy;T.current=window.setInterval(()=>{G.current(O)},Le)},[]),Tt=s.useCallback(O=>{Z.current!==O&&(gt(),Z.current=O,Y.current=!1,G.current(O),$t(O),j.current=window.setTimeout(()=>{j.current=null,Z.current===O&&(Y.current=!0,$t(O))},Wy))},[gt,$t]),ft=s.useCallback(()=>{const O=S.current;if(!O)return;const Le=Q==null?void 0:Q.url,_e=Le?D.current.get(Le):void 0;if(_e!=null&&_e.width&&(_e!=null&&_e.height)){se(Ms(O,_e.width,_e.height));return}const Ge=w.current;if(Ge&&Le&&(Ge.src===Le||Ge.currentSrc===Le)){const{width:Ft,height:ct}=Vy(Ge);if(Ft&&ct){ze(Le,Ft,ct),se(Ms(O,Ft,ct));return}}const pt=mc(O);!pt.width||!pt.height||se(pt)},[Q==null?void 0:Q.url,ze]),At=s.useCallback(O=>{if(w.current=O,!!O){if(O instanceof HTMLVideoElement){O.readyState>=1&&O.videoWidth>0&&ft();return}O.complete&&O.naturalWidth>0&&ft()}},[ft]),zt=s.useCallback(()=>{ot(),ft(),ce(O=>O+1)},[ot,ft]);s.useEffect(()=>{zt();const O=S.current,Le=C.current,_e=new ResizeObserver(()=>zt());return O&&_e.observe(O),Le&&_e.observe(Le),window.addEventListener("resize",zt),()=>{_e.disconnect(),window.removeEventListener("resize",zt)}},[zt,n,x]),s.useLayoutEffect(()=>{if(!Q)return;const O=w.current;if(O){if(O instanceof HTMLImageElement&&O.complete&&O.naturalWidth>0){ft();return}O instanceof HTMLVideoElement&&O.readyState>=1&&O.videoWidth>0&&ft()}},[Q==null?void 0:Q.url,n,ft]),s.useEffect(()=>{xe()},[xe,_]),s.useEffect(()=>{const O=new Set,Le=[],_e=Ge=>{!(Ge!=null&&Ge.url)||O.has(Ge.url)||(O.add(Ge.url),Le.push(Ge))};t.forEach(_e),u.forEach(Ge=>Ge.items.forEach(_e)),Le.forEach(Ge=>{D.current.has(Ge.url)||Xy(Ge,ze)})},[t,u,ze]),s.useEffect(()=>{if(J!=="opening"||!le)return;if(!v){be("open");return}X(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{X(!0),be("open")})});return()=>cancelAnimationFrame(O)},[J,le,v]),s.useEffect(()=>{if(J!=="closing")return;const O=setTimeout(()=>h(),_n);return()=>clearTimeout(O)},[J,h]),s.useEffect(()=>()=>{Ne()},[Ne]),s.useLayoutEffect(()=>{Ae.current===n&&he.current===(Q==null?void 0:Q.url)||(Ne(),M.current=null,Te(null),ve(null),$e(null),ye(0),ee(0),Ke(!1),te(!1),oe(!1),L.current=0,V.current=0,$.current="none",E.current=!1,H.current=null,F.current=!1,w.current=null,xe(),Ae.current=n,he.current=Q==null?void 0:Q.url)},[n,Q==null?void 0:Q.url,Ke,Ne,xe]),s.useLayoutEffect(()=>{const O=R.current;O!==null&&(R.current=null,requestAnimationFrame(()=>{G.current(O)}))},[n,p,Q==null?void 0:Q.url]),s.useLayoutEffect(()=>{if(J==="opening"){I.current=!1,K(!1);return}if(J!=="open"||I.current)return;if(!Ve&&!fe){I.current=!0;return}K(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{K(!0),I.current=!0})});return()=>cancelAnimationFrame(O)},[J,Ve==null?void 0:Ve.url,fe==null?void 0:fe.url]),s.useEffect(()=>{if(J!=="open")return;const O=()=>{const ct=bt=>{bt.stopPropagation(),bt.preventDefault(),document.removeEventListener("click",ct,!0)};document.addEventListener("click",ct,!0)},Le=ct=>{const bt=ct<0?1:-1;Ne(),Ie(bt),M.current=bt,Te(bt),Ke(!0),Pt()},_e=ct=>{if(Math.abs(ct)>_y&&Ue){Le(ct);return}M.current=null,Te(null),ve(null),$e(null),Ke(!0),ee(0),it()},Ge=ct=>{if(ct.touches.length!==1||W.current)return;const bt=ct.touches[0];F.current=!0,H.current={x:bt.clientX,y:bt.clientY},$.current="none",V.current=0,E.current=!1},pt=ct=>{if(!H.current||ct.touches.length!==1||W.current)return;const bt=ct.touches[0],Dt=bt.clientX-H.current.x,kt=bt.clientY-H.current.y;if($.current==="none"){if(Math.abs(Dt)<10&&Math.abs(kt)<10)return;if(Math.abs(Dt)>Math.abs(kt)){if(!Ue)return;$.current="horizontal"}else if(kt>0){if(!et)return;$.current="vertical"}else return}if($.current==="horizontal"){E.current=!0,oe(!0),V.current=Dt,ee(Dt),ct.preventDefault();return}$.current==="vertical"&&(E.current=!0,oe(!0),L.current=kt,ye(kt),ct.preventDefault())},Ft=()=>{if(!H.current)return;const ct=$.current,bt=E.current;if(bt&&ct==="horizontal")_e(V.current),O();else if(bt&&ct==="vertical"){const Dt=L.current;if(et&&Dt>Ny){const kt=window.innerHeight;L.current=kt,te(!0),ye(kt),be("closing")}else L.current=0,ye(0);O()}else ct==="horizontal"&&Math.abs(V.current)>0&&(_e(V.current),O());H.current=null,$.current="none",V.current=0,E.current=!1,oe(!1)};return document.addEventListener("touchstart",Ge,{passive:!0}),document.addEventListener("touchmove",pt,{passive:!1}),document.addEventListener("touchend",Ft),document.addEventListener("touchcancel",Ft),()=>{document.removeEventListener("touchstart",Ge),document.removeEventListener("touchmove",pt),document.removeEventListener("touchend",Ft),document.removeEventListener("touchcancel",Ft)}},[J,Ue,Ke,it,Ne,et,Pt,Ie]);const jt=s.useCallback(()=>{const O=(m==null?void 0:m())??v??null;O&&le&&(U(O),X(!0)),be("closing")},[m,v,le]);s.useEffect(()=>{const O=Ge=>{if(Ge.key==="Escape"){if(r&&d||J==="closing")return;gt(),jt();return}if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight"||J!=="open"||!Ue)return;Ge.preventDefault();const pt=Ge.key==="ArrowLeft"?-1:1;Ge.repeat&&Z.current===pt||Tt(pt)},Le=Ge=>{if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight")return;const pt=Ge.key==="ArrowLeft"?-1:1;Z.current===pt&&gt()},_e=()=>{gt()};return window.addEventListener("keydown",O),window.addEventListener("keyup",Le),window.addEventListener("blur",_e),()=>{window.removeEventListener("keydown",O),window.removeEventListener("keyup",Le),window.removeEventListener("blur",_e),gt()}},[J,r,d,jt,Ue,Tt,gt]),s.useEffect(()=>{J!=="open"&&gt()},[J,gt]);const Zt=()=>{J==="closing"||l||jt()},Ct=J==="open",Vt=J==="closing",rn=We>0?Math.max(0,1-We/500):1,lt=We>0?Math.max(.35,1-We/500):1,Ee=s.useCallback(O=>{if(!(O.propertyName!=="transform"||!W.current)){if(M.current!==null){ht();return}Ne(),Ke(!1)}},[Ne,Ke,ht]),je=J==="closing"?N??v:v,Qe=je&&le&&(J==="opening"||Vt)?Dy(je,le):void 0,dt=Fe&&Q?rt(Q,"center"):We>0?`translateY(${We}px)`:Qe,xt=le?Ar(le,k):null,Mt=!!(je&&le),yt=Mt&&(J==="closing"||J==="open"&&f),Xt={position:"absolute",top:xt==null?void 0:xt.top,left:xt==null?void 0:xt.left,width:xt==null?void 0:xt.width,height:xt==null?void 0:xt.height,objectFit:"contain",transformOrigin:"top left",transform:dt,opacity:We>0?lt:Mt?1:J==="opening"||Vt?0:1,transition:ie&&!de?"none":de?`transform ${Xo}ms ${bn}`:B?`transform ${_n}ms ${bn}, opacity ${_n}ms ${bn}`:yt?`transform ${_n}ms ${bn}`:J==="opening"||Vt?`opacity ${_n}ms ${bn}`:"none",pointerEvents:Ze&&Ct&&!Fe?"auto":"none",touchAction:Ze&&Ct?"none":void 0,zIndex:1,overflow:Ze?"hidden":void 0},Ht={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Ct&&!Fe?"auto":"none"},Nt=(O,Le,_e="adjacent")=>{const Ge=Re(O);if(!Ge)return{display:"none"};const pt=_e==="far"?Le==="left"?"far-left":"far-right":Le==="left"?"left-adjacent":"right-adjacent",{start:Ft}=Pe!==null?Pu(Ge,pt,Pe,k):{start:_e==="far"?da(Ge,Le,k):Io(Ge,Le,k)},ct=Ar(Ft,k),bt=rt(O,pt),Dt=!Fe&&_e==="adjacent"&&Ct&&!me?Zy(Ge,Le,k):null,kt=_e==="far"&&Fe&&Pe===(Le==="left"?-1:1),sn=ie&&!de?!1:de,mn=_e==="adjacent"&&Ct&&me&&!Fe;return{position:"absolute",top:ct.top,left:ct.left,width:ct.width,height:ct.height,objectFit:"contain",transform:bt??(Dt?`translate(${Dt.x}px, ${Dt.y}px)`:void 0),opacity:_e==="far"?Ct&&kt?1:0:Ct?1:0,transition:sn?_e==="far"?`transform ${Xo}ms ${bn}`:`transform ${Xo}ms ${bn}, opacity ${_n}ms ${bn}`:mn?`transform ${_n}ms ${bn}`:J==="opening"||Vt?`opacity ${_n}ms ${bn}`:"none",pointerEvents:"none",zIndex:1}},qt=(O,Le)=>{const _e=Re(O);return _e?Ky(Io(_e,Le,k),Le,k):null},Ut=O=>Le=>{if(!l){if(F.current){F.current=!1;return}Le.stopPropagation(),ut(O)}},Ot=Ve?qt(Ve,"left"):null,Gt=fe?qt(fe,"right"):null,Bt=Ot?Ar(Ot,k):null,Lt=Gt?Ar(Gt,k):null;return a.jsxs("div",{ref:C,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:Zt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Ct?rn:0,transition:ie?"none":`opacity ${_n}ms ${bn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:S,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Ct?1:0,transition:ie?"none":`opacity ${_n}ms ${bn}`,pointerEvents:"none"},children:a.jsx(Lu,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,onClose:Zt})})]}),Ct&&ge&&a.jsx(Fr,{media:ge,style:Nt(ge,"left","far"),onMeasure:ze,onTransitionEnd:Ee},`far-prev-${ge.url}`),Ct&&Ve&&a.jsxs(a.Fragment,{children:[a.jsx(Fr,{media:Ve,style:Nt(Ve,"left"),onMeasure:ze,onTransitionEnd:Ee},`prev-${Ve.url}`),Bt&&a.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||ie?"default":"pointer",pointerEvents:l||ie?"none":"auto",zIndex:3},onClick:Ut(-1)})]}),Ct&&fe&&a.jsxs(a.Fragment,{children:[a.jsx(Fr,{media:fe,style:Nt(fe,"right"),onMeasure:ze,onTransitionEnd:Ee},`next-${fe.url}`),Lt&&a.jsx("div",{style:{position:"absolute",top:Lt.top,left:Lt.left,width:Lt.width,height:Lt.height,cursor:l||ie?"default":"pointer",pointerEvents:l||ie?"none":"auto",zIndex:3},onClick:Ut(1)})]}),Ct&&Me&&a.jsx(Fr,{media:Me,style:Nt(Me,"right","far"),onMeasure:ze,onTransitionEnd:Ee},`far-next-${Me.url}`),le&&Q&&(Ze?a.jsx(tv,{src:Q.url,phase:J,onMediaElement:At,wrapperStyle:Xt,videoStyle:Ht,onLoadedMetadata:ft,onTransitionEnd:Ee},`${n}-${Q.url}`):a.jsx("img",{ref:At,src:Q.url,alt:Q.name,onLoad:ft,onTransitionEnd:Ee,style:Xt},`${n}-${Q.url}`))]})}function iv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:d}=A.useScopedStyles(),{gridLayout:c,verticalGap:u,align:p="top",imageDisplay:x}=e,v=(x==null?void 0:x.display)==="cover",m=(x==null?void 0:x.ratioValue)??"1:1",h=(x==null?void 0:x.reversed)??!1,[y,b]=m.split(":").map(Number),w=`${h?b:y} / ${h?y:b}`,D=c.entryWidth??.2,_=c.columnsCount,z=A.scalingValue(D,n),H=A.scalingValue(c.horizontalGap??0,n),L=z,V=z,$={width:L,...v?{aspectRatio:w,height:"auto",overflow:"hidden"}:{height:"auto"}},E=v?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},F=s.useRef(null),[W,g]=s.useState(!1),[M,R]=s.useState([]),[G,Z]=s.useState(0),[T,j]=s.useState(0),[Y,le]=s.useState(null),[se,k]=s.useState({title1:"",title2:"",title3:""}),re=(()=>{const Se={},$e=F.current?getComputedStyle(F.current).getPropertyValue("--cntrl-article-width").trim():"";return $e&&(Se["--cntrl-article-width"]=$e),Se})(),q=!n||i||o,ce=s.useMemo(()=>Fy(d),[d]),J=t??[],be=J.length%_||_,We=be<_&&J.length>0,ye=J.length-be,ue=We?Math.floor((_-be)/2)+1:1,ee=s.useMemo(()=>By(J),[J]),de=s.useMemo(()=>qy(J),[J]),ne=(Se,$e,f)=>{if(n&&!o&&!i)return;const X=ee.findIndex(U=>U.gridIndex===Se);if(X<0)return;const N=ee[X];j(X),R(N.items),Z($e),k(N.entry),le(f??null),g(!0)},Pe=s.useCallback(()=>{g(!1),le(null)},[]),Te=s.useCallback(()=>{const Se=ee[T];return!Se||!F.current?Y:zy(F.current,Se.gridIndex,v?"cover":"contain")??Y},[ee,T,Y,v]),Oe=s.useCallback(Se=>{if(ee.length>1){const $e=ee.length,f=(T+Se+$e)%$e,X=ee[f],N=Math.min(G,X.items.length-1);j(f),R(X.items),Z(N),k(X.entry);return}Z($e=>($e+Se+M.length)%M.length)},[ee,T,G,M.length]),ve=ee.length>1||M.length>1;return s.useEffect(()=>{if(!W||typeof document>"u")return;const Se=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Se}},[W]),s.useEffect(()=>{!n||o||i||g(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ce}}),a.jsx(Uy,{mediaList:de}),a.jsx("div",{ref:F,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${_}, ${z})`,rowGap:0,columnGap:H,width:A.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:A.scalingValue(u??0,n)},children:J.map((Se,$e)=>{const f=Sl(Se.gallery),X=wl(f),N=X.filter(oe=>oe.lightboxMedia).map(oe=>oe.lightboxMedia),U=Math.floor($e/_)===Math.ceil(J.length/_)-1,me=We&&$e>=ye?`${ue+($e-ye)}`:void 0,K=X[0],I=K!=null&&K.lightboxMedia?N.findIndex(oe=>oe.url===K.lightboxMedia.url):-1,ie=a.jsx("div",{className:`${d}-item-image-wrapper`,style:$,children:X.length>0&&a.jsx(ev,{media:K.displayMedia,gridIndex:$e,className:`${d}-item-${Do(K.displayMedia)?"video":"image"}`.trim(),style:E,onMediaClick:q&&I>=0?oe=>ne($e,I,Iu(oe.currentTarget,v?"cover":"contain")):void 0})});return a.jsx("div",{className:`${d}-item`,children:a.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,U?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:z,...me?{gridColumn:me}:{}},children:[a.jsx("div",{className:`${d}-item-title-row`,children:a.jsx("div",{style:{height:0,width:V}})}),a.jsx("a",{className:`${d}-item-image-link`,children:ie}),a.jsx("div",{className:`${d}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:V}})})]})},$e)})}),W&&typeof document<"u"&&(()=>{const Se=(l?document.getElementById(l):null)??document.body;return ri.createPortal(a.jsx("div",{style:re,"data-selection":"none",children:a.jsx(nv,{prefix:d,items:M,index:G,entry:se,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ve,lightboxEntries:ee,entryIdx:T,layoutId:r,sourceRect:Y,resolveCloseSourceRect:Te,onClose:Pe,onPrev:()=>Oe(-1),onNext:()=>Oe(1)})}),Se)})()]})}const ov=`import { CommonComponentProps } from '../props';
7598
+ `}const pc={url:"",name:"",objectFit:"cover"},_n=500,Xo=650,bn="cubic-bezier(0.22, 1, 0.36, 1)",Oy=72,Dy=50,zy=1e4,By=650,jy=500;function Vy(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Pu(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=da(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function Gy(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Pu(i,n):null}function Xy(e){return e.reduce((t,n,i)=>{const o=wl(n.gallery),l=$l(o).filter(d=>d.lightboxMedia).map(d=>d.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function Jo(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function mc(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Jo(e,i,n)}const qy=.03;function ku(e){return e.width*qy}const Ya={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Ar(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function gc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Uy(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ms(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,d=o/r;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const c=r*l;return{width:c,height:r,left:i.left+(o-c)/2,top:i.top}}function Yy(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Ms(e,t.width,t.height)}function Ky(e,t){if(Do(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function Zy(e){const t=new Set,n=[];for(const i of e){const o=wl(i.gallery),r=$l(o);for(const l of r)for(const d of[l.displayMedia,l.lightboxMedia])d!=null&&d.url&&!t.has(d.url)&&(t.add(d.url),n.push(d))}return n}function Jy({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Do(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Io(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:d}=n,c=ku(n);return t==="left"?{left:l+c-i,top:r,width:i,height:o}:{left:l+d-c,top:r,width:i,height:o}}function ua(e,t,n){const i=Io(e,t,n);return{...i,left:2*i.left-e.left}}function Qy(e,t,n){const{left:i,width:o}=n,r=ku(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function Eu(e,t,n,i){const o=Io(e,"left",i),r=Io(e,"right",i),l=ua(e,"left",i),d=ua(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function ev(e,t,n,i){const{start:o,end:r}=Eu(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function tv(e,t,n){const i=Io(e,t,n),o=ua(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Mu(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function wl(e){if(!e)return;if(Mu(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.url?t:void 0,o=n!=null&&n.url?n:void 0;if(!(!i&&!o))return[{media:[o??i??pc,i??o??pc]}]}function nv(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function iv(e){const[t]=e.media;return t!=null&&t.url?t:null}function $l(e){if(!Array.isArray(e)||e.length===0)return[];if(Mu(e)){const t=[];for(const n of e){const i=nv(n);if(!i)continue;const o=iv(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Do(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function ov({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Do(e)?a.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):a.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function rv({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const d=s.useRef(null);return s.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:c=>c.stopPropagation(),style:o},e)})}function Fr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Do(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function av({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:x,sourceRect:y,resolveCloseSourceRect:m,onClose:h,onPrev:v,onNext:b}){const C=s.useRef(null),S=s.useRef(null),w=s.useRef(null),D=s.useRef(new Map),[_,z]=s.useState(0),H=s.useRef(null),L=s.useRef(0),V=s.useRef(0),$=s.useRef("none"),k=s.useRef(!1),F=s.useRef(!1),W=s.useRef(!1),g=s.useRef(null),E=s.useRef(null),R=s.useRef(null),G=s.useRef(()=>{}),Z=s.useRef(null),T=s.useRef(null),j=s.useRef(null),K=s.useRef(!1),[le,se]=s.useState(null),[M,re]=s.useState(Ya),[q,ce]=s.useState(0),[J,be]=s.useState("opening"),[We,ye]=s.useState(0),[ue,ee]=s.useState(0),[de,ne]=s.useState(!1),[Pe,Te]=s.useState(null),[Oe,ve]=s.useState(null),[Se,$e]=s.useState(null),[f,X]=s.useState(!1),[N,U]=s.useState(null),[me,Y]=s.useState(!1),I=s.useRef(!1),[ie,oe]=s.useState(!1),[B,te]=s.useState(!1),Ae=s.useRef(n),he=s.useRef(void 0),Q=t[n],Ze=Q?Do(Q):!1,Fe=ue!==0||de,et=!l&&(!r||!!d),Ue=c&&!l,nt=u.length>1,tt=s.useCallback((O,Le)=>t.length<=1?null:t[(O+Le+t.length)%t.length]??null,[t]),Ve=nt?Jo(u,p,-1):tt(n,-1),fe=nt?Jo(u,p,1):tt(n,1),He=Pe===-1&&Fe?nt&&Oe!==null?Jo(u,Oe,-1):Se!==null?tt(Se,-1):null:null,Be=Pe===1&&Fe?nt&&Oe!==null?Jo(u,Oe,1):Se!==null?tt(Se,1):null:null,Je=He&&He.url!==(Ve==null?void 0:Ve.url)?He:null,Ce=Be&&Be.url!==(fe==null?void 0:fe.url)?Be:null,De=Ve&&Ue?(()=>{const O=nt?mc(u,p,-1):t.length>2?tt((n-1+t.length)%t.length,-1):null;return O&&O.url!==Ve.url?O:null})():null,Xe=fe&&Ue?(()=>{const O=nt?mc(u,p,1):t.length>2?tt((n+1)%t.length,1):null;return O&&O.url!==fe.url?O:null})():null,ge=Je??De,Ee=Ce??Xe,ze=s.useCallback((O,Le,_e)=>{if(!O||!Le||!_e)return;const Ge=D.current,pt=Ge.get(O);(pt==null?void 0:pt.width)===Le&&(pt==null?void 0:pt.height)===_e||(Ge.set(O,{width:Le,height:_e}),z(Ft=>Ft+1))},[]),Re=s.useCallback(O=>{if(!(O!=null&&O.url))return null;const Le=D.current.get(O.url);return Yy(S.current,Le)},[_,q]),xe=s.useCallback(()=>{if(!Q)return;const O=Re(Q);if(O){se(O);return}const Le=S.current;Le&&se(gc(Le))},[Q,Re]),Ie=s.useCallback(O=>{if(nt){const Le=u.length;ve((p+O+Le)%Le),$e(null);return}t.length>1&&($e((n+O+t.length)%t.length),ve(null))},[nt,u.length,p,t.length,n]),Ye=s.useCallback(O=>{W.current=O,ne(O)},[]),Ne=s.useCallback(()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null)},[]),it=s.useCallback(()=>{Ne(),g.current=window.setTimeout(()=>{Ne(),Ye(!1)},Xo+32)},[Ne,Ye]),ot=s.useCallback(()=>{const O=C.current;if(!O){re({left:0,top:0,width:typeof window<"u"?window.innerWidth:Ya.width,height:typeof window<"u"?window.innerHeight:Ya.height});return}const Le=O.getBoundingClientRect();re({left:Le.left,top:Le.top,width:Le.width,height:Le.height})},[]),rt=s.useCallback((O,Le)=>{if(Fe){if(ie&&!de)return`translate(${ue}px, 0px)`;if(de&&Pe!==null){const _e=Re(O);if(!_e)return;const{x:Ge,y:pt}=ev(_e,Le,Pe,M);return`translate(${Ge}px, ${pt}px)`}if(de)return"translate(0px, 0px)"}},[Fe,ie,de,ue,Pe,M,Re]),ht=s.useCallback(()=>{const O=E.current;E.current=null,Ne(),Ye(!1),Te(null),ve(null),$e(null),ee(0),oe(!1),k.current=!1,V.current=0,$.current="none",O===-1?v():O===1&&b()},[Ne,Ye,v,b]),Pt=s.useCallback(()=>{Ne(),g.current=window.setTimeout(()=>{E.current!==null&&ht()},Xo+32)},[Ne,ht]),kt=s.useCallback(()=>{Ne(),E.current=null,Ye(!1),Te(null),ve(null),$e(null),ee(0),oe(!1),k.current=!1,V.current=0,$.current="none"},[Ne,Ye]),ut=s.useCallback(O=>{if(!(!Ue||!le)){if(W.current){if(E.current===O){R.current=O,ht();return}kt()}Ne(),Ie(O),E.current=O,Te(O),Ye(!0),Pt()}},[Ue,le,ht,kt,Ne,Ie,Ye,Pt]);G.current=ut;const gt=s.useCallback(()=>{Z.current=null,K.current=!1,T.current!==null&&(window.clearInterval(T.current),T.current=null),j.current!==null&&(window.clearTimeout(j.current),j.current=null)},[]),$t=s.useCallback(O=>{T.current!==null&&window.clearInterval(T.current);const Le=K.current?jy:By;T.current=window.setInterval(()=>{G.current(O)},Le)},[]),Tt=s.useCallback(O=>{Z.current!==O&&(gt(),Z.current=O,K.current=!1,G.current(O),$t(O),j.current=window.setTimeout(()=>{j.current=null,Z.current===O&&(K.current=!0,$t(O))},zy))},[gt,$t]),ft=s.useCallback(()=>{const O=S.current;if(!O)return;const Le=Q==null?void 0:Q.url,_e=Le?D.current.get(Le):void 0;if(_e!=null&&_e.width&&(_e!=null&&_e.height)){se(Ms(O,_e.width,_e.height));return}const Ge=w.current;if(Ge&&Le&&(Ge.src===Le||Ge.currentSrc===Le)){const{width:Ft,height:ct}=Uy(Ge);if(Ft&&ct){ze(Le,Ft,ct),se(Ms(O,Ft,ct));return}}const pt=gc(O);!pt.width||!pt.height||se(pt)},[Q==null?void 0:Q.url,ze]),At=s.useCallback(O=>{if(w.current=O,!!O){if(O instanceof HTMLVideoElement){O.readyState>=1&&O.videoWidth>0&&ft();return}O.complete&&O.naturalWidth>0&&ft()}},[ft]),zt=s.useCallback(()=>{ot(),ft(),ce(O=>O+1)},[ot,ft]);s.useEffect(()=>{zt();const O=S.current,Le=C.current,_e=new ResizeObserver(()=>zt());return O&&_e.observe(O),Le&&_e.observe(Le),window.addEventListener("resize",zt),()=>{_e.disconnect(),window.removeEventListener("resize",zt)}},[zt,n,x]),s.useLayoutEffect(()=>{if(!Q)return;const O=w.current;if(O){if(O instanceof HTMLImageElement&&O.complete&&O.naturalWidth>0){ft();return}O instanceof HTMLVideoElement&&O.readyState>=1&&O.videoWidth>0&&ft()}},[Q==null?void 0:Q.url,n,ft]),s.useEffect(()=>{xe()},[xe,_]),s.useEffect(()=>{const O=new Set,Le=[],_e=Ge=>{!(Ge!=null&&Ge.url)||O.has(Ge.url)||(O.add(Ge.url),Le.push(Ge))};t.forEach(_e),u.forEach(Ge=>Ge.items.forEach(_e)),Le.forEach(Ge=>{D.current.has(Ge.url)||Ky(Ge,ze)})},[t,u,ze]),s.useEffect(()=>{if(J!=="opening"||!le)return;if(!y){be("open");return}X(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{X(!0),be("open")})});return()=>cancelAnimationFrame(O)},[J,le,y]),s.useEffect(()=>{if(J!=="closing")return;const O=setTimeout(()=>h(),_n);return()=>clearTimeout(O)},[J,h]),s.useEffect(()=>()=>{Ne()},[Ne]),s.useLayoutEffect(()=>{Ae.current===n&&he.current===(Q==null?void 0:Q.url)||(Ne(),E.current=null,Te(null),ve(null),$e(null),ye(0),ee(0),Ye(!1),te(!1),oe(!1),L.current=0,V.current=0,$.current="none",k.current=!1,H.current=null,F.current=!1,w.current=null,xe(),Ae.current=n,he.current=Q==null?void 0:Q.url)},[n,Q==null?void 0:Q.url,Ye,Ne,xe]),s.useLayoutEffect(()=>{const O=R.current;O!==null&&(R.current=null,requestAnimationFrame(()=>{G.current(O)}))},[n,p,Q==null?void 0:Q.url]),s.useLayoutEffect(()=>{if(J==="opening"){I.current=!1,Y(!1);return}if(J!=="open"||I.current)return;if(!Ve&&!fe){I.current=!0;return}Y(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),I.current=!0})});return()=>cancelAnimationFrame(O)},[J,Ve==null?void 0:Ve.url,fe==null?void 0:fe.url]),s.useEffect(()=>{if(J!=="open")return;const O=()=>{const ct=bt=>{bt.stopPropagation(),bt.preventDefault(),document.removeEventListener("click",ct,!0)};document.addEventListener("click",ct,!0)},Le=ct=>{const bt=ct<0?1:-1;Ne(),Ie(bt),E.current=bt,Te(bt),Ye(!0),Pt()},_e=ct=>{if(Math.abs(ct)>Dy&&Ue){Le(ct);return}E.current=null,Te(null),ve(null),$e(null),Ye(!0),ee(0),it()},Ge=ct=>{if(ct.touches.length!==1||W.current)return;const bt=ct.touches[0];F.current=!0,H.current={x:bt.clientX,y:bt.clientY},$.current="none",V.current=0,k.current=!1},pt=ct=>{if(!H.current||ct.touches.length!==1||W.current)return;const bt=ct.touches[0],Dt=bt.clientX-H.current.x,Mt=bt.clientY-H.current.y;if($.current==="none"){if(Math.abs(Dt)<10&&Math.abs(Mt)<10)return;if(Math.abs(Dt)>Math.abs(Mt)){if(!Ue)return;$.current="horizontal"}else if(Mt>0){if(!et)return;$.current="vertical"}else return}if($.current==="horizontal"){k.current=!0,oe(!0),V.current=Dt,ee(Dt),ct.preventDefault();return}$.current==="vertical"&&(k.current=!0,oe(!0),L.current=Mt,ye(Mt),ct.preventDefault())},Ft=()=>{if(!H.current)return;const ct=$.current,bt=k.current;if(bt&&ct==="horizontal")_e(V.current),O();else if(bt&&ct==="vertical"){const Dt=L.current;if(et&&Dt>Oy){const Mt=window.innerHeight;L.current=Mt,te(!0),ye(Mt),be("closing")}else L.current=0,ye(0);O()}else ct==="horizontal"&&Math.abs(V.current)>0&&(_e(V.current),O());H.current=null,$.current="none",V.current=0,k.current=!1,oe(!1)};return document.addEventListener("touchstart",Ge,{passive:!0}),document.addEventListener("touchmove",pt,{passive:!1}),document.addEventListener("touchend",Ft),document.addEventListener("touchcancel",Ft),()=>{document.removeEventListener("touchstart",Ge),document.removeEventListener("touchmove",pt),document.removeEventListener("touchend",Ft),document.removeEventListener("touchcancel",Ft)}},[J,Ue,Ye,it,Ne,et,Pt,Ie]);const jt=s.useCallback(()=>{const O=(m==null?void 0:m())??y??null;O&&le&&(U(O),X(!0)),be("closing")},[m,y,le]);s.useEffect(()=>{const O=Ge=>{if(Ge.key==="Escape"){if(r&&d||J==="closing")return;gt(),jt();return}if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight"||J!=="open"||!Ue)return;Ge.preventDefault();const pt=Ge.key==="ArrowLeft"?-1:1;Ge.repeat&&Z.current===pt||Tt(pt)},Le=Ge=>{if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight")return;const pt=Ge.key==="ArrowLeft"?-1:1;Z.current===pt&&gt()},_e=()=>{gt()};return window.addEventListener("keydown",O),window.addEventListener("keyup",Le),window.addEventListener("blur",_e),()=>{window.removeEventListener("keydown",O),window.removeEventListener("keyup",Le),window.removeEventListener("blur",_e),gt()}},[J,r,d,jt,Ue,Tt,gt]),s.useEffect(()=>{J!=="open"&&gt()},[J,gt]);const Zt=()=>{J==="closing"||l||jt()},Ct=J==="open",Vt=J==="closing",rn=We>0?Math.max(0,1-We/500):1,lt=We>0?Math.max(.35,1-We/500):1,ke=s.useCallback(O=>{if(!(O.propertyName!=="transform"||!W.current)){if(E.current!==null){ht();return}Ne(),Ye(!1)}},[Ne,Ye,ht]),je=J==="closing"?N??y:y,Qe=je&&le&&(J==="opening"||Vt)?Vy(je,le):void 0,dt=Fe&&Q?rt(Q,"center"):We>0?`translateY(${We}px)`:Qe,xt=le?Ar(le,M):null,Et=!!(je&&le),yt=Et&&(J==="closing"||J==="open"&&f),Xt={position:"absolute",top:xt==null?void 0:xt.top,left:xt==null?void 0:xt.left,width:xt==null?void 0:xt.width,height:xt==null?void 0:xt.height,objectFit:"contain",transformOrigin:"top left",transform:dt,opacity:We>0?lt:Et?1:J==="opening"||Vt?0:1,transition:ie&&!de?"none":de?`transform ${Xo}ms ${bn}`:B?`transform ${_n}ms ${bn}, opacity ${_n}ms ${bn}`:yt?`transform ${_n}ms ${bn}`:J==="opening"||Vt?`opacity ${_n}ms ${bn}`:"none",pointerEvents:Ze&&Ct&&!Fe?"auto":"none",touchAction:Ze&&Ct?"none":void 0,zIndex:1,overflow:Ze?"hidden":void 0},Ht={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Ct&&!Fe?"auto":"none"},Nt=(O,Le,_e="adjacent")=>{const Ge=Re(O);if(!Ge)return{display:"none"};const pt=_e==="far"?Le==="left"?"far-left":"far-right":Le==="left"?"left-adjacent":"right-adjacent",{start:Ft}=Pe!==null?Eu(Ge,pt,Pe,M):{start:_e==="far"?ua(Ge,Le,M):Io(Ge,Le,M)},ct=Ar(Ft,M),bt=rt(O,pt),Dt=!Fe&&_e==="adjacent"&&Ct&&!me?tv(Ge,Le,M):null,Mt=_e==="far"&&Fe&&Pe===(Le==="left"?-1:1),sn=ie&&!de?!1:de,mn=_e==="adjacent"&&Ct&&me&&!Fe;return{position:"absolute",top:ct.top,left:ct.left,width:ct.width,height:ct.height,objectFit:"contain",transform:bt??(Dt?`translate(${Dt.x}px, ${Dt.y}px)`:void 0),opacity:_e==="far"?Ct&&Mt?1:0:Ct?1:0,transition:sn?_e==="far"?`transform ${Xo}ms ${bn}`:`transform ${Xo}ms ${bn}, opacity ${_n}ms ${bn}`:mn?`transform ${_n}ms ${bn}`:J==="opening"||Vt?`opacity ${_n}ms ${bn}`:"none",pointerEvents:"none",zIndex:1}},qt=(O,Le)=>{const _e=Re(O);return _e?Qy(Io(_e,Le,M),Le,M):null},Ut=O=>Le=>{if(!l){if(F.current){F.current=!1;return}Le.stopPropagation(),ut(O)}},Ot=Ve?qt(Ve,"left"):null,Gt=fe?qt(fe,"right"):null,Bt=Ot?Ar(Ot,M):null,Lt=Gt?Ar(Gt,M):null;return a.jsxs("div",{ref:C,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:Zt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Ct?rn:0,transition:ie?"none":`opacity ${_n}ms ${bn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:S,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Ct?1:0,transition:ie?"none":`opacity ${_n}ms ${bn}`,pointerEvents:"none"},children:a.jsx(Ru,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,onClose:Zt})})]}),Ct&&ge&&a.jsx(Fr,{media:ge,style:Nt(ge,"left","far"),onMeasure:ze,onTransitionEnd:ke},`far-prev-${ge.url}`),Ct&&Ve&&a.jsxs(a.Fragment,{children:[a.jsx(Fr,{media:Ve,style:Nt(Ve,"left"),onMeasure:ze,onTransitionEnd:ke},`prev-${Ve.url}`),Bt&&a.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||ie?"default":"pointer",pointerEvents:l||ie?"none":"auto",zIndex:3},onClick:Ut(-1)})]}),Ct&&fe&&a.jsxs(a.Fragment,{children:[a.jsx(Fr,{media:fe,style:Nt(fe,"right"),onMeasure:ze,onTransitionEnd:ke},`next-${fe.url}`),Lt&&a.jsx("div",{style:{position:"absolute",top:Lt.top,left:Lt.left,width:Lt.width,height:Lt.height,cursor:l||ie?"default":"pointer",pointerEvents:l||ie?"none":"auto",zIndex:3},onClick:Ut(1)})]}),Ct&&Ee&&a.jsx(Fr,{media:Ee,style:Nt(Ee,"right","far"),onMeasure:ze,onTransitionEnd:ke},`far-next-${Ee.url}`),le&&Q&&(Ze?a.jsx(rv,{src:Q.url,phase:J,onMediaElement:At,wrapperStyle:Xt,videoStyle:Ht,onLoadedMetadata:ft,onTransitionEnd:ke},`${n}-${Q.url}`):a.jsx("img",{ref:At,src:Q.url,alt:Q.name,onLoad:ft,onTransitionEnd:ke,style:Xt},`${n}-${Q.url}`))]})}function sv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:d}=A.useScopedStyles(),{gridLayout:c,verticalGap:u,align:p="top",imageDisplay:x}=e,y=(x==null?void 0:x.display)==="cover",m=(x==null?void 0:x.ratioValue)??"1:1",h=(x==null?void 0:x.reversed)??!1,[v,b]=m.split(":").map(Number),w=`${h?b:v} / ${h?v:b}`,D=c.entryWidth??.2,_=c.columnsCount,z=A.scalingValue(D,n),H=A.scalingValue(c.horizontalGap??0,n),L=z,V=z,$={width:L,...y?{aspectRatio:w,height:"auto",overflow:"hidden"}:{height:"auto"}},k=y?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},F=s.useRef(null),[W,g]=s.useState(!1),[E,R]=s.useState([]),[G,Z]=s.useState(0),[T,j]=s.useState(0),[K,le]=s.useState(null),[se,M]=s.useState({title1:"",title2:"",title3:""}),re=(()=>{const Se={},$e=F.current?getComputedStyle(F.current).getPropertyValue("--cntrl-article-width").trim():"";return $e&&(Se["--cntrl-article-width"]=$e),Se})(),q=!n||i||o,ce=s.useMemo(()=>Hy(d),[d]),J=t??[],be=J.length%_||_,We=be<_&&J.length>0,ye=J.length-be,ue=We?Math.floor((_-be)/2)+1:1,ee=s.useMemo(()=>Xy(J),[J]),de=s.useMemo(()=>Zy(J),[J]),ne=(Se,$e,f)=>{if(n&&!o&&!i)return;const X=ee.findIndex(U=>U.gridIndex===Se);if(X<0)return;const N=ee[X];j(X),R(N.items),Z($e),M(N.entry),le(f??null),g(!0)},Pe=s.useCallback(()=>{g(!1),le(null)},[]),Te=s.useCallback(()=>{const Se=ee[T];return!Se||!F.current?K:Gy(F.current,Se.gridIndex,y?"cover":"contain")??K},[ee,T,K,y]),Oe=s.useCallback(Se=>{if(ee.length>1){const $e=ee.length,f=(T+Se+$e)%$e,X=ee[f],N=Math.min(G,X.items.length-1);j(f),R(X.items),Z(N),M(X.entry);return}Z($e=>($e+Se+E.length)%E.length)},[ee,T,G,E.length]),ve=ee.length>1||E.length>1;return s.useEffect(()=>{if(!W||typeof document>"u")return;const Se=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Se}},[W]),s.useEffect(()=>{!n||o||i||g(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ce}}),a.jsx(Jy,{mediaList:de}),a.jsx("div",{ref:F,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${_}, ${z})`,rowGap:0,columnGap:H,width:A.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:A.scalingValue(u??0,n)},children:J.map((Se,$e)=>{const f=wl(Se.gallery),X=$l(f),N=X.filter(oe=>oe.lightboxMedia).map(oe=>oe.lightboxMedia),U=Math.floor($e/_)===Math.ceil(J.length/_)-1,me=We&&$e>=ye?`${ue+($e-ye)}`:void 0,Y=X[0],I=Y!=null&&Y.lightboxMedia?N.findIndex(oe=>oe.url===Y.lightboxMedia.url):-1,ie=a.jsx("div",{className:`${d}-item-image-wrapper`,style:$,children:X.length>0&&a.jsx(ov,{media:Y.displayMedia,gridIndex:$e,className:`${d}-item-${Do(Y.displayMedia)?"video":"image"}`.trim(),style:k,onMediaClick:q&&I>=0?oe=>ne($e,I,Pu(oe.currentTarget,y?"cover":"contain")):void 0})});return a.jsx("div",{className:`${d}-item`,children:a.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,U?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:z,...me?{gridColumn:me}:{}},children:[a.jsx("div",{className:`${d}-item-title-row`,children:a.jsx("div",{style:{height:0,width:V}})}),a.jsx("a",{className:`${d}-item-image-link`,children:ie}),a.jsx("div",{className:`${d}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:V}})})]})},$e)})}),W&&typeof document<"u"&&(()=>{const Se=(l?document.getElementById(l):null)??document.body;return ri.createPortal(a.jsx("div",{style:re,"data-selection":"none",children:a.jsx(av,{prefix:d,items:E,index:G,entry:se,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ve,lightboxEntries:ee,entryIdx:T,layoutId:r,sourceRect:K,resolveCloseSourceRect:Te,onClose:Pe,onPrev:()=>Oe(-1),onNext:()=>Oe(1)})}),Se)})()]})}const lv=`import { CommonComponentProps } from '../props';
7599
7599
  import { scalingValue, useScopedStyles } from '../utils/index';
7600
7600
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
7601
7601
  import { createPortal } from 'react-dom';
@@ -9938,11 +9938,11 @@ export function Hive({
9938
9938
  </>
9939
9939
  );
9940
9940
  }
9941
- `,rv="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Fi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function av(e){const t={};return t[mt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSettings")]={...Fi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSize")]={...Fi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[mt(e,"lineHeight")]={...Fi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[mt(e,"letterSpacing")]={...Fi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[mt(e,"wordSpacing")]={...Fi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[mt(e,"textAlign")]={...Fi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[mt(e,"textAppearance")]={...Fi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Ro=Ci.filter(e=>e!=="count"),sv=Ro.reduce((e,t)=>({...e,...av(t)}),{}),lv=Ro.reduce((e,t)=>({...e,[mt(t,"fontFamily")]:"Arial",[mt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[mt(t,"letterSpacing")]:0,[mt(t,"wordSpacing")]:0,[mt(t,"textAlign")]:"left",[mt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ka(e){return Ro.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[mt(n,"fontSize")]=i),o!==void 0&&(t[mt(n,"lineHeight")]=o),t},{})}const cv={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ro.map(e=>[xl[e],bl(e)]))},dv={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},uv=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...dv,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),pv={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:uv},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...sv},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:rv,closeIconColor:"#000000",closeIconHoverColor:"#999999",...lv},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...Ka({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...Ka({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...Ka({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[cv]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},mv={element:iv,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...Ro.map(e=>({path:`${mt(e,"fontFamily")}`}))]},fontRelations:{...Ro.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${mt(t,"fontFamily")}`}),{})},schema:pv,sourceCode:ov};function gv(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 hv({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function Ya(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function fv(e){return String(e??"").trim().length>0}function gc(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 hc(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 fc(e,t,n,i,o,r,l){const d=A.scalingValue(r,l),c=A.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!p||i?d:c}}function yv(e,t,n){const i=A.scalingValue(t,n),o=A.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const yc=10,vc=10,qo={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function vv(e,t,n){return Math.max(t,Math.min(n,e))}function Za(e,t,n){return e+(t-e)*n}function xv(e,t,n,i){if(!t)return{x:0,y:0};const o=t.offsetWidth,l=t.offsetHeight/2;if(e==="cursor"&&n){const d=t.getBoundingClientRect();return{x:n.clientX-d.left+yc,y:n.clientY-d.top+yc}}switch(e){case"left":return{x:vc+i/2,y:l};case"center":return{x:o/2,y:l};case"right":return{x:o-vc-i/2,y:l};default:return{x:o/2,y:l}}}function bv(e,t){const n=s.useRef(null),i=s.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=s.useRef(null),r=s.useCallback(()=>{const m=n.current,h=i.current;m&&(m.style.transform=`translate3d(${h.x}px, ${h.y}px, 0) translate(-50%, -50%) rotate(${h.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),d=s.useCallback(()=>{const m=i.current;t?(m.x=Za(m.x,m.targetX,qo.positionEase),m.y=Za(m.y,m.targetY,qo.positionEase),m.rotation=Za(m.rotation,m.targetRotation,qo.rotationEase)):(m.x=m.targetX,m.y=m.targetY,m.rotation=m.targetRotation),r();const h=Math.abs(m.x-m.targetX)<.4&&Math.abs(m.y-m.targetY)<.4,y=Math.abs(m.rotation-m.targetRotation)<.08;!h||!y?o.current=requestAnimationFrame(d):o.current=null},[r,t]),c=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(d))},[d]),u=s.useCallback((m,h)=>{const y=i.current;y.targetX=m,y.targetY=h,y.targetRotation=0,y.x=m,y.y=h,y.rotation=0,y.lastX=m,y.hasLastX=!0,r(),t&&c()},[r,t,c]),p=s.useCallback((m,h)=>{if(!e)return;const y=i.current;if(t&&y.hasLastX){const b=m-y.lastX;y.targetRotation=vv(b*qo.rotationFactor,-20,qo.maxRotation)}else y.targetRotation=0;if(y.lastX=m,y.hasLastX=!0,y.targetX=m,y.targetY=h,t){c();return}y.x=m,y.y=h,y.rotation=y.targetRotation,r()},[e,r,t,c]),x=s.useCallback(m=>{l(),i.current.hasLastX=!1,m==null||m()},[l]),v=s.useCallback(()=>{l(),i.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},n.current&&(n.current.style.transform="")},[l]);return s.useEffect(()=>(e||v(),l),[e,v,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:x,reset:v}}function Sv(e){return`
9941
+ `,cv="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Fi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function dv(e){const t={};return t[mt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSettings")]={...Fi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSize")]={...Fi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[mt(e,"lineHeight")]={...Fi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[mt(e,"letterSpacing")]={...Fi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[mt(e,"wordSpacing")]={...Fi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[mt(e,"textAlign")]={...Fi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[mt(e,"textAppearance")]={...Fi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Ro=Ci.filter(e=>e!=="count"),uv=Ro.reduce((e,t)=>({...e,...dv(t)}),{}),pv=Ro.reduce((e,t)=>({...e,[mt(t,"fontFamily")]:"Arial",[mt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[mt(t,"letterSpacing")]:0,[mt(t,"wordSpacing")]:0,[mt(t,"textAlign")]:"left",[mt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ka(e){return Ro.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[mt(n,"fontSize")]=i),o!==void 0&&(t[mt(n,"lineHeight")]=o),t},{})}const mv={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ro.map(e=>[bl[e],Sl(e)]))},gv={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},hv=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...gv,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),fv={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:hv},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...uv},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:cv,closeIconColor:"#000000",closeIconHoverColor:"#999999",...pv},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...Ka({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...Ka({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...Ka({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[mv]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},yv={element:sv,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...Ro.map(e=>({path:`${mt(e,"fontFamily")}`}))]},fontRelations:{...Ro.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${mt(t,"fontFamily")}`}),{})},schema:fv,sourceCode:lv};function vv(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 xv({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function Za(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function bv(e){return String(e??"").trim().length>0}function hc(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 fc(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 yc(e,t,n,i,o,r,l){const d=A.scalingValue(r,l),c=A.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!p||i?d:c}}function Sv(e,t,n){const i=A.scalingValue(t,n),o=A.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const vc=10,xc=10,qo={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function wv(e,t,n){return Math.max(t,Math.min(n,e))}function Ja(e,t,n){return e+(t-e)*n}function $v(e,t,n,i){if(!t)return{x:0,y:0};const o=t.offsetWidth,l=t.offsetHeight/2;if(e==="cursor"&&n){const d=t.getBoundingClientRect();return{x:n.clientX-d.left+vc,y:n.clientY-d.top+vc}}switch(e){case"left":return{x:xc+i/2,y:l};case"center":return{x:o/2,y:l};case"right":return{x:o-xc-i/2,y:l};default:return{x:o/2,y:l}}}function Cv(e,t){const n=s.useRef(null),i=s.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=s.useRef(null),r=s.useCallback(()=>{const m=n.current,h=i.current;m&&(m.style.transform=`translate3d(${h.x}px, ${h.y}px, 0) translate(-50%, -50%) rotate(${h.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),d=s.useCallback(()=>{const m=i.current;t?(m.x=Ja(m.x,m.targetX,qo.positionEase),m.y=Ja(m.y,m.targetY,qo.positionEase),m.rotation=Ja(m.rotation,m.targetRotation,qo.rotationEase)):(m.x=m.targetX,m.y=m.targetY,m.rotation=m.targetRotation),r();const h=Math.abs(m.x-m.targetX)<.4&&Math.abs(m.y-m.targetY)<.4,v=Math.abs(m.rotation-m.targetRotation)<.08;!h||!v?o.current=requestAnimationFrame(d):o.current=null},[r,t]),c=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(d))},[d]),u=s.useCallback((m,h)=>{const v=i.current;v.targetX=m,v.targetY=h,v.targetRotation=0,v.x=m,v.y=h,v.rotation=0,v.lastX=m,v.hasLastX=!0,r(),t&&c()},[r,t,c]),p=s.useCallback((m,h)=>{if(!e)return;const v=i.current;if(t&&v.hasLastX){const b=m-v.lastX;v.targetRotation=wv(b*qo.rotationFactor,-20,qo.maxRotation)}else v.targetRotation=0;if(v.lastX=m,v.hasLastX=!0,v.targetX=m,v.targetY=h,t){c();return}v.x=m,v.y=h,v.rotation=v.targetRotation,r()},[e,r,t,c]),x=s.useCallback(m=>{l(),i.current.hasLastX=!1,m==null||m()},[l]),y=s.useCallback(()=>{l(),i.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},n.current&&(n.current.style.transform="")},[l]);return s.useEffect(()=>(e||y(),l),[e,y,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:x,reset:y}}function Tv(e){return`
9942
9942
  .${e}-wrapper {
9943
9943
  display: grid;
9944
9944
  align-items: start;
9945
- min-height: ${Ya(48)};
9945
+ min-height: ${Za(48)};
9946
9946
  position: relative;
9947
9947
  overflow: visible;
9948
9948
  box-sizing: border-box;
@@ -10071,7 +10071,7 @@ a.${e}-list-item {
10071
10071
  flex-shrink: 0;
10072
10072
  overflow: visible;
10073
10073
  box-sizing: border-box;
10074
- min-width: ${Ya(50)};
10074
+ min-width: ${Za(50)};
10075
10075
  position: relative;
10076
10076
  display: flex;
10077
10077
  align-items: flex-start;
@@ -10079,7 +10079,7 @@ a.${e}-list-item {
10079
10079
 
10080
10080
  .${e}-list-col-last {
10081
10081
  flex: 1 1 auto;
10082
- min-width: ${Ya(50)};
10082
+ min-width: ${Za(50)};
10083
10083
  }
10084
10084
 
10085
10085
  .${e}-list-col-title {
@@ -10314,7 +10314,7 @@ a.${e}-list-item {
10314
10314
  overflow-wrap: anywhere;
10315
10315
  word-break: break-word;
10316
10316
  }
10317
- `}const Ti=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],$l=["AColumn","BColumn","CColumn","DColumn","EColumn"],ti="cutLabel",mr=[...$l,ti],Ea=["A","B","C","D","E"];function Mu(e){return`${e}ColumnVerticalAlign`}const ks=["Top","Center","Bottom"];function Cl(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Ea.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function wv(e){const t=Cl(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function $v(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Ea.includes(n)?n:null}function ku(e,t,n){const i=$v(e);return i?i===t?!1:wv(n[Mu(i)]):!0}function gr(e){const t=Cl(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Ea.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Cv(e,t,n){if(Au(e,t,n))return gr(e);const i=gr(e);return i.kind==="baseline"?{kind:"top"}:i}function Tv(e){const t=gr(e);return t.kind==="baseline"?{kind:"top"}:t}function Au(e,t,n){return ku(e,n,t)?gr(e).kind==="baseline":!1}function Lv(e){const t={};let n=!1;for(const i of Ea){const o=Mu(i),r=e[o];if(e.type==="b"){const l=String(r??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}ku(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function Iv(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Rv(e){const t=gr(e).kind;return t==="baseline"?"center":t}function Pv(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function xc(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Ev(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),r=o-i;return n.remove(),r}function Ja(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=Ev(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const d=r.getBoundingClientRect(),c=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(d.height-c)/2:e.kind==="bottom"&&(u=d.height-c),d.top-t+u+l}function Mv(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const r=o.querySelector(`.${n}`);r&&(r.style.minHeight=`${i}px`,r.style.height=`${i}px`)}),i)}function kv(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Av={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Wt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Fv={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Nv(e){return[Wt(e,"textFontFamily"),Wt(e,"textFontSettings"),{type:"row",items:[Wt(e,"textFontSize"),Wt(e,"textLineHeight"),Wt(e,"textLetterSpacing"),Wt(e,"textWordSpacing")]},Wt(e,"textTextAlign"),Wt(e,"textTextAppearance"),`${e}VerticalAlign`]}function _v(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(mr.map(e=>[Fv[e],Nv(e)]))}}function ua(e,t){const n=i=>{const o=Wt(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===ti?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function bc(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return dn(Qt(n,t))}function Sc(e,t,n,i){const o=ua(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function wc(e,t,n,i){const o=ua(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:A.scalingValue((r-l)/2,i)}}const In=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Po=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Eo=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Mo=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Wv={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Hv=["hover","focus","filled","success","error"],$c=.004,co=.004,Qa=co,Tl=50,hr=1440,fr=Tl/hr;function Fu(e){const t=typeof e=="number"&&e>0?e:hr;return Tl/t}function Ov(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 hr}const Nu={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function ir(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Dv(e,t=1){const n=t/e;return Object.fromEntries(In.map(i=>[i,n]))}function zv(){return Object.fromEntries([...Po.map(e=>[e,0]),...Eo.map(e=>[e,0])])}function Bv(){return Object.fromEntries(Mo.map(e=>[e,0]))}function Nr(e){return Object.fromEntries(In.map(t=>[t,typeof e[t]=="number"?e[t]:Nu[t]]))}function _u(e,t,n){const i=e-fr,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const r=i/o;return{paddingLeft:t*r,paddingRight:n*r}}function na(e,t,n){const i=Ll(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((r,l)=>r+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function jv(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=Po[o],l=Eo[o],d=typeof n[r]=="number"?n[r]:0,c=typeof n[l]=="number"?n[l]:0,u=_u(t[o]??0,d,c);u.paddingLeft!==d&&(i[r]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function Ll(e,t,n){if(e<=0)return[];const i=In.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,p)=>u+p,0)+fr;if(t>=l)return i;const d=[...o];let c=l-t;for(let u=d.length-1;u>=0&&c>0;u-=1){const p=d[u]-fr;if(p<=0)continue;const x=Math.min(c,p);d[u]-=x,c-=x}return[...d,i[e-1]]}function Vv(e,t,n){if(e<=1)return{};const i=Ll(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=In[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function Cc(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Ti]}function Gv(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Xv(e,t,n,i){const o=Math.min(i,e.length,In.length),r={};for(let l=0;l<o;l+=1){const d=e[l],c=t.indexOf(d);if(c===-1)continue;const u=In[c],p=Po[c],x=Eo[c],v=Mo[c],m=In[l],h=Po[l],y=Eo[l],b=Mo[l],C=n[u],S=n[p],w=n[x],D=n[v];typeof C=="number"&&(r[m]=C),typeof S=="number"&&(r[h]=S),typeof w=="number"&&(r[y]=w),typeof D=="number"&&(r[b]=D)}return r}function Wu(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 qv(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=ir(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...Dv(n,o),...zv()};if(r)for(const d of Mo)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,Bv());return Wu(e,l)?l:e}function Uv(e,t,n){const i=Lv(e);i&&(e={...e,...i});const o=Fu(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,d=ir(e),c=ir(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:Ti.length,x=w=>{if(u)return w;const D=Nr({...t,...w}),_=ir(w),z=na(p,_,D),H=jv(p,z,{...t,...w});return Object.keys(H).length===0?w:{...w,...H}};if(typeof r=="number"&&r!==l)return e;const v=Cc(e),m=Cc(t);if(!Gv(v,m))return x({...e,...Xv(v,m,t,p)});if(d<c&&typeof p=="number"&&!u){const w=Nr({...t,...e});return x({...e,...Vv(p,d,w)})}if(u){const w=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,D=Math.max(0,(d-o)/2);return w>D?{...e,textPaddingLR:D}:e}const h=Nr({...t,...e}),y=na(p,c,Nr(t)),C=na(p,d,h).some((w,D)=>w<(y[D]??w)),S=In.some(w=>{const D=e[w],_=t[w];return typeof D=="number"&&typeof _=="number"&&D!==_});return C||S?x(e):e}function Kv(e,t,n,i){const o=t.slice(0,e).reduce((l,d)=>l+d,0),r=n.slice(e+1,t.length-1).reduce((l,d)=>l+d,0);return Math.max(fr,i-o-r-fr)}function Yv(e,t){return Math.random()*(t-e)+e}function Zv(e){return Object.fromEntries(In.map(t=>[t,typeof e[t]=="number"?e[t]:Nu[t]]))}function es(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Jv(e,t,n,i,o,r){return e.slice(0,t).map((l,d)=>{const c=Po[d],u=Eo[d],p=Mo[d];return{key:l,textPrefix:Av[l],widthKey:In[d],width:n[In[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[u],paddingBottom:r[p]}})}function Qv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,onUpdateSettings:d}){const{prefix:c}=A.useScopedStyles(),u=!!o,{columns:p,type:x,wrapperWidth:v,entriesCount:m,cellMinHeight:h,dividerWidth:y,showVisibility:b,cut:C,showCut:S,cutCellMinHeight:w,cutLabel:D,imageSize:_,imageOnHover:z,imagePosition:H="cursor",imageInterpolation:L="on",entryHoverEffect:V,entryHoverShowOption:$,rowPaddingTop:E,rowPaddingBottom:F,rowPaddingTopB:W,columnsOrder:g,textPaddingLR:M,textColor:R,backgroundColor:G,dividerColor:Z,textHoverColor:T,backgroundHoverColor:j,dividerHoverColor:Y}=e,[le,se]=s.useState(void 0),[k,re]=s.useState(null),q=s.useRef(null),ce=z==="on"&&(!n||i),J=H==="cursor",be=J&&L==="on",{anchorRef:We,onShow:ye,onCursorMove:ue,exit:ee}=bv(!!(ce&&k!==null),be),de=(C??0)>0,ne=x==="b",Pe=s.useRef(null),Te=s.useRef(null),[Oe,ve]=s.useState(null),[Se,$e]=s.useState(hr),f=Fu(Se),X=Math.max(0,((v??0)-f)/2),N=Math.min(M??0,X),U=Math.max(N,co),me=((v??0)+f)/2;s.useLayoutEffect(()=>{if(!n){$e(hr);return}const Ee=()=>{$e(Ov(Pe.current))};Ee();const je=Pe.current;if(!je)return;const Qe=new ResizeObserver(Ee);Qe.observe(je);let dt=je;for(;dt&&!dt.style.getPropertyValue("--cntrl-article-width");)dt=dt.parentElement;return dt&&Qe.observe(dt),()=>Qe.disconnect()},[n,l]),s.useEffect(()=>{se(void 0)},[C,S,t,m]),s.useEffect(()=>{n&&!i&&se(void 0)},[n,i]);const K=A.buildColorVars(c,{textColor:R,backgroundColor:G,dividerColor:Z,textHoverColor:T,backgroundHoverColor:j,dividerHoverColor:Y},Wv,Hv),I=r&&r!=="default"?`${c}-state-${r}`:"",oe=`${!n||i?V==="default"?`${c}-entry-hover-default`:V==="blinds"?`${c}-entry-hover-blinds`:V==="reveal"?`${c}-entry-hover-reveal`:"":""} ${I}`.trim(),B=V==="reveal"&&(!n||i),te=(b==null?void 0:b[0])??!1,Ae=(b==null?void 0:b[1])??!1,he=s.useRef(e),Q=s.useRef(l);s.useEffect(()=>{if(!d||!n){he.current=e,Q.current=l;return}if(Q.current!==l){he.current=e,Q.current=l;return}const Ee=he.current;if(!(Ee!==e))return;if(typeof Ee.columns=="number"&&typeof e.columns=="number"&&Ee.columns!==e.columns){he.current=e;return}const Qe=Uv(e,Ee,{designWidth:Se});he.current=e,Wu(e,Qe)&&d(Qe)},[e,d,n,l,Se]);const Ze=s.useMemo(()=>Zv(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),Fe=s.useMemo(()=>es(e,Po),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),et=s.useMemo(()=>es(e,Eo),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Ue=s.useMemo(()=>es(e,Mo),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),nt=s.useMemo(()=>Array.isArray(g)&&g.length>0?g:[...Ti],[g]),tt=s.useMemo(()=>Jv(nt,p,Ze,Fe,et,Ue),[nt,p,Ze,Fe,et,Ue]),Ve=ir(e),fe=s.useMemo(()=>In.slice(0,p).map(Ee=>Ze[Ee]),[p,Ze]),He=s.useMemo(()=>Ll(p,Ve,Ze),[p,Ve,Ze]),Be=s.useMemo(()=>na(p,Ve,Ze),[p,Ve,Ze]),Je=s.useMemo(()=>tt.map((Ee,je)=>_u(Be[je]??0,Ee.paddingLeft,Ee.paddingRight)),[tt,Be]),Ce=s.useMemo(()=>{const Ee=m===0?1/0:m;return(t??[]).slice(0,Ee).map((Qe,dt)=>({id:dt,cells:Object.fromEntries(Ti.map(xt=>[xt,Qe[xt]??""])),image:Qe.image,link:Qe.link}))},[t,m]),De=de?le??C:Ce.length,Xe=s.useMemo(()=>de?Ce.slice(0,De):Ce,[Ce,de,De]),ge=de&&De<Ce.length,Me=Xe.length>1||ge,ze=[te?`${c}-divider-top`:"",Ae||Me?`${c}-divider-bottom`:""].filter(Boolean).join(" "),Re=!n||i,xe=()=>{if(!Re)return;const Ee=le??C;if(!S){se(Ce.length);return}se(Math.min(Ee+S,Ce.length))},Ie=Ee=>A.scalingValue(Ee,n??!1),Ke=ne?W??0:E??0,Ne=F??0,it=h??0,ot=Math.max(Ne,Qa),rt=fc(0,Xe.length,te,Ae,ge,y??0,n??!1).borderTopWidth,ht=ne?"rowPaddingTopB":"rowPaddingTop",Pt=tt[0],Et=tt[tt.length-1],ut=Je[0],gt=Je[Je.length-1],$t=Pt&&ut?Math.max(ut.paddingLeft,co):0,Tt=Et&&gt?Math.max(gt.paddingRight,co):0,ft=Ve,At=(Ee,je)=>xv(H,Pe.current,J?Ee:null,je),zt=(Ee,je)=>{if(!ce)return;const Qe=Ee.image;if(!(Qe!=null&&Qe.url)){ee(()=>re(null));return}const dt=(_==null?void 0:_.min)??80,xt=(_==null?void 0:_.max)??320,Mt=(k==null?void 0:k.rowId)===Ee.id,yt=Mt?k.widthPx:Yv(dt,xt),{x:Xt,y:Ht}=At(je,yt);if(Mt&&J){ue(Xt,Ht);return}re({rowId:Ee.id,url:Qe.url,objectFit:"contain",isVideo:gv(Qe),widthPx:yt}),q.current={x:Xt,y:Ht}},jt=Ee=>{if(!ce||!k||!J)return;const{x:je,y:Qe}=At(Ee,k.widthPx);ue(je,Qe)},Zt=()=>{k&&ee(()=>re(null))},Ct=Ee=>{B&&gc(Ee,c),!(!ce||!k)&&ee(()=>re(null))},Vt=Ee=>{B&&hc(Ee,c)};s.useLayoutEffect(()=>{if(!k||!q.current)return;const{x:Ee,y:je}=q.current;q.current=null,ye(Ee,je)},[k==null?void 0:k.rowId,k==null?void 0:k.url,ye]),s.useLayoutEffect(()=>{if(!u||ne){ve(null);return}const Ee=Te.current,je=Ee==null?void 0:Ee.parentElement;if(!Ee||!je){ve(null);return}const Qe=()=>{const xt=Ee.querySelector("[data-list-row]");if(!xt){ve(null);return}const Mt=je.getBoundingClientRect(),yt=xt.getBoundingClientRect();ve(yt.top-Mt.top+yt.height/2)};Qe();const dt=new ResizeObserver(Qe);return dt.observe(Ee),dt.observe(je),()=>dt.disconnect()},[u,ne,Xe,Ke,Ne,it,t,e,tt,Be,Se,y,te,Ae,ge]);const rn=s.useMemo(()=>!ne&&$l.some(Ee=>{const je=Ee.charAt(0),Qe=e[`${Ee}VerticalAlign`];return Au(Qe,e,je)}),[ne,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var Xt;const Ee=Pe.current;if(!Ee)return;const je=()=>{Ee.querySelectorAll("[data-list-col]").forEach(Ht=>{Ht.style.transform="";const Nt=Ht.querySelector(`.${c}-list-col`);Nt&&(Nt.style.minHeight="",Nt.style.height="");const qt=Ht.querySelector(`.${c}-list-col-title`);qt&&(qt.style.transform="")})};if(ne||!rn){je();return}const Qe=()=>{const Ht=Array.from(Ee.querySelectorAll("[data-list-row]")),Nt=`${c}-list-col`,qt=`${c}-baseline-probe`;Ht.forEach(Ut=>{Ut.querySelectorAll("[data-list-col]").forEach(Ot=>{Ot.style.transform="";const Gt=Ot.querySelector(`.${Nt}`);Gt&&(Gt.style.minHeight="",Gt.style.height="");const Bt=Ot.querySelector(`.${c}-list-col-title`);Bt&&(Bt.style.transform="")})}),Ht.forEach(Ut=>{const Ot=Array.from(Ut.querySelectorAll("[data-list-col]"));Mv(Ut,Ot,Nt)}),Ee.offsetHeight,Ht.forEach(Ut=>{const Ot=Array.from(Ut.querySelectorAll("[data-list-col]")),Gt=Ut.getBoundingClientRect().top,Bt=new Map,Lt=Ot.map(_e=>{const Ge=_e.querySelector(`.${c}-list-col-title`),pt={el:_e,titleEl:Ge,letter:_e.getAttribute("data-col-letter")??"",kind:_e.getAttribute("data-valign")??"top",anchor:_e.getAttribute("data-valign-anchor")};return Bt.set(pt.letter,pt),pt}),O=new Map,Le=(_e,Ge)=>{const pt=O.get(_e.letter);if(pt!==void 0)return pt;const Ft=_e.anchor?Bt.get(_e.anchor):void 0;if(_e.kind!=="baseline"||!Ft||Ge.has(_e.letter)){const sn=Ja(_e,Gt,Nt,qt);return O.set(_e.letter,sn),sn}Ge.add(_e.letter);const ct=Le(Ft,Ge);Ge.delete(_e.letter);const bt=Ja(_e,Gt,Nt,qt),Dt=ct-bt;kv(_e.titleEl,Dt);const kt=Ja(_e,Gt,Nt,qt);return O.set(_e.letter,kt),kt};Lt.forEach(_e=>Le(_e,new Set))})};let dt=null;const xt=()=>{dt===null&&(dt=requestAnimationFrame(()=>{dt=null,Qe()}))};Qe();const Mt=new ResizeObserver(()=>xt());Mt.observe(Ee);let yt=!1;return typeof document<"u"&&((Xt=document.fonts)!=null&&Xt.ready)&&document.fonts.ready.then(()=>{yt||xt()}),()=>{yt=!0,dt!==null&&(cancelAnimationFrame(dt),dt=null),Mt.disconnect(),je()}},[rn,ne,e,t,Se,Xe,Be]);const lt=s.useMemo(()=>Sv(c),[c]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:lt}}),a.jsx("div",{style:K,children:a.jsxs("div",{ref:Pe,className:`${c}-wrapper ${oe}${ze?` ${ze}`:""}${ne?` ${c}-type-b`:""}`.trim(),style:{width:A.scalingValue(v??0,n)},onMouseMove:ce?jt:void 0,onMouseLeave:ce?Zt:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[Xe.map((Ee,je)=>{var Mt;const Qe=(((Mt=Ee.link)==null?void 0:Mt.length)??0)>0,dt=Qe&&(!n||i)?"a":"div",xt=fc(je,Xe.length,te,Ae,ge,y??0,n??!1);return a.jsxs(dt,{ref:je===0?yt=>{Te.current=yt}:void 0,className:`${c}-list-item${Qe||$==="always"?` ${c}-list-item-has-link`:""}${ge&&je===Xe.length-1?` ${c}-list-item-before-cut`:""}`,...Qe?{href:Ee.link,target:"_blank"}:{},style:xt,onMouseEnter:yt=>{B&&(Qe||$==="always")&&gc(yt,c),ce&&zt(Ee,yt)},onMouseLeave:yt=>{B&&(Qe||$==="always")&&hc(yt,c)},children:[Ke>0&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ie(Ke)}}),a.jsxs("div",{className:`${c}-list-cols-row${ne?"":` ${c}-list-cols-row-h`}${u&&je===0&&ne?` ${c}-list-cols-row-controls`:""}`,...ne?{}:{"data-list-row":""},style:ne?void 0:{minHeight:Ie(it)},children:[tt.map((yt,Xt)=>{const Ht=Xt===tt.length-1,Nt=Je[Xt],qt=yt.paddingBottom,Ut=fv(Ee.cells[yt.key]),Ot=ne&&Ut&&qt>0,Gt=ne?{minHeight:Ie(it)}:{width:Ie(Be[Xt])},Bt=ne?{paddingLeft:Ie(N),paddingRight:Ie(N)}:{paddingLeft:Ie(Nt.paddingLeft),paddingRight:Ie(Nt.paddingRight)},Lt=yt.textPrefix.charAt(0),O=ne?Tv(e[`${yt.textPrefix}VerticalAlign`]):Cv(e[`${yt.textPrefix}VerticalAlign`],e,Lt),Le=ne&&Ut&&u&&je===0;return ne&&!Ut?null:a.jsxs("div",{className:ne?`${c}-list-col-wrap`:void 0,...ne?{}:{"data-list-col":"","data-col-letter":Lt,"data-valign":O.kind,...O.kind==="baseline"?{"data-valign-anchor":O.anchorLetter}:{}},children:[a.jsx("div",{className:`${c}-list-col${Ht?` ${c}-list-col-last`:""}`,style:{...Bt,...Gt,...ne?{justifyContent:xc(O.kind)}:{}},"data-test":yt.width,children:a.jsx("span",{className:Sc(e,yt.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...bc(ua(e,yt.textPrefix),n),...wc(e,yt.textPrefix,c,n),...ne?{}:Iv(O.kind)},children:Ee.cells[yt.key]??null})}),Ot&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ie(qt)}}),Le&&a.jsx("div",{"data-controls":yt.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ie(Math.max(qt,Qa))}})]},yt.key)}),u&&je===0&&ne&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(me),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:0,width:Ie(U),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(me),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:Ie(Math.max(U,Ve-U)),width:Ie(U),height:"100%"}})]})]}),!ne&&Ne>0&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ie(Ne)}}),u&&je===0&&!ne&&a.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ie(ot)}})]},Ee.id)}),u&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":ht,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":ne?"center":"left-y",className:`${c}-control-anchor`,style:{top:rt,left:0,width:"100%",height:Ie(Math.max(Ke,Qa))}})},"row-padding-handles"),u&&!ne&&Pt&&Et&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Pt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Be[0]-((ut==null?void 0:ut.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Oe??void 0,className:`${c}-control-anchor`,style:{top:0,left:0,width:Ie($t),height:"100%"}}),a.jsx("div",{"data-controls":Et.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Be[tt.length-1]-((gt==null?void 0:gt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Oe??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ie(ft-Tt),width:Ie(Tt),height:"100%"}})]},"column-edge-padding-handles"),u&&!ne&&tt.slice(0,-1).map((Ee,je)=>{const Qe=tt[je+1],dt=He.slice(0,je+1).reduce((Ht,Nt)=>Ht+Nt,0),xt=Je[je],Mt=Je[je+1],yt=Math.max(xt.paddingRight,co),Xt=Math.max(Mt.paddingLeft,co);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Ee.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Be[je]-xt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Oe??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ie(dt-yt),width:Ie(yt),height:"100%"}}),a.jsx("div",{"data-controls":Qe.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Be[je+1]-Mt.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Oe??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ie(dt),width:Ie(Xt),height:"100%"}})]},`${Ee.paddingRightKey}-padding`)}),u&&!ne&&tt.slice(0,-1).map((Ee,je)=>{const Qe=Kv(je,He,fe,Ve),xt=He.slice(0,je+1).reduce((Mt,yt)=>Mt+yt,0)-$c/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Ee.widthKey,"data-controls-axis":"x","data-controls-min":String(Tl),"data-controls-max-fraction":String(Qe),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ie(xt),width:Ie($c),height:"calc(100%)",pointerEvents:"auto"}})},`${Ee.widthKey}-junction`)})]}),ge&&(()=>{const Ee=ua(e,ti),je=Rv(e.cutLabelVerticalAlign),Qe=Ee.textTextAlign==="justify"||ne;return a.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ie(w??0),cursor:Re?"pointer":"default",...yv(Ae,y??0,n??!1)},onClick:Re?xe:void 0,onMouseEnter:B||ce?Ct:void 0,onMouseLeave:B?Vt:void 0,children:a.jsx("div",{className:`${c}-list-cols-row`,style:{...ne?{paddingLeft:Ie(N),paddingRight:Ie(N)}:{},justifyContent:Pv(Ee.textTextAlign),alignItems:xc(je)},children:a.jsx("span",{className:Sc(e,ti,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...bc(Ee,n),...wc(e,ti,c,n),...Qe?{width:"100%"}:{}},children:D})})})})(),ce&&k&&(()=>{const Ee=`${k.widthPx}px`,je={width:Ee,height:"auto",maxHeight:Ee,objectFit:"contain"};return a.jsx("div",{ref:We,className:`${c}-hover-media-anchor`,children:a.jsx(hv,{media:k,className:k.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:je},`${k.rowId}-${k.url}`)})})()]})})]})}const e0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10317
+ `}const Ti=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Cl=["AColumn","BColumn","CColumn","DColumn","EColumn"],ti="cutLabel",mr=[...Cl,ti],Ea=["A","B","C","D","E"];function Au(e){return`${e}ColumnVerticalAlign`}const As=["Top","Center","Bottom"];function Tl(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Ea.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Lv(e){const t=Tl(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Iv(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Ea.includes(n)?n:null}function Fu(e,t,n){const i=Iv(e);return i?i===t?!1:Lv(n[Au(i)]):!0}function gr(e){const t=Tl(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Ea.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Rv(e,t,n){if(Nu(e,t,n))return gr(e);const i=gr(e);return i.kind==="baseline"?{kind:"top"}:i}function Pv(e){const t=gr(e);return t.kind==="baseline"?{kind:"top"}:t}function Nu(e,t,n){return Fu(e,n,t)?gr(e).kind==="baseline":!1}function kv(e){const t={};let n=!1;for(const i of Ea){const o=Au(i),r=e[o];if(e.type==="b"){const l=String(r??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}Fu(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function Ev(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Mv(e){const t=gr(e).kind;return t==="baseline"?"center":t}function Av(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function bc(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Fv(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),r=o-i;return n.remove(),r}function Qa(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=Fv(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const d=r.getBoundingClientRect(),c=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(d.height-c)/2:e.kind==="bottom"&&(u=d.height-c),d.top-t+u+l}function Nv(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const r=o.querySelector(`.${n}`);r&&(r.style.minHeight=`${i}px`,r.style.height=`${i}px`)}),i)}function _v(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Wv={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Wt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Hv={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Ov(e){return[Wt(e,"textFontFamily"),Wt(e,"textFontSettings"),{type:"row",items:[Wt(e,"textFontSize"),Wt(e,"textLineHeight"),Wt(e,"textLetterSpacing"),Wt(e,"textWordSpacing")]},Wt(e,"textTextAlign"),Wt(e,"textTextAppearance"),`${e}VerticalAlign`]}function Dv(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(mr.map(e=>[Hv[e],Ov(e)]))}}function pa(e,t){const n=i=>{const o=Wt(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===ti?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Sc(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return dn(Qt(n,t))}function wc(e,t,n,i){const o=pa(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function $c(e,t,n,i){const o=pa(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:A.scalingValue((r-l)/2,i)}}const In=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Po=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],ko=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Eo=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],zv={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Bv=["hover","focus","filled","success","error"],Cc=.004,co=.004,es=co,Ll=50,hr=1440,fr=Ll/hr;function _u(e){const t=typeof e=="number"&&e>0?e:hr;return Ll/t}function jv(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 hr}const Wu={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function ir(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Vv(e,t=1){const n=t/e;return Object.fromEntries(In.map(i=>[i,n]))}function Gv(){return Object.fromEntries([...Po.map(e=>[e,0]),...ko.map(e=>[e,0])])}function Xv(){return Object.fromEntries(Eo.map(e=>[e,0]))}function Nr(e){return Object.fromEntries(In.map(t=>[t,typeof e[t]=="number"?e[t]:Wu[t]]))}function Hu(e,t,n){const i=e-fr,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const r=i/o;return{paddingLeft:t*r,paddingRight:n*r}}function ia(e,t,n){const i=Il(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((r,l)=>r+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function qv(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=Po[o],l=ko[o],d=typeof n[r]=="number"?n[r]:0,c=typeof n[l]=="number"?n[l]:0,u=Hu(t[o]??0,d,c);u.paddingLeft!==d&&(i[r]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function Il(e,t,n){if(e<=0)return[];const i=In.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,p)=>u+p,0)+fr;if(t>=l)return i;const d=[...o];let c=l-t;for(let u=d.length-1;u>=0&&c>0;u-=1){const p=d[u]-fr;if(p<=0)continue;const x=Math.min(c,p);d[u]-=x,c-=x}return[...d,i[e-1]]}function Uv(e,t,n){if(e<=1)return{};const i=Il(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=In[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function Tc(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Ti]}function Yv(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Kv(e,t,n,i){const o=Math.min(i,e.length,In.length),r={};for(let l=0;l<o;l+=1){const d=e[l],c=t.indexOf(d);if(c===-1)continue;const u=In[c],p=Po[c],x=ko[c],y=Eo[c],m=In[l],h=Po[l],v=ko[l],b=Eo[l],C=n[u],S=n[p],w=n[x],D=n[y];typeof C=="number"&&(r[m]=C),typeof S=="number"&&(r[h]=S),typeof w=="number"&&(r[v]=w),typeof D=="number"&&(r[b]=D)}return r}function Ou(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 Zv(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=ir(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...Vv(n,o),...Gv()};if(r)for(const d of Eo)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,Xv());return Ou(e,l)?l:e}function Jv(e,t,n){const i=kv(e);i&&(e={...e,...i});const o=_u(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,d=ir(e),c=ir(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:Ti.length,x=w=>{if(u)return w;const D=Nr({...t,...w}),_=ir(w),z=ia(p,_,D),H=qv(p,z,{...t,...w});return Object.keys(H).length===0?w:{...w,...H}};if(typeof r=="number"&&r!==l)return e;const y=Tc(e),m=Tc(t);if(!Yv(y,m))return x({...e,...Kv(y,m,t,p)});if(d<c&&typeof p=="number"&&!u){const w=Nr({...t,...e});return x({...e,...Uv(p,d,w)})}if(u){const w=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,D=Math.max(0,(d-o)/2);return w>D?{...e,textPaddingLR:D}:e}const h=Nr({...t,...e}),v=ia(p,c,Nr(t)),C=ia(p,d,h).some((w,D)=>w<(v[D]??w)),S=In.some(w=>{const D=e[w],_=t[w];return typeof D=="number"&&typeof _=="number"&&D!==_});return C||S?x(e):e}function Qv(e,t,n,i){const o=t.slice(0,e).reduce((l,d)=>l+d,0),r=n.slice(e+1,t.length-1).reduce((l,d)=>l+d,0);return Math.max(fr,i-o-r-fr)}function e0(e,t){return Math.random()*(t-e)+e}function t0(e){return Object.fromEntries(In.map(t=>[t,typeof e[t]=="number"?e[t]:Wu[t]]))}function ts(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function n0(e,t,n,i,o,r){return e.slice(0,t).map((l,d)=>{const c=Po[d],u=ko[d],p=Eo[d];return{key:l,textPrefix:Wv[l],widthKey:In[d],width:n[In[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[u],paddingBottom:r[p]}})}function i0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,onUpdateSettings:d}){const{prefix:c}=A.useScopedStyles(),u=!!o,{columns:p,type:x,wrapperWidth:y,entriesCount:m,cellMinHeight:h,dividerWidth:v,showVisibility:b,cut:C,showCut:S,cutCellMinHeight:w,cutLabel:D,imageSize:_,imageOnHover:z,imagePosition:H="cursor",imageInterpolation:L="on",entryHoverEffect:V,entryHoverShowOption:$,rowPaddingTop:k,rowPaddingBottom:F,rowPaddingTopB:W,columnsOrder:g,textPaddingLR:E,textColor:R,backgroundColor:G,dividerColor:Z,textHoverColor:T,backgroundHoverColor:j,dividerHoverColor:K}=e,[le,se]=s.useState(void 0),[M,re]=s.useState(null),q=s.useRef(null),ce=z==="on"&&(!n||i),J=H==="cursor",be=J&&L==="on",{anchorRef:We,onShow:ye,onCursorMove:ue,exit:ee}=Cv(!!(ce&&M!==null),be),de=(C??0)>0,ne=x==="b",Pe=s.useRef(null),Te=s.useRef(null),[Oe,ve]=s.useState(null),[Se,$e]=s.useState(hr),f=_u(Se),X=Math.max(0,((y??0)-f)/2),N=Math.min(E??0,X),U=Math.max(N,co),me=((y??0)+f)/2;s.useLayoutEffect(()=>{if(!n){$e(hr);return}const ke=()=>{$e(jv(Pe.current))};ke();const je=Pe.current;if(!je)return;const Qe=new ResizeObserver(ke);Qe.observe(je);let dt=je;for(;dt&&!dt.style.getPropertyValue("--cntrl-article-width");)dt=dt.parentElement;return dt&&Qe.observe(dt),()=>Qe.disconnect()},[n,l]),s.useEffect(()=>{se(void 0)},[C,S,t,m]),s.useEffect(()=>{n&&!i&&se(void 0)},[n,i]);const Y=A.buildColorVars(c,{textColor:R,backgroundColor:G,dividerColor:Z,textHoverColor:T,backgroundHoverColor:j,dividerHoverColor:K},zv,Bv),I=r&&r!=="default"?`${c}-state-${r}`:"",oe=`${!n||i?V==="default"?`${c}-entry-hover-default`:V==="blinds"?`${c}-entry-hover-blinds`:V==="reveal"?`${c}-entry-hover-reveal`:"":""} ${I}`.trim(),B=V==="reveal"&&(!n||i),te=(b==null?void 0:b[0])??!1,Ae=(b==null?void 0:b[1])??!1,he=s.useRef(e),Q=s.useRef(l);s.useEffect(()=>{if(!d||!n){he.current=e,Q.current=l;return}if(Q.current!==l){he.current=e,Q.current=l;return}const ke=he.current;if(!(ke!==e))return;if(typeof ke.columns=="number"&&typeof e.columns=="number"&&ke.columns!==e.columns){he.current=e;return}const Qe=Jv(e,ke,{designWidth:Se});he.current=e,Ou(e,Qe)&&d(Qe)},[e,d,n,l,Se]);const Ze=s.useMemo(()=>t0(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),Fe=s.useMemo(()=>ts(e,Po),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),et=s.useMemo(()=>ts(e,ko),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Ue=s.useMemo(()=>ts(e,Eo),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),nt=s.useMemo(()=>Array.isArray(g)&&g.length>0?g:[...Ti],[g]),tt=s.useMemo(()=>n0(nt,p,Ze,Fe,et,Ue),[nt,p,Ze,Fe,et,Ue]),Ve=ir(e),fe=s.useMemo(()=>In.slice(0,p).map(ke=>Ze[ke]),[p,Ze]),He=s.useMemo(()=>Il(p,Ve,Ze),[p,Ve,Ze]),Be=s.useMemo(()=>ia(p,Ve,Ze),[p,Ve,Ze]),Je=s.useMemo(()=>tt.map((ke,je)=>Hu(Be[je]??0,ke.paddingLeft,ke.paddingRight)),[tt,Be]),Ce=s.useMemo(()=>{const ke=m===0?1/0:m;return(t??[]).slice(0,ke).map((Qe,dt)=>({id:dt,cells:Object.fromEntries(Ti.map(xt=>[xt,Qe[xt]??""])),image:Qe.image,link:Qe.link}))},[t,m]),De=de?le??C:Ce.length,Xe=s.useMemo(()=>de?Ce.slice(0,De):Ce,[Ce,de,De]),ge=de&&De<Ce.length,Ee=Xe.length>1||ge,ze=[te?`${c}-divider-top`:"",Ae||Ee?`${c}-divider-bottom`:""].filter(Boolean).join(" "),Re=!n||i,xe=()=>{if(!Re)return;const ke=le??C;if(!S){se(Ce.length);return}se(Math.min(ke+S,Ce.length))},Ie=ke=>A.scalingValue(ke,n??!1),Ye=ne?W??0:k??0,Ne=F??0,it=h??0,ot=Math.max(Ne,es),rt=yc(0,Xe.length,te,Ae,ge,v??0,n??!1).borderTopWidth,ht=ne?"rowPaddingTopB":"rowPaddingTop",Pt=tt[0],kt=tt[tt.length-1],ut=Je[0],gt=Je[Je.length-1],$t=Pt&&ut?Math.max(ut.paddingLeft,co):0,Tt=kt&&gt?Math.max(gt.paddingRight,co):0,ft=Ve,At=(ke,je)=>$v(H,Pe.current,J?ke:null,je),zt=(ke,je)=>{if(!ce)return;const Qe=ke.image;if(!(Qe!=null&&Qe.url)){ee(()=>re(null));return}const dt=(_==null?void 0:_.min)??80,xt=(_==null?void 0:_.max)??320,Et=(M==null?void 0:M.rowId)===ke.id,yt=Et?M.widthPx:e0(dt,xt),{x:Xt,y:Ht}=At(je,yt);if(Et&&J){ue(Xt,Ht);return}re({rowId:ke.id,url:Qe.url,objectFit:"contain",isVideo:vv(Qe),widthPx:yt}),q.current={x:Xt,y:Ht}},jt=ke=>{if(!ce||!M||!J)return;const{x:je,y:Qe}=At(ke,M.widthPx);ue(je,Qe)},Zt=()=>{M&&ee(()=>re(null))},Ct=ke=>{B&&hc(ke,c),!(!ce||!M)&&ee(()=>re(null))},Vt=ke=>{B&&fc(ke,c)};s.useLayoutEffect(()=>{if(!M||!q.current)return;const{x:ke,y:je}=q.current;q.current=null,ye(ke,je)},[M==null?void 0:M.rowId,M==null?void 0:M.url,ye]),s.useLayoutEffect(()=>{if(!u||ne){ve(null);return}const ke=Te.current,je=ke==null?void 0:ke.parentElement;if(!ke||!je){ve(null);return}const Qe=()=>{const xt=ke.querySelector("[data-list-row]");if(!xt){ve(null);return}const Et=je.getBoundingClientRect(),yt=xt.getBoundingClientRect();ve(yt.top-Et.top+yt.height/2)};Qe();const dt=new ResizeObserver(Qe);return dt.observe(ke),dt.observe(je),()=>dt.disconnect()},[u,ne,Xe,Ye,Ne,it,t,e,tt,Be,Se,v,te,Ae,ge]);const rn=s.useMemo(()=>!ne&&Cl.some(ke=>{const je=ke.charAt(0),Qe=e[`${ke}VerticalAlign`];return Nu(Qe,e,je)}),[ne,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var Xt;const ke=Pe.current;if(!ke)return;const je=()=>{ke.querySelectorAll("[data-list-col]").forEach(Ht=>{Ht.style.transform="";const Nt=Ht.querySelector(`.${c}-list-col`);Nt&&(Nt.style.minHeight="",Nt.style.height="");const qt=Ht.querySelector(`.${c}-list-col-title`);qt&&(qt.style.transform="")})};if(ne||!rn){je();return}const Qe=()=>{const Ht=Array.from(ke.querySelectorAll("[data-list-row]")),Nt=`${c}-list-col`,qt=`${c}-baseline-probe`;Ht.forEach(Ut=>{Ut.querySelectorAll("[data-list-col]").forEach(Ot=>{Ot.style.transform="";const Gt=Ot.querySelector(`.${Nt}`);Gt&&(Gt.style.minHeight="",Gt.style.height="");const Bt=Ot.querySelector(`.${c}-list-col-title`);Bt&&(Bt.style.transform="")})}),Ht.forEach(Ut=>{const Ot=Array.from(Ut.querySelectorAll("[data-list-col]"));Nv(Ut,Ot,Nt)}),ke.offsetHeight,Ht.forEach(Ut=>{const Ot=Array.from(Ut.querySelectorAll("[data-list-col]")),Gt=Ut.getBoundingClientRect().top,Bt=new Map,Lt=Ot.map(_e=>{const Ge=_e.querySelector(`.${c}-list-col-title`),pt={el:_e,titleEl:Ge,letter:_e.getAttribute("data-col-letter")??"",kind:_e.getAttribute("data-valign")??"top",anchor:_e.getAttribute("data-valign-anchor")};return Bt.set(pt.letter,pt),pt}),O=new Map,Le=(_e,Ge)=>{const pt=O.get(_e.letter);if(pt!==void 0)return pt;const Ft=_e.anchor?Bt.get(_e.anchor):void 0;if(_e.kind!=="baseline"||!Ft||Ge.has(_e.letter)){const sn=Qa(_e,Gt,Nt,qt);return O.set(_e.letter,sn),sn}Ge.add(_e.letter);const ct=Le(Ft,Ge);Ge.delete(_e.letter);const bt=Qa(_e,Gt,Nt,qt),Dt=ct-bt;_v(_e.titleEl,Dt);const Mt=Qa(_e,Gt,Nt,qt);return O.set(_e.letter,Mt),Mt};Lt.forEach(_e=>Le(_e,new Set))})};let dt=null;const xt=()=>{dt===null&&(dt=requestAnimationFrame(()=>{dt=null,Qe()}))};Qe();const Et=new ResizeObserver(()=>xt());Et.observe(ke);let yt=!1;return typeof document<"u"&&((Xt=document.fonts)!=null&&Xt.ready)&&document.fonts.ready.then(()=>{yt||xt()}),()=>{yt=!0,dt!==null&&(cancelAnimationFrame(dt),dt=null),Et.disconnect(),je()}},[rn,ne,e,t,Se,Xe,Be]);const lt=s.useMemo(()=>Tv(c),[c]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:lt}}),a.jsx("div",{style:Y,children:a.jsxs("div",{ref:Pe,className:`${c}-wrapper ${oe}${ze?` ${ze}`:""}${ne?` ${c}-type-b`:""}`.trim(),style:{width:A.scalingValue(y??0,n)},onMouseMove:ce?jt:void 0,onMouseLeave:ce?Zt:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[Xe.map((ke,je)=>{var Et;const Qe=(((Et=ke.link)==null?void 0:Et.length)??0)>0,dt=Qe&&(!n||i)?"a":"div",xt=yc(je,Xe.length,te,Ae,ge,v??0,n??!1);return a.jsxs(dt,{ref:je===0?yt=>{Te.current=yt}:void 0,className:`${c}-list-item${Qe||$==="always"?` ${c}-list-item-has-link`:""}${ge&&je===Xe.length-1?` ${c}-list-item-before-cut`:""}`,...Qe?{href:ke.link,target:"_blank"}:{},style:xt,onMouseEnter:yt=>{B&&(Qe||$==="always")&&hc(yt,c),ce&&zt(ke,yt)},onMouseLeave:yt=>{B&&(Qe||$==="always")&&fc(yt,c)},children:[Ye>0&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ie(Ye)}}),a.jsxs("div",{className:`${c}-list-cols-row${ne?"":` ${c}-list-cols-row-h`}${u&&je===0&&ne?` ${c}-list-cols-row-controls`:""}`,...ne?{}:{"data-list-row":""},style:ne?void 0:{minHeight:Ie(it)},children:[tt.map((yt,Xt)=>{const Ht=Xt===tt.length-1,Nt=Je[Xt],qt=yt.paddingBottom,Ut=bv(ke.cells[yt.key]),Ot=ne&&Ut&&qt>0,Gt=ne?{minHeight:Ie(it)}:{width:Ie(Be[Xt])},Bt=ne?{paddingLeft:Ie(N),paddingRight:Ie(N)}:{paddingLeft:Ie(Nt.paddingLeft),paddingRight:Ie(Nt.paddingRight)},Lt=yt.textPrefix.charAt(0),O=ne?Pv(e[`${yt.textPrefix}VerticalAlign`]):Rv(e[`${yt.textPrefix}VerticalAlign`],e,Lt),Le=ne&&Ut&&u&&je===0;return ne&&!Ut?null:a.jsxs("div",{className:ne?`${c}-list-col-wrap`:void 0,...ne?{}:{"data-list-col":"","data-col-letter":Lt,"data-valign":O.kind,...O.kind==="baseline"?{"data-valign-anchor":O.anchorLetter}:{}},children:[a.jsx("div",{className:`${c}-list-col${Ht?` ${c}-list-col-last`:""}`,style:{...Bt,...Gt,...ne?{justifyContent:bc(O.kind)}:{}},"data-test":yt.width,children:a.jsx("span",{className:wc(e,yt.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...Sc(pa(e,yt.textPrefix),n),...$c(e,yt.textPrefix,c,n),...ne?{}:Ev(O.kind)},children:ke.cells[yt.key]??null})}),Ot&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ie(qt)}}),Le&&a.jsx("div",{"data-controls":yt.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ie(Math.max(qt,es))}})]},yt.key)}),u&&je===0&&ne&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(me),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:0,width:Ie(U),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(me),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:Ie(Math.max(U,Ve-U)),width:Ie(U),height:"100%"}})]})]}),!ne&&Ne>0&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ie(Ne)}}),u&&je===0&&!ne&&a.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ie(ot)}})]},ke.id)}),u&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":ht,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":ne?"center":"left-y",className:`${c}-control-anchor`,style:{top:rt,left:0,width:"100%",height:Ie(Math.max(Ye,es))}})},"row-padding-handles"),u&&!ne&&Pt&&kt&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Pt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Be[0]-((ut==null?void 0:ut.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Oe??void 0,className:`${c}-control-anchor`,style:{top:0,left:0,width:Ie($t),height:"100%"}}),a.jsx("div",{"data-controls":kt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Be[tt.length-1]-((gt==null?void 0:gt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Oe??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ie(ft-Tt),width:Ie(Tt),height:"100%"}})]},"column-edge-padding-handles"),u&&!ne&&tt.slice(0,-1).map((ke,je)=>{const Qe=tt[je+1],dt=He.slice(0,je+1).reduce((Ht,Nt)=>Ht+Nt,0),xt=Je[je],Et=Je[je+1],yt=Math.max(xt.paddingRight,co),Xt=Math.max(Et.paddingLeft,co);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":ke.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Be[je]-xt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Oe??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ie(dt-yt),width:Ie(yt),height:"100%"}}),a.jsx("div",{"data-controls":Qe.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Be[je+1]-Et.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Oe??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ie(dt),width:Ie(Xt),height:"100%"}})]},`${ke.paddingRightKey}-padding`)}),u&&!ne&&tt.slice(0,-1).map((ke,je)=>{const Qe=Qv(je,He,fe,Ve),xt=He.slice(0,je+1).reduce((Et,yt)=>Et+yt,0)-Cc/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":ke.widthKey,"data-controls-axis":"x","data-controls-min":String(Ll),"data-controls-max-fraction":String(Qe),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ie(xt),width:Ie(Cc),height:"calc(100%)",pointerEvents:"auto"}})},`${ke.widthKey}-junction`)})]}),ge&&(()=>{const ke=pa(e,ti),je=Mv(e.cutLabelVerticalAlign),Qe=ke.textTextAlign==="justify"||ne;return a.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ie(w??0),cursor:Re?"pointer":"default",...Sv(Ae,v??0,n??!1)},onClick:Re?xe:void 0,onMouseEnter:B||ce?Ct:void 0,onMouseLeave:B?Vt:void 0,children:a.jsx("div",{className:`${c}-list-cols-row`,style:{...ne?{paddingLeft:Ie(N),paddingRight:Ie(N)}:{},justifyContent:Av(ke.textTextAlign),alignItems:bc(je)},children:a.jsx("span",{className:wc(e,ti,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...Sc(ke,n),...$c(e,ti,c,n),...Qe?{width:"100%"}:{}},children:D})})})})(),ce&&M&&(()=>{const ke=`${M.widthPx}px`,je={width:ke,height:"auto",maxHeight:ke,objectFit:"contain"};return a.jsx("div",{ref:We,className:`${c}-hover-media-anchor`,children:a.jsx(xv,{media:M,className:M.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:je},`${M.rowId}-${M.url}`)})})()]})})]})}const o0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10318
10318
  import { CommonComponentProps } from '../props';
10319
10319
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
10320
10320
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -13402,7 +13402,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13402
13402
  </>
13403
13403
  );
13404
13404
  }
13405
- `,zo=["A","B","C","D","E"],Tc=[...ks,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Ni={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function t0(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function _r(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function n0(){return Object.fromEntries(zo.map((e,t)=>{const n=Ti[t],i=`${e} column`;return[n,t0(i)]}))}function i0(){const e={};for(const t of zo)e[`${t}ColumnWidth`]=_r(`${t} column width`),e[`${t}ColumnPaddingLeft`]=_r(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=_r(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=_r(`${t} column padding bottom`);return e}function Lc(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Ti]};for(const r of zo)i[`${r}ColumnWidth`]=r==="A"?.0798:.32,i[`${r}ColumnPaddingLeft`]=0,i[`${r}ColumnPaddingRight`]=0,i[`${r}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function o0(e){const t={};if(e===ti)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...ks]},enum:[...ks]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Tc],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Tc]}}return t[Wt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Wt(e,"textFontSettings")]={...Ni.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Wt(e,"textFontSize")]={...Ni.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Wt(e,"textLineHeight")]={...Ni.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Wt(e,"textLetterSpacing")]={...Ni.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Wt(e,"textWordSpacing")]={...Ni.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Wt(e,"textTextAlign")]={...Ni.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Wt(e,"textTextAppearance")]={...Ni.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const r0=mr.reduce((e,t)=>({...e,...o0(t)}),{});function a0(e){return{verticalAlign:e===ti?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===ti?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function s0(e,t={}){var n;return{...a0(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Ic=new Set(["textFontFamily","textFontSettings"]);function l0(e,t,n){const i=r=>n===void 0?!0:n==="common"?Ic.has(r):!Ic.has(r),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Cl(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Wt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Wt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Wt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Wt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Wt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Wt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Wt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Wt(e,"textTextAppearance")]=t.textTextAppearance),o}function ia(e={},t){return mr.reduce((n,i)=>({...n,...l0(i,s0(i,e),t)}),{})}const c0=ia(),d0=_v();function Hu(e){return[Wt(e,"textFontFamily"),Wt(e,"textFontSettings"),Wt(e,"textFontSize"),Wt(e,"textLineHeight"),Wt(e,"textLetterSpacing"),Wt(e,"textWordSpacing"),Wt(e,"textTextAlign"),Wt(e,"textTextAppearance"),`${e}VerticalAlign`]}function u0(){const e=[];return $l.forEach((t,n)=>{const i=Ti[n],o=Hu(t);for(let r=1;r<Ti.length;r+=1){const l=[{name:"columns",value:r},...Array.from({length:r},(d,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:l,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const p0=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Hu(ti);const m0=[...zo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],_i=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg"}],g0=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:_i[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:_i[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:_i[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:_i[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:_i[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:_i[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:_i[6],link:""}],h0=[...zo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],f0={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...n0(),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:g0},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imagePosition:{type:"string",scope:"layout",title:"Image Position",display:{type:"toggle-cycle",enum:["left","center","right","cursor"]}},imageInterpolation:{type:"boolean",scope:"common",title:"Interpolation",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...i0(),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"}},...r0,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",imagePosition:"cursor",imageInterpolation:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...c0,...ia({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Lc({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},...ia({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Lc({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},...ia({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...u0(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...m0.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}},...zo.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}})),{if:{name:"imagePosition",value:"cursor",isNotEqual:!0},then:{name:"properties.imageInterpolation.display.enabled",value:!1}}],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imagePosition","imageInterpolation","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...h0]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"",items:["imagePosition","imageInterpolation"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",d0]}],paletteBookmark:{items:[...p0],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},y0={element:Qv,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>qv(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...mr.map(e=>({path:`${Wt(e,"textFontFamily")}`}))]},fontRelations:{...mr.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Wt(t,"textFontFamily")}`}),{})},schema:f0,sourceCode:e0},Rc=300,di=.004,v0={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},x0=["hover","focus","filled","success","error"];function b0(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Pc(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Ec(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:A.scalingValue((o-t)/2,i)}}function S0(e){return`
13405
+ `,zo=["A","B","C","D","E"],Lc=[...As,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Ni={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function r0(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function _r(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function a0(){return Object.fromEntries(zo.map((e,t)=>{const n=Ti[t],i=`${e} column`;return[n,r0(i)]}))}function s0(){const e={};for(const t of zo)e[`${t}ColumnWidth`]=_r(`${t} column width`),e[`${t}ColumnPaddingLeft`]=_r(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=_r(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=_r(`${t} column padding bottom`);return e}function Ic(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Ti]};for(const r of zo)i[`${r}ColumnWidth`]=r==="A"?.0798:.32,i[`${r}ColumnPaddingLeft`]=0,i[`${r}ColumnPaddingRight`]=0,i[`${r}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function l0(e){const t={};if(e===ti)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...As]},enum:[...As]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Lc],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Lc]}}return t[Wt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Wt(e,"textFontSettings")]={...Ni.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Wt(e,"textFontSize")]={...Ni.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Wt(e,"textLineHeight")]={...Ni.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Wt(e,"textLetterSpacing")]={...Ni.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Wt(e,"textWordSpacing")]={...Ni.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Wt(e,"textTextAlign")]={...Ni.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Wt(e,"textTextAppearance")]={...Ni.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const c0=mr.reduce((e,t)=>({...e,...l0(t)}),{});function d0(e){return{verticalAlign:e===ti?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===ti?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function u0(e,t={}){var n;return{...d0(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Rc=new Set(["textFontFamily","textFontSettings"]);function p0(e,t,n){const i=r=>n===void 0?!0:n==="common"?Rc.has(r):!Rc.has(r),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Tl(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Wt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Wt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Wt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Wt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Wt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Wt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Wt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Wt(e,"textTextAppearance")]=t.textTextAppearance),o}function oa(e={},t){return mr.reduce((n,i)=>({...n,...p0(i,u0(i,e),t)}),{})}const m0=oa(),g0=Dv();function Du(e){return[Wt(e,"textFontFamily"),Wt(e,"textFontSettings"),Wt(e,"textFontSize"),Wt(e,"textLineHeight"),Wt(e,"textLetterSpacing"),Wt(e,"textWordSpacing"),Wt(e,"textTextAlign"),Wt(e,"textTextAppearance"),`${e}VerticalAlign`]}function h0(){const e=[];return Cl.forEach((t,n)=>{const i=Ti[n],o=Du(t);for(let r=1;r<Ti.length;r+=1){const l=[{name:"columns",value:r},...Array.from({length:r},(d,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:l,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const f0=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Du(ti);const y0=[...zo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],_i=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg"}],v0=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:_i[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:_i[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:_i[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:_i[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:_i[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:_i[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:_i[6],link:""}],x0=[...zo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],b0={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...a0(),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:v0},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imagePosition:{type:"string",scope:"layout",title:"Image Position",display:{type:"toggle-cycle",enum:["left","center","right","cursor"]}},imageInterpolation:{type:"boolean",scope:"common",title:"Interpolation",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...s0(),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"}},...c0,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",imagePosition:"cursor",imageInterpolation:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...m0,...oa({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Ic({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},...oa({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Ic({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},...oa({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...h0(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...y0.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}},...zo.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}})),{if:{name:"imagePosition",value:"cursor",isNotEqual:!0},then:{name:"properties.imageInterpolation.display.enabled",value:!1}}],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imagePosition","imageInterpolation","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...x0]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"",items:["imagePosition","imageInterpolation"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",g0]}],paletteBookmark:{items:[...f0],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},S0={element:i0,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Zv(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...mr.map(e=>({path:`${Wt(e,"textFontFamily")}`}))]},fontRelations:{...mr.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Wt(t,"textFontFamily")}`}),{})},schema:b0,sourceCode:o0},Pc=300,di=.004,w0={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},$0=["hover","focus","filled","success","error"];function C0(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function kc(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Ec(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:A.scalingValue((o-t)/2,i)}}function T0(e){return`
13406
13406
  .${e}-wrapper {
13407
13407
  box-sizing: border-box;
13408
13408
  display: flex;
@@ -13464,7 +13464,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13464
13464
  display: flex;
13465
13465
  align-items: center;
13466
13466
  justify-content: space-between;
13467
- gap: ${b0(20)};
13467
+ gap: ${C0(20)};
13468
13468
  width: 100%;
13469
13469
  min-width: 0;
13470
13470
  min-height: var(--${e}-question-min-height, unset);
@@ -13492,7 +13492,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13492
13492
  width: var(--${e}-icon-max-width);
13493
13493
  height: var(--${e}-icon-max-width);
13494
13494
  position: relative;
13495
- transition: transform ${Rc}ms ease;
13495
+ transition: transform ${Pc}ms ease;
13496
13496
  }
13497
13497
  .${e}-icon-custom {
13498
13498
  display: flex;
@@ -13529,7 +13529,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13529
13529
  .${e}-panel {
13530
13530
  display: grid;
13531
13531
  grid-template-rows: 0fr;
13532
- transition: grid-template-rows ${Rc}ms ease;
13532
+ transition: grid-template-rows ${Pc}ms ease;
13533
13533
  }
13534
13534
  .${e}-item-open .${e}-panel {
13535
13535
  grid-template-rows: 1fr;
@@ -13567,7 +13567,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13567
13567
  pointer-events: none;
13568
13568
  z-index: 2;
13569
13569
  }
13570
- `}function Mc(e,t,n,i,o,r,l,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:r??0,textAppearance:l,color:d??"#000000"}}function w0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=A.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:x="solid",entryHoverEffect:v="default",autoclose:m="off",icon:h,iconMaxWidth:y=.00833,iconPaddingRight:b=0,iconAnimation:C="rotate 45",questionColor:S="#000000",answerColor:w="#000000",dividerColor:D="#0000001F",iconColor:_="#000000",questionHoverColor:z="#666666",iconHoverColor:H="#666666",iconActiveColor:L="#000000",dividerHoverColor:V="#000000",questionFontFamily:$,questionFontSettings:E,questionFontSize:F,questionLineHeight:W,questionLetterSpacing:g,questionWordSpacing:M,questionTextAppearance:R,answerFontFamily:G,answerFontSettings:Z,answerFontSize:T,answerLineHeight:j,answerLetterSpacing:Y,answerWordSpacing:le,answerTextAppearance:se,questionPaddingLeft:k=0,questionPaddingTop:re=0,questionPaddingBottom:q=0,answerPaddingLeft:ce=0,answerPaddingRight:J=0,answerPaddingTop:be=0,answerPaddingBottom:We=0}=e,ye=t??[],[ue,ee]=s.useState(()=>new Set),de=!n||i;s.useEffect(()=>{ee(new Set)},[m]),s.useEffect(()=>{n&&!o&&!i&&ee(new Set)},[n,o,i]);const ne=Je=>A.scalingValue(Je,n??!1),Pe=Math.max(k,di),Te=Math.max(re,di),Oe=Math.max(q,di),ve=Math.max(ce,di),Se=Math.max(J,di),$e=Math.max(be,di),f=Math.max(We,di),X=Math.max(0,(c??1)-b-y),N=Math.max(0,(c??1)-J),U=Math.max(0,(c??1)-ce),me=Math.max(b,di),K=Math.max(0,(c??1)-k-y),I=s.useMemo(()=>ue.size===0?0:Math.min(...ue),[ue]),ie=s.useCallback(Je=>ue.has(Je),[ue]),oe=de&&v==="default"?`${l}-entry-hover-default`:"",B=h??"",te=B!=="",Ae=C.replace(/^rotate /,""),he=`${l}-icon-anim-${Ae}`,Q=dn(Qt(Mc($,E,F,W,g,M,R,S),n)),Ze=dn(Qt(Mc(G,Z,T,j,Y,le,se,w),n)),Fe=Pc(F,W,`${l}-question`,`${l}-text-tight-leading`),et=Pc(T,j,`${l}-answer-text`,`${l}-text-tight-leading`),Ue=Ec(F,W,l,n),nt=Ec(T,j,l,n),tt=A.buildColorVars(l,{questionColor:S,answerColor:w,dividerColor:D,iconColor:_,questionHoverColor:z,iconHoverColor:H,iconActiveColor:L,dividerHoverColor:V},v0,x0),Ve=r&&r!=="default"?`${l}-state-${r}`:"",fe=s.useCallback(Je=>{de&&ee(Ce=>{if(Ce.has(Je)){const Xe=new Set(Ce);return Xe.delete(Je),Xe}if(m==="on")return new Set([Je]);const De=new Set(Ce);return De.add(Je),De})},[de,m]),He=s.useMemo(()=>S0(l),[l]),Be={[`--${l}-divider-width`]:A.scalingValue(p,n??!1),[`--${l}-divider-style`]:x,[`--${l}-icon-max-width`]:A.scalingValue(y,n??!1),...u>0?{[`--${l}-question-min-height`]:A.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:He}}),a.jsx("div",{style:tt,children:a.jsx("div",{className:St(`${l}-wrapper`,n&&!i&&`${l}-editor`,oe,Ve),style:{width:A.scalingValue(c,n??!1),maxWidth:"100%",...Be},children:ye.map((Je,Ce)=>{var Re;const De=ie(Ce),Xe=((Re=Je.question)==null?void 0:Re.trim())??"",ge=Je.answer,Me=((ge==null?void 0:ge.length)??0)>0,ze=d&&Ce===I;return a.jsxs("div",{className:St(`${l}-item`,De&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[ze&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"questionPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:ne(Te)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(X),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:ne(Pe),height:"100%"}}),a.jsx("div",{"data-controls":"iconPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(K),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:ne(me),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":De,style:{...Q,...Ue,paddingLeft:ne(k),paddingRight:ne(b)},onClick:()=>fe(Ce),children:[re>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:ne(re)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:Fe,children:Xe}),Me&&(te?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${he}`,"aria-hidden":"true",children:a.jsx(un,{url:B,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):a.jsx("span",{className:`${l}-icon ${l}-icon-default ${he}`,"aria-hidden":"true"}))]}),q>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:ne(q)},"aria-hidden":"true"})]}),ze&&a.jsx("div",{"data-controls":"questionPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:ne(Oe)}})]}),Me&&ge&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!De,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[ze&&De&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"answerPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:ne($e)}}),a.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(N),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:ne(ve),height:"100%"}}),a.jsx("div",{"data-controls":"answerPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(U),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:ne(Se),height:"100%"}})]}),be>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:ne(be)}}),a.jsx("div",{className:`${l}-answer`,style:{...Ze,...nt,paddingLeft:ne(ce),paddingRight:ne(J)},children:a.jsx("div",{className:et,children:a.jsx(Yi,{content:ge})})}),We>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:ne(We)}}),ze&&De&&a.jsx("div",{"data-controls":"answerPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:ne(f)}})]})})})]},Ce)})})})]})}const $0=`import { useCallback, useEffect, useMemo, useState } from 'react';
13570
+ `}function Mc(e,t,n,i,o,r,l,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:r??0,textAppearance:l,color:d??"#000000"}}function L0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=A.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:x="solid",entryHoverEffect:y="default",autoclose:m="off",icon:h,iconMaxWidth:v=.00833,iconPaddingRight:b=0,iconAnimation:C="rotate 45",questionColor:S="#000000",answerColor:w="#000000",dividerColor:D="#0000001F",iconColor:_="#000000",questionHoverColor:z="#666666",iconHoverColor:H="#666666",iconActiveColor:L="#000000",dividerHoverColor:V="#000000",questionFontFamily:$,questionFontSettings:k,questionFontSize:F,questionLineHeight:W,questionLetterSpacing:g,questionWordSpacing:E,questionTextAppearance:R,answerFontFamily:G,answerFontSettings:Z,answerFontSize:T,answerLineHeight:j,answerLetterSpacing:K,answerWordSpacing:le,answerTextAppearance:se,questionPaddingLeft:M=0,questionPaddingTop:re=0,questionPaddingBottom:q=0,answerPaddingLeft:ce=0,answerPaddingRight:J=0,answerPaddingTop:be=0,answerPaddingBottom:We=0}=e,ye=t??[],[ue,ee]=s.useState(()=>new Set),de=!n||i;s.useEffect(()=>{ee(new Set)},[m]),s.useEffect(()=>{n&&!o&&!i&&ee(new Set)},[n,o,i]);const ne=Je=>A.scalingValue(Je,n??!1),Pe=Math.max(M,di),Te=Math.max(re,di),Oe=Math.max(q,di),ve=Math.max(ce,di),Se=Math.max(J,di),$e=Math.max(be,di),f=Math.max(We,di),X=Math.max(0,(c??1)-b-v),N=Math.max(0,(c??1)-J),U=Math.max(0,(c??1)-ce),me=Math.max(b,di),Y=Math.max(0,(c??1)-M-v),I=s.useMemo(()=>ue.size===0?0:Math.min(...ue),[ue]),ie=s.useCallback(Je=>ue.has(Je),[ue]),oe=de&&y==="default"?`${l}-entry-hover-default`:"",B=h??"",te=B!=="",Ae=C.replace(/^rotate /,""),he=`${l}-icon-anim-${Ae}`,Q=dn(Qt(Mc($,k,F,W,g,E,R,S),n)),Ze=dn(Qt(Mc(G,Z,T,j,K,le,se,w),n)),Fe=kc(F,W,`${l}-question`,`${l}-text-tight-leading`),et=kc(T,j,`${l}-answer-text`,`${l}-text-tight-leading`),Ue=Ec(F,W,l,n),nt=Ec(T,j,l,n),tt=A.buildColorVars(l,{questionColor:S,answerColor:w,dividerColor:D,iconColor:_,questionHoverColor:z,iconHoverColor:H,iconActiveColor:L,dividerHoverColor:V},w0,$0),Ve=r&&r!=="default"?`${l}-state-${r}`:"",fe=s.useCallback(Je=>{de&&ee(Ce=>{if(Ce.has(Je)){const Xe=new Set(Ce);return Xe.delete(Je),Xe}if(m==="on")return new Set([Je]);const De=new Set(Ce);return De.add(Je),De})},[de,m]),He=s.useMemo(()=>T0(l),[l]),Be={[`--${l}-divider-width`]:A.scalingValue(p,n??!1),[`--${l}-divider-style`]:x,[`--${l}-icon-max-width`]:A.scalingValue(v,n??!1),...u>0?{[`--${l}-question-min-height`]:A.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:He}}),a.jsx("div",{style:tt,children:a.jsx("div",{className:St(`${l}-wrapper`,n&&!i&&`${l}-editor`,oe,Ve),style:{width:A.scalingValue(c,n??!1),maxWidth:"100%",...Be},children:ye.map((Je,Ce)=>{var Re;const De=ie(Ce),Xe=((Re=Je.question)==null?void 0:Re.trim())??"",ge=Je.answer,Ee=((ge==null?void 0:ge.length)??0)>0,ze=d&&Ce===I;return a.jsxs("div",{className:St(`${l}-item`,De&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[ze&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"questionPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:ne(Te)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(X),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:ne(Pe),height:"100%"}}),a.jsx("div",{"data-controls":"iconPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Y),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:ne(me),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":De,style:{...Q,...Ue,paddingLeft:ne(M),paddingRight:ne(b)},onClick:()=>fe(Ce),children:[re>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:ne(re)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:Fe,children:Xe}),Ee&&(te?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${he}`,"aria-hidden":"true",children:a.jsx(un,{url:B,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):a.jsx("span",{className:`${l}-icon ${l}-icon-default ${he}`,"aria-hidden":"true"}))]}),q>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:ne(q)},"aria-hidden":"true"})]}),ze&&a.jsx("div",{"data-controls":"questionPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:ne(Oe)}})]}),Ee&&ge&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!De,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[ze&&De&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"answerPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:ne($e)}}),a.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(N),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:ne(ve),height:"100%"}}),a.jsx("div",{"data-controls":"answerPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(U),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:ne(Se),height:"100%"}})]}),be>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:ne(be)}}),a.jsx("div",{className:`${l}-answer`,style:{...Ze,...nt,paddingLeft:ne(ce),paddingRight:ne(J)},children:a.jsx("div",{className:et,children:a.jsx(Ki,{content:ge})})}),We>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:ne(We)}}),ze&&De&&a.jsx("div",{"data-controls":"answerPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:ne(f)}})]})})})]},Ce)})})})]})}const I0=`import { useCallback, useEffect, useMemo, useState } from 'react';
13571
13571
  import cn from 'classnames';
13572
13572
  import { CommonComponentProps } from '../props';
13573
13573
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -14315,7 +14315,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14315
14315
  </>
14316
14316
  );
14317
14317
  }
14318
- `;function ui(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const kc={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},C0=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],T0={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:ui("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...kc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...kc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:ui("Question Padding Left"),questionPaddingTop:ui("Question Padding Top"),questionPaddingBottom:ui("Question Padding Bottom"),answerPaddingLeft:ui("Answer Padding Left"),answerPaddingRight:ui("Answer Padding Right"),answerPaddingTop:ui("Answer Padding Top"),answerPaddingBottom:ui("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01M0GB8Z9EQFMGYA20F2J0ACA8.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...C0],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},L0={element:w0,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"questionFontFamily"},{path:"answerFontFamily"}]},fontRelations:{questionFontSettings:"questionFontFamily",answerFontSettings:"answerFontFamily"},schema:T0,sourceCode:$0},ni=e=>e.display==="cover",Ma=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Ac=100,I0=.2,Fc=8,Ou=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,r]=s.useState(0),[l,d]=s.useState(!1),c=s.useRef(null),u=s.useRef(0);u.current=o;const p=s.useMemo(()=>typeof window>"u"?Ac:Math.max(Ac,window.innerHeight*I0),[]),x=s.useCallback($=>Math.max(0,1-$/(p*1.5)),[p]),v=s.useCallback($=>Math.max(0,1-$/(p*.45)),[p]),m=s.useCallback($=>{const E=typeof window<"u"?window.innerHeight:800,F=Math.max(.88,1-$/E*.12);return`translateY(${$}px) scale(${F})`},[]),h=s.useCallback(()=>{c.current=null},[]),y=s.useCallback(()=>{d(!0),r(0),window.setTimeout(()=>d(!1),n),h()},[n,h]),b=s.useCallback(()=>{const $=typeof window<"u"?window.innerHeight:800;d(!0),r($),window.setTimeout(()=>{t(),h(),d(!1)},Math.min(n,200))},[n,t,h]),C=s.useCallback($=>{!e||l||$.pointerType==="touch"&&(i!=null&&i($.target)||(c.current={startX:$.clientX,startY:$.clientY,isLocked:null,pointerId:$.pointerId}))},[e,l,i]),S=s.useCallback($=>{const E=c.current;if(!e||!E||$.pointerType!=="touch"||E.pointerId!==$.pointerId)return;const F=$.clientX-E.startX,W=$.clientY-E.startY;if(E.isLocked===null){if(Math.abs(F)<Fc&&Math.abs(W)<Fc)return;if(W>0&&W>Math.abs(F))E.isLocked=!0,$.currentTarget.setPointerCapture($.pointerId);else{E.isLocked=!1,h();return}}if(!E.isLocked)return;$.preventDefault();const g=Math.max(0,W);u.current=g,r(g)},[e,h]),w=s.useCallback($=>{const E=c.current;if(!e||!E||$.pointerType!=="touch"||E.pointerId!==$.pointerId)return;const F=E.isLocked===!0;if($.currentTarget.hasPointerCapture($.pointerId)&&$.currentTarget.releasePointerCapture($.pointerId),!F){h();return}$.clientY-E.startY>=p?b():y()},[p,b,e,h,y]),D=s.useCallback($=>{w($)},[w]),_=s.useCallback($=>{w($)},[w]),z=o>0,H=l?`transform ${n}ms ease`:"none",L=l?`opacity ${n}ms ease`:"none",V=o>0||l;return{isSwipeDragging:z,backdropStyle:{opacity:x(o),transition:L},mediaAreaStyle:{transform:m(o),transition:H,touchAction:z?"none":void 0,willChange:z?"transform":void 0},overlayContentStyle:V?{opacity:v(o),transition:L}:void 0,swipeHandlers:e?{onPointerDown:C,onPointerMove:S,onPointerUp:D,onPointerCancel:_}:{},dismissAreaStyle:e?{touchAction:z?"none":"pan-x"}:void 0}},R0="[data-lightbox-scrollable]",Du=()=>{s.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,r=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const l=d=>{const c=d.target;c instanceof Element&&c.closest(R0)||d.preventDefault()};return document.addEventListener("touchmove",l,{passive:!1}),()=>{document.removeEventListener("touchmove",l),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=r,window.scrollTo({top:e,left:0,behavior:"instant"})}},[])},P0=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},E0=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},M0=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},k0=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(h,y)=>{E0(t),e.scrollLeft=h,y&&(r==null||r())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let p=!1,x=0;const v=()=>{t.removeEventListener("transitionend",m),clearTimeout(x)},m=h=>{h.target!==t||h.propertyName!=="transform"||p||(p=!0,v(),u(n,!0))};return t.addEventListener("transitionend",m),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${c}px, 0, 0)`,x=window.setTimeout(()=>{p||(p=!0,v(),u(n,!0))},i+64),()=>{p||(p=!0,v(),u(l-M0(t),!1))}},or=300,A0=900,F0=1500,N0="cubic-bezier(0.16, 1, 0.3, 1)",_0=3e3,W0=2,H0=16,O0=.05,D0=1,Wr=.3,z0=50,B0=20,no=.004,ko=["title1","title2","title3"],j0={title1:"1",title2:"2",title3:"3"},V0={title1:"title1Color",title2:"title2Color",title3:"title3Color"},G0={title1:.02,title2:.02,title3:.02},Hr=e=>`max(${e}, ${B0}px)`,X0=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]}},q0=e=>{if(!e)return{title1:"",title2:"",title3:""};if(e.title1||e.title2||e.title3)return{title1:e.title1??"",title2:e.title2??"",title3:e.title3??""};const t=X0(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Yt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,U0=e=>[Yt(e,"fontFamily"),Yt(e,"fontSettings"),{type:"row",items:[Yt(e,"fontSize"),Yt(e,"lineHeight"),Yt(e,"letterSpacing"),Yt(e,"wordSpacing")]},Yt(e,"textAlign"),Yt(e,"textAppearance")],K0=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(ko.map(e=>[j0[e],U0(e)]))}),Il=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},d)=>{if(r<=0||d<=0)return{overflow:r,widths:[d,...l]};const c=Math.min(r,d);return{overflow:r-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},zu=(e,t)=>Il(e,t),Or=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Nc=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Il(e.length,n),effective:zu(e.length,n)}},Y0=(e,t,n,i,o,r,l)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:r,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),d},ts=(e,t)=>{const n=i=>{const o=Yt(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[V0[t]]}},Z0=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),ns=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??G0[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Qt(i,n)},J0=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:x,closeIcon:v,closeIconMaxWidth:m,closeIconColor:h,closeIconHoverColor:y,thumbnailTrigger:b,thumbnailVisibility:C,thumbnailObjectFit:S,thumbnailActive:w,thumbnailActiveColor:D,title1Width:_,title2Width:z,title3Width:H,title1MarginLeft:L=0,title2MarginLeft:V=0,title3MarginLeft:$=0,titleRowMarginBottom:E=0,titleHeaderLayout:F="desktop",contentMarginTop:W,iconMarginLeft:g}=n,M=P=>A.scalingValue(P,i??!1),R=c??n.thumnailSize??.03,G=M(R),Z=M(u),T=M(p??.02),j=M(x??0),Y=M(W??0),le=Hr(Y),se=M(g??0),[k,re]=s.useState(0),q=s.useRef(k);q.current=k;const ce=t[k],{title1:J,title2:be,title3:We}=q0(ce),ye=ns("title1",ts(n,"title1"),i),ue=ns("title2",ts(n,"title2"),i),ee=ns("title3",ts(n,"title3"),i),de=F==="mobile",ne=!o&&(!i||r),Pe=ne,Te=ne,Oe=ne,ve=ni(S),Se=ve?{"--image-aspect-ratio":Ma(S)}:void 0,$e=!!(J||be||We),f=s.useMemo(()=>Y0(e,J,be,We,ye,ue,ee),[e,k,J,be,We,ye,ue,ee]),X=s.useMemo(()=>({title1Width:_,title2Width:z,title3Width:H}),[_,z,H]),N=s.useMemo(()=>f.map(P=>X[P.widthKey]),[f,X]),U=s.useMemo(()=>Il(f.length,N),[f.length,N]),me=s.useMemo(()=>zu(f.length,N),[f.length,N]),K=s.useMemo(()=>f.filter(P=>P.prefix==="title1"),[f]),I=s.useMemo(()=>f.filter(P=>P.prefix==="title2"||P.prefix==="title3"),[f]),ie=s.useMemo(()=>Nc(K,X),[K,X]),oe=s.useMemo(()=>Nc(I,X),[I,X]),B=s.useCallback((P,ae)=>{const pe=f.indexOf(P);if(!de||ae==="single-row")return{effectiveWidth:me[pe]??0,resolvedWidth:U[pe]??0,maxWidth:Or(pe,U)};if(ae==="two-row-top"){const qe=K.indexOf(P);return{effectiveWidth:ie.effective[qe]??0,resolvedWidth:ie.resolved[qe]??0,maxWidth:Or(qe,ie.resolved)}}const ke=I.indexOf(P);return{effectiveWidth:oe.effective[ke]??0,resolvedWidth:oe.resolved[ke]??0,maxWidth:Or(ke,oe.resolved)}},[I,oe,me,U,f,K,ie,de]),te=s.useCallback(P=>A.scalingValue(P,i??!1),[i]),Ae=te(E??0),he=s.useMemo(()=>({title1MarginLeft:L,title2MarginLeft:V,title3MarginLeft:$}),[L,V,$]),Q=s.useCallback(P=>f.slice(0,P+1).reduce((ae,pe,ke)=>ae+(pe!=null&&pe.marginLeftKey?he[pe.marginLeftKey]??0:0)+(U[ke]??0),0)+(de?0:L??0),[f,he,U,de,L]),Ze=s.useCallback(()=>de?0:L??0,[de,L]),Fe=s.useCallback(P=>I.slice(0,P).reduce((ae,pe,ke)=>ae+(pe.marginLeftKey?he[pe.marginLeftKey]??0:0)+(oe.resolved[ke]??0),0),[I,oe.resolved,he]),et=s.useCallback(P=>{const ae=I[P];return Fe(P)+(ae.marginLeftKey?he[ae.marginLeftKey]??0:0)+(oe.resolved[P]??0)},[I,oe.resolved,Fe,he]),Ue=(P,ae)=>{const pe=P.marginLeftKey?he[P.marginLeftKey]??0:0,{effectiveWidth:ke,resolvedWidth:qe,maxWidth:st}=B(P,ae),wt=o&&ae==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":P.prefix,style:{...ae==="single-row"?{gridArea:P.prefix}:{},width:te(ke),...pe>0?{marginLeft:te(pe)}:{}},children:[a.jsx("p",{className:P.className,style:P.style,children:P.text}),wt&&P.marginLeftKey&&a.jsx("div",{"data-controls":P.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(qe),style:{position:"absolute",top:0,left:te(-pe),width:`max(${te(pe)}, 10px)`,height:"100%",pointerEvents:"auto"}}),wt&&a.jsx("div",{"data-controls":P.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(st),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:te(-no/2),width:te(no),height:"100%",pointerEvents:"auto"}})]},P.className)},nt=()=>{const P=de?-1:f.findIndex(ke=>ke.prefix==="title1"),ae=!de&&(o||(L??0)>0)?(()=>{const ke=L??0,qe=P>=0?U[P]:_??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(qe),style:{position:"absolute",top:0,left:0,width:`max(${te(ke)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,pe=f.flatMap((ke,qe)=>{if(!ke.marginLeftKey)return[];const st=he[ke.marginLeftKey]??0,wt=Z0(f,U,he,qe)+Ze();return a.jsx("div",{"data-controls":ke.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(U[qe]),style:{position:"absolute",top:0,left:te(wt),width:`max(${te(st)}, 10px)`,height:"100%",pointerEvents:"auto"}},ke.marginLeftKey)});return ae?[ae,...pe]:pe},tt=()=>f.map((P,ae)=>{const pe=Or(ae,U),qe=Q(ae)-no/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":P.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(pe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:te(qe),width:te(no),height:"100%",pointerEvents:"auto"}})},`${P.widthKey}-junction`)}),Ve=()=>I.flatMap((P,ae)=>{if(!P.marginLeftKey)return[];const pe=he[P.marginLeftKey]??0,ke=Fe(ae),{resolvedWidth:qe}=B(P,"two-row-bottom");return a.jsx("div",{"data-controls":P.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(qe),style:{position:"absolute",top:0,left:te(ke),width:`max(${te(pe)}, 10px)`,height:"100%",pointerEvents:"auto"}},P.marginLeftKey)}),fe=()=>I.map((P,ae)=>{const{maxWidth:pe}=B(P,"two-row-bottom"),qe=et(ae)-no/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":P.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(pe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:te(qe),width:te(no),height:"100%",pointerEvents:"auto"}})},`${P.widthKey}-junction`)}),He=s.useRef(null),Be=s.useRef(null),Je=s.useRef(null),Ce=s.useRef(null),De=s.useRef([]),Xe=s.useRef([]),ge=s.useRef(0),Me=s.useRef(null),ze=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Re=s.useRef(null),xe=s.useRef(null),Ie=s.useRef(0),Ke=s.useRef("forward"),Ne=s.useRef(0),it=s.useRef(null),ot=s.useRef(!1),rt=t.length>1&&(!o||!!r),ht=rt?3:1,Pt=s.useMemo(()=>Array.from({length:ht},()=>t).flat(),[t,ht]),[Et,ut]=s.useState(!1),[gt,$t]=s.useState(!1),[Tt,ft]=s.useState(!0),At=s.useRef(null),zt=s.useRef(null),jt=s.useRef(!1),Zt=s.useRef(!1),Ct=s.useRef(null),Vt=s.useRef(null),rn=Pe&&!Tt,lt=s.useCallback(()=>{Pe&&(ft(!0),Vt.current&&clearTimeout(Vt.current),Vt.current=setTimeout(()=>{ze.current.isActive||ft(!1)},_0))},[Pe]),Ee=s.useCallback(()=>{o||Zt.current||(Zt.current=!0,$t(!1),Ct.current=setTimeout(()=>{l()},or))},[o,l]),je=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":rn?"true":"false",style:{width:A.scalingValue(m??0,i),height:A.scalingValue(m??0,i),marginRight:se,"--close-icon-hover-color":y},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Ee,"aria-label":"Close",children:a.jsx(un,{url:v,fill:h,hoverFill:i&&!r?h:y,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:se,height:"100%",pointerEvents:"auto"}})]}),Qe=(P="two-row")=>a.jsx("div",{...P==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:te(L??0),flexShrink:0,...P==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...P==="two-row"&&o?{pointerEvents:"auto"}:{}}}),dt=()=>{const P=f.find(ke=>ke.prefix==="title1"),ae=f.filter(ke=>ke.prefix==="title2"||ke.prefix==="title3"),pe=ae.length>0||o||(E??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(L??0)>0||o?Qe():null,P&&Ue(P,"two-row-top"),v&&je()]}),pe?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[ae.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[ae.map(ke=>Ue(ke,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[Ve(),fe()]})]}):null,a.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:Ae,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},xt=()=>a.jsxs(a.Fragment,{children:[(L??0)>0||o?Qe("single-row"):null,f.map(P=>Ue(P,"single-row")),o?a.jsxs(a.Fragment,{children:[nt(),tt()]}):null,v?je():null]}),Mt=s.useCallback(P=>!!(P.closest("[data-controls]")||P.closest(`.${e}-thumbnails`)||P.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:yt,backdropStyle:Xt,mediaAreaStyle:Ht,overlayContentStyle:Nt,swipeHandlers:qt,dismissAreaStyle:Ut}=Ou({enabled:ne??!1,onClose:Ee,animMs:or,isBlockedTarget:Mt}),Ot=()=>{if(!rt||t.length===0)return ge.current=0,0;const P=Xe.current[0],ae=Xe.current[t.length];if(!P||!ae)return ge.current;const pe=ae.offsetLeft-P.offsetLeft;return pe>0&&(ge.current=pe),ge.current},Gt=(P=!1)=>{if(!rt)return;const ae=Be.current,pe=Ot();!ae||pe<=0||pe<ae.clientWidth*.25||(ae.scrollLeft<=0?(ae.scrollLeft+=pe,P&&(ze.current.scrollLeft+=pe),ot.current&&(Ne.current+=pe)):ae.scrollLeft>=pe*2&&(ae.scrollLeft-=pe,P&&(ze.current.scrollLeft-=pe),ot.current&&(Ne.current-=pe)))},Bt=(P,ae=(pe=>(pe=Be.current)==null?void 0:pe.scrollLeft)()??0)=>{if(!rt)return P;let ke=t.length+P,qe=1/0;for(let st=0;st<ht;st++){const wt=st*t.length+P,It=Xe.current[wt];if(!It)continue;const on=Math.abs(It.offsetLeft-ae);on<qe&&(qe=on,ke=wt)}return ke},Lt=P=>{const ae=Be.current;return!P||!ae?!1:P.offsetWidth>ae.clientWidth+1},O=P=>{const ae=Be.current;if(!P||!ae||!Lt(P))return!1;const pe=P.offsetLeft,ke=pe+P.offsetWidth;return ae.scrollLeft>=pe-1&&ae.scrollLeft+ae.clientWidth<=ke+1},Le=(P=(ae=>(ae=Be.current)==null?void 0:ae.scrollLeft)()??0)=>{for(let ke=0;ke<Xe.current.length;ke+=1){const qe=Xe.current[ke];if(qe&&O(qe))return ke}let pe={flatIndex:0,distance:1/0};return Xe.current.forEach((ke,qe)=>{if(!ke)return;const st=Math.abs(ke.offsetLeft-P);st<pe.distance&&(pe={flatIndex:qe,distance:st})}),pe.flatIndex},_e=P=>{Be.current&&Xe.current.forEach(ae=>{ae&&(ae.style.scrollSnapAlign=Lt(ae)&&P==="backward"?"end":"start")})},Ge=(P,ae,pe)=>{const ke=P-ae,qe=Le(ae),st=Xe.current[qe];if(O(st))return Le(P)%t.length;const wt=Xe.current[qe+1],It=st?wt?wt.offsetLeft-st.offsetLeft:st.offsetWidth:0,on=It>0?ke>It*Wr?1:ke<-It*Wr?-1:0:0;return on===0?pe:rt?(pe+on+t.length)%t.length:Math.max(0,Math.min(t.length-1,pe+on))},pt=s.useCallback((P=!1)=>{if(C!=="on"||o)return;const ae=Ce.current,pe=q.current,ke=De.current[pe];if(!ae||!ke||ae.scrollWidth<=ae.clientWidth)return;const qe=ae.scrollLeft,st=qe+ae.clientWidth,wt=ke.offsetLeft,It=wt+ke.offsetWidth;if(wt>=qe&&It<=st)return;const on=ae.scrollWidth-ae.clientWidth;let nn=qe;if(!P&&At.current===null){const si=De.current[pe-1],Mi=De.current[pe+1],qn=si?ke.offsetLeft-si.offsetLeft:Mi?Mi.offsetLeft-ke.offsetLeft:ke.offsetWidth;It>st?nn+=qn:wt<qe&&(nn-=qn)}else It>st?nn=It-ae.clientWidth:nn=wt;ae.scrollLeft=Math.max(0,Math.min(on,nn))},[o,C]),Ft=s.useCallback((P=!1)=>{P&&(jt.current=!0),zt.current===null&&(zt.current=requestAnimationFrame(()=>{zt.current=null;const ae=jt.current;jt.current=!1,pt(ae)}))},[pt]),ct=s.useCallback(P=>{if(P===q.current)return;const ae=q.current;q.current=P;const pe=Math.abs(P-ae)>1,ke=rt&&t.length>1&&(ae===t.length-1&&P===0||ae===0&&P===t.length-1);re(P),Ft(pe||ke)},[t.length,rt,Ft]),bt=()=>{if(!Be.current||t.length===0||At.current!==null||ze.current.isActive&&ze.current.hasMoved)return;const P=Be.current.scrollLeft,ae=Le(P)%t.length;ae!==q.current&&ct(ae)},Dt=()=>{At.current=null},kt=P=>{const ae=Be.current;ae&&(ae.style.scrollSnapType=P?"":"none")},sn=()=>{var P;(P=xe.current)==null||P.call(xe),xe.current=null},mn=()=>{it.current!==null&&(cancelAnimationFrame(it.current),it.current=null),ot.current=!1},yn=()=>{const P=Be.current;if(!P){it.current=null,ot.current=!1;return}const ae=Ne.current-P.scrollLeft;if(Math.abs(ae)<.5){P.scrollLeft=Ne.current,Gt(),bt(),it.current=null,ot.current=!1;return}P.scrollLeft+=ae*O0,Gt(),bt(),lt(),it.current=requestAnimationFrame(yn)},Pn=()=>{const P=Je.current;P&&(P.style.transition="",P.style.transform="",P.style.willChange="")},En=(P,ae,pe,ke)=>{Pn(),P.scrollLeft=ae,Ie.current=P.scrollLeft,Gt(),pe!==void 0?(q.current=pe,re(pe)):bt(),kt(!0),ke==null||ke()},Ji=(P,{behavior:ae="smooth",activeIndex:pe,onComplete:ke}={})=>{const qe=Be.current,st=Je.current;if(!qe||!st)return;if(mn(),sn(),kt(!1),ae==="auto"){En(qe,P,pe,ke);return}const wt=Math.abs(P-qe.scrollLeft),It=P0(wt,A0,F0,qe.clientWidth*.55);xe.current=k0(qe,st,P,{duration:It,easing:N0,onComplete:()=>{xe.current=null,En(qe,P,pe,ke)}})},jo=(P="smooth")=>{const ae=Be.current;if(!ae||t.length===0)return;const pe=Le()%t.length,ke=Bt(pe,ae.scrollLeft),qe=Xe.current[ke];qe&&Ji(qe.offsetLeft,{behavior:P,activeIndex:pe})},Vo=(P,ae="smooth",pe,ke)=>{const qe=Be.current;if(!qe||t.length===0)return;const st=(ke??qe.scrollLeft)-P,wt=Le(P),It=Xe.current[wt];if(O(It)){kt(!0),bt();return}const on=Xe.current[wt+1],nn=It?on?on.offsetLeft-It.offsetLeft:It.offsetWidth:0;if((nn>0?st>nn*Wr?1:st<-nn*Wr?-1:0:0)!==0){const Aa=pe??wt%t.length,Fa=Ge(ke??qe.scrollLeft,P,Aa);fn(Fa,ae);return}const Mi=ke??qe.scrollLeft,qn=Le(Mi),Ir=Xe.current[qn];if(Ir&&Math.abs(Ir.offsetLeft-Mi)<1){kt(!0),bt();return}jo("auto")},fn=(P,ae="smooth")=>{const pe=Be.current;if(!pe||t.length===0)return;const ke=Bt(P,pe.scrollLeft),qe=Xe.current[ke];qe&&(ae==="smooth"?At.current=P:At.current=null,q.current=P,re(P),Ft(!0),Ji(qe.offsetLeft,{behavior:ae,activeIndex:P,onComplete:ae==="smooth"?Dt:void 0}))},vn=()=>{Re.current&&(window.removeEventListener("pointerup",Re.current),window.removeEventListener("pointercancel",Re.current),Re.current=null)},ai=(P,ae,pe,ke,qe)=>{const st=pe-P,wt=ke-ae,It=Math.abs(st),on=Math.abs(wt);if(It<z0||It<=on)return!1;const nn=st<0?1:-1,si=rt?(qe+nn+t.length)%t.length:Math.max(0,Math.min(t.length-1,qe+nn));return si===qe?!1:(fn(si),!0)},Xn=P=>{if(!ze.current.isActive)return;vn();const ae=Be.current;if(!ae)return;const{scrollLeft:pe,startActiveIndex:ke,hasMoved:qe}=ze.current,st=ae.scrollLeft;Gt(!0),ze.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},ut(!1),P!==void 0&&ae.hasPointerCapture(P)&&ae.releasePointerCapture(P),qe?Vo(pe,"smooth",ke,st):(kt(!0),bt()),lt()},Go=(P,ae)=>{const pe=Me.current;Me.current=null,pe&&(ai(pe.startX,pe.startY,P,ae,pe.startActiveIndex),lt())},Ei=P=>{if(!Te)return;if(P.pointerType==="touch"){if(mn(),kt(!0),Mt(P.target))return;Me.current={startX:P.clientX,startY:P.clientY,startActiveIndex:q.current};return}if(P.pointerType!=="mouse"||P.button!==0||Mt(P.target))return;const ae=Be.current;if(!ae)return;mn(),sn(),Pn(),At.current=null,ze.current={isActive:!0,startX:P.clientX,scrollLeft:ae.scrollLeft,startActiveIndex:q.current,hasMoved:!1},kt(!1),lt(),ae.setPointerCapture(P.pointerId),vn();const pe=ke=>{ke.pointerType==="mouse"&&Xn(ke.pointerId)};Re.current=pe,window.addEventListener("pointerup",pe),window.addEventListener("pointercancel",pe)},Qi=P=>{if(!Te||P.pointerType!=="mouse")return;const ae=Be.current;if(!ae||!ze.current.isActive)return;if(P.buttons===0){Xn(P.pointerId);return}const pe=P.clientX-ze.current.startX;Math.abs(pe)>D0&&(ze.current.hasMoved=!0,ut(!0)),ze.current.hasMoved&&(P.preventDefault(),ae.scrollLeft=ze.current.scrollLeft-pe,Gt(!0),bt(),lt())},we=P=>{if(Te){if(P.pointerType==="touch"){P.type==="pointerup"?Go(P.clientX,P.clientY):Me.current=null;return}P.pointerType==="mouse"&&Xn(P.pointerId)}},Ye=P=>{!Te||P.pointerType!=="mouse"||Xn(P.pointerId)};return Du(),s.useEffect(()=>{const P=requestAnimationFrame(()=>$t(!0));return()=>{cancelAnimationFrame(P),sn(),vn(),zt.current!==null&&(cancelAnimationFrame(zt.current),zt.current=null),Ct.current&&clearTimeout(Ct.current),Vt.current&&clearTimeout(Vt.current)}},[]),s.useEffect(()=>{if(!Pe){ft(!0);return}lt();const P=()=>lt();return document.addEventListener("pointermove",P,{passive:!0}),document.addEventListener("pointerdown",P,{passive:!0}),()=>{document.removeEventListener("pointermove",P),document.removeEventListener("pointerdown",P),Vt.current&&clearTimeout(Vt.current)}},[Pe,lt]),s.useEffect(()=>{const P=ae=>{ae.key==="Escape"&&Ee()};return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)},[Ee]),s.useLayoutEffect(()=>{Ot()},[j,t.length,rt]),s.useLayoutEffect(()=>{o||fn(q.current,"auto")},[j,o]),s.useLayoutEffect(()=>{fn(0,"auto")},[t.length,rt]),s.useEffect(()=>{const P=Be.current;if(!P||o||!ne)return;const ae=pe=>{if(pe.preventDefault(),Math.abs(pe.deltaY)<=Math.abs(pe.deltaX))return;const ke=pe.deltaMode===1?H0:pe.deltaMode===2?P.clientHeight:1,qe=pe.deltaY*ke*W0;if(qe!==0){if(sn(),ot.current||(ot.current=!0,Ne.current=P.scrollLeft,At.current=null,kt(!1)),Ne.current+=qe,!rt){const st=P.scrollWidth-P.clientWidth;Ne.current=Math.max(0,Math.min(st,Ne.current))}lt(),it.current===null&&(it.current=requestAnimationFrame(yn))}};return P.addEventListener("wheel",ae,{passive:!1}),()=>{P.removeEventListener("wheel",ae),mn()}},[o,ne,rt]),s.useEffect(()=>{const P=Be.current;if(!P)return;const ae=()=>{Gt(ze.current.isActive);const ke=P.scrollLeft,qe=ke-Ie.current;Ie.current=ke;const st=ge.current>0?ge.current*.5:1/0;if(qe!==0&&Math.abs(qe)<st){const wt=qe>0?"forward":"backward";wt!==Ke.current&&(Ke.current=wt,_e(wt))}ze.current.isActive&&ze.current.hasMoved||bt()};P.addEventListener("scroll",ae,{passive:!0});const pe=new ResizeObserver(()=>{Ot(),Gt(ze.current.isActive),_e(Ke.current),bt()});return pe.observe(P),()=>{sn(),P.removeEventListener("scroll",ae),pe.disconnect()}},[t.length,rt]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{yt||Ee()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:gt?1:0,transition:`opacity ${or}ms ease`,pointerEvents:gt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Xt}}),a.jsxs("div",{ref:He,className:`${e}-lightbox-dismiss-area`,style:Ut,...qt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Ht,onClick:P=>P.stopPropagation(),children:a.jsx("div",{ref:Be,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":Te&&t.length>0?"true":"false","data-mouse-dragging":Et?"true":"false",onPointerDown:Ei,onPointerMove:Qi,onPointerUp:we,onPointerCancel:we,onLostPointerCapture:Ye,children:a.jsx("div",{ref:Je,className:`${e}-lightbox-strip-track`,style:{gap:j},children:Pt.map((P,ae)=>{const pe=P.image.objectFit??"contain",ke=ae%t.length,qe=Math.floor(ae/t.length),st=Hr(j),wt=`calc(-0.5 * (${st} + ${j}))`;return a.jsxs("div",{ref:It=>Xe.current[ae]=It,className:`${e}-strip-item`,style:{height:F==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:P.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:pe}}),o&&ke<t.length-1&&qe===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:wt,width:st,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${qe}-${P.image.url}-${ke}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":rn?"true":"false",style:Nt,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:Y,flexShrink:0,pointerEvents:"none"},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:le,pointerEvents:"auto",zIndex:3}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:a.jsx("div",{className:`${e}-lightbox-content-area${de?` ${e}-lightbox-content-area-stacked`:""}`,children:($e||v)&&a.jsx("div",{className:`${e}-header ${de?`${e}-header-two-row`:`${e}-header-single-row`}`,children:de?dt():$e||v?xt():null})})})]}),t.length>1&&C==="on"&&(()=>{const P=Hr(T),ae=`calc(-0.5 * (${T} + ${P}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:T},children:a.jsx("div",{ref:Ce,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:pe=>pe.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":w,style:{gap:Z,"--thumbnail-active-color":D},children:[t.map((pe,ke)=>{const qe=Hr(Z),st=`calc(-0.5 * (${qe} + ${Z}))`;return a.jsxs("div",{ref:wt=>{De.current[ke]=wt},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":k===ke?"true":"false",onClick:()=>ne&&b==="click"&&fn(ke),onMouseEnter:()=>Oe&&b==="hover"&&fn(ke),"aria-label":pe.image.name?`View ${pe.image.name}`:`View image ${ke+1}`,"aria-current":k===ke?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${ve?` ${e}-thumb-image-cover`:""}`,src:pe.image.url,alt:"",draggable:!1,style:{...Se,maxWidth:G,maxHeight:G,width:S.display==="cover"?"auto":"100%",height:"auto",objectFit:S.display==="cover"?"cover":"contain"}})}),o&&ke<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:st,width:qe,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${pe.image.url}-${ke}`)}),o&&a.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:ae,height:P,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Q0(e){return`
14318
+ `;function ui(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ac={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},R0=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],P0={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:ui("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...Ac.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...Ac.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:ui("Question Padding Left"),questionPaddingTop:ui("Question Padding Top"),questionPaddingBottom:ui("Question Padding Bottom"),answerPaddingLeft:ui("Answer Padding Left"),answerPaddingRight:ui("Answer Padding Right"),answerPaddingTop:ui("Answer Padding Top"),answerPaddingBottom:ui("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01M0GB8Z9EQFMGYA20F2J0ACA8.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...R0],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},k0={element:L0,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"questionFontFamily"},{path:"answerFontFamily"}]},fontRelations:{questionFontSettings:"questionFontFamily",answerFontSettings:"answerFontFamily"},schema:P0,sourceCode:I0},ni=e=>e.display==="cover",Ma=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Fc=100,E0=.2,Nc=8,zu=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,r]=s.useState(0),[l,d]=s.useState(!1),c=s.useRef(null),u=s.useRef(0);u.current=o;const p=s.useMemo(()=>typeof window>"u"?Fc:Math.max(Fc,window.innerHeight*E0),[]),x=s.useCallback($=>Math.max(0,1-$/(p*1.5)),[p]),y=s.useCallback($=>Math.max(0,1-$/(p*.45)),[p]),m=s.useCallback($=>{const k=typeof window<"u"?window.innerHeight:800,F=Math.max(.88,1-$/k*.12);return`translateY(${$}px) scale(${F})`},[]),h=s.useCallback(()=>{c.current=null},[]),v=s.useCallback(()=>{d(!0),r(0),window.setTimeout(()=>d(!1),n),h()},[n,h]),b=s.useCallback(()=>{const $=typeof window<"u"?window.innerHeight:800;d(!0),r($),window.setTimeout(()=>{t(),h(),d(!1)},Math.min(n,200))},[n,t,h]),C=s.useCallback($=>{!e||l||$.pointerType==="touch"&&(i!=null&&i($.target)||(c.current={startX:$.clientX,startY:$.clientY,isLocked:null,pointerId:$.pointerId}))},[e,l,i]),S=s.useCallback($=>{const k=c.current;if(!e||!k||$.pointerType!=="touch"||k.pointerId!==$.pointerId)return;const F=$.clientX-k.startX,W=$.clientY-k.startY;if(k.isLocked===null){if(Math.abs(F)<Nc&&Math.abs(W)<Nc)return;if(W>0&&W>Math.abs(F))k.isLocked=!0,$.currentTarget.setPointerCapture($.pointerId);else{k.isLocked=!1,h();return}}if(!k.isLocked)return;$.preventDefault();const g=Math.max(0,W);u.current=g,r(g)},[e,h]),w=s.useCallback($=>{const k=c.current;if(!e||!k||$.pointerType!=="touch"||k.pointerId!==$.pointerId)return;const F=k.isLocked===!0;if($.currentTarget.hasPointerCapture($.pointerId)&&$.currentTarget.releasePointerCapture($.pointerId),!F){h();return}$.clientY-k.startY>=p?b():v()},[p,b,e,h,v]),D=s.useCallback($=>{w($)},[w]),_=s.useCallback($=>{w($)},[w]),z=o>0,H=l?`transform ${n}ms ease`:"none",L=l?`opacity ${n}ms ease`:"none",V=o>0||l;return{isSwipeDragging:z,backdropStyle:{opacity:x(o),transition:L},mediaAreaStyle:{transform:m(o),transition:H,touchAction:z?"none":void 0,willChange:z?"transform":void 0},overlayContentStyle:V?{opacity:y(o),transition:L}:void 0,swipeHandlers:e?{onPointerDown:C,onPointerMove:S,onPointerUp:D,onPointerCancel:_}:{},dismissAreaStyle:e?{touchAction:z?"none":"pan-x"}:void 0}},M0="[data-lightbox-scrollable]",Bu=()=>{s.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,r=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const l=d=>{const c=d.target;c instanceof Element&&c.closest(M0)||d.preventDefault()};return document.addEventListener("touchmove",l,{passive:!1}),()=>{document.removeEventListener("touchmove",l),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=r,window.scrollTo({top:e,left:0,behavior:"instant"})}},[])},A0=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},F0=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},N0=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},_0=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(h,v)=>{F0(t),e.scrollLeft=h,v&&(r==null||r())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let p=!1,x=0;const y=()=>{t.removeEventListener("transitionend",m),clearTimeout(x)},m=h=>{h.target!==t||h.propertyName!=="transform"||p||(p=!0,y(),u(n,!0))};return t.addEventListener("transitionend",m),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${c}px, 0, 0)`,x=window.setTimeout(()=>{p||(p=!0,y(),u(n,!0))},i+64),()=>{p||(p=!0,y(),u(l-N0(t),!1))}},or=300,W0=900,H0=1500,O0="cubic-bezier(0.16, 1, 0.3, 1)",D0=3e3,z0=2,B0=16,j0=.05,V0=1,Wr=.3,G0=50,X0=20,no=.004,Mo=["title1","title2","title3"],q0={title1:"1",title2:"2",title3:"3"},U0={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Y0={title1:.02,title2:.02,title3:.02},Hr=e=>`max(${e}, ${X0}px)`,K0=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]}},Z0=e=>{if(!e)return{title1:"",title2:"",title3:""};if(e.title1||e.title2||e.title3)return{title1:e.title1??"",title2:e.title2??"",title3:e.title3??""};const t=K0(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Kt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,J0=e=>[Kt(e,"fontFamily"),Kt(e,"fontSettings"),{type:"row",items:[Kt(e,"fontSize"),Kt(e,"lineHeight"),Kt(e,"letterSpacing"),Kt(e,"wordSpacing")]},Kt(e,"textAlign"),Kt(e,"textAppearance")],Q0=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Mo.map(e=>[q0[e],J0(e)]))}),Rl=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},d)=>{if(r<=0||d<=0)return{overflow:r,widths:[d,...l]};const c=Math.min(r,d);return{overflow:r-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},ju=(e,t)=>Rl(e,t),Or=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},_c=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Rl(e.length,n),effective:ju(e.length,n)}},ex=(e,t,n,i,o,r,l)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:r,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),d},ns=(e,t)=>{const n=i=>{const o=Kt(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[U0[t]]}},tx=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),is=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Y0[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Qt(i,n)},nx=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:x,closeIcon:y,closeIconMaxWidth:m,closeIconColor:h,closeIconHoverColor:v,thumbnailTrigger:b,thumbnailVisibility:C,thumbnailObjectFit:S,thumbnailActive:w,thumbnailActiveColor:D,title1Width:_,title2Width:z,title3Width:H,title1MarginLeft:L=0,title2MarginLeft:V=0,title3MarginLeft:$=0,titleRowMarginBottom:k=0,titleHeaderLayout:F="desktop",contentMarginTop:W,iconMarginLeft:g}=n,E=P=>A.scalingValue(P,i??!1),R=c??n.thumnailSize??.03,G=E(R),Z=E(u),T=E(p??.02),j=E(x??0),K=E(W??0),le=Hr(K),se=E(g??0),[M,re]=s.useState(0),q=s.useRef(M);q.current=M;const ce=t[M],{title1:J,title2:be,title3:We}=Z0(ce),ye=is("title1",ns(n,"title1"),i),ue=is("title2",ns(n,"title2"),i),ee=is("title3",ns(n,"title3"),i),de=F==="mobile",ne=!o&&(!i||r),Pe=ne,Te=ne,Oe=ne,ve=ni(S),Se=ve?{"--image-aspect-ratio":Ma(S)}:void 0,$e=!!(J||be||We),f=s.useMemo(()=>ex(e,J,be,We,ye,ue,ee),[e,M,J,be,We,ye,ue,ee]),X=s.useMemo(()=>({title1Width:_,title2Width:z,title3Width:H}),[_,z,H]),N=s.useMemo(()=>f.map(P=>X[P.widthKey]),[f,X]),U=s.useMemo(()=>Rl(f.length,N),[f.length,N]),me=s.useMemo(()=>ju(f.length,N),[f.length,N]),Y=s.useMemo(()=>f.filter(P=>P.prefix==="title1"),[f]),I=s.useMemo(()=>f.filter(P=>P.prefix==="title2"||P.prefix==="title3"),[f]),ie=s.useMemo(()=>_c(Y,X),[Y,X]),oe=s.useMemo(()=>_c(I,X),[I,X]),B=s.useCallback((P,ae)=>{const pe=f.indexOf(P);if(!de||ae==="single-row")return{effectiveWidth:me[pe]??0,resolvedWidth:U[pe]??0,maxWidth:Or(pe,U)};if(ae==="two-row-top"){const qe=Y.indexOf(P);return{effectiveWidth:ie.effective[qe]??0,resolvedWidth:ie.resolved[qe]??0,maxWidth:Or(qe,ie.resolved)}}const Me=I.indexOf(P);return{effectiveWidth:oe.effective[Me]??0,resolvedWidth:oe.resolved[Me]??0,maxWidth:Or(Me,oe.resolved)}},[I,oe,me,U,f,Y,ie,de]),te=s.useCallback(P=>A.scalingValue(P,i??!1),[i]),Ae=te(k??0),he=s.useMemo(()=>({title1MarginLeft:L,title2MarginLeft:V,title3MarginLeft:$}),[L,V,$]),Q=s.useCallback(P=>f.slice(0,P+1).reduce((ae,pe,Me)=>ae+(pe!=null&&pe.marginLeftKey?he[pe.marginLeftKey]??0:0)+(U[Me]??0),0)+(de?0:L??0),[f,he,U,de,L]),Ze=s.useCallback(()=>de?0:L??0,[de,L]),Fe=s.useCallback(P=>I.slice(0,P).reduce((ae,pe,Me)=>ae+(pe.marginLeftKey?he[pe.marginLeftKey]??0:0)+(oe.resolved[Me]??0),0),[I,oe.resolved,he]),et=s.useCallback(P=>{const ae=I[P];return Fe(P)+(ae.marginLeftKey?he[ae.marginLeftKey]??0:0)+(oe.resolved[P]??0)},[I,oe.resolved,Fe,he]),Ue=(P,ae)=>{const pe=P.marginLeftKey?he[P.marginLeftKey]??0:0,{effectiveWidth:Me,resolvedWidth:qe,maxWidth:st}=B(P,ae),wt=o&&ae==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":P.prefix,style:{...ae==="single-row"?{gridArea:P.prefix}:{},width:te(Me),...pe>0?{marginLeft:te(pe)}:{}},children:[a.jsx("p",{className:P.className,style:P.style,children:P.text}),wt&&P.marginLeftKey&&a.jsx("div",{"data-controls":P.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(qe),style:{position:"absolute",top:0,left:te(-pe),width:`max(${te(pe)}, 10px)`,height:"100%",pointerEvents:"auto"}}),wt&&a.jsx("div",{"data-controls":P.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(st),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:te(-no/2),width:te(no),height:"100%",pointerEvents:"auto"}})]},P.className)},nt=()=>{const P=de?-1:f.findIndex(Me=>Me.prefix==="title1"),ae=!de&&(o||(L??0)>0)?(()=>{const Me=L??0,qe=P>=0?U[P]:_??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(qe),style:{position:"absolute",top:0,left:0,width:`max(${te(Me)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,pe=f.flatMap((Me,qe)=>{if(!Me.marginLeftKey)return[];const st=he[Me.marginLeftKey]??0,wt=tx(f,U,he,qe)+Ze();return a.jsx("div",{"data-controls":Me.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(U[qe]),style:{position:"absolute",top:0,left:te(wt),width:`max(${te(st)}, 10px)`,height:"100%",pointerEvents:"auto"}},Me.marginLeftKey)});return ae?[ae,...pe]:pe},tt=()=>f.map((P,ae)=>{const pe=Or(ae,U),qe=Q(ae)-no/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":P.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(pe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:te(qe),width:te(no),height:"100%",pointerEvents:"auto"}})},`${P.widthKey}-junction`)}),Ve=()=>I.flatMap((P,ae)=>{if(!P.marginLeftKey)return[];const pe=he[P.marginLeftKey]??0,Me=Fe(ae),{resolvedWidth:qe}=B(P,"two-row-bottom");return a.jsx("div",{"data-controls":P.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(qe),style:{position:"absolute",top:0,left:te(Me),width:`max(${te(pe)}, 10px)`,height:"100%",pointerEvents:"auto"}},P.marginLeftKey)}),fe=()=>I.map((P,ae)=>{const{maxWidth:pe}=B(P,"two-row-bottom"),qe=et(ae)-no/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":P.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(pe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:te(qe),width:te(no),height:"100%",pointerEvents:"auto"}})},`${P.widthKey}-junction`)}),He=s.useRef(null),Be=s.useRef(null),Je=s.useRef(null),Ce=s.useRef(null),De=s.useRef([]),Xe=s.useRef([]),ge=s.useRef(0),Ee=s.useRef(null),ze=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Re=s.useRef(null),xe=s.useRef(null),Ie=s.useRef(0),Ye=s.useRef("forward"),Ne=s.useRef(0),it=s.useRef(null),ot=s.useRef(!1),rt=t.length>1&&(!o||!!r),ht=rt?3:1,Pt=s.useMemo(()=>Array.from({length:ht},()=>t).flat(),[t,ht]),[kt,ut]=s.useState(!1),[gt,$t]=s.useState(!1),[Tt,ft]=s.useState(!0),At=s.useRef(null),zt=s.useRef(null),jt=s.useRef(!1),Zt=s.useRef(!1),Ct=s.useRef(null),Vt=s.useRef(null),rn=Pe&&!Tt,lt=s.useCallback(()=>{Pe&&(ft(!0),Vt.current&&clearTimeout(Vt.current),Vt.current=setTimeout(()=>{ze.current.isActive||ft(!1)},D0))},[Pe]),ke=s.useCallback(()=>{o||Zt.current||(Zt.current=!0,$t(!1),Ct.current=setTimeout(()=>{l()},or))},[o,l]),je=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":rn?"true":"false",style:{width:A.scalingValue(m??0,i),height:A.scalingValue(m??0,i),marginRight:se,"--close-icon-hover-color":v},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:ke,"aria-label":"Close",children:a.jsx(un,{url:y,fill:h,hoverFill:i&&!r?h:v,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:se,height:"100%",pointerEvents:"auto"}})]}),Qe=(P="two-row")=>a.jsx("div",{...P==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:te(L??0),flexShrink:0,...P==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...P==="two-row"&&o?{pointerEvents:"auto"}:{}}}),dt=()=>{const P=f.find(Me=>Me.prefix==="title1"),ae=f.filter(Me=>Me.prefix==="title2"||Me.prefix==="title3"),pe=ae.length>0||o||(k??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(L??0)>0||o?Qe():null,P&&Ue(P,"two-row-top"),y&&je()]}),pe?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[ae.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[ae.map(Me=>Ue(Me,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[Ve(),fe()]})]}):null,a.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:Ae,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},xt=()=>a.jsxs(a.Fragment,{children:[(L??0)>0||o?Qe("single-row"):null,f.map(P=>Ue(P,"single-row")),o?a.jsxs(a.Fragment,{children:[nt(),tt()]}):null,y?je():null]}),Et=s.useCallback(P=>!!(P.closest("[data-controls]")||P.closest(`.${e}-thumbnails`)||P.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:yt,backdropStyle:Xt,mediaAreaStyle:Ht,overlayContentStyle:Nt,swipeHandlers:qt,dismissAreaStyle:Ut}=zu({enabled:ne??!1,onClose:ke,animMs:or,isBlockedTarget:Et}),Ot=()=>{if(!rt||t.length===0)return ge.current=0,0;const P=Xe.current[0],ae=Xe.current[t.length];if(!P||!ae)return ge.current;const pe=ae.offsetLeft-P.offsetLeft;return pe>0&&(ge.current=pe),ge.current},Gt=(P=!1)=>{if(!rt)return;const ae=Be.current,pe=Ot();!ae||pe<=0||pe<ae.clientWidth*.25||(ae.scrollLeft<=0?(ae.scrollLeft+=pe,P&&(ze.current.scrollLeft+=pe),ot.current&&(Ne.current+=pe)):ae.scrollLeft>=pe*2&&(ae.scrollLeft-=pe,P&&(ze.current.scrollLeft-=pe),ot.current&&(Ne.current-=pe)))},Bt=(P,ae=(pe=>(pe=Be.current)==null?void 0:pe.scrollLeft)()??0)=>{if(!rt)return P;let Me=t.length+P,qe=1/0;for(let st=0;st<ht;st++){const wt=st*t.length+P,It=Xe.current[wt];if(!It)continue;const on=Math.abs(It.offsetLeft-ae);on<qe&&(qe=on,Me=wt)}return Me},Lt=P=>{const ae=Be.current;return!P||!ae?!1:P.offsetWidth>ae.clientWidth+1},O=P=>{const ae=Be.current;if(!P||!ae||!Lt(P))return!1;const pe=P.offsetLeft,Me=pe+P.offsetWidth;return ae.scrollLeft>=pe-1&&ae.scrollLeft+ae.clientWidth<=Me+1},Le=(P=(ae=>(ae=Be.current)==null?void 0:ae.scrollLeft)()??0)=>{for(let Me=0;Me<Xe.current.length;Me+=1){const qe=Xe.current[Me];if(qe&&O(qe))return Me}let pe={flatIndex:0,distance:1/0};return Xe.current.forEach((Me,qe)=>{if(!Me)return;const st=Math.abs(Me.offsetLeft-P);st<pe.distance&&(pe={flatIndex:qe,distance:st})}),pe.flatIndex},_e=P=>{Be.current&&Xe.current.forEach(ae=>{ae&&(ae.style.scrollSnapAlign=Lt(ae)&&P==="backward"?"end":"start")})},Ge=(P,ae,pe)=>{const Me=P-ae,qe=Le(ae),st=Xe.current[qe];if(O(st))return Le(P)%t.length;const wt=Xe.current[qe+1],It=st?wt?wt.offsetLeft-st.offsetLeft:st.offsetWidth:0,on=It>0?Me>It*Wr?1:Me<-It*Wr?-1:0:0;return on===0?pe:rt?(pe+on+t.length)%t.length:Math.max(0,Math.min(t.length-1,pe+on))},pt=s.useCallback((P=!1)=>{if(C!=="on"||o)return;const ae=Ce.current,pe=q.current,Me=De.current[pe];if(!ae||!Me||ae.scrollWidth<=ae.clientWidth)return;const qe=ae.scrollLeft,st=qe+ae.clientWidth,wt=Me.offsetLeft,It=wt+Me.offsetWidth;if(wt>=qe&&It<=st)return;const on=ae.scrollWidth-ae.clientWidth;let nn=qe;if(!P&&At.current===null){const si=De.current[pe-1],Ei=De.current[pe+1],qn=si?Me.offsetLeft-si.offsetLeft:Ei?Ei.offsetLeft-Me.offsetLeft:Me.offsetWidth;It>st?nn+=qn:wt<qe&&(nn-=qn)}else It>st?nn=It-ae.clientWidth:nn=wt;ae.scrollLeft=Math.max(0,Math.min(on,nn))},[o,C]),Ft=s.useCallback((P=!1)=>{P&&(jt.current=!0),zt.current===null&&(zt.current=requestAnimationFrame(()=>{zt.current=null;const ae=jt.current;jt.current=!1,pt(ae)}))},[pt]),ct=s.useCallback(P=>{if(P===q.current)return;const ae=q.current;q.current=P;const pe=Math.abs(P-ae)>1,Me=rt&&t.length>1&&(ae===t.length-1&&P===0||ae===0&&P===t.length-1);re(P),Ft(pe||Me)},[t.length,rt,Ft]),bt=()=>{if(!Be.current||t.length===0||At.current!==null||ze.current.isActive&&ze.current.hasMoved)return;const P=Be.current.scrollLeft,ae=Le(P)%t.length;ae!==q.current&&ct(ae)},Dt=()=>{At.current=null},Mt=P=>{const ae=Be.current;ae&&(ae.style.scrollSnapType=P?"":"none")},sn=()=>{var P;(P=xe.current)==null||P.call(xe),xe.current=null},mn=()=>{it.current!==null&&(cancelAnimationFrame(it.current),it.current=null),ot.current=!1},yn=()=>{const P=Be.current;if(!P){it.current=null,ot.current=!1;return}const ae=Ne.current-P.scrollLeft;if(Math.abs(ae)<.5){P.scrollLeft=Ne.current,Gt(),bt(),it.current=null,ot.current=!1;return}P.scrollLeft+=ae*j0,Gt(),bt(),lt(),it.current=requestAnimationFrame(yn)},Pn=()=>{const P=Je.current;P&&(P.style.transition="",P.style.transform="",P.style.willChange="")},kn=(P,ae,pe,Me)=>{Pn(),P.scrollLeft=ae,Ie.current=P.scrollLeft,Gt(),pe!==void 0?(q.current=pe,re(pe)):bt(),Mt(!0),Me==null||Me()},Ji=(P,{behavior:ae="smooth",activeIndex:pe,onComplete:Me}={})=>{const qe=Be.current,st=Je.current;if(!qe||!st)return;if(mn(),sn(),Mt(!1),ae==="auto"){kn(qe,P,pe,Me);return}const wt=Math.abs(P-qe.scrollLeft),It=A0(wt,W0,H0,qe.clientWidth*.55);xe.current=_0(qe,st,P,{duration:It,easing:O0,onComplete:()=>{xe.current=null,kn(qe,P,pe,Me)}})},jo=(P="smooth")=>{const ae=Be.current;if(!ae||t.length===0)return;const pe=Le()%t.length,Me=Bt(pe,ae.scrollLeft),qe=Xe.current[Me];qe&&Ji(qe.offsetLeft,{behavior:P,activeIndex:pe})},Vo=(P,ae="smooth",pe,Me)=>{const qe=Be.current;if(!qe||t.length===0)return;const st=(Me??qe.scrollLeft)-P,wt=Le(P),It=Xe.current[wt];if(O(It)){Mt(!0),bt();return}const on=Xe.current[wt+1],nn=It?on?on.offsetLeft-It.offsetLeft:It.offsetWidth:0;if((nn>0?st>nn*Wr?1:st<-nn*Wr?-1:0:0)!==0){const Fa=pe??wt%t.length,Na=Ge(Me??qe.scrollLeft,P,Fa);fn(Na,ae);return}const Ei=Me??qe.scrollLeft,qn=Le(Ei),Ir=Xe.current[qn];if(Ir&&Math.abs(Ir.offsetLeft-Ei)<1){Mt(!0),bt();return}jo("auto")},fn=(P,ae="smooth")=>{const pe=Be.current;if(!pe||t.length===0)return;const Me=Bt(P,pe.scrollLeft),qe=Xe.current[Me];qe&&(ae==="smooth"?At.current=P:At.current=null,q.current=P,re(P),Ft(!0),Ji(qe.offsetLeft,{behavior:ae,activeIndex:P,onComplete:ae==="smooth"?Dt:void 0}))},vn=()=>{Re.current&&(window.removeEventListener("pointerup",Re.current),window.removeEventListener("pointercancel",Re.current),Re.current=null)},ai=(P,ae,pe,Me,qe)=>{const st=pe-P,wt=Me-ae,It=Math.abs(st),on=Math.abs(wt);if(It<G0||It<=on)return!1;const nn=st<0?1:-1,si=rt?(qe+nn+t.length)%t.length:Math.max(0,Math.min(t.length-1,qe+nn));return si===qe?!1:(fn(si),!0)},Xn=P=>{if(!ze.current.isActive)return;vn();const ae=Be.current;if(!ae)return;const{scrollLeft:pe,startActiveIndex:Me,hasMoved:qe}=ze.current,st=ae.scrollLeft;Gt(!0),ze.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},ut(!1),P!==void 0&&ae.hasPointerCapture(P)&&ae.releasePointerCapture(P),qe?Vo(pe,"smooth",Me,st):(Mt(!0),bt()),lt()},Go=(P,ae)=>{const pe=Ee.current;Ee.current=null,pe&&(ai(pe.startX,pe.startY,P,ae,pe.startActiveIndex),lt())},ki=P=>{if(!Te)return;if(P.pointerType==="touch"){if(mn(),Mt(!0),Et(P.target))return;Ee.current={startX:P.clientX,startY:P.clientY,startActiveIndex:q.current};return}if(P.pointerType!=="mouse"||P.button!==0||Et(P.target))return;const ae=Be.current;if(!ae)return;mn(),sn(),Pn(),At.current=null,ze.current={isActive:!0,startX:P.clientX,scrollLeft:ae.scrollLeft,startActiveIndex:q.current,hasMoved:!1},Mt(!1),lt(),ae.setPointerCapture(P.pointerId),vn();const pe=Me=>{Me.pointerType==="mouse"&&Xn(Me.pointerId)};Re.current=pe,window.addEventListener("pointerup",pe),window.addEventListener("pointercancel",pe)},Qi=P=>{if(!Te||P.pointerType!=="mouse")return;const ae=Be.current;if(!ae||!ze.current.isActive)return;if(P.buttons===0){Xn(P.pointerId);return}const pe=P.clientX-ze.current.startX;Math.abs(pe)>V0&&(ze.current.hasMoved=!0,ut(!0)),ze.current.hasMoved&&(P.preventDefault(),ae.scrollLeft=ze.current.scrollLeft-pe,Gt(!0),bt(),lt())},we=P=>{if(Te){if(P.pointerType==="touch"){P.type==="pointerup"?Go(P.clientX,P.clientY):Ee.current=null;return}P.pointerType==="mouse"&&Xn(P.pointerId)}},Ke=P=>{!Te||P.pointerType!=="mouse"||Xn(P.pointerId)};return Bu(),s.useEffect(()=>{const P=requestAnimationFrame(()=>$t(!0));return()=>{cancelAnimationFrame(P),sn(),vn(),zt.current!==null&&(cancelAnimationFrame(zt.current),zt.current=null),Ct.current&&clearTimeout(Ct.current),Vt.current&&clearTimeout(Vt.current)}},[]),s.useEffect(()=>{if(!Pe){ft(!0);return}lt();const P=()=>lt();return document.addEventListener("pointermove",P,{passive:!0}),document.addEventListener("pointerdown",P,{passive:!0}),()=>{document.removeEventListener("pointermove",P),document.removeEventListener("pointerdown",P),Vt.current&&clearTimeout(Vt.current)}},[Pe,lt]),s.useEffect(()=>{const P=ae=>{ae.key==="Escape"&&ke()};return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)},[ke]),s.useLayoutEffect(()=>{Ot()},[j,t.length,rt]),s.useLayoutEffect(()=>{o||fn(q.current,"auto")},[j,o]),s.useLayoutEffect(()=>{fn(0,"auto")},[t.length,rt]),s.useEffect(()=>{const P=Be.current;if(!P||o||!ne)return;const ae=pe=>{if(pe.preventDefault(),Math.abs(pe.deltaY)<=Math.abs(pe.deltaX))return;const Me=pe.deltaMode===1?B0:pe.deltaMode===2?P.clientHeight:1,qe=pe.deltaY*Me*z0;if(qe!==0){if(sn(),ot.current||(ot.current=!0,Ne.current=P.scrollLeft,At.current=null,Mt(!1)),Ne.current+=qe,!rt){const st=P.scrollWidth-P.clientWidth;Ne.current=Math.max(0,Math.min(st,Ne.current))}lt(),it.current===null&&(it.current=requestAnimationFrame(yn))}};return P.addEventListener("wheel",ae,{passive:!1}),()=>{P.removeEventListener("wheel",ae),mn()}},[o,ne,rt]),s.useEffect(()=>{const P=Be.current;if(!P)return;const ae=()=>{Gt(ze.current.isActive);const Me=P.scrollLeft,qe=Me-Ie.current;Ie.current=Me;const st=ge.current>0?ge.current*.5:1/0;if(qe!==0&&Math.abs(qe)<st){const wt=qe>0?"forward":"backward";wt!==Ye.current&&(Ye.current=wt,_e(wt))}ze.current.isActive&&ze.current.hasMoved||bt()};P.addEventListener("scroll",ae,{passive:!0});const pe=new ResizeObserver(()=>{Ot(),Gt(ze.current.isActive),_e(Ye.current),bt()});return pe.observe(P),()=>{sn(),P.removeEventListener("scroll",ae),pe.disconnect()}},[t.length,rt]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{yt||ke()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:gt?1:0,transition:`opacity ${or}ms ease`,pointerEvents:gt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Xt}}),a.jsxs("div",{ref:He,className:`${e}-lightbox-dismiss-area`,style:Ut,...qt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Ht,onClick:P=>P.stopPropagation(),children:a.jsx("div",{ref:Be,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":Te&&t.length>0?"true":"false","data-mouse-dragging":kt?"true":"false",onPointerDown:ki,onPointerMove:Qi,onPointerUp:we,onPointerCancel:we,onLostPointerCapture:Ke,children:a.jsx("div",{ref:Je,className:`${e}-lightbox-strip-track`,style:{gap:j},children:Pt.map((P,ae)=>{const pe=P.image.objectFit??"contain",Me=ae%t.length,qe=Math.floor(ae/t.length),st=Hr(j),wt=`calc(-0.5 * (${st} + ${j}))`;return a.jsxs("div",{ref:It=>Xe.current[ae]=It,className:`${e}-strip-item`,style:{height:F==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:P.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:pe}}),o&&Me<t.length-1&&qe===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:wt,width:st,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${qe}-${P.image.url}-${Me}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":rn?"true":"false",style:Nt,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:K,flexShrink:0,pointerEvents:"none"},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:le,pointerEvents:"auto",zIndex:3}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:a.jsx("div",{className:`${e}-lightbox-content-area${de?` ${e}-lightbox-content-area-stacked`:""}`,children:($e||y)&&a.jsx("div",{className:`${e}-header ${de?`${e}-header-two-row`:`${e}-header-single-row`}`,children:de?dt():$e||y?xt():null})})})]}),t.length>1&&C==="on"&&(()=>{const P=Hr(T),ae=`calc(-0.5 * (${T} + ${P}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:T},children:a.jsx("div",{ref:Ce,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:pe=>pe.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":w,style:{gap:Z,"--thumbnail-active-color":D},children:[t.map((pe,Me)=>{const qe=Hr(Z),st=`calc(-0.5 * (${qe} + ${Z}))`;return a.jsxs("div",{ref:wt=>{De.current[Me]=wt},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":M===Me?"true":"false",onClick:()=>ne&&b==="click"&&fn(Me),onMouseEnter:()=>Oe&&b==="hover"&&fn(Me),"aria-label":pe.image.name?`View ${pe.image.name}`:`View image ${Me+1}`,"aria-current":M===Me?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${ve?` ${e}-thumb-image-cover`:""}`,src:pe.image.url,alt:"",draggable:!1,style:{...Se,maxWidth:G,maxHeight:G,width:S.display==="cover"?"auto":"100%",height:"auto",objectFit:S.display==="cover"?"cover":"contain"}})}),o&&Me<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:st,width:qe,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${pe.image.url}-${Me}`)}),o&&a.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:ae,height:P,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function ix(e){return`
14319
14319
  .${e}-wrapper {
14320
14320
  position: relative;
14321
14321
  width: 100%;
@@ -14700,7 +14700,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14700
14700
  pointer-events: auto;
14701
14701
  z-index: 10;
14702
14702
  }
14703
- `}const ex=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=A.useScopedStyles(),{cover:d,coverFit:c}=e,u=s.useRef(null),[p,x]=s.useState(!1),v=t??[],m=p&&v.length>0,h=()=>{v.length!==0&&x(!0)};return s.useEffect(()=>{!n||i||o||x(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Q0(l)}}),d&&a.jsx("div",{className:`${l}-cover ${ni(c)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>h(),style:{...ni(c)?{"--image-aspect-ratio":Ma(c)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${ni(c)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:d,alt:"cover"})})]}),m&&typeof document<"u"&&(()=>{const y=(r?document.getElementById(r):null)??document.body;return ri.createPortal(a.jsx(J0,{prefix:l,images:v,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>x(!1)}),y)})()]})},tx=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
14703
+ `}const ox=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=A.useScopedStyles(),{cover:d,coverFit:c}=e,u=s.useRef(null),[p,x]=s.useState(!1),y=t??[],m=p&&y.length>0,h=()=>{y.length!==0&&x(!0)};return s.useEffect(()=>{!n||i||o||x(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ix(l)}}),d&&a.jsx("div",{className:`${l}-cover ${ni(c)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>h(),style:{...ni(c)?{"--image-aspect-ratio":Ma(c)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${ni(c)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:d,alt:"cover"})})]}),m&&typeof document<"u"&&(()=>{const v=(r?document.getElementById(r):null)??document.body;return ri.createPortal(a.jsx(nx,{prefix:l,images:y,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>x(!1)}),v)})()]})},rx=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
14704
14704
  import { createPortal } from 'react-dom';
14705
14705
  import { CommonComponentProps } from '../props';
14706
14706
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -15246,7 +15246,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15246
15246
  </>
15247
15247
  );
15248
15248
  };
15249
- `,nx="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Wi={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 ix(e){const t={};return t[Yt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Yt(e,"fontSettings")]={...Wi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Yt(e,"fontSize")]={...Wi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Yt(e,"lineHeight")]={...Wi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Yt(e,"letterSpacing")]={...Wi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Yt(e,"wordSpacing")]={...Wi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Yt(e,"textAlign")]={...Wi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Yt(e,"textAppearance")]={...Wi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const ox=ko.reduce((e,t)=>({...e,...ix(t)}),{}),rx=ko.reduce((e,t)=>({...e,[Yt(t,"fontFamily")]:"Goudy Bookletter 1911",[Yt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Yt(t,"letterSpacing")]:0,[Yt(t,"wordSpacing")]:0,[Yt(t,"textAlign")]:"left",[Yt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function is(e){return ko.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Yt(n,"fontSize")]=i),o!==void 0&&(t[Yt(n,"lineHeight")]=o),t},{})}const ax=K0(),sx={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"layout",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"layout",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up","none"]}},thumbnailActiveColor:{type:"string",scope:"layout",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"layout",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"layout",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"layout",title:"Caption Default",display:{type:"palette-color-picker"}},...ox,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:nx,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...rx},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...is({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...is({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...is({title1FontSize:.011,title1LineHeight:.02,title2FontSize:.011,title2LineHeight:.02,title3FontSize:.011,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[ax]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},lx={element:ex,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:sx,sourceCode:tx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...ko.map(e=>({path:`${Yt(e,"fontFamily")}`}))]},fontRelations:{...ko.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Yt(t,"fontFamily")}`}),{})}},cx=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,initialSlideIndex:l=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:p})=>{const{type:x,coverFit:v,backgroundColor:m,imageGap:h,maxWidth:y,maxHeight:b,textTransition:C,title1Width:S,title2Width:w,title3Width:D,title1MarginLeft:_=0,title2MarginLeft:z=0,title3MarginLeft:H=0,titleRowMarginBottom:L=0,titleHeaderLayout:V="single-row",countCloseGap:$=0,closeIcon:E,closeIconMaxWidth:F,closeIconColor:W,closeIconHoverColor:g,contentMarginTop:M=0,iconMarginRight:R=0}=n,G=s.useCallback(we=>A.scalingValue(we,i??!1),[i]),Z=G(h??0),T=`${y}%`,j=`${b}%`,Y=G($),le=G(M),se=G(R),k=ji("title1",Bi(n,"title1"),i),re=ji("title2",Bi(n,"title2"),i),q=ji("title3",Bi(n,"title3"),i),ce=ji("count",Bi(n,"count"),i),J=V==="mobile",be=!i||!!r,We=!o&&(!i||!!r),ye=s.useMemo(()=>ta(t,x),[t,x]),[ue,ee]=s.useState(l),de=ye[ue],ne=de==null?void 0:de.entry,[Pe,Te]=s.useState(!1),[Oe,ve]=s.useState(null),[Se,$e]=s.useState(!1),[f,X]=s.useState(null),[N,U]=s.useState(!1),[me,K]=s.useState(0),[I,ie]=s.useState(),[oe,B]=s.useState(),[te,Ae]=s.useState(null),he=s.useRef(null),Q=s.useRef(0),Ze=s.useRef(0),Fe=s.useRef(0),et=s.useRef(!1),Ue=s.useRef(null),nt=s.useRef(null),tt=s.useRef(null),Ve=s.useRef(null),fe=s.useRef(null),He=s.useRef(null),Be=s.useRef(null),Je=s.useCallback(()=>{const we=nt.current;if(!we)return;const Ye=we.closest(`.${e}-lightbox-content-area`);if(!Ye)return we.getBoundingClientRect().width;const P=Array.from(Ye.children).reduce((ae,pe)=>!(pe instanceof HTMLElement)||pe.contains(we)?ae:ae+pe.getBoundingClientRect().width,0);return Ye.getBoundingClientRect().width-P},[e]),Ce=s.useCallback(()=>{he.current&&(clearTimeout(he.current),he.current=null)},[]),De=s.useCallback(we=>{we===Q.current&&(X(null),U(!1))},[]),Xe=s.useCallback(()=>{o||et.current||(et.current=!0,u==null||u(),Te(!1),Ue.current=setTimeout(()=>{p()},300))},[o,u,p]),ge=s.useCallback(we=>!!(we.closest("[data-controls]")||we.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Me,backdropStyle:ze,mediaAreaStyle:Re,overlayContentStyle:xe,swipeHandlers:Ie,dismissAreaStyle:Ke}=Ou({enabled:We,onClose:Xe,animMs:300,isBlockedTarget:ge}),Ne=s.useCallback(we=>{d&&Su(we+1,c,!0)},[d,c]),it=s.useCallback(we=>{if(we)return we.getBoundingClientRect().height},[]),ot=s.useCallback(we=>{if(ye.length===0)return;const Ye=(we%ye.length+ye.length)%ye.length;if(Ye===ue)return;const P=ye[ue],ae=ye[Ye];Q.current+=1;const pe=Q.current,ke=C==="fade"&&dc(P==null?void 0:P.entry)!==dc(ae==null?void 0:ae.entry),qe=it(tt.current),st=ke?(()=>{const It=Je();ri.flushSync(()=>{Ae(ae.entry)}),tt.current&&It&&(tt.current.style.width=`${It}px`);const on=it(tt.current);return tt.current&&(tt.current.style.width=""),{measuredIncomingTitlesHeight:on,incomingTitlesMeasureWidth:It}})():void 0,wt=Math.max(qe??0,(st==null?void 0:st.measuredIncomingTitlesHeight)??0)||void 0;K(pe),X(ue),U(!0),ee(Ye),Ne(Ye),Fe.current=Ye,ke?(Ce(),wt&&ie(wt),st!=null&&st.incomingTitlesMeasureWidth&&B(st.incomingTitlesMeasureWidth),ve((P==null?void 0:P.entryIndex)??null),$e(!0),Ze.current=ae.entryIndex,he.current=setTimeout(()=>{ve(null),$e(!1),ie(void 0),B(void 0),Ae(null),he.current=null},400)):(Ce(),ve(null),$e(!1),ie(void 0),B(void 0),Ae(null),Ze.current=ae.entryIndex)},[ue,Ce,Je,it,ye,Ne,C]),rt=s.useCallback(()=>{Be.current=null},[]),ht=s.useCallback(we=>{!be||ye.length<=1||we.pointerType==="mouse"&&we.button!==0||we.target.closest("[data-controls]")||(Be.current={startX:we.clientX,startY:we.clientY,pointerId:we.pointerId})},[be,ye.length]),Pt=s.useCallback(we=>{var It;if(!be||ye.length<=1||we.pointerType==="mouse"&&we.button!==0)return;if(Me){rt();return}const Ye=Be.current;if(!Ye||Ye.pointerId!==we.pointerId||(rt(),we.target.closest("[data-controls]")))return;const ae=we.clientX-Ye.startX,pe=we.clientY-Ye.startY,ke=Math.abs(ae),qe=Math.abs(pe);if(ke>=Sy&&ke>qe){ot(ae>0?ue-1:ue+1);return}if(ke>ac||qe>ac)return;const st=(It=Ve.current)==null?void 0:It.getBoundingClientRect(),wt=st?st.left+st.width/2:window.innerWidth/2;ot(we.clientX<wt?ue-1:ue+1)},[ue,be,ot,Me,rt,ye.length]),Et=s.useCallback(we=>{const Ye=Be.current;(Ye==null?void 0:Ye.pointerId)===we.pointerId&&rt()},[rt]);Du(),s.useEffect(()=>{He.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const we=requestAnimationFrame(()=>{Te(!0),requestAnimationFrame(()=>{fe.current?fe.current.focus():Ve.current&&Ve.current.focus()})});return()=>{cancelAnimationFrame(we),Ue.current&&clearTimeout(Ue.current),he.current&&clearTimeout(he.current);const Ye=He.current;Ye&&document.contains(Ye)&&Ye.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var we;C!=="fade"&&(Ze.current=((we=ye[ue])==null?void 0:we.entryIndex)??0,Ce(),ve(null),$e(!1),ie(void 0),B(void 0))},[ue,Ce,ye,C]),s.useEffect(()=>{const we=Ye=>{if(Ye.key==="Escape"){Xe();return}if(Ye.key==="ArrowLeft"&&ye.length>1){ot(ue-1);return}if(Ye.key==="ArrowRight"&&ye.length>1){ot(ue+1);return}if(Ye.key==="Tab"&&Ve.current){const P=Ve.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),ae=Array.from(P).filter(st=>!st.closest('[aria-hidden="true"]'));if(ae.length===0)return;const pe=ae[0],ke=ae[ae.length-1],qe=document.activeElement;Ye.shiftKey?(qe===pe||!Ve.current.contains(qe))&&(Ye.preventDefault(),ke.focus()):(qe===ke||!Ve.current.contains(qe))&&(Ye.preventDefault(),pe.focus())}};return window.addEventListener("keydown",we),()=>window.removeEventListener("keydown",we)},[ot,Xe,ue,ye.length]),s.useLayoutEffect(()=>{Ce(),Q.current=0,K(0),X(null),U(!1),ve(null),$e(!1),ie(void 0),B(void 0),Ae(null),ee(we=>{const Ye=Math.max(0,ye.length-1);return Math.min(we,Ye)})},[Ce,t.length,x,ye.length]),s.useLayoutEffect(()=>{var P;const we=Math.max(0,ye.length-1),Ye=Math.min(Math.max(0,l),we);Fe.current=Ye,Ze.current=((P=ye[Ye])==null?void 0:P.entryIndex)??0,ee(Ye)},[l]);const ut=Oe!==null?t[Oe]:null,gt=f!==null?ye[f]:null,$t=(ne==null?void 0:ne.title1)||(ne==null?void 0:ne.title2)||(ne==null?void 0:ne.title3)||(ut==null?void 0:ut.title1)||(ut==null?void 0:ut.title2)||(ut==null?void 0:ut.title3),Tt=Py(x,ye,t),ft=E!==null,At=$t||Tt||ft,zt=Tt&&ft?{gap:Y}:void 0,jt=`${e}-titles-stack${J?` ${e}-titles-stack-stacked`:""}`,Zt=`${e}-titles-layer-out${J?` ${e}-titles-layer-out-stacked`:""}`,Ct=`${e}-titles-layer-out`,Vt=(_??0)>0||o,rn=G(L),lt=s.useMemo(()=>({title1Width:S??xo.title1Width,title2Width:w??xo.title2Width,title3Width:D??xo.title3Width}),[S,w,D]),Ee=s.useMemo(()=>({title2MarginLeft:z,title3MarginLeft:H}),[z,H]),je=s.useMemo(()=>ne?xi(e,ne,k,re,q):[],[e,ne,k,re,q]),Qe=s.useMemo(()=>je.map(we=>lt[we.widthKey]),[je,lt]),dt=s.useMemo(()=>Lo(je.length,Qe),[je.length,Qe]),xt=s.useMemo(()=>pr(je.length,Qe),[je.length,Qe]),Mt=s.useMemo(()=>je.filter(we=>we.prefix==="title1"),[je]),yt=s.useMemo(()=>je.filter(we=>we.prefix==="title2"||we.prefix==="title3"),[je]),Xt=s.useMemo(()=>bi(Mt,lt),[Mt,lt]),Ht=s.useMemo(()=>bi(yt,lt),[yt,lt]),Nt=s.useCallback((we,Ye)=>{const P=je.findIndex(pe=>pe.prefix===we.prefix);if(!J||Ye==="single-row")return{effectiveWidth:xt[P]??0,resolvedWidth:dt[P]??0,maxWidth:gn(P,dt)};if(Ye==="two-row-top"){const pe=Mt.findIndex(ke=>ke.prefix===we.prefix);return{effectiveWidth:Xt.effective[pe]??0,resolvedWidth:Xt.resolved[pe]??0,maxWidth:gn(pe,Xt.resolved)}}const ae=yt.findIndex(pe=>pe.prefix===we.prefix);return{effectiveWidth:Ht.effective[ae]??0,resolvedWidth:Ht.resolved[ae]??0,maxWidth:gn(ae,Ht.resolved)}},[je,yt,Ht,xt,dt,Mt,Xt,J]),qt=s.useCallback(we=>Tu(je,dt,Ee,we)+(J?0:_??0),[je,dt,Ee,J,_]),Ut=s.useCallback(()=>J?0:_??0,[J,_]),Ot=s.useCallback(we=>yt.slice(0,we).reduce((Ye,P,ae)=>Ye+(P.marginLeftKey?Ee[P.marginLeftKey]??0:0)+(Ht.resolved[ae]??0),0),[yt,Ht.resolved,Ee]),Gt=s.useCallback(we=>{const Ye=yt[we];return Ot(we)+(Ye.marginLeftKey?Ee[Ye.marginLeftKey]??0:0)+(Ht.resolved[we]??0)},[yt,Ht.resolved,Ot,Ee]),Bt=s.useCallback((we,Ye,P)=>{if(!J||P==="single-row"){const st=we.findIndex(nn=>nn.prefix===Ye.prefix),wt=we.map(nn=>lt[nn.widthKey]),It=Lo(we.length,wt);return{effectiveWidth:pr(we.length,wt)[st]??0,resolvedWidth:It[st]??0,maxWidth:gn(st,It)}}if(P==="two-row-top"){const st=we.filter(nn=>nn.prefix==="title1"),wt=st.findIndex(nn=>nn.prefix===Ye.prefix),{resolved:It,effective:on}=bi(st,lt);return{effectiveWidth:on[wt]??0,resolvedWidth:It[wt]??0,maxWidth:gn(wt,It)}}const ae=we.filter(st=>st.prefix==="title2"||st.prefix==="title3"),pe=ae.findIndex(st=>st.prefix===Ye.prefix),{resolved:ke,effective:qe}=bi(ae,lt);return{effectiveWidth:qe[pe]??0,resolvedWidth:ke[pe]??0,maxWidth:gn(pe,ke)}},[lt,J]),Lt=(we,Ye,P)=>{const ae=we.marginLeftKey?Ee[we.marginLeftKey]??0:0,{effectiveWidth:pe,resolvedWidth:ke,maxWidth:qe}=P??Nt(we,Ye),st=Math.max(ae,vi),wt=o&&Ye==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":we.prefix,style:{width:G(pe),...ae>0?{marginLeft:G(ae)}:{}},children:[a.jsx("p",{className:we.className,style:we.style,children:we.text}),wt&&we.marginLeftKey?a.jsx("div",{"data-controls":we.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke),style:{position:"absolute",top:0,left:G(-ae),width:G(st),height:"100%",pointerEvents:"auto"}}):null,wt?a.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(qe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:G(-Tn/2),width:G(Tn),height:"100%",pointerEvents:"auto"}}):null]},we.className)},O=(we="two-row")=>{const Ye=je.findIndex(pe=>pe.prefix==="title1"),P=Ye>=0?dt[Ye]:lt.title1Width,ae=we==="two-row"&&o;return a.jsx("div",{...ae?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(P)}:{},style:{width:G(_??0),flexShrink:0,alignSelf:"stretch",...ae?{pointerEvents:"auto"}:{}}})},Le=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:k,"aria-hidden":"true",children:" "}),_e=()=>a.jsx("span",{className:`${e}-entry-counter`,style:ce,"aria-live":"polite","aria-atomic":"true",children:Ry(ye,ue,x,t)}),Ge=()=>Tt?o&&ft?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[_e(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${qa(Y)} + ${Y}))`,width:qa(Y),height:"100%",pointerEvents:"auto",zIndex:3}})]}):_e():null,pt=()=>!Tt&&!ft?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:zt,children:[Ge(),ft?bt():null]}),Ft=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Tt||$t?Le():null,Vt?O("single-row"):null,kt(ne),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),pt(),fn()]}),ct=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Tt||$t?Le():null,Vt?O("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:Se&&I?{minHeight:I}:void 0,children:[a.jsx("div",{ref:tt,className:jt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Pn(te||ne)}),a.jsxs("div",{ref:nt,className:jt,style:{position:Se?"absolute":"relative",inset:Se?0:void 0,width:"100%",...Se&&oe?{width:oe,maxWidth:"100%"}:void 0},children:[ut&&Se?a.jsx("div",{className:`${Zt} ${e}-titles-fade-out`,children:Pn(ut)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Se?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Pn(ne)})]})]}),pt(),fn()]}),bt=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:A.scalingValue(F??0,i),height:A.scalingValue(F??0,i),marginRight:se,"--close-icon-hover-color":g},children:[a.jsx("button",{ref:fe,type:"button",className:`${e}-close-icon-inner`,onClick:Xe,"aria-label":"Close",children:a.jsx(un,{url:E??"",fill:W,hoverFill:i&&!r?W:g,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:se,height:"100%",pointerEvents:"auto"}})]}),Dt=(we,Ye)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[Tt||$t?Le():null,Vt?O("two-row"):null,Ye!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ye},children:we}):a.jsxs(a.Fragment,{children:[we,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),pt()]}),kt=we=>{if(!we)return null;const Ye=xi(e,we,k,re,q);return a.jsx(a.Fragment,{children:Ye.map(P=>Lt(P,"single-row",Bt(Ye,P,"single-row")))})},sn=we=>{if(!we)return null;const Ye=xi(e,we,k,re,q),P=Ye.find(ae=>ae.prefix==="title1");return P?Lt(P,"two-row-top",Bt(Ye,P,"two-row-top")):null},mn=(we,Ye=!1)=>{const P=we?xi(e,we,k,re,q):[],ae=P.filter(qe=>qe.prefix==="title2"||qe.prefix==="title3"),pe=o&&Ye;return ae.length>0||pe||(L??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[ae.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[ae.map(qe=>Lt(qe,"two-row-bottom",Bt(P,qe,"two-row-bottom"))),Ye&&o?a.jsxs(a.Fragment,{children:[jo(),Vo()]}):null]}):null,(L??0)>0||pe?a.jsx("div",{"data-controls":pe?"titleRowMarginBottom":void 0,"data-controls-axis":pe?"y":void 0,"data-controls-reverse":pe?"":void 0,className:pe?`${e}-control`:void 0,style:{height:rn,width:"100%",flexShrink:0,pointerEvents:pe?"auto":"none"}}):null]}):null},yn=(we,Ye=!1)=>a.jsxs(a.Fragment,{children:[Dt(sn(we)),mn(we,Ye)]}),Pn=we=>J?a.jsx("div",{className:`${e}-titles-row-two-row`,children:yn(we)}):we?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:kt(we)}):null,En=()=>{const we=J?-1:je.findIndex(ae=>ae.prefix==="title1"),Ye=!J&&(o||(_??0)>0)?(()=>{const ae=_??0,pe=we>=0?dt[we]:lt.title1Width,ke=Math.max(ae,vi);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(pe),style:{position:"absolute",top:0,left:0,width:G(ke),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,P=je.flatMap((ae,pe)=>{if(!ae.marginLeftKey)return[];const ke=Ee[ae.marginLeftKey]??0,qe=Cu(je,dt,Ee,pe)+Ut(),st=Math.max(ke,vi);return a.jsx("div",{"data-controls":ae.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(dt[pe]),style:{position:"absolute",top:0,left:G(qe),width:G(st),height:"100%",pointerEvents:"auto"}},ae.marginLeftKey)});return Ye?[Ye,...P]:P},Ji=()=>je.map((we,Ye)=>{const P=gn(Ye,dt),pe=qt(Ye)-Tn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(P),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:G(pe),width:G(Tn),height:"100%",pointerEvents:"auto"}})},`${we.widthKey}-junction`)}),jo=()=>yt.flatMap((we,Ye)=>{if(!we.marginLeftKey)return[];const P=Ee[we.marginLeftKey]??0,ae=Ot(Ye),pe=Math.max(P,vi),{resolvedWidth:ke}=Nt(we,"two-row-bottom");return a.jsx("div",{"data-controls":we.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke),style:{position:"absolute",top:0,left:G(ae),width:G(pe),height:"100%",pointerEvents:"auto"}},we.marginLeftKey)}),Vo=()=>yt.map((we,Ye)=>{const{maxWidth:P}=Nt(we,"two-row-bottom"),pe=Gt(Ye)-Tn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(P),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:G(pe),width:G(Tn),height:"100%",pointerEvents:"auto"}})},`${we.widthKey}-junction`)}),fn=()=>!o||J?null:a.jsxs(a.Fragment,{children:[En(),Ji()]}),vn=we=>{const Ye=!we.objectFit&&ni(v);return{className:`${e}-slide-image-cell${Ye?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:T,maxHeight:j,...Ye?{"--image-aspect-ratio":Ma(v)}:{}}}},ai=we=>we.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":we.objectFit}}:ni(v)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Xn=we=>{if(we.length===0)return null;const Ye=we.length>1,P=qa(Z),ae=`calc(-0.5 * (${P} + ${Z}))`;if(we.length===1){const pe=we[0];return a.jsx("div",{...vn(pe),children:a.jsx("img",{...ai(pe),src:pe.url,alt:pe.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:Ye?{gap:Z}:void 0,children:we.map((pe,ke)=>a.jsxs("div",{...vn(pe),children:[a.jsx("img",{...ai(pe),src:pe.url,alt:pe.name??"",draggable:!1}),o&&Ye&&ke<we.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:ae,width:P,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${pe.url}-${ke}`))})},Go=!!(ne!=null&&ne.title2||ne!=null&&ne.title3||ut!=null&&ut.title2||ut!=null&&ut.title3||(L??0)>0||o),Ei=()=>a.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[a.jsx("div",{ref:tt,className:jt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:yn(te||ne)}),a.jsxs("div",{ref:nt,className:`${e}-titles-row-two-row`,style:{...Se&&I?{minHeight:I}:void 0,...Se&&oe?{width:oe,maxWidth:"100%"}:void 0},children:[Dt(a.jsxs("div",{className:jt,style:{position:Se?"absolute":"relative",inset:Se?0:void 0,width:"100%"},children:[ut&&Se?a.jsx("div",{className:`${Ct} ${e}-titles-fade-out`,children:sn(ut)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Se?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:sn(ne)})]}),Se&&I?I:void 0),Go?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[ut&&Se?a.jsx("div",{className:`${Zt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:mn(ut)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Se?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${J?` ${e}-titles-layer-in-stacked`:""}`,children:mn(ne,!0)})]}):null]})]}),Qi=()=>{const we=Go;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...we?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:we?void 0:{flex:"0 0 auto",height:"auto"},children:yn(ne,!0)}),fn()]})};return a.jsxs("div",{ref:Ve,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Me||Xe()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ft?void 0:-1,style:{opacity:Pe?1:0,transition:"opacity 300ms ease",pointerEvents:Pe?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:m,...ze}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Ke,...Ie,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Re,onClick:we=>we.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":be&&ye.length>1?"true":"false",onPointerDown:be?ht:void 0,onPointerUp:be?Pt:void 0,onPointerCancel:be?Et:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[gt&&N?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:we=>{we.target===we.currentTarget&&De(me)},children:a.jsx("div",{className:`${e}-slide-area`,children:Xn(gt.images)})},`slide-out-${me}`):null,a.jsx("div",{className:`${e}-slide-layer-in${N?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:de?Xn(de.images):null})},`slide-in-${me}-${ue}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:xe,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:le,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...J?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${J?` ${e}-lightbox-content-area-stacked`:""}`,children:At&&a.jsx("div",{className:`${e}-text-bar-cell${J?` ${e}-text-bar-cell-stacked`:""}`,style:J?void 0:{flex:1,minWidth:0,width:"100%"},children:J?C==="fade"?Ei():Qi():C==="fade"?ct():Ft()})})})]})]})]})};function dx(e){return`
15249
+ `,ax="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Wi={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 sx(e){const t={};return t[Kt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Kt(e,"fontSettings")]={...Wi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Kt(e,"fontSize")]={...Wi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Kt(e,"lineHeight")]={...Wi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Kt(e,"letterSpacing")]={...Wi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Kt(e,"wordSpacing")]={...Wi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Kt(e,"textAlign")]={...Wi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Kt(e,"textAppearance")]={...Wi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const lx=Mo.reduce((e,t)=>({...e,...sx(t)}),{}),cx=Mo.reduce((e,t)=>({...e,[Kt(t,"fontFamily")]:"Goudy Bookletter 1911",[Kt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Kt(t,"letterSpacing")]:0,[Kt(t,"wordSpacing")]:0,[Kt(t,"textAlign")]:"left",[Kt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function os(e){return Mo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Kt(n,"fontSize")]=i),o!==void 0&&(t[Kt(n,"lineHeight")]=o),t},{})}const dx=Q0(),ux={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"layout",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"layout",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up","none"]}},thumbnailActiveColor:{type:"string",scope:"layout",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"layout",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"layout",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"layout",title:"Caption Default",display:{type:"palette-color-picker"}},...lx,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:ax,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...cx},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...os({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...os({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...os({title1FontSize:.011,title1LineHeight:.02,title2FontSize:.011,title2LineHeight:.02,title3FontSize:.011,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[dx]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},px={element:ox,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:ux,sourceCode:rx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Mo.map(e=>({path:`${Kt(e,"fontFamily")}`}))]},fontRelations:{...Mo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Kt(t,"fontFamily")}`}),{})}},mx=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,initialSlideIndex:l=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:p})=>{const{type:x,coverFit:y,backgroundColor:m,imageGap:h,maxWidth:v,maxHeight:b,textTransition:C,title1Width:S,title2Width:w,title3Width:D,title1MarginLeft:_=0,title2MarginLeft:z=0,title3MarginLeft:H=0,titleRowMarginBottom:L=0,titleHeaderLayout:V="single-row",countCloseGap:$=0,closeIcon:k,closeIconMaxWidth:F,closeIconColor:W,closeIconHoverColor:g,contentMarginTop:E=0,iconMarginRight:R=0}=n,G=s.useCallback(we=>A.scalingValue(we,i??!1),[i]),Z=G(h??0),T=`${v}%`,j=`${b}%`,K=G($),le=G(E),se=G(R),M=ji("title1",Bi(n,"title1"),i),re=ji("title2",Bi(n,"title2"),i),q=ji("title3",Bi(n,"title3"),i),ce=ji("count",Bi(n,"count"),i),J=V==="mobile",be=!i||!!r,We=!o&&(!i||!!r),ye=s.useMemo(()=>na(t,x),[t,x]),[ue,ee]=s.useState(l),de=ye[ue],ne=de==null?void 0:de.entry,[Pe,Te]=s.useState(!1),[Oe,ve]=s.useState(null),[Se,$e]=s.useState(!1),[f,X]=s.useState(null),[N,U]=s.useState(!1),[me,Y]=s.useState(0),[I,ie]=s.useState(),[oe,B]=s.useState(),[te,Ae]=s.useState(null),he=s.useRef(null),Q=s.useRef(0),Ze=s.useRef(0),Fe=s.useRef(0),et=s.useRef(!1),Ue=s.useRef(null),nt=s.useRef(null),tt=s.useRef(null),Ve=s.useRef(null),fe=s.useRef(null),He=s.useRef(null),Be=s.useRef(null),Je=s.useCallback(()=>{const we=nt.current;if(!we)return;const Ke=we.closest(`.${e}-lightbox-content-area`);if(!Ke)return we.getBoundingClientRect().width;const P=Array.from(Ke.children).reduce((ae,pe)=>!(pe instanceof HTMLElement)||pe.contains(we)?ae:ae+pe.getBoundingClientRect().width,0);return Ke.getBoundingClientRect().width-P},[e]),Ce=s.useCallback(()=>{he.current&&(clearTimeout(he.current),he.current=null)},[]),De=s.useCallback(we=>{we===Q.current&&(X(null),U(!1))},[]),Xe=s.useCallback(()=>{o||et.current||(et.current=!0,u==null||u(),Te(!1),Ue.current=setTimeout(()=>{p()},300))},[o,u,p]),ge=s.useCallback(we=>!!(we.closest("[data-controls]")||we.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ee,backdropStyle:ze,mediaAreaStyle:Re,overlayContentStyle:xe,swipeHandlers:Ie,dismissAreaStyle:Ye}=zu({enabled:We,onClose:Xe,animMs:300,isBlockedTarget:ge}),Ne=s.useCallback(we=>{d&&$u(we+1,c,!0)},[d,c]),it=s.useCallback(we=>{if(we)return we.getBoundingClientRect().height},[]),ot=s.useCallback(we=>{if(ye.length===0)return;const Ke=(we%ye.length+ye.length)%ye.length;if(Ke===ue)return;const P=ye[ue],ae=ye[Ke];Q.current+=1;const pe=Q.current,Me=C==="fade"&&uc(P==null?void 0:P.entry)!==uc(ae==null?void 0:ae.entry),qe=it(tt.current),st=Me?(()=>{const It=Je();ri.flushSync(()=>{Ae(ae.entry)}),tt.current&&It&&(tt.current.style.width=`${It}px`);const on=it(tt.current);return tt.current&&(tt.current.style.width=""),{measuredIncomingTitlesHeight:on,incomingTitlesMeasureWidth:It}})():void 0,wt=Math.max(qe??0,(st==null?void 0:st.measuredIncomingTitlesHeight)??0)||void 0;Y(pe),X(ue),U(!0),ee(Ke),Ne(Ke),Fe.current=Ke,Me?(Ce(),wt&&ie(wt),st!=null&&st.incomingTitlesMeasureWidth&&B(st.incomingTitlesMeasureWidth),ve((P==null?void 0:P.entryIndex)??null),$e(!0),Ze.current=ae.entryIndex,he.current=setTimeout(()=>{ve(null),$e(!1),ie(void 0),B(void 0),Ae(null),he.current=null},400)):(Ce(),ve(null),$e(!1),ie(void 0),B(void 0),Ae(null),Ze.current=ae.entryIndex)},[ue,Ce,Je,it,ye,Ne,C]),rt=s.useCallback(()=>{Be.current=null},[]),ht=s.useCallback(we=>{!be||ye.length<=1||we.pointerType==="mouse"&&we.button!==0||we.target.closest("[data-controls]")||(Be.current={startX:we.clientX,startY:we.clientY,pointerId:we.pointerId})},[be,ye.length]),Pt=s.useCallback(we=>{var It;if(!be||ye.length<=1||we.pointerType==="mouse"&&we.button!==0)return;if(Ee){rt();return}const Ke=Be.current;if(!Ke||Ke.pointerId!==we.pointerId||(rt(),we.target.closest("[data-controls]")))return;const ae=we.clientX-Ke.startX,pe=we.clientY-Ke.startY,Me=Math.abs(ae),qe=Math.abs(pe);if(Me>=Ty&&Me>qe){ot(ae>0?ue-1:ue+1);return}if(Me>sc||qe>sc)return;const st=(It=Ve.current)==null?void 0:It.getBoundingClientRect(),wt=st?st.left+st.width/2:window.innerWidth/2;ot(we.clientX<wt?ue-1:ue+1)},[ue,be,ot,Ee,rt,ye.length]),kt=s.useCallback(we=>{const Ke=Be.current;(Ke==null?void 0:Ke.pointerId)===we.pointerId&&rt()},[rt]);Bu(),s.useEffect(()=>{He.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const we=requestAnimationFrame(()=>{Te(!0),requestAnimationFrame(()=>{fe.current?fe.current.focus():Ve.current&&Ve.current.focus()})});return()=>{cancelAnimationFrame(we),Ue.current&&clearTimeout(Ue.current),he.current&&clearTimeout(he.current);const Ke=He.current;Ke&&document.contains(Ke)&&Ke.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var we;C!=="fade"&&(Ze.current=((we=ye[ue])==null?void 0:we.entryIndex)??0,Ce(),ve(null),$e(!1),ie(void 0),B(void 0))},[ue,Ce,ye,C]),s.useEffect(()=>{const we=Ke=>{if(Ke.key==="Escape"){Xe();return}if(Ke.key==="ArrowLeft"&&ye.length>1){ot(ue-1);return}if(Ke.key==="ArrowRight"&&ye.length>1){ot(ue+1);return}if(Ke.key==="Tab"&&Ve.current){const P=Ve.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),ae=Array.from(P).filter(st=>!st.closest('[aria-hidden="true"]'));if(ae.length===0)return;const pe=ae[0],Me=ae[ae.length-1],qe=document.activeElement;Ke.shiftKey?(qe===pe||!Ve.current.contains(qe))&&(Ke.preventDefault(),Me.focus()):(qe===Me||!Ve.current.contains(qe))&&(Ke.preventDefault(),pe.focus())}};return window.addEventListener("keydown",we),()=>window.removeEventListener("keydown",we)},[ot,Xe,ue,ye.length]),s.useLayoutEffect(()=>{Ce(),Q.current=0,Y(0),X(null),U(!1),ve(null),$e(!1),ie(void 0),B(void 0),Ae(null),ee(we=>{const Ke=Math.max(0,ye.length-1);return Math.min(we,Ke)})},[Ce,t.length,x,ye.length]),s.useLayoutEffect(()=>{var P;const we=Math.max(0,ye.length-1),Ke=Math.min(Math.max(0,l),we);Fe.current=Ke,Ze.current=((P=ye[Ke])==null?void 0:P.entryIndex)??0,ee(Ke)},[l]);const ut=Oe!==null?t[Oe]:null,gt=f!==null?ye[f]:null,$t=(ne==null?void 0:ne.title1)||(ne==null?void 0:ne.title2)||(ne==null?void 0:ne.title3)||(ut==null?void 0:ut.title1)||(ut==null?void 0:ut.title2)||(ut==null?void 0:ut.title3),Tt=Ay(x,ye,t),ft=k!==null,At=$t||Tt||ft,zt=Tt&&ft?{gap:K}:void 0,jt=`${e}-titles-stack${J?` ${e}-titles-stack-stacked`:""}`,Zt=`${e}-titles-layer-out${J?` ${e}-titles-layer-out-stacked`:""}`,Ct=`${e}-titles-layer-out`,Vt=(_??0)>0||o,rn=G(L),lt=s.useMemo(()=>({title1Width:S??xo.title1Width,title2Width:w??xo.title2Width,title3Width:D??xo.title3Width}),[S,w,D]),ke=s.useMemo(()=>({title2MarginLeft:z,title3MarginLeft:H}),[z,H]),je=s.useMemo(()=>ne?xi(e,ne,M,re,q):[],[e,ne,M,re,q]),Qe=s.useMemo(()=>je.map(we=>lt[we.widthKey]),[je,lt]),dt=s.useMemo(()=>Lo(je.length,Qe),[je.length,Qe]),xt=s.useMemo(()=>pr(je.length,Qe),[je.length,Qe]),Et=s.useMemo(()=>je.filter(we=>we.prefix==="title1"),[je]),yt=s.useMemo(()=>je.filter(we=>we.prefix==="title2"||we.prefix==="title3"),[je]),Xt=s.useMemo(()=>bi(Et,lt),[Et,lt]),Ht=s.useMemo(()=>bi(yt,lt),[yt,lt]),Nt=s.useCallback((we,Ke)=>{const P=je.findIndex(pe=>pe.prefix===we.prefix);if(!J||Ke==="single-row")return{effectiveWidth:xt[P]??0,resolvedWidth:dt[P]??0,maxWidth:gn(P,dt)};if(Ke==="two-row-top"){const pe=Et.findIndex(Me=>Me.prefix===we.prefix);return{effectiveWidth:Xt.effective[pe]??0,resolvedWidth:Xt.resolved[pe]??0,maxWidth:gn(pe,Xt.resolved)}}const ae=yt.findIndex(pe=>pe.prefix===we.prefix);return{effectiveWidth:Ht.effective[ae]??0,resolvedWidth:Ht.resolved[ae]??0,maxWidth:gn(ae,Ht.resolved)}},[je,yt,Ht,xt,dt,Et,Xt,J]),qt=s.useCallback(we=>Iu(je,dt,ke,we)+(J?0:_??0),[je,dt,ke,J,_]),Ut=s.useCallback(()=>J?0:_??0,[J,_]),Ot=s.useCallback(we=>yt.slice(0,we).reduce((Ke,P,ae)=>Ke+(P.marginLeftKey?ke[P.marginLeftKey]??0:0)+(Ht.resolved[ae]??0),0),[yt,Ht.resolved,ke]),Gt=s.useCallback(we=>{const Ke=yt[we];return Ot(we)+(Ke.marginLeftKey?ke[Ke.marginLeftKey]??0:0)+(Ht.resolved[we]??0)},[yt,Ht.resolved,Ot,ke]),Bt=s.useCallback((we,Ke,P)=>{if(!J||P==="single-row"){const st=we.findIndex(nn=>nn.prefix===Ke.prefix),wt=we.map(nn=>lt[nn.widthKey]),It=Lo(we.length,wt);return{effectiveWidth:pr(we.length,wt)[st]??0,resolvedWidth:It[st]??0,maxWidth:gn(st,It)}}if(P==="two-row-top"){const st=we.filter(nn=>nn.prefix==="title1"),wt=st.findIndex(nn=>nn.prefix===Ke.prefix),{resolved:It,effective:on}=bi(st,lt);return{effectiveWidth:on[wt]??0,resolvedWidth:It[wt]??0,maxWidth:gn(wt,It)}}const ae=we.filter(st=>st.prefix==="title2"||st.prefix==="title3"),pe=ae.findIndex(st=>st.prefix===Ke.prefix),{resolved:Me,effective:qe}=bi(ae,lt);return{effectiveWidth:qe[pe]??0,resolvedWidth:Me[pe]??0,maxWidth:gn(pe,Me)}},[lt,J]),Lt=(we,Ke,P)=>{const ae=we.marginLeftKey?ke[we.marginLeftKey]??0:0,{effectiveWidth:pe,resolvedWidth:Me,maxWidth:qe}=P??Nt(we,Ke),st=Math.max(ae,vi),wt=o&&Ke==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":we.prefix,style:{width:G(pe),...ae>0?{marginLeft:G(ae)}:{}},children:[a.jsx("p",{className:we.className,style:we.style,children:we.text}),wt&&we.marginLeftKey?a.jsx("div",{"data-controls":we.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Me),style:{position:"absolute",top:0,left:G(-ae),width:G(st),height:"100%",pointerEvents:"auto"}}):null,wt?a.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(qe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:G(-Tn/2),width:G(Tn),height:"100%",pointerEvents:"auto"}}):null]},we.className)},O=(we="two-row")=>{const Ke=je.findIndex(pe=>pe.prefix==="title1"),P=Ke>=0?dt[Ke]:lt.title1Width,ae=we==="two-row"&&o;return a.jsx("div",{...ae?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(P)}:{},style:{width:G(_??0),flexShrink:0,alignSelf:"stretch",...ae?{pointerEvents:"auto"}:{}}})},Le=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:M,"aria-hidden":"true",children:" "}),_e=()=>a.jsx("span",{className:`${e}-entry-counter`,style:ce,"aria-live":"polite","aria-atomic":"true",children:My(ye,ue,x,t)}),Ge=()=>Tt?o&&ft?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[_e(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Ua(K)} + ${K}))`,width:Ua(K),height:"100%",pointerEvents:"auto",zIndex:3}})]}):_e():null,pt=()=>!Tt&&!ft?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:zt,children:[Ge(),ft?bt():null]}),Ft=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Tt||$t?Le():null,Vt?O("single-row"):null,Mt(ne),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),pt(),fn()]}),ct=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Tt||$t?Le():null,Vt?O("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:Se&&I?{minHeight:I}:void 0,children:[a.jsx("div",{ref:tt,className:jt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Pn(te||ne)}),a.jsxs("div",{ref:nt,className:jt,style:{position:Se?"absolute":"relative",inset:Se?0:void 0,width:"100%",...Se&&oe?{width:oe,maxWidth:"100%"}:void 0},children:[ut&&Se?a.jsx("div",{className:`${Zt} ${e}-titles-fade-out`,children:Pn(ut)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Se?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Pn(ne)})]})]}),pt(),fn()]}),bt=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:A.scalingValue(F??0,i),height:A.scalingValue(F??0,i),marginRight:se,"--close-icon-hover-color":g},children:[a.jsx("button",{ref:fe,type:"button",className:`${e}-close-icon-inner`,onClick:Xe,"aria-label":"Close",children:a.jsx(un,{url:k??"",fill:W,hoverFill:i&&!r?W:g,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:se,height:"100%",pointerEvents:"auto"}})]}),Dt=(we,Ke)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[Tt||$t?Le():null,Vt?O("two-row"):null,Ke!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ke},children:we}):a.jsxs(a.Fragment,{children:[we,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),pt()]}),Mt=we=>{if(!we)return null;const Ke=xi(e,we,M,re,q);return a.jsx(a.Fragment,{children:Ke.map(P=>Lt(P,"single-row",Bt(Ke,P,"single-row")))})},sn=we=>{if(!we)return null;const Ke=xi(e,we,M,re,q),P=Ke.find(ae=>ae.prefix==="title1");return P?Lt(P,"two-row-top",Bt(Ke,P,"two-row-top")):null},mn=(we,Ke=!1)=>{const P=we?xi(e,we,M,re,q):[],ae=P.filter(qe=>qe.prefix==="title2"||qe.prefix==="title3"),pe=o&&Ke;return ae.length>0||pe||(L??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[ae.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[ae.map(qe=>Lt(qe,"two-row-bottom",Bt(P,qe,"two-row-bottom"))),Ke&&o?a.jsxs(a.Fragment,{children:[jo(),Vo()]}):null]}):null,(L??0)>0||pe?a.jsx("div",{"data-controls":pe?"titleRowMarginBottom":void 0,"data-controls-axis":pe?"y":void 0,"data-controls-reverse":pe?"":void 0,className:pe?`${e}-control`:void 0,style:{height:rn,width:"100%",flexShrink:0,pointerEvents:pe?"auto":"none"}}):null]}):null},yn=(we,Ke=!1)=>a.jsxs(a.Fragment,{children:[Dt(sn(we)),mn(we,Ke)]}),Pn=we=>J?a.jsx("div",{className:`${e}-titles-row-two-row`,children:yn(we)}):we?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Mt(we)}):null,kn=()=>{const we=J?-1:je.findIndex(ae=>ae.prefix==="title1"),Ke=!J&&(o||(_??0)>0)?(()=>{const ae=_??0,pe=we>=0?dt[we]:lt.title1Width,Me=Math.max(ae,vi);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(pe),style:{position:"absolute",top:0,left:0,width:G(Me),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,P=je.flatMap((ae,pe)=>{if(!ae.marginLeftKey)return[];const Me=ke[ae.marginLeftKey]??0,qe=Lu(je,dt,ke,pe)+Ut(),st=Math.max(Me,vi);return a.jsx("div",{"data-controls":ae.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(dt[pe]),style:{position:"absolute",top:0,left:G(qe),width:G(st),height:"100%",pointerEvents:"auto"}},ae.marginLeftKey)});return Ke?[Ke,...P]:P},Ji=()=>je.map((we,Ke)=>{const P=gn(Ke,dt),pe=qt(Ke)-Tn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(P),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:G(pe),width:G(Tn),height:"100%",pointerEvents:"auto"}})},`${we.widthKey}-junction`)}),jo=()=>yt.flatMap((we,Ke)=>{if(!we.marginLeftKey)return[];const P=ke[we.marginLeftKey]??0,ae=Ot(Ke),pe=Math.max(P,vi),{resolvedWidth:Me}=Nt(we,"two-row-bottom");return a.jsx("div",{"data-controls":we.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Me),style:{position:"absolute",top:0,left:G(ae),width:G(pe),height:"100%",pointerEvents:"auto"}},we.marginLeftKey)}),Vo=()=>yt.map((we,Ke)=>{const{maxWidth:P}=Nt(we,"two-row-bottom"),pe=Gt(Ke)-Tn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(P),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:G(pe),width:G(Tn),height:"100%",pointerEvents:"auto"}})},`${we.widthKey}-junction`)}),fn=()=>!o||J?null:a.jsxs(a.Fragment,{children:[kn(),Ji()]}),vn=we=>{const Ke=!we.objectFit&&ni(y);return{className:`${e}-slide-image-cell${Ke?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:T,maxHeight:j,...Ke?{"--image-aspect-ratio":Ma(y)}:{}}}},ai=we=>we.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":we.objectFit}}:ni(y)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Xn=we=>{if(we.length===0)return null;const Ke=we.length>1,P=Ua(Z),ae=`calc(-0.5 * (${P} + ${Z}))`;if(we.length===1){const pe=we[0];return a.jsx("div",{...vn(pe),children:a.jsx("img",{...ai(pe),src:pe.url,alt:pe.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:Ke?{gap:Z}:void 0,children:we.map((pe,Me)=>a.jsxs("div",{...vn(pe),children:[a.jsx("img",{...ai(pe),src:pe.url,alt:pe.name??"",draggable:!1}),o&&Ke&&Me<we.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:ae,width:P,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${pe.url}-${Me}`))})},Go=!!(ne!=null&&ne.title2||ne!=null&&ne.title3||ut!=null&&ut.title2||ut!=null&&ut.title3||(L??0)>0||o),ki=()=>a.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[a.jsx("div",{ref:tt,className:jt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:yn(te||ne)}),a.jsxs("div",{ref:nt,className:`${e}-titles-row-two-row`,style:{...Se&&I?{minHeight:I}:void 0,...Se&&oe?{width:oe,maxWidth:"100%"}:void 0},children:[Dt(a.jsxs("div",{className:jt,style:{position:Se?"absolute":"relative",inset:Se?0:void 0,width:"100%"},children:[ut&&Se?a.jsx("div",{className:`${Ct} ${e}-titles-fade-out`,children:sn(ut)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Se?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:sn(ne)})]}),Se&&I?I:void 0),Go?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[ut&&Se?a.jsx("div",{className:`${Zt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:mn(ut)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Se?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${J?` ${e}-titles-layer-in-stacked`:""}`,children:mn(ne,!0)})]}):null]})]}),Qi=()=>{const we=Go;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...we?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:we?void 0:{flex:"0 0 auto",height:"auto"},children:yn(ne,!0)}),fn()]})};return a.jsxs("div",{ref:Ve,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ee||Xe()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ft?void 0:-1,style:{opacity:Pe?1:0,transition:"opacity 300ms ease",pointerEvents:Pe?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:m,...ze}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Ye,...Ie,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Re,onClick:we=>we.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":be&&ye.length>1?"true":"false",onPointerDown:be?ht:void 0,onPointerUp:be?Pt:void 0,onPointerCancel:be?kt:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[gt&&N?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:we=>{we.target===we.currentTarget&&De(me)},children:a.jsx("div",{className:`${e}-slide-area`,children:Xn(gt.images)})},`slide-out-${me}`):null,a.jsx("div",{className:`${e}-slide-layer-in${N?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:de?Xn(de.images):null})},`slide-in-${me}-${ue}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:xe,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:le,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...J?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${J?` ${e}-lightbox-content-area-stacked`:""}`,children:At&&a.jsx("div",{className:`${e}-text-bar-cell${J?` ${e}-text-bar-cell-stacked`:""}`,style:J?void 0:{flex:1,minWidth:0,width:"100%"},children:J?C==="fade"?ki():Qi():C==="fade"?ct():Ft()})})})]})]})]})};function gx(e){return`
15250
15250
  .${e}-wrapper {
15251
15251
  position: relative;
15252
15252
  width: 100%;
@@ -15768,7 +15768,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15768
15768
  pointer-events: auto;
15769
15769
  z-index: 10;
15770
15770
  }
15771
- `}const ux=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:d}=A.useScopedStyles(),c=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:x}=e,v=s.useRef(null),[m,h]=s.useState(!1),[y,b]=s.useState(0),C=s.useRef(!1),S=s.useRef(!1),w=s.useRef(!1),D=s.useMemo(()=>(t??[]).filter($=>To($).length>0),[t]),_=m&&D.length>0,z=!n,H=s.useCallback(()=>{z&&(w.current=!0,$y(S.current,c),S.current=!1)},[z,c]),L=($=0)=>{if(D.length===0||n&&!i&&!o)return;const E=ta(D,x),F=Math.max(0,Math.min($,E.length-1));if(b(F),z){const W=wu();Su(F+1,c,W),S.current=!W}h(!0)},V=s.useCallback(()=>{h(!1),w.current=!1},[]);return s.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),s.useEffect(()=>{if(!z||typeof window>"u")return;const $=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=$}},[z]),s.useEffect(()=>{if(!z||C.current)return;C.current=!0;const $=lc(c);if(!$)return;const E=cc($,ta(D,x).length);E<0||(b(E),h(!0))},[D,c,z,x]),s.useEffect(()=>{if(!z)return;const $=()=>{if(w.current){w.current=!1,h(!1);return}const E=lc(c);if(!E){h(!1);return}const F=cc(E,ta(D,x).length);if(F<0){h(!1);return}S.current=!1,b(F),h(!0)};return window.addEventListener("popstate",$),()=>window.removeEventListener("popstate",$)},[D,c,z,x]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:v,className:`${d}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:dx(d)}}),u?a.jsx("button",{type:"button",className:`${d}-cover ${ni(p)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>L(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...ni(p)?{"--image-aspect-ratio":Ma(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${d}-cover-image ${ni(p)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),_&&typeof document<"u"&&(()=>{const $=(r?document.getElementById(r):null)??document.body;return ri.createPortal(a.jsx(cx,{prefix:d,entries:D,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:y,enableUrlSync:z,journalItemId:c,onBeforeClose:H,onClose:V}),$)})()]})},px=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
15771
+ `}const hx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:d}=A.useScopedStyles(),c=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:x}=e,y=s.useRef(null),[m,h]=s.useState(!1),[v,b]=s.useState(0),C=s.useRef(!1),S=s.useRef(!1),w=s.useRef(!1),D=s.useMemo(()=>(t??[]).filter($=>To($).length>0),[t]),_=m&&D.length>0,z=!n,H=s.useCallback(()=>{z&&(w.current=!0,Iy(S.current,c),S.current=!1)},[z,c]),L=($=0)=>{if(D.length===0||n&&!i&&!o)return;const k=na(D,x),F=Math.max(0,Math.min($,k.length-1));if(b(F),z){const W=Cu();$u(F+1,c,W),S.current=!W}h(!0)},V=s.useCallback(()=>{h(!1),w.current=!1},[]);return s.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),s.useEffect(()=>{if(!z||typeof window>"u")return;const $=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=$}},[z]),s.useEffect(()=>{if(!z||C.current)return;C.current=!0;const $=cc(c);if(!$)return;const k=dc($,na(D,x).length);k<0||(b(k),h(!0))},[D,c,z,x]),s.useEffect(()=>{if(!z)return;const $=()=>{if(w.current){w.current=!1,h(!1);return}const k=cc(c);if(!k){h(!1);return}const F=dc(k,na(D,x).length);if(F<0){h(!1);return}S.current=!1,b(F),h(!0)};return window.addEventListener("popstate",$),()=>window.removeEventListener("popstate",$)},[D,c,z,x]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:y,className:`${d}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:gx(d)}}),u?a.jsx("button",{type:"button",className:`${d}-cover ${ni(p)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>L(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...ni(p)?{"--image-aspect-ratio":Ma(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${d}-cover-image ${ni(p)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),_&&typeof document<"u"&&(()=>{const $=(r?document.getElementById(r):null)??document.body;return ri.createPortal(a.jsx(mx,{prefix:d,entries:D,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:v,enableUrlSync:z,journalItemId:c,onBeforeClose:H,onClose:V}),$)})()]})},fx=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
15772
15772
  import { createPortal } from 'react-dom';
15773
15773
  import { CommonComponentProps } from '../props';
15774
15774
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -16533,7 +16533,7 @@ export type LightboxJournalSettings = {
16533
16533
  closeIconColor: string;
16534
16534
  closeIconHoverColor: string;
16535
16535
  };
16536
- `,mx="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Hi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function gx(e){const t={};return t[mt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSettings")]={...Hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSize")]={...Hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[mt(e,"lineHeight")]={...Hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[mt(e,"letterSpacing")]={...Hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[mt(e,"wordSpacing")]={...Hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[mt(e,"textAlign")]={...Hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[mt(e,"textAppearance")]={...Hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const hx=Ci.reduce((e,t)=>({...e,...gx(t)}),{}),fx=Ci.reduce((e,t)=>({...e,[mt(t,"fontFamily")]:"Goudy Bookletter 1911",[mt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[mt(t,"letterSpacing")]:0,[mt(t,"wordSpacing")]:0,[mt(t,"textAlign")]:"left",[mt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function os(e){return Ci.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[mt(n,"fontSize")]=i),o!==void 0&&(t[mt(n,"lineHeight")]=o),t},{})}const yx=Ey(),vx={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"}},...hx,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:mx,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...fx,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.04,...os({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...os({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...os({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098,countFontSize:.008,countLineHeight:.0098})}},layout:["__componentName__","maxWidth","maxHeight","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","countCloseGap","contentMarginTop","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["type"]},{type:"row",title:"Image",items:["maxWidth","maxHeight"]},{type:"row",title:"Text",items:["textTransition"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover Image",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[yx]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"}]}]}},xx={element:ux,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:vx,sourceCode:px,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Ci.map(e=>({path:`${mt(e,"fontFamily")}`}))]},fontRelations:{...Ci.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${mt(t,"fontFamily")}`}),{})}},bx={sizeType:"custom",value:700,min:400,max:700};function pa(e,t){return{widthPx:e,heightPx:e*t}}function As(e,t,n,i,o,r){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,r/2),i-r/2)}}function _c(e,t,n,i){const{heightPx:o}=pa(n,i);return As(e/2,t/2,e,t,n,o)}function Bu(e,t,n){for(const i of n){const{heightPx:o}=pa(i.widthPx,i.aspectRatio),r=i.widthPx/2,l=o/2;if(e>=i.x-r&&e<=i.x+r&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function Sx(e,t,n,i,o,r,l,d){if(o==="system")return"none";const c=i.getBoundingClientRect(),u=document.elementFromPoint(c.left+e,c.top+t);return u&&u.closest("a")?"none":Bu(e,t,n)||r==="area"?l??"none":d??"none"}function Wc(e,t,n){var d;const{sizeType:i,value:o,min:r,max:l}=t;return i==="custom"?o:i==="as is"?((d=n.get(e))==null?void 0:d.naturalWidth)??o:Math.round(Math.random()*(l-r)+r)}function wx(e){return`
16536
+ `,yx="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Hi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function vx(e){const t={};return t[mt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSettings")]={...Hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSize")]={...Hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[mt(e,"lineHeight")]={...Hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[mt(e,"letterSpacing")]={...Hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[mt(e,"wordSpacing")]={...Hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[mt(e,"textAlign")]={...Hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[mt(e,"textAppearance")]={...Hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const xx=Ci.reduce((e,t)=>({...e,...vx(t)}),{}),bx=Ci.reduce((e,t)=>({...e,[mt(t,"fontFamily")]:"Goudy Bookletter 1911",[mt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[mt(t,"letterSpacing")]:0,[mt(t,"wordSpacing")]:0,[mt(t,"textAlign")]:"left",[mt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function rs(e){return Ci.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[mt(n,"fontSize")]=i),o!==void 0&&(t[mt(n,"lineHeight")]=o),t},{})}const Sx=Fy(),wx={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"}},...xx,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:yx,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...bx,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.04,...rs({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...rs({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...rs({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098,countFontSize:.008,countLineHeight:.0098})}},layout:["__componentName__","maxWidth","maxHeight","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","countCloseGap","contentMarginTop","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["type"]},{type:"row",title:"Image",items:["maxWidth","maxHeight"]},{type:"row",title:"Text",items:["textTransition"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover Image",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Sx]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"}]}]}},$x={element:hx,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:wx,sourceCode:fx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Ci.map(e=>({path:`${mt(e,"fontFamily")}`}))]},fontRelations:{...Ci.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${mt(t,"fontFamily")}`}),{})}},Cx={sizeType:"custom",value:700,min:400,max:700};function ma(e,t){return{widthPx:e,heightPx:e*t}}function Fs(e,t,n,i,o,r){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,r/2),i-r/2)}}function Wc(e,t,n,i){const{heightPx:o}=ma(n,i);return Fs(e/2,t/2,e,t,n,o)}function Vu(e,t,n){for(const i of n){const{heightPx:o}=ma(i.widthPx,i.aspectRatio),r=i.widthPx/2,l=o/2;if(e>=i.x-r&&e<=i.x+r&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function Tx(e,t,n,i,o,r,l,d){if(o==="system")return"none";const c=i.getBoundingClientRect(),u=document.elementFromPoint(c.left+e,c.top+t);return u&&u.closest("a")?"none":Vu(e,t,n)||r==="area"?l??"none":d??"none"}function Hc(e,t,n){var d;const{sizeType:i,value:o,min:r,max:l}=t;return i==="custom"?o:i==="as is"?((d=n.get(e))==null?void 0:d.naturalWidth)??o:Math.round(Math.random()*(l-r)+r)}function Lx(e){return`
16537
16537
  .${e}-root {
16538
16538
  position: absolute;
16539
16539
  top: 0;
@@ -16568,7 +16568,7 @@ export type LightboxJournalSettings = {
16568
16568
  width: 32px;
16569
16569
  height: 32px;
16570
16570
  }
16571
- `}function $x(e){return new Promise(t=>{const n=new Image;n.onload=()=>{t({aspectRatio:n.naturalHeight/n.naturalWidth,naturalWidth:n.naturalWidth})},n.onerror=()=>{t({aspectRatio:1,naturalWidth:700})},n.src=e})}async function Cx(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await $x(i)]));return new Map(n)}function Tx({settings:e,content:t=[],isEditor:n}){const{prefix:i}=A.useScopedStyles(),[o,r]=s.useState(null),[l,d]=s.useState([]),[c,u]=s.useState(0),p=s.useRef(0),[x,v]=s.useState({x:0,y:0}),[m,h]=s.useState("none"),y=s.useRef({x:0,y:0}),[b,C]=s.useState(!1),[S,w]=s.useState(!1),D=s.useRef(new Map),{imageSize:_=bx,cursor:z="system",target:H="area",position:L="random",visible:V="all",defaultCursor:$=null,hoverCursor:E=null}=e,F=t.filter(T=>{var j;return!!((j=T==null?void 0:T.image)!=null&&j.url)}),W=s.useMemo(()=>wx(i),[i]),g=s.useCallback((T,j,Y=l)=>{if(!o)return;const le=o.getBoundingClientRect(),se=T-le.left,k=j-le.top;v({x:se,y:k}),h(Sx(se,k,Y,o,z,H,E,$))},[o,l,z,H,E,$]);s.useEffect(()=>{const T=[...F.map(Y=>Y.image.url),$,E].filter(Y=>!!Y);if(T.length===0){D.current=new Map,w(!0);return}let j=!1;return w(!1),Cx(T).then(Y=>{j||(D.current=Y,w(!0))}),()=>{j=!0}},[t,$,E]),s.useEffect(()=>{if(!o)return;const T=Y=>{Y.stopPropagation(),y.current={x:Y.clientX,y:Y.clientY},g(Y.clientX,Y.clientY)},j=()=>{b&&g(y.current.x,y.current.y)};return o.addEventListener("mousemove",T),window.addEventListener("scroll",j,!0),()=>{o.removeEventListener("mousemove",T),window.removeEventListener("scroll",j,!0)}},[o,b,g]),s.useEffect(()=>{!o||!b||g(y.current.x,y.current.y)},[l,o,b,g]),s.useEffect(()=>{b||h("none")},[b]);const M=(T,j,Y,le={})=>{var J,be;if(!((J=T==null?void 0:T.image)!=null&&J.url))return null;const se=((be=D.current.get(T.image.url))==null?void 0:be.aspectRatio)??1,k=Wc(T.image.url,_,D.current),{heightPx:re}=pa(k,se);let q=0,ce=0;return L==="same"?{x:q,y:ce}=_c(j,Y,k,se):(q=le.x??Math.random()*j,ce=le.y??Math.random()*Y,{x:q,y:ce}=As(q,ce,j,Y,k,re)),{id:p.current++,url:T.image.url,link:T.link,name:T.image.name,x:q,y:ce,xRatio:q/j,yRatio:ce/Y,aspectRatio:se,widthPx:k}},R=()=>{if(!o)return;const T=o.getBoundingClientRect(),j=T.width,Y=T.height;j===0||Y===0||d(le=>le.length===0?le:le.map(se=>{const k=_.sizeType==="random"?se.widthPx:Wc(se.url,_,D.current),{heightPx:re}=pa(k,se.aspectRatio);if(L==="same"){const{x:J,y:be}=_c(j,Y,k,se.aspectRatio);return{...se,x:J,y:be,widthPx:k}}const{x:q,y:ce}=As(se.xRatio*j,se.yRatio*Y,j,Y,k,re);return{...se,x:q,y:ce,widthPx:k}}))};s.useEffect(()=>{if(!o||F.length===0||!S)return;const T=o.getBoundingClientRect(),j=T.width,Y=T.height,le=M(F[0],j,Y);le&&(d([le]),u(F.length>1?1:0))},[_,L,o,t,S]),s.useEffect(()=>{if(!o)return;R();const T=new ResizeObserver(R);return T.observe(o),window.addEventListener("resize",R),()=>{T.disconnect(),window.removeEventListener("resize",R)}},[o,L,_,l.length]),s.useEffect(()=>{V==="last One"&&d(T=>T.length>0?[T[T.length-1]]:[])},[V]);const G=T=>{if(!o||F.length===0||!S)return;const j=o.getBoundingClientRect(),Y=T.clientX-j.left,le=T.clientY-j.top;if(H==="image"&&!Bu(Y,le,l))return;let se=0,k=0;L==="on Click"?(se=Y,k=le):L==="same"?(se=j.width/2,k=j.height/2):(se=Math.random()*j.width,k=Math.random()*j.height);const re=F[c%F.length],q=M(re,j.width,j.height,{x:se,y:k});if(!q)return;const ce=V==="all"?[...l,q]:[q];d(ce),u(J=>(J+1)%F.length),g(T.clientX,T.clientY,ce)},Z=z==="custom"&&m!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:W}}),a.jsxs("div",{ref:r,onClick:G,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),className:`${i}-root`,style:{cursor:Z?"none":"default"},children:[l.map(T=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${T.y}px`,left:`${T.x}px`,width:`${T.widthPx}px`,cursor:Z?"none":"default"},children:H==="area"&&T.link?a.jsx("a",{href:T.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:a.jsx("img",{src:T.url,alt:T.name,className:`${i}-image`})}):a.jsx("img",{src:T.url,alt:T.name,className:`${i}-image`})},T.id)),b&&Z&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${x.x}px`,top:`${x.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const Lx=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16571
+ `}function Ix(e){return new Promise(t=>{const n=new Image;n.onload=()=>{t({aspectRatio:n.naturalHeight/n.naturalWidth,naturalWidth:n.naturalWidth})},n.onerror=()=>{t({aspectRatio:1,naturalWidth:700})},n.src=e})}async function Rx(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await Ix(i)]));return new Map(n)}function Px({settings:e,content:t=[],isEditor:n}){const{prefix:i}=A.useScopedStyles(),[o,r]=s.useState(null),[l,d]=s.useState([]),[c,u]=s.useState(0),p=s.useRef(0),[x,y]=s.useState({x:0,y:0}),[m,h]=s.useState("none"),v=s.useRef({x:0,y:0}),[b,C]=s.useState(!1),[S,w]=s.useState(!1),D=s.useRef(new Map),{imageSize:_=Cx,cursor:z="system",target:H="area",position:L="random",visible:V="all",defaultCursor:$=null,hoverCursor:k=null}=e,F=t.filter(T=>{var j;return!!((j=T==null?void 0:T.image)!=null&&j.url)}),W=s.useMemo(()=>Lx(i),[i]),g=s.useCallback((T,j,K=l)=>{if(!o)return;const le=o.getBoundingClientRect(),se=T-le.left,M=j-le.top;y({x:se,y:M}),h(Tx(se,M,K,o,z,H,k,$))},[o,l,z,H,k,$]);s.useEffect(()=>{const T=[...F.map(K=>K.image.url),$,k].filter(K=>!!K);if(T.length===0){D.current=new Map,w(!0);return}let j=!1;return w(!1),Rx(T).then(K=>{j||(D.current=K,w(!0))}),()=>{j=!0}},[t,$,k]),s.useEffect(()=>{if(!o)return;const T=K=>{K.stopPropagation(),v.current={x:K.clientX,y:K.clientY},g(K.clientX,K.clientY)},j=()=>{b&&g(v.current.x,v.current.y)};return o.addEventListener("mousemove",T),window.addEventListener("scroll",j,!0),()=>{o.removeEventListener("mousemove",T),window.removeEventListener("scroll",j,!0)}},[o,b,g]),s.useEffect(()=>{!o||!b||g(v.current.x,v.current.y)},[l,o,b,g]),s.useEffect(()=>{b||h("none")},[b]);const E=(T,j,K,le={})=>{var J,be;if(!((J=T==null?void 0:T.image)!=null&&J.url))return null;const se=((be=D.current.get(T.image.url))==null?void 0:be.aspectRatio)??1,M=Hc(T.image.url,_,D.current),{heightPx:re}=ma(M,se);let q=0,ce=0;return L==="same"?{x:q,y:ce}=Wc(j,K,M,se):(q=le.x??Math.random()*j,ce=le.y??Math.random()*K,{x:q,y:ce}=Fs(q,ce,j,K,M,re)),{id:p.current++,url:T.image.url,link:T.link,name:T.image.name,x:q,y:ce,xRatio:q/j,yRatio:ce/K,aspectRatio:se,widthPx:M}},R=()=>{if(!o)return;const T=o.getBoundingClientRect(),j=T.width,K=T.height;j===0||K===0||d(le=>le.length===0?le:le.map(se=>{const M=_.sizeType==="random"?se.widthPx:Hc(se.url,_,D.current),{heightPx:re}=ma(M,se.aspectRatio);if(L==="same"){const{x:J,y:be}=Wc(j,K,M,se.aspectRatio);return{...se,x:J,y:be,widthPx:M}}const{x:q,y:ce}=Fs(se.xRatio*j,se.yRatio*K,j,K,M,re);return{...se,x:q,y:ce,widthPx:M}}))};s.useEffect(()=>{if(!o||F.length===0||!S)return;const T=o.getBoundingClientRect(),j=T.width,K=T.height,le=E(F[0],j,K);le&&(d([le]),u(F.length>1?1:0))},[_,L,o,t,S]),s.useEffect(()=>{if(!o)return;R();const T=new ResizeObserver(R);return T.observe(o),window.addEventListener("resize",R),()=>{T.disconnect(),window.removeEventListener("resize",R)}},[o,L,_,l.length]),s.useEffect(()=>{V==="last One"&&d(T=>T.length>0?[T[T.length-1]]:[])},[V]);const G=T=>{if(!o||F.length===0||!S)return;const j=o.getBoundingClientRect(),K=T.clientX-j.left,le=T.clientY-j.top;if(H==="image"&&!Vu(K,le,l))return;let se=0,M=0;L==="on Click"?(se=K,M=le):L==="same"?(se=j.width/2,M=j.height/2):(se=Math.random()*j.width,M=Math.random()*j.height);const re=F[c%F.length],q=E(re,j.width,j.height,{x:se,y:M});if(!q)return;const ce=V==="all"?[...l,q]:[q];d(ce),u(J=>(J+1)%F.length),g(T.clientX,T.clientY,ce)},Z=z==="custom"&&m!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:W}}),a.jsxs("div",{ref:r,onClick:G,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),className:`${i}-root`,style:{cursor:Z?"none":"default"},children:[l.map(T=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${T.y}px`,left:`${T.x}px`,width:`${T.widthPx}px`,cursor:Z?"none":"default"},children:H==="area"&&T.link?a.jsx("a",{href:T.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:a.jsx("img",{src:T.url,alt:T.name,className:`${i}-image`})}):a.jsx("img",{src:T.url,alt:T.name,className:`${i}-image`})},T.id)),b&&Z&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${x.x}px`,top:`${x.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const kx=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16572
16572
  import { CommonComponentProps } from '../props';
16573
16573
  import { useScopedStyles } from '../utils/index';
16574
16574
 
@@ -17098,7 +17098,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17098
17098
  </>
17099
17099
  );
17100
17100
  }
17101
- `,Ix={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"Slider-1.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"Slider-2.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"Slider-3.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"Slider-4.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"Slider-5.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"Slider-6.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"Slider-7.png"},link:""}]},settings:{sizing:"manual",properties:{imageSize:{type:"object",scope:"layout",title:"Img Size",display:{type:"toggle-cycle-numeric-input",enum:["custom","as is","random"],inputs:{custom:"single","as is":"none",random:"range"},defaultValue:700,defaultMin:400,defaultMax:700},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},cursor:{type:"string",scope:"common",title:"Cursor",display:{type:"toggle-cycle",enum:["system","custom"]}},target:{type:"string",scope:"common",title:"Target",display:{type:"toggle-cycle",enum:["area","image"]}},position:{type:"string",scope:"common",title:"Position",display:{type:"toggle-cycle",enum:["random","same","on Click"]}},visible:{type:"string",scope:"common",title:"Visible",display:{type:"toggle-cycle",enum:["all","last One"]}},defaultCursor:{type:["string","null"],scope:"common",title:"Default",display:{type:"settings-image-input",visible:!1}},hoverCursor:{type:["string","null"],scope:"common",title:"Hover",display:{type:"settings-image-input",visible:!1}}},defaults:{imageSize:{sizeType:"custom",value:700,min:400,max:700},cursor:"system",target:"area",position:"random",visible:"all",defaultCursor:null,hoverCursor:null},layoutDefaults:{m:{imageSize:{sizeType:"custom",value:500,min:400,max:700}},t:{imageSize:{sizeType:"custom",value:600,min:400,max:700}},d:{imageSize:{sizeType:"custom",value:700,min:400,max:700}}},displayRules:[{if:{name:"cursor",value:"custom"},then:{name:"properties.defaultCursor.display.visible",value:!0}},{if:{name:"cursor",value:"custom"},then:{name:"properties.hoverCursor.display.visible",value:!0}}],layout:["__componentName__","imageSize","cursor","target","position","visible","defaultCursor","hoverCursor"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["imageSize"]},{type:"row",title:"",items:["cursor","target"]},{type:"row",title:"",items:["position","visible"]},{type:"row",title:"Custom Cursor",items:["defaultCursor","hoverCursor"]}]}]},Rx={element:Tx,id:"click-gallerie",name:"Click",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},schema:Ix,sourceCode:Lx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},Px=100,Ex=70,pi="cubic-bezier(0.86, 0, 0.07, 1)";function Mx(e){return`
17101
+ `,Ex={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"Slider-1.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"Slider-2.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"Slider-3.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"Slider-4.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"Slider-5.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"Slider-6.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"Slider-7.png"},link:""}]},settings:{sizing:"manual",properties:{imageSize:{type:"object",scope:"layout",title:"Img Size",display:{type:"toggle-cycle-numeric-input",enum:["custom","as is","random"],inputs:{custom:"single","as is":"none",random:"range"},defaultValue:700,defaultMin:400,defaultMax:700},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},cursor:{type:"string",scope:"common",title:"Cursor",display:{type:"toggle-cycle",enum:["system","custom"]}},target:{type:"string",scope:"common",title:"Target",display:{type:"toggle-cycle",enum:["area","image"]}},position:{type:"string",scope:"common",title:"Position",display:{type:"toggle-cycle",enum:["random","same","on Click"]}},visible:{type:"string",scope:"common",title:"Visible",display:{type:"toggle-cycle",enum:["all","last One"]}},defaultCursor:{type:["string","null"],scope:"common",title:"Default",display:{type:"settings-image-input",visible:!1}},hoverCursor:{type:["string","null"],scope:"common",title:"Hover",display:{type:"settings-image-input",visible:!1}}},defaults:{imageSize:{sizeType:"custom",value:700,min:400,max:700},cursor:"system",target:"area",position:"random",visible:"all",defaultCursor:null,hoverCursor:null},layoutDefaults:{m:{imageSize:{sizeType:"custom",value:500,min:400,max:700}},t:{imageSize:{sizeType:"custom",value:600,min:400,max:700}},d:{imageSize:{sizeType:"custom",value:700,min:400,max:700}}},displayRules:[{if:{name:"cursor",value:"custom"},then:{name:"properties.defaultCursor.display.visible",value:!0}},{if:{name:"cursor",value:"custom"},then:{name:"properties.hoverCursor.display.visible",value:!0}}],layout:["__componentName__","imageSize","cursor","target","position","visible","defaultCursor","hoverCursor"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["imageSize"]},{type:"row",title:"",items:["cursor","target"]},{type:"row",title:"",items:["position","visible"]},{type:"row",title:"Custom Cursor",items:["defaultCursor","hoverCursor"]}]}]},Mx={element:Px,id:"click-gallerie",name:"Click",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},schema:Ex,sourceCode:kx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},Ax=100,Fx=70,pi="cubic-bezier(0.86, 0, 0.07, 1)";function Nx(e){return`
17102
17102
  .${e}-wrapper {
17103
17103
  position: relative;
17104
17104
  width: 100%;
@@ -17208,7 +17208,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17208
17208
  display: block;
17209
17209
  pointer-events: none;
17210
17210
  }
17211
- `}function kx(e){return e==="blur"?Ex:e==="greyscale"?Px:0}function Uo(e,t=1,n=1){const i=kx(e)*Math.max(0,Math.min(1,t));if(e==="greyscale")return`grayscale(${i}%)`;if(e==="blur"){const o=i/4;return o<=0?"none":`blur(${o/Math.max(n,1)}px)`}return"none"}function Hc(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Ax(e,t){return t<=1?0:(e-1+t)%t}function Fx(e,t=1){return!e||e.height===0?t:e.width/e.height}function Nx(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const r=e*i/100,l=t*o/100;let d=r,c=d/n;return c>l&&(c=l,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function Oc(e,t,n){if(e<=0||t<=0)return 1;const i=e*n.widthPercent/100,o=t*n.heightPercent/100;return i<=0||o<=0?1:Math.max(e/i,t/o)}function ju(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function Dc(e,t,n){return{...ju(e),[`--${n}-stage-scale`]:t}}function _x(e,t){[...new Set(e.filter(Boolean))].forEach(i=>{const o=new Image;o.onload=()=>{o.naturalWidth>0&&o.naturalHeight>0&&t(i,{width:o.naturalWidth,height:o.naturalHeight})},o.src=i})}function Wx({settings:e,content:t,isEditor:n,isPreviewMode:i}){var $e,f,X,N,U,me,K;const{prefix:o}=A.useScopedStyles(),r=s.useMemo(()=>Mx(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:p="greyscale"}=e,x=t??[],v=Hc(x.length),[m,h]=s.useState(v.activeIndex),[y,b]=s.useState(v.backgroundIndex),[C,S]=s.useState(!1),[w,D]=s.useState(!1),[_,z]=s.useState(null),[H,L]=s.useState(null),[V,$]=s.useState(0),[E,F]=s.useState(1),[W,g]=s.useState("none"),[M,R]=s.useState("next"),[G,Z]=s.useState({}),[T,j]=s.useState({width:0,height:0}),Y=s.useRef(null),le=s.useRef(null),se=!n||!!i,k=l??60,re=Math.max(10,Math.min(100,d??k)),q=Math.max(10,Math.min(100,c??k)),ce=Math.max(100,u),J=Uo(p),be=s.useCallback(I=>{const ie=Fx(I?G[I]:void 0);return Nx(T.width,T.height,ie,re,q)},[T.height,T.width,G,q,re]);s.useEffect(()=>{const I=le.current;if(!I)return;const ie=new ResizeObserver(([oe])=>{const{width:B,height:te}=oe.contentRect;j({width:B,height:te})});return ie.observe(I),()=>ie.disconnect()},[]),s.useEffect(()=>{const I=(t??[]).map(ie=>{var oe;return(oe=ie.image)==null?void 0:oe.url}).filter(ie=>!!ie);_x(I,(ie,oe)=>{Z(B=>{var te,Ae;return((te=B[ie])==null?void 0:te.width)===oe.width&&((Ae=B[ie])==null?void 0:Ae.height)===oe.height?B:{...B,[ie]:oe}})})},[t]),s.useEffect(()=>{const{backgroundIndex:I,activeIndex:ie}=Hc(x.length);h(ie),b(I),S(!1),D(!1),z(null),L(null),$(0),F(1),g("none"),R("next")},[x.length,t]),s.useEffect(()=>()=>{Y.current&&clearTimeout(Y.current)},[]);const We=s.useCallback(I=>{var he,Q,Ze,Fe;if(!se||C||x.length<=1)return;const ie=I==="next"?(m+1)%x.length:(m-1+x.length)%x.length,oe=be((Q=(he=x[m])==null?void 0:he.image)==null?void 0:Q.url),B=be((Fe=(Ze=x[ie])==null?void 0:Ze.image)==null?void 0:Fe.url),te=Oc(T.width,T.height,oe),Ae=Oc(T.width,T.height,B);Y.current&&clearTimeout(Y.current),R(I),D(!0),S(!0),I==="next"?(z(m),L(ie),$(0),F(1),g(Uo(p,0,1))):(b(Ax(ie,x.length)),z(ie),L(m),$(1),F(Ae),g(Uo(p,1,Ae))),requestAnimationFrame(()=>{D(!1),requestAnimationFrame(()=>{I==="next"?($(1),F(te),g(Uo(p,1,te))):($(0),F(1),g(Uo(p,0,1)))})}),Y.current=setTimeout(()=>{I==="next"&&b(m),h(ie),z(null),L(null),S(!1)},ce)},[m,p,T.height,T.width,be,C,se,x,ce]),ye=x[m],ue=y!==null?x[y]:null,ee=_!==null?x[_]:null,de=H!==null?x[H]:null,ne=x.length<=1?0:(m-1+x.length)%x.length,Pe=x.length<=1?0:(m+1)%x.length,Te=be(($e=ye==null?void 0:ye.image)==null?void 0:$e.url),Oe=be((f=ee==null?void 0:ee.image)==null?void 0:f.url),ve=be((X=de==null?void 0:de.image)==null?void 0:X.url),Se={[`--${o}-transition-ms`]:`${ce}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:le,className:St(`${o}-wrapper`,w&&`${o}-snap`,n&&!i&&`${o}-editor`),style:Se,"aria-label":"Zoom gallery",children:[((N=ue==null?void 0:ue.image)==null?void 0:N.url)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:ue.image.url,alt:"",style:{filter:J}})}),C&&((U=ee==null?void 0:ee.image)==null?void 0:U.url)&&a.jsx("div",{className:St(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${M}`),style:Dc(Oe,E,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:ee.image.url,alt:"",style:{filter:W}})}),C&&((me=de==null?void 0:de.image)==null?void 0:me.url)&&a.jsx("div",{className:St(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${M}`),style:Dc(ve,V,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:de.image.url,alt:""})}),!C&&((K=ye==null?void 0:ye.image)==null?void 0:K.url)&&a.jsx("div",{className:St(`${o}-stage`,`${o}-foreground`),style:ju(Te),children:a.jsx("img",{className:`${o}-image`,src:ye.image.url,alt:ye.image.name??""})}),se&&x.length>1&&!C&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:St(`${o}-nav`,`${o}-nav-prev`),onClick:()=>We("prev"),"aria-label":`Show previous image (${ne+1} of ${x.length})`}),a.jsx("button",{type:"button",className:St(`${o}-nav`,`${o}-nav-next`),onClick:()=>We("next"),"aria-label":`Show next image (${Pe+1} of ${x.length})`})]})]})]})}const Hx=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17211
+ `}function _x(e){return e==="blur"?Fx:e==="greyscale"?Ax:0}function Uo(e,t=1,n=1){const i=_x(e)*Math.max(0,Math.min(1,t));if(e==="greyscale")return`grayscale(${i}%)`;if(e==="blur"){const o=i/4;return o<=0?"none":`blur(${o/Math.max(n,1)}px)`}return"none"}function Oc(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Wx(e,t){return t<=1?0:(e-1+t)%t}function Hx(e,t=1){return!e||e.height===0?t:e.width/e.height}function Ox(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const r=e*i/100,l=t*o/100;let d=r,c=d/n;return c>l&&(c=l,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function Dc(e,t,n){if(e<=0||t<=0)return 1;const i=e*n.widthPercent/100,o=t*n.heightPercent/100;return i<=0||o<=0?1:Math.max(e/i,t/o)}function Gu(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function zc(e,t,n){return{...Gu(e),[`--${n}-stage-scale`]:t}}function Dx(e,t){[...new Set(e.filter(Boolean))].forEach(i=>{const o=new Image;o.onload=()=>{o.naturalWidth>0&&o.naturalHeight>0&&t(i,{width:o.naturalWidth,height:o.naturalHeight})},o.src=i})}function zx({settings:e,content:t,isEditor:n,isPreviewMode:i}){var $e,f,X,N,U,me,Y;const{prefix:o}=A.useScopedStyles(),r=s.useMemo(()=>Nx(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:p="greyscale"}=e,x=t??[],y=Oc(x.length),[m,h]=s.useState(y.activeIndex),[v,b]=s.useState(y.backgroundIndex),[C,S]=s.useState(!1),[w,D]=s.useState(!1),[_,z]=s.useState(null),[H,L]=s.useState(null),[V,$]=s.useState(0),[k,F]=s.useState(1),[W,g]=s.useState("none"),[E,R]=s.useState("next"),[G,Z]=s.useState({}),[T,j]=s.useState({width:0,height:0}),K=s.useRef(null),le=s.useRef(null),se=!n||!!i,M=l??60,re=Math.max(10,Math.min(100,d??M)),q=Math.max(10,Math.min(100,c??M)),ce=Math.max(100,u),J=Uo(p),be=s.useCallback(I=>{const ie=Hx(I?G[I]:void 0);return Ox(T.width,T.height,ie,re,q)},[T.height,T.width,G,q,re]);s.useEffect(()=>{const I=le.current;if(!I)return;const ie=new ResizeObserver(([oe])=>{const{width:B,height:te}=oe.contentRect;j({width:B,height:te})});return ie.observe(I),()=>ie.disconnect()},[]),s.useEffect(()=>{const I=(t??[]).map(ie=>{var oe;return(oe=ie.image)==null?void 0:oe.url}).filter(ie=>!!ie);Dx(I,(ie,oe)=>{Z(B=>{var te,Ae;return((te=B[ie])==null?void 0:te.width)===oe.width&&((Ae=B[ie])==null?void 0:Ae.height)===oe.height?B:{...B,[ie]:oe}})})},[t]),s.useEffect(()=>{const{backgroundIndex:I,activeIndex:ie}=Oc(x.length);h(ie),b(I),S(!1),D(!1),z(null),L(null),$(0),F(1),g("none"),R("next")},[x.length,t]),s.useEffect(()=>()=>{K.current&&clearTimeout(K.current)},[]);const We=s.useCallback(I=>{var he,Q,Ze,Fe;if(!se||C||x.length<=1)return;const ie=I==="next"?(m+1)%x.length:(m-1+x.length)%x.length,oe=be((Q=(he=x[m])==null?void 0:he.image)==null?void 0:Q.url),B=be((Fe=(Ze=x[ie])==null?void 0:Ze.image)==null?void 0:Fe.url),te=Dc(T.width,T.height,oe),Ae=Dc(T.width,T.height,B);K.current&&clearTimeout(K.current),R(I),D(!0),S(!0),I==="next"?(z(m),L(ie),$(0),F(1),g(Uo(p,0,1))):(b(Wx(ie,x.length)),z(ie),L(m),$(1),F(Ae),g(Uo(p,1,Ae))),requestAnimationFrame(()=>{D(!1),requestAnimationFrame(()=>{I==="next"?($(1),F(te),g(Uo(p,1,te))):($(0),F(1),g(Uo(p,0,1)))})}),K.current=setTimeout(()=>{I==="next"&&b(m),h(ie),z(null),L(null),S(!1)},ce)},[m,p,T.height,T.width,be,C,se,x,ce]),ye=x[m],ue=v!==null?x[v]:null,ee=_!==null?x[_]:null,de=H!==null?x[H]:null,ne=x.length<=1?0:(m-1+x.length)%x.length,Pe=x.length<=1?0:(m+1)%x.length,Te=be(($e=ye==null?void 0:ye.image)==null?void 0:$e.url),Oe=be((f=ee==null?void 0:ee.image)==null?void 0:f.url),ve=be((X=de==null?void 0:de.image)==null?void 0:X.url),Se={[`--${o}-transition-ms`]:`${ce}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:le,className:St(`${o}-wrapper`,w&&`${o}-snap`,n&&!i&&`${o}-editor`),style:Se,"aria-label":"Zoom gallery",children:[((N=ue==null?void 0:ue.image)==null?void 0:N.url)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:ue.image.url,alt:"",style:{filter:J}})}),C&&((U=ee==null?void 0:ee.image)==null?void 0:U.url)&&a.jsx("div",{className:St(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${E}`),style:zc(Oe,k,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:ee.image.url,alt:"",style:{filter:W}})}),C&&((me=de==null?void 0:de.image)==null?void 0:me.url)&&a.jsx("div",{className:St(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${E}`),style:zc(ve,V,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:de.image.url,alt:""})}),!C&&((Y=ye==null?void 0:ye.image)==null?void 0:Y.url)&&a.jsx("div",{className:St(`${o}-stage`,`${o}-foreground`),style:Gu(Te),children:a.jsx("img",{className:`${o}-image`,src:ye.image.url,alt:ye.image.name??""})}),se&&x.length>1&&!C&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:St(`${o}-nav`,`${o}-nav-prev`),onClick:()=>We("prev"),"aria-label":`Show previous image (${ne+1} of ${x.length})`}),a.jsx("button",{type:"button",className:St(`${o}-nav`,`${o}-nav-next`),onClick:()=>We("next"),"aria-label":`Show next image (${Pe+1} of ${x.length})`})]})]})]})}const Bx=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17212
17212
  import cn from 'classnames';
17213
17213
  import { CommonComponentProps } from '../props';
17214
17214
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -17727,7 +17727,7 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
17727
17727
  </>
17728
17728
  );
17729
17729
  }
17730
- `,Ox={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""}}]}},Dx={element:Wx,id:"scale",name:"Scale",category:"galleries",version:1,defaultSize:{d:{width:920,height:540},m:{width:"100%",height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Scale.mp4"},schema:Ox,sourceCode:Hx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},zx={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},Bx=["hover","active"],rs={left:"flex-start",center:"center",right:"flex-end"};function jx(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 Vx(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Gx(e){const t=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-box-shadow-color, transparent)`,n=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-inner-box-shadow-color, transparent)`,i=`${t}, ${n}`,o=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,r=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-hover-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,l=`${o}, ${r}`,d=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,c=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-active-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,u=`${d}, ${c}`,p=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,x=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,v=`.${e}-button:hover, ${x}`,m=h=>`.${e}-hover-effect-${h}:hover, .${e}-hover-effect-${h}:focus-visible, a:focus-visible .${e}-hover-effect-${h}`;return`
17730
+ `,jx={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""}}]}},Vx={element:zx,id:"scale",name:"Scale",category:"galleries",version:1,defaultSize:{d:{width:920,height:540},m:{width:"100%",height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Scale.mp4"},schema:jx,sourceCode:Bx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Gx={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},Xx=["hover","active"],as={left:"flex-start",center:"center",right:"flex-end"};function qx(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 Ux(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 Yx(e){const t=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-box-shadow-color, transparent)`,n=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-inner-box-shadow-color, transparent)`,i=`${t}, ${n}`,o=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,r=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-hover-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,l=`${o}, ${r}`,d=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,c=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-active-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,u=`${d}, ${c}`,p=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,x=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,y=`.${e}-button:hover, ${x}`,m=h=>`.${e}-hover-effect-${h}:hover, .${e}-hover-effect-${h}:focus-visible, a:focus-visible .${e}-hover-effect-${h}`;return`
17731
17731
  .${e}-root {
17732
17732
  line-height: 0;
17733
17733
  }
@@ -17890,7 +17890,7 @@ a:focus-visible .${e}-hover-effect-content-roll .${e}-content-roll-layer-hover,
17890
17890
  transform: translateY(-50%);
17891
17891
  opacity: 1;
17892
17892
  }
17893
- ${v} {
17893
+ ${y} {
17894
17894
  background-color: var(--${e}-hover-background-color, var(--${e}-background-color));
17895
17895
  color: var(--${e}-hover-text-color, var(--${e}-text-color));
17896
17896
  border-color: var(--${e}-hover-border-color, var(--${e}-border-color));
@@ -17969,7 +17969,7 @@ a:active .${e}-button .${e}-icon-image,
17969
17969
  height: calc(1em * var(--${e}-icon-scale, 1));
17970
17970
  width: calc(1em * var(--${e}-icon-scale, 1));
17971
17971
  }
17972
- `}function as(e,t,n="",i,o){const r=t();return a.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[a.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:r}),a.jsxs("span",{className:`${e}-content-roll-viewport`,children:[a.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),a.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function zc(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(un,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return a.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const d=A.scalingValue(o,r);return a.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:l})}return a.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function Xx({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=A.useScopedStyles(),l=s.useMemo(()=>Gx(r),[r]),{type:d="a",label:c="Button",icon:u,alignment:p="center",alignA:x,order:v="text-icon",gap:m=0,iconSize:h=0,iconWidthC:y=0,dimensions:b=!1,padding:C={top:0,right:0,bottom:0,left:0},cornerRadius:S=0,boxShadow:w={top:0,left:0,right:0,bottom:0},boxShadowColor:D="rgba(0, 0, 0, 0)",innerBoxShadow:_={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:z="rgba(0, 0, 0, 0)",stroke:H=0,blur:L=0,backgroundColor:V="#000000",textColor:$="#ffffff",borderColor:E="#ffffff",iconColor:F="#ffffff",hoverEffect:W="none",fontFamily:g,fontSettings:M,fontSize:R,lineHeight:G,letterSpacing:Z=0,wordSpacing:T=0,textAppearance:j,stateOverrides:Y,minWidth:le=0,minHeight:se=0,width:k=0,height:re=0}=e,q=A.buildColorVars(r,{backgroundColor:V,textColor:$,borderColor:E,iconColor:F,boxShadowColor:D,innerBoxShadowColor:z},zx,Bx,Y),ce=i&&i!=="default"?`${r}-state-${i}`:"",J=t&&!n?`${r}-editing`:"",be=W!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${W}`:"",We=W==="reveal"||W==="swipe",ye=W==="content-roll",ue=W==="reveal"&&(!t||n),ee=b===!0,ne=d==="a"?x??p:p,Pe=d==="c",Te=d!=="b",Oe={fontSettings:{fontFamily:g,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:R??.01,lineHeight:G,letterSpacing:Z,wordSpacing:T,textAppearance:j,color:$},Se={...Te?dn(Qt(Oe,t)):{},[`--${r}-box-shadow-x`]:A.scalingValue(w.left,t),[`--${r}-box-shadow-y`]:A.scalingValue(w.top,t),[`--${r}-box-shadow-blur`]:A.scalingValue(w.right,t),[`--${r}-box-shadow-spread`]:A.scalingValue(w.bottom,t),[`--${r}-inner-box-shadow-x`]:A.scalingValue(_.left,t),[`--${r}-inner-box-shadow-y`]:A.scalingValue(_.top,t),[`--${r}-inner-box-shadow-blur`]:A.scalingValue(_.right,t),[`--${r}-inner-box-shadow-spread`]:A.scalingValue(_.bottom,t),[`--${r}-backdrop-blur`]:L>0?`blur(${A.scalingValue(L,t)})`:void 0,paddingTop:A.scalingValue(C.top,t),paddingRight:A.scalingValue(C.right,t),paddingBottom:A.scalingValue(C.bottom,t),paddingLeft:A.scalingValue(C.left,t),borderRadius:A.scalingValue(S,t),borderWidth:A.scalingValue(H,t),...Pe?{}:{justifyContent:rs[ne],textAlign:ne},...Pe&&!ye?{gap:A.scalingValue(m,t)}:{},...ee?{width:A.scalingValue(k,t),height:A.scalingValue(re,t)}:{minWidth:A.scalingValue(le,t),minHeight:A.scalingValue(se,t),...Pe?{width:"100%"}:{}}};let $e;const f={display:"inline-flex",alignItems:"center",justifyContent:Pe?rs[ne]:rs[d==="a"?ne:"center"],gap:Pe?A.scalingValue(m,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:ne}:{}};if(d==="b"){const U=()=>zc(r,u,h>0?"fixed":"fill",100,h,t);$e=ye?as(r,U,`${r}-icon-roll`,void 0,f):U()}else if(d==="c"){const U=()=>{const me=a.jsx("span",{className:`${r}-text`,style:{textAlign:ne},children:c}),K=zc(r,u,y>0?"fixed":"fill",100,y,t);return v==="icon-text"?a.jsxs(a.Fragment,{children:[K,me]}):a.jsxs(a.Fragment,{children:[me,K]})};$e=ye?as(r,U,`${r}-icon-text-roll`,void 0,f):U()}else $e=ye?as(r,()=>c,`${r}-label-roll`,void 0,f):We?a.jsx("span",{className:`${r}-button-inner`,children:c}):c;const X=ue?U=>jx(U,r):void 0,N=ue?U=>Vx(U,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:q,children:a.jsx("div",{className:`${r}-wrapper ${ce} ${J}`.trim(),children:a.jsx("div",{className:`${r}-button ${be}`.trim(),style:Se,onMouseEnter:X,onMouseLeave:N,role:"button",tabIndex:o||t&&!n?void 0:0,children:$e})})})]})}const qx=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
17972
+ `}function ss(e,t,n="",i,o){const r=t();return a.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[a.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:r}),a.jsxs("span",{className:`${e}-content-roll-viewport`,children:[a.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),a.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function Bc(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(un,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return a.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const d=A.scalingValue(o,r);return a.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:l})}return a.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function Kx({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=A.useScopedStyles(),l=s.useMemo(()=>Yx(r),[r]),{type:d="a",label:c="Button",icon:u,alignment:p="center",alignA:x,order:y="text-icon",gap:m=0,iconSize:h=0,iconWidthC:v=0,dimensions:b=!1,padding:C={top:0,right:0,bottom:0,left:0},cornerRadius:S=0,boxShadow:w={top:0,left:0,right:0,bottom:0},boxShadowColor:D="rgba(0, 0, 0, 0)",innerBoxShadow:_={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:z="rgba(0, 0, 0, 0)",stroke:H=0,blur:L=0,backgroundColor:V="#000000",textColor:$="#ffffff",borderColor:k="#ffffff",iconColor:F="#ffffff",hoverEffect:W="none",fontFamily:g,fontSettings:E,fontSize:R,lineHeight:G,letterSpacing:Z=0,wordSpacing:T=0,textAppearance:j,stateOverrides:K,minWidth:le=0,minHeight:se=0,width:M=0,height:re=0}=e,q=A.buildColorVars(r,{backgroundColor:V,textColor:$,borderColor:k,iconColor:F,boxShadowColor:D,innerBoxShadowColor:z},Gx,Xx,K),ce=i&&i!=="default"?`${r}-state-${i}`:"",J=t&&!n?`${r}-editing`:"",be=W!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${W}`:"",We=W==="reveal"||W==="swipe",ye=W==="content-roll",ue=W==="reveal"&&(!t||n),ee=b===!0,ne=d==="a"?x??p:p,Pe=d==="c",Te=d!=="b",Oe={fontSettings:{fontFamily:g,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:R??.01,lineHeight:G,letterSpacing:Z,wordSpacing:T,textAppearance:j,color:$},Se={...Te?dn(Qt(Oe,t)):{},[`--${r}-box-shadow-x`]:A.scalingValue(w.left,t),[`--${r}-box-shadow-y`]:A.scalingValue(w.top,t),[`--${r}-box-shadow-blur`]:A.scalingValue(w.right,t),[`--${r}-box-shadow-spread`]:A.scalingValue(w.bottom,t),[`--${r}-inner-box-shadow-x`]:A.scalingValue(_.left,t),[`--${r}-inner-box-shadow-y`]:A.scalingValue(_.top,t),[`--${r}-inner-box-shadow-blur`]:A.scalingValue(_.right,t),[`--${r}-inner-box-shadow-spread`]:A.scalingValue(_.bottom,t),[`--${r}-backdrop-blur`]:L>0?`blur(${A.scalingValue(L,t)})`:void 0,paddingTop:A.scalingValue(C.top,t),paddingRight:A.scalingValue(C.right,t),paddingBottom:A.scalingValue(C.bottom,t),paddingLeft:A.scalingValue(C.left,t),borderRadius:A.scalingValue(S,t),borderWidth:A.scalingValue(H,t),...Pe?{}:{justifyContent:as[ne],textAlign:ne},...Pe&&!ye?{gap:A.scalingValue(m,t)}:{},...ee?{width:A.scalingValue(M,t),height:A.scalingValue(re,t)}:{minWidth:A.scalingValue(le,t),minHeight:A.scalingValue(se,t),...Pe?{width:"100%"}:{}}};let $e;const f={display:"inline-flex",alignItems:"center",justifyContent:Pe?as[ne]:as[d==="a"?ne:"center"],gap:Pe?A.scalingValue(m,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:ne}:{}};if(d==="b"){const U=()=>Bc(r,u,h>0?"fixed":"fill",100,h,t);$e=ye?ss(r,U,`${r}-icon-roll`,void 0,f):U()}else if(d==="c"){const U=()=>{const me=a.jsx("span",{className:`${r}-text`,style:{textAlign:ne},children:c}),Y=Bc(r,u,v>0?"fixed":"fill",100,v,t);return y==="icon-text"?a.jsxs(a.Fragment,{children:[Y,me]}):a.jsxs(a.Fragment,{children:[me,Y]})};$e=ye?ss(r,U,`${r}-icon-text-roll`,void 0,f):U()}else $e=ye?ss(r,()=>c,`${r}-label-roll`,void 0,f):We?a.jsx("span",{className:`${r}-button-inner`,children:c}):c;const X=ue?U=>qx(U,r):void 0,N=ue?U=>Ux(U,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:q,children:a.jsx("div",{className:`${r}-wrapper ${ce} ${J}`.trim(),children:a.jsx("div",{className:`${r}-button ${be}`.trim(),style:Se,onMouseEnter:X,onMouseLeave:N,role:"button",tabIndex:o||t&&!n?void 0:0,children:$e})})})]})}const Zx=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
17973
17973
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
17974
17974
  import { CommonComponentProps } from '../props';
17975
17975
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
@@ -18601,7 +18601,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18601
18601
  </>
18602
18602
  );
18603
18603
  }
18604
- `,Ux={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Kx=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],Yx={type:"object",version:1,settings:{sizing:"auto",hasLinkParameter:!0,properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},label:{type:"string",scope:"common",title:"Label",display:{type:"label-input"}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"settings-image-input",visible:!1}},alignment:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"]}},alignA:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"],visible:!1}},order:{type:"string",scope:"layout",title:"Order",display:{type:"toggle-cycle",enum:["text-icon","icon-text"],visible:!1}},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconSize:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconWidthC:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},dimensions:{type:"boolean",scope:"layout",title:"Dimensions",display:{type:"toggle",enum:["auto","fixed"]}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}},boxShadow:{type:"object",scope:"layout",title:"Shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},boxShadowColor:{type:"string",scope:"common",title:"Shadow Default",titleByState:{default:"Shadow Default",hover:"Shadow Hover",active:"Shadow Active"},display:{type:"palette-color-picker"}},innerBoxShadow:{type:"object",scope:"layout",title:"Inner shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},innerBoxShadowColor:{type:"string",scope:"common",title:"Inner Shadow Default",titleByState:{default:"Inner Shadow Default",hover:"Inner Shadow Hover",active:"Inner Shadow Active"},display:{type:"palette-color-picker"}},stroke:{type:"number",scope:"layout",title:"Stroke Width",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"number",scope:"layout",title:"Blur",display:{type:"numeric-input"},min:0,max:100},backgroundColor:{type:"string",scope:"common",title:"BG Default",titleByState:{default:"BG Default",hover:"BG Hover",active:"BG Active"},display:{type:"palette-color-picker"}},textColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover",active:"Text Active"},display:{type:"palette-color-picker"}},borderColor:{type:"string",scope:"common",title:"Border Default",titleByState:{default:"Border Default",hover:"Border Hover",active:"Border Active"},display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover",active:"Icon Active"},display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},hoverEffect:{type:"string",scope:"layout",title:"Hover effect",display:{type:"toggle-cycle",enum:["none","scale-up","lift","reveal","swipe","content-roll"]}},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},fontSettings:{...Ux.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},fontSize:{type:"number",scope:"layout",title:"Font size",display:{type:"font-size"}},lineHeight:{type:"number",scope:"layout",title:"Line height",display:{type:"line-height-input"}},letterSpacing:{type:"number",scope:"layout",title:"Letter spacing",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",scope:"layout",title:"Word spacing",display:{type:"word-spacing-input"}},textAppearance:{type:"object",scope:"layout",title:"Text appearance",display:{type:"text-appearance"}},minWidth:{type:"number",scope:"layout",title:"Min width",display:{type:"numeric-input"},min:0,max:9999},minHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input",visible:!1},min:0,max:9999},height:{type:"number",scope:"layout",title:"Height",display:{type:"numeric-input",visible:!1},min:0,max:9999}},defaults:{label:"Button",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KY78A0YVT403B042HVWWTHBC.svg",boxShadowColor:"#000000",innerBoxShadowColor:"#000000",backgroundColor:"#2E12F0",textColor:"#ffffff",borderColor:"#ffffff",iconColor:"#ffffff",fontFamily:"Arial",fontSettings:{fontWeight:400,fontStyle:"normal"},blur:0,stateOverrides:{hover:{backgroundColor:"#3642EF"},active:{backgroundColor:"#475FFF"}}},layoutDefaults:{m:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/375,right:20/375,bottom:10/375,left:20/375},minWidth:0/375,minHeight:0/375,width:100/375,height:100/375,cornerRadius:20/375,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/375,gap:10/375,iconWidthC:16/375,fontSize:16/375,lineHeight:16/375,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},t:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/768,right:20/768,bottom:10/768,left:20/768},minWidth:0/768,minHeight:0/768,width:100/768,height:100/768,cornerRadius:20/768,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/768,gap:10/768,iconWidthC:16/768,fontSize:16/768,lineHeight:16/768,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},d:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/1440,right:20/1440,bottom:10/1440,left:20/1440},minWidth:0/1440,minHeight:0/1440,width:100/1440,height:100/1440,cornerRadius:20/1440,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/1440,gap:10/1440,iconWidthC:16/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}},layout:["__componentName__","type","label","icon","alignment","order","gap","iconSize","iconWidthC","hoverEffect",{type:"row",title:"",items:["dimensions","padding"]},"cornerRadius","blur","boxShadow","boxShadowColor","innerBoxShadow","innerBoxShadowColor",{type:"row",title:"",items:["stroke","borderColor"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]}],displayRules:[{if:{name:"type",value:"a"},then:{name:"properties.icon.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignment.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignA.display.visible",value:!0}},{if:{name:"type",value:"a"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"b"},then:{name:"properties.label.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontFamily.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSettings.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSize.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.lineHeight.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.letterSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.wordSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.textAppearance.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.iconSize.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.order.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.iconWidthC.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.gap.display.visible",value:!0}},{if:{name:"stroke",value:0},then:{name:"properties.borderColor.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minWidth.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minHeight.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.width.display.visible",value:!0}},{if:{name:"dimensions",value:!0},then:{name:"properties.height.display.visible",value:!0}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["label","icon","iconSize","alignA"]},{type:"row",title:"",items:["alignment","order"]},{type:"row",title:"",items:["gap","iconWidthC"]},{type:"row",title:"",items:["dimensions","padding"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]},{type:"row",title:"",items:["hoverEffect","cornerRadius"]},{type:"row",title:"",items:["blur"]},{type:"row",title:"",items:["boxShadow"]},{type:"row",title:"",items:["innerBoxShadow"]},{type:"row",title:"",items:["stroke"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily","fontSettings",{type:"row",title:"",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAppearance"]}],paletteBookmark:{items:[...Kx],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],hover:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],active:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"]}},states:["default","hover","active"]},Zx={element:Xx,id:"simple-button",name:"Simple Button",category:"ui-elements",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/button-preview.png"},schema:Yx,sourceCode:qx,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function Jx(e){return`
18604
+ `,Jx={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Qx=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],eb={type:"object",version:1,settings:{sizing:"auto",hasLinkParameter:!0,properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},label:{type:"string",scope:"common",title:"Label",display:{type:"label-input"}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"settings-image-input",visible:!1}},alignment:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"]}},alignA:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"],visible:!1}},order:{type:"string",scope:"layout",title:"Order",display:{type:"toggle-cycle",enum:["text-icon","icon-text"],visible:!1}},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconSize:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconWidthC:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},dimensions:{type:"boolean",scope:"layout",title:"Dimensions",display:{type:"toggle",enum:["auto","fixed"]}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}},boxShadow:{type:"object",scope:"layout",title:"Shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},boxShadowColor:{type:"string",scope:"common",title:"Shadow Default",titleByState:{default:"Shadow Default",hover:"Shadow Hover",active:"Shadow Active"},display:{type:"palette-color-picker"}},innerBoxShadow:{type:"object",scope:"layout",title:"Inner shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},innerBoxShadowColor:{type:"string",scope:"common",title:"Inner Shadow Default",titleByState:{default:"Inner Shadow Default",hover:"Inner Shadow Hover",active:"Inner Shadow Active"},display:{type:"palette-color-picker"}},stroke:{type:"number",scope:"layout",title:"Stroke Width",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"number",scope:"layout",title:"Blur",display:{type:"numeric-input"},min:0,max:100},backgroundColor:{type:"string",scope:"common",title:"BG Default",titleByState:{default:"BG Default",hover:"BG Hover",active:"BG Active"},display:{type:"palette-color-picker"}},textColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover",active:"Text Active"},display:{type:"palette-color-picker"}},borderColor:{type:"string",scope:"common",title:"Border Default",titleByState:{default:"Border Default",hover:"Border Hover",active:"Border Active"},display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover",active:"Icon Active"},display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},hoverEffect:{type:"string",scope:"layout",title:"Hover effect",display:{type:"toggle-cycle",enum:["none","scale-up","lift","reveal","swipe","content-roll"]}},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},fontSettings:{...Jx.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},fontSize:{type:"number",scope:"layout",title:"Font size",display:{type:"font-size"}},lineHeight:{type:"number",scope:"layout",title:"Line height",display:{type:"line-height-input"}},letterSpacing:{type:"number",scope:"layout",title:"Letter spacing",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",scope:"layout",title:"Word spacing",display:{type:"word-spacing-input"}},textAppearance:{type:"object",scope:"layout",title:"Text appearance",display:{type:"text-appearance"}},minWidth:{type:"number",scope:"layout",title:"Min width",display:{type:"numeric-input"},min:0,max:9999},minHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input",visible:!1},min:0,max:9999},height:{type:"number",scope:"layout",title:"Height",display:{type:"numeric-input",visible:!1},min:0,max:9999}},defaults:{label:"Button",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KY78A0YVT403B042HVWWTHBC.svg",boxShadowColor:"#000000",innerBoxShadowColor:"#000000",backgroundColor:"#2E12F0",textColor:"#ffffff",borderColor:"#ffffff",iconColor:"#ffffff",fontFamily:"Arial",fontSettings:{fontWeight:400,fontStyle:"normal"},blur:0,stateOverrides:{hover:{backgroundColor:"#3642EF"},active:{backgroundColor:"#475FFF"}}},layoutDefaults:{m:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/375,right:20/375,bottom:10/375,left:20/375},minWidth:0/375,minHeight:0/375,width:100/375,height:100/375,cornerRadius:20/375,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/375,gap:10/375,iconWidthC:16/375,fontSize:16/375,lineHeight:16/375,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},t:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/768,right:20/768,bottom:10/768,left:20/768},minWidth:0/768,minHeight:0/768,width:100/768,height:100/768,cornerRadius:20/768,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/768,gap:10/768,iconWidthC:16/768,fontSize:16/768,lineHeight:16/768,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},d:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/1440,right:20/1440,bottom:10/1440,left:20/1440},minWidth:0/1440,minHeight:0/1440,width:100/1440,height:100/1440,cornerRadius:20/1440,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/1440,gap:10/1440,iconWidthC:16/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}},layout:["__componentName__","type","label","icon","alignment","order","gap","iconSize","iconWidthC","hoverEffect",{type:"row",title:"",items:["dimensions","padding"]},"cornerRadius","blur","boxShadow","boxShadowColor","innerBoxShadow","innerBoxShadowColor",{type:"row",title:"",items:["stroke","borderColor"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]}],displayRules:[{if:{name:"type",value:"a"},then:{name:"properties.icon.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignment.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignA.display.visible",value:!0}},{if:{name:"type",value:"a"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"b"},then:{name:"properties.label.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontFamily.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSettings.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSize.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.lineHeight.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.letterSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.wordSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.textAppearance.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.iconSize.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.order.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.iconWidthC.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.gap.display.visible",value:!0}},{if:{name:"stroke",value:0},then:{name:"properties.borderColor.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minWidth.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minHeight.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.width.display.visible",value:!0}},{if:{name:"dimensions",value:!0},then:{name:"properties.height.display.visible",value:!0}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["label","icon","iconSize","alignA"]},{type:"row",title:"",items:["alignment","order"]},{type:"row",title:"",items:["gap","iconWidthC"]},{type:"row",title:"",items:["dimensions","padding"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]},{type:"row",title:"",items:["hoverEffect","cornerRadius"]},{type:"row",title:"",items:["blur"]},{type:"row",title:"",items:["boxShadow"]},{type:"row",title:"",items:["innerBoxShadow"]},{type:"row",title:"",items:["stroke"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily","fontSettings",{type:"row",title:"",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAppearance"]}],paletteBookmark:{items:[...Qx],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],hover:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],active:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"]}},states:["default","hover","active"]},tb={element:Kx,id:"simple-button",name:"Simple Button",category:"ui-elements",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/button-preview.png"},schema:eb,sourceCode:Zx,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function nb(e){return`
18605
18605
  .${e}-titles-row {
18606
18606
  position: relative;
18607
18607
  flex: 0 1 auto;
@@ -18799,7 +18799,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18799
18799
  pointer-events: auto;
18800
18800
  flex-shrink: 0;
18801
18801
  }
18802
- `}const Wn=500,Ko=650,Sn="cubic-bezier(0.22, 1, 0.36, 1)",Qx=72,eb=50,tb=1e4,nb=650,ib=500;function ob(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Vu(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=ca(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function rb(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Vu(i,n):null}function ab(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.url&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function Qo(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function Bc(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Qo(e,i,n)}const sb=.03;function Gu(e){return e.width*sb}const ss={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Dr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function jc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function lb(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Fs(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,d=o/r;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const c=r*l;return{width:c,height:r,left:i.left+(o-c)/2,top:i.top}}function cb(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Fs(e,t.width,t.height)}function db(e,t){if(ka(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function ub(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.url)||t.has(o.url)||(t.add(o.url),n.push(o))}return n}function pb({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>ka(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Ao(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:d}=n,c=Gu(n);return t==="left"?{left:l+c-i,top:r,width:i,height:o}:{left:l+d-c,top:r,width:i,height:o}}function ma(e,t,n){const i=Ao(e,t,n);return{...i,left:2*i.left-e.left}}function mb(e,t,n){const{left:i,width:o}=n,r=Gu(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function Xu(e,t,n,i){const o=Ao(e,"left",i),r=Ao(e,"right",i),l=ma(e,"left",i),d=ma(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function gb(e,t,n,i){const{start:o,end:r}=Xu(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function hb(e,t,n){const i=Ao(e,t,n),o=ma(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function ka(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function fb({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const d=s.useRef(null);return s.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:c=>c.stopPropagation(),style:o},e)})}function zr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return ka(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function yb({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:x,sourceRect:v,resolveCloseSourceRect:m,onClose:h,onPrev:y,onNext:b}){const C=s.useRef(null),S=s.useRef(null),w=s.useRef(null),D=s.useRef(new Map),[_,z]=s.useState(0),H=s.useRef(null),L=s.useRef(0),V=s.useRef(0),$=s.useRef("none"),E=s.useRef(!1),F=s.useRef(!1),W=s.useRef(!1),g=s.useRef(null),M=s.useRef(null),R=s.useRef(null),G=s.useRef(()=>{}),Z=s.useRef(null),T=s.useRef(null),j=s.useRef(null),Y=s.useRef(!1),[le,se]=s.useState(null),[k,re]=s.useState(ss),[q,ce]=s.useState(0),[J,be]=s.useState("opening"),[We,ye]=s.useState(0),[ue,ee]=s.useState(0),[de,ne]=s.useState(!1),[Pe,Te]=s.useState(null),[Oe,ve]=s.useState(null),[Se,$e]=s.useState(null),[f,X]=s.useState(!1),[N,U]=s.useState(null),[me,K]=s.useState(!1),I=s.useRef(!1),[ie,oe]=s.useState(!1),[B,te]=s.useState(!1),Ae=s.useRef(n),he=s.useRef(void 0),Q=t[n],Ze=Q?ka(Q):!1,Fe=ue!==0||de,et=!l&&(!r||!!d),Ue=c&&!l,nt=u.length>1,tt=s.useCallback((O,Le)=>t.length<=1?null:t[(O+Le+t.length)%t.length]??null,[t]),Ve=nt?Qo(u,p,-1):tt(n,-1),fe=nt?Qo(u,p,1):tt(n,1),He=Pe===-1&&Fe?nt&&Oe!==null?Qo(u,Oe,-1):Se!==null?tt(Se,-1):null:null,Be=Pe===1&&Fe?nt&&Oe!==null?Qo(u,Oe,1):Se!==null?tt(Se,1):null:null,Je=He&&He.url!==(Ve==null?void 0:Ve.url)?He:null,Ce=Be&&Be.url!==(fe==null?void 0:fe.url)?Be:null,De=Ve&&Ue?(()=>{const O=nt?Bc(u,p,-1):t.length>2?tt((n-1+t.length)%t.length,-1):null;return O&&O.url!==Ve.url?O:null})():null,Xe=fe&&Ue?(()=>{const O=nt?Bc(u,p,1):t.length>2?tt((n+1)%t.length,1):null;return O&&O.url!==fe.url?O:null})():null,ge=Je??De,Me=Ce??Xe,ze=s.useCallback((O,Le,_e)=>{if(!O||!Le||!_e)return;const Ge=D.current,pt=Ge.get(O);(pt==null?void 0:pt.width)===Le&&(pt==null?void 0:pt.height)===_e||(Ge.set(O,{width:Le,height:_e}),z(Ft=>Ft+1))},[]),Re=s.useCallback(O=>{if(!(O!=null&&O.url))return null;const Le=D.current.get(O.url);return cb(S.current,Le)},[_,q]),xe=s.useCallback(()=>{if(!Q)return;const O=Re(Q);if(O){se(O);return}const Le=S.current;Le&&se(jc(Le))},[Q,Re]),Ie=s.useCallback(O=>{if(nt){const Le=u.length;ve((p+O+Le)%Le),$e(null);return}t.length>1&&($e((n+O+t.length)%t.length),ve(null))},[nt,u.length,p,t.length,n]),Ke=s.useCallback(O=>{W.current=O,ne(O)},[]),Ne=s.useCallback(()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null)},[]),it=s.useCallback(()=>{Ne(),g.current=window.setTimeout(()=>{Ne(),Ke(!1)},Ko+32)},[Ne,Ke]),ot=s.useCallback(()=>{const O=C.current;if(!O){re({left:0,top:0,width:typeof window<"u"?window.innerWidth:ss.width,height:typeof window<"u"?window.innerHeight:ss.height});return}const Le=O.getBoundingClientRect();re({left:Le.left,top:Le.top,width:Le.width,height:Le.height})},[]),rt=s.useCallback((O,Le)=>{if(Fe){if(ie&&!de)return`translate(${ue}px, 0px)`;if(de&&Pe!==null){const _e=Re(O);if(!_e)return;const{x:Ge,y:pt}=gb(_e,Le,Pe,k);return`translate(${Ge}px, ${pt}px)`}if(de)return"translate(0px, 0px)"}},[Fe,ie,de,ue,Pe,k,Re]),ht=s.useCallback(()=>{const O=M.current;M.current=null,Ne(),Ke(!1),Te(null),ve(null),$e(null),ee(0),oe(!1),E.current=!1,V.current=0,$.current="none",O===-1?y():O===1&&b()},[Ne,Ke,y,b]),Pt=s.useCallback(()=>{Ne(),g.current=window.setTimeout(()=>{M.current!==null&&ht()},Ko+32)},[Ne,ht]),Et=s.useCallback(()=>{Ne(),M.current=null,Ke(!1),Te(null),ve(null),$e(null),ee(0),oe(!1),E.current=!1,V.current=0,$.current="none"},[Ne,Ke]),ut=s.useCallback(O=>{if(!(!Ue||!le)){if(W.current){if(M.current===O){R.current=O,ht();return}Et()}Ne(),Ie(O),M.current=O,Te(O),Ke(!0),Pt()}},[Ue,le,ht,Et,Ne,Ie,Ke,Pt]);G.current=ut;const gt=s.useCallback(()=>{Z.current=null,Y.current=!1,T.current!==null&&(window.clearInterval(T.current),T.current=null),j.current!==null&&(window.clearTimeout(j.current),j.current=null)},[]),$t=s.useCallback(O=>{T.current!==null&&window.clearInterval(T.current);const Le=Y.current?ib:nb;T.current=window.setInterval(()=>{G.current(O)},Le)},[]),Tt=s.useCallback(O=>{Z.current!==O&&(gt(),Z.current=O,Y.current=!1,G.current(O),$t(O),j.current=window.setTimeout(()=>{j.current=null,Z.current===O&&(Y.current=!0,$t(O))},tb))},[gt,$t]),ft=s.useCallback(()=>{const O=S.current;if(!O)return;const Le=Q==null?void 0:Q.url,_e=Le?D.current.get(Le):void 0;if(_e!=null&&_e.width&&(_e!=null&&_e.height)){se(Fs(O,_e.width,_e.height));return}const Ge=w.current;if(Ge&&Le&&(Ge.src===Le||Ge.currentSrc===Le)){const{width:Ft,height:ct}=lb(Ge);if(Ft&&ct){ze(Le,Ft,ct),se(Fs(O,Ft,ct));return}}const pt=jc(O);!pt.width||!pt.height||se(pt)},[Q==null?void 0:Q.url,ze]),At=s.useCallback(O=>{if(w.current=O,!!O){if(O instanceof HTMLVideoElement){O.readyState>=1&&O.videoWidth>0&&ft();return}O.complete&&O.naturalWidth>0&&ft()}},[ft]),zt=s.useCallback(()=>{ot(),ft(),ce(O=>O+1)},[ot,ft]);s.useEffect(()=>{zt();const O=S.current,Le=C.current,_e=new ResizeObserver(()=>zt());return O&&_e.observe(O),Le&&_e.observe(Le),window.addEventListener("resize",zt),()=>{_e.disconnect(),window.removeEventListener("resize",zt)}},[zt,n,x]),s.useLayoutEffect(()=>{if(!Q)return;const O=w.current;if(O){if(O instanceof HTMLImageElement&&O.complete&&O.naturalWidth>0){ft();return}O instanceof HTMLVideoElement&&O.readyState>=1&&O.videoWidth>0&&ft()}},[Q==null?void 0:Q.url,n,ft]),s.useEffect(()=>{xe()},[xe,_]),s.useEffect(()=>{const O=new Set,Le=[],_e=Ge=>{!(Ge!=null&&Ge.url)||O.has(Ge.url)||(O.add(Ge.url),Le.push(Ge))};t.forEach(_e),u.forEach(Ge=>Ge.items.forEach(_e)),Le.forEach(Ge=>{D.current.has(Ge.url)||db(Ge,ze)})},[t,u,ze]),s.useEffect(()=>{if(J!=="opening"||!le)return;if(!v){be("open");return}X(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{X(!0),be("open")})});return()=>cancelAnimationFrame(O)},[J,le,v]),s.useEffect(()=>{if(J!=="closing")return;const O=setTimeout(()=>h(),Wn);return()=>clearTimeout(O)},[J,h]),s.useEffect(()=>()=>{Ne()},[Ne]),s.useLayoutEffect(()=>{Ae.current===n&&he.current===(Q==null?void 0:Q.url)||(Ne(),M.current=null,Te(null),ve(null),$e(null),ye(0),ee(0),Ke(!1),te(!1),oe(!1),L.current=0,V.current=0,$.current="none",E.current=!1,H.current=null,F.current=!1,w.current=null,xe(),Ae.current=n,he.current=Q==null?void 0:Q.url)},[n,Q==null?void 0:Q.url,Ke,Ne,xe]),s.useLayoutEffect(()=>{const O=R.current;O!==null&&(R.current=null,requestAnimationFrame(()=>{G.current(O)}))},[n,p,Q==null?void 0:Q.url]),s.useLayoutEffect(()=>{if(J==="opening"){I.current=!1,K(!1);return}if(J!=="open"||I.current)return;if(!Ve&&!fe){I.current=!0;return}K(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{K(!0),I.current=!0})});return()=>cancelAnimationFrame(O)},[J,Ve==null?void 0:Ve.url,fe==null?void 0:fe.url]),s.useEffect(()=>{if(J!=="open")return;const O=()=>{const ct=bt=>{bt.stopPropagation(),bt.preventDefault(),document.removeEventListener("click",ct,!0)};document.addEventListener("click",ct,!0)},Le=ct=>{const bt=ct<0?1:-1;Ne(),Ie(bt),M.current=bt,Te(bt),Ke(!0),Pt()},_e=ct=>{if(Math.abs(ct)>eb&&Ue){Le(ct);return}M.current=null,Te(null),ve(null),$e(null),Ke(!0),ee(0),it()},Ge=ct=>{if(ct.touches.length!==1||W.current)return;const bt=ct.touches[0];F.current=!0,H.current={x:bt.clientX,y:bt.clientY},$.current="none",V.current=0,E.current=!1},pt=ct=>{if(!H.current||ct.touches.length!==1||W.current)return;const bt=ct.touches[0],Dt=bt.clientX-H.current.x,kt=bt.clientY-H.current.y;if($.current==="none"){if(Math.abs(Dt)<10&&Math.abs(kt)<10)return;if(Math.abs(Dt)>Math.abs(kt)){if(!Ue)return;$.current="horizontal"}else if(kt>0){if(!et)return;$.current="vertical"}else return}if($.current==="horizontal"){E.current=!0,oe(!0),V.current=Dt,ee(Dt),ct.preventDefault();return}$.current==="vertical"&&(E.current=!0,oe(!0),L.current=kt,ye(kt),ct.preventDefault())},Ft=()=>{if(!H.current)return;const ct=$.current,bt=E.current;if(bt&&ct==="horizontal")_e(V.current),O();else if(bt&&ct==="vertical"){const Dt=L.current;if(et&&Dt>Qx){const kt=window.innerHeight;L.current=kt,te(!0),ye(kt),be("closing")}else L.current=0,ye(0);O()}else ct==="horizontal"&&Math.abs(V.current)>0&&(_e(V.current),O());H.current=null,$.current="none",V.current=0,E.current=!1,oe(!1)};return document.addEventListener("touchstart",Ge,{passive:!0}),document.addEventListener("touchmove",pt,{passive:!1}),document.addEventListener("touchend",Ft),document.addEventListener("touchcancel",Ft),()=>{document.removeEventListener("touchstart",Ge),document.removeEventListener("touchmove",pt),document.removeEventListener("touchend",Ft),document.removeEventListener("touchcancel",Ft)}},[J,Ue,Ke,it,Ne,et,Pt,Ie]);const jt=s.useCallback(()=>{const O=(m==null?void 0:m())??v??null;O&&le&&(U(O),X(!0)),be("closing")},[m,v,le]);s.useEffect(()=>{const O=Ge=>{if(Ge.key==="Escape"){if(r&&d||J==="closing")return;gt(),jt();return}if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight"||J!=="open"||!Ue)return;Ge.preventDefault();const pt=Ge.key==="ArrowLeft"?-1:1;Ge.repeat&&Z.current===pt||Tt(pt)},Le=Ge=>{if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight")return;const pt=Ge.key==="ArrowLeft"?-1:1;Z.current===pt&&gt()},_e=()=>{gt()};return window.addEventListener("keydown",O),window.addEventListener("keyup",Le),window.addEventListener("blur",_e),()=>{window.removeEventListener("keydown",O),window.removeEventListener("keyup",Le),window.removeEventListener("blur",_e),gt()}},[J,r,d,jt,Ue,Tt,gt]),s.useEffect(()=>{J!=="open"&&gt()},[J,gt]);const Zt=()=>{J==="closing"||l||jt()},Ct=J==="open",Vt=J==="closing",rn=We>0?Math.max(0,1-We/500):1,lt=We>0?Math.max(.35,1-We/500):1,Ee=s.useCallback(O=>{if(!(O.propertyName!=="transform"||!W.current)){if(M.current!==null){ht();return}Ne(),Ke(!1)}},[Ne,Ke,ht]),je=J==="closing"?N??v:v,Qe=je&&le&&(J==="opening"||Vt)?ob(je,le):void 0,dt=Fe&&Q?rt(Q,"center"):We>0?`translateY(${We}px)`:Qe,xt=le?Dr(le,k):null,Mt=!!(je&&le),yt=Mt&&(J==="closing"||J==="open"&&f),Xt={position:"absolute",top:xt==null?void 0:xt.top,left:xt==null?void 0:xt.left,width:xt==null?void 0:xt.width,height:xt==null?void 0:xt.height,objectFit:"contain",transformOrigin:"top left",transform:dt,opacity:We>0?lt:Mt?1:J==="opening"||Vt?0:1,transition:ie&&!de?"none":de?`transform ${Ko}ms ${Sn}`:B?`transform ${Wn}ms ${Sn}, opacity ${Wn}ms ${Sn}`:yt?`transform ${Wn}ms ${Sn}`:J==="opening"||Vt?`opacity ${Wn}ms ${Sn}`:"none",pointerEvents:Ze&&Ct&&!Fe?"auto":"none",touchAction:Ze&&Ct?"none":void 0,zIndex:1,overflow:Ze?"hidden":void 0},Ht={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Ct&&!Fe?"auto":"none"},Nt=(O,Le,_e="adjacent")=>{const Ge=Re(O);if(!Ge)return{display:"none"};const pt=_e==="far"?Le==="left"?"far-left":"far-right":Le==="left"?"left-adjacent":"right-adjacent",{start:Ft}=Pe!==null?Xu(Ge,pt,Pe,k):{start:_e==="far"?ma(Ge,Le,k):Ao(Ge,Le,k)},ct=Dr(Ft,k),bt=rt(O,pt),Dt=!Fe&&_e==="adjacent"&&Ct&&!me?hb(Ge,Le,k):null,kt=_e==="far"&&Fe&&Pe===(Le==="left"?-1:1),sn=ie&&!de?!1:de,mn=_e==="adjacent"&&Ct&&me&&!Fe;return{position:"absolute",top:ct.top,left:ct.left,width:ct.width,height:ct.height,objectFit:"contain",transform:bt??(Dt?`translate(${Dt.x}px, ${Dt.y}px)`:void 0),opacity:_e==="far"?Ct&&kt?1:0:Ct?1:0,transition:sn?_e==="far"?`transform ${Ko}ms ${Sn}`:`transform ${Ko}ms ${Sn}, opacity ${Wn}ms ${Sn}`:mn?`transform ${Wn}ms ${Sn}`:J==="opening"||Vt?`opacity ${Wn}ms ${Sn}`:"none",pointerEvents:"none",zIndex:1}},qt=(O,Le)=>{const _e=Re(O);return _e?mb(Ao(_e,Le,k),Le,k):null},Ut=O=>Le=>{if(!l){if(F.current){F.current=!1;return}Le.stopPropagation(),ut(O)}},Ot=Ve?qt(Ve,"left"):null,Gt=fe?qt(fe,"right"):null,Bt=Ot?Dr(Ot,k):null,Lt=Gt?Dr(Gt,k):null;return a.jsxs("div",{ref:C,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:Zt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Ct?rn:0,transition:ie?"none":`opacity ${Wn}ms ${Sn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:S,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Ct?1:0,transition:ie?"none":`opacity ${Wn}ms ${Sn}`,pointerEvents:"none"},children:a.jsx(Lu,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,onClose:Zt})})]}),Ct&&ge&&a.jsx(zr,{media:ge,style:Nt(ge,"left","far"),onMeasure:ze,onTransitionEnd:Ee},`far-prev-${ge.url}`),Ct&&Ve&&a.jsxs(a.Fragment,{children:[a.jsx(zr,{media:Ve,style:Nt(Ve,"left"),onMeasure:ze,onTransitionEnd:Ee},`prev-${Ve.url}`),Bt&&a.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||ie?"default":"pointer",pointerEvents:l||ie?"none":"auto",zIndex:3},onClick:Ut(-1)})]}),Ct&&fe&&a.jsxs(a.Fragment,{children:[a.jsx(zr,{media:fe,style:Nt(fe,"right"),onMeasure:ze,onTransitionEnd:Ee},`next-${fe.url}`),Lt&&a.jsx("div",{style:{position:"absolute",top:Lt.top,left:Lt.left,width:Lt.width,height:Lt.height,cursor:l||ie?"default":"pointer",pointerEvents:l||ie?"none":"auto",zIndex:3},onClick:Ut(1)})]}),Ct&&Me&&a.jsx(zr,{media:Me,style:Nt(Me,"right","far"),onMeasure:ze,onTransitionEnd:Ee},`far-next-${Me.url}`),le&&Q&&(Ze?a.jsx(fb,{src:Q.url,phase:J,onMediaElement:At,wrapperStyle:Xt,videoStyle:Ht,onLoadedMetadata:ft,onTransitionEnd:Ee},`${n}-${Q.url}`):a.jsx("img",{ref:At,src:Q.url,alt:Q.name,onLoad:ft,onTransitionEnd:Ee,style:Xt},`${n}-${Q.url}`))]})}const vb=20,xb=.18;function bb(e){return`
18802
+ `}const Wn=500,Yo=650,Sn="cubic-bezier(0.22, 1, 0.36, 1)",ib=72,ob=50,rb=1e4,ab=650,sb=500;function lb(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Xu(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=da(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function cb(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Xu(i,n):null}function db(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.url&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function Qo(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function jc(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Qo(e,i,n)}const ub=.03;function qu(e){return e.width*ub}const ls={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Dr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Vc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function pb(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ns(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,d=o/r;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const c=r*l;return{width:c,height:r,left:i.left+(o-c)/2,top:i.top}}function mb(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Ns(e,t.width,t.height)}function gb(e,t){if(Aa(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function hb(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.url)||t.has(o.url)||(t.add(o.url),n.push(o))}return n}function fb({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Aa(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Ao(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:d}=n,c=qu(n);return t==="left"?{left:l+c-i,top:r,width:i,height:o}:{left:l+d-c,top:r,width:i,height:o}}function ga(e,t,n){const i=Ao(e,t,n);return{...i,left:2*i.left-e.left}}function yb(e,t,n){const{left:i,width:o}=n,r=qu(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function Uu(e,t,n,i){const o=Ao(e,"left",i),r=Ao(e,"right",i),l=ga(e,"left",i),d=ga(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function vb(e,t,n,i){const{start:o,end:r}=Uu(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function xb(e,t,n){const i=Ao(e,t,n),o=ga(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Aa(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function bb({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const d=s.useRef(null);return s.useEffect(()=>{const c=d.current;return n==null||n(c??null),()=>{c==null||c.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:c=>c.stopPropagation(),style:o},e)})}function zr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Aa(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function Sb({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:x,sourceRect:y,resolveCloseSourceRect:m,onClose:h,onPrev:v,onNext:b}){const C=s.useRef(null),S=s.useRef(null),w=s.useRef(null),D=s.useRef(new Map),[_,z]=s.useState(0),H=s.useRef(null),L=s.useRef(0),V=s.useRef(0),$=s.useRef("none"),k=s.useRef(!1),F=s.useRef(!1),W=s.useRef(!1),g=s.useRef(null),E=s.useRef(null),R=s.useRef(null),G=s.useRef(()=>{}),Z=s.useRef(null),T=s.useRef(null),j=s.useRef(null),K=s.useRef(!1),[le,se]=s.useState(null),[M,re]=s.useState(ls),[q,ce]=s.useState(0),[J,be]=s.useState("opening"),[We,ye]=s.useState(0),[ue,ee]=s.useState(0),[de,ne]=s.useState(!1),[Pe,Te]=s.useState(null),[Oe,ve]=s.useState(null),[Se,$e]=s.useState(null),[f,X]=s.useState(!1),[N,U]=s.useState(null),[me,Y]=s.useState(!1),I=s.useRef(!1),[ie,oe]=s.useState(!1),[B,te]=s.useState(!1),Ae=s.useRef(n),he=s.useRef(void 0),Q=t[n],Ze=Q?Aa(Q):!1,Fe=ue!==0||de,et=!l&&(!r||!!d),Ue=c&&!l,nt=u.length>1,tt=s.useCallback((O,Le)=>t.length<=1?null:t[(O+Le+t.length)%t.length]??null,[t]),Ve=nt?Qo(u,p,-1):tt(n,-1),fe=nt?Qo(u,p,1):tt(n,1),He=Pe===-1&&Fe?nt&&Oe!==null?Qo(u,Oe,-1):Se!==null?tt(Se,-1):null:null,Be=Pe===1&&Fe?nt&&Oe!==null?Qo(u,Oe,1):Se!==null?tt(Se,1):null:null,Je=He&&He.url!==(Ve==null?void 0:Ve.url)?He:null,Ce=Be&&Be.url!==(fe==null?void 0:fe.url)?Be:null,De=Ve&&Ue?(()=>{const O=nt?jc(u,p,-1):t.length>2?tt((n-1+t.length)%t.length,-1):null;return O&&O.url!==Ve.url?O:null})():null,Xe=fe&&Ue?(()=>{const O=nt?jc(u,p,1):t.length>2?tt((n+1)%t.length,1):null;return O&&O.url!==fe.url?O:null})():null,ge=Je??De,Ee=Ce??Xe,ze=s.useCallback((O,Le,_e)=>{if(!O||!Le||!_e)return;const Ge=D.current,pt=Ge.get(O);(pt==null?void 0:pt.width)===Le&&(pt==null?void 0:pt.height)===_e||(Ge.set(O,{width:Le,height:_e}),z(Ft=>Ft+1))},[]),Re=s.useCallback(O=>{if(!(O!=null&&O.url))return null;const Le=D.current.get(O.url);return mb(S.current,Le)},[_,q]),xe=s.useCallback(()=>{if(!Q)return;const O=Re(Q);if(O){se(O);return}const Le=S.current;Le&&se(Vc(Le))},[Q,Re]),Ie=s.useCallback(O=>{if(nt){const Le=u.length;ve((p+O+Le)%Le),$e(null);return}t.length>1&&($e((n+O+t.length)%t.length),ve(null))},[nt,u.length,p,t.length,n]),Ye=s.useCallback(O=>{W.current=O,ne(O)},[]),Ne=s.useCallback(()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null)},[]),it=s.useCallback(()=>{Ne(),g.current=window.setTimeout(()=>{Ne(),Ye(!1)},Yo+32)},[Ne,Ye]),ot=s.useCallback(()=>{const O=C.current;if(!O){re({left:0,top:0,width:typeof window<"u"?window.innerWidth:ls.width,height:typeof window<"u"?window.innerHeight:ls.height});return}const Le=O.getBoundingClientRect();re({left:Le.left,top:Le.top,width:Le.width,height:Le.height})},[]),rt=s.useCallback((O,Le)=>{if(Fe){if(ie&&!de)return`translate(${ue}px, 0px)`;if(de&&Pe!==null){const _e=Re(O);if(!_e)return;const{x:Ge,y:pt}=vb(_e,Le,Pe,M);return`translate(${Ge}px, ${pt}px)`}if(de)return"translate(0px, 0px)"}},[Fe,ie,de,ue,Pe,M,Re]),ht=s.useCallback(()=>{const O=E.current;E.current=null,Ne(),Ye(!1),Te(null),ve(null),$e(null),ee(0),oe(!1),k.current=!1,V.current=0,$.current="none",O===-1?v():O===1&&b()},[Ne,Ye,v,b]),Pt=s.useCallback(()=>{Ne(),g.current=window.setTimeout(()=>{E.current!==null&&ht()},Yo+32)},[Ne,ht]),kt=s.useCallback(()=>{Ne(),E.current=null,Ye(!1),Te(null),ve(null),$e(null),ee(0),oe(!1),k.current=!1,V.current=0,$.current="none"},[Ne,Ye]),ut=s.useCallback(O=>{if(!(!Ue||!le)){if(W.current){if(E.current===O){R.current=O,ht();return}kt()}Ne(),Ie(O),E.current=O,Te(O),Ye(!0),Pt()}},[Ue,le,ht,kt,Ne,Ie,Ye,Pt]);G.current=ut;const gt=s.useCallback(()=>{Z.current=null,K.current=!1,T.current!==null&&(window.clearInterval(T.current),T.current=null),j.current!==null&&(window.clearTimeout(j.current),j.current=null)},[]),$t=s.useCallback(O=>{T.current!==null&&window.clearInterval(T.current);const Le=K.current?sb:ab;T.current=window.setInterval(()=>{G.current(O)},Le)},[]),Tt=s.useCallback(O=>{Z.current!==O&&(gt(),Z.current=O,K.current=!1,G.current(O),$t(O),j.current=window.setTimeout(()=>{j.current=null,Z.current===O&&(K.current=!0,$t(O))},rb))},[gt,$t]),ft=s.useCallback(()=>{const O=S.current;if(!O)return;const Le=Q==null?void 0:Q.url,_e=Le?D.current.get(Le):void 0;if(_e!=null&&_e.width&&(_e!=null&&_e.height)){se(Ns(O,_e.width,_e.height));return}const Ge=w.current;if(Ge&&Le&&(Ge.src===Le||Ge.currentSrc===Le)){const{width:Ft,height:ct}=pb(Ge);if(Ft&&ct){ze(Le,Ft,ct),se(Ns(O,Ft,ct));return}}const pt=Vc(O);!pt.width||!pt.height||se(pt)},[Q==null?void 0:Q.url,ze]),At=s.useCallback(O=>{if(w.current=O,!!O){if(O instanceof HTMLVideoElement){O.readyState>=1&&O.videoWidth>0&&ft();return}O.complete&&O.naturalWidth>0&&ft()}},[ft]),zt=s.useCallback(()=>{ot(),ft(),ce(O=>O+1)},[ot,ft]);s.useEffect(()=>{zt();const O=S.current,Le=C.current,_e=new ResizeObserver(()=>zt());return O&&_e.observe(O),Le&&_e.observe(Le),window.addEventListener("resize",zt),()=>{_e.disconnect(),window.removeEventListener("resize",zt)}},[zt,n,x]),s.useLayoutEffect(()=>{if(!Q)return;const O=w.current;if(O){if(O instanceof HTMLImageElement&&O.complete&&O.naturalWidth>0){ft();return}O instanceof HTMLVideoElement&&O.readyState>=1&&O.videoWidth>0&&ft()}},[Q==null?void 0:Q.url,n,ft]),s.useEffect(()=>{xe()},[xe,_]),s.useEffect(()=>{const O=new Set,Le=[],_e=Ge=>{!(Ge!=null&&Ge.url)||O.has(Ge.url)||(O.add(Ge.url),Le.push(Ge))};t.forEach(_e),u.forEach(Ge=>Ge.items.forEach(_e)),Le.forEach(Ge=>{D.current.has(Ge.url)||gb(Ge,ze)})},[t,u,ze]),s.useEffect(()=>{if(J!=="opening"||!le)return;if(!y){be("open");return}X(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{X(!0),be("open")})});return()=>cancelAnimationFrame(O)},[J,le,y]),s.useEffect(()=>{if(J!=="closing")return;const O=setTimeout(()=>h(),Wn);return()=>clearTimeout(O)},[J,h]),s.useEffect(()=>()=>{Ne()},[Ne]),s.useLayoutEffect(()=>{Ae.current===n&&he.current===(Q==null?void 0:Q.url)||(Ne(),E.current=null,Te(null),ve(null),$e(null),ye(0),ee(0),Ye(!1),te(!1),oe(!1),L.current=0,V.current=0,$.current="none",k.current=!1,H.current=null,F.current=!1,w.current=null,xe(),Ae.current=n,he.current=Q==null?void 0:Q.url)},[n,Q==null?void 0:Q.url,Ye,Ne,xe]),s.useLayoutEffect(()=>{const O=R.current;O!==null&&(R.current=null,requestAnimationFrame(()=>{G.current(O)}))},[n,p,Q==null?void 0:Q.url]),s.useLayoutEffect(()=>{if(J==="opening"){I.current=!1,Y(!1);return}if(J!=="open"||I.current)return;if(!Ve&&!fe){I.current=!0;return}Y(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),I.current=!0})});return()=>cancelAnimationFrame(O)},[J,Ve==null?void 0:Ve.url,fe==null?void 0:fe.url]),s.useEffect(()=>{if(J!=="open")return;const O=()=>{const ct=bt=>{bt.stopPropagation(),bt.preventDefault(),document.removeEventListener("click",ct,!0)};document.addEventListener("click",ct,!0)},Le=ct=>{const bt=ct<0?1:-1;Ne(),Ie(bt),E.current=bt,Te(bt),Ye(!0),Pt()},_e=ct=>{if(Math.abs(ct)>ob&&Ue){Le(ct);return}E.current=null,Te(null),ve(null),$e(null),Ye(!0),ee(0),it()},Ge=ct=>{if(ct.touches.length!==1||W.current)return;const bt=ct.touches[0];F.current=!0,H.current={x:bt.clientX,y:bt.clientY},$.current="none",V.current=0,k.current=!1},pt=ct=>{if(!H.current||ct.touches.length!==1||W.current)return;const bt=ct.touches[0],Dt=bt.clientX-H.current.x,Mt=bt.clientY-H.current.y;if($.current==="none"){if(Math.abs(Dt)<10&&Math.abs(Mt)<10)return;if(Math.abs(Dt)>Math.abs(Mt)){if(!Ue)return;$.current="horizontal"}else if(Mt>0){if(!et)return;$.current="vertical"}else return}if($.current==="horizontal"){k.current=!0,oe(!0),V.current=Dt,ee(Dt),ct.preventDefault();return}$.current==="vertical"&&(k.current=!0,oe(!0),L.current=Mt,ye(Mt),ct.preventDefault())},Ft=()=>{if(!H.current)return;const ct=$.current,bt=k.current;if(bt&&ct==="horizontal")_e(V.current),O();else if(bt&&ct==="vertical"){const Dt=L.current;if(et&&Dt>ib){const Mt=window.innerHeight;L.current=Mt,te(!0),ye(Mt),be("closing")}else L.current=0,ye(0);O()}else ct==="horizontal"&&Math.abs(V.current)>0&&(_e(V.current),O());H.current=null,$.current="none",V.current=0,k.current=!1,oe(!1)};return document.addEventListener("touchstart",Ge,{passive:!0}),document.addEventListener("touchmove",pt,{passive:!1}),document.addEventListener("touchend",Ft),document.addEventListener("touchcancel",Ft),()=>{document.removeEventListener("touchstart",Ge),document.removeEventListener("touchmove",pt),document.removeEventListener("touchend",Ft),document.removeEventListener("touchcancel",Ft)}},[J,Ue,Ye,it,Ne,et,Pt,Ie]);const jt=s.useCallback(()=>{const O=(m==null?void 0:m())??y??null;O&&le&&(U(O),X(!0)),be("closing")},[m,y,le]);s.useEffect(()=>{const O=Ge=>{if(Ge.key==="Escape"){if(r&&d||J==="closing")return;gt(),jt();return}if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight"||J!=="open"||!Ue)return;Ge.preventDefault();const pt=Ge.key==="ArrowLeft"?-1:1;Ge.repeat&&Z.current===pt||Tt(pt)},Le=Ge=>{if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight")return;const pt=Ge.key==="ArrowLeft"?-1:1;Z.current===pt&&gt()},_e=()=>{gt()};return window.addEventListener("keydown",O),window.addEventListener("keyup",Le),window.addEventListener("blur",_e),()=>{window.removeEventListener("keydown",O),window.removeEventListener("keyup",Le),window.removeEventListener("blur",_e),gt()}},[J,r,d,jt,Ue,Tt,gt]),s.useEffect(()=>{J!=="open"&&gt()},[J,gt]);const Zt=()=>{J==="closing"||l||jt()},Ct=J==="open",Vt=J==="closing",rn=We>0?Math.max(0,1-We/500):1,lt=We>0?Math.max(.35,1-We/500):1,ke=s.useCallback(O=>{if(!(O.propertyName!=="transform"||!W.current)){if(E.current!==null){ht();return}Ne(),Ye(!1)}},[Ne,Ye,ht]),je=J==="closing"?N??y:y,Qe=je&&le&&(J==="opening"||Vt)?lb(je,le):void 0,dt=Fe&&Q?rt(Q,"center"):We>0?`translateY(${We}px)`:Qe,xt=le?Dr(le,M):null,Et=!!(je&&le),yt=Et&&(J==="closing"||J==="open"&&f),Xt={position:"absolute",top:xt==null?void 0:xt.top,left:xt==null?void 0:xt.left,width:xt==null?void 0:xt.width,height:xt==null?void 0:xt.height,objectFit:"contain",transformOrigin:"top left",transform:dt,opacity:We>0?lt:Et?1:J==="opening"||Vt?0:1,transition:ie&&!de?"none":de?`transform ${Yo}ms ${Sn}`:B?`transform ${Wn}ms ${Sn}, opacity ${Wn}ms ${Sn}`:yt?`transform ${Wn}ms ${Sn}`:J==="opening"||Vt?`opacity ${Wn}ms ${Sn}`:"none",pointerEvents:Ze&&Ct&&!Fe?"auto":"none",touchAction:Ze&&Ct?"none":void 0,zIndex:1,overflow:Ze?"hidden":void 0},Ht={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Ct&&!Fe?"auto":"none"},Nt=(O,Le,_e="adjacent")=>{const Ge=Re(O);if(!Ge)return{display:"none"};const pt=_e==="far"?Le==="left"?"far-left":"far-right":Le==="left"?"left-adjacent":"right-adjacent",{start:Ft}=Pe!==null?Uu(Ge,pt,Pe,M):{start:_e==="far"?ga(Ge,Le,M):Ao(Ge,Le,M)},ct=Dr(Ft,M),bt=rt(O,pt),Dt=!Fe&&_e==="adjacent"&&Ct&&!me?xb(Ge,Le,M):null,Mt=_e==="far"&&Fe&&Pe===(Le==="left"?-1:1),sn=ie&&!de?!1:de,mn=_e==="adjacent"&&Ct&&me&&!Fe;return{position:"absolute",top:ct.top,left:ct.left,width:ct.width,height:ct.height,objectFit:"contain",transform:bt??(Dt?`translate(${Dt.x}px, ${Dt.y}px)`:void 0),opacity:_e==="far"?Ct&&Mt?1:0:Ct?1:0,transition:sn?_e==="far"?`transform ${Yo}ms ${Sn}`:`transform ${Yo}ms ${Sn}, opacity ${Wn}ms ${Sn}`:mn?`transform ${Wn}ms ${Sn}`:J==="opening"||Vt?`opacity ${Wn}ms ${Sn}`:"none",pointerEvents:"none",zIndex:1}},qt=(O,Le)=>{const _e=Re(O);return _e?yb(Ao(_e,Le,M),Le,M):null},Ut=O=>Le=>{if(!l){if(F.current){F.current=!1;return}Le.stopPropagation(),ut(O)}},Ot=Ve?qt(Ve,"left"):null,Gt=fe?qt(fe,"right"):null,Bt=Ot?Dr(Ot,M):null,Lt=Gt?Dr(Gt,M):null;return a.jsxs("div",{ref:C,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:Zt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Ct?rn:0,transition:ie?"none":`opacity ${Wn}ms ${Sn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:S,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Ct?1:0,transition:ie?"none":`opacity ${Wn}ms ${Sn}`,pointerEvents:"none"},children:a.jsx(Ru,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,onClose:Zt})})]}),Ct&&ge&&a.jsx(zr,{media:ge,style:Nt(ge,"left","far"),onMeasure:ze,onTransitionEnd:ke},`far-prev-${ge.url}`),Ct&&Ve&&a.jsxs(a.Fragment,{children:[a.jsx(zr,{media:Ve,style:Nt(Ve,"left"),onMeasure:ze,onTransitionEnd:ke},`prev-${Ve.url}`),Bt&&a.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||ie?"default":"pointer",pointerEvents:l||ie?"none":"auto",zIndex:3},onClick:Ut(-1)})]}),Ct&&fe&&a.jsxs(a.Fragment,{children:[a.jsx(zr,{media:fe,style:Nt(fe,"right"),onMeasure:ze,onTransitionEnd:ke},`next-${fe.url}`),Lt&&a.jsx("div",{style:{position:"absolute",top:Lt.top,left:Lt.left,width:Lt.width,height:Lt.height,cursor:l||ie?"default":"pointer",pointerEvents:l||ie?"none":"auto",zIndex:3},onClick:Ut(1)})]}),Ct&&Ee&&a.jsx(zr,{media:Ee,style:Nt(Ee,"right","far"),onMeasure:ze,onTransitionEnd:ke},`far-next-${Ee.url}`),le&&Q&&(Ze?a.jsx(bb,{src:Q.url,phase:J,onMediaElement:At,wrapperStyle:Xt,videoStyle:Ht,onLoadedMetadata:ft,onTransitionEnd:ke},`${n}-${Q.url}`):a.jsx("img",{ref:At,src:Q.url,alt:Q.name,onLoad:ft,onTransitionEnd:ke,style:Xt},`${n}-${Q.url}`))]})}const wb=20,$b=.18;function Cb(e){return`
18803
18803
  .${e}-wrapper {
18804
18804
  box-sizing: border-box;
18805
18805
  max-width: 100%;
@@ -18886,8 +18886,8 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18886
18886
  z-index: 2;
18887
18887
  pointer-events: auto;
18888
18888
  }
18889
- ${Jx(e)}
18890
- `}function Sb(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,r]=n.split(":").map(Number),l=i?r:o,d=i?o:r;return d>0?l/d:1}function wb(e){const t=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,n=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight;return!t||!n?null:t/n}function $b(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:A.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:A.scalingValue(i*xb,n??!1),[`--${t}-image-aspect`]:Sb(e)}}function Cb(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.07,lineHeight:e==null?void 0:e.titleLineHeight,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,color:(e==null?void 0:e.titleColor)??"#000000"};return Qt(n,t)}function Tb(e){var o;const t=((o=e==null?void 0:e.imageDisplay)==null?void 0:o.display)==="cover",n=((e==null?void 0:e.lightbox)??"on")==="on",i={objectFit:t?"cover":"contain",pointerEvents:"auto",...n?{cursor:"pointer"}:null};return{objectFitMode:t?"cover":"contain",imageStyle:i}}function Lb(e,t,n,i,o,r){if(!(!e||!t))return l=>{var c;const d=((c=l.currentTarget.closest(`.${i}-item`))==null?void 0:c.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);r(n,d?Vu(d,o):void 0)}}function Ib({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:d}=A.useScopedStyles(),c=s.useMemo(()=>bb(d),[d]),u=t??[],p=(e==null?void 0:e.type)??"a",x=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,v=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,m=A.scalingValue(v,n??!1),h=`max(${m}, ${vb}px)`,{objectFitMode:y,imageStyle:b}=Tb(e),C=Cb(e,n),S=s.useRef(null),[w,D]=s.useState(!1),[_,z]=s.useState([]),[H,L]=s.useState(0),[V,$]=s.useState(0),[E,F]=s.useState(null),[W,g]=s.useState({title1:"",title2:"",title3:""}),M=(!n||i)&&!w,R=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},G=R.sizeType??"none",Z=M&&G!=="none"?`${d}-item-image-hover-${G}`:void 0,T=(R.value??120)/100,j=s.useCallback(ue=>{!ue||G!=="scale"||(ue.style.transformOrigin=$h(ue))},[G]),Y=s.useCallback(ue=>{if(ue){if(y==="contain"){const ee=wb(ue);if(ee){const de=ue.closest(`.${d}-item-image`);de instanceof HTMLElement&&de.style.setProperty(`--${d}-item-media-aspect`,String(ee))}}j(ue)}},[d,j,y]),le={width:A.scalingValue(x,n??!1),...C,...$b(e,d,n),[`--${d}-image-hover-scale`]:String(T)},se=(()=>{const ue={},ee=S.current?getComputedStyle(S.current).getPropertyValue("--cntrl-article-width").trim():"";return ee&&(ue["--cntrl-article-width"]=ee),ue})(),k=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),re=s.useMemo(()=>ab(u),[u]),q=s.useMemo(()=>ub(u),[u]),ce=(ue,ee)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const de=re.findIndex(Pe=>Pe.gridIndex===ue);if(de<0)return;const ne=re[de];$(de),z(ne.items),L(0),g(ne.entry),F(ee??null),D(!0)},J=s.useCallback(()=>{D(!1),F(null)},[]),be=s.useCallback(()=>{const ue=re[V];return!ue||!S.current?E:rb(S.current,ue.gridIndex,y)??E},[re,V,E,y]),We=s.useCallback(ue=>{if(re.length>1){const ee=re.length,de=(V+ue+ee)%ee,ne=re[de];$(de),z(ne.items),L(0),g(ne.entry);return}L(ee=>(ee+ue+_.length)%_.length)},[re,V,_.length]),ye=re.length>1||_.length>1;return s.useEffect(()=>{if(!w||typeof document>"u")return;const ue=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ue}},[w]),s.useEffect(()=>{!n||o||i||D(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&D(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx(pb,{mediaList:q}),a.jsx("div",{ref:S,className:`${d}-wrapper ${d}-type-${p}`,style:le,children:u.map((ue,ee)=>{var Pe,Te;const de=!!((Pe=ue.image)!=null&&Pe.url),ne=Lb(!!k,de,ee,d,y,ce);return a.jsxs("div",{className:`${d}-item`,children:[ue.title?a.jsx("span",{className:`${d}-item-title`,onClick:ne,style:ne?{cursor:"pointer"}:void 0,children:ue.title}):null,(Te=ue.image)!=null&&Te.url?a.jsx("span",{className:[`${d}-item-image`,y==="contain"?`${d}-item-image-fit`:void 0,Z].filter(Boolean).join(" "),children:ue.image.type==="video"?a.jsx("video",{ref:Y,src:ue.image.url,"data-waterfall-index":ee,style:b,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:ne,onLoadedData:Oe=>Y(Oe.currentTarget)}):a.jsx("img",{ref:Y,src:ue.image.url,alt:ue.image.name??"","data-waterfall-index":ee,style:b,onClick:ne,onLoad:Oe=>Y(Oe.currentTarget)})}):null,ee<u.length-1&&a.jsx("div",{className:`${d}-item-gap-host`,style:{width:m},children:o&&!w&&a.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${d}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:h,height:"100%"}})})]},ee)})}),w&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ue=(l?document.getElementById(l):null)??document.body;return ri.createPortal(a.jsx("div",{style:se,"data-selection":"none",children:a.jsx(yb,{prefix:d,items:_,index:H,entry:W,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ye,lightboxEntries:re,entryIdx:V,layoutId:r,sourceRect:E,resolveCloseSourceRect:be,onClose:J,onPrev:()=>We(-1),onNext:()=>We(1)})}),ue)})()]})}const Rb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
18889
+ ${nb(e)}
18890
+ `}function Tb(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,r]=n.split(":").map(Number),l=i?r:o,d=i?o:r;return d>0?l/d:1}function Lb(e){const t=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,n=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight;return!t||!n?null:t/n}function Ib(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:A.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:A.scalingValue(i*$b,n??!1),[`--${t}-image-aspect`]:Tb(e)}}function Rb(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.07,lineHeight:e==null?void 0:e.titleLineHeight,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,color:(e==null?void 0:e.titleColor)??"#000000"};return Qt(n,t)}function Pb(e){var o;const t=((o=e==null?void 0:e.imageDisplay)==null?void 0:o.display)==="cover",n=((e==null?void 0:e.lightbox)??"on")==="on",i={objectFit:t?"cover":"contain",pointerEvents:"auto",...n?{cursor:"pointer"}:null};return{objectFitMode:t?"cover":"contain",imageStyle:i}}function kb(e,t,n,i,o,r){if(!(!e||!t))return l=>{var c;const d=((c=l.currentTarget.closest(`.${i}-item`))==null?void 0:c.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);r(n,d?Xu(d,o):void 0)}}function Eb({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:d}=A.useScopedStyles(),c=s.useMemo(()=>Cb(d),[d]),u=t??[],p=(e==null?void 0:e.type)??"a",x=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,y=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,m=A.scalingValue(y,n??!1),h=`max(${m}, ${wb}px)`,{objectFitMode:v,imageStyle:b}=Pb(e),C=Rb(e,n),S=s.useRef(null),[w,D]=s.useState(!1),[_,z]=s.useState([]),[H,L]=s.useState(0),[V,$]=s.useState(0),[k,F]=s.useState(null),[W,g]=s.useState({title1:"",title2:"",title3:""}),E=(!n||i)&&!w,R=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},G=R.sizeType??"none",Z=E&&G!=="none"?`${d}-item-image-hover-${G}`:void 0,T=(R.value??120)/100,j=s.useCallback(ue=>{!ue||G!=="scale"||(ue.style.transformOrigin=Ih(ue))},[G]),K=s.useCallback(ue=>{if(ue){if(v==="contain"){const ee=Lb(ue);if(ee){const de=ue.closest(`.${d}-item-image`);de instanceof HTMLElement&&de.style.setProperty(`--${d}-item-media-aspect`,String(ee))}}j(ue)}},[d,j,v]),le={width:A.scalingValue(x,n??!1),...C,...Ib(e,d,n),[`--${d}-image-hover-scale`]:String(T)},se=(()=>{const ue={},ee=S.current?getComputedStyle(S.current).getPropertyValue("--cntrl-article-width").trim():"";return ee&&(ue["--cntrl-article-width"]=ee),ue})(),M=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),re=s.useMemo(()=>db(u),[u]),q=s.useMemo(()=>hb(u),[u]),ce=(ue,ee)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const de=re.findIndex(Pe=>Pe.gridIndex===ue);if(de<0)return;const ne=re[de];$(de),z(ne.items),L(0),g(ne.entry),F(ee??null),D(!0)},J=s.useCallback(()=>{D(!1),F(null)},[]),be=s.useCallback(()=>{const ue=re[V];return!ue||!S.current?k:cb(S.current,ue.gridIndex,v)??k},[re,V,k,v]),We=s.useCallback(ue=>{if(re.length>1){const ee=re.length,de=(V+ue+ee)%ee,ne=re[de];$(de),z(ne.items),L(0),g(ne.entry);return}L(ee=>(ee+ue+_.length)%_.length)},[re,V,_.length]),ye=re.length>1||_.length>1;return s.useEffect(()=>{if(!w||typeof document>"u")return;const ue=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ue}},[w]),s.useEffect(()=>{!n||o||i||D(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&D(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx(fb,{mediaList:q}),a.jsx("div",{ref:S,className:`${d}-wrapper ${d}-type-${p}`,style:le,children:u.map((ue,ee)=>{var Pe,Te;const de=!!((Pe=ue.image)!=null&&Pe.url),ne=kb(!!M,de,ee,d,v,ce);return a.jsxs("div",{className:`${d}-item`,children:[ue.title?a.jsx("span",{className:`${d}-item-title`,onClick:ne,style:ne?{cursor:"pointer"}:void 0,children:ue.title}):null,(Te=ue.image)!=null&&Te.url?a.jsx("span",{className:[`${d}-item-image`,v==="contain"?`${d}-item-image-fit`:void 0,Z].filter(Boolean).join(" "),children:ue.image.type==="video"?a.jsx("video",{ref:K,src:ue.image.url,"data-waterfall-index":ee,style:b,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:ne,onLoadedData:Oe=>K(Oe.currentTarget)}):a.jsx("img",{ref:K,src:ue.image.url,alt:ue.image.name??"","data-waterfall-index":ee,style:b,onClick:ne,onLoad:Oe=>K(Oe.currentTarget)})}):null,ee<u.length-1&&a.jsx("div",{className:`${d}-item-gap-host`,style:{width:m},children:o&&!w&&a.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${d}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:h,height:"100%"}})})]},ee)})}),w&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ue=(l?document.getElementById(l):null)??document.body;return ri.createPortal(a.jsx("div",{style:se,"data-selection":"none",children:a.jsx(Sb,{prefix:d,items:_,index:H,entry:W,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ye,lightboxEntries:re,entryIdx:V,layoutId:r,sourceRect:k,resolveCloseSourceRect:be,onClose:J,onPrev:()=>We(-1),onNext:()=>We(1)})}),ue)})()]})}const Mb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
18891
18891
  import type React from 'react';
18892
18892
  import { createPortal } from 'react-dom';
18893
18893
  import { CommonComponentProps } from '../props';
@@ -19401,7 +19401,7 @@ export function Waterfall({
19401
19401
  </>
19402
19402
  );
19403
19403
  }
19404
- `,Pb="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),gi={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 Eb(e){const t={};return t[mt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSettings")]={...gi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSize")]={...gi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[mt(e,"lineHeight")]={...gi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[mt(e,"letterSpacing")]={...gi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[mt(e,"wordSpacing")]={...gi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[mt(e,"textAlign")]={...gi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[mt(e,"textAppearance")]={...gi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Fo=Ci.filter(e=>e!=="count"),Mb=Fo.reduce((e,t)=>({...e,...Eb(t)}),{}),kb=Fo.reduce((e,t)=>({...e,[mt(t,"fontFamily")]:"Arial",[mt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[mt(t,"letterSpacing")]:0,[mt(t,"wordSpacing")]:0,[mt(t,"textAlign")]:"left",[mt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ls(e){return Fo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[mt(n,"fontSize")]=i),o!==void 0&&(t[mt(n,"lineHeight")]=o),t},{})}const Ab={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Fo.map(e=>[xl[e],bl(e)]))},Br={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},Fb=[{title:"Salton Sea from Above",...Br,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...Br,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Br,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...Br,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],Nb={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}},required:["image"]},default:Fb},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageHoverEffect:{type:"object",scope:"common",title:"Hover",display:{type:"toggle-cycle-numeric-input",enum:["none","scale","saturate"],inputs:{none:"none",scale:"single",saturate:"none"},defaultValue:120,showDash:!1},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},horizontalGap:{type:"number",scope:"layout",title:"Gutter",min:0,display:{type:"range-control"}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title1Color:{type:"string",scope:"common",title:"Title Lightbox",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Lightbox",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Lightbox",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...gi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},...Mb},defaults:{type:"a",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightbox:"on",imageHoverEffect:{sizeType:"none",value:120,min:100,max:200},titleColor:"#000000",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Pb,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...kb},layoutDefaults:{d:{wrapperWidth:1,horizontalGap:.006944,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,titleFontSize:.0625,titleLineHeight:.05555,titleLetterSpacing:-34722e-8,...ls({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})},m:{wrapperWidth:1,horizontalGap:.026666,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,titleFontSize:.16,titleLineHeight:.13333,...ls({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{wrapperWidth:1,horizontalGap:.01302,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026,titleFontSize:.07,titleLineHeight:.07,...ls({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","type","wrapperWidth","imageDisplay","lightbox","imageHoverEffect","horizontalGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["wrapperWidth","lightbox"]},{type:"row",title:"Image",items:["imageDisplay","imageHoverEffect"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Lightbox",items:[Ab]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},_b={element:Ib,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},...Fo.map(e=>({path:`${mt(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...Fo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${mt(t,"fontFamily")}`}),{})},schema:Nb,sourceCode:Rb},bo=500,qu="cubic-bezier(0.25, 1, 0.5, 1)",Wb=300,Hb=5,Ob=.15,Db=.4,zb=100,io=100,Vc={color:"#000000",hover:"#cccccc"},Yo={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},Bb={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},cs={offset:{x:0,y:0},linkColor:"#cccccc"},Gc={sizeType:"drag",value:3},jb="left";function Vb(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:jb,color:(e==null?void 0:e.titleColor)??"#000000"};return Qt(n,t)}function oo(e,t,n){return`${e}: ${A.scalingValue(t/1440,n)};`}function er(e,t){return t<=0?0:(e%t+t)%t}function Gb(e,t,n,i){if(!i)return{position:er(e+t,n),hitBoundary:!1};const o=e+t;return o>=0&&o<=n+1?{position:o,hitBoundary:!1}:{position:t>0?n+1:0,hitBoundary:!0}}function Xb(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function qb(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,x)=>{n.style.transform=`translate(${p}px, ${x}px)`;const v=n.getBoundingClientRect();return{x:v.left,y:v.top}},o=i(0,0),r=i(io,0),l=i(0,io);e.removeChild(n);const d={x:(r.x-o.x)/io,y:(r.y-o.y)/io},c={x:(l.x-o.x)/io,y:(l.y-o.y)/io},u=d.x*c.y-c.x*d.y;return{ex:d,ey:c,det:u}}function Ub(e,t,n){const{ex:i,ey:o,det:r}=e;return{x:(t*o.y-n*o.x)/r,y:(i.x*n-i.y*t)/r}}function Kb(e,t){return`
19404
+ `,Ab="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),gi={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 Fb(e){const t={};return t[mt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSettings")]={...gi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSize")]={...gi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[mt(e,"lineHeight")]={...gi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[mt(e,"letterSpacing")]={...gi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[mt(e,"wordSpacing")]={...gi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[mt(e,"textAlign")]={...gi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[mt(e,"textAppearance")]={...gi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Fo=Ci.filter(e=>e!=="count"),Nb=Fo.reduce((e,t)=>({...e,...Fb(t)}),{}),_b=Fo.reduce((e,t)=>({...e,[mt(t,"fontFamily")]:"Arial",[mt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[mt(t,"letterSpacing")]:0,[mt(t,"wordSpacing")]:0,[mt(t,"textAlign")]:"left",[mt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function cs(e){return Fo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[mt(n,"fontSize")]=i),o!==void 0&&(t[mt(n,"lineHeight")]=o),t},{})}const Wb={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Fo.map(e=>[bl[e],Sl(e)]))},Br={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},Hb=[{title:"Salton Sea from Above",...Br,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...Br,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Br,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...Br,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],Ob={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}},required:["image"]},default:Hb},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageHoverEffect:{type:"object",scope:"common",title:"Hover",display:{type:"toggle-cycle-numeric-input",enum:["none","scale","saturate"],inputs:{none:"none",scale:"single",saturate:"none"},defaultValue:120,showDash:!1},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},horizontalGap:{type:"number",scope:"layout",title:"Gutter",min:0,display:{type:"range-control"}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title1Color:{type:"string",scope:"common",title:"Title Lightbox",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Lightbox",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Lightbox",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...gi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},...Nb},defaults:{type:"a",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightbox:"on",imageHoverEffect:{sizeType:"none",value:120,min:100,max:200},titleColor:"#000000",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Ab,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},..._b},layoutDefaults:{d:{wrapperWidth:1,horizontalGap:.006944,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,titleFontSize:.0625,titleLineHeight:.05555,titleLetterSpacing:-34722e-8,...cs({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})},m:{wrapperWidth:1,horizontalGap:.026666,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,titleFontSize:.16,titleLineHeight:.13333,...cs({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{wrapperWidth:1,horizontalGap:.01302,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026,titleFontSize:.07,titleLineHeight:.07,...cs({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","type","wrapperWidth","imageDisplay","lightbox","imageHoverEffect","horizontalGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["wrapperWidth","lightbox"]},{type:"row",title:"Image",items:["imageDisplay","imageHoverEffect"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Lightbox",items:[Wb]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},Db={element:Eb,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},...Fo.map(e=>({path:`${mt(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...Fo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${mt(t,"fontFamily")}`}),{})},schema:Ob,sourceCode:Mb},bo=500,Yu="cubic-bezier(0.25, 1, 0.5, 1)",zb=300,Bb=5,jb=.15,Vb=.4,Gb=100,io=100,Gc={color:"#000000",hover:"#cccccc"},Ko={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},Xb={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},ds={offset:{x:0,y:0},linkColor:"#cccccc"},Xc={sizeType:"drag",value:3},qb="left";function Ub(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:qb,color:(e==null?void 0:e.titleColor)??"#000000"};return Qt(n,t)}function oo(e,t,n){return`${e}: ${A.scalingValue(t/1440,n)};`}function er(e,t){return t<=0?0:(e%t+t)%t}function Yb(e,t,n,i){if(!i)return{position:er(e+t,n),hitBoundary:!1};const o=e+t;return o>=0&&o<=n+1?{position:o,hitBoundary:!1}:{position:t>0?n+1:0,hitBoundary:!0}}function Kb(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function Zb(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,x)=>{n.style.transform=`translate(${p}px, ${x}px)`;const y=n.getBoundingClientRect();return{x:y.left,y:y.top}},o=i(0,0),r=i(io,0),l=i(0,io);e.removeChild(n);const d={x:(r.x-o.x)/io,y:(r.y-o.y)/io},c={x:(l.x-o.x)/io,y:(l.y-o.y)/io},u=d.x*c.y-c.x*d.y;return{ex:d,ey:c,det:u}}function Jb(e,t,n){const{ex:i,ey:o,det:r}=e;return{x:(t*o.y-n*o.x)/r,y:(i.x*n-i.y*t)/r}}function Qb(e,t){return`
19405
19405
  .${e}-wrapper {
19406
19406
  position: relative;
19407
19407
  width: 100%;
@@ -19473,7 +19473,7 @@ export function Waterfall({
19473
19473
  top: 0;
19474
19474
  left: 0;
19475
19475
  opacity: 0;
19476
- transition: opacity ${bo}ms ${qu};
19476
+ transition: opacity ${bo}ms ${Yu};
19477
19477
  }
19478
19478
  .${e}-list-fade .${e}-slide.${e}-is-active {
19479
19479
  opacity: 1;
@@ -19671,7 +19671,7 @@ export function Waterfall({
19671
19671
  from { clip-path: inset(100% 0 0 0); }
19672
19672
  to { clip-path: inset(0 0 0 0); }
19673
19673
  }
19674
- `}function Yb({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=A.useScopedStyles(),l=Vb(e,n),d=t??[],c=d.length,u=(e==null?void 0:e.trigger)??Gc,p=u.sizeType??"drag",x=u.value??Gc.value,v=(e==null?void 0:e.direction)??"horizontal",m=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",y=(e==null?void 0:e.navSize)??"m",b=Bb[y],C=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,S=fe=>A.scalingValue(fe*C,n),w=(e==null?void 0:e.show)??"always",D=(e==null?void 0:e.controls)??null,_=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,z=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,H=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,L=(e==null?void 0:e.controlsColor)??Vc.color,V=(e==null?void 0:e.controlsHoverColor)??Vc.hover,$=(e==null?void 0:e.navColor)??Yo.colors.inactive,E=(e==null?void 0:e.navPaginationColor)??Yo.colors.pagination,F=(e==null?void 0:e.navBackgroundColor)??Yo.colors.background,W=(e==null?void 0:e.linkColor)??cs.linkColor,g=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,M=v==="horizontal",R=p==="click",G=p==="drag",Z=p==="auto"&&(!n||!!i),T=!n,j=m==="slide",Y=h==="classic",le=w!=="never"&&_>0,se=w==="on hover",k=A.scalingValue(_,n),re={width:k,height:k,maxWidth:k},q=j&&c>1,[ce,J]=s.useState(0),[be,We]=s.useState(q?1:0),[ye,ue]=s.useState(!1),[ee,de]=s.useState(!1),[ne,Pe]=s.useState(!1),[Te,Oe]=s.useState(0),[ve,Se]=s.useState(!1),[$e,f]=s.useState(!1),X=s.useRef(!1),N=s.useRef(be);N.current=be;const U=s.useRef(null),me=s.useRef(0),K=s.useRef(null),I=s.useRef(null),ie=s.useRef(null),oe=s.useRef(null),B=s.useCallback(fe=>{X.current=fe,ue(fe)},[]),te=s.useCallback(fe=>{if(c<2||fe===0)return;const He=fe>0?1:-1,Be=Math.abs(fe);if(Se(!0),B(!0),!j){J(Me=>er(Me+fe,c));return}let Je=N.current;const Ce=q&&(Je===0||Je===c+1),De=Ce?ce+1:null;Ce&&(Je=ce+1);let Xe=Be;for(;Xe>0;){const Me=Gb(Je,He,c,q);if(Je=Me.position,Xe-=1,Me.hitBoundary){me.current=Xe*He;break}}const ge=Be-Xe;if(ge>0&&J(Me=>er(Me+ge*He,c)),N.current=Je,De!==null){if(N.current=De,Je===De){de(!0),We(Je);return}U.current=Je,de(!0),We(De);return}de(!1),We(Je)},[ce,c,q,j,B]),Ae=s.useCallback(fe=>{te(fe)},[te]),he=s.useCallback(fe=>{if(c<2)return;const He=er(fe,c);if(!(He===ce&&!X.current)&&(Se(!0),B(!0),J(He),j)){const Be=He+(q?1:0);U.current=null,me.current=0,N.current=Be,de(!1),We(Be)}},[ce,c,q,j,B]);s.useEffect(()=>{if(!ye)return;const fe=window.setTimeout(()=>{if(q&&(be===0||be===c+1)){U.current=null,de(!0),We(ce+1);return}B(!1)},bo);return()=>window.clearTimeout(fe)},[ce,c,q,ye,B,be]),s.useEffect(()=>{if(!ee)return;let fe=0;const He=requestAnimationFrame(()=>{fe=requestAnimationFrame(()=>{const Be=U.current;U.current=null;const Je=me.current;if(me.current=0,de(!1),Be!==null){N.current=Be,We(Be);return}if(Je!==0){te(Je);return}B(!1)})});return()=>{cancelAnimationFrame(He),cancelAnimationFrame(fe)}},[te,B,ee]);const Q=`${q}:${c}`,Ze=s.useRef(Q);s.useEffect(()=>{if(Ze.current===Q)return;Ze.current=Q;const fe=c>0?Math.min(ce,c-1):0;ie.current=null,oe.current=null,Pe(!1),Oe(0),J(fe),de(!0),We(fe+(q?1:0))},[ce,c,q,Q]),s.useEffect(()=>{if(!ve)return;const fe=window.setTimeout(()=>Se(!1),Wb);return()=>window.clearTimeout(fe)},[ve,ce]),s.useEffect(()=>{if(!Z||c<2)return;const fe=Math.max(x,.1)*1e3,He=window.setInterval(()=>{T&&$e||Ae(1)},fe);return()=>window.clearInterval(He)},[x,c,Ae,Z,$e,T]);const Fe=s.useCallback(fe=>{const He=ie.current;if(!He||He.pointerId!==fe.pointerId)return;ie.current=null,oe.current=null;const Be=K.current;if(Be!=null&&Be.hasPointerCapture(fe.pointerId)&&Be.releasePointerCapture(fe.pointerId),!He.isActive){j&&Oe(0);return}const Ce=!(fe.timeStamp-He.lastTime>zb)&&Math.abs(He.velocity)>Db,De=He.size>0&&Math.abs(He.offset-He.baseOffset)>He.size*Ob;if(Pe(!1),!Ce&&!De){Oe(0);return}const Xe=De?He.offset-He.baseOffset:He.velocity;let ge=1;De&&He.size>0&&(ge=Math.max(1,Math.round(Math.abs(Xe)/He.size))),Oe(0),te(Xe<0?ge:-ge)},[te,j]);s.useEffect(()=>{const fe=He=>{oe.current===null||He.pointerId!==oe.current||Fe(He)};return window.addEventListener("pointerup",fe),window.addEventListener("pointercancel",fe),()=>{window.removeEventListener("pointerup",fe),window.removeEventListener("pointercancel",fe)}},[Fe]);const et=fe=>{const He=K.current;if(!G||c<2||!He||fe.pointerType==="mouse"&&fe.button!==0)return;U.current=null,me.current=0,X.current&&B(!1);let Be=0;const Je=I.current;if(j&&Je){const Ce=M?Je.offsetWidth:Je.offsetHeight;if(Ce>0){const De=Xb(Je,M);let Xe=N.current;q&&(Xe===0||Xe===c+1)?(Xe=ce+1,N.current=Xe,de(!0),We(Xe),Be=0):Be=De+Xe*Ce,Oe(Be)}}He.setPointerCapture(fe.pointerId),oe.current=fe.pointerId,ie.current={pointerId:fe.pointerId,startClientX:fe.clientX,startClientY:fe.clientY,axes:qb(He,`${r}-axis-probe`),size:M?He.offsetWidth:He.offsetHeight,isActive:!1,baseOffset:Be,offset:Be,lastTime:fe.timeStamp,velocity:0}},Ue=fe=>{const He=ie.current;if(!He||He.pointerId!==fe.pointerId)return;if(fe.pointerType==="mouse"&&fe.buttons===0){Fe(fe);return}const Be=fe.clientX-He.startClientX,Je=fe.clientY-He.startClientY,Ce=He.axes?Ub(He.axes,Be,Je):{x:Be,y:Je},De=M?Ce.x:Ce.y,Xe=M?Ce.y:Ce.x,ge=He.baseOffset+De;if(!He.isActive){if(Math.max(Math.abs(De),Math.abs(Xe))<Hb)return;if(Math.abs(Xe)>Math.abs(De)){const ze=K.current;ze!=null&&ze.hasPointerCapture(He.pointerId)&&ze.releasePointerCapture(He.pointerId),ie.current=null,oe.current=null,j&&Oe(0);return}He.isActive=!0,Pe(!0)}const Me=fe.timeStamp-He.lastTime;Me>0&&(He.velocity=(ge-He.offset)/Me,He.lastTime=fe.timeStamp),He.offset=ge,j&&Oe(ge)},nt=fe=>{Fe(fe)},tt=M?`translate3d(calc(${-be*100}% + ${Te}px), 0, 0)`:`translate3d(0, calc(${-be*100}% + ${Te}px), 0)`,Ve=q?[d[c-1],...d,d[0]]:d;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Kb(r,n)}}),a.jsxs("div",{className:St(`${r}-wrapper`,{[`${r}-transition-reveal`]:m==="reveal",[`${r}-transition-reveal-vertical`]:m==="reveal"&&!M}),onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsx("div",{ref:K,className:St(`${r}-track`,{[`${r}-track-draggable`]:G,[`${r}-track-draggable-vertical`]:G&&!M}),onPointerDown:et,onPointerMove:Ue,onPointerUp:nt,onPointerCancel:nt,onLostPointerCapture:fe=>{oe.current===fe.pointerId&&Fe(fe)},children:a.jsx("div",{ref:I,className:St(`${r}-list`,{[`${r}-list-slide`]:j,[`${r}-list-slide-vertical`]:j&&!M,[`${r}-list-fade`]:!j}),style:j?{transform:tt,transition:ne||ee?"none":`transform ${bo}ms ${qu}`}:void 0,children:Ve.map((fe,He)=>{const Be=q?er(He-1,c):He,Ce=q&&(He===0||He===c+1)?`clone-${He===0?"start":"end"}`:`slide-${Be}`;return a.jsx("div",{className:St(`${r}-slide`,{[`${r}-is-active`]:!j&&Be===ce}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:St(`${r}-slider-image`,{[`${r}-contain`]:fe.image.objectFit==="contain",[`${r}-cover`]:fe.image.objectFit==="cover"}),src:fe.image.url,alt:fe.image.name??"",draggable:!1})})})},Ce)})})}),le&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:St(`${r}-arrow`,{[`${r}-arrow-prev`]:M,[`${r}-arrow-prev-vertical`]:!M,[`${r}-hover-arrow`]:se}),style:{color:L,"--arrow-hover-color":V,...re},children:a.jsxs("button",{onClick:fe=>{fe.stopPropagation(),Ae(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${A.scalingValue(z,n)}, ${A.scalingValue(H*(M?1:-1),n)}) rotate(${M?"0deg":"90deg"})`},children:[D&&a.jsx(un,{url:D,fill:L,hoverFill:V,className:St(`${r}-arrow-img`,`${r}-mirror`),style:re}),!D&&a.jsx(Xc,{color:L,className:St(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:St(`${r}-arrow`,{[`${r}-arrow-next`]:M,[`${r}-arrow-next-vertical`]:!M,[`${r}-hover-arrow`]:se}),style:{color:L,"--arrow-hover-color":V,...re},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:fe=>{fe.stopPropagation(),Ae(1)},style:{transform:`translate(${A.scalingValue(z*(M?-1:1),n)}, ${A.scalingValue(H,n)}) rotate(${M?"0deg":"90deg"})`},children:[D&&a.jsx(un,{url:D,fill:L,hoverFill:V,className:`${r}-arrow-img`,style:re}),!D&&a.jsx(Xc,{color:L,className:St(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),R&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>Ae(1)}),Y&&a.jsx("div",{className:St(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:M,[`${r}-pagination-inside-left`]:!M}),style:M?{bottom:S(b.inset)}:{left:S(b.inset)},children:a.jsx("div",{className:St(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!M,[`${r}-animate-dots`]:ve}),style:{backgroundColor:F,gap:S(b.gapInactive-b.activeDot+b.dot),...M?{height:S(b.activeDot+b.paddingY*2),paddingTop:S(b.paddingY),paddingBottom:S(b.paddingY),paddingLeft:S(b.paddingActive),paddingRight:S(b.paddingActive)}:{width:S(b.activeDot+b.paddingY*2),paddingLeft:S(b.paddingY),paddingRight:S(b.paddingY),paddingTop:S(b.paddingActive),paddingBottom:S(b.paddingActive)},borderRadius:S(b.borderRadius),transform:`translate(${A.scalingValue(Yo.offset.x,n)}, ${A.scalingValue(Yo.offset.y,n)})`},children:d.map((fe,He)=>{const Be=He===ce,Je=Be?b.activeDot:b.dot;return a.jsx("button",{onClick:()=>he(He),className:`${r}-pagination-item`,style:{width:S(b.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:Be?E:$,width:S(Je)}})},He)})},`${y}-${v}`)})]}),a.jsxs("div",{className:`${r}-caption-block`,children:[a.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${r}-control`:void 0,style:{height:A.scalingValue(g,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:d.map((fe,He)=>a.jsx("div",{className:St(`${r}-caption-text`,{[`${r}-with-pointer-events`]:He===ce&&n,[`${r}-active`]:He===ce}),style:{...l,width:"max-content",transitionDuration:`${Math.round(bo/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":W,"--link-hover-color":W,position:"relative",top:A.scalingValue(cs.offset.y,n),left:A.scalingValue(cs.offset.x,n)},children:a.jsx(Yi,{content:fe.imageCaption})})},He))})]})]})]})}function Xc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Zb=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19674
+ `}function eS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=A.useScopedStyles(),l=Ub(e,n),d=t??[],c=d.length,u=(e==null?void 0:e.trigger)??Xc,p=u.sizeType??"drag",x=u.value??Xc.value,y=(e==null?void 0:e.direction)??"horizontal",m=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",v=(e==null?void 0:e.navSize)??"m",b=Xb[v],C=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,S=fe=>A.scalingValue(fe*C,n),w=(e==null?void 0:e.show)??"always",D=(e==null?void 0:e.controls)??null,_=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,z=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,H=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,L=(e==null?void 0:e.controlsColor)??Gc.color,V=(e==null?void 0:e.controlsHoverColor)??Gc.hover,$=(e==null?void 0:e.navColor)??Ko.colors.inactive,k=(e==null?void 0:e.navPaginationColor)??Ko.colors.pagination,F=(e==null?void 0:e.navBackgroundColor)??Ko.colors.background,W=(e==null?void 0:e.linkColor)??ds.linkColor,g=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,E=y==="horizontal",R=p==="click",G=p==="drag",Z=p==="auto"&&(!n||!!i),T=!n,j=m==="slide",K=h==="classic",le=w!=="never"&&_>0,se=w==="on hover",M=A.scalingValue(_,n),re={width:M,height:M,maxWidth:M},q=j&&c>1,[ce,J]=s.useState(0),[be,We]=s.useState(q?1:0),[ye,ue]=s.useState(!1),[ee,de]=s.useState(!1),[ne,Pe]=s.useState(!1),[Te,Oe]=s.useState(0),[ve,Se]=s.useState(!1),[$e,f]=s.useState(!1),X=s.useRef(!1),N=s.useRef(be);N.current=be;const U=s.useRef(null),me=s.useRef(0),Y=s.useRef(null),I=s.useRef(null),ie=s.useRef(null),oe=s.useRef(null),B=s.useCallback(fe=>{X.current=fe,ue(fe)},[]),te=s.useCallback(fe=>{if(c<2||fe===0)return;const He=fe>0?1:-1,Be=Math.abs(fe);if(Se(!0),B(!0),!j){J(Ee=>er(Ee+fe,c));return}let Je=N.current;const Ce=q&&(Je===0||Je===c+1),De=Ce?ce+1:null;Ce&&(Je=ce+1);let Xe=Be;for(;Xe>0;){const Ee=Yb(Je,He,c,q);if(Je=Ee.position,Xe-=1,Ee.hitBoundary){me.current=Xe*He;break}}const ge=Be-Xe;if(ge>0&&J(Ee=>er(Ee+ge*He,c)),N.current=Je,De!==null){if(N.current=De,Je===De){de(!0),We(Je);return}U.current=Je,de(!0),We(De);return}de(!1),We(Je)},[ce,c,q,j,B]),Ae=s.useCallback(fe=>{te(fe)},[te]),he=s.useCallback(fe=>{if(c<2)return;const He=er(fe,c);if(!(He===ce&&!X.current)&&(Se(!0),B(!0),J(He),j)){const Be=He+(q?1:0);U.current=null,me.current=0,N.current=Be,de(!1),We(Be)}},[ce,c,q,j,B]);s.useEffect(()=>{if(!ye)return;const fe=window.setTimeout(()=>{if(q&&(be===0||be===c+1)){U.current=null,de(!0),We(ce+1);return}B(!1)},bo);return()=>window.clearTimeout(fe)},[ce,c,q,ye,B,be]),s.useEffect(()=>{if(!ee)return;let fe=0;const He=requestAnimationFrame(()=>{fe=requestAnimationFrame(()=>{const Be=U.current;U.current=null;const Je=me.current;if(me.current=0,de(!1),Be!==null){N.current=Be,We(Be);return}if(Je!==0){te(Je);return}B(!1)})});return()=>{cancelAnimationFrame(He),cancelAnimationFrame(fe)}},[te,B,ee]);const Q=`${q}:${c}`,Ze=s.useRef(Q);s.useEffect(()=>{if(Ze.current===Q)return;Ze.current=Q;const fe=c>0?Math.min(ce,c-1):0;ie.current=null,oe.current=null,Pe(!1),Oe(0),J(fe),de(!0),We(fe+(q?1:0))},[ce,c,q,Q]),s.useEffect(()=>{if(!ve)return;const fe=window.setTimeout(()=>Se(!1),zb);return()=>window.clearTimeout(fe)},[ve,ce]),s.useEffect(()=>{if(!Z||c<2)return;const fe=Math.max(x,.1)*1e3,He=window.setInterval(()=>{T&&$e||Ae(1)},fe);return()=>window.clearInterval(He)},[x,c,Ae,Z,$e,T]);const Fe=s.useCallback(fe=>{const He=ie.current;if(!He||He.pointerId!==fe.pointerId)return;ie.current=null,oe.current=null;const Be=Y.current;if(Be!=null&&Be.hasPointerCapture(fe.pointerId)&&Be.releasePointerCapture(fe.pointerId),!He.isActive){j&&Oe(0);return}const Ce=!(fe.timeStamp-He.lastTime>Gb)&&Math.abs(He.velocity)>Vb,De=He.size>0&&Math.abs(He.offset-He.baseOffset)>He.size*jb;if(Pe(!1),!Ce&&!De){Oe(0);return}const Xe=De?He.offset-He.baseOffset:He.velocity;let ge=1;De&&He.size>0&&(ge=Math.max(1,Math.round(Math.abs(Xe)/He.size))),Oe(0),te(Xe<0?ge:-ge)},[te,j]);s.useEffect(()=>{const fe=He=>{oe.current===null||He.pointerId!==oe.current||Fe(He)};return window.addEventListener("pointerup",fe),window.addEventListener("pointercancel",fe),()=>{window.removeEventListener("pointerup",fe),window.removeEventListener("pointercancel",fe)}},[Fe]);const et=fe=>{const He=Y.current;if(!G||c<2||!He||fe.pointerType==="mouse"&&fe.button!==0)return;U.current=null,me.current=0,X.current&&B(!1);let Be=0;const Je=I.current;if(j&&Je){const Ce=E?Je.offsetWidth:Je.offsetHeight;if(Ce>0){const De=Kb(Je,E);let Xe=N.current;q&&(Xe===0||Xe===c+1)?(Xe=ce+1,N.current=Xe,de(!0),We(Xe),Be=0):Be=De+Xe*Ce,Oe(Be)}}He.setPointerCapture(fe.pointerId),oe.current=fe.pointerId,ie.current={pointerId:fe.pointerId,startClientX:fe.clientX,startClientY:fe.clientY,axes:Zb(He,`${r}-axis-probe`),size:E?He.offsetWidth:He.offsetHeight,isActive:!1,baseOffset:Be,offset:Be,lastTime:fe.timeStamp,velocity:0}},Ue=fe=>{const He=ie.current;if(!He||He.pointerId!==fe.pointerId)return;if(fe.pointerType==="mouse"&&fe.buttons===0){Fe(fe);return}const Be=fe.clientX-He.startClientX,Je=fe.clientY-He.startClientY,Ce=He.axes?Jb(He.axes,Be,Je):{x:Be,y:Je},De=E?Ce.x:Ce.y,Xe=E?Ce.y:Ce.x,ge=He.baseOffset+De;if(!He.isActive){if(Math.max(Math.abs(De),Math.abs(Xe))<Bb)return;if(Math.abs(Xe)>Math.abs(De)){const ze=Y.current;ze!=null&&ze.hasPointerCapture(He.pointerId)&&ze.releasePointerCapture(He.pointerId),ie.current=null,oe.current=null,j&&Oe(0);return}He.isActive=!0,Pe(!0)}const Ee=fe.timeStamp-He.lastTime;Ee>0&&(He.velocity=(ge-He.offset)/Ee,He.lastTime=fe.timeStamp),He.offset=ge,j&&Oe(ge)},nt=fe=>{Fe(fe)},tt=E?`translate3d(calc(${-be*100}% + ${Te}px), 0, 0)`:`translate3d(0, calc(${-be*100}% + ${Te}px), 0)`,Ve=q?[d[c-1],...d,d[0]]:d;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Qb(r,n)}}),a.jsxs("div",{className:St(`${r}-wrapper`,{[`${r}-transition-reveal`]:m==="reveal",[`${r}-transition-reveal-vertical`]:m==="reveal"&&!E}),onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsx("div",{ref:Y,className:St(`${r}-track`,{[`${r}-track-draggable`]:G,[`${r}-track-draggable-vertical`]:G&&!E}),onPointerDown:et,onPointerMove:Ue,onPointerUp:nt,onPointerCancel:nt,onLostPointerCapture:fe=>{oe.current===fe.pointerId&&Fe(fe)},children:a.jsx("div",{ref:I,className:St(`${r}-list`,{[`${r}-list-slide`]:j,[`${r}-list-slide-vertical`]:j&&!E,[`${r}-list-fade`]:!j}),style:j?{transform:tt,transition:ne||ee?"none":`transform ${bo}ms ${Yu}`}:void 0,children:Ve.map((fe,He)=>{const Be=q?er(He-1,c):He,Ce=q&&(He===0||He===c+1)?`clone-${He===0?"start":"end"}`:`slide-${Be}`;return a.jsx("div",{className:St(`${r}-slide`,{[`${r}-is-active`]:!j&&Be===ce}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:St(`${r}-slider-image`,{[`${r}-contain`]:fe.image.objectFit==="contain",[`${r}-cover`]:fe.image.objectFit==="cover"}),src:fe.image.url,alt:fe.image.name??"",draggable:!1})})})},Ce)})})}),le&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:St(`${r}-arrow`,{[`${r}-arrow-prev`]:E,[`${r}-arrow-prev-vertical`]:!E,[`${r}-hover-arrow`]:se}),style:{color:L,"--arrow-hover-color":V,...re},children:a.jsxs("button",{onClick:fe=>{fe.stopPropagation(),Ae(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${A.scalingValue(z,n)}, ${A.scalingValue(H*(E?1:-1),n)}) rotate(${E?"0deg":"90deg"})`},children:[D&&a.jsx(un,{url:D,fill:L,hoverFill:V,className:St(`${r}-arrow-img`,`${r}-mirror`),style:re}),!D&&a.jsx(qc,{color:L,className:St(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:St(`${r}-arrow`,{[`${r}-arrow-next`]:E,[`${r}-arrow-next-vertical`]:!E,[`${r}-hover-arrow`]:se}),style:{color:L,"--arrow-hover-color":V,...re},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:fe=>{fe.stopPropagation(),Ae(1)},style:{transform:`translate(${A.scalingValue(z*(E?-1:1),n)}, ${A.scalingValue(H,n)}) rotate(${E?"0deg":"90deg"})`},children:[D&&a.jsx(un,{url:D,fill:L,hoverFill:V,className:`${r}-arrow-img`,style:re}),!D&&a.jsx(qc,{color:L,className:St(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),R&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>Ae(1)}),K&&a.jsx("div",{className:St(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:E,[`${r}-pagination-inside-left`]:!E}),style:E?{bottom:S(b.inset)}:{left:S(b.inset)},children:a.jsx("div",{className:St(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!E,[`${r}-animate-dots`]:ve}),style:{backgroundColor:F,gap:S(b.gapInactive-b.activeDot+b.dot),...E?{height:S(b.activeDot+b.paddingY*2),paddingTop:S(b.paddingY),paddingBottom:S(b.paddingY),paddingLeft:S(b.paddingActive),paddingRight:S(b.paddingActive)}:{width:S(b.activeDot+b.paddingY*2),paddingLeft:S(b.paddingY),paddingRight:S(b.paddingY),paddingTop:S(b.paddingActive),paddingBottom:S(b.paddingActive)},borderRadius:S(b.borderRadius),transform:`translate(${A.scalingValue(Ko.offset.x,n)}, ${A.scalingValue(Ko.offset.y,n)})`},children:d.map((fe,He)=>{const Be=He===ce,Je=Be?b.activeDot:b.dot;return a.jsx("button",{onClick:()=>he(He),className:`${r}-pagination-item`,style:{width:S(b.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:Be?k:$,width:S(Je)}})},He)})},`${v}-${y}`)})]}),a.jsxs("div",{className:`${r}-caption-block`,children:[a.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${r}-control`:void 0,style:{height:A.scalingValue(g,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:d.map((fe,He)=>a.jsx("div",{className:St(`${r}-caption-text`,{[`${r}-with-pointer-events`]:He===ce&&n,[`${r}-active`]:He===ce}),style:{...l,width:"max-content",transitionDuration:`${Math.round(bo/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":W,"--link-hover-color":W,position:"relative",top:A.scalingValue(ds.offset.y,n),left:A.scalingValue(ds.offset.x,n)},children:a.jsx(Ki,{content:fe.imageCaption})})},He))})]})]})]})}function qc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const tS=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19675
19675
  import cn from 'classnames';
19676
19676
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
19677
19677
  import { scalingValue } from '../utils/scalingValue';
@@ -20852,14 +20852,14 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
20852
20852
  </svg>
20853
20853
  );
20854
20854
  }
20855
- `,Jb={type:"object",version:1,settings:{sizing:"manual",properties:{trigger:{type:"object",scope:"common",title:"Trigger",display:{type:"toggle-cycle-numeric-input",enum:["click","drag","auto"],inputs:{click:"none",drag:"none",auto:"single"},defaultValue:3,showDash:!1},min:1,max:5,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical"]}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["slide","fade in","reveal"]}},nav:{type:"string",scope:"common",title:"Nav",display:{type:"toggle-cycle",enum:["classic","no"]}},navSize:{type:"string",scope:"layout",title:"Nav Size",display:{type:"toggle-cycle",enum:["s","m","l"]}},navUnit:{type:"number",scope:"layout",title:"",display:{type:"numeric-input",visible:!1},min:0,max:1},controls:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},controlsMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},show:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","on hover","never"]}},paddingX:{type:"number",scope:"layout",title:"Padding X",display:{type:"numeric-input"},min:-9999,max:9999},paddingY:{type:"number",scope:"layout",title:"Padding Y",display:{type:"numeric-input"},min:-9999,max:9999},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"palette-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"palette-color-picker"}},navColor:{type:"string",scope:"common",title:"Dot Nav",display:{type:"palette-color-picker"}},navPaginationColor:{type:"string",scope:"common",title:"Active Nav",display:{type:"palette-color-picker"}},navBackgroundColor:{type:"string",scope:"common",title:"BG Nav",display:{type:"palette-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"palette-color-picker"}},titleColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{type:"object",scope:"common",title:"",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}}},defaults:{trigger:{sizeType:"drag",value:3,min:1,max:5},direction:"horizontal",transition:"slide",nav:"classic",controls:null,show:"always",controlsColor:"#000000",controlsHoverColor:"#3F3F3F",navColor:"#A4A4A4",navPaginationColor:"#FFFFFF",navBackgroundColor:"#000000",linkColor:"#2E12F0",titleColor:"#000000",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{controlsMaxWidth:30/1440,paddingX:0,paddingY:0,captionMarginTop:10/1440,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,captionMarginTop:10/768,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,captionMarginTop:10/375,titleFontSize:16/375,titleLineHeight:16/375,navSize:"m",navUnit:1/375}},displayRules:[{if:{name:"show",value:"never"},then:{name:"properties.controlsColor.display.visible",value:!1}},{if:{name:"show",value:"never"},then:{name:"properties.controlsHoverColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navPaginationColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navBackgroundColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navSize.display.visible",value:!1}}],layout:["__componentName__","trigger","direction","transition","nav","navSize","controls","controlsMaxWidth","show","paddingX","paddingY","captionMarginTop","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["trigger","direction"]},{type:"row",title:"",items:["transition","nav"]},{type:"row",title:"",items:["navSize"]},{type:"group",title:"Controls",items:[{type:"row",title:"",items:["controls","controlsMaxWidth"]},{type:"row",title:"",items:["paddingX","paddingY"]},{type:"row",title:"",items:["show"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]}]}],paletteBookmark:{items:["controlsColor","controlsHoverColor","navPaginationColor","navColor","navBackgroundColor","titleColor","linkColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},Qb={element:Yb,id:"slider-2-0",name:"Slider 2.0",category:"galleries",version:1,defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},schema:Jb,sourceCode:Zb,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},uo=300/1440,eS=8/1440,zi=.004;function tS(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function qc(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Uc(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:A.scalingValue((o-t)/2,i)}}function nS(e){return`
20855
+ `,nS={type:"object",version:1,settings:{sizing:"manual",properties:{trigger:{type:"object",scope:"common",title:"Trigger",display:{type:"toggle-cycle-numeric-input",enum:["click","drag","auto"],inputs:{click:"none",drag:"none",auto:"single"},defaultValue:3,showDash:!1},min:1,max:5,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical"]}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["slide","fade in","reveal"]}},nav:{type:"string",scope:"common",title:"Nav",display:{type:"toggle-cycle",enum:["classic","no"]}},navSize:{type:"string",scope:"layout",title:"Nav Size",display:{type:"toggle-cycle",enum:["s","m","l"]}},navUnit:{type:"number",scope:"layout",title:"",display:{type:"numeric-input",visible:!1},min:0,max:1},controls:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},controlsMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},show:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","on hover","never"]}},paddingX:{type:"number",scope:"layout",title:"Padding X",display:{type:"numeric-input"},min:-9999,max:9999},paddingY:{type:"number",scope:"layout",title:"Padding Y",display:{type:"numeric-input"},min:-9999,max:9999},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"palette-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"palette-color-picker"}},navColor:{type:"string",scope:"common",title:"Dot Nav",display:{type:"palette-color-picker"}},navPaginationColor:{type:"string",scope:"common",title:"Active Nav",display:{type:"palette-color-picker"}},navBackgroundColor:{type:"string",scope:"common",title:"BG Nav",display:{type:"palette-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"palette-color-picker"}},titleColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{type:"object",scope:"common",title:"",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}}},defaults:{trigger:{sizeType:"drag",value:3,min:1,max:5},direction:"horizontal",transition:"slide",nav:"classic",controls:null,show:"always",controlsColor:"#000000",controlsHoverColor:"#3F3F3F",navColor:"#A4A4A4",navPaginationColor:"#FFFFFF",navBackgroundColor:"#000000",linkColor:"#2E12F0",titleColor:"#000000",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{controlsMaxWidth:30/1440,paddingX:0,paddingY:0,captionMarginTop:10/1440,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,captionMarginTop:10/768,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,captionMarginTop:10/375,titleFontSize:16/375,titleLineHeight:16/375,navSize:"m",navUnit:1/375}},displayRules:[{if:{name:"show",value:"never"},then:{name:"properties.controlsColor.display.visible",value:!1}},{if:{name:"show",value:"never"},then:{name:"properties.controlsHoverColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navPaginationColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navBackgroundColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navSize.display.visible",value:!1}}],layout:["__componentName__","trigger","direction","transition","nav","navSize","controls","controlsMaxWidth","show","paddingX","paddingY","captionMarginTop","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["trigger","direction"]},{type:"row",title:"",items:["transition","nav"]},{type:"row",title:"",items:["navSize"]},{type:"group",title:"Controls",items:[{type:"row",title:"",items:["controls","controlsMaxWidth"]},{type:"row",title:"",items:["paddingX","paddingY"]},{type:"row",title:"",items:["show"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]}]}],paletteBookmark:{items:["controlsColor","controlsHoverColor","navPaginationColor","navColor","navBackgroundColor","titleColor","linkColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},iS={element:eS,id:"slider-2-0",name:"Slider 2.0",category:"galleries",version:1,defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},schema:nS,sourceCode:tS,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},uo=300/1440,oS=8/1440,zi=.004;function rS(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Uc(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Yc(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:A.scalingValue((o-t)/2,i)}}function aS(e){return`
20856
20856
  .${e}-wrapper {
20857
20857
  box-sizing: border-box;
20858
20858
  display: flex;
20859
20859
  flex-direction: column;
20860
20860
  position: relative;
20861
20861
  width: 100%;
20862
- min-height: ${tS(48)};
20862
+ min-height: ${rS(48)};
20863
20863
  }
20864
20864
  .${e}-single-title-layer {
20865
20865
  position: absolute;
@@ -21069,7 +21069,7 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
21069
21069
  width: var(--cntrl-article-width, 100vw) !important;
21070
21070
  height: var(--cntrl-viewport-height, 100vh) !important;
21071
21071
  }
21072
- `}const iS="rgba(28,31,34,0.9)",Kn=500,Oi="cubic-bezier(0.22, 1, 0.36, 1)",oS=72,rS=50,aS={titleColor:"title-color",lightboxCounterColor:"lightbox-counter-color"},sS=[];function lS(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function cS(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function dS(e){const[t]=e.media;return t!=null&&t.url?t:null}function uS(e){if(!Array.isArray(e)||e.length===0)return[];if(lS(e)){const t=[];for(const n of e){const i=cS(n);if(!i)continue;const o=dS(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ns(e){return e.type==="video"}function pS(e){e.pause(),e.removeAttribute("src"),e.load()}function jr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function mS(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const gS=1140/1440;function hS(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function fS(e){const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`}function yS(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function vS({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:d}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{pS(c)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:d,style:i})}function xS({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:d,counterClassName:c,counterStyle:u,backgroundColor:p}){const x=i==="cover",v=s.useRef(null),m=s.useRef(null),h=s.useRef(null),y=s.useRef(0),b=s.useRef(0),C=s.useRef("none"),S=s.useRef(!1),w=s.useRef(!1),D=s.useRef(!1),_=s.useRef(null),[z,H]=s.useState(null),[L,V]=s.useState("opening"),[$,E]=s.useState(0),[F,W]=s.useState(0),[g,M]=s.useState(!1),[R,G]=s.useState(!1),[Z,T]=s.useState(!1),j=s.useRef(n),Y=t[n],le=Y?Ns(Y):!1,se=F!==0||g,k=s.useCallback(ve=>{D.current=ve,M(ve)},[]),re=s.useCallback(()=>{_.current!==null&&(window.clearTimeout(_.current),_.current=null)},[]),q=s.useCallback(()=>{re(),_.current=window.setTimeout(()=>{re(),k(!1)},Kn+32)},[re,k]),ce=s.useCallback(()=>{const ve=v.current,Se=m.current;if(!ve)return;const $e=ve.getBoundingClientRect(),f=$e.width,X=$e.height;if(!f||!X)return;if(i==="cover"){H({width:f,height:X,left:$e.left,top:$e.top});return}if(!Se){H(jr(ve));return}const{width:N,height:U}=mS(Se);if(!N||!U){H(jr(ve));return}const me=N/U,K=f/X;if(me>K){const I=f/me;H({width:f,height:I,left:$e.left,top:$e.top+(X-I)/2})}else{const I=X*me;H({width:I,height:X,left:$e.left+(f-I)/2,top:$e.top})}},[i]);s.useEffect(()=>{ce();const ve=v.current;if(!ve)return;const Se=new ResizeObserver(()=>ce());return Se.observe(ve),()=>Se.disconnect()},[ce,n]),s.useEffect(()=>{L==="opening"&&z&&V("open")},[L,z]),s.useEffect(()=>{if(L!=="closing")return;const ve=setTimeout(()=>r(),Kn);return()=>clearTimeout(ve)},[L,r]),s.useEffect(()=>()=>{re()},[re]),s.useLayoutEffect(()=>{if(j.current===n)return;re(),E(0),W(0),k(!1),T(!1),G(!1),y.current=0,b.current=0,C.current="none",S.current=!1,h.current=null,w.current=!1;const ve=v.current;ve&&H(jr(ve)),j.current=n},[n,k,re]),s.useEffect(()=>{if(L!=="open")return;let ve=null;const Se=()=>{ve&&(document.removeEventListener("click",ve,!0),ve=null)},$e=()=>{Se(),ve=K=>{K.stopPropagation(),K.preventDefault(),Se()},document.addEventListener("click",ve,!0)},f=K=>{re(),D.current=!1,M(!1),W(0),G(!1),S.current=!1,b.current=0,C.current="none";const I=v.current;I&&H(jr(I)),K<0?d():l()},X=K=>{if(Math.abs(K)>rS&&t.length>1){f(K);return}k(!0),W(0),q()},N=K=>{if(K.touches.length!==1||D.current)return;const I=K.touches[0];w.current=!0,h.current={x:I.clientX,y:I.clientY},C.current="none",b.current=0,S.current=!1},U=K=>{if(!h.current||K.touches.length!==1||D.current)return;const I=K.touches[0],ie=I.clientX-h.current.x,oe=I.clientY-h.current.y;if(C.current==="none"){if(Math.abs(ie)<10&&Math.abs(oe)<10)return;if(Math.abs(ie)>Math.abs(oe)){if(t.length<=1)return;C.current="horizontal"}else if(oe>0)C.current="vertical";else return}if(C.current==="horizontal"){S.current=!0,G(!0),b.current=ie,W(ie),K.preventDefault();return}C.current==="vertical"&&(S.current=!0,G(!0),y.current=oe,E(oe),K.preventDefault())},me=()=>{if(!h.current)return;const K=C.current,I=S.current;if(I&&K==="horizontal")X(b.current),$e();else if(I&&K==="vertical")if(y.current>oS){const oe=window.innerHeight;y.current=oe,T(!0),E(oe),V("closing")}else y.current=0,E(0),$e();else K==="horizontal"&&Math.abs(b.current)>0&&(X(b.current),$e());h.current=null,C.current="none",b.current=0,S.current=!1,G(!1)};return document.addEventListener("touchstart",N,{passive:!0}),document.addEventListener("touchmove",U,{passive:!1}),document.addEventListener("touchend",me),document.addEventListener("touchcancel",me),()=>{document.removeEventListener("touchstart",N),document.removeEventListener("touchmove",U),document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),Se()}},[L,t.length,d,l,k,q,re]),s.useEffect(()=>{const ve=Se=>{Se.key==="Escape"&&(Se.preventDefault(),Se.stopPropagation(),L!=="closing"&&V("closing"))};return window.addEventListener("keydown",ve,!0),()=>window.removeEventListener("keydown",ve,!0)},[L]);const J=()=>{L!=="closing"&&V("closing")},be=L==="open",We=L==="closing",ye=$>0?Math.max(0,1-$/500):1,ue=$>0?Math.max(.35,1-$/500):1,ee=ve=>{if(ve.stopPropagation(),w.current){w.current=!1;return}if(t.length<=1)return;const Se=ve.currentTarget.getBoundingClientRect(),$e=ve.clientY-Se.top,f=Math.min(52,Se.height*.2);if(!($e>Se.height-f)){if(ve.clientX-Se.left<Se.width/2){l();return}d()}},de=ve=>{if(t.length<=1)return;const Se=ve.currentTarget.getBoundingClientRect(),$e=ve.clientX-Se.left,f=ve.clientY-Se.top,X=Math.min(52,Se.height*.2);if(f>Se.height-X){ve.currentTarget.style.cursor="default";return}ve.currentTarget.style.cursor=$e<Se.width/2?"w-resize":"e-resize"},ne=s.useCallback(ve=>{ve.propertyName!=="transform"||!D.current||(re(),k(!1))},[re,k]),Pe=se?`translateX(${F}px)`:$>0?`translateY(${$}px)`:void 0,Te={position:"fixed",top:z==null?void 0:z.top,left:z==null?void 0:z.left,width:z==null?void 0:z.width,height:z==null?void 0:z.height,objectFit:i==="cover"?"cover":"contain",transform:Pe,opacity:$>0?ue:L==="opening"||We?0:1,transition:R&&!g?"none":g?`transform ${Kn}ms ${Oi}`:Z?`transform ${Kn}ms ${Oi}, opacity ${Kn}ms ${Oi}`:L==="opening"||We?`opacity ${Kn}ms ${Oi}`:"none",pointerEvents:le&&be&&!se?"auto":"none",touchAction:le&&be?"none":void 0,zIndex:9998},Oe=z?{position:"fixed",top:z.top,height:z.height,width:z.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:L==="open"?"none":void 0},onClick:J,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:be?ye:0,transition:R?"none":`opacity ${Kn}ms ${Oi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:x?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:v,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:be?1:0,transition:`opacity ${Kn}ms ${Oi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:be?1:0,transition:`opacity ${Kn}ms ${Oi}`},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),z&&Y&&(le?a.jsx(vS,{src:Y.url,phase:L,mediaRef:m,mediaStyle:Te,onLoadedMetadata:ce,onClick:ee,onMouseMove:de,onTransitionEnd:ne},`${n}-${Y.url}`):a.jsx("img",{ref:m,src:Y.url,alt:Y.name,onLoad:ce,onTransitionEnd:ne,style:Te},`${n}-${Y.url}`)),be&&Oe&&t.length>1&&!le&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Oe,left:z.left,cursor:"w-resize",pointerEvents:se?"none":"auto"},onClick:ve=>{if(w.current){w.current=!1;return}ve.stopPropagation(),l()}}),a.jsx("div",{style:{...Oe,left:z.left+z.width/2,cursor:"e-resize",pointerEvents:se?"none":"auto"},onClick:ve=>{if(w.current){w.current=!1;return}ve.stopPropagation(),d()}})]})]})}function Kc({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:r,isEditor:l,galleryPaddingBetween:d=0,showPaddingAfter:c=!1,showControls:u=!1,onMediaClick:p}){const x=`${e}-gallery-${Ns(t)?"video":"image"}`,v=r.display==="cover",m=fS(r),h=L=>A.scalingValue(L,l??!1),y=n??uo,b=o?{width:"100%",maxWidth:"100%"}:{width:h(y),maxWidth:"100%"},C=i?{borderRadius:h(i)}:{},S={...b,...v?{aspectRatio:m,height:"auto",overflow:"hidden"}:{},...C},w={...v?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":h(y)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...v?{}:C},_={className:x,style:w,onClick:p?L=>{L.stopPropagation(),p()}:void 0},z=Math.max(d,zi),H=Ns(t)?a.jsx("video",{..._,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{..._,src:t.url,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[v?a.jsx("div",{style:S,children:H}):H,c&&d>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:h(d)},"aria-hidden":"true"}),u&&c&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:h(z)}})]})}function bS({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:d,showControls:c,scaled:u,children:p}){const x=t==="a"?i:t==="c"?o:0,v=x>0||c;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&v&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(x)},"aria-hidden":"true"}),c&&t==="c"&&a.jsx("div",{"data-controls":"galleryPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,left:0,width:u(l),height:"100%"}}),a.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&v&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(x)},"aria-hidden":"true"}),c&&t==="a"&&a.jsx("div",{"data-controls":"galleryPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,right:0,width:u(r),height:"100%"}})]})}function SS(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Yc({P:e,scaled:t,height:n,paired:i}){return a.jsx("div",{"data-controls":"titleTopPadding",...i?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:t(n)}})}function Zc({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:r,paired:l,anchorStyle:d}){return a.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...r==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...r==="left"?{left:0}:{right:0},width:n(i),height:"100%",...d}})}function ds({P:e,title:t,position:n,titleRef:i,titleClassName:o,titleContainerStyle:r,titleTextBoxStyle:l,titleStyle:d,showTextBoxOutline:c=!1,topPaddingControl:u}){const p=s.useRef(null),[x,v]=s.useState(0),m=t??"",h=n==="left"||n==="center"||n==="right";return s.useLayoutEffect(()=>{if(!h)return;const y=p.current;if(!y||typeof ResizeObserver>"u")return;const b=()=>v(y.offsetHeight);b();const C=new ResizeObserver(b);return C.observe(y),()=>C.disconnect()},[m,h]),a.jsx("div",{ref:y=>{p.current=y,i(y)},className:[o,`${e}-title-position-${n}`].join(" "),style:{...h?{[`--${e}-title-height`]:`${x}px`}:{},...r},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:l,children:[u,a.jsx("div",{className:c?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:a.jsx("span",{className:`${e}-title-text`,style:d,children:m})})]})})}const Jc=45;function Qc(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const r=parseFloat(o);if(!Number.isNaN(r))return r}i=i.parentElement}return n}function wS(e){const t=Qc(e,"--cntrl-viewport-height",window.innerHeight),n=Qc(e,"--cntrl-article-top",0);return{top:n,centerY:n+t/2}}function $S(e,t,n){const{top:i,centerY:o}=wS(n);if(t==="top"){const l=n&&parseFloat(getComputedStyle(n).top)||i;return Math.abs(e.top-l)}const r=e.top+e.height/2;return Math.abs(r-o)}function CS(e,t,n){const i=Array.from({length:t},(l,d)=>{const c=e.current[d];if(!c)return 0;const u=c.getBoundingClientRect(),p=$S(u,n,c);return Math.exp(-(p*p)/(2*Jc*Jc))});let o=0,r=-1;return i.forEach((l,d)=>{l>r&&(r=l,o=d)}),{opacities:i,dominantIndex:o}}function TS(e,t,n){const i=s.useRef([]),[{opacities:o,dominantIndex:r},l]=s.useState(()=>({opacities:Array.from({length:e},(c,u)=>u===0?1:0),dominantIndex:0}));return s.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let c=0;const u=()=>{l(CS(i,e,n))},p=()=>{c||(c=window.requestAnimationFrame(()=>{c=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{c&&window.cancelAnimationFrame(c),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:c=>u=>{i.current[c]=u},opacities:o,dominantIndex:r}}function LS(e,t){const[n,i]=s.useState(e),o=s.useRef(e);return s.useEffect(()=>{if(!t){o.current=e,i(e);return}const r=Array.from(o.current),l=Array.from(e),d=Math.max(r.length,l.length);if(d===0||o.current===e)return;let c=0;const u=window.setInterval(()=>{c+=1;const p=[...l.slice(0,c),...r.slice(c)].join("");o.current=p,i(p),c>=d&&window.clearInterval(u)},35);return()=>window.clearInterval(u)},[t,e]),n}function IS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var it;const{prefix:l}=A.useScopedStyles(),d=s.useMemo(()=>nS(l),[l]),c=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",x=(e==null?void 0:e.imgWidth)??uo,v=(e==null?void 0:e.titleWidth)??gS,m=hS(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??eS,y=(e==null?void 0:e.position)??"center",b=(e==null?void 0:e.titleTopPadding)??0,C=(e==null?void 0:e.titleLeftPadding)??0,S=(e==null?void 0:e.titleRightPadding)??0,w=SS(e==null?void 0:e.transition),D=(e==null?void 0:e.lightbox)??"on",_=p==="b",z=w==="fade"||w==="retype",{setTitleRef:H,dominantIndex:L}=TS(c.length,z,y),V=((it=c[L])==null?void 0:it.title)??"",$=LS(V,w==="retype"),E=w==="fade"||w==="retype",F=w==="retype"?$:V,W=_?void 0:{width:A.scalingValue(x,n??!1)},g=D==="on"&&(!n||i||o),M=o??!1,R=(e==null?void 0:e.galleryPaddingRight)??0,G=(e==null?void 0:e.galleryPaddingLeft)??0,Z=(e==null?void 0:e.galleryPaddingBetween)??0,T=ot=>A.scalingValue(ot,n??!1),Y={width:T(v)},le=p==="a"?R:G,se=_?{width:"100%"}:{width:`calc(100% - ${T(x)} - ${T(le)})`,...p==="c"?{marginLeft:"auto"}:{}},k=Math.max(R,zi),re=Math.max(G,zi),q=Math.max(Z,zi),ce=Math.max(b,zi),J=Math.max(C,zi),be=Math.max(S,zi),We=Math.max(0,(u??1)-(x??uo)),ye=p==="a"?Math.max(0,(u??1)-(x??uo)-R):p==="c"?Math.max(0,(u??1)-(x??uo)-G):p==="b"?u??1:1,ue=M&&(p==="a"||p==="b"||p==="c")&&y==="top",ee=M&&((p==="a"||p==="b")&&(y==="left"||y==="top")||p==="c"&&(y==="left"||y==="top")),de=M&&((p==="c"||p==="b")&&y==="right"||p==="a"&&y==="right"),ne=c.length>1,Pe=_?void 0:T((p==="c"?G:R)+(x??uo)),Te=p==="c"&&Pe?{left:Pe}:void 0,Oe=p==="a"&&Pe?{right:Pe}:void 0,ve=_?{left:0,width:"100%"}:p==="a"?{right:T(R),width:T(x)}:{left:T(G),width:T(x)},{titleColor:Se,titleFontFamily:$e,titleFontSettings:f,titleFontSize:X,titleLineHeight:N,titleLetterSpacing:U,titleWordSpacing:me,titleAlign:K,titleTextAppearance:I,lightboxCounterColor:ie,lightboxCounterFontFamily:oe,lightboxCounterFontSettings:B,lightboxCounterFontSize:te,lightboxCounterLineHeight:Ae,lightboxCounterLetterSpacing:he,lightboxCounterWordSpacing:Q,lightboxCounterTextAppearance:Ze}=e??{},Fe={fontSettings:{fontFamily:$e,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:X??.01,lineHeight:N,letterSpacing:U??0,wordSpacing:me??0,textAlign:K??"left",textAppearance:I,color:Se??"#000000"},Ue=dn(Qt(Fe,n)),nt=Y,tt=Uc(X,N,l,n),Ve=qc(X,N,`${l}-title`,`${l}-text-tight-leading`),fe={fontSettings:{fontFamily:oe,fontWeight:(B==null?void 0:B.fontWeight)??400,fontStyle:(B==null?void 0:B.fontStyle)??"normal"},fontSize:te??.01,lineHeight:Ae,letterSpacing:he??0,wordSpacing:Q??0,textAppearance:Ze,color:ie??"#DEDDDD"},Be={...dn(Qt(fe,n)),...Uc(te,Ae,l,n)},Je=qc(te,Ae,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Ce=A.buildColorVars(l,{titleColor:Se??"#000000",lightboxCounterColor:ie??"#DEDDDD"},aS,sS),De=s.useRef(null),[Xe,ge]=s.useState(!1),[Me,ze]=s.useState([]),[Re,xe]=s.useState(0),Ie=s.useCallback((ot,rt)=>{g&&(ze(ot),xe(rt),ge(!0))},[g]),Ke=s.useCallback(()=>{ge(!1)},[]),Ne=s.useMemo(()=>{const ot={...Ce},rt=De.current?getComputedStyle(De.current).getPropertyValue("--cntrl-article-width").trim():"";return rt&&(ot["--cntrl-article-width"]=rt),ot},[Ce,Xe]);return s.useEffect(()=>{if(!Xe||D!=="on"||typeof document>"u")return;const ot=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ot}},[Xe,D]),s.useEffect(()=>{!n||o||i||ge(!1)},[n,o,i]),s.useEffect(()=>{D==="off"&&ge(!1)},[D]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx("div",{style:Ce,children:a.jsxs("div",{ref:De,className:`${l}-wrapper`,style:{width:A.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:(p==="a"||p==="b"||p==="c")&&y==="top"?T(b):void 0,[`--${l}-title-left-padding`]:(p==="a"||p==="b")&&(y==="left"||y==="top")||p==="c"&&(y==="left"||y==="top")?T(C):void 0,[`--${l}-title-right-padding`]:(p==="c"||p==="b")&&y==="right"||p==="a"&&y==="right"?T(S):void 0},children:[E&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(ds,{P:l,title:F,position:y,titleRef:()=>{},titleClassName:`${Ve} ${l}-single-title`,titleContainerStyle:{...tt,...se},titleTextBoxStyle:nt,titleStyle:Ue,showTextBoxOutline:M,topPaddingControl:ue?Yc({P:l,scaled:T,height:ce,paired:!1}):void 0})}),c.map((ot,rt)=>{const ht=uS(ot.gallery),Pt=rt<c.length-1,Et=ht.filter(gt=>gt.lightboxMedia).map(gt=>gt.lightboxMedia),ut={P:l,position:y,titleRef:H(rt),titleClassName:Ve,titleContainerStyle:tt,titleTextBoxStyle:E?{maxWidth:"100%"}:nt,titleStyle:Ue,showTextBoxOutline:M&&!E,topPaddingControl:ue&&!E?Yc({P:l,scaled:T,height:ce,paired:ne}):void 0};return a.jsxs("div",{"data-item-index":rt,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:Pt?T(Z):void 0},children:[ee&&Zc({P:l,controlKey:"titleLeftPadding",scaled:T,width:J,maxFraction:ye,side:"left",paired:ne,anchorStyle:Te}),de&&Zc({P:l,controlKey:"titleRightPadding",scaled:T,width:be,maxFraction:ye,side:"right",paired:ne,anchorStyle:Oe}),M&&Pt&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-control-anchor`,style:{bottom:0,height:T(q),...ve}}),_?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:ht.map(({displayMedia:gt,lightboxMedia:$t},Tt)=>{const ft=$t?Et.findIndex(At=>At.url===$t.url):-1;return a.jsx(Kc,{P:l,media:gt,imgWidth:x||void 0,cornerRadius:h||void 0,imageDisplay:m,isEditor:n,galleryPaddingBetween:Z,showPaddingAfter:Tt<ht.length-1,showControls:M,onMediaClick:g&&ft>=0?()=>Ie(Et,ft):void 0},`${gt.url}-${Tt}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(ds,{...ut,title:E?"":ot.title})})]}):a.jsxs(a.Fragment,{children:[a.jsx(ds,{...ut,title:E?"":ot.title}),ht.length>0&&a.jsx(bS,{P:l,layoutType:p,galleryWidthStyle:W,galleryPaddingRight:R,galleryPaddingLeft:G,galleryPaddingRightWidth:k,galleryPaddingLeftWidth:re,galleryPaddingMaxFraction:We,showControls:M,scaled:T,children:ht.map(({displayMedia:gt,lightboxMedia:$t},Tt)=>{const ft=$t?Et.findIndex(At=>At.url===$t.url):-1;return a.jsx(Kc,{P:l,media:gt,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:m,isEditor:n,galleryPaddingBetween:Z,showPaddingAfter:Tt<ht.length-1,showControls:M,onMediaClick:g&&ft>=0?()=>Ie(Et,ft):void 0},`${gt.url}-${Tt}`)})})]})]},rt)})]})}),Xe&&D==="on"&&typeof document<"u"&&e&&(()=>{const ot=(r?document.getElementById(r):null)??document.body;return ri.createPortal(a.jsx("div",{style:Ne,"data-selection":"none",children:a.jsx(xS,{prefix:l,items:Me,index:Re,imageDisplay:yS(e.lightboxImageDisplay),isEditor:n,onClose:Ke,onPrev:()=>xe(rt=>(rt-1+Me.length)%Me.length),onNext:()=>xe(rt=>(rt+1)%Me.length),counterClassName:Je,counterStyle:Be,backgroundColor:e.backgroundColor??iS})}),ot)})()]})}const RS=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
21072
+ `}const sS="rgba(28,31,34,0.9)",Yn=500,Oi="cubic-bezier(0.22, 1, 0.36, 1)",lS=72,cS=50,dS={titleColor:"title-color",lightboxCounterColor:"lightbox-counter-color"},uS=[];function pS(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function mS(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function gS(e){const[t]=e.media;return t!=null&&t.url?t:null}function hS(e){if(!Array.isArray(e)||e.length===0)return[];if(pS(e)){const t=[];for(const n of e){const i=mS(n);if(!i)continue;const o=gS(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function _s(e){return e.type==="video"}function fS(e){e.pause(),e.removeAttribute("src"),e.load()}function jr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function yS(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const vS=1140/1440;function xS(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function bS(e){const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`}function SS(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function wS({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:d}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{fS(c)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:d,style:i})}function $S({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:d,counterClassName:c,counterStyle:u,backgroundColor:p}){const x=i==="cover",y=s.useRef(null),m=s.useRef(null),h=s.useRef(null),v=s.useRef(0),b=s.useRef(0),C=s.useRef("none"),S=s.useRef(!1),w=s.useRef(!1),D=s.useRef(!1),_=s.useRef(null),[z,H]=s.useState(null),[L,V]=s.useState("opening"),[$,k]=s.useState(0),[F,W]=s.useState(0),[g,E]=s.useState(!1),[R,G]=s.useState(!1),[Z,T]=s.useState(!1),j=s.useRef(n),K=t[n],le=K?_s(K):!1,se=F!==0||g,M=s.useCallback(ve=>{D.current=ve,E(ve)},[]),re=s.useCallback(()=>{_.current!==null&&(window.clearTimeout(_.current),_.current=null)},[]),q=s.useCallback(()=>{re(),_.current=window.setTimeout(()=>{re(),M(!1)},Yn+32)},[re,M]),ce=s.useCallback(()=>{const ve=y.current,Se=m.current;if(!ve)return;const $e=ve.getBoundingClientRect(),f=$e.width,X=$e.height;if(!f||!X)return;if(i==="cover"){H({width:f,height:X,left:$e.left,top:$e.top});return}if(!Se){H(jr(ve));return}const{width:N,height:U}=yS(Se);if(!N||!U){H(jr(ve));return}const me=N/U,Y=f/X;if(me>Y){const I=f/me;H({width:f,height:I,left:$e.left,top:$e.top+(X-I)/2})}else{const I=X*me;H({width:I,height:X,left:$e.left+(f-I)/2,top:$e.top})}},[i]);s.useEffect(()=>{ce();const ve=y.current;if(!ve)return;const Se=new ResizeObserver(()=>ce());return Se.observe(ve),()=>Se.disconnect()},[ce,n]),s.useEffect(()=>{L==="opening"&&z&&V("open")},[L,z]),s.useEffect(()=>{if(L!=="closing")return;const ve=setTimeout(()=>r(),Yn);return()=>clearTimeout(ve)},[L,r]),s.useEffect(()=>()=>{re()},[re]),s.useLayoutEffect(()=>{if(j.current===n)return;re(),k(0),W(0),M(!1),T(!1),G(!1),v.current=0,b.current=0,C.current="none",S.current=!1,h.current=null,w.current=!1;const ve=y.current;ve&&H(jr(ve)),j.current=n},[n,M,re]),s.useEffect(()=>{if(L!=="open")return;let ve=null;const Se=()=>{ve&&(document.removeEventListener("click",ve,!0),ve=null)},$e=()=>{Se(),ve=Y=>{Y.stopPropagation(),Y.preventDefault(),Se()},document.addEventListener("click",ve,!0)},f=Y=>{re(),D.current=!1,E(!1),W(0),G(!1),S.current=!1,b.current=0,C.current="none";const I=y.current;I&&H(jr(I)),Y<0?d():l()},X=Y=>{if(Math.abs(Y)>cS&&t.length>1){f(Y);return}M(!0),W(0),q()},N=Y=>{if(Y.touches.length!==1||D.current)return;const I=Y.touches[0];w.current=!0,h.current={x:I.clientX,y:I.clientY},C.current="none",b.current=0,S.current=!1},U=Y=>{if(!h.current||Y.touches.length!==1||D.current)return;const I=Y.touches[0],ie=I.clientX-h.current.x,oe=I.clientY-h.current.y;if(C.current==="none"){if(Math.abs(ie)<10&&Math.abs(oe)<10)return;if(Math.abs(ie)>Math.abs(oe)){if(t.length<=1)return;C.current="horizontal"}else if(oe>0)C.current="vertical";else return}if(C.current==="horizontal"){S.current=!0,G(!0),b.current=ie,W(ie),Y.preventDefault();return}C.current==="vertical"&&(S.current=!0,G(!0),v.current=oe,k(oe),Y.preventDefault())},me=()=>{if(!h.current)return;const Y=C.current,I=S.current;if(I&&Y==="horizontal")X(b.current),$e();else if(I&&Y==="vertical")if(v.current>lS){const oe=window.innerHeight;v.current=oe,T(!0),k(oe),V("closing")}else v.current=0,k(0),$e();else Y==="horizontal"&&Math.abs(b.current)>0&&(X(b.current),$e());h.current=null,C.current="none",b.current=0,S.current=!1,G(!1)};return document.addEventListener("touchstart",N,{passive:!0}),document.addEventListener("touchmove",U,{passive:!1}),document.addEventListener("touchend",me),document.addEventListener("touchcancel",me),()=>{document.removeEventListener("touchstart",N),document.removeEventListener("touchmove",U),document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),Se()}},[L,t.length,d,l,M,q,re]),s.useEffect(()=>{const ve=Se=>{Se.key==="Escape"&&(Se.preventDefault(),Se.stopPropagation(),L!=="closing"&&V("closing"))};return window.addEventListener("keydown",ve,!0),()=>window.removeEventListener("keydown",ve,!0)},[L]);const J=()=>{L!=="closing"&&V("closing")},be=L==="open",We=L==="closing",ye=$>0?Math.max(0,1-$/500):1,ue=$>0?Math.max(.35,1-$/500):1,ee=ve=>{if(ve.stopPropagation(),w.current){w.current=!1;return}if(t.length<=1)return;const Se=ve.currentTarget.getBoundingClientRect(),$e=ve.clientY-Se.top,f=Math.min(52,Se.height*.2);if(!($e>Se.height-f)){if(ve.clientX-Se.left<Se.width/2){l();return}d()}},de=ve=>{if(t.length<=1)return;const Se=ve.currentTarget.getBoundingClientRect(),$e=ve.clientX-Se.left,f=ve.clientY-Se.top,X=Math.min(52,Se.height*.2);if(f>Se.height-X){ve.currentTarget.style.cursor="default";return}ve.currentTarget.style.cursor=$e<Se.width/2?"w-resize":"e-resize"},ne=s.useCallback(ve=>{ve.propertyName!=="transform"||!D.current||(re(),M(!1))},[re,M]),Pe=se?`translateX(${F}px)`:$>0?`translateY(${$}px)`:void 0,Te={position:"fixed",top:z==null?void 0:z.top,left:z==null?void 0:z.left,width:z==null?void 0:z.width,height:z==null?void 0:z.height,objectFit:i==="cover"?"cover":"contain",transform:Pe,opacity:$>0?ue:L==="opening"||We?0:1,transition:R&&!g?"none":g?`transform ${Yn}ms ${Oi}`:Z?`transform ${Yn}ms ${Oi}, opacity ${Yn}ms ${Oi}`:L==="opening"||We?`opacity ${Yn}ms ${Oi}`:"none",pointerEvents:le&&be&&!se?"auto":"none",touchAction:le&&be?"none":void 0,zIndex:9998},Oe=z?{position:"fixed",top:z.top,height:z.height,width:z.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:L==="open"?"none":void 0},onClick:J,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:be?ye:0,transition:R?"none":`opacity ${Yn}ms ${Oi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:x?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:y,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:be?1:0,transition:`opacity ${Yn}ms ${Oi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:be?1:0,transition:`opacity ${Yn}ms ${Oi}`},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),z&&K&&(le?a.jsx(wS,{src:K.url,phase:L,mediaRef:m,mediaStyle:Te,onLoadedMetadata:ce,onClick:ee,onMouseMove:de,onTransitionEnd:ne},`${n}-${K.url}`):a.jsx("img",{ref:m,src:K.url,alt:K.name,onLoad:ce,onTransitionEnd:ne,style:Te},`${n}-${K.url}`)),be&&Oe&&t.length>1&&!le&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Oe,left:z.left,cursor:"w-resize",pointerEvents:se?"none":"auto"},onClick:ve=>{if(w.current){w.current=!1;return}ve.stopPropagation(),l()}}),a.jsx("div",{style:{...Oe,left:z.left+z.width/2,cursor:"e-resize",pointerEvents:se?"none":"auto"},onClick:ve=>{if(w.current){w.current=!1;return}ve.stopPropagation(),d()}})]})]})}function Kc({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:r,isEditor:l,galleryPaddingBetween:d=0,showPaddingAfter:c=!1,showControls:u=!1,onMediaClick:p}){const x=`${e}-gallery-${_s(t)?"video":"image"}`,y=r.display==="cover",m=bS(r),h=L=>A.scalingValue(L,l??!1),v=n??uo,b=o?{width:"100%",maxWidth:"100%"}:{width:h(v),maxWidth:"100%"},C=i?{borderRadius:h(i)}:{},S={...b,...y?{aspectRatio:m,height:"auto",overflow:"hidden"}:{},...C},w={...y?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":h(v)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...y?{}:C},_={className:x,style:w,onClick:p?L=>{L.stopPropagation(),p()}:void 0},z=Math.max(d,zi),H=_s(t)?a.jsx("video",{..._,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{..._,src:t.url,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[y?a.jsx("div",{style:S,children:H}):H,c&&d>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:h(d)},"aria-hidden":"true"}),u&&c&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:h(z)}})]})}function CS({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:d,showControls:c,scaled:u,children:p}){const x=t==="a"?i:t==="c"?o:0,y=x>0||c;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&y&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(x)},"aria-hidden":"true"}),c&&t==="c"&&a.jsx("div",{"data-controls":"galleryPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,left:0,width:u(l),height:"100%"}}),a.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&y&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(x)},"aria-hidden":"true"}),c&&t==="a"&&a.jsx("div",{"data-controls":"galleryPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,right:0,width:u(r),height:"100%"}})]})}function TS(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Zc({P:e,scaled:t,height:n,paired:i}){return a.jsx("div",{"data-controls":"titleTopPadding",...i?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:t(n)}})}function Jc({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:r,paired:l,anchorStyle:d}){return a.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...r==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...r==="left"?{left:0}:{right:0},width:n(i),height:"100%",...d}})}function us({P:e,title:t,position:n,titleRef:i,titleClassName:o,titleContainerStyle:r,titleTextBoxStyle:l,titleStyle:d,showTextBoxOutline:c=!1,topPaddingControl:u}){const p=s.useRef(null),[x,y]=s.useState(0),m=t??"",h=n==="left"||n==="center"||n==="right";return s.useLayoutEffect(()=>{if(!h)return;const v=p.current;if(!v||typeof ResizeObserver>"u")return;const b=()=>y(v.offsetHeight);b();const C=new ResizeObserver(b);return C.observe(v),()=>C.disconnect()},[m,h]),a.jsx("div",{ref:v=>{p.current=v,i(v)},className:[o,`${e}-title-position-${n}`].join(" "),style:{...h?{[`--${e}-title-height`]:`${x}px`}:{},...r},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:l,children:[u,a.jsx("div",{className:c?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:a.jsx("span",{className:`${e}-title-text`,style:d,children:m})})]})})}const Qc=45;function ed(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const r=parseFloat(o);if(!Number.isNaN(r))return r}i=i.parentElement}return n}function LS(e){const t=ed(e,"--cntrl-viewport-height",window.innerHeight),n=ed(e,"--cntrl-article-top",0);return{top:n,centerY:n+t/2}}function IS(e,t,n){const{top:i,centerY:o}=LS(n);if(t==="top"){const l=n&&parseFloat(getComputedStyle(n).top)||i;return Math.abs(e.top-l)}const r=e.top+e.height/2;return Math.abs(r-o)}function RS(e,t,n){const i=Array.from({length:t},(l,d)=>{const c=e.current[d];if(!c)return 0;const u=c.getBoundingClientRect(),p=IS(u,n,c);return Math.exp(-(p*p)/(2*Qc*Qc))});let o=0,r=-1;return i.forEach((l,d)=>{l>r&&(r=l,o=d)}),{opacities:i,dominantIndex:o}}function PS(e,t,n){const i=s.useRef([]),[{opacities:o,dominantIndex:r},l]=s.useState(()=>({opacities:Array.from({length:e},(c,u)=>u===0?1:0),dominantIndex:0}));return s.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let c=0;const u=()=>{l(RS(i,e,n))},p=()=>{c||(c=window.requestAnimationFrame(()=>{c=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{c&&window.cancelAnimationFrame(c),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:c=>u=>{i.current[c]=u},opacities:o,dominantIndex:r}}function kS(e,t){const[n,i]=s.useState(e),o=s.useRef(e);return s.useEffect(()=>{if(!t){o.current=e,i(e);return}const r=Array.from(o.current),l=Array.from(e),d=Math.max(r.length,l.length);if(d===0||o.current===e)return;let c=0;const u=window.setInterval(()=>{c+=1;const p=[...l.slice(0,c),...r.slice(c)].join("");o.current=p,i(p),c>=d&&window.clearInterval(u)},35);return()=>window.clearInterval(u)},[t,e]),n}function ES({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var it;const{prefix:l}=A.useScopedStyles(),d=s.useMemo(()=>aS(l),[l]),c=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",x=(e==null?void 0:e.imgWidth)??uo,y=(e==null?void 0:e.titleWidth)??vS,m=xS(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??oS,v=(e==null?void 0:e.position)??"center",b=(e==null?void 0:e.titleTopPadding)??0,C=(e==null?void 0:e.titleLeftPadding)??0,S=(e==null?void 0:e.titleRightPadding)??0,w=TS(e==null?void 0:e.transition),D=(e==null?void 0:e.lightbox)??"on",_=p==="b",z=w==="fade"||w==="retype",{setTitleRef:H,dominantIndex:L}=PS(c.length,z,v),V=((it=c[L])==null?void 0:it.title)??"",$=kS(V,w==="retype"),k=w==="fade"||w==="retype",F=w==="retype"?$:V,W=_?void 0:{width:A.scalingValue(x,n??!1)},g=D==="on"&&(!n||i||o),E=o??!1,R=(e==null?void 0:e.galleryPaddingRight)??0,G=(e==null?void 0:e.galleryPaddingLeft)??0,Z=(e==null?void 0:e.galleryPaddingBetween)??0,T=ot=>A.scalingValue(ot,n??!1),K={width:T(y)},le=p==="a"?R:G,se=_?{width:"100%"}:{width:`calc(100% - ${T(x)} - ${T(le)})`,...p==="c"?{marginLeft:"auto"}:{}},M=Math.max(R,zi),re=Math.max(G,zi),q=Math.max(Z,zi),ce=Math.max(b,zi),J=Math.max(C,zi),be=Math.max(S,zi),We=Math.max(0,(u??1)-(x??uo)),ye=p==="a"?Math.max(0,(u??1)-(x??uo)-R):p==="c"?Math.max(0,(u??1)-(x??uo)-G):p==="b"?u??1:1,ue=E&&(p==="a"||p==="b"||p==="c")&&v==="top",ee=E&&((p==="a"||p==="b")&&(v==="left"||v==="top")||p==="c"&&(v==="left"||v==="top")),de=E&&((p==="c"||p==="b")&&v==="right"||p==="a"&&v==="right"),ne=c.length>1,Pe=_?void 0:T((p==="c"?G:R)+(x??uo)),Te=p==="c"&&Pe?{left:Pe}:void 0,Oe=p==="a"&&Pe?{right:Pe}:void 0,ve=_?{left:0,width:"100%"}:p==="a"?{right:T(R),width:T(x)}:{left:T(G),width:T(x)},{titleColor:Se,titleFontFamily:$e,titleFontSettings:f,titleFontSize:X,titleLineHeight:N,titleLetterSpacing:U,titleWordSpacing:me,titleAlign:Y,titleTextAppearance:I,lightboxCounterColor:ie,lightboxCounterFontFamily:oe,lightboxCounterFontSettings:B,lightboxCounterFontSize:te,lightboxCounterLineHeight:Ae,lightboxCounterLetterSpacing:he,lightboxCounterWordSpacing:Q,lightboxCounterTextAppearance:Ze}=e??{},Fe={fontSettings:{fontFamily:$e,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:X??.01,lineHeight:N,letterSpacing:U??0,wordSpacing:me??0,textAlign:Y??"left",textAppearance:I,color:Se??"#000000"},Ue=dn(Qt(Fe,n)),nt=K,tt=Yc(X,N,l,n),Ve=Uc(X,N,`${l}-title`,`${l}-text-tight-leading`),fe={fontSettings:{fontFamily:oe,fontWeight:(B==null?void 0:B.fontWeight)??400,fontStyle:(B==null?void 0:B.fontStyle)??"normal"},fontSize:te??.01,lineHeight:Ae,letterSpacing:he??0,wordSpacing:Q??0,textAppearance:Ze,color:ie??"#DEDDDD"},Be={...dn(Qt(fe,n)),...Yc(te,Ae,l,n)},Je=Uc(te,Ae,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Ce=A.buildColorVars(l,{titleColor:Se??"#000000",lightboxCounterColor:ie??"#DEDDDD"},dS,uS),De=s.useRef(null),[Xe,ge]=s.useState(!1),[Ee,ze]=s.useState([]),[Re,xe]=s.useState(0),Ie=s.useCallback((ot,rt)=>{g&&(ze(ot),xe(rt),ge(!0))},[g]),Ye=s.useCallback(()=>{ge(!1)},[]),Ne=s.useMemo(()=>{const ot={...Ce},rt=De.current?getComputedStyle(De.current).getPropertyValue("--cntrl-article-width").trim():"";return rt&&(ot["--cntrl-article-width"]=rt),ot},[Ce,Xe]);return s.useEffect(()=>{if(!Xe||D!=="on"||typeof document>"u")return;const ot=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ot}},[Xe,D]),s.useEffect(()=>{!n||o||i||ge(!1)},[n,o,i]),s.useEffect(()=>{D==="off"&&ge(!1)},[D]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx("div",{style:Ce,children:a.jsxs("div",{ref:De,className:`${l}-wrapper`,style:{width:A.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:(p==="a"||p==="b"||p==="c")&&v==="top"?T(b):void 0,[`--${l}-title-left-padding`]:(p==="a"||p==="b")&&(v==="left"||v==="top")||p==="c"&&(v==="left"||v==="top")?T(C):void 0,[`--${l}-title-right-padding`]:(p==="c"||p==="b")&&v==="right"||p==="a"&&v==="right"?T(S):void 0},children:[k&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(us,{P:l,title:F,position:v,titleRef:()=>{},titleClassName:`${Ve} ${l}-single-title`,titleContainerStyle:{...tt,...se},titleTextBoxStyle:nt,titleStyle:Ue,showTextBoxOutline:E,topPaddingControl:ue?Zc({P:l,scaled:T,height:ce,paired:!1}):void 0})}),c.map((ot,rt)=>{const ht=hS(ot.gallery),Pt=rt<c.length-1,kt=ht.filter(gt=>gt.lightboxMedia).map(gt=>gt.lightboxMedia),ut={P:l,position:v,titleRef:H(rt),titleClassName:Ve,titleContainerStyle:tt,titleTextBoxStyle:k?{maxWidth:"100%"}:nt,titleStyle:Ue,showTextBoxOutline:E&&!k,topPaddingControl:ue&&!k?Zc({P:l,scaled:T,height:ce,paired:ne}):void 0};return a.jsxs("div",{"data-item-index":rt,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:Pt?T(Z):void 0},children:[ee&&Jc({P:l,controlKey:"titleLeftPadding",scaled:T,width:J,maxFraction:ye,side:"left",paired:ne,anchorStyle:Te}),de&&Jc({P:l,controlKey:"titleRightPadding",scaled:T,width:be,maxFraction:ye,side:"right",paired:ne,anchorStyle:Oe}),E&&Pt&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-control-anchor`,style:{bottom:0,height:T(q),...ve}}),_?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:ht.map(({displayMedia:gt,lightboxMedia:$t},Tt)=>{const ft=$t?kt.findIndex(At=>At.url===$t.url):-1;return a.jsx(Kc,{P:l,media:gt,imgWidth:x||void 0,cornerRadius:h||void 0,imageDisplay:m,isEditor:n,galleryPaddingBetween:Z,showPaddingAfter:Tt<ht.length-1,showControls:E,onMediaClick:g&&ft>=0?()=>Ie(kt,ft):void 0},`${gt.url}-${Tt}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(us,{...ut,title:k?"":ot.title})})]}):a.jsxs(a.Fragment,{children:[a.jsx(us,{...ut,title:k?"":ot.title}),ht.length>0&&a.jsx(CS,{P:l,layoutType:p,galleryWidthStyle:W,galleryPaddingRight:R,galleryPaddingLeft:G,galleryPaddingRightWidth:M,galleryPaddingLeftWidth:re,galleryPaddingMaxFraction:We,showControls:E,scaled:T,children:ht.map(({displayMedia:gt,lightboxMedia:$t},Tt)=>{const ft=$t?kt.findIndex(At=>At.url===$t.url):-1;return a.jsx(Kc,{P:l,media:gt,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:m,isEditor:n,galleryPaddingBetween:Z,showPaddingAfter:Tt<ht.length-1,showControls:E,onMediaClick:g&&ft>=0?()=>Ie(kt,ft):void 0},`${gt.url}-${Tt}`)})})]})]},rt)})]})}),Xe&&D==="on"&&typeof document<"u"&&e&&(()=>{const ot=(r?document.getElementById(r):null)??document.body;return ri.createPortal(a.jsx("div",{style:Ne,"data-selection":"none",children:a.jsx($S,{prefix:l,items:Ee,index:Re,imageDisplay:SS(e.lightboxImageDisplay),isEditor:n,onClose:Ye,onPrev:()=>xe(rt=>(rt-1+Ee.length)%Ee.length),onNext:()=>xe(rt=>(rt+1)%Ee.length),counterClassName:Je,counterStyle:Be,backgroundColor:e.backgroundColor??sS})}),ot)})()]})}const MS=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
21073
21073
  import { createPortal } from 'react-dom';
21074
21074
  import type React from 'react';
21075
21075
  import { CommonComponentProps } from '../props';
@@ -23119,7 +23119,7 @@ export function Mercury({
23119
23119
  </>
23120
23120
  );
23121
23121
  }
23122
- `;function ro(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const us={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}}},PS={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:[{title:"AX-2 Space Suit",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Earth-orbital mission",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Salton Sea from Above",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-12.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]}]},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},imgWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},titleWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},galleryPaddingRight:ro("Gallery Padding Right"),galleryPaddingLeft:ro("Gallery Padding Left"),galleryPaddingBetween:ro("Gallery Padding Between"),cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right","top"]}},titleTopPadding:ro("Title Top Padding"),titleLeftPadding:ro("Title Left Padding"),titleRightPadding:ro("Title Right Padding"),transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","retype","scroll"]}},titleColor:{type:"string",scope:"common",title:"Title",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...us.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleAlign:{...us.textAlign,scope:"layout",title:"Align"},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...us.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{type:"a",position:"left",transition:"scroll",titleColor:"#000000",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleAlign:"center",titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",backgroundColor:"rgba(28,31,34,0.9)",lightboxCounterColor:"#DEDDDD",lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{defaultPaddingTop:30/1440,wrapperWidth:1,imgWidth:600/1440,titleWidth:400/1440,galleryPaddingRight:30/1440,galleryPaddingLeft:30/1440,galleryPaddingBetween:30/1440,titleTopPadding:0,titleLeftPadding:0,titleRightPadding:0,cornerRadius:4/1440,position:"center",titleFontSize:73/1440,titleLineHeight:66/1440,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},m:{defaultPaddingTop:10/375,wrapperWidth:1,imgWidth:170/375,titleWidth:150/375,galleryPaddingRight:10/375,galleryPaddingLeft:10/375,galleryPaddingBetween:10/375,titleTopPadding:0,titleLeftPadding:10/375,titleRightPadding:10/375,cornerRadius:8/375,position:"left",titleFontSize:30/375,titleLineHeight:25/375,lightboxCounterFontSize:14/375,lightboxCounterLineHeight:14/375},t:{defaultPaddingTop:20/768,wrapperWidth:1,imgWidth:300/768,titleWidth:320/768,galleryPaddingRight:20/768,galleryPaddingLeft:20/768,galleryPaddingBetween:20/768,titleTopPadding:0,titleLeftPadding:0,titleRightPadding:0,cornerRadius:8/768,position:"center",titleFontSize:58/768,titleLineHeight:48/768,lightboxCounterFontSize:8/768,lightboxCounterLineHeight:8/768}},displayRules:[{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}}],layout:["__componentName__","type","wrapperWidth","imgWidth","titleWidth","imageDisplay","cornerRadius","position","transition","lightbox","lightboxImageDisplay"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",items:["wrapperWidth","imgWidth"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",title:"Title",items:["position","transition"]},"titleWidth",{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",items:["backgroundColor"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleAlign","titleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:["titleColor","backgroundColor","lightboxCounterColor"],panelIds:["general","typeStyle"]}},ES={element:IS,id:"mercury",name:"Mercury",category:"lists",layoutMode:"structured",version:1,defaultSize:{d:{width:720,height:540}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Mercury.mp4"},schema:PS,sourceCode:RS,assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},ed=48,MS=10,kS=400,AS=1,FS=1120/1440,NS=140/1440,_S=550/1440,WS=13,HS=4,OS=38/100,DS=28/100,Uu=2.8,zS=.9,Ku=.22,BS=.5,jS=1,VS=1.5,GS=0,XS=.85;function qS(e,t){return`
23122
+ `;function ro(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const ps={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}}},AS={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:[{title:"AX-2 Space Suit",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Earth-orbital mission",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Salton Sea from Above",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-12.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]}]},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},imgWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},titleWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},galleryPaddingRight:ro("Gallery Padding Right"),galleryPaddingLeft:ro("Gallery Padding Left"),galleryPaddingBetween:ro("Gallery Padding Between"),cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right","top"]}},titleTopPadding:ro("Title Top Padding"),titleLeftPadding:ro("Title Left Padding"),titleRightPadding:ro("Title Right Padding"),transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","retype","scroll"]}},titleColor:{type:"string",scope:"common",title:"Title",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...ps.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleAlign:{...ps.textAlign,scope:"layout",title:"Align"},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...ps.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{type:"a",position:"left",transition:"scroll",titleColor:"#000000",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleAlign:"center",titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",backgroundColor:"rgba(28,31,34,0.9)",lightboxCounterColor:"#DEDDDD",lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{defaultPaddingTop:30/1440,wrapperWidth:1,imgWidth:600/1440,titleWidth:400/1440,galleryPaddingRight:30/1440,galleryPaddingLeft:30/1440,galleryPaddingBetween:30/1440,titleTopPadding:0,titleLeftPadding:0,titleRightPadding:0,cornerRadius:4/1440,position:"center",titleFontSize:73/1440,titleLineHeight:66/1440,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},m:{defaultPaddingTop:10/375,wrapperWidth:1,imgWidth:170/375,titleWidth:150/375,galleryPaddingRight:10/375,galleryPaddingLeft:10/375,galleryPaddingBetween:10/375,titleTopPadding:0,titleLeftPadding:10/375,titleRightPadding:10/375,cornerRadius:8/375,position:"left",titleFontSize:30/375,titleLineHeight:25/375,lightboxCounterFontSize:14/375,lightboxCounterLineHeight:14/375},t:{defaultPaddingTop:20/768,wrapperWidth:1,imgWidth:300/768,titleWidth:320/768,galleryPaddingRight:20/768,galleryPaddingLeft:20/768,galleryPaddingBetween:20/768,titleTopPadding:0,titleLeftPadding:0,titleRightPadding:0,cornerRadius:8/768,position:"center",titleFontSize:58/768,titleLineHeight:48/768,lightboxCounterFontSize:8/768,lightboxCounterLineHeight:8/768}},displayRules:[{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}}],layout:["__componentName__","type","wrapperWidth","imgWidth","titleWidth","imageDisplay","cornerRadius","position","transition","lightbox","lightboxImageDisplay"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",items:["wrapperWidth","imgWidth"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",title:"Title",items:["position","transition"]},"titleWidth",{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",items:["backgroundColor"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleAlign","titleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:["titleColor","backgroundColor","lightboxCounterColor"],panelIds:["general","typeStyle"]}},FS={element:ES,id:"mercury",name:"Mercury",category:"lists",layoutMode:"structured",version:1,defaultSize:{d:{width:720,height:540}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Mercury.mp4"},schema:AS,sourceCode:MS,assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},td=48,NS=10,_S=400,WS=1,HS=1120/1440,OS=140/1440,DS=550/1440,zS=13,BS=4,jS=38/100,VS=28/100,Ku=2.8,GS=.9,Zu=.22,XS=.5,qS=1,US=1.5,YS=0,KS=.85;function ZS(e,t){return`
23123
23123
  .${e}-wrapper {
23124
23124
  position: relative;
23125
23125
  box-sizing: border-box;
@@ -23164,10 +23164,10 @@ export function Mercury({
23164
23164
  object-position: center;
23165
23165
  }
23166
23166
  ${t}
23167
- `}function Lr(e){return Number(e.toFixed(4))}function td(e,t,n,i){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,Math.round(r))):t}function ps(e,t,n=0,i=9999){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,r)):t}function US(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function KS(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function YS(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")}function Yu(e,t){return(1-e)/(1-e*Math.cos(t))}function ZS(e){let t=0;for(let n=0;n<360;n+=1){const i=n*Math.PI/180;t=Math.max(t,Math.abs(Math.sin(i)*Yu(e,i)))}return t||1}function JS(e,t){return e?1:1+Ku*(.35+t)}function QS(e,t,n,i){const o=t*JS(n,i);return Math.max(0,(e-o)/2)}function Zu(e,t,n){const i=Yu(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function Ju(e,t,n){return e/2+t*n}function ew(e,t,n){return e(t-n/2)}function tw(e,t){return e*t}function Qu(e){return Math.round(e*1e3)}function ep(e,t,n){const i=Math.cos(e),o=Math.cos(XS*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return Lr(t+(n-t)*r)}function tp(e){return ep(e,BS,jS)}function nw(e){return ep(e,VS,GS)}function np(e,t){if(!t)return"none";const n=nw(e);return n<=0?"none":`blur(${n}px)`}function iw(e,t,n,i,o,r,l,d){const{offset:c,scale:u}=Zu(i,o,r*Math.PI*2),p=r*Math.PI*2,x=Ju(t,n,c),v=Lr(u),m=`calc(${e(x)} - var(--helix-base-w) * ${v} / 2)`,h=`calc(var(--helix-base-w) * ${v})`,y=l?`height: calc(var(--helix-base-h) * ${v});`:"";return`left: ${m}; width: ${h}; ${y} z-index: ${Qu(u)}; transform: translateY(-50%); opacity: ${tp(p)}; filter: ${np(p,d)};`}function ow(e,t,n,i,o,r,l,d){const c=[];for(let u=0;u<=ed;u+=1){const p=u/ed;c.push(` ${Lr(p*100)}% { ${iw(t,n,i,o,r,p,l,d)} }`)}return`@keyframes ${e}-orbit {
23167
+ `}function Lr(e){return Number(e.toFixed(4))}function nd(e,t,n,i){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,Math.round(r))):t}function ms(e,t,n=0,i=9999){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,r)):t}function JS(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function QS(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function ew(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")}function Ju(e,t){return(1-e)/(1-e*Math.cos(t))}function tw(e){let t=0;for(let n=0;n<360;n+=1){const i=n*Math.PI/180;t=Math.max(t,Math.abs(Math.sin(i)*Ju(e,i)))}return t||1}function nw(e,t){return e?1:1+Zu*(.35+t)}function iw(e,t,n,i){const o=t*nw(n,i);return Math.max(0,(e-o)/2)}function Qu(e,t,n){const i=Ju(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function ep(e,t,n){return e/2+t*n}function ow(e,t,n){return e(t-n/2)}function rw(e,t){return e*t}function tp(e){return Math.round(e*1e3)}function np(e,t,n){const i=Math.cos(e),o=Math.cos(KS*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return Lr(t+(n-t)*r)}function ip(e){return np(e,XS,qS)}function aw(e){return np(e,US,YS)}function op(e,t){if(!t)return"none";const n=aw(e);return n<=0?"none":`blur(${n}px)`}function sw(e,t,n,i,o,r,l,d){const{offset:c,scale:u}=Qu(i,o,r*Math.PI*2),p=r*Math.PI*2,x=ep(t,n,c),y=Lr(u),m=`calc(${e(x)} - var(--helix-base-w) * ${y} / 2)`,h=`calc(var(--helix-base-w) * ${y})`,v=l?`height: calc(var(--helix-base-h) * ${y});`:"";return`left: ${m}; width: ${h}; ${v} z-index: ${tp(u)}; transform: translateY(-50%); opacity: ${ip(p)}; filter: ${op(p,d)};`}function lw(e,t,n,i,o,r,l,d){const c=[];for(let u=0;u<=td;u+=1){const p=u/td;c.push(` ${Lr(p*100)}% { ${sw(t,n,i,o,r,p,l,d)} }`)}return`@keyframes ${e}-orbit {
23168
23168
  ${c.join(`
23169
23169
  `)}
23170
- }`}function ip(e,t){return(e%t+t)%t}function rw(e,t){return Rl(e,t)/t}function Rl(e,t){return ip(e,t)}function aw(e,t){return Math.floor(e/t)}function sw(e,t,n,i){return aw(e,t)*n+Rl(e,t)*i}function lw(e,t,n){const i=n==="left"?1-e:e;return`${Lr(-i*t)}s`}function nd(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function op(e){const t=e%1;return t<0?t+1:t}function cw(e,t,n){const i=t/Uu,o=n==="left"?-e*i:e*i;return op(o)}function dw({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=A.useScopedStyles(),r=s.useRef(null),l=ps((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),FS),d=ps(e==null?void 0:e.imageWidth,NS),c=ps(e==null?void 0:e.turnHeight,_S),u=td(e==null?void 0:e.itemsPerTurn,WS,3,40),p=td(e==null?void 0:e.turns,HS,1,30),x=Math.min(zS,Math.max(0,OS)),v=Math.min(1,Math.max(0,DS)),m=Math.max(0,(e==null?void 0:e.speed)??Uu),h=(e==null?void 0:e.direction)==="left"?"left":"right",y=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",b=(e==null?void 0:e.cornerRadius)??0,C=(e==null?void 0:e.blur)!=="off",S=s.useMemo(()=>US(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),w=S.display==="cover",D=se=>A.scalingValue(se,n??!1),_=s.useMemo(()=>ZS(x),[x]),z=s.useMemo(()=>QS(l,d,w,v),[l,d,w,v]),H=s.useMemo(()=>qS(o,ow(o,D,l,z,x,_,w,C)),[o,l,z,x,_,w,C,n]),L=s.useMemo(()=>(t??[]).filter(se=>{var k;return!!((k=se.image)!=null&&k.url)}),[t]),V=c/u,$=d*KS(S),E=Math.min(kS,p*u),F=AS*u,W=E+F*2,M=Math.max(0,p-1)*c+(u-1)*V,R=m>0,G=y==="scroll"&&R,Z=y==="autoplay"&&R&&(n?!!i:!0),[T,j]=s.useState(0);s.useEffect(()=>{if(!G)return;const se=r.current;if(!se)return;const k=()=>{const q=se.getBoundingClientRect(),ce=window.innerHeight||document.documentElement.clientHeight,J=ce+q.height;J<=0||j(Math.min(1,Math.max(0,(ce-q.top)/J)))};k(),window.addEventListener("scroll",k,{passive:!0}),window.addEventListener("resize",k);const re=new ResizeObserver(k);return re.observe(se),()=>{window.removeEventListener("scroll",k),window.removeEventListener("resize",k),re.disconnect()}},[G]);const Y=G?cw(T,m,h):0,le=R&&y==="autoplay"?360/(m*MS):0;return L.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:H}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:D(l),marginInline:"auto"}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:H}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:D(l),height:D(M),marginInline:"auto"},children:Array.from({length:W},(se,k)=>{const re=k-F,ce=L[ip(re,L.length)].image,J=Rl(re,u),be=rw(re,u),We=G?op(be+Y):be,ye=sw(re,u,c,V),ue=v===0?0:(nd(J+7.3)-.5)*v*V,ee=w?1:1+(nd(J+3.1)-.5)*2*Ku*(.35+v),de=We*Math.PI*2,{offset:ne,scale:Pe}=Zu(x,_,de),Te=d*ee,Oe=tw(Te,Pe),ve=Ju(l,z,ne),Se={"--helix-base-w":D(Te),...w?{"--helix-base-h":D($)}:{}},$e={top:D(ye+ue),transform:"translateY(-50%)",...Se,...Z?{animationDuration:`${Lr(le)}s`,animationDelay:lw(be,le,h),animationDirection:h==="left"?"reverse":"normal"}:{left:ew(D,ve,Oe),width:D(Oe),...w?{height:D($*Pe)}:{},zIndex:Qu(Pe),opacity:tp(de),filter:np(de,C)}},f=b>0?{borderRadius:D(b)}:{},X=w?{...f,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:f,N=YS(ce)?a.jsx("video",{className:`${o}-media`,style:X,src:ce.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:X,src:ce.url,alt:ce.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{className:Z?`${o}-item`:`${o}-item ${o}-item-static`,style:$e,children:w?a.jsx("div",{className:`${o}-cover`,style:f,children:N}):N},`${p}-${u}-${re}`)})})]})}const uw=`import { useEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
23170
+ }`}function rp(e,t){return(e%t+t)%t}function cw(e,t){return Pl(e,t)/t}function Pl(e,t){return rp(e,t)}function dw(e,t){return Math.floor(e/t)}function uw(e,t,n,i){return dw(e,t)*n+Pl(e,t)*i}function pw(e,t,n){const i=n==="left"?1-e:e;return`${Lr(-i*t)}s`}function id(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function ap(e){const t=e%1;return t<0?t+1:t}function mw(e,t,n){const i=t/Ku,o=n==="left"?-e*i:e*i;return ap(o)}function gw({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=A.useScopedStyles(),r=s.useRef(null),l=ms((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),HS),d=ms(e==null?void 0:e.imageWidth,OS),c=ms(e==null?void 0:e.turnHeight,DS),u=nd(e==null?void 0:e.itemsPerTurn,zS,3,40),p=nd(e==null?void 0:e.turns,BS,1,30),x=Math.min(GS,Math.max(0,jS)),y=Math.min(1,Math.max(0,VS)),m=Math.max(0,(e==null?void 0:e.speed)??Ku),h=(e==null?void 0:e.direction)==="left"?"left":"right",v=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",b=(e==null?void 0:e.cornerRadius)??0,C=(e==null?void 0:e.blur)!=="off",S=s.useMemo(()=>JS(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),w=S.display==="cover",D=se=>A.scalingValue(se,n??!1),_=s.useMemo(()=>tw(x),[x]),z=s.useMemo(()=>iw(l,d,w,y),[l,d,w,y]),H=s.useMemo(()=>ZS(o,lw(o,D,l,z,x,_,w,C)),[o,l,z,x,_,w,C,n]),L=s.useMemo(()=>(t??[]).filter(se=>{var M;return!!((M=se.image)!=null&&M.url)}),[t]),V=c/u,$=d*QS(S),k=Math.min(_S,p*u),F=WS*u,W=k+F*2,E=Math.max(0,p-1)*c+(u-1)*V,R=m>0,G=v==="scroll"&&R,Z=v==="autoplay"&&R&&(n?!!i:!0),[T,j]=s.useState(0);s.useEffect(()=>{if(!G)return;const se=r.current;if(!se)return;const M=()=>{const q=se.getBoundingClientRect(),ce=window.innerHeight||document.documentElement.clientHeight,J=ce+q.height;J<=0||j(Math.min(1,Math.max(0,(ce-q.top)/J)))};M(),window.addEventListener("scroll",M,{passive:!0}),window.addEventListener("resize",M);const re=new ResizeObserver(M);return re.observe(se),()=>{window.removeEventListener("scroll",M),window.removeEventListener("resize",M),re.disconnect()}},[G]);const K=G?mw(T,m,h):0,le=R&&v==="autoplay"?360/(m*NS):0;return L.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:H}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:D(l),marginInline:"auto"}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:H}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:D(l),height:D(E),marginInline:"auto"},children:Array.from({length:W},(se,M)=>{const re=M-F,ce=L[rp(re,L.length)].image,J=Pl(re,u),be=cw(re,u),We=G?ap(be+K):be,ye=uw(re,u,c,V),ue=y===0?0:(id(J+7.3)-.5)*y*V,ee=w?1:1+(id(J+3.1)-.5)*2*Zu*(.35+y),de=We*Math.PI*2,{offset:ne,scale:Pe}=Qu(x,_,de),Te=d*ee,Oe=rw(Te,Pe),ve=ep(l,z,ne),Se={"--helix-base-w":D(Te),...w?{"--helix-base-h":D($)}:{}},$e={top:D(ye+ue),transform:"translateY(-50%)",...Se,...Z?{animationDuration:`${Lr(le)}s`,animationDelay:pw(be,le,h),animationDirection:h==="left"?"reverse":"normal"}:{left:ow(D,ve,Oe),width:D(Oe),...w?{height:D($*Pe)}:{},zIndex:tp(Pe),opacity:ip(de),filter:op(de,C)}},f=b>0?{borderRadius:D(b)}:{},X=w?{...f,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:f,N=ew(ce)?a.jsx("video",{className:`${o}-media`,style:X,src:ce.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:X,src:ce.url,alt:ce.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{className:Z?`${o}-item`:`${o}-item ${o}-item-static`,style:$e,children:w?a.jsx("div",{className:`${o}-cover`,style:f,children:N}):N},`${p}-${u}-${re}`)})})]})}const hw=`import { useEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
23171
23171
  import { CommonComponentProps } from '../props';
23172
23172
  import { scalingValue } from '../utils/scalingValue';
23173
23173
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -23705,7 +23705,7 @@ export function Helix({
23705
23705
  </>
23706
23706
  );
23707
23707
  }
23708
- `,pw=["https://cdn.cntrl.site/component-assets/Helix-default-1.png","https://cdn.cntrl.site/component-assets/Helix-default-2.png","https://cdn.cntrl.site/component-assets/Helix-default-3.png","https://cdn.cntrl.site/component-assets/Helix-default-4.png","https://cdn.cntrl.site/component-assets/Helix-default-5.png"],mw={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}}}},default:pw.map(e=>({image:{url:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},gw={element:dw,id:"helix",name:"Helix",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Helix.mp4"},version:1,defaultSize:{d:{width:720,height:540}},schema:mw,sourceCode:uw,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},wn=300,en=300,hw=8/1440,mo=.004,fw=50,yw=1440,Vi=fw/yw;function vw(e){if(e==="default"||e==="compact"||e==="open")return e;if(e==="onScroll")return"compact"}function xw(e){return e==="center"||e==="right"?e:"left"}function bw(e){const t=(e??"always").trim().toLowerCase().replace(/[_-]+/g," ");return t==="open only"||t==="openonly"?"open only":t==="open and compact"||t==="openandcompact"?"open and compact":t==="default and open"||t==="defaultandopen"?"default and open":"always"}function Sw(e,t){switch(bw(e.showIn)){case"open only":return!1;case"open and compact":return t==="compact";case"default and open":return t==="default";default:return!0}}function ww(e,t){if(!e)return"";const n=t==null?void 0:t.find(i=>i.id===e);return n?n.slug===""?"/":`/${n.slug}`:e.startsWith("/")||e.startsWith("#")||/^[a-z][a-z\d+\-.]*:/i.test(e)?e:t?`/${e}`:e}function _s(e,t){const n=e.label||"Link",i=e.mode==="url"?"url":"page",o=(e.openIn??"").toLowerCase(),r=o.includes("new")||o==="blank"||o==="_blank"?"_blank":void 0;if(i==="url")return{label:n,href:e.url??"",target:r};const l=ww(e.page??"",t),d=(e.anchor??"").replace(/^#/,""),c=d?l?`${l}#${d}`:`#${d}`:l;return{label:n,href:c,target:r}}const fi=24,hi=fi*.125,rp=fi*.125,ms=(fi-(3*hi+2*rp))/2,id=hi+rp;function $w({className:e,lineClassName:t}){return a.jsxs("svg",{className:e,viewBox:`0 0 ${fi} ${fi}`,"aria-hidden":"true",children:[a.jsx("rect",{className:`${t} ${t}-top`,x:"0",y:ms,width:fi,height:hi,rx:hi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:ms+id,width:fi,height:hi,rx:hi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:ms+2*id,width:fi,height:hi,rx:hi/2})]})}function Cw(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Tw(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:A.scalingValue((o-t)/2,i)}}function od(e,t={}){return{fontFamily:e.fontFamily??t.fontFamily,fontSettings:e.fontSettings??t.fontSettings,fontSize:e.fontSize??t.fontSize,lineHeight:e.lineHeight??t.lineHeight,letterSpacing:e.letterSpacing??t.letterSpacing??0,wordSpacing:e.wordSpacing??t.wordSpacing??0,textAlign:e.textAlign??t.textAlign??"left",textAppearance:e.textAppearance??t.textAppearance}}function rd(e,t,n){var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??.01,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing??0,wordSpacing:t.wordSpacing??0,textAlign:t.textAlign,textAppearance:t.textAppearance,color:""};return{css:{...dn(Qt(i,n)),...Tw(t.fontSize,t.lineHeight,e,n)},className:Cw(t.fontSize,t.lineHeight,`${e}-link-text`,`${e}-text-tight-leading`)}}function ad(e){const t=e.split(/\r?\n/);return t.length===1?e:t.map((n,i)=>a.jsxs(s.Fragment,{children:[n,i<t.length-1?a.jsx("br",{}):null]},i))}function sd(e,t,n,i){const o=Math.max(0,n-i),r=e+t;if(r<=o||r<=0)return{start:e,end:t};const l=o/r;return{start:e*l,end:t*l}}function ap(e){const n=Math.max(Vi,e.fontSize??Vi),{start:i,end:o}=sd(e.textPaddingTop,e.textPaddingBottom,1,n),{start:r,end:l}=sd(e.textPaddingLeft,e.textPaddingRight,1,Vi);return{effectivePaddingLeft:r,effectivePaddingRight:l,effectivePaddingTop:i,effectivePaddingBottom:o,panelSize:1}}function Lw(e){if(e==="center"||e==="center-center")return{horizontalAlign:"center",verticalAlign:"center"};const[t,n]=e.split("-");return{horizontalAlign:t,verticalAlign:n}}function Iw(e){return e.position?Lw(e.position):{horizontalAlign:e.horizontalAlign??"left",verticalAlign:e.verticalAlign??"top"}}function Rw(e,t){return e.textPaddingLeft!==t.textPaddingLeft||e.textPaddingRight!==t.textPaddingRight||e.textPaddingTop!==t.textPaddingTop||e.textPaddingBottom!==t.textPaddingBottom}const Pw=[["onScrollIconColor","compactIconColor"],["onScrollCloseButtonColor","compactCloseButtonColor"],["onScrollLinkColor","compactLinkColor"],["onScrollLogoColor","compactLogoColor"],["onScrollBackgroundColor","compactBackgroundColor"],["onScrollPanelColor","compactBackgroundColor"],["onScrollLogoMaxWidth","compactLogoMaxWidth"],["onScrollLogoMaxHeight","compactLogoMaxHeight"],["onScrollLogoPosition","compactLogoPosition"],["onScrollPanelHeight","compactPanelHeight"],["onScrollIconSize","compactIconSize"],["onScrollNavTextWidth","compactNavTextWidth"],["onScrollNavGap","compactNavGap"],["onScrollNavPaddingLeft","compactNavPaddingLeft"],["onScrollNavPaddingRight","compactNavPaddingRight"],["onScrollFontFamily","compactFontFamily"],["onScrollFontSettings","compactFontSettings"],["onScrollFontSize","compactFontSize"],["onScrollLineHeight","compactLineHeight"],["onScrollLetterSpacing","compactLetterSpacing"],["onScrollWordSpacing","compactWordSpacing"],["onScrollTextAlign","compactTextAlign"],["onScrollTextAppearance","compactTextAppearance"]];function sp(e){var o,r;const t=e,n={};for(const[l,d]of Pw)e[d]!==void 0||t[l]===void 0||(n[d]=t[l]);const i=t.stateOverrides;return i&&(i.onScroll!==void 0||i["onScroll-hover"]!==void 0)&&(n.stateOverrides={...e.stateOverrides},i.onScroll!==void 0&&((o=e.stateOverrides)==null?void 0:o.compact)===void 0&&(n.stateOverrides.compact=i.onScroll),i["onScroll-hover"]!==void 0&&((r=e.stateOverrides)==null?void 0:r["compact-hover"])===void 0&&(n.stateOverrides["compact-hover"]=i["onScroll-hover"])),Object.keys(n).length===0?e:{...e,...n}}function ld(e){var o,r,l,d,c,u,p,x,v,m,h,y,b,C,S,w,D,_;e=sp(e);const t=e,n={};if(e.backgroundColor===void 0&&t.panelColor!==void 0&&(n.backgroundColor=t.panelColor),e.openFontFamily===void 0&&e.fontFamily!==void 0&&(n.openFontFamily=e.fontFamily),e.openFontSettings===void 0&&e.fontSettings!==void 0&&(n.openFontSettings=e.fontSettings),e.openFontSize===void 0&&e.fontSize!==void 0&&(n.openFontSize=e.fontSize),e.openLineHeight===void 0&&e.lineHeight!==void 0&&(n.openLineHeight=e.lineHeight),e.openLetterSpacing===void 0&&e.letterSpacing!==void 0&&(n.openLetterSpacing=e.letterSpacing),e.openWordSpacing===void 0&&e.wordSpacing!==void 0&&(n.openWordSpacing=e.wordSpacing),e.openTextAlign===void 0&&e.textAlign!==void 0&&(n.openTextAlign=e.textAlign),e.openTextAppearance===void 0&&e.textAppearance!==void 0&&(n.openTextAppearance=e.textAppearance),e.openLinkColor===void 0){const z=((r=(o=e.stateOverrides)==null?void 0:o.open)==null?void 0:r.openLinkColor)??((d=(l=e.stateOverrides)==null?void 0:l.open)==null?void 0:d.linkColor)??e.linkColor;z!==void 0&&(n.openLinkColor=z)}if(e.compactIconColor===void 0){const z=((u=(c=e.stateOverrides)==null?void 0:c.compact)==null?void 0:u.iconColor)??e.iconColor;z!==void 0&&(n.compactIconColor=z)}if(e.compactCloseButtonColor===void 0){const z=((x=(p=e.stateOverrides)==null?void 0:p.compact)==null?void 0:x.closeButtonColor)??e.closeButtonColor;z!==void 0&&(n.compactCloseButtonColor=z)}if(e.compactLinkColor===void 0){const z=((m=(v=e.stateOverrides)==null?void 0:v.compact)==null?void 0:m.linkColor)??e.linkColor;z!==void 0&&(n.compactLinkColor=z)}if(e.compactLogoColor===void 0){const z=((y=(h=e.stateOverrides)==null?void 0:h.compact)==null?void 0:y.logoColor)??e.logoColor;z!==void 0&&(n.compactLogoColor=z)}if(e.openLogoColor===void 0){const z=((C=(b=e.stateOverrides)==null?void 0:b.open)==null?void 0:C.logoColor)??e.logoColor;z!==void 0&&(n.openLogoColor=z)}if(e.compactBackgroundColor===void 0){const z=((w=(S=e.stateOverrides)==null?void 0:S.compact)==null?void 0:w.backgroundColor)??((_=(D=t.stateOverrides)==null?void 0:D.compact)==null?void 0:_.panelColor)??t.compactPanelColor??t.onScrollPanelColor??e.backgroundColor??n.backgroundColor;z!==void 0&&(n.compactBackgroundColor=z)}e.logoMaxHeight===void 0&&e.logoMaxWidth!==void 0&&(n.logoMaxHeight=e.logoMaxWidth),e.compactLogoMaxHeight===void 0&&e.compactLogoMaxWidth!==void 0&&(n.compactLogoMaxHeight=e.compactLogoMaxWidth);const i=(z,H)=>{if(e[z]!==void 0)return;const L=e[H];L!==void 0&&(n[z]=L)};return i("compactLogoMaxHeight","logoMaxHeight"),i("compactLogoPosition","logoPosition"),i("compactPanelHeight","panelHeight"),i("compactShowIcon","showIcon"),i("compactIconSize","iconSize"),i("compactNavTextWidth","navTextWidth"),i("compactNavGap","navGap"),i("compactNavPaddingLeft","navPaddingLeft"),i("compactNavPaddingRight","navPaddingRight"),i("compactFontFamily","fontFamily"),i("compactFontSettings","fontSettings"),i("compactFontSize","fontSize"),i("compactLineHeight","lineHeight"),i("compactLetterSpacing","letterSpacing"),i("compactWordSpacing","wordSpacing"),i("compactTextAlign","textAlign"),i("compactTextAppearance","textAppearance"),Object.keys(n).length===0?e:{...e,...n}}function Ew(e,t){const n=ap({textPaddingLeft:e.textPaddingLeft??0,textPaddingRight:e.textPaddingRight??0,textPaddingTop:e.textPaddingTop??0,textPaddingBottom:e.textPaddingBottom??0,fontSize:e.openFontSize??e.fontSize??t.openFontSize??t.fontSize}),i={};return(e.textPaddingLeft??0)!==n.effectivePaddingLeft&&(i.textPaddingLeft=n.effectivePaddingLeft),(e.textPaddingRight??0)!==n.effectivePaddingRight&&(i.textPaddingRight=n.effectivePaddingRight),(e.textPaddingTop??0)!==n.effectivePaddingTop&&(i.textPaddingTop=n.effectivePaddingTop),(e.textPaddingBottom??0)!==n.effectivePaddingBottom&&(i.textPaddingBottom=n.effectivePaddingBottom),Object.keys(i).length===0?e:{...e,...i}}function Mw(e,t){return{paddingLeft:A.scalingValue(e.effectivePaddingLeft,t),paddingRight:A.scalingValue(e.effectivePaddingRight,t),paddingTop:A.scalingValue(e.effectivePaddingTop,t),paddingBottom:A.scalingValue(e.effectivePaddingBottom,t)}}function kw(e,t,n,i){const o=Math.max(Vi,n??Vi),r=Math.max(t.effectivePaddingTop,mo),l=Math.max(t.effectivePaddingBottom,mo),d=Math.max(0,t.panelSize-t.effectivePaddingBottom-o),c=Math.max(0,t.panelSize-t.effectivePaddingTop-o),u=Math.max(t.effectivePaddingLeft,mo),p=Math.max(t.effectivePaddingRight,mo),x=Math.max(0,t.panelSize-t.effectivePaddingRight-Vi),v=Math.max(0,t.panelSize-t.effectivePaddingLeft-Vi);return a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:i(r)}}),a.jsx("div",{"data-controls":"textPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:i(l)}}),a.jsx("div",{"data-controls":"textPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(x),className:`${e}-control-anchor`,style:{top:0,left:0,width:i(u),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(v),className:`${e}-control-anchor`,style:{top:0,right:0,width:i(p),height:"100%"}})]})}const Aw={iconColor:"icon-color",closeButtonColor:"close-button-color",linkColor:"link-color",openLinkColor:"menu-link-color",compactIconColor:"compact-icon-color",compactCloseButtonColor:"compact-close-button-color",compactLinkColor:"compact-link-color",compactLogoColor:"compact-logo-color",compactBackgroundColor:"compact-background-color",openLogoColor:"open-logo-color",menuBackgroundColor:"menu-background-color",overlayColor:"overlay-color",backgroundColor:"background-color",logoColor:"logo-color"},Fw=["hover","open"],Nw={top:"flex-start",center:"center",bottom:"flex-end"},_w={left:"flex-start",center:"center",right:"flex-end"};function Ww(e){return`
23708
+ `,fw=["https://cdn.cntrl.site/component-assets/Helix-default-1.png","https://cdn.cntrl.site/component-assets/Helix-default-2.png","https://cdn.cntrl.site/component-assets/Helix-default-3.png","https://cdn.cntrl.site/component-assets/Helix-default-4.png","https://cdn.cntrl.site/component-assets/Helix-default-5.png"],yw={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}}}},default:fw.map(e=>({image:{url:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},vw={element:gw,id:"helix",name:"Helix",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Helix.mp4"},version:1,defaultSize:{d:{width:720,height:540}},schema:yw,sourceCode:hw,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},wn=300,en=300,xw=8/1440,mo=.004,bw=50,Sw=1440,Vi=bw/Sw;function ww(e){if(e==="default"||e==="compact"||e==="open")return e;if(e==="onScroll")return"compact"}function $w(e){return e==="center"||e==="right"?e:"left"}function Cw(e,t){if(e&&typeof e=="object"){if(t&&typeof e[t]=="string")return e[t];for(const n in e)if(typeof e[n]=="string")return e[n];return}return e}function sp(e,t){const n=(Cw(e,t)??"always").trim().toLowerCase().replace(/[_-]+/g," ");return n==="open only"||n==="openonly"?"open only":n==="open and compact"||n==="openandcompact"?"open and compact":n==="default and open"||n==="defaultandopen"?"default and open":n==="default and compact"||n==="defaultandcompact"?"default and compact":"always"}function Tw(e,t,n){switch(sp(e.showIn,n)){case"open only":return!1;case"open and compact":return t==="compact";case"default and compact":return!0;case"default and open":return t==="default";default:return!0}}function Lw(e,t){switch(sp(e.showIn,t)){case"default and compact":return!1;default:return!0}}function Iw(e,t){if(!e)return"";const n=t==null?void 0:t.find(i=>i.id===e);return n?n.slug===""?"/":`/${n.slug}`:e.startsWith("/")||e.startsWith("#")||/^[a-z][a-z\d+\-.]*:/i.test(e)?e:t?`/${e}`:e}function od(e){const t=(e??"").toLowerCase();return t==="blank"||t==="_blank"||t.includes("new")}function lp(e){const t=e.link;if(t&&typeof t=="object"){const i=od(t.target)?"_blank":void 0;if(t.type==="url")return{type:"url",value:t.value??t.url??"",target:i};if(t.type==="anchor")return{type:"anchor",value:t.value??"",target:i};if(t.type==="page")return{type:"page",value:t.value??"",target:i,anchor:t.anchor};if(typeof t.url=="string")return{type:"url",value:t.url,target:i}}const n=od(e.openIn)?"_blank":void 0;return e.mode==="url"?{type:"url",value:e.url??"",target:n}:{type:"page",value:e.page??"",target:n,anchor:e.anchor}}function Ws(e,t){const n=e.label||"Link",i=lp(e);if(i.type==="url")return{label:n,href:i.value,target:i.target};if(i.type==="anchor"){const d=i.value.replace(/^#/,"");return{label:n,href:d?`#${d}`:"",target:i.target}}const o=Iw(i.value,t),r=(i.anchor??"").replace(/^#/,""),l=r?o?`${o}#${r}`:`#${r}`:o;return{label:n,href:l,target:i.target}}const fi=24,hi=fi*.125,cp=fi*.125,gs=(fi-(3*hi+2*cp))/2,rd=hi+cp;function Rw({className:e,lineClassName:t}){return a.jsxs("svg",{className:e,viewBox:`0 0 ${fi} ${fi}`,"aria-hidden":"true",children:[a.jsx("rect",{className:`${t} ${t}-top`,x:"0",y:gs,width:fi,height:hi,rx:hi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:gs+rd,width:fi,height:hi,rx:hi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:gs+2*rd,width:fi,height:hi,rx:hi/2})]})}function Pw(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function kw(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:A.scalingValue((o-t)/2,i)}}function ad(e,t={}){return{fontFamily:e.fontFamily??t.fontFamily,fontSettings:e.fontSettings??t.fontSettings,fontSize:e.fontSize??t.fontSize,lineHeight:e.lineHeight??t.lineHeight,letterSpacing:e.letterSpacing??t.letterSpacing??0,wordSpacing:e.wordSpacing??t.wordSpacing??0,textAlign:e.textAlign??t.textAlign??"left",textAppearance:e.textAppearance??t.textAppearance}}function sd(e,t,n){var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??.01,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing??0,wordSpacing:t.wordSpacing??0,textAlign:t.textAlign,textAppearance:t.textAppearance,color:""};return{css:{...dn(Qt(i,n)),...kw(t.fontSize,t.lineHeight,e,n)},className:Pw(t.fontSize,t.lineHeight,`${e}-link-text`,`${e}-text-tight-leading`)}}function ld(e){const t=e.split(/\r?\n/);return t.length===1?e:t.map((n,i)=>a.jsxs(s.Fragment,{children:[n,i<t.length-1?a.jsx("br",{}):null]},i))}function cd(e,t,n,i){const o=Math.max(0,n-i),r=e+t;if(r<=o||r<=0)return{start:e,end:t};const l=o/r;return{start:e*l,end:t*l}}function dp(e){const n=Math.max(Vi,e.fontSize??Vi),{start:i,end:o}=cd(e.textPaddingTop,e.textPaddingBottom,1,n),{start:r,end:l}=cd(e.textPaddingLeft,e.textPaddingRight,1,Vi);return{effectivePaddingLeft:r,effectivePaddingRight:l,effectivePaddingTop:i,effectivePaddingBottom:o,panelSize:1}}function Ew(e){if(e==="center"||e==="center-center")return{horizontalAlign:"center",verticalAlign:"center"};const[t,n]=e.split("-");return{horizontalAlign:t,verticalAlign:n}}function Mw(e){return e.position?Ew(e.position):{horizontalAlign:e.horizontalAlign??"left",verticalAlign:e.verticalAlign??"top"}}function Aw(e,t){return e.textPaddingLeft!==t.textPaddingLeft||e.textPaddingRight!==t.textPaddingRight||e.textPaddingTop!==t.textPaddingTop||e.textPaddingBottom!==t.textPaddingBottom}const Fw=[["onScrollIconColor","compactIconColor"],["onScrollCloseButtonColor","compactCloseButtonColor"],["onScrollLinkColor","compactLinkColor"],["onScrollLogoColor","compactLogoColor"],["onScrollBackgroundColor","compactBackgroundColor"],["onScrollPanelColor","compactBackgroundColor"],["onScrollLogoMaxWidth","compactLogoMaxWidth"],["onScrollLogoMaxHeight","compactLogoMaxHeight"],["onScrollLogoPosition","compactLogoPosition"],["onScrollPanelHeight","compactPanelHeight"],["onScrollIconSize","compactIconSize"],["onScrollNavTextWidth","compactNavTextWidth"],["onScrollNavGap","compactNavGap"],["onScrollNavPaddingLeft","compactNavPaddingLeft"],["onScrollNavPaddingRight","compactNavPaddingRight"],["onScrollFontFamily","compactFontFamily"],["onScrollFontSettings","compactFontSettings"],["onScrollFontSize","compactFontSize"],["onScrollLineHeight","compactLineHeight"],["onScrollLetterSpacing","compactLetterSpacing"],["onScrollWordSpacing","compactWordSpacing"],["onScrollTextAlign","compactTextAlign"],["onScrollTextAppearance","compactTextAppearance"]];function up(e){var o,r;const t=e,n={};for(const[l,d]of Fw)e[d]!==void 0||t[l]===void 0||(n[d]=t[l]);const i=t.stateOverrides;return i&&(i.onScroll!==void 0||i["onScroll-hover"]!==void 0)&&(n.stateOverrides={...e.stateOverrides},i.onScroll!==void 0&&((o=e.stateOverrides)==null?void 0:o.compact)===void 0&&(n.stateOverrides.compact=i.onScroll),i["onScroll-hover"]!==void 0&&((r=e.stateOverrides)==null?void 0:r["compact-hover"])===void 0&&(n.stateOverrides["compact-hover"]=i["onScroll-hover"])),Object.keys(n).length===0?e:{...e,...n}}function dd(e){var o,r,l,d,c,u,p,x,y,m,h,v,b,C,S,w,D,_;e=up(e);const t=e,n={};if(e.backgroundColor===void 0&&t.panelColor!==void 0&&(n.backgroundColor=t.panelColor),e.openFontFamily===void 0&&e.fontFamily!==void 0&&(n.openFontFamily=e.fontFamily),e.openFontSettings===void 0&&e.fontSettings!==void 0&&(n.openFontSettings=e.fontSettings),e.openFontSize===void 0&&e.fontSize!==void 0&&(n.openFontSize=e.fontSize),e.openLineHeight===void 0&&e.lineHeight!==void 0&&(n.openLineHeight=e.lineHeight),e.openLetterSpacing===void 0&&e.letterSpacing!==void 0&&(n.openLetterSpacing=e.letterSpacing),e.openWordSpacing===void 0&&e.wordSpacing!==void 0&&(n.openWordSpacing=e.wordSpacing),e.openTextAlign===void 0&&e.textAlign!==void 0&&(n.openTextAlign=e.textAlign),e.openTextAppearance===void 0&&e.textAppearance!==void 0&&(n.openTextAppearance=e.textAppearance),e.openLinkColor===void 0){const z=((r=(o=e.stateOverrides)==null?void 0:o.open)==null?void 0:r.openLinkColor)??((d=(l=e.stateOverrides)==null?void 0:l.open)==null?void 0:d.linkColor)??e.linkColor;z!==void 0&&(n.openLinkColor=z)}if(e.compactIconColor===void 0){const z=((u=(c=e.stateOverrides)==null?void 0:c.compact)==null?void 0:u.iconColor)??e.iconColor;z!==void 0&&(n.compactIconColor=z)}if(e.compactCloseButtonColor===void 0){const z=((x=(p=e.stateOverrides)==null?void 0:p.compact)==null?void 0:x.closeButtonColor)??e.closeButtonColor;z!==void 0&&(n.compactCloseButtonColor=z)}if(e.compactLinkColor===void 0){const z=((m=(y=e.stateOverrides)==null?void 0:y.compact)==null?void 0:m.linkColor)??e.linkColor;z!==void 0&&(n.compactLinkColor=z)}if(e.compactLogoColor===void 0){const z=((v=(h=e.stateOverrides)==null?void 0:h.compact)==null?void 0:v.logoColor)??e.logoColor;z!==void 0&&(n.compactLogoColor=z)}if(e.openLogoColor===void 0){const z=((C=(b=e.stateOverrides)==null?void 0:b.open)==null?void 0:C.logoColor)??e.logoColor;z!==void 0&&(n.openLogoColor=z)}if(e.compactBackgroundColor===void 0){const z=((w=(S=e.stateOverrides)==null?void 0:S.compact)==null?void 0:w.backgroundColor)??((_=(D=t.stateOverrides)==null?void 0:D.compact)==null?void 0:_.panelColor)??t.compactPanelColor??t.onScrollPanelColor??e.backgroundColor??n.backgroundColor;z!==void 0&&(n.compactBackgroundColor=z)}e.logoMaxHeight===void 0&&e.logoMaxWidth!==void 0&&(n.logoMaxHeight=e.logoMaxWidth),e.compactLogoMaxHeight===void 0&&e.compactLogoMaxWidth!==void 0&&(n.compactLogoMaxHeight=e.compactLogoMaxWidth);const i=(z,H)=>{if(e[z]!==void 0)return;const L=e[H];L!==void 0&&(n[z]=L)};return i("compactLogoMaxHeight","logoMaxHeight"),i("compactLogoPosition","logoPosition"),i("compactPanelHeight","panelHeight"),i("compactShowIcon","showIcon"),i("compactIconSize","iconSize"),i("compactNavTextWidth","navTextWidth"),i("compactNavGap","navGap"),i("compactNavPaddingLeft","navPaddingLeft"),i("compactNavPaddingRight","navPaddingRight"),i("compactFontFamily","fontFamily"),i("compactFontSettings","fontSettings"),i("compactFontSize","fontSize"),i("compactLineHeight","lineHeight"),i("compactLetterSpacing","letterSpacing"),i("compactWordSpacing","wordSpacing"),i("compactTextAlign","textAlign"),i("compactTextAppearance","textAppearance"),Object.keys(n).length===0?e:{...e,...n}}function Nw(e,t){const n=dp({textPaddingLeft:e.textPaddingLeft??0,textPaddingRight:e.textPaddingRight??0,textPaddingTop:e.textPaddingTop??0,textPaddingBottom:e.textPaddingBottom??0,fontSize:e.openFontSize??e.fontSize??t.openFontSize??t.fontSize}),i={};return(e.textPaddingLeft??0)!==n.effectivePaddingLeft&&(i.textPaddingLeft=n.effectivePaddingLeft),(e.textPaddingRight??0)!==n.effectivePaddingRight&&(i.textPaddingRight=n.effectivePaddingRight),(e.textPaddingTop??0)!==n.effectivePaddingTop&&(i.textPaddingTop=n.effectivePaddingTop),(e.textPaddingBottom??0)!==n.effectivePaddingBottom&&(i.textPaddingBottom=n.effectivePaddingBottom),Object.keys(i).length===0?e:{...e,...i}}function _w(e,t){return{paddingLeft:A.scalingValue(e.effectivePaddingLeft,t),paddingRight:A.scalingValue(e.effectivePaddingRight,t),paddingTop:A.scalingValue(e.effectivePaddingTop,t),paddingBottom:A.scalingValue(e.effectivePaddingBottom,t)}}function Ww(e,t,n,i){const o=Math.max(Vi,n??Vi),r=Math.max(t.effectivePaddingTop,mo),l=Math.max(t.effectivePaddingBottom,mo),d=Math.max(0,t.panelSize-t.effectivePaddingBottom-o),c=Math.max(0,t.panelSize-t.effectivePaddingTop-o),u=Math.max(t.effectivePaddingLeft,mo),p=Math.max(t.effectivePaddingRight,mo),x=Math.max(0,t.panelSize-t.effectivePaddingRight-Vi),y=Math.max(0,t.panelSize-t.effectivePaddingLeft-Vi);return a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:i(r)}}),a.jsx("div",{"data-controls":"textPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:i(l)}}),a.jsx("div",{"data-controls":"textPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(x),className:`${e}-control-anchor`,style:{top:0,left:0,width:i(u),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(y),className:`${e}-control-anchor`,style:{top:0,right:0,width:i(p),height:"100%"}})]})}const Hw={iconColor:"icon-color",closeButtonColor:"close-button-color",linkColor:"link-color",openLinkColor:"menu-link-color",compactIconColor:"compact-icon-color",compactCloseButtonColor:"compact-close-button-color",compactLinkColor:"compact-link-color",compactLogoColor:"compact-logo-color",compactBackgroundColor:"compact-background-color",openLogoColor:"open-logo-color",menuBackgroundColor:"menu-background-color",overlayColor:"overlay-color",backgroundColor:"background-color",logoColor:"logo-color"},Ow=["hover","open"],Dw={top:"flex-start",center:"center",bottom:"flex-end"},zw={left:"flex-start",center:"center",right:"flex-end"};function Bw(e){return`
23709
23709
  .${e}-root {
23710
23710
  position: relative;
23711
23711
  display: block;
@@ -23967,6 +23967,11 @@ export function Helix({
23967
23967
  cursor: default;
23968
23968
  pointer-events: none;
23969
23969
  }
23970
+ .${e}-nav-slide {
23971
+ position: relative;
23972
+ transform: translateY(var(--cntrl-nav-slide, 0%));
23973
+ transition: transform 320ms ease;
23974
+ }
23970
23975
  .${e}-nav-bar {
23971
23976
  position: relative;
23972
23977
  display: flex;
@@ -24172,6 +24177,8 @@ export function Helix({
24172
24177
  align-items: center;
24173
24178
  z-index: 3;
24174
24179
  pointer-events: auto;
24180
+ transform: translateY(var(--cntrl-nav-slide, 0%));
24181
+ transition: transform 320ms ease;
24175
24182
  }
24176
24183
  .${e}-nav-toggle-wrap-right {
24177
24184
  right: 0;
@@ -24248,7 +24255,7 @@ export function Helix({
24248
24255
  word-spacing ${en}ms ease,
24249
24256
  padding ${en}ms ease;
24250
24257
  }
24251
- `}function Hw(e){return`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`}function Ow(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")?!0:t.includes(".svg")}function Dw(e){const t=Ow(e),[n,i]=s.useState(!1);return s.useEffect(()=>{if(t||!e.startsWith("blob:")){i(!1);return}let o=!1;return fetch(e).then(r=>r.blob()).then(async r=>{if(o)return;if(r.type.includes("svg")){i(!0);return}if(r.type.startsWith("image/")&&!r.type.includes("svg")){i(!1);return}const l=await r.text();o||i(/<svg[\s>]/i.test(l.trim()))}).catch(()=>{o||i(!1)}),()=>{o=!0}},[t,e]),t||n}function zw(e){const t=e.indexOf("#");if(t===-1)return"";try{return decodeURIComponent(e.slice(t+1))}catch{return e.slice(t+1)}}function Bw(e){if(!e||e.startsWith("#"))return!0;try{return new URL(e,window.location.href).pathname===window.location.pathname}catch{return!1}}function cd(e){if(!e)return!1;const t=document.getElementById(e),n=document.querySelector(`[data-section-id="${CSS.escape(e)}"]`),i=t??n;return i instanceof HTMLElement?(i.scrollIntoView({behavior:"smooth",block:"start"}),!0):!1}function jw(e,t,n={}){const{isEditor:i,isPreviewMode:o,item:r,pages:l,onLinkNavigate:d}=n,c=e.currentTarget.getAttribute("href")??"",u=zw(c),p=e.currentTarget.target==="_blank";if(r&&d){e.preventDefault(),e.stopPropagation();const x=_s(r,l);d({mode:r.mode==="url"?"url":"page",href:x.href||c,page:r.page,url:r.url,anchor:(r.anchor??"").replace(/^#/,""),target:x.target}),t();return}if(i){e.preventDefault(),cd(u),t();return}!p&&u&&Bw(c)&&cd(u)&&e.preventDefault(),t()}const Vw=["--cntrl-article-width","--cntrl-article-top","--cntrl-article-left","--cntrl-viewport-height"];function Gw(e){let t=e;for(;t;){if(getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim())return t;t=t.parentElement}return e}function Xw(e){const t={},n=Gw(e);if(!n)return t;const i=getComputedStyle(n);for(const o of Vw){const r=i.getPropertyValue(o).trim();r&&(t[o]=r)}return t}function dd(e,t,n,i,o){return a.jsx("span",{className:`${e}-link-text-box`,style:{width:o(n),maxWidth:"100%"},children:a.jsx("span",{className:i?`${e}-link-text-inner`:`${e}-link-text-inner-hidden`,style:{width:"100%"},children:t})})}function qw({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,activeEvent:o,currentState:r,isSwitchClone:l=!1,unavailableStates:d=[],layoutId:c,pages:u,onLinkNavigate:p,onUpdateSettings:x,onOpenChange:v}){const{prefix:m}=A.useScopedStyles(),h=s.useRef(null),y=s.useRef(null),b=s.useRef(0),C=s.useRef(null),S=s.useRef(c),w=s.useMemo(()=>Ww(m),[m]),[D,_]=s.useState(!1),[z,H]=s.useState(!1),[L,V]=s.useState(!1),$=vw(r),E=s.useMemo(()=>new Set(d),[d]),F=_t=>!!(_t&&E.has(_t)),g=!!(t&&!i&&$==="open"&&!F("open"))||!(t&&!i)&&D,M=!F("compact")&&!F("onScroll"),R=!t||!!i&&!n,G=o&&o!=="default"?o:void 0,Z=M&&$==="compact"?"compact":"default",[T,j]=s.useState(Z),[Y,le]=s.useState(!1),se=!n;Z!==T&&(j(Z),se&&le(!0));const k=sp(e),{logo:re,logoMaxHeight:q=120/1440,logoPosition:ce="left",panelHeight:J=60/1440,backgroundColor:be="#b3b3b3",logoColor:We="#000000",position:ye,horizontalAlign:ue,verticalAlign:ee,iconColor:de="#000000",showIcon:ne="on",iconSize:Pe=16/1440,linkColor:Te="#000000",openLinkColor:Oe="#000000",compactIconColor:ve="#000000",compactCloseButtonColor:Se="#000000",compactLinkColor:$e="#000000",compactLogoColor:f="#000000",compactBackgroundColor:X="#ffffff",compactLogoMaxHeight:N=120/1440,compactLogoPosition:U,compactPanelHeight:me=60/1440,compactShowIcon:K="on",compactIconSize:I=16/1440,compactNavTextWidth:ie,compactNavGap:oe,compactNavPaddingLeft:B=10/1440,compactNavPaddingRight:te=10/1440,compactFontFamily:Ae,compactFontSettings:he,compactFontSize:Q,compactLineHeight:Ze,compactLetterSpacing:Fe=0,compactWordSpacing:et=0,compactTextAlign:Ue="left",compactTextAppearance:nt,openLogoColor:tt="#000000",menuBackgroundColor:Ve="#ffffff",overlayColor:fe="rgba(0, 0, 0, 0.45)",closeButtonColor:He="#000000",effect:Be="fade",textWidth:Je=280/1440,navTextWidth:Ce,gap:De=0,navGap:Xe,navPaddingLeft:ge=10/1440,navPaddingRight:Me=10/1440,textPaddingLeft:ze=10/1440,textPaddingRight:Re=10/1440,textPaddingTop:xe=10/1440,textPaddingBottom:Ie=10/1440,fontFamily:Ke,fontSettings:Ne,fontSize:it,lineHeight:ot,letterSpacing:rt=0,wordSpacing:ht=0,textAlign:Pt="left",textAppearance:Et,openFontFamily:ut,openFontSettings:gt,openFontSize:$t,openLineHeight:Tt,openLetterSpacing:ft,openWordSpacing:At,openTextAlign:zt,openTextAppearance:jt,stateOverrides:Zt,link:Ct}=k,{horizontalAlign:Vt,verticalAlign:rn}=Iw({position:ye,horizontalAlign:ue,verticalAlign:ee}),lt=Z==="compact",Ee=lt?N:q,je=xw(lt?U:ce),Qe=lt?me:J,dt=lt?I:Pe,xt=lt?ie:Ce,Mt=lt?oe:Xe,yt=lt?B:ge,Xt=lt?te:Me,Ht=xt??Je,Nt=g||(lt?K:ne)!=="off",qt=A.buildColorVars(m,{iconColor:de,closeButtonColor:He,linkColor:Te,openLinkColor:Oe,compactIconColor:ve,compactCloseButtonColor:Se,compactLinkColor:$e,compactLogoColor:f,compactBackgroundColor:X,openLogoColor:tt,menuBackgroundColor:Ve,overlayColor:fe,backgroundColor:be,logoColor:We},Aw,Fw,Zt),Ut=od(lt?{fontFamily:Ae,fontSettings:he,fontSize:Q,lineHeight:Ze,letterSpacing:Fe,wordSpacing:et,textAlign:Ue,textAppearance:nt}:{fontFamily:Ke,fontSettings:Ne,fontSize:it,lineHeight:ot,letterSpacing:rt,wordSpacing:ht,textAlign:Pt,textAppearance:Et}),Ot=od({fontFamily:ut,fontSettings:gt,fontSize:$t,lineHeight:Tt,letterSpacing:ft,wordSpacing:At,textAlign:zt,textAppearance:jt},Ut),Gt=rd(m,Ut,t),Bt=rd(m,Ot,t),Lt={...Bt.css,whiteSpace:"pre-wrap"},O=Bt.className,Le=_t=>A.scalingValue(_t,t),_e=Mt??De,Ge=Math.max(yt,mo),pt=Math.max(Xt,mo),Ft=Math.max(0,1-dt),ct=Math.max(0,1-dt),bt=n??!1,Dt=bt&&!g,kt=s.useMemo(()=>ap({textPaddingLeft:ze,textPaddingRight:Re,textPaddingTop:xe,textPaddingBottom:Ie,fontSize:Ot.fontSize}),[ze,Re,xe,Ie,Ot.fontSize]),sn=_t=>{const Kt=a.jsx("span",{className:O,style:Lt,children:ad(_t)});return dd(m,Kt,Je,bt,Le)},mn={...Mw(kt,t),alignItems:_w[Vt],justifyContent:Nw[rn]},yn=s.useRef(e),Pn=s.useRef(c);s.useEffect(()=>{if(!x||!t){yn.current=e,Pn.current=c;return}if(Pn.current!==c){yn.current=e,Pn.current=c;const ki=ld(e);ki!==e&&x(ki);return}const _t=ld(e),Kt=yn.current,xn=Kt!==e,Nn=xn?Ew(_t,Kt):_t;yn.current=e;const Un=_t!==e,li=xn&&Rw(_t,Nn);!Un&&!li||x(Nn)},[e,x,t,c]);const En=A.scalingValue(dt,t),Ji={width:En,height:En,minWidth:En,minHeight:En,maxWidth:En,maxHeight:En},jo={...Gt.css,textDecoration:"none"},Vo=Gt.className,fn=(re==null?void 0:re.mode)!=="Off",vn=(re==null?void 0:re.icon)??"",ai=Dw(vn),Xn=Le(Math.min(Ee,Qe)),Ei=!!(fn&&vn&&je==="right")?"left":"right",Qi=Array.isArray(Ct)?Ct:[],we=[Z!=="default"?`${m}-state-${Z}`:"",$==="open"?`${m}-state-open`:"",G&&G!==Z&&G!==$?`${m}-state-${G}`:""].filter(Boolean).join(" "),Ye=t&&!i?`${m}-editor`:"",P=R?`${m}-interactive`:"",ae=se&&(Z!==T||Y)?`${m}-nav-state-anim`:"",pe=g?`${m}-open`:"",ke=s.useMemo(()=>Xw(h.current),[z,g,c]),qe=()=>{_(!1)},st=(_t,Kt)=>{jw(_t,qe,{isEditor:t,isPreviewMode:i,item:Kt,pages:u,onLinkNavigate:p})},wt=()=>{t&&!i||_(_t=>!_t)},It=()=>{C.current!==null&&(window.clearTimeout(C.current),C.current=null)};s.useEffect(()=>{if(!Y)return;const _t=window.setTimeout(()=>{le(!1)},en);return()=>window.clearTimeout(_t)},[Y,Z]),s.useEffect(()=>{if(g){It(),H(!0);return}return b.current+=1,V(!1),It(),C.current=window.setTimeout(()=>{C.current=null,H(!1)},wn),It},[g]),s.useLayoutEffect(()=>{S.current!==c&&(S.current=c,b.current+=1,It(),_(!1),V(!1),H(!1))},[c]),s.useLayoutEffect(()=>{var xn;if(!z||!g)return;const _t=b.current+1;b.current=_t,V(!1),(xn=y.current)==null||xn.offsetHeight;const Kt=requestAnimationFrame(()=>{b.current===_t&&V(!0)});return()=>{cancelAnimationFrame(Kt)}},[z,g]),s.useEffect(()=>{v==null||v(g)},[g,v]),s.useEffect(()=>{if(!g)return;const _t=Kt=>{Kt.key==="Escape"&&(t&&i||qe())};return window.addEventListener("keydown",_t),()=>window.removeEventListener("keydown",_t)},[g,t,i]),s.useEffect(()=>{t&&!i&&$!=="open"&&_(!1)},[t,i,$]),s.useEffect(()=>{i&&_(!1)},[i]);const on=bt&&g,nn=_t=>Qi.map((Kt,xn)=>{const{label:Nn,href:Un,target:li}=_s(Kt,u),ki=Un?a.jsx("a",{href:Un,target:li,rel:li==="_blank"?"noopener noreferrer":void 0,className:`${_t} ${m}-has-href`,onClick:Na=>st(Na,Kt),children:sn(Nn)}):a.jsx("span",{className:_t,children:sn(Nn)});return a.jsxs(s.Fragment,{children:[xn>0&&a.jsx("div",{"data-controls":on?"gap":void 0,"data-controls-axis":"y",className:on?`${m}-gap-control`:void 0,style:{height:Le(De)}}),ki]},xn)}),si=z?a.jsxs("div",{ref:y,"data-selection":"none",className:[`${m}-lightbox`,`${m}-full-lightbox ${m}-effect-${Be}`,L?`${m}-lightbox-active`:"",`${m}-lightbox-editor`,n?`${m}-lightbox-edit-mode`:"",P,we].filter(Boolean).join(" "),style:{...qt,...ke},"aria-hidden":!L,children:[a.jsx("button",{type:"button",className:`${m}-backdrop`,onClick:qe,"aria-label":"Close menu"}),a.jsxs("nav",{className:`${m}-panel`,style:mn,"aria-label":"Menu",children:[bt&&kw(m,kt,Ot.fontSize,Le),nn(`${m}-link`)]})]}):null,Mi=()=>a.jsx("button",{type:"button",className:`${m}-toggle`,onClick:wt,"aria-expanded":g,"aria-label":g?"Close menu":"Open menu",children:a.jsx($w,{className:`${m}-icon`,lineClassName:`${m}-icon-line`})}),qn=_t=>{const Kt=_t==="left",xn=Kt?yt:Xt,Nn=Kt?Ge:pt,Un=Kt?Ft:ct,li=lt?Kt?"compactNavPaddingLeft":"compactNavPaddingRight":Kt?"navPaddingLeft":"navPaddingRight";return a.jsx("div",{className:Kt?`${m}-nav-padding-left`:`${m}-nav-padding-right`,style:{width:Le(xn),flexShrink:0},children:Dt?a.jsx("div",{"data-controls":li,"data-controls-axis":"x","data-controls-variant":"column-padding",...Kt?{}:{"data-controls-reverse":""},"data-controls-min":"0","data-controls-max-fraction":String(Un),className:`${m}-control-anchor`,style:{top:0,[Kt?"left":"right"]:0,width:Le(Nn),height:"100%"}}):null})},Ir=(_t,Kt)=>{const{label:xn,href:Nn,target:Un}=_s(_t,u),li=a.jsx("span",{className:Vo,style:jo,children:ad(xn)}),ki=dd(m,li,Ht,Dt,Le),Na=Nn?a.jsx("a",{href:Nn,target:Un,rel:Un==="_blank"?"noopener noreferrer":void 0,className:`${m}-nav-link ${m}-has-href`,onClick:vp=>st(vp,_t),children:ki}):a.jsx("span",{className:`${m}-nav-link`,children:ki});return a.jsxs(s.Fragment,{children:[Kt>0&&a.jsx("div",{"data-controls":Dt?lt?"compactNavGap":"navGap":void 0,"data-controls-axis":"x",className:Dt?`${m}-gap-control ${m}-nav-gap-control`:`${m}-nav-gap-control}`,style:{width:Le(_e),flexShrink:0}}),Na]},Kt)},Aa={...qt,height:A.scalingValue(Qe,t),minHeight:A.scalingValue(Qe,t),[`--${m}-panel-height`]:A.scalingValue(Qe,t)},Fa=l&&Z==="default"&&$!=="open"&&!i?Le(J+hw):"0px";return a.jsxs("div",{ref:h,className:`${m}-root ${we} ${Ye} ${P} ${ae}`.trim(),style:{width:"100%",height:"100%",lineHeight:0,fontSize:0,marginTop:Fa,...qt},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:w}}),a.jsxs("div",{className:`${m}-nav-bar`,style:Aa,children:[fn&&vn?a.jsxs("div",{className:`${m}-nav-logo ${m}-nav-logo-${je}`,children:[je==="left"?qn("left"):null,a.jsxs("div",{className:`${m}-nav-logo-inner${ai?` ${m}-nav-logo-tinted`:""}`,style:{height:Xn,...ai?{[`--${m}-logo-image`]:Hw(vn)}:{}},children:[a.jsx("img",{src:vn,alt:"",className:`${m}-nav-logo-img`}),ai?a.jsx("span",{className:`${m}-nav-logo-tint`,"aria-hidden":"true"}):null]}),je==="right"?qn("right"):null]}):null,a.jsx("nav",{className:`${m}-nav-links`,"aria-label":"Navigation",children:a.jsx("div",{className:`${m}-nav-links-inner`,children:Qi.filter(_t=>Sw(_t,Z)).map((_t,Kt)=>Ir(_t,Kt))})})]}),si,a.jsxs("div",{className:`${m}-nav-toggle-wrap ${m}-nav-toggle-wrap-${Ei}`,children:[Ei==="left"?qn("left"):null,Nt?a.jsx("div",{className:`${m}-root ${pe}`.trim(),style:Ji,children:Mi()}):null,Ei==="right"?qn("right"):null]})]})}const Uw=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
24258
+ `}function jw(e){return`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`}function Vw(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")?!0:t.includes(".svg")}function Gw(e){const t=Vw(e),[n,i]=s.useState(!1);return s.useEffect(()=>{if(t||!e.startsWith("blob:")){i(!1);return}let o=!1;return fetch(e).then(r=>r.blob()).then(async r=>{if(o)return;if(r.type.includes("svg")){i(!0);return}if(r.type.startsWith("image/")&&!r.type.includes("svg")){i(!1);return}const l=await r.text();o||i(/<svg[\s>]/i.test(l.trim()))}).catch(()=>{o||i(!1)}),()=>{o=!0}},[t,e]),t||n}function Xw(e){const t=e.indexOf("#");if(t===-1)return"";try{return decodeURIComponent(e.slice(t+1))}catch{return e.slice(t+1)}}function qw(e){if(!e||e.startsWith("#"))return!0;try{return new URL(e,window.location.href).pathname===window.location.pathname}catch{return!1}}function ud(e){if(!e)return!1;const t=document.getElementById(e),n=document.querySelector(`[data-section-id="${CSS.escape(e)}"]`),i=t??n;return i instanceof HTMLElement?(i.scrollIntoView({behavior:"smooth",block:"start"}),!0):!1}function Uw(e,t,n={}){const{isEditor:i,isPreviewMode:o,item:r,pages:l,onLinkNavigate:d}=n,c=e.currentTarget.getAttribute("href")??"",u=Xw(c),p=e.currentTarget.target==="_blank";if(r&&d){e.preventDefault(),e.stopPropagation();const x=Ws(r,l),y=lp(r);d({mode:y.type==="url"?"url":"page",href:x.href||c,page:y.type==="page"?y.value:void 0,url:y.type==="url"?y.value:void 0,anchor:y.type==="anchor"?y.value.replace(/^#/,""):(y.anchor??"").replace(/^#/,""),target:x.target}),t();return}if(i){e.preventDefault(),ud(u),t();return}!p&&u&&qw(c)&&ud(u)&&e.preventDefault(),t()}const Yw=["--cntrl-article-width","--cntrl-article-top","--cntrl-article-left","--cntrl-viewport-height"];function Kw(e){let t=e;for(;t;){if(getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim())return t;t=t.parentElement}return e}function Zw(e){const t={},n=Kw(e);if(!n)return t;const i=getComputedStyle(n);for(const o of Yw){const r=i.getPropertyValue(o).trim();r&&(t[o]=r)}return t}function pd(e,t,n,i,o){return a.jsx("span",{className:`${e}-link-text-box`,style:{width:o(n),maxWidth:"100%"},children:a.jsx("span",{className:i?`${e}-link-text-inner`:`${e}-link-text-inner-hidden`,style:{width:"100%"},children:t})})}function Jw({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,activeEvent:o,currentState:r,isSwitchClone:l=!1,unavailableStates:d=[],layoutId:c,pages:u,onLinkNavigate:p,onUpdateSettings:x,onOpenChange:y}){const{prefix:m}=A.useScopedStyles(),h=s.useRef(null),v=s.useRef(null),b=s.useRef(0),C=s.useRef(null),S=s.useRef(c),w=s.useMemo(()=>Bw(m),[m]),[D,_]=s.useState(!1),[z,H]=s.useState(!1),[L,V]=s.useState(!1),$=ww(r),k=s.useMemo(()=>new Set(d),[d]),F=_t=>!!(_t&&k.has(_t)),g=!!(t&&!i&&$==="open"&&!F("open"))||!(t&&!i)&&D,E=!F("compact")&&!F("onScroll"),R=!t||!!i&&!n,G=o&&o!=="default"?o:void 0,Z=E&&$==="compact"?"compact":"default",[T,j]=s.useState(Z),[K,le]=s.useState(!1),se=!n;Z!==T&&(j(Z),se&&le(!0));const M=up(e),{logo:re,logoMaxHeight:q=120/1440,logoPosition:ce="left",panelHeight:J=60/1440,backgroundColor:be="#b3b3b3",logoColor:We="#000000",position:ye,horizontalAlign:ue,verticalAlign:ee,iconColor:de="#000000",showIcon:ne="on",iconSize:Pe=16/1440,linkColor:Te="#000000",openLinkColor:Oe="#000000",compactIconColor:ve="#000000",compactCloseButtonColor:Se="#000000",compactLinkColor:$e="#000000",compactLogoColor:f="#000000",compactBackgroundColor:X="#ffffff",compactLogoMaxHeight:N=120/1440,compactLogoPosition:U,compactPanelHeight:me=60/1440,compactShowIcon:Y="on",compactIconSize:I=16/1440,compactNavTextWidth:ie,compactNavGap:oe,compactNavPaddingLeft:B=10/1440,compactNavPaddingRight:te=10/1440,compactFontFamily:Ae,compactFontSettings:he,compactFontSize:Q,compactLineHeight:Ze,compactLetterSpacing:Fe=0,compactWordSpacing:et=0,compactTextAlign:Ue="left",compactTextAppearance:nt,openLogoColor:tt="#000000",menuBackgroundColor:Ve="#ffffff",overlayColor:fe="rgba(0, 0, 0, 0.45)",closeButtonColor:He="#000000",effect:Be="fade",textWidth:Je=280/1440,navTextWidth:Ce,gap:De=0,navGap:Xe,navPaddingLeft:ge=10/1440,navPaddingRight:Ee=10/1440,textPaddingLeft:ze=10/1440,textPaddingRight:Re=10/1440,textPaddingTop:xe=10/1440,textPaddingBottom:Ie=10/1440,fontFamily:Ye,fontSettings:Ne,fontSize:it,lineHeight:ot,letterSpacing:rt=0,wordSpacing:ht=0,textAlign:Pt="left",textAppearance:kt,openFontFamily:ut,openFontSettings:gt,openFontSize:$t,openLineHeight:Tt,openLetterSpacing:ft,openWordSpacing:At,openTextAlign:zt,openTextAppearance:jt,stateOverrides:Zt,link:Ct}=M,{horizontalAlign:Vt,verticalAlign:rn}=Mw({position:ye,horizontalAlign:ue,verticalAlign:ee}),lt=Z==="compact",ke=lt?N:q,je=$w(lt?U:ce),Qe=lt?me:J,dt=lt?I:Pe,xt=lt?ie:Ce,Et=lt?oe:Xe,yt=lt?B:ge,Xt=lt?te:Ee,Ht=xt??Je,Nt=g||(lt?Y:ne)!=="off",qt=A.buildColorVars(m,{iconColor:de,closeButtonColor:He,linkColor:Te,openLinkColor:Oe,compactIconColor:ve,compactCloseButtonColor:Se,compactLinkColor:$e,compactLogoColor:f,compactBackgroundColor:X,openLogoColor:tt,menuBackgroundColor:Ve,overlayColor:fe,backgroundColor:be,logoColor:We},Hw,Ow,Zt),Ut=ad(lt?{fontFamily:Ae,fontSettings:he,fontSize:Q,lineHeight:Ze,letterSpacing:Fe,wordSpacing:et,textAlign:Ue,textAppearance:nt}:{fontFamily:Ye,fontSettings:Ne,fontSize:it,lineHeight:ot,letterSpacing:rt,wordSpacing:ht,textAlign:Pt,textAppearance:kt}),Ot=ad({fontFamily:ut,fontSettings:gt,fontSize:$t,lineHeight:Tt,letterSpacing:ft,wordSpacing:At,textAlign:zt,textAppearance:jt},Ut),Gt=sd(m,Ut,t),Bt=sd(m,Ot,t),Lt={...Bt.css,whiteSpace:"pre-wrap"},O=Bt.className,Le=_t=>A.scalingValue(_t,t),_e=Et??De,Ge=Math.max(yt,mo),pt=Math.max(Xt,mo),Ft=Math.max(0,1-dt),ct=Math.max(0,1-dt),bt=n??!1,Dt=bt&&!g,Mt=s.useMemo(()=>dp({textPaddingLeft:ze,textPaddingRight:Re,textPaddingTop:xe,textPaddingBottom:Ie,fontSize:Ot.fontSize}),[ze,Re,xe,Ie,Ot.fontSize]),sn=_t=>{const Yt=a.jsx("span",{className:O,style:Lt,children:ld(_t)});return pd(m,Yt,Je,bt,Le)},mn={..._w(Mt,t),alignItems:zw[Vt],justifyContent:Dw[rn]},yn=s.useRef(e),Pn=s.useRef(c);s.useEffect(()=>{if(!x||!t){yn.current=e,Pn.current=c;return}if(Pn.current!==c){yn.current=e,Pn.current=c;const Mi=dd(e);Mi!==e&&x(Mi);return}const _t=dd(e),Yt=yn.current,xn=Yt!==e,Nn=xn?Nw(_t,Yt):_t;yn.current=e;const Un=_t!==e,li=xn&&Aw(_t,Nn);!Un&&!li||x(Nn)},[e,x,t,c]);const kn=A.scalingValue(dt,t),Ji={width:kn,height:kn,minWidth:kn,minHeight:kn,maxWidth:kn,maxHeight:kn},jo={...Gt.css,textDecoration:"none"},Vo=Gt.className,fn=(re==null?void 0:re.mode)!=="Off",vn=(re==null?void 0:re.icon)??"",ai=Gw(vn),Xn=Le(Math.min(ke,Qe)),ki=!!(fn&&vn&&je==="right")?"left":"right",Qi=Array.isArray(Ct)?Ct:[],we=[Z!=="default"?`${m}-state-${Z}`:"",$==="open"?`${m}-state-open`:"",G&&G!==Z&&G!==$?`${m}-state-${G}`:""].filter(Boolean).join(" "),Ke=t&&!i?`${m}-editor`:"",P=R?`${m}-interactive`:"",ae=se&&(Z!==T||K)?`${m}-nav-state-anim`:"",pe=g?`${m}-open`:"",Me=s.useMemo(()=>Zw(h.current),[z,g,c]),qe=()=>{_(!1)},st=(_t,Yt)=>{Uw(_t,qe,{isEditor:t,isPreviewMode:i,item:Yt,pages:u,onLinkNavigate:p})},wt=()=>{t&&!i||_(_t=>!_t)},It=()=>{C.current!==null&&(window.clearTimeout(C.current),C.current=null)};s.useEffect(()=>{if(!K)return;const _t=window.setTimeout(()=>{le(!1)},en);return()=>window.clearTimeout(_t)},[K,Z]),s.useEffect(()=>{if(g){It(),H(!0);return}return b.current+=1,V(!1),It(),C.current=window.setTimeout(()=>{C.current=null,H(!1)},wn),It},[g]),s.useLayoutEffect(()=>{S.current!==c&&(S.current=c,b.current+=1,It(),_(!1),V(!1),H(!1))},[c]),s.useLayoutEffect(()=>{var xn;if(!z||!g)return;const _t=b.current+1;b.current=_t,V(!1),(xn=v.current)==null||xn.offsetHeight;const Yt=requestAnimationFrame(()=>{b.current===_t&&V(!0)});return()=>{cancelAnimationFrame(Yt)}},[z,g]),s.useEffect(()=>{y==null||y(g)},[g,y]),s.useEffect(()=>{if(!g)return;const _t=Yt=>{Yt.key==="Escape"&&(t&&i||qe())};return window.addEventListener("keydown",_t),()=>window.removeEventListener("keydown",_t)},[g,t,i]),s.useEffect(()=>{t&&!i&&$!=="open"&&_(!1)},[t,i,$]),s.useEffect(()=>{i&&_(!1)},[i]);const on=bt&&g,nn=_t=>Qi.filter(Yt=>Lw(Yt,c)).map((Yt,xn)=>{const{label:Nn,href:Un,target:li}=Ws(Yt,u),Mi=Un?a.jsx("a",{href:Un,target:li,rel:li==="_blank"?"noopener noreferrer":void 0,className:`${_t} ${m}-has-href`,onClick:_a=>st(_a,Yt),children:sn(Nn)}):a.jsx("span",{className:_t,children:sn(Nn)});return a.jsxs(s.Fragment,{children:[xn>0&&a.jsx("div",{"data-controls":on?"gap":void 0,"data-controls-axis":"y",className:on?`${m}-gap-control`:void 0,style:{height:Le(De)}}),Mi]},xn)}),si=z?a.jsxs("div",{ref:v,"data-selection":"none",className:[`${m}-lightbox`,`${m}-full-lightbox ${m}-effect-${Be}`,L?`${m}-lightbox-active`:"",`${m}-lightbox-editor`,n?`${m}-lightbox-edit-mode`:"",P,we].filter(Boolean).join(" "),style:{...qt,...Me},"aria-hidden":!L,children:[a.jsx("button",{type:"button",className:`${m}-backdrop`,onClick:qe,"aria-label":"Close menu"}),a.jsxs("nav",{className:`${m}-panel`,style:mn,"aria-label":"Menu",children:[bt&&Ww(m,Mt,Ot.fontSize,Le),nn(`${m}-link`)]})]}):null,Ei=()=>a.jsx("button",{type:"button",className:`${m}-toggle`,onClick:wt,"aria-expanded":g,"aria-label":g?"Close menu":"Open menu",children:a.jsx(Rw,{className:`${m}-icon`,lineClassName:`${m}-icon-line`})}),qn=_t=>{const Yt=_t==="left",xn=Yt?yt:Xt,Nn=Yt?Ge:pt,Un=Yt?Ft:ct,li=lt?Yt?"compactNavPaddingLeft":"compactNavPaddingRight":Yt?"navPaddingLeft":"navPaddingRight";return a.jsx("div",{className:Yt?`${m}-nav-padding-left`:`${m}-nav-padding-right`,style:{width:Le(xn),flexShrink:0},children:Dt?a.jsx("div",{"data-controls":li,"data-controls-axis":"x","data-controls-variant":"column-padding",...Yt?{}:{"data-controls-reverse":""},"data-controls-min":"0","data-controls-max-fraction":String(Un),className:`${m}-control-anchor`,style:{top:0,[Yt?"left":"right"]:0,width:Le(Nn),height:"100%"}}):null})},Ir=(_t,Yt)=>{const{label:xn,href:Nn,target:Un}=Ws(_t,u),li=a.jsx("span",{className:Vo,style:jo,children:ld(xn)}),Mi=pd(m,li,Ht,Dt,Le),_a=Nn?a.jsx("a",{href:Nn,target:Un,rel:Un==="_blank"?"noopener noreferrer":void 0,className:`${m}-nav-link ${m}-has-href`,onClick:wp=>st(wp,_t),children:Mi}):a.jsx("span",{className:`${m}-nav-link`,children:Mi});return a.jsxs(s.Fragment,{children:[Yt>0&&a.jsx("div",{"data-controls":Dt?lt?"compactNavGap":"navGap":void 0,"data-controls-axis":"x",className:Dt?`${m}-gap-control ${m}-nav-gap-control`:`${m}-nav-gap-control}`,style:{width:Le(_e),flexShrink:0}}),_a]},Yt)},Fa={...qt,height:A.scalingValue(Qe,t),minHeight:A.scalingValue(Qe,t),[`--${m}-panel-height`]:A.scalingValue(Qe,t)},Na=l&&Z==="default"&&$!=="open"&&!i?Le(J+xw):"0px";return a.jsxs("div",{ref:h,className:`${m}-root ${we} ${Ke} ${P} ${ae}`.trim(),style:{width:"100%",height:"100%",lineHeight:0,fontSize:0,marginTop:Na,...qt},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:w}}),a.jsx("div",{className:`${m}-nav-slide`,children:a.jsxs("div",{className:`${m}-nav-bar`,style:Fa,children:[fn&&vn?a.jsxs("div",{className:`${m}-nav-logo ${m}-nav-logo-${je}`,children:[je==="left"?qn("left"):null,a.jsxs("div",{className:`${m}-nav-logo-inner${ai?` ${m}-nav-logo-tinted`:""}`,style:{height:Xn,...ai?{[`--${m}-logo-image`]:jw(vn)}:{}},children:[a.jsx("img",{src:vn,alt:"",className:`${m}-nav-logo-img`}),ai?a.jsx("span",{className:`${m}-nav-logo-tint`,"aria-hidden":"true"}):null]}),je==="right"?qn("right"):null]}):null,a.jsx("nav",{className:`${m}-nav-links`,"aria-label":"Navigation",children:a.jsx("div",{className:`${m}-nav-links-inner`,children:Qi.filter(_t=>Tw(_t,Z,c)).map((_t,Yt)=>Ir(_t,Yt))})})]})}),si,a.jsxs("div",{className:`${m}-nav-toggle-wrap ${m}-nav-toggle-wrap-${ki}`,children:[ki==="left"?qn("left"):null,Nt?a.jsx("div",{className:`${m}-root ${pe}`.trim(),style:Ji,children:Ei()}):null,ki==="right"?qn("right"):null]})]})}const Qw=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
24252
24259
  import { CommonComponentProps } from '../props';
24253
24260
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
24254
24261
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -24270,14 +24277,23 @@ type BurgerLogo = {
24270
24277
 
24271
24278
  type BurgerLogoPosition = 'left' | 'center' | 'right';
24272
24279
 
24280
+ type BurgerShowInValue = string | Record<string, string>;
24281
+
24273
24282
  type BurgerLink = {
24283
+ link?: {
24284
+ type?: 'url' | 'page' | 'anchor';
24285
+ value?: string;
24286
+ target?: string;
24287
+ anchor?: string;
24288
+ url?: string;
24289
+ };
24274
24290
  mode?: 'page' | 'url';
24275
24291
  page?: string;
24276
24292
  url?: string;
24277
24293
  label?: string;
24278
24294
  anchor?: string;
24279
24295
  openIn?: string;
24280
- showIn?: string;
24296
+ showIn?: BurgerShowInValue;
24281
24297
  };
24282
24298
 
24283
24299
  type BurgerPosition =
@@ -24384,27 +24400,41 @@ function resolveCurrentState(value?: string | null): BurgerVisualState | undefin
24384
24400
  return undefined;
24385
24401
  }
24386
24402
 
24387
- type BurgerShowIn = 'always' | 'open only' | 'open and compact' | 'default and open';
24403
+ type BurgerShowIn = 'always' | 'open only' | 'open and compact' | 'default and open' | 'default and compact';
24388
24404
 
24389
24405
  function resolveLogoPosition(value?: string): BurgerLogoPosition {
24390
24406
  if (value === 'center' || value === 'right') return value;
24391
24407
  return 'left';
24392
24408
  }
24393
24409
 
24394
- function resolveShowIn(value?: string): BurgerShowIn {
24395
- const showIn = (value ?? 'always').trim().toLowerCase().replace(/[_-]+/g, ' ');
24410
+ function pickShowIn(value?: BurgerShowInValue, layoutId?: string): string | undefined {
24411
+ if (value && typeof value === 'object') {
24412
+ if (layoutId && typeof value[layoutId] === 'string') return value[layoutId];
24413
+ for (const key in value) {
24414
+ if (typeof value[key] === 'string') return value[key];
24415
+ }
24416
+ return undefined;
24417
+ }
24418
+ return value;
24419
+ }
24420
+
24421
+ function resolveShowIn(value?: BurgerShowInValue, layoutId?: string): BurgerShowIn {
24422
+ const showIn = (pickShowIn(value, layoutId) ?? 'always').trim().toLowerCase().replace(/[_-]+/g, ' ');
24396
24423
  if (showIn === 'open only' || showIn === 'openonly') return 'open only';
24397
24424
  if (showIn === 'open and compact' || showIn === 'openandcompact') return 'open and compact';
24398
24425
  if (showIn === 'default and open' || showIn === 'defaultandopen') return 'default and open';
24426
+ if (showIn === 'default and compact' || showIn === 'defaultandcompact') return 'default and compact';
24399
24427
  return 'always';
24400
24428
  }
24401
24429
 
24402
- function isVisibleInClosedNav(item: BurgerLink, navigationState: BurgerNavigationState): boolean {
24403
- switch (resolveShowIn(item.showIn)) {
24430
+ function isVisibleInClosedNav(item: BurgerLink, navigationState: BurgerNavigationState, layoutId?: string): boolean {
24431
+ switch (resolveShowIn(item.showIn, layoutId)) {
24404
24432
  case 'open only':
24405
24433
  return false;
24406
24434
  case 'open and compact':
24407
24435
  return navigationState === 'compact';
24436
+ case 'default and compact':
24437
+ return true;
24408
24438
  case 'default and open':
24409
24439
  return navigationState === 'default';
24410
24440
  default:
@@ -24412,6 +24442,15 @@ function isVisibleInClosedNav(item: BurgerLink, navigationState: BurgerNavigatio
24412
24442
  }
24413
24443
  }
24414
24444
 
24445
+ function isVisibleInOpenNav(item: BurgerLink, layoutId?: string): boolean {
24446
+ switch (resolveShowIn(item.showIn, layoutId)) {
24447
+ case 'default and compact':
24448
+ return false;
24449
+ default:
24450
+ return true;
24451
+ }
24452
+ }
24453
+
24415
24454
  type BurgerPageRef = {
24416
24455
  id: string;
24417
24456
  slug: string;
@@ -24429,26 +24468,60 @@ function resolvePagePath(page: string, pages?: BurgerPageRef[]): string {
24429
24468
  return pages ? \`/\${page}\` : page;
24430
24469
  }
24431
24470
 
24471
+ function isBlankTarget(target?: string): boolean {
24472
+ const value = (target ?? '').toLowerCase();
24473
+ return value === 'blank' || value === '_blank' || value.includes('new');
24474
+ }
24475
+
24476
+ function getBurgerDest(item: BurgerLink): {
24477
+ type: 'url' | 'page' | 'anchor';
24478
+ value: string;
24479
+ target?: '_blank';
24480
+ anchor?: string;
24481
+ } {
24482
+ const dest = item.link;
24483
+ if (dest && typeof dest === 'object') {
24484
+ const target = isBlankTarget(dest.target) ? '_blank' : undefined;
24485
+ if (dest.type === 'url') {
24486
+ return { type: 'url', value: dest.value ?? dest.url ?? '', target };
24487
+ }
24488
+ if (dest.type === 'anchor') {
24489
+ return { type: 'anchor', value: dest.value ?? '', target };
24490
+ }
24491
+ if (dest.type === 'page') {
24492
+ return { type: 'page', value: dest.value ?? '', target, anchor: dest.anchor };
24493
+ }
24494
+ if (typeof dest.url === 'string') {
24495
+ return { type: 'url', value: dest.url, target };
24496
+ }
24497
+ }
24498
+ const target = isBlankTarget(item.openIn) ? '_blank' : undefined;
24499
+ if (item.mode === 'url') {
24500
+ return { type: 'url', value: item.url ?? '', target };
24501
+ }
24502
+ return { type: 'page', value: item.page ?? '', target, anchor: item.anchor };
24503
+ }
24504
+
24432
24505
  function resolveBurgerLink(item: BurgerLink, pages?: BurgerPageRef[]): {
24433
24506
  label: string;
24434
24507
  href: string;
24435
24508
  target?: '_blank';
24436
24509
  } {
24437
24510
  const label = item.label || 'Link';
24438
- const mode = item.mode === 'url' ? 'url' : 'page';
24439
- const openIn = (item.openIn ?? '').toLowerCase();
24440
- const target = openIn.includes('new') || openIn === 'blank' || openIn === '_blank'
24441
- ? '_blank'
24442
- : undefined;
24511
+ const dest = getBurgerDest(item);
24443
24512
 
24444
- if (mode === 'url') {
24445
- return { label, href: item.url ?? '', target };
24513
+ if (dest.type === 'url') {
24514
+ return { label, href: dest.value, target: dest.target };
24515
+ }
24516
+ if (dest.type === 'anchor') {
24517
+ const anchor = dest.value.replace(/^#/, '');
24518
+ return { label, href: anchor ? \`#\${anchor}\` : '', target: dest.target };
24446
24519
  }
24447
24520
 
24448
- const page = resolvePagePath(item.page ?? '', pages);
24449
- const anchor = (item.anchor ?? '').replace(/^#/, '');
24521
+ const page = resolvePagePath(dest.value, pages);
24522
+ const anchor = (dest.anchor ?? '').replace(/^#/, '');
24450
24523
  const href = anchor ? (page ? \`\${page}#\${anchor}\` : \`#\${anchor}\`) : page;
24451
- return { label, href, target };
24524
+ return { label, href, target: dest.target };
24452
24525
  }
24453
24526
 
24454
24527
  const BURGER_ICON_VIEWBOX = 24;
@@ -25281,6 +25354,11 @@ function getCSS(P: string): string {
25281
25354
  cursor: default;
25282
25355
  pointer-events: none;
25283
25356
  }
25357
+ .\${P}-nav-slide {
25358
+ position: relative;
25359
+ transform: translateY(var(--cntrl-nav-slide, 0%));
25360
+ transition: transform 320ms ease;
25361
+ }
25284
25362
  .\${P}-nav-bar {
25285
25363
  position: relative;
25286
25364
  display: flex;
@@ -25486,6 +25564,8 @@ function getCSS(P: string): string {
25486
25564
  align-items: center;
25487
25565
  z-index: 3;
25488
25566
  pointer-events: auto;
25567
+ transform: translateY(var(--cntrl-nav-slide, 0%));
25568
+ transition: transform 320ms ease;
25489
25569
  }
25490
25570
  .\${P}-nav-toggle-wrap-right {
25491
25571
  right: 0;
@@ -25669,12 +25749,15 @@ function handleLinkClick(
25669
25749
  event.preventDefault();
25670
25750
  event.stopPropagation();
25671
25751
  const resolved = resolveBurgerLink(item, pages);
25752
+ const dest = getBurgerDest(item);
25672
25753
  onLinkNavigate({
25673
- mode: item.mode === 'url' ? 'url' : 'page',
25754
+ mode: dest.type === 'url' ? 'url' : 'page',
25674
25755
  href: resolved.href || href,
25675
- page: item.page,
25676
- url: item.url,
25677
- anchor: (item.anchor ?? '').replace(/^#/, ''),
25756
+ page: dest.type === 'page' ? dest.value : undefined,
25757
+ url: dest.type === 'url' ? dest.value : undefined,
25758
+ anchor: dest.type === 'anchor'
25759
+ ? dest.value.replace(/^#/, '')
25760
+ : (dest.anchor ?? '').replace(/^#/, ''),
25678
25761
  target: resolved.target,
25679
25762
  });
25680
25763
  onClose();
@@ -26192,7 +26275,7 @@ export function Burger({
26192
26275
 
26193
26276
  const showOpenNavControls = showControls && isOpen;
26194
26277
 
26195
- const renderOpenNavItems = (linkClassName: string) => items.map((item, index) => {
26278
+ const renderOpenNavItems = (linkClassName: string) => items.filter((item) => isVisibleInOpenNav(item, layoutId)).map((item, index) => {
26196
26279
  const { label, href, target } = resolveBurgerLink(item, pages);
26197
26280
  const linkNode = href ? (
26198
26281
  <a
@@ -26374,35 +26457,37 @@ export function Burger({
26374
26457
  }}
26375
26458
  >
26376
26459
  <style dangerouslySetInnerHTML={{ __html: scopedCss }} />
26377
- <div className={\`\${P}-nav-bar\`} style={navBarStyle}>
26378
- {showLogo && logoSrc ? (
26379
- <div className={\`\${P}-nav-logo \${P}-nav-logo-\${closedLogoPosition}\`}>
26380
- {closedLogoPosition === 'left' ? renderNavEdgePadding('left') : null}
26381
- <div
26382
- className={\`\${P}-nav-logo-inner\${isSvgLogo ? \` \${P}-nav-logo-tinted\` : ''}\`}
26383
- style={{
26384
- height: logoHeight,
26385
- ...(isSvgLogo ? { [\`--\${P}-logo-image\`]: cssMaskImageUrl(logoSrc) } : {}),
26386
- } as CSSProperties}
26387
- >
26388
- <img
26389
- src={logoSrc}
26390
- alt=""
26391
- className={\`\${P}-nav-logo-img\`}
26392
- />
26393
- {isSvgLogo ? <span className={\`\${P}-nav-logo-tint\`} aria-hidden="true" /> : null}
26460
+ <div className={\`\${P}-nav-slide\`}>
26461
+ <div className={\`\${P}-nav-bar\`} style={navBarStyle}>
26462
+ {showLogo && logoSrc ? (
26463
+ <div className={\`\${P}-nav-logo \${P}-nav-logo-\${closedLogoPosition}\`}>
26464
+ {closedLogoPosition === 'left' ? renderNavEdgePadding('left') : null}
26465
+ <div
26466
+ className={\`\${P}-nav-logo-inner\${isSvgLogo ? \` \${P}-nav-logo-tinted\` : ''}\`}
26467
+ style={{
26468
+ height: logoHeight,
26469
+ ...(isSvgLogo ? { [\`--\${P}-logo-image\`]: cssMaskImageUrl(logoSrc) } : {}),
26470
+ } as CSSProperties}
26471
+ >
26472
+ <img
26473
+ src={logoSrc}
26474
+ alt=""
26475
+ className={\`\${P}-nav-logo-img\`}
26476
+ />
26477
+ {isSvgLogo ? <span className={\`\${P}-nav-logo-tint\`} aria-hidden="true" /> : null}
26478
+ </div>
26479
+ {closedLogoPosition === 'right' ? renderNavEdgePadding('right') : null}
26394
26480
  </div>
26395
- {closedLogoPosition === 'right' ? renderNavEdgePadding('right') : null}
26396
- </div>
26397
- ) : null}
26398
- <nav
26399
- className={\`\${P}-nav-links\`}
26400
- aria-label="Navigation"
26401
- >
26402
- <div className={\`\${P}-nav-links-inner\`}>
26403
- {items.filter((item) => isVisibleInClosedNav(item, navigationState)).map((item, index) => renderNavLink(item, index))}
26404
- </div>
26405
- </nav>
26481
+ ) : null}
26482
+ <nav
26483
+ className={\`\${P}-nav-links\`}
26484
+ aria-label="Navigation"
26485
+ >
26486
+ <div className={\`\${P}-nav-links-inner\`}>
26487
+ {items.filter((item) => isVisibleInClosedNav(item, navigationState, layoutId)).map((item, index) => renderNavLink(item, index))}
26488
+ </div>
26489
+ </nav>
26490
+ </div>
26406
26491
  </div>
26407
26492
  {overlay}
26408
26493
  <div className={\`\${P}-nav-toggle-wrap \${P}-nav-toggle-wrap-\${toggleSide}\`}>
@@ -26420,7 +26505,7 @@ export function Burger({
26420
26505
  </div>
26421
26506
  );
26422
26507
  }
26423
- `;function Zo(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Di={fontSettings:{type:"object",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0},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 mi(e,t){return e?`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`:t}function Pl(e){return{[mi(e,"fontFamily")]:{type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},[mi(e,"fontSettings")]:{...Di.fontSettings,scope:"common",title:""},[mi(e,"fontSize")]:{...Di.fontSize,scope:"layout",title:""},[mi(e,"lineHeight")]:{...Di.lineHeight,scope:"layout",title:""},[mi(e,"letterSpacing")]:{...Di.letterSpacing,scope:"layout",title:""},[mi(e,"wordSpacing")]:{...Di.wordSpacing,scope:"layout",title:""},[mi(e,"textAlign")]:{...Di.textAlign,scope:"layout",title:""},[mi(e,"textAppearance")]:{...Di.textAppearance,scope:"layout",title:""}}}const Kw=Pl(""),Yw=Pl("open"),Zw=Pl("compact"),Jw=["__componentName__",{type:"row",items:["panelHeight","navTextWidth"]},{type:"row",title:"Logo",items:["logoMaxHeight","logoPosition"]},{type:"row",title:"Hamburger",items:["showIcon","iconSize"]},"fontFamily","fontSettings",{type:"row",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAlign","textAppearance","navGap","navPaddingLeft","navPaddingRight"],Qw=["__componentName__",{type:"row",items:["compactPanelHeight","compactNavTextWidth"]},{type:"row",title:"Logo",items:["compactLogoMaxHeight","compactLogoPosition"]},{type:"row",title:"Hamburger",items:["compactShowIcon","compactIconSize"]},"compactFontFamily","compactFontSettings",{type:"row",items:["compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing"]},"compactTextAlign","compactTextAppearance","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight"],e$=["__componentName__",{type:"row",items:["textWidth","effect"]},"position","openFontFamily","openFontSettings",{type:"row",items:["openFontSize","openLineHeight","openLetterSpacing","openWordSpacing"]},"openTextAlign","openTextAppearance"],Yn={textTransform:"none",textDecoration:"none",fontVariant:"normal"},gs={fontWeight:400,fontStyle:"normal"},t$=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],n$=["iconColor","logoColor","closeButtonColor","linkColor","backgroundColor"],i$={type:"object",version:1,settings:{sizing:"auto manual",properties:{link:{type:"array",scope:"common",display:{type:"page-url-link"},items:{type:"object",properties:{mode:{type:"string",enum:["page","url"]},page:{type:"string"},url:{type:"string",message:"Paste URL here..."},label:{type:"string"},anchor:{type:"string"},openIn:{type:"string"},showIn:{type:"string",enum:["always","open only","open and compact","default and open"]}}}},logo:{type:"object",scope:"common",title:"Logo",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Logo",display:{type:"settings-image-input"}}}},logoMaxHeight:{type:"number",scope:"layout",title:"Height",display:{type:"numeric-input"},min:0,max:9999},logoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactLogoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},logoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{default:"Logo Default",hover:"Logo Hover"},display:{type:"palette-color-picker"}},panelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover"},display:{type:"palette-color-picker"}},showIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},iconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},linkColor:{type:"string",scope:"common",title:"Link Default",titleByState:{default:"Link Default",hover:"Link Hover"},display:{type:"palette-color-picker"}},compactShowIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},compactIconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{compact:"Icon Default","compact-hover":"Icon Hover"},display:{type:"palette-color-picker"}},compactCloseButtonColor:{type:"string",scope:"common",title:"Close Default",titleByState:{compact:"Close Default","compact-hover":"Close Hover"},display:{type:"palette-color-picker"}},compactLinkColor:{type:"string",scope:"common",title:"Link Default",titleByState:{compact:"Link Default","compact-hover":"Link Hover"},display:{type:"palette-color-picker"}},compactLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{compact:"Logo Default","compact-hover":"Logo Hover"},display:{type:"palette-color-picker"}},compactBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},openLinkColor:{type:"string",scope:"common",title:"Link Default",titleByState:{open:"Link Default","open-hover":"Link Hover"},display:{type:"palette-color-picker"}},openLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{open:"Logo Default","open-hover":"Logo Hover"},display:{type:"palette-color-picker"}},menuBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},overlayColor:{type:"string",scope:"common",title:"Overlay Default",display:{type:"palette-color-picker"}},closeButtonColor:{type:"string",scope:"common",title:"Close Default",titleByState:{default:"Close Default",hover:"Close Hover",open:"Close Default","open-hover":"Close Hover"},display:{type:"palette-color-picker"}},effect:{type:"string",scope:"layout",title:"Effect",display:{type:"toggle-cycle",enum:["fade","left","top","right","bottom"]}},textWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},navTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:[...t$]}},stateOverrides:{type:"object",scope:"common"},gap:Zo("Gap"),navGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},textPaddingLeft:Zo("Text padding left"),textPaddingRight:Zo("Text padding right"),textPaddingTop:Zo("Text padding top"),textPaddingBottom:Zo("Text padding bottom"),compactLogoMaxHeight:{type:"number",scope:"layout",title:"Height",display:{type:"numeric-input"},min:0,max:9999},compactPanelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},compactIconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},compactNavTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},compactNavGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},...Kw,...Yw,...Zw},defaults:{link:[{mode:"page",page:"",url:"",label:"Home",anchor:"",openIn:"Same Tab",showIn:"always"},{mode:"page",page:"",url:"",label:"Works",anchor:"",openIn:"Same Tab",showIn:"always"},{mode:"page",page:"",url:"",label:"About",anchor:"",openIn:"Same Tab",showIn:"always"},{mode:"page",page:"",url:"",label:"Contact",anchor:"",openIn:"Same Tab",showIn:"always"}],logo:{mode:"On",icon:null},backgroundColor:"#ffffff",logoColor:"#000000",iconColor:"#000000",linkColor:"#000000",openLinkColor:"#000000",compactIconColor:"#000000",compactCloseButtonColor:"#000000",compactLinkColor:"#000000",compactLogoColor:"#000000",compactBackgroundColor:"#ffffff",openLogoColor:"#000000",menuBackgroundColor:"#ffffff",overlayColor:"rgba(0, 0, 0, 0.45)",closeButtonColor:"#000000",effect:"fade",showIcon:"on",compactShowIcon:"on",logoPosition:"left",compactLogoPosition:"left",position:"left-top",fontFamily:"Goudy Bookletter 1911",fontSettings:gs,textAlign:"left",openFontFamily:"Goudy Bookletter 1911",openFontSettings:gs,openTextAlign:"left",compactFontFamily:"Goudy Bookletter 1911",compactFontSettings:gs,compactTextAlign:"left",stateOverrides:{hover:{linkColor:"#666666",iconColor:"#666666",logoColor:"#666666",closeButtonColor:"#666666"}}},displayRules:[{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.openLogoColor.display.visible",value:!1}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconSize.display.visible",value:!1}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconSize.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconColor.display.visible",value:!1}}],layoutDefaults:{m:{position:"left-top",panelHeight:56/375,logoMaxHeight:80/375,logoPosition:"left",compactLogoPosition:"left",showIcon:"on",iconSize:16/375,textWidth:240/375,navTextWidth:120/375,gap:24/375,navGap:24/375,navPaddingLeft:10/375,navPaddingRight:10/375,textPaddingLeft:10/375,textPaddingRight:10/375,textPaddingTop:10/375,textPaddingBottom:10/375,fontSize:16/375,lineHeight:20/375,letterSpacing:0,wordSpacing:0,textAppearance:Yn,openFontSize:16/375,openLineHeight:20/375,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Yn,compactPanelHeight:56/375,compactLogoMaxHeight:80/375,compactShowIcon:"on",compactIconSize:16/375,compactNavTextWidth:120/375,compactNavGap:24/375,compactNavPaddingLeft:10/375,compactNavPaddingRight:10/375,compactFontSize:16/375,compactLineHeight:20/375,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:Yn},t:{position:"left-top",panelHeight:60/768,logoMaxHeight:100/768,logoPosition:"left",compactLogoPosition:"left",showIcon:"on",iconSize:16/768,textWidth:260/768,navTextWidth:140/768,gap:32/768,navGap:32/768,navPaddingLeft:10/768,navPaddingRight:10/768,textPaddingLeft:10/768,textPaddingRight:10/768,textPaddingTop:10/768,textPaddingBottom:10/768,fontSize:16/768,lineHeight:20/768,letterSpacing:0,wordSpacing:0,textAppearance:Yn,openFontSize:16/768,openLineHeight:20/768,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Yn,compactPanelHeight:60/768,compactLogoMaxHeight:100/768,compactShowIcon:"on",compactIconSize:16/768,compactNavTextWidth:140/768,compactNavGap:32/768,compactNavPaddingLeft:10/768,compactNavPaddingRight:10/768,compactFontSize:16/768,compactLineHeight:20/768,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:Yn},d:{position:"left-top",panelHeight:40/1440,logoMaxHeight:120/1440,logoPosition:"left",compactLogoPosition:"left",showIcon:"on",iconSize:16/1440,textWidth:60/1440,navTextWidth:60/1440,gap:12/1440,navGap:12/1440,navPaddingLeft:10/1440,navPaddingRight:10/1440,textPaddingLeft:10/1440,textPaddingRight:10/1440,textPaddingTop:10/1440,textPaddingBottom:10/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:Yn,textAlign:"center",openFontSize:16/1440,openLineHeight:16/1440,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Yn,openTextAlign:"center",compactPanelHeight:40/1440,compactLogoMaxHeight:120/1440,compactShowIcon:"on",compactIconSize:16/1440,compactNavTextWidth:60/1440,compactNavGap:12/1440,compactNavPaddingLeft:10/1440,compactNavPaddingRight:10/1440,compactFontSize:16/1440,compactLineHeight:16/1440,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:Yn,compactTextAlign:"center"}},layout:["__componentName__","link","logo","logoMaxHeight","logoPosition","panelHeight","backgroundColor","logoColor","iconColor","showIcon","iconSize","linkColor","openLinkColor","compactShowIcon","compactIconColor","compactCloseButtonColor","compactLinkColor","compactLogoColor","compactBackgroundColor","compactLogoMaxHeight","compactLogoPosition","compactPanelHeight","compactIconSize","compactNavTextWidth","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight","compactFontFamily","compactFontSettings","compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing","compactTextAlign","compactTextAppearance","openLogoColor","menuBackgroundColor","overlayColor","closeButtonColor","effect","textWidth","navTextWidth","position","gap","navGap","navPaddingLeft","navPaddingRight","textPaddingLeft","textPaddingRight","textPaddingTop","textPaddingBottom","fontFamily","fontSettings","fontSize","lineHeight","letterSpacing","wordSpacing","textAlign","textAppearance","openFontFamily","openFontSettings","openFontSize","openLineHeight","openLetterSpacing","openWordSpacing","openTextAlign","openTextAppearance"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","logo"]},{id:"default",icon:"default",title:"Default",tooltip:"Default State",layout:Jw},{id:"compact",icon:"compact",title:"Compact",tooltip:"Compact State",layout:Qw,availableWhen:{navigationPosition:["switch"]}},{id:"open",icon:"open",title:"Open",tooltip:"Open State",layout:e$},{id:"links",icon:"content",title:"Links",tooltip:"Link Settings",layout:["__componentName__","link"]}],paletteBookmark:{items:[...n$],panelIds:["default","compact","open"],stateItems:{default:["iconColor","logoColor","closeButtonColor","linkColor","backgroundColor"],hover:["iconColor","logoColor","closeButtonColor","linkColor"],compact:["compactIconColor","compactLogoColor","compactCloseButtonColor","compactLinkColor","compactBackgroundColor"],"compact-hover":["compactIconColor","compactLogoColor","compactCloseButtonColor","compactLinkColor"],open:["closeButtonColor","openLogoColor","openLinkColor","menuBackgroundColor","overlayColor"],"open-hover":["closeButtonColor","openLogoColor","openLinkColor"]}},states:["default","hover"],statePanels:["default","compact","open"]},o$={element:qw,id:"basic-burger",name:"Basic Burger",category:"navigation",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple Burger.png"},layoutMode:"navigation",defaultSize:{d:{width:"100%",height:60/1440},t:{width:"100%",height:60/768},m:{width:"100%",height:56/375}},schema:i$,sourceCode:Uw,assetsPaths:{content:[],parameters:[{path:"logo.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"},{path:"openFontFamily"},{path:"compactFontFamily"}]},fontRelations:{fontSettings:"fontFamily",openFontSettings:"openFontFamily",compactFontSettings:"compactFontFamily"}},ud=120,pd=3,r$=.12,El={x:0,y:0,width:100,height:100};function So(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}function ga(e){return e<0?0:e>1?1:e}function md(e,t){return e.filter(n=>n.length>0).map(n=>`M ${n.map(i=>`${i.x*t.width} ${i.y*t.height}`).join(" L ")} Z`).join(" ")}function a$(e,t){let n=1/0,i=1/0,o=-1/0,r=-1/0;for(const c of e)for(const u of c){const p=u.x*t.width,x=u.y*t.height;p<n&&(n=p),p>o&&(o=p),x<i&&(i=x),x>r&&(r=x)}const l=o-n,d=r-i;return!isFinite(l)||!isFinite(d)||l<=0||d<=0?null:{x:n,y:i,width:l,height:d}}function s$(e){return e.map(([t,n])=>({x:t,y:n}))}function hs(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const d of e)for(const c of d)c.x<t&&(t=c.x),c.x>i&&(i=c.x),c.y<n&&(n=c.y),c.y>o&&(o=c.y);const r=i-t,l=o-n;return!isFinite(r)||!isFinite(l)||r<=0||l<=0?e:e.map(d=>d.map(c=>({x:(c.x-t)/r,y:(c.y-n)/l})))}function l$(e,t){const n=[];for(const o of e)for(let r=0;r<o.length;r+=1){const l=o[r],d=o[(r+1)%o.length];(l.y<=t&&d.y>t||d.y<=t&&l.y>t)&&n.push(l.x+(t-l.y)/(d.y-l.y)*(d.x-l.x))}n.sort((o,r)=>o-r);const i=[];for(let o=0;o+1<n.length;o+=2){const r=ga(n[o]),l=ga(n[o+1]);l>r&&i.push({x0:r,x1:l})}return c$(i)}function c$(e){if(e.length<2)return e;const t=[...e].sort((i,o)=>i.x0-o.x0),n=[t[0]];for(let i=1;i<t.length;i+=1){const o=n[n.length-1],r=t[i];r.x0<=o.x1?o.x1=Math.max(o.x1,r.x1):n.push({...r})}return n}function d$(e,t){const n=[];let i=0,o=0;for(;i<e.length&&o<t.length;){const r=Math.max(e[i].x0,t[o].x0),l=Math.min(e[i].x1,t[o].x1);l>r&&n.push({x0:r,x1:l}),e[i].x1<t[o].x1?i+=1:o+=1}return n}function u$(e){const t=[];let n=0;for(const i of e)i.x0>n&&t.push({x0:n,x1:i.x0}),n=Math.max(n,i.x1);return n<1&&t.push({x0:n,x1:1}),t}function p$(e,t){const n=[];for(const i of e){if(t.x1<=i.x0||t.x0>=i.x1){n.push(i);continue}t.x0>i.x0&&n.push({x0:i.x0,x1:t.x0}),t.x1<i.x1&&n.push({x0:t.x1,x1:i.x1})}return n}function m$(e,t,n,i){let o=null;for(let r=0;r<pd;r+=1){const l=ga(t+(n-t)*r/Math.max(1,pd-1)),d=l$(e,l),c=i==="avoid"?u$(d):d;if(o=o===null?c:d$(o,c),o.length===0)return[]}return o??[]}function gd(e,t="stretch",n=El){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=Li(i),d=yr(l);if(d.length)return t==="viewbox"?So(d,n):hs(d);if(typeof document>"u")return null;const c=i.split(/(?=[Mm])/).map(x=>x.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const x of c){const v=document.createElementNS("http://www.w3.org/2000/svg","path");v.setAttribute("d",x),u.appendChild(v);let m=0;try{m=v.getTotalLength()}catch{m=0}if(!m)continue;const h=[];for(let y=0;y<ud;y+=1){const b=v.getPointAtLength(y/ud*m);h.push({x:b.x,y:b.y})}p.push(h)}return p.length?t==="viewbox"?So(p,n):hs(p):null}const o=i.split(/[\s,]+/).map(Number).filter(l=>!Number.isNaN(l));if(o.length<6)return null;const r=[];for(let l=0;l+1<o.length;l+=2)r.push({x:o[l],y:o[l+1]});return t==="viewbox"?So([r],n):hs([r])}const Ml={bobbin:"M57.63,0 L57.63,37.24 L74.66,37.24 L74.66,56.07 L57.63,100 L33.84,100 L16.81,56.07 L16.81,37.24 L33.84,37.24 L33.84,0 Z",circle:"M50,0 C77.61,0 100,22.39 100,50 C100,77.61 77.61,100 50,100 C22.39,100 0,77.61 0,50 C0,22.39 22.39,0 50,0 Z",shield:"M0,0 L100,0 L100,50 L50,100 L0,50 Z",vase:"M25.37,0 L91.55,0 C91.55,0 74.8,25.14 83.07,50.03 C91.34,74.92 74.61,100 74.61,100 L8.43,100 C8.43,100 32.3,75.08 23.9,50 C15.5,24.92 25.37,0 25.37,0 Z",parallelogram:"M25.37,0 L91.55,0 L74.61,100 L8.43,100 Z",diamond:"M50,0 L80,50 L50,100 L20,50 Z"},Ws="0 0 100 100",ha=100,Hs=16,g$=12,h$=16,fs=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,f$=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,hd=Math.PI/4,y$=8,v$=Math.PI/18,x$=8,go=24,ho=[];function b$(){return[{closed:!0,nodes:[{p:{x:0,y:0},in:null,out:null},{p:{x:1,y:0},in:null,out:null},{p:{x:1,y:1},in:null,out:null},{p:{x:0,y:1},in:null,out:null}]}]}function ys(e,t){return ln(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function S$(e){const t=Si(e),n=t.maxX-t.minX,i=t.maxY-t.minY;return!isFinite(n)||!isFinite(i)||n<=0||i<=0?e:ln(e,o=>({x:(o.x-t.minX)/n,y:(o.y-t.minY)/i}))}function w$(e,t){if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return ln(e,r=>({x:(i+r.x*n)/t.width,y:(o+r.y*n)/t.height}))}function fd(e,t,n,i,o,r){let l=[];if(t&&t.length)l=ys(t,i);else{const d=e.trim();if(d&&/^[Mm]/.test(d)){const c=Li(d);c.length&&(l=n==="viewbox"?ys(c,i):S$(c))}if(!l.length){const c=o!=="custom"?Ml[o]:void 0;c?l=ys(Li(c),El):l=b$()}}return o==="circle"?w$(l,r):l}function yd(e,t){return!(t.width>0)||!(t.height>0)||!e.length?"":No(ln(e,n=>({x:n.x*t.width,y:n.y*t.height})))}function Os(e){const t=e==="rectangle"||e==="custom"?void 0:Ml[e];return t?So(yr(Li(t)),El):[s$([[0,0],[1,0],[1,1],[0,1]])]}function $$(e){const t=e.match(f$);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function $n(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function Ds(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function cn(e){return{x:e.x,y:e.y}}function C$(e){return{p:cn(e.p),in:e.in?cn(e.in):null,out:e.out?cn(e.out):null}}function zn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(C$)}))}function ln(e,t){return e.map(n=>({closed:n.closed,nodes:n.nodes.map(i=>({p:t(i.p),in:i.in?t(i.in):null,out:i.out?t(i.out):null}))}))}function vd(e,t,n,i=n){return ln(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function T$(e,t,n,i,o,r,l){let d=Math.abs(t),c=Math.abs(n);if(!d||!c||e.x===l.x&&e.y===l.y)return[{c1:cn(e),c2:cn(l),p:cn(l)}];const u=i*Math.PI/180,p=Math.cos(u),x=Math.sin(u),v=(e.x-l.x)/2,m=(e.y-l.y)/2,h=p*v+x*m,y=-x*v+p*m,b=h*h/(d*d)+y*y/(c*c);if(b>1){const Z=Math.sqrt(b);d*=Z,c*=Z}const C=o===r?-1:1,S=d*d*y*y+c*c*h*h,w=Math.max(0,d*d*c*c-S),D=S===0?0:C*Math.sqrt(w/S),_=D*d*y/c,z=-D*c*h/d,H=p*_-x*z+(e.x+l.x)/2,L=x*_+p*z+(e.y+l.y)/2,V=Math.atan2((y-z)/c,(h-_)/d);let E=Math.atan2((-y-z)/c,(-h-_)/d)-V;!r&&E>0&&(E-=Math.PI*2),r&&E<0&&(E+=Math.PI*2);const F=Math.max(1,Math.ceil(Math.abs(E)/(Math.PI/2))),W=E/F,g=4/3*Math.tan(W/4),M=(Z,T)=>({x:H+p*d*Z-x*c*T,y:L+x*d*Z+p*c*T}),R=[];let G=V;for(let Z=0;Z<F;Z+=1){const T=G+W,j=Math.cos(G),Y=Math.sin(G),le=Math.cos(T),se=Math.sin(T);R.push({c1:M(j-g*Y,Y+g*j),c2:M(le+g*se,se-g*le),p:Z===F-1?cn(l):M(le,se)}),G=T}return R}function Li(e){const t=(e??"").trim();if(!t)return[];const n=[];let i=[],o=!1,r={x:0,y:0},l={x:0,y:0},d=null,c=null;const u=()=>{if(o&&i.length>2){const m=i[0],h=i[i.length-1];Math.abs(m.p.x-h.p.x)<1e-6&&Math.abs(m.p.y-h.p.y)<1e-6&&(m.in=h.in??m.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(m,h)=>{i.push({p:m,in:Vn(h??null,m),out:null}),r=m},x=m=>{if(!i.length)return;const h=i[i.length-1];h.out=Vn(m,h.p)};fs.lastIndex=0;let v=fs.exec(t);for(;v!==null;){const m=v[1],h=m.toUpperCase(),y=m!==h,b=$$(v[2]),C=S=>y?{x:r.x+b[S],y:r.y+b[S+1]}:{x:b[S],y:b[S+1]};if(h==="Z")o=!0,u(),r=cn(l),d=null,c=null;else if(h==="M"){for(let S=0;S+1<b.length;S+=2){const w=C(S);S===0&&(u(),l=cn(w)),p(w)}d=null,c=null}else if(h==="L"){for(let S=0;S+1<b.length;S+=2)p(C(S));d=null,c=null}else if(h==="H"){for(const S of b)p({x:y?r.x+S:S,y:r.y});d=null,c=null}else if(h==="V"){for(const S of b)p({x:r.x,y:y?r.y+S:S});d=null,c=null}else if(h==="C"){for(let S=0;S+5<b.length;S+=6){const w=C(S),D=C(S+2),_=C(S+4);x(w),p(_,D),d=D}c=null}else if(h==="S"){for(let S=0;S+3<b.length;S+=4){const w=d?Ds(d,r):cn(r),D=C(S),_=C(S+2);x(w),p(_,D),d=D}c=null}else if(h==="Q")for(let S=0;S+3<b.length;S+=4){const w=C(S),D=C(S+2);x($n(r,w,2/3)),p(D,$n(D,w,2/3)),c=w,d=null}else if(h==="T")for(let S=0;S+1<b.length;S+=2){const w=c?Ds(c,r):cn(r),D=C(S);x($n(r,w,2/3)),p(D,$n(D,w,2/3)),c=w,d=null}else if(h==="A")for(let S=0;S+6<b.length;S+=7){const w=y?{x:r.x+b[S+5],y:r.y+b[S+6]}:{x:b[S+5],y:b[S+6]};for(const D of T$(r,b[S],b[S+1],b[S+2],b[S+3]!==0,b[S+4]!==0,w))x(D.c1),p(D.p,D.c2);d=null,c=null}v=fs.exec(t)}return u(),n}function On(e){return`${Number(e.toFixed(2))}`}function Vn(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function lp(e){return!!(Vn(e.in,e.p)||Vn(e.out,e.p))}function Bo(e,t){return!Vn(e.out,e.p)&&!Vn(t.in,t.p)}function xd(e,t){if(Bo(e,t))return`L${On(t.p.x)},${On(t.p.y)}`;const n=Vn(e.out,e.p)??e.p,i=Vn(t.in,t.p)??t.p;return`C${On(n.x)},${On(n.y)} ${On(i.x)},${On(i.y)} ${On(t.p.x)},${On(t.p.y)}`}function No(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${On(i.p.x)},${On(i.p.y)}`);let r=i;for(const l of o)t.push(xd(r,l)),r=l;if(n.closed){const l=xd(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function cp(e){const t=[];for(let n=0;n+1<e.nodes.length;n+=1)t.push({from:e.nodes[n],to:e.nodes[n+1],index:n});if(e.closed&&e.nodes.length>2){const n=e.nodes.length-1;t.push({from:e.nodes[n],to:e.nodes[0],index:n})}return t}function zs(e,t,n){if(Bo(e,t))return $n(e.p,t.p,n);const i=e.out??e.p,o=t.in??t.p,r=1-n,l=r*r*r,d=3*r*r*n,c=3*r*n*n,u=n*n*n;return{x:l*e.p.x+d*i.x+c*o.x+u*t.p.x,y:l*e.p.y+d*i.y+c*o.y+u*t.p.y}}function yr(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of cp(n)){if(Bo(o.from,o.to)){i.push(cn(o.from.p));continue}for(let r=0;r<Hs;r+=1)i.push(zs(o.from,o.to,r/Hs))}n.closed||i.push(cn(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function Si(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of yr(e))for(const l of r)l.x<t&&(t=l.x),l.x>i&&(i=l.x),l.y<n&&(n=l.y),l.y>o&&(o=l.y);return{minX:t,minY:n,maxX:i,maxY:o}}function L$(e){const t=Si(e);return!isFinite(t.minX)||!isFinite(t.maxX)||!isFinite(t.minY)||!isFinite(t.maxY)?null:{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}}function dp(e,t,n){const i={x:(n.x-e.x)/6,y:(n.y-e.y)/6};return{in:{x:t.x-i.x,y:t.y-i.y},out:{x:t.x+i.x,y:t.y+i.y}}}function up(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=g$)return{closed:!0,nodes:t.map(r=>({p:cn(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/h$)),i=[];for(let r=0;r<t.length;r+=n)i.push(t[r]);const o=i.length;return{closed:!0,nodes:i.map((r,l)=>({p:cn(r),...dp(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function pp(e,t,n=1){if(!e.length)return!1;const i=Si(e);if(!isFinite(i.minX)||!isFinite(i.maxX))return!1;const o=i.maxX-i.minX,r=i.maxY-i.minY;if(o<=t.width*2.5&&r<=t.height*2.5)return!1;const l=Math.max(n,t.width*.5),d=Math.max(n,t.height*.5);return i.minX<t.x-l||i.minY<t.y-d||i.maxX>t.x+t.width+l||i.maxY>t.y+t.height+d}function I$(e,t,n,i,o,r,l){const d=t.width>0?n.width/t.width:1,c=t.height>0?n.height/t.height:1;return!(r>0)||!(l>0)||!(d>0)||!(c>0)?e:ln(e,u=>{const p=i+(u.x-t.x)*r,x=o+(u.y-t.y)*l;return{x:t.x+p/d,y:t.y+x/c}})}function R$(e,t){if(!e.length)return e;const n=Si(e),i=n.maxX-n.minX,o=n.maxY-n.minY;if(!(i>0)||!(o>0)||n.minX>=t.x-1e-6&&n.minY>=t.y-1e-6&&n.maxX<=t.x+t.width+1e-6&&n.maxY<=t.y+t.height+1e-6)return e;const l=Math.min(t.width/i,t.height/o),d=t.x+(t.width-i*l)/2,c=t.y+(t.height-o*l)/2;return ln(e,u=>({x:d+(u.x-n.minX)*l,y:c+(u.y-n.minY)*l}))}function mp(e){const t={x:0,y:0,width:ha,height:ha},n=e!=="custom"?Ml[e]:void 0,i=n?ln(Li(n),r=>({x:r.x/100*t.width+t.x,y:r.y/100*t.height+t.y})):ln(up(Os("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=R$(i,t);return{shape:e,customPath:No(o),pathFit:"viewbox",pathViewBox:Ws}}function Vr(e,t){return t>0?Math.round(e/t)*t:e}function P$(e,t,n,i){var u;const o=(u=e[t])==null?void 0:u.nodes[n];if(!o)return e;const r=i.x-o.p.x,l=i.y-o.p.y,d=zn(e),c=d[t].nodes[n];return c.p={x:o.p.x+r,y:o.p.y+l},c.in&&(c.in={x:c.in.x+r,y:c.in.y+l}),c.out&&(c.out={x:c.out.x+r,y:c.out.y+l}),d}function bd(e,t,n,i){var r;if(!t.length)return e;const o=zn(e);for(const{contour:l,node:d}of t){const c=(r=o[l])==null?void 0:r.nodes[d];c&&(c.p={x:c.p.x+n,y:c.p.y+i},c.in&&(c.in={x:c.in.x+n,y:c.in.y+i}),c.out&&(c.out={x:c.out.x+n,y:c.out.y+i}))}return o}function E$(e,t){const n=new Map;for(const{contour:o,node:r}of t){const l=n.get(o)??[];l.push(r),n.set(o,l)}let i=e;return n.forEach((o,r)=>{const l=[...o].sort((d,c)=>c-d);for(const d of l)i=gp(i,r,d)}),i}function M$(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const d=zn(e),c=d[t].nodes[n];if(c[i]=cn(o),r){const p=i==="in"?"out":"in";c[p]=Ds(o,c.p)}return d}function k$(e,t,n,i){var l;const o=(l=e[t])==null?void 0:l.nodes[n];if(!o||!o[i])return e;const r=zn(e);return r[t].nodes[n][i]=null,r}function A$(e,t,n,i){const o=e[t];if(!o)return{contours:e,nodeIndex:-1};const r=o.nodes[n],l=o.nodes[(n+1)%o.nodes.length];if(!r||!l)return{contours:e,nodeIndex:-1};const d=zn(e),c=d[t].nodes,u=n+1;if(Bo(r,l))return c.splice(u,0,{p:$n(r.p,l.p,i),in:null,out:null}),{contours:d,nodeIndex:u};const p=r.out??r.p,x=l.in??l.p,v=$n(r.p,p,i),m=$n(p,x,i),h=$n(x,l.p,i),y=$n(v,m,i),b=$n(m,h,i),C=$n(y,b,i),S=(n+1)%o.nodes.length;return c[n].out=v,c[S].in=h,c.splice(u,0,{p:C,in:y,out:b}),{contours:d,nodeIndex:u}}function gp(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=zn(e);return o[t].nodes.splice(n,1),o}function Sd(e,t,n){const i=e[t];if(!(i==null?void 0:i.nodes[n]))return e;const r=zn(e),l=r[t].nodes,d=l[n],c=l.length,u=(n-1+c)%c,p=(n+1)%c,x=!!Vn(l[u].out,l[u].p),v=!!Vn(l[p].in,l[p].p);if(lp(d)||x||v)return d.in=null,d.out=null,l[u].out=null,l[p].in=null,r;const m=dp(l[u].p,d.p,l[p].p);return d.in=m.in,d.out=m.out,r}function F$(e,t,n){const i=n.x-t.x,o=n.y-t.y,r=i*i+o*o,l=r===0?0:Math.max(0,Math.min(1,((e.x-t.x)*i+(e.y-t.y)*o)/r)),d={x:t.x+i*l,y:t.y+o*l};return{t:l,distance:Math.hypot(e.x-d.x,e.y-d.y),point:d}}function wd(e,t){let n=null;return e.forEach((i,o)=>{for(const r of cp(i)){const l=Bo(r.from,r.to)?1:Hs;for(let d=0;d<l;d+=1){const c=d/l,u=(d+1)/l,p=F$(t,zs(r.from,r.to,c),zs(r.from,r.to,u));(!n||p.distance<n.distance)&&(n={contour:o,segment:r.index,t:c+(u-c)*p.t,distance:p.distance,point:p.point})}}}),n}function N$(e,t){const n=[];return e.forEach((i,o)=>{i.nodes.forEach((r,l)=>{o===t.contour&&l===t.node||n.push(r.p)})}),n}function $d(e,t,n){const i=t.filter((r,l)=>isFinite(r)&&t.findIndex(d=>Math.abs(d-r)<1e-6)===l),o=i.map(r=>({value:r,axis:r,from:null}));for(const r of e)o.push({value:r[n],axis:null,from:r});for(const r of i)for(const l of e)o.push({value:r*2-l[n],axis:r,from:l});return o}function Cd(e,t,n,i,o){const r=i(t)[n];let l=null,d=1/0;for(const c of e){const u=n==="x"?{x:c.value,y:t.y}:{x:t.x,y:c.value},p=Math.abs(i(u)[n]-r);p>o||l&&p>=d||(l=c,d=p)}return l}function _$(e,t){return e.length===t.length&&e.every((n,i)=>n.kind===t[i].kind&&n.a.x===t[i].a.x&&n.a.y===t[i].a.y&&n.b.x===t[i].b.x&&n.b.y===t[i].b.y)}function W$(e){const t=Math.PI*2;return((e+Math.PI)%t+t)%t-Math.PI}function Bs(e,t){const n=t.x-e.x,i=t.y-e.y,o=Math.hypot(n,i);return o<1e-6?null:{x:n/o,y:i/o}}function H$(e,t){const n=Bs(e,t);return n?{kind:"align",a:{x:e.x-n.x*go,y:e.y-n.y*go},b:{x:t.x+n.x*go,y:t.y+n.y*go}}:{kind:"align",a:e,b:t}}function js(e,t,n){return t==="x"?{kind:"center",a:{x:e,y:0},b:{x:e,y:n.height}}:{kind:"center",a:{x:0,y:e},b:{x:n.width,y:e}}}function Td(e,t,n,i,o){if(e.axis===null)return H$(n,o(e.from??n));const r=t==="x"?{x:e.axis,y:0}:{x:0,y:e.axis};return js(o(r)[t],t,i)}function O$(e,t,n,i,o){const r=[],l=o(e);return t&&e.x===t.value&&r.push(Td(t,"x",l,i,o)),n&&e.y===n.value&&r.push(Td(n,"y",l,i,o)),r}function D$(e,t,n,i){const o=e==null?void 0:e.nodes[t];if(!e||!o)return null;const r=i(o.p),l=n==="in"?o.out:o.in;if(l)return Bs(i(l),r);const d=e.nodes.length,c=t+(n==="in"?1:-1);if(!e.closed&&(c<0||c>=d))return null;const u=e.nodes[(c+d)%d];if(!u)return null;const p=(n==="in"?u.in:u.out)??u.p;return Bs(i(p),r)}function z$(e,t,n,i,o,r,l){const d=r(t),c=r(e),u=c.x-d.x,p=c.y-d.y,x=Math.hypot(u,p);if(x<1e-6)return{point:e,guides:ho};const v=Math.atan2(p,u),m=Math.round(v/hd)*hd;let h=o?m:null,y=!1;if(!o){const z=[];n&&z.push({angle:Math.atan2(n.y,n.x),smooth:!0}),z.push({angle:m,smooth:!1});for(const H of z){const L=W$(H.angle-v);if(!(Math.abs(L)>v$)&&!(Math.abs(Math.sin(L))*x>y$)){h=H.angle,y=H.smooth;break}}}const b=i!==null&&i>0&&Math.abs(x-i)<=x$;if(h===null&&!b)return{point:e,guides:ho};const C=h??v,S=b?i:x,w={x:Math.cos(C),y:Math.sin(C)},D=S+(h===null?0:go),_=b?S:y?go:0;return{point:l({x:d.x+w.x*S,y:d.y+w.y*S}),guides:[{kind:"angle",a:{x:d.x-w.x*_,y:d.y-w.y*_},b:{x:d.x+w.x*D,y:d.y+w.y*D}}]}}const Vs=.1,Gs=8,B$=4,Ld=10,fa=(e,t)=>{switch(t){case"nw":return{x:e.minX,y:e.minY};case"ne":return{x:e.maxX,y:e.minY};case"se":return{x:e.maxX,y:e.maxY};case"sw":return{x:e.minX,y:e.maxY}}},hp=e=>{switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}},Xs=(e,t)=>{const n=fa(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*Ld,y:n.y+o*Ld}},qs=(e,t)=>!(t.width>0)||!(t.height>0)||!(e.width>0)||!(e.height>0)?1:Math.max(e.width/t.width,e.height/t.height),Gi=(e,t,n)=>{const i=qs(e,t)*n;return{width:t.width*i,height:t.height*i}},Dn=(e,t,n)=>(e-t)*n,fo=(e,t,n,i)=>{const o=e-t;if(Math.abs(o)<1e-6)return .5;const r=n/o;return(i==null?void 0:i.clamp)===!1?r:Math.abs(o)<B$?.5:ga(r)},j$=(e,t,n,i,o,r)=>{const l=Gi(e,n,r),d=e.x+Dn(e.width,l.width,i),c=e.y+Dn(e.height,l.height,o),u=qs(e,n),p=qs(t,n),x=Math.min(Gs,Math.max(Vs,p>0?r*(u/p):r)),v=Gi(t,n,x);return{focalX:fo(t.width,v.width,d-t.x,{clamp:!1}),focalY:fo(t.height,v.height,c-t.y,{clamp:!1}),scale:x}},Id=1.08,Gr=14,Xr=8;function V$({P:e,box:t,bounds:n,natural:i,imageUrl:o,maskPath:r,stage:l,onStageChange:d,focalX:c,focalY:u,scale:p,onChange:x,onCommit:v}){const m=s.useRef(null),h=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,y=s.useRef(null),b=s.useRef(null),C=s.useRef({focalX:c,focalY:u,scale:p});C.current={focalX:c,focalY:u,scale:p};const S=l==="image";s.useEffect(()=>{var W;S&&((W=m.current)==null||W.focus({preventScroll:!0}))},[S]);const w=s.useCallback((W,g)=>{var R;const M=(R=m.current)==null?void 0:R.getBoundingClientRect();return!M||M.width<=0||M.height<=0?{x:0,y:0}:{x:(W-M.left)/M.width*t.width,y:(g-M.top)/M.height*t.height}},[t.width,t.height]),D=W=>{var M,R;if(!i)return;W.stopPropagation(),W.preventDefault(),(M=m.current)==null||M.focus({preventScroll:!0});const g=Gi(n,i,p);y.current={pointerId:W.pointerId,origin:w(W.clientX,W.clientY),startX:Dn(n.width,g.width,c),startY:Dn(n.height,g.height,u),width:g.width,height:g.height,moved:!1},(R=m.current)==null||R.setPointerCapture(W.pointerId)},_=(W,g)=>{var le,se;if(!i)return;W.stopPropagation(),W.preventDefault(),(le=m.current)==null||le.focus({preventScroll:!0});const M=Gi(n,i,p),R=Dn(n.width,M.width,c),G=Dn(n.height,M.height,u),Z={minX:R,minY:G,maxX:R+M.width,maxY:G+M.height},T=fa(Z,hp(g)),j=fa(Z,g),Y=Math.hypot(j.x-T.x,j.y-T.y);!isFinite(Y)||Y<=0||(b.current={pointerId:W.pointerId,anchor:T,startDistance:Y,startScale:p,startX:R,startY:G,moved:!1},(se=m.current)==null||se.setPointerCapture(W.pointerId))},z=W=>{if(!i)return;const g=b.current;if(g&&W.pointerId===g.pointerId){W.stopPropagation(),W.preventDefault();const R=w(W.clientX,W.clientY),G={x:R.x-n.x,y:R.y-n.y},Z=Math.hypot(G.x-g.anchor.x,G.y-g.anchor.y),T=Math.min(Gs,Math.max(Vs,g.startScale*(Z/g.startDistance)));if(!g.moved&&Math.abs(T-g.startScale)<1e-4)return;g.moved=!0;const j=T/g.startScale,Y=g.anchor.x+(g.startX-g.anchor.x)*j,le=g.anchor.y+(g.startY-g.anchor.y)*j,se=Gi(n,i,T);x({focalX:fo(n.width,se.width,Y),focalY:fo(n.height,se.height,le),scale:T});return}const M=y.current;if(M&&W.pointerId===M.pointerId){W.stopPropagation(),W.preventDefault();const R=w(W.clientX,W.clientY),G=R.x-M.origin.x,Z=R.y-M.origin.y;if(!M.moved&&G===0&&Z===0)return;M.moved=!0,x({focalX:fo(n.width,M.width,M.startX+G),focalY:fo(n.height,M.height,M.startY+Z),scale:p})}},H=W=>{var R,G;const g=y.current;if(g&&W.pointerId===g.pointerId){y.current=null,W.stopPropagation(),(R=m.current)!=null&&R.hasPointerCapture(g.pointerId)&&m.current.releasePointerCapture(g.pointerId),g.moved&&v(C.current);return}const M=b.current;M&&W.pointerId===M.pointerId&&(b.current=null,W.stopPropagation(),(G=m.current)!=null&&G.hasPointerCapture(M.pointerId)&&m.current.releasePointerCapture(M.pointerId),M.moved&&v(C.current))},L=W=>{if(W.key==="Escape"){W.stopPropagation(),d("none");return}if(W.key==="="||W.key==="+"||W.key==="-"||W.key==="_"){W.preventDefault(),W.stopPropagation();const g=W.key==="="||W.key==="+",M=Math.min(Gs,Math.max(Vs,p*(g?Id:1/Id))),R={focalX:c,focalY:u,scale:M};x(R),v(R)}},V=["nw","ne","se","sw"],$={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},E=s.useMemo(()=>{const W=i??{width:n.width,height:n.height},g=Gi(n,W,p);return!(g.width>0)||!(g.height>0)?null:{x:n.x+Dn(n.width,g.width,c),y:n.y+Dn(n.height,g.height,u),width:g.width,height:g.height}},[i,n.x,n.y,n.width,n.height,c,u,p]),F=E?{minX:E.x,minY:E.y,maxX:E.x+E.width,maxY:E.y+E.height}:$;return a.jsxs("svg",{ref:m,className:`${e}-editor${S?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:L,onPointerMove:z,onPointerUp:H,onPointerCancel:H,onLostPointerCapture:H,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>d("none")}),S&&o&&E&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:h,maskUnits:"userSpaceOnUse",x:E.x,y:E.y,width:E.width,height:E.height,children:[a.jsx("rect",{x:E.x,y:E.y,width:E.width,height:E.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:E.x,y:E.y,width:E.width,height:E.height,preserveAspectRatio:"none",mask:`url(#${h})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:E.x,y:E.y,width:E.width,height:E.height})]}),S&&a.jsxs(a.Fragment,{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:n.x,y:n.y,width:n.width,height:n.height}),a.jsx("rect",{className:`${e}-editor-body`,x:n.x,y:n.y,width:n.width,height:n.height,onPointerDown:D}),V.map(W=>{const g=Xs(F,W),M=W==="ne"||W==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:g.x-Xr/2,y:g.y-Xr/2,width:Xr,height:Xr}),a.jsx("rect",{className:`${e}-editor-scale-grab${M?` ${e}-editor-scale-grab-nesw`:""}`,x:g.x-Gr/2,y:g.y-Gr/2,width:Gr,height:Gr,onPointerDown:R=>_(R,W)})]},W)})]})]})}const Us=10,G$=Us*2,Hn=7,X$=4,ao=9,q$=3.5,Rd=1.08,U$=.05,qr=14,K$=1,Ur=14,Kr=8;function Y$({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,uniformStretch:l=!1,stage:d,onStageChange:c,onSelectionChange:u,onChange:p,onCommit:x}){const v=s.useRef(null),m=s.useRef(null),h=s.useRef(i);h.current=i;const y=s.useRef(null),b=s.useRef(null),C=s.useRef(null),S=s.useRef(null),[w,D]=s.useState([]),[_,z]=s.useState(ho),[H,L]=s.useState(null),V=s.useCallback(f=>{z(X=>_$(X,f)?X:f)},[]),$=d==="shape";s.useEffect(()=>{var f;$&&((f=v.current)==null||f.focus({preventScroll:!0}))},[$]),s.useEffect(()=>{$||D(f=>f.length?[]:f)},[$]);const E=w.length>0;s.useEffect(()=>{u==null||u(E)},[E,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const F=n.width>0?t.width/n.width:1,W=n.height>0?t.height/n.height:1,g=Math.min(F,W),M=r&&l?g:F,R=r&&l?g:W,G=r&&l?(t.width-n.width*g)/2:0,Z=r&&l?(t.height-n.height*g)/2:0,T=s.useCallback(f=>r?{x:G+(f.x-n.x)*M,y:Z+(f.y-n.y)*R}:{x:f.x-n.x,y:f.y-n.y},[r,n,M,R,G,Z]),j=s.useCallback(f=>r?{x:n.x+(M>0?(f.x-G)/M:0),y:n.y+(R>0?(f.y-Z)/R:0)}:{x:n.x+f.x,y:n.y+f.y},[r,n,M,R,G,Z]),Y=s.useMemo(()=>j({x:t.width/2,y:t.height/2}),[j,t.width,t.height]),le=s.useCallback((f,X)=>{var U;const N=(U=v.current)==null?void 0:U.getBoundingClientRect();if(!N||N.width<=0||N.height<=0)return{x:0,y:0};if(r){const me=(f-N.left)/N.width*t.width,K=(X-N.top)/N.height*t.height;return{x:n.x+(M>0?(me-G)/M:0),y:n.y+(R>0?(K-Z)/R:0)}}return{x:n.x+(f-N.left),y:n.y+(X-N.top)}},[r,n,t.width,t.height,M,R,G,Z]),se=s.useCallback((f,X)=>{var U;const N=(U=v.current)==null?void 0:U.getBoundingClientRect();return!N||N.width<=0||N.height<=0?{x:0,y:0}:{x:(f-N.left)/N.width*t.width,y:(X-N.top)/N.height*t.height}},[t.width,t.height]),k=s.useCallback((f,X)=>{const N=l&&!(X!=null&&X.preserveShape)?I$(f,n,t,G,Z,M,R):f;x(N,X)},[x,l,n,t,G,Z,M,R]),re=s.useCallback(()=>{L(null)},[]),q=s.useCallback((f,X,N)=>{if(!N||y.current||b.current||C.current||S.current){re();return}const U=se(f,X),me=ln(h.current,T);for(const te of me)for(const Ae of te.nodes)if(Math.hypot(Ae.p.x-U.x,Ae.p.y-U.y)<=ao){re();return}const K=wd(me,U);if(!K||K.distance>Us){re();return}const I=me[K.contour],ie=I==null?void 0:I.nodes[K.segment],oe=I==null?void 0:I.nodes[(K.segment+1)%((I==null?void 0:I.nodes.length)??1)],B=!!(ie&&oe&&!Bo(ie,oe));L(te=>te&&te.curved===B&&Math.hypot(te.point.x-K.point.x,te.point.y-K.point.y)<.25?te:{point:K.point,curved:B})},[se,T,re]),ce=f=>{var Fe;const X=f.metaKey||f.ctrlKey,N=C.current;if(N&&f.pointerId===N.pointerId){if(f.stopPropagation(),f.preventDefault(),N.startDistance<=0)return;const et=le(f.clientX,f.clientY),Ue=Math.hypot(et.x-N.origin.x,et.y-N.origin.y),nt=Math.max(U$,Ue/N.startDistance);if(!N.moved&&Math.abs(nt-1)<1e-4)return;N.moved=!0,p(vd(N.startContours,N.origin,nt));return}const U=b.current;if(U&&f.pointerId===U.pointerId){f.stopPropagation(),f.preventDefault();const et=le(f.clientX,f.clientY),{bbox:Ue}=U,nt=Ue.maxX-Ue.minX,tt=Ue.maxY-Ue.minY,Ve=et.x-U.origin.x,fe=et.y-U.origin.y;let He=Ve,Be=fe;if(isFinite(nt)&&isFinite(tt))if(r){let Ce=n.x,De=n.x+n.width,Xe=n.y,ge=n.y+n.height;l&&(M>0&&(Ce=n.x+(0-G)/M,De=n.x+(t.width-G)/M),R>0&&(Xe=n.y+(0-Z)/R,ge=n.y+(t.height-Z)/R));const Me=Math.min(Ce,De-nt),ze=Math.max(Ce,De-nt),Re=Math.min(Xe,ge-tt),xe=Math.max(Xe,ge-tt),Ie=Math.min(ze,Math.max(Me,Ue.minX+Ve)),Ke=Math.min(xe,Math.max(Re,Ue.minY+fe));He=Ie-Ue.minX,Be=Ke-Ue.minY}else{const Ce=Ue.minX-n.x,De=Ue.minY-n.y,Xe=Math.min(0,t.width-nt),ge=Math.max(0,t.width-nt),Me=Math.min(0,t.height-tt),ze=Math.max(0,t.height-tt),Re=Math.min(ge,Math.max(Xe,Ce+Ve)),xe=Math.min(ze,Math.max(Me,De+fe));He=Re-Ce,Be=xe-De}const Je=[];if(!X&&isFinite(nt)&&isFinite(tt)){const Ce=T({x:Ue.minX+nt/2+He,y:Ue.minY+tt/2+Be}),De={x:t.width/2,y:t.height/2};Math.abs(Ce.x-De.x)<=qr&&(He=Y.x-Ue.minX-nt/2,Je.push(js(De.x,"x",t))),Math.abs(Ce.y-De.y)<=qr&&(Be=Y.y-Ue.minY-tt/2,Je.push(js(De.y,"y",t)))}if(!U.moved&&He===0&&Be===0)return;U.moved=!0,V(Je.length?Je:ho),p(ln(U.startContours,Ce=>({x:Ce.x+He,y:Ce.y+Be})),{carryImage:!0});return}const me=S.current;if(me&&f.pointerId===me.pointerId){f.stopPropagation(),f.preventDefault();const et=le(f.clientX,f.clientY);let Ue=et.x-me.origin.x,nt=et.y-me.origin.y;if(f.shiftKey&&(Math.abs(Ue)>Math.abs(nt)?nt=0:Ue=0),!me.moved&&Ue===0&&nt===0)return;me.moved=!0,p(bd(me.startContours,me.selection,Ue,nt));return}const K=y.current;if(!K||f.pointerId!==K.pointerId){q(f.clientX,f.clientY,w.length>0||$);return}re(),f.stopPropagation(),f.preventDefault();const I=le(f.clientX,f.clientY);if(K.kind==="anchor"){const et={x:K.anchor.x+(I.x-K.origin.x),y:K.anchor.y+(I.y-K.origin.y)},Ue=X?[]:N$(h.current,{contour:K.contour,node:K.node}),nt=X||!K.center?[]:[K.center],tt=Cd($d(Ue,nt.map(He=>He.x),"x"),et,"x",T,qr),Ve=Cd($d(Ue,nt.map(He=>He.y),"y"),et,"y",T,qr),fe=X?et:{x:(tt==null?void 0:tt.value)??Vr(et.x,o),y:(Ve==null?void 0:Ve.value)??Vr(et.y,o)};if(f.shiftKey&&(Math.abs(fe.x-K.anchor.x)>Math.abs(fe.y-K.anchor.y)?fe.y=K.anchor.y:fe.x=K.anchor.x),!K.moved&&fe.x===K.anchor.x&&fe.y===K.anchor.y)return;K.moved=!0,V(O$(fe,tt,Ve,t,T)),p(P$(h.current,K.contour,K.node,fe));return}const ie=(Fe=h.current[K.contour])==null?void 0:Fe.nodes[K.node],oe=K.mirror&&!f.altKey,B=oe||X?null:K.kind==="in"?ie==null?void 0:ie.out:ie==null?void 0:ie.in,te=ie?T(ie.p):null,Ae=B?T(B):null,he=ie&&(!X||f.shiftKey)?z$(I,ie.p,oe||X?null:D$(h.current[K.contour],K.node,K.kind,T),te&&Ae?Math.hypot(Ae.x-te.x,Ae.y-te.y):null,f.shiftKey,T,j):{point:I,guides:ho},Q=he.guides.length?he.point:X?I:{x:Vr(I.x,o),y:Vr(I.y,o)},Ze=K.kind==="in"?ie==null?void 0:ie.in:ie==null?void 0:ie.out;!K.moved&&Ze&&Q.x===Ze.x&&Q.y===Ze.y||(K.moved=!0,V(he.guides),p(M$(h.current,K.contour,K.node,K.kind,Q,oe)))},J=f=>{V(ho);const X=C.current;if(X&&f.pointerId===X.pointerId){C.current=null,f.stopPropagation();const B=v.current;B!=null&&B.hasPointerCapture(X.pointerId)&&B.releasePointerCapture(X.pointerId),X.moved&&k(h.current,{preserveShape:!0});return}const N=b.current;if(N&&f.pointerId===N.pointerId){b.current=null,f.stopPropagation();const B=v.current;B!=null&&B.hasPointerCapture(N.pointerId)&&B.releasePointerCapture(N.pointerId),N.moved?k(h.current,{preserveShape:!0}):D([]);return}const U=S.current;if(U&&f.pointerId===U.pointerId){S.current=null,f.stopPropagation();const B=v.current;B!=null&&B.hasPointerCapture(U.pointerId)&&B.releasePointerCapture(U.pointerId),U.moved&&k(h.current);return}const me=y.current;if(!me||f.pointerId!==me.pointerId)return;y.current=null,f.stopPropagation();const K=v.current;K!=null&&K.hasPointerCapture(me.pointerId)&&K.releasePointerCapture(me.pointerId);const I=Math.hypot(f.clientX-me.clientOrigin.x,f.clientY-me.clientOrigin.y);if(me.moved||I>X$){me.moved&&k(h.current);return}if(!me.toggleOnRelease||f.type!=="pointerup")return;const oe=Sd(h.current,me.contour,me.node);oe!==h.current&&(p(oe),k(oe))},be=f=>{f.stopPropagation()},We=f=>{var X,N;f.stopPropagation(),f.preventDefault(),re(),(X=v.current)==null||X.focus({preventScroll:!0}),b.current={pointerId:f.pointerId,origin:le(f.clientX,f.clientY),startContours:zn(i),bbox:Si(i),moved:!1},(N=v.current)==null||N.setPointerCapture(f.pointerId)},ye=(f,X)=>{var I,ie;f.stopPropagation(),f.preventDefault(),re(),(I=v.current)==null||I.focus({preventScroll:!0}),D([]),c("shape");const N=Si(i),U=fa(N,hp(X)),me=Xs(N,X),K=Math.hypot(me.x-U.x,me.y-U.y);!isFinite(K)||K<=0||(C.current={pointerId:f.pointerId,corner:X,origin:U,startDistance:K,startContours:zn(i),moved:!1},(ie=v.current)==null||ie.setPointerCapture(f.pointerId))},ue=(f,X,N,U)=>{var I,ie,oe,B;f.stopPropagation(),f.preventDefault(),re(),(I=v.current)==null||I.focus({preventScroll:!0});const me=(ie=i[N])==null?void 0:ie.nodes[U];if(!me)return;if(f.altKey){const te=X==="anchor"?gp(i,N,U):k$(i,N,U,X);if(te===i)return;D(X==="anchor"?[]:[{contour:N,node:U}]),p(te),k(te);return}const K=f.metaKey||f.ctrlKey;if(X==="anchor"&&f.shiftKey&&!K){D(te=>te.some(Ae=>Ae.contour===N&&Ae.node===U)?te.filter(Ae=>!(Ae.contour===N&&Ae.node===U)):[...te,{contour:N,node:U}]);return}if(X==="anchor"&&!K&&w.length>1&&w.some(te=>te.contour===N&&te.node===U)){S.current={pointerId:f.pointerId,origin:le(f.clientX,f.clientY),startContours:zn(i),selection:w,moved:!1},(oe=v.current)==null||oe.setPointerCapture(f.pointerId);return}D([{contour:N,node:U}]),y.current={kind:X,contour:N,node:U,pointerId:f.pointerId,origin:le(f.clientX,f.clientY),clientOrigin:{x:f.clientX,y:f.clientY},anchor:me.p,center:L$(i),mirror:X!=="anchor"&&!!(me.in&&me.out),toggleOnRelease:K,moved:!1},(B=v.current)==null||B.setPointerCapture(f.pointerId)},ee=f=>{f.stopPropagation(),f.preventDefault(),re();const X=ln(i,T),N=wd(X,se(f.clientX,f.clientY));if(!N||N.distance>Us)return;const{contours:U,nodeIndex:me}=A$(i,N.contour,N.segment,N.t);me<0||(D([{contour:N.contour,node:me}]),p(U),k(U))},de=f=>{if(f.key==="="||f.key==="+"||f.key==="-"||f.key==="_"){f.preventDefault(),f.stopPropagation();const K=Si(i);if(!isFinite(K.minX)||!isFinite(K.maxX))return;const I={x:(K.minX+K.maxX)/2,y:(K.minY+K.maxY)/2},oe=f.key==="="||f.key==="+"?Rd:1/Rd,B=vd(i,I,oe);p(B),k(B,{preserveShape:!0});return}if(f.key==="Escape"){f.stopPropagation(),D([]),c("none");return}if(!w.length)return;if(f.key==="Backspace"||f.key==="Delete"){f.preventDefault(),f.stopPropagation();const K=E$(i,w);if(K===i)return;D([]),p(K),k(K);return}const X=o>0?o:K$,N=f.shiftKey?X*10:X,U={ArrowLeft:[-N,0],ArrowRight:[N,0],ArrowUp:[0,-N],ArrowDown:[0,N]}[f.key];if(!U)return;f.preventDefault(),f.stopPropagation();const me=bd(i,w,U[0],U[1]);p(me),k(me)},ne=s.useMemo(()=>No(ln(i,T)),[i,T]),Pe=s.useMemo(()=>Si(i),[i]),Te=T({x:Pe.minX,y:Pe.minY}),Oe={width:T({x:Pe.maxX,y:Pe.minY}).x-Te.x,height:T({x:Pe.minX,y:Pe.maxY}).y-Te.y},ve=$&&w.length===0&&isFinite(Pe.minX)&&isFinite(Pe.maxX)&&Pe.maxX>Pe.minX&&Pe.maxY>Pe.minY,Se=w.length>0||$,$e=Se;return a.jsxs("svg",{ref:v,className:`${e}-editor${Se?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:de,onPointerDown:()=>{var f;return(f=v.current)==null?void 0:f.focus({preventScroll:!0})},onPointerMove:ce,onPointerLeave:re,onPointerUp:J,onPointerCancel:J,onLostPointerCapture:J,onContextMenu:f=>{f.preventDefault()},"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{D([]),c("none")},onClick:ee}),$e&&a.jsx("path",{className:`${e}-editor-outline`,d:ne}),$e&&_.map((f,X)=>a.jsx("line",{className:`${e}-editor-snap ${e}-editor-snap-${f.kind}`,x1:f.a.x,y1:f.a.y,x2:f.b.x,y2:f.b.y},`${f.kind}-${X}`)),a.jsx("path",{ref:m,className:`${e}-editor-body`,d:ne,fillRule:"evenodd",onPointerDown:We,onClick:ee}),$e&&a.jsx("path",{className:`${e}-editor-hit`,d:ne,style:{strokeWidth:G$},onClick:ee}),$e&&H&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:H.point.x-Hn/2,y:H.point.y-Hn/2,width:Hn,height:Hn,rx:H.curved?Hn/2:0}),$e&&i.map((f,X)=>f.nodes.map((N,U)=>{const me=w.some(I=>I.contour===X&&I.node===U),K=T(N.p);return a.jsxs("g",{children:[me&&w.length===1&&["in","out"].map(I=>{const ie=N[I];if(!ie)return null;const oe=T(ie);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:K.x,y1:K.y,x2:oe.x,y2:oe.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:oe.x,cy:oe.y,r:q$}),a.jsx("circle",{className:`${e}-editor-grab`,cx:oe.x,cy:oe.y,r:ao,onPointerDown:B=>ue(B,I,X,U),onClick:be})]},I)}),a.jsx("rect",{className:`${e}-editor-anchor${me?` ${e}-editor-anchor-selected`:""}`,x:K.x-Hn/2,y:K.y-Hn/2,width:Hn,height:Hn,rx:lp(N)?Hn/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:K.x-ao,y:K.y-ao,width:ao*2,height:ao*2,onPointerDown:I=>ue(I,"anchor",X,U),onClick:be,onDoubleClick:I=>{I.stopPropagation(),I.preventDefault();const ie=Sd(i,X,U);p(ie),k(ie)}})]},`${X}-${U}`)})),ve&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:Te.x,y:Te.y,width:Oe.width,height:Oe.height}),["nw","ne","se","sw"].map(f=>{const X=T(Xs(Pe,f)),N=f==="ne"||f==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:X.x-Kr/2,y:X.y-Kr/2,width:Kr,height:Kr}),a.jsx("rect",{className:`${e}-editor-scale-grab${N?` ${e}-editor-scale-grab-nesw`:""}`,x:X.x-Ur/2,y:X.y-Ur/2,width:Ur,height:Ur,onPointerDown:U=>ye(U,f),onClick:be})]},f)})]})]})}const Z$=4e3,J$=/^(?:https?:|mailto:|tel:)/i;function fp(e){return!!e&&typeof e=="object"&&e.type==="link"}function Q$(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!J$.test(t)))return t}function eC(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,d)=>{for(const c of r){if(fp(c)){o(c.children??[],Q$(c.value),c.target);continue}const u=c,p=(u==null?void 0:u.text)??"";if(p.trim())for(const x of p.split(/\s+/))x&&t.push({text:x,leaf:u,href:l,target:d,para:i})}};o((n==null?void 0:n.children)??[])}),t}function Pd(e){return{...e.fontFamily&&{fontFamily:Oo(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}function tC(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(fp(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function Ed(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:d,height:c,allowOverflow:u,capInset:p,capLines:x}=e,v=e.lineHeight*l,m=e.spaceWidth*l,h=[];if(!t.length||d<=0||v<=0)return{segments:h,placed:0,height:0,capLeft:0,capTop:0};const y=Math.max(1,m*.5),b=v*r$;let C=0,S=0,w=0,D=t[0].para,_=0,z=0,H=null;for(;C<t.length&&w<Z$;){const L=S+v>c;if(L&&!u)break;const V=t[C].para;if(V>D+1){S+=v*(V-D-1),D=V-1,w+=1;continue}let $=L?[{x0:0,x1:d}]:m$(i,(S+b)/c,(S+v-b)/c,o).map(F=>({x0:F.x0*d,x1:F.x1*d}));p>0&&x>0&&!L&&$.length&&(H===null&&(H=w,_=$[0].x0,z=S),w-H<x&&($=p$($,{x0:_,x1:_+p})));const E=$.reduce((F,W)=>Math.max(F,W.x1-W.x0),0);for(const F of $){const W=F.x1-F.x0;if(W<y)continue;if(C>=t.length||t[C].para!==V)break;const g=C;let M=0;for(;C<t.length&&t[C].para===V;){const R=n[C]*l,G=C===g?R:m+R;if(M+G>W&&!(C===g&&W>=E-.5&&R>d-.5))break;M+=G,C+=1}if(C>g){const R=C>=t.length||t[C].para!==V;h.push({top:S,left:F.x0,width:W,from:g,to:C,justify:r==="justify"&&!R})}if(C>=t.length||t[C].para!==V)break}D=V,S+=v,w+=1}return{segments:h,placed:C,height:h.length?S:0,capLeft:_,capTop:z}}const nC=.12,iC=2,oC=10,vs=.25,rC=e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}},aC=(e,t)=>Math.abs(e.top-t.top)<.5&&Math.abs(e.left-t.left)<.5&&Math.abs(e.width-t.width)<.5&&Math.abs(e.height-t.height)<.5,sC=(e,t)=>{const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e||!t){i(null);return}let o=0,r=null;const l=()=>{const d=rC(e);(!r||!aC(r,d))&&(r=d,i(d)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n},xs=(e,t)=>{if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return e.map(r=>r.map(l=>({x:(i+l.x*n)/t.width,y:(o+l.y*n)/t.height})))},Yr=typeof window>"u"?s.useEffect:s.useLayoutEffect;function lC(){return typeof document>"u"?null:document.body}function cC({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:d,allowOverflow:c,fitEnabled:u,scale:p,onFitScale:x,dropCapLines:v,dropCapSize:m,showGuides:h,typography:y,imageUrl:b,imageFocalX:C,imageFocalY:S,imageScale:w,imageCustomPath:D,pathDragActive:_,pathCarryImage:z,onCarryImageConsumed:H,pathEditor:L,imageEditor:V}){var De,Xe;const $=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[E,F]=s.useState(null),W=s.useRef(null),[g,M]=s.useState({width:0,height:0}),[R,G]=s.useState(null),[Z,T]=s.useState(0),[j,Y]=s.useState("none");s.useEffect(()=>{!L&&!V&&Y("none")},[L,V]);const[le,se]=s.useState(null);s.useEffect(()=>{if(!b||typeof Image>"u"){se(null);return}let ge=!1;const Me=new Image;return Me.onload=()=>{ge||se({width:Me.naturalWidth,height:Me.naturalHeight})},Me.src=b,()=>{ge=!0}},[b]);const k=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),re=s.useMemo(()=>eC(k),[k]),q=s.useMemo(()=>tC(k),[k]),ce=v>0&&m>1?((Xe=(De=re[0])==null?void 0:De.text)==null?void 0:Xe.charAt(0))??"":"",J=(L==null?void 0:L.contours)??null,be=s.useMemo(()=>{let ge=[];if(J){const Me=yr(J);Me.length&&(ge=So(Me,r))}if(!ge.length){const Me=i.trim(),ze=Me?gd(Me,o,r):null;ze&&ze.length?ge=ze:ge=Os(n==="custom"?"rectangle":n)}return n==="circle"?xs(ge,g):ge},[J,n,i,o,r,g.width,g.height]),We=L==null?void 0:L.onConvert,ye=(L==null?void 0:L.needsConversion)??!1,ue=s.useMemo(()=>{if(n==="circle")return!1;const ge=J??(i.trim()?Li(i):null);return!!(ge&&pp(ge,r))},[J,i,r,n]),[ee,de]=s.useState(null);Yr(()=>{if(!ue){ee&&de(null);return}!ee&&g.width>0&&g.height>0&&de({width:g.width,height:g.height})},[ue,g.width,g.height,ee]);const ne=s.useMemo(()=>{if(!ue||g.width<=0||g.height<=0)return be;const ge=ee??g,Me=r.width/ge.width,ze=r.height/ge.height;return be.map(Re=>Re.map(xe=>({x:xe.x*Me,y:xe.y*ze})))},[be,ue,ee,r.width,r.height,g.width,g.height]),Pe=s.useMemo(()=>{if(J){const Re=yr(J);if(Re.length){const xe=So(Re,r);return n==="circle"?xs(xe,g):xe}}const ge=D.trim(),Me=ge?gd(ge,o,r):null,ze=Me&&Me.length?Me:Os(n==="custom"?"rectangle":n);return n==="circle"?xs(ze,g):ze},[J,n,D,o,r,g.width,g.height]),Te=s.useMemo(()=>{if(!ue||g.width<=0||g.height<=0)return Pe;const ge=ee??g,Me=r.width/ge.width,ze=r.height/ge.height;return Pe.map(Re=>Re.map(xe=>({x:xe.x*Me,y:xe.y*ze})))},[Pe,ue,ee,r.width,r.height,g.width,g.height]),Oe=s.useRef(null),ve=s.useRef(!1);s.useEffect(()=>{if(!(!We||g.width<=0||g.height<=0)){if(ue){if(Oe.current===i)return;const ge=J??(i.trim()?Li(i):null);if(!(ge!=null&&ge.length))return;const Me=ln(ge,ze=>({x:r.x+(ze.x-r.x)/g.width*r.width,y:r.y+(ze.y-r.y)/g.height*r.height}));Oe.current=No(Me),We(Me);return}!ye||!be.length||ve.current||(ve.current=!0,We(ln(up(be),ge=>({x:ge.x*ha,y:ge.y*ha}))))}},[ye,ue,We,be,J,i,r,g.width,g.height]),Yr(()=>{const ge=E;if(!ge||typeof ResizeObserver>"u")return;const Me=()=>{const Re=ge.getBoundingClientRect();M(xe=>Math.abs(xe.width-Re.width)<.5&&Math.abs(xe.height-Re.height)<.5?xe:{width:Re.width,height:Re.height})};Me();const ze=new ResizeObserver(Me);return ze.observe(ge),()=>ze.disconnect()},[E]),s.useEffect(()=>{const ge=typeof document<"u"?document.fonts:void 0;ge!=null&&ge.ready&&ge.ready.then(()=>{T(Me=>Me+1)})},[]),Yr(()=>{const ge=W.current;if(!ge)return;if(!re.length){G(null);return}const Me=[],ze=document.createDocumentFragment();for(const Qe of re){const dt=document.createElement("span");Object.assign(dt.style,Pd(Qe.leaf)),dt.textContent=Qe.text,ze.appendChild(dt),Me.push(dt)}const Re=document.createElement("span");Re.textContent=" ",ze.appendChild(Re);const xe=ce||"H",Ie=document.createElement("span");Ie.textContent=xe,Ie.style.lineHeight="1",ze.appendChild(Ie),ge.replaceChildren(ze);const Ke=window.getComputedStyle(ge),Ne=parseFloat(Ke.fontSize)||16,it=parseFloat(Ke.lineHeight),ot=Number.isNaN(it)?Ne*1.2:it,rt=Math.max(ot,Ne),ht=document.createElement("span");ht.textContent=xe,ht.style.lineHeight=`${rt}px`;const Pt=document.createElement("span");Pt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",ht.appendChild(Pt),ge.appendChild(ht);const Et=ht.getBoundingClientRect().top,ut=Pt.getBoundingClientRect().top,gt=Math.max(1,ut-Et);ht.remove();let $t=gt*.8;const ft=document.createElement("canvas").getContext("2d"),At=Qe=>`${Ke.fontStyle} ${Ke.fontWeight} ${Qe}px ${Ke.fontFamily}`;if(ft){ft.font=At(Ne);const Qe=ft.measureText(xe).actualBoundingBoxAscent;Qe>0&&($t=Qe)}const zt=m>1?(m-1)*rt+$t:$t;let jt=Ne*(zt/$t);if(ft){ft.font=At(jt);const Qe=ft.measureText(xe).actualBoundingBoxAscent;Qe>0&&(jt=jt*(zt/Qe))}Ie.style.fontSize=`${jt}px`,Ie.style.lineHeight=`${jt}px`;const Zt=document.createElement("span");Zt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",Ie.appendChild(Zt);const Ct=Math.max(1,Zt.getBoundingClientRect().top-Ie.getBoundingClientRect().top);Zt.remove();const rn=(m-1)*rt+gt-Ct,lt=Me.map(Qe=>Qe.getBoundingClientRect().width),Ee=Re.getBoundingClientRect().width,je=ce?Ie.getBoundingClientRect().width:0;ge.replaceChildren(),G({widths:lt,spaceWidth:Ee,lineHeight:rt,capWidth:je,dropCapFontSize:jt,dropCapTopAdjust:rn})},[re,y,ce,v,m,Z,g.width]);const Se=R&&ce?R.capWidth+R.lineHeight*nC:0,$e=Math.max(v,Math.ceil(m)),f=s.useMemo(()=>{if(!R||!re.length||g.width<=0||g.height<=0||!u)return 1;const ge=Re=>Ed({tokens:re,widths:R.widths,spaceWidth:R.spaceWidth,lineHeight:R.lineHeight,width:g.width,height:g.height,rings:ne,mode:l,align:d,scale:Re,allowOverflow:!1,capInset:Se*Re,capLines:ce?$e:0});if(ge(1).placed>=re.length)return 1;if(ge(vs).placed<re.length)return vs;let Me=vs,ze=1;for(let Re=0;Re<oC;Re+=1){const xe=(Me+ze)/2;ge(xe).placed>=re.length?Me=xe:ze=xe}return Me},[R,re,g.width,g.height,ne,l,d,u,Se,ce,$e]);s.useEffect(()=>{x(f)},[f,x]);const X=u?Math.min(p,f):1,N=s.useMemo(()=>!R||!re.length||g.width<=0||g.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0}:Ed({tokens:re,widths:R.widths,spaceWidth:R.spaceWidth,lineHeight:R.lineHeight,width:g.width,height:g.height,rings:ne,mode:l,align:d,scale:X,allowOverflow:c,capInset:Se*X,capLines:ce?$e:0}),[R,re,g.width,g.height,ne,l,d,X,c,Se,ce,$e]),U=R?R.dropCapFontSize*X:0,me=R?R.dropCapTopAdjust*X:0,K=d==="justify"?"left":d,I=!!(L&&J&&g.width>0&&g.height>0),ie=!!V,oe=(I||ie)&&g.width>0&&g.height>0,B=sC(E,oe),te=oe&&B?lC():null,Ae=s.useRef(!1),he=s.useCallback(ge=>{Ae.current=ge},[]);s.useEffect(()=>{if(!I&&!ie)return;const ge=Me=>{const ze=E;if(!ze)return;const Re=ze.getBoundingClientRect();Me.clientX>=Re.left&&Me.clientX<=Re.right&&Me.clientY>=Re.top&&Me.clientY<=Re.bottom&&(Me.preventDefault(),Me.stopPropagation(),Y(Ie=>Ie==="shape"&&Ae.current?Ie:Ie==="shape"&&ie?"image":I?"shape":"image"))};return document.addEventListener("dblclick",ge,!0),()=>document.removeEventListener("dblclick",ge,!0)},[I,ie,E]);const Q=s.useMemo(()=>b&&g.width>0&&g.height>0?a$(Te,g):null,[b,Te,g.width,g.height]),Ze=s.useRef(null),Fe=(()=>{const ge=Ze.current;return z||!V||!le||!Q||!ge||D===ge.customPath||ge.shape!==n&&n!=="custom"?null:j$(ge.bounds,Q,le,ge.focalX,ge.focalY,ge.scale)})();Yr(()=>{if(_||!V||!le||!Q)return;const ge=Ze.current,Me=!!(ge&&D!==ge.customPath);Me&&Fe&&V.onCommit(Fe),Me&&z&&(H==null||H()),Ze.current={rings:Te,bounds:Q,focalX:(Fe==null?void 0:Fe.focalX)??C,focalY:(Fe==null?void 0:Fe.focalY)??S,scale:(Fe==null?void 0:Fe.scale)??w,customPath:D,shape:n}},[_,z,D,n,Te,Q,V,le,C,S,w,Fe,H]);const et=Ze.current,Ue=!!(_&&!z&&et&&!Fe),nt=Ue&&et?et.focalX:(Fe==null?void 0:Fe.focalX)??C,tt=Ue&&et?et.focalY:(Fe==null?void 0:Fe.focalY)??S,Ve=Ue&&et?et.scale:(Fe==null?void 0:Fe.scale)??w,fe=Ue&&et?et.bounds:Q,He=s.useMemo(()=>{if(!(g.width>0)||!(g.height>0))return"";let ge=fd(i,J,o,r,n,g);if(ue){const Me=ee??g,ze=r.width/Me.width,Re=r.height/Me.height;ge=ln(ge,xe=>({x:xe.x*ze,y:xe.y*Re}))}return yd(ge,g)||md(ne,g)},[i,J,o,r,n,g.width,g.height,ue,ee,ne]),Be=s.useMemo(()=>{if(!b||!(g.width>0)||!(g.height>0))return"";let ge=fd(D,J,o,r,n,g);if(ue){const Me=ee??g,ze=r.width/Me.width,Re=r.height/Me.height;ge=ln(ge,xe=>({x:xe.x*ze,y:xe.y*Re}))}return yd(ge,g)||md(Te,g)},[b,D,J,o,r,n,g.width,g.height,ue,ee,Te]),Je=`${$}-clip`,Ce=s.useMemo(()=>{if(!fe)return null;const ge=le??{width:fe.width,height:fe.height},Me=Gi(fe,ge,Ve);return{x:Dn(fe.width,Me.width,nt),y:Dn(fe.height,Me.height,tt),width:Me.width,height:Me.height}},[fe,le,nt,tt,Ve]);return a.jsxs("div",{className:`${e}-column`,ref:F,children:[He?a.jsxs("svg",{className:`${e}-shape-fill`,viewBox:`0 0 ${g.width} ${g.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:He,fillRule:"evenodd"}),b&&Be&&fe&&Ce?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:Je,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:Be,fillRule:"evenodd"})})}),a.jsx("image",{href:b,x:fe.x+Ce.x,y:fe.y+Ce.y,width:Ce.width,height:Ce.height,preserveAspectRatio:"none",clipPath:`url(#${Je})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${c?"":` ${e}-clip`}`,style:{...y,["--"+e+"-fit"]:X},children:[a.jsx("div",{className:`${e}-measure`,ref:W,style:y,"aria-hidden":!0}),N.segments.map((ge,Me)=>{const ze=re.slice(ge.from,ge.to),Re=Me===0;return a.jsx("div",{className:`${e}-line${ge.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${ge.top}px`,left:`${ge.left}px`,width:`${ge.width}px`,textAlign:ge.justify?void 0:K},children:ze.map((xe,Ie)=>{const Ne=ce&&Re&&ge.from===0&&Ie===0?xe.text.slice(1):xe.text,it=Pd(xe.leaf),ot=xe.href?a.jsx("a",{className:`${e}-link`,href:xe.href,target:xe.target,rel:xe.target?"noopener noreferrer":void 0,style:it,children:Ne}):a.jsx("span",{style:it,children:Ne});return a.jsxs("span",{children:[!ge.justify&&Ie>0?" ":null,ot]},Ie)})},`${ge.from}-${ge.to}-${Me}`)}),h&&!J&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:ne.map((ge,Me)=>a.jsx("polygon",{points:ge.map(ze=>`${ze.x},${ze.y}`).join(" ")},Me))})]}),ce&&R&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...y,top:`${N.capTop+me}px`,left:`${N.capLeft}px`,fontSize:`${U}px`,lineHeight:`${U}px`},children:ce}),te&&B&&(J&&L||V)&&ri.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:B.top,left:B.left,width:B.width,height:B.height,zIndex:iC,pointerEvents:"none"},children:[J&&L&&a.jsx(Y$,{P:e,box:{width:B.width,height:B.height},viewBox:r,contours:J,snap:L.snap,stretchToBox:!ue,uniformStretch:n==="circle",stage:j,onStageChange:Y,onSelectionChange:he,onChange:L.onChange,onCommit:L.onCommit}),V&&fe&&a.jsx(V$,{P:e,box:{width:B.width,height:B.height},bounds:fe,natural:le,imageUrl:b,maskPath:Be,stage:j,onStageChange:Y,focalX:nt,focalY:tt,scale:Ve,onChange:V.onChange,onCommit:V.onCommit})]}),te),a.jsx("div",{className:`${e}-a11y`,children:q.map((ge,Me)=>a.jsx("p",{children:ge},Me))})]})}const yp=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],dC={x:0,y:0,width:100,height:100},uC=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?dC:{x:t[0],y:t[1],width:t[2],height:t[3]}},pC=e=>`
26508
+ `;function Zo(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Di={fontSettings:{type:"object",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0},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 mi(e,t){return e?`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`:t}function kl(e){return{[mi(e,"fontFamily")]:{type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},[mi(e,"fontSettings")]:{...Di.fontSettings,scope:"common",title:""},[mi(e,"fontSize")]:{...Di.fontSize,scope:"layout",title:""},[mi(e,"lineHeight")]:{...Di.lineHeight,scope:"layout",title:""},[mi(e,"letterSpacing")]:{...Di.letterSpacing,scope:"layout",title:""},[mi(e,"wordSpacing")]:{...Di.wordSpacing,scope:"layout",title:""},[mi(e,"textAlign")]:{...Di.textAlign,scope:"layout",title:""},[mi(e,"textAppearance")]:{...Di.textAppearance,scope:"layout",title:""}}}const e$=kl(""),t$=kl("open"),n$=kl("compact"),i$=["__componentName__",{type:"row",items:["panelHeight","navTextWidth"]},{type:"row",title:"Logo",items:["logoMaxHeight","logoPosition"]},{type:"row",title:"Hamburger",items:["showIcon","iconSize"]},"fontFamily","fontSettings",{type:"row",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAlign","textAppearance","navGap","navPaddingLeft","navPaddingRight"],o$=["__componentName__",{type:"row",items:["compactPanelHeight","compactNavTextWidth"]},{type:"row",title:"Logo",items:["compactLogoMaxHeight","compactLogoPosition"]},{type:"row",title:"Hamburger",items:["compactShowIcon","compactIconSize"]},"compactFontFamily","compactFontSettings",{type:"row",items:["compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing"]},"compactTextAlign","compactTextAppearance","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight"],r$=["__componentName__",{type:"row",items:["textWidth","effect"]},"position","openFontFamily","openFontSettings",{type:"row",items:["openFontSize","openLineHeight","openLetterSpacing","openWordSpacing"]},"openTextAlign","openTextAppearance"],Kn={textTransform:"none",textDecoration:"none",fontVariant:"normal"},hs={fontWeight:400,fontStyle:"normal"},Vr={d:"Always",t:"Open Only",m:"Open Only"},a$=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],s$=["iconColor","logoColor","closeButtonColor","linkColor","backgroundColor"],l$={type:"object",version:1,settings:{sizing:"auto manual",properties:{link:{type:"array",scope:"common",display:{type:"page-url-link"},items:{type:"object",properties:{link:{type:"object",properties:{type:{type:"string",enum:["url","page","anchor"]},value:{type:"string",message:"Paste URL here..."},target:{type:"string",enum:["blank","self"]},anchor:{type:"string"}}},label:{type:"string"},showIn:{type:"string",scope:"layout",enum:["Always","Open Only","Open and Compact","Default and Open","Default and Compact"]}}}},logo:{type:"object",scope:"common",title:"Logo",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Logo",display:{type:"settings-image-input"}}}},logoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},logoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactLogoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},logoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{default:"Logo Default",hover:"Logo Hover"},display:{type:"palette-color-picker"}},panelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover"},display:{type:"palette-color-picker"}},showIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},iconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},linkColor:{type:"string",scope:"common",title:"Link Default",titleByState:{default:"Link Default",hover:"Link Hover"},display:{type:"palette-color-picker"}},compactShowIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},compactIconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{compact:"Icon Default","compact-hover":"Icon Hover"},display:{type:"palette-color-picker"}},compactCloseButtonColor:{type:"string",scope:"common",title:"Close Default",titleByState:{compact:"Close Default","compact-hover":"Close Hover"},display:{type:"palette-color-picker"}},compactLinkColor:{type:"string",scope:"common",title:"Link Default",titleByState:{compact:"Link Default","compact-hover":"Link Hover"},display:{type:"palette-color-picker"}},compactLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{compact:"Logo Default","compact-hover":"Logo Hover"},display:{type:"palette-color-picker"}},compactBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},openLinkColor:{type:"string",scope:"common",title:"Link Default",titleByState:{open:"Link Default","open-hover":"Link Hover"},display:{type:"palette-color-picker"}},openLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{open:"Logo Default","open-hover":"Logo Hover"},display:{type:"palette-color-picker"}},menuBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},overlayColor:{type:"string",scope:"common",title:"Overlay Default",display:{type:"palette-color-picker"}},closeButtonColor:{type:"string",scope:"common",title:"Close Default",titleByState:{default:"Close Default",hover:"Close Hover",open:"Close Default","open-hover":"Close Hover"},display:{type:"palette-color-picker"}},effect:{type:"string",scope:"layout",title:"Effect",display:{type:"toggle-cycle",enum:["fade","left","top","right","bottom"]}},textWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},navTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:[...a$]}},stateOverrides:{type:"object",scope:"common"},gap:Zo("Gap"),navGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},textPaddingLeft:Zo("Text padding left"),textPaddingRight:Zo("Text padding right"),textPaddingTop:Zo("Text padding top"),textPaddingBottom:Zo("Text padding bottom"),compactLogoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},compactPanelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},compactIconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},compactNavTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},compactNavGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},...e$,...t$,...n$},defaults:{link:[{link:{type:"page",value:"",target:"self"},label:"Home",showIn:Vr},{link:{type:"page",value:"",target:"self"},label:"Works",showIn:Vr},{link:{type:"page",value:"",target:"self"},label:"About",showIn:Vr},{link:{type:"page",value:"",target:"self"},label:"Contact",showIn:Vr}],logo:{mode:"On",icon:"https://cdn.cntrl.site/component-assets/hamburger-logo.svg"},backgroundColor:"#ffffff",logoColor:"#000000",iconColor:"#000000",linkColor:"#000000",openLinkColor:"#000000",compactIconColor:"#000000",compactCloseButtonColor:"#000000",compactLinkColor:"#000000",compactLogoColor:"#000000",compactBackgroundColor:"#ffffff",openLogoColor:"#000000",menuBackgroundColor:"#ffffff",overlayColor:"rgba(0, 0, 0, 0.45)",closeButtonColor:"#000000",effect:"fade",showIcon:"on",compactShowIcon:"on",logoPosition:"left",compactLogoPosition:"left",position:"left-top",fontFamily:"Goudy Bookletter 1911",fontSettings:hs,textAlign:"left",openFontFamily:"Goudy Bookletter 1911",openFontSettings:hs,openTextAlign:"left",compactFontFamily:"Goudy Bookletter 1911",compactFontSettings:hs,compactTextAlign:"left",stateOverrides:{hover:{linkColor:"#666666",iconColor:"#666666",logoColor:"#666666",closeButtonColor:"#666666"}}},displayRules:[{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.openLogoColor.display.visible",value:!1}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconSize.display.visible",value:!1}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconSize.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconColor.display.visible",value:!1}}],layoutDefaults:{m:{position:"center",panelHeight:50/375,logoMaxHeight:30/375,logoPosition:"center",compactLogoPosition:"left",showIcon:"on",iconSize:30/375,textWidth:240/375,navTextWidth:120/375,gap:24/375,navGap:24/375,navPaddingLeft:20/375,navPaddingRight:20/375,textPaddingLeft:10/375,textPaddingRight:10/375,textPaddingTop:10/375,textPaddingBottom:10/375,fontSize:16/375,lineHeight:20/375,letterSpacing:0,wordSpacing:0,textAppearance:Kn,openFontSize:34/375,openLineHeight:20/375,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Kn,openTextAlign:"center",compactPanelHeight:40/375,compactLogoMaxHeight:20/375,compactShowIcon:"on",compactIconSize:16/375,compactNavTextWidth:80/375,compactNavGap:24/375,compactNavPaddingLeft:20/375,compactNavPaddingRight:20/375,compactFontSize:16/375,compactLineHeight:20/375,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:Kn},t:{textAlign:"center",position:"center",panelHeight:60/768,logoMaxHeight:30/768,logoPosition:"left",compactLogoPosition:"left",showIcon:"on",iconSize:16/768,textWidth:300/768,navTextWidth:90/768,gap:32/768,navGap:32/768,navPaddingLeft:20/768,navPaddingRight:20/768,textPaddingLeft:10/768,textPaddingRight:10/768,textPaddingTop:10/768,textPaddingBottom:10/768,fontSize:18/768,lineHeight:20/768,letterSpacing:0,wordSpacing:0,textAppearance:Kn,openFontSize:75/768,openLineHeight:20/768,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Kn,openTextAlign:"center",compactTextAlign:"center",compactPanelHeight:40/768,compactLogoMaxHeight:20/768,compactShowIcon:"on",compactIconSize:16/768,compactNavTextWidth:80/768,compactNavGap:32/768,compactNavPaddingLeft:20/768,compactNavPaddingRight:20/768,compactFontSize:16/768,compactLineHeight:20/768,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:Kn},d:{position:"center",panelHeight:50/1440,logoMaxHeight:30/1440,logoPosition:"left",compactLogoPosition:"left",showIcon:"on",iconSize:20/1440,textWidth:300/1440,navTextWidth:60/1440,gap:12/1440,navGap:64/1440,navPaddingLeft:10/1440,navPaddingRight:10/1440,textPaddingLeft:10/1440,textPaddingRight:10/1440,textPaddingTop:10/1440,textPaddingBottom:10/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:Kn,textAlign:"center",openFontSize:90/1440,openLineHeight:16/1440,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Kn,openTextAlign:"center",compactPanelHeight:30/1440,compactLogoMaxHeight:20/1440,compactShowIcon:"on",compactIconSize:20/1440,compactNavTextWidth:60/1440,compactNavGap:20/1440,compactNavPaddingLeft:10/1440,compactNavPaddingRight:10/1440,compactFontSize:16/1440,compactLineHeight:16/1440,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:Kn,compactTextAlign:"center"}},layout:["__componentName__","link","logo","logoMaxHeight","logoPosition","panelHeight","backgroundColor","logoColor","iconColor","showIcon","iconSize","linkColor","openLinkColor","compactShowIcon","compactIconColor","compactCloseButtonColor","compactLinkColor","compactLogoColor","compactBackgroundColor","compactLogoMaxHeight","compactLogoPosition","compactPanelHeight","compactIconSize","compactNavTextWidth","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight","compactFontFamily","compactFontSettings","compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing","compactTextAlign","compactTextAppearance","openLogoColor","menuBackgroundColor","overlayColor","closeButtonColor","effect","textWidth","navTextWidth","position","gap","navGap","navPaddingLeft","navPaddingRight","textPaddingLeft","textPaddingRight","textPaddingTop","textPaddingBottom","fontFamily","fontSettings","fontSize","lineHeight","letterSpacing","wordSpacing","textAlign","textAppearance","openFontFamily","openFontSettings","openFontSize","openLineHeight","openLetterSpacing","openWordSpacing","openTextAlign","openTextAppearance"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","logo"]},{id:"default",icon:"default",title:"Default",tooltip:"Default State",layout:i$},{id:"compact",icon:"compact",title:"Compact",tooltip:"Compact State",layout:o$,availableWhen:{navigationPosition:["switch"]}},{id:"open",icon:"open",title:"Open",tooltip:"Open State",layout:r$},{id:"links",icon:"content",title:"Links",tooltip:"Link Settings",layout:["__componentName__","link"]}],paletteBookmark:{items:[...s$],panelIds:["default","compact","open"],stateItems:{default:["iconColor","logoColor","closeButtonColor","linkColor","backgroundColor"],hover:["iconColor","logoColor","closeButtonColor","linkColor"],compact:["compactIconColor","compactLogoColor","compactCloseButtonColor","compactLinkColor","compactBackgroundColor"],"compact-hover":["compactIconColor","compactLogoColor","compactCloseButtonColor","compactLinkColor"],open:["closeButtonColor","openLogoColor","openLinkColor","menuBackgroundColor","overlayColor"],"open-hover":["closeButtonColor","openLogoColor","openLinkColor"]}},states:["default","hover"],statePanels:["default","compact","open"]},c$={element:Jw,id:"basic-burger",name:"Basic Burger",category:"navigation",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple Burger.png"},layoutMode:"navigation",defaultSize:{d:{width:"100%",height:60/1440},t:{width:"100%",height:60/768},m:{width:"100%",height:56/375}},defaultNavigationPosition:{d:"switch",t:"switch",m:"stickyTop"},schema:l$,sourceCode:Qw,assetsPaths:{content:[],parameters:[{path:"logo.icon",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"},{path:"openFontFamily"},{path:"compactFontFamily"}]},fontRelations:{fontSettings:"fontFamily",openFontSettings:"openFontFamily",compactFontSettings:"compactFontFamily"}},md=120,gd=3,d$=.12,El={x:0,y:0,width:100,height:100};function So(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}function ha(e){return e<0?0:e>1?1:e}function hd(e,t){return e.filter(n=>n.length>0).map(n=>`M ${n.map(i=>`${i.x*t.width} ${i.y*t.height}`).join(" L ")} Z`).join(" ")}function u$(e,t){let n=1/0,i=1/0,o=-1/0,r=-1/0;for(const c of e)for(const u of c){const p=u.x*t.width,x=u.y*t.height;p<n&&(n=p),p>o&&(o=p),x<i&&(i=x),x>r&&(r=x)}const l=o-n,d=r-i;return!isFinite(l)||!isFinite(d)||l<=0||d<=0?null:{x:n,y:i,width:l,height:d}}function p$(e){return e.map(([t,n])=>({x:t,y:n}))}function fs(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const d of e)for(const c of d)c.x<t&&(t=c.x),c.x>i&&(i=c.x),c.y<n&&(n=c.y),c.y>o&&(o=c.y);const r=i-t,l=o-n;return!isFinite(r)||!isFinite(l)||r<=0||l<=0?e:e.map(d=>d.map(c=>({x:(c.x-t)/r,y:(c.y-n)/l})))}function m$(e,t){const n=[];for(const o of e)for(let r=0;r<o.length;r+=1){const l=o[r],d=o[(r+1)%o.length];(l.y<=t&&d.y>t||d.y<=t&&l.y>t)&&n.push(l.x+(t-l.y)/(d.y-l.y)*(d.x-l.x))}n.sort((o,r)=>o-r);const i=[];for(let o=0;o+1<n.length;o+=2){const r=ha(n[o]),l=ha(n[o+1]);l>r&&i.push({x0:r,x1:l})}return g$(i)}function g$(e){if(e.length<2)return e;const t=[...e].sort((i,o)=>i.x0-o.x0),n=[t[0]];for(let i=1;i<t.length;i+=1){const o=n[n.length-1],r=t[i];r.x0<=o.x1?o.x1=Math.max(o.x1,r.x1):n.push({...r})}return n}function h$(e,t){const n=[];let i=0,o=0;for(;i<e.length&&o<t.length;){const r=Math.max(e[i].x0,t[o].x0),l=Math.min(e[i].x1,t[o].x1);l>r&&n.push({x0:r,x1:l}),e[i].x1<t[o].x1?i+=1:o+=1}return n}function f$(e){const t=[];let n=0;for(const i of e)i.x0>n&&t.push({x0:n,x1:i.x0}),n=Math.max(n,i.x1);return n<1&&t.push({x0:n,x1:1}),t}function y$(e,t){const n=[];for(const i of e){if(t.x1<=i.x0||t.x0>=i.x1){n.push(i);continue}t.x0>i.x0&&n.push({x0:i.x0,x1:t.x0}),t.x1<i.x1&&n.push({x0:t.x1,x1:i.x1})}return n}function v$(e,t,n,i){let o=null;for(let r=0;r<gd;r+=1){const l=ha(t+(n-t)*r/Math.max(1,gd-1)),d=m$(e,l),c=i==="avoid"?f$(d):d;if(o=o===null?c:h$(o,c),o.length===0)return[]}return o??[]}function fd(e,t="stretch",n=El){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=Li(i),d=yr(l);if(d.length)return t==="viewbox"?So(d,n):fs(d);if(typeof document>"u")return null;const c=i.split(/(?=[Mm])/).map(x=>x.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const x of c){const y=document.createElementNS("http://www.w3.org/2000/svg","path");y.setAttribute("d",x),u.appendChild(y);let m=0;try{m=y.getTotalLength()}catch{m=0}if(!m)continue;const h=[];for(let v=0;v<md;v+=1){const b=y.getPointAtLength(v/md*m);h.push({x:b.x,y:b.y})}p.push(h)}return p.length?t==="viewbox"?So(p,n):fs(p):null}const o=i.split(/[\s,]+/).map(Number).filter(l=>!Number.isNaN(l));if(o.length<6)return null;const r=[];for(let l=0;l+1<o.length;l+=2)r.push({x:o[l],y:o[l+1]});return t==="viewbox"?So([r],n):fs([r])}const Ml={bobbin:"M57.63,0 L57.63,37.24 L74.66,37.24 L74.66,56.07 L57.63,100 L33.84,100 L16.81,56.07 L16.81,37.24 L33.84,37.24 L33.84,0 Z",circle:"M50,0 C77.61,0 100,22.39 100,50 C100,77.61 77.61,100 50,100 C22.39,100 0,77.61 0,50 C0,22.39 22.39,0 50,0 Z",shield:"M0,0 L100,0 L100,50 L50,100 L0,50 Z",vase:"M25.37,0 L91.55,0 C91.55,0 74.8,25.14 83.07,50.03 C91.34,74.92 74.61,100 74.61,100 L8.43,100 C8.43,100 32.3,75.08 23.9,50 C15.5,24.92 25.37,0 25.37,0 Z",parallelogram:"M25.37,0 L91.55,0 L74.61,100 L8.43,100 Z",diamond:"M50,0 L80,50 L50,100 L20,50 Z"},Hs="0 0 100 100",fa=100,Os=16,x$=12,b$=16,ys=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,S$=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,yd=Math.PI/4,w$=8,$$=Math.PI/18,C$=8,go=24,ho=[];function T$(){return[{closed:!0,nodes:[{p:{x:0,y:0},in:null,out:null},{p:{x:1,y:0},in:null,out:null},{p:{x:1,y:1},in:null,out:null},{p:{x:0,y:1},in:null,out:null}]}]}function vs(e,t){return ln(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function L$(e){const t=Si(e),n=t.maxX-t.minX,i=t.maxY-t.minY;return!isFinite(n)||!isFinite(i)||n<=0||i<=0?e:ln(e,o=>({x:(o.x-t.minX)/n,y:(o.y-t.minY)/i}))}function I$(e,t){if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return ln(e,r=>({x:(i+r.x*n)/t.width,y:(o+r.y*n)/t.height}))}function vd(e,t,n,i,o,r){let l=[];if(t&&t.length)l=vs(t,i);else{const d=e.trim();if(d&&/^[Mm]/.test(d)){const c=Li(d);c.length&&(l=n==="viewbox"?vs(c,i):L$(c))}if(!l.length){const c=o!=="custom"?Ml[o]:void 0;c?l=vs(Li(c),El):l=T$()}}return o==="circle"?I$(l,r):l}function xd(e,t){return!(t.width>0)||!(t.height>0)||!e.length?"":No(ln(e,n=>({x:n.x*t.width,y:n.y*t.height})))}function Ds(e){const t=e==="rectangle"||e==="custom"?void 0:Ml[e];return t?So(yr(Li(t)),El):[p$([[0,0],[1,0],[1,1],[0,1]])]}function R$(e){const t=e.match(S$);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function $n(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function zs(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function cn(e){return{x:e.x,y:e.y}}function P$(e){return{p:cn(e.p),in:e.in?cn(e.in):null,out:e.out?cn(e.out):null}}function zn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(P$)}))}function ln(e,t){return e.map(n=>({closed:n.closed,nodes:n.nodes.map(i=>({p:t(i.p),in:i.in?t(i.in):null,out:i.out?t(i.out):null}))}))}function bd(e,t,n,i=n){return ln(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function k$(e,t,n,i,o,r,l){let d=Math.abs(t),c=Math.abs(n);if(!d||!c||e.x===l.x&&e.y===l.y)return[{c1:cn(e),c2:cn(l),p:cn(l)}];const u=i*Math.PI/180,p=Math.cos(u),x=Math.sin(u),y=(e.x-l.x)/2,m=(e.y-l.y)/2,h=p*y+x*m,v=-x*y+p*m,b=h*h/(d*d)+v*v/(c*c);if(b>1){const Z=Math.sqrt(b);d*=Z,c*=Z}const C=o===r?-1:1,S=d*d*v*v+c*c*h*h,w=Math.max(0,d*d*c*c-S),D=S===0?0:C*Math.sqrt(w/S),_=D*d*v/c,z=-D*c*h/d,H=p*_-x*z+(e.x+l.x)/2,L=x*_+p*z+(e.y+l.y)/2,V=Math.atan2((v-z)/c,(h-_)/d);let k=Math.atan2((-v-z)/c,(-h-_)/d)-V;!r&&k>0&&(k-=Math.PI*2),r&&k<0&&(k+=Math.PI*2);const F=Math.max(1,Math.ceil(Math.abs(k)/(Math.PI/2))),W=k/F,g=4/3*Math.tan(W/4),E=(Z,T)=>({x:H+p*d*Z-x*c*T,y:L+x*d*Z+p*c*T}),R=[];let G=V;for(let Z=0;Z<F;Z+=1){const T=G+W,j=Math.cos(G),K=Math.sin(G),le=Math.cos(T),se=Math.sin(T);R.push({c1:E(j-g*K,K+g*j),c2:E(le+g*se,se-g*le),p:Z===F-1?cn(l):E(le,se)}),G=T}return R}function Li(e){const t=(e??"").trim();if(!t)return[];const n=[];let i=[],o=!1,r={x:0,y:0},l={x:0,y:0},d=null,c=null;const u=()=>{if(o&&i.length>2){const m=i[0],h=i[i.length-1];Math.abs(m.p.x-h.p.x)<1e-6&&Math.abs(m.p.y-h.p.y)<1e-6&&(m.in=h.in??m.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(m,h)=>{i.push({p:m,in:Vn(h??null,m),out:null}),r=m},x=m=>{if(!i.length)return;const h=i[i.length-1];h.out=Vn(m,h.p)};ys.lastIndex=0;let y=ys.exec(t);for(;y!==null;){const m=y[1],h=m.toUpperCase(),v=m!==h,b=R$(y[2]),C=S=>v?{x:r.x+b[S],y:r.y+b[S+1]}:{x:b[S],y:b[S+1]};if(h==="Z")o=!0,u(),r=cn(l),d=null,c=null;else if(h==="M"){for(let S=0;S+1<b.length;S+=2){const w=C(S);S===0&&(u(),l=cn(w)),p(w)}d=null,c=null}else if(h==="L"){for(let S=0;S+1<b.length;S+=2)p(C(S));d=null,c=null}else if(h==="H"){for(const S of b)p({x:v?r.x+S:S,y:r.y});d=null,c=null}else if(h==="V"){for(const S of b)p({x:r.x,y:v?r.y+S:S});d=null,c=null}else if(h==="C"){for(let S=0;S+5<b.length;S+=6){const w=C(S),D=C(S+2),_=C(S+4);x(w),p(_,D),d=D}c=null}else if(h==="S"){for(let S=0;S+3<b.length;S+=4){const w=d?zs(d,r):cn(r),D=C(S),_=C(S+2);x(w),p(_,D),d=D}c=null}else if(h==="Q")for(let S=0;S+3<b.length;S+=4){const w=C(S),D=C(S+2);x($n(r,w,2/3)),p(D,$n(D,w,2/3)),c=w,d=null}else if(h==="T")for(let S=0;S+1<b.length;S+=2){const w=c?zs(c,r):cn(r),D=C(S);x($n(r,w,2/3)),p(D,$n(D,w,2/3)),c=w,d=null}else if(h==="A")for(let S=0;S+6<b.length;S+=7){const w=v?{x:r.x+b[S+5],y:r.y+b[S+6]}:{x:b[S+5],y:b[S+6]};for(const D of k$(r,b[S],b[S+1],b[S+2],b[S+3]!==0,b[S+4]!==0,w))x(D.c1),p(D.p,D.c2);d=null,c=null}y=ys.exec(t)}return u(),n}function On(e){return`${Number(e.toFixed(2))}`}function Vn(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function pp(e){return!!(Vn(e.in,e.p)||Vn(e.out,e.p))}function Bo(e,t){return!Vn(e.out,e.p)&&!Vn(t.in,t.p)}function Sd(e,t){if(Bo(e,t))return`L${On(t.p.x)},${On(t.p.y)}`;const n=Vn(e.out,e.p)??e.p,i=Vn(t.in,t.p)??t.p;return`C${On(n.x)},${On(n.y)} ${On(i.x)},${On(i.y)} ${On(t.p.x)},${On(t.p.y)}`}function No(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${On(i.p.x)},${On(i.p.y)}`);let r=i;for(const l of o)t.push(Sd(r,l)),r=l;if(n.closed){const l=Sd(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function mp(e){const t=[];for(let n=0;n+1<e.nodes.length;n+=1)t.push({from:e.nodes[n],to:e.nodes[n+1],index:n});if(e.closed&&e.nodes.length>2){const n=e.nodes.length-1;t.push({from:e.nodes[n],to:e.nodes[0],index:n})}return t}function Bs(e,t,n){if(Bo(e,t))return $n(e.p,t.p,n);const i=e.out??e.p,o=t.in??t.p,r=1-n,l=r*r*r,d=3*r*r*n,c=3*r*n*n,u=n*n*n;return{x:l*e.p.x+d*i.x+c*o.x+u*t.p.x,y:l*e.p.y+d*i.y+c*o.y+u*t.p.y}}function yr(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of mp(n)){if(Bo(o.from,o.to)){i.push(cn(o.from.p));continue}for(let r=0;r<Os;r+=1)i.push(Bs(o.from,o.to,r/Os))}n.closed||i.push(cn(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function Si(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of yr(e))for(const l of r)l.x<t&&(t=l.x),l.x>i&&(i=l.x),l.y<n&&(n=l.y),l.y>o&&(o=l.y);return{minX:t,minY:n,maxX:i,maxY:o}}function E$(e){const t=Si(e);return!isFinite(t.minX)||!isFinite(t.maxX)||!isFinite(t.minY)||!isFinite(t.maxY)?null:{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}}function gp(e,t,n){const i={x:(n.x-e.x)/6,y:(n.y-e.y)/6};return{in:{x:t.x-i.x,y:t.y-i.y},out:{x:t.x+i.x,y:t.y+i.y}}}function hp(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=x$)return{closed:!0,nodes:t.map(r=>({p:cn(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/b$)),i=[];for(let r=0;r<t.length;r+=n)i.push(t[r]);const o=i.length;return{closed:!0,nodes:i.map((r,l)=>({p:cn(r),...gp(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function fp(e,t,n=1){if(!e.length)return!1;const i=Si(e);if(!isFinite(i.minX)||!isFinite(i.maxX))return!1;const o=i.maxX-i.minX,r=i.maxY-i.minY;if(o<=t.width*2.5&&r<=t.height*2.5)return!1;const l=Math.max(n,t.width*.5),d=Math.max(n,t.height*.5);return i.minX<t.x-l||i.minY<t.y-d||i.maxX>t.x+t.width+l||i.maxY>t.y+t.height+d}function M$(e,t,n,i,o,r,l){const d=t.width>0?n.width/t.width:1,c=t.height>0?n.height/t.height:1;return!(r>0)||!(l>0)||!(d>0)||!(c>0)?e:ln(e,u=>{const p=i+(u.x-t.x)*r,x=o+(u.y-t.y)*l;return{x:t.x+p/d,y:t.y+x/c}})}function A$(e,t){if(!e.length)return e;const n=Si(e),i=n.maxX-n.minX,o=n.maxY-n.minY;if(!(i>0)||!(o>0)||n.minX>=t.x-1e-6&&n.minY>=t.y-1e-6&&n.maxX<=t.x+t.width+1e-6&&n.maxY<=t.y+t.height+1e-6)return e;const l=Math.min(t.width/i,t.height/o),d=t.x+(t.width-i*l)/2,c=t.y+(t.height-o*l)/2;return ln(e,u=>({x:d+(u.x-n.minX)*l,y:c+(u.y-n.minY)*l}))}function yp(e){const t={x:0,y:0,width:fa,height:fa},n=e!=="custom"?Ml[e]:void 0,i=n?ln(Li(n),r=>({x:r.x/100*t.width+t.x,y:r.y/100*t.height+t.y})):ln(hp(Ds("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=A$(i,t);return{shape:e,customPath:No(o),pathFit:"viewbox",pathViewBox:Hs}}function Gr(e,t){return t>0?Math.round(e/t)*t:e}function F$(e,t,n,i){var u;const o=(u=e[t])==null?void 0:u.nodes[n];if(!o)return e;const r=i.x-o.p.x,l=i.y-o.p.y,d=zn(e),c=d[t].nodes[n];return c.p={x:o.p.x+r,y:o.p.y+l},c.in&&(c.in={x:c.in.x+r,y:c.in.y+l}),c.out&&(c.out={x:c.out.x+r,y:c.out.y+l}),d}function wd(e,t,n,i){var r;if(!t.length)return e;const o=zn(e);for(const{contour:l,node:d}of t){const c=(r=o[l])==null?void 0:r.nodes[d];c&&(c.p={x:c.p.x+n,y:c.p.y+i},c.in&&(c.in={x:c.in.x+n,y:c.in.y+i}),c.out&&(c.out={x:c.out.x+n,y:c.out.y+i}))}return o}function N$(e,t){const n=new Map;for(const{contour:o,node:r}of t){const l=n.get(o)??[];l.push(r),n.set(o,l)}let i=e;return n.forEach((o,r)=>{const l=[...o].sort((d,c)=>c-d);for(const d of l)i=vp(i,r,d)}),i}function _$(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const d=zn(e),c=d[t].nodes[n];if(c[i]=cn(o),r){const p=i==="in"?"out":"in";c[p]=zs(o,c.p)}return d}function W$(e,t,n,i){var l;const o=(l=e[t])==null?void 0:l.nodes[n];if(!o||!o[i])return e;const r=zn(e);return r[t].nodes[n][i]=null,r}function H$(e,t,n,i){const o=e[t];if(!o)return{contours:e,nodeIndex:-1};const r=o.nodes[n],l=o.nodes[(n+1)%o.nodes.length];if(!r||!l)return{contours:e,nodeIndex:-1};const d=zn(e),c=d[t].nodes,u=n+1;if(Bo(r,l))return c.splice(u,0,{p:$n(r.p,l.p,i),in:null,out:null}),{contours:d,nodeIndex:u};const p=r.out??r.p,x=l.in??l.p,y=$n(r.p,p,i),m=$n(p,x,i),h=$n(x,l.p,i),v=$n(y,m,i),b=$n(m,h,i),C=$n(v,b,i),S=(n+1)%o.nodes.length;return c[n].out=y,c[S].in=h,c.splice(u,0,{p:C,in:v,out:b}),{contours:d,nodeIndex:u}}function vp(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=zn(e);return o[t].nodes.splice(n,1),o}function $d(e,t,n){const i=e[t];if(!(i==null?void 0:i.nodes[n]))return e;const r=zn(e),l=r[t].nodes,d=l[n],c=l.length,u=(n-1+c)%c,p=(n+1)%c,x=!!Vn(l[u].out,l[u].p),y=!!Vn(l[p].in,l[p].p);if(pp(d)||x||y)return d.in=null,d.out=null,l[u].out=null,l[p].in=null,r;const m=gp(l[u].p,d.p,l[p].p);return d.in=m.in,d.out=m.out,r}function O$(e,t,n){const i=n.x-t.x,o=n.y-t.y,r=i*i+o*o,l=r===0?0:Math.max(0,Math.min(1,((e.x-t.x)*i+(e.y-t.y)*o)/r)),d={x:t.x+i*l,y:t.y+o*l};return{t:l,distance:Math.hypot(e.x-d.x,e.y-d.y),point:d}}function Cd(e,t){let n=null;return e.forEach((i,o)=>{for(const r of mp(i)){const l=Bo(r.from,r.to)?1:Os;for(let d=0;d<l;d+=1){const c=d/l,u=(d+1)/l,p=O$(t,Bs(r.from,r.to,c),Bs(r.from,r.to,u));(!n||p.distance<n.distance)&&(n={contour:o,segment:r.index,t:c+(u-c)*p.t,distance:p.distance,point:p.point})}}}),n}function D$(e,t){const n=[];return e.forEach((i,o)=>{i.nodes.forEach((r,l)=>{o===t.contour&&l===t.node||n.push(r.p)})}),n}function Td(e,t,n){const i=t.filter((r,l)=>isFinite(r)&&t.findIndex(d=>Math.abs(d-r)<1e-6)===l),o=i.map(r=>({value:r,axis:r,from:null}));for(const r of e)o.push({value:r[n],axis:null,from:r});for(const r of i)for(const l of e)o.push({value:r*2-l[n],axis:r,from:l});return o}function Ld(e,t,n,i,o){const r=i(t)[n];let l=null,d=1/0;for(const c of e){const u=n==="x"?{x:c.value,y:t.y}:{x:t.x,y:c.value},p=Math.abs(i(u)[n]-r);p>o||l&&p>=d||(l=c,d=p)}return l}function z$(e,t){return e.length===t.length&&e.every((n,i)=>n.kind===t[i].kind&&n.a.x===t[i].a.x&&n.a.y===t[i].a.y&&n.b.x===t[i].b.x&&n.b.y===t[i].b.y)}function B$(e){const t=Math.PI*2;return((e+Math.PI)%t+t)%t-Math.PI}function js(e,t){const n=t.x-e.x,i=t.y-e.y,o=Math.hypot(n,i);return o<1e-6?null:{x:n/o,y:i/o}}function j$(e,t){const n=js(e,t);return n?{kind:"align",a:{x:e.x-n.x*go,y:e.y-n.y*go},b:{x:t.x+n.x*go,y:t.y+n.y*go}}:{kind:"align",a:e,b:t}}function Vs(e,t,n){return t==="x"?{kind:"center",a:{x:e,y:0},b:{x:e,y:n.height}}:{kind:"center",a:{x:0,y:e},b:{x:n.width,y:e}}}function Id(e,t,n,i,o){if(e.axis===null)return j$(n,o(e.from??n));const r=t==="x"?{x:e.axis,y:0}:{x:0,y:e.axis};return Vs(o(r)[t],t,i)}function V$(e,t,n,i,o){const r=[],l=o(e);return t&&e.x===t.value&&r.push(Id(t,"x",l,i,o)),n&&e.y===n.value&&r.push(Id(n,"y",l,i,o)),r}function G$(e,t,n,i){const o=e==null?void 0:e.nodes[t];if(!e||!o)return null;const r=i(o.p),l=n==="in"?o.out:o.in;if(l)return js(i(l),r);const d=e.nodes.length,c=t+(n==="in"?1:-1);if(!e.closed&&(c<0||c>=d))return null;const u=e.nodes[(c+d)%d];if(!u)return null;const p=(n==="in"?u.in:u.out)??u.p;return js(i(p),r)}function X$(e,t,n,i,o,r,l){const d=r(t),c=r(e),u=c.x-d.x,p=c.y-d.y,x=Math.hypot(u,p);if(x<1e-6)return{point:e,guides:ho};const y=Math.atan2(p,u),m=Math.round(y/yd)*yd;let h=o?m:null,v=!1;if(!o){const z=[];n&&z.push({angle:Math.atan2(n.y,n.x),smooth:!0}),z.push({angle:m,smooth:!1});for(const H of z){const L=B$(H.angle-y);if(!(Math.abs(L)>$$)&&!(Math.abs(Math.sin(L))*x>w$)){h=H.angle,v=H.smooth;break}}}const b=i!==null&&i>0&&Math.abs(x-i)<=C$;if(h===null&&!b)return{point:e,guides:ho};const C=h??y,S=b?i:x,w={x:Math.cos(C),y:Math.sin(C)},D=S+(h===null?0:go),_=b?S:v?go:0;return{point:l({x:d.x+w.x*S,y:d.y+w.y*S}),guides:[{kind:"angle",a:{x:d.x-w.x*_,y:d.y-w.y*_},b:{x:d.x+w.x*D,y:d.y+w.y*D}}]}}const Gs=.1,Xs=8,q$=4,Rd=10,ya=(e,t)=>{switch(t){case"nw":return{x:e.minX,y:e.minY};case"ne":return{x:e.maxX,y:e.minY};case"se":return{x:e.maxX,y:e.maxY};case"sw":return{x:e.minX,y:e.maxY}}},xp=e=>{switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}},qs=(e,t)=>{const n=ya(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*Rd,y:n.y+o*Rd}},Us=(e,t)=>!(t.width>0)||!(t.height>0)||!(e.width>0)||!(e.height>0)?1:Math.max(e.width/t.width,e.height/t.height),Gi=(e,t,n)=>{const i=Us(e,t)*n;return{width:t.width*i,height:t.height*i}},Dn=(e,t,n)=>(e-t)*n,fo=(e,t,n,i)=>{const o=e-t;if(Math.abs(o)<1e-6)return .5;const r=n/o;return(i==null?void 0:i.clamp)===!1?r:Math.abs(o)<q$?.5:ha(r)},U$=(e,t,n,i,o,r)=>{const l=Gi(e,n,r),d=e.x+Dn(e.width,l.width,i),c=e.y+Dn(e.height,l.height,o),u=Us(e,n),p=Us(t,n),x=Math.min(Xs,Math.max(Gs,p>0?r*(u/p):r)),y=Gi(t,n,x);return{focalX:fo(t.width,y.width,d-t.x,{clamp:!1}),focalY:fo(t.height,y.height,c-t.y,{clamp:!1}),scale:x}},Pd=1.08,Xr=14,qr=8;function Y$({P:e,box:t,bounds:n,natural:i,imageUrl:o,maskPath:r,stage:l,onStageChange:d,focalX:c,focalY:u,scale:p,onChange:x,onCommit:y}){const m=s.useRef(null),h=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,v=s.useRef(null),b=s.useRef(null),C=s.useRef({focalX:c,focalY:u,scale:p});C.current={focalX:c,focalY:u,scale:p};const S=l==="image";s.useEffect(()=>{var W;S&&((W=m.current)==null||W.focus({preventScroll:!0}))},[S]);const w=s.useCallback((W,g)=>{var R;const E=(R=m.current)==null?void 0:R.getBoundingClientRect();return!E||E.width<=0||E.height<=0?{x:0,y:0}:{x:(W-E.left)/E.width*t.width,y:(g-E.top)/E.height*t.height}},[t.width,t.height]),D=W=>{var E,R;if(!i)return;W.stopPropagation(),W.preventDefault(),(E=m.current)==null||E.focus({preventScroll:!0});const g=Gi(n,i,p);v.current={pointerId:W.pointerId,origin:w(W.clientX,W.clientY),startX:Dn(n.width,g.width,c),startY:Dn(n.height,g.height,u),width:g.width,height:g.height,moved:!1},(R=m.current)==null||R.setPointerCapture(W.pointerId)},_=(W,g)=>{var le,se;if(!i)return;W.stopPropagation(),W.preventDefault(),(le=m.current)==null||le.focus({preventScroll:!0});const E=Gi(n,i,p),R=Dn(n.width,E.width,c),G=Dn(n.height,E.height,u),Z={minX:R,minY:G,maxX:R+E.width,maxY:G+E.height},T=ya(Z,xp(g)),j=ya(Z,g),K=Math.hypot(j.x-T.x,j.y-T.y);!isFinite(K)||K<=0||(b.current={pointerId:W.pointerId,anchor:T,startDistance:K,startScale:p,startX:R,startY:G,moved:!1},(se=m.current)==null||se.setPointerCapture(W.pointerId))},z=W=>{if(!i)return;const g=b.current;if(g&&W.pointerId===g.pointerId){W.stopPropagation(),W.preventDefault();const R=w(W.clientX,W.clientY),G={x:R.x-n.x,y:R.y-n.y},Z=Math.hypot(G.x-g.anchor.x,G.y-g.anchor.y),T=Math.min(Xs,Math.max(Gs,g.startScale*(Z/g.startDistance)));if(!g.moved&&Math.abs(T-g.startScale)<1e-4)return;g.moved=!0;const j=T/g.startScale,K=g.anchor.x+(g.startX-g.anchor.x)*j,le=g.anchor.y+(g.startY-g.anchor.y)*j,se=Gi(n,i,T);x({focalX:fo(n.width,se.width,K),focalY:fo(n.height,se.height,le),scale:T});return}const E=v.current;if(E&&W.pointerId===E.pointerId){W.stopPropagation(),W.preventDefault();const R=w(W.clientX,W.clientY),G=R.x-E.origin.x,Z=R.y-E.origin.y;if(!E.moved&&G===0&&Z===0)return;E.moved=!0,x({focalX:fo(n.width,E.width,E.startX+G),focalY:fo(n.height,E.height,E.startY+Z),scale:p})}},H=W=>{var R,G;const g=v.current;if(g&&W.pointerId===g.pointerId){v.current=null,W.stopPropagation(),(R=m.current)!=null&&R.hasPointerCapture(g.pointerId)&&m.current.releasePointerCapture(g.pointerId),g.moved&&y(C.current);return}const E=b.current;E&&W.pointerId===E.pointerId&&(b.current=null,W.stopPropagation(),(G=m.current)!=null&&G.hasPointerCapture(E.pointerId)&&m.current.releasePointerCapture(E.pointerId),E.moved&&y(C.current))},L=W=>{if(W.key==="Escape"){W.stopPropagation(),d("none");return}if(W.key==="="||W.key==="+"||W.key==="-"||W.key==="_"){W.preventDefault(),W.stopPropagation();const g=W.key==="="||W.key==="+",E=Math.min(Xs,Math.max(Gs,p*(g?Pd:1/Pd))),R={focalX:c,focalY:u,scale:E};x(R),y(R)}},V=["nw","ne","se","sw"],$={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},k=s.useMemo(()=>{const W=i??{width:n.width,height:n.height},g=Gi(n,W,p);return!(g.width>0)||!(g.height>0)?null:{x:n.x+Dn(n.width,g.width,c),y:n.y+Dn(n.height,g.height,u),width:g.width,height:g.height}},[i,n.x,n.y,n.width,n.height,c,u,p]),F=k?{minX:k.x,minY:k.y,maxX:k.x+k.width,maxY:k.y+k.height}:$;return a.jsxs("svg",{ref:m,className:`${e}-editor${S?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:L,onPointerMove:z,onPointerUp:H,onPointerCancel:H,onLostPointerCapture:H,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>d("none")}),S&&o&&k&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:h,maskUnits:"userSpaceOnUse",x:k.x,y:k.y,width:k.width,height:k.height,children:[a.jsx("rect",{x:k.x,y:k.y,width:k.width,height:k.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:k.x,y:k.y,width:k.width,height:k.height,preserveAspectRatio:"none",mask:`url(#${h})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:k.x,y:k.y,width:k.width,height:k.height})]}),S&&a.jsxs(a.Fragment,{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:n.x,y:n.y,width:n.width,height:n.height}),a.jsx("rect",{className:`${e}-editor-body`,x:n.x,y:n.y,width:n.width,height:n.height,onPointerDown:D}),V.map(W=>{const g=qs(F,W),E=W==="ne"||W==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:g.x-qr/2,y:g.y-qr/2,width:qr,height:qr}),a.jsx("rect",{className:`${e}-editor-scale-grab${E?` ${e}-editor-scale-grab-nesw`:""}`,x:g.x-Xr/2,y:g.y-Xr/2,width:Xr,height:Xr,onPointerDown:R=>_(R,W)})]},W)})]})]})}const Ys=10,K$=Ys*2,Hn=7,Z$=4,ao=9,J$=3.5,kd=1.08,Q$=.05,Ur=14,eC=1,Yr=14,Kr=8;function tC({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,uniformStretch:l=!1,stage:d,onStageChange:c,onSelectionChange:u,onChange:p,onCommit:x}){const y=s.useRef(null),m=s.useRef(null),h=s.useRef(i);h.current=i;const v=s.useRef(null),b=s.useRef(null),C=s.useRef(null),S=s.useRef(null),[w,D]=s.useState([]),[_,z]=s.useState(ho),[H,L]=s.useState(null),V=s.useCallback(f=>{z(X=>z$(X,f)?X:f)},[]),$=d==="shape";s.useEffect(()=>{var f;$&&((f=y.current)==null||f.focus({preventScroll:!0}))},[$]),s.useEffect(()=>{$||D(f=>f.length?[]:f)},[$]);const k=w.length>0;s.useEffect(()=>{u==null||u(k)},[k,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const F=n.width>0?t.width/n.width:1,W=n.height>0?t.height/n.height:1,g=Math.min(F,W),E=r&&l?g:F,R=r&&l?g:W,G=r&&l?(t.width-n.width*g)/2:0,Z=r&&l?(t.height-n.height*g)/2:0,T=s.useCallback(f=>r?{x:G+(f.x-n.x)*E,y:Z+(f.y-n.y)*R}:{x:f.x-n.x,y:f.y-n.y},[r,n,E,R,G,Z]),j=s.useCallback(f=>r?{x:n.x+(E>0?(f.x-G)/E:0),y:n.y+(R>0?(f.y-Z)/R:0)}:{x:n.x+f.x,y:n.y+f.y},[r,n,E,R,G,Z]),K=s.useMemo(()=>j({x:t.width/2,y:t.height/2}),[j,t.width,t.height]),le=s.useCallback((f,X)=>{var U;const N=(U=y.current)==null?void 0:U.getBoundingClientRect();if(!N||N.width<=0||N.height<=0)return{x:0,y:0};if(r){const me=(f-N.left)/N.width*t.width,Y=(X-N.top)/N.height*t.height;return{x:n.x+(E>0?(me-G)/E:0),y:n.y+(R>0?(Y-Z)/R:0)}}return{x:n.x+(f-N.left),y:n.y+(X-N.top)}},[r,n,t.width,t.height,E,R,G,Z]),se=s.useCallback((f,X)=>{var U;const N=(U=y.current)==null?void 0:U.getBoundingClientRect();return!N||N.width<=0||N.height<=0?{x:0,y:0}:{x:(f-N.left)/N.width*t.width,y:(X-N.top)/N.height*t.height}},[t.width,t.height]),M=s.useCallback((f,X)=>{const N=l&&!(X!=null&&X.preserveShape)?M$(f,n,t,G,Z,E,R):f;x(N,X)},[x,l,n,t,G,Z,E,R]),re=s.useCallback(()=>{L(null)},[]),q=s.useCallback((f,X,N)=>{if(!N||v.current||b.current||C.current||S.current){re();return}const U=se(f,X),me=ln(h.current,T);for(const te of me)for(const Ae of te.nodes)if(Math.hypot(Ae.p.x-U.x,Ae.p.y-U.y)<=ao){re();return}const Y=Cd(me,U);if(!Y||Y.distance>Ys){re();return}const I=me[Y.contour],ie=I==null?void 0:I.nodes[Y.segment],oe=I==null?void 0:I.nodes[(Y.segment+1)%((I==null?void 0:I.nodes.length)??1)],B=!!(ie&&oe&&!Bo(ie,oe));L(te=>te&&te.curved===B&&Math.hypot(te.point.x-Y.point.x,te.point.y-Y.point.y)<.25?te:{point:Y.point,curved:B})},[se,T,re]),ce=f=>{var Fe;const X=f.metaKey||f.ctrlKey,N=C.current;if(N&&f.pointerId===N.pointerId){if(f.stopPropagation(),f.preventDefault(),N.startDistance<=0)return;const et=le(f.clientX,f.clientY),Ue=Math.hypot(et.x-N.origin.x,et.y-N.origin.y),nt=Math.max(Q$,Ue/N.startDistance);if(!N.moved&&Math.abs(nt-1)<1e-4)return;N.moved=!0,p(bd(N.startContours,N.origin,nt));return}const U=b.current;if(U&&f.pointerId===U.pointerId){f.stopPropagation(),f.preventDefault();const et=le(f.clientX,f.clientY),{bbox:Ue}=U,nt=Ue.maxX-Ue.minX,tt=Ue.maxY-Ue.minY,Ve=et.x-U.origin.x,fe=et.y-U.origin.y;let He=Ve,Be=fe;if(isFinite(nt)&&isFinite(tt))if(r){let Ce=n.x,De=n.x+n.width,Xe=n.y,ge=n.y+n.height;l&&(E>0&&(Ce=n.x+(0-G)/E,De=n.x+(t.width-G)/E),R>0&&(Xe=n.y+(0-Z)/R,ge=n.y+(t.height-Z)/R));const Ee=Math.min(Ce,De-nt),ze=Math.max(Ce,De-nt),Re=Math.min(Xe,ge-tt),xe=Math.max(Xe,ge-tt),Ie=Math.min(ze,Math.max(Ee,Ue.minX+Ve)),Ye=Math.min(xe,Math.max(Re,Ue.minY+fe));He=Ie-Ue.minX,Be=Ye-Ue.minY}else{const Ce=Ue.minX-n.x,De=Ue.minY-n.y,Xe=Math.min(0,t.width-nt),ge=Math.max(0,t.width-nt),Ee=Math.min(0,t.height-tt),ze=Math.max(0,t.height-tt),Re=Math.min(ge,Math.max(Xe,Ce+Ve)),xe=Math.min(ze,Math.max(Ee,De+fe));He=Re-Ce,Be=xe-De}const Je=[];if(!X&&isFinite(nt)&&isFinite(tt)){const Ce=T({x:Ue.minX+nt/2+He,y:Ue.minY+tt/2+Be}),De={x:t.width/2,y:t.height/2};Math.abs(Ce.x-De.x)<=Ur&&(He=K.x-Ue.minX-nt/2,Je.push(Vs(De.x,"x",t))),Math.abs(Ce.y-De.y)<=Ur&&(Be=K.y-Ue.minY-tt/2,Je.push(Vs(De.y,"y",t)))}if(!U.moved&&He===0&&Be===0)return;U.moved=!0,V(Je.length?Je:ho),p(ln(U.startContours,Ce=>({x:Ce.x+He,y:Ce.y+Be})),{carryImage:!0});return}const me=S.current;if(me&&f.pointerId===me.pointerId){f.stopPropagation(),f.preventDefault();const et=le(f.clientX,f.clientY);let Ue=et.x-me.origin.x,nt=et.y-me.origin.y;if(f.shiftKey&&(Math.abs(Ue)>Math.abs(nt)?nt=0:Ue=0),!me.moved&&Ue===0&&nt===0)return;me.moved=!0,p(wd(me.startContours,me.selection,Ue,nt));return}const Y=v.current;if(!Y||f.pointerId!==Y.pointerId){q(f.clientX,f.clientY,w.length>0||$);return}re(),f.stopPropagation(),f.preventDefault();const I=le(f.clientX,f.clientY);if(Y.kind==="anchor"){const et={x:Y.anchor.x+(I.x-Y.origin.x),y:Y.anchor.y+(I.y-Y.origin.y)},Ue=X?[]:D$(h.current,{contour:Y.contour,node:Y.node}),nt=X||!Y.center?[]:[Y.center],tt=Ld(Td(Ue,nt.map(He=>He.x),"x"),et,"x",T,Ur),Ve=Ld(Td(Ue,nt.map(He=>He.y),"y"),et,"y",T,Ur),fe=X?et:{x:(tt==null?void 0:tt.value)??Gr(et.x,o),y:(Ve==null?void 0:Ve.value)??Gr(et.y,o)};if(f.shiftKey&&(Math.abs(fe.x-Y.anchor.x)>Math.abs(fe.y-Y.anchor.y)?fe.y=Y.anchor.y:fe.x=Y.anchor.x),!Y.moved&&fe.x===Y.anchor.x&&fe.y===Y.anchor.y)return;Y.moved=!0,V(V$(fe,tt,Ve,t,T)),p(F$(h.current,Y.contour,Y.node,fe));return}const ie=(Fe=h.current[Y.contour])==null?void 0:Fe.nodes[Y.node],oe=Y.mirror&&!f.altKey,B=oe||X?null:Y.kind==="in"?ie==null?void 0:ie.out:ie==null?void 0:ie.in,te=ie?T(ie.p):null,Ae=B?T(B):null,he=ie&&(!X||f.shiftKey)?X$(I,ie.p,oe||X?null:G$(h.current[Y.contour],Y.node,Y.kind,T),te&&Ae?Math.hypot(Ae.x-te.x,Ae.y-te.y):null,f.shiftKey,T,j):{point:I,guides:ho},Q=he.guides.length?he.point:X?I:{x:Gr(I.x,o),y:Gr(I.y,o)},Ze=Y.kind==="in"?ie==null?void 0:ie.in:ie==null?void 0:ie.out;!Y.moved&&Ze&&Q.x===Ze.x&&Q.y===Ze.y||(Y.moved=!0,V(he.guides),p(_$(h.current,Y.contour,Y.node,Y.kind,Q,oe)))},J=f=>{V(ho);const X=C.current;if(X&&f.pointerId===X.pointerId){C.current=null,f.stopPropagation();const B=y.current;B!=null&&B.hasPointerCapture(X.pointerId)&&B.releasePointerCapture(X.pointerId),X.moved&&M(h.current,{preserveShape:!0});return}const N=b.current;if(N&&f.pointerId===N.pointerId){b.current=null,f.stopPropagation();const B=y.current;B!=null&&B.hasPointerCapture(N.pointerId)&&B.releasePointerCapture(N.pointerId),N.moved?M(h.current,{preserveShape:!0}):D([]);return}const U=S.current;if(U&&f.pointerId===U.pointerId){S.current=null,f.stopPropagation();const B=y.current;B!=null&&B.hasPointerCapture(U.pointerId)&&B.releasePointerCapture(U.pointerId),U.moved&&M(h.current);return}const me=v.current;if(!me||f.pointerId!==me.pointerId)return;v.current=null,f.stopPropagation();const Y=y.current;Y!=null&&Y.hasPointerCapture(me.pointerId)&&Y.releasePointerCapture(me.pointerId);const I=Math.hypot(f.clientX-me.clientOrigin.x,f.clientY-me.clientOrigin.y);if(me.moved||I>Z$){me.moved&&M(h.current);return}if(!me.toggleOnRelease||f.type!=="pointerup")return;const oe=$d(h.current,me.contour,me.node);oe!==h.current&&(p(oe),M(oe))},be=f=>{f.stopPropagation()},We=f=>{var X,N;f.stopPropagation(),f.preventDefault(),re(),(X=y.current)==null||X.focus({preventScroll:!0}),b.current={pointerId:f.pointerId,origin:le(f.clientX,f.clientY),startContours:zn(i),bbox:Si(i),moved:!1},(N=y.current)==null||N.setPointerCapture(f.pointerId)},ye=(f,X)=>{var I,ie;f.stopPropagation(),f.preventDefault(),re(),(I=y.current)==null||I.focus({preventScroll:!0}),D([]),c("shape");const N=Si(i),U=ya(N,xp(X)),me=qs(N,X),Y=Math.hypot(me.x-U.x,me.y-U.y);!isFinite(Y)||Y<=0||(C.current={pointerId:f.pointerId,corner:X,origin:U,startDistance:Y,startContours:zn(i),moved:!1},(ie=y.current)==null||ie.setPointerCapture(f.pointerId))},ue=(f,X,N,U)=>{var I,ie,oe,B;f.stopPropagation(),f.preventDefault(),re(),(I=y.current)==null||I.focus({preventScroll:!0});const me=(ie=i[N])==null?void 0:ie.nodes[U];if(!me)return;if(f.altKey){const te=X==="anchor"?vp(i,N,U):W$(i,N,U,X);if(te===i)return;D(X==="anchor"?[]:[{contour:N,node:U}]),p(te),M(te);return}const Y=f.metaKey||f.ctrlKey;if(X==="anchor"&&f.shiftKey&&!Y){D(te=>te.some(Ae=>Ae.contour===N&&Ae.node===U)?te.filter(Ae=>!(Ae.contour===N&&Ae.node===U)):[...te,{contour:N,node:U}]);return}if(X==="anchor"&&!Y&&w.length>1&&w.some(te=>te.contour===N&&te.node===U)){S.current={pointerId:f.pointerId,origin:le(f.clientX,f.clientY),startContours:zn(i),selection:w,moved:!1},(oe=y.current)==null||oe.setPointerCapture(f.pointerId);return}D([{contour:N,node:U}]),v.current={kind:X,contour:N,node:U,pointerId:f.pointerId,origin:le(f.clientX,f.clientY),clientOrigin:{x:f.clientX,y:f.clientY},anchor:me.p,center:E$(i),mirror:X!=="anchor"&&!!(me.in&&me.out),toggleOnRelease:Y,moved:!1},(B=y.current)==null||B.setPointerCapture(f.pointerId)},ee=f=>{f.stopPropagation(),f.preventDefault(),re();const X=ln(i,T),N=Cd(X,se(f.clientX,f.clientY));if(!N||N.distance>Ys)return;const{contours:U,nodeIndex:me}=H$(i,N.contour,N.segment,N.t);me<0||(D([{contour:N.contour,node:me}]),p(U),M(U))},de=f=>{if(f.key==="="||f.key==="+"||f.key==="-"||f.key==="_"){f.preventDefault(),f.stopPropagation();const Y=Si(i);if(!isFinite(Y.minX)||!isFinite(Y.maxX))return;const I={x:(Y.minX+Y.maxX)/2,y:(Y.minY+Y.maxY)/2},oe=f.key==="="||f.key==="+"?kd:1/kd,B=bd(i,I,oe);p(B),M(B,{preserveShape:!0});return}if(f.key==="Escape"){f.stopPropagation(),D([]),c("none");return}if(!w.length)return;if(f.key==="Backspace"||f.key==="Delete"){f.preventDefault(),f.stopPropagation();const Y=N$(i,w);if(Y===i)return;D([]),p(Y),M(Y);return}const X=o>0?o:eC,N=f.shiftKey?X*10:X,U={ArrowLeft:[-N,0],ArrowRight:[N,0],ArrowUp:[0,-N],ArrowDown:[0,N]}[f.key];if(!U)return;f.preventDefault(),f.stopPropagation();const me=wd(i,w,U[0],U[1]);p(me),M(me)},ne=s.useMemo(()=>No(ln(i,T)),[i,T]),Pe=s.useMemo(()=>Si(i),[i]),Te=T({x:Pe.minX,y:Pe.minY}),Oe={width:T({x:Pe.maxX,y:Pe.minY}).x-Te.x,height:T({x:Pe.minX,y:Pe.maxY}).y-Te.y},ve=$&&w.length===0&&isFinite(Pe.minX)&&isFinite(Pe.maxX)&&Pe.maxX>Pe.minX&&Pe.maxY>Pe.minY,Se=w.length>0||$,$e=Se;return a.jsxs("svg",{ref:y,className:`${e}-editor${Se?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:de,onPointerDown:()=>{var f;return(f=y.current)==null?void 0:f.focus({preventScroll:!0})},onPointerMove:ce,onPointerLeave:re,onPointerUp:J,onPointerCancel:J,onLostPointerCapture:J,onContextMenu:f=>{f.preventDefault()},"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{D([]),c("none")},onClick:ee}),$e&&a.jsx("path",{className:`${e}-editor-outline`,d:ne}),$e&&_.map((f,X)=>a.jsx("line",{className:`${e}-editor-snap ${e}-editor-snap-${f.kind}`,x1:f.a.x,y1:f.a.y,x2:f.b.x,y2:f.b.y},`${f.kind}-${X}`)),a.jsx("path",{ref:m,className:`${e}-editor-body`,d:ne,fillRule:"evenodd",onPointerDown:We,onClick:ee}),$e&&a.jsx("path",{className:`${e}-editor-hit`,d:ne,style:{strokeWidth:K$},onClick:ee}),$e&&H&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:H.point.x-Hn/2,y:H.point.y-Hn/2,width:Hn,height:Hn,rx:H.curved?Hn/2:0}),$e&&i.map((f,X)=>f.nodes.map((N,U)=>{const me=w.some(I=>I.contour===X&&I.node===U),Y=T(N.p);return a.jsxs("g",{children:[me&&w.length===1&&["in","out"].map(I=>{const ie=N[I];if(!ie)return null;const oe=T(ie);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:Y.x,y1:Y.y,x2:oe.x,y2:oe.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:oe.x,cy:oe.y,r:J$}),a.jsx("circle",{className:`${e}-editor-grab`,cx:oe.x,cy:oe.y,r:ao,onPointerDown:B=>ue(B,I,X,U),onClick:be})]},I)}),a.jsx("rect",{className:`${e}-editor-anchor${me?` ${e}-editor-anchor-selected`:""}`,x:Y.x-Hn/2,y:Y.y-Hn/2,width:Hn,height:Hn,rx:pp(N)?Hn/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:Y.x-ao,y:Y.y-ao,width:ao*2,height:ao*2,onPointerDown:I=>ue(I,"anchor",X,U),onClick:be,onDoubleClick:I=>{I.stopPropagation(),I.preventDefault();const ie=$d(i,X,U);p(ie),M(ie)}})]},`${X}-${U}`)})),ve&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:Te.x,y:Te.y,width:Oe.width,height:Oe.height}),["nw","ne","se","sw"].map(f=>{const X=T(qs(Pe,f)),N=f==="ne"||f==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:X.x-Kr/2,y:X.y-Kr/2,width:Kr,height:Kr}),a.jsx("rect",{className:`${e}-editor-scale-grab${N?` ${e}-editor-scale-grab-nesw`:""}`,x:X.x-Yr/2,y:X.y-Yr/2,width:Yr,height:Yr,onPointerDown:U=>ye(U,f),onClick:be})]},f)})]})]})}const nC=4e3,iC=/^(?:https?:|mailto:|tel:)/i;function bp(e){return!!e&&typeof e=="object"&&e.type==="link"}function oC(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!iC.test(t)))return t}function rC(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,d)=>{for(const c of r){if(bp(c)){o(c.children??[],oC(c.value),c.target);continue}const u=c,p=(u==null?void 0:u.text)??"";if(p.trim())for(const x of p.split(/\s+/))x&&t.push({text:x,leaf:u,href:l,target:d,para:i})}};o((n==null?void 0:n.children)??[])}),t}function Ed(e){return{...e.fontFamily&&{fontFamily:Oo(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}function aC(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(bp(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function Md(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:d,height:c,allowOverflow:u,capInset:p,capLines:x}=e,y=e.lineHeight*l,m=e.spaceWidth*l,h=[];if(!t.length||d<=0||y<=0)return{segments:h,placed:0,height:0,capLeft:0,capTop:0};const v=Math.max(1,m*.5),b=y*d$;let C=0,S=0,w=0,D=t[0].para,_=0,z=0,H=null;for(;C<t.length&&w<nC;){const L=S+y>c;if(L&&!u)break;const V=t[C].para;if(V>D+1){S+=y*(V-D-1),D=V-1,w+=1;continue}let $=L?[{x0:0,x1:d}]:v$(i,(S+b)/c,(S+y-b)/c,o).map(F=>({x0:F.x0*d,x1:F.x1*d}));p>0&&x>0&&!L&&$.length&&(H===null&&(H=w,_=$[0].x0,z=S),w-H<x&&($=y$($,{x0:_,x1:_+p})));const k=$.reduce((F,W)=>Math.max(F,W.x1-W.x0),0);for(const F of $){const W=F.x1-F.x0;if(W<v)continue;if(C>=t.length||t[C].para!==V)break;const g=C;let E=0;for(;C<t.length&&t[C].para===V;){const R=n[C]*l,G=C===g?R:m+R;if(E+G>W&&!(C===g&&W>=k-.5&&R>d-.5))break;E+=G,C+=1}if(C>g){const R=C>=t.length||t[C].para!==V;h.push({top:S,left:F.x0,width:W,from:g,to:C,justify:r==="justify"&&!R})}if(C>=t.length||t[C].para!==V)break}D=V,S+=y,w+=1}return{segments:h,placed:C,height:h.length?S:0,capLeft:_,capTop:z}}const sC=.12,lC=2,cC=10,xs=.25,dC=e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}},uC=(e,t)=>Math.abs(e.top-t.top)<.5&&Math.abs(e.left-t.left)<.5&&Math.abs(e.width-t.width)<.5&&Math.abs(e.height-t.height)<.5,pC=(e,t)=>{const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e||!t){i(null);return}let o=0,r=null;const l=()=>{const d=dC(e);(!r||!uC(r,d))&&(r=d,i(d)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n},bs=(e,t)=>{if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return e.map(r=>r.map(l=>({x:(i+l.x*n)/t.width,y:(o+l.y*n)/t.height})))},Zr=typeof window>"u"?s.useEffect:s.useLayoutEffect;function mC(){return typeof document>"u"?null:document.body}function gC({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:d,allowOverflow:c,fitEnabled:u,scale:p,onFitScale:x,dropCapLines:y,dropCapSize:m,showGuides:h,typography:v,imageUrl:b,imageFocalX:C,imageFocalY:S,imageScale:w,imageCustomPath:D,pathDragActive:_,pathCarryImage:z,onCarryImageConsumed:H,pathEditor:L,imageEditor:V}){var De,Xe;const $=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[k,F]=s.useState(null),W=s.useRef(null),[g,E]=s.useState({width:0,height:0}),[R,G]=s.useState(null),[Z,T]=s.useState(0),[j,K]=s.useState("none");s.useEffect(()=>{!L&&!V&&K("none")},[L,V]);const[le,se]=s.useState(null);s.useEffect(()=>{if(!b||typeof Image>"u"){se(null);return}let ge=!1;const Ee=new Image;return Ee.onload=()=>{ge||se({width:Ee.naturalWidth,height:Ee.naturalHeight})},Ee.src=b,()=>{ge=!0}},[b]);const M=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),re=s.useMemo(()=>rC(M),[M]),q=s.useMemo(()=>aC(M),[M]),ce=y>0&&m>1?((Xe=(De=re[0])==null?void 0:De.text)==null?void 0:Xe.charAt(0))??"":"",J=(L==null?void 0:L.contours)??null,be=s.useMemo(()=>{let ge=[];if(J){const Ee=yr(J);Ee.length&&(ge=So(Ee,r))}if(!ge.length){const Ee=i.trim(),ze=Ee?fd(Ee,o,r):null;ze&&ze.length?ge=ze:ge=Ds(n==="custom"?"rectangle":n)}return n==="circle"?bs(ge,g):ge},[J,n,i,o,r,g.width,g.height]),We=L==null?void 0:L.onConvert,ye=(L==null?void 0:L.needsConversion)??!1,ue=s.useMemo(()=>{if(n==="circle")return!1;const ge=J??(i.trim()?Li(i):null);return!!(ge&&fp(ge,r))},[J,i,r,n]),[ee,de]=s.useState(null);Zr(()=>{if(!ue){ee&&de(null);return}!ee&&g.width>0&&g.height>0&&de({width:g.width,height:g.height})},[ue,g.width,g.height,ee]);const ne=s.useMemo(()=>{if(!ue||g.width<=0||g.height<=0)return be;const ge=ee??g,Ee=r.width/ge.width,ze=r.height/ge.height;return be.map(Re=>Re.map(xe=>({x:xe.x*Ee,y:xe.y*ze})))},[be,ue,ee,r.width,r.height,g.width,g.height]),Pe=s.useMemo(()=>{if(J){const Re=yr(J);if(Re.length){const xe=So(Re,r);return n==="circle"?bs(xe,g):xe}}const ge=D.trim(),Ee=ge?fd(ge,o,r):null,ze=Ee&&Ee.length?Ee:Ds(n==="custom"?"rectangle":n);return n==="circle"?bs(ze,g):ze},[J,n,D,o,r,g.width,g.height]),Te=s.useMemo(()=>{if(!ue||g.width<=0||g.height<=0)return Pe;const ge=ee??g,Ee=r.width/ge.width,ze=r.height/ge.height;return Pe.map(Re=>Re.map(xe=>({x:xe.x*Ee,y:xe.y*ze})))},[Pe,ue,ee,r.width,r.height,g.width,g.height]),Oe=s.useRef(null),ve=s.useRef(!1);s.useEffect(()=>{if(!(!We||g.width<=0||g.height<=0)){if(ue){if(Oe.current===i)return;const ge=J??(i.trim()?Li(i):null);if(!(ge!=null&&ge.length))return;const Ee=ln(ge,ze=>({x:r.x+(ze.x-r.x)/g.width*r.width,y:r.y+(ze.y-r.y)/g.height*r.height}));Oe.current=No(Ee),We(Ee);return}!ye||!be.length||ve.current||(ve.current=!0,We(ln(hp(be),ge=>({x:ge.x*fa,y:ge.y*fa}))))}},[ye,ue,We,be,J,i,r,g.width,g.height]),Zr(()=>{const ge=k;if(!ge||typeof ResizeObserver>"u")return;const Ee=()=>{const Re=ge.getBoundingClientRect();E(xe=>Math.abs(xe.width-Re.width)<.5&&Math.abs(xe.height-Re.height)<.5?xe:{width:Re.width,height:Re.height})};Ee();const ze=new ResizeObserver(Ee);return ze.observe(ge),()=>ze.disconnect()},[k]),s.useEffect(()=>{const ge=typeof document<"u"?document.fonts:void 0;ge!=null&&ge.ready&&ge.ready.then(()=>{T(Ee=>Ee+1)})},[]),Zr(()=>{const ge=W.current;if(!ge)return;if(!re.length){G(null);return}const Ee=[],ze=document.createDocumentFragment();for(const Qe of re){const dt=document.createElement("span");Object.assign(dt.style,Ed(Qe.leaf)),dt.textContent=Qe.text,ze.appendChild(dt),Ee.push(dt)}const Re=document.createElement("span");Re.textContent=" ",ze.appendChild(Re);const xe=ce||"H",Ie=document.createElement("span");Ie.textContent=xe,Ie.style.lineHeight="1",ze.appendChild(Ie),ge.replaceChildren(ze);const Ye=window.getComputedStyle(ge),Ne=parseFloat(Ye.fontSize)||16,it=parseFloat(Ye.lineHeight),ot=Number.isNaN(it)?Ne*1.2:it,rt=Math.max(ot,Ne),ht=document.createElement("span");ht.textContent=xe,ht.style.lineHeight=`${rt}px`;const Pt=document.createElement("span");Pt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",ht.appendChild(Pt),ge.appendChild(ht);const kt=ht.getBoundingClientRect().top,ut=Pt.getBoundingClientRect().top,gt=Math.max(1,ut-kt);ht.remove();let $t=gt*.8;const ft=document.createElement("canvas").getContext("2d"),At=Qe=>`${Ye.fontStyle} ${Ye.fontWeight} ${Qe}px ${Ye.fontFamily}`;if(ft){ft.font=At(Ne);const Qe=ft.measureText(xe).actualBoundingBoxAscent;Qe>0&&($t=Qe)}const zt=m>1?(m-1)*rt+$t:$t;let jt=Ne*(zt/$t);if(ft){ft.font=At(jt);const Qe=ft.measureText(xe).actualBoundingBoxAscent;Qe>0&&(jt=jt*(zt/Qe))}Ie.style.fontSize=`${jt}px`,Ie.style.lineHeight=`${jt}px`;const Zt=document.createElement("span");Zt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",Ie.appendChild(Zt);const Ct=Math.max(1,Zt.getBoundingClientRect().top-Ie.getBoundingClientRect().top);Zt.remove();const rn=(m-1)*rt+gt-Ct,lt=Ee.map(Qe=>Qe.getBoundingClientRect().width),ke=Re.getBoundingClientRect().width,je=ce?Ie.getBoundingClientRect().width:0;ge.replaceChildren(),G({widths:lt,spaceWidth:ke,lineHeight:rt,capWidth:je,dropCapFontSize:jt,dropCapTopAdjust:rn})},[re,v,ce,y,m,Z,g.width]);const Se=R&&ce?R.capWidth+R.lineHeight*sC:0,$e=Math.max(y,Math.ceil(m)),f=s.useMemo(()=>{if(!R||!re.length||g.width<=0||g.height<=0||!u)return 1;const ge=Re=>Md({tokens:re,widths:R.widths,spaceWidth:R.spaceWidth,lineHeight:R.lineHeight,width:g.width,height:g.height,rings:ne,mode:l,align:d,scale:Re,allowOverflow:!1,capInset:Se*Re,capLines:ce?$e:0});if(ge(1).placed>=re.length)return 1;if(ge(xs).placed<re.length)return xs;let Ee=xs,ze=1;for(let Re=0;Re<cC;Re+=1){const xe=(Ee+ze)/2;ge(xe).placed>=re.length?Ee=xe:ze=xe}return Ee},[R,re,g.width,g.height,ne,l,d,u,Se,ce,$e]);s.useEffect(()=>{x(f)},[f,x]);const X=u?Math.min(p,f):1,N=s.useMemo(()=>!R||!re.length||g.width<=0||g.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0}:Md({tokens:re,widths:R.widths,spaceWidth:R.spaceWidth,lineHeight:R.lineHeight,width:g.width,height:g.height,rings:ne,mode:l,align:d,scale:X,allowOverflow:c,capInset:Se*X,capLines:ce?$e:0}),[R,re,g.width,g.height,ne,l,d,X,c,Se,ce,$e]),U=R?R.dropCapFontSize*X:0,me=R?R.dropCapTopAdjust*X:0,Y=d==="justify"?"left":d,I=!!(L&&J&&g.width>0&&g.height>0),ie=!!V,oe=(I||ie)&&g.width>0&&g.height>0,B=pC(k,oe),te=oe&&B?mC():null,Ae=s.useRef(!1),he=s.useCallback(ge=>{Ae.current=ge},[]);s.useEffect(()=>{if(!I&&!ie)return;const ge=Ee=>{const ze=k;if(!ze)return;const Re=ze.getBoundingClientRect();Ee.clientX>=Re.left&&Ee.clientX<=Re.right&&Ee.clientY>=Re.top&&Ee.clientY<=Re.bottom&&(Ee.preventDefault(),Ee.stopPropagation(),K(Ie=>Ie==="shape"&&Ae.current?Ie:Ie==="shape"&&ie?"image":I?"shape":"image"))};return document.addEventListener("dblclick",ge,!0),()=>document.removeEventListener("dblclick",ge,!0)},[I,ie,k]);const Q=s.useMemo(()=>b&&g.width>0&&g.height>0?u$(Te,g):null,[b,Te,g.width,g.height]),Ze=s.useRef(null),Fe=(()=>{const ge=Ze.current;return z||!V||!le||!Q||!ge||D===ge.customPath||ge.shape!==n&&n!=="custom"?null:U$(ge.bounds,Q,le,ge.focalX,ge.focalY,ge.scale)})();Zr(()=>{if(_||!V||!le||!Q)return;const ge=Ze.current,Ee=!!(ge&&D!==ge.customPath);Ee&&Fe&&V.onCommit(Fe),Ee&&z&&(H==null||H()),Ze.current={rings:Te,bounds:Q,focalX:(Fe==null?void 0:Fe.focalX)??C,focalY:(Fe==null?void 0:Fe.focalY)??S,scale:(Fe==null?void 0:Fe.scale)??w,customPath:D,shape:n}},[_,z,D,n,Te,Q,V,le,C,S,w,Fe,H]);const et=Ze.current,Ue=!!(_&&!z&&et&&!Fe),nt=Ue&&et?et.focalX:(Fe==null?void 0:Fe.focalX)??C,tt=Ue&&et?et.focalY:(Fe==null?void 0:Fe.focalY)??S,Ve=Ue&&et?et.scale:(Fe==null?void 0:Fe.scale)??w,fe=Ue&&et?et.bounds:Q,He=s.useMemo(()=>{if(!(g.width>0)||!(g.height>0))return"";let ge=vd(i,J,o,r,n,g);if(ue){const Ee=ee??g,ze=r.width/Ee.width,Re=r.height/Ee.height;ge=ln(ge,xe=>({x:xe.x*ze,y:xe.y*Re}))}return xd(ge,g)||hd(ne,g)},[i,J,o,r,n,g.width,g.height,ue,ee,ne]),Be=s.useMemo(()=>{if(!b||!(g.width>0)||!(g.height>0))return"";let ge=vd(D,J,o,r,n,g);if(ue){const Ee=ee??g,ze=r.width/Ee.width,Re=r.height/Ee.height;ge=ln(ge,xe=>({x:xe.x*ze,y:xe.y*Re}))}return xd(ge,g)||hd(Te,g)},[b,D,J,o,r,n,g.width,g.height,ue,ee,Te]),Je=`${$}-clip`,Ce=s.useMemo(()=>{if(!fe)return null;const ge=le??{width:fe.width,height:fe.height},Ee=Gi(fe,ge,Ve);return{x:Dn(fe.width,Ee.width,nt),y:Dn(fe.height,Ee.height,tt),width:Ee.width,height:Ee.height}},[fe,le,nt,tt,Ve]);return a.jsxs("div",{className:`${e}-column`,ref:F,children:[He?a.jsxs("svg",{className:`${e}-shape-fill`,viewBox:`0 0 ${g.width} ${g.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:He,fillRule:"evenodd"}),b&&Be&&fe&&Ce?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:Je,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:Be,fillRule:"evenodd"})})}),a.jsx("image",{href:b,x:fe.x+Ce.x,y:fe.y+Ce.y,width:Ce.width,height:Ce.height,preserveAspectRatio:"none",clipPath:`url(#${Je})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${c?"":` ${e}-clip`}`,style:{...v,["--"+e+"-fit"]:X},children:[a.jsx("div",{className:`${e}-measure`,ref:W,style:v,"aria-hidden":!0}),N.segments.map((ge,Ee)=>{const ze=re.slice(ge.from,ge.to),Re=Ee===0;return a.jsx("div",{className:`${e}-line${ge.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${ge.top}px`,left:`${ge.left}px`,width:`${ge.width}px`,textAlign:ge.justify?void 0:Y},children:ze.map((xe,Ie)=>{const Ne=ce&&Re&&ge.from===0&&Ie===0?xe.text.slice(1):xe.text,it=Ed(xe.leaf),ot=xe.href?a.jsx("a",{className:`${e}-link`,href:xe.href,target:xe.target,rel:xe.target?"noopener noreferrer":void 0,style:it,children:Ne}):a.jsx("span",{style:it,children:Ne});return a.jsxs("span",{children:[!ge.justify&&Ie>0?" ":null,ot]},Ie)})},`${ge.from}-${ge.to}-${Ee}`)}),h&&!J&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:ne.map((ge,Ee)=>a.jsx("polygon",{points:ge.map(ze=>`${ze.x},${ze.y}`).join(" ")},Ee))})]}),ce&&R&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...v,top:`${N.capTop+me}px`,left:`${N.capLeft}px`,fontSize:`${U}px`,lineHeight:`${U}px`},children:ce}),te&&B&&(J&&L||V)&&ri.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:B.top,left:B.left,width:B.width,height:B.height,zIndex:lC,pointerEvents:"none"},children:[J&&L&&a.jsx(tC,{P:e,box:{width:B.width,height:B.height},viewBox:r,contours:J,snap:L.snap,stretchToBox:!ue,uniformStretch:n==="circle",stage:j,onStageChange:K,onSelectionChange:he,onChange:L.onChange,onCommit:L.onCommit}),V&&fe&&a.jsx(Y$,{P:e,box:{width:B.width,height:B.height},bounds:fe,natural:le,imageUrl:b,maskPath:Be,stage:j,onStageChange:K,focalX:nt,focalY:tt,scale:Ve,onChange:V.onChange,onCommit:V.onCommit})]}),te),a.jsx("div",{className:`${e}-a11y`,children:q.map((ge,Ee)=>a.jsx("p",{children:ge},Ee))})]})}const Sp=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],hC={x:0,y:0,width:100,height:100},fC=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?hC:{x:t[0],y:t[1],width:t[2],height:t[3]}},yC=e=>`
26424
26509
  .${e}-wrapper {
26425
26510
  box-sizing: border-box;
26426
26511
  display: flex;
@@ -26646,7 +26731,7 @@ export function Burger({
26646
26731
  clip-path: inset(50%);
26647
26732
  white-space: nowrap;
26648
26733
  }
26649
- `,mC=1;function gC({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:d}=A.useScopedStyles(),c=s.useMemo(()=>pC(d),[d]),u=n??!1,p=!!r||!!o,x=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),v=(e==null?void 0:e.shape)??"custom",m=(e==null?void 0:e.customPath)??"",h=(e==null?void 0:e.pathFit)??"stretch",y=s.useMemo(()=>uC(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),b=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",C=(e==null?void 0:e.textAlign)??"left",S=((e==null?void 0:e.overflowMode)??"clip")==="visible",w=((e==null?void 0:e.fitText)??"off")==="on",D=(e==null?void 0:e.dropCapSize)??mC,_=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??D)),z=u&&p&&!i,[H,L]=s.useState(!1);s.useEffect(()=>{if(!u||!p){L(!1);return}const N=()=>L(!0),U=()=>L(!1),me=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],K=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const I of me)window.addEventListener(I,N);for(const I of K)window.addEventListener(I,U);return()=>{for(const I of me)window.removeEventListener(I,N);for(const I of K)window.removeEventListener(I,U)}},[u,p]);const V=u&&p&&!i&&typeof l=="function",$=!H,E=Math.max(0,(e==null?void 0:e.pathSnap)??0),F=s.useRef(e??{}),W=s.useRef(""),g=[e==null?void 0:e.customPath,e==null?void 0:e.shape,e==null?void 0:e.pathFit,e==null?void 0:e.pathViewBox,e==null?void 0:e.imageScale,e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.image].join("\0");if(g!==W.current)W.current=g,F.current=e??{};else if(e){const{customPath:N,shape:U,pathFit:me,pathViewBox:K,imageScale:I,imageFocalX:ie,imageFocalY:oe,image:B,...te}=e,Ae=F.current;for(const he of Object.keys(te))if(Ae[he]!==te[he]){F.current={...Ae,...te};break}}const[M,R]=s.useState(null),[G,Z]=s.useState(!1),[T,j]=s.useState(!1),Y=s.useCallback(()=>j(!1),[]),le=F.current.shape??v,se=s.useMemo(()=>!M||M.serialized===m?m:M.serialized,[M,m]);s.useEffect(()=>{V||(Z(!1),j(!1))},[V]),s.useEffect(()=>{!M||G||M.serialized===m&&R(null)},[M,m,G]);const k=s.useMemo(()=>{if(!V)return null;if(M&&(M.base===m||M.serialized===m))return M.contours;const N=Li(m);return N.length?N:null},[V,M,m]),re=!!(h==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===Ws&&k&&(v==="circle"||!pp(k,y))),q=s.useCallback((N,U,me)=>{const K=No(N);if(R(I=>({base:I&&(I.base===m||I.serialized===m)?I.base:m,serialized:K,contours:N})),U){const I=F.current,ie=me!=null&&me.preserveShape?I.shape:"custom",oe={...I,shape:ie,customPath:K};F.current=oe,l==null||l(oe)}},[m,l]),ce=s.useMemo(()=>V?{contours:re?k:null,snap:E,needsConversion:!re,onConvert:N=>{const U=No(N);R({base:U,serialized:U,contours:N});const me={...F.current,pathFit:"viewbox",pathViewBox:Ws,customPath:U};F.current=me,l==null||l(me)},onChange:(N,U)=>{Z(!0),j(!!(U!=null&&U.carryImage)),q(N,!1)},onCommit:(N,U)=>{q(N,!0,U),Z(!1)}}:null,[V,re,k,E,l,q]),J=b==="avoid"&&!!(e!=null&&e.image),be=s.useMemo(()=>({focalX:(e==null?void 0:e.imageFocalX)??.5,focalY:(e==null?void 0:e.imageFocalY)??.5,scale:(e==null?void 0:e.imageScale)??1}),[e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.imageScale]),[We,ye]=s.useState(null),ue=We??be,ee=s.useCallback(N=>ye(N),[]),de=s.useCallback(N=>{ye(N);const U={...F.current,imageFocalX:N.focalX,imageFocalY:N.focalY,imageScale:N.scale};F.current=U,l==null||l(U)},[l]);s.useEffect(()=>{We&&Math.abs(We.focalX-be.focalX)<1e-9&&Math.abs(We.focalY-be.focalY)<1e-9&&Math.abs(We.scale-be.scale)<1e-9&&ye(null)},[We,be]);const ne=s.useMemo(()=>!V||!J?null:{onChange:ee,onCommit:de},[V,J,ee,de]),[Pe,Te]=s.useState(void 0),Oe=s.useRef(void 0),ve=s.useCallback(N=>{const U=Oe.current;U!==void 0&&Math.abs(U-N)<.005||(Oe.current=N,Te(N))},[]),Se=s.useMemo(()=>w&&typeof Pe=="number"?Pe:1,[Pe,w]),$e=N=>`calc(${N} * var(--${d}-fit, 1))`,f=s.useMemo(()=>{var me,K,I,ie,oe;const N=(e==null?void 0:e.textFontSize)??.012,U=Math.max((e==null?void 0:e.textLineHeight)??N,N);return{fontFamily:Oo(e==null?void 0:e.textFontFamily),fontWeight:(me=e==null?void 0:e.textFontSettings)==null?void 0:me.fontWeight,fontStyle:(K=e==null?void 0:e.textFontSettings)==null?void 0:K.fontStyle,fontSize:$e(A.scalingValue(N,u)),lineHeight:$e(A.scalingValue(U,u)),letterSpacing:$e(A.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:$e(A.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:(I=e==null?void 0:e.textTextAppearance)==null?void 0:I.textTransform,textDecoration:(ie=e==null?void 0:e.textTextAppearance)==null?void 0:ie.textDecoration,fontVariant:(oe=e==null?void 0:e.textTextAppearance)==null?void 0:oe.fontVariant}},[e,u,d]),X={[`--${d}-text-color`]:(e==null?void 0:e.textColor)??"#000000",[`--${d}-link-color`]:(e==null?void 0:e.linkColor)??(e==null?void 0:e.textColor)??"#000000",[`--${d}-background-color`]:(e==null?void 0:e.backgroundColor)??"transparent"};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{className:`${d}-wrapper`,style:{...X},children:a.jsx(cC,{P:d,item:x,shape:le,customPath:m,pathFit:h,viewBox:y,mode:b,align:C,allowOverflow:S,fitEnabled:w,scale:Se,onFitScale:ve,dropCapLines:_,dropCapSize:D,showGuides:(z||V)&&$,typography:f,imageUrl:b==="avoid"?e==null?void 0:e.image:null,imageFocalX:ue.focalX,imageFocalY:ue.focalY,imageScale:ue.scale,imageCustomPath:se,pathDragActive:G,pathCarryImage:T,onCarryImageConsumed:Y,pathEditor:$?ce:null,imageEditor:$?ne:null})})]})}const hC=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
26734
+ `,vC=1;function xC({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:d}=A.useScopedStyles(),c=s.useMemo(()=>yC(d),[d]),u=n??!1,p=!!r||!!o,x=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),y=(e==null?void 0:e.shape)??"custom",m=(e==null?void 0:e.customPath)??"",h=(e==null?void 0:e.pathFit)??"stretch",v=s.useMemo(()=>fC(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),b=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",C=(e==null?void 0:e.textAlign)??"left",S=((e==null?void 0:e.overflowMode)??"clip")==="visible",w=((e==null?void 0:e.fitText)??"off")==="on",D=(e==null?void 0:e.dropCapSize)??vC,_=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??D)),z=u&&p&&!i,[H,L]=s.useState(!1);s.useEffect(()=>{if(!u||!p){L(!1);return}const N=()=>L(!0),U=()=>L(!1),me=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],Y=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const I of me)window.addEventListener(I,N);for(const I of Y)window.addEventListener(I,U);return()=>{for(const I of me)window.removeEventListener(I,N);for(const I of Y)window.removeEventListener(I,U)}},[u,p]);const V=u&&p&&!i&&typeof l=="function",$=!H,k=Math.max(0,(e==null?void 0:e.pathSnap)??0),F=s.useRef(e??{}),W=s.useRef(""),g=[e==null?void 0:e.customPath,e==null?void 0:e.shape,e==null?void 0:e.pathFit,e==null?void 0:e.pathViewBox,e==null?void 0:e.imageScale,e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.image].join("\0");if(g!==W.current)W.current=g,F.current=e??{};else if(e){const{customPath:N,shape:U,pathFit:me,pathViewBox:Y,imageScale:I,imageFocalX:ie,imageFocalY:oe,image:B,...te}=e,Ae=F.current;for(const he of Object.keys(te))if(Ae[he]!==te[he]){F.current={...Ae,...te};break}}const[E,R]=s.useState(null),[G,Z]=s.useState(!1),[T,j]=s.useState(!1),K=s.useCallback(()=>j(!1),[]),le=F.current.shape??y,se=s.useMemo(()=>!E||E.serialized===m?m:E.serialized,[E,m]);s.useEffect(()=>{V||(Z(!1),j(!1))},[V]),s.useEffect(()=>{!E||G||E.serialized===m&&R(null)},[E,m,G]);const M=s.useMemo(()=>{if(!V)return null;if(E&&(E.base===m||E.serialized===m))return E.contours;const N=Li(m);return N.length?N:null},[V,E,m]),re=!!(h==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===Hs&&M&&(y==="circle"||!fp(M,v))),q=s.useCallback((N,U,me)=>{const Y=No(N);if(R(I=>({base:I&&(I.base===m||I.serialized===m)?I.base:m,serialized:Y,contours:N})),U){const I=F.current,ie=me!=null&&me.preserveShape?I.shape:"custom",oe={...I,shape:ie,customPath:Y};F.current=oe,l==null||l(oe)}},[m,l]),ce=s.useMemo(()=>V?{contours:re?M:null,snap:k,needsConversion:!re,onConvert:N=>{const U=No(N);R({base:U,serialized:U,contours:N});const me={...F.current,pathFit:"viewbox",pathViewBox:Hs,customPath:U};F.current=me,l==null||l(me)},onChange:(N,U)=>{Z(!0),j(!!(U!=null&&U.carryImage)),q(N,!1)},onCommit:(N,U)=>{q(N,!0,U),Z(!1)}}:null,[V,re,M,k,l,q]),J=b==="avoid"&&!!(e!=null&&e.image),be=s.useMemo(()=>({focalX:(e==null?void 0:e.imageFocalX)??.5,focalY:(e==null?void 0:e.imageFocalY)??.5,scale:(e==null?void 0:e.imageScale)??1}),[e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.imageScale]),[We,ye]=s.useState(null),ue=We??be,ee=s.useCallback(N=>ye(N),[]),de=s.useCallback(N=>{ye(N);const U={...F.current,imageFocalX:N.focalX,imageFocalY:N.focalY,imageScale:N.scale};F.current=U,l==null||l(U)},[l]);s.useEffect(()=>{We&&Math.abs(We.focalX-be.focalX)<1e-9&&Math.abs(We.focalY-be.focalY)<1e-9&&Math.abs(We.scale-be.scale)<1e-9&&ye(null)},[We,be]);const ne=s.useMemo(()=>!V||!J?null:{onChange:ee,onCommit:de},[V,J,ee,de]),[Pe,Te]=s.useState(void 0),Oe=s.useRef(void 0),ve=s.useCallback(N=>{const U=Oe.current;U!==void 0&&Math.abs(U-N)<.005||(Oe.current=N,Te(N))},[]),Se=s.useMemo(()=>w&&typeof Pe=="number"?Pe:1,[Pe,w]),$e=N=>`calc(${N} * var(--${d}-fit, 1))`,f=s.useMemo(()=>{var me,Y,I,ie,oe;const N=(e==null?void 0:e.textFontSize)??.012,U=Math.max((e==null?void 0:e.textLineHeight)??N,N);return{fontFamily:Oo(e==null?void 0:e.textFontFamily),fontWeight:(me=e==null?void 0:e.textFontSettings)==null?void 0:me.fontWeight,fontStyle:(Y=e==null?void 0:e.textFontSettings)==null?void 0:Y.fontStyle,fontSize:$e(A.scalingValue(N,u)),lineHeight:$e(A.scalingValue(U,u)),letterSpacing:$e(A.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:$e(A.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:(I=e==null?void 0:e.textTextAppearance)==null?void 0:I.textTransform,textDecoration:(ie=e==null?void 0:e.textTextAppearance)==null?void 0:ie.textDecoration,fontVariant:(oe=e==null?void 0:e.textTextAppearance)==null?void 0:oe.fontVariant}},[e,u,d]),X={[`--${d}-text-color`]:(e==null?void 0:e.textColor)??"#000000",[`--${d}-link-color`]:(e==null?void 0:e.linkColor)??(e==null?void 0:e.textColor)??"#000000",[`--${d}-background-color`]:(e==null?void 0:e.backgroundColor)??"transparent"};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{className:`${d}-wrapper`,style:{...X},children:a.jsx(gC,{P:d,item:x,shape:le,customPath:m,pathFit:h,viewBox:v,mode:b,align:C,allowOverflow:S,fitEnabled:w,scale:Se,onFitScale:ve,dropCapLines:_,dropCapSize:D,showGuides:(z||V)&&$,typography:f,imageUrl:b==="avoid"?e==null?void 0:e.image:null,imageFocalX:ue.focalX,imageFocalY:ue.focalY,imageScale:ue.scale,imageCustomPath:se,pathDragActive:G,pathCarryImage:T,onCarryImageConsumed:K,pathEditor:$?ce:null,imageEditor:$?ne:null})})]})}const bC=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
26650
26735
  import type React from 'react';
26651
26736
  import { CommonComponentProps } from '../props';
26652
26737
  import { scalingValue, useScopedStyles } from '../utils/index';
@@ -27457,4 +27542,4 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
27457
27542
  </>
27458
27543
  );
27459
27544
  }
27460
- `,Md=[...yp],fC={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},yC={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",display:{type:"shape-select",isFilled:!0,enum:Md},enum:Md},customPath:{type:"string",scope:"layout",title:"Path",tooltip:"SVG path (M…) or a point list (0,0 100,0 50,100). Used when Shape is set to custom.",display:{type:"full-width-input",placeholder:"M0,0 C…"}},pathSnap:{type:"number",scope:"common",title:"Snap",tooltip:"Grid the points snap to while dragging, in path units (the path box is 100 x 100). 0 is off.",min:0,max:25,step:.5,display:{type:"numeric-input"}},pathFit:{type:"string",scope:"common",title:"Path fit",tooltip:"Stretch — the drawing fills the box. Viewbox — the drawing keeps its position in path coordinates (0–100).",display:{type:"toggle-cycle",enum:["stretch","viewbox"]}},shapeMode:{type:"string",scope:"common",title:"",tooltip:"A — text fills the path. B — text flows around the path.",display:{type:"radio-group"},enum:["A","B"]},fitText:{type:"string",scope:"common",title:"Fit text",tooltip:"Scales the type down until all text fits the path.",display:{type:"toggle-cycle",enum:["off","on"]}},dropCapLines:{type:"number",scope:"common",title:"Drop cap lines",min:1,max:8,step:1,display:{type:"numeric-input"}},dropCapSize:{type:"number",scope:"common",title:"Drop cap size",tooltip:"Height of the drop cap, in lines of body text.",min:1,max:8,step:1,display:{type:"common-numeric-input"}},image:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},backgroundColor:{type:"string",scope:"common",title:"BG Shape",display:{type:"settings-color-picker"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...fC.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textAlign:{type:"string",scope:"layout",title:"",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"style-panel-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"style-panel-color-picker"}}},defaults:{...mp("circle"),pathSnap:0,shapeMode:"A",fitText:"off",dropCapLines:1,dropCapSize:1,image:"https://cdn.cntrl.site/component-assets/shapedType_img.jpg",backgroundColor:"rgba(0, 0, 0, 0)",textFontFamily:"Basteleur",textFontSettings:{fontWeight:400,fontStyle:"normal"},textAlign:"center",textTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",linkColor:"#000000"},layoutDefaults:{m:{textFontSize:.037,textLineHeight:.048,textLetterSpacing:0,textWordSpacing:0},t:{textFontSize:.018,textLineHeight:.024,textLetterSpacing:0,textWordSpacing:0},d:{textFontSize:.032,textLineHeight:.0155,textLetterSpacing:-.001,textWordSpacing:0}},layout:["__componentName__","shape","customPath","pathSnap","pathFit","shapeMode","fitText","dropCapLines","dropCapSize","image"],displayRules:[{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.image.display.visible",value:!1}},{if:{name:"shapeMode",value:"A"},then:{name:"properties.shape.display.isFilled",value:!0}},{if:{name:"shapeMode",value:"B"},then:{name:"properties.shape.display.isFilled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["shapeMode"]},{type:"row",title:"Shape",items:["shape"]},{type:"row",items:["dropCapSize","image"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textAlign","textTextAppearance"]}]}],paletteBookmark:{items:["textColor","linkColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",max:1,settings:{addItemWithoutImage:!0,addItemFromFileExplorer:!1},display:{type:"array"},items:{type:"object",properties:{text:{label:"Text",placeholder:"Add Text...",display:{type:"rich-text"}}}},default:[{text:[{type:"paragraph",children:[{text:"Le loro superficie, excelso Duca, fra loro similmente possiamo dire al medesimo modo esser proportionali commo de lor massa corporea s'è dicto, cioè irrationali per la malitia de la figura pentagona che in lo duodecedron se interpone. Ma de l'altre possano a le volte essere rationali, commo quelle del tetracedron, cubo, octocedron, per essere triangole e quadrate e note in proportione con lo diametro de la loro sphera in la quale si formano, commo s'è veduto di sopra."}]}]}]}},vC={element:gC,id:"pretext",name:"Shaped Type",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||yp.indexOf(n)===-1||(t==null?void 0:t.shape)===n?e:{...e,...mp(n)}},defaultSize:{d:{width:1420,height:640},t:{width:710,height:320},m:{width:355,height:160}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/pretext.png"},schema:yC,sourceCode:hC,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},xC=[Rg,Ng,Rx,Ih,_h,Xh,pf,Nf,Bf,Kf,by,mv,y0,L0,lx,xx,Dx,_b,Zx,Qb,ES,gw,o$,vC];exports.getAvailableStatePanels=A.getAvailableStatePanels;exports.getUnavailableStates=A.getUnavailableStates;exports.isPanelAvailable=A.isPanelAvailable;exports.components=xC;exports.isSchemaV1=xp;
27545
+ `,Ad=[...Sp],SC={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},wC={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",display:{type:"shape-select",isFilled:!0,enum:Ad},enum:Ad},customPath:{type:"string",scope:"layout",title:"Path",tooltip:"SVG path (M…) or a point list (0,0 100,0 50,100). Used when Shape is set to custom.",display:{type:"full-width-input",placeholder:"M0,0 C…"}},pathSnap:{type:"number",scope:"common",title:"Snap",tooltip:"Grid the points snap to while dragging, in path units (the path box is 100 x 100). 0 is off.",min:0,max:25,step:.5,display:{type:"numeric-input"}},pathFit:{type:"string",scope:"common",title:"Path fit",tooltip:"Stretch — the drawing fills the box. Viewbox — the drawing keeps its position in path coordinates (0–100).",display:{type:"toggle-cycle",enum:["stretch","viewbox"]}},shapeMode:{type:"string",scope:"common",title:"",tooltip:"A — text fills the path. B — text flows around the path.",display:{type:"radio-group"},enum:["A","B"]},fitText:{type:"string",scope:"common",title:"Fit text",tooltip:"Scales the type down until all text fits the path.",display:{type:"toggle-cycle",enum:["off","on"]}},dropCapLines:{type:"number",scope:"common",title:"Drop cap lines",min:1,max:8,step:1,display:{type:"numeric-input"}},dropCapSize:{type:"number",scope:"common",title:"Drop cap size",tooltip:"Height of the drop cap, in lines of body text.",min:1,max:8,step:1,display:{type:"common-numeric-input"}},image:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},backgroundColor:{type:"string",scope:"common",title:"BG Shape",display:{type:"settings-color-picker"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...SC.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textAlign:{type:"string",scope:"layout",title:"",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"style-panel-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"style-panel-color-picker"}}},defaults:{...yp("circle"),pathSnap:0,shapeMode:"A",fitText:"off",dropCapLines:1,dropCapSize:1,image:"https://cdn.cntrl.site/component-assets/shapedType_img.jpg",backgroundColor:"rgba(0, 0, 0, 0)",textFontFamily:"Basteleur",textFontSettings:{fontWeight:400,fontStyle:"normal"},textAlign:"center",textTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",linkColor:"#000000"},layoutDefaults:{m:{textFontSize:.037,textLineHeight:.048,textLetterSpacing:0,textWordSpacing:0},t:{textFontSize:.018,textLineHeight:.024,textLetterSpacing:0,textWordSpacing:0},d:{textFontSize:.032,textLineHeight:.0155,textLetterSpacing:-.001,textWordSpacing:0}},layout:["__componentName__","shape","customPath","pathSnap","pathFit","shapeMode","fitText","dropCapLines","dropCapSize","image"],displayRules:[{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.image.display.visible",value:!1}},{if:{name:"shapeMode",value:"A"},then:{name:"properties.shape.display.isFilled",value:!0}},{if:{name:"shapeMode",value:"B"},then:{name:"properties.shape.display.isFilled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["shapeMode"]},{type:"row",title:"Shape",items:["shape"]},{type:"row",items:["dropCapSize","image"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textAlign","textTextAppearance"]}]}],paletteBookmark:{items:["textColor","linkColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",max:1,settings:{addItemWithoutImage:!0,addItemFromFileExplorer:!1},display:{type:"array"},items:{type:"object",properties:{text:{label:"Text",placeholder:"Add Text...",display:{type:"rich-text"}}}},default:[{text:[{type:"paragraph",children:[{text:"Le loro superficie, excelso Duca, fra loro similmente possiamo dire al medesimo modo esser proportionali commo de lor massa corporea s'è dicto, cioè irrationali per la malitia de la figura pentagona che in lo duodecedron se interpone. Ma de l'altre possano a le volte essere rationali, commo quelle del tetracedron, cubo, octocedron, per essere triangole e quadrate e note in proportione con lo diametro de la loro sphera in la quale si formano, commo s'è veduto di sopra."}]}]}]}},$C={element:xC,id:"pretext",name:"Shaped Type",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||Sp.indexOf(n)===-1||(t==null?void 0:t.shape)===n?e:{...e,...yp(n)}},defaultSize:{d:{width:1420,height:640},t:{width:710,height:320},m:{width:355,height:160}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/pretext.png"},schema:wC,sourceCode:bC,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},CC=[Mg,Og,Mx,Eh,Dh,Kh,ff,Of,Xf,Qf,Cy,yv,S0,k0,px,$x,Vx,Db,tb,iS,FS,vw,c$,$C];exports.getAvailableStatePanels=A.getAvailableStatePanels;exports.getUnavailableStates=A.getUnavailableStates;exports.isPanelAvailable=A.isPanelAvailable;exports.components=CC;exports.isSchemaV1=$p;